@ikas/bp-storefront 1.4.0-beta.23 → 1.4.0-beta.230

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 (137) 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 +12 -2
  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 +139 -4
  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/index.d.ts +22 -0
  54. package/dist/functions/models/product/index.js +1 -1
  55. package/dist/functions/models/product/variant/index.d.ts +96 -6
  56. package/dist/functions/models/product/variant/index.js +1 -1
  57. package/dist/functions/models/product-list/index.d.ts +21 -0
  58. package/dist/functions/models/product-list/index.js +1 -1
  59. package/dist/functions/models/validator/address/index.d.ts +70 -2
  60. package/dist/functions/models/validator/deactivate-customer/index.d.ts +54 -0
  61. package/dist/functions/models/validator/deactivate-customer/index.js +1 -0
  62. package/dist/functions/stores/base/index.d.ts +75 -0
  63. package/dist/functions/stores/base/index.js +1 -1
  64. package/dist/functions/stores/cart/index.d.ts +46 -2
  65. package/dist/functions/stores/cart/index.js +1 -1
  66. package/dist/functions/stores/customer/index.d.ts +349 -29
  67. package/dist/functions/stores/customer/index.js +1 -1
  68. package/dist/i18n/ikas-texts.d.ts +425 -0
  69. package/dist/i18n/index.d.ts +19 -0
  70. package/dist/index.d.ts +5 -1
  71. package/dist/index.js +1 -1
  72. package/dist/packages/storefront-api/src/__api/mutations/removeGiftCardFromCart.js +1 -0
  73. package/dist/packages/storefront-api/src/__api/mutations/unlinkExternalAccount.js +1 -0
  74. package/dist/packages/storefront-api/src/__api/queries/getExternalAccountLink.js +1 -0
  75. package/dist/packages/storefront-api/src/__api/queries/getLoyaltyProgram.js +1 -0
  76. package/dist/packages/storefront-api/src/__api/queries/getMilesSmilesDetails.js +1 -0
  77. package/dist/packages/storefront-api/src/__api/queries/getRefundableLines.js +1 -0
  78. package/dist/packages/storefront-api/src/__api/queries/listOrderTransactionsWithPrices.js +1 -0
  79. package/dist/packages/storefront-api-client/src/utils/api.js +1 -1
  80. package/dist/packages/storefront-config/src/index.js +1 -1
  81. package/dist/packages/storefront-config/src/theme-globals.js +1 -0
  82. package/dist/router/index.d.ts +28 -0
  83. package/dist/router/index.js +1 -1
  84. package/dist/storefront-api/src/__api/mutations/removeGiftCardFromCart.d.ts +7 -0
  85. package/dist/storefront-api/src/__api/mutations/unlinkExternalAccount.d.ts +6 -0
  86. package/dist/storefront-api/src/__api/queries/getExternalAccountLink.d.ts +6 -0
  87. package/dist/storefront-api/src/__api/queries/getLoyaltyProgram.d.ts +3 -0
  88. package/dist/storefront-api/src/__api/queries/getMilesSmilesDetails.d.ts +3 -0
  89. package/dist/storefront-api/src/__api/queries/getRefundableLines.d.ts +6 -0
  90. package/dist/storefront-api/src/__api/queries/listOrderTransactionsWithPrices.d.ts +6 -0
  91. package/dist/storefront-api/src/__api/types/index.d.ts +101 -6
  92. package/dist/storefront-api-client/src/utils/api.d.ts +7 -0
  93. package/dist/storefront-config/src/index.d.ts +32 -0
  94. package/dist/storefront-config/src/theme-globals.d.ts +349 -0
  95. package/dist/storefront-models/src/index.d.ts +8 -0
  96. package/dist/storefront-models/src/models/blueprint/prop-value/attribute-list.d.ts +2 -0
  97. package/dist/storefront-models/src/models/blueprint/prop-value/attribute.d.ts +2 -0
  98. package/dist/storefront-models/src/models/blueprint/prop-value/color.d.ts +2 -0
  99. package/dist/storefront-models/src/models/blueprint/prop-value/index.d.ts +1 -0
  100. package/dist/storefront-models/src/models/blueprint/prop-value/link.d.ts +10 -0
  101. package/dist/storefront-models/src/models/blueprint/prop-value/variable-binding.d.ts +16 -0
  102. package/dist/storefront-models/src/models/image/index.d.ts +7 -0
  103. package/dist/storefront-models/src/models/loyalty-program/customer-info/index.d.ts +2 -0
  104. package/dist/storefront-models/src/models/loyalty-program/earning-method/index.d.ts +1 -0
  105. package/dist/storefront-models/src/models/loyalty-program/index.d.ts +1 -0
  106. package/dist/storefront-models/src/models/loyalty-program/point-history/index.d.ts +1 -0
  107. package/dist/storefront-models/src/models/order/gift-card-line/index.d.ts +15 -0
  108. package/dist/storefront-models/src/models/order/index.d.ts +10 -0
  109. package/dist/storefront-models/src/models/order/line-item/index.d.ts +6 -1
  110. package/dist/storefront-models/src/models/order/package/index.d.ts +1 -1
  111. package/dist/storefront-models/src/models/order/refund/reason/index.d.ts +6 -0
  112. package/dist/storefront-models/src/models/order/refund/reason/translation/index.d.ts +4 -0
  113. package/dist/storefront-models/src/models/order/refund/refundable-line/index.d.ts +8 -0
  114. package/dist/storefront-models/src/models/order/refund/refundable-lines/index.d.ts +8 -0
  115. package/dist/storefront-models/src/models/order/refund/settings/translation/index.d.ts +4 -0
  116. package/dist/storefront-models/src/models/payment-gateway/index.d.ts +3 -1
  117. package/dist/storefront-models/src/models/product/attribute/index.d.ts +6 -1
  118. package/dist/storefront-models/src/models/product/campaign/data/index.d.ts +2 -0
  119. package/dist/storefront-models/src/models/product/campaign/filter/index.d.ts +1 -1
  120. package/dist/storefront-models/src/models/product/campaign/product-tiered-discount/index.d.ts +13 -0
  121. package/dist/storefront-models/src/models/product/image/index.d.ts +5 -0
  122. package/dist/storefront-models/src/models/product/variant/index.d.ts +17 -0
  123. package/dist/storefront-models/src/models/storefront/index.d.ts +1 -0
  124. package/dist/storefront-models/src/models/validator/deactivate-customer/index.d.ts +4 -0
  125. package/dist/stores/customer/index.d.ts +2 -1
  126. package/dist/stores/customer/index.js +1 -1
  127. package/dist/theme/settings/index.d.ts +51 -0
  128. package/dist/theme/settings/index.js +1 -0
  129. package/dist/utils/component-renderer.js +1 -1
  130. package/dist/utils/currency.d.ts +36 -3
  131. package/dist/utils/helper.d.ts +1 -0
  132. package/dist/utils/helper.js +1 -1
  133. package/dist/utils/pay-with-ikas.d.ts +552 -0
  134. package/dist/utils/pay-with-ikas.js +1 -0
  135. package/dist/utils/svg.d.ts +15 -0
  136. package/dist/utils/svg.js +1 -0
  137. package/package.json +2 -2
