@ikas/bp-storefront 1.4.0-beta.20 → 1.4.0-beta.200

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.
Files changed (123) hide show
  1. package/dist/analytics/analytics-functions/addToCart.js +1 -1
  2. package/dist/analytics/analytics-functions/addToWishlist.js +1 -1
  3. package/dist/analytics/analytics-functions/completeRegistration.js +1 -1
  4. package/dist/analytics/analytics-functions/contactForm.js +1 -1
  5. package/dist/analytics/analytics-functions/createEmailSubscription.js +1 -1
  6. package/dist/analytics/analytics-functions/customerLogin.js +1 -1
  7. package/dist/analytics/analytics-functions/customerLogout.js +1 -1
  8. package/dist/analytics/analytics-functions/customerVisit.js +1 -1
  9. package/dist/analytics/analytics-functions/pageView.js +1 -1
  10. package/dist/analytics/analytics-functions/productView.js +1 -1
  11. package/dist/analytics/analytics-functions/removeFromCart.js +1 -1
  12. package/dist/analytics/analytics-functions/search.js +1 -1
  13. package/dist/analytics/analytics-functions/viewBrand.js +1 -1
  14. package/dist/analytics/analytics-functions/viewCart.js +1 -1
  15. package/dist/analytics/analytics-functions/viewCategory.js +1 -1
  16. package/dist/analytics/analytics-functions/viewListing.js +1 -1
  17. package/dist/analytics/analytics-functions/viewSearchResults.js +1 -1
  18. package/dist/analytics/analytics-functions/viewStorefrontPopup.js +1 -1
  19. package/dist/analytics/events.d.ts +8 -0
  20. package/dist/analytics/events.js +1 -1
  21. package/dist/analytics/ikas/analytics.js +1 -1
  22. package/dist/analytics/openai/addToCart.d.ts +2 -0
  23. package/dist/analytics/openai/addToCart.js +1 -0
  24. package/dist/analytics/openai/completeRegistration.d.ts +1 -0
  25. package/dist/analytics/openai/completeRegistration.js +1 -0
  26. package/dist/analytics/openai/contactForm.d.ts +1 -0
  27. package/dist/analytics/openai/contactForm.js +1 -0
  28. package/dist/analytics/openai/initAdvancedMatching.d.ts +12 -0
  29. package/dist/analytics/openai/initAdvancedMatching.js +1 -0
  30. package/dist/analytics/openai/pageView.d.ts +1 -0
  31. package/dist/analytics/openai/pageView.js +1 -0
  32. package/dist/analytics/openai/productView.d.ts +2 -0
  33. package/dist/analytics/openai/productView.js +1 -0
  34. package/dist/analytics/openai/utils.d.ts +26 -0
  35. package/dist/analytics/openai/utils.js +1 -0
  36. package/dist/analytics/utils.d.ts +1 -0
  37. package/dist/analytics/utils.js +1 -1
  38. package/dist/functions/api/cart/index.d.ts +2 -0
  39. package/dist/functions/api/cart/index.js +1 -1
  40. package/dist/functions/api/customer/index.d.ts +5 -0
  41. package/dist/functions/api/customer/index.js +1 -1
  42. package/dist/functions/api/loyalty/index.d.ts +2 -1
  43. package/dist/functions/api/loyalty/index.js +1 -1
  44. package/dist/functions/api/product/index.js +1 -1
  45. package/dist/functions/models/attribute-detail/index.d.ts +3 -0
  46. package/dist/functions/models/attribute-list/index.d.ts +3 -0
  47. package/dist/functions/models/image/index.d.ts +71 -21
  48. package/dist/functions/models/image/index.js +1 -1
  49. package/dist/functions/models/index.d.ts +1 -0
  50. package/dist/functions/models/order/index.d.ts +21 -0
  51. package/dist/functions/models/order/index.js +1 -1
  52. package/dist/functions/models/product/attribute-value/index.d.ts +5 -0
  53. package/dist/functions/models/product/variant/index.d.ts +96 -6
  54. package/dist/functions/models/product/variant/index.js +1 -1
  55. package/dist/functions/models/product-list/index.js +1 -1
  56. package/dist/functions/models/validator/address/index.d.ts +70 -2
  57. package/dist/functions/models/validator/deactivate-customer/index.d.ts +54 -0
  58. package/dist/functions/models/validator/deactivate-customer/index.js +1 -0
  59. package/dist/functions/stores/base/index.d.ts +67 -0
  60. package/dist/functions/stores/base/index.js +1 -1
  61. package/dist/functions/stores/cart/index.d.ts +46 -2
  62. package/dist/functions/stores/cart/index.js +1 -1
  63. package/dist/functions/stores/customer/index.d.ts +278 -27
  64. package/dist/functions/stores/customer/index.js +1 -1
  65. package/dist/index.d.ts +5 -1
  66. package/dist/index.js +1 -1
  67. package/dist/packages/storefront-api/src/__api/mutations/removeGiftCardFromCart.js +1 -0
  68. package/dist/packages/storefront-api/src/__api/mutations/unlinkExternalAccount.js +1 -0
  69. package/dist/packages/storefront-api/src/__api/queries/getExternalAccountLink.js +1 -0
  70. package/dist/packages/storefront-api/src/__api/queries/getLoyaltyProgram.js +1 -0
  71. package/dist/packages/storefront-api/src/__api/queries/getMilesSmilesDetails.js +1 -0
  72. package/dist/packages/storefront-api-client/src/utils/api.js +1 -1
  73. package/dist/packages/storefront-config/src/index.js +1 -1
  74. package/dist/packages/storefront-config/src/theme-globals.js +1 -0
  75. package/dist/router/index.d.ts +28 -0
  76. package/dist/router/index.js +1 -1
  77. package/dist/storefront-api/src/__api/mutations/removeGiftCardFromCart.d.ts +7 -0
  78. package/dist/storefront-api/src/__api/mutations/unlinkExternalAccount.d.ts +6 -0
  79. package/dist/storefront-api/src/__api/queries/getExternalAccountLink.d.ts +6 -0
  80. package/dist/storefront-api/src/__api/queries/getLoyaltyProgram.d.ts +3 -0
  81. package/dist/storefront-api/src/__api/queries/getMilesSmilesDetails.d.ts +3 -0
  82. package/dist/storefront-api/src/__api/types/index.d.ts +68 -6
  83. package/dist/storefront-api-client/src/utils/api.d.ts +7 -0
  84. package/dist/storefront-config/src/index.d.ts +6 -0
  85. package/dist/storefront-config/src/theme-globals.d.ts +328 -0
  86. package/dist/storefront-models/src/index.d.ts +3 -0
  87. package/dist/storefront-models/src/models/blueprint/prop-value/attribute-list.d.ts +2 -0
  88. package/dist/storefront-models/src/models/blueprint/prop-value/attribute.d.ts +2 -0
  89. package/dist/storefront-models/src/models/blueprint/prop-value/color.d.ts +2 -0
  90. package/dist/storefront-models/src/models/blueprint/prop-value/index.d.ts +1 -0
  91. package/dist/storefront-models/src/models/blueprint/prop-value/variable-binding.d.ts +16 -0
  92. package/dist/storefront-models/src/models/image/index.d.ts +7 -0
  93. package/dist/storefront-models/src/models/loyalty-program/customer-info/index.d.ts +2 -0
  94. package/dist/storefront-models/src/models/loyalty-program/earning-method/index.d.ts +1 -0
  95. package/dist/storefront-models/src/models/loyalty-program/index.d.ts +1 -0
  96. package/dist/storefront-models/src/models/loyalty-program/point-history/index.d.ts +1 -0
  97. package/dist/storefront-models/src/models/order/gift-card-line/index.d.ts +15 -0
  98. package/dist/storefront-models/src/models/order/index.d.ts +2 -0
  99. package/dist/storefront-models/src/models/order/line-item/index.d.ts +1 -1
  100. package/dist/storefront-models/src/models/order/package/index.d.ts +1 -1
  101. package/dist/storefront-models/src/models/payment-gateway/index.d.ts +3 -1
  102. package/dist/storefront-models/src/models/product/attribute/index.d.ts +6 -1
  103. package/dist/storefront-models/src/models/product/campaign/data/index.d.ts +2 -0
  104. package/dist/storefront-models/src/models/product/campaign/filter/index.d.ts +1 -1
  105. package/dist/storefront-models/src/models/product/campaign/product-tiered-discount/index.d.ts +13 -0
  106. package/dist/storefront-models/src/models/product/image/index.d.ts +5 -0
  107. package/dist/storefront-models/src/models/product/variant/index.d.ts +17 -0
  108. package/dist/storefront-models/src/models/storefront/index.d.ts +1 -0
  109. package/dist/storefront-models/src/models/validator/deactivate-customer/index.d.ts +4 -0
  110. package/dist/stores/customer/index.d.ts +2 -1
  111. package/dist/stores/customer/index.js +1 -1
  112. package/dist/theme/settings/index.d.ts +51 -0
  113. package/dist/theme/settings/index.js +1 -0
  114. package/dist/utils/component-renderer.d.ts +1 -0
  115. package/dist/utils/component-renderer.js +1 -1
  116. package/dist/utils/currency.d.ts +36 -3
  117. package/dist/utils/helper.d.ts +1 -0
  118. package/dist/utils/helper.js +1 -1
  119. package/dist/utils/pay-with-ikas.d.ts +553 -0
  120. package/dist/utils/pay-with-ikas.js +1 -0
  121. package/dist/utils/svg.d.ts +15 -0
  122. package/dist/utils/svg.js +1 -0
  123. package/package.json +1 -1
