@zappie/foundations 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/{core-DdojsUzR.d.ts → core-Cd-_zlQx.d.ts} +2 -1
- package/dist/{engine-Bfbv9M0D.d.ts → engine-D2iRshfW.d.ts} +6 -4
- package/dist/{history-Bqu12Vkz.d.ts → history-BlytQinP.d.ts} +2 -1
- package/dist/index.d.ts +42 -38
- package/dist/internal/slot.js.map +2 -2
- package/dist/media/image.js +24 -5
- package/dist/media/image.js.map +2 -2
- package/dist/next.d.ts +1 -1
- package/dist/overlay/engine.d.ts +1 -1
- package/dist/rich-text/browser.d.ts +1 -1
- package/dist/rich-text/index.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @zappie/foundations
|
|
2
2
|
|
|
3
|
+
## 0.1.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b31a689: Declarations built with tsup 9.
|
|
8
|
+
- Updated dependencies [1cbfebc]
|
|
9
|
+
- Updated dependencies [b31a689]
|
|
10
|
+
- @zappie/sdk@0.1.24
|
|
11
|
+
|
|
12
|
+
## 0.1.9
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- c1ffb88: Images resize only from `RESIZE_HOSTS` (or your `resizeHosts`), never as `.avif`, `.jxl` or `.svg`. `Image` falls back once to the original when a resized image fails.
|
|
17
|
+
- Updated dependencies [c1ffb88]
|
|
18
|
+
- @zappie/sdk@0.1.22
|
|
19
|
+
|
|
3
20
|
## 0.1.8
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -20,4 +20,5 @@ type ParseRichText = (html: string) => ParsedRichTextNode[];
|
|
|
20
20
|
*/
|
|
21
21
|
declare const createSanitizeRichText: (parseRichText: ParseRichText) => (html?: string | null) => string;
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { createSanitizeRichText as c };
|
|
24
|
+
export type { ParsedRichTextNode as P, ParseRichText as a };
|
|
@@ -2,11 +2,12 @@ import * as react from 'react';
|
|
|
2
2
|
import { AllHTMLAttributes, ReactNode, Ref } from 'react';
|
|
3
3
|
import { Dialog } from '@base-ui/react/dialog';
|
|
4
4
|
|
|
5
|
+
type PartOwnedAttributes = "children" | "defaultValue" | "value";
|
|
5
6
|
/**
|
|
6
7
|
* HTML attributes shared by foundation parts, with optional render-function children.
|
|
7
8
|
* Set asChild to merge the part props and ref into a single child element.
|
|
8
9
|
*/
|
|
9
|
-
type PartProps<S = Record<string, never>> = Omit<AllHTMLAttributes<HTMLElement>,
|
|
10
|
+
type PartProps<S = Record<string, never>> = Omit<AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
10
11
|
asChild?: boolean;
|
|
11
12
|
children?: ReactNode | ((state: S) => ReactNode);
|
|
12
13
|
};
|
|
@@ -41,14 +42,14 @@ declare function useEngineParts(): Parts;
|
|
|
41
42
|
declare function Surface(props: SurfaceProps & {
|
|
42
43
|
children?: ReactNode;
|
|
43
44
|
}): react.JSX.Element;
|
|
44
|
-
declare const EngineTitle: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
45
|
+
declare const EngineTitle: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
45
46
|
asChild?: boolean;
|
|
46
47
|
children?: ReactNode | ((state: unknown) => ReactNode);
|
|
47
48
|
} & {
|
|
48
49
|
id?: string | undefined;
|
|
49
50
|
state: unknown;
|
|
50
51
|
} & react.RefAttributes<HTMLElement>>;
|
|
51
|
-
declare const EngineClose: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
52
|
+
declare const EngineClose: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
52
53
|
asChild?: boolean;
|
|
53
54
|
children?: ReactNode | ((state: unknown) => ReactNode);
|
|
54
55
|
} & {
|
|
@@ -56,4 +57,5 @@ declare const EngineClose: react.ForwardRefExoticComponent<Omit<react.AllHTMLAtt
|
|
|
56
57
|
state: unknown;
|
|
57
58
|
} & react.RefAttributes<HTMLElement>>;
|
|
58
59
|
|
|
59
|
-
export { EngineClose as E,
|
|
60
|
+
export { EngineClose as E, EngineTitle as c, Surface as d, useEngineParts as u };
|
|
61
|
+
export type { PartOwnedAttributes as P, SwipeDirection as S, PartProps as a, Presentation as b, SurfaceProps as e };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { P as PartOwnedAttributes, a as PartProps } from './engine-D2iRshfW.js';
|
|
2
|
+
import { Presentation, SwipeDirection } from './overlay/engine.js';
|
|
1
3
|
import * as react from 'react';
|
|
2
4
|
import { HTMLAttributes, ReactNode, ComponentType, ReactElement, KeyboardEvent as KeyboardEvent$1, ImgHTMLAttributes, ChangeEvent, ClipboardEvent } from 'react';
|
|
3
5
|
import * as _zappie_sdk from '@zappie/sdk';
|
|
4
6
|
import { Branch as Branch$1, CartLine, CartLineInput, CartIssue, CartFix, Quote, DeliveryAddress, MenuSchedule, CartFulfilment, OptionGroup as OptionGroup$1, Item, Money as Money$1, Choice as Choice$1, MoneyFormatOptions, PaymentMethodKind, Category, Menu, OpeningTime } from '@zappie/sdk';
|
|
5
7
|
import { useCart } from '@zappie/sdk/react';
|
|
6
|
-
import {
|
|
7
|
-
import { C as CloseOptions, O as OverlayQuery } from './history-Bqu12Vkz.js';
|
|
8
|
+
import { C as CloseOptions, O as OverlayQuery } from './history-BlytQinP.js';
|
|
8
9
|
import '@base-ui/react/dialog';
|
|
9
10
|
|
|
10
11
|
/** Account stubs that do not read credentials or host authentication. */
|
|
@@ -39,21 +40,21 @@ declare function signOut(_options?: {
|
|
|
39
40
|
* SignIn and SignOut reject with AccountNotConfiguredError. They do not authenticate.
|
|
40
41
|
*/
|
|
41
42
|
declare const Account: {
|
|
42
|
-
SignIn: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
43
|
+
SignIn: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
43
44
|
asChild?: boolean;
|
|
44
45
|
children?: react.ReactNode | ((state: {
|
|
45
46
|
signIn: typeof signIn;
|
|
46
47
|
status: "not_configured";
|
|
47
48
|
}) => react.ReactNode);
|
|
48
49
|
} & react.RefAttributes<HTMLElement>>;
|
|
49
|
-
SignOut: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
50
|
+
SignOut: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
50
51
|
asChild?: boolean;
|
|
51
52
|
children?: react.ReactNode | ((state: {
|
|
52
53
|
signOut: typeof signOut;
|
|
53
54
|
status: "not_configured";
|
|
54
55
|
}) => react.ReactNode);
|
|
55
56
|
} & react.RefAttributes<HTMLElement>>;
|
|
56
|
-
Customer: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
57
|
+
Customer: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
57
58
|
asChild?: boolean;
|
|
58
59
|
children?: react.ReactNode | ((state: {
|
|
59
60
|
customer: Customer | null;
|
|
@@ -193,15 +194,15 @@ declare function Root$5({ value, defaultValue, onValueChange, min, max, step, di
|
|
|
193
194
|
*/
|
|
194
195
|
declare const Quantity: {
|
|
195
196
|
Root: typeof Root$5;
|
|
196
|
-
Value: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
197
|
+
Value: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
197
198
|
asChild?: boolean;
|
|
198
199
|
children?: react.ReactNode | ((state: QuantityState) => react.ReactNode);
|
|
199
200
|
} & react.RefAttributes<HTMLElement>>;
|
|
200
|
-
Increment: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
201
|
+
Increment: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
201
202
|
asChild?: boolean;
|
|
202
203
|
children?: react.ReactNode | ((state: QuantityState) => react.ReactNode);
|
|
203
204
|
} & react.RefAttributes<HTMLElement>>;
|
|
204
|
-
Decrement: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
205
|
+
Decrement: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
205
206
|
asChild?: boolean;
|
|
206
207
|
children?: react.ReactNode | ((state: QuantityState) => react.ReactNode);
|
|
207
208
|
} & react.RefAttributes<HTMLElement>>;
|
|
@@ -224,24 +225,24 @@ declare function CartQuantity({ lineId, ...props }: Omit<QuantityProps, "value"
|
|
|
224
225
|
*/
|
|
225
226
|
declare const Cart: {
|
|
226
227
|
Root: typeof Root$4;
|
|
227
|
-
Line: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
228
|
+
Line: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
228
229
|
asChild?: boolean;
|
|
229
230
|
children?: react.ReactNode | ((state: LineContext) => react.ReactNode);
|
|
230
231
|
} & {
|
|
231
232
|
line: CartLine;
|
|
232
233
|
} & react.RefAttributes<HTMLElement>>;
|
|
233
234
|
Quantity: typeof CartQuantity;
|
|
234
|
-
Remove: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
235
|
+
Remove: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
235
236
|
asChild?: boolean;
|
|
236
237
|
children?: react.ReactNode | ((state: Record<string, never>) => react.ReactNode);
|
|
237
238
|
} & {
|
|
238
239
|
lineId: string;
|
|
239
240
|
} & react.RefAttributes<HTMLElement>>;
|
|
240
|
-
Empty: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
241
|
+
Empty: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
241
242
|
asChild?: boolean;
|
|
242
243
|
children?: react.ReactNode | ((state: Record<string, never>) => react.ReactNode);
|
|
243
244
|
} & react.RefAttributes<HTMLElement>>;
|
|
244
|
-
Issues: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
245
|
+
Issues: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
245
246
|
asChild?: boolean;
|
|
246
247
|
children?: react.ReactNode | ((state: {
|
|
247
248
|
issues: readonly CartIssue[];
|
|
@@ -260,7 +261,7 @@ type TotalsState = {
|
|
|
260
261
|
* Expose the cart quote and its freshness or network status to your render function.
|
|
261
262
|
* Subscribes to the cart and quote failures through your ZappieProvider.
|
|
262
263
|
*/
|
|
263
|
-
declare const Totals: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
264
|
+
declare const Totals: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
264
265
|
asChild?: boolean;
|
|
265
266
|
children?: react.ReactNode | ((state: TotalsState) => react.ReactNode);
|
|
266
267
|
} & react.RefAttributes<HTMLElement>>;
|
|
@@ -426,15 +427,15 @@ declare function Picker({ getSuggestions, onSelect, query, defaultQuery, onQuery
|
|
|
426
427
|
*/
|
|
427
428
|
declare const Address: {
|
|
428
429
|
Picker: typeof Picker;
|
|
429
|
-
Input: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
430
|
+
Input: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
430
431
|
asChild?: boolean;
|
|
431
432
|
children?: react.ReactNode | ((state: AddressState) => react.ReactNode);
|
|
432
433
|
} & react.RefAttributes<HTMLElement>>;
|
|
433
|
-
Suggestions: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
434
|
+
Suggestions: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
434
435
|
asChild?: boolean;
|
|
435
436
|
children?: react.ReactNode | ((state: AddressState) => react.ReactNode);
|
|
436
437
|
} & react.RefAttributes<HTMLElement>>;
|
|
437
|
-
Suggestion: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
438
|
+
Suggestion: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
438
439
|
asChild?: boolean;
|
|
439
440
|
children?: react.ReactNode | ((state: AddressState) => react.ReactNode);
|
|
440
441
|
} & {
|
|
@@ -455,7 +456,7 @@ type BranchPickerState = {
|
|
|
455
456
|
* Use Branch.Picker within your ZappieProvider.
|
|
456
457
|
*/
|
|
457
458
|
declare const Branch: {
|
|
458
|
-
Picker: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
459
|
+
Picker: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
459
460
|
asChild?: boolean;
|
|
460
461
|
children?: react.ReactNode | ((state: BranchPickerState) => react.ReactNode);
|
|
461
462
|
} & {
|
|
@@ -507,7 +508,7 @@ declare function scheduleSlots(branch: Branch$1, timezone: string, now: Date, {
|
|
|
507
508
|
* Expose valid fulfilment slots and ASAP eligibility using branch hours and loaded menu metadata.
|
|
508
509
|
* Use null for ASAP. Requires a ZappieProvider and refreshes the available times each minute.
|
|
509
510
|
*/
|
|
510
|
-
declare const Schedule: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
511
|
+
declare const Schedule: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
511
512
|
asChild?: boolean;
|
|
512
513
|
children?: react.ReactNode | ((state: ScheduleState) => react.ReactNode);
|
|
513
514
|
} & {
|
|
@@ -531,7 +532,7 @@ type FulfilmentState = {
|
|
|
531
532
|
* Selections must use an offered mode and the active branch ID.
|
|
532
533
|
*/
|
|
533
534
|
declare const Fulfilment: {
|
|
534
|
-
Switch: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
535
|
+
Switch: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
535
536
|
asChild?: boolean;
|
|
536
537
|
children?: react.ReactNode | ((state: FulfilmentState) => react.ReactNode);
|
|
537
538
|
} & {
|
|
@@ -634,7 +635,7 @@ type ChoiceState = {
|
|
|
634
635
|
* Render a selectable option within an OptionGroup, with radio or checkbox semantics.
|
|
635
636
|
* Exposes selection and quantity controls and disables unavailable choices.
|
|
636
637
|
*/
|
|
637
|
-
declare const Choice: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
638
|
+
declare const Choice: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
638
639
|
asChild?: boolean;
|
|
639
640
|
children?: react.ReactNode | ((state: ChoiceState) => react.ReactNode);
|
|
640
641
|
} & {
|
|
@@ -644,7 +645,7 @@ declare const Choice: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttribut
|
|
|
644
645
|
* Group item options with selection rules, validation state and an Input part for typed responses.
|
|
645
646
|
* Use within ItemForm.Root. Use Choice for options and OptionGroup.Input for typed responses.
|
|
646
647
|
*/
|
|
647
|
-
declare const OptionGroup: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
648
|
+
declare const OptionGroup: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
648
649
|
asChild?: boolean;
|
|
649
650
|
children?: react.ReactNode | ((state: GroupState) => react.ReactNode);
|
|
650
651
|
} & {
|
|
@@ -656,7 +657,7 @@ declare const OptionGroup: react.ForwardRefExoticComponent<Omit<react.AllHTMLAtt
|
|
|
656
657
|
*/
|
|
657
658
|
requiredNote?: string | false;
|
|
658
659
|
} & react.RefAttributes<HTMLElement>> & {
|
|
659
|
-
Input: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
660
|
+
Input: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
660
661
|
asChild?: boolean;
|
|
661
662
|
children?: react.ReactNode | ((state: GroupState) => react.ReactNode);
|
|
662
663
|
} & react.RefAttributes<HTMLElement>>;
|
|
@@ -668,11 +669,11 @@ declare const OptionGroup: react.ForwardRefExoticComponent<Omit<react.AllHTMLAtt
|
|
|
668
669
|
*/
|
|
669
670
|
declare const ItemForm: {
|
|
670
671
|
Root: typeof Root$3;
|
|
671
|
-
Options: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
672
|
+
Options: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
672
673
|
asChild?: boolean;
|
|
673
674
|
children?: react.ReactNode | ((state: ItemFormContext) => react.ReactNode);
|
|
674
675
|
} & react.RefAttributes<HTMLElement>>;
|
|
675
|
-
Add: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
676
|
+
Add: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
676
677
|
asChild?: boolean;
|
|
677
678
|
children?: react.ReactNode | ((state: ItemFormContext) => react.ReactNode);
|
|
678
679
|
} & react.RefAttributes<HTMLElement>>;
|
|
@@ -686,15 +687,17 @@ type ImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "srcSet"> &
|
|
|
686
687
|
priority?: boolean;
|
|
687
688
|
quality?: number;
|
|
688
689
|
mode?: "resize" | "direct";
|
|
690
|
+
/** Lowercase hosts your zone resizes. Defaults to `RESIZE_HOSTS` from `@zappie/sdk/template`. */
|
|
691
|
+
resizeHosts?: readonly string[];
|
|
689
692
|
};
|
|
690
|
-
/** Render an image through same-origin resizing,
|
|
691
|
-
declare function Image({ src, sizes, priority, quality, mode, alt, ...props }: ImageProps): react.JSX.Element;
|
|
693
|
+
/** Render an image through same-origin resizing, falling back once to `src` if that fails. */
|
|
694
|
+
declare function Image({ src, sizes, priority, quality, mode, resizeHosts, alt, onError, ...props }: ImageProps): react.JSX.Element;
|
|
692
695
|
|
|
693
696
|
/**
|
|
694
697
|
* Render formatted SDK money in a data element, with the minor-unit amount as its value.
|
|
695
698
|
* You can override the content with children or a render function receiving the formatted string.
|
|
696
699
|
*/
|
|
697
|
-
declare const Money: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
700
|
+
declare const Money: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
698
701
|
asChild?: boolean;
|
|
699
702
|
children?: react.ReactNode | ((state: {
|
|
700
703
|
formatted: string;
|
|
@@ -730,7 +733,7 @@ declare function slotAttributes(index: number, length: number, value: string, di
|
|
|
730
733
|
* You supply code verification.
|
|
731
734
|
*/
|
|
732
735
|
declare const Otp: {
|
|
733
|
-
Input: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
736
|
+
Input: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
734
737
|
asChild?: boolean;
|
|
735
738
|
children?: react.ReactNode | ((state: OtpState) => react.ReactNode);
|
|
736
739
|
} & {
|
|
@@ -788,7 +791,7 @@ declare function Root$2({ param, id, presentation, swipeDirection, fallback, omi
|
|
|
788
791
|
*/
|
|
789
792
|
declare const Overlay: {
|
|
790
793
|
Root: typeof Root$2;
|
|
791
|
-
Trigger: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
794
|
+
Trigger: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
792
795
|
asChild?: boolean;
|
|
793
796
|
children?: react.ReactNode | ((state: {
|
|
794
797
|
isOpen: boolean;
|
|
@@ -796,7 +799,7 @@ declare const Overlay: {
|
|
|
796
799
|
close: () => void;
|
|
797
800
|
}) => react.ReactNode);
|
|
798
801
|
} & react.RefAttributes<HTMLElement>>;
|
|
799
|
-
Content: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
802
|
+
Content: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
800
803
|
asChild?: boolean;
|
|
801
804
|
children?: react.ReactNode | ((state: {
|
|
802
805
|
isOpen: boolean;
|
|
@@ -813,7 +816,7 @@ declare const Overlay: {
|
|
|
813
816
|
/** Where to mount the content. Defaults to `document.body`. */
|
|
814
817
|
container?: HTMLElement | null;
|
|
815
818
|
} & react.RefAttributes<HTMLElement>>;
|
|
816
|
-
Title: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
819
|
+
Title: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
817
820
|
asChild?: boolean;
|
|
818
821
|
children?: react.ReactNode | ((state: {
|
|
819
822
|
isOpen: boolean;
|
|
@@ -821,7 +824,7 @@ declare const Overlay: {
|
|
|
821
824
|
close: () => void;
|
|
822
825
|
}) => react.ReactNode);
|
|
823
826
|
} & react.RefAttributes<HTMLElement>>;
|
|
824
|
-
Close: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
827
|
+
Close: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
825
828
|
asChild?: boolean;
|
|
826
829
|
children?: react.ReactNode | ((state: {
|
|
827
830
|
isOpen: boolean;
|
|
@@ -856,7 +859,7 @@ declare function Root$1({ methods, value, defaultValue, onValueChange, ...props
|
|
|
856
859
|
*/
|
|
857
860
|
declare const PaymentMethods: {
|
|
858
861
|
Root: typeof Root$1;
|
|
859
|
-
Item: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
862
|
+
Item: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
860
863
|
asChild?: boolean;
|
|
861
864
|
children?: react.ReactNode | ((state: PaymentMethod & {
|
|
862
865
|
selected: boolean;
|
|
@@ -924,15 +927,15 @@ declare function Root(props: RootProps): react.JSX.Element;
|
|
|
924
927
|
*/
|
|
925
928
|
declare const Search: {
|
|
926
929
|
Root: typeof Root;
|
|
927
|
-
Input: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
930
|
+
Input: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
928
931
|
asChild?: boolean;
|
|
929
932
|
children?: react.ReactNode | ((state: SearchState) => react.ReactNode);
|
|
930
933
|
} & react.RefAttributes<HTMLElement>>;
|
|
931
|
-
Results: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
934
|
+
Results: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
932
935
|
asChild?: boolean;
|
|
933
936
|
children?: react.ReactNode | ((state: SearchState) => react.ReactNode);
|
|
934
937
|
} & react.RefAttributes<HTMLElement>>;
|
|
935
|
-
Result: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
938
|
+
Result: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
936
939
|
asChild?: boolean;
|
|
937
940
|
children?: react.ReactNode | ((state: SearchState) => react.ReactNode);
|
|
938
941
|
} & {
|
|
@@ -996,7 +999,7 @@ declare function getOpenStatus(branch: Branch$1, timezone: string, now?: Date):
|
|
|
996
999
|
* Expose a branch opening label and open/closed state in a span or your render function.
|
|
997
1000
|
* Uses your time zone override, then the branch, store or UTC, and refreshes at boundaries and window focus.
|
|
998
1001
|
*/
|
|
999
|
-
declare const OpenStatus: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>,
|
|
1002
|
+
declare const OpenStatus: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
|
|
1000
1003
|
asChild?: boolean;
|
|
1001
1004
|
children?: react.ReactNode | ((state: OpenStatusState) => react.ReactNode);
|
|
1002
1005
|
} & {
|
|
@@ -1007,4 +1010,5 @@ declare const OpenStatus: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttr
|
|
|
1007
1010
|
/** The installed @zappie/foundations version. */
|
|
1008
1011
|
declare const FOUNDATIONS_VERSION: string;
|
|
1009
1012
|
|
|
1010
|
-
export { Account, AccountNotConfiguredError,
|
|
1013
|
+
export { Account, AccountNotConfiguredError, Address, Branch, BranchMap, Cart, Choice, DeliveryMap, FOUNDATIONS_VERSION, Fulfilment, Image, ItemForm, Money, OpenStatus, OptionGroup, Otp, Overlay, PartProps, PaymentMethods, Quantity, Schedule, Search, Totals, createSearchIndex, deferred, formatOpeningHours, formatWallClock, getOpenStatus, parseWallClock, scheduleSlots, useControllableState, useIntentPreload, useOverlay };
|
|
1014
|
+
export type { ActiveGroup, AddressState, AddressSuggestion, BranchMapLoadErrorState, BranchMapProps, Customer, Deferred, DeferredIdleOptions, DeferredProps, DeliveryMapProps, ImageProps, IntentPreloadHandlers, ItemFormContext, ItemFormInvalidGroup, ItemFormProps, MapLoadErrorState, PaymentMethod, QuantityProps, QuantityState, ScheduleSlot, ScheduleState, SearchResult, SearchSource, SearchState, SignInOptions, TotalsState };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/internal/slot.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n Children,\n cloneElement,\n createElement,\n isValidElement,\n type AllHTMLAttributes,\n type ElementType,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\n/**\n * HTML attributes shared by foundation parts, with optional render-function children.\n * Set asChild to merge the part props and ref into a single child element.\n */\nexport type PartProps<S = Record<string, never>> = Omit<\n AllHTMLAttributes<HTMLElement>,\n \
|
|
5
|
-
"mappings": ";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;
|
|
4
|
+
"sourcesContent": ["import {\n Children,\n cloneElement,\n createElement,\n isValidElement,\n type AllHTMLAttributes,\n type ElementType,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from \"react\";\nexport type PartOwnedAttributes = \"children\" | \"defaultValue\" | \"value\";\n/**\n * HTML attributes shared by foundation parts, with optional render-function children.\n * Set asChild to merge the part props and ref into a single child element.\n */\nexport type PartProps<S = Record<string, never>> = Omit<\n AllHTMLAttributes<HTMLElement>,\n PartOwnedAttributes\n> & {\n asChild?: boolean;\n children?: ReactNode | ((state: S) => ReactNode);\n};\nexport function composeRefs<T>(...refs: (Ref<T> | undefined)[]): Ref<T> {\n let cleanups: (() => void)[] = [];\n return (value) => {\n for (const cleanup of cleanups) {\n cleanup();\n }\n cleanups = [];\n if (value === null) {\n return;\n }\n for (const ref of refs) {\n if (typeof ref === \"function\") {\n const cleanup = ref(value);\n cleanups.push(\n typeof cleanup === \"function\" ? cleanup : () => ref(null),\n );\n } else if (ref) {\n ref.current = value;\n cleanups.push(() => {\n ref.current = null;\n });\n }\n }\n };\n}\n/** Consumer handlers run first and may cancel the primitive's action. */\nexport function mergeProps(\n base: Record<string, unknown>,\n consumer: Record<string, unknown>,\n) {\n const result = { ...base, ...consumer };\n if (\n typeof base.className === \"string\" &&\n typeof consumer.className === \"string\"\n ) {\n result.className = `${base.className} ${consumer.className}`;\n }\n if (\n base.style &&\n consumer.style &&\n typeof base.style === \"object\" &&\n typeof consumer.style === \"object\"\n ) {\n result.style = { ...base.style, ...consumer.style };\n }\n for (const key of Object.keys(base)) {\n if (\n /^on[A-Z]/.test(key) &&\n typeof base[key] === \"function\" &&\n typeof consumer[key] === \"function\"\n ) {\n result[key] = (event: { defaultPrevented?: boolean }) => {\n (consumer[key] as (event: unknown) => void)(event);\n if (!event.defaultPrevented) {\n (base[key] as (event: unknown) => void)(event);\n }\n };\n }\n }\n return result;\n}\nexport function part<S>(\n tag: ElementType,\n props: PartProps<S>,\n state: S,\n defaults: Record<string, unknown> = {},\n ref?: Ref<HTMLElement>,\n) {\n const { asChild, children, ...dom } = props;\n const content = typeof children === \"function\" ? children(state) : children;\n const merged = mergeProps(defaults, dom);\n if (asChild || (tag === \"input\" && typeof children === \"function\")) {\n const child = Children.only(content);\n if (!isValidElement(child)) {\n throw new Error(\"asChild requires one React element\");\n }\n const element = child as ReactElement<Record<string, unknown>>;\n // React 18 stores ref on the element; React 19 stores it in props.\n const descriptor = Object.getOwnPropertyDescriptor(element, \"ref\");\n const childRef =\n element.props.ref ??\n (descriptor && \"value\" in descriptor ? descriptor.value : undefined);\n return cloneElement(element, {\n ...mergeProps(merged, element.props),\n ref: composeRefs(ref, childRef as Ref<HTMLElement>),\n });\n }\n return createElement(tag, { ...merged, ref }, content);\n}\n/** A part's caller-supplied id, whether passed as a prop or set on its `asChild` element. */\nexport function partId(props: {\n id?: string | undefined;\n asChild?: boolean | undefined;\n children?: unknown;\n}): string | undefined {\n if (props.id) {\n return props.id;\n }\n if (props.asChild && isValidElement(props.children)) {\n const id = (props.children.props as { id?: unknown }).id;\n return typeof id === \"string\" ? id : undefined;\n }\n return undefined;\n}\n"],
|
|
5
|
+
"mappings": ";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AAaA,SAAS,eAAkB,MAAsC;AACtE,MAAI,WAA2B,CAAC;AAChC,SAAO,CAAC,UAAU;AAChB,eAAW,WAAW,UAAU;AAC9B,cAAQ;AAAA,IACV;AACA,eAAW,CAAC;AACZ,QAAI,UAAU,MAAM;AAClB;AAAA,IACF;AACA,eAAW,OAAO,MAAM;AACtB,UAAI,OAAO,QAAQ,YAAY;AAC7B,cAAM,UAAU,IAAI,KAAK;AACzB,iBAAS;AAAA,UACP,OAAO,YAAY,aAAa,UAAU,MAAM,IAAI,IAAI;AAAA,QAC1D;AAAA,MACF,WAAW,KAAK;AACd,YAAI,UAAU;AACd,iBAAS,KAAK,MAAM;AAClB,cAAI,UAAU;AAAA,QAChB,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;AAEO,SAAS,WACd,MACA,UACA;AACA,QAAM,SAAS,EAAE,GAAG,MAAM,GAAG,SAAS;AACtC,MACE,OAAO,KAAK,cAAc,YAC1B,OAAO,SAAS,cAAc,UAC9B;AACA,WAAO,YAAY,GAAG,KAAK,SAAS,IAAI,SAAS,SAAS;AAAA,EAC5D;AACA,MACE,KAAK,SACL,SAAS,SACT,OAAO,KAAK,UAAU,YACtB,OAAO,SAAS,UAAU,UAC1B;AACA,WAAO,QAAQ,EAAE,GAAG,KAAK,OAAO,GAAG,SAAS,MAAM;AAAA,EACpD;AACA,aAAW,OAAO,OAAO,KAAK,IAAI,GAAG;AACnC,QACE,WAAW,KAAK,GAAG,KACnB,OAAO,KAAK,GAAG,MAAM,cACrB,OAAO,SAAS,GAAG,MAAM,YACzB;AACA,aAAO,GAAG,IAAI,CAAC,UAA0C;AACvD,QAAC,SAAS,GAAG,EAA+B,KAAK;AACjD,YAAI,CAAC,MAAM,kBAAkB;AAC3B,UAAC,KAAK,GAAG,EAA+B,KAAK;AAAA,QAC/C;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AACO,SAAS,KACd,KACA,OACA,OACA,WAAoC,CAAC,GACrC,KACA;AACA,QAAM,EAAE,SAAS,UAAU,GAAG,IAAI,IAAI;AACtC,QAAM,UAAU,OAAO,aAAa,aAAa,SAAS,KAAK,IAAI;AACnE,QAAM,SAAS,WAAW,UAAU,GAAG;AACvC,MAAI,WAAY,QAAQ,WAAW,OAAO,aAAa,YAAa;AAClE,UAAM,QAAQ,SAAS,KAAK,OAAO;AACnC,QAAI,CAAC,eAAe,KAAK,GAAG;AAC1B,YAAM,IAAI,MAAM,oCAAoC;AAAA,IACtD;AACA,UAAM,UAAU;AAEhB,UAAM,aAAa,OAAO,yBAAyB,SAAS,KAAK;AACjE,UAAM,WACJ,QAAQ,MAAM,QACb,cAAc,WAAW,aAAa,WAAW,QAAQ;AAC5D,WAAO,aAAa,SAAS;AAAA,MAC3B,GAAG,WAAW,QAAQ,QAAQ,KAAK;AAAA,MACnC,KAAK,YAAY,KAAK,QAA4B;AAAA,IACpD,CAAC;AAAA,EACH;AACA,SAAO,cAAc,KAAK,EAAE,GAAG,QAAQ,IAAI,GAAG,OAAO;AACvD;AAEO,SAAS,OAAO,OAIA;AACrB,MAAI,MAAM,IAAI;AACZ,WAAO,MAAM;AAAA,EACf;AACA,MAAI,MAAM,WAAW,eAAe,MAAM,QAAQ,GAAG;AACnD,UAAM,KAAM,MAAM,SAAS,MAA2B;AACtD,WAAO,OAAO,OAAO,WAAW,KAAK;AAAA,EACvC;AACA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/media/image.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/media/image.tsx
|
|
2
|
-
import { resized, srcSet } from "@zappie/sdk/template";
|
|
2
|
+
import { canResize, resized, srcSet } from "@zappie/sdk/template";
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
function Image({
|
|
5
6
|
src,
|
|
@@ -7,20 +8,38 @@ function Image({
|
|
|
7
8
|
priority = false,
|
|
8
9
|
quality,
|
|
9
10
|
mode = "resize",
|
|
11
|
+
resizeHosts,
|
|
10
12
|
alt,
|
|
13
|
+
onError,
|
|
11
14
|
...props
|
|
12
15
|
}) {
|
|
13
|
-
const
|
|
16
|
+
const [failed, setFailed] = useState(null);
|
|
17
|
+
const responsive = mode === "resize" && failed !== src && canResize(src, resizeHosts);
|
|
18
|
+
const checkLoaded = useCallback(
|
|
19
|
+
(image) => {
|
|
20
|
+
if (responsive && image?.complete && image.naturalWidth === 0) {
|
|
21
|
+
setFailed(src);
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
[responsive, src]
|
|
25
|
+
);
|
|
14
26
|
return /* @__PURE__ */ jsx(
|
|
15
27
|
"img",
|
|
16
28
|
{
|
|
17
29
|
...props,
|
|
30
|
+
ref: checkLoaded,
|
|
18
31
|
alt,
|
|
19
|
-
src: responsive ? resized(src, 960, quality) : src,
|
|
20
|
-
...responsive ? { srcSet: srcSet(src, quality), sizes } : {},
|
|
32
|
+
src: responsive ? resized(src, 960, quality, resizeHosts) : src,
|
|
33
|
+
...responsive ? { srcSet: srcSet(src, quality, resizeHosts), sizes } : {},
|
|
21
34
|
loading: priority ? "eager" : "lazy",
|
|
22
35
|
decoding: priority ? "sync" : "async",
|
|
23
|
-
...priority ? { fetchPriority: "high" } : {}
|
|
36
|
+
...priority ? { fetchPriority: "high" } : {},
|
|
37
|
+
onError: (event) => {
|
|
38
|
+
if (responsive) {
|
|
39
|
+
setFailed(src);
|
|
40
|
+
}
|
|
41
|
+
onError?.(event);
|
|
42
|
+
}
|
|
24
43
|
}
|
|
25
44
|
);
|
|
26
45
|
}
|
package/dist/media/image.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/media/image.tsx"],
|
|
4
|
-
"sourcesContent": ["import { resized, srcSet } from \"@zappie/sdk/template\";\nimport type
|
|
5
|
-
"mappings": ";AAAA,SAAS,SAAS,cAAc;
|
|
4
|
+
"sourcesContent": ["import { canResize, resized, srcSet } from \"@zappie/sdk/template\";\nimport { useCallback, useState, type ImgHTMLAttributes } from \"react\";\n\n/** Props for a responsive storefront image. */\nexport type ImageProps = Omit<\n ImgHTMLAttributes<HTMLImageElement>,\n \"src\" | \"srcSet\"\n> & {\n src: string;\n alt: string;\n sizes?: string;\n priority?: boolean;\n quality?: number;\n mode?: \"resize\" | \"direct\";\n /** Lowercase hosts your zone resizes. Defaults to `RESIZE_HOSTS` from `@zappie/sdk/template`. */\n resizeHosts?: readonly string[];\n};\n\n/** Render an image through same-origin resizing, falling back once to `src` if that fails. */\nexport function Image({\n src,\n sizes = \"100vw\",\n priority = false,\n quality,\n mode = \"resize\",\n resizeHosts,\n alt,\n onError,\n ...props\n}: ImageProps) {\n const [failed, setFailed] = useState<string | null>(null);\n const responsive =\n mode === \"resize\" && failed !== src && canResize(src, resizeHosts);\n // Catches an error that fired before hydration.\n const checkLoaded = useCallback(\n (image: HTMLImageElement | null) => {\n if (responsive && image?.complete && image.naturalWidth === 0) {\n setFailed(src);\n }\n },\n [responsive, src],\n );\n return (\n <img\n {...props}\n ref={checkLoaded}\n alt={alt}\n src={responsive ? resized(src, 960, quality, resizeHosts) : src}\n {...(responsive\n ? { srcSet: srcSet(src, quality, resizeHosts), sizes }\n : {})}\n loading={priority ? \"eager\" : \"lazy\"}\n decoding={priority ? \"sync\" : \"async\"}\n {...(priority ? { fetchPriority: \"high\" as const } : {})}\n onError={(event) => {\n if (responsive) {\n setFailed(src);\n }\n onError?.(event);\n }}\n />\n );\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW,SAAS,cAAc;AAC3C,SAAS,aAAa,gBAAwC;AA0C1D;AAxBG,SAAS,MAAM;AAAA,EACpB;AAAA,EACA,QAAQ;AAAA,EACR,WAAW;AAAA,EACX;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAe;AACb,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAwB,IAAI;AACxD,QAAM,aACJ,SAAS,YAAY,WAAW,OAAO,UAAU,KAAK,WAAW;AAEnE,QAAM,cAAc;AAAA,IAClB,CAAC,UAAmC;AAClC,UAAI,cAAc,OAAO,YAAY,MAAM,iBAAiB,GAAG;AAC7D,kBAAU,GAAG;AAAA,MACf;AAAA,IACF;AAAA,IACA,CAAC,YAAY,GAAG;AAAA,EAClB;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,MACA,KAAK,aAAa,QAAQ,KAAK,KAAK,SAAS,WAAW,IAAI;AAAA,MAC3D,GAAI,aACD,EAAE,QAAQ,OAAO,KAAK,SAAS,WAAW,GAAG,MAAM,IACnD,CAAC;AAAA,MACL,SAAS,WAAW,UAAU;AAAA,MAC9B,UAAU,WAAW,SAAS;AAAA,MAC7B,GAAI,WAAW,EAAE,eAAe,OAAgB,IAAI,CAAC;AAAA,MACtD,SAAS,CAAC,UAAU;AAClB,YAAI,YAAY;AACd,oBAAU,GAAG;AAAA,QACf;AACA,kBAAU,KAAK;AAAA,MACjB;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/next.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { L as OVERLAY_LOCATION_EVENT } from './history-
|
|
1
|
+
export { L as OVERLAY_LOCATION_EVENT } from './history-BlytQinP.js';
|
|
2
2
|
|
|
3
3
|
/** Capture same-page shallow moves before Next attempts a server navigation. */
|
|
4
4
|
declare function installShallowHistory(): () => void;
|
package/dist/overlay/engine.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
export { E as EngineClose, c as EngineTitle, b as Presentation, d as Surface, e as SurfaceProps, S as SwipeDirection, u as useEngineParts } from '../engine-D2iRshfW.js';
|
|
1
2
|
import 'react';
|
|
2
3
|
import '@base-ui/react/dialog';
|
|
3
|
-
export { E as EngineClose, b as EngineTitle, a as Presentation, c as Surface, d as SurfaceProps, S as SwipeDirection, u as useEngineParts } from '../engine-Bfbv9M0D.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as ParseRichText, P as ParsedRichTextNode, c as createSanitizeRichText } from '../core-
|
|
1
|
+
export { a as ParseRichText, P as ParsedRichTextNode, c as createSanitizeRichText } from '../core-Cd-_zlQx.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The separator used to store multiple menu info banners in a single string.
|
package/dist/version.js
CHANGED
package/dist/version.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/version.ts"],
|
|
4
4
|
"sourcesContent": ["// Builds replace __ZAPPIE_FOUNDATIONS_VERSION__ with the version in package.json. Code run straight\n// from source, such as a plain Node script, has no build step and gets the\n// development label instead.\ndeclare const __ZAPPIE_FOUNDATIONS_VERSION__: string | undefined;\n\n/** The installed @zappie/foundations version. */\nexport const PACKAGE_VERSION: string =\n typeof __ZAPPIE_FOUNDATIONS_VERSION__ === \"string\"\n ? __ZAPPIE_FOUNDATIONS_VERSION__\n : \"0.0.0-development\";\n"],
|
|
5
|
-
"mappings": ";AAMO,IAAM,kBACX,OACI,
|
|
5
|
+
"mappings": ";AAMO,IAAM,kBACX,OACI,WACA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zappie/foundations",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "UI-less React primitives for Zappie storefronts: behaviour, state and accessibility without styles.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@base-ui/react": "^1.9.0",
|
|
35
35
|
"@googlemaps/markerclusterer": "^2.6.2",
|
|
36
|
-
"@zappie/sdk": "^0.1.
|
|
36
|
+
"@zappie/sdk": "^0.1.24"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": "^18.2.0 || ^19.0.0",
|