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