@@ -0,0 +1,328 @@
1
+ export declare function cssVarCamelCase(str: string): string;
2
+ /**
3
+ * Shared "theme globals" contract — the serialized, runtime-readable form of the editor's
4
+ * global theme settings (the left "Styles" panel): global variables + design tokens
5
+ * (colors, typography, breakpoints, keyframes, color schemes).
6
+ *
7
+ * This is packed into `IkasStorefrontConfig.themeGlobals` and read by the
8
+ * `@ikas/bp-storefront` runtime API (getThemeSetting / getThemeColors / ...). The same
9
+ * payload is produced for SSR, client hydration, and the editor canvas via
10
+ * {@link serializeThemeGlobals}, and returned by the CLI/MCP `list-theme-globals` reader.
11
+ */
12
+ /** Global-variable value kinds, mirrored from the editor sidebar `GlobalVariableType`. */
13
+ export type GlobalVariableType = "TEXT" | "RICH_TEXT" | "IMAGE" | "COLOR" | "NUMBER" | "BOOLEAN" | "BORDER" | "SHADOW" | "ENUM";
14
+ /** A theme "global variable" (Theme Settings panel). `name` is the stable runtime key. */
15
+ export type ThemeSetting = {
16
+ /** Stable runtime key — the variable's `variableName` (e.g. `_6Q0KV7VGGM`). */
17
+ name: string;
18
+ /** Human-facing label. */
19
+ displayName: string;
20
+ type: GlobalVariableType;
21
+ /**
22
+ * Concrete value, discriminated by `type`:
23
+ * - TEXT/RICH_TEXT → string · NUMBER → number · BOOLEAN → boolean · COLOR → hex string.
24
+ * - IMAGE → an IkasImage REFERENCE, e.g. `{ id: "theme-images/<uuid>" }`. It has NO
25
+ * `.url` field — resolve to a URL with `getDefaultSrc(value)` / `getSrc(value, size)`
26
+ * from `@ikas/bp-storefront`, never read `value.url`.
27
+ * - BORDER/SHADOW → object, or `null` when unset.
28
+ * - ENUM → the selected option VALUE string (one of `Object.values(options)`, never a label),
29
+ * or `null` when unset or when that option no longer exists on the enum.
30
+ */
31
+ value: any;
32
+ /**
33
+ * ENUM only — id of the project enum type (`project.types[].id`) this setting selects from. It is
34
+ * the same id an ENUM component prop carries as `enumTypeId`; matching ids are what make a prop
35
+ * bindable to the setting.
36
+ */
37
+ enumTypeId?: string;
38
+ /**
39
+ * ENUM only — the enum's options at serialize time, `{ [label]: value }`. `value` above is always
40
+ * one of these VALUES or `null`. Empty when the enum type could not be found in the project.
41
+ */
42
+ options?: Record<string, string>;
43
+ };
44
+ /** A single-value design token (color). `cssVar` resolves the live, scheme-aware value. */
45
+ export type DesignToken = {
46
+ id: string;
47
+ name: string;
48
+ /** Resolved base/default value (e.g. a hex string), or null when unset. */
49
+ resolved: string | null;
50
+ /** CSS custom-property reference, e.g. `var(--primaryColor)`. */
51
+ cssVar: string;
52
+ };
53
+ /** A typography token (text style). Apply `className` to an element to use it. */
54
+ export type TypographyToken = {
55
+ id: string;
56
+ name: string;
57
+ /** Resolved CSS values keyed by camelCased CSS property (e.g. `fontSize`, `fontWeight`). */
58
+ resolved: Record<string, string>;
59
+ /** Class selector the editor emits for this text style, e.g. `_<id>`. */
60
+ className: string;
61
+ /** True when this is the theme's default/global text style (the editor's "Make Default Style"). */
62
+ isDefault: boolean;
63
+ };
64
+ export type BreakpointToken = {
65
+ id: string;
66
+ name: string;
67
+ width: number;
68
+ };
69
+ /** A resolved CSS style entry, e.g. { property: "animation-duration", value: "1.4s" }. */
70
+ export type StyleEntry = {
71
+ property: string;
72
+ value: string;
73
+ };
74
+ export type KeyframeToken = {
75
+ id: string;
76
+ name: string;
77
+ type: string;
78
+ /** CSS reference — the animation name / class the editor emits, e.g. `_<id>`. */
79
+ ref: string;
80
+ /**
81
+ * Keyframe-level animation "settings" (the editor's Settings popover). These are CSS
82
+ * animation/transition properties and DIFFER BY TYPE: a `keyframe` carries
83
+ * animation-duration/-iteration-count/-play-state/-delay/-timing-function/-direction/
84
+ * -fill-mode/-timeline/-range + transform-origin; a `transition` carries `transition`.
85
+ * Both may carry backface-visibility. Empty when none are set.
86
+ */
87
+ settings?: StyleEntry[];
88
+ /** Animation points; each point may carry its own resolved styles. */
89
+ points?: {
90
+ point: string;
91
+ styles?: StyleEntry[];
92
+ }[];
93
+ };
94
+ /**
95
+ * A color SLOT — one entry of the top-level `getThemeColorSchemes().schemes` list. It is a
96
+ * label only (`id` + display `name`); the actual colors for the slot live in each palette's
97
+ * `colorsByScheme[id]`.
98
+ */
99
+ export type ColorSchemeSlot = {
100
+ id: string;
101
+ name: string;
102
+ };
103
+ /**
104
+ * A color palette (one entry of `getThemeColorSchemes().values`). Its colors live in
105
+ * `colorsByScheme` — the top-level `schemes` list holds only slot id→name labels.
106
+ */
107
+ export type ColorSchemeToken = {
108
+ id: string;
109
+ name: string;
110
+ isDefault: boolean;
111
+ /** Class selector to activate this scheme value, e.g. `_<id>`. */
112
+ className: string;
113
+ /**
114
+ * This palette's colors, keyed by color-SLOT id (the ids in
115
+ * `getThemeColorSchemes().schemes`). THIS — not the top-level `schemes` array — is
116
+ * the source of truth for swatch colors; iterate it to render a palette. Prefer
117
+ * `cssVar` for live, in-editor reactivity; `resolved` is a render-time snapshot.
118
+ */
119
+ colorsByScheme: Record<string, {
120
+ resolved: string | null;
121
+ cssVar: string;
122
+ }>;
123
+ };
124
+ export type ThemeGlobals = {
125
+ settings: Record<string, ThemeSetting>;
126
+ colors: DesignToken[];
127
+ typography: TypographyToken[];
128
+ breakpoints: BreakpointToken[];
129
+ keyframes: KeyframeToken[];
130
+ colorSchemes: {
131
+ schemes: ColorSchemeSlot[];
132
+ values: ColorSchemeToken[];
133
+ };
134
+ };
135
+ /**
136
+ * Stamps a theme-token type as its RUNTIME view (what the `@ikas/bp-storefront` getters return).
137
+ * `name` is authoring-only: it is non-unique (two design assets can ship the same one) and
138
+ * non-stable (renaming must not break references), so matching a token by name is unsafe.
139
+ * Identify one by its STABLE `id` instead — color → `cssVar` (`var(--<id>)`), typography &
140
+ * keyframe → `className` / `ref` (`_<id>`), color-scheme slot → a `colorsByScheme` key. Need a
141
+ * human-readable label? Read `list_theme_globals` (MCP/CLI) or the editor's Styles panel.
142
+ *
143
+ * `name` is REMOVED outright rather than re-added as a documented `@deprecated never`: that was
144
+ * tried first and only yields a soft strikethrough, so `getThemeTypography().find(t => t.name ===
145
+ * "…")` still compiled and agents wrote it anyway. A hard `Omit` makes it a compile error, and
146
+ * `ikas-component build` runs `tsc --noEmit` and exits non-zero on it — so such a component cannot
147
+ * be built or shipped at all.
148
+ *
149
+ * The full {@link ThemeGlobals} (with real names) is still what the config holds and what the
150
+ * CLI/MCP `list-theme-globals` AUTHORING read returns — that is how an agent resolves "the token
151
+ * named X" to its id. `name` is hidden only at these runtime getter return types.
152
+ */
153
+ type RuntimeView<T> = Omit<T, "name">;
154
+ export type RuntimeDesignToken = RuntimeView<DesignToken>;
155
+ export type RuntimeTypographyToken = RuntimeView<TypographyToken>;
156
+ export type RuntimeBreakpointToken = RuntimeView<BreakpointToken>;
157
+ export type RuntimeKeyframeToken = RuntimeView<KeyframeToken>;
158
+ export type RuntimeColorSchemeToken = RuntimeView<ColorSchemeToken>;
159
+ export type RuntimeColorSchemeSlot = RuntimeView<ColorSchemeSlot>;
160
+ /**
161
+ * Runtime view of {@link ThemeGlobals.colorSchemes} (returned by `getThemeColorSchemes`). The
162
+ * slot list carries only `{ id }`: slot display LABELS (the slot `name`) are authoring-only —
163
+ * read them via the CLI/MCP `list-theme-globals` or the editor, not at runtime. Render a palette
164
+ * by iterating each value's `colorsByScheme`, keyed by slot id.
165
+ */
166
+ export type RuntimeThemeColorSchemes = {
167
+ schemes: RuntimeColorSchemeSlot[];
168
+ values: RuntimeColorSchemeToken[];
169
+ };
170
+ export declare const EMPTY_THEME_GLOBALS: ThemeGlobals;
171
+ type StyleValueLike = {
172
+ value?: any;
173
+ patternValueId?: string;
174
+ keyframeValueId?: string;
175
+ colorSchemeId?: string;
176
+ };
177
+ type StyleConditionLike = {
178
+ value?: StyleValueLike;
179
+ };
180
+ type ElementStyleLike = {
181
+ property: string;
182
+ value?: StyleValueLike | StyleConditionLike[];
183
+ };
184
+ type PatternValueLike = {
185
+ id: string;
186
+ name?: string;
187
+ style?: ElementStyleLike;
188
+ };
189
+ type PatternElementLike = {
190
+ id: string;
191
+ name?: string;
192
+ styles?: ElementStyleLike[];
193
+ isDefault?: boolean;
194
+ };
195
+ type ColorSchemeLike = {
196
+ id: string;
197
+ name?: string;
198
+ };
199
+ type ColorSchemeValueColorLike = {
200
+ colorSchemeId: string;
201
+ style?: StyleValueLike;
202
+ };
203
+ type ColorSchemeValueLike = {
204
+ id: string;
205
+ name?: string;
206
+ isDefault?: boolean;
207
+ /** Set when this scheme belongs to an installed design asset; groups the default fallback. */
208
+ designAssetId?: string;
209
+ colors?: ColorSchemeValueColorLike[];
210
+ };
211
+ type BreakpointLike = {
212
+ id: string;
213
+ name?: string;
214
+ width?: number;
215
+ };
216
+ type KeyframePointLike = {
217
+ point: string;
218
+ styles?: ElementStyleLike[];
219
+ };
220
+ type KeyframeLike = {
221
+ id: string;
222
+ name?: string;
223
+ type?: string;
224
+ styles?: ElementStyleLike[];
225
+ points?: KeyframePointLike[];
226
+ };
227
+ type VariableLike = {
228
+ id?: string;
229
+ variableName?: string;
230
+ displayName?: string;
231
+ variableType?: string;
232
+ /** Blueprint type id. For an ENUM global this is the enum type's id (`project.types[].id`). */
233
+ typeId?: string;
234
+ defaultValue?: any;
235
+ isGlobal?: boolean;
236
+ };
237
+ /** The slice of a project `IType` an ENUM setting reads: its id and its `{ label: value }` options. */
238
+ type TypeLike = {
239
+ id: string;
240
+ type?: unknown;
241
+ enumOptions?: Record<string, any> | null;
242
+ };
243
+ export type SerializableProject = {
244
+ globalsBlueprint?: {
245
+ module?: {
246
+ variables?: VariableLike[];
247
+ };
248
+ };
249
+ /** Project custom types; only enum entries are read, to resolve ENUM settings' options. */
250
+ types?: TypeLike[];
251
+ theme?: {
252
+ breakpoints?: BreakpointLike[];
253
+ keyframes?: KeyframeLike[];
254
+ pattern?: {
255
+ values?: PatternValueLike[];
256
+ elements?: PatternElementLike[];
257
+ colorSchemes?: ColorSchemeLike[];
258
+ colorSchemeValues?: ColorSchemeValueLike[];
259
+ };
260
+ };
261
+ };
262
+ export declare const cssVarRef: (id: string, fallback?: string) => string;
263
+ export declare const rawClassRef: (id: string) => string;
264
+ /**
265
+ * CSS function-style token a code component writes to reference a theme breakpoint's width.
266
+ * Breakpoints can't ship as `var(--…)` because the CSS spec forbids `var()` in a media-query
267
+ * condition — and a `var()` there fails SILENTLY (it parses as valid-looking CSS but the whole
268
+ * query is dropped). So a code component writes a deliberately non-standard `bp(<breakpointId>)`
269
+ * token inside its OWN `min-width` / `max-width` condition; it resolves to a concrete `<width>px`
270
+ * at render time against the LIVE theme (see {@link resolveBreakpointMediaTokens}). The author
271
+ * picks the direction, so there is no implicit boundary magic:
272
+ * `@media (max-width: bp(_mob))` -> `@media (max-width: 767px)`
273
+ * `@media (min-width: bp(_mob))` -> `@media (min-width: 767px)`
274
+ * id-based, never a human name (the id is stable across renames). The id comes from
275
+ * `list-theme-globals` / `getThemeBreakpoints()`.
276
+ */
277
+ export declare const breakpointCssToken: (id: string) => string;
278
+ /**
279
+ * Coerce a theme's breakpoint list into the `{ id, width }` shape {@link resolveBreakpointMediaTokens}
280
+ * needs, defaulting a missing/non-numeric width to 0. Shared by both render sites so the coercion
281
+ * rule lives in one place; the editor passes `breakpoints.map(b => b.toJSON())` (Yjs → plain) first.
282
+ */
283
+ export declare const toResolverBreakpoints: (breakpoints: {
284
+ id: string;
285
+ width?: number | string;
286
+ }[]) => {
287
+ id: string;
288
+ width: number;
289
+ }[];
290
+ /**
291
+ * Replace breakpoint width tokens (`bp(<id>)`) in a CSS string with the breakpoint's concrete
292
+ * `<width>px`, using the given theme breakpoints. Pure text substitution — the single place
293
+ * breakpoint resolution lives, called at every render-time CC-CSS composition site
294
+ * (code-generator, editor canvas). Unknown ids are left untouched (the partner dependency
295
+ * collector ships referenced breakpoints into the target theme, so a real token always resolves).
296
+ * The `bp(<id>)` literal carries its own `)` boundary, so one id is never matched inside another.
297
+ *
298
+ * A `calc()` containing a bp token (e.g. the documented exclusive boundary
299
+ * `calc(bp(<id>) + 1px)`, but any pure px arithmetic: `calc(bp(a) * 2 + 10px)`,
300
+ * `calc(bp(a) - bp(b))`, `-webkit-calc(...)`, …) is folded to a single computed `<width>px`
301
+ * literal, never emitted as `calc()`: csso — the code-generator's minifier for inline/base
302
+ * page styles — silently drops a media block whose condition contains `calc()`, and older
303
+ * browsers (e.g. Safari < 16.4) don't evaluate `calc()` in media conditions either.
304
+ *
305
+ * Folding limits (an out-of-limit calc degrades to plain token substitution, keeping its
306
+ * `calc()` form — which csso will still drop from a media condition): bodies longer than
307
+ * CALC_SCAN_LIMIT chars; an uppercase `CALC(` keyword (the scan is lowercase, matching every
308
+ * compiled-CSS emitter); `calc(` inside a string/comment can confuse the plain-text scan.
309
+ */
310
+ export declare function resolveBreakpointMediaTokens(css: string, breakpoints: {
311
+ id: string;
312
+ width: number;
313
+ }[]): string;
314
+ /**
315
+ * True for system/reserved global variables (e.g. `__breakpointsVar__`) — internal
316
+ * constructs that live in `module.variables` but are NOT user-facing theme settings.
317
+ * Single source of truth for the `__name__` reserved-id convention; consumers (theme
318
+ * serialization here, partner publish dependency collection) share it so a new
319
+ * synthetic var is excluded everywhere at once.
320
+ */
321
+ export declare const isReservedVariableId: (id?: string | null) => boolean;
322
+ /**
323
+ * Build the {@link ThemeGlobals} payload from a project's theme. Pure and dependency-free
324
+ * (works on plain JSON), so the same function serves SSR (`IProject`) and the editor canvas
325
+ * (`YjsProject.toJSON()`).
326
+ */
327
+ export declare function serializeThemeGlobals(project?: SerializableProject | null): ThemeGlobals;
328
+ export {};
@@ -108,6 +108,7 @@ export * from "./models/order/address/state";
108
108
  export * from "./models/order/adjustment";
