@lightspeed/crane-api 1.0.2 → 1.1.1

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/dist/index.d.mts CHANGED
@@ -1,262 +1,41 @@
1
1
  import * as vue from 'vue';
2
- import { ComputedRef, Component, App, Ref } from 'vue';
3
-
4
- interface ButtonContent {
5
- title: string;
6
- type: ActionLinkType;
7
- link?: string;
8
- email?: string;
9
- phone?: string;
10
- tileDivId?: string;
11
- pageId?: string;
12
- pageUrl?: string;
13
- hasTitle: boolean;
14
- hasLink: boolean;
15
- performAction: () => void;
16
- }
17
- declare function useButtonElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): {
18
- title: string | undefined;
19
- type: ActionLinkType | undefined;
20
- link: string | undefined;
21
- email: string | undefined;
22
- phone: string | undefined;
23
- tileDivId: string | null;
24
- pageId: string | undefined;
25
- pageUrl: string | undefined;
26
- hasTitle: boolean;
27
- hasLink: boolean;
28
- performAction: (() => void) | undefined;
29
- };
30
-
31
- declare function useCategorySelectorElementContent<CONTENT>(elementName: string): {
32
- categories: CategoryCollectionItemElement[];
33
- categoryIds: number[];
34
- hasContent: boolean;
35
- hasCategories: boolean;
36
- };
37
-
38
- interface Card$1 {
39
- title: string;
40
- settings: Record<string, unknown>;
41
- }
42
- interface Deck {
43
- cards: Card$1[];
44
- }
45
- declare enum EditorTypes {
46
- INPUTBOX = "INPUTBOX",
47
- TEXTAREA = "TEXTAREA",
48
- BUTTON = "BUTTON",
49
- IMAGE = "IMAGE",
50
- TOGGLE = "TOGGLE",
51
- SELECTBOX = "SELECTBOX"
52
- }
53
- declare function useDeckElementContent<CONTENT>(elementName: keyof CONTENT): {
54
- hasContent: boolean;
55
- cards: Card$1[] | undefined;
56
- getReactiveRef: typeof getReactiveRef;
57
- };
58
- declare function getReactiveRef(card: Card$1 | undefined, editorType: EditorTypes, contentElementName: string): {
59
- hasContent: boolean;
60
- value: string | undefined;
61
- } | {
62
- title: string | undefined;
63
- type: ActionLinkType | undefined;
64
- link: string | undefined;
65
- email: string | undefined;
66
- phone: string | undefined;
67
- tileDivId: string | null;
68
- pageId: string | undefined;
69
- pageUrl: string | undefined;
70
- hasTitle: boolean;
71
- hasLink: boolean;
72
- performAction: (() => void) | undefined;
73
- } | {
74
- hasContent: boolean;
75
- lowResolutionMobileImage: string;
76
- highResolutionMobileImage: string;
77
- lowResolutionDesktopImage: string;
78
- highResolutionDesktopImage: string;
79
- } | {
80
- hasContent: boolean;
81
- value: boolean | undefined;
82
- } | undefined;
83
-
84
- interface ImageContent {
85
- hasContent: boolean;
86
- lowResolutionMobileImage: string;
87
- highResolutionMobileImage: string;
88
- lowResolutionDesktopImage: string;
89
- highResolutionDesktopImage: string;
90
- }
91
- declare function useImageElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): {
92
- hasContent: boolean;
93
- lowResolutionMobileImage: string;
94
- highResolutionMobileImage: string;
95
- lowResolutionDesktopImage: string;
96
- highResolutionDesktopImage: string;
97
- };
98
-
99
- interface InputBoxContent {
100
- hasContent: boolean;
101
- value: string;
102
- }
103
- declare function useInputboxElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): {
104
- hasContent: boolean;
105
- value: string | undefined;
106
- };
107
-
108
- declare function useLogoElementContent<CONTENT>(): {
109
- type: LogoType | undefined;
110
- text: string | undefined;
111
- image: {
112
- lowResolutionMobileImage: string;
113
- highResolutionMobileImage: string;
114
- lowResolutionDesktopImage: string;
115
- highResolutionDesktopImage: string;
116
- };
117
- };
118
-
119
- declare function useMenuElementContent<CONTENT>(elementName: keyof CONTENT): {
120
- hasContent: boolean;
121
- items: {
122
- performAction: (() => void) | undefined;
123
- id: string;
124
- title?: string;
125
- type?: ActionLinkType;
126
- link?: string;
127
- email?: string;
128
- phone?: string;
129
- tileIdForScroll?: string;
130
- pageIdForNavigate?: string;
131
- showStoreCategories?: boolean;
132
- isSubmenuOpened?: boolean;
133
- categoryId?: number;
134
- }[];
135
- };
136
-
137
- declare function useNavigationMenuElementContent<CONTENT>(): {
138
- hasContent: boolean;
139
- items: {
140
- performAction: (() => void) | undefined;
141
- id: string;
142
- title?: string;
143
- type?: ActionLinkType;
144
- link?: string;
145
- email?: string;
146
- phone?: string;
147
- tileIdForScroll?: string;
148
- pageIdForNavigate?: string;
149
- showStoreCategories?: boolean;
150
- isSubmenuOpened?: boolean;
151
- categoryId?: number;
152
- }[];
153
- };
154
-
155
- declare function useProductSelectorElementContent<CONTENT>(elementName: string): {
156
- products: ProductListComponentItem[];
157
- categories: CategoryListComponentItem[];
158
- categoryId: number | undefined;
159
- hasContent: boolean;
160
- hasProducts: boolean;
161
- };
162
-
163
- interface SelectBoxContent {
164
- hasContent: boolean;
165
- value: string;
166
- }
167
- declare function useSelectboxElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): {
168
- hasContent: boolean;
169
- value: string | undefined;
170
- };
171
-
172
- interface TextAreaContent {
173
- hasContent: boolean;
174
- value: string;
175
- }
176
- declare function useTextareaElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): {
177
- hasContent: boolean;
178
- value: string | undefined;
179
- };
180
-
181
- interface ToggleContent {
182
- hasContent: boolean;
183
- value: boolean;
184
- }
185
- declare function useToggleElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): {
186
- hasContent: boolean;
187
- value: boolean | undefined;
188
- };
2
+ import { Reactive, ComputedRef, Component, App, Ref } from 'vue';
189
3
 
190
4
  /**
191
- * Composable that provides translation functionality.
192
- * Translations are loaded from globalThis.craneSharedTranslation injected during build.
193
- * Works in both browser (client) and Node.js (server/SSR) environments.
5
+ * Menu item with action link.
194
6
  *
195
- * @returns An object with a `t` function that takes a translation key and returns the translated string
196
- *
197
- * @example
198
- * ```ts
199
- * import { useTranslation } from '@lightspeed/crane';
7
+ * Used in buttons and navigation menus. The `performAction` method triggers
8
+ * the appropriate navigation based on the link type.
200
9
  *
201
- * const { t } = useTranslation();
202
- * const title = t('$label.shared.title');
203
- * ```
10
+ * @see {@link MenuContent}
11
+ * @see {@link useButtonElementContent}
204
12
  */
205
- declare function useTranslation(): {
206
- t: (key: string) => string;
207
- currentLanguageCode: vue.ComputedRef<string>;
208
- };
209
-
210
- declare function useBackgroundElementDesign<DESIGN>(elementName: keyof DESIGN): {
211
- background: Background | undefined;
212
- };
213
-
214
- declare function useButtonElementDesign<DESIGN>(elementName: keyof DESIGN): {
215
- appearance: ButtonAppearance | undefined;
216
- font: string | undefined;
217
- size: ButtonSize | undefined;
218
- style: ButtonStyle | undefined;
219
- color: Color | GlobalColorsString | undefined;
220
- visible: boolean | undefined;
221
- };
222
-
223
- declare function useImageElementDesign<DESIGN>(elementName: keyof DESIGN): {
224
- overlay: Overlay | undefined;
225
- visible: boolean | undefined;
226
- };
227
-
228
- declare function useLayoutElementDesign(): {
229
- layout: string | undefined;
230
- };
231
-
232
- declare function useLogoElementDesign<DESIGN>(): vue.ComputedRef<LogoDesignData>;
233
-
234
- declare function useSelectboxElementDesign<DESIGN>(elementName: keyof DESIGN): {
235
- value: string | undefined;
236
- };
237
-
238
- declare function useTextElementDesign<DESIGN>(elementName: keyof DESIGN): {
239
- font: string | undefined;
240
- size: number | GlobalTextSizeString | undefined;
241
- bold: boolean | undefined;
242
- italic: boolean | undefined;
243
- color: Color | GlobalColorsString | undefined;
244
- visible: boolean | undefined;
245
- };
246
-
247
- declare function useTextareaElementDesign<DESIGN>(elementName: keyof DESIGN): {
248
- font: string | undefined;
249
- size: number | GlobalTextSizeString | undefined;
250
- bold: boolean | undefined;
251
- italic: boolean | undefined;
252
- color: Color | GlobalColorsString | undefined;
253
- visible: boolean;
254
- whiteSpace: string;
255
- };
256
-
257
- declare function useToggleElementDesign<DESIGN>(elementName: keyof DESIGN): {
258
- enabled: boolean | undefined;
259
- };
13
+ interface ActionLink {
14
+ /** Unique identifier */
15
+ id: string;
16
+ /** Menu item text displayed to the user */
17
+ title?: string;
18
+ /** Action type (e.g., 'HYPER_LINK', 'SCROLL_TO_TILE', 'GO_TO_PAGE') */
19
+ type?: string;
20
+ /** URL for hyperlinks */
21
+ link?: string;
22
+ /** Email address for mailto links */
23
+ email?: string;
24
+ /** Phone number for tel links */
25
+ phone?: string;
26
+ /** Section ID for scroll-to-section links */
27
+ tileIdForScroll?: string;
28
+ /** Page ID for page navigation */
29
+ pageIdForNavigate?: string;
30
+ /** Whether to show store categories submenu */
31
+ showStoreCategories?: boolean;
32
+ /** Whether submenu is currently open */
33
+ isSubmenuOpened?: boolean;
34
+ /** Category ID for category links */
35
+ categoryId?: number;
36
+ /** Triggers the navigation action */
37
+ performAction?: () => void;
38
+ }
260
39
 
