@zappie/foundations 0.1.9 → 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 CHANGED
@@ -1,5 +1,14 @@
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
+
3
12
  ## 0.1.9
4
13
 
5
14
  ### 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 { type ParsedRichTextNode as P, type ParseRichText as a, createSanitizeRichText as c };
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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, type PartProps as P, type SwipeDirection as S, type Presentation as a, EngineTitle as b, Surface as c, type SurfaceProps as d, useEngineParts as u };
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 };
@@ -5,4 +5,5 @@ type CloseOptions = {
5
5
  };
6
6
  declare const LOCATION_EVENT = "zappie:location";
7
7
 
8
- export { type CloseOptions as C, LOCATION_EVENT as L, type OverlayQuery as O };
8
+ export { LOCATION_EVENT as L };
9
+ export type { CloseOptions as C, OverlayQuery as O };
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 { P as PartProps, a as Presentation, S as SwipeDirection } from './engine-Bfbv9M0D.js';
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>, "children" | "defaultValue" | "value"> & {
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>>;
@@ -696,7 +697,7 @@ declare function Image({ src, sizes, priority, quality, mode, resizeHosts, alt,
696
697
  * Render formatted SDK money in a data element, with the minor-unit amount as its value.
697
698
  * You can override the content with children or a render function receiving the formatted string.
698
699
  */
699
- declare const Money: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, "children" | "defaultValue" | "value"> & {
700
+ declare const Money: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
700
701
  asChild?: boolean;
701
702
  children?: react.ReactNode | ((state: {
702
703
  formatted: string;
@@ -732,7 +733,7 @@ declare function slotAttributes(index: number, length: number, value: string, di
732
733
  * You supply code verification.
733
734
  */
734
735
  declare const Otp: {
735
- Input: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, "children" | "defaultValue" | "value"> & {
736
+ Input: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
736
737
  asChild?: boolean;
737
738
  children?: react.ReactNode | ((state: OtpState) => react.ReactNode);
738
739
  } & {
@@ -790,7 +791,7 @@ declare function Root$2({ param, id, presentation, swipeDirection, fallback, omi
790
791
  */
791
792
  declare const Overlay: {
792
793
  Root: typeof Root$2;
793
- Trigger: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, "children" | "defaultValue" | "value"> & {
794
+ Trigger: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
794
795
  asChild?: boolean;
795
796
  children?: react.ReactNode | ((state: {
796
797
  isOpen: boolean;
@@ -798,7 +799,7 @@ declare const Overlay: {
798
799
  close: () => void;
799
800
  }) => react.ReactNode);
800
801
  } & react.RefAttributes<HTMLElement>>;
801
- Content: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, "children" | "defaultValue" | "value"> & {
802
+ Content: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
802
803
  asChild?: boolean;
803
804
  children?: react.ReactNode | ((state: {
804
805
  isOpen: boolean;
@@ -815,7 +816,7 @@ declare const Overlay: {
815
816
  /** Where to mount the content. Defaults to `document.body`. */
816
817
  container?: HTMLElement | null;
817
818
  } & react.RefAttributes<HTMLElement>>;
818
- Title: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, "children" | "defaultValue" | "value"> & {
819
+ Title: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
819
820
  asChild?: boolean;
820
821
  children?: react.ReactNode | ((state: {
821
822
  isOpen: boolean;
@@ -823,7 +824,7 @@ declare const Overlay: {
823
824
  close: () => void;
824
825
  }) => react.ReactNode);
825
826
  } & react.RefAttributes<HTMLElement>>;
826
- Close: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, "children" | "defaultValue" | "value"> & {
827
+ Close: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
827
828
  asChild?: boolean;
828
829
  children?: react.ReactNode | ((state: {
829
830
  isOpen: boolean;
@@ -858,7 +859,7 @@ declare function Root$1({ methods, value, defaultValue, onValueChange, ...props
858
859
  */
859
860
  declare const PaymentMethods: {
860
861
  Root: typeof Root$1;
861
- Item: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, "children" | "defaultValue" | "value"> & {
862
+ Item: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
862
863
  asChild?: boolean;
863
864
  children?: react.ReactNode | ((state: PaymentMethod & {
864
865
  selected: boolean;
@@ -926,15 +927,15 @@ declare function Root(props: RootProps): react.JSX.Element;
926
927
  */
927
928
  declare const Search: {
928
929
  Root: typeof Root;
929
- Input: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, "children" | "defaultValue" | "value"> & {
930
+ Input: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
930
931
  asChild?: boolean;
931
932
  children?: react.ReactNode | ((state: SearchState) => react.ReactNode);
932
933
  } & react.RefAttributes<HTMLElement>>;
933
- Results: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, "children" | "defaultValue" | "value"> & {
934
+ Results: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
934
935
  asChild?: boolean;
935
936
  children?: react.ReactNode | ((state: SearchState) => react.ReactNode);
936
937
  } & react.RefAttributes<HTMLElement>>;
937
- Result: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, "children" | "defaultValue" | "value"> & {
938
+ Result: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
938
939
  asChild?: boolean;
939
940
  children?: react.ReactNode | ((state: SearchState) => react.ReactNode);
940
941
  } & {
@@ -998,7 +999,7 @@ declare function getOpenStatus(branch: Branch$1, timezone: string, now?: Date):
998
999
  * Expose a branch opening label and open/closed state in a span or your render function.
999
1000
  * Uses your time zone override, then the branch, store or UTC, and refreshes at boundaries and window focus.
1000
1001
  */
1001
- declare const OpenStatus: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, "children" | "defaultValue" | "value"> & {
1002
+ declare const OpenStatus: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttributes<HTMLElement>, PartOwnedAttributes> & {
1002
1003
  asChild?: boolean;
1003
1004
  children?: react.ReactNode | ((state: OpenStatusState) => react.ReactNode);
1004
1005
  } & {
@@ -1009,4 +1010,5 @@ declare const OpenStatus: react.ForwardRefExoticComponent<Omit<react.AllHTMLAttr
1009
1010
  /** The installed @zappie/foundations version. */
1010
1011
  declare const FOUNDATIONS_VERSION: string;
1011
1012
 
1012
- export { Account, AccountNotConfiguredError, type ActiveGroup, Address, type AddressState, type AddressSuggestion, Branch, BranchMap, type BranchMapLoadErrorState, type BranchMapProps, Cart, Choice, type Customer, type Deferred, type DeferredIdleOptions, type DeferredProps, DeliveryMap, type DeliveryMapProps, FOUNDATIONS_VERSION, Fulfilment, Image, type ImageProps, type IntentPreloadHandlers, ItemForm, type ItemFormContext, type ItemFormInvalidGroup, type ItemFormProps, type MapLoadErrorState, Money, OpenStatus, OptionGroup, Otp, Overlay, PartProps, type PaymentMethod, PaymentMethods, Quantity, type QuantityProps, type QuantityState, Schedule, type ScheduleSlot, type ScheduleState, Search, type SearchResult, type SearchSource, type SearchState, type SignInOptions, Totals, type TotalsState, createSearchIndex, deferred, formatOpeningHours, formatWallClock, getOpenStatus, parseWallClock, scheduleSlots, useControllableState, useIntentPreload, useOverlay };
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 \"children\" | \"defaultValue\" | \"value\"\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;AAYA,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,EAA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M,SAAS,MAA2B;AACtD,WAAO,OAAO,OAAO,WAAW,KAAK;AAAA,EACvC;AACA,SAAO;AACT;",
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,U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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/next.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { L as OVERLAY_LOCATION_EVENT } from './history-Bqu12Vkz.js';
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;
@@ -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
- import { P as ParsedRichTextNode } from '../core-DdojsUzR.js';
1
+ import { ParsedRichTextNode } from './index.js';
2
2
 
3
3
  /**
4
4
  * Parse HTML with the browser DOMParser and convert body children to the shared rich-text node format.
@@ -1,4 +1,4 @@
1
- export { a as ParseRichText, P as ParsedRichTextNode, c as createSanitizeRichText } from '../core-DdojsUzR.js';
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
@@ -1,5 +1,5 @@
1
1
  // src/version.ts
2
- var PACKAGE_VERSION = true ? "0.1.9" : "0.0.0-development";
2
+ var PACKAGE_VERSION = true ? "0.1.10" : "0.0.0-development";
3
3
  export {
4
4
  PACKAGE_VERSION
5
5
  };
@@ -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,UACA;",
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.9",
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.22"
36
+ "@zappie/sdk": "^0.1.24"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": "^18.2.0 || ^19.0.0",