109
109
  export * from "./models/order/adjustment/applied-order-line";
110
110
  export * from "./models/order/customer";
111
+ export * from "./models/order/gift-card-line";
111
112
  export * from "./models/order/gift-line";
112
113
  export * from "./models/order/invoice";
113
114
  export * from "./models/order/line-item";
@@ -157,6 +158,7 @@ export * from "./models/product/campaign/filter";
157
158
  export * from "./models/product/campaign/product-buyx-then-gety";
158
159
  export * from "./models/product/campaign/product-campaign-date-range-field";
159
160
  export * from "./models/product/campaign/product-fixed-discount";
161
+ export * from "./models/product/campaign/product-tiered-discount";
160
162
  export * from "./models/product/campaign-offer";
161
163
  export * from "./models/product/filter";
162
164
  export * from "./models/product/group";
@@ -227,6 +229,7 @@ export * from "./models/validator/back-in-stock-notification";
227
229
  export * from "./models/validator/contact-form";
228
230
  export * from "./models/validator/coupon-code-form";
229
231
  export * from "./models/validator/customer-review";
232
+ export * from "./models/validator/deactivate-customer";
230
233
  export * from "./models/validator/forgot-password";
231
234
  export * from "./models/validator/login";
232
235
  export * from "./models/validator/newsletter-subscription";