261
40
  declare enum ButtonTypeEnum {
262
41
  SCROLL_TO_TILE = "SCROLL_TO_TILE",
@@ -357,6 +136,12 @@ declare enum TemplatePageEnum {
357
136
  HOME = "HOME",
358
137
  CUSTOM = "CUSTOM"
359
138
  }
139
+ declare enum ReservedTemplatePageNameEnum {
140
+ HOME = "home",
141
+ CATALOG = "catalog",
142
+ CATEGORY = "category",
143
+ PRODUCT = "product"
144
+ }
360
145
 
361
146
  declare enum ValidationTypeEnum {
362
147
  CONTENT = "Content",
@@ -366,78 +151,542 @@ declare enum ValidationTypeEnum {
366
151
  type StorefrontSectionId = 'catalog' | 'category' | 'product';
367
152
  type VuegaPageId = 'products' | 'category' | 'product';
368
153
 
369
- declare enum ImageSet {
370
- ORIGINAL = "original",
371
- WEBP_LOW_RES = "webp-200x200",
372
- WEBP_HI_2X_RES = "webp-2000x2000",
373
- MOBILE_WEBP_LOW_RES = "cropped-webp-100x200",
374
- MOBILE_WEBP_HI_RES = "cropped-webp-1000x2000"
375
- }
376
- interface ImageInfoData {
377
- readonly url?: string;
378
- readonly width?: number;
379
- readonly height?: number;
154
+ /**
155
+ * Return type for `useButtonElementContent` composable.
156
+ *
157
+ * Represents a button with action link from the editor.
158
+ * The `type` field determines which action fields are used.
159
+ *
160
+ * @see {@link useButtonElementContent}
161
+ * @see {@link ButtonTypeEnum}
162
+ */
163
+ interface ButtonContentData {
164
+ /** Button text displayed to the user */
165
+ title: string;
166
+ /** Action type determining button behavior */
167
+ type: ButtonTypeEnum;
168
+ /** URL for HYPER_LINK type */
169
+ link?: string;
170
+ /** Email address for MAIL_LINK type */
171
+ email?: string;
172
+ /** Phone number for TEL_LINK type */
173
+ phone?: string;
174
+ /** Section ID for SCROLL_TO_TILE type */
175
+ tileId?: string;
176
+ /** Page ID for GO_TO_PAGE type */
177
+ pageId?: string;
178
+ /** Page URL for GO_TO_PAGE type */
179
+ pageUrl?: string;
180
+ hasTitle?: boolean;
181
+ hasLink?: boolean;
182
+ performAction?: () => void;
380
183
  }
381
- interface ImageBorderInfoData {
382
- readonly homogeneity?: boolean;
383
- readonly color?: {
384
- readonly r: number;
385
- readonly g: number;
386
- readonly b: number;
387
- readonly a: number;
184
+
185
+ /**
186
+ * Raw category selector data from the editor.
187
+ *
188
+ * @see {@link CategorySelectorContent}
189
+ */
190
+ interface CategorySelectorData {
191
+ readonly categories: {
192
+ /** Array of selected category IDs */
193
+ readonly categoryIds: Array<number>;
194
+ /** Array of category items with custom settings */
195
+ readonly items: Array<CategoryItemData>;
196
+ /** Selection mode: 'ROOT' for all root categories, 'MANUAL' for user-selected */
197
+ readonly selectionType: CategorySelectionType;
388
198
  };
389
199
  }
390
- interface Frame {
391
- visible: boolean;
392
- width: number | undefined;
393
- color: string | GlobalColorsString$1 | undefined;
394
- }
395
- interface TransformedFrame extends Omit<Frame, 'color'> {
396
- color?: Color$1 | undefined;
200
+ /**
201
+ * Return type for `useCategorySelectorElementContent` composable.
202
+ *
203
+ * Represents store categories selected by the user in the editor.
204
+ *
205
+ * @see {@link useCategorySelectorElementContent}
206
+ * @see {@link CategorySelectorData}
207
+ */
208
+ interface CategorySelectorContent {
209
+ /** Array of selected category objects with id, name, imageUrl, etc. */
210
+ categories: CategoryListComponentItem[];
211
+ /** `true` if at least one category is selected */
212
+ hasCategories: boolean;
213
+ /** Array of selected category IDs */
214
+ categoryIds: Array<number>;
215
+ /** `true` if selector data exists */
216
+ hasContent: boolean;
397
217
  }
398
218
 
399
- interface HSLColor {
400
- h: number;
401
- s: number;
402
- l: number;
403
- a: number;
404
- }
405
- interface RGBAColor {
406
- r: number;
407
- g: number;
408
- b: number;
409
- a: number;
410
- }
411
- interface Color$1 {
412
- type: 'GLOBAL_COLOR' | 'STRUCTURED_COLOR';
413
- raw?: string;
414
- hex?: string;
415
- hsl?: HSLColor;
416
- rgba?: RGBAColor;
417
- auto?: boolean;
219
+ declare enum EditorTypes {
220
+ INPUTBOX = "INPUTBOX",
221
+ TEXTAREA = "TEXTAREA",
222
+ BUTTON = "BUTTON",
223
+ IMAGE = "IMAGE",
224
+ TOGGLE = "TOGGLE",
225
+ SELECTBOX = "SELECTBOX",
226
+ CATEGORY_SELECTOR = "CATEGORY_SELECTOR",
227
+ PRODUCT_SELECTOR = "PRODUCT_SELECTOR"
418
228
  }
229
+ /** Gets a reactive reference to a field within a DECK card. */
230
+ declare function getReactiveRef(card: Card | undefined, editorType: EditorTypes, contentElementName: string, storeData?: StoreData): {
231
+ readonly hasContent: boolean;
232
+ readonly value: string | undefined;
233
+ } | {
234
+ readonly hasContent: boolean;
235
+ readonly lowResolutionMobileImage: string | undefined;
236
+ readonly highResolutionMobileImage: string | undefined;
237
+ readonly lowResolutionDesktopImage: string | undefined;
238
+ readonly highResolutionDesktopImage: string | undefined;
239
+ } | {
240
+ readonly hasContent: boolean;
241
+ readonly value: boolean | undefined;
242
+ } | {
243
+ title?: string | undefined;
244
+ type?: ButtonTypeEnum | undefined;
245
+ link?: string | undefined;
246
+ email?: string | undefined;
247
+ phone?: string | undefined;
248
+ tileId?: string | undefined;
249
+ pageId?: string | undefined;
250
+ pageUrl?: string | undefined;
251
+ hasTitle?: boolean | undefined;
252
+ hasLink?: boolean | undefined;
253
+ performAction?: (() => void) | undefined;
254
+ } | {
255
+ categories: {
256
+ readonly id: number;
257
+ readonly name: string;
258
+ readonly url: string;
259
+ readonly imageUrl?: string | undefined;
260
+ readonly thumbnailImageUrl?: string | undefined;
261
+ readonly imageBorderInfo?: {
262
+ readonly homogeneity?: boolean | undefined;
263
+ readonly dominatingColor?: {
264
+ readonly red?: number | undefined;
265
+ readonly green?: number | undefined;
266
+ readonly blue?: number | undefined;
267
+ readonly alpha?: number | undefined;
268
+ } | undefined;
269
+ } | undefined;
270
+ readonly alt?: string | undefined;
271
+ readonly productsCount: number;
272
+ }[];
273
+ hasCategories: boolean;
274
+ categoryIds: Array<number>;
275
+ hasContent: boolean;
276
+ } | {
277
+ products: {
278
+ readonly id: number;
279
+ readonly name: string;
280
+ readonly url: string;
281
+ readonly imageUrl?: string | undefined;
282
+ readonly thumbnailImageUrl?: string | undefined;
283
+ readonly fullImageUrl?: string | undefined;
284
+ readonly imageBorderInfo: {
285
+ readonly homogeneity?: boolean | undefined;
286
+ readonly dominatingColor?: {
287
+ readonly red?: number | undefined;
288
+ readonly green?: number | undefined;
289
+ readonly blue?: number | undefined;
290
+ readonly alpha?: number | undefined;
291
+ } | undefined;
292
+ };
293
+ readonly alternativeProductImage?: {
294
+ readonly imageUrl?: string | undefined;
295
+ readonly thumbnailImageUrl?: string | undefined;
296
+ readonly fullImageUrl?: string | undefined;
297
+ readonly imageBorderInfo?: {
298
+ readonly homogeneity?: boolean | undefined;
299
+ readonly dominatingColor?: {
300
+ readonly red?: number | undefined;
301
+ readonly green?: number | undefined;
302
+ readonly blue?: number | undefined;
303
+ readonly alpha?: number | undefined;
304
+ } | undefined;
305
+ } | undefined;
306
+ readonly alt?: string | undefined;
307
+ } | undefined;
308
+ readonly description?: string | undefined;
309
+ readonly price: number;
310
+ readonly comparePrice?: number | undefined;
311
+ readonly formattedPrice: string;
312
+ readonly formattedComparePrice?: string | undefined;
313
+ readonly lowestPrice?: {
314
+ readonly priceFormatted: string;
315
+ readonly label: string;
316
+ readonly countDateFromCreate: string;
317
+ } | undefined;
318
+ readonly zeroPrice?: boolean | undefined;
319
+ readonly inStock: boolean;
320
+ readonly subtitle?: string | undefined;
321
+ readonly sku?: string | undefined;
322
+ readonly quantity?: number | undefined;
323
+ readonly ribbon?: {
324
+ readonly text: string;
325
+ readonly color: {
326
+ red: number;
327
+ green: number;
328
+ blue: number;
329
+ alpha: number;
330
+ };
331
+ } | undefined;
332
+ readonly nameYourPriceEnabled?: boolean | undefined;
333
+ readonly attributeValues?: string[] | undefined;
334
+ readonly legalInfos?: {
335
+ readonly type: ProductLegalInfoType;
336
+ readonly text: string;
337
+ readonly url?: string | undefined;
338
+ readonly urlTarget?: string | undefined;
339
+ }[] | undefined;
340
+ readonly isSampleProduct?: boolean | undefined;
341
+ readonly subscriptionSettings?: {
342
+ readonly subscriptionAllowed: boolean;
343
+ readonly oneTimePurchaseAllowed: boolean;
344
+ readonly recurringChargeSettings: {
345
+ readonly subscriptionPriceWithSignUpFee?: number | undefined;
346
+ readonly subscriptionPriceWithSignUpFeeFormatted?: string | undefined;
347
+ }[];
348
+ readonly oneTimePurchasePrice?: number | undefined;
349
+ readonly oneTimePurchasePriceFormatted?: string | undefined;
350
+ readonly oneTimePurchaseMarkupPercent?: number | undefined;
351
+ } | undefined;
352
+ readonly preorder?: boolean | undefined;
353
+ readonly alt?: string | undefined;
354
+ readonly productRating?: {
355
+ readonly rating?: number | undefined;
356
+ readonly reviewsPublished?: number | undefined;
357
+ readonly isHideRating?: boolean | undefined;
358
+ readonly isHideCount?: boolean | undefined;
359
+ readonly isHideReviewFullStars?: boolean | undefined;
360
+ } | undefined;
361
+ readonly categoryName?: string | undefined;
362
+ readonly enabled?: boolean | undefined;
363
+ readonly isOnSale: boolean;
364
+ readonly defaultCategoryId?: number | undefined;
365
+ readonly categoryIds?: number[] | undefined;
366
+ }[];
367
+ hasProducts: boolean;
368
+ categories: {
369
+ readonly id: number;
370
+ readonly name: string;
371
+ readonly url: string;
372
+ readonly imageUrl?: string | undefined;
373
+ readonly thumbnailImageUrl?: string | undefined;
374
+ readonly imageBorderInfo?: {
375
+ readonly homogeneity?: boolean | undefined;
376
+ readonly dominatingColor?: {
377
+ readonly red?: number | undefined;
378
+ readonly green?: number | undefined;
379
+ readonly blue?: number | undefined;
380
+ readonly alpha?: number | undefined;
381
+ } | undefined;
382
+ } | undefined;
383
+ readonly alt?: string | undefined;
384
+ readonly productsCount: number;
385
+ }[];
386
+ categoryId?: number | undefined;
387
+ hasContent: boolean;
388
+ } | undefined;
389
+ /**
390
+ * Composable for accessing DECK content (card collection, up to 10 items).
391
+ *
392
+ * Used for sliders, carousels, feature lists, and repeatable content blocks.
393
+ * Each card in the deck has its own settings that can be accessed via `getReactiveRef`.
394
+ *
395
+ * @template CONTENT - The content type from `type.ts`
396
+ * @param elementName - The name of the DECK element in content settings
397
+ *
398
+ * @returns `Reactive<DeckContent>` — reactive object with:
399
+ * - `hasContent: ComputedRef<boolean>` — `true` if deck has at least one card
400
+ * - `cards: ComputedRef<ReadonlyArray<Card> | undefined>` — array of Card objects
401
+ * - `getReactiveRef: (card, editorType, fieldName) => Reactive<...>` — get reactive content from a card field
402
+ *
403
+ * Card interface:
404
+ * - `title: string` — card title
405
+ * - `settings: ContentSettings` — card content settings
406
+ *
407
+ * @see {@link DeckContent}
408
+ * @see {@link Card}
409
+ * @see {@link Deck}
410
+ * @see {@link EditorTypes} — enum for accessing card fields
411
+ *
412
+ * @example
413
+ * ```typescript
414
+ * // settings/content.ts
415
+ * const content = {
416
+ * slides: {
417
+ * type: 'DECK',
418
+ * label: '$label.slides',
419
+ * max: 5,
420
+ * item: {
421
+ * title: { type: 'INPUTBOX', label: '$label.slide_title' },
422
+ * image: { type: 'IMAGE', label: '$label.slide_image' },
423
+ * button: { type: 'BUTTON', label: '$label.slide_button' },
424
+ * },
425
+ * },
426
+ * };
427
+ *
428
+ * // Section.vue
429
+ * import { useDeckElementContent, EditorTypes } from '@lightspeed/crane-api';
430
+ *
431
+ * const slides = useDeckElementContent<ContentType>('slides');
432
+ *
433
+ * // Template
434
+ * <div v-if="slides.hasContent" class="slider">
435
+ * <div v-for="card in slides.cards" :key="card.title" class="slide">
436
+ * <template v-if="slides.getReactiveRef(card, EditorTypes.INPUTBOX, 'title')?.hasContent">
437
+ * {{ slides.getReactiveRef(card, EditorTypes.INPUTBOX, 'title').value }}
438
+ * </template>
439
+ * </div>
440
+ * </div>
441
+ * ```
442
+ */
443
+ declare function useDeckElementContent<CONTENT>(elementName: keyof CONTENT): Reactive<DeckContent>;
419
444
 
420
- type GlobalColorsString$1 = 'global.color.title' | 'global.color.body' | 'global.color.button' | 'global.color.link' | 'global.color.background';
445
+ /**
446
+ * A single card within a DECK collection.
447
+ *
448
+ * Each card has its own content settings that can be accessed
449
+ * via `getReactiveRef` method.
450
+ *
451
+ * @see {@link DeckContent}
452
+ */
453
+ interface Card {
454
+ /** Card title (used as identifier in the editor) */
455
+ title: string;
456
+ /** Card content settings containing all field values */
457
+ settings: ContentSettings;
458
+ }
459
+ /**
460
+ * Raw DECK data from the editor.
461
+ *
462
+ * @see {@link Card}
463
+ */
464
+ interface Deck {
465
+ /** Array of cards in the deck (up to 10) */
466
+ readonly cards: ReadonlyArray<Card>;
467
+ }
468
+ /**
469
+ * Return type for `useDeckElementContent` composable.
470
+ *
471
+ * Represents a collection of cards (up to 10 items).
472
+ * Use `getReactiveRef` to access individual card fields.
473
+ *
474
+ * @see {@link useDeckElementContent}
475
+ * @see {@link Card}
476
+ */
477
+ interface DeckContent {
478
+ /** `true` if deck has at least one card */
479
+ readonly hasContent: ComputedRef<boolean>;
480
+ /** Array of Card objects */
481
+ readonly cards: ComputedRef<ReadonlyArray<Card> | undefined>;
482
+ /** Get reactive content from a card field */
483
+ readonly getReactiveRef: typeof getReactiveRef;
484
+ }
485
+
486
+ /**
487
+ * HSL color representation with alpha channel.
488
+ *
489
+ * @see {@link Color}
490
+ */
491
+ interface HSLColor {
492
+ /** Hue (0-360) */
493
+ h: number;
494
+ /** Saturation (0-100) */
495
+ s: number;
496
+ /** Lightness (0-100) */
497
+ l: number;
498
+ /** Alpha/opacity (0-1) */
499
+ a: number;
500
+ }
501
+ /**
502
+ * RGBA color representation.
503
+ *
504
+ * @see {@link Color}
505
+ */
506
+ interface RGBAColor {
507
+ /** Red (0-255) */
508
+ r: number;
509
+ /** Green (0-255) */
510
+ g: number;
511
+ /** Blue (0-255) */
512
+ b: number;
513
+ /** Alpha/opacity (0-1) */
514
+ a: number;
515
+ }
516
+ /**
517
+ * Color value from the editor.
518
+ *
519
+ * Can be a global color reference or a structured color with multiple formats.
520
+ *
521
+ * @see {@link HSLColor}
522
+ * @see {@link RGBAColor}
523
+ */
524
+ interface Color$1 {
525
+ /** Color type: 'GLOBAL_COLOR' for theme colors, 'STRUCTURED_COLOR' for custom */
526
+ type: 'GLOBAL_COLOR' | 'STRUCTURED_COLOR';
527
+ /** Raw color string (e.g., '#ffffff', 'rgba(0,0,0,0.5)') */
528
+ raw?: string;
529
+ /** Hex color value (e.g., '#ffffff') */
530
+ hex?: string;
531
+ /** HSL representation */
532
+ hsl?: HSLColor;
533
+ /** RGBA representation */
534
+ rgba?: RGBAColor;
535
+ /** Whether color was auto-calculated */
536
+ auto?: boolean;
537
+ }
538
+
539
+ /**
540
+ * Global color reference strings.
541
+ *
542
+ * Use these to reference theme colors that update automatically
543
+ * when the site theme changes.
544
+ */
545
+ type GlobalColorsString = 'global.color.title' | 'global.color.body' | 'global.color.button' | 'global.color.link' | 'global.color.background';
546
+ /**
547
+ * Global font reference strings.
548
+ *
549
+ * Use these to reference theme fonts that update automatically
550
+ * when the site theme changes.
551
+ */
421
552
  type GlobalFontsString = 'global.fontFamily.title' | 'global.fontFamily.body';
422
- type GlobalTextSizeString$1 = 'global.textSize.title' | 'global.textSize.subtitle' | 'global.textSize.body';
553
+ /**
554
+ * Global text size reference strings.
555
+ *
556
+ * Use these to reference theme text sizes that update automatically
557
+ * when the site theme changes.
558
+ */
559
+ type GlobalTextSizeString = 'global.textSize.title' | 'global.textSize.subtitle' | 'global.textSize.body';
560
+ /**
561
+ * Font configuration.
562
+ *
563
+ * @see {@link GlobalFontsString}
564
+ */
423
565
  interface Font {
566
+ /** Font type: 'GLOBAL_FONT' for theme fonts, 'PRESET_FONT' for custom */
424
567
  type: 'GLOBAL_FONT' | 'PRESET_FONT';
568
+ /** Font family name */
425
569
  font: string;
426
570
  }
571
+ /**
572
+ * Text size configuration.
573
+ *
574
+ * @see {@link GlobalTextSizeString}
575
+ */
427
576
  interface TextSize {
577
+ /** Size type: 'GLOBAL_TEXT_SIZE' for theme sizes, 'NUMERIC_TEXT_SIZE' for custom */
428
578
  type: 'GLOBAL_TEXT_SIZE' | 'NUMERIC_TEXT_SIZE';
579
+ /** Size value (string for global, number for custom) */
429
580
  size: string | number;
430
581
  }
582
+ /**
583
+ * Text capitalization/transform type.
584
+ *
585
+ * - 'none' — no transformation
586
+ * - 'all' — UPPERCASE
587
+ * - 'small' — Capitalize First Letter
588
+ */
431
589
  type CapitalizationType = 'none' | 'all' | 'small';
432
590
 
591
+ /**
592
+ * Global design settings from the site theme.
593
+ *
594
+ * Contains font families, text sizes, and colors that can be
595
+ * referenced using global strings (e.g., 'global.fontFamily.title').
596
+ *
597
+ * @see {@link GlobalFontsString}
598
+ * @see {@link GlobalTextSizeString}
599
+ * @see {@link GlobalColorsString}
600
+ */
433
601
  interface GlobalDesign$1 {
602
+ /** Font family mappings (e.g., { title: 'Roboto', body: 'Open Sans' }) */
434
603
  readonly fontFamily: Record<string, string>;
604
+ /** Text size mappings in pixels (e.g., { title: 48, subtitle: 32, body: 16 }) */
435
605
  readonly textSize: Record<string, number>;
606
+ /** Color mappings (e.g., { title: Color, body: Color, background: Color }) */
436
607
  readonly color: Record<string, Color$1>;
437
608
  }
438
609
 
610
+ /**
611
+ * Image resolution variants.
612
+ *
613
+ * Used to access different image sizes from `ImageContentData.set`.
614
+ *
615
+ * @see {@link ImageContentData}
616
+ */
617
+ declare enum ImageSet {
618
+ /** Original uploaded image */
619
+ ORIGINAL = "original",
620
+ /** Low resolution WebP (200x200) for placeholders */
621
+ WEBP_LOW_RES = "webp-200x200",
622
+ /** High resolution WebP (2000x2000) for desktop */
623
+ WEBP_HI_2X_RES = "webp-2000x2000",
624
+ /** Low resolution mobile WebP (100x200) for placeholders */
625
+ MOBILE_WEBP_LOW_RES = "cropped-webp-100x200",
626
+ /** High resolution mobile WebP (1000x2000) */
627
+ MOBILE_WEBP_HI_RES = "cropped-webp-1000x2000"
628
+ }
629
+ /**
630
+ * Image information for a specific resolution.
631
+ *
632
+ * @see {@link ImageSet}
633
+ */
634
+ interface ImageInfoData {
635
+ /** Image URL */
636
+ readonly url?: string;
637
+ /** Image width in pixels */
638
+ readonly width?: number;
639
+ /** Image height in pixels */
640
+ readonly height?: number;
641
+ }
642
+ /**
643
+ * Image border/edge detection information.
644
+ *
645
+ * Used for determining if image has uniform edges.
646
+ */
647
+ interface ImageBorderInfoData {
648
+ /** Whether the image border is homogeneous */
649
+ readonly homogeneity?: boolean;
650
+ /** Border color (if homogeneous) */
651
+ readonly color?: {
652
+ readonly r: number;
653
+ readonly g: number;
654
+ readonly b: number;
655
+ readonly a: number;
656
+ };
657
+ }
658
+ /**
659
+ * Logo frame/border configuration.
660
+ *
661
+ * @see {@link LogoDesignData}
662
+ */
663
+ interface Frame {
664
+ /** Whether frame is visible */
665
+ visible: boolean;
666
+ /** Frame width in pixels */
667
+ width: number | undefined;
668
+ /** Frame color */
669
+ color: string | GlobalColorsString | undefined;
670
+ }
671
+ /**
672
+ * Transformed frame with resolved color.
673
+ *
674
+ * @see {@link Frame}
675
+ */
676
+ interface TransformedFrame extends Omit<Frame, 'color'> {
677
+ /** Resolved color value */
678
+ color?: Color$1 | undefined;
679
+ }
680
+
681
+ /**
682
+ * Instantsite JavaScript API events.
683
+ *
684
+ * Used with `useInstantsiteJsApi` composable for lifecycle events.
685
+ */
439
686
  declare enum InstantsiteJsEvent {
687
+ /** Fired when a section (tile) is loaded and visible */
440
688
  TILE_LOADED = "tile-loaded",
689
+ /** Fired when a section (tile) is unloaded/hidden */
441
690
  TILE_UNLOADED = "tile-unloaded"
442
691
  }
443
692
  interface InstantsiteTilePromise$1 {
@@ -503,113 +752,211 @@ interface InstantsiteJSAPI$1 {
503
752
  openSearchPage: (keyword: string | undefined) => void;
504
753
  }
505
754
 
506
- interface TemplateSettings {
507
- readonly metadata: TemplateMetadata;
508
- readonly sections: TemplateSection[];
755
+ /**
756
+ * Return type for `useImageElementContent` composable.
757
+ *
758
+ * Provides responsive image URLs for different resolutions and devices.
759
+ * Use low-resolution images as placeholders while high-resolution loads.
760
+ *
761
+ * @see {@link useImageElementContent}
762
+ */
763
+ interface ImageContent {
764
+ /** `true` if an image has been uploaded */
765
+ readonly hasContent: ComputedRef<boolean>;
766
+ /** Mobile placeholder image URL (low resolution) */
767
+ readonly lowResolutionMobileImage: ComputedRef<string | undefined>;
768
+ /** Mobile full quality image URL */
769
+ readonly highResolutionMobileImage: ComputedRef<string | undefined>;
770
+ /** Desktop placeholder image URL (low resolution) */
771
+ readonly lowResolutionDesktopImage: ComputedRef<string | undefined>;
772
+ /** Desktop full quality image URL */
773
+ readonly highResolutionDesktopImage: ComputedRef<string | undefined>;
509
774
  }
510
-
511
- declare const TemplateCategoriesList: {
512
- readonly apparel_footwear: "apparel_footwear";
513
- readonly vape_smoke: "vape_smoke";
514
- readonly home_garden: "home_garden";
515
- readonly sport_outdoor: "sport_outdoor";
516
- readonly jewelry_accessories: "jewelry_accessories";
517
- readonly pet_animals: "pet_animals";
518
- readonly bikes: "bikes";
519
- readonly health_beauty: "health_beauty";
520
- readonly gift_shop: "gift_shop";
521
- readonly electronics: "electronics";
522
- readonly other: "other";
523
- };
524
- type TemplateCategory = typeof TemplateCategoriesList[keyof typeof TemplateCategoriesList];
525
-
775
+ /**
776
+ * Raw image data from the editor.
777
+ *
778
+ * Contains image set with different resolutions and border info.
779
+ *
780
+ * @see {@link ImageSet}
781
+ * @see {@link ImageInfoData}
782
+ */
526
783
  interface ImageContentData {
784
+ /** Border/edge detection info for the image */
527
785
  readonly borderInfo?: ImageBorderInfoData;
786
+ /** Image URLs for different resolutions */
528
787
  readonly set: {
529
788
  [key in ImageSet]?: ImageInfoData;
530
789
  };
531
790
  }
532
791
 
533
- interface TemplateMetadata {
534
- readonly name: string;
535
- readonly description?: string;
536
- readonly preview_url?: string;
537
- readonly cover_image?: ImageContentData;
538
- readonly categories?: TemplateCategory[];
792
+ /**
793
+ * Return type for `useInputboxElementContent` composable.
794
+ *
795
+ * Represents a single-line text input field from the editor.
796
+ *
797
+ * @see {@link useInputboxElementContent}
798
+ */
799
+ interface InputBoxContent {
800
+ /** `true` if the field has non-empty text */
801
+ readonly hasContent: ComputedRef<boolean>;
802
+ /** The text string entered by the user */
803
+ readonly value: ComputedRef<string | undefined>;
539
804
  }
540
805
 
541
- interface InputboxContentEditor {
542
- readonly type: 'INPUTBOX';
543
- readonly label: string;
544
- readonly placeholder: string;
545
- defaults?: InputboxContentEditorDefaults;
806
+ /** Logo display type: text-based or image-based */
807
+ type LogoType = 'TEXT' | 'IMAGE';
808
+ /**
809
+ * Return type for `useLogoElementContent` composable.
810
+ *
811
+ * Represents site logo in headers/footers.
812
+ * Can be either text-based or image-based depending on `type`.
813
+ *
814
+ * @see {@link useLogoElementContent}
815
+ * @see {@link LogoType}
816
+ */
817
+ interface LogoContent {
818
+ /** Logo type: 'TEXT' or 'IMAGE' */
819
+ readonly type: ComputedRef<LogoType | undefined>;
820
+ /** Text content (when type is 'TEXT') */
821
+ readonly text: ComputedRef<string | undefined>;
822
+ /** Image URLs (when type is 'IMAGE') */
823
+ readonly image: ComputedRef<{
824
+ lowResolutionMobileImage: string | undefined;
825
+ highResolutionMobileImage: string | undefined;
826
+ lowResolutionDesktopImage: string | undefined;
827
+ highResolutionDesktopImage: string | undefined;
828
+ } | undefined>;
546
829
  }
547
- interface TextareaContentEditor {
548
- readonly type: 'TEXTAREA';
549
- readonly label: string;
550
- readonly placeholder: string;
551
- defaults?: TextareaContentEditorDefaults;
830
+ /**
831
+ * Raw logo data from the editor.
832
+ *
833
+ * @see {@link LogoContent}
834
+ */
835
+ interface LogoContentData {
836
+ /** Logo type: 'TEXT' or 'IMAGE' */
837
+ readonly type: LogoType;
838
+ /** Text content for text logo */
839
+ readonly text: string;
840
+ /** Image data for image logo */
841
+ readonly image: ImageContentData;
552
842
  }
553
- interface ButtonContentEditor {
554
- readonly type: 'BUTTON';
555
- readonly label: string;
843
+
844
+ /**
845
+ * Return type for `useMenuElementContent` and `useNavigationMenuElementContent` composables.
846
+ *
847
+ * Represents a navigation menu with action links.
848
+ *
849
+ * @see {@link useMenuElementContent}
850
+ * @see {@link useNavigationMenuElementContent}
851
+ * @see {@link ActionLink}
852
+ */
853
+ interface MenuContent {
854
+ /** `true` if menu has at least one item */
855
+ readonly hasContent: ComputedRef<boolean>;
856
+ /** Array of menu items with title, type, link, and performAction */
857
+ readonly items: ComputedRef<ActionLink[]>;
556
858
  }
557
- interface ImageContentEditor {
558
- readonly type: 'IMAGE';
559
- readonly label: string;
560
- readonly static?: boolean;
561
- defaults?: ImageContentEditorDefaults;
859
+ /**
860
+ * Raw menu data from the editor.
861
+ *
862
+ * @see {@link MenuContent}
863
+ * @see {@link ActionLink}
864
+ */
865
+ interface MenuContentData {
866
+ /** Array of menu items */
867
+ readonly items: ReadonlyArray<ActionLink>;
562
868
  }
563
- interface ToggleContentEditor {
564
- readonly type: 'TOGGLE';
565
- readonly label: string;
566
- readonly description?: string;
869
+
870
+ /**
871
+ * Raw product selector data from the editor.
872
+ *
873
+ * @see {@link ProductSelectorContent}
874
+ */
875
+ interface ProductSelectorData {
876
+ /** Single product selection (legacy) */
877
+ readonly product?: {
878
+ readonly id: number;
879
+ };
880
+ /** Multiple products selection */
881
+ readonly products?: {
882
+ /** Array of selected product IDs */
883
+ readonly productIds: Array<number>;
884
+ /** Selection mode */
885
+ readonly selectionType: keyof typeof ProductSelectionType;
886
+ };
887
+ /** Category ID for category-based selection */
888
+ readonly categoryId?: string;
567
889
  }
568
- interface SelectboxContentOption {
569
- readonly value: string;
570
- readonly label: string;
890
+ /**
891
+ * Return type for `useProductSelectorElementContent` composable.
892
+ *
893
+ * Represents store products selected by the user in the editor.
894
+ *
895
+ * @see {@link useProductSelectorElementContent}
896
+ * @see {@link ProductSelectorData}
897
+ */
898
+ interface ProductSelectorContent {
899
+ /** Array of selected product objects with id, name, price, imageUrl, etc. */
900
+ products: ProductListComponentItem[];
901
+ /** `true` if at least one product is selected */
902
+ hasProducts: boolean;
903
+ /** Array of categories (when using category selection) */
904
+ categories: CategoryListComponentItem[];
905
+ /** Selected category ID (when using category selection) */
906
+ categoryId?: number;
907
+ /** `true` if selector data exists */
908
+ hasContent: boolean;
571
909
  }
572
- interface SelectboxContentEditor {
573
- readonly type: 'SELECTBOX';
574
- readonly label: string;
575
- readonly placeholder: string;
576
- readonly description?: string;
577
- readonly options: ReadonlyArray<SelectboxContentOption>;
910
+
911
+ /**
912
+ * Return type for `useSelectboxElementContent` composable.
913
+ *
914
+ * Represents a dropdown selection from the editor.
915
+ *
916
+ * @see {@link useSelectboxElementContent}
917
+ */
918
+ interface SelectBoxContent {
919
+ /** `true` if a selection has been made */
920
+ readonly hasContent: ComputedRef<boolean>;
921
+ /** The selected option value */
922
+ readonly value: ComputedRef<string | undefined>;
578
923
  }
579
- interface DeckContentEditor {
580
- readonly type: 'DECK';
581
- readonly label: string;
582
- readonly addButtonLabel: string;
583
- readonly maxCards: number;
584
- readonly cards: {
585
- [key: string]: {
586
- label: string;
587
- settings: ContentSettings;
588
- };
589
- };
590
- }
591
- interface MenuContentEditor {
592
- readonly type: 'MENU';
593
- readonly label?: string;
594
- }
595
- interface NavigationMenuContentEditor {
596
- readonly type: 'NAVIGATION_MENU';
597
- }
598
- interface LogoContentEditor {
599
- readonly type: 'LOGO';
600
- readonly label?: string;
924
+
925
+ /**
926
+ * Return type for `useTextareaElementContent` composable.
927
+ *
928
+ * Represents a multi-line text input field from the editor.
929
+ * Preserves line breaks entered by the user.
930
+ *
931
+ * @see {@link useTextareaElementContent}
932
+ */
933
+ interface TextAreaContent {
934
+ /** `true` if the field has non-empty text */
935
+ readonly hasContent: ComputedRef<boolean>;
936
+ /** The multi-line text string entered by the user */
937
+ readonly value: ComputedRef<string | undefined>;
601
938
  }
602
- interface ProductSelectorContentEditor {
603
- readonly type: 'PRODUCT_SELECTOR';
604
- readonly label?: string;
605
- defaults?: ProductSelectorContentEditorDefaults;
939
+
940
+ /**
941
+ * Return type for `useToggleElementContent` composable.
942
+ *
943
+ * Represents a boolean toggle switch from the editor.
944
+ *
945
+ * @see {@link useToggleElementContent}
946
+ */
947
+ interface ToggleContent {
948
+ /** `true` if toggle data exists */
949
+ readonly hasContent: ComputedRef<boolean>;
950
+ /** The toggle state: `true` if enabled, `false` if disabled */
951
+ readonly value: ComputedRef<boolean | undefined>;
606
952
  }
607
- interface CategorySelectorContentEditor {
608
- readonly type: 'CATEGORY_SELECTOR';
609
- readonly label?: string;
610
- defaults?: CategorySelectorContentEditorDefaults;
953
+ /**
954
+ * Raw toggle data from the editor.
955
+ */
956
+ interface ToggleContentData {
957
+ /** Whether the toggle is enabled */
958
+ readonly enabled: boolean;
611
959
  }
612
- type ContentEditor = TextareaContentEditor | InputboxContentEditor | ButtonContentEditor | ImageContentEditor | ToggleContentEditor | SelectboxContentEditor | DeckContentEditor | MenuContentEditor | NavigationMenuContentEditor | LogoContentEditor | ProductSelectorContentEditor | CategorySelectorContentEditor;
613
960
 
614
961
  interface InputboxContentEditorDefaults {
615
962
  readonly text: string;
@@ -632,7 +979,7 @@ interface ImageContentEditorDefaults {
632
979
  };
633
980
  }
634
981
  interface LogoContentEditorDefaults {
635
- readonly type: LogoType$1;
982
+ readonly type: LogoType;
636
983
  readonly text?: string;
637
984
  }
638
985
  interface ProductSelectorContentEditorDefaults {
@@ -642,70 +989,78 @@ interface CategorySelectorContentEditorDefaults {
642
989
  readonly maxCategories: number;
643
990
  }
644
991
 
645
- interface ButtonContentData {
646
- readonly title: string;
647
- readonly type: ButtonTypeEnum;
648
- readonly link?: string;
649
- readonly email?: string;
650
- readonly phone?: string;
651
- readonly tileId?: string;
652
- readonly pageId?: string;
653
- readonly pageUrl?: string;
992
+ interface InputboxContentEditor {
993
+ readonly type: 'INPUTBOX';
994
+ readonly label: string;
995
+ readonly placeholder: string;
996
+ defaults?: InputboxContentEditorDefaults;
654
997
  }
655
-
656
- interface Card {
657
- title: string;
658
- settings: ContentSettings;
998
+ interface TextareaContentEditor {
999
+ readonly type: 'TEXTAREA';
1000
+ readonly label: string;
1001
+ readonly placeholder: string;
1002
+ defaults?: TextareaContentEditorDefaults;
659
1003
  }
660
- interface DeckContent {
661
- readonly hasContent: ComputedRef<boolean>;
662
- readonly cards: ComputedRef<ReadonlyArray<Card> | undefined>;
663
- readonly getReactiveRef: typeof getReactiveRef;
1004
+ interface ButtonContentEditor {
1005
+ readonly type: 'BUTTON';
1006
+ readonly label: string;
664
1007
  }
665
-
666
- interface ToggleContentData {
667
- readonly enabled: boolean;
1008
+ interface ImageContentEditor {
1009
+ readonly type: 'IMAGE';
1010
+ readonly label: string;
1011
+ readonly static?: boolean;
1012
+ defaults?: ImageContentEditorDefaults;
668
1013
  }
669
-
670
- interface ActionLink {
671
- id: string;
672
- title?: string;
673
- type?: string;
674
- link?: string;
675
- email?: string;
676
- phone?: string;
677
- tileIdForScroll?: string;
678
- pageIdForNavigate?: string;
679
- showStoreCategories?: boolean;
680
- isSubmenuOpened?: boolean;
681
- categoryId?: number;
682
- performAction?: () => void;
1014
+ interface ToggleContentEditor {
1015
+ readonly type: 'TOGGLE';
1016
+ readonly label: string;
1017
+ readonly description?: string;
683
1018
  }
684
-
685
- interface MenuContent {
686
- readonly hasContent: ComputedRef<boolean>;
687
- readonly items: ComputedRef<ActionLink[]>;
1019
+ interface SelectboxContentOption {
1020
+ readonly value: string;
1021
+ readonly label: string;
688
1022
  }
689
- interface MenuContentData {
690
- readonly items: ReadonlyArray<ActionLink>;
1023
+ interface SelectboxContentEditor {
1024
+ readonly type: 'SELECTBOX';
1025
+ readonly label: string;
1026
+ readonly placeholder: string;
1027
+ readonly description?: string;
1028
+ readonly options: ReadonlyArray<SelectboxContentOption>;
691
1029
  }
692
-
693
- type LogoType$1 = 'TEXT' | 'IMAGE';
694
- interface LogoContent {
695
- readonly type: ComputedRef<LogoType$1 | undefined>;
696
- readonly text: ComputedRef<string | undefined>;
697
- readonly image: ComputedRef<{
698
- lowResolutionMobileImage: string | undefined;
699
- highResolutionMobileImage: string | undefined;
700
- lowResolutionDesktopImage: string | undefined;
701
- highResolutionDesktopImage: string | undefined;
702
- } | undefined>;
1030
+ interface DeckContentEditor {
1031
+ readonly type: 'DECK';
1032
+ readonly label: string;
1033
+ readonly addButtonLabel: string;
1034
+ readonly maxCards: number;
1035
+ readonly cards: {
1036
+ [key: string]: {
1037
+ label: string;
1038
+ settings: ContentSettings;
1039
+ };
1040
+ };
703
1041
  }
704
- interface LogoContentData {
705
- readonly type: LogoType$1;
706
- readonly text: string;
707
- readonly image: ImageContentData;
1042
+ interface MenuContentEditor {
1043
+ readonly type: 'MENU';
1044
+ readonly label?: string;
1045
+ }
1046
+ interface NavigationMenuContentEditor {
1047
+ readonly type: 'NAVIGATION_MENU';
1048
+ }
1049
+ interface LogoContentEditor {
1050
+ readonly type: 'LOGO';
1051
+ readonly label?: string;
1052
+ }
1053
+ interface ProductSelectorContentEditor {
1054
+ readonly type: 'PRODUCT_SELECTOR';
1055
+ readonly label?: string;
1056
+ defaults?: ProductSelectorContentEditorDefaults;
1057
+ }
1058
+ interface CategorySelectorContentEditor {
1059
+ readonly type: 'CATEGORY_SELECTOR';
1060
+ readonly label?: string;
1061
+ defaults?: CategorySelectorContentEditorDefaults;
708
1062
  }
1063
+ type ContentEditor = TextareaContentEditor | InputboxContentEditor | ButtonContentEditor | ImageContentEditor | ToggleContentEditor | SelectboxContentEditor | DeckContentEditor | MenuContentEditor | NavigationMenuContentEditor | LogoContentEditor | ProductSelectorContentEditor | CategorySelectorContentEditor;
709
1064
 
710
1065
  type ContentSettings = Record<string, ContentEditor>;
711
1066
  type MandatoryContentSettings = {
@@ -812,7 +1167,7 @@ interface TextDesignEditorDefaultsTransformed {
812
1167
  readonly size?: TextSize | string;
813
1168
  }
814
1169
  interface ImageDesignEditorDefaultsTransformed {
815
- readonly overlay: Overlay$1;
1170
+ readonly overlay: Overlay;
816
1171
  }
817
1172
  interface ColorPickerDesignEditorDefaultsTransformed {
818
1173
  readonly color?: Color$1;
@@ -826,7 +1181,7 @@ interface ButtonDesignEditorDefaultsTransformed {
826
1181
  readonly visible?: boolean;
827
1182
  }
828
1183
  interface BackgroundDesignEditorDefaultsTransformed {
829
- readonly background: Background$1;
1184
+ readonly background: Background;
830
1185
  }
831
1186
  interface LogoDesignEditorDefaultsTransformed {
832
1187
  readonly font?: Font;
@@ -836,85 +1191,245 @@ interface LogoDesignEditorDefaultsTransformed {
836
1191
  }
837
1192
  type DesignEditorDefaultsTransformed = TextDesignEditorDefaultsTransformed | ButtonDesignEditorDefaultsTransformed | ImageDesignEditorDefaultsTransformed | BackgroundDesignEditorDefaultsTransformed | ColorPickerDesignEditorDefaultsTransformed | LogoDesignEditorDefaultsTransformed;
838
1193
 
1194
+ /** Background type: solid color or gradient */
839
1195
  type BackgroundType = 'solid' | 'gradient';
1196
+ /**
1197
+ * Solid color configuration.
1198
+ *
1199
+ * @see {@link Background}
1200
+ */
840
1201
  interface SolidColor {
1202
+ /** The solid color value */
841
1203
  color: Color$1 | undefined;
842
1204
  }
1205
+ /**
1206
+ * Gradient color configuration.
1207
+ *
1208
+ * @see {@link Background}
1209
+ */
843
1210
  interface GradientColor {
1211
+ /** Gradient start color */
844
1212
  fromColor: Color$1 | undefined;
1213
+ /** Gradient end color */
845
1214
  toColor: Color$1 | undefined;
846
1215
  }
847
- interface Background$1 {
1216
+ /**
1217
+ * Background configuration with solid or gradient options.
1218
+ *
1219
+ * @see {@link BackgroundDesignData}
1220
+ * @see {@link BackgroundType}
1221
+ */
1222
+ interface Background {
1223
+ /** Background type: 'solid' or 'gradient' */
848
1224
  type: BackgroundType | undefined;
1225
+ /** Solid color configuration */
849
1226
  solid: SolidColor | undefined;
1227
+ /** Gradient color configuration */
850
1228
  gradient: GradientColor | undefined;
851
1229
  }
852
- interface BackgroundDesignData {
853
- background: Background$1 | undefined;
1230
+ /**
1231
+ * Return type for `useBackgroundElementDesign` composable.
1232
+ *
1233
+ * Provides background styling options from the design settings.
1234
+ *
1235
+ * @see {@link useBackgroundElementDesign}
1236
+ * @see {@link Background}
1237
+ */
1238
+ interface BackgroundDesignData$1 {
1239
+ /** Background configuration */
1240
+ background: Background | undefined;
854
1241
  }
855
1242
 
856
- type ButtonAppearance$1 = 'solid-button' | 'outline-button' | 'text-link';
857
- type ButtonSize$1 = 'small' | 'medium' | 'large';
858
- type ButtonStyle$1 = 'round-corner' | 'rectangle' | 'pill';
1243
+ /** Button fill style */
1244
+ type ButtonAppearance = 'solid-button' | 'outline-button' | 'text-link';
1245
+ /** Button size */
1246
+ type ButtonSize = 'small' | 'medium' | 'large';
1247
+ /** Button shape/corner style */
1248
+ type ButtonStyle = 'round-corner' | 'rectangle' | 'pill';
1249
+ /**
1250
+ * Return type for `useButtonElementDesign` composable.
1251
+ *
1252
+ * Provides button styling options from the design settings.
1253
+ *
1254
+ * @see {@link useButtonElementDesign}
1255
+ * @see {@link ButtonAppearance}
1256
+ * @see {@link ButtonSize}
1257
+ * @see {@link ButtonStyle}
1258
+ */
859
1259
  interface ButtonDesignData {
860
- appearance: ButtonAppearance$1 | undefined;
1260
+ /** Button fill style: 'solid-button', 'outline-button', or 'text-link' */
1261
+ appearance: ButtonAppearance | undefined;
1262
+ /** Font family name */
861
1263
  font: string | GlobalFontsString | undefined;
862
- size: ButtonSize$1 | undefined;
863
- style: ButtonStyle$1 | undefined;
864
- color: Color$1 | GlobalColorsString$1 | undefined;
865
- visible: boolean;
1264
+ /** Button size: 'small', 'medium', or 'large' */
1265
+ size: ButtonSize | undefined;
1266
+ /** Button shape: 'round-corner', 'rectangle', or 'pill' */
1267
+ style: ButtonStyle | undefined;
1268
+ /** Button color */
1269
+ color: Color | GlobalColorsString | undefined;
1270
+ /** `true` if button should be displayed */
1271
+ visible?: boolean;
866
1272
  }
867
1273
 
1274
+ /** Overlay type: solid color, gradient, or none */
868
1275
  type OverlayType = 'solid' | 'gradient' | 'none';
869
- interface Overlay$1 {
1276
+ /**
1277
+ * Image overlay configuration.
1278
+ *
1279
+ * Used to add color or gradient overlay on top of images.
1280
+ *
1281
+ * @see {@link ImageDesignData}
1282
+ * @see {@link OverlayType}
1283
+ */
1284
+ interface Overlay {
1285
+ /** Overlay type: 'solid', 'gradient', or 'none' */
870
1286
  type: OverlayType | undefined;
1287
+ /** Solid color overlay (with alpha for transparency) */
871
1288
  solid: SolidColor | undefined;
1289
+ /** Gradient overlay */
872
1290
  gradient: GradientColor | undefined;
873
1291
  }
874
- interface ImageDesignData {
875
- overlay: Overlay$1 | undefined;
876
- visible: boolean;
1292
+ /**
1293
+ * Return type for `useImageElementDesign` composable.
1294
+ *
1295
+ * Provides image overlay styling options from the design settings.
1296
+ *
1297
+ * @see {@link useImageElementDesign}
1298
+ * @see {@link Overlay}
1299
+ */
1300
+ interface ImageDesignData$1 {
1301
+ /** Overlay configuration */
1302
+ overlay: Overlay | undefined;
1303
+ /** `true` if image should be displayed */
1304
+ visible?: boolean;
877
1305
  }
878
1306
 
879
- interface TextDesignData {
1307
+ /**
1308
+ * Return type for `useTextElementDesign` composable.
1309
+ *
1310
+ * Provides text styling options from the design settings.
1311
+ * Supports global design references (e.g., 'global.fontFamily.title').
1312
+ *
1313
+ * @see {@link useTextElementDesign}
1314
+ * @see {@link GlobalFontsString}
1315
+ * @see {@link GlobalTextSizeString}
1316
+ */
1317
+ interface TextDesignData$1 {
1318
+ /** Font family name (can be global reference) */
880
1319
  font: string | GlobalFontsString | undefined;
881
- size: number | GlobalTextSizeString$1 | undefined;
1320
+ /** Font size in pixels (can be global reference) */
1321
+ size: number | GlobalTextSizeString | undefined;
1322
+ /** `true` if text should be bold */
882
1323
  bold: boolean | undefined;
1324
+ /** `true` if text should be italic */
883
1325
  italic: boolean | undefined;
1326
+ /** Text color */
884
1327
  color: Color$1 | undefined;
885
- visible: boolean;
1328
+ /** `true` if element should be displayed */
1329
+ visible?: boolean;
886
1330
  }
887
- interface TextareaDesignData extends TextDesignData {
1331
+ /**
1332
+ * Return type for `useTextareaElementDesign` composable.
1333
+ *
1334
+ * Extends TextDesignData with whiteSpace for preserving line breaks.
1335
+ *
1336
+ * @see {@link useTextareaElementDesign}
1337
+ * @see {@link TextDesignData}
1338
+ */
1339
+ interface TextareaDesignData$1 extends TextDesignData$1 {
1340
+ /** Always 'pre-wrap' to preserve line breaks */
888
1341
  readonly whiteSpace: string;
889
1342
  }
890
1343
 
1344
+ /**
1345
+ * Return type for `useToggleElementDesign` composable.
1346
+ *
1347
+ * Provides toggle state from the design settings.
1348
+ *
1349
+ * @see {@link useToggleElementDesign}
1350
+ */
891
1351
  interface ToggleDesignData {
1352
+ /** `true` if the toggle is enabled */
892
1353
  enabled: boolean | undefined;
893
1354
  }
894
1355
 
1356
+ /**
1357
+ * Return type for `useSelectboxElementDesign` composable.
1358
+ *
1359
+ * Provides selected value from the design settings.
1360
+ *
1361
+ * @see {@link useSelectboxElementDesign}
1362
+ */
895
1363
  interface SelectboxDesignData {
1364
+ /** The selected option value */
896
1365
  value: string | undefined;
897
1366
  }
898
1367
 
1368
+ /**
1369
+ * Return type for `useLayoutElementDesign` composable.
1370
+ *
1371
+ * Provides layout identifier from the design settings.
1372
+ * Used for sections with multiple layout variants.
1373
+ *
1374
+ * @see {@link useLayoutElementDesign}
1375
+ */
899
1376
  interface LayoutDesignData {
1377
+ /** Layout identifier string (e.g., 'default', 'compact', 'wide') */
900
1378
  layout: string | undefined;
901
1379
  }
902
1380
 
1381
+ /**
1382
+ * Return type for `useLogoElementDesign` composable.
1383
+ *
1384
+ * Provides logo styling options from the design settings.
1385
+ * Includes text styling and logo-specific options like spacing and capitalization.
1386
+ *
1387
+ * @see {@link useLogoElementDesign}
1388
+ * @see {@link CapitalizationType}
1389
+ * @see {@link TransformedFrame}
1390
+ */
903
1391
  interface LogoDesignData$1 {
1392
+ /** Font family name */
904
1393
  font: string | undefined;
1394
+ /** Font size in pixels */
905
1395
  size: number | undefined;
1396
+ /** `true` if text should be bold */
906
1397
  bold: boolean | undefined;
1398
+ /** `true` if text should be italic */
907
1399
  italic: boolean | undefined;
1400
+ /** Text/logo color */
908
1401
  color: Color$1 | undefined;
1402
+ /** `true` if logo should be displayed */
909
1403
  visible: boolean | undefined;
1404
+ /** Letter spacing value */
910
1405
  spacing: number | undefined;
1406
+ /** Text transform: 'none', 'all' (uppercase), or 'small' (capitalize) */
911
1407
  capitalization: CapitalizationType | undefined;
1408
+ /** Logo frame/border style */
912
1409
  frame: TransformedFrame | undefined;
913
1410
  }
914
1411
 
915
1412
  type DesignSettings = Record<string, DesignEditor>;
916
1413
  type MandatoryDesignSettings = Record<'logo', LogoDesignEditor> | Record<string, never>;
917
1414
 
1415
+ interface LayoutDesignOverride {
1416
+ readonly fieldName: string;
1417
+ readonly type: DesignEditor['type'];
1418
+ defaults?: DesignEditorDefaults & {
1419
+ type?: DesignEditor['type'];
1420
+ };
1421
+ }
1422
+ interface LayoutSettings {
1423
+ readonly layoutId: string;
1424
+ readonly layoutIcon: unknown;
1425
+ readonly selectedContentSettings: string[];
1426
+ readonly selectedDesignSettings: LayoutDesignOverride[];
1427
+ }
1428
+
1429
+ interface StorePageConfiguration {
1430
+ readonly sections: [TemplateStorefrontSection];
1431
+ }
1432
+
918
1433
  interface MenuItem {
919
1434
  readonly id: string;
920
1435
  readonly title?: string;
@@ -946,7 +1461,7 @@ interface ShowcaseDeckContentEditorDefaults {
946
1461
  }
947
1462
  interface ShowcaseLogoContentEditorDefaults {
948
1463
  readonly type: 'LOGO';
949
- readonly logoType?: LogoType$1;
1464
+ readonly logoType?: LogoType;
950
1465
  readonly text?: string;
951
1466
  readonly imageData?: ImageContentEditorDefaults;
952
1467
  }
@@ -973,34 +1488,66 @@ interface Showcase {
973
1488
  }
974
1489
  type ShowcaseOverride = Omit<Showcase, 'showcaseId' | 'previewImage'>;
975
1490
 
976
- type Digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
977
- type ThreeDigits = `${Digit}${Digit}${Digit}`;
978
- type DefaultSectionBase = 'header' | 'cover' | 'announcement_bar' | 'slider' | 'special_offer' | 'customer_review' | 'company_info' | 'shipping_payment' | 'location' | 'store' | 'footer' | 'video' | 'image_gallery' | 'contact_info' | 'contacts_widget_whatsapp' | 'contacts_widget_instagram' | 'contacts_widget_facebook' | 'contacts_widget_phone';
979
- type DefaultSectionId = DefaultSectionBase | `${DefaultSectionBase}_${ThreeDigits}`;
980
- interface TemplateDefaultSection {
981
- readonly type: 'default';
982
- readonly id: DefaultSectionId;
983
- }
984
- interface TemplateCustomSection {
985
- readonly type: 'custom';
986
- readonly id: string;
987
- readonly showcase_id?: string;
988
- readonly showcase_overrides?: ShowcaseOverride;
989
- readonly content?: ContentSettings;
990
- readonly design?: DesignSettings;
991
- }
992
- interface TemplateStorefrontSection {
993
- /** Section layout identifier. When not provided, the section will use the default layout. */
994
- readonly id?: string;
995
- readonly type: 'store';
1491
+ interface TemplateSettings {
1492
+ readonly metadata: TemplateMetadata;
1493
+ readonly sections: TemplateSection[];
996
1494
  }
997
- type TemplateSection = TemplateDefaultSection | TemplateCustomSection | TemplateStorefrontSection;
998
1495
 
999
- interface TemplatePage {
1000
- id: string;
1001
- type: TemplatePageEnum;
1496
+ declare const TemplateCategoriesList: {
1497
+ readonly apparel_footwear: "apparel_footwear";
1498
+ readonly vape_smoke: "vape_smoke";
1499
+ readonly home_garden: "home_garden";
1500
+ readonly sport_outdoor: "sport_outdoor";
1501
+ readonly jewelry_accessories: "jewelry_accessories";
1502
+ readonly pet_animals: "pet_animals";
1503
+ readonly bikes: "bikes";
1504
+ readonly health_beauty: "health_beauty";
1505
+ readonly gift_shop: "gift_shop";
1506
+ readonly electronics: "electronics";
1507
+ readonly other: "other";
1508
+ };
1509
+ type TemplateCategory = typeof TemplateCategoriesList[keyof typeof TemplateCategoriesList];
1510
+
1511
+ interface TemplateMetadata {
1512
+ readonly name: string;
1513
+ readonly description?: string;
1514
+ readonly preview_url?: string;
1515
+ readonly cover_image?: ImageContentData;
1516
+ readonly categories?: TemplateCategory[];
1517
+ }
1518
+
1519
+ type Digit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
1520
+ type ThreeDigits = `${Digit}${Digit}${Digit}`;
1521
+ type DefaultSectionBase = 'header' | 'cover' | 'announcement_bar' | 'slider' | 'special_offer' | 'customer_review' | 'company_info' | 'shipping_payment' | 'location' | 'store' | 'footer' | 'video' | 'image_gallery' | 'contact_info' | 'contacts_widget_whatsapp' | 'contacts_widget_instagram' | 'contacts_widget_facebook' | 'contacts_widget_phone';
1522
+ type DefaultSectionId = DefaultSectionBase | `${DefaultSectionBase}_${ThreeDigits}`;
1523
+ interface TemplateDefaultSection {
1524
+ readonly type: 'default';
1525
+ readonly id: DefaultSectionId;
1526
+ }
1527
+ interface TemplateCustomSection {
1528
+ readonly type: 'custom';
1529
+ readonly id: string;
1530
+ readonly showcase_id?: string;
1531
+ readonly showcase_overrides?: ShowcaseOverride;
1532
+ readonly content?: ContentSettings;
1533
+ readonly design?: DesignSettings;
1534
+ }
1535
+ interface TemplateStorefrontSection {
1536
+ /** Section layout identifier. When not provided, the section will use the default layout. */
1537
+ readonly id?: string;
1538
+ readonly type: 'store';
1539
+ }
1540
+ type TemplateSection = TemplateDefaultSection | TemplateCustomSection | TemplateStorefrontSection;
1541
+
1542
+ interface TemplatePage {
1543
+ id: string;
1544
+ type: TemplatePageEnum;
1545
+ readonly metadata?: CustomPageMetadata;
1002
1546
  readonly sections: TemplateSection[];
1003
1547
  }
1548
+ interface CustomPageMetadata {
1549
+ title: string;
1550
+ }
1004
1551
 
1005
1552
  interface TemplateConfiguration {
1006
1553
  metadata: TemplateMetadata;
@@ -1015,26 +1562,30 @@ interface TemplateMultiPageConfiguration extends TemplateConfiguration {
1015
1562
  }
1016
1563
  type TemplateConfigurationType = TemplateSinglePageConfiguration | TemplateMultiPageConfiguration | TemplatePage;
1017
1564
 
1018
- interface StorePageConfiguration {
1019
- readonly sections: [TemplateStorefrontSection];
1020
- }
1021
-
1022
- interface LayoutDesignOverride {
1023
- readonly fieldName: string;
1024
- readonly type: DesignEditor['type'];
1025
- defaults?: DesignEditorDefaults & {
1026
- type?: DesignEditor['type'];
1027
- };
1028
- }
1029
- interface LayoutSettings {
1030
- readonly layoutId: string;
1031
- readonly layoutIcon: unknown;
1032
- readonly selectedContentSettings: string[];
1033
- readonly selectedDesignSettings: LayoutDesignOverride[];
1034
- }
1035
-
1036
1565
  type TranslationSettings = Record<string, Record<string, string>>;
1037
1566
 
1567
+ declare const CatalogLayoutSlot: {
1568
+ readonly PRODUCT_LIST: "CONTROLS";
1569
+ readonly BOTTOM_BAR: "FOOTER";
1570
+ readonly CUSTOM_SLOT: "CUSTOM_SLOT";
1571
+ };
1572
+ declare const CategoryLayoutSlot: {
1573
+ readonly CATEGORY_TITLE: "MAIN_TITLE";
1574
+ readonly PRODUCT_LIST: "CONTROLS";
1575
+ readonly BOTTOM_BAR: "FOOTER";
1576
+ readonly CUSTOM_SLOT: "CUSTOM_SLOT";
1577
+ };
1578
+ declare const ProductLayoutSlot: {
1579
+ readonly TOP_BAR: "TOP_BAR";
1580
+ readonly GALLERY: "GALLERY";
1581
+ readonly SIDEBAR: "SIDEBAR";
1582
+ readonly DESCRIPTION: "DESCRIPTION";
1583
+ readonly REVIEW_LIST: "REVIEW_LIST";
1584
+ readonly RELATED_PRODUCTS: "RELATED_PRODUCTS";
1585
+ readonly BOTTOM_BAR: "FOOTER";
1586
+ readonly CUSTOM_SLOT: "CUSTOM_SLOT";
1587
+ };
1588
+
1038
1589
  interface AppBaseContext {
1039
1590
  readonly appName: string;
1040
1591
  readonly blockName: string;
@@ -1131,6 +1682,7 @@ interface InstantsiteJSAPI {
1131
1682
  openSearchPage: (keyword: string | undefined) => void;
1132
1683
  }
1133
1684
 
1685
+ /** Composable for Instantsite JS API. Returns `window.instantsite` for platform interaction. */
1134
1686
  declare function useInstantsiteJsApi(): InstantsiteJSAPI | undefined;
1135
1687
 
1136
1688
  interface GlobalColors {
@@ -1160,6 +1712,7 @@ interface GlobalLayout {
1160
1712
  tileMargin: number;
1161
1713
  appearanceEffect: AppearanceEffectType;
1162
1714
  }
1715
+ /** Global design settings from site theme. Referenced via 'global.xxx' syntax. */
1163
1716
  interface GlobalDesign {
1164
1717
  color?: GlobalColors;
1165
1718
  fontFamily?: GlobalFonts;
@@ -1197,27 +1750,861 @@ declare function createVueServerApp<C, D>(appComponent: Component, extensions?:
1197
1750
  };
1198
1751
  };
1199
1752
 
1200
- declare const CatalogLayoutSlot: {
1201
- readonly PRODUCT_LIST: "CONTROLS";
1202
- readonly BOTTOM_BAR: "FOOTER";
1203
- readonly CUSTOM_SLOT: "CUSTOM_SLOT";
1204
- };
1205
- declare const CategoryLayoutSlot: {
1206
- readonly CATEGORY_TITLE: "MAIN_TITLE";
1207
- readonly PRODUCT_LIST: "CONTROLS";
1208
- readonly BOTTOM_BAR: "FOOTER";
1209
- readonly CUSTOM_SLOT: "CUSTOM_SLOT";
1753
+ /**
1754
+ * Composable for accessing BUTTON content with action link.
1755
+ *
1756
+ * Used for CTA buttons, links, and navigation elements defined in `settings/content.ts`.
1757
+ * Supports various action types: hyperlinks, email, phone, scroll to section, page navigation.
1758
+ *
1759
+ * @template CONTENT - The content type from `type.ts`
1760
+ * @param elementName - The name of the element in content settings
1761
+ * @param externalContent - Optional external content (used internally for DECK cards)
1762
+ *
1763
+ * @returns `Reactive<ButtonContentData>` — reactive object with:
1764
+ * - `title: ComputedRef<string>` — button text label
1765
+ * - `type: ComputedRef<ButtonTypeEnum>` — action type
1766
+ * - `link: ComputedRef<string | undefined>` — URL for hyperlinks
1767
+ * - `email: ComputedRef<string | undefined>` — email address for mail links
1768
+ * - `phone: ComputedRef<string | undefined>` — phone number for tel links
1769
+ * - `tileDivId: ComputedRef<string | null>` — tile div ID for scroll-to-tile action
1770
+ * - `pageId: ComputedRef<string | undefined>` — page ID for navigation
1771
+ * - `pageUrl: ComputedRef<string | undefined>` — page URL for navigation
1772
+ * - `hasTitle: ComputedRef<boolean>` — `true` if button has text
1773
+ * - `hasLink: ComputedRef<boolean>` — `true` if button has a link
1774
+ * - `performAction: () => void` — triggers the button action (navigation, scroll, etc.)
1775
+ *
1776
+ * @see {@link ButtonContentData}
1777
+ * @see {@link ButtonTypeEnum}
1778
+ *
1779
+ * @example
1780
+ * ```typescript
1781
+ * // settings/content.ts
1782
+ * const content = {
1783
+ * cta_button: { type: 'BUTTON', label: '$label.cta_button' },
1784
+ * };
1785
+ *
1786
+ * // Section.vue
1787
+ * const ctaButton = useButtonElementContent<ContentType>('cta_button');
1788
+ *
1789
+ * // Template
1790
+ * <button v-if="ctaButton.hasTitle" @click="ctaButton.performAction">
1791
+ * {{ ctaButton.title }}
1792
+ * </button>
1793
+ * ```
1794
+ */
1795
+ declare function useButtonElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): Reactive<Partial<ButtonContentData>>;
1796
+
1797
+ /**
1798
+ * Composable for accessing CATEGORY_SELECTOR content.
1799
+ *
1800
+ * Used for displaying store categories selected by the user in the editor.
1801
+ * Supports both manual selection and root category selection modes.
1802
+ *
1803
+ * @template CONTENT - The content type from `type.ts`
1804
+ * @param elementName - The name of the element in content settings
1805
+ *
1806
+ * @param externalContent
1807
+ * @param externalStoreData
1808
+ * @returns `Reactive<CategorySelector>` — reactive object with:
1809
+ * - `categories: ComputedRef<CategoryListComponentItem[]>` — array of category objects with `id`, `name`, `url`, `imageUrl`, etc.
1810
+ * - `categoryIds: ComputedRef<Array<number>>` — array of selected category IDs
1811
+ * - `hasContent: ComputedRef<boolean>` — `true` if selector data exists
1812
+ * - `hasCategories: ComputedRef<boolean>` — `true` if at least one category is selected
1813
+ *
1814
+ * @see {@link CategorySelectorContent}
1815
+ * @see {@link CategorySelectorData} — raw data type from editor
1816
+ *
1817
+ * @example
1818
+ * ```typescript
1819
+ * // settings/content.ts
1820
+ * const content = {
1821
+ * shop_categories: {
1822
+ * type: 'CATEGORY_SELECTOR',
1823
+ * label: '$label.categories',
1824
+ * defaults: { maxCategories: 6 },
1825
+ * },
1826
+ * };
1827
+ *
1828
+ * // Section.vue
1829
+ * const categories = useCategorySelectorElementContent<ContentType>('shop_categories');
1830
+ *
1831
+ * // Template
1832
+ * <div v-if="categories.hasCategories" class="category-grid">
1833
+ * <a v-for="cat in categories.categories" :key="cat.id" :href="cat.url">
1834
+ * <img :src="cat.imageUrl" :alt="cat.name" />
1835
+ * <span>{{ cat.name }}</span>
1836
+ * </a>
1837
+ * </div>
1838
+ * ```
1839
+ */
1840
+ declare function useCategorySelectorElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>, externalStoreData?: StoreData): Reactive<CategorySelectorContent>;
1841
+
1842
+ /**
1843
+ * Composable for accessing IMAGE content with multiple resolutions.
1844
+ *
1845
+ * Used for background images, hero images, and media defined in `settings/content.ts`.
1846
+ * Provides URLs for different screen sizes and resolutions (mobile/desktop, low/high res).
1847
+ *
1848
+ * @template CONTENT - The content type from `type.ts`
1849
+ * @param elementName - The name of the element in content settings
1850
+ * @param externalContent - Optional external content (used internally for DECK cards)
1851
+ *
1852
+ * @returns `Reactive<ImageContent>` — reactive object with:
1853
+ * - `hasContent: ComputedRef<boolean>` — `true` if an image is uploaded
1854
+ * - `lowResolutionMobileImage: ComputedRef<string | undefined>` — URL for mobile placeholder (100x200)
1855
+ * - `highResolutionMobileImage: ComputedRef<string | undefined>` — URL for mobile full quality (1000x2000)
1856
+ * - `lowResolutionDesktopImage: ComputedRef<string | undefined>` — URL for desktop placeholder (200x200)
1857
+ * - `highResolutionDesktopImage: ComputedRef<string | undefined>` — URL for desktop full quality (2000x2000)
1858
+ *
1859
+ * @see {@link ImageContent}
1860
+ * @see {@link ImageContentData} — raw data type from editor
1861
+ * @see {@link ImageBorderInfoData} — border info data
1862
+ * @see {@link ImageInfoData} — image info data
1863
+ *
1864
+ * @example
1865
+ * ```typescript
1866
+ * // settings/content.ts
1867
+ * const content = {
1868
+ * background_image: { type: 'IMAGE', label: '$label.background_image' },
1869
+ * };
1870
+ *
1871
+ * // Section.vue
1872
+ * const bgImage = useImageElementContent<ContentType>('background_image');
1873
+ *
1874
+ * // Template with responsive images
1875
+ * <picture v-if="bgImage.hasContent">
1876
+ * <source media="(max-width: 700px)" :srcset="bgImage.highResolutionMobileImage" />
1877
+ * <img :src="bgImage.highResolutionDesktopImage" alt="Background" />
1878
+ * </picture>
1879
+ * ```
1880
+ */
1881
+ declare function useImageElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): Reactive<ImageContent>;
1882
+
1883
+ /**
1884
+ * Composable for accessing INPUTBOX content (single-line text).
1885
+ *
1886
+ * Used for titles, labels, and short text fields defined in `settings/content.ts`.
1887
+ *
1888
+ * @template CONTENT - The content type from `type.ts`
1889
+ * @param elementName - The name of the element in content settings
1890
+ * @param externalContent - Optional external content (used internally for DECK cards)
1891
+ *
1892
+ * @returns `Reactive<InputBoxContent>` — reactive object with:
1893
+ * - `hasContent: ComputedRef<boolean>` — `true` if the field has non-empty text
1894
+ * - `value: ComputedRef<string | undefined>` — the text string
1895
+ *
1896
+ * @see {@link InputBoxContent}
1897
+ *
1898
+ * @example
1899
+ * ```typescript
1900
+ * // settings/content.ts
1901
+ * const content = {
1902
+ * title: { type: 'INPUTBOX', label: '$label.title', placeholder: '$label.placeholder' },
1903
+ * };
1904
+ *
1905
+ * // Section.vue
1906
+ * const title = useInputboxElementContent<ContentType>('title');
1907
+ *
1908
+ * // Template
1909
+ * <h1 v-if="title.hasContent">{{ title.value }}</h1>
1910
+ * ```
1911
+ */
1912
+ declare function useInputboxElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): Reactive<InputBoxContent>;
1913
+
1914
+ /**
1915
+ * Composable for accessing LOGO content in headers/footers.
1916
+ *
1917
+ * Used for site logo display. The logo can be either text-based or image-based,
1918
+ * determined by the `type` field.
1919
+ *
1920
+ * @template CONTENT - The content type from `type.ts`
1921
+ *
1922
+ * @returns `Reactive<LogoContent>` — reactive object with:
1923
+ * - `type: ComputedRef<LogoType | undefined>` — logo type: 'TEXT' or 'IMAGE'
1924
+ * - `text: ComputedRef<string | undefined>` — text content (when type is 'TEXT')
1925
+ * - `image: ComputedRef<{...} | undefined>` — image URLs object (when type is 'IMAGE'):
1926
+ * - `lowResolutionMobileImage: string | undefined` — mobile placeholder URL
1927
+ * - `highResolutionMobileImage: string | undefined` — mobile full quality URL
1928
+ * - `lowResolutionDesktopImage: string | undefined` — desktop placeholder URL
1929
+ * - `highResolutionDesktopImage: string | undefined` — desktop full quality URL
1930
+ *
1931
+ * @see {@link LogoContent}
1932
+ * @see {@link LogoContentData} — raw data type from editor
1933
+ * @see {@link LogoType} — 'TEXT' | 'IMAGE'
1934
+ *
1935
+ * @example
1936
+ * ```typescript
1937
+ * // Header.vue
1938
+ * const logo = useLogoElementContent<ContentType>();
1939
+ *
1940
+ * // Template
1941
+ * <div class="logo">
1942
+ * <template v-if="logo.type === 'TEXT'">
1943
+ * <span>{{ logo.text }}</span>
1944
+ * </template>
1945
+ * <template v-else>
1946
+ * <img :src="logo.image.highResolutionDesktopImage" alt="Logo" />
1947
+ * </template>
1948
+ * </div>
1949
+ * ```
1950
+ */
1951
+ declare function useLogoElementContent<CONTENT>(): Reactive<LogoContent>;
1952
+
1953
+ /**
1954
+ * Composable for accessing MENU content.
1955
+ *
1956
+ * Used for navigation menus with action links. Each menu item has a `performAction`
1957
+ * method that triggers navigation.
1958
+ *
1959
+ * @template CONTENT - The content type from `type.ts`
1960
+ * @param elementName - The name of the menu element in content settings
1961
+ *
1962
+ * @returns `Reactive<MenuContent>` — reactive object with:
1963
+ * - `hasContent: ComputedRef<boolean>` — `true` if menu data exists
1964
+ * - `items: ComputedRef<ActionLink[]>` — array of menu items, each with:
1965
+ * - `title: string` — menu item text
1966
+ * - `type: string` — action type
1967
+ * - `link: string` — URL (for hyperlinks)
1968
+ * - `performAction: () => void` — triggers navigation
1969
+ *
1970
+ * @see {@link MenuContent}
1971
+ * @see {@link MenuContentData} — raw data type from editor
1972
+ * @see {@link ActionLink} — menu item type
1973
+ *
1974
+ * @example
1975
+ * ```typescript
1976
+ * // Section.vue
1977
+ * const menu = useMenuElementContent<ContentType>('navigation');
1978
+ *
1979
+ * // Template
1980
+ * <nav v-if="menu.hasContent">
1981
+ * <a v-for="item in menu.items" :key="item.title" @click="item.performAction">
1982
+ * {{ item.title }}
1983
+ * </a>
1984
+ * </nav>
1985
+ * ```
1986
+ */
1987
+ declare function useMenuElementContent<CONTENT>(elementName: keyof CONTENT): Reactive<MenuContent>;
1988
+
1989
+ /**
1990
+ * Composable for accessing NAVIGATION_MENU content in headers/footers.
1991
+ *
1992
+ * A convenience wrapper around `useMenuElementContent` that uses the default 'menu' property.
1993
+ * Used for the main site navigation in headers and footers.
1994
+ *
1995
+ * @template CONTENT - The content type from `type.ts`
1996
+ *
1997
+ * @returns `Reactive<MenuContent>` — reactive object with:
1998
+ * - `hasContent: ComputedRef<boolean>` — `true` if menu data exists
1999
+ * - `items: ComputedRef<ActionLink[]>` — array of menu items with `title`, `type`, `link`, `performAction()`
2000
+ *
2001
+ * @see {@link MenuContent}
2002
+ * @see {@link useMenuElementContent} — underlying composable
2003
+ *
2004
+ * @example
2005
+ * ```typescript
2006
+ * // Header.vue
2007
+ * const menu = useNavigationMenuElementContent<ContentType>();
2008
+ *
2009
+ * // Template
2010
+ * <nav v-if="menu.hasContent" class="main-nav">
2011
+ * <a v-for="item in menu.items" :key="item.title" @click="item.performAction">
2012
+ * {{ item.title }}
2013
+ * </a>
2014
+ * </nav>
2015
+ * ```
2016
+ */
2017
+ declare function useNavigationMenuElementContent<CONTENT>(): {
2018
+ readonly hasContent: boolean;
2019
+ readonly items: ActionLink[];
1210
2020
  };
1211
- declare const ProductLayoutSlot: {
1212
- readonly TOP_BAR: "TOP_BAR";
1213
- readonly GALLERY: "GALLERY";
1214
- readonly SIDEBAR: "SIDEBAR";
1215
- readonly DESCRIPTION: "DESCRIPTION";
1216
- readonly REVIEW_LIST: "REVIEW_LIST";
1217
- readonly RELATED_PRODUCTS: "RELATED_PRODUCTS";
1218
- readonly BOTTOM_BAR: "FOOTER";
1219
- readonly CUSTOM_SLOT: "CUSTOM_SLOT";
2021
+
2022
+ /**
2023
+ * Composable for accessing PRODUCT_SELECTOR content.
2024
+ *
2025
+ * Used for displaying store products selected by the user in the editor.
2026
+ * Supports both manual selection and category-based selection modes.
2027
+ *
2028
+ * @template CONTENT - The content type from `type.ts`
2029
+ * @param elementName - The name of the element in content settings
2030
+ *
2031
+ * @param externalContent
2032
+ * @param externalStoreData
2033
+ * @returns `Reactive<ProductSelector>` — reactive object with:
2034
+ * - `products: ComputedRef<ProductListComponentItem[]>` — array of product objects with `id`, `name`, `price`, `imageUrl`, etc.
2035
+ * - `categories: ComputedRef<CategoryListComponentItem[]>` — array of categories (when using category selection)
2036
+ * - `categoryId: ComputedRef<number>` — selected category ID (when using category selection)
2037
+ * - `hasContent: ComputedRef<boolean>` — `true` if selector data exists
2038
+ * - `hasProducts: ComputedRef<boolean>` — `true` if at least one product is selected
2039
+ *
2040
+ * @see {@link ProductSelectorContent}
2041
+ * @see {@link ProductSelectorData} — raw data type from editor
2042
+ *
2043
+ * @example
2044
+ * ```typescript
2045
+ * // settings/content.ts
2046
+ * const content = {
2047
+ * featured_products: {
2048
+ * type: 'PRODUCT_SELECTOR',
2049
+ * label: '$label.products',
2050
+ * defaults: { maxProducts: 8 },
2051
+ * },
2052
+ * };
2053
+ *
2054
+ * // Section.vue
2055
+ * const products = useProductSelectorElementContent<ContentType>('featured_products');
2056
+ *
2057
+ * // Template
2058
+ * <div v-if="products.hasProducts" class="product-grid">
2059
+ * <div v-for="product in products.products" :key="product.id">
2060
+ * <img :src="product.imageUrl" :alt="product.name" />
2061
+ * <h3>{{ product.name }}</h3>
2062
+ * <span>{{ product.price }}</span>
2063
+ * </div>
2064
+ * </div>
2065
+ * ```
2066
+ */
2067
+ declare function useProductSelectorElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>, externalStoreData?: StoreData): Reactive<ProductSelectorContent>;
2068
+
2069
+ /**
2070
+ * Composable for accessing SELECTBOX content (dropdown).
2071
+ *
2072
+ * Used for dropdown menus and option selectors defined in `settings/content.ts`.
2073
+ *
2074
+ * @template CONTENT - The content type from `type.ts`
2075
+ * @param elementName - The name of the element in content settings
2076
+ * @param externalContent - Optional external content (used internally for DECK cards)
2077
+ *
2078
+ * @returns `Reactive<SelectBoxContent>` — reactive object with:
2079
+ * - `hasContent: ComputedRef<boolean>` — `true` if a value is selected
2080
+ * - `value: ComputedRef<string | undefined>` — the selected option value
2081
+ *
2082
+ * @see {@link SelectBoxContent}
2083
+ *
2084
+ * @example
2085
+ * ```typescript
2086
+ * // settings/content.ts
2087
+ * const content = {
2088
+ * layout_type: {
2089
+ * type: 'SELECTBOX',
2090
+ * label: '$label.layout_type',
2091
+ * options: [
2092
+ * { value: 'grid', label: 'Grid' },
2093
+ * { value: 'list', label: 'List' },
2094
+ * ],
2095
+ * defaults: { value: 'grid' },
2096
+ * },
2097
+ * };
2098
+ *
2099
+ * // Section.vue
2100
+ * const layoutType = useSelectboxElementContent<ContentType>('layout_type');
2101
+ *
2102
+ * // Template
2103
+ * <div :class="layoutType.value">...</div>
2104
+ * ```
2105
+ */
2106
+ declare function useSelectboxElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): Reactive<SelectBoxContent>;
2107
+
2108
+ /**
2109
+ * Composable for accessing TEXTAREA content (multi-line text).
2110
+ *
2111
+ * Used for descriptions, paragraphs, and long text fields defined in `settings/content.ts`.
2112
+ *
2113
+ * @template CONTENT - The content type from `type.ts`
2114
+ * @param elementName - The name of the element in content settings
2115
+ * @param externalContent - Optional external content (used internally for DECK cards)
2116
+ *
2117
+ * @returns `Reactive<TextAreaContent>` — reactive object with:
2118
+ * - `hasContent: ComputedRef<boolean>` — `true` if the field has text
2119
+ * - `value: ComputedRef<string | undefined>` — the text string (may contain newlines)
2120
+ *
2121
+ * @see {@link TextAreaContent}
2122
+ *
2123
+ * @example
2124
+ * ```typescript
2125
+ * // settings/content.ts
2126
+ * const content = {
2127
+ * description: { type: 'TEXTAREA', label: '$label.description', placeholder: '' },
2128
+ * };
2129
+ *
2130
+ * // Section.vue
2131
+ * const description = useTextareaElementContent<ContentType>('description');
2132
+ *
2133
+ * // Template
2134
+ * <p v-if="description.hasContent" style="white-space: pre-wrap">
2135
+ * {{ description.value }}
2136
+ * </p>
2137
+ * ```
2138
+ */
2139
+ declare function useTextareaElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): Reactive<TextAreaContent>;
2140
+
2141
+ /**
2142
+ * Composable for accessing TOGGLE content (boolean switch).
2143
+ *
2144
+ * Used for on/off switches, visibility toggles, and feature flags defined in `settings/content.ts`.
2145
+ *
2146
+ * @template CONTENT - The content type from `type.ts`
2147
+ * @param elementName - The name of the element in content settings
2148
+ * @param externalContent - Optional external content (used internally for DECK cards)
2149
+ *
2150
+ * @returns `Reactive<ToggleContent>` — reactive object with:
2151
+ * - `hasContent: ComputedRef<boolean>` — `true` if toggle data exists
2152
+ * - `value: ComputedRef<boolean | undefined>` — `true` when enabled, `false` when disabled
2153
+ *
2154
+ * @see {@link ToggleContent}
2155
+ * @see {@link ToggleContentData} — raw data type from editor
2156
+ *
2157
+ * @example
2158
+ * ```typescript
2159
+ * // settings/content.ts
2160
+ * const content = {
2161
+ * show_price: { type: 'TOGGLE', label: '$label.show_price', defaults: { enabled: true } },
2162
+ * };
2163
+ *
2164
+ * // Section.vue
2165
+ * const showPrice = useToggleElementContent<ContentType>('show_price');
2166
+ *
2167
+ * // Template
2168
+ * <span v-if="showPrice.value" class="price">{{ product.price }}</span>
2169
+ * ```
2170
+ */
2171
+ declare function useToggleElementContent<CONTENT>(elementName: string, externalContent?: Record<string, unknown>): Reactive<ToggleContent>;
2172
+
2173
+ /**
2174
+ * Composable that provides translation functionality.
2175
+ * Translations are loaded from globalThis.craneSharedTranslation injected during build.
2176
+ * Works in both browser (client) and Node.js (server/SSR) environments.
2177
+ *
2178
+ * @returns An object with a `t` function that takes a translation key and returns the translated string
2179
+ *
2180
+ * @example
2181
+ * ```ts
2182
+ * import { useTranslation } from '@lightspeed/crane';
2183
+ *
2184
+ * const { t } = useTranslation();
2185
+ * const title = t('$label.shared.title');
2186
+ * ```
2187
+ */
2188
+ declare function useTranslation(): {
2189
+ t: (key: string) => string;
2190
+ currentLanguageCode: vue.ComputedRef<string>;
1220
2191
  };
1221
2192
 
1222
- export { ActionLinkTypeEnum, BackgroundStyleEnum, ButtonAppearanceEnum, ButtonShapeEnum, ButtonSizeEnum, ButtonTypeEnum, CatalogLayoutSlot, CategoryLayoutSlot, ConfigTypeEnum, DesignEditorType, EditorTypes, ImageSet, InstantsiteJsEvent, OverlayTypeEnum, PluginTypeEnum, ProductLayoutSlot, SectionTypeEnum, TemplateCategoriesList, TemplatePageEnum, ValidationTypeEnum, createVueClientApp, createVueServerApp, useBackgroundElementDesign, useButtonElementContent, useButtonElementDesign, useCategorySelectorElementContent, useDeckElementContent, useImageElementContent, useImageElementDesign, useInputboxElementContent, useInstantsiteJsApi, useLayoutElementDesign, useLogoElementContent, useLogoElementDesign, useMenuElementContent, useNavigationMenuElementContent, useProductSelectorElementContent, useSelectboxElementContent, useSelectboxElementDesign, useTextElementDesign, useTextareaElementContent, useTextareaElementDesign, useToggleElementContent, useToggleElementDesign, useTranslation, useVueBaseProps };
1223
- export type { ActionLink, AppBaseContext, AppBaseData, AppBaseState, Background$1 as Background, BackgroundDesignData, BackgroundDesignEditor, BackgroundDesignEditorDefaults, BackgroundDesignEditorDefaultsTransformed, BackgroundType, ButtonAppearance$1 as ButtonAppearance, ButtonContent, ButtonContentData, ButtonContentEditor, ButtonDesignData, ButtonDesignEditor, ButtonDesignEditorDefaults, ButtonDesignEditorDefaultsTransformed, ButtonSize$1 as ButtonSize, ButtonStyle$1 as ButtonStyle, CapitalizationType, Card$1 as Card, CategorySelectorContentEditor, CategorySelectorContentEditorDefaults, Color$1 as Color, ColorPickerDesignEditor, ColorPickerDesignEditorDefaults, ColorPickerDesignEditorDefaultsTransformed, ContentEditor, ContentSettings, Deck, DeckContent, DeckContentEditor, DefaultSectionId, DesignEditor, DesignEditorDefaults, DesignEditorDefaultsTransformed, DesignSettings, DividerDesignEditor, Font, Frame, GlobalColorsString$1 as GlobalColorsString, GlobalDesign$1 as GlobalDesign, GlobalFontsString, GlobalTextSizeString$1 as GlobalTextSizeString, GradientColor, HSLColor, ImageBorderInfoData, ImageContent, ImageContentData, ImageContentEditor, ImageContentEditorDefaults, ImageDesignData, ImageDesignEditor, ImageDesignEditorDefaults, ImageDesignEditorDefaultsTransformed, ImageInfoData, InputBoxContent, InputboxContentEditor, InputboxContentEditorDefaults, InstantsiteJSAPI$1 as InstantsiteJSAPI, InstantsiteTilePromise$1 as InstantsiteTilePromise, LayoutDesignData, LayoutDesignOverride, LayoutSettings, LogoContent, LogoContentData, LogoContentEditor, LogoContentEditorDefaults, LogoDesignData$1 as LogoDesignData, LogoDesignEditor, LogoDesignEditorDefaults, LogoDesignEditorDefaultsTransformed, LogoType$1 as LogoType, MandatoryContentSettings, MandatoryDesignSettings, MenuContent, MenuContentData, MenuContentEditor, NavigationMenuContentEditor, Overlay$1 as Overlay, OverlayType, ProductSelectorContentEditor, ProductSelectorContentEditorDefaults, RGBAColor, SelectBoxContent, SelectboxContentEditor, SelectboxContentOption, SelectboxDesignData, SelectboxDesignEditor, Showcase, ShowcaseOverride, SolidColor, StorePageConfiguration, StorefrontSectionId, TemplateCategory, TemplateConfiguration, TemplateConfigurationType, TemplateCustomSection, TemplateDefaultSection, TemplateMetadata, TemplateMultiPageConfiguration, TemplatePage, TemplateSection, TemplateSettings, TemplateSinglePageConfiguration, TemplateStorefrontSection, TextAreaContent, TextDesignData, TextDesignEditor, TextDesignEditorDefaults, TextDesignEditorDefaultsTransformed, TextSize, TextareaContentEditor, TextareaContentEditorDefaults, TextareaDesignData, ToggleContent, ToggleContentData, ToggleContentEditor, ToggleDesignData, ToggleDesignEditor, TransformedFrame, TranslationSettings, VuegaPageId };
2193
+ /**
2194
+ * Composable for accessing BACKGROUND design settings.
2195
+ *
2196
+ * Used for section backgrounds with solid color or gradient options.
2197
+ * Supports global color references (e.g., 'global.primary', 'global.secondary').
2198
+ *
2199
+ * @template DESIGN - The design type from `type.ts`
2200
+ * @param elementName - The name of the element in design settings
2201
+ *
2202
+ * @returns `Reactive<BackgroundDesignData>` — reactive object with:
2203
+ * - `background: Background | undefined` — background configuration object:
2204
+ * - `type: BackgroundType | undefined` — 'solid' or 'gradient'
2205
+ * - `solid: SolidColor | undefined` — solid background color object
2206
+ * - `color: Color | undefined` — the color value
2207
+ * - `gradient: GradientColor | undefined` — gradient color object
2208
+ * - `fromColor: Color | undefined` — gradient start color
2209
+ * - `toColor: Color | undefined` — gradient end color
2210
+ *
2211
+ * @see {@link BackgroundDesignData}
2212
+ * @see {@link Background}
2213
+ * @see {@link BackgroundType} — 'solid' | 'gradient'
2214
+ * @see {@link SolidColor}
2215
+ * @see {@link GradientColor}
2216
+ *
2217
+ * @example
2218
+ * ```typescript
2219
+ * // settings/design.ts
2220
+ * const design = {
2221
+ * section_background: {
2222
+ * type: 'BACKGROUND',
2223
+ * label: '$label.background',
2224
+ * colors: ['#ffffff', '#f5f5f5', 'global.primary', 'global.secondary'],
2225
+ * defaults: { background: { type: 'COLOR', solid: { color: '#ffffff' } } },
2226
+ * },
2227
+ * };
2228
+ *
2229
+ * // Section.vue
2230
+ * const bg = useBackgroundElementDesign<DesignType>('section_background');
2231
+ *
2232
+ * const backgroundStyle = computed(() => {
2233
+ * if (bg.background?.type === 'gradient') {
2234
+ * return `linear-gradient(${bg.background.gradient?.fromColor}, ${bg.background.gradient?.toColor})`;
2235
+ * }
2236
+ * return bg.background?.solid?.color;
2237
+ * });
2238
+ *
2239
+ * // Template
2240
+ * <section :style="{ background: backgroundStyle }">...</section>
2241
+ * ```
2242
+ */
2243
+ declare function useBackgroundElementDesign<DESIGN>(elementName: keyof DESIGN): Reactive<BackgroundDesignData>;
2244
+
2245
+ /**
2246
+ * Composable for accessing BUTTON design settings.
2247
+ *
2248
+ * Used for styling button elements with appearance, size, shape, and color options.
2249
+ *
2250
+ * @template DESIGN - The design type from `type.ts`
2251
+ * @param elementName - The name of the element in design settings
2252
+ *
2253
+ * @returns `Reactive<ButtonDesignData>` — reactive object with:
2254
+ * - `appearance: ButtonAppearance | undefined` — button fill style: 'solid-button', 'outline-button', or 'text-link'
2255
+ * - `font: string | GlobalFontsString | undefined` — font family name
2256
+ * - `size: ButtonSize | undefined` — button size: 'small', 'medium', or 'large'
2257
+ * - `style: ButtonStyle | undefined` — button shape: 'pill', 'rectangle', or 'round-corner'
2258
+ * - `color: Color | GlobalColorsString | undefined` — button color
2259
+ * - `visible: boolean` — `true` if button should be displayed
2260
+ *
2261
+ * @see {@link ButtonDesignData}
2262
+ * @see {@link ButtonAppearance} — 'solid-button' | 'outline-button' | 'text-link'
2263
+ * @see {@link ButtonSize} — 'small' | 'medium' | 'large'
2264
+ * @see {@link ButtonStyle} — 'round-corner' | 'rectangle' | 'pill'
2265
+ *
2266
+ * @example
2267
+ * ```typescript
2268
+ * // settings/design.ts
2269
+ * const design = {
2270
+ * button_style: {
2271
+ * type: 'BUTTON',
2272
+ * label: '$label.button_style',
2273
+ * defaults: { appearance: 'SOLID', size: 'MEDIUM', shape: 'PILL', color: '#000000', visible: true },
2274
+ * },
2275
+ * };
2276
+ *
2277
+ * // Section.vue
2278
+ * const buttonStyle = useButtonElementDesign<DesignType>('button_style');
2279
+ *
2280
+ * // Template
2281
+ * <button
2282
+ * v-if="buttonStyle.visible"
2283
+ * :class="[
2284
+ * `btn-${buttonStyle.appearance?.toLowerCase()}`,
2285
+ * `btn-${buttonStyle.size?.toLowerCase()}`,
2286
+ * `btn-${buttonStyle.style?.toLowerCase()}`,
2287
+ * ]"
2288
+ * :style="{ backgroundColor: buttonStyle.color }"
2289
+ * >
2290
+ * {{ button.title }}
2291
+ * </button>
2292
+ * ```
2293
+ */
2294
+ declare function useButtonElementDesign<DESIGN>(elementName: keyof DESIGN): Reactive<ButtonDesignData>;
2295
+
2296
+ /**
2297
+ * Composable for accessing IMAGE design settings.
2298
+ *
2299
+ * Used for image overlay styling (color or gradient overlay on top of images).
2300
+ *
2301
+ * @template DESIGN - The design type from `type.ts`
2302
+ * @param elementName - The name of the element in design settings
2303
+ *
2304
+ * @returns `Reactive<ImageDesignData>` — reactive object with:
2305
+ * - `overlay: Overlay | undefined` — overlay configuration object:
2306
+ * - `type: OverlayType | undefined` — 'solid', 'gradient', or 'none'
2307
+ * - `solid: SolidColor | undefined` — solid overlay color object
2308
+ * - `color: Color | undefined` — the color value (with alpha for transparency)
2309
+ * - `gradient: GradientColor | undefined` — gradient color object
2310
+ * - `fromColor: Color | undefined` — gradient start color
2311
+ * - `toColor: Color | undefined` — gradient end color
2312
+ * - `visible: boolean` — `true` if image should be displayed
2313
+ *
2314
+ * @see {@link ImageDesignData}
2315
+ * @see {@link Overlay}
2316
+ * @see {@link OverlayType} — 'solid' | 'gradient' | 'none'
2317
+ *
2318
+ * @example
2319
+ * ```typescript
2320
+ * // settings/design.ts
2321
+ * const design = {
2322
+ * image_style: {
2323
+ * type: 'IMAGE',
2324
+ * label: '$label.image_style',
2325
+ * colors: ['#000000', '#1a1a1a', '#2d2d2d', '#666666', '#999999'],
2326
+ * defaults: { overlay: { type: 'COLOR', solid: { color: '#000000' } }, visible: true },
2327
+ * },
2328
+ * };
2329
+ *
2330
+ * // Section.vue
2331
+ * const imageStyle = useImageElementDesign<DesignType>('image_style');
2332
+ *
2333
+ * // Template with overlay
2334
+ * <div v-if="imageStyle.visible" class="image-container">
2335
+ * <img :src="image.highResolutionDesktopImage" />
2336
+ * <div
2337
+ * v-if="imageStyle.overlay?.type !== 'none'"
2338
+ * class="overlay"
2339
+ * :style="{ backgroundColor: imageStyle.overlay?.solid?.color }"
2340
+ * />
2341
+ * </div>
2342
+ * ```
2343
+ */
2344
+ declare function useImageElementDesign<DESIGN>(elementName: keyof DESIGN): Reactive<ImageDesignData>;
2345
+
2346
+ /**
2347
+ * Composable for accessing layout design settings.
2348
+ *
2349
+ * Used for layout selection in sections that support multiple layout variants.
2350
+ * The layout value is a string identifier that can be used to conditionally render
2351
+ * different layouts.
2352
+ *
2353
+ * @returns `Reactive<LayoutDesignData>` — reactive object with:
2354
+ * - `layout: string | undefined` — layout identifier string (e.g., 'default', 'compact', 'wide')
2355
+ *
2356
+ * @see {@link LayoutDesignData}
2357
+ *
2358
+ * @example
2359
+ * ```typescript
2360
+ * // settings/layout.ts
2361
+ * const layout = [
2362
+ * {
2363
+ * layoutId: 'layout_1',
2364
+ * selectedContentSettings: [], <-- default setting from content.ts
2365
+ * selectedDesignSettings: [], <-- default setting from design.ts
2366
+ * },
2367
+ * {
2368
+ * layoutId: 'layout_2',
2369
+ * selectedContentSettings: [
2370
+ * { ... }, <-- custom setting for layout 2
2371
+ * ],
2372
+ * selectedDesignSettings: [
2373
+ * { ... }, <-- custom setting for layout 2
2374
+ * ],
2375
+ * },
2376
+ * ];
2377
+ *
2378
+ * // Section.vue
2379
+ * const layoutDesign = useLayoutElementDesign();
2380
+ *
2381
+ * // Template
2382
+ * <div :class="`layout-${layoutDesign.layout}`">
2383
+ * <template v-if="layoutDesign.layout === 'compact'">
2384
+ * <!-- Compact layout -->
2385
+ * </template>
2386
+ * <template v-else>
2387
+ * <!-- Default layout -->
2388
+ * </template>
2389
+ * </div>
2390
+ * ```
2391
+ */
2392
+ declare function useLayoutElementDesign(): Reactive<LayoutDesignData>;
2393
+
2394
+ /**
2395
+ * Composable for accessing LOGO design settings in headers/footers.
2396
+ *
2397
+ * Used for styling the site logo (text or image). Provides text styling options
2398
+ * and additional logo-specific settings like spacing and capitalization.
2399
+ *
2400
+ * @template DESIGN - The design type from `type.ts`
2401
+ *
2402
+ * @returns `ComputedRef<LogoDesignData>` — computed ref with:
2403
+ * - `font: string | undefined` — font family name
2404
+ * - `size: number | undefined` — font size in pixels
2405
+ * - `bold: boolean | undefined` — `true` if text is bold
2406
+ * - `italic: boolean | undefined` — `true` if text is italic
2407
+ * - `color: Color | undefined` — text/logo color
2408
+ * - `visible: boolean | undefined` — `true` if logo should be displayed
2409
+ * - `spacing: number | undefined` — letter spacing value
2410
+ * - `capitalization: CapitalizationType | undefined` — text transform: 'NONE', 'UPPERCASE', 'LOWERCASE', 'CAPITALIZE'
2411
+ * - `frame: Frame | TransformedFrame | undefined` — logo frame style (if applicable)
2412
+ *
2413
+ * @see {@link LogoDesignData}
2414
+ * @see {@link CapitalizationType}
2415
+ * @see {@link Frame}
2416
+ * @see {@link TransformedFrame}
2417
+ *
2418
+ * @example
2419
+ * ```typescript
2420
+ * // Header.vue
2421
+ * const logoDesign = useLogoElementDesign<DesignType>();
2422
+ *
2423
+ * // Template
2424
+ * <div
2425
+ * v-if="logoDesign.visible"
2426
+ * class="logo"
2427
+ * :style="{
2428
+ * fontFamily: logoDesign.font,
2429
+ * fontSize: logoDesign.size + 'px',
2430
+ * color: logoDesign.color,
2431
+ * letterSpacing: logoDesign.spacing + 'px',
2432
+ * textTransform: logoDesign.capitalization?.toLowerCase(),
2433
+ * }"
2434
+ * >
2435
+ * {{ logo.text }}
2436
+ * </div>
2437
+ * ```
2438
+ */
2439
+ declare function useLogoElementDesign<DESIGN>(): ComputedRef<LogoDesignData>;
2440
+
2441
+ /**
2442
+ * Composable for accessing SELECTBOX design settings.
2443
+ *
2444
+ * Used for design-level dropdown selections (e.g., layout variants, alignment options).
2445
+ *
2446
+ * @template DESIGN - The design type from `type.ts`
2447
+ * @param elementName - The name of the element in design settings
2448
+ *
2449
+ * @returns `Reactive<SelectboxDesignData>` — reactive object with:
2450
+ * - `value: string | undefined` — the selected option value
2451
+ *
2452
+ * @see {@link SelectboxDesignData}
2453
+ *
2454
+ * @example
2455
+ * ```typescript
2456
+ * // settings/design.ts
2457
+ * const design = {
2458
+ * text_alignment: {
2459
+ * type: 'SELECTBOX',
2460
+ * label: '$label.alignment',
2461
+ * options: [
2462
+ * { value: 'left', label: 'Left' },
2463
+ * { value: 'center', label: 'Center' },
2464
+ * { value: 'right', label: 'Right' },
2465
+ * ],
2466
+ * defaults: { value: 'center' },
2467
+ * },
2468
+ * };
2469
+ *
2470
+ * // Section.vue
2471
+ * const alignment = useSelectboxElementDesign<DesignType>('text_alignment');
2472
+ *
2473
+ * // Template
2474
+ * <div :style="{ textAlign: alignment.value }">...</div>
2475
+ * ```
2476
+ */
2477
+ declare function useSelectboxElementDesign<DESIGN>(elementName: keyof DESIGN): Reactive<SelectboxDesignData>;
2478
+
2479
+ /**
2480
+ * Composable for accessing TEXT design settings.
2481
+ *
2482
+ * Used for styling text elements (titles, descriptions, labels).
2483
+ * Supports global design references (e.g., 'global.heading', 'global.primary').
2484
+ *
2485
+ * @template DESIGN - The design type from `type.ts`
2486
+ * @param elementName - The name of the element in design settings
2487
+ *
2488
+ * @returns `Reactive<TextDesignData>` — reactive object with:
2489
+ * - `font: string | GlobalFontsString | undefined` — font family name (resolved from global if prefixed with 'global.')
2490
+ * - `size: number | GlobalTextSizeString | undefined` — font size in pixels (resolved from global if prefixed with 'global.')
2491
+ * - `bold: boolean | undefined` — `true` if text is bold
2492
+ * - `italic: boolean | undefined` — `true` if text is italic
2493
+ * - `color: Color | undefined` — text color (resolved from global if prefixed with 'global.')
2494
+ * - `visible: boolean` — `true` if element should be displayed
2495
+ *
2496
+ * @see {@link TextDesignData}
2497
+ * @see {@link Color}
2498
+ * @see {@link GlobalFontsString}
2499
+ * @see {@link GlobalTextSizeString}
2500
+ *
2501
+ * @example
2502
+ * ```typescript
2503
+ * // settings/design.ts
2504
+ * const design = {
2505
+ * title_style: {
2506
+ * type: 'TEXT',
2507
+ * label: '$label.title_style',
2508
+ * colors: ['#000000', '#333333', 'global.primary'],
2509
+ * sizes: [24, 32, 48, 'global.heading'],
2510
+ * defaults: { font: 'global.heading', size: 32, bold: true, color: '#000000', visible: true },
2511
+ * },
2512
+ * };
2513
+ *
2514
+ * // Section.vue
2515
+ * const titleStyle = useTextElementDesign<DesignType>('title_style');
2516
+ *
2517
+ * // Template
2518
+ * <h1
2519
+ * v-if="titleStyle.visible"
2520
+ * :style="{
2521
+ * fontFamily: titleStyle.font,
2522
+ * fontSize: titleStyle.size + 'px',
2523
+ * fontWeight: titleStyle.bold ? 'bold' : 'normal',
2524
+ * fontStyle: titleStyle.italic ? 'italic' : 'normal',
2525
+ * color: titleStyle.color,
2526
+ * }"
2527
+ * >
2528
+ * {{ title.value }}
2529
+ * </h1>
2530
+ * ```
2531
+ */
2532
+ declare function useTextElementDesign<DESIGN>(elementName: keyof DESIGN): Reactive<TextDesignData>;
2533
+
2534
+ /**
2535
+ * Composable for accessing TEXTAREA design settings.
2536
+ *
2537
+ * Similar to TEXT design but includes `whiteSpace: 'pre-wrap'` for preserving line breaks.
2538
+ * Used for styling multi-line text elements (descriptions, paragraphs).
2539
+ *
2540
+ * @template DESIGN - The design type from `type.ts`
2541
+ * @param elementName - The name of the element in design settings
2542
+ *
2543
+ * @returns `Reactive<TextareaDesignData>` — reactive object with:
2544
+ * - `font: string | GlobalFontsString | undefined` — font family name
2545
+ * - `size: number | GlobalTextSizeString | undefined` — font size in pixels
2546
+ * - `bold: boolean | undefined` — `true` if text is bold
2547
+ * - `italic: boolean | undefined` — `true` if text is italic
2548
+ * - `color: Color | undefined` — text color
2549
+ * - `visible: boolean` — `true` if element should be displayed
2550
+ * - `whiteSpace: string` — always 'pre-wrap' (preserves line breaks)
2551
+ *
2552
+ * @see {@link TextareaDesignData}
2553
+ * @see {@link TextDesignData} — base type
2554
+ *
2555
+ * @example
2556
+ * ```typescript
2557
+ * // Section.vue
2558
+ * const descStyle = useTextareaElementDesign<DesignType>('description_style');
2559
+ *
2560
+ * // Template
2561
+ * <p
2562
+ * v-if="descStyle.visible"
2563
+ * :style="{
2564
+ * fontFamily: descStyle.font,
2565
+ * fontSize: descStyle.size + 'px',
2566
+ * color: descStyle.color,
2567
+ * whiteSpace: descStyle.whiteSpace,
2568
+ * }"
2569
+ * >
2570
+ * {{ description.value }}
2571
+ * </p>
2572
+ * ```
2573
+ */
2574
+ declare function useTextareaElementDesign<DESIGN>(elementName: keyof DESIGN): Reactive<TextareaDesignData>;
2575
+
2576
+ /**
2577
+ * Composable for accessing TOGGLE design settings.
2578
+ *
2579
+ * Used for design-level toggle switches (e.g., enable/disable a design feature).
2580
+ *
2581
+ * @template DESIGN - The design type from `type.ts`
2582
+ * @param elementName - The name of the element in design settings
2583
+ *
2584
+ * @returns `Reactive<ToggleDesignData>` — reactive object with:
2585
+ * - `enabled: boolean | undefined` — `true` if the toggle is enabled
2586
+ *
2587
+ * @see {@link ToggleDesignData}
2588
+ *
2589
+ * @example
2590
+ * ```typescript
2591
+ * // settings/design.ts
2592
+ * const design = {
2593
+ * show_shadow: {
2594
+ * type: 'TOGGLE',
2595
+ * label: '$label.show_shadow',
2596
+ * defaults: { enabled: true },
2597
+ * },
2598
+ * };
2599
+ *
2600
+ * // Section.vue
2601
+ * const showShadow = useToggleElementDesign<DesignType>('show_shadow');
2602
+ *
2603
+ * // Template
2604
+ * <div :class="{ 'with-shadow': showShadow.enabled }">...</div>
2605
+ * ```
2606
+ */
2607
+ declare function useToggleElementDesign<DESIGN>(elementName: keyof DESIGN): Reactive<ToggleDesignData>;
2608
+
2609
+ export { ActionLinkTypeEnum, BackgroundStyleEnum, ButtonAppearanceEnum, ButtonShapeEnum, ButtonSizeEnum, ButtonTypeEnum, CatalogLayoutSlot, CategoryLayoutSlot, ConfigTypeEnum, DesignEditorType, EditorTypes, ImageSet, InstantsiteJsEvent, OverlayTypeEnum, PluginTypeEnum, ProductLayoutSlot, ReservedTemplatePageNameEnum, SectionTypeEnum, TemplateCategoriesList, TemplatePageEnum, ValidationTypeEnum, createVueClientApp, createVueServerApp, useBackgroundElementDesign, useButtonElementContent, useButtonElementDesign, useCategorySelectorElementContent, useDeckElementContent, useImageElementContent, useImageElementDesign, useInputboxElementContent, useInstantsiteJsApi, useLayoutElementDesign, useLogoElementContent, useLogoElementDesign, useMenuElementContent, useNavigationMenuElementContent, useProductSelectorElementContent, useSelectboxElementContent, useSelectboxElementDesign, useTextElementDesign, useTextareaElementContent, useTextareaElementDesign, useToggleElementContent, useToggleElementDesign, useTranslation, useVueBaseProps };
2610
+ export type { ActionLink, AppBaseContext, AppBaseData, AppBaseState, Background, BackgroundDesignData$1 as BackgroundDesignData, BackgroundDesignEditor, BackgroundDesignEditorDefaults, BackgroundDesignEditorDefaultsTransformed, BackgroundType, ButtonAppearance, ButtonContentData, ButtonContentEditor, ButtonDesignData, ButtonDesignEditor, ButtonDesignEditorDefaults, ButtonDesignEditorDefaultsTransformed, ButtonSize, ButtonStyle, CapitalizationType, Card, CategorySelectorContent, CategorySelectorContentEditor, CategorySelectorContentEditorDefaults, CategorySelectorData, Color$1 as Color, ColorPickerDesignEditor, ColorPickerDesignEditorDefaults, ColorPickerDesignEditorDefaultsTransformed, ContentEditor, ContentSettings, CustomPageMetadata, Deck, DeckContent, DeckContentEditor, DefaultSectionId, DesignEditor, DesignEditorDefaults, DesignEditorDefaultsTransformed, DesignSettings, DividerDesignEditor, Font, Frame, GlobalColorsString, GlobalDesign$1 as GlobalDesign, GlobalFontsString, GlobalTextSizeString, GradientColor, HSLColor, ImageBorderInfoData, ImageContent, ImageContentData, ImageContentEditor, ImageContentEditorDefaults, ImageDesignData$1 as ImageDesignData, ImageDesignEditor, ImageDesignEditorDefaults, ImageDesignEditorDefaultsTransformed, ImageInfoData, InputBoxContent, InputboxContentEditor, InputboxContentEditorDefaults, InstantsiteJSAPI$1 as InstantsiteJSAPI, InstantsiteTilePromise$1 as InstantsiteTilePromise, LayoutDesignData, LayoutDesignOverride, LayoutSettings, LogoContent, LogoContentData, LogoContentEditor, LogoContentEditorDefaults, LogoDesignData$1 as LogoDesignData, LogoDesignEditor, LogoDesignEditorDefaults, LogoDesignEditorDefaultsTransformed, LogoType, MandatoryContentSettings, MandatoryDesignSettings, MenuContent, MenuContentData, MenuContentEditor, NavigationMenuContentEditor, Overlay, OverlayType, ProductSelectorContent, ProductSelectorContentEditor, ProductSelectorContentEditorDefaults, ProductSelectorData, RGBAColor, SelectBoxContent, SelectboxContentEditor, SelectboxContentOption, SelectboxDesignData, SelectboxDesignEditor, Showcase, ShowcaseOverride, SolidColor, StorePageConfiguration, StorefrontSectionId, TemplateCategory, TemplateConfiguration, TemplateConfigurationType, TemplateCustomSection, TemplateDefaultSection, TemplateMetadata, TemplateMultiPageConfiguration, TemplatePage, TemplateSection, TemplateSettings, TemplateSinglePageConfiguration, TemplateStorefrontSection, TextAreaContent, TextDesignData$1 as TextDesignData, TextDesignEditor, TextDesignEditorDefaults, TextDesignEditorDefaultsTransformed, TextSize, TextareaContentEditor, TextareaContentEditorDefaults, TextareaDesignData$1 as TextareaDesignData, ToggleContent, ToggleContentData, ToggleContentEditor, ToggleDesignData, ToggleDesignEditor, TransformedFrame, TranslationSettings, VuegaPageId };