• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 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
16export const DOUBLE_DOLLAR_IDENTIFIER = '$$';
17export const THIS_IDENTIFIER = 'this';
18export const ATTRIBUTE_SUFFIX = 'Attribute';
19export const INSTANCE_IDENTIFIER = 'instance';
20export const COMMON_METHOD_IDENTIFIER = 'CommonMethod';
21export const APPLY_STYLES_IDENTIFIER = 'applyStyles';
22export const STATE_STYLES = 'stateStyles';
23export const ARKUI_PACKAGE_NAME = '@kit.ArkUI';
24export const VALUE_IDENTIFIER = 'value';
25export const INDENT_STEP = 2;
26export const MAKE_OBSERVED = 'makeObserved';
27export const ARKUI_STATE_MANAGEMENT = '@ohos.arkui.StateManagement';
28export const NEW_PROP_DECORATOR_SUFFIX = 'Ref';
29
30export enum CustomDecoratorName {
31  Extend = 'Extend',
32  LocalBuilder = 'LocalBuilder',
33  Styles = 'Styles',
34  AnimatableExtend = 'AnimatableExtend',
35  Memo = 'Memo',
36  Observed = 'Observed',
37  CustomLayout = 'CustomLayout',
38  CustomStyles = 'CustomStyles'
39}
40
41export enum StorageTypeName {
42  LocalStorage = 'LocalStorage',
43  AppStorage = 'AppStorage'
44}
45
46export enum PropDecoratorName {
47  Prop = 'Prop',
48  StorageProp = 'StorageProp',
49  LocalStorageProp = 'LocalStorageProp'
50}
51
52export enum PropFunctionName {
53  Prop = 'prop',
54  SetAndProp = 'setAndProp'
55}
56
57export const observedDecoratorName: Set<string> = new Set([
58  'State',
59  'Prop',
60  'Link',
61  'Provide',
62  'Consume',
63  'LocalStorageProp',
64  'LocalStorageLink',
65  'StorageProp',
66  'StorageLink',
67  'Track'
68]);
69
70export const skipImportDecoratorName: Set<string> = new Set([
71  'Extend',
72  'Styles',
73  'Sendable',
74  'Concurrent',
75  'LocalBuilder',
76  'Prop',
77  'StorageProp',
78  'LocalStorageProp'
79]);
80
81export const customLayoutFunctionName: Set<string> = new Set(['onMeasureSize', 'onPlaceChildren']);
82
83export const ENTRY_DECORATOR_NAME = 'Entry';
84export const ENTRY_STORAGE_PROPERITY = 'storage';
85export const LOCAL_STORAGE_TYPE_NAME = 'LocalStorage';
86export const GET_LOCAL_STORAGE_FUNC_NAME = '__get_local_storage__';
87
88export const PROVIDE_DECORATOR_NAME = 'Provide';
89export const PROVIDE_ALIAS_PROPERTY_NAME = 'alias';
90export const PROVIDE_ALLOW_OVERRIDE_PROPERTY_NAME = 'allowOverride';
91