@tanqory/theme-kit 0.1.0 → 2.0.0-alpha.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +128 -10
  3. package/dist/abi/canvas-live.d.ts +72 -0
  4. package/dist/abi/canvas-live.js +159 -0
  5. package/dist/abi/cart.d.ts +60 -0
  6. package/dist/abi/cart.js +396 -0
  7. package/dist/abi/convert.d.ts +360 -0
  8. package/dist/abi/convert.js +1330 -0
  9. package/dist/abi/data-api.d.ts +15 -0
  10. package/dist/abi/data-api.js +213 -0
  11. package/dist/abi/jcs.d.ts +6 -0
  12. package/dist/abi/jcs.js +28 -0
  13. package/dist/abi/labels.d.ts +3 -0
  14. package/dist/abi/labels.js +34 -0
  15. package/dist/abi/page-data.d.ts +264 -0
  16. package/dist/abi/page-data.js +746 -0
  17. package/dist/abi/page.d.ts +28 -0
  18. package/dist/abi/page.js +57 -0
  19. package/dist/abi/referrals.d.ts +23 -0
  20. package/dist/abi/referrals.js +89 -0
  21. package/dist/abi/rewards.d.ts +27 -0
  22. package/dist/abi/rewards.js +82 -0
  23. package/dist/abi/seo.d.ts +47 -0
  24. package/dist/abi/seo.js +68 -0
  25. package/dist/abi/shell.d.ts +23 -0
  26. package/dist/abi/shell.js +10 -0
  27. package/dist/abi/state-pack.d.ts +17 -0
  28. package/dist/abi/state-pack.js +43 -0
  29. package/dist/abi/wire.d.ts +46 -0
  30. package/dist/abi/wire.js +114 -0
  31. package/dist/build.d.ts +121 -0
  32. package/dist/build.js +401 -0
  33. package/dist/chunks.d.ts +23 -0
  34. package/dist/chunks.js +41 -0
  35. package/dist/client.d.ts +26 -0
  36. package/dist/client.js +101 -0
  37. package/dist/contract.d.ts +6 -0
  38. package/dist/contract.js +6 -0
  39. package/dist/headless/ai.d.ts +132 -0
  40. package/dist/headless/ai.js +99 -0
  41. package/dist/headless/hooks.d.ts +276 -0
  42. package/dist/headless/hooks.js +544 -0
  43. package/dist/headless/i18n.d.ts +13 -0
  44. package/dist/headless/i18n.js +45 -0
  45. package/dist/headless/index.d.ts +44 -0
  46. package/dist/headless/index.js +48 -0
  47. package/dist/headless/lazy-component.d.ts +72 -0
  48. package/dist/headless/lazy-component.js +225 -0
  49. package/dist/headless/lazy-section.d.ts +38 -0
  50. package/dist/headless/lazy-section.js +97 -0
  51. package/dist/headless/model.d.ts +73 -0
  52. package/dist/headless/model.js +115 -0
  53. package/dist/headless/money.d.ts +17 -0
  54. package/dist/headless/money.js +63 -0
  55. package/dist/headless/page.d.ts +45 -0
  56. package/dist/headless/page.js +53 -0
  57. package/dist/headless/platform.d.ts +55 -0
  58. package/dist/headless/platform.js +77 -0
  59. package/dist/headless/primitives/cart.d.ts +90 -0
  60. package/dist/headless/primitives/cart.js +153 -0
  61. package/dist/headless/primitives/collection.d.ts +68 -0
  62. package/dist/headless/primitives/collection.js +80 -0
  63. package/dist/headless/primitives/product.d.ts +101 -0
  64. package/dist/headless/primitives/product.js +117 -0
  65. package/dist/headless/primitives/storefront.d.ts +106 -0
  66. package/dist/headless/primitives/storefront.js +187 -0
  67. package/dist/headless/primitives/util.d.ts +19 -0
  68. package/dist/headless/primitives/util.js +42 -0
  69. package/dist/headless/strings.d.ts +9 -0
  70. package/dist/headless/strings.js +198 -0
  71. package/dist/headless/structured-data.d.ts +31 -0
  72. package/dist/headless/structured-data.js +57 -0
  73. package/dist/headless/tanqory-money.generated.d.ts +493 -0
  74. package/dist/headless/tanqory-money.generated.js +507 -0
  75. package/dist/headless/theme.d.ts +109 -0
  76. package/dist/headless/theme.js +62 -0
  77. package/dist/index.d.ts +21 -0
  78. package/dist/index.js +21 -553
  79. package/dist/runtime/data/StoreProvider.d.ts +84 -0
  80. package/dist/runtime/data/StoreProvider.js +380 -0
  81. package/dist/runtime/data/handle.d.ts +14 -0
  82. package/dist/runtime/data/handle.js +16 -0
  83. package/dist/runtime/data/routes.d.ts +87 -0
  84. package/dist/runtime/data/routes.js +158 -0
  85. package/dist/runtime/data/to-ui.d.ts +286 -0
  86. package/dist/runtime/data/to-ui.js +1009 -0
  87. package/dist/runtime/entries/register.d.ts +9 -0
  88. package/dist/runtime/entries/register.js +9 -0
  89. package/dist/runtime/entries/sections.d.ts +16 -0
  90. package/dist/runtime/entries/sections.js +19 -0
  91. package/dist/{types → runtime/kit}/SectionTree.d.ts +2 -1
  92. package/dist/runtime/kit/SectionTree.js +100 -0
  93. package/dist/runtime/kit/analytics.d.ts +63 -0
  94. package/dist/runtime/kit/analytics.js +250 -0
  95. package/dist/runtime/kit/cart.d.ts +222 -0
  96. package/dist/runtime/kit/cart.js +545 -0
  97. package/dist/{types → runtime/kit}/composition.d.ts +1 -1
  98. package/dist/runtime/kit/composition.js +3 -0
  99. package/dist/{types → runtime/kit}/config.d.ts +2 -2
  100. package/dist/runtime/kit/config.js +6 -0
  101. package/dist/runtime/kit/consent.d.ts +29 -0
  102. package/dist/runtime/kit/consent.js +159 -0
  103. package/dist/runtime/kit/contract/content.d.ts +213 -0
  104. package/dist/runtime/kit/contract/content.js +119 -0
  105. package/dist/runtime/kit/contract/field-types.d.ts +360 -0
  106. package/dist/runtime/kit/contract/field-types.js +216 -0
  107. package/dist/runtime/kit/contract/groups.d.ts +230 -0
  108. package/dist/runtime/kit/contract/groups.js +402 -0
  109. package/dist/runtime/kit/contract/index.d.ts +33 -0
  110. package/dist/runtime/kit/contract/index.js +33 -0
  111. package/dist/runtime/kit/contract/transform.d.ts +82 -0
  112. package/dist/runtime/kit/contract/transform.js +133 -0
  113. package/dist/runtime/kit/contract/validate.d.ts +77 -0
  114. package/dist/runtime/kit/contract/validate.js +520 -0
  115. package/dist/runtime/kit/data.d.ts +732 -0
  116. package/dist/runtime/kit/data.js +1131 -0
  117. package/dist/{types → runtime/kit}/defineSection.d.ts +1 -1
  118. package/dist/runtime/kit/defineSection.js +10 -0
  119. package/dist/runtime/kit/dynamic-source.d.ts +118 -0
  120. package/dist/runtime/kit/dynamic-source.js +311 -0
  121. package/dist/runtime/kit/index.d.ts +24 -0
  122. package/dist/runtime/kit/index.js +24 -0
  123. package/dist/{types → runtime/kit}/jsx-to-json.d.ts +1 -1
  124. package/dist/runtime/kit/jsx-to-json.js +28 -0
  125. package/dist/{types → runtime/kit}/mount.d.ts +25 -4
  126. package/dist/runtime/kit/mount.js +124 -0
  127. package/dist/{types → runtime/kit}/registry.d.ts +1 -1
  128. package/dist/runtime/kit/registry.js +12 -0
  129. package/dist/{types → runtime/kit}/ssg.d.ts +9 -3
  130. package/dist/runtime/kit/ssg.js +56 -0
  131. package/dist/runtime/kit/storefront.d.ts +652 -0
  132. package/dist/runtime/kit/storefront.js +723 -0
  133. package/dist/{types → runtime/kit}/theme-context.d.ts +8 -2
  134. package/dist/runtime/kit/theme-context.js +25 -0
  135. package/dist/runtime/kit/types.d.ts +155 -0
  136. package/dist/runtime/kit/types.js +1 -0
  137. package/dist/runtime/platform/TrackingPixels.d.ts +14 -0
  138. package/dist/runtime/platform/TrackingPixels.js +63 -0
  139. package/dist/runtime/platform/environment.d.ts +68 -0
  140. package/dist/runtime/platform/environment.js +85 -0
  141. package/dist/runtime/platform/locale.d.ts +27 -0
  142. package/dist/runtime/platform/locale.js +42 -0
  143. package/dist/runtime/platform/route-analytics.d.ts +15 -0
  144. package/dist/runtime/platform/route-analytics.js +72 -0
  145. package/dist/runtime/platform/safe-href.d.ts +25 -0
  146. package/dist/runtime/platform/safe-href.js +69 -0
  147. package/dist/runtime/platform/safe-values.d.ts +37 -0
  148. package/dist/runtime/platform/safe-values.js +140 -0
  149. package/dist/runtime/render/SectionRenderer.d.ts +4 -0
  150. package/dist/runtime/render/SectionRenderer.js +199 -0
  151. package/dist/runtime/render/listing-query.d.ts +52 -0
  152. package/dist/runtime/render/listing-query.js +122 -0
  153. package/dist/runtime/render/localized-copy.d.ts +86 -0
  154. package/dist/runtime/render/localized-copy.js +129 -0
  155. package/dist/runtime/render/product-listing.d.ts +11 -0
  156. package/dist/runtime/render/product-listing.js +243 -0
  157. package/dist/runtime/render/resolved.d.ts +47 -0
  158. package/dist/runtime/render/resolved.js +80 -0
  159. package/dist/runtime/render/section-actions.d.ts +67 -0
  160. package/dist/runtime/render/section-actions.js +205 -0
  161. package/dist/runtime/render/starter.d.ts +11 -0
  162. package/dist/runtime/render/starter.js +96 -0
  163. package/dist/runtime/seo/head.d.ts +115 -0
  164. package/dist/runtime/seo/head.js +281 -0
  165. package/dist/runtime/seo/structured-data.d.ts +83 -0
  166. package/dist/runtime/seo/structured-data.js +252 -0
  167. package/dist/runtime/shell/PageShell.d.ts +18 -0
  168. package/dist/runtime/shell/PageShell.js +118 -0
  169. package/dist/runtime/shell/RuntimeBridge.d.ts +18 -0
  170. package/dist/runtime/shell/RuntimeBridge.js +124 -0
  171. package/dist/runtime/shell/overlay-state.d.ts +31 -0
  172. package/dist/runtime/shell/overlay-state.js +59 -0
  173. package/dist/runtime/shell/preview-mode.d.ts +2 -0
  174. package/dist/runtime/shell/preview-mode.js +11 -0
  175. package/dist/runtime/shell/spa-router.d.ts +14 -0
  176. package/dist/runtime/shell/spa-router.js +76 -0
  177. package/dist/runtime/shell/url-redirects.d.ts +6 -0
  178. package/dist/runtime/shell/url-redirects.js +37 -0
  179. package/dist/runtime/slots.d.ts +74 -0
  180. package/dist/runtime/slots.js +16 -0
  181. package/dist/runtime.d.ts +34 -0
  182. package/dist/runtime.js +40 -0
  183. package/dist/sdk/app-block.d.ts +29 -0
  184. package/dist/sdk/app-block.js +22 -0
  185. package/dist/sdk/font-hooks.d.ts +7 -0
  186. package/dist/sdk/font-hooks.js +21 -0
  187. package/dist/sdk/fonts.d.ts +144 -0
  188. package/dist/sdk/fonts.js +241 -0
  189. package/dist/sdk/index.d.ts +32 -0
  190. package/dist/sdk/index.js +36 -0
  191. package/dist/sdk/motion-hooks.d.ts +23 -0
  192. package/dist/sdk/motion-hooks.js +46 -0
  193. package/dist/sdk/motion.d.ts +78 -0
  194. package/dist/sdk/motion.js +292 -0
  195. package/dist/sdk/referrals.d.ts +62 -0
  196. package/dist/sdk/referrals.js +20 -0
  197. package/dist/sdk/rewards.d.ts +85 -0
  198. package/dist/sdk/rewards.js +29 -0
  199. package/dist/sdk/runtime-context.d.ts +230 -0
  200. package/dist/sdk/runtime-context.js +73 -0
  201. package/dist/sdk/schema.d.ts +249 -0
  202. package/dist/sdk/schema.js +168 -0
  203. package/dist/sdk/server-render.d.ts +8 -0
  204. package/dist/sdk/server-render.js +12 -0
  205. package/dist/sdk/store-lookup.d.ts +32 -0
  206. package/dist/sdk/store-lookup.js +48 -0
  207. package/dist/sdk/store.d.ts +164 -0
  208. package/dist/sdk/store.js +5 -0
  209. package/dist/sdk/sx.d.ts +45 -0
  210. package/dist/sdk/sx.js +117 -0
  211. package/dist/sdk/theme.d.ts +212 -0
  212. package/dist/sdk/theme.js +27 -0
  213. package/dist/sdk/types.d.ts +789 -0
  214. package/dist/sdk/types.js +7 -0
  215. package/dist/server.d.ts +112 -0
  216. package/dist/server.js +589 -0
  217. package/dist/vite-chunks.d.ts +10 -0
  218. package/dist/vite-chunks.js +44 -0
  219. package/docs/headless-api.md +250 -0
  220. package/package.json +72 -26
  221. package/dist/index.js.map +0 -1
  222. package/dist/ssg-BZ5FYTw7.js +0 -1802
  223. package/dist/ssg-BZ5FYTw7.js.map +0 -1
  224. package/dist/ssg.js +0 -8
  225. package/dist/ssg.js.map +0 -1
  226. package/dist/types/cart.d.ts +0 -86
  227. package/dist/types/data.d.ts +0 -357
  228. package/dist/types/dynamic-source.d.ts +0 -84
  229. package/dist/types/editor.d.ts +0 -5
  230. package/dist/types/index.d.ts +0 -20
  231. package/dist/types/preview-bridge.d.ts +0 -9
  232. package/dist/types/storefront.d.ts +0 -333
  233. package/dist/types/types.d.ts +0 -44
