@betterstore/react 0.5.22 → 0.5.24

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.
@@ -68,37 +68,37 @@ export declare const customerSchema: z.ZodObject<{
68
68
  }>;
69
69
  export declare const shipmentsFormSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
70
70
  rateId: z.ZodString;
71
- provider: z.ZodString;
71
+ providerId: z.ZodOptional<z.ZodString>;
72
72
  priceInCents: z.ZodNumber;
73
- name: z.ZodString;
74
73
  pickupPointId: z.ZodOptional<z.ZodString>;
75
74
  pickupPointDisplayName: z.ZodOptional<z.ZodString>;
75
+ displayName: z.ZodString;
76
76
  }, "strip", z.ZodTypeAny, {
77
77
  priceInCents: number;
78
+ displayName: string;
78
79
  rateId: string;
79
- provider: string;
80
- name: string;
80
+ providerId?: string | undefined;
81
81
  pickupPointId?: string | undefined;
82
82
  pickupPointDisplayName?: string | undefined;
83
83
  }, {
84
84
  priceInCents: number;
85
+ displayName: string;
85
86
  rateId: string;
86
- provider: string;
87
- name: string;
87
+ providerId?: string | undefined;
88
88
  pickupPointId?: string | undefined;
89
89
  pickupPointDisplayName?: string | undefined;
90
90
  }>>, Record<string, {
91
91
  priceInCents: number;
92
+ displayName: string;
92
93
  rateId: string;
93
- provider: string;
94
- name: string;
94
+ providerId?: string | undefined;
95
95
  pickupPointId?: string | undefined;
96
96
  pickupPointDisplayName?: string | undefined;
97
97
  }>, Record<string, {
98
98
  priceInCents: number;
99
+ displayName: string;
99
100
  rateId: string;
100
- provider: string;
101
- name: string;
101
+ providerId?: string | undefined;
102
102
  pickupPointId?: string | undefined;
103
103
  pickupPointDisplayName?: string | undefined;
104
104
  }>>;
@@ -172,37 +172,37 @@ export declare const checkoutSchema: z.ZodObject<{
172
172
  }>;
173
173
  shipping: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
174
174
  rateId: z.ZodString;
175
- provider: z.ZodString;
175
+ providerId: z.ZodOptional<z.ZodString>;
176
176
  priceInCents: z.ZodNumber;
177
- name: z.ZodString;
178
177
  pickupPointId: z.ZodOptional<z.ZodString>;
179
178
  pickupPointDisplayName: z.ZodOptional<z.ZodString>;
179
+ displayName: z.ZodString;
180
180
  }, "strip", z.ZodTypeAny, {
181
181
  priceInCents: number;
182
+ displayName: string;
182
183
  rateId: string;
183
- provider: string;
184
- name: string;
184
+ providerId?: string | undefined;
185
185
  pickupPointId?: string | undefined;
186
186
  pickupPointDisplayName?: string | undefined;
187
187
  }, {
188
188
  priceInCents: number;
189
+ displayName: string;
189
190
  rateId: string;
190
- provider: string;
191
- name: string;
191
+ providerId?: string | undefined;
192
192
  pickupPointId?: string | undefined;
193
193
  pickupPointDisplayName?: string | undefined;
194
194
  }>>, Record<string, {
195
195
  priceInCents: number;
196
+ displayName: string;
196
197
  rateId: string;
197
- provider: string;
198
- name: string;
198
+ providerId?: string | undefined;
199
199
  pickupPointId?: string | undefined;
200
200
  pickupPointDisplayName?: string | undefined;
201
201
  }>, Record<string, {
202
202
  priceInCents: number;
203
+ displayName: string;
203
204
  rateId: string;
204
- provider: string;
205
- name: string;
205
+ providerId?: string | undefined;
206
206
  pickupPointId?: string | undefined;
207
207
  pickupPointDisplayName?: string | undefined;
208
208
  }>>;
@@ -227,9 +227,9 @@ export declare const checkoutSchema: z.ZodObject<{
227
227
  };
228
228
  shipping: Record<string, {
229
229
  priceInCents: number;
230
+ displayName: string;
230
231
  rateId: string;
231
- provider: string;
232
- name: string;
232
+ providerId?: string | undefined;
233
233
  pickupPointId?: string | undefined;
234
234
  pickupPointDisplayName?: string | undefined;
235
235
  }>;
@@ -254,9 +254,9 @@ export declare const checkoutSchema: z.ZodObject<{
254
254
  };
255
255
  shipping: Record<string, {
256
256
  priceInCents: number;
257
+ displayName: string;
257
258
  rateId: string;
258
- provider: string;
259
- name: string;
259
+ providerId?: string | undefined;
260
260
  pickupPointId?: string | undefined;
261
261
  pickupPointDisplayName?: string | undefined;
262
262
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"checkout-schema.d.ts","sourceRoot":"","sources":["../../../src/components/checkout-embed/checkout-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBzB,CAAC;AAYH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAK5B,CAAC;AAGL,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzB,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"checkout-schema.d.ts","sourceRoot":"","sources":["../../../src/components/checkout-embed/checkout-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBzB,CAAC;AAaH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAK5B,CAAC;AAGL,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzB,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../../src/components/checkout-embed/steps/payment/form.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,OAAO,EACL,gBAAgB,EAEhB,KAAK,EACN,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,UAAU,gBAAgB;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,gBAAgB,CAAC;IACtC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,aAAa,EACb,SAAS,EACT,OAAO,EACP,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,KAAK,EACL,MAAM,EACN,SAAS,EACT,mBAAmB,GACpB,EAAE,gBAAgB,2CAmGlB"}
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../../src/components/checkout-embed/steps/payment/form.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,OAAO,EACL,gBAAgB,EAEhB,KAAK,EACN,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,UAAU,gBAAgB;IACxB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,WAAW,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,gBAAgB,CAAC;IACtC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,aAAa,EACb,SAAS,EACT,OAAO,EACP,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,KAAK,EACL,MAAM,EACN,SAAS,EACT,mBAAmB,GACpB,EAAE,gBAAgB,2CAoGlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../../src/components/checkout-embed/steps/shipping/form.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMjE,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,UAAU,kBAAkB;IAC1B,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IACtC,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAChC,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;CACzC;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,aAAa,EACb,WAAW,EACX,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,kBAAkB,2CA0FpB"}
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../../src/components/checkout-embed/steps/shipping/form.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAMjE,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,UAAU,kBAAkB;IAC1B,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC5C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IACtC,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAChC,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;CACzC;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,aAAa,EACb,WAAW,EACX,QAAQ,EACR,MAAM,EACN,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,WAAW,EACX,WAAW,EACX,QAAQ,EACR,SAAS,GACV,EAAE,kBAAkB,2CA2FpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"shipping-option-wrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/checkout-embed/steps/shipping/shipping-option-wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,IAAI,EACJ,QAAQ,EACR,qBAAqB,EACrB,MAAM,EACN,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,qBAAqB,CAAC,EAAE,CACtB,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,KACpB,IAAI,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,2CAeA"}
1
+ {"version":3,"file":"shipping-option-wrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/checkout-embed/steps/shipping/shipping-option-wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAC5C,IAAI,EACJ,QAAQ,EACR,qBAAqB,EACrB,MAAM,EACN,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,qBAAqB,CAAC,EAAE,CACtB,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,KACpB,IAAI,CAAC;IACV,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,2CAkBA"}
package/dist/index.cjs.js CHANGED
@@ -3341,6 +3341,9 @@ const CheckoutEmbed$2 = {
3341
3341
  other: "Váš balíček bude doručen kurýrem.",
3342
3342
  zasilkovna: "Vaše objednávka bude doručena na výdejní místo.",
3343
3343
  shippedTo: "Místo doručení:"
3344
+ },
3345
+ shipment: {
3346
+ title: "Zásilka č."
3344
3347
  }
3345
3348
  }