@@ -0,0 +1,349 @@
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
+ * Per-breakpoint values, widest first; present only when the style overrides at least one
65
+ * breakpoint. `className` already applies them through media queries — read this only when a
66
+ * value is needed in JS. Breakpoints without their own overrides are omitted: they use the next
67
+ * wider listed breakpoint, or the desktop `resolved` values.
68
+ */
69
+ breakpoints?: TypographyBreakpointToken[];
70
+ };
71
+ export type TypographyBreakpointToken = {
72
+ /** Theme breakpoint id (see `BreakpointToken`). */
73
+ id: string;
74
+ /** Media query max-width in px. */
75
+ width: number;
76
+ /** Only the values this breakpoint sets itself, keyed like `resolved`. */
77
+ overrides: Record<string, string>;
78
+ /** Full effective values at this breakpoint: desktop values plus inherited and own overrides. */
79
+ resolved: Record<string, string>;
80
+ };
81
+ export type BreakpointToken = {
82
+ id: string;
83
+ name: string;
84
+ width: number;
85
+ };
86
+ /** A resolved CSS style entry, e.g. { property: "animation-duration", value: "1.4s" }. */
87
+ export type StyleEntry = {
88
+ property: string;
89
+ value: string;
90
+ };
91
+ export type KeyframeToken = {
92
+ id: string;
93
+ name: string;
94
+ type: string;
95
+ /** CSS reference — the animation name / class the editor emits, e.g. `_<id>`. */
96
+ ref: string;
97
+ /**
98
+ * Keyframe-level animation "settings" (the editor's Settings popover). These are CSS
99
+ * animation/transition properties and DIFFER BY TYPE: a `keyframe` carries
100
+ * animation-duration/-iteration-count/-play-state/-delay/-timing-function/-direction/
101
+ * -fill-mode/-timeline/-range + transform-origin; a `transition` carries `transition`.
102
+ * Both may carry backface-visibility. Empty when none are set.
103
+ */
104
+ settings?: StyleEntry[];
105
+ /** Animation points; each point may carry its own resolved styles. */
106
+ points?: {
107
+ point: string;
108
+ styles?: StyleEntry[];
109
+ }[];
110
+ };
111
+ /**
112
+ * A color SLOT — one entry of the top-level `getThemeColorSchemes().schemes` list. It is a
113
+ * label only (`id` + display `name`); the actual colors for the slot live in each palette's
114
+ * `colorsByScheme[id]`.
115
+ */
116
+ export type ColorSchemeSlot = {
117
+ id: string;
118
+ name: string;
119
+ };
120
+ /**
121
+ * A color palette (one entry of `getThemeColorSchemes().values`). Its colors live in
122
+ * `colorsByScheme` — the top-level `schemes` list holds only slot id→name labels.
123
+ */
124
+ export type ColorSchemeToken = {
125
+ id: string;
126
+ name: string;
127
+ isDefault: boolean;
128
+ /** Class selector to activate this scheme value, e.g. `_<id>`. */
129
+ className: string;
130
+ /**
131
+ * This palette's colors, keyed by color-SLOT id (the ids in
132
+ * `getThemeColorSchemes().schemes`). THIS — not the top-level `schemes` array — is
133
+ * the source of truth for swatch colors; iterate it to render a palette. Prefer
134
+ * `cssVar` for live, in-editor reactivity; `resolved` is a render-time snapshot.
135
+ */
136
+ colorsByScheme: Record<string, {
137
+ resolved: string | null;
138
+ cssVar: string;
139
+ }>;
140
+ };
141
+ export type ThemeGlobals = {
142
+ settings: Record<string, ThemeSetting>;
143
+ colors: DesignToken[];
144
+ typography: TypographyToken[];
145
+ breakpoints: BreakpointToken[];
146
+ keyframes: KeyframeToken[];
147
+ colorSchemes: {
148
+ schemes: ColorSchemeSlot[];
149
+ values: ColorSchemeToken[];
150
+ };
151
+ };
152
+ /**
153
+ * Stamps a theme-token type as its RUNTIME view (what the `@ikas/bp-storefront` getters return).
154
+ * `name` is authoring-only: it is non-unique (two design assets can ship the same one) and
155
+ * non-stable (renaming must not break references), so matching a token by name is unsafe.
156
+ * Identify one by its STABLE `id` instead — color → `cssVar` (`var(--<id>)`), typography &
157
+ * keyframe → `className` / `ref` (`_<id>`), color-scheme slot → a `colorsByScheme` key. Need a
158
+ * human-readable label? Read `list_theme_globals` (MCP/CLI) or the editor's Styles panel.
159
+ *
160
+ * `name` is REMOVED outright rather than re-added as a documented `@deprecated never`: that was
161
+ * tried first and only yields a soft strikethrough, so `getThemeTypography().find(t => t.name ===
162
+ * "…")` still compiled and agents wrote it anyway. A hard `Omit` makes it a compile error, and
163
+ * `ikas-component build` runs `tsc --noEmit` and exits non-zero on it — so such a component cannot
164
+ * be built or shipped at all.
165
+ *
166
+ * The full {@link ThemeGlobals} (with real names) is still what the config holds and what the
167
+ * CLI/MCP `list-theme-globals` AUTHORING read returns — that is how an agent resolves "the token
168
+ * named X" to its id. `name` is hidden only at these runtime getter return types.
169
+ */
170
+ type RuntimeView<T> = Omit<T, "name">;
171
+ export type RuntimeDesignToken = RuntimeView<DesignToken>;
172
+ export type RuntimeTypographyToken = RuntimeView<TypographyToken>;
173
+ export type RuntimeBreakpointToken = RuntimeView<BreakpointToken>;
174
+ export type RuntimeKeyframeToken = RuntimeView<KeyframeToken>;
175
+ export type RuntimeColorSchemeToken = RuntimeView<ColorSchemeToken>;
176
+ export type RuntimeColorSchemeSlot = RuntimeView<ColorSchemeSlot>;
177
+ /**
178
+ * Runtime view of {@link ThemeGlobals.colorSchemes} (returned by `getThemeColorSchemes`). The
179
+ * slot list carries only `{ id }`: slot display LABELS (the slot `name`) are authoring-only —
180
+ * read them via the CLI/MCP `list-theme-globals` or the editor, not at runtime. Render a palette
181
+ * by iterating each value's `colorsByScheme`, keyed by slot id.
182
+ */
183
+ export type RuntimeThemeColorSchemes = {
184
+ schemes: RuntimeColorSchemeSlot[];
185
+ values: RuntimeColorSchemeToken[];
186
+ };
187
+ export declare const EMPTY_THEME_GLOBALS: ThemeGlobals;
188
+ type StyleValueLike = {
189
+ value?: any;
190
+ patternValueId?: string;
191
+ keyframeValueId?: string;
192
+ colorSchemeId?: string;
193
+ };
194
+ type StyleConditionLike = {
195
+ value?: StyleValueLike;
196
+ };
197
+ type ElementStyleLike = {
198
+ property: string;
199
+ value?: StyleValueLike | StyleConditionLike[];
200
+ };
201
+ type PatternValueLike = {
202
+ id: string;
203
+ name?: string;
204
+ style?: ElementStyleLike;
205
+ };
206
+ type PatternElementLike = {
207
+ id: string;
208
+ name?: string;
209
+ styles?: ElementStyleLike[];
210
+ isDefault?: boolean;
211
+ breakpointStyles?: {
212
+ breakpointId: string;
213
+ styles?: ElementStyleLike[];
214
+ }[];
215
+ };
216
+ type ColorSchemeLike = {
217
+ id: string;
218
+ name?: string;
219
+ };
220
+ type ColorSchemeValueColorLike = {
221
+ colorSchemeId: string;
222
+ style?: StyleValueLike;
223
+ };
224
+ type ColorSchemeValueLike = {
225
+ id: string;
226
+ name?: string;
227
+ isDefault?: boolean;
228
+ /** Set when this scheme belongs to an installed design asset; groups the default fallback. */
229
+ designAssetId?: string;
230
+ colors?: ColorSchemeValueColorLike[];
231
+ };
232
+ type BreakpointLike = {
233
+ id: string;
234
+ name?: string;
235
+ width?: number | string;
236
+ };
237
+ type KeyframePointLike = {
238
+ point: string;
239
+ styles?: ElementStyleLike[];
240
+ };
241
+ type KeyframeLike = {
242
+ id: string;
243
+ name?: string;
244
+ type?: string;
245
+ styles?: ElementStyleLike[];
246
+ points?: KeyframePointLike[];
247
+ };
248
+ type VariableLike = {
249
+ id?: string;
250
+ variableName?: string;
251
+ displayName?: string;
252
+ variableType?: string;
253
+ /** Blueprint type id. For an ENUM global this is the enum type's id (`project.types[].id`). */
254
+ typeId?: string;
255
+ defaultValue?: any;
256
+ isGlobal?: boolean;
257
+ };
258
+ /** The slice of a project `IType` an ENUM setting reads: its id and its `{ label: value }` options. */
259
+ type TypeLike = {
260
+ id: string;
261
+ type?: unknown;
262
+ enumOptions?: Record<string, any> | null;
263
+ };
264
+ export type SerializableProject = {
265
+ globalsBlueprint?: {
266
+ module?: {
267
+ variables?: VariableLike[];
268
+ };
269
+ };
270
+ /** Project custom types; only enum entries are read, to resolve ENUM settings' options. */
271
+ types?: TypeLike[];
272
+ theme?: {
273
+ breakpoints?: BreakpointLike[];
274
+ keyframes?: KeyframeLike[];
275
+ pattern?: {
276
+ values?: PatternValueLike[];
277
+ elements?: PatternElementLike[];
278
+ colorSchemes?: ColorSchemeLike[];
279
+ colorSchemeValues?: ColorSchemeValueLike[];
280
+ };
281
+ };
282
+ };
283
+ export declare const cssVarRef: (id: string, fallback?: string) => string;
284
+ export declare const rawClassRef: (id: string) => string;
285
+ /**
286
+ * CSS function-style token a code component writes to reference a theme breakpoint's width.
287
+ * Breakpoints can't ship as `var(--…)` because the CSS spec forbids `var()` in a media-query
288
+ * condition — and a `var()` there fails SILENTLY (it parses as valid-looking CSS but the whole
289
+ * query is dropped). So a code component writes a deliberately non-standard `bp(<breakpointId>)`
290
+ * token inside its OWN `min-width` / `max-width` condition; it resolves to a concrete `<width>px`
291
+ * at render time against the LIVE theme (see {@link resolveBreakpointMediaTokens}). The author
292
+ * picks the direction, so there is no implicit boundary magic:
293
+ * `@media (max-width: bp(_mob))` -> `@media (max-width: 767px)`
294
+ * `@media (min-width: bp(_mob))` -> `@media (min-width: 767px)`
295
+ * id-based, never a human name (the id is stable across renames). The id comes from
296
+ * `list-theme-globals` / `getThemeBreakpoints()`.
297
+ */
298
+ export declare const breakpointCssToken: (id: string) => string;
299
+ /**
300
+ * Coerce a theme's breakpoint list into the `{ id, width }` shape {@link resolveBreakpointMediaTokens}
301
+ * needs, defaulting a missing/non-numeric width to 0. Shared by both render sites so the coercion
302
+ * rule lives in one place; the editor passes `breakpoints.map(b => b.toJSON())` (Yjs → plain) first.
303
+ */
304
+ export declare const toResolverBreakpoints: (breakpoints: {
305
+ id: string;
306
+ width?: number | string;
307
+ }[]) => {
308
+ id: string;
309
+ width: number;
310
+ }[];
311
+ /**
312
+ * Replace breakpoint width tokens (`bp(<id>)`) in a CSS string with the breakpoint's concrete
313
+ * `<width>px`, using the given theme breakpoints. Pure text substitution — the single place
314
+ * breakpoint resolution lives, called at every render-time CC-CSS composition site
315
+ * (code-generator, editor canvas). Unknown ids are left untouched (the partner dependency
316
+ * collector ships referenced breakpoints into the target theme, so a real token always resolves).
317
+ * The `bp(<id>)` literal carries its own `)` boundary, so one id is never matched inside another.
318
+ *
319
+ * A `calc()` containing a bp token (e.g. the documented exclusive boundary
320
+ * `calc(bp(<id>) + 1px)`, but any pure px arithmetic: `calc(bp(a) * 2 + 10px)`,
321
+ * `calc(bp(a) - bp(b))`, `-webkit-calc(...)`, …) is folded to a single computed `<width>px`
322
+ * literal, never emitted as `calc()`: csso — the code-generator's minifier for inline/base
323
+ * page styles — silently drops a media block whose condition contains `calc()`, and older
324
+ * browsers (e.g. Safari < 16.4) don't evaluate `calc()` in media conditions either.
325
+ *
326
+ * Folding limits (an out-of-limit calc degrades to plain token substitution, keeping its
327
+ * `calc()` form — which csso will still drop from a media condition): bodies longer than
328
+ * CALC_SCAN_LIMIT chars; an uppercase `CALC(` keyword (the scan is lowercase, matching every
329
+ * compiled-CSS emitter); `calc(` inside a string/comment can confuse the plain-text scan.
330
+ */
331
+ export declare function resolveBreakpointMediaTokens(css: string, breakpoints: {
332
+ id: string;
333
+ width: number;
334
+ }[]): string;
335
+ /**
336
+ * True for system/reserved global variables (e.g. `__breakpointsVar__`) — internal
337
+ * constructs that live in `module.variables` but are NOT user-facing theme settings.
338
+ * Single source of truth for the `__name__` reserved-id convention; consumers (theme
339
+ * serialization here, partner publish dependency collection) share it so a new
340
+ * synthetic var is excluded everywhere at once.
341
+ */
342
+ export declare const isReservedVariableId: (id?: string | null) => boolean;
343
+ /**
344
+ * Build the {@link ThemeGlobals} payload from a project's theme. Pure and dependency-free
345
+ * (works on plain JSON), so the same function serves SSR (`IProject`) and the editor canvas
346
+ * (`YjsProject.toJSON()`).
347
+ */
348
+ export declare function serializeThemeGlobals(project?: SerializableProject | null): ThemeGlobals;
349
+ 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";
@@ -132,6 +133,11 @@ export * from "./models/order/payment-method";
132
133
  export * from "./models/order/refund";