@@ -0,0 +1,118 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * The storefront shell: everything a page needs around the theme's sections.
4
+ *
5
+ * theme.Provider the theme's tokens, theme settings, strings (the theme's own component)
6
+ * StoreProvider route context + store data the sections' bindings read
7
+ * RuntimeBridge what the SDK hooks return (cart, overlays, actions, consent)
8
+ * theme.Layout the theme's page layout — sections and page-level overlays
9
+ *
10
+ * The section tree arrives as `children` (mount and the editor's preview bridge
11
+ * both render `<Shell><SectionTree/></Shell>`). With SPA navigation on, a soft
12
+ * navigation away from the landing URL renders the new template's tree instead.
13
+ */
14
+ import { useEffect, useMemo, useRef, useState } from 'react';
15
+ // The defining modules, never the runtime/kit barrel: it re-exports ssg.tsx and so react-dom/server, which esbuild keeps
16
+ // in a client bundle (build-service then refuses the build). test/headless/no-runtime-barrel.test.ts walks the client graph.
17
+ import { SectionTree } from '../kit/SectionTree.js';
18
+ import { groupsFromGlob, resolvePageSections } from '../kit/mount.js';
19
+ import { useData } from '../kit/data.js';
20
+ import { useSettings } from '../kit/theme-context.js';
21
+ import { applyHead, computeHead } from '../seo/head.js';
22
+ import { emitRoute } from '../platform/route-analytics.js';
23
+ import { matchRoute, resolveAsyncVariant, resolvePageTemplate } from '../data/routes.js';
24
+ import { isEditorPreview } from '../platform/environment.js';
25
+ import { themeLocaleOf } from '../platform/locale.js';
26
+ import { OverlayProvider } from './overlay-state.js';
27
+ import { StoreProvider } from '../data/StoreProvider.js';
28
+ import { TrackingPixels } from '../platform/TrackingPixels.js';
29
+ import { useSoftRoute } from './spa-router.js';
30
+ import { useUrlRedirect } from './url-redirects.js';
31
+ import { RuntimeBridge } from './RuntimeBridge.js';
32
+ import { getEditorRuntime, getThemeBundle } from '../slots.js';
33
+ const same = (s) => s;
34
+ const noop = () => { };
35
+ /** The locales the theme ships strings for (locales/<code>.json). */
36
+ export function themeLocales() {
37
+ return Object.keys(getThemeBundle().locales).map((k) => k.match(/\/([^/]+)\.json$/)?.[1] ?? 'en');
38
+ }
39
+ export default function PageShell({ children }) {
40
+ const bundle = getThemeBundle();
41
+ const { theme } = bundle;
42
+ const editor = getEditorRuntime();
43
+ const preview = isEditorPreview();
44
+ const saved = useSettings();
45
+ // The editor runtime is fixed for the page's lifetime, so the hook called here never changes.
46
+ const useLiveSettings = editor?.useLiveSettings ?? same;
47
+ const usePreviewSelection = editor?.usePreviewSelection ?? noop;
48
+ const settings = useLiveSettings(saved, preview);
49
+ usePreviewSelection(preview);
50
+ const data = useData();
51
+ const locale = themeLocaleOf(settings.locale, themeLocales());
52
+ const { templates, groups } = useMemo(() => ({ templates: bundle.templates, groups: groupsFromGlob(bundle.groups) }), [bundle]);
53
+ const templateExists = (name) => Object.keys(templates).some((k) => k.endsWith(`/${name}.json`));
54
+ const lookupTemplate = (name) => {
55
+ for (const [key, mod] of Object.entries(templates))
56
+ if (key.endsWith(`/${name}.json`))
57
+ return resolvePageSections(mod.default, groups);
58
+ return null;
59
+ };
60
+ // Soft navigation is off in the editor: the preview bridge owns the tree
61
+ // there, and a click should select a section, not navigate away.
62
+ const enableSpa = !preview && settings.enableSpaNavigation !== false;
63
+ const location = useSoftRoute(enableSpa);
64
+ const pathname = location.split('?')[0] || '/';
65
+ // The landing route's template was resolved by the entry (including the
66
+ // merchant's templateSuffix); only a navigation AWAY from it is the shell's.
67
+ const entryPath = useRef(pathname);
68
+ const navigatedAway = enableSpa && pathname !== entryPath.current;
69
+ // A page, blog or article's template variant needs its record (not in the sync
70
+ // bootstrap): until it answers, the new page renders empty rather than as
71
+ // the base template it would then have to swap out.
72
+ const route = matchRoute(pathname);
73
+ const needsRecord = navigatedAway && (route.resource === 'blog' || route.resource === 'article' || route.resource === 'page');
74
+ const [asyncVariant, setAsyncVariant] = useState(null);
75
+ useEffect(() => {
76
+ if (!needsRecord)
77
+ return;
78
+ let live = true;
79
+ void resolveAsyncVariant(route, route.template, data, templateExists).then((template) => {
80
+ if (live)
81
+ setAsyncVariant({ path: pathname, template });
82
+ });
83
+ return () => {
84
+ live = false;
85
+ };
86
+ // eslint-disable-next-line react-hooks/exhaustive-deps
87
+ }, [needsRecord, pathname, data]);
88
+ const softTree = useMemo(() => {
89
+ if (!navigatedAway)
90
+ return null;
91
+ const template = needsRecord ? (asyncVariant?.path === pathname ? asyncVariant.template : null) : resolvePageTemplate(pathname, data, templateExists);
92
+ if (!template)
93
+ return [];
94
+ return lookupTemplate(template) ?? lookupTemplate('404') ?? [];
95
+ // eslint-disable-next-line react-hooks/exhaustive-deps
96
+ }, [navigatedAway, needsRecord, asyncVariant, pathname, data, templates, groups]);
97
+ useUrlRedirect(pathname);
98
+ // While the next page's template is still being resolved, keep the current
99
+ // page on screen — the header, footer and content stay put and are swapped in
100
+ // one step when the next tree is ready, instead of flashing an empty page.
101
+ const pending = navigatedAway && needsRecord && asyncVariant?.path !== pathname;
102
+ const shown = useRef({ location, tree: softTree });
103
+ if (!pending)
104
+ shown.current = { location, tree: softTree };
105
+ const view = shown.current;
106
+ const viewPath = view.location.split('?')[0] || '/';
107
+ const viewSearch = view.location.includes('?') ? `?${view.location.split('?')[1] ?? ''}` : '';
108
+ // The head and the page-view follow what is on screen, so a page's title is
109
+ // applied once its record has loaded, not before.
110
+ useEffect(() => {
111
+ if (!enableSpa || typeof window === 'undefined')
112
+ return;
113
+ applyHead(computeHead(viewPath, data, settings));
114
+ emitRoute({ pathname: viewPath, search: viewSearch }, data);
115
+ }, [enableSpa, viewPath, viewSearch, data, settings]);
116
+ const { Provider, Layout } = theme;
117
+ return (_jsx(Provider, { mode: preview ? 'editor' : 'storefront', locale: locale, settings: settings, children: _jsx(StoreProvider, { location: view.location, locale: locale, settings: settings, children: _jsxs(OverlayProvider, { children: [_jsx(RuntimeBridge, { mode: preview ? 'editor' : 'storefront', locale: locale, settings: settings, children: _jsx(Layout, { children: _jsx("div", { style: { display: 'contents' }, children: view.tree ? _jsx(SectionTree, { tree: view.tree }) : children }, view.tree ? viewPath : 'entry') }) }), _jsx(TrackingPixels, {})] }) }) }));
118
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * What `useThemeContext()` and `useThemeActions()` (theme SDK) return on a
3
+ * page: the platform's cart, overlay, consent and navigation, behind a stable
4
+ * API. One instance per page, so every section and overlay shares the same
5
+ * cart-line status.
6
+ */
7
+ import { type ReactNode } from 'react';
8
+ import { type ThemeMode } from '../../sdk/index.js';
9
+ /** The link that opens the shopper's privacy choices (the platform's opt-out page body links it). */
10
+ export declare const PRIVACY_CHOICES_LINK = "a[href=\"#privacy-choices\"]";
11
+ /** The platform's data sharing opt-out page (store-api storefront-projection OPT_OUT_HANDLE). */
12
+ export declare const PRIVACY_CHOICES_PAGE = "/pages/data-sharing-opt-out";
13
+ export declare function RuntimeBridge({ mode, locale, settings, children }: {
14
+ mode: ThemeMode;
15
+ locale: string;
16
+ settings: Record<string, unknown>;
17
+ children: ReactNode;
18
+ }): JSX.Element;
@@ -0,0 +1,124 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * What `useThemeContext()` and `useThemeActions()` (theme SDK) return on a
4
+ * page: the platform's cart, overlay, consent and navigation, behind a stable
5
+ * API. One instance per page, so every section and overlay shares the same
6
+ * cart-line status.
7
+ */
8
+ import { useEffect, useMemo, useState } from 'react';
9
+ import { ThemeRuntimeContext } from '../../sdk/index.js';
10
+ import { useData } from '../kit/data.js';
11
+ import { useCart } from '../kit/cart.js';
12
+ import { setConsent } from '../kit/consent.js';
13
+ import { useCartActions, navigate, searchHref, changeCountry, changeLocale } from '../render/section-actions.js';
14
+ import { useOverlays } from './overlay-state.js';
15
+ import { useStore } from '../data/StoreProvider.js';
16
+ import * as map from '../data/to-ui.js';
17
+ /** The link that opens the shopper's privacy choices (the platform's opt-out page body links it). */
18
+ export const PRIVACY_CHOICES_LINK = 'a[href="#privacy-choices"]';
19
+ /** The platform's data sharing opt-out page (store-api storefront-projection OPT_OUT_HANDLE). */
20
+ export const PRIVACY_CHOICES_PAGE = '/pages/data-sharing-opt-out';
21
+ export function RuntimeBridge({ mode, locale, settings, children }) {
22
+ const cart = useCart();
23
+ const data = useData();
24
+ const store = useStore();
25
+ const overlays = useOverlays();
26
+ const cartActions = useCartActions();
27
+ // The shopper asked to change their cookie choice (footer link, a `#privacy-choices` link): show their choices again,
28
+ // as the preferences dialog itself (board 35 #42, 2026-11-24: it showed the banner, one more click away).
29
+ const [consentReopened, setConsentReopened] = useState(false);
30
+ // The choice made on this page (the preferences dialog starts from it when reopened).
31
+ const [lastChoice, setLastChoice] = useState(null);
32
+ // Board 35 #42: a link to `#privacy-choices` (the platform's data sharing opt-out page) opens the shopper's privacy
33
+ // choices on any page, wherever the shopper is.
34
+ useEffect(() => {
35
+ const onClick = (e) => {
36
+ const target = e.target;
37
+ if (!target || typeof target.closest !== 'function' || !target.closest(PRIVACY_CHOICES_LINK))
38
+ return;
39
+ e.preventDefault();
40
+ setConsentReopened(true);
41
+ };
42
+ document.addEventListener('click', onClick);
43
+ return () => document.removeEventListener('click', onClick);
44
+ }, []);
45
+ const actions = useMemo(() => ({
46
+ cart: {
47
+ add: cartActions.addToCart,
48
+ // Cart-2: what stock let the last add put in the cart, when the platform cut it
49
+ lastAddStock: cartActions.lastAddStock,
50
+ // NEW-PROD-12: `add` carries `options.attributes` to the line (a theme checks this before a recipient form)
51
+ lineAttributes: true,
52
+ setQuantity: cartActions.setQuantity,
53
+ remove: cartActions.removeLine,
54
+ setNote: cartActions.setNote,
55
+ ...(cartActions.applyDiscountCode && cartActions.removeDiscountCode
56
+ ? { applyDiscountCode: cartActions.applyDiscountCode, removeDiscountCode: cartActions.removeDiscountCode }
57
+ : {}),
58
+ ...(cartActions.lastDiscountRefusal ? { lastDiscountRefusal: cartActions.lastDiscountRefusal } : {}),
59
+ ...(cartActions.lastDiscountReplaced ? { lastDiscountReplaced: cartActions.lastDiscountReplaced } : {}),
60
+ open: () => (settings.enableCartDrawer === false ? navigate('/cart') : overlays.show('cart')),
61
+ },
62
+ search: {
63
+ open: () => (settings.enableSearchModal === false ? navigate('/search') : overlays.show('search')),
64
+ go: (q) => navigate(searchHref(q)),
65
+ // The storefront search query (the predictive endpoint asks for fields
66
+ // the storefront does not serve and fails as a whole).
67
+ suggest: async (q) => {
68
+ if (!data.search)
69
+ return { products: [], collections: [], articles: [], total: 0 };
70
+ const r = await data.search(q, { first: 6, types: ['PRODUCT', 'PAGE', 'ARTICLE'] });
71
+ // Search results carry no blog handle, so an article cannot be linked.
72
+ return { products: map.toProducts(r.products), collections: [], articles: [], total: r.totalCount ?? r.products.length };
73
+ },
74
+ },
75
+ localization: { changeCountry, changeLocale },
76
+ consent: {
77
+ decide: (c) => {
78
+ setConsent({ analytics: c.analytics, marketing: c.marketing });
79
+ // Theme ABI v2: the platform records the choice (POST /_tq/actions/consent.set). `functional` is the
80
+ // preferences purpose as the shopper set it: off when they rejected non-essential (board 35 #42, 2026-11-24:
81
+ // it was always saved on).
82
+ const preferences = c.preferences === true;
83
+ void data.consent?.set({ analytics: c.analytics, marketing: c.marketing, functional: preferences }).catch(() => { });
84
+ setLastChoice({ analytics: c.analytics, marketing: c.marketing, preferences });
85
+ setConsentReopened(false);
86
+ },
87
+ open: () => setConsentReopened(true),
88
+ close: () => setConsentReopened(false),
89
+ },
90
+ overlays: { close: overlays.close },
91
+ toasts: { show: (m, tone = 'info') => overlays.toast(m, tone === 'error' ? 'error' : 'default'), dismiss: overlays.dismiss },
92
+ navigate,
93
+ }), [cartActions, data, overlays, settings.enableCartDrawer, settings.enableSearchModal]);
94
+ // The banner's privacy link: the merchant's own link (Settings › Customer privacy), else the privacy
95
+ // policy while it is published — loaded on this page, or listed in `Shop.policyLinks`.
96
+ const shop = store?.ctx.shop;
97
+ const privacyUrl = shop?.consentBanner?.privacyLinkUrl ?? store?.ctx.policies?.['privacy-policy']?.url ?? shop?.policyLinks?.find((p) => p.handle === 'privacy-policy')?.url ?? null;
98
+ const context = useMemo(() => ({
99
+ mode,
100
+ locale,
101
+ settings,
102
+ cart: map.toCart(cart),
103
+ cartStatus: cart.ready ? 'ready' : cart.loadError && !cart.loadRetrying ? 'failed' : 'loading',
104
+ checkoutUrl: cart.checkoutUrl ?? '/checkout',
105
+ overlay: overlays.open,
106
+ justAddedToCart: overlays.justAdded,
107
+ busyLines: [...cartActions.busyLines],
108
+ failedLines: [...cartActions.failedLines],
109
+ refusedLines: Object.fromEntries(cartActions.refusedLines),
110
+ toasts: overlays.toasts.map((t) => ({ id: t.id, message: t.message, tone: t.tone === 'error' ? 'error' : 'info' })),
111
+ // Reopened by the shopper: shown wherever they are (a choice can be changed outside a region that requires the banner).
112
+ consentRequired: Boolean((store?.ctx.consentEnabled && store.ctx.consentAnswered === false) || consentReopened),
113
+ ...(consentReopened ? { consentManage: true } : {}),
114
+ ...((lastChoice ?? store?.ctx.consentChoice) ? { consentChoice: (lastChoice ?? store?.ctx.consentChoice) } : {}),
115
+ // The platform's data sharing opt-out page, where a sale-of-data opt-out applies to the shopper (board 35 #42).
116
+ ...(store?.ctx.consentOptOut ? { privacyChoicesUrl: PRIVACY_CHOICES_PAGE } : {}),
117
+ privacyPolicyUrl: privacyUrl,
118
+ ...(shop ? { shop } : {}),
119
+ ...(store?.ctx.newsletterEndpoint ? { formEndpoint: store.ctx.newsletterEndpoint } : {}),
120
+ ...(store?.ctx.formResult ? { formResult: store.ctx.formResult } : {}),
121
+ }), [mode, locale, settings, cart, overlays.open, overlays.justAdded, overlays.toasts, cartActions.busyLines, cartActions.failedLines, cartActions.refusedLines, store?.ctx.consentEnabled, store?.ctx.consentAnswered, store?.ctx.consentChoice, store?.ctx.consentOptOut, consentReopened, lastChoice, privacyUrl, shop, store?.ctx.newsletterEndpoint, store?.ctx.formResult]);
122
+ const value = useMemo(() => ({ context, actions }), [context, actions]);
123
+ return _jsx(ThemeRuntimeContext.Provider, { value: value, children: children });
124
+ }
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Page-level overlay state: which surface is open (cart drawer, search modal,
3
+ * account menu) and the toast queue. Sections never own an overlay the page
4
+ * shares — the header asks for the cart, the product form asks for the cart
5
+ * after an add, and both reach the same drawer through this context.
6
+ */
7
+ import { type ReactNode, type RefObject } from 'react';
8
+ export type OverlayName = 'cart' | 'search' | 'account';
9
+ export interface Toast {
10
+ id: string;
11
+ message: string;
12
+ tone?: 'default' | 'error';
13
+ }
14
+ export interface OverlayApi {
15
+ open: OverlayName | null;
16
+ /** The element that opened the account menu (it anchors to it). */
17
+ anchor: RefObject<HTMLElement>;
18
+ show: (name: OverlayName, from?: HTMLElement | null) => void;
19
+ close: () => void;
20
+ /** The cart drawer was opened by an add, not by the shopper. */
21
+ justAdded: boolean;
22
+ toasts: readonly Toast[];
23
+ toast: (message: string, tone?: Toast['tone']) => void;
24
+ dismiss: (id: string) => void;
25
+ }
26
+ export declare function OverlayProvider({ children }: {
27
+ children: ReactNode;
28
+ }): JSX.Element;
29
+ /** Outside a provider (a section preview) every overlay request is a no-op. */
30
+ export declare function useOverlays(): OverlayApi;
31
+ export declare function useOpenCartAfterAdd(): () => void;
@@ -0,0 +1,59 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * Page-level overlay state: which surface is open (cart drawer, search modal,
4
+ * account menu) and the toast queue. Sections never own an overlay the page
5
+ * shares — the header asks for the cart, the product form asks for the cart
6
+ * after an add, and both reach the same drawer through this context.
7
+ */
8
+ import { createContext, useCallback, useContext, useMemo, useRef, useState } from 'react';
9
+ const OverlayContext = createContext(null);
10
+ let toastSeq = 0;
11
+ export function OverlayProvider({ children }) {
12
+ const [open, setOpen] = useState(null);
13
+ const [justAdded, setJustAdded] = useState(false);
14
+ const [toasts, setToasts] = useState([]);
15
+ const anchor = useRef(null);
16
+ const show = useCallback((name, from) => {
17
+ if (from !== undefined)
18
+ anchor.current = from;
19
+ setJustAdded(false);
20
+ setOpen(name);
21
+ }, []);
22
+ const close = useCallback(() => {
23
+ setOpen(null);
24
+ setJustAdded(false);
25
+ }, []);
26
+ const toast = useCallback((message, tone = 'default') => {
27
+ toastSeq += 1;
28
+ setToasts((ts) => [...ts, { id: `toast-${toastSeq}`, message, tone }]);
29
+ }, []);
30
+ const dismiss = useCallback((id) => setToasts((ts) => ts.filter((t) => t.id !== id)), []);
31
+ const value = useMemo(() => ({ open, anchor: anchor, show, close, justAdded, toasts, toast, dismiss }), [open, show, close, justAdded, toasts, toast, dismiss]);
32
+ return (_jsx(OverlayContext.Provider, { value: value, children: _jsx(JustAddedBridge, { set: setJustAdded, setOpen: setOpen, children: children }) }));
33
+ }
34
+ /** Lets `openCartAfterAdd` flip both flags in one place without widening the public API. */
35
+ const JustAddedContext = createContext(null);
36
+ function JustAddedBridge({ set, setOpen, children }) {
37
+ const openAfterAdd = useCallback(() => {
38
+ setOpen('cart');
39
+ set(true);
40
+ }, [set, setOpen]);
41
+ return _jsx(JustAddedContext.Provider, { value: openAfterAdd, children: children });
42
+ }
43
+ const NOOP = {
44
+ open: null,
45
+ anchor: { current: null },
46
+ show: () => { },
47
+ close: () => { },
48
+ justAdded: false,
49
+ toasts: [],
50
+ toast: () => { },
51
+ dismiss: () => { },
52
+ };
53
+ /** Outside a provider (a section preview) every overlay request is a no-op. */
54
+ export function useOverlays() {
55
+ return useContext(OverlayContext) ?? NOOP;
56
+ }
57
+ export function useOpenCartAfterAdd() {
58
+ return useContext(JustAddedContext) ?? (() => { });
59
+ }
@@ -0,0 +1,2 @@
1
+ export declare const PreviewModeProvider: import("react").Provider<boolean>;
2
+ export declare function usePreviewMode(): boolean;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Is this render a PREVIEW (the editor canvas or a preview channel)? Under Theme ABI v2 that is
3
+ * `ctx.mode === 'preview'`, decided by the platform and handed to the tree by the entries — never
4
+ * read from the URL, so the server render and the hydrating browser agree.
5
+ */
6
+ import { createContext, useContext } from 'react';
7
+ const PreviewModeContext = createContext(false);
8
+ export const PreviewModeProvider = PreviewModeContext.Provider;
9
+ export function usePreviewMode() {
10
+ return useContext(PreviewModeContext);
11
+ }
@@ -0,0 +1,14 @@
1
+ export declare function setServerLocation(location: string): void;
2
+ /**
3
+ * SPA router — intercepts internal `<a>` clicks, pushes the new URL and
4
+ * re-renders, so a navigation swaps templates without a page load.
5
+ *
6
+ * Returns pathname + SEARCH: tracking the pathname alone left `/search?q=shirt`
7
+ * on screen after navigating to `/search?q=hat`.
8
+ *
9
+ * Skips external origins, new-tab / download / modified clicks, links marked
10
+ * `data-full-page-nav="true"`, and `/checkout`, `/account`, `/orders` — those
11
+ * are served by separate apps the edge router forwards to, so they need a real
12
+ * HTTP navigation.
13
+ */
14
+ export declare function useSoftRoute(enabled: boolean): string;
@@ -0,0 +1,76 @@
1
+ import { useEffect, useState } from 'react';
2
+ /**
3
+ * The URL a server render is for. The SSR entry sets it before rendering (one
4
+ * synchronous render per request), so the server draws the same route the
5
+ * browser will hydrate — without it every page rendered as `/` on the server
6
+ * and hydration failed on every other URL.
7
+ */
8
+ let serverLocation = '/';
9
+ export function setServerLocation(location) {
10
+ serverLocation = location || '/';
11
+ }
12
+ /**
13
+ * SPA router — intercepts internal `<a>` clicks, pushes the new URL and
14
+ * re-renders, so a navigation swaps templates without a page load.
15
+ *
16
+ * Returns pathname + SEARCH: tracking the pathname alone left `/search?q=shirt`
17
+ * on screen after navigating to `/search?q=hat`.
18
+ *
19
+ * Skips external origins, new-tab / download / modified clicks, links marked
20
+ * `data-full-page-nav="true"`, and `/checkout`, `/account`, `/orders` — those
21
+ * are served by separate apps the edge router forwards to, so they need a real
22
+ * HTTP navigation.
23
+ */
24
+ export function useSoftRoute(enabled) {
25
+ const here = () => (typeof window !== 'undefined' ? window.location.pathname + window.location.search : serverLocation);
26
+ const [location, setLocation] = useState(here);
27
+ useEffect(() => {
28
+ if (!enabled || typeof window === 'undefined')
29
+ return;
30
+ const go = (next) => {
31
+ if (next !== window.location.pathname + window.location.search)
32
+ window.history.pushState({}, '', next);
33
+ setLocation(window.location.pathname + window.location.search);
34
+ if (!next.includes('#'))
35
+ window.scrollTo({ top: 0, behavior: 'auto' });
36
+ };
37
+ const onClick = (e) => {
38
+ if (e.defaultPrevented || e.button !== 0)
39
+ return;
40
+ if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey)
41
+ return;
42
+ const a = e.target?.closest?.('a[href]');
43
+ if (!a)
44
+ return;
45
+ if (a.target && a.target !== '_self')
46
+ return;
47
+ if (a.hasAttribute('download'))
48
+ return;
49
+ if (a.dataset.fullPageNav === 'true')
50
+ return;
51
+ let url;
52
+ try {
53
+ url = new URL(a.href, window.location.origin);
54
+ }
55
+ catch {
56
+ return;
57
+ }
58
+ if (url.origin !== window.location.origin)
59
+ return;
60
+ if (url.pathname === window.location.pathname && url.hash)
61
+ return;
62
+ if (/^\/(checkout|account|orders)(\/|$)/.test(url.pathname))
63
+ return;
64
+ e.preventDefault();
65
+ go(url.pathname + url.search + url.hash);
66
+ };
67
+ const onPop = () => setLocation(window.location.pathname + window.location.search);
68
+ document.addEventListener('click', onClick);
69
+ window.addEventListener('popstate', onPop);
70
+ return () => {
71
+ document.removeEventListener('click', onClick);
72
+ window.removeEventListener('popstate', onPop);
73
+ };
74
+ }, [enabled]);
75
+ return location;
76
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The merchant's URL redirects (Settings → Navigation → URL redirects): when the
3
+ * current path matches one, go to its target. Client-side, after render, so a
4
+ * store with no redirects pays one small query and nothing else.
5
+ */
6
+ export declare function useUrlRedirect(pathname?: string): void;
@@ -0,0 +1,37 @@
1
+ import { useEffect } from 'react';
2
+ import { useData } from '../kit/data.js';
3
+ /**
4
+ * The merchant's URL redirects (Settings → Navigation → URL redirects): when the
5
+ * current path matches one, go to its target. Client-side, after render, so a
6
+ * store with no redirects pays one small query and nothing else.
7
+ */
8
+ export function useUrlRedirect(pathname) {
9
+ const { graphql } = useData();
10
+ useEffect(() => {
11
+ if (typeof window === 'undefined' || !graphql)
12
+ return;
13
+ const currentPath = pathname ?? window.location.pathname;
14
+ let cancelled = false;
15
+ // Server-side filter keeps the response small — only exact-path matches
16
+ // matter. The cap of 5 tolerates `query` substring false positives without
17
+ // paying for a full list.
18
+ void graphql(`query R($q: String) {
19
+ urlRedirects(first: 5, query: $q) {
20
+ nodes { path target }
21
+ }
22
+ }`, { q: currentPath })
23
+ .then((res) => {
24
+ if (cancelled)
25
+ return;
26
+ const match = res?.urlRedirects?.nodes.find((n) => n.path === currentPath);
27
+ if (match)
28
+ window.location.replace(match.target);
29
+ })
30
+ .catch(() => {
31
+ /* a failed redirect lookup should never break the page */
32
+ });
33
+ return () => {
34
+ cancelled = true;
35
+ };
36
+ }, [pathname, graphql]);
37
+ }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * What the runtime is handed at boot, instead of importing it:
3
+ *
4
+ * the theme bundle — the theme's definition and content (from .tanqory/, generated by the compiler)
5
+ * the editor runtime — Studio canvas behaviour (@tanqory/theme-editor-runtime), only where it applies
6
+ *
7
+ * One page (or one server render) runs one theme, so a module-level slot is
8
+ * enough; the entry sets both before it renders anything.
9
+ */
10
+ import type { FC, ReactNode } from 'react';
11
+ import type { ThemeDefinition } from '../sdk/index.js';
12
+ import type { ContentNode } from './kit/types.js';
13
+ type GlobMap = Record<string, {
14
+ default: unknown;
15
+ }>;
16
+ export interface ThemeBundle {
17
+ theme: ThemeDefinition;
18
+ /** templates/*.json, groups/*.json, locales/*.json — keyed by their theme path. */
19
+ templates: GlobMap;
20
+ groups: GlobMap;
21
+ locales: GlobMap;
22
+ /** config/settings.json */
23
+ settings: Record<string, unknown>;
24
+ /** config/settings.schema.ts — the theme settings the editor offers. */
25
+ settingsSchema: Record<string, {
26
+ type: string;
27
+ options?: readonly {
28
+ value: string;
29
+ }[];
30
+ min?: number;
31
+ max?: number;
32
+ }>;
33
+ /** Custom sections (sections/*.tsx, `defineSection` from the old API) — registered after the theme's own. */
34
+ customSections: Record<string, {
35
+ default?: unknown;
36
+ }>;
37
+ /** The generated manifest the platform reads (served by the server entry). */
38
+ manifest: unknown;
39
+ }
40
+ export interface EditorRuntime {
41
+ /** This page is the editor canvas (preview plane): the bridge renders the tree. */
42
+ isPreviewPlane(location: {
43
+ hostname: string;
44
+ search: string;
45
+ }): boolean;
46
+ PreviewBridge: FC<{
47
+ pages: Record<string, ContentNode[]>;
48
+ initialPage: string;
49
+ Shell: FC<{
50
+ children: ReactNode;
51
+ }>;
52
+ allowedOrigins?: readonly string[];
53
+ }>;
54
+ Editor?: FC<{
55
+ pages: Record<string, ContentNode[]>;
56
+ initialPage: string;
57
+ }>;
58
+ /** Saved theme settings, plus the editor's unsaved live values on the canvas. */
59
+ useLiveSettings(saved: Record<string, unknown>, onCanvas: boolean): Record<string, unknown>;
60
+ /** The canvas's selection outline. */
61
+ usePreviewSelection(enabled: boolean): void;
62
+ /** The "Add section" preview endpoint (preview plane only); null = not that request. */
63
+ /** `page.data` is the store's live data when a store is attached; absent only offline (no store). */
64
+ sectionPreview?(request: Request, bundle: ThemeBundle, page: {
65
+ styles: string;
66
+ settings: Record<string, unknown>;
67
+ data?: import('./kit/data.js').DataApi;
68
+ }): Response | null;
69
+ }
70
+ export declare function setThemeBundle(b: ThemeBundle): void;
71
+ export declare function getThemeBundle(): ThemeBundle;
72
+ export declare function setEditorRuntime(e: EditorRuntime | null): void;
73
+ export declare function getEditorRuntime(): EditorRuntime | null;
74
+ export {};
@@ -0,0 +1,16 @@
1
+ let bundle = null;
2
+ let editor = null;
3
+ export function setThemeBundle(b) {
4
+ bundle = b;
5
+ }
6
+ export function getThemeBundle() {
7
+ if (!bundle)
8
+ throw new Error('[tanqory] no theme bundle: the entry must call setThemeBundle() before rendering');
9
+ return bundle;
10
+ }
11
+ export function setEditorRuntime(e) {
12
+ editor = e;
13
+ }
14
+ export function getEditorRuntime() {
15
+ return editor;
16
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * `@tanqory/theme-kit/runtime` — the low-level runtime pieces `createRender` and `hydrate` are built
3
+ * from. For a theme's own tests (render a section tree under the real providers) and for custom
4
+ * entries. A theme's components never import this; they use `@tanqory/theme-kit`.
5
+ *
6
+ * Alpha surface: these names may still move between pre-releases.
7
+ */
8
+ export { setThemeBundle, getThemeBundle, type ThemeBundle } from './runtime/slots.js';
9
+ export { sectionModules } from './runtime/entries/sections.js';
10
+ export { registerSections, getSection, allSections } from './runtime/kit/registry.js';
11
+ export { SectionTree } from './runtime/kit/SectionTree.js';
12
+ export type { ContentNode, SectionDef, AttrSpec, SectionProps } from './runtime/kit/types.js';
13
+ export { DataProvider, type DataApi } from './runtime/kit/data.js';
14
+ export { ThemeProvider } from './runtime/kit/theme-context.js';
15
+ export { PreviewModeProvider } from './runtime/shell/preview-mode.js';
16
+ export { localeStrings, themeLocaleOf } from './runtime/platform/locale.js';
17
+ export { AbiShell } from './abi/shell.js';
18
+ export { nodesOf, notFoundTree, locationOf } from './abi/page.js';
19
+ export { loadPageData, pageNeeds, pageParamsOf, variantOf, cartLinkOf, searchQueryOf, searchSortOf, listingQueryOfRequest, localizationOf, marketsOf, type PageData, type NativeFormResult, type NativeFormStatus, type LocaleMarket, } from './abi/page-data.js';
20
+ export { createDataApi, searchKey, searchOrder, SEARCH_SORTS } from './abi/data-api.js';
21
+ export * as convert from './abi/convert.js';
22
+ export { createAbiRemote, AbiWireError, parseRetryAfter, type AbiRemote, type WireEnvelope } from './abi/wire.js';
23
+ export { AbiCartProvider, refusalOf, wireCode, retryDelay } from './abi/cart.js';
24
+ export { AbiRewardsProvider, HOST_OFFERS_LOYALTY, rewardsStateOf } from './abi/rewards.js';
25
+ export { AbiReferralsProvider, keepRefCode, referralStateOf, friendOfferOf, REF_COOKIE, CLAIM_COOKIE } from './abi/referrals.js';
26
+ export { homeHead, heroImageOf, hreflangAlternates, type HomeHead, type HreflangAlternate } from './abi/seo.js';
27
+ export { canonicalize } from './abi/jcs.js';
28
+ export { CANVAS_EVENT, CANVAS_LIVE_EVENT, CANVAS_BRIDGE_EVENT, LIVE_TYPES, blocksOf, applyCanvasMessage, createCanvasStore, connectCanvas, type CanvasStore, } from './abi/canvas-live.js';
29
+ export { computeHead, headFrom, shopNameOf } from './runtime/seo/head.js';
30
+ export { jsonLdTag } from './runtime/seo/structured-data.js';
31
+ export { toLocalization, toShop, toCart, toProduct, consentBannerShows } from './runtime/data/to-ui.js';
32
+ export { localeHref } from './runtime/render/section-actions.js';
33
+ export { listingQueryOf, metafieldBooleanLabelKey, queryOfState, stateFromQuery, withListingQuery } from './runtime/render/listing-query.js';
34
+ export { copyPlanOf, localizeShippedCopy, shippedCopyOf, unknownCopyRefs } from './runtime/render/localized-copy.js';