@zappie/theme-base 0.1.2 → 0.1.3

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,21 @@
1
1
  # @zappie/theme-base
2
2
 
3
+ ## 0.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - afb46d4: Add storefront security lint rules, pass outbound hosts from `zappie.config.ts` to ESLint, and provide `safeRedirect` from `@zappie/sdk/redirect` for untrusted navigation targets.
8
+ - Updated dependencies [2b672c9]
9
+ - Updated dependencies [9b5b412]
10
+ - Updated dependencies [a4872fd]
11
+ - Updated dependencies [32ecccf]
12
+ - Updated dependencies [afb46d4]
13
+ - Updated dependencies [6a8e227]
14
+ - Updated dependencies [c0171ae]
15
+ - Updated dependencies [0cbc4da]
16
+ - @zappie/sdk@0.1.12
17
+ - @zappie/foundations@0.1.6
18
+
3
19
  ## 0.1.2
4
20
 
5
21
  ### Patch Changes
package/dist/address.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
+ import { ComponentType, ReactNode } from 'react';
2
3
  import { DeliveryAddress } from '@zappie/sdk';
3
4
  import { PlacesClient } from '@zappie/sdk/places';
4
- import { ComponentType, ReactNode } from 'react';
5
5
 
6
6
  type AddressSuggestion = {
7
7
  placeId: string;
@@ -22,7 +22,7 @@ type AddressLookup = {
22
22
  declare function AddressLookupProvider({ lookup, children, }: {
23
23
  lookup: AddressLookup;
24
24
  children: ReactNode;
25
- }): react_jsx_runtime.JSX.Element;
25
+ }): react.JSX.Element;
26
26
  declare function useAddressLookup(): AddressLookup;
27
27
  declare function createSdkAddressLookup({ places, branchId, }: {
28
28
  places: PlacesClient;
package/dist/cart.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
2
 
3
3
  /**
4
4
  * `themeClass` lets a template reuse this cart under its own design: the class
@@ -7,6 +7,6 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  */
8
8
  declare function CartReview({ themeClass }?: {
9
9
  themeClass?: string;
10
- }): react_jsx_runtime.JSX.Element;
10
+ }): react.JSX.Element;
11
11
 
12
12
  export { CartReview };
