@lightspeed/crane-api 2.3.2 → 2.3.3-rc.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.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference path="../types.d.ts" />
2
2
  import * as vue from 'vue';
3
- import { Reactive, ComputedRef, Component, App, Ref } from 'vue';
3
+ import { Reactive, ComputedRef, Component, App, Ref, CSSProperties, StyleValue } from 'vue';
4
4
  import { z } from 'zod';
5
5
 
6
6
  /**
@@ -389,9 +389,9 @@ declare const DescriptorSchema: z.ZodObject<{
389
389
  color: z.ZodOptional<z.ZodCustom<string, string>>;
390
390
  }, z.core.$strict>>;
391
391
  capitalization: z.ZodOptional<z.ZodEnum<{
392
+ small: "small";
392
393
  none: "none";
393
394
  all: "all";
394
- small: "small";
395
395
  }>>;
396
396
  }, z.core.$strict>, z.ZodObject<{
397
397
  type: z.ZodLiteral<"DIVIDER">;
@@ -466,9 +466,9 @@ declare const DescriptorSchema: z.ZodObject<{
466
466
  color: z.ZodOptional<z.ZodCustom<string, string>>;
467
467
  }, z.core.$strict>>;
468
468
  capitalization: z.ZodOptional<z.ZodEnum<{
469
+ small: "small";
469
470
  none: "none";
470
471
  all: "all";
471
- small: "small";
472
472
  }>>;
473
473
  }, z.core.$strict>, z.ZodObject<{
474
474
  type: z.ZodLiteral<"DIVIDER">;
@@ -892,9 +892,9 @@ declare const CollectionDescriptorSchema: z.ZodObject<{
892
892
  color: z.ZodOptional<z.ZodCustom<string, string>>;
893
893
  }, z.core.$strict>>;
894
894
  capitalization: z.ZodOptional<z.ZodEnum<{
895
+ small: "small";
895
896
  none: "none";
896
897
  all: "all";
897
- small: "small";
898
898
  }>>;
899
899
  }, z.core.$strict>, z.ZodObject<{
900
900
  type: z.ZodLiteral<"DIVIDER">;
@@ -969,9 +969,9 @@ declare const CollectionDescriptorSchema: z.ZodObject<{
969
969
  color: z.ZodOptional<z.ZodCustom<string, string>>;
970
970
  }, z.core.$strict>>;
971
971
  capitalization: z.ZodOptional<z.ZodEnum<{
972
+ small: "small";
972
973
  none: "none";
973
974
  all: "all";
974
- small: "small";
975
975
  }>>;
976
976
  }, z.core.$strict>, z.ZodObject<{
977
977
  type: z.ZodLiteral<"DIVIDER">;
@@ -1351,7 +1351,7 @@ interface CategorySelectorContent {
1351
1351
  hasCategories: boolean;
1352
1352
  /** Array of selected category IDs */
1353
1353
  categoryIds: Array<number>;
1354
- /** `true` if selector data exists */
1354
+ /** `true` if there are categories to render */
1355
1355
  hasContent: boolean;
1356
1356
  }
1357
1357
 