133
134
  export * from "./models/order/refund/line-item";
134
135
  export * from "./models/order/refund/settings";
136
+ export * from "./models/order/refund/settings/translation";
137
+ export * from "./models/order/refund/reason";
138
+ export * from "./models/order/refund/reason/translation";
139
+ export * from "./models/order/refund/refundable-line";
140
+ export * from "./models/order/refund/refundable-lines";
135
141
  export * from "./models/order/shipping-line";
136
142
  export * from "./models/order/tax-line";
137
143
  export * from "./models/order/transaction";
@@ -157,6 +163,7 @@ export * from "./models/product/campaign/filter";
157
163
  export * from "./models/product/campaign/product-buyx-then-gety";
158
164
  export * from "./models/product/campaign/product-campaign-date-range-field";
159
165
  export * from "./models/product/campaign/product-fixed-discount";
166
+ export * from "./models/product/campaign/product-tiered-discount";
160
167
  export * from "./models/product/campaign-offer";
161
168
  export * from "./models/product/filter";
162
169
  export * from "./models/product/group";
@@ -227,6 +234,7 @@ export * from "./models/validator/back-in-stock-notification";
227
234
  export * from "./models/validator/contact-form";
228
235
  export * from "./models/validator/coupon-code-form";
229
236
  export * from "./models/validator/customer-review";