@@ -1,6 +1,8 @@
1
+ import { IBlueprintPropValueVariableBinding } from "./variable-binding";
1
2
  export interface IBlueprintAttributeListPropValue {
2
3
  productId?: string | null;
3
4
  variantId?: string | null;
4
5
  attributeIds?: string[] | null;
5
6
  usePageData?: boolean | null;
7
+ productVariable?: IBlueprintPropValueVariableBinding | null;
6
8
  }
@@ -1,6 +1,8 @@
1
+ import { IBlueprintPropValueVariableBinding } from "./variable-binding";
1
2
  export interface IBlueprintAttributePropValue {
2
3
  productId?: string | null;
3
4
  variantId?: string | null;
4
5
  attributeId?: string | null;
5
6
  usePageData?: boolean | null;
7
+ productVariable?: IBlueprintPropValueVariableBinding | null;
6
8
  }
@@ -1,3 +1,5 @@
1
1
  export interface IBlueprintColorPropValue {
2
2
  value: string;
3
+ patternValueId?: string;
4
+ colorSchemeId?: string;
3
5
  }
@@ -28,4 +28,5 @@ export * from "./rich-text";
28
28
  export * from "./svg";
29
29
  export * from "./svg-list";
30
30
  export * from "./text";
31
+ export * from "./variable-binding";
31
32
  export * from "./video";