@@ -1687,7 +1687,7 @@ interface InternalColor {
1687
1687
  *
1688
1688
  * @see {@link asStructuredColor}
1689
1689
  */
1690
- declare class Color implements InternalColor {
1690
+ declare class Color$1 implements InternalColor {
1691
1691
  readonly type: "STRUCTURED_COLOR";
1692
1692
  readonly raw: string;
1693
1693
  readonly hex: string;
@@ -1711,7 +1711,7 @@ declare class Color implements InternalColor {
1711
1711
  * // structured?.type === 'STRUCTURED_COLOR'
1712
1712
  * ```
1713
1713
  */
1714
- declare function asStructuredColor(color: Omit<InternalColor, 'type'> | undefined): Color | undefined;
1714
+ declare function asStructuredColor(color: Omit<InternalColor, 'type'> | undefined): Color$1 | undefined;
1715
1715
  /**
1716
1716
  * Solid color configuration.
1717
1717
  *
@@ -1719,7 +1719,7 @@ declare function asStructuredColor(color: Omit<InternalColor, 'type'> | undefine
1719
1719
  */
1720
1720
  interface SolidColor {
1721
1721
  /** The solid color value (StructuredColor post-resolution, or GlobalColor pre-resolution) */
1722
- color: Color | undefined;
1722
+ color: Color$1 | undefined;
1723
1723
  }
1724
1724
  /**
1725
1725
  * Gradient color configuration.
@@ -1728,9 +1728,9 @@ interface SolidColor {
1728
1728
  */
1729
1729
  interface GradientColor {
1730
1730
  /** Gradient start color (StructuredColor post-resolution, or GlobalColor pre-resolution) */
1731
- fromColor: Color | undefined;
1731
+ fromColor: Color$1 | undefined;
1732
1732
  /** Gradient end color (StructuredColor post-resolution, or GlobalColor pre-resolution) */
1733
- toColor: Color | undefined;
1733
+ toColor: Color$1 | undefined;
1734
1734
  }
1735
1735
  interface SolidColorTransformed {
1736
1736
  color: InternalColor | undefined;
@@ -1831,9 +1831,9 @@ declare const LogoDesignEditorDefaultsSchema: z.ZodObject<{
1831
1831
  color: z.ZodOptional<z.ZodCustom<string, string>>;
1832
1832
  }, z.core.$strict>>;
1833
1833
  capitalization: z.ZodOptional<z.ZodEnum<{
1834
+ small: "small";
1834
1835
  none: "none";
1835
1836
  all: "all";
1836
- small: "small";
1837
1837
  }>>;
1838
1838
  }, z.core.$strict>;
1839
1839
  declare const LogoDesignEditorSchema: z.ZodObject<{
@@ -1856,9 +1856,9 @@ declare const LogoDesignEditorSchema: z.ZodObject<{
1856
1856
  color: z.ZodOptional<z.ZodCustom<string, string>>;
1857
1857
  }, z.core.$strict>>;
1858
1858
  capitalization: z.ZodOptional<z.ZodEnum<{
1859
+ small: "small";
1859
1860
  none: "none";
1860
1861
  all: "all";
1861
- small: "small";
1862
1862
  }>>;
1863
1863
  }, z.core.$strict>>;
1864
1864
  }, z.core.$strict>;
@@ -2151,7 +2151,7 @@ interface ProductSelectorContent {
2151
2151
  categories: CategoryListComponentItem[];
2152
2152
  /** Selected category ID (when using category selection) */
2153
2153
  categoryId?: number;
2154
- /** `true` if selector data exists */
2154
+ /** `true` if there are products to render */
2155
2155
  hasContent: boolean;
2156
2156
  }
2157
2157
 
@@ -4467,9 +4467,9 @@ declare const DesignEditorDefaultsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4467
4467
  color: z.ZodOptional<z.ZodCustom<string, string>>;
4468
4468
  }, z.core.$strict>>;
4469
4469
  capitalization: z.ZodOptional<z.ZodEnum<{
4470
+ small: "small";
4470
4471
  none: "none";
4471
4472
  all: "all";
4472
- small: "small";
4473
4473
  }>>;
4474
4474
  }, z.core.$strict>, z.ZodObject<{
4475
4475
  type: z.ZodLiteral<"DIVIDER">;
@@ -4544,9 +4544,9 @@ declare const DesignEditorDefaultsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4544
4544
  color: z.ZodOptional<z.ZodCustom<string, string>>;
4545
4545
  }, z.core.$strict>>;
4546
4546
  capitalization: z.ZodOptional<z.ZodEnum<{
4547
+ small: "small";
4547
4548
  none: "none";
4548
4549
  all: "all";
4549
- small: "small";
4550
4550
  }>>;
4551
4551
  }, z.core.$strict>, z.ZodObject<{
4552
4552
  type: z.ZodLiteral<"DIVIDER">;
@@ -4664,9 +4664,9 @@ declare const AccordionShowcaseItemSchema: z.ZodObject<{
4664
4664
  color: z.ZodOptional<z.ZodCustom<string, string>>;
4665
4665
  }, z.core.$strict>>;
4666
4666
  capitalization: z.ZodOptional<z.ZodEnum<{
4667
+ small: "small";
4667
4668
  none: "none";
4668
4669
  all: "all";
4669
- small: "small";
4670
4670
  }>>;
4671
4671
  }, z.core.$strict>, z.ZodObject<{
4672
4672
  type: z.ZodLiteral<"DIVIDER">;
@@ -4750,9 +4750,9 @@ declare const AccordionShowcaseDesignEditorDefaultsSchema: z.ZodObject<{
4750
4750
  color: z.ZodOptional<z.ZodCustom<string, string>>;
4751
4751
  }, z.core.$strict>>;
4752
4752
  capitalization: z.ZodOptional<z.ZodEnum<{
4753
+ small: "small";
4753
4754
  none: "none";
4754
4755
  all: "all";
4755
- small: "small";
4756
4756
  }>>;
4757
4757
  }, z.core.$strict>, z.ZodObject<{
4758
4758
  type: z.ZodLiteral<"DIVIDER">;
@@ -4897,9 +4897,9 @@ declare const AccordionDesignItemSchema: z.ZodObject<{
4897
4897
  color: z.ZodOptional<z.ZodCustom<string, string>>;
4898
4898
  }, z.core.$strict>>;
4899
4899
  capitalization: z.ZodOptional<z.ZodEnum<{
4900
+ small: "small";
4900
4901
  none: "none";
4901
4902
  all: "all";
4902
- small: "small";
4903
4903
  }>>;
4904
4904
  }, z.core.$strict>>;
4905
4905
  }, z.core.$strict>, z.ZodObject<{
@@ -5060,9 +5060,9 @@ declare const AccordionDesignEditorSchema: z.ZodObject<{
5060
5060
  color: z.ZodOptional<z.ZodCustom<string, string>>;
5061
5061
  }, z.core.$strict>>;
5062
5062
  capitalization: z.ZodOptional<z.ZodEnum<{
5063
+ small: "small";
5063
5064
  none: "none";
5064
5065
  all: "all";
5065
- small: "small";
5066
5066
  }>>;
5067
5067
  }, z.core.$strict>>;
5068
5068
  }, z.core.$strict>, z.ZodObject<{
@@ -5323,9 +5323,9 @@ declare const DesignEditorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5323
5323
  color: z.ZodOptional<z.ZodCustom<string, string>>;
5324
5324
  }, z.core.$strict>>;
5325
5325
  capitalization: z.ZodOptional<z.ZodEnum<{
5326
+ small: "small";
5326
5327
  none: "none";
5327
5328
  all: "all";
5328
- small: "small";
5329
5329
  }>>;
5330
5330
  }, z.core.$strict>>;
5331
5331
  }, z.core.$strict>, z.ZodObject<{
@@ -5468,9 +5468,9 @@ declare const DesignEditorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5468
5468
  color: z.ZodOptional<z.ZodCustom<string, string>>;
5469
5469
  }, z.core.$strict>>;
5470
5470
  capitalization: z.ZodOptional<z.ZodEnum<{
5471
+ small: "small";
5471
5472
  none: "none";
5472
5473
  all: "all";
5473
- small: "small";
5474
5474
  }>>;
5475
5475
  }, z.core.$strict>>;
5476
5476
  }, z.core.$strict>, z.ZodObject<{
@@ -5645,9 +5645,9 @@ declare const DesignSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedU
5645
5645
  color: z.ZodOptional<z.ZodCustom<string, string>>;
5646
5646
  }, z.core.$strict>>;
5647
5647
  capitalization: z.ZodOptional<z.ZodEnum<{
5648
+ small: "small";
5648
5649
  none: "none";
5649
5650
  all: "all";
5650
- small: "small";
5651
5651
  }>>;
5652
5652
  }, z.core.$strict>>;
5653
5653
  }, z.core.$strict>, z.ZodObject<{
@@ -5790,9 +5790,9 @@ declare const DesignSettingsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedU
5790
5790
  color: z.ZodOptional<z.ZodCustom<string, string>>;
5791
5791
  }, z.core.$strict>>;
5792
5792
  capitalization: z.ZodOptional<z.ZodEnum<{
5793
+ small: "small";
5793
5794
  none: "none";
5794
5795
  all: "all";
5795
- small: "small";
5796
5796
  }>>;
5797
5797
  }, z.core.$strict>>;
5798
5798
  }, z.core.$strict>, z.ZodObject<{
@@ -5988,9 +5988,11 @@ interface TextDesignEditorDefaultsTransformed {
5988
5988
  readonly size?: TextSize | string;
5989
5989
  readonly bold?: boolean;
5990
5990
  readonly italic?: boolean;
5991
+ readonly visible?: boolean;
5991
5992
  }
5992
5993
  interface ImageDesignEditorDefaultsTransformed {
5993
5994
  readonly overlay: OverlayTransformed;
5995
+ readonly visible?: boolean;
5994
5996
  }
5995
5997
  interface ColorPickerDesignEditorDefaultsTransformed {
5996
5998
  readonly color?: InternalColor;
@@ -6015,6 +6017,7 @@ interface LogoDesignEditorDefaultsTransformed {
6015
6017
  readonly italic?: boolean;
6016
6018
  readonly spacing?: number;
6017
6019
  readonly capitalization?: CapitalizationType;
6020
+ readonly visible?: boolean;
6018
6021
  }
6019
6022
  interface SelectboxDesignEditorDefaultsTransformed {
6020
6023
  readonly value?: string;
@@ -6060,6 +6063,23 @@ interface BackgroundTransformed {
6060
6063
  /** Gradient color configuration */
6061
6064
  gradient: GradientColorTransformed | undefined;
6062
6065
  }
6066
+ /**
6067
+ * Options for `useBackgroundStyle` and `getBackgroundStyle` utils.
6068
+ *
6069
+ * @see {@link BackgroundDesignData}
6070
+ */
6071
+ interface BackgroundStyleOptions {
6072
+ /**
6073
+ * Direction of the gradient
6074
+ * @default 'to right'
6075
+ */
6076
+ direction?: 'to bottom' | 'to right' | 'to left' | 'to top' | string;
6077
+ /**
6078
+ * Fallback color if no background is defined
6079
+ * @default ''
6080
+ */
6081
+ fallbackColor?: string;
6082
+ }
6063
6083
 
6064
6084
  /** Button fill style */
6065
6085
  type ButtonAppearance = 'solid-button' | 'outline-button' | 'text-link';
@@ -6077,7 +6097,7 @@ type ButtonStyle = 'round-corner' | 'rectangle' | 'pill';
6077
6097
  * @see {@link ButtonSize}
6078
6098
  * @see {@link ButtonStyle}
6079
6099
  */
6080
- interface ButtonDesignData {
6100
+ interface ButtonDesignData$1 {
6081
6101
  /** Button fill style: 'solid-button', 'outline-button', or 'text-link' */
6082
6102
  appearance: ButtonAppearance | undefined;
6083
6103
  /** Font family name (resolved from global reference) */
@@ -6087,10 +6107,32 @@ interface ButtonDesignData {
6087
6107
  /** Button shape: 'round-corner', 'rectangle', or 'pill' */
6088
6108
  style: ButtonStyle | undefined;
6089
6109
  /** Button color */
6090
- color: Color | undefined;
6110
+ color: Color$1 | undefined;
6091
6111
  /** `true` if button should be displayed */
6092
6112
  visible: boolean;
6093
6113
  }
6114
+ /**
6115
+ * Size style configuration for a single button size.
6116
+ *
6117
+ * @see {@link UseButtonStylesOptions}
6118
+ */
6119
+ interface ButtonSizeStyles {
6120
+ fontSize: string;
6121
+ padding: string;
6122
+ }
6123
+ /**
6124
+ * Options for `useButtonStyles` helper composable.
6125
+ *
6126
+ * @see {@link ButtonDesignData}
6127
+ * @see {@link ButtonSizeStyles}
6128
+ */
6129
+ interface UseButtonStylesOptions {
6130
+ /**
6131
+ * Custom size styles for each button size.
6132
+ * Override defaults for specific sizes or provide all three.
6133
+ */
6134
+ sizes?: Partial<Record<ButtonSize, ButtonSizeStyles>>;
6135
+ }
6094
6136
 
6095
6137
  type AccordionItem = z.infer<typeof AccordionDesignItemSchema>;
6096
6138
  type ShowcaseAccordionItem = z.infer<typeof AccordionShowcaseItemSchema>;
@@ -6190,7 +6232,7 @@ interface TextDesignData$1 {
6190
6232
  /** `true` if text should be italic */
6191
6233
  italic: boolean | undefined;
6192
6234
  /** Text color */
6193
- color: Color | undefined;
6235
+ color: Color$1 | undefined;
6194
6236
  /** `true` if element should be displayed */
6195
6237
  visible: boolean;
6196
6238
  }
@@ -6206,6 +6248,33 @@ interface TextareaDesignData$1 extends TextDesignData$1 {
6206
6248
  /** Always 'pre-wrap' to preserve line breaks */
6207
6249
  readonly whiteSpace: string;
6208
6250
  }
6251
+ /**
6252
+ * Options for `createTextStyle` helper utility.
6253
+ *
6254
+ * @see {@link TextDesignData}
6255
+ */
6256
+ interface TextStyleOptions {
6257
+ /**
6258
+ * Default font family if not specified in design
6259
+ * @default 'inherit'
6260
+ */
6261
+ defaultFont?: string;
6262
+ /**
6263
+ * Default font size in pixels if not specified in design
6264
+ * @default 16
6265
+ */
6266
+ defaultSize?: number;
6267
+ /**
6268
+ * Default color if not specified in design
6269
+ * @default '#000000'
6270
+ */
6271
+ defaultColor?: string;
6272
+ /**
6273
+ * Default font weight if not bold
6274
+ * @default 'normal'
6275
+ */
6276
+ defaultWeight?: string;
6277
+ }
6209
6278
 
6210
6279
  /**
6211
6280
  * Return type for `useToggleElementDesign` composable.
@@ -6264,7 +6333,7 @@ interface LogoDesignData$1 {
6264
6333
  /** `true` if text should be italic */
6265
6334
  italic: boolean | undefined;
6266
6335
  /** Text/logo color */
6267
- color: Color | undefined;
6336
+ color: Color$1 | undefined;
6268
6337
  /** `true` if logo should be displayed */
6269
6338
  visible: boolean | undefined;
6270
6339
  /** Letter spacing value */
@@ -6376,9 +6445,9 @@ declare const LayoutDesignOverrideSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6376
6445
  color: z.ZodOptional<z.ZodCustom<string, string>>;
6377
6446
  }, z.core.$strict>>;
6378
6447
  capitalization: z.ZodOptional<z.ZodEnum<{
6448
+ small: "small";
6379
6449
  none: "none";
6380
6450
  all: "all";
6381
- small: "small";
6382
6451
  }>>;
6383
6452
  }, z.core.$strict>>;
6384
6453
  }, z.core.$strict>, z.ZodObject<{
@@ -6596,9 +6665,9 @@ declare const LayoutSettingsSchema: z.ZodObject<{
6596
6665
  color: z.ZodOptional<z.ZodCustom<string, string>>;
6597
6666
  }, z.core.$strict>>;
6598
6667
  capitalization: z.ZodOptional<z.ZodEnum<{
6668
+ small: "small";
6599
6669
  none: "none";
6600
6670
  all: "all";
6601
- small: "small";
6602
6671
  }>>;
6603
6672
  }, z.core.$strict>>;
6604
6673
  }, z.core.$strict>, z.ZodObject<{
@@ -7301,9 +7370,9 @@ declare const ManifestSchema: z.ZodObject<{
7301
7370
  color: z.ZodOptional<z.ZodCustom<string, string>>;
7302
7371
  }, z.core.$strict>>;
7303
7372
  capitalization: z.ZodOptional<z.ZodEnum<{
7373
+ small: "small";
7304
7374
  none: "none";
7305
7375
  all: "all";
7306
- small: "small";
7307
7376
  }>>;
7308
7377
  }, z.core.$strict>>;
7309
7378
  }, z.core.$strict>, z.ZodObject<{
@@ -7446,9 +7515,9 @@ declare const ManifestSchema: z.ZodObject<{
7446
7515
  color: z.ZodOptional<z.ZodCustom<string, string>>;
7447
7516
  }, z.core.$strict>>;
7448
7517
  capitalization: z.ZodOptional<z.ZodEnum<{
7518
+ small: "small";
7449
7519
  none: "none";
7450
7520
  all: "all";
7451
- small: "small";
7452
7521
  }>>;
7453
7522
  }, z.core.$strict>>;
7454
7523
  }, z.core.$strict>, z.ZodObject<{
@@ -7686,9 +7755,9 @@ declare const ManifestSchema: z.ZodObject<{
7686
7755
  color: z.ZodOptional<z.ZodCustom<string, string>>;
7687
7756
  }, z.core.$strict>>;
7688
7757
  capitalization: z.ZodOptional<z.ZodEnum<{
7758
+ small: "small";
7689
7759
  none: "none";
7690
7760
  all: "all";
7691
- small: "small";
7692
7761
  }>>;
7693
7762
  }, z.core.$strict>>;
7694
7763
  }, z.core.$strict>, z.ZodObject<{
@@ -8076,9 +8145,9 @@ declare const ManifestSchema: z.ZodObject<{
8076
8145
  color: z.ZodOptional<z.ZodCustom<string, string>>;
8077
8146
  }, z.core.$strict>>;
8078
8147
  capitalization: z.ZodOptional<z.ZodEnum<{
8148
+ small: "small";
8079
8149
  none: "none";
8080
8150
  all: "all";
8081
- small: "small";
8082
8151
  }>>;
8083
8152
  }, z.core.$strict>, z.ZodObject<{
8084
8153
  type: z.ZodLiteral<"DIVIDER">;
@@ -8153,9 +8222,9 @@ declare const ManifestSchema: z.ZodObject<{
8153
8222
  color: z.ZodOptional<z.ZodCustom<string, string>>;
8154
8223
  }, z.core.$strict>>;
8155
8224
  capitalization: z.ZodOptional<z.ZodEnum<{
8225
+ small: "small";
8156
8226
  none: "none";
8157
8227
  all: "all";
8158
- small: "small";
8159
8228
  }>>;
8160
8229
  }, z.core.$strict>, z.ZodObject<{
8161
8230
  type: z.ZodLiteral<"DIVIDER">;
@@ -8581,9 +8650,9 @@ declare const ManifestSchema: z.ZodObject<{
8581
8650
  color: z.ZodOptional<z.ZodCustom<string, string>>;
8582
8651
  }, z.core.$strict>>;
8583
8652
  capitalization: z.ZodOptional<z.ZodEnum<{
8653
+ small: "small";
8584
8654
  none: "none";
8585
8655
  all: "all";
8586
- small: "small";
8587
8656
  }>>;
8588
8657
  }, z.core.$strict>, z.ZodObject<{
8589
8658
  type: z.ZodLiteral<"DIVIDER">;
@@ -8658,9 +8727,9 @@ declare const ManifestSchema: z.ZodObject<{
8658
8727
  color: z.ZodOptional<z.ZodCustom<string, string>>;
8659
8728
  }, z.core.$strict>>;
8660
8729
  capitalization: z.ZodOptional<z.ZodEnum<{
8730
+ small: "small";
8661
8731
  none: "none";
8662
8732
  all: "all";
8663
- small: "small";
8664
8733
  }>>;
8665
8734
  }, z.core.$strict>, z.ZodObject<{
8666
8735
  type: z.ZodLiteral<"DIVIDER">;
@@ -9028,9 +9097,9 @@ declare const ManifestSchema: z.ZodObject<{
9028
9097
  color: z.ZodOptional<z.ZodCustom<string, string>>;
9029
9098
  }, z.core.$strict>>;
9030
9099
  capitalization: z.ZodOptional<z.ZodEnum<{
9100
+ small: "small";
9031
9101
  none: "none";
9032
9102
  all: "all";
9033
- small: "small";
9034
9103
  }>>;
9035
9104
  }, z.core.$strict>, z.ZodObject<{
9036
9105
  type: z.ZodLiteral<"DIVIDER">;
@@ -9105,9 +9174,9 @@ declare const ManifestSchema: z.ZodObject<{
9105
9174
  color: z.ZodOptional<z.ZodCustom<string, string>>;
9106
9175
  }, z.core.$strict>>;
9107
9176
  capitalization: z.ZodOptional<z.ZodEnum<{
9177
+ small: "small";
9108
9178
  none: "none";
9109
9179
  all: "all";
9110
- small: "small";
9111
9180
  }>>;
9112
9181
  }, z.core.$strict>, z.ZodObject<{
9113
9182
  type: z.ZodLiteral<"DIVIDER">;
@@ -9480,9 +9549,9 @@ declare const ManifestSchema: z.ZodObject<{
9480
9549
  color: z.ZodOptional<z.ZodCustom<string, string>>;
9481
9550
  }, z.core.$strict>>;
9482
9551
  capitalization: z.ZodOptional<z.ZodEnum<{
9552
+ small: "small";
9483
9553
  none: "none";
9484
9554
  all: "all";
9485
- small: "small";
9486
9555
  }>>;
9487
9556
  }, z.core.$strict>, z.ZodObject<{
9488
9557
  type: z.ZodLiteral<"DIVIDER">;
@@ -9557,9 +9626,9 @@ declare const ManifestSchema: z.ZodObject<{
9557
9626
  color: z.ZodOptional<z.ZodCustom<string, string>>;
9558
9627
  }, z.core.$strict>>;
9559
9628
  capitalization: z.ZodOptional<z.ZodEnum<{
9629
+ small: "small";
9560
9630
  none: "none";
9561
9631
  all: "all";
9562
- small: "small";
9563
9632
  }>>;
9564
9633
  }, z.core.$strict>, z.ZodObject<{
9565
9634
  type: z.ZodLiteral<"DIVIDER">;
@@ -10253,9 +10322,9 @@ declare const ManifestSchema: z.ZodObject<{
10253
10322
  color: z.ZodOptional<z.ZodCustom<string, string>>;
10254
10323
  }, z.core.$strict>>;
10255
10324
  capitalization: z.ZodOptional<z.ZodEnum<{
10325
+ small: "small";
10256
10326
  none: "none";
10257
10327
  all: "all";
10258
- small: "small";
10259
10328
  }>>;
10260
10329
  }, z.core.$strict>>;
10261
10330
  }, z.core.$strict>, z.ZodObject<{
@@ -10398,9 +10467,9 @@ declare const ManifestSchema: z.ZodObject<{
10398
10467
  color: z.ZodOptional<z.ZodCustom<string, string>>;
10399
10468
  }, z.core.$strict>>;
10400
10469
  capitalization: z.ZodOptional<z.ZodEnum<{
10470
+ small: "small";
10401
10471
  none: "none";
10402
10472
  all: "all";
10403
- small: "small";
10404
10473
  }>>;
10405
10474
  }, z.core.$strict>>;
10406
10475
  }, z.core.$strict>, z.ZodObject<{
@@ -10639,9 +10708,9 @@ declare const ManifestSchema: z.ZodObject<{
10639
10708
  color: z.ZodOptional<z.ZodCustom<string, string>>;
10640
10709
  }, z.core.$strict>>;
10641
10710
  capitalization: z.ZodOptional<z.ZodEnum<{
10711
+ small: "small";
10642
10712
  none: "none";
10643
10713
  all: "all";
10644
- small: "small";
10645
10714
  }>>;
10646
10715
  }, z.core.$strict>>;
10647
10716
  }, z.core.$strict>, z.ZodObject<{
@@ -11061,9 +11130,9 @@ declare const ManifestSchema: z.ZodObject<{
11061
11130
  color: z.ZodOptional<z.ZodCustom<string, string>>;
11062
11131
  }, z.core.$strict>>;
11063
11132
  capitalization: z.ZodOptional<z.ZodEnum<{
11133
+ small: "small";
11064
11134
  none: "none";
11065
11135
  all: "all";
11066
- small: "small";
11067
11136
  }>>;
11068
11137
  }, z.core.$strict>, z.ZodObject<{
11069
11138
  type: z.ZodLiteral<"DIVIDER">;
@@ -11138,9 +11207,9 @@ declare const ManifestSchema: z.ZodObject<{
11138
11207
  color: z.ZodOptional<z.ZodCustom<string, string>>;
11139
11208
  }, z.core.$strict>>;
11140
11209
  capitalization: z.ZodOptional<z.ZodEnum<{
11210
+ small: "small";
11141
11211
  none: "none";
11142
11212
  all: "all";
11143
- small: "small";
11144
11213
  }>>;
11145
11214
  }, z.core.$strict>, z.ZodObject<{
11146
11215
  type: z.ZodLiteral<"DIVIDER">;
@@ -11547,9 +11616,9 @@ declare const CustomSectionSchema: z.ZodObject<{
11547
11616
  color: z.ZodOptional<z.ZodCustom<string, string>>;
11548
11617
  }, z.core.$strict>>;
11549
11618
  capitalization: z.ZodOptional<z.ZodEnum<{
11619
+ small: "small";
11550
11620
  none: "none";
11551
11621
  all: "all";
11552
- small: "small";
11553
11622
  }>>;
11554
11623
  }, z.core.$strict>, z.ZodObject<{
11555
11624
  type: z.ZodLiteral<"DIVIDER">;
@@ -11624,9 +11693,9 @@ declare const CustomSectionSchema: z.ZodObject<{
11624
11693
  color: z.ZodOptional<z.ZodCustom<string, string>>;
11625
11694
  }, z.core.$strict>>;
11626
11695
  capitalization: z.ZodOptional<z.ZodEnum<{
11696
+ small: "small";
11627
11697
  none: "none";
11628
11698
  all: "all";
11629
- small: "small";
11630
11699
  }>>;
11631
11700
  }, z.core.$strict>, z.ZodObject<{
11632
11701
  type: z.ZodLiteral<"DIVIDER">;
@@ -11998,9 +12067,9 @@ declare const SectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
11998
12067
  color: z.ZodOptional<z.ZodCustom<string, string>>;
11999
12068
  }, z.core.$strict>>;
12000
12069
  capitalization: z.ZodOptional<z.ZodEnum<{
12070
+ small: "small";
12001
12071
  none: "none";
12002
12072
  all: "all";
12003
- small: "small";
12004
12073
  }>>;
12005
12074
  }, z.core.$strict>, z.ZodObject<{
12006
12075
  type: z.ZodLiteral<"DIVIDER">;
@@ -12075,9 +12144,9 @@ declare const SectionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
12075
12144
  color: z.ZodOptional<z.ZodCustom<string, string>>;
12076
12145
  }, z.core.$strict>>;
12077
12146
  capitalization: z.ZodOptional<z.ZodEnum<{
12147
+ small: "small";
12078
12148
  none: "none";
12079
12149
  all: "all";
12080
- small: "small";
12081
12150
  }>>;
12082
12151
  }, z.core.$strict>, z.ZodObject<{
12083
12152
  type: z.ZodLiteral<"DIVIDER">;
@@ -12452,9 +12521,9 @@ declare const TemplatePageSchema: z.ZodObject<{
12452
12521
  color: z.ZodOptional<z.ZodCustom<string, string>>;
12453
12522
  }, z.core.$strict>>;
12454
12523
  capitalization: z.ZodOptional<z.ZodEnum<{
12524
+ small: "small";
12455
12525
  none: "none";
12456
12526
  all: "all";
12457
- small: "small";
12458
12527
  }>>;
12459
12528
  }, z.core.$strict>, z.ZodObject<{
12460
12529
  type: z.ZodLiteral<"DIVIDER">;
@@ -12529,9 +12598,9 @@ declare const TemplatePageSchema: z.ZodObject<{
12529
12598
  color: z.ZodOptional<z.ZodCustom<string, string>>;
12530
12599
  }, z.core.$strict>>;
12531
12600
  capitalization: z.ZodOptional<z.ZodEnum<{
12601
+ small: "small";
12532
12602
  none: "none";
12533
12603
  all: "all";
12534
- small: "small";
12535
12604
  }>>;
12536
12605
  }, z.core.$strict>, z.ZodObject<{
12537
12606
  type: z.ZodLiteral<"DIVIDER">;
@@ -12907,9 +12976,9 @@ declare const TemplatePageNamedSchema: z.ZodObject<{
12907
12976
  color: z.ZodOptional<z.ZodCustom<string, string>>;
12908
12977
  }, z.core.$strict>>;
12909
12978
  capitalization: z.ZodOptional<z.ZodEnum<{
12979
+ small: "small";
12910
12980
  none: "none";
12911
12981
  all: "all";
12912
- small: "small";
12913
12982
  }>>;
12914
12983
  }, z.core.$strict>, z.ZodObject<{
12915
12984
  type: z.ZodLiteral<"DIVIDER">;
@@ -12984,9 +13053,9 @@ declare const TemplatePageNamedSchema: z.ZodObject<{
12984
13053
  color: z.ZodOptional<z.ZodCustom<string, string>>;
12985
13054
  }, z.core.$strict>>;
12986
13055
  capitalization: z.ZodOptional<z.ZodEnum<{
13056
+ small: "small";
12987
13057
  none: "none";
12988
13058
  all: "all";
12989
- small: "small";
12990
13059
  }>>;
12991
13060
  }, z.core.$strict>, z.ZodObject<{
12992
13061
  type: z.ZodLiteral<"DIVIDER">;
@@ -13422,9 +13491,9 @@ declare const TemplateConfigurationSectionSchema: z.ZodDiscriminatedUnion<[z.Zod
13422
13491
  color: z.ZodOptional<z.ZodCustom<string, string>>;
13423
13492
  }, z.core.$strict>>;
13424
13493
  capitalization: z.ZodOptional<z.ZodEnum<{
13494
+ small: "small";
13425
13495
  none: "none";
13426
13496
  all: "all";
13427
- small: "small";
13428
13497
  }>>;
13429
13498
  }, z.core.$strict>, z.ZodObject<{
13430
13499
  type: z.ZodLiteral<"DIVIDER">;
@@ -13499,9 +13568,9 @@ declare const TemplateConfigurationSectionSchema: z.ZodDiscriminatedUnion<[z.Zod
13499
13568
  color: z.ZodOptional<z.ZodCustom<string, string>>;
13500
13569
  }, z.core.$strict>>;
13501
13570
  capitalization: z.ZodOptional<z.ZodEnum<{
13571
+ small: "small";
13502
13572
  none: "none";
13503
13573
  all: "all";
13504
- small: "small";
13505
13574
  }>>;
13506
13575
  }, z.core.$strict>, z.ZodObject<{
13507
13576
  type: z.ZodLiteral<"DIVIDER">;
@@ -13926,9 +13995,9 @@ declare const TemplateConfigurationSchema: z.ZodObject<{
13926
13995
  color: z.ZodOptional<z.ZodCustom<string, string>>;
13927
13996
  }, z.core.$strict>>;
13928
13997
  capitalization: z.ZodOptional<z.ZodEnum<{
13998
+ small: "small";
13929
13999
  none: "none";
13930
14000
  all: "all";
13931
- small: "small";
13932
14001
  }>>;
13933
14002
  }, z.core.$strict>, z.ZodObject<{
13934
14003
  type: z.ZodLiteral<"DIVIDER">;
@@ -14003,9 +14072,9 @@ declare const TemplateConfigurationSchema: z.ZodObject<{
14003
14072
  color: z.ZodOptional<z.ZodCustom<string, string>>;
14004
14073
  }, z.core.$strict>>;
14005
14074
  capitalization: z.ZodOptional<z.ZodEnum<{
14075
+ small: "small";
14006
14076
  none: "none";
14007
14077
  all: "all";
14008
- small: "small";
14009
14078
  }>>;
14010
14079
  }, z.core.$strict>, z.ZodObject<{
14011
14080
  type: z.ZodLiteral<"DIVIDER">;
@@ -14373,9 +14442,9 @@ declare const TemplateConfigurationSchema: z.ZodObject<{
14373
14442
  color: z.ZodOptional<z.ZodCustom<string, string>>;
14374
14443
  }, z.core.$strict>>;
14375
14444
  capitalization: z.ZodOptional<z.ZodEnum<{
14445
+ small: "small";
14376
14446
  none: "none";
14377
14447
  all: "all";
14378
- small: "small";
14379
14448
  }>>;
14380
14449
  }, z.core.$strict>, z.ZodObject<{
14381
14450
  type: z.ZodLiteral<"DIVIDER">;
@@ -14450,9 +14519,9 @@ declare const TemplateConfigurationSchema: z.ZodObject<{
14450
14519
  color: z.ZodOptional<z.ZodCustom<string, string>>;
14451
14520
  }, z.core.$strict>>;
14452
14521
  capitalization: z.ZodOptional<z.ZodEnum<{
14522
+ small: "small";
14453
14523
  none: "none";
14454
14524
  all: "all";
14455
- small: "small";
14456
14525
  }>>;
14457
14526
  }, z.core.$strict>, z.ZodObject<{
14458
14527
  type: z.ZodLiteral<"DIVIDER">;
@@ -14884,9 +14953,9 @@ declare const TemplateSchema: z.ZodObject<{
14884
14953
  color: z.ZodOptional<z.ZodCustom<string, string>>;
14885
14954
  }, z.core.$strict>>;
14886
14955
  capitalization: z.ZodOptional<z.ZodEnum<{
14956
+ small: "small";
14887
14957
  none: "none";
14888
14958
  all: "all";
14889
- small: "small";
14890
14959
  }>>;
14891
14960
  }, z.core.$strict>, z.ZodObject<{
14892
14961
  type: z.ZodLiteral<"DIVIDER">;
@@ -14961,9 +15030,9 @@ declare const TemplateSchema: z.ZodObject<{
14961
15030
  color: z.ZodOptional<z.ZodCustom<string, string>>;
14962
15031
  }, z.core.$strict>>;
14963
15032
  capitalization: z.ZodOptional<z.ZodEnum<{
15033
+ small: "small";
14964
15034
  none: "none";
14965
15035
  all: "all";
14966
- small: "small";
14967
15036
  }>>;
14968
15037
  }, z.core.$strict>, z.ZodObject<{
14969
15038
  type: z.ZodLiteral<"DIVIDER">;
@@ -15331,9 +15400,9 @@ declare const TemplateSchema: z.ZodObject<{
15331
15400
  color: z.ZodOptional<z.ZodCustom<string, string>>;
15332
15401
  }, z.core.$strict>>;
15333
15402
  capitalization: z.ZodOptional<z.ZodEnum<{
15403
+ small: "small";
15334
15404
  none: "none";
15335
15405
  all: "all";
15336
- small: "small";
15337
15406
  }>>;
15338
15407
  }, z.core.$strict>, z.ZodObject<{
15339
15408
  type: z.ZodLiteral<"DIVIDER">;
@@ -15408,9 +15477,9 @@ declare const TemplateSchema: z.ZodObject<{
15408
15477
  color: z.ZodOptional<z.ZodCustom<string, string>>;
15409
15478
  }, z.core.$strict>>;
15410
15479
  capitalization: z.ZodOptional<z.ZodEnum<{
15480
+ small: "small";
15411
15481
  none: "none";
15412
15482
  all: "all";
15413
- small: "small";
15414
15483
  }>>;
15415
15484
  }, z.core.$strict>, z.ZodObject<{
15416
15485
  type: z.ZodLiteral<"DIVIDER">;
@@ -15783,9 +15852,9 @@ declare const TemplateSchema: z.ZodObject<{
15783
15852
  color: z.ZodOptional<z.ZodCustom<string, string>>;
15784
15853
  }, z.core.$strict>>;
15785
15854
  capitalization: z.ZodOptional<z.ZodEnum<{
15855
+ small: "small";
15786
15856
  none: "none";
15787
15857
  all: "all";
15788
- small: "small";
15789
15858
  }>>;
15790
15859
  }, z.core.$strict>, z.ZodObject<{
15791
15860
  type: z.ZodLiteral<"DIVIDER">;
@@ -15860,9 +15929,9 @@ declare const TemplateSchema: z.ZodObject<{
15860
15929
  color: z.ZodOptional<z.ZodCustom<string, string>>;
15861
15930
  }, z.core.$strict>>;
15862
15931
  capitalization: z.ZodOptional<z.ZodEnum<{
15932
+ small: "small";
15863
15933
  none: "none";
15864
15934
  all: "all";
15865
- small: "small";
15866
15935
  }>>;
15867
15936
  }, z.core.$strict>, z.ZodObject<{
15868
15937
  type: z.ZodLiteral<"DIVIDER">;
@@ -15949,6 +16018,17 @@ type TemplateConfiguration = z.infer<typeof TemplateConfigurationSchema>;
15949
16018
 
15950
16019
  type TranslationSettings = Record<string, Record<string, string>>;
15951
16020
 
16021
+ /**
16022
+ * Return type for `useCurrentLanguage` composable.
16023
+ */
16024
+ interface UseCurrentLanguageReturn {
16025
+ /**
16026
+ * Current language code (e.g., 'en', 'nl', 'fr').
16027
+ * Falls back to main language, then to 'en' if no language is selected.
16028
+ */
16029
+ currentLanguage: ComputedRef<Language['code']>;
16030
+ }
16031
+
15952
16032
  interface AppBaseContext {
15953
16033
  readonly appName: string;
15954
16034
  readonly blockName: string;
@@ -15983,72 +16063,6 @@ declare function createVueClientApp<C, D>(appComponent: Component, extensions?:
15983
16063
  };
15984
16064
  };
15985
16065
 
15986
- interface InstantsiteTilePromise {
15987
- add(callback: (id: string) => void): void;
15988
- }
15989
- interface InstantsiteJSAPI {
15990
- /**
15991
- * Retrieves the current site ID.
15992
- *
15993
- * @returns {number} The site ID.
15994
- */
15995
- getSiteId: () => number;
15996
- /**
15997
- * Retrieves the public token for a given app.
15998
- *
15999
- * @param {string} appId - The ID of the app.
16000
- * @returns {string | undefined} The app's public token, or `undefined` if not found.
16001
- */
16002
- getAppPublicToken: (appId: string) => string | undefined;
16003
- /**
16004
- * Retrieves the public configuration for a given app.
16005
- *
16006
- * @param {string} appId - The ID of the app.
16007
- * @returns {string | undefined} The app's public configuration, or `undefined` if not found.
16008
- */
16009
- getAppPublicConfig: (appId: string) => string | undefined;
16010
- /**
16011
- * An event that triggers when a tile is loaded.
16012
- *
16013
- * @type {InstantsiteTilePromise}
16014
- *
16015
- * @example
16016
- * ```ts
16017
- * const tileLoadedPromise = instantsiteJsApi?.onTileLoaded;
16018
- *
16019
- * tileLoadedPromise?.add((tileId) => {
16020
- * console.log('Tile loaded:', tileId);
16021
- * });
16022
- * ```
16023
- */
16024
- onTileLoaded: InstantsiteTilePromise;
16025
- /**
16026
- * An event that triggers when a tile is unloaded.
16027
- *
16028
- * @type {InstantsiteTilePromise}
16029
- *
16030
- * @example
16031
- * ```ts
16032
- * const tileUnloadedPromise = instantsiteJsApi?.onTileUnloaded;
16033
- *
16034
- * tileUnloadedPromise?.add((tileId) => {
16035
- * console.log('Tile unloaded:', tileId);
16036
- * });
16037
- * ```
16038
- */
16039
- onTileUnloaded: InstantsiteTilePromise;
16040
- /**
16041
- * Opens the search page with the specified keyword.
16042
- *
16043
- * @param {string | undefined} keyword - The keyword to search for.
16044
- * @returns {void}
16045
- */
16046
- openSearchPage: (keyword: string | undefined) => void;
16047
- }
16048
-
16049
- /** Composable for Instantsite JS API. Returns `window.instantsite` for platform interaction. */
16050
- declare function useInstantsiteJsApi(): InstantsiteJSAPI | undefined;
16051
-
16052
16066
  declare function createLayoutApp<C, D>(component: Component): {
16053
16067
  component: Component;
16054
16068
  initState(app: App<Element>, content: C, design: D, defaults: Record<string, unknown>): void;
@@ -16056,11 +16070,11 @@ declare function createLayoutApp<C, D>(component: Component): {
16056
16070
  };
16057
16071
 
16058
16072
  interface GlobalColors {
16059
- title?: Color;
16060
- body?: Color;
16061
- button?: Color;
16062
- link?: Color;
16063
- background?: Color;
16073
+ title?: Color$1;
16074
+ body?: Color$1;
16075
+ button?: Color$1;
16076
+ link?: Color$1;
16077
+ background?: Color$1;
16064
16078
  }
16065
16079
  interface GlobalFonts {
16066
16080
  title: string;
@@ -16121,6 +16135,302 @@ declare function createVueServerApp<C, D>(appComponent: Component, extensions?:
16121
16135
  };
16122
16136
  };
16123
16137
 
16138
+ /**
16139
+ * Color Utilities
16140
+ *
16141
+ * Utilities for working with Crane Color objects and color calculations.
16142
+ * Includes hex extraction and contrast color calculation.
16143
+ */
16144
+ /**
16145
+ * Safely extracts hex color from a Color object or string
16146
+ *
16147
+ * Handles multiple input types:
16148
+ * - Color object with hex property
16149
+ * - String (returned as-is)
16150
+ * - undefined/null (returns fallback)
16151
+ *
16152
+ * @param color - The color value (Color object, string, or undefined)
16153
+ * @param fallback - Fallback color if extraction fails
16154
+ * @returns Hex color string
16155
+ *
16156
+ * @example
16157
+ * ```typescript
16158
+ * // With Color object
16159
+ * const hex = getColorHex(titleDesign.color, '#FFFFFF')
16160
+ *
16161
+ * // With string
16162
+ * const hex = getColorHex('#FF0000', '#000000') // Returns '#FF0000'
16163
+ *
16164
+ * // With undefined
16165
+ * const hex = getColorHex(undefined, '#000000') // Returns '#000000'
16166
+ * ```
16167
+ */
16168
+ declare function getColorHex(color: Color | string | undefined | null, fallback?: string): string;
16169
+ /**
16170
+ * Returns true if background color is dark enough to require light text.
16171
+ * Uses WCAG relative luminance formula for accurate contrast calculation.
16172
+ *
16173
+ * @param backgroundColor - Hex color string (e.g., '#FF0000')
16174
+ * @returns `true` for dark colors, `false` for light colors
16175
+ */
16176
+ declare function isColorDark(backgroundColor: string): boolean;
16177
+ /**
16178
+ * Returns the best contrast text color for a given background.
16179
+ *
16180
+ * @param backgroundColorHex - Hex color string
16181
+ * @param darkTextColorHex - Color used on light backgrounds
16182
+ * @param lightTextColorHex - Color used on dark backgrounds
16183
+ */
16184
+ declare function getContrastTextColor(backgroundColorHex: string, darkTextColorHex?: string, lightTextColorHex?: string): string;
16185
+
16186
+ /**
16187
+ * Text Style Utilities
16188
+ *
16189
+ * Utilities for creating CSS styles from Crane TextDesignData.
16190
+ */
16191
+
16192
+ /**
16193
+ * Creates CSS properties from Crane TextDesignData
16194
+ *
16195
+ * Handles:
16196
+ * - Font family
16197
+ * - Font size (number to px conversion)
16198
+ * - Color (Color object to hex)
16199
+ * - Bold/Italic styles
16200
+ * - Visibility (returns display: none if not visible)
16201
+ *
16202
+ * @param design - TextDesignData from useTextElementDesign
16203
+ * @param options - Default values for missing design properties
16204
+ * @returns CSS properties object for Vue style binding
16205
+ *
16206
+ * @example
16207
+ * ```typescript
16208
+ * import { createTextStyle } from '@lightspeed/crane-api'
16209
+ * import { useTextElementDesign } from '@lightspeed/crane-api'
16210
+ *
16211
+ * const titleDesign = useTextElementDesign<Design>('title')
16212
+ * const titleStyle = computed(() => createTextStyle(titleDesign, {
16213
+ * defaultFont: 'Inter',
16214
+ * defaultSize: 24,
16215
+ * defaultColor: '#333333',
16216
+ * }))
16217
+ *
16218
+ * // In template:
16219
+ * // <h1 :style="titleStyle">{{ title }}</h1>
16220
+ * ```
16221
+ */
16222
+ declare function createTextStyle(design: TextDesignData | undefined, options?: TextStyleOptions): CSSProperties;
16223
+
16224
+ /**
16225
+ * useBackgroundStyle Composable
16226
+ *
16227
+ * Creates reactive CSS background styles from Crane BackgroundDesignData.
16228
+ * Supports solid colors and gradients.
16229
+ *
16230
+ * @example
16231
+ * ```typescript
16232
+ * import { useBackgroundStyle } from '@lightspeed/crane-api'
16233
+ * import { useBackgroundElementDesign } from '@lightspeed/crane-api'
16234
+ *
16235
+ * const backgroundDesign = useBackgroundElementDesign<Design>('background')
16236
+ * const backgroundStyle = useBackgroundStyle(backgroundDesign)
16237
+ *
16238
+ * // In template:
16239
+ * // <div :style="backgroundStyle">...</div>
16240
+ * ```
16241
+ */
16242
+
16243
+ /**
16244
+ * Extracts background styles from BackgroundDesignData.
16245
+ *
16246
+ * Returns a style object suitable for CSS `:style` bindings.
16247
+ *
16248
+ * **Gradient fallback behaviour:**
16249
+ * When `background.type === 'gradient'`, each of `fromColor` and `toColor` is resolved
16250
+ * independently via `getColorHex`. If a color is missing/undefined and `fallbackColor` is
16251
+ * an empty string (the default), `getColorHex` returns `''` and the whole style object is
16252
+ * returned as `{}`. If `fallbackColor` is a non-empty string, the missing color is replaced
16253
+ * by that fallback, which may result in a gradient where both stops are the same colour
16254
+ * (e.g. `linear-gradient(to right, #FFFFFF, #FFFFFF)`). This is valid CSS and visually
16255
+ * equivalent to a solid colour, but it is worth being aware of when debugging gradient output.
16256
+ *
16257
+ * @param backgroundDesign - BackgroundDesignData from useBackgroundElementDesign
16258
+ * @param options - Configuration options
16259
+ * @returns CSS background style object
16260
+ *
16261
+ * @example
16262
+ * ```typescript
16263
+ * const backgroundDesign = useBackgroundElementDesign<Design>('background')
16264
+ * const bgStyle = getBackgroundStyle(backgroundDesign, { fallbackColor: '#FFFFFF' })
16265
+ * // Returns: { backgroundColor: '#FF0000' } or { backgroundImage: 'linear-gradient(...)' }
16266
+ * // If one gradient colour is missing and fallbackColor is '#FFFFFF':
16267
+ * // Returns: { backgroundImage: 'linear-gradient(to right, #FFFFFF, #FFFFFF)' }
16268
+ * ```
16269
+ */
16270
+ declare function getBackgroundStyle(backgroundDesign: BackgroundDesignData | undefined, options?: BackgroundStyleOptions): StyleValue;
16271
+ /**
16272
+ * Creates reactive background styles from Crane BackgroundDesignData
16273
+ *
16274
+ * Supports solid colors and gradients. Returns a computed style object
16275
+ * that can be bound directly to :style attribute.
16276
+ *
16277
+ * @param backgroundDesign - Reactive BackgroundDesignData from useBackgroundElementDesign.
16278
+ * Must be a reactive object (not a plain snapshot) for changes to be tracked.
16279
+ * @param options - Configuration options
16280
+ * @returns Computed style object with backgroundColor or backgroundImage
16281
+ *
16282
+ * @example
16283
+ * ```typescript
16284
+ * const backgroundDesign = useBackgroundElementDesign<Design>('background')
16285
+ * const backgroundStyle = useBackgroundStyle(backgroundDesign)
16286
+ *
16287
+ * // In template:
16288
+ * // <div :style="backgroundStyle">...</div>
16289
+ * ```
16290
+ */
16291
+ declare function useBackgroundStyle(backgroundDesign: Reactive<BackgroundDesignData> | BackgroundDesignData | undefined, options?: BackgroundStyleOptions): ComputedRef<StyleValue>;
16292
+
16293
+ /**
16294
+ * useButtonStyles Composable
16295
+ *
16296
+ * Generates dynamic button styles based on Crane's ButtonDesignData.
16297
+ * Handles size, appearance, shape, and automatic contrast text color.
16298
+ *
16299
+ * @example
16300
+ * ```typescript
16301
+ * import { useButtonStyles } from '@lightspeed/crane-api'
16302
+ * import { useButtonElementDesign } from '@lightspeed/crane-api'
16303
+ *
16304
+ * const ctaButtonDesign = useButtonElementDesign<Design>('cta_button')
16305
+ * const ctaButtonStyle = useButtonStyles(ctaButtonDesign)
16306
+ *
16307
+ * // In template:
16308
+ * // <button :style="ctaButtonStyle">Click me</button>
16309
+ * ```
16310
+ */
16311
+
16312
+ /**
16313
+ * Generates dynamic button styles based on Crane's button design data
16314
+ *
16315
+ * Handles:
16316
+ * - Size: 'small', 'medium', 'large' (configurable via options)
16317
+ * - Appearance: 'solid-button', 'outline-button', 'text-link'
16318
+ * - Style (shape): 'rectangle', 'round-corner', 'pill'
16319
+ *
16320
+ * @param buttonDesign - Reactive button design data from useButtonElementDesign.
16321
+ * Must be a reactive object (not a plain snapshot) for changes to be tracked.
16322
+ * @param options - Optional configuration (e.g., custom size styles)
16323
+ * @returns Computed style object for inline application
16324
+ */
16325
+ declare function useButtonStyles(buttonDesign: Reactive<ButtonDesignData> | Partial<ButtonDesignData> | undefined, options?: UseButtonStylesOptions): ComputedRef<Record<string, string>>;
16326
+
16327
+ /**
16328
+ * useCurrentLanguage Composable
16329
+ *
16330
+ * Provides access to the current language from site context.
16331
+ * Useful for i18n, API calls with language parameter, and conditional rendering.
16332
+ *
16333
+ * @example
16334
+ * ```typescript
16335
+ * import { useCurrentLanguage } from '@lightspeed/crane-api'
16336
+ *
16337
+ * const { currentLanguage } = useCurrentLanguage()
16338
+ *
16339
+ * // Use in API calls
16340
+ * fetchProducts({ lang: currentLanguage.value })
16341
+ *
16342
+ * // Use in computed
16343
+ * const greeting = computed(() =>
16344
+ * currentLanguage.value === 'fr' ? 'Bonjour' : 'Hello'
16345
+ * )
16346
+ * ```
16347
+ */
16348
+
16349
+ /**
16350
+ * Get current selected language code from site languages.
16351
+ *
16352
+ * Fallback chain: selected language → main language → 'en'.
16353
+ *
16354
+ * @param languages - Array of available languages from site content (global Language type)
16355
+ * @returns Current language code (e.g., 'en', 'nl', 'fr')
16356
+ */
16357
+ declare function getCurrentLanguageCode(languages: Language[] | undefined): Language['code'];
16358
+ /**
16359
+ * Composable to get current language from site context.
16360
+ *
16361
+ * Uses the global Language type from types.d.ts.
16362
+ * Fallback chain: selected language → main language → 'en'.
16363
+ *
16364
+ * @returns Object containing currentLanguage computed ref
16365
+ */
16366
+ declare function useCurrentLanguage(): UseCurrentLanguageReturn;
16367
+
16368
+ interface InstantsiteTilePromise {
16369
+ add(callback: (id: string) => void): void;
16370
+ }
16371
+ interface InstantsiteJSAPI {
16372
+ /**
16373
+ * Retrieves the current site ID.
16374
+ *
16375
+ * @returns {number} The site ID.
16376
+ */
16377
+ getSiteId: () => number;
16378
+ /**
16379
+ * Retrieves the public token for a given app.
16380
+ *
16381
+ * @param {string} appId - The ID of the app.
16382
+ * @returns {string | undefined} The app's public token, or `undefined` if not found.
16383
+ */
16384
+ getAppPublicToken: (appId: string) => string | undefined;
16385
+ /**
16386
+ * Retrieves the public configuration for a given app.
16387
+ *
16388
+ * @param {string} appId - The ID of the app.
16389
+ * @returns {string | undefined} The app's public configuration, or `undefined` if not found.
16390
+ */
16391
+ getAppPublicConfig: (appId: string) => string | undefined;
16392
+ /**
16393
+ * An event that triggers when a tile is loaded.
16394
+ *
16395
+ * @type {InstantsiteTilePromise}
16396
+ *
16397
+ * @example
16398
+ * ```ts
16399
+ * const tileLoadedPromise = instantsiteJsApi?.onTileLoaded;
16400
+ *
16401
+ * tileLoadedPromise?.add((tileId) => {
16402
+ * console.log('Tile loaded:', tileId);
16403
+ * });
16404
+ * ```
16405
+ */
16406
+ onTileLoaded: InstantsiteTilePromise;
16407
+ /**
16408
+ * An event that triggers when a tile is unloaded.
16409
+ *
16410
+ * @type {InstantsiteTilePromise}
16411
+ *
16412
+ * @example
16413
+ * ```ts
16414
+ * const tileUnloadedPromise = instantsiteJsApi?.onTileUnloaded;
16415
+ *
16416
+ * tileUnloadedPromise?.add((tileId) => {
16417
+ * console.log('Tile unloaded:', tileId);
16418
+ * });
16419
+ * ```
16420
+ */
16421
+ onTileUnloaded: InstantsiteTilePromise;
16422
+ /**
16423
+ * Opens the search page with the specified keyword.
16424
+ *
16425
+ * @param {string | undefined} keyword - The keyword to search for.
16426
+ * @returns {void}
16427
+ */
16428
+ openSearchPage: (keyword: string | undefined) => void;
16429
+ }
16430
+
16431
+ /** Composable for Instantsite JS API. Returns `window.instantsite` for platform interaction. */
16432
+ declare function useInstantsiteJsApi(): InstantsiteJSAPI | undefined;
16433
+
16124
16434
  /**
16125
16435
  * Composable for accessing BUTTON content with action link.
16126
16436
  *
@@ -16179,7 +16489,7 @@ declare function useButtonElementContent<CONTENT>(elementName: string, externalC
16179
16489
  * @returns `Reactive<CategorySelector>` — reactive object with:
16180
16490
  * - `categories: ComputedRef<CategoryListComponentItem[]>` — array of category objects with `id`, `name`, `url`, `imageUrl`, etc.
16181
16491
  * - `categoryIds: ComputedRef<Array<number>>` — array of selected category IDs
16182
- * - `hasContent: ComputedRef<boolean>` — `true` if selector data exists
16492
+ * - `hasContent: ComputedRef<boolean>` — `true` if there are categories to render
16183
16493
  * - `hasCategories: ComputedRef<boolean>` — `true` if at least one category is selected
16184
16494
  *
16185
16495
  * @see {@link CategorySelectorContent}
@@ -16405,7 +16715,7 @@ declare function useNavigationMenuElementContent<CONTENT>(): {
16405
16715
  * - `products: ComputedRef<ProductListComponentItem[]>` — array of product objects with `id`, `name`, `price`, `imageUrl`, etc.
16406
16716
  * - `categories: ComputedRef<CategoryListComponentItem[]>` — array of categories (when using category selection)
16407
16717
  * - `categoryId: ComputedRef<number>` — selected category ID (when using category selection)
16408
- * - `hasContent: ComputedRef<boolean>` — `true` if selector data exists
16718
+ * - `hasContent: ComputedRef<boolean>` — `true` if there are products to render
16409
16719
  * - `hasProducts: ComputedRef<boolean>` — `true` if at least one product is selected
16410
16720
  *
16411
16721
  * @see {@link ProductSelectorContent}
@@ -16692,7 +17002,7 @@ declare function useBackgroundElementDesign<DESIGN>(elementName: keyof DESIGN):
16692
17002
  * </button>
16693
17003
  * ```
16694
17004
  */
16695
- declare function useButtonElementDesign<DESIGN>(elementName: keyof DESIGN): Reactive<ButtonDesignData>;
17005
+ declare function useButtonElementDesign<DESIGN>(elementName: keyof DESIGN): Reactive<ButtonDesignData$1>;
16696
17006
 
16697
17007
  /**
16698
17008
  * Composable for accessing IMAGE design settings.
@@ -17762,5 +18072,5 @@ declare const translation: {
17762
18072
  readonly init: (config: TranslationSettings) => TranslationSettings;
17763
18073
  };
17764
18074
 
17765
- export { ActionLinkTypeEnum, BackgroundStyleEnum, ButtonAppearanceEnum, ButtonShapeEnum, ButtonSizeEnum, ButtonTypeEnum, CatalogLayoutSlot, CategoryLayoutSlot, Color, ConfigTypeEnum, DesignEditorType, EditorTypes, ImageSet, InstantsiteJsEvent, LogoTypeEnum, OverlayType, OverlayTypeEnum, PluginTypeEnum, ProductLayoutSlot, SectionTypeEnum, TemplateCategoriesList, ValidationTypeEnum, asStructuredColor, collection, content, createLayoutApp, createVueClientApp, createVueServerApp, design, layout, section, showcase, template, translation, useAccordionElementDesign, useBackgroundElementDesign, useButtonElementContent, useButtonElementDesign, useCategorySelectorElementContent, useDeckElementContent, useImageElementContent, useImageElementDesign, useInputboxElementContent, useInstantsiteJsApi, useLayoutElementDesign, useLogoElementContent, useLogoElementDesign, useMenuElementContent, useNavigationMenuElementContent, useProductSelectorElementContent, useSelectboxElementContent, useSelectboxElementDesign, useTextElementDesign, useTextareaElementContent, useTextareaElementDesign, useToggleElementContent, useToggleElementDesign, useTranslation, useVueBaseProps };
17766
- export type { AccordionDesignData, AccordionDesignEditor, AccordionDesignEditorDefaults, AccordionDesignItemData, AccordionItem, AccordionShowcaseDesignEditorDefaults, ActionLink, AppBaseContext, AppBaseData, AppBaseState, Background, BackgroundDesignData$1 as BackgroundDesignData, BackgroundDesignEditor, BackgroundDesignEditorDefaults, BackgroundDesignEditorDefaultsTransformed, BackgroundTransformed, BackgroundType, ButtonAppearance, ButtonContentData, ButtonContentEditor, ButtonContentEditorDefaults, ButtonDesignData, ButtonDesignEditor, ButtonDesignEditorDefaults, ButtonDesignEditorDefaultsTransformed, ButtonSize, ButtonStyle, CapitalizationType, Card, CategorySelectorContent, CategorySelectorContentEditor, CategorySelectorContentEditorDefaults, CategorySelectorData, CollectionDescriptor, CollectionDescriptorContent, CollectionDescriptorMetadata, ColorPickerDesignEditor, ColorPickerDesignEditorDefaults, ColorPickerDesignEditorDefaultsTransformed, ContentEditor, ContentEditorDefaults, ContentSettings, CustomSection, Deck, DeckContent, DeckContentEditor, DefaultSection, DesignEditor, DesignEditorDefaults, DesignEditorDefaultsTransformed, DesignSettings, DividerContentEditor, DividerContentEditorDefaults, DividerDesignEditor, Font, Frame, GlobalColorsString, GlobalDesign$1 as GlobalDesign, GlobalFontsString, GlobalTextSizeString, GradientColor, GradientColorTransformed, HSLColor, ImageBorderInfoData, ImageContent, ImageContentData, ImageContentEditor, ImageContentEditorDefaults, ImageDesignData$1 as ImageDesignData, ImageDesignEditor, ImageDesignEditorDefaults, ImageDesignEditorDefaultsTransformed, ImageInfoData, InfoContentEditor, InfoContentEditorDefaults, InfoDesignEditor, InfoDesignEditorDefaults, InputBoxContent, InputboxContentEditor, InputboxContentEditorDefaults, InstantsiteJSAPI$1 as InstantsiteJSAPI, InstantsiteTilePromise$1 as InstantsiteTilePromise, InternalColor, LayoutDesignData, LayoutDesignOverride, LayoutSettings, LogoContent, LogoContentData, LogoContentEditor, LogoContentEditorDefaults, LogoDesignData$1 as LogoDesignData, LogoDesignEditor, LogoDesignEditorDefaults, LogoDesignEditorDefaultsTransformed, LogoType, MandatoryContentSettings, MandatoryDesignSettings, Manifest, MenuContent, MenuContentData, MenuContentEditor, MenuItem, NavigationMenuContentEditor, Overlay, OverlayTransformed, ProductSelectorContent, ProductSelectorContentEditor, ProductSelectorContentEditorDefaults, ProductSelectorData, RGBAColor, Section, SelectBoxContent, SelectboxContentEditor, SelectboxContentEditorDefaults, SelectboxContentOption, SelectboxDesignData, SelectboxDesignEditor, SelectboxDesignEditorDefaults, SelectboxDesignEditorDefaultsTransformed, Showcase, ShowcaseAccordionItem, ShowcaseContentEditorsDefaults, ShowcaseDeckContentEditorDefaults, ShowcaseImageContentEditorDefaults, ShowcaseInputboxContentEditorDefaults, ShowcaseLogoContentEditorDefaults, ShowcaseMenuContentEditorDefaults, ShowcaseNavigationMenuContentEditorDefaults, ShowcaseOverride, ShowcaseTextareaContentEditorDefaults, SolidColor, SolidColorTransformed, StorePageConfiguration, StorefrontSection, StorefrontSectionId, Template, TemplateConfiguration, TemplateConfigurationSection, TemplateCustomSection, TemplateDefaultSection, TemplateMetadata, TemplatePage, TemplatePageNamed, TemplateStorefrontSection, TextAreaContent, TextDesignData$1 as TextDesignData, TextDesignEditor, TextDesignEditorDefaults, TextDesignEditorDefaultsTransformed, TextSize, TextareaContentEditor, TextareaContentEditorDefaults, TextareaDesignData$1 as TextareaDesignData, ToggleContent, ToggleContentData, ToggleContentEditor, ToggleContentEditorDefaults, ToggleDesignData, ToggleDesignEditor, ToggleDesignEditorDefaults, ToggleDesignEditorDefaultsTransformed, TransformedFrame, TranslationSettings, VuegaPageId };
18075
+ export { ActionLinkTypeEnum, BackgroundStyleEnum, ButtonAppearanceEnum, ButtonShapeEnum, ButtonSizeEnum, ButtonTypeEnum, CatalogLayoutSlot, CategoryLayoutSlot, Color$1 as Color, ConfigTypeEnum, DesignEditorType, EditorTypes, ImageSet, InstantsiteJsEvent, LogoTypeEnum, OverlayType, OverlayTypeEnum, PluginTypeEnum, ProductLayoutSlot, SectionTypeEnum, TemplateCategoriesList, ValidationTypeEnum, asStructuredColor, collection, content, createLayoutApp, createTextStyle, createVueClientApp, createVueServerApp, design, getBackgroundStyle, getColorHex, getContrastTextColor, getCurrentLanguageCode, isColorDark, layout, section, showcase, template, translation, useAccordionElementDesign, useBackgroundElementDesign, useBackgroundStyle, useButtonElementContent, useButtonElementDesign, useButtonStyles, useCategorySelectorElementContent, useCurrentLanguage, useDeckElementContent, useImageElementContent, useImageElementDesign, useInputboxElementContent, useInstantsiteJsApi, useLayoutElementDesign, useLogoElementContent, useLogoElementDesign, useMenuElementContent, useNavigationMenuElementContent, useProductSelectorElementContent, useSelectboxElementContent, useSelectboxElementDesign, useTextElementDesign, useTextareaElementContent, useTextareaElementDesign, useToggleElementContent, useToggleElementDesign, useTranslation, useVueBaseProps };
18076
+ export type { AccordionDesignData, AccordionDesignEditor, AccordionDesignEditorDefaults, AccordionDesignItemData, AccordionItem, AccordionShowcaseDesignEditorDefaults, ActionLink, AppBaseContext, AppBaseData, AppBaseState, Background, BackgroundDesignData$1 as BackgroundDesignData, BackgroundDesignEditor, BackgroundDesignEditorDefaults, BackgroundDesignEditorDefaultsTransformed, BackgroundStyleOptions, BackgroundTransformed, BackgroundType, ButtonAppearance, ButtonContentData, ButtonContentEditor, ButtonContentEditorDefaults, ButtonDesignData$1 as ButtonDesignData, ButtonDesignEditor, ButtonDesignEditorDefaults, ButtonDesignEditorDefaultsTransformed, ButtonSize, ButtonSizeStyles, ButtonStyle, CapitalizationType, Card, CategorySelectorContent, CategorySelectorContentEditor, CategorySelectorContentEditorDefaults, CategorySelectorData, CollectionDescriptor, CollectionDescriptorContent, CollectionDescriptorMetadata, ColorPickerDesignEditor, ColorPickerDesignEditorDefaults, ColorPickerDesignEditorDefaultsTransformed, ContentEditor, ContentEditorDefaults, ContentSettings, CustomSection, Deck, DeckContent, DeckContentEditor, DefaultSection, DesignEditor, DesignEditorDefaults, DesignEditorDefaultsTransformed, DesignSettings, DividerContentEditor, DividerContentEditorDefaults, DividerDesignEditor, Font, Frame, GlobalColorsString, GlobalDesign$1 as GlobalDesign, GlobalFontsString, GlobalTextSizeString, GradientColor, GradientColorTransformed, HSLColor, ImageBorderInfoData, ImageContent, ImageContentData, ImageContentEditor, ImageContentEditorDefaults, ImageDesignData$1 as ImageDesignData, ImageDesignEditor, ImageDesignEditorDefaults, ImageDesignEditorDefaultsTransformed, ImageInfoData, InfoContentEditor, InfoContentEditorDefaults, InfoDesignEditor, InfoDesignEditorDefaults, InputBoxContent, InputboxContentEditor, InputboxContentEditorDefaults, InstantsiteJSAPI$1 as InstantsiteJSAPI, InstantsiteTilePromise$1 as InstantsiteTilePromise, InternalColor, LayoutDesignData, LayoutDesignOverride, LayoutSettings, LogoContent, LogoContentData, LogoContentEditor, LogoContentEditorDefaults, LogoDesignData$1 as LogoDesignData, LogoDesignEditor, LogoDesignEditorDefaults, LogoDesignEditorDefaultsTransformed, LogoType, MandatoryContentSettings, MandatoryDesignSettings, Manifest, MenuContent, MenuContentData, MenuContentEditor, MenuItem, NavigationMenuContentEditor, Overlay, OverlayTransformed, ProductSelectorContent, ProductSelectorContentEditor, ProductSelectorContentEditorDefaults, ProductSelectorData, RGBAColor, Section, SelectBoxContent, SelectboxContentEditor, SelectboxContentEditorDefaults, SelectboxContentOption, SelectboxDesignData, SelectboxDesignEditor, SelectboxDesignEditorDefaults, SelectboxDesignEditorDefaultsTransformed, Showcase, ShowcaseAccordionItem, ShowcaseContentEditorsDefaults, ShowcaseDeckContentEditorDefaults, ShowcaseImageContentEditorDefaults, ShowcaseInputboxContentEditorDefaults, ShowcaseLogoContentEditorDefaults, ShowcaseMenuContentEditorDefaults, ShowcaseNavigationMenuContentEditorDefaults, ShowcaseOverride, ShowcaseTextareaContentEditorDefaults, SolidColor, SolidColorTransformed, StorePageConfiguration, StorefrontSection, StorefrontSectionId, Template, TemplateConfiguration, TemplateConfigurationSection, TemplateCustomSection, TemplateDefaultSection, TemplateMetadata, TemplatePage, TemplatePageNamed, TemplateStorefrontSection, TextAreaContent, TextDesignData$1 as TextDesignData, TextDesignEditor, TextDesignEditorDefaults, TextDesignEditorDefaultsTransformed, TextSize, TextStyleOptions, TextareaContentEditor, TextareaContentEditorDefaults, TextareaDesignData$1 as TextareaDesignData, ToggleContent, ToggleContentData, ToggleContentEditor, ToggleContentEditorDefaults, ToggleDesignData, ToggleDesignEditor, ToggleDesignEditorDefaults, ToggleDesignEditorDefaultsTransformed, TransformedFrame, TranslationSettings, UseButtonStylesOptions, UseCurrentLanguageReturn, VuegaPageId };