237
+ export * from "./models/validator/deactivate-customer";
230
238
  export * from "./models/validator/forgot-password";
231
239
  export * from "./models/validator/login";
232
240
  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";
@@ -1,9 +1,19 @@
1
1
  import { IkasNavigationLinkType } from "../../navigation-link";
2
2
  import { IkasThemePageType } from "../../theme";
3
+ export interface IBlueprintLinkLabelTranslation {
4
+ locale: string;
5
+ label: string;
6
+ /** The routing the label is for; none: every routing speaking `locale` without one of its own. */
7
+ sfRoutingId?: string | null;
8
+ }
3
9
  export interface IBlueprintLinkPropValue {
4
10
  id?: string | null;
5
11
  linkType?: IkasNavigationLinkType | null;
6
12
  label?: string | null;
13
+ /** The label is the linked product's, category's or brand's name, shown in the routing's language. */
14
+ useItemNameTranslations?: boolean | null;
15
+ /** The label on other routings and languages; the list's links, their order and targets are the same everywhere. */
16
+ translations?: IBlueprintLinkLabelTranslation[] | null;
7
17
  pageId?: string | null;
8
18
  pageType?: IkasThemePageType | null;
9
19
  itemId?: string | null;
@@ -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,11 +1,15 @@
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";
7
8
  import { IkasOrderPackage } from "./package";
8
9
  import { IkasOrderPaymentMethod } from "./payment-method";
10
+ import { IkasOrderRefundReason } from "./refund/reason";
11
+ import { IkasRefundableLine } from "./refund/refundable-line";
12
+ import { IkasOrderRefundSettingsTranslation } from "./refund/settings/translation";
9
13
  import { IkasOrderShippingLine } from "./shipping-line";
10
14
  import { IkasOrderTaxLine } from "./tax-line";
11
15
  import { IkasOrderTransaction } from "./transaction";
@@ -21,6 +25,7 @@ export type IkasOrder = {
21
25
  currencySymbol: string | null;
22
26
  customer: IkasOrderCustomer | null;
23
27
  customerId: string | null;
28
+ giftCardLines: IkasOrderGiftCardLine[] | null;
24
29
  giftPackageLines: IkasOrderGiftPackageLine[] | null;
25
30
  giftPackageNote: string | null;
26
31
  invoices: IkasInvoice[] | null;
@@ -43,6 +48,11 @@ export type IkasOrder = {
43
48
  totalFinalPrice: number;
44
49
  totalPrice: number;
45
50
  transactions?: IkasOrderTransaction[];
51
+ _refundableLines?: IkasRefundableLine[] | null;
52
+ _refundReasons?: IkasOrderRefundReason[] | null;
53
+ _refundTranslations?: IkasOrderRefundSettingsTranslation[] | null;
54
+ _refundReasonId?: string | null;
55
+ _refundReason?: string | null;
46
56
  };
47
57
  export type IkasOrderCancelReason = "CUSTOMER" | "DECLINED" | "INVENTORY" | "OTHER";
48
58
  export type IkasOrderPackageStatus = "CANCELLED" | "CANCEL_REJECTED" | "CANCEL_REQUESTED" | "DELIVERED" | "FULFILLED" | "PARTIALLY_CANCELLED" | "PARTIALLY_DELIVERED" | "PARTIALLY_FULFILLED" | "PARTIALLY_READY_FOR_SHIPMENT" | "PARTIALLY_REFUNDED" | "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";
@@ -1,3 +1,4 @@
1
+ import { IkasOrderRefundFlow } from "../refund/refundable-line";
1
2
  import { IkasOrderLineBundleProductSettings } from "./bundle-product-settings";
2
3
  import { IkasOrderLineDiscount } from "./discount";
3
4
  import { IkasOrderLineItemOption } from "./option";
@@ -25,6 +26,10 @@ export type IkasOrderLineItem = {
25
26
  variant: IkasOrderLineVariant;
26
27
  bundleProductSettings: IkasOrderLineBundleProductSettings | null;
27
28
  orderedAt: number;
29
+ flow?: IkasOrderRefundFlow | null;
30
+ autoApprove?: boolean;
31
+ isCancellable?: boolean;
32
+ isRefundable?: boolean;
28
33
  _refundQuantity: number | null;
29
34
  };
30
- export type IkasOrderLineItemStatus = "CANCELLED" | "CANCEL_REJECTED" | "CANCEL_REQUESTED" | "DELIVERED" | "FULFILLED" | "REFUNDED" | "REFUND_REJECTED" | "REFUND_REQUESTED" | "REFUND_REQUEST_ACCEPTED" | "UNFULFILLED";
35
+ 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;
@@ -0,0 +1,6 @@
1
+ import { IkasOrderRefundReasonTranslation } from "./translation";
2
+ export type IkasOrderRefundReason = {
3
+ id: string;
4
+ title: string;
5
+ translations: IkasOrderRefundReasonTranslation[] | null;
6
+ };
@@ -0,0 +1,4 @@
1
+ export type IkasOrderRefundReasonTranslation = {
2
+ locale: string;
3
+ title: string | null;
4
+ };
@@ -0,0 +1,8 @@
1
+ export type IkasOrderRefundFlow = "CANCEL" | "RETURN";
2
+ export type IkasRefundableLine = {
3
+ autoApprove: boolean;
4
+ flow: IkasOrderRefundFlow | null;
5
+ isCancellable: boolean;
6
+ isRefundable: boolean;
7
+ orderLineItemId: string;
8
+ };
@@ -0,0 +1,8 @@
1
+ import { IkasOrderRefundReason } from "../reason";
2
+ import { IkasRefundableLine } from "../refundable-line";
3
+ import { IkasOrderRefundSettingsTranslation } from "../settings/translation";
4
+ export type IkasRefundableLines = {
5
+ orderLineItems: IkasRefundableLine[];
6
+ refundReasons: IkasOrderRefundReason[];
7
+ translations: IkasOrderRefundSettingsTranslation[];
8
+ };
@@ -0,0 +1,4 @@
1
+ export type IkasOrderRefundSettingsTranslation = {
2
+ locale: string;
3
+ returnMethodDescription: string | null;
4
+ };
@@ -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;