• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021-2025 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import path from 'path';
17import { EXT_WHITE_LIST } from './component_map';
18
19export const NATIVE_MODULE: Set<string> = new Set(
20  ['system.app', 'ohos.app', 'system.router', 'system.curves', 'ohos.curves', 'system.matrix4', 'ohos.matrix4']);
21export const VALIDATE_MODULE: string[] = ['application', 'util', 'screen', 'mediaquery'];
22export const SYSTEM_PLUGIN: string = 'system';
23export const OHOS_PLUGIN: string = 'ohos';
24// 'arkui-x' represents cross platform related APIs, processed as 'ohos'
25export const ARKUI_X_PLUGIN: string = 'arkui-x';
26
27export const COMPONENT_DECORATOR_ENTRY: string = '@Entry';
28export const COMPONENT_DECORATOR_PREVIEW: string = '@Preview';
29export const COMPONENT_DECORATOR_COMPONENT: string = '@Component';
30export const COMPONENT_DECORATOR_CUSTOM_DIALOG: string = '@CustomDialog';
31export const COMPONENT_DECORATOR_REUSEABLE: string = '@Reusable';
32export const DECORATOR_REUSEABLE: string = 'Reusable';
33
34export const COMPONENT_RECYCLE: string = '__Recycle__';
35export const RECYCLE_REUSE_ID: string = 'reuseId';
36
37export const COMPONENT_NON_DECORATOR: string = 'regular';
38export const COMPONENT_STATE_DECORATOR: string = '@State';
39export const COMPONENT_PROP_DECORATOR: string = '@Prop';
40export const COMPONENT_LINK_DECORATOR: string = '@Link';
41export const COMPONENT_STORAGE_PROP_DECORATOR: string = '@StorageProp';
42export const COMPONENT_STORAGE_LINK_DECORATOR: string = '@StorageLink';
43export const COMPONENT_PROVIDE_DECORATOR: string = '@Provide';
44export const COMPONENT_CONSUME_DECORATOR: string = '@Consume';
45export const COMPONENT_OBJECT_LINK_DECORATOR: string = '@ObjectLink';
46export const COMPONENT_WATCH_DECORATOR: string = '@Watch';
47export const COMPONENT_BUILDERPARAM_DECORATOR: string = '@BuilderParam';
48export const COMPONENT_LOCAL_STORAGE_LINK_DECORATOR: string = '@LocalStorageLink';
49export const COMPONENT_LOCAL_STORAGE_PROP_DECORATOR: string = '@LocalStorageProp';
50export const COMPONENT_CUSTOM_DECORATOR: string = 'COMPONENT_CUSTOM_DECORATOR';
51export const COMPONENT_REQUIRE_DECORATOR: string = '@Require';
52
53export const COMPONENTV2_LOCAL_DECORATOR: string = '@Local';
54export const COMPONENTV2_PARAM_DECORATOR: string = '@Param';
55export const COMPONENTV2_ONCE_DECORATOR: string = '@Once';
56export const COMPONENTV2_EVENT_DECORATOR: string = '@Event';
57export const COMPONENTV2_CONSUMER_DECORATOR: string = '@Consumer';
58export const COMPONENTV2_PROVIDER_DECORATOR: string = '@Provider';
59
60export const CLASS_TRACK_DECORATOR: string = 'Track';
61export const CLASS_MIN_TRACK_DECORATOR: string = 'Trace';
62export const COMPONENT_DECORATOR_COMPONENT_V2: string = '@ComponentV2';
63export const COMPONENT_DECORATOR_REUSABLE_V2: string = '@ReusableV2';
64export const DECORATOR_REUSABLE_V2: string = 'ReusableV2';
65export const REUSABLE_V2_INNER_DECORATOR: string = '__ReusableV2_Inner_Decorator__';
66export const REUSE_ATTRIBUTE: string = 'reuse';
67
68export const COMPONENT_DECORATORS_PARAMS: Set<string> = new Set([COMPONENT_CONSUME_DECORATOR,
69  COMPONENT_STORAGE_PROP_DECORATOR, COMPONENT_STORAGE_LINK_DECORATOR, COMPONENT_PROVIDE_DECORATOR,
70  COMPONENT_WATCH_DECORATOR]);
71export const INNER_COMPONENT_DECORATORS: Set<string> = new Set([COMPONENT_DECORATOR_ENTRY,
72  COMPONENT_DECORATOR_PREVIEW, COMPONENT_DECORATOR_COMPONENT, COMPONENT_DECORATOR_CUSTOM_DIALOG,
73  COMPONENT_DECORATOR_REUSEABLE, COMPONENT_DECORATOR_COMPONENT_V2, COMPONENT_DECORATOR_REUSABLE_V2]);
74export const INNER_COMPONENT_MEMBER_DECORATORS: Set<string> = new Set([COMPONENT_STATE_DECORATOR,
75  COMPONENT_PROP_DECORATOR, COMPONENT_LINK_DECORATOR, COMPONENT_STORAGE_PROP_DECORATOR,
76  COMPONENT_STORAGE_LINK_DECORATOR, COMPONENT_PROVIDE_DECORATOR, COMPONENT_CONSUME_DECORATOR,
77  COMPONENT_OBJECT_LINK_DECORATOR, COMPONENT_WATCH_DECORATOR, COMPONENT_BUILDERPARAM_DECORATOR,
78  COMPONENT_LOCAL_STORAGE_LINK_DECORATOR, COMPONENT_LOCAL_STORAGE_PROP_DECORATOR,
79  COMPONENT_REQUIRE_DECORATOR]);
80export const STRUCT_DECORATORS: Set<string> = new Set([...INNER_COMPONENT_DECORATORS,
81  ...INNER_COMPONENT_MEMBER_DECORATORS]);
82
83export const COMPONENT_OBSERVED_DECORATOR: string = '@Observed';
84export const COMPONENT_OBSERVEDV2_DECORATOR: string = '@ObservedV2';
85export const OBSERVED: string = 'Observed';
86export const MIN_OBSERVED: string = 'ObservedV2';
87export const SENDABLE: string = 'Sendable';
88export const TYPE: string = 'Type';
89export const COMPONENT_BUILDER_DECORATOR: string = '@Builder';
90export const COMPONENT_LOCAL_BUILDER_DECORATOR: string = '@LocalBuilder';
91export const COMPONENT_EXTEND_DECORATOR: string = '@Extend';
92export const COMPONENT_STYLES_DECORATOR: string = '@Styles';
93export const COMPONENT_ANIMATABLE_EXTEND_DECORATOR: string = '@AnimatableExtend';
94export const COMPONENT_CONCURRENT_DECORATOR: string = '@Concurrent';
95export const COMPONENT_SENDABLE_DECORATOR: string = '@Sendable';
96export const COMPONENT_USER_INTENTS_DECORATOR: string = '@InsightIntentLink';
97export const COMPONENT_USER_INTENTS_DECORATOR_ENTRY: string = '@InsightIntentEntry';
98export const COMPONENT_USER_INTENTS_DECORATOR_FUNCTION: string = '@InsightIntentFunction';
99export const COMPONENT_USER_INTENTS_DECORATOR_METHOD: string = '@InsightIntentFunctionMethod';
100export const COMPONENT_USER_INTENTS_DECORATOR_PAGE: string = '@InsightIntentPage';
101export const COMPONENT_USER_INTENTS_DECORATOR_ENTITY: string = '@InsightIntentEntity';
102export const COMPONENT_USER_INTENTS_DECORATOR_FORM: string = '@InsightIntentForm';
103export const CHECK_COMPONENT_EXTEND_DECORATOR: string = 'Extend';
104export const STRUCT_CONTEXT_METHOD_DECORATORS: Set<string> = new Set([COMPONENT_BUILDER_DECORATOR,
105  COMPONENT_STYLES_DECORATOR, COMPONENT_LOCAL_BUILDER_DECORATOR]);
106export const CHECK_COMPONENT_ANIMATABLE_EXTEND_DECORATOR: string = 'AnimatableExtend';
107export const EXTEND_DECORATORS: string[] = [
108  COMPONENT_EXTEND_DECORATOR,
109  COMPONENT_ANIMATABLE_EXTEND_DECORATOR
110];
111export const CHECK_EXTEND_DECORATORS: string[] = [
112  CHECK_COMPONENT_EXTEND_DECORATOR,
113  CHECK_COMPONENT_ANIMATABLE_EXTEND_DECORATOR
114];
115
116export const CREATE_ANIMATABLE_PROPERTY: string = 'createAnimatableProperty';
117export const UPDATE_ANIMATABLE_PROPERTY: string = 'updateAnimatableProperty';
118export const GET_AND_PUSH_FRAME_NODE: string = 'GetAndPushFrameNode';
119export const FINISH_UPDATE_FUNC: string = 'finishUpdateFunc';
120
121export const OBSERVED_PROPERTY_SIMPLE: string = 'ObservedPropertySimple';
122export const OBSERVED_PROPERTY_OBJECT: string = 'ObservedPropertyObject';
123export const SYNCHED_PROPERTY_SIMPLE_ONE_WAY: string = 'SynchedPropertySimpleOneWay';
124export const SYNCHED_PROPERTY_SIMPLE_TWO_WAY: string = 'SynchedPropertySimpleTwoWay';
125export const SYNCHED_PROPERTY_OBJECT_TWO_WAY: string = 'SynchedPropertyObjectTwoWay';
126export const SYNCHED_PROPERTY_NESED_OBJECT: string = 'SynchedPropertyNesedObject';
127export const DECORATOR_TYPE_ANY: string = 'any';
128
129export const INITIALIZE_CONSUME_FUNCTION: string = 'initializeConsume';
130export const ADD_PROVIDED_VAR: string = 'addProvidedVar';
131
132export const APP_STORAGE: string = 'AppStorage';
133export const APP_STORAGE_SET_AND_PROP: string = 'SetAndProp';
134export const APP_STORAGE_SET_AND_LINK: string = 'SetAndLink';
135
136export const PAGE_ENTRY_FUNCTION_NAME: string = 'loadDocument';
137export const STORE_PREVIEW_COMPONENTS: string = 'storePreviewComponents';
138export const PREVIEW_COMPONENT_FUNCTION_NAME: string = 'previewComponent';
139export const GET_PREVIEW_FLAG_FUNCTION_NAME: string = 'getPreviewComponentFlag';
140
141export const COMPONENT_DECORATOR_NAME_COMPONENT: string = 'Component';
142export const XCOMPONENT_SINGLE_QUOTATION: string = `'component'`;
143export const XCOMPONENT_DOUBLE_QUOTATION: string = `"component"`;
144export const XCOMPONENTTYPE: string = 'XComponentType';
145export const XCOMPONENTTYPE_CONTAINER: string = 'COMPONENT';
146export const COMPONENT_DECORATOR_NAME_CUSTOMDIALOG: string = 'CustomDialog';
147export const CUSTOM_DECORATOR_NAME: Set<string> = new Set([
148  COMPONENT_DECORATOR_NAME_COMPONENT, COMPONENT_DECORATOR_NAME_CUSTOMDIALOG,
149  DECORATOR_REUSEABLE, 'Entry', 'Preview'
150]);
151
152export const EXTNAME_ETS: string = '.ets';
153export const NODE_MODULES: string = 'node_modules';
154export const PACKAGES: string = 'pkg_modules';
155export const INDEX_ETS: string = 'index.ets';
156export const INDEX_TS: string = 'index.ts';
157export const PACKAGE_JSON: string = 'package.json';
158export const CUSTOM_COMPONENT_DEFAULT: string = 'default';
159export const TS_WATCH_END_MSG: string = 'TS Watch End';
160
161export const BASE_COMPONENT_NAME: string = 'View';
162export const STRUCT: string = 'struct';
163export const CLASS: string = 'class';
164export const COMPONENT_BUILD_FUNCTION: string = 'build';
165export const COMPONENT_RENDER_FUNCTION: string = 'render';
166export const COMPONENT_TRANSITION_FUNCTION: string = 'pageTransition';
167export const COMPONENT_TRANSITION_NAME: string = 'PageTransition';
168export const CUSTOM_COMPONENT: string = 'CustomComponent';
169export const GLOBAL_THIS_REQUIRE_NATIVE_MODULE: string = 'globalThis.requireNativeModule';
170export const GLOBAL_THIS_REQUIRE_NAPI: string = 'globalThis.requireNapi';
171
172export const COMPONENT_BUTTON: string = 'Button';
173export const COMPONENT_FOREACH: string = 'ForEach';
174export const COMPONENT_LAZYFOREACH: string = 'LazyForEach';
175export const COMPONENT_REPEAT: string = 'Repeat';
176export const REPEAT_EACH: string = 'each';
177export const REPEAT_TEMPLATE: string = 'template';
178export const IS_RENDERING_IN_PROGRESS: string = 'isRenderingInProgress';
179export const FOREACH_OBSERVED_OBJECT: string = 'ObservedObject';
180export const FOREACH_GET_RAW_OBJECT: string = 'GetRawObject';
181export const COMPONENT_IF: string = 'If';
182export const COMPONENT_IF_BRANCH_ID_FUNCTION: string = 'branchId';
183export const COMPONENT_IF_UNDEFINED: string = 'undefined';
184export const GLOBAL_CONTEXT: string = 'Context';
185export const ATTRIBUTE_ANIMATION: string = 'animation';
186export const ATTRIBUTE_ANIMATETO_SET: Set<string> = new Set(['animateTo', 'animateToImmediately']);
187export const ATTRIBUTE_STATESTYLES: string = 'stateStyles';
188export const ATTRIBUTE_ID: string = 'id';
189export const ATTRIBUTE_ATTRIBUTE_MODIFIER: string = 'attributeModifier';
190export const ATTRIBUTE_CONTENT_MODIFIER: string = 'contentModifier';
191export const ATTRIBUTE_MENUITEM_CONTENT_MODIFIER: string = 'menuItemContentModifier';
192export const TRUE: string = 'true';
193export const FALSE: string = 'false';
194export const NULL: string = 'null';
195export const FOREACH_LAZYFOREACH: Set<string> = new Set([
196  COMPONENT_FOREACH, COMPONENT_LAZYFOREACH
197]);
198
199export const COMPONENT_CONSTRUCTOR_ID: string = 'compilerAssignedUniqueChildId';
200export const COMPONENT_CONSTRUCTOR_PARENT: string = 'parent';
201export const COMPONENT_CONSTRUCTOR_PARAMS: string = 'params';
202export const COMPONENT_PARAMS_FUNCTION: string = 'paramsGenerator_';
203export const COMPONENT_PARAMS_LAMBDA_FUNCTION: string = 'paramsLambda';
204export const COMPONENT_CONSTRUCTOR_UNDEFINED: string = 'undefined';
205export const COMPONENT_CONSTRUCTOR_LOCALSTORAGE: string = 'localStorage';
206export const COMPONENT_ABOUTTOREUSEINTERNAL_FUNCTION: string = 'aboutToReuseInternal';
207export const COMPONENT_SET_AND_LINK: string = 'setAndLink';
208export const COMPONENT_SET_AND_PROP: string = 'setAndProp';
209
210export const BUILD_ON: string = 'on';
211export const BUILD_OFF: string = 'off';
212
213export const START: string = 'start';
214export const END: string = 'end';
215
216export const COMPONENT_CREATE_FUNCTION: string = 'create';
217export const COMPONENT_CREATE_LABEL_FUNCTION: string = 'createWithLabel';
218export const COMPONENT_CREATE_CHILD_FUNCTION: string = 'createWithChild';
219export const COMPONENT_POP_FUNCTION: string = 'pop';
220export const COMPONENT_DEBUGLINE_FUNCTION: string = 'debugLine';
221export const COMPONENT_COMMON: string = '__Common__';
222
223export const OBSERVE_RECYCLE_COMPONENT_CREATION: string = 'observeRecycleComponentCreation';
224export const COMPONENT_CREATE_RECYCLE: string = 'createRecycle';
225export const RECYCLE_NODE: string = 'recycleNode';
226export const ABOUT_TO_REUSE: string = 'aboutToReuse';
227export const COMPONENT_UPDATE_ELMT_ID: string = 'updateElmtId';
228export const UPDATE_RECYCLE_ELMT_ID: string = 'updateRecycleElmtId';
229export const OLD_ELMT_ID: string = 'oldElmtId';
230export const NEW_ELMT_ID: string = 'newElmtId';
231export const NAVIGATION: string = 'Navigation';
232export const NAV_DESTINATION: string = 'NavDestination';
233export const NAV_PATH_STACK: string = 'NavPathStack';
234export const CREATE_ROUTER_COMPONENT_COLLECT: Set<string> = new Set([NAVIGATION, NAV_DESTINATION]);
235
236export const COMPONENT_CONSTRUCTOR_UPDATE_PARAMS: string = 'updateWithValueParams';
237export const COMPONENT_CONSTRUCTOR_DELETE_PARAMS: string = 'aboutToBeDeleted';
238
239export const CREATE_GET_METHOD: string = 'get';
240export const CREATE_SET_METHOD: string = 'set';
241export const CREATE_NEWVALUE_IDENTIFIER: string = 'newValue';
242export const CREATE_CONSTRUCTOR_PARAMS: string = 'params';
243export const CREATE_CONSTRUCTOR_SUBSCRIBER_MANAGER: string = 'SubscriberManager';
244export const CREATE_CONSTRUCTOR_GET_FUNCTION: string = 'Get';
245export const CREATE_CONSTRUCTOR_DELETE_FUNCTION: string = 'delete';
246export const ABOUT_TO_BE_DELETE_FUNCTION_ID: string = 'id';
247export const COMPONENT_WATCH_FUNCTION: string = 'declareWatch';
248export const CONTEXT_STACK: string = 'contextStack';
249
250export const CREATE_STATE_METHOD: string = 'createState';
251export const CREATE_PROP_METHOD: string = 'createProp';
252export const CREATE_LINK_METHOD: string = 'createLink';
253export const CREATE_OBSERVABLE_OBJECT_METHOD: string = 'createObservableObject';
254
255export const CUSTOM_COMPONENT_EARLIER_CREATE_CHILD: string = 'earlierCreatedChild_';
256export const CUSTOM_COMPONENT_FUNCTION_FIND_CHILD_BY_ID: string = 'findChildById';
257export const CUSTOM_COMPONENT_NEEDS_UPDATE_FUNCTION: string = 'needsUpdate';
258export const CUSTOM_COMPONENT_MARK_STATIC_FUNCTION: string = 'markStatic';
259export const CUSTOM_COMPONENT_EXTRAINFO: string = 'extraInfo';
260
261export const COMPONENT_GESTURE: string = 'Gesture';
262export const COMPONENT_GESTURE_GROUP: string = 'GestureGroup';
263export const GESTURE_ATTRIBUTE: string = 'gesture';
264export const PARALLEL_GESTURE_ATTRIBUTE: string = 'parallelGesture';
265export const PRIORITY_GESTURE_ATTRIBUTE: string = 'priorityGesture';
266export const GESTURE_ENUM_KEY: string = 'GesturePriority';
267export const GESTURE_ENUM_VALUE_HIGH: string = 'High';
268export const GESTURE_ENUM_VALUE_LOW: string = 'Low';
269export const GESTURE_ENUM_VALUE_PARALLEL: string = 'Parallel';
270
271export const RESOURCE: string = '$r';
272export const RESOURCE_RAWFILE: string = '$rawfile';
273export const RESOURCE_NAME_ID: string = 'id';
274export const RESOURCE_NAME_TYPE: string = 'type';
275export const RESOURCE_NAME_PARAMS: string = 'params';
276export const RESOURCE_NAME_BUNDLE: string = 'bundleName';
277export const RESOURCE_NAME_MODULE: string = 'moduleName';
278export const RESOURCE_TYPE = {
279  color: 10001,
280  float: 10002,
281  string: 10003,
282  plural: 10004,
283  boolean: 10005,
284  intarray: 10006,
285  integer: 10007,
286  pattern: 10008,
287  strarray: 10009,
288  media: 20000,
289  rawfile: 30000,
290  symbol: 40000
291};
292
293export const WORKERS_DIR: string = 'workers';
294export const WORKER_OBJECT: string = 'Worker';
295
296export const TEST_RUNNER_DIR_SET: Set<string> = new Set(['TestRunner', 'testrunner']);
297
298export const SET_CONTROLLER_METHOD: string = 'setController';
299export const SET_CONTROLLER_CTR: string = 'ctr';
300export const SET_CONTROLLER_CTR_TYPE: string = 'CustomDialogController';
301export const JS_DIALOG: string = 'jsDialog';
302export const CUSTOM_DIALOG_CONTROLLER_BUILDER: string = 'builder';
303
304export const BUILDER_ATTR_NAME: string = 'builder';
305export const BUILDER_ATTR_BIND: string = 'bind';
306
307export const GEOMETRY_VIEW: string = 'GeometryView';
308
309export const MODULE_SHARE_PATH: string = 'src' + path.sep + 'main' + path.sep + 'ets' + path.sep + 'share';
310export const BUILD_SHARE_PATH: string = '../share';
311export const MODULE_ETS_PATH: string = 'src' + path.sep + 'main' + path.sep + 'ets';
312export const MODULE_VISUAL_PATH: string = 'src' + path.sep + 'main' + path.sep + 'supervisual';
313
314export const THIS: string = 'this';
315export const STYLES: string = 'Styles';
316export const VISUAL_STATE: string = 'visualState';
317export const VIEW_STACK_PROCESSOR: string = 'ViewStackProcessor';
318
319export const BIND_POPUP: string = 'bindPopup';
320export const BIND_POPUP_SET: Set<string> = new Set(['bindPopup']);
321export const BIND_DRAG_SET: Set<string> = new Set(['onDragStart', 'onItemDragStart']);
322export const ALL_COMPONENTS: string = 'AllComponents';
323export const BIND_OBJECT_PROPERTY: Map<string, Set<string>> = new Map([
324  ['Navigation', new Set(['title'])],
325  ['NavDestination', new Set(['title'])],
326  ['ListItem', new Set(['swipeAction'])],
327  ['MenuItem', new Set([COMPONENT_CREATE_FUNCTION])],
328  ['MenuItemGroup', new Set([COMPONENT_CREATE_FUNCTION])],
329  ['Refresh', new Set([COMPONENT_CREATE_FUNCTION])],
330  ['WaterFlow', new Set([COMPONENT_CREATE_FUNCTION])],
331  ['Radio', new Set([COMPONENT_CREATE_FUNCTION])],
332  ['Checkbox', new Set([COMPONENT_CREATE_FUNCTION])],
333  ['Web', new Set(['bindSelectionMenu'])],
334  [ALL_COMPONENTS, new Set(['bindMenu', 'bindContextMenu', 'bindSheet', 'dragPreview'])]
335]);
336
337export const CHECKED: string = 'checked';
338export const RADIO: string = 'Radio';
339export const $$_VALUE: string = 'value';
340export const $$_CHANGE_EVENT: string = 'changeEvent';
341export const $_VALUE: string = '$value';
342export const TEXT_TIMER: string = 'TextTimer';
343export const REFRESH: string = 'Refresh';
344export const REFRESHING: string = 'refreshing';
345export const FORMAT: string = 'format';
346export const IS_COUNT_DOWN: string = 'isCountDown';
347export const COUNT: string = 'count';
348export const $$_THIS: string = '$$this';
349export const $$_NEW_VALUE: string = 'newValue';
350export const $$: string = '$$';
351export const $$_VISIBILITY: string = 'visibility';
352export const BIND_CONTENT_COVER: string = 'bindContentCover';
353export const BIND_SHEET: string = 'bindSheet';
354export const DATE_PICKER: string = 'DatePicker';
355export const TIME_PICKER: string = 'TimePicker';
356export const RATING: string = 'Rating';
357export const SEAECH: string = 'Search';
358export const CALENDAR: string = 'Calendar';
359export const MODE: string = 'mode';
360export const SHOW_SIDE_BAR: string = 'showSideBar';
361export const SIDE_BAR_WIDTH: string = 'sideBarWidth';
362export const CHECK_BOX: string = 'Checkbox';
363export const SELECT_LOW: string = 'select';
364export const CHECKBOX_GROUP: string = 'CheckboxGroup';
365export const SELECT_ALL: string = 'selectAll';
366export const SELECTED: string = 'selected';
367export const MENU_ITEM: string = 'MenuItem';
368export const PANEL: string = 'Panel';
369export const RATING_LOW: string = 'rating';
370export const VALUE: string = 'value';
371export const SIDE_BAR_CONTAINER: string = 'SideBarContainer';
372export const SLIDER: string = 'Slider';
373export const STEPPER: string = 'Stepper';
374export const INDEX: string = 'index';
375export const SWIPER: string = 'Swiper';
376export const TABS: string = 'Tabs';
377export const TEXT_AREA: string = 'TextArea';
378export const TEXT: string = 'text';
379export const SELECT: string = 'Select';
380export const TEXT_INPUT: string = 'TextInput';
381export const TEXT_PICKER: string = 'TextPicker';
382export const TOGGLE: string = 'Toggle';
383export const ALPHABET_INDEXER: string = 'AlphabetIndexer';
384export const ARC_ALPHABET_INDEXER: string = 'ArcAlphabetIndexer';
385export const IS_ON: string = 'isOn';
386export const DATE: string = 'date';
387export const GRID_ITEM: string = 'GridItem';
388export const LIST_ITEM: string = 'ListItem';
389export const UPDATE_FUNC_BY_ELMT_ID: string = 'updateFuncByElmtId';
390export const BIND_MENU: string = 'bindMenu';
391export const BIND_CONTEXT_MENU: string = 'bindContextMenu';
392export const NAV_BAR_WIDTH: string = 'navBarWidth';
393export const ARC_LIST_ITEM: string = 'ArcListItem';
394
395export const DOLLAR_BLOCK_INTERFACE: Set<string> = new Set([
396  CHECK_BOX, CHECKBOX_GROUP, DATE_PICKER, TIME_PICKER, MENU_ITEM, PANEL, RATING, SIDE_BAR_CONTAINER, STEPPER, SWIPER, TABS, TEXT_PICKER, TOGGLE, SELECT,
397  REFRESH, CALENDAR, GRID_ITEM, LIST_ITEM, TEXT_TIMER, SEAECH, TEXT_INPUT, SLIDER, TEXT_AREA, ALPHABET_INDEXER, ARC_ALPHABET_INDEXER]);
398export const STYLE_ADD_DOUBLE_DOLLAR: Set<string> = new Set([
399  BIND_POPUP, $$_VISIBILITY, BIND_CONTENT_COVER, BIND_SHEET]);
400export const STYLE_ADD_DOUBLE_EXCLAMATION: Set<string> = new Set([
401  BIND_MENU, BIND_CONTEXT_MENU, BIND_POPUP, BIND_CONTENT_COVER, BIND_SHEET]);
402export const PROPERTIES_ADD_DOUBLE_DOLLAR: Map<string, Set<string>> = new Map([
403  [RADIO, new Set([CHECKED])],
404  [TEXT_TIMER, new Set([FORMAT, COUNT, IS_COUNT_DOWN])],
405  [REFRESH, new Set([REFRESHING])],
406  [CHECK_BOX, new Set([SELECT_LOW])],
407  [CHECKBOX_GROUP, new Set([SELECT_ALL])],
408  [DATE_PICKER, new Set([SELECTED])],
409  [TIME_PICKER, new Set([SELECTED])],
410  [MENU_ITEM, new Set([SELECTED])],
411  [PANEL, new Set([MODE])],
412  [RATING, new Set([RATING_LOW])],
413  [SEAECH, new Set([VALUE])],
414  [SIDE_BAR_CONTAINER, new Set([SHOW_SIDE_BAR])],
415  [SLIDER, new Set([VALUE])],
416  [STEPPER, new Set([INDEX])],
417  [SWIPER, new Set([INDEX])],
418  [TABS, new Set([INDEX])],
419  [TEXT_AREA, new Set([TEXT])],
420  [TEXT_INPUT, new Set([TEXT])],
421  [TEXT_PICKER, new Set([VALUE, SELECTED])],
422  [TOGGLE, new Set([IS_ON])],
423  [ALPHABET_INDEXER, new Set([SELECTED])],
424  [SELECT, new Set([SELECTED, VALUE])],
425  [CALENDAR, new Set([DATE])],
426  [GRID_ITEM, new Set([SELECTED])],
427  [LIST_ITEM, new Set([SELECTED])]
428]);
429export const PROPERTIES_ADD_DOUBLE_EXCLAMATION: Map<string, Set<string>> = new Map([
430  [RADIO, new Set([CHECKED])],
431  [TEXT_TIMER, new Set([FORMAT, COUNT, IS_COUNT_DOWN])],
432  [REFRESH, new Set([REFRESHING])],
433  [CHECK_BOX, new Set([SELECT_LOW])],
434  [CHECKBOX_GROUP, new Set([SELECT_ALL])],
435  [DATE_PICKER, new Set([SELECTED])],
436  [TIME_PICKER, new Set([SELECTED])],
437  [MENU_ITEM, new Set([SELECTED])],
438  [NAVIGATION, new Set([NAV_BAR_WIDTH])],
439  [PANEL, new Set([MODE])],
440  [RATING, new Set([RATING_LOW])],
441  [SEAECH, new Set([VALUE])],
442  [SIDE_BAR_CONTAINER, new Set([SHOW_SIDE_BAR, SIDE_BAR_WIDTH])],
443  [SLIDER, new Set([VALUE])],
444  [STEPPER, new Set([INDEX])],
445  [SWIPER, new Set([INDEX])],
446  [TABS, new Set([INDEX])],
447  [TEXT_AREA, new Set([TEXT])],
448  [TEXT_INPUT, new Set([TEXT])],
449  [TEXT_PICKER, new Set([VALUE, SELECTED])],
450  [TOGGLE, new Set([IS_ON])],
451  [ALPHABET_INDEXER, new Set([SELECTED])],
452  [ARC_ALPHABET_INDEXER, new Set([SELECTED])],
453  [SELECT, new Set([SELECTED, VALUE])],
454  [CALENDAR, new Set([DATE])],
455  [GRID_ITEM, new Set([SELECTED])],
456  [LIST_ITEM, new Set([SELECTED])]
457]);
458
459export const CREATE_BIND_COMPONENT: Set<string> = new Set(['ListItemGroup', REFRESH]);
460export const HEADER: string = 'header';
461export const INDICATORBUILDER: string = 'indicatorBuilder';
462export const FOOTER: string = 'footer';
463
464export const INTERFACE_NAME_SUFFIX: string = '_Params';
465export const OBSERVED_PROPERTY_ABSTRACT: string = 'ObservedPropertyAbstract';
466
467export const SUPERVISUAL: string = './supervisual';
468export const SUPERVISUAL_SOURCEMAP_EXT: string = '.visual.js.map';
469
470export const INSTANCE: string = 'Instance';
471
472export const COMPONENT_TOGGLE: string = 'Toggle';
473export const TTOGGLE_CHECKBOX: string = 'Checkbox';
474export const TOGGLE_SWITCH: string = 'Switch';
475
476export const FILESINFO_TXT: string = 'filesInfo.txt';
477export const NPMENTRIES_TXT: string = 'npmEntries.txt';
478export const MODULES_CACHE: string = 'modules.cache';
479export const MODULES_ABC: string = 'modules.abc';
480export const MODULELIST_JSON: string = 'moduleList.json';
481export const PREBUILDINFO_JSON: string = 'preBuildInfo.json';
482export const SOURCEMAPS_JSON: string = 'sourceMaps.json';
483export const SOURCEMAPS: string = 'sourceMaps.map';
484export const PROTO_FILESINFO_TXT: string = 'protoFilesInfo.txt';
485export const AOT_FULL: string = 'full';
486export const AOT_TYPE: string = 'type';
487export const AOT_PARTIAL: string = 'partial';
488export const AOT_PROFILE_SUFFIX: string = '.ap';
489
490export const ESMODULE: string = 'esmodule';
491export const JSBUNDLE: string = 'jsbundle';
492export const ARK: string = 'ark';
493export const TEMPORARY: string = 'temporary';
494export const MAIN: string = 'main';
495export const AUXILIARY: string = 'auxiliary';
496export const ZERO: string = '0';
497export const ONE: string = '1';
498export const EXTNAME_JS: string = '.js';
499export const EXTNAME_TS: string = '.ts';
500export const EXTNAME_JS_MAP: string = '.js.map';
501export const EXTNAME_TS_MAP: string = '.ts.map';
502export const EXTNAME_MJS: string = '.mjs';
503export const EXTNAME_CJS: string = '.cjs';
504export const EXTNAME_D_TS: string = '.d.ts';
505export const EXTNAME_D_ETS: string = '.d.ets';
506export const EXTNAME_JSON: string = '.json';
507export const EXTNAME_ABC: string = '.abc';
508export const EXTNAME_PROTO_BIN: string = '.protoBin';
509export const PATCH_SYMBOL_TABLE: string = 'symbol.txt';
510export const MANAGE_WORKERS_SCRIPT: string = 'manage_workers.js';
511export const GEN_ABC_SCRIPT: string = 'gen_abc.js';
512export const GEN_MODULE_ABC_SCRIPT: string = 'gen_module_abc.js';
513
514export const SUCCESS: number = 0;
515export const FAIL: number = 1;
516
517export const TS2ABC: string = 'ts2abc';
518export const ES2ABC: string = 'es2abc';
519
520export const MAX_WORKER_NUMBER: number = 3;
521
522export const GENERATE_ID = 'generateId';
523export const _GENERATE_ID = '__generate__Id';
524
525export const COMPONENT_CONSTRUCTOR_INITIAL_PARAMS: string = 'setInitiallyProvidedValue';
526export const COMPONENT_UPDATE_STATE_VARS: string = 'updateStateVars';
527export const COMPONENT_RERENDER_FUNCTION: string = 'rerender';
528export const COMPONENT_CONSTRUCTOR_PURGE_VARIABLE_DEP: string = 'purgeVariableDependenciesOnElmtId';
529export const MARKDEPENDENTELEMENTSDIRTY: string = 'markDependentElementsDirty';
530export const ABOUT_TO_BE_DELETE_FUNCTION_ID__: string = 'id__';
531export const RMELMTID: string = 'rmElmtId';
532export const PURGEDEPENDENCYONELMTID: string = 'purgeDependencyOnElmtId';
533export const SETPROPERTYUNCHANGED: string = 'SetPropertyUnchanged';
534export const ABOUTTOBEDELETEDINTERNAL: string = 'aboutToBeDeletedInternal';
535export const UPDATEDIRTYELEMENTS: string = 'updateDirtyElements';
536export const BASICDECORATORS: Set<string> = new Set([COMPONENT_STATE_DECORATOR, COMPONENT_PROP_DECORATOR,
537  COMPONENT_LINK_DECORATOR, COMPONENT_OBJECT_LINK_DECORATOR, COMPONENT_PROVIDE_DECORATOR, COMPONENT_CONSUME_DECORATOR,
538  COMPONENT_STORAGE_LINK_DECORATOR, COMPONENT_STORAGE_PROP_DECORATOR, COMPONENT_LOCAL_STORAGE_LINK_DECORATOR,
539  COMPONENT_LOCAL_STORAGE_PROP_DECORATOR]);
540export const LINKS_DECORATORS: Set<string> = new Set([COMPONENT_LINK_DECORATOR, COMPONENT_OBJECT_LINK_DECORATOR]);
541export const ISINITIALRENDER: string = 'isInitialRender';
542export const ELMTID: string = 'elmtId';
543export const STARTGETACCESSRECORDINGFOR: string = 'StartGetAccessRecordingFor';
544export const STOPGETACCESSRECORDING: string = 'StopGetAccessRecording';
545export const UPDATE_STATE_VARS_OF_CHIND_BY_ELMTID: string = 'updateStateVarsOfChildByElmtId';
546export const VIEWSTACKPROCESSOR: string = 'ViewStackProcessor';
547export const OBSERVECOMPONENTCREATION: string = 'observeComponentCreation';
548export const OBSERVECOMPONENTCREATION2: string = 'observeComponentCreation2';
549export const ISLAZYCREATE: string = 'isLazyCreate';
550export const DEEPRENDERFUNCTION: string = 'deepRenderFunction';
551export const ITEMCREATION: string = 'itemCreation';
552export const ITEMCREATION2: string = 'itemCreation2';
553export const OBSERVEDSHALLOWRENDER: string = 'observedShallowRender';
554export const OBSERVEDDEEPRENDER: string = 'observedDeepRender';
555export const ItemComponents: string[] = ['ListItem', 'GridItem', 'ArcListItem'];
556export const FOREACHITEMGENFUNCTION: string = 'forEachItemGenFunction';
557export const __LAZYFOREACHITEMGENFUNCTION: string = '__lazyForEachItemGenFunction';
558export const _ITEM: string = '_item';
559export const FOREACHITEMIDFUNC: string = 'forEachItemIdFunc';
560export const __LAZYFOREACHITEMIDFUNC: string = '__lazyForEachItemIdFunc';
561export const FOREACHUPDATEFUNCTION: string = 'forEachUpdateFunction';
562export const ALLOCATENEWELMETIDFORNEXTCOMPONENT: string = 'AllocateNewElmetIdForNextComponent';
563export const STATE_OBJECTLINK_DECORATORS: string[] = [COMPONENT_STATE_DECORATOR, COMPONENT_OBJECT_LINK_DECORATOR];
564export const COMPONENT_INITIAL_RENDER_FUNCTION: string = 'initialRender';
565export const DECORATOR_COMPONENT_FREEZEWHENINACTIVE: string = 'freezeWhenInactive';
566export const INIT_ALLOW_COMPONENT_FREEZE: string = 'initAllowComponentFreeze';
567export const GRID_COMPONENT: string = 'Grid';
568export const GRIDITEM_COMPONENT: string = 'GridItem';
569export const WILLUSEPROXY: string = 'willUseProxy';
570export const BASE_COMPONENT_NAME_PU: string = 'ViewPU';
571export const PUV2_VIEW_BASE: string = 'PUV2ViewBase';
572export const GLOBAL_THIS: string = 'globalThis';
573export const OBSERVED_PROPERTY_SIMPLE_PU: string = 'ObservedPropertySimplePU';
574export const OBSERVED_PROPERTY_OBJECT_PU: string = 'ObservedPropertyObjectPU';
575export const SYNCHED_PROPERTY_SIMPLE_ONE_WAY_PU: string = 'SynchedPropertySimpleOneWayPU';
576export const SYNCHED_PROPERTY_OBJECT_ONE_WAY_PU: string = 'SynchedPropertyObjectOneWayPU';
577export const SYNCHED_PROPERTY_SIMPLE_TWO_WAY_PU: string = 'SynchedPropertySimpleTwoWayPU';
578export const SYNCHED_PROPERTY_OBJECT_TWO_WAY_PU: string = 'SynchedPropertyObjectTwoWayPU';
579export const SYNCHED_PROPERTY_NESED_OBJECT_PU: string = 'SynchedPropertyNesedObjectPU';
580export const OBSERVED_PROPERTY_ABSTRACT_PU: string = 'ObservedPropertyAbstractPU';
581export const COMPONENT_CONSTRUCTOR_LOCALSTORAGE_PU: string = '__localStorage';
582export const COMPONENT_CONSTRUCTOR_LOCALSTORAGE_TYPE_PU: string = 'LocalStorage';
583export const IFELSEBRANCHUPDATEFUNCTION = 'ifElseBranchUpdateFunction';
584export const CREATE_STORAGE_LINK = 'createStorageLink';
585export const CREATE_STORAGE_PROP = 'createStorageProp';
586export const CREATE_LOCAL_STORAGE_LINK = 'createLocalStorageLink';
587export const CREATE_LOCAL_STORAGE_PROP = 'createLocalStorageProp';
588export const GET_ENTRYNAME: string = 'getEntryName';
589export const SUPER_ARGS: string = 'args';
590export const FINALIZE_CONSTRUCTION: string = 'finalizeConstruction';
591export const PROTOTYPE: string = 'prototype';
592export const REFLECT: string = 'Reflect';
593export const DEFINE_PROPERTY: string = 'defineProperty';
594export const BASE_CLASS: string = 'BaseClass';
595export const IS_REUSABLE_: string = 'isReusable_';
596export const GET_ATTRIBUTE: string = 'get';
597
598export const CARD_ENTRY_FUNCTION_NAME: string = 'loadEtsCard';
599export const CARD_ENABLE_DECORATORS: Set<string> = new Set([
600  '@StorageLink', '@StorageProp', '@LocalStorageLink', '@LocalStorageProp'
601]);
602export const CARD_ENABLE_COMPONENTS: Set<string> = new Set([
603  'AbilityComponent', 'PluginComponent', 'FormComponent', 'RemoteWindow',
604  'XComponent', 'Web', 'RichText'
605]);
606export const TabContentAndNavDestination: Set<string> = new Set(['TabContent',
607  'NavDestination']);
608if (EXT_WHITE_LIST.length) {
609  for (const compName of EXT_WHITE_LIST) {
610    CREATE_ROUTER_COMPONENT_COLLECT.add(compName);
611  }
612}
613if (EXT_WHITE_LIST.length >= 2) {
614  TabContentAndNavDestination.add(EXT_WHITE_LIST[1]);
615}
616export const CARD_LOG_TYPE_DECORATORS = 1;
617export const CARD_LOG_TYPE_COMPONENTS = 2;
618export const CARD_LOG_TYPE_IMPORT = 3;
619
620export const CALL = 'call';
621export const RESERT = 'reset';
622
623export const TS_NOCHECK: string = '// @ts-nocheck';
624
625export const BUILDER_PARAM_PROXY: string = 'makeBuilderParameterProxy';
626export const BUILDER_TYPE: string = 'BuilderType';
627
628export const FUNCTION: string = 'function';
629export const NAME: string = 'name';
630
631export const ROUTENAME_NODE: string = 'routeNameNode';
632export const STORAGE_NODE: string = 'storageNode';
633export const STORAGE: string = 'storage';
634export const REGISTER_NAMED_ROUTE: string = 'registerNamedRoute';
635export const ROUTE_NAME: string = 'routeName';
636export const PAGE_PATH: string = 'pagePath';
637export const PAGE_FULL_PATH: string = 'pageFullPath';
638export const IS_USER_CREATE_STACK: string = 'isUserCreateStack';
639
640export const CAN_RETAKE: string = 'canRetake';
641export const DECORATOR_SUFFIX: string = '@';
642export const TRANSFORMED_MOCK_CONFIG: string = 'mock-config.json';
643export const USER_DEFINE_MOCK_CONFIG: string = 'mock-config.json5';
644
645export const WRAPBUILDER_FUNCTION: string = 'wrapBuilder';
646export const WRAPPEDBUILDER_CLASS: string = 'WrappedBuilder';
647export const WRAPBUILDER_BUILDERPROP: string = 'builder';
648export const LENGTH: string = 'length';
649
650export const PREVIEW: string = 'preview';
651export const TITLE: string = 'title';
652
653export const IDS: string = 'ids';
654export const PUSH: string = 'push';
655export const UPDATE_LAZY_FOREACH_ELEMENTS = 'UpdateLazyForEachElements';
656export const IS_INITIAL_ITEM = 'isInitialItem';
657export const MY_IDS = 'myIds';
658export const COMPONENT_CALL: string = 'componentCall';
659
660export const TS_BUILD_INFO_SUFFIX = '.tsbuildinfo';
661export const ARKTS_LINTER_BUILD_INFO_SUFFIX = 'inversedArkTsLinter.tsbuildinfo';
662export const HOT_RELOAD_BUILD_INFO_SUFFIX = 'hotReload.tsbuildinfo';
663export const WATCH_COMPILER_BUILD_INFO_SUFFIX = 'watchCompiler.tsbuildinfo';
664
665export const GET_SHARED: string = 'getShared';
666export const USE_SHARED_STORAGE: string = 'useSharedStorage';
667export const ARKTS_MODULE_PREFIX: string = '@arkts';
668export const ARKTS_MODULE_NAME: string = 'arkts';
669export const COLD_RELOAD_MODE: string = 'coldReload';
670export const INTEGRATED_HSP: string = 'integratedHsp';
671