3346
3349
  };
@@ -3413,9 +3416,21 @@ const CheckoutEmbed$1 = {
3413
3416
  day: "day",
3414
3417
  days: "days",
3415
3418
  description: {
3416
- other: "Your package will be delivered by a courier.",
3417
- zasilkovna: "Your package will be delivered to a pickup point.",
3418
3419
  shippedTo: "Shipped to:"
3420
+ },
3421
+ Shipment: {
3422
+ title: "Shipment No. ",
3423
+ perIdTitles: {
3424
+ "zasilkovna-z_box": "Zásilkovna, Z-Box",
3425
+ "prebuilt-pickup-in-store": "Pickup in store",
3426
+ "prebuilt-local-delivery": "Local delivery"
3427
+ },
3428
+ perIdDescriptions: {
3429
+ fallback: "Your package will be delivered by a courier.",
3430
+ "zasilkovna-z_box": "Your package will be delivered to a pickup point.",
3431
+ "prebuilt-pickup-in-store": "Pickup in store",
3432
+ "prebuilt-local-delivery": "Local delivery"
3433
+ }
3419
3434
  }
3420
3435
  },
3421
3436
  Payment: {
@@ -17258,7 +17273,7 @@ ZodTuple.create;
17258
17273
  const recordType = ZodRecord.create;
17259
17274
  ZodEnum.create;
17260
17275
  ZodPromise.create;
17261
- ZodOptional.create;
17276
+ const optionalType = ZodOptional.create;
17262
17277
  ZodNullable.create;
17263
17278
 
17264
17279
  const phoneRegex = new RegExp(/^([+]?[\s0-9]+)?(\d{3}|[(]?[0-9]+[)])?([-]?[\s]?[0-9])+$/);
@@ -17283,11 +17298,11 @@ const customerSchema = objectType({
17283
17298
  // Shipping method schema
17284
17299
  const shippingMethodSchema = objectType({
17285
17300
  rateId: stringType().min(1, "required_error"),
17286
- provider: stringType().min(1, "required_error"),
17301
+ providerId: optionalType(stringType()),
17287
17302
  priceInCents: numberType().min(1, "required_error"),
17288
- name: stringType().min(1, "required_error"),
17289
17303
  pickupPointId: stringType().optional(),
17290
- pickupPointDisplayName: stringType().optional(),
17304
+ pickupPointDisplayName: stringType().optional(), // Only for display purposes
17305
+ displayName: stringType(), // Only for display purposes
17291
17306
  });
17292
17307
  const shipmentsFormSchema = recordType(stringType(), shippingMethodSchema)
17293
17308
  .refine((data) => Object.keys(data).length > 0, {
@@ -26314,14 +26329,9 @@ function getWindowScrollBarX(element, rect) {
26314
26329
  return rect.left + leftScroll;
26315
26330
  }
26316
26331
 
26317
- function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
26318
- if (ignoreScrollbarX === void 0) {
26319
- ignoreScrollbarX = false;
26320
- }
26332
+ function getHTMLOffset(documentElement, scroll) {
26321
26333
  const htmlRect = documentElement.getBoundingClientRect();
26322
- const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
26323
- // RTL <body> scrollbar.
26324
- getWindowScrollBarX(documentElement, htmlRect));
26334
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
26325
26335
  const y = htmlRect.top + scroll.scrollTop;
26326
26336
  return {
26327
26337
  x,
@@ -26360,7 +26370,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
26360
26370
  offsets.y = offsetRect.y + offsetParent.clientTop;
26361
26371
  }
26362
26372
  }
26363
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
26373
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
26364
26374
  return {
26365
26375
  width: rect.width * scale.x,
26366
26376
  height: rect.height * scale.y,
@@ -26394,6 +26404,10 @@ function getDocumentRect(element) {
26394
26404
  };
26395
26405
  }
26396
26406
 
26407
+ // Safety check: ensure the scrollbar space is reasonable in case this
26408
+ // calculation is affected by unusual styles.
26409
+ // Most scrollbars leave 15-18px of space.
26410
+ const SCROLLBAR_MAX = 25;
26397
26411
  function getViewportRect(element, strategy) {
26398
26412
  const win = getWindow(element);
26399
26413
  const html = getDocumentElement(element);
@@ -26411,6 +26425,24 @@ function getViewportRect(element, strategy) {
26411
26425
  y = visualViewport.offsetTop;
26412
26426
  }
26413
26427
  }
26428
+ const windowScrollbarX = getWindowScrollBarX(html);
26429
+ // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
26430
+ // visual width of the <html> but this is not considered in the size
26431
+ // of `html.clientWidth`.
26432
+ if (windowScrollbarX <= 0) {
26433
+ const doc = html.ownerDocument;
26434
+ const body = doc.body;
26435
+ const bodyStyles = getComputedStyle(body);
26436
+ const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
26437
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
26438
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
26439
+ width -= clippingStableScrollbarWidth;
26440
+ }
26441
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) {
26442
+ // If the <body> scrollbar is on the left, the width needs to be extended
26443
+ // by the scrollbar amount so there isn't extra space on the right.
26444
+ width += windowScrollbarX;
26445
+ }
26414
26446
  return {
26415
26447
  width,
26416
26448
  height,
@@ -40213,12 +40245,12 @@ function requireReactStripe_umd () {
40213
40245
 
40214
40246
  stripe._registerWrapper({
40215
40247
  name: 'react-stripe-js',
40216
- version: "3.9.1"
40248
+ version: "3.9.2"
40217
40249
  });
40218
40250
 
40219
40251
  stripe.registerAppInfo({
40220
40252
  name: 'react-stripe-js',
40221
- version: "3.9.1",
40253
+ version: "3.9.2",
40222
40254
  url: 'https://stripe.com/docs/stripe-js/react'
40223
40255
  });
40224
40256
  };
@@ -41385,7 +41417,7 @@ var PaymentElement$1 = React.memo(PaymentElement);
41385
41417
  function PaymentForm({ paymentSecret, onSuccess, onError, onBack, onDoubleBack, contactEmail, shippingFormData, address, checkoutAppearance, fonts, locale, publicKey, paymentComponentKey, }) {
41386
41418
  const [isSubmitting, setIsSubmitting] = React.useState(false);
41387
41419
  const { t } = useTranslation();
41388
- return (jsxRuntime.jsxs("div", { className: "space-y-6", children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { className: "mb-2", children: t("CheckoutEmbed.Payment.title") }), jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: t("CheckoutEmbed.Payment.description") })] }), jsxRuntime.jsxs("div", { className: "space-y-2", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.contact") }), " ", jsxRuntime.jsx("span", { className: "text-muted-foreground", children: contactEmail })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onDoubleBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.address") }), " ", jsxRuntime.jsx("span", { className: "text-muted-foreground", children: address })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onDoubleBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("div", { className: "flex gap-1", children: [jsxRuntime.jsx("p", { className: "font-medium", children: t("CheckoutEmbed.Shipping.shipping") }), " ", jsxRuntime.jsx("div", { className: "text-muted-foreground flex flex-col gap-1", children: Object.entries(shippingFormData).map(([id, shipmentFormData]) => (jsxRuntime.jsxs("p", { children: [shipmentFormData.name, " \u00B7 ", shipmentFormData.priceInCents] }, id))) })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] })] }), jsxRuntime.jsx("div", { className: "mt-8", children: paymentSecret && (jsxRuntime.jsx(PaymentElement$1, { fonts: fonts, checkoutAppearance: convertCheckoutAppearanceToStripeAppearance(checkoutAppearance, fonts), locale: locale, paymentSecret: paymentSecret, onSuccess: onSuccess, onError: onError, setSubmitting: setIsSubmitting, publicKey: publicKey, children: jsxRuntime.jsx("div", { className: "fixed bottom-0 left-0 right-0 z-50 mt-8 px-4 sm:static sm:px-0", children: jsxRuntime.jsxs("div", { className: "bg-background flex flex-col-reverse items-center justify-between gap-2 pb-4 sm:flex-row sm:bg-transparent sm:pb-0", children: [jsxRuntime.jsxs(Button, { className: "w-full sm:w-fit", type: "button", variant: "ghost", onClick: onBack, children: [jsxRuntime.jsx(ChevronLeft, {}), t("CheckoutEmbed.Payment.back")] }), jsxRuntime.jsx(SubmitButton, { className: "w-full max-sm:h-[52px] sm:w-fit", isValid: true, isSubmitting: isSubmitting, children: t("CheckoutEmbed.Payment.button") })] }) }) }, paymentComponentKey)) })] }));
41420
+ return (jsxRuntime.jsxs("div", { className: "space-y-6", children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { className: "mb-2", children: t("CheckoutEmbed.Payment.title") }), jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: t("CheckoutEmbed.Payment.description") })] }), jsxRuntime.jsxs("div", { className: "space-y-2", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.contact") }), " ", jsxRuntime.jsx("span", { className: "text-muted-foreground", children: contactEmail })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onDoubleBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.address") }), " ", jsxRuntime.jsx("span", { className: "text-muted-foreground", children: address })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onDoubleBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("div", { className: "flex gap-1", children: [jsxRuntime.jsx("p", { className: "font-medium", children: t("CheckoutEmbed.Shipping.shipping") }), " ", jsxRuntime.jsx("div", { className: "text-muted-foreground flex flex-col gap-1", children: Object.entries(shippingFormData).map(([id, shipmentFormData]) => (jsxRuntime.jsxs("p", { children: [shipmentFormData.displayName, " \u00B7", " ", shipmentFormData.priceInCents] }, id))) })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] })] }), jsxRuntime.jsx("div", { className: "mt-8", children: paymentSecret && (jsxRuntime.jsx(PaymentElement$1, { fonts: fonts, checkoutAppearance: convertCheckoutAppearanceToStripeAppearance(checkoutAppearance, fonts), locale: locale, paymentSecret: paymentSecret, onSuccess: onSuccess, onError: onError, setSubmitting: setIsSubmitting, publicKey: publicKey, children: jsxRuntime.jsx("div", { className: "fixed bottom-0 left-0 right-0 z-50 mt-8 px-4 sm:static sm:px-0", children: jsxRuntime.jsxs("div", { className: "bg-background flex flex-col-reverse items-center justify-between gap-2 pb-4 sm:flex-row sm:bg-transparent sm:pb-0", children: [jsxRuntime.jsxs(Button, { className: "w-full sm:w-fit", type: "button", variant: "ghost", onClick: onBack, children: [jsxRuntime.jsx(ChevronLeft, {}), t("CheckoutEmbed.Payment.back")] }), jsxRuntime.jsx(SubmitButton, { className: "w-full max-sm:h-[52px] sm:w-fit", isValid: true, isSubmitting: isSubmitting, children: t("CheckoutEmbed.Payment.button") })] }) }) }, paymentComponentKey)) })] }));
41389
41421
  }
