@lightspeed/crane 1.4.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/UPGRADE.md +19 -0
- package/dist/app.d.mts +1 -1028
- package/dist/app.d.ts +1 -1028
- package/dist/app.mjs +1 -1
- package/dist/cli.mjs +20 -7
- package/package.json +3 -2
- package/template/footers/example-footer/ExampleFooter.vue +1 -1
- package/template/footers/example-footer/client.ts +1 -1
- package/template/footers/example-footer/component/LegalLinks.vue +1 -1
- package/template/footers/example-footer/component/MadeWith.vue +1 -1
- package/template/footers/example-footer/component/ReportAbuse.vue +1 -1
- package/template/footers/example-footer/entity/color.ts +2 -2
- package/template/footers/example-footer/server.ts +1 -1
- package/template/headers/example-header/client.ts +1 -1
- package/template/headers/example-header/component/Account.vue +1 -1
- package/template/headers/example-header/component/Cart.vue +1 -1
- package/template/headers/example-header/component/CategoriesDropdown.vue +1 -1
- package/template/headers/example-header/component/Logo.vue +1 -1
- package/template/headers/example-header/component/NavigationMenu.vue +1 -1
- package/template/headers/example-header/component/SearchForm.vue +1 -1
- package/template/headers/example-header/server.ts +1 -1
- package/template/index.d.ts +1 -1
- package/template/layouts/catalog/example-catalog/Main.vue +1 -1
- package/template/layouts/catalog/example-catalog/slots/custom-bottom-bar/client.ts +1 -1
- package/template/layouts/catalog/example-catalog/slots/custom-bottom-bar/server.ts +1 -1
- package/template/layouts/category/example-category/Main.vue +1 -1
- package/template/layouts/category/example-category/settings/content.ts +1 -1
- package/template/layouts/category/example-category/settings/design.ts +1 -1
- package/template/layouts/product/example-product/Main.vue +1 -1
- package/template/layouts/product/example-product/settings/content.ts +1 -1
- package/template/layouts/product/example-product/settings/design.ts +1 -1
- package/template/package.json +6 -3
- package/template/page-templates/example-template/pages/catalog.ts +1 -1
- package/template/page-templates/example-template/pages/category.ts +1 -1
- package/template/page-templates/example-template/pages/product.ts +1 -1
- package/template/preview/sections/preview.html +1 -1
- package/template/preview/shared/api-routes.ts +347 -39
- package/template/preview/shared/mock.ts +43 -41
- package/template/preview/shared/preview.ts +205 -126
- package/template/preview/shared/utils.ts +208 -62
- package/template/preview/ssr-server.ts +429 -0
- package/template/preview/vite.config.js +64 -65
- package/template/reference/sections/about-us/AboutUs.vue +1 -1
- package/template/reference/sections/about-us/client.ts +1 -1
- package/template/reference/sections/about-us/component/Image.vue +1 -1
- package/template/reference/sections/about-us/component/Stats.vue +2 -2
- package/template/reference/sections/about-us/component/Title.vue +1 -1
- package/template/reference/sections/about-us/server.ts +1 -1
- package/template/reference/sections/about-us/util/visibility-provider.ts +1 -1
- package/template/reference/sections/featured-products/FeaturedProducts.vue +65 -0
- package/template/reference/sections/featured-products/assets/arrow.svg +3 -0
- package/template/reference/sections/featured-products/assets/custom_section_showcase_1_preview.png +0 -0
- package/template/reference/sections/featured-products/client.ts +5 -0
- package/template/reference/sections/featured-products/component/ProductItem.vue +71 -0
- package/template/reference/sections/featured-products/component/Title.vue +31 -0
- package/template/reference/sections/featured-products/entity/color.ts +4 -0
- package/template/reference/sections/featured-products/server.ts +5 -0
- package/template/reference/sections/featured-products/settings/content.ts +14 -0
- package/template/reference/sections/featured-products/settings/design.ts +33 -0
- package/template/reference/sections/featured-products/settings/translations.ts +24 -0
- package/template/reference/sections/featured-products/showcases/1.ts +28 -0
- package/template/reference/sections/featured-products/showcases/translations.ts +16 -0
- package/template/reference/sections/featured-products/type.ts +5 -0
- package/template/reference/sections/intro-slider/IntroSlider.vue +1 -1
- package/template/reference/sections/intro-slider/client.ts +1 -1
- package/template/reference/sections/intro-slider/component/Slider.vue +8 -2
- package/template/reference/sections/intro-slider/component/Title.vue +1 -1
- package/template/reference/sections/intro-slider/entity/color.ts +2 -2
- package/template/reference/sections/intro-slider/server.ts +1 -1
- package/template/reference/sections/tag-lines/TagLines.vue +1 -1
- package/template/reference/sections/tag-lines/client.ts +1 -1
- package/template/reference/sections/tag-lines/component/SectionImage.vue +1 -1
- package/template/reference/sections/tag-lines/component/Title.vue +1 -1
- package/template/reference/sections/tag-lines/composables/highlighted-text-image-list.ts +2 -2
- package/template/reference/sections/tag-lines/server.ts +1 -1
- package/template/reference/sections/trending-categories/TrendingCategories.vue +70 -0
- package/template/reference/sections/trending-categories/assets/arrow.svg +3 -0
- package/template/reference/sections/trending-categories/assets/custom_section_showcase_1_preview.png +0 -0
- package/template/reference/sections/trending-categories/client.ts +5 -0
- package/template/reference/sections/trending-categories/component/CategoryItem.vue +62 -0
- package/template/reference/sections/trending-categories/component/Title.vue +32 -0
- package/template/reference/sections/trending-categories/entity/color.ts +4 -0
- package/template/reference/sections/trending-categories/server.ts +5 -0
- package/template/reference/sections/trending-categories/settings/content.ts +14 -0
- package/template/reference/sections/trending-categories/settings/design.ts +33 -0
- package/template/reference/sections/trending-categories/settings/translations.ts +24 -0
- package/template/reference/sections/trending-categories/showcases/1.ts +36 -0
- package/template/reference/sections/trending-categories/showcases/translations.ts +22 -0
- package/template/reference/sections/trending-categories/type.ts +5 -0
- package/template/reference/shared/components/Button.vue +1 -1
- package/template/reference/templates/reference-template-apparel/pages/catalog.ts +1 -1
- package/template/reference/templates/reference-template-apparel/pages/category.ts +1 -1
- package/template/reference/templates/reference-template-apparel/pages/home.ts +10 -0
- package/template/reference/templates/reference-template-apparel/pages/product.ts +1 -1
- package/template/reference/templates/reference-template-bike/pages/catalog.ts +1 -1
- package/template/reference/templates/reference-template-bike/pages/category.ts +1 -1
- package/template/reference/templates/reference-template-bike/pages/home.ts +10 -0
- package/template/reference/templates/reference-template-bike/pages/product.ts +1 -1
- package/template/sections/example-section/ExampleSection.vue +8 -1
- package/template/sections/example-section/client.ts +1 -1
- package/template/sections/example-section/component/button/Button.vue +1 -1
- package/template/sections/example-section/component/image/Image.vue +1 -1
- package/template/sections/example-section/component/image/ImagesGrid.vue +1 -1
- package/template/sections/example-section/component/selectbox/Selectbox.vue +1 -1
- package/template/sections/example-section/component/title/Title.vue +1 -1
- package/template/sections/example-section/component/toggle/Toggle.vue +1 -1
- package/template/sections/example-section/entity/color.ts +2 -2
- package/template/sections/example-section/server.ts +1 -1
- package/template/sections/example-section/settings/translations.ts +1 -1
- package/template/sections/example-section/showcases/translations.ts +13 -13
- package/template/shared/components/LanguageSelector.vue +1 -1
- package/template/shared/translation.ts +16 -0
- package/template/shared/utils.ts +3 -1
- package/template/tsconfig.json +1 -0
- package/types.d.ts +6 -457
package/dist/app.d.mts
CHANGED
|
@@ -1,1028 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { App, Ref, Component } from 'vue';
|
|
3
|
-
|
|
4
|
-
interface AppBaseContext {
|
|
5
|
-
readonly appName: string;
|
|
6
|
-
readonly blockName: string;
|
|
7
|
-
readonly version: string;
|
|
8
|
-
readonly scriptUrl: string;
|
|
9
|
-
readonly imageBuckets: Record<string, string>;
|
|
10
|
-
readonly globalDesign: Record<string, Record<string, unknown>>;
|
|
11
|
-
}
|
|
12
|
-
interface AppBaseData<C, D> {
|
|
13
|
-
readonly content: C;
|
|
14
|
-
readonly design: D;
|
|
15
|
-
readonly defaults: Record<string, unknown>;
|
|
16
|
-
readonly externalContent: ExternalContentData;
|
|
17
|
-
}
|
|
18
|
-
interface AppBaseState<C, D> {
|
|
19
|
-
readonly context: AppBaseContext;
|
|
20
|
-
readonly data: AppBaseData<C, D>;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
interface GlobalColors {
|
|
24
|
-
title?: Color;
|
|
25
|
-
body?: Color;
|
|
26
|
-
button?: Color;
|
|
27
|
-
link?: Color;
|
|
28
|
-
background?: Color;
|
|
29
|
-
}
|
|
30
|
-
interface GlobalFonts {
|
|
31
|
-
title: string;
|
|
32
|
-
body: string;
|
|
33
|
-
}
|
|
34
|
-
interface GlobalTextSize {
|
|
35
|
-
title: number;
|
|
36
|
-
subtitle: number;
|
|
37
|
-
body: number;
|
|
38
|
-
}
|
|
39
|
-
interface GlobalButtonSize {
|
|
40
|
-
small: number;
|
|
41
|
-
medium: number;
|
|
42
|
-
large: number;
|
|
43
|
-
}
|
|
44
|
-
type AppearanceEffectType = 'none' | 'fade-in' | 'fade-in-up';
|
|
45
|
-
interface GlobalLayout {
|
|
46
|
-
maxWidth: number;
|
|
47
|
-
tileMargin: number;
|
|
48
|
-
appearanceEffect: AppearanceEffectType;
|
|
49
|
-
}
|
|
50
|
-
interface GlobalDesign {
|
|
51
|
-
color?: GlobalColors;
|
|
52
|
-
fontFamily?: GlobalFonts;
|
|
53
|
-
textSize?: GlobalTextSize;
|
|
54
|
-
buttonSize?: GlobalButtonSize;
|
|
55
|
-
layout?: GlobalLayout;
|
|
56
|
-
customCss?: string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
interface VueBaseProps<CONTENT, DESIGN> {
|
|
60
|
-
init: (app: App<Element>, contextValue: AppBaseContext, contentValue: CONTENT, designValue: DESIGN, defaultsValue: Record<string, unknown>, externalContent: ExternalContentData, globalDesignValue: GlobalDesign) => void;
|
|
61
|
-
update: (app: App<Element>, contentValue: CONTENT, designValue: DESIGN, defaultsValue: Record<string, unknown>, externalContent: ExternalContentData, globalDesignValue: GlobalDesign) => void;
|
|
62
|
-
readonly context: Ref<AppBaseContext>;
|
|
63
|
-
readonly content: Ref<CONTENT>;
|
|
64
|
-
readonly design: Ref<DESIGN>;
|
|
65
|
-
readonly defaults: Ref<Record<string, unknown>>;
|
|
66
|
-
readonly site: Ref<SiteContent>;
|
|
67
|
-
readonly category?: Ref<Category | undefined>;
|
|
68
|
-
readonly globalDesign: Ref<GlobalDesign>;
|
|
69
|
-
}
|
|
70
|
-
declare function useVueBaseProps<CONTENT, DESIGN>(): VueBaseProps<CONTENT, DESIGN>;
|
|
71
|
-
|
|
72
|
-
interface InputBoxContent {
|
|
73
|
-
hasContent: boolean;
|
|
74
|
-
value: string;
|
|
75
|
-
}
|
|
76
|
-
declare function useInputboxElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): {
|
|
77
|
-
hasContent: boolean;
|
|
78
|
-
value: string | undefined;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
interface TextAreaContent {
|
|
82
|
-
hasContent: boolean;
|
|
83
|
-
value: string;
|
|
84
|
-
}
|
|
85
|
-
declare function useTextareaElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): {
|
|
86
|
-
hasContent: boolean;
|
|
87
|
-
value: string | undefined;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
interface ButtonContent {
|
|
91
|
-
title: string;
|
|
92
|
-
type: ActionLinkType;
|
|
93
|
-
link?: string;
|
|
94
|
-
email?: string;
|
|
95
|
-
phone?: string;
|
|
96
|
-
tileDivId?: string;
|
|
97
|
-
pageId?: string;
|
|
98
|
-
pageUrl?: string;
|
|
99
|
-
hasTitle: boolean;
|
|
100
|
-
hasLink: boolean;
|
|
101
|
-
performAction: () => void;
|
|
102
|
-
}
|
|
103
|
-
declare function useButtonElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): {
|
|
104
|
-
title: string | undefined;
|
|
105
|
-
type: ActionLinkType | undefined;
|
|
106
|
-
link: string | undefined;
|
|
107
|
-
email: string | undefined;
|
|
108
|
-
phone: string | undefined;
|
|
109
|
-
tileDivId: string | null;
|
|
110
|
-
pageId: string | undefined;
|
|
111
|
-
pageUrl: string | undefined;
|
|
112
|
-
hasTitle: boolean;
|
|
113
|
-
hasLink: boolean;
|
|
114
|
-
performAction: (() => void) | undefined;
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
interface ImageContent {
|
|
118
|
-
hasContent: boolean;
|
|
119
|
-
lowResolutionMobileImage: string;
|
|
120
|
-
highResolutionMobileImage: string;
|
|
121
|
-
lowResolutionDesktopImage: string;
|
|
122
|
-
highResolutionDesktopImage: string;
|
|
123
|
-
}
|
|
124
|
-
declare function useImageElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): {
|
|
125
|
-
hasContent: boolean;
|
|
126
|
-
lowResolutionMobileImage: string;
|
|
127
|
-
highResolutionMobileImage: string;
|
|
128
|
-
lowResolutionDesktopImage: string;
|
|
129
|
-
highResolutionDesktopImage: string;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
interface ToggleContent {
|
|
133
|
-
hasContent: boolean;
|
|
134
|
-
value: boolean;
|
|
135
|
-
}
|
|
136
|
-
declare function useToggleElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): {
|
|
137
|
-
hasContent: boolean;
|
|
138
|
-
value: boolean | undefined;
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
interface SelectBoxContent {
|
|
142
|
-
hasContent: boolean;
|
|
143
|
-
value: string;
|
|
144
|
-
}
|
|
145
|
-
declare function useSelectboxElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): {
|
|
146
|
-
hasContent: boolean;
|
|
147
|
-
value: string | undefined;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
declare function useMenuElementContent<CONTENT>(elementName: keyof CONTENT): {
|
|
151
|
-
hasContent: boolean;
|
|
152
|
-
items: {
|
|
153
|
-
performAction: (() => void) | undefined;
|
|
154
|
-
id: string;
|
|
155
|
-
title?: string;
|
|
156
|
-
type?: ActionLinkType;
|
|
157
|
-
link?: string;
|
|
158
|
-
email?: string;
|
|
159
|
-
phone?: string;
|
|
160
|
-
tileIdForScroll?: string;
|
|
161
|
-
pageIdForNavigate?: string;
|
|
162
|
-
showStoreCategories?: boolean;
|
|
163
|
-
isSubmenuOpened?: boolean;
|
|
164
|
-
categoryId?: number;
|
|
165
|
-
}[];
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
declare function useNavigationMenuElementContent<CONTENT>(): {
|
|
169
|
-
hasContent: boolean;
|
|
170
|
-
items: {
|
|
171
|
-
performAction: (() => void) | undefined;
|
|
172
|
-
id: string;
|
|
173
|
-
title?: string;
|
|
174
|
-
type?: ActionLinkType;
|
|
175
|
-
link?: string;
|
|
176
|
-
email?: string;
|
|
177
|
-
phone?: string;
|
|
178
|
-
tileIdForScroll?: string;
|
|
179
|
-
pageIdForNavigate?: string;
|
|
180
|
-
showStoreCategories?: boolean;
|
|
181
|
-
isSubmenuOpened?: boolean;
|
|
182
|
-
categoryId?: number;
|
|
183
|
-
}[];
|
|
184
|
-
};
|
|
185
|
-
|
|
186
|
-
interface Card {
|
|
187
|
-
title: string;
|
|
188
|
-
settings: Record<string, unknown>;
|
|
189
|
-
}
|
|
190
|
-
interface Deck {
|
|
191
|
-
cards: Card[];
|
|
192
|
-
}
|
|
193
|
-
declare enum EditorTypes {
|
|
194
|
-
INPUTBOX = "INPUTBOX",
|
|
195
|
-
TEXTAREA = "TEXTAREA",
|
|
196
|
-
BUTTON = "BUTTON",
|
|
197
|
-
IMAGE = "IMAGE",
|
|
198
|
-
TOGGLE = "TOGGLE",
|
|
199
|
-
SELECTBOX = "SELECTBOX"
|
|
200
|
-
}
|
|
201
|
-
declare function useDeckElementContent<CONTENT>(elementName: keyof CONTENT): {
|
|
202
|
-
hasContent: boolean;
|
|
203
|
-
cards: Card[] | undefined;
|
|
204
|
-
getReactiveRef: typeof getReactiveRef;
|
|
205
|
-
};
|
|
206
|
-
declare function getReactiveRef(card: Card | undefined, editorType: EditorTypes, contentElementName: string): {
|
|
207
|
-
hasContent: boolean;
|
|
208
|
-
lowResolutionMobileImage: string;
|
|
209
|
-
highResolutionMobileImage: string;
|
|
210
|
-
lowResolutionDesktopImage: string;
|
|
211
|
-
highResolutionDesktopImage: string;
|
|
212
|
-
} | {
|
|
213
|
-
hasContent: boolean;
|
|
214
|
-
value: string | undefined;
|
|
215
|
-
} | {
|
|
216
|
-
hasContent: boolean;
|
|
217
|
-
value: boolean | undefined;
|
|
218
|
-
} | {
|
|
219
|
-
title: string | undefined;
|
|
220
|
-
type: ActionLinkType | undefined;
|
|
221
|
-
link: string | undefined;
|
|
222
|
-
email: string | undefined;
|
|
223
|
-
phone: string | undefined;
|
|
224
|
-
tileDivId: string | null;
|
|
225
|
-
pageId: string | undefined;
|
|
226
|
-
pageUrl: string | undefined;
|
|
227
|
-
hasTitle: boolean;
|
|
228
|
-
hasLink: boolean;
|
|
229
|
-
performAction: (() => void) | undefined;
|
|
230
|
-
} | undefined;
|
|
231
|
-
|
|
232
|
-
declare function useLogoElementContent<CONTENT>(): {
|
|
233
|
-
type: LogoType | undefined;
|
|
234
|
-
text: string | undefined;
|
|
235
|
-
image: {
|
|
236
|
-
lowResolutionMobileImage: string;
|
|
237
|
-
highResolutionMobileImage: string;
|
|
238
|
-
lowResolutionDesktopImage: string;
|
|
239
|
-
highResolutionDesktopImage: string;
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
declare function useTextElementDesign<DESIGN>(elementName: keyof DESIGN): {
|
|
244
|
-
font: string | undefined;
|
|
245
|
-
size: number | GlobalTextSizeString | undefined;
|
|
246
|
-
bold: boolean | undefined;
|
|
247
|
-
italic: boolean | undefined;
|
|
248
|
-
color: Color | GlobalColorsString | undefined;
|
|
249
|
-
visible: boolean | undefined;
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
declare function useTextareaElementDesign<DESIGN>(elementName: keyof DESIGN): {
|
|
253
|
-
font: string | undefined;
|
|
254
|
-
size: number | GlobalTextSizeString | undefined;
|
|
255
|
-
bold: boolean | undefined;
|
|
256
|
-
italic: boolean | undefined;
|
|
257
|
-
color: Color | GlobalColorsString | undefined;
|
|
258
|
-
visible: boolean;
|
|
259
|
-
whiteSpace: string;
|
|
260
|
-
};
|
|
261
|
-
|
|
262
|
-
declare function useButtonElementDesign<DESIGN>(elementName: keyof DESIGN): {
|
|
263
|
-
appearance: ButtonAppearance | undefined;
|
|
264
|
-
font: string | undefined;
|
|
265
|
-
size: ButtonSize | undefined;
|
|
266
|
-
style: ButtonStyle | undefined;
|
|
267
|
-
color: Color | GlobalColorsString | undefined;
|
|
268
|
-
visible: boolean | undefined;
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
declare function useImageElementDesign<DESIGN>(elementName: keyof DESIGN): {
|
|
272
|
-
overlay: Overlay | undefined;
|
|
273
|
-
visible: boolean | undefined;
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
declare function useToggleElementDesign<DESIGN>(elementName: keyof DESIGN): {
|
|
277
|
-
enabled: boolean | undefined;
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
declare function useSelectboxElementDesign<DESIGN>(elementName: keyof DESIGN): {
|
|
281
|
-
value: string | undefined;
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
declare function useBackgroundElementDesign<DESIGN>(elementName: keyof DESIGN): {
|
|
285
|
-
background: Background | undefined;
|
|
286
|
-
};
|
|
287
|
-
|
|
288
|
-
declare function useLayoutElementDesign(): {
|
|
289
|
-
layout: string | undefined;
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
declare function useLogoElementDesign<DESIGN>(): vue.ComputedRef<LogoDesignData>;
|
|
293
|
-
|
|
294
|
-
interface VueServerAppExtensions {
|
|
295
|
-
init?: (app: App<Element>) => void;
|
|
296
|
-
render?: <C, D>(app: App<Element>, context: AppBaseContext, data: AppBaseData<C, D>) => void;
|
|
297
|
-
}
|
|
298
|
-
interface VueRenderResult {
|
|
299
|
-
readonly html: string;
|
|
300
|
-
readonly state: unknown;
|
|
301
|
-
}
|
|
302
|
-
declare function createVueServerApp<C, D>(appComponent: Component, extensions?: VueServerAppExtensions): {
|
|
303
|
-
init: () => {
|
|
304
|
-
render: (context: AppBaseContext, data: AppBaseData<C, D>) => Promise<VueRenderResult>;
|
|
305
|
-
};
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
interface VueClientAppExtensions {
|
|
309
|
-
init?: (app: App<Element>) => void;
|
|
310
|
-
mount?: <C, D, S extends AppBaseState<C, D>>(app: App<Element>, rootContainer: string, state: S) => void;
|
|
311
|
-
update?: <C, D, S extends AppBaseState<C, D>>(app: App<Element>, state: S) => void;
|
|
312
|
-
unmount?: (app: App<Element>) => void;
|
|
313
|
-
}
|
|
314
|
-
declare function createVueClientApp<C, D>(appComponent: Component, extensions?: VueClientAppExtensions): {
|
|
315
|
-
init: () => {
|
|
316
|
-
mount: <S extends AppBaseState<C, D>>(rootContainer: string, state: S) => void;
|
|
317
|
-
update: <S extends AppBaseState<C, D>>(state: S) => void;
|
|
318
|
-
unmount: () => void;
|
|
319
|
-
};
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
interface InstantsiteTilePromise {
|
|
323
|
-
add(callback: (id: string) => void): void;
|
|
324
|
-
}
|
|
325
|
-
interface InstantsiteJSAPI {
|
|
326
|
-
/**
|
|
327
|
-
* Retrieves the current site ID.
|
|
328
|
-
*
|
|
329
|
-
* @returns {number} The site ID.
|
|
330
|
-
*/
|
|
331
|
-
getSiteId: () => number;
|
|
332
|
-
/**
|
|
333
|
-
* Retrieves the public token for a given app.
|
|
334
|
-
*
|
|
335
|
-
* @param {string} appId - The ID of the app.
|
|
336
|
-
* @returns {string | undefined} The app's public token, or `undefined` if not found.
|
|
337
|
-
*/
|
|
338
|
-
getAppPublicToken: (appId: string) => string | undefined;
|
|
339
|
-
/**
|
|
340
|
-
* Retrieves the public configuration for a given app.
|
|
341
|
-
*
|
|
342
|
-
* @param {string} appId - The ID of the app.
|
|
343
|
-
* @returns {string | undefined} The app's public configuration, or `undefined` if not found.
|
|
344
|
-
*/
|
|
345
|
-
getAppPublicConfig: (appId: string) => string | undefined;
|
|
346
|
-
/**
|
|
347
|
-
* An event that triggers when a tile is loaded.
|
|
348
|
-
*
|
|
349
|
-
* @type {InstantsiteTilePromise}
|
|
350
|
-
*
|
|
351
|
-
* @example
|
|
352
|
-
* ```ts
|
|
353
|
-
* const tileLoadedPromise = instantsiteJsApi?.onTileLoaded;
|
|
354
|
-
*
|
|
355
|
-
* tileLoadedPromise?.add((tileId) => {
|
|
356
|
-
* console.log('Tile loaded:', tileId);
|
|
357
|
-
* });
|
|
358
|
-
* ```
|
|
359
|
-
*/
|
|
360
|
-
onTileLoaded: InstantsiteTilePromise;
|
|
361
|
-
/**
|
|
362
|
-
* An event that triggers when a tile is unloaded.
|
|
363
|
-
*
|
|
364
|
-
* @type {InstantsiteTilePromise}
|
|
365
|
-
*
|
|
366
|
-
* @example
|
|
367
|
-
* ```ts
|
|
368
|
-
* const tileUnloadedPromise = instantsiteJsApi?.onTileUnloaded;
|
|
369
|
-
*
|
|
370
|
-
* tileUnloadedPromise?.add((tileId) => {
|
|
371
|
-
* console.log('Tile unloaded:', tileId);
|
|
372
|
-
* });
|
|
373
|
-
* ```
|
|
374
|
-
*/
|
|
375
|
-
onTileUnloaded: InstantsiteTilePromise;
|
|
376
|
-
/**
|
|
377
|
-
* Opens the search page with the specified keyword.
|
|
378
|
-
*
|
|
379
|
-
* @param {string | undefined} keyword - The keyword to search for.
|
|
380
|
-
* @returns {void}
|
|
381
|
-
*/
|
|
382
|
-
openSearchPage: (keyword: string | undefined) => void;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
declare function useInstantsiteJsApi(): InstantsiteJSAPI | undefined;
|
|
386
|
-
|
|
387
|
-
// This definition file follows a somewhat unusual format. ESTree allows
|
|
388
|
-
// runtime type checks based on the `type` parameter. In order to explain this
|
|
389
|
-
// to typescript we want to use discriminated union types:
|
|
390
|
-
// https://github.com/Microsoft/TypeScript/pull/9163
|
|
391
|
-
//
|
|
392
|
-
// For ESTree this is a bit tricky because the high level interfaces like
|
|
393
|
-
// Node or Function are pulling double duty. We want to pass common fields down
|
|
394
|
-
// to the interfaces that extend them (like Identifier or
|
|
395
|
-
// ArrowFunctionExpression), but you can't extend a type union or enforce
|
|
396
|
-
// common fields on them. So we've split the high level interfaces into two
|
|
397
|
-
// types, a base type which passes down inherited fields, and a type union of
|
|
398
|
-
// all types which extend the base type. Only the type union is exported, and
|
|
399
|
-
// the union is how other types refer to the collection of inheriting types.
|
|
400
|
-
//
|
|
401
|
-
// This makes the definitions file here somewhat more difficult to maintain,
|
|
402
|
-
// but it has the notable advantage of making ESTree much easier to use as
|
|
403
|
-
// an end user.
|
|
404
|
-
|
|
405
|
-
interface BaseNodeWithoutComments {
|
|
406
|
-
// Every leaf interface that extends BaseNode must specify a type property.
|
|
407
|
-
// The type property should be a string literal. For example, Identifier
|
|
408
|
-
// has: `type: "Identifier"`
|
|
409
|
-
type: string;
|
|
410
|
-
loc?: SourceLocation | null | undefined;
|
|
411
|
-
range?: [number, number] | undefined;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
interface BaseNode extends BaseNodeWithoutComments {
|
|
415
|
-
leadingComments?: Comment[] | undefined;
|
|
416
|
-
trailingComments?: Comment[] | undefined;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
interface Comment extends BaseNodeWithoutComments {
|
|
420
|
-
type: "Line" | "Block";
|
|
421
|
-
value: string;
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
interface SourceLocation {
|
|
425
|
-
source?: string | null | undefined;
|
|
426
|
-
start: Position;
|
|
427
|
-
end: Position;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
interface Position {
|
|
431
|
-
/** >= 1 */
|
|
432
|
-
line: number;
|
|
433
|
-
/** >= 0 */
|
|
434
|
-
column: number;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
interface BaseFunction extends BaseNode {
|
|
438
|
-
params: Pattern[];
|
|
439
|
-
generator?: boolean | undefined;
|
|
440
|
-
async?: boolean | undefined;
|
|
441
|
-
// The body is either BlockStatement or Expression because arrow functions
|
|
442
|
-
// can have a body that's either. FunctionDeclarations and
|
|
443
|
-
// FunctionExpressions have only BlockStatement bodies.
|
|
444
|
-
body: BlockStatement | Expression;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
type Statement =
|
|
448
|
-
| ExpressionStatement
|
|
449
|
-
| BlockStatement
|
|
450
|
-
| StaticBlock
|
|
451
|
-
| EmptyStatement
|
|
452
|
-
| DebuggerStatement
|
|
453
|
-
| WithStatement
|
|
454
|
-
| ReturnStatement
|
|
455
|
-
| LabeledStatement
|
|
456
|
-
| BreakStatement
|
|
457
|
-
| ContinueStatement
|
|
458
|
-
| IfStatement
|
|
459
|
-
| SwitchStatement
|
|
460
|
-
| ThrowStatement
|
|
461
|
-
| TryStatement
|
|
462
|
-
| WhileStatement
|
|
463
|
-
| DoWhileStatement
|
|
464
|
-
| ForStatement
|
|
465
|
-
| ForInStatement
|
|
466
|
-
| ForOfStatement
|
|
467
|
-
| Declaration;
|
|
468
|
-
|
|
469
|
-
interface BaseStatement extends BaseNode {}
|
|
470
|
-
|
|
471
|
-
interface EmptyStatement extends BaseStatement {
|
|
472
|
-
type: "EmptyStatement";
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
interface BlockStatement extends BaseStatement {
|
|
476
|
-
type: "BlockStatement";
|
|
477
|
-
body: Statement[];
|
|
478
|
-
innerComments?: Comment[] | undefined;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
interface StaticBlock extends Omit<BlockStatement, "type"> {
|
|
482
|
-
type: "StaticBlock";
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
interface ExpressionStatement extends BaseStatement {
|
|
486
|
-
type: "ExpressionStatement";
|
|
487
|
-
expression: Expression;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
interface IfStatement extends BaseStatement {
|
|
491
|
-
type: "IfStatement";
|
|
492
|
-
test: Expression;
|
|
493
|
-
consequent: Statement;
|
|
494
|
-
alternate?: Statement | null | undefined;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
interface LabeledStatement extends BaseStatement {
|
|
498
|
-
type: "LabeledStatement";
|
|
499
|
-
label: Identifier;
|
|
500
|
-
body: Statement;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
interface BreakStatement extends BaseStatement {
|
|
504
|
-
type: "BreakStatement";
|
|
505
|
-
label?: Identifier | null | undefined;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
interface ContinueStatement extends BaseStatement {
|
|
509
|
-
type: "ContinueStatement";
|
|
510
|
-
label?: Identifier | null | undefined;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
interface WithStatement extends BaseStatement {
|
|
514
|
-
type: "WithStatement";
|
|
515
|
-
object: Expression;
|
|
516
|
-
body: Statement;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
interface SwitchStatement extends BaseStatement {
|
|
520
|
-
type: "SwitchStatement";
|
|
521
|
-
discriminant: Expression;
|
|
522
|
-
cases: SwitchCase[];
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
interface ReturnStatement extends BaseStatement {
|
|
526
|
-
type: "ReturnStatement";
|
|
527
|
-
argument?: Expression | null | undefined;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
interface ThrowStatement extends BaseStatement {
|
|
531
|
-
type: "ThrowStatement";
|
|
532
|
-
argument: Expression;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
interface TryStatement extends BaseStatement {
|
|
536
|
-
type: "TryStatement";
|
|
537
|
-
block: BlockStatement;
|
|
538
|
-
handler?: CatchClause | null | undefined;
|
|
539
|
-
finalizer?: BlockStatement | null | undefined;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
interface WhileStatement extends BaseStatement {
|
|
543
|
-
type: "WhileStatement";
|
|
544
|
-
test: Expression;
|
|
545
|
-
body: Statement;
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
interface DoWhileStatement extends BaseStatement {
|
|
549
|
-
type: "DoWhileStatement";
|
|
550
|
-
body: Statement;
|
|
551
|
-
test: Expression;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
interface ForStatement extends BaseStatement {
|
|
555
|
-
type: "ForStatement";
|
|
556
|
-
init?: VariableDeclaration | Expression | null | undefined;
|
|
557
|
-
test?: Expression | null | undefined;
|
|
558
|
-
update?: Expression | null | undefined;
|
|
559
|
-
body: Statement;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
interface BaseForXStatement extends BaseStatement {
|
|
563
|
-
left: VariableDeclaration | Pattern;
|
|
564
|
-
right: Expression;
|
|
565
|
-
body: Statement;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
interface ForInStatement extends BaseForXStatement {
|
|
569
|
-
type: "ForInStatement";
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
interface DebuggerStatement extends BaseStatement {
|
|
573
|
-
type: "DebuggerStatement";
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration;
|
|
577
|
-
|
|
578
|
-
interface BaseDeclaration extends BaseStatement {}
|
|
579
|
-
|
|
580
|
-
interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
|
|
581
|
-
type: "FunctionDeclaration";
|
|
582
|
-
/** It is null when a function declaration is a part of the `export default function` statement */
|
|
583
|
-
id: Identifier | null;
|
|
584
|
-
body: BlockStatement;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
|
|
588
|
-
id: Identifier;
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
interface VariableDeclaration extends BaseDeclaration {
|
|
592
|
-
type: "VariableDeclaration";
|
|
593
|
-
declarations: VariableDeclarator[];
|
|
594
|
-
kind: "var" | "let" | "const";
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
interface VariableDeclarator extends BaseNode {
|
|
598
|
-
type: "VariableDeclarator";
|
|
599
|
-
id: Pattern;
|
|
600
|
-
init?: Expression | null | undefined;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
interface ExpressionMap {
|
|
604
|
-
ArrayExpression: ArrayExpression;
|
|
605
|
-
ArrowFunctionExpression: ArrowFunctionExpression;
|
|
606
|
-
AssignmentExpression: AssignmentExpression;
|
|
607
|
-
AwaitExpression: AwaitExpression;
|
|
608
|
-
BinaryExpression: BinaryExpression;
|
|
609
|
-
CallExpression: CallExpression;
|
|
610
|
-
ChainExpression: ChainExpression;
|
|
611
|
-
ClassExpression: ClassExpression;
|
|
612
|
-
ConditionalExpression: ConditionalExpression;
|
|
613
|
-
FunctionExpression: FunctionExpression;
|
|
614
|
-
Identifier: Identifier;
|
|
615
|
-
ImportExpression: ImportExpression;
|
|
616
|
-
Literal: Literal;
|
|
617
|
-
LogicalExpression: LogicalExpression;
|
|
618
|
-
MemberExpression: MemberExpression;
|
|
619
|
-
MetaProperty: MetaProperty;
|
|
620
|
-
NewExpression: NewExpression;
|
|
621
|
-
ObjectExpression: ObjectExpression;
|
|
622
|
-
SequenceExpression: SequenceExpression;
|
|
623
|
-
TaggedTemplateExpression: TaggedTemplateExpression;
|
|
624
|
-
TemplateLiteral: TemplateLiteral;
|
|
625
|
-
ThisExpression: ThisExpression;
|
|
626
|
-
UnaryExpression: UnaryExpression;
|
|
627
|
-
UpdateExpression: UpdateExpression;
|
|
628
|
-
YieldExpression: YieldExpression;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
type Expression = ExpressionMap[keyof ExpressionMap];
|
|
632
|
-
|
|
633
|
-
interface BaseExpression extends BaseNode {}
|
|
634
|
-
|
|
635
|
-
type ChainElement = SimpleCallExpression | MemberExpression;
|
|
636
|
-
|
|
637
|
-
interface ChainExpression extends BaseExpression {
|
|
638
|
-
type: "ChainExpression";
|
|
639
|
-
expression: ChainElement;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
interface ThisExpression extends BaseExpression {
|
|
643
|
-
type: "ThisExpression";
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
interface ArrayExpression extends BaseExpression {
|
|
647
|
-
type: "ArrayExpression";
|
|
648
|
-
elements: Array<Expression | SpreadElement | null>;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
interface ObjectExpression extends BaseExpression {
|
|
652
|
-
type: "ObjectExpression";
|
|
653
|
-
properties: Array<Property | SpreadElement>;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
interface PrivateIdentifier extends BaseNode {
|
|
657
|
-
type: "PrivateIdentifier";
|
|
658
|
-
name: string;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
interface Property extends BaseNode {
|
|
662
|
-
type: "Property";
|
|
663
|
-
key: Expression | PrivateIdentifier;
|
|
664
|
-
value: Expression | Pattern; // Could be an AssignmentProperty
|
|
665
|
-
kind: "init" | "get" | "set";
|
|
666
|
-
method: boolean;
|
|
667
|
-
shorthand: boolean;
|
|
668
|
-
computed: boolean;
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
interface PropertyDefinition extends BaseNode {
|
|
672
|
-
type: "PropertyDefinition";
|
|
673
|
-
key: Expression | PrivateIdentifier;
|
|
674
|
-
value?: Expression | null | undefined;
|
|
675
|
-
computed: boolean;
|
|
676
|
-
static: boolean;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
interface FunctionExpression extends BaseFunction, BaseExpression {
|
|
680
|
-
id?: Identifier | null | undefined;
|
|
681
|
-
type: "FunctionExpression";
|
|
682
|
-
body: BlockStatement;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
interface SequenceExpression extends BaseExpression {
|
|
686
|
-
type: "SequenceExpression";
|
|
687
|
-
expressions: Expression[];
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
interface UnaryExpression extends BaseExpression {
|
|
691
|
-
type: "UnaryExpression";
|
|
692
|
-
operator: UnaryOperator;
|
|
693
|
-
prefix: true;
|
|
694
|
-
argument: Expression;
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
interface BinaryExpression extends BaseExpression {
|
|
698
|
-
type: "BinaryExpression";
|
|
699
|
-
operator: BinaryOperator;
|
|
700
|
-
left: Expression;
|
|
701
|
-
right: Expression;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
interface AssignmentExpression extends BaseExpression {
|
|
705
|
-
type: "AssignmentExpression";
|
|
706
|
-
operator: AssignmentOperator;
|
|
707
|
-
left: Pattern | MemberExpression;
|
|
708
|
-
right: Expression;
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
interface UpdateExpression extends BaseExpression {
|
|
712
|
-
type: "UpdateExpression";
|
|
713
|
-
operator: UpdateOperator;
|
|
714
|
-
argument: Expression;
|
|
715
|
-
prefix: boolean;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
interface LogicalExpression extends BaseExpression {
|
|
719
|
-
type: "LogicalExpression";
|
|
720
|
-
operator: LogicalOperator;
|
|
721
|
-
left: Expression;
|
|
722
|
-
right: Expression;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
interface ConditionalExpression extends BaseExpression {
|
|
726
|
-
type: "ConditionalExpression";
|
|
727
|
-
test: Expression;
|
|
728
|
-
alternate: Expression;
|
|
729
|
-
consequent: Expression;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
interface BaseCallExpression extends BaseExpression {
|
|
733
|
-
callee: Expression | Super;
|
|
734
|
-
arguments: Array<Expression | SpreadElement>;
|
|
735
|
-
}
|
|
736
|
-
type CallExpression = SimpleCallExpression | NewExpression;
|
|
737
|
-
|
|
738
|
-
interface SimpleCallExpression extends BaseCallExpression {
|
|
739
|
-
type: "CallExpression";
|
|
740
|
-
optional: boolean;
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
interface NewExpression extends BaseCallExpression {
|
|
744
|
-
type: "NewExpression";
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
interface MemberExpression extends BaseExpression, BasePattern {
|
|
748
|
-
type: "MemberExpression";
|
|
749
|
-
object: Expression | Super;
|
|
750
|
-
property: Expression | PrivateIdentifier;
|
|
751
|
-
computed: boolean;
|
|
752
|
-
optional: boolean;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
type Pattern = Identifier | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | MemberExpression;
|
|
756
|
-
|
|
757
|
-
interface BasePattern extends BaseNode {}
|
|
758
|
-
|
|
759
|
-
interface SwitchCase extends BaseNode {
|
|
760
|
-
type: "SwitchCase";
|
|
761
|
-
test?: Expression | null | undefined;
|
|
762
|
-
consequent: Statement[];
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
interface CatchClause extends BaseNode {
|
|
766
|
-
type: "CatchClause";
|
|
767
|
-
param: Pattern | null;
|
|
768
|
-
body: BlockStatement;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
interface Identifier extends BaseNode, BaseExpression, BasePattern {
|
|
772
|
-
type: "Identifier";
|
|
773
|
-
name: string;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
|
|
777
|
-
|
|
778
|
-
interface SimpleLiteral extends BaseNode, BaseExpression {
|
|
779
|
-
type: "Literal";
|
|
780
|
-
value: string | boolean | number | null;
|
|
781
|
-
raw?: string | undefined;
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
interface RegExpLiteral extends BaseNode, BaseExpression {
|
|
785
|
-
type: "Literal";
|
|
786
|
-
value?: RegExp | null | undefined;
|
|
787
|
-
regex: {
|
|
788
|
-
pattern: string;
|
|
789
|
-
flags: string;
|
|
790
|
-
};
|
|
791
|
-
raw?: string | undefined;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
interface BigIntLiteral extends BaseNode, BaseExpression {
|
|
795
|
-
type: "Literal";
|
|
796
|
-
value?: bigint | null | undefined;
|
|
797
|
-
bigint: string;
|
|
798
|
-
raw?: string | undefined;
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
|
|
802
|
-
|
|
803
|
-
type BinaryOperator =
|
|
804
|
-
| "=="
|
|
805
|
-
| "!="
|
|
806
|
-
| "==="
|
|
807
|
-
| "!=="
|
|
808
|
-
| "<"
|
|
809
|
-
| "<="
|
|
810
|
-
| ">"
|
|
811
|
-
| ">="
|
|
812
|
-
| "<<"
|
|
813
|
-
| ">>"
|
|
814
|
-
| ">>>"
|
|
815
|
-
| "+"
|
|
816
|
-
| "-"
|
|
817
|
-
| "*"
|
|
818
|
-
| "/"
|
|
819
|
-
| "%"
|
|
820
|
-
| "**"
|
|
821
|
-
| "|"
|
|
822
|
-
| "^"
|
|
823
|
-
| "&"
|
|
824
|
-
| "in"
|
|
825
|
-
| "instanceof";
|
|
826
|
-
|
|
827
|
-
type LogicalOperator = "||" | "&&" | "??";
|
|
828
|
-
|
|
829
|
-
type AssignmentOperator =
|
|
830
|
-
| "="
|
|
831
|
-
| "+="
|
|
832
|
-
| "-="
|
|
833
|
-
| "*="
|
|
834
|
-
| "/="
|
|
835
|
-
| "%="
|
|
836
|
-
| "**="
|
|
837
|
-
| "<<="
|
|
838
|
-
| ">>="
|
|
839
|
-
| ">>>="
|
|
840
|
-
| "|="
|
|
841
|
-
| "^="
|
|
842
|
-
| "&="
|
|
843
|
-
| "||="
|
|
844
|
-
| "&&="
|
|
845
|
-
| "??=";
|
|
846
|
-
|
|
847
|
-
type UpdateOperator = "++" | "--";
|
|
848
|
-
|
|
849
|
-
interface ForOfStatement extends BaseForXStatement {
|
|
850
|
-
type: "ForOfStatement";
|
|
851
|
-
await: boolean;
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
interface Super extends BaseNode {
|
|
855
|
-
type: "Super";
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
interface SpreadElement extends BaseNode {
|
|
859
|
-
type: "SpreadElement";
|
|
860
|
-
argument: Expression;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
|
|
864
|
-
type: "ArrowFunctionExpression";
|
|
865
|
-
expression: boolean;
|
|
866
|
-
body: BlockStatement | Expression;
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
interface YieldExpression extends BaseExpression {
|
|
870
|
-
type: "YieldExpression";
|
|
871
|
-
argument?: Expression | null | undefined;
|
|
872
|
-
delegate: boolean;
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
interface TemplateLiteral extends BaseExpression {
|
|
876
|
-
type: "TemplateLiteral";
|
|
877
|
-
quasis: TemplateElement[];
|
|
878
|
-
expressions: Expression[];
|
|
879
|
-
}
|
|
880
|
-
|
|
881
|
-
interface TaggedTemplateExpression extends BaseExpression {
|
|
882
|
-
type: "TaggedTemplateExpression";
|
|
883
|
-
tag: Expression;
|
|
884
|
-
quasi: TemplateLiteral;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
interface TemplateElement extends BaseNode {
|
|
888
|
-
type: "TemplateElement";
|
|
889
|
-
tail: boolean;
|
|
890
|
-
value: {
|
|
891
|
-
/** It is null when the template literal is tagged and the text has an invalid escape (e.g. - tag`\unicode and \u{55}`) */
|
|
892
|
-
cooked?: string | null | undefined;
|
|
893
|
-
raw: string;
|
|
894
|
-
};
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
interface AssignmentProperty extends Property {
|
|
898
|
-
value: Pattern;
|
|
899
|
-
kind: "init";
|
|
900
|
-
method: boolean; // false
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
interface ObjectPattern extends BasePattern {
|
|
904
|
-
type: "ObjectPattern";
|
|
905
|
-
properties: Array<AssignmentProperty | RestElement>;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
interface ArrayPattern extends BasePattern {
|
|
909
|
-
type: "ArrayPattern";
|
|
910
|
-
elements: Array<Pattern | null>;
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
interface RestElement extends BasePattern {
|
|
914
|
-
type: "RestElement";
|
|
915
|
-
argument: Pattern;
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
interface AssignmentPattern extends BasePattern {
|
|
919
|
-
type: "AssignmentPattern";
|
|
920
|
-
left: Pattern;
|
|
921
|
-
right: Expression;
|
|
922
|
-
}
|
|
923
|
-
interface BaseClass extends BaseNode {
|
|
924
|
-
superClass?: Expression | null | undefined;
|
|
925
|
-
body: ClassBody;
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
interface ClassBody extends BaseNode {
|
|
929
|
-
type: "ClassBody";
|
|
930
|
-
body: Array<MethodDefinition | PropertyDefinition | StaticBlock>;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
interface MethodDefinition extends BaseNode {
|
|
934
|
-
type: "MethodDefinition";
|
|
935
|
-
key: Expression | PrivateIdentifier;
|
|
936
|
-
value: FunctionExpression;
|
|
937
|
-
kind: "constructor" | "method" | "get" | "set";
|
|
938
|
-
computed: boolean;
|
|
939
|
-
static: boolean;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
interface MaybeNamedClassDeclaration extends BaseClass, BaseDeclaration {
|
|
943
|
-
type: "ClassDeclaration";
|
|
944
|
-
/** It is null when a class declaration is a part of the `export default class` statement */
|
|
945
|
-
id: Identifier | null;
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
interface ClassDeclaration extends MaybeNamedClassDeclaration {
|
|
949
|
-
id: Identifier;
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
interface ClassExpression extends BaseClass, BaseExpression {
|
|
953
|
-
type: "ClassExpression";
|
|
954
|
-
id?: Identifier | null | undefined;
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
interface MetaProperty extends BaseExpression {
|
|
958
|
-
type: "MetaProperty";
|
|
959
|
-
meta: Identifier;
|
|
960
|
-
property: Identifier;
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
interface ImportExpression extends BaseExpression {
|
|
964
|
-
type: "ImportExpression";
|
|
965
|
-
source: Expression;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
interface AwaitExpression extends BaseExpression {
|
|
969
|
-
type: "AwaitExpression";
|
|
970
|
-
argument: Expression;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
declare module 'estree' {
|
|
974
|
-
export interface Decorator extends BaseNode {
|
|
975
|
-
type: 'Decorator';
|
|
976
|
-
expression: Expression;
|
|
977
|
-
}
|
|
978
|
-
interface PropertyDefinition {
|
|
979
|
-
decorators: undefined[];
|
|
980
|
-
}
|
|
981
|
-
interface MethodDefinition {
|
|
982
|
-
decorators: undefined[];
|
|
983
|
-
}
|
|
984
|
-
interface BaseClass {
|
|
985
|
-
decorators: undefined[];
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
// declare AbortSignal here for environments without DOM lib or @types/node
|
|
990
|
-
declare global {
|
|
991
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
992
|
-
interface AbortSignal {}
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
interface TemplateStorefrontSection {
|
|
996
|
-
/** Section layout identifier. When not provided, the section will use the default layout. */
|
|
997
|
-
readonly id?: string;
|
|
998
|
-
readonly type: 'store';
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
interface StorePageConfiguration {
|
|
1002
|
-
readonly sections: [TemplateStorefrontSection];
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
declare const CatalogLayoutSlot: {
|
|
1006
|
-
readonly PRODUCT_LIST: "CONTROLS";
|
|
1007
|
-
readonly BOTTOM_BAR: "FOOTER";
|
|
1008
|
-
readonly CUSTOM_SLOT: "CUSTOM_SLOT";
|
|
1009
|
-
};
|
|
1010
|
-
declare const CategoryLayoutSlot: {
|
|
1011
|
-
readonly CATEGORY_TITLE: "MAIN_TITLE";
|
|
1012
|
-
readonly PRODUCT_LIST: "CONTROLS";
|
|
1013
|
-
readonly BOTTOM_BAR: "FOOTER";
|
|
1014
|
-
readonly CUSTOM_SLOT: "CUSTOM_SLOT";
|
|
1015
|
-
};
|
|
1016
|
-
declare const ProductLayoutSlot: {
|
|
1017
|
-
readonly TOP_BAR: "TOP_BAR";
|
|
1018
|
-
readonly GALLERY: "GALLERY";
|
|
1019
|
-
readonly SIDEBAR: "SIDEBAR";
|
|
1020
|
-
readonly DESCRIPTION: "DESCRIPTION";
|
|
1021
|
-
readonly REVIEW_LIST: "REVIEW_LIST";
|
|
1022
|
-
readonly RELATED_PRODUCTS: "RELATED_PRODUCTS";
|
|
1023
|
-
readonly BOTTOM_BAR: "FOOTER";
|
|
1024
|
-
readonly CUSTOM_SLOT: "CUSTOM_SLOT";
|
|
1025
|
-
};
|
|
1026
|
-
|
|
1027
|
-
export { CatalogLayoutSlot, CategoryLayoutSlot, EditorTypes, ProductLayoutSlot, createVueClientApp, createVueServerApp, useBackgroundElementDesign, useButtonElementContent, useButtonElementDesign, useDeckElementContent, useImageElementContent, useImageElementDesign, useInputboxElementContent, useInstantsiteJsApi, useLayoutElementDesign, useLogoElementContent, useLogoElementDesign, useMenuElementContent, useNavigationMenuElementContent, useSelectboxElementContent, useSelectboxElementDesign, useTextElementDesign, useTextareaElementContent, useTextareaElementDesign, useToggleElementContent, useToggleElementDesign, useVueBaseProps };
|
|
1028
|
-
export type { ButtonContent, Card, Deck, ImageContent, InputBoxContent, SelectBoxContent, StorePageConfiguration, TextAreaContent, ToggleContent };
|
|
1
|
+
export * from '@lightspeed/crane-api';
|