@@ -0,0 +1,16 @@
1
+ /**
2
+ * A theme data binding stored INSIDE a prop value, so a single field of that value can follow a
3
+ * bound variable while the rest of the value stays statically authored (see
4
+ * `IBlueprintAttributePropValue.productVariable`). `key`/`variableId`/`path` mirror the editor's
5
+ * `IThemeVariableBinding` and `refId`/`componentId` mirror the surrounding `IThemeDynamicValueValue`
6
+ * context a COMPONENT_LIST child needs to resolve an ancestor's variable; duplicated here because
7
+ * storefront-models must not depend on editor-models. Only the editor and the code generators
8
+ * interpret it — the storefront runtime carries it through untouched.
9
+ */
10
+ export interface IBlueprintPropValueVariableBinding {
11
+ key?: string | null;
12
+ variableId?: string | null;
13
+ path?: string[] | null;
14
+ refId?: string | null;
15
+ componentId?: string | null;
16
+ }
@@ -1,5 +1,12 @@
1
1
  export type IkasImage = {
2
2
  id: string;
3
+ /**
4
+ * True when this media item is a VIDEO, not an image. Product media sets routinely mix both.
5
+ * getDefaultSrc/getSrc/getThumbnailSrc then return an .mp4 URL, so rendering it in an <img>
6
+ * produces broken media — branch on this flag and render <video src={getDefaultSrc(item)}>.
7
+ * Videos have no resized variant and no poster URL: the size argument is ignored, and
8
+ * createMediaSrcset does not apply.
9
+ */
3
10
  isVideo?: boolean | null;
4
11
  altText?: string | null;
5
12
  fileName?: string | null;
@@ -9,7 +9,9 @@ export type IkasCartLoyaltyLine = {
9
9
  pointUsed: number;
10
10
  };
11
11
  export type IkasLoyaltyCustomerInfo = {
12
+ availablePoint: number;
12
13
  cartLoyaltyLines: IkasCartLoyaltyLine[] | null;
14
+ cumulativeEarnedPoints: number;
13
15
  customerTier: IkasLoyaltyProgramTier | null;
14
16
  loyaltyProgramCustomerId: string;
15
17
  loyaltyProgramId: string;
@@ -20,6 +20,7 @@ export type IkasLoyaltyProgramEarningMethod = {
20
20
  translations: LoyaltyProgramMethodTranslation[] | null;
21
21
  updatedAt: any | null;
22
22
  validityPeriod: LoyaltyProgramPeriod | null;
23
+ waitingPeriodDays: number | null;
23
24
  };
24
25
  export type IkasLoyaltyProgramEarningMethodOrderSettings = {
25
26
  maxOrderAmount: number | null;
@@ -17,6 +17,7 @@ export type IkasLoyaltyProgram = {
17
17
  tokenName: string | null;
18
18
  updatedAt: any | null;
19
19
  validityPeriod: LoyaltyProgramPeriod | null;
20
+ waitingPeriodDays: number | null;
20
21
  };
21
22
  export * from "./customer-info";
22
23
  export * from "./earning-method";
@@ -1,6 +1,7 @@
1
1
  import { LoyaltyProgramPointHistoryTypeEnum } from "../../../../../storefront-api/src";
2
2
  export type IkasLoyaltyProgramPointHistory = {
3
3
  amount: number;
4
+ availableDate: any | null;
4
5
  createdAt: any | null;
5
6
  customerId: string;
6
7
  deleted: boolean;
@@ -0,0 +1,15 @@
1
+ import { IkasTransactionType } from "../transaction";
2
+ export type IkasOrderGiftCardLine = {
3
+ id: string;
4
+ amount: number;
5
+ code: string;
6
+ giftCardId: string;
7
+ type: IkasGiftCardType | null;
8
+ appliedTransactions: IkasOrderGiftCardLineAppliedTransaction[];
9
+ };
10
+ export type IkasOrderGiftCardLineAppliedTransaction = {
11
+ id: string;
12
+ amount: number;
13
+ type: IkasTransactionType;
14
+ };
15
+ export type IkasGiftCardType = "GIFT_CARD" | "STORE_CREDIT";
@@ -1,6 +1,7 @@
1
1
  import { IkasOrderAddress } from "./address";
2
2
  import { IkasOrderAdjustment } from "./adjustment";
3
3
  import { IkasOrderCustomer } from "./customer";
4
+ import { IkasOrderGiftCardLine } from "./gift-card-line";
4
5
  import { IkasOrderGiftPackageLine } from "./gift-line";
5
6
  import { IkasInvoice } from "./invoice";
6
7
  import { IkasOrderLineItem } from "./line-item";
@@ -21,6 +22,7 @@ export type IkasOrder = {
21
22
  currencySymbol: string | null;
22
23
  customer: IkasOrderCustomer | null;
23
24
  customerId: string | null;
25
+ giftCardLines: IkasOrderGiftCardLine[] | null;
24
26
  giftPackageLines: IkasOrderGiftPackageLine[] | null;
25
27
  giftPackageNote: string | null;
26
28
  invoices: IkasInvoice[] | null;
@@ -27,4 +27,4 @@ export type IkasOrderLineItem = {
27
27
  orderedAt: number;
28
28
  _refundQuantity: number | null;
29
29
  };
30
- export type IkasOrderLineItemStatus = "CANCELLED" | "CANCEL_REJECTED" | "CANCEL_REQUESTED" | "DELIVERED" | "FULFILLED" | "REFUNDED" | "REFUND_REJECTED" | "REFUND_REQUESTED" | "REFUND_REQUEST_ACCEPTED" | "UNFULFILLED";
30
+ export type IkasOrderLineItemStatus = "CANCELLED" | "CANCEL_REJECTED" | "CANCEL_REQUESTED" | "DELIVERED" | "FULFILLED" | "PLANNED" | "REFUNDED" | "REFUND_REJECTED" | "REFUND_REQUESTED" | "REFUND_REQUEST_ACCEPTED" | "RETURN_DELIVERED" | "RETURN_IN_TRANSIT" | "RETURN_PARCEL_WAITING" | "RETURN_REJECTED" | "UNFULFILLED" | "WAITING_FOR_PACKAGING";
@@ -13,7 +13,7 @@ export type IkasOrderPackage = {
13
13
  stockLocationId: string;
14
14
  trackingInfo: IkasTrackingInfo | null;
15
15
  };
16
- export type IkasOrderPackageFullfillStatus = "UNFULFILLED" | "CANCELLED" | "CANCEL_REJECTED" | "CANCEL_REQUESTED" | "DELIVERED" | "ERROR" | "FULFILLED" | "READY_FOR_PICK_UP" | "READY_FOR_SHIPMENT" | "REFUNDED" | "REFUND_REJECTED" | "REFUND_REQUESTED" | "REFUND_REQUEST_ACCEPTED" | "UNABLE_TO_DELIVER";
16
+ export type IkasOrderPackageFullfillStatus = "CANCELLED" | "CANCEL_REJECTED" | "CANCEL_REQUESTED" | "DELIVERED" | "ERROR" | "FULFILLED" | "PLANNED" | "READY_FOR_PICK_UP" | "READY_FOR_SHIPMENT" | "REFUNDED" | "REFUND_REJECTED" | "REFUND_REQUESTED" | "REFUND_REQUEST_ACCEPTED" | "RETURN_DELIVERED" | "RETURN_IN_TRANSIT" | "RETURN_PARCEL_WAITING" | "RETURN_REJECTED" | "UNABLE_TO_DELIVER" | "UNFULFILLED" | "WAITING_FOR_PACKAGING";
17
17
  export type IkasDisplayedPackage = {
18
18
  id: string;
19
19
  createdAt: number;
@@ -12,6 +12,8 @@ export type IkasPaymentGateway = {
12
12
  description: string | null;
13
13
  logoUrl: string | null;
14
14
  masterPassClientId: string | null;
15
+ /** True when Miles&Smiles can be redeemed on this (TK_PAY) gateway. */
16
+ milesSmilesEnabled?: boolean | null;
15
17
  name: string;
16
18
  paymentGatewayProviderId: string | null;
17
19
  supportedCurrencies: string[] | null;
@@ -22,7 +24,7 @@ export type IkasPaymentGateway = {
22
24
  settings?: IkasPaymentGatewaySettings[] | null;
23
25
  translations?: IkasPaymentGatewayTranslation[] | null;
24
26
  };
25
- export type IkasPaymentMethodType = "APP_PAYMENT" | "BANK_REDIRECT" | "BUY_ONLINE_PAY_AT_STORE" | "CASH" | "CASH_ON_DELIVERY" | "CREDIT_CARD" | "CREDIT_CARD_ON_DELIVERY" | "DIRECT_DEBIT" | "GIFT_CARD" | "MONEY_ORDER" | "OTHER" | "PAY_LATER" | "SLICE_IT" | "WALLET";
27
+ export type IkasPaymentMethodType = "APP_PAYMENT" | "BANK_REDIRECT" | "BUY_ONLINE_PAY_AT_STORE" | "CASH" | "CASH_ON_DELIVERY" | "CREDIT_CARD" | "CREDIT_CARD_ON_DELIVERY" | "DIRECT_DEBIT" | "GIFT_CARD" | "MONEY_ORDER" | "OTHER" | "PAY_LATER" | "SLICE_IT" | "STORE_CREDIT" | "WALLET";
26
28
  export type IkasPaymentMethod = {
27
29
  name: string;
28
30
  logoUrl: string | null;
@@ -10,4 +10,9 @@ export type IkasProductAttribute = {
10
10
  tableTemplate: IkasProductAttributeTableTemplate | null;
11
11
  translations?: IkasProductAttributeTranslation[] | null;
12
12
  };
13
- export type IkasProductAttributeType = "CHOICE" | "MULTIPLE_CHOICE" | "TEXT" | "BOOLEAN" | "NUMERIC" | "DATETIME" | "HTML" | "TABLE" | "IMAGE" | "PRODUCT";
13
+ /**
14
+ * Mirror of the API's `ProductAttributeTypeEnum` (see storefront-api `__api/types`). The API value is
15
+ * force-cast into this union when products are mapped (`functions/api/product`), so a value missing
16
+ * here still arrives at runtime — it just stops being visible to the compiler. Keep both lists in sync.
17
+ */
18
+ export type IkasProductAttributeType = "CHOICE" | "MULTIPLE_CHOICE" | "COLOR_THUMBNAIL_MULTIPLE_CHOICE" | "TEXT" | "BOOLEAN" | "NUMERIC" | "DATE" | "DATETIME" | "HTML" | "TABLE" | "IMAGE" | "PRODUCT";
@@ -1,6 +1,7 @@
1
1
  import { IkasProductBuyXThenGetY } from "../product-buyx-then-gety";
2
2
  import { IkasProductCampaignDateRangeField } from "../product-campaign-date-range-field";
3
3
  import { IkasProductFixedDiscount } from "../product-fixed-discount";
4
+ import { IkasProductTieredDiscount } from "../product-tiered-discount";
4
5
  export type IkasProductCampaignData = {
5
6
  applicableCustomerGroupIds: string[] | null;
6
7
  applicableCustomerIds: string[] | null;
@@ -21,6 +22,7 @@ export type IkasProductCampaignData = {
21
22
  usageCount: number;
22
23
  usageLimit: number | null;
23
24
  usageLimitPerCustomer: number | null;
25
+ tieredDiscount: IkasProductTieredDiscount | null;
24
26
  };
25
27
  export type IkasCampaignApplicablePrice = "DISCOUNT_PRICE" | "SELL_PRICE";
26
28
  export type IkasCampaignCreatedFor = "ABANDONED_CHECKOUT" | "CART" | "CUSTOMER_REVIEW";
@@ -2,4 +2,4 @@ export type IkasProductCampaignFilter = {
2
2
  idList: string[];
3
3
  type: IkasCampaignFilterType;
4
4
  };
5
- export type IkasCampaignFilterType = "CATEGORY" | "PRODUCT" | "PRODUCT_BRAND" | "PRODUCT_TAG" | "VARIANT";
5
+ export type IkasCampaignFilterType = "CATEGORY" | "PRODUCT" | "PRODUCT_BRAND" | "PRODUCT_TAG" | "VARIANT" | "PRODUCT_AND_VARIANT";
@@ -0,0 +1,13 @@
1
+ import { IkasProductCampaignFilter } from "../filter";
2
+ import { IkasCampaignMinMaxRangeField } from "../product-fixed-discount";
3
+ export type IkasProductTieredDiscountRule = {
4
+ amount: number | null;
5
+ lineItemQuantityRange: IkasCampaignMinMaxRangeField | null;
6
+ priceRange: IkasCampaignMinMaxRangeField | null;
7
+ };
8
+ export type IkasProductTieredDiscount = {
9
+ filters: IkasProductCampaignFilter[] | null;
10
+ isApplyByCartAmount: boolean | null;
11
+ rules: IkasProductTieredDiscountRule[];
12
+ shouldMatchAllConditions: boolean | null;
13
+ };
@@ -3,6 +3,11 @@ export type IkasProductImage = {
3
3
  fileName: string | null;
4
4
  imageId: string | null;
5
5
  isMain: boolean;
6
+ /**
7
+ * True when this media item is a VIDEO, not an image. Product galleries, cards, swatches and
8
+ * line items must branch on it: render <video src={getDefaultSrc(item.image)}> instead of an
9
+ * <img>, otherwise the .mp4 URL lands in an <img> and the media breaks.
10
+ */
6
11
  isVideo: boolean | null;
7
12
  order: number;
8
13
  image?: IkasImage | null;
@@ -29,3 +29,20 @@ export type IkasAppliedCampaignAmount = {
29
29
  formattedPrice: string | null;
30
30
  discountPercentage: string | null;
31
31
  };
32
+ export type IkasTieredDiscountProduct = {
33
+ amount: number | null;
34
+ lineItemQuantityRange: {
35
+ min: number;
36
+ max: number;
37
+ };
38
+ type: IkasCampaignType;
39
+ sellPrice: number;
40
+ finalPrice: number;
41
+ sellPriceWithQuantity: number;
42
+ finalPriceWithQuantity: number;
43
+ formattedSellPrice: string;
44
+ formattedSellPriceWithQuantity: string;
45
+ formattedFinalPrice: string;
46
+ formattedFinalPriceWithQuantity: string;
47
+ salesChannelIds: string[] | null;
48
+ };
@@ -20,6 +20,7 @@ export type IkasStorefront = {
20
20
  analytics4Id: string | null;
21
21
  universalAnalyticsId: string | null;
22
22
  tiktokPixelId: string | null;
23
+ openAiPixelId?: string | null;
23
24
  token: string | null;
24
25
  type: IkasStorefrontType;
25
26
  metaTemplates: IkasStorefontMetaTemplates[] | null;
@@ -0,0 +1,4 @@
1
+ import { IkasForm, IkasFormItem } from "..";
2
+ export type DeactivateCustomerForm = {
3
+ password: IkasFormItem;
4
+ } & IkasForm;
@@ -1,6 +1,6 @@
1
1
  import { ProductFacetCount, SearchProduct } from "../../storefront-api/src";
2
2
  import { APIResponse } from "../../storefront-api-client/src";
3
- import { AccountInfoForm, AddressForm, BackInStockNotificationForm, ContactForm, CouponCodeForm, CustomerReviewForm, ForgotPasswordForm, IkasCustomer, IkasFavoriteProduct, IkasLastViewedProduct, IkasOrderRefundSettings, IkasProduct, LoginForm, NewsletterSubscriptionForm, OrderTrackingForm, RecoverPasswordForm, RegisterForm, SmsLoginForm, VerifyPhoneNumberForm } from "../../storefront-models/src";
3
+ import { AccountInfoForm, AddressForm, BackInStockNotificationForm, ContactForm, CouponCodeForm, CustomerReviewForm, DeactivateCustomerForm, ForgotPasswordForm, IkasCustomer, IkasFavoriteProduct, IkasLastViewedProduct, IkasOrderRefundSettings, IkasProduct, LoginForm, NewsletterSubscriptionForm, OrderTrackingForm, RecoverPasswordForm, RegisterForm, SmsLoginForm, VerifyPhoneNumberForm } from "../../storefront-models/src";
4
4
  export type IkasCustomerStore = {
5
5
  customer: IkasCustomer | null;
6
6
  _token: string | null;
@@ -19,6 +19,7 @@ export type IkasCustomerStore = {
19
19
  _contactForm: ContactForm | null;
20
20
  _couponCodeForm: CouponCodeForm | null;
21
21
  _customerReviewForms: Record<string, CustomerReviewForm>;
22
+ _deactivateCustomerForm: DeactivateCustomerForm | null;
22
23
  _forgotPasswordForm: ForgotPasswordForm | null;
23
24
  _loginForm: LoginForm | null;
24
25
  _smsLoginForm: SmsLoginForm | null;
@@ -1 +1 @@
1
- import{observable as o}from'./../../ext/mobx/dist/mobx.esm.js';var r=o({customer:null,_token:null,_tokenExpiry:null,_initialized:!1,_visitorSubscribedEmail:!1,_lastViewedProducts:[],_customerConsentGranted:!1,_refundSettings:null,_captchaToken:null,_savedLastViewedProducts:[],_savedLastViewedProductsResponse:null,_accountInfoForm:null,_addressForms:{},_backInStockForms:{},_contactForm:null,_couponCodeForm:null,_customerReviewForms:{},_forgotPasswordForm:null,_loginForm:null,_smsLoginForm:null,_verifyPhoneNumberForm:null,_newsletterSubscriptionForm:null,_orderTrackingForm:null,_recoverPasswordForm:null,_registerForm:null,_favoriteProducts:[],_isFavoriteProductsLoaded:!1});export{r as customerStore};
1
+ import{observable as o}from'./../../ext/mobx/dist/mobx.esm.js';var r=o({customer:null,_token:null,_tokenExpiry:null,_initialized:!1,_visitorSubscribedEmail:!1,_lastViewedProducts:[],_customerConsentGranted:!1,_refundSettings:null,_captchaToken:null,_savedLastViewedProducts:[],_savedLastViewedProductsResponse:null,_accountInfoForm:null,_addressForms:{},_backInStockForms:{},_contactForm:null,_couponCodeForm:null,_customerReviewForms:{},_deactivateCustomerForm:null,_forgotPasswordForm:null,_loginForm:null,_smsLoginForm:null,_verifyPhoneNumberForm:null,_newsletterSubscriptionForm:null,_orderTrackingForm:null,_recoverPasswordForm:null,_registerForm:null,_favoriteProducts:[],_isFavoriteProductsLoaded:!1});export{r as customerStore};