41390
41422
 
41391
41423
  function Skeleton(_a) {
@@ -41435,7 +41467,8 @@ function ZasilkovnaShippingOption({ children, onPickupPointSelected, locale, cou
41435
41467
  }
41436
41468
 
41437
41469
  function ShippingOptionWrapper({ rate, children, onPickupPointSelected, locale, countryCode, }) {
41438
- if (rate.provider === "zasilkovna") {
41470
+ const isAutoRate = rate.type === "CUSTOM_SHIPPING_VENDOR" || rate.type === "PLATFORM_CARRIER";
41471
+ if (isAutoRate && rate.providerId === "zasilkovna") {
41439
41472
  return (jsxRuntime.jsx(ZasilkovnaShippingOption, { onPickupPointSelected: onPickupPointSelected, locale: locale, countryCode: countryCode, apiKey: rate.clientSecret, children: children }));
41440
41473
  }
41441
41474
  return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
@@ -41459,42 +41492,49 @@ function ShipmentsForm({ shippingRates, initialData, onSubmit, onBack, contactEm
41459
41492
  ])),
41460
41493
  });
41461
41494
  const isButtonEnabled = Object.values(form.getValues()).every((value) => { var _a; return ((_a = value.rateId) === null || _a === void 0 ? void 0 : _a.length) > 0; });
41462
- return (jsxRuntime.jsxs("div", { className: "space-y-6", children: [jsxRuntime.jsx("h2", { children: t("CheckoutEmbed.Shipping.title") }), jsxRuntime.jsxs("div", { className: "space-y-2 pb-2", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.contact") }), " ", jsxRuntime.jsx("span", { className: "text-muted-foreground", children: contactEmail })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.address") }), " ", jsxRuntime.jsx("span", { className: "text-muted-foreground", children: shippingAddress })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] })] }), jsxRuntime.jsx(Form, Object.assign({}, form, { children: jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-4", children: [shipments.map((shipment) => (jsxRuntime.jsx(SingleShipmentSection, { shipment: shipment, shippingRates: shippingRates, form: form, setFormData: setFormData, formData: formData, currency: currency, exchangeRate: exchangeRate, locale: locale, countryCode: countryCode, multipleShipments: shipments.length > 1 }, shipment.id))), jsxRuntime.jsx(FormMessage, { children: (_a = form.formState.errors.root) === null || _a === void 0 ? void 0 : _a.message }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between pt-4", children: [jsxRuntime.jsxs(Button, { type: "button", variant: "ghost", onClick: onBack, children: [jsxRuntime.jsx(ChevronLeft, {}), t("CheckoutEmbed.Shipping.back")] }), jsxRuntime.jsx(SubmitButton, { isSubmitting: form.formState.isSubmitting, isValid: isButtonEnabled, children: t("CheckoutEmbed.Shipping.button") })] })] }) }))] }));
41495
+ return (jsxRuntime.jsxs("div", { className: "space-y-6", children: [jsxRuntime.jsx("h2", { children: t("CheckoutEmbed.Shipping.title") }), jsxRuntime.jsxs("div", { className: "space-y-2 pb-2", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.contact") }), " ", jsxRuntime.jsx("span", { className: "text-muted-foreground", children: contactEmail })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.address") }), " ", jsxRuntime.jsx("span", { className: "text-muted-foreground", children: shippingAddress })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] })] }), jsxRuntime.jsx(Form, Object.assign({}, form, { children: jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-4", children: [shipments.map((shipment, index) => (jsxRuntime.jsx(SingleShipmentSection, { shipment: shipment, shippingRates: shippingRates, form: form, setFormData: setFormData, formData: formData, currency: currency, exchangeRate: exchangeRate, locale: locale, countryCode: countryCode, multipleShipments: shipments.length > 1, index: index }, shipment.id))), jsxRuntime.jsx(FormMessage, { children: (_a = form.formState.errors.root) === null || _a === void 0 ? void 0 : _a.message }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between pt-4", children: [jsxRuntime.jsxs(Button, { type: "button", variant: "ghost", onClick: onBack, children: [jsxRuntime.jsx(ChevronLeft, {}), t("CheckoutEmbed.Shipping.back")] }), jsxRuntime.jsx(SubmitButton, { isSubmitting: form.formState.isSubmitting, isValid: isButtonEnabled, children: t("CheckoutEmbed.Shipping.button") })] })] }) }))] }));
41463
41496
  }