@@ -18,7 +18,9 @@ function InfoBanners({ value }) {
18
18
  const interacted = useRef(false);
19
19
  useEffect(() => {
20
20
  setBanners(
21
- splitInfoBanner(value).map(sanitize).filter((banner) => banner.replace(/<[^>]*>/g, "").trim())
21
+ splitInfoBanner(value).filter(
22
+ (banner) => banner.replace(/<[^>]*>/g, "").trim()
23
+ )
22
24
  );
23
25
  setIndex(0);
24
26
  setExpanded({});
@@ -84,7 +86,7 @@ function InfoBanners({ value }) {
84
86
  {
85
87
  className: "z-base-info-copy",
86
88
  "data-expanded": Boolean(expanded[position]),
87
- dangerouslySetInnerHTML: { __html: banner }
89
+ dangerouslySetInnerHTML: { __html: sanitize(banner) }
88
90
  }
89
91
  ),
90
92
  /* @__PURE__ */ jsxs(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/catalogue/info-banners.tsx"],
4
- "sourcesContent": ["\"use client\";\nimport {\n createSanitizeRichText,\n splitInfoBanner,\n} from \"@zappie/foundations/rich-text\";\nimport { parseRichText } from \"@zappie/foundations/rich-text/browser\";\nimport { useEffect, useRef, useState } from \"react\";\nconst sanitize = createSanitizeRichText(parseRichText);\n/** Safe rich text with touch scrolling, explicit controls and pausable rotation. */\nexport function InfoBanners({ value }: { value?: string }) {\n const [banners, setBanners] = useState<string[]>([]);\n const [index, setIndex] = useState(0);\n const [expanded, setExpanded] = useState<Record<number, boolean>>({});\n const [paused, setPaused] = useState(false);\n const viewport = useRef<HTMLDivElement>(null);\n const interacted = useRef(false);\n useEffect(() => {\n setBanners(\n splitInfoBanner(value)\n .map(sanitize)\n .filter((banner) => banner.replace(/<[^>]*>/g, \"\").trim()),\n );\n setIndex(0);\n setExpanded({});\n interacted.current = false;\n }, [value]);\n function select(next: number, interaction = true) {\n interacted.current ||= interaction;\n setExpanded({});\n viewport.current?.children[next]?.scrollIntoView({\n block: \"nearest\",\n inline: \"start\",\n behavior: \"instant\",\n });\n setIndex(next);\n }\n const isExpanded = Object.values(expanded).some(Boolean);\n useEffect(() => {\n if (paused || isExpanded || banners.length < 2) {\n return;\n }\n const interval = setInterval(() => {\n const node = viewport.current;\n if (\n !node ||\n interacted.current ||\n window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches ||\n node.scrollWidth <= node.clientWidth\n ) {\n return;\n }\n select((index + 1) % banners.length, false);\n }, 5000);\n return () => clearInterval(interval);\n }, [index, paused, isExpanded, banners.length]);\n if (!banners.length) {\n return null;\n }\n return (\n <section\n aria-label=\"Menu information\"\n onMouseEnter={() => setPaused(true)}\n onMouseLeave={() => setPaused(false)}\n onFocus={() => setPaused(true)}\n onBlur={() => setPaused(false)}\n >\n <div\n className=\"z-base-info-banners\"\n ref={viewport}\n onPointerDown={() => {\n interacted.current = true;\n }}\n onScroll={() => {\n const node = viewport.current;\n if (node?.children[0]) {\n setIndex(\n Math.round(\n node.scrollLeft /\n node.children[0].getBoundingClientRect().width,\n ),\n );\n }\n }}\n >\n {banners.map((banner, position) => (\n <article key={banner + position}>\n <div\n className=\"z-base-info-copy\"\n data-expanded={Boolean(expanded[position])}\n dangerouslySetInnerHTML={{ __html: banner }}\n />\n <button\n type=\"button\"\n aria-expanded={Boolean(expanded[position])}\n onClick={() =>\n setExpanded((current) => ({\n ...current,\n [position]: !current[position],\n }))\n }\n >\n Show {expanded[position] ? \"less\" : \"more\"}\n </button>\n </article>\n ))}\n </div>\n {banners.length > 1 && (\n <div>\n <button\n type=\"button\"\n aria-label=\"Previous information\"\n disabled={index === 0}\n onClick={() => select(index - 1)}\n >\n Previous\n </button>\n <button\n type=\"button\"\n aria-label=\"Next information\"\n disabled={index >= banners.length - 1}\n onClick={() => select(index + 1)}\n >\n Next\n </button>\n {banners.map((_, position) => (\n <button\n key={position}\n type=\"button\"\n aria-label={`Go to banner ${position + 1}`}\n aria-current={index === position ? \"true\" : undefined}\n onClick={() => select(position)}\n >\n {position + 1}\n </button>\n ))}\n </div>\n )}\n </section>\n );\n}\n"],
5
- "mappings": ";;;AACA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,qBAAqB;AAC9B,SAAS,WAAW,QAAQ,gBAAgB;AAgFhC,cAKA,YALA;AA/EZ,IAAM,WAAW,uBAAuB,aAAa;AAE9C,SAAS,YAAY,EAAE,MAAM,GAAuB;AACzD,QAAM,CAAC,SAAS,UAAU,IAAI,SAAmB,CAAC,CAAC;AACnD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,CAAC;AACpC,QAAM,CAAC,UAAU,WAAW,IAAI,SAAkC,CAAC,CAAC;AACpE,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,WAAW,OAAuB,IAAI;AAC5C,QAAM,aAAa,OAAO,KAAK;AAC/B,YAAU,MAAM;AACd;AAAA,MACE,gBAAgB,KAAK,EAClB,IAAI,QAAQ,EACZ,OAAO,CAAC,WAAW,OAAO,QAAQ,YAAY,EAAE,EAAE,KAAK,CAAC;AAAA,IAC7D;AACA,aAAS,CAAC;AACV,gBAAY,CAAC,CAAC;AACd,eAAW,UAAU;AAAA,EACvB,GAAG,CAAC,KAAK,CAAC;AACV,WAAS,OAAO,MAAc,cAAc,MAAM;AAChD,eAAW,YAAX,WAAW,UAAY;AACvB,gBAAY,CAAC,CAAC;AACd,aAAS,SAAS,SAAS,IAAI,GAAG,eAAe;AAAA,MAC/C,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ,CAAC;AACD,aAAS,IAAI;AAAA,EACf;AACA,QAAM,aAAa,OAAO,OAAO,QAAQ,EAAE,KAAK,OAAO;AACvD,YAAU,MAAM;AACd,QAAI,UAAU,cAAc,QAAQ,SAAS,GAAG;AAC9C;AAA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SAAS,MACP,YAAY,CAAC,aAAa;AAAA,oBACxB,GAAG;AAAA,oBACH,CAAC,QAAQ,GAAG,CAAC,QAAQ,QAAQ;AAAA,kBAC/B,EAAE;AAAA,kBAEL;AAAA;AAAA,oBACO,SAAS,QAAQ,IAAI,SAAS;AAAA;AAAA;AAAA,cACtC;AAAA,iBAjBY,SAAS,QAkBvB,CACD;AAAA;AAAA,QACH;AAAA,QACC,QAAQ,SAAS,KAChB,qBAAC,SACC;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAW;AAAA,cACX,UAAU,UAAU;AAAA,cACpB,SAAS,MAAM,OAAO,QAAQ,CAAC;AAAA,cAChC;AAAA;AAAA,UAED;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAW;AAAA,cACX,UAAU,SAAS,QAAQ,SAAS;AAAA,cACpC,SAAS,MAAM,OAAO,QAAQ,CAAC;AAAA,cAChC;AAAA;AAAA,UAED;AAAA,UACC,QAAQ,IAAI,CAAC,GAAG,aACf;AAAA,YAAC;AAAA;AAAA,cAEC,MAAK;AAAA,cACL,cAAY,gBAAgB,WAAW,CAAC;AAAA,cACxC,gBAAc,UAAU,WAAW,SAAS;AAAA,cAC5C,SAAS,MAAM,OAAO,QAAQ;AAAA,cAE7B,qBAAW;AAAA;AAAA,YANP;AAAA,UAOP,CACD;AAAA,WACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
4
+ "sourcesContent": ["\"use client\";\nimport {\n createSanitizeRichText,\n splitInfoBanner,\n} from \"@zappie/foundations/rich-text\";\nimport { parseRichText } from \"@zappie/foundations/rich-text/browser\";\nimport { useEffect, useRef, useState } from \"react\";\nconst sanitize = createSanitizeRichText(parseRichText);\n/** Safe rich text with touch scrolling, explicit controls and pausable rotation. */\nexport function InfoBanners({ value }: { value?: string }) {\n const [banners, setBanners] = useState<string[]>([]);\n const [index, setIndex] = useState(0);\n const [expanded, setExpanded] = useState<Record<number, boolean>>({});\n const [paused, setPaused] = useState(false);\n const viewport = useRef<HTMLDivElement>(null);\n const interacted = useRef(false);\n useEffect(() => {\n setBanners(\n splitInfoBanner(value).filter((banner) =>\n banner.replace(/<[^>]*>/g, \"\").trim(),\n ),\n );\n setIndex(0);\n setExpanded({});\n interacted.current = false;\n }, [value]);\n function select(next: number, interaction = true) {\n interacted.current ||= interaction;\n setExpanded({});\n viewport.current?.children[next]?.scrollIntoView({\n block: \"nearest\",\n inline: \"start\",\n behavior: \"instant\",\n });\n setIndex(next);\n }\n const isExpanded = Object.values(expanded).some(Boolean);\n useEffect(() => {\n if (paused || isExpanded || banners.length < 2) {\n return;\n }\n const interval = setInterval(() => {\n const node = viewport.current;\n if (\n !node ||\n interacted.current ||\n window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches ||\n node.scrollWidth <= node.clientWidth\n ) {\n return;\n }\n select((index + 1) % banners.length, false);\n }, 5000);\n return () => clearInterval(interval);\n }, [index, paused, isExpanded, banners.length]);\n if (!banners.length) {\n return null;\n }\n return (\n <section\n aria-label=\"Menu information\"\n onMouseEnter={() => setPaused(true)}\n onMouseLeave={() => setPaused(false)}\n onFocus={() => setPaused(true)}\n onBlur={() => setPaused(false)}\n >\n <div\n className=\"z-base-info-banners\"\n ref={viewport}\n onPointerDown={() => {\n interacted.current = true;\n }}\n onScroll={() => {\n const node = viewport.current;\n if (node?.children[0]) {\n setIndex(\n Math.round(\n node.scrollLeft /\n node.children[0].getBoundingClientRect().width,\n ),\n );\n }\n }}\n >\n {banners.map((banner, position) => (\n <article key={banner + position}>\n <div\n className=\"z-base-info-copy\"\n data-expanded={Boolean(expanded[position])}\n dangerouslySetInnerHTML={{ __html: sanitize(banner) }}\n />\n <button\n type=\"button\"\n aria-expanded={Boolean(expanded[position])}\n onClick={() =>\n setExpanded((current) => ({\n ...current,\n [position]: !current[position],\n }))\n }\n >\n Show {expanded[position] ? \"less\" : \"more\"}\n </button>\n </article>\n ))}\n </div>\n {banners.length > 1 && (\n <div>\n <button\n type=\"button\"\n aria-label=\"Previous information\"\n disabled={index === 0}\n onClick={() => select(index - 1)}\n >\n Previous\n </button>\n <button\n type=\"button\"\n aria-label=\"Next information\"\n disabled={index >= banners.length - 1}\n onClick={() => select(index + 1)}\n >\n Next\n </button>\n {banners.map((_, position) => (\n <button\n key={position}\n type=\"button\"\n aria-label={`Go to banner ${position + 1}`}\n aria-current={index === position ? \"true\" : undefined}\n onClick={() => select(position)}\n >\n {position + 1}\n </button>\n ))}\n </div>\n )}\n </section>\n );\n}\n"],
5
+ "mappings": ";;;AACA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,qBAAqB;AAC9B,SAAS,WAAW,QAAQ,gBAAgB;AAgFhC,cAKA,YALA;AA/EZ,IAAM,WAAW,uBAAuB,aAAa;AAE9C,SAAS,YAAY,EAAE,MAAM,GAAuB;AACzD,QAAM,CAAC,SAAS,UAAU,IAAI,SAAmB,CAAC,CAAC;AACnD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,CAAC;AACpC,QAAM,CAAC,UAAU,WAAW,IAAI,SAAkC,CAAC,CAAC;AACpE,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,WAAW,OAAuB,IAAI;AAC5C,QAAM,aAAa,OAAO,KAAK;AAC/B,YAAU,MAAM;AACd;AAAA,MACE,gBAAgB,KAAK,EAAE;AAAA,QAAO,CAAC,WAC7B,OAAO,QAAQ,YAAY,EAAE,EAAE,KAAK;AAAA,MACtC;AAAA,IACF;AACA,aAAS,CAAC;AACV,gBAAY,CAAC,CAAC;AACd,eAAW,UAAU;AAAA,EACvB,GAAG,CAAC,KAAK,CAAC;AACV,WAAS,OAAO,MAAc,cAAc,MAAM;AAChD,eAAW,YAAX,WAAW,UAAY;AACvB,gBAAY,CAAC,CAAC;AACd,aAAS,SAAS,SAAS,IAAI,GAAG,eAAe;AAAA,MAC/C,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,UAAU;AA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;AAAA,kBACzC,yBAAyB,EAAE,QAAQ,SAAS,MAAM,EAAE;AAAA;AAAA,cACtD;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC,MAAK;AAAA,kBACL,iBAAe,QAAQ,SAAS,QAAQ,CAAC;AAAA,kBACzC,SAAS,MACP,YAAY,CAAC,aAAa;AAAA,oBACxB,GAAG;AAAA,oBACH,CAAC,QAAQ,GAAG,CAAC,QAAQ,QAAQ;AAAA,kBAC/B,EAAE;AAAA,kBAEL;AAAA;AAAA,oBACO,SAAS,QAAQ,IAAI,SAAS;AAAA;AAAA;AAAA,cACtC;AAAA,iBAjBY,SAAS,QAkBvB,CACD;AAAA;AAAA,QACH;AAAA,QACC,QAAQ,SAAS,KAChB,qBAAC,SACC;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAW;AAAA,cACX,UAAU,UAAU;AAAA,cACpB,SAAS,MAAM,OAAO,QAAQ,CAAC;AAAA,cAChC;AAAA;AAAA,UAED;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,cAAW;AAAA,cACX,UAAU,SAAS,QAAQ,SAAS;AAAA,cACpC,SAAS,MAAM,OAAO,QAAQ,CAAC;AAAA,cAChC;AAAA;AAAA,UAED;AAAA,UACC,QAAQ,IAAI,CAAC,GAAG,aACf;AAAA,YAAC;AAAA;AAAA,cAEC,MAAK;AAAA,cACL,cAAY,gBAAgB,WAAW,CAAC;AAAA,cACxC,gBAAc,UAAU,WAAW,SAAS;AAAA,cAC5C,SAAS,MAAM,OAAO,QAAQ;AAAA,cAE7B,qBAAW;AAAA;AAAA,YANP;AAAA,UAOP,CACD;AAAA,WACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { Menu, Item, Category } from '@zappie/sdk';
1
+ import * as react from 'react';
3
2
  import { ComponentType } from 'react';
3
+ import { Menu, Item, Category } from '@zappie/sdk';
4
4
 
5
5
  type CatalogueStrategy = (metadata: Menu, sample?: Menu) => "eager" | "progressive" | null;
6
6
 
@@ -55,6 +55,6 @@ type CatalogueSlots = {
55
55
  layout?: CatalogueLayout;
56
56
  };
57
57
 
58
- declare function Catalogue({ initialMenu, resolveStrategy, themeClass, orderAction, menuNotice, revision, slots, }: CatalogueProps): react_jsx_runtime.JSX.Element;
58
+ declare function Catalogue({ initialMenu, resolveStrategy, themeClass, orderAction, menuNotice, revision, slots, }: CatalogueProps): react.JSX.Element;
59
59
 
60
60
  export { Catalogue, type CatalogueCategoryHeaderProps, type CatalogueCategoryTabProps, type CatalogueColumnCount, type CatalogueLayout, type CatalogueLayoutMode, type CatalogueMenuSlotProps, type CatalogueProps, type CatalogueSlots, type CatalogueTileProps, type CatalogueToolbarActionProps };
@@ -1,8 +1,8 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
2
3
  import { CartModule } from '@zappie/sdk';
3
4
  import { CheckoutClient } from '@zappie/sdk/checkout';
4
5
  import { CustomerClient } from '@zappie/sdk/customer';
5
- import { ReactNode } from 'react';
6
6
 
7
7
  type CheckoutPayload = ReturnType<CartModule["toCheckoutPayload"]>;
8
8
  type CheckoutHandoff = {
@@ -19,7 +19,7 @@ type CheckoutHandoff = {
19
19
  declare function CheckoutHandoffProvider({ handoff, children, }: {
20
20
  handoff: CheckoutHandoff;
21
21
  children: ReactNode;
22
- }): react_jsx_runtime.JSX.Element;
22
+ }): react.JSX.Element;
23
23
  declare function useCheckoutHandoff(): CheckoutHandoff;
24
24
  declare function createSdkCheckoutHandoff({ customer, checkout, branchId, returnUrl, cancelUrl, attribution, }: {
25
25
  customer: CustomerClient;
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { Money, OpeningTime, CartFulfilment } from '@zappie/sdk';
1
+ import * as react from 'react';
3
2
  import { ReactNode } from 'react';
3
+ import { Money, OpeningTime, CartFulfilment } from '@zappie/sdk';
4
4
  export { AddressSuggestion } from './address.js';
5
5
  import '@zappie/sdk/places';
6
6
 
@@ -94,7 +94,7 @@ type CustomerDetailsValues = {
94
94
  declare function BaseHostBridgeProvider({ bridge, children, }: {
95
95
  bridge: BaseHostBridge;
96
96
  children: ReactNode;
97
- }): react_jsx_runtime.JSX.Element;
97
+ }): react.JSX.Element;
98
98
  declare function useBaseHostBridge(): BaseHostBridge;
99
99
 
100
100
  export { type BaseHostBridge, BaseHostBridgeProvider, type CustomerDetailsValues, type HostAppliedReward, type HostPromo, type HostReward, useBaseHostBridge };
@@ -1,4 +1,3 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
1
  import * as react from 'react';
3
2
  import { RefObject, ReactNode } from 'react';
4
3
 
@@ -15,6 +14,6 @@ declare function ItemFrame({ id, name, hasImages, navigation, themeClass, childr
15
14
  open(): void;
16
15
  close(): void;
17
16
  };
18
- }): react_jsx_runtime.JSX.Element;
17
+ }): react.JSX.Element;
19
18
 
20
19
  export { ItemEscapeContext, ItemFrame };
package/dist/item.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
2
  import { Item } from '@zappie/sdk';
3
3
 
4
4
  type ItemDetailProps = {
@@ -14,7 +14,7 @@ type ItemDetailProps = {
14
14
  };
15
15
  };
16
16
  /** Framework-independent SDK item screen, reusable through themeClass. */
17
- declare function ItemDetail(props: ItemDetailProps): react_jsx_runtime.JSX.Element;
18
- declare function ItemContent({ item, menuId, scope, href, navigation, }: ItemDetailProps): react_jsx_runtime.JSX.Element;
17
+ declare function ItemDetail(props: ItemDetailProps): react.JSX.Element;
18
+ declare function ItemContent({ item, menuId, scope, href, navigation, }: ItemDetailProps): react.JSX.Element;
19
19
 
20
20
  export { ItemContent, ItemDetail, type ItemDetailProps };
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
2
3
  import { Item } from '@zappie/sdk';
3
4
  import { StorefrontUrlOptions } from '@zappie/sdk/url';
4
- import { ReactNode } from 'react';
5
5
 
6
6
  declare function createUrlNavigation(options?: UrlNavigationOptions): CatalogueNavigation;
7
7
 
@@ -58,7 +58,7 @@ type UrlNavigationOptions = StorefrontUrlOptions & {
58
58
  declare function CatalogueNavigationProvider({ navigation, children, }: {
59
59
  navigation: CatalogueNavigation;
60
60
  children: ReactNode;
61
- }): react_jsx_runtime.JSX.Element;
61
+ }): react.JSX.Element;
62
62
  declare function useCatalogueNavigation(): CatalogueNavigation;
63
63
 
64
64
  export { type CatalogueFocusTarget, type CatalogueLocation, type CatalogueNavigation, CatalogueNavigationProvider, type CatalogueNavigationTarget, type UrlNavigationOptions, createUrlNavigation, useCatalogueNavigation };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zappie/theme-base",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "The base storefront theme Zappie's own storefront app renders, built only from Zappie's public packages.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -54,8 +54,8 @@
54
54
  "CHANGELOG.md"
55
55
  ],
56
56
  "dependencies": {
57
- "@zappie/foundations": "^0.1.2",
58
- "@zappie/sdk": "^0.1.2",
57
+ "@zappie/foundations": "^0.1.6",
58
+ "@zappie/sdk": "^0.1.12",
59
59
  "@zappie/tokens": "^0.1.1"
60
60
  },
61
61
  "peerDependencies": {