41464
- const SingleShipmentSection = ({ shippingRates, form, currency, exchangeRate, locale, countryCode, setFormData, formData, multipleShipments, shipment, }) => {
41465
- var _a;
41497
+ const SingleShipmentSection = ({ shippingRates, form, currency, exchangeRate, locale, countryCode, setFormData, formData, multipleShipments, shipment, index, }) => {
41466
41498
  const { t } = useTranslation();
41467
41499
  const shipmentId = shipment.id;
41468
41500
  const currentRateId = form.watch(`${shipmentId}.rateId`);
41469
41501
  // TODO: construct the headline
41470
- return (jsxRuntime.jsxs("div", { children: [multipleShipments && (jsxRuntime.jsx("h3", { className: "text-lg font-medium", children: (_a = shipment.shipmentData) === null || _a === void 0 ? void 0 : _a.name })), shippingRates.length === 0 &&
41502
+ return (jsxRuntime.jsxs("div", { children: [multipleShipments && (jsxRuntime.jsxs("h3", { className: "text-lg font-medium", children: [t("CheckoutEmbed.Shipping.Shipment.title"), index + 1] })), shippingRates.length === 0 &&
41471
41503
  Array.from({ length: 3 }).map((_, index) => (jsxRuntime.jsx(ShippingRateLoading, {}, index))), shippingRates.map((rate) => {
41504
+ var _a, _b;
41472
41505
  const pickupPointDisplayName = form.watch(`${shipmentId}.pickupPointDisplayName`);
41473
- const rateId = rate.provider + rate.name;
41474
41506
  const intPrice = Math.ceil(Number(rate.priceInCents));
41475
41507
  const displayPrice = storeHelpers.formatPrice(intPrice, currency, exchangeRate);
41476
- const description = rate.provider === "zasilkovna"
41477
- ? t("CheckoutEmbed.Shipping.description.zasilkovna")
41478
- : t("CheckoutEmbed.Shipping.description.other");
41508
+ const isFixedRate = rate.type === "FIXED";
41509
+ const isAutoRate = rate.type === "CUSTOM_SHIPPING_VENDOR" ||
41510
+ rate.type === "PLATFORM_CARRIER";
41511
+ const isZasilkovna = isAutoRate && rate.providerId === "zasilkovna";
41512
+ const name = isFixedRate
41513
+ ? rate.name
41514
+ : ((_a = t(`CheckoutEmbed.Shipping.Shipment.perIdTitles.${rate.id}`)) !== null && _a !== void 0 ? _a : rate.id);
41515
+ const fallbackDescription = t(`CheckoutEmbed.Shipping.Shipment.perIdDescriptions.fallback`);
41516
+ const description = (_b = (isFixedRate
41517
+ ? rate.description
41518
+ : t(`CheckoutEmbed.Shipping.Shipment.perIdDescriptions.${rate.id}`))) !== null && _b !== void 0 ? _b : fallbackDescription;
41479
41519
  return (jsxRuntime.jsx(ShippingOptionWrapper, { rate: rate, onPickupPointSelected: (pickupPointId, pickupPointName) => {
41480
41520
  const newData = {
41481
- rateId,
41482
- provider: rate.provider,
41521
+ rateId: rate.id,
41522
+ providerId: isAutoRate ? rate.providerId : undefined,
41483
41523
  priceInCents: intPrice,
41484
- name: rate.name,
41485
- pickupPointId: rate.provider === "zasilkovna" ? pickupPointId : "",
41486
- pickupPointDisplayName: rate.provider === "zasilkovna" ? pickupPointName : "",
41524
+ displayName: name,
41525
+ pickupPointId: isZasilkovna ? pickupPointId : "",
41526
+ pickupPointDisplayName: isZasilkovna ? pickupPointName : "",
41487
41527
  };
41488
41528
  form.setValue(`${shipmentId}.rateId`, newData.rateId);
41489
- form.setValue(`${shipmentId}.provider`, newData.provider);
41490
- form.setValue(`${shipmentId}.name`, newData.name);
41529
+ form.setValue(`${shipmentId}.providerId`, newData.providerId);
41530
+ form.setValue(`${shipmentId}.displayName`, newData.displayName);
41491
41531
  form.setValue(`${shipmentId}.priceInCents`, newData.priceInCents);
41492
41532
  form.setValue(`${shipmentId}.pickupPointId`, newData.pickupPointId);
41493
41533
  form.setValue(`${shipmentId}.pickupPointDisplayName`, newData.pickupPointDisplayName);
41494
41534
  setFormData(Object.assign(Object.assign({}, formData), { shipping: Object.assign(Object.assign({}, formData.shipping), { [shipmentId]: newData }) }));
41495
41535
  }, locale: locale, countryCode: countryCode, children: jsxRuntime.jsxs("div", { className: clsx("bg-background cursor-pointer rounded-md border p-4", {
41496
- "bg-muted border-primary": currentRateId === rateId,
41497
- }), children: [jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between", children: [jsxRuntime.jsx("p", { children: rate.name }), jsxRuntime.jsx("p", { children: displayPrice })] }), jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: description }), pickupPointDisplayName && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("hr", { className: "my-2" }), jsxRuntime.jsxs("p", { className: "text-muted-foreground text-sm", children: [t("CheckoutEmbed.Shipping.description.shippedTo"), " ", jsxRuntime.jsx("span", { className: "text-foreground", children: pickupPointDisplayName })] })] }))] }) }, rateId));
41536
+ "bg-muted border-primary": currentRateId === rate.id,
41537
+ }), children: [jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between", children: [jsxRuntime.jsx("p", { children: name }), jsxRuntime.jsx("p", { children: displayPrice })] }), jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: description }), pickupPointDisplayName && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("hr", { className: "my-2" }), jsxRuntime.jsxs("p", { className: "text-muted-foreground text-sm", children: [t("CheckoutEmbed.Shipping.description.shippedTo"), " ", jsxRuntime.jsx("span", { className: "text-foreground", children: pickupPointDisplayName })] })] }))] }) }, rate.id));
41498
41538
  })] }));
41499
41539
  };
41500
41540
  function ShippingRateLoading() {
@@ -41654,10 +41694,10 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
41654
41694
  const shipments = Object.entries(data).map(([id, shipmentFormData]) => ({
41655
41695
  id: id,
41656
41696
  shipmentData: {
41657
- provider: shipmentFormData.provider,
41658
- pickupPointId: shipmentFormData.pickupPointId,
41659
- name: shipmentFormData.name,
41697
+ rateId: shipmentFormData.rateId,
41698
+ providerId: shipmentFormData.providerId,
41660
41699
  priceInCents: shipmentFormData.priceInCents,
41700
+ pickupPointId: shipmentFormData.pickupPointId,
41661
41701
  },
41662
41702
  }));
41663
41703
  yield storeClient.updateCheckout(clientSecret, checkoutId, {
@@ -41865,7 +41905,7 @@ function CheckoutEmbedComponent({ checkoutId, config }) {
41865
41905
  const [totalShipping, setTotalShipping] = React.useState(null);
41866
41906
  React.useEffect(() => {
41867
41907
  if (checkout) {
41868
- const areAllShipmentsFilled = checkout.shipments.every((shipment) => { var _a; return (_a = shipment.shipmentData) === null || _a === void 0 ? void 0 : _a.provider; });
41908
+ const areAllShipmentsFilled = checkout.shipments.every((shipment) => { var _a; return (_a = shipment.shipmentData) === null || _a === void 0 ? void 0 : _a.rateId; });
41869
41909
  if (areAllShipmentsFilled) {
41870
41910
  setTotalShipping(checkout.shipments.reduce((acc, shipment) => {
41871
41911
  var _a, _b;
package/dist/index.mjs CHANGED
@@ -3321,6 +3321,9 @@ const CheckoutEmbed$2 = {
3321
3321
  other: "Váš balíček bude doručen kurýrem.",
3322
3322
  zasilkovna: "Vaše objednávka bude doručena na výdejní místo.",
3323
3323
  shippedTo: "Místo doručení:"
3324
+ },
3325
+ shipment: {
3326
+ title: "Zásilka č."
3324
3327
  }
3325
3328
  }
3326
3329
  };
@@ -3393,9 +3396,21 @@ const CheckoutEmbed$1 = {
3393
3396
  day: "day",
3394
3397
  days: "days",
3395
3398
  description: {
3396
- other: "Your package will be delivered by a courier.",
3397
- zasilkovna: "Your package will be delivered to a pickup point.",
3398
3399
  shippedTo: "Shipped to:"
3400
+ },
3401
+ Shipment: {
3402
+ title: "Shipment No. ",
3403
+ perIdTitles: {
3404
+ "zasilkovna-z_box": "Zásilkovna, Z-Box",
3405
+ "prebuilt-pickup-in-store": "Pickup in store",
3406
+ "prebuilt-local-delivery": "Local delivery"
3407
+ },
3408
+ perIdDescriptions: {
3409
+ fallback: "Your package will be delivered by a courier.",
3410
+ "zasilkovna-z_box": "Your package will be delivered to a pickup point.",
3411
+ "prebuilt-pickup-in-store": "Pickup in store",
3412
+ "prebuilt-local-delivery": "Local delivery"
3413
+ }
3399
3414
  }
3400
3415
  },
3401
3416
  Payment: {
@@ -17238,7 +17253,7 @@ ZodTuple.create;
17238
17253
  const recordType = ZodRecord.create;
17239
17254
  ZodEnum.create;
17240
17255
  ZodPromise.create;
17241
- ZodOptional.create;
17256
+ const optionalType = ZodOptional.create;
17242
17257
  ZodNullable.create;
17243
17258
 
17244
17259
  const phoneRegex = new RegExp(/^([+]?[\s0-9]+)?(\d{3}|[(]?[0-9]+[)])?([-]?[\s]?[0-9])+$/);
@@ -17263,11 +17278,11 @@ const customerSchema = objectType({
17263
17278
  // Shipping method schema
17264
17279
  const shippingMethodSchema = objectType({
17265
17280
  rateId: stringType().min(1, "required_error"),
17266
- provider: stringType().min(1, "required_error"),
17281
+ providerId: optionalType(stringType()),
17267
17282
  priceInCents: numberType().min(1, "required_error"),
17268
- name: stringType().min(1, "required_error"),
17269
17283
  pickupPointId: stringType().optional(),
17270
- pickupPointDisplayName: stringType().optional(),
17284
+ pickupPointDisplayName: stringType().optional(), // Only for display purposes
17285
+ displayName: stringType(), // Only for display purposes
17271
17286
  });
17272
17287
  const shipmentsFormSchema = recordType(stringType(), shippingMethodSchema)
17273
17288
  .refine((data) => Object.keys(data).length > 0, {
@@ -26294,14 +26309,9 @@ function getWindowScrollBarX(element, rect) {
26294
26309
  return rect.left + leftScroll;
26295
26310
  }
26296
26311
 
26297
- function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
26298
- if (ignoreScrollbarX === void 0) {
26299
- ignoreScrollbarX = false;
26300
- }
26312
+ function getHTMLOffset(documentElement, scroll) {
26301
26313
  const htmlRect = documentElement.getBoundingClientRect();
26302
- const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :
26303
- // RTL <body> scrollbar.
26304
- getWindowScrollBarX(documentElement, htmlRect));
26314
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
26305
26315
  const y = htmlRect.top + scroll.scrollTop;
26306
26316
  return {
26307
26317
  x,
@@ -26340,7 +26350,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
26340
26350
  offsets.y = offsetRect.y + offsetParent.clientTop;
26341
26351
  }
26342
26352
  }
26343
- const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
26353
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
26344
26354
  return {
26345
26355
  width: rect.width * scale.x,
26346
26356
  height: rect.height * scale.y,
@@ -26374,6 +26384,10 @@ function getDocumentRect(element) {
26374
26384
  };
26375
26385
  }
26376
26386
 
26387
+ // Safety check: ensure the scrollbar space is reasonable in case this
26388
+ // calculation is affected by unusual styles.
26389
+ // Most scrollbars leave 15-18px of space.
26390
+ const SCROLLBAR_MAX = 25;
26377
26391
  function getViewportRect(element, strategy) {
26378
26392
  const win = getWindow(element);
26379
26393
  const html = getDocumentElement(element);
@@ -26391,6 +26405,24 @@ function getViewportRect(element, strategy) {
26391
26405
  y = visualViewport.offsetTop;
26392
26406
  }
26393
26407
  }
26408
+ const windowScrollbarX = getWindowScrollBarX(html);
26409
+ // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
26410
+ // visual width of the <html> but this is not considered in the size
26411
+ // of `html.clientWidth`.
26412
+ if (windowScrollbarX <= 0) {
26413
+ const doc = html.ownerDocument;
26414
+ const body = doc.body;
26415
+ const bodyStyles = getComputedStyle(body);
26416
+ const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
26417
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
26418
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
26419
+ width -= clippingStableScrollbarWidth;
26420
+ }
26421
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) {
26422
+ // If the <body> scrollbar is on the left, the width needs to be extended
26423
+ // by the scrollbar amount so there isn't extra space on the right.
26424
+ width += windowScrollbarX;
26425
+ }
26394
26426
  return {
26395
26427
  width,
26396
26428
  height,
@@ -40193,12 +40225,12 @@ function requireReactStripe_umd () {
40193
40225
 
40194
40226
  stripe._registerWrapper({
40195
40227
  name: 'react-stripe-js',
40196
- version: "3.9.1"
40228
+ version: "3.9.2"
40197
40229
  });
40198
40230
 
40199
40231
  stripe.registerAppInfo({
40200
40232
  name: 'react-stripe-js',
40201
- version: "3.9.1",
40233
+ version: "3.9.2",
40202
40234
  url: 'https://stripe.com/docs/stripe-js/react'
40203
40235
  });
40204
40236
  };
@@ -41365,7 +41397,7 @@ var PaymentElement$1 = memo(PaymentElement);
41365
41397
  function PaymentForm({ paymentSecret, onSuccess, onError, onBack, onDoubleBack, contactEmail, shippingFormData, address, checkoutAppearance, fonts, locale, publicKey, paymentComponentKey, }) {
41366
41398
  const [isSubmitting, setIsSubmitting] = useState(false);
41367
41399
  const { t } = useTranslation();
41368
- return (jsxs("div", { className: "space-y-6", children: [jsxs("div", { children: [jsx("h2", { className: "mb-2", children: t("CheckoutEmbed.Payment.title") }), jsx("p", { className: "text-muted-foreground text-sm", children: t("CheckoutEmbed.Payment.description") })] }), jsxs("div", { className: "space-y-2", children: [jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxs("p", { children: [jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.contact") }), " ", jsx("span", { className: "text-muted-foreground", children: contactEmail })] }), jsx(Button, { variant: "link", size: "link", onClick: onDoubleBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxs("p", { children: [jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.address") }), " ", jsx("span", { className: "text-muted-foreground", children: address })] }), jsx(Button, { variant: "link", size: "link", onClick: onDoubleBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxs("div", { className: "flex gap-1", children: [jsx("p", { className: "font-medium", children: t("CheckoutEmbed.Shipping.shipping") }), " ", jsx("div", { className: "text-muted-foreground flex flex-col gap-1", children: Object.entries(shippingFormData).map(([id, shipmentFormData]) => (jsxs("p", { children: [shipmentFormData.name, " \u00B7 ", shipmentFormData.priceInCents] }, id))) })] }), jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] })] }), jsx("div", { className: "mt-8", children: paymentSecret && (jsx(PaymentElement$1, { fonts: fonts, checkoutAppearance: convertCheckoutAppearanceToStripeAppearance(checkoutAppearance, fonts), locale: locale, paymentSecret: paymentSecret, onSuccess: onSuccess, onError: onError, setSubmitting: setIsSubmitting, publicKey: publicKey, children: jsx("div", { className: "fixed bottom-0 left-0 right-0 z-50 mt-8 px-4 sm:static sm:px-0", children: jsxs("div", { className: "bg-background flex flex-col-reverse items-center justify-between gap-2 pb-4 sm:flex-row sm:bg-transparent sm:pb-0", children: [jsxs(Button, { className: "w-full sm:w-fit", type: "button", variant: "ghost", onClick: onBack, children: [jsx(ChevronLeft, {}), t("CheckoutEmbed.Payment.back")] }), jsx(SubmitButton, { className: "w-full max-sm:h-[52px] sm:w-fit", isValid: true, isSubmitting: isSubmitting, children: t("CheckoutEmbed.Payment.button") })] }) }) }, paymentComponentKey)) })] }));
41400
+ return (jsxs("div", { className: "space-y-6", children: [jsxs("div", { children: [jsx("h2", { className: "mb-2", children: t("CheckoutEmbed.Payment.title") }), jsx("p", { className: "text-muted-foreground text-sm", children: t("CheckoutEmbed.Payment.description") })] }), jsxs("div", { className: "space-y-2", children: [jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxs("p", { children: [jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.contact") }), " ", jsx("span", { className: "text-muted-foreground", children: contactEmail })] }), jsx(Button, { variant: "link", size: "link", onClick: onDoubleBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxs("p", { children: [jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.address") }), " ", jsx("span", { className: "text-muted-foreground", children: address })] }), jsx(Button, { variant: "link", size: "link", onClick: onDoubleBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxs("div", { className: "flex gap-1", children: [jsx("p", { className: "font-medium", children: t("CheckoutEmbed.Shipping.shipping") }), " ", jsx("div", { className: "text-muted-foreground flex flex-col gap-1", children: Object.entries(shippingFormData).map(([id, shipmentFormData]) => (jsxs("p", { children: [shipmentFormData.displayName, " \u00B7", " ", shipmentFormData.priceInCents] }, id))) })] }), jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] })] }), jsx("div", { className: "mt-8", children: paymentSecret && (jsx(PaymentElement$1, { fonts: fonts, checkoutAppearance: convertCheckoutAppearanceToStripeAppearance(checkoutAppearance, fonts), locale: locale, paymentSecret: paymentSecret, onSuccess: onSuccess, onError: onError, setSubmitting: setIsSubmitting, publicKey: publicKey, children: jsx("div", { className: "fixed bottom-0 left-0 right-0 z-50 mt-8 px-4 sm:static sm:px-0", children: jsxs("div", { className: "bg-background flex flex-col-reverse items-center justify-between gap-2 pb-4 sm:flex-row sm:bg-transparent sm:pb-0", children: [jsxs(Button, { className: "w-full sm:w-fit", type: "button", variant: "ghost", onClick: onBack, children: [jsx(ChevronLeft, {}), t("CheckoutEmbed.Payment.back")] }), jsx(SubmitButton, { className: "w-full max-sm:h-[52px] sm:w-fit", isValid: true, isSubmitting: isSubmitting, children: t("CheckoutEmbed.Payment.button") })] }) }) }, paymentComponentKey)) })] }));
41369
41401
  }
41370
41402
 
41371
41403
  function Skeleton(_a) {
@@ -41415,7 +41447,8 @@ function ZasilkovnaShippingOption({ children, onPickupPointSelected, locale, cou
41415
41447
  }
41416
41448
 
41417
41449
  function ShippingOptionWrapper({ rate, children, onPickupPointSelected, locale, countryCode, }) {
41418
- if (rate.provider === "zasilkovna") {
41450
+ const isAutoRate = rate.type === "CUSTOM_SHIPPING_VENDOR" || rate.type === "PLATFORM_CARRIER";
41451
+ if (isAutoRate && rate.providerId === "zasilkovna") {
41419
41452
  return (jsx(ZasilkovnaShippingOption, { onPickupPointSelected: onPickupPointSelected, locale: locale, countryCode: countryCode, apiKey: rate.clientSecret, children: children }));
41420
41453
  }
41421
41454
  return jsx(Fragment, { children: children });
@@ -41439,42 +41472,49 @@ function ShipmentsForm({ shippingRates, initialData, onSubmit, onBack, contactEm
41439
41472
  ])),
41440
41473
  });
41441
41474
  const isButtonEnabled = Object.values(form.getValues()).every((value) => { var _a; return ((_a = value.rateId) === null || _a === void 0 ? void 0 : _a.length) > 0; });
41442
- return (jsxs("div", { className: "space-y-6", children: [jsx("h2", { children: t("CheckoutEmbed.Shipping.title") }), jsxs("div", { className: "space-y-2 pb-2", children: [jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxs("p", { children: [jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.contact") }), " ", jsx("span", { className: "text-muted-foreground", children: contactEmail })] }), jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxs("p", { children: [jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.address") }), " ", jsx("span", { className: "text-muted-foreground", children: shippingAddress })] }), jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] })] }), jsx(Form, Object.assign({}, form, { children: jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-4", children: [shipments.map((shipment) => (jsx(SingleShipmentSection, { shipment: shipment, shippingRates: shippingRates, form: form, setFormData: setFormData, formData: formData, currency: currency, exchangeRate: exchangeRate, locale: locale, countryCode: countryCode, multipleShipments: shipments.length > 1 }, shipment.id))), jsx(FormMessage, { children: (_a = form.formState.errors.root) === null || _a === void 0 ? void 0 : _a.message }), jsxs("div", { className: "flex items-center justify-between pt-4", children: [jsxs(Button, { type: "button", variant: "ghost", onClick: onBack, children: [jsx(ChevronLeft, {}), t("CheckoutEmbed.Shipping.back")] }), jsx(SubmitButton, { isSubmitting: form.formState.isSubmitting, isValid: isButtonEnabled, children: t("CheckoutEmbed.Shipping.button") })] })] }) }))] }));
41475
+ return (jsxs("div", { className: "space-y-6", children: [jsx("h2", { children: t("CheckoutEmbed.Shipping.title") }), jsxs("div", { className: "space-y-2 pb-2", children: [jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxs("p", { children: [jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.contact") }), " ", jsx("span", { className: "text-muted-foreground", children: contactEmail })] }), jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxs("p", { children: [jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.address") }), " ", jsx("span", { className: "text-muted-foreground", children: shippingAddress })] }), jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] })] }), jsx(Form, Object.assign({}, form, { children: jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-4", children: [shipments.map((shipment, index) => (jsx(SingleShipmentSection, { shipment: shipment, shippingRates: shippingRates, form: form, setFormData: setFormData, formData: formData, currency: currency, exchangeRate: exchangeRate, locale: locale, countryCode: countryCode, multipleShipments: shipments.length > 1, index: index }, shipment.id))), jsx(FormMessage, { children: (_a = form.formState.errors.root) === null || _a === void 0 ? void 0 : _a.message }), jsxs("div", { className: "flex items-center justify-between pt-4", children: [jsxs(Button, { type: "button", variant: "ghost", onClick: onBack, children: [jsx(ChevronLeft, {}), t("CheckoutEmbed.Shipping.back")] }), jsx(SubmitButton, { isSubmitting: form.formState.isSubmitting, isValid: isButtonEnabled, children: t("CheckoutEmbed.Shipping.button") })] })] }) }))] }));
41443
41476
  }
41444
- const SingleShipmentSection = ({ shippingRates, form, currency, exchangeRate, locale, countryCode, setFormData, formData, multipleShipments, shipment, }) => {
41445
- var _a;
41477
+ const SingleShipmentSection = ({ shippingRates, form, currency, exchangeRate, locale, countryCode, setFormData, formData, multipleShipments, shipment, index, }) => {
41446
41478
  const { t } = useTranslation();
41447
41479
  const shipmentId = shipment.id;
41448
41480
  const currentRateId = form.watch(`${shipmentId}.rateId`);
41449
41481
  // TODO: construct the headline
41450
- return (jsxs("div", { children: [multipleShipments && (jsx("h3", { className: "text-lg font-medium", children: (_a = shipment.shipmentData) === null || _a === void 0 ? void 0 : _a.name })), shippingRates.length === 0 &&
41482
+ return (jsxs("div", { children: [multipleShipments && (jsxs("h3", { className: "text-lg font-medium", children: [t("CheckoutEmbed.Shipping.Shipment.title"), index + 1] })), shippingRates.length === 0 &&
41451
41483
  Array.from({ length: 3 }).map((_, index) => (jsx(ShippingRateLoading, {}, index))), shippingRates.map((rate) => {
41484
+ var _a, _b;
41452
41485
  const pickupPointDisplayName = form.watch(`${shipmentId}.pickupPointDisplayName`);
41453
- const rateId = rate.provider + rate.name;
41454
41486
  const intPrice = Math.ceil(Number(rate.priceInCents));
41455
41487
  const displayPrice = storeHelpers.formatPrice(intPrice, currency, exchangeRate);
41456
- const description = rate.provider === "zasilkovna"
41457
- ? t("CheckoutEmbed.Shipping.description.zasilkovna")
41458
- : t("CheckoutEmbed.Shipping.description.other");
41488
+ const isFixedRate = rate.type === "FIXED";
41489
+ const isAutoRate = rate.type === "CUSTOM_SHIPPING_VENDOR" ||
41490
+ rate.type === "PLATFORM_CARRIER";
41491
+ const isZasilkovna = isAutoRate && rate.providerId === "zasilkovna";
41492
+ const name = isFixedRate
41493
+ ? rate.name
41494
+ : ((_a = t(`CheckoutEmbed.Shipping.Shipment.perIdTitles.${rate.id}`)) !== null && _a !== void 0 ? _a : rate.id);
41495
+ const fallbackDescription = t(`CheckoutEmbed.Shipping.Shipment.perIdDescriptions.fallback`);
41496
+ const description = (_b = (isFixedRate
41497
+ ? rate.description
41498
+ : t(`CheckoutEmbed.Shipping.Shipment.perIdDescriptions.${rate.id}`))) !== null && _b !== void 0 ? _b : fallbackDescription;
41459
41499
  return (jsx(ShippingOptionWrapper, { rate: rate, onPickupPointSelected: (pickupPointId, pickupPointName) => {
41460
41500
  const newData = {
41461
- rateId,
41462
- provider: rate.provider,
41501
+ rateId: rate.id,
41502
+ providerId: isAutoRate ? rate.providerId : undefined,
41463
41503
  priceInCents: intPrice,
41464
- name: rate.name,
41465
- pickupPointId: rate.provider === "zasilkovna" ? pickupPointId : "",
41466
- pickupPointDisplayName: rate.provider === "zasilkovna" ? pickupPointName : "",
41504
+ displayName: name,
41505
+ pickupPointId: isZasilkovna ? pickupPointId : "",
41506
+ pickupPointDisplayName: isZasilkovna ? pickupPointName : "",
41467
41507
  };
41468
41508
  form.setValue(`${shipmentId}.rateId`, newData.rateId);
41469
- form.setValue(`${shipmentId}.provider`, newData.provider);
41470
- form.setValue(`${shipmentId}.name`, newData.name);
41509
+ form.setValue(`${shipmentId}.providerId`, newData.providerId);
41510
+ form.setValue(`${shipmentId}.displayName`, newData.displayName);
41471
41511
  form.setValue(`${shipmentId}.priceInCents`, newData.priceInCents);
41472
41512
  form.setValue(`${shipmentId}.pickupPointId`, newData.pickupPointId);
41473
41513
  form.setValue(`${shipmentId}.pickupPointDisplayName`, newData.pickupPointDisplayName);
41474
41514
  setFormData(Object.assign(Object.assign({}, formData), { shipping: Object.assign(Object.assign({}, formData.shipping), { [shipmentId]: newData }) }));
41475
41515
  }, locale: locale, countryCode: countryCode, children: jsxs("div", { className: clsx("bg-background cursor-pointer rounded-md border p-4", {
41476
- "bg-muted border-primary": currentRateId === rateId,
41477
- }), children: [jsxs("div", { className: "flex w-full items-center justify-between", children: [jsx("p", { children: rate.name }), jsx("p", { children: displayPrice })] }), jsx("p", { className: "text-muted-foreground text-sm", children: description }), pickupPointDisplayName && (jsxs(Fragment, { children: [jsx("hr", { className: "my-2" }), jsxs("p", { className: "text-muted-foreground text-sm", children: [t("CheckoutEmbed.Shipping.description.shippedTo"), " ", jsx("span", { className: "text-foreground", children: pickupPointDisplayName })] })] }))] }) }, rateId));
41516
+ "bg-muted border-primary": currentRateId === rate.id,
41517
+ }), children: [jsxs("div", { className: "flex w-full items-center justify-between", children: [jsx("p", { children: name }), jsx("p", { children: displayPrice })] }), jsx("p", { className: "text-muted-foreground text-sm", children: description }), pickupPointDisplayName && (jsxs(Fragment, { children: [jsx("hr", { className: "my-2" }), jsxs("p", { className: "text-muted-foreground text-sm", children: [t("CheckoutEmbed.Shipping.description.shippedTo"), " ", jsx("span", { className: "text-foreground", children: pickupPointDisplayName })] })] }))] }) }, rate.id));
41478
41518
  })] }));
41479
41519
  };
41480
41520
  function ShippingRateLoading() {
@@ -41634,10 +41674,10 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
41634
41674
  const shipments = Object.entries(data).map(([id, shipmentFormData]) => ({
41635
41675
  id: id,
41636
41676
  shipmentData: {
41637
- provider: shipmentFormData.provider,
41638
- pickupPointId: shipmentFormData.pickupPointId,
41639
- name: shipmentFormData.name,
41677
+ rateId: shipmentFormData.rateId,
41678
+ providerId: shipmentFormData.providerId,
41640
41679
  priceInCents: shipmentFormData.priceInCents,
41680
+ pickupPointId: shipmentFormData.pickupPointId,
41641
41681
  },
41642
41682
  }));
41643
41683
  yield storeClient.updateCheckout(clientSecret, checkoutId, {
@@ -41845,7 +41885,7 @@ function CheckoutEmbedComponent({ checkoutId, config }) {
41845
41885
  const [totalShipping, setTotalShipping] = useState(null);
41846
41886
  useEffect(() => {
41847
41887
  if (checkout) {
41848
- const areAllShipmentsFilled = checkout.shipments.every((shipment) => { var _a; return (_a = shipment.shipmentData) === null || _a === void 0 ? void 0 : _a.provider; });
41888
+ const areAllShipmentsFilled = checkout.shipments.every((shipment) => { var _a; return (_a = shipment.shipmentData) === null || _a === void 0 ? void 0 : _a.rateId; });
41849
41889
  if (areAllShipmentsFilled) {
41850
41890
  setTotalShipping(checkout.shipments.reduce((acc, shipment) => {
41851
41891
  var _a, _b;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/react",
3
- "version": "0.5.22",
3
+ "version": "0.5.24",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -78,7 +78,7 @@
78
78
  "world_countries_lists": "^3.2.0",
79
79
  "zod": "^3.25.30",
80
80
  "zustand": "^5.0.5",
81
- "@betterstore/sdk": "0.5.22"
81
+ "@betterstore/sdk": "0.5.24"
82
82
  },
83
83
  "publishConfig": {
84
84
  "access": "public"