@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.
- package/LICENSE +21 -0
- package/README.md +128 -10
- package/dist/abi/canvas-live.d.ts +72 -0
- package/dist/abi/canvas-live.js +159 -0
- package/dist/abi/cart.d.ts +60 -0
- package/dist/abi/cart.js +396 -0
- package/dist/abi/convert.d.ts +360 -0
- package/dist/abi/convert.js +1330 -0
- package/dist/abi/data-api.d.ts +15 -0
- package/dist/abi/data-api.js +213 -0
- package/dist/abi/jcs.d.ts +6 -0
- package/dist/abi/jcs.js +28 -0
- package/dist/abi/labels.d.ts +3 -0
- package/dist/abi/labels.js +34 -0
- package/dist/abi/page-data.d.ts +264 -0
- package/dist/abi/page-data.js +746 -0
- package/dist/abi/page.d.ts +28 -0
- package/dist/abi/page.js +57 -0
- package/dist/abi/referrals.d.ts +23 -0
- package/dist/abi/referrals.js +89 -0
- package/dist/abi/rewards.d.ts +27 -0
- package/dist/abi/rewards.js +82 -0
- package/dist/abi/seo.d.ts +47 -0
- package/dist/abi/seo.js +68 -0
- package/dist/abi/shell.d.ts +23 -0
- package/dist/abi/shell.js +10 -0
- package/dist/abi/state-pack.d.ts +17 -0
- package/dist/abi/state-pack.js +43 -0
- package/dist/abi/wire.d.ts +46 -0
- package/dist/abi/wire.js +114 -0
- package/dist/build.d.ts +121 -0
- package/dist/build.js +401 -0
- package/dist/chunks.d.ts +23 -0
- package/dist/chunks.js +41 -0
- package/dist/client.d.ts +26 -0
- package/dist/client.js +101 -0
- package/dist/contract.d.ts +6 -0
- package/dist/contract.js +6 -0
- package/dist/headless/ai.d.ts +132 -0
- package/dist/headless/ai.js +99 -0
- package/dist/headless/hooks.d.ts +276 -0
- package/dist/headless/hooks.js +544 -0
- package/dist/headless/i18n.d.ts +13 -0
- package/dist/headless/i18n.js +45 -0
- package/dist/headless/index.d.ts +44 -0
- package/dist/headless/index.js +48 -0
- package/dist/headless/lazy-component.d.ts +72 -0
- package/dist/headless/lazy-component.js +225 -0
- package/dist/headless/lazy-section.d.ts +38 -0
- package/dist/headless/lazy-section.js +97 -0
- package/dist/headless/model.d.ts +73 -0
- package/dist/headless/model.js +115 -0
- package/dist/headless/money.d.ts +17 -0
- package/dist/headless/money.js +63 -0
- package/dist/headless/page.d.ts +45 -0
- package/dist/headless/page.js +53 -0
- package/dist/headless/platform.d.ts +55 -0
- package/dist/headless/platform.js +77 -0
- package/dist/headless/primitives/cart.d.ts +90 -0
- package/dist/headless/primitives/cart.js +153 -0
- package/dist/headless/primitives/collection.d.ts +68 -0
- package/dist/headless/primitives/collection.js +80 -0
- package/dist/headless/primitives/product.d.ts +101 -0
- package/dist/headless/primitives/product.js +117 -0
- package/dist/headless/primitives/storefront.d.ts +106 -0
- package/dist/headless/primitives/storefront.js +187 -0
- package/dist/headless/primitives/util.d.ts +19 -0
- package/dist/headless/primitives/util.js +42 -0
- package/dist/headless/strings.d.ts +9 -0
- package/dist/headless/strings.js +198 -0
- package/dist/headless/structured-data.d.ts +31 -0
- package/dist/headless/structured-data.js +57 -0
- package/dist/headless/tanqory-money.generated.d.ts +493 -0
- package/dist/headless/tanqory-money.generated.js +507 -0
- package/dist/headless/theme.d.ts +109 -0
- package/dist/headless/theme.js +62 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +21 -553
- package/dist/runtime/data/StoreProvider.d.ts +84 -0
- package/dist/runtime/data/StoreProvider.js +380 -0
- package/dist/runtime/data/handle.d.ts +14 -0
- package/dist/runtime/data/handle.js +16 -0
- package/dist/runtime/data/routes.d.ts +87 -0
- package/dist/runtime/data/routes.js +158 -0
- package/dist/runtime/data/to-ui.d.ts +286 -0
- package/dist/runtime/data/to-ui.js +1009 -0
- package/dist/runtime/entries/register.d.ts +9 -0
- package/dist/runtime/entries/register.js +9 -0
- package/dist/runtime/entries/sections.d.ts +16 -0
- package/dist/runtime/entries/sections.js +19 -0
- package/dist/{types → runtime/kit}/SectionTree.d.ts +2 -1
- package/dist/runtime/kit/SectionTree.js +100 -0
- package/dist/runtime/kit/analytics.d.ts +63 -0
- package/dist/runtime/kit/analytics.js +250 -0
- package/dist/runtime/kit/cart.d.ts +222 -0
- package/dist/runtime/kit/cart.js +545 -0
- package/dist/{types → runtime/kit}/composition.d.ts +1 -1
- package/dist/runtime/kit/composition.js +3 -0
- package/dist/{types → runtime/kit}/config.d.ts +2 -2
- package/dist/runtime/kit/config.js +6 -0
- package/dist/runtime/kit/consent.d.ts +29 -0
- package/dist/runtime/kit/consent.js +159 -0
- package/dist/runtime/kit/contract/content.d.ts +213 -0
- package/dist/runtime/kit/contract/content.js +119 -0
- package/dist/runtime/kit/contract/field-types.d.ts +360 -0
- package/dist/runtime/kit/contract/field-types.js +216 -0
- package/dist/runtime/kit/contract/groups.d.ts +230 -0
- package/dist/runtime/kit/contract/groups.js +402 -0
- package/dist/runtime/kit/contract/index.d.ts +33 -0
- package/dist/runtime/kit/contract/index.js +33 -0
- package/dist/runtime/kit/contract/transform.d.ts +82 -0
- package/dist/runtime/kit/contract/transform.js +133 -0
- package/dist/runtime/kit/contract/validate.d.ts +77 -0
- package/dist/runtime/kit/contract/validate.js +520 -0
- package/dist/runtime/kit/data.d.ts +732 -0
- package/dist/runtime/kit/data.js +1131 -0
- package/dist/{types → runtime/kit}/defineSection.d.ts +1 -1
- package/dist/runtime/kit/defineSection.js +10 -0
- package/dist/runtime/kit/dynamic-source.d.ts +118 -0
- package/dist/runtime/kit/dynamic-source.js +311 -0
- package/dist/runtime/kit/index.d.ts +24 -0
- package/dist/runtime/kit/index.js +24 -0
- package/dist/{types → runtime/kit}/jsx-to-json.d.ts +1 -1
- package/dist/runtime/kit/jsx-to-json.js +28 -0
- package/dist/{types → runtime/kit}/mount.d.ts +25 -4
- package/dist/runtime/kit/mount.js +124 -0
- package/dist/{types → runtime/kit}/registry.d.ts +1 -1
- package/dist/runtime/kit/registry.js +12 -0
- package/dist/{types → runtime/kit}/ssg.d.ts +9 -3
- package/dist/runtime/kit/ssg.js +56 -0
- package/dist/runtime/kit/storefront.d.ts +652 -0
- package/dist/runtime/kit/storefront.js +723 -0
- package/dist/{types → runtime/kit}/theme-context.d.ts +8 -2
- package/dist/runtime/kit/theme-context.js +25 -0
- package/dist/runtime/kit/types.d.ts +155 -0
- package/dist/runtime/kit/types.js +1 -0
- package/dist/runtime/platform/TrackingPixels.d.ts +14 -0
- package/dist/runtime/platform/TrackingPixels.js +63 -0
- package/dist/runtime/platform/environment.d.ts +68 -0
- package/dist/runtime/platform/environment.js +85 -0
- package/dist/runtime/platform/locale.d.ts +27 -0
- package/dist/runtime/platform/locale.js +42 -0
- package/dist/runtime/platform/route-analytics.d.ts +15 -0
- package/dist/runtime/platform/route-analytics.js +72 -0
- package/dist/runtime/platform/safe-href.d.ts +25 -0
- package/dist/runtime/platform/safe-href.js +69 -0
- package/dist/runtime/platform/safe-values.d.ts +37 -0
- package/dist/runtime/platform/safe-values.js +140 -0
- package/dist/runtime/render/SectionRenderer.d.ts +4 -0
- package/dist/runtime/render/SectionRenderer.js +199 -0
- package/dist/runtime/render/listing-query.d.ts +52 -0
- package/dist/runtime/render/listing-query.js +122 -0
- package/dist/runtime/render/localized-copy.d.ts +86 -0
- package/dist/runtime/render/localized-copy.js +129 -0
- package/dist/runtime/render/product-listing.d.ts +11 -0
- package/dist/runtime/render/product-listing.js +243 -0
- package/dist/runtime/render/resolved.d.ts +47 -0
- package/dist/runtime/render/resolved.js +80 -0
- package/dist/runtime/render/section-actions.d.ts +67 -0
- package/dist/runtime/render/section-actions.js +205 -0
- package/dist/runtime/render/starter.d.ts +11 -0
- package/dist/runtime/render/starter.js +96 -0
- package/dist/runtime/seo/head.d.ts +115 -0
- package/dist/runtime/seo/head.js +281 -0
- package/dist/runtime/seo/structured-data.d.ts +83 -0
- package/dist/runtime/seo/structured-data.js +252 -0
- package/dist/runtime/shell/PageShell.d.ts +18 -0
- package/dist/runtime/shell/PageShell.js +118 -0
- package/dist/runtime/shell/RuntimeBridge.d.ts +18 -0
- package/dist/runtime/shell/RuntimeBridge.js +124 -0
- package/dist/runtime/shell/overlay-state.d.ts +31 -0
- package/dist/runtime/shell/overlay-state.js +59 -0
- package/dist/runtime/shell/preview-mode.d.ts +2 -0
- package/dist/runtime/shell/preview-mode.js +11 -0
- package/dist/runtime/shell/spa-router.d.ts +14 -0
- package/dist/runtime/shell/spa-router.js +76 -0
- package/dist/runtime/shell/url-redirects.d.ts +6 -0
- package/dist/runtime/shell/url-redirects.js +37 -0
- package/dist/runtime/slots.d.ts +74 -0
- package/dist/runtime/slots.js +16 -0
- package/dist/runtime.d.ts +34 -0
- package/dist/runtime.js +40 -0
- package/dist/sdk/app-block.d.ts +29 -0
- package/dist/sdk/app-block.js +22 -0
- package/dist/sdk/font-hooks.d.ts +7 -0
- package/dist/sdk/font-hooks.js +21 -0
- package/dist/sdk/fonts.d.ts +144 -0
- package/dist/sdk/fonts.js +241 -0
- package/dist/sdk/index.d.ts +32 -0
- package/dist/sdk/index.js +36 -0
- package/dist/sdk/motion-hooks.d.ts +23 -0
- package/dist/sdk/motion-hooks.js +46 -0
- package/dist/sdk/motion.d.ts +78 -0
- package/dist/sdk/motion.js +292 -0
- package/dist/sdk/referrals.d.ts +62 -0
- package/dist/sdk/referrals.js +20 -0
- package/dist/sdk/rewards.d.ts +85 -0
- package/dist/sdk/rewards.js +29 -0
- package/dist/sdk/runtime-context.d.ts +230 -0
- package/dist/sdk/runtime-context.js +73 -0
- package/dist/sdk/schema.d.ts +249 -0
- package/dist/sdk/schema.js +168 -0
- package/dist/sdk/server-render.d.ts +8 -0
- package/dist/sdk/server-render.js +12 -0
- package/dist/sdk/store-lookup.d.ts +32 -0
- package/dist/sdk/store-lookup.js +48 -0
- package/dist/sdk/store.d.ts +164 -0
- package/dist/sdk/store.js +5 -0
- package/dist/sdk/sx.d.ts +45 -0
- package/dist/sdk/sx.js +117 -0
- package/dist/sdk/theme.d.ts +212 -0
- package/dist/sdk/theme.js +27 -0
- package/dist/sdk/types.d.ts +789 -0
- package/dist/sdk/types.js +7 -0
- package/dist/server.d.ts +112 -0
- package/dist/server.js +589 -0
- package/dist/vite-chunks.d.ts +10 -0
- package/dist/vite-chunks.js +44 -0
- package/docs/headless-api.md +250 -0
- package/package.json +72 -26
- package/dist/index.js.map +0 -1
- package/dist/ssg-BZ5FYTw7.js +0 -1802
- package/dist/ssg-BZ5FYTw7.js.map +0 -1
- package/dist/ssg.js +0 -8
- package/dist/ssg.js.map +0 -1
- package/dist/types/cart.d.ts +0 -86
- package/dist/types/data.d.ts +0 -357
- package/dist/types/dynamic-source.d.ts +0 -84
- package/dist/types/editor.d.ts +0 -5
- package/dist/types/index.d.ts +0 -20
- package/dist/types/preview-bridge.d.ts +0 -9
- package/dist/types/storefront.d.ts +0 -333
- package/dist/types/types.d.ts +0 -44
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tanqory
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,17 +1,135 @@
|
|
|
1
|
-
# @tanqory/theme-kit
|
|
1
|
+
# @tanqory/theme-kit (v2, Theme ABI v2)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
> **Provenance (OS-RT-1, 2026-11-06).** Moved in as-is from `tanqory-platform-theme-kit` `main@c4c1a11` (DECISIONS row 16;
|
|
4
|
+
> `docs/online-store/PORT_RUNTIME.md`). Old git history is not carried over; that commit is the source.
|
|
5
|
+
> Changes on import, all wiring or naming (guards: brand term, old-system hosts):
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
`
|
|
7
|
+
- Imported here (not by OS-ST-2) because build-service needed `2.0.0-alpha.17`, then only on GitHub Packages. The repository's
|
|
8
|
+
copy changed under that number after it reached npmjs; since 2026-11-25 it is `2.0.0-alpha.18`, then `2.0.0-alpha.19` (storefront-query rev 2.73 store locations, board 35
|
|
9
|
+
#117), and every published
|
|
10
|
+
version is frozen in `tools/guards/published-packages.json`.
|
|
11
|
+
- `@tanqory/theme-abi` (dev) is `link:../theme-abi`. Its own lockfile; not a member of the root pnpm workspace.
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
|
|
14
|
+
The platform layer a Tanqory theme is built on: the theme-authoring API, the runtime behind it
|
|
15
|
+
(store data plan over `ctx.data`, cart, SEO head and JSON-LD, localisation, live edit on the editor
|
|
16
|
+
canvas) and the two entry factories that turn a theme into a Theme ABI v2 artifact.
|
|
17
|
+
|
|
18
|
+
A theme supplies its sections, components and styles. Everything else comes from the kit, so a new
|
|
19
|
+
theme does not re-implement cart, variants, markets or live edit.
|
|
20
|
+
|
|
21
|
+
> **Alpha.** `2.0.0-alpha.*` carries the `alpha` dist-tag (`latest` is still the incompatible v1 kit, `0.x`).
|
|
22
|
+
> The `./runtime` surface may still move between pre-releases.
|
|
23
|
+
>
|
|
24
|
+
> **2.0.0-alpha.12 — gift cards (storefront-query rev 2.51, NEW-PROD-12).** Cart line attributes (gift card recipient),
|
|
25
|
+
> `cart.lineAttributes`, `routeParams` and the gift-card balance form result.
|
|
26
|
+
>
|
|
27
|
+
> **2.0.0-alpha.11 — loyalty and referrals (storefront-query rev 2.49, NEW-MKT-10).** `Shop.loyalty` and
|
|
28
|
+
> `Shop.referrals` reach the theme when the merchant runs those programs; absent ⇒ no member.
|
|
29
|
+
>
|
|
30
|
+
> **2.0.0-alpha.8 — blog comments (storefront-query rev 2.44, NEW-OS-26).** An article whose blog accepts comments
|
|
31
|
+
> carries `comments: {moderated, count, comments[]}` (`ArticleCommentsData`): on the article route the newest
|
|
32
|
+
> published comments (at most 50, newest first), on listings the count alone. Absent ⇒ the blog takes no comments —
|
|
33
|
+
> show neither a list nor the `comments` form. The form's outcome reaches the theme as the usual `formResult`.
|
|
34
|
+
>
|
|
35
|
+
> **2.0.0-alpha.7 — product reviews (storefront-query rev 2.38, theme-abi alpha.19, NEW-PROD-10), selling plans on
|
|
36
|
+
> Product and cart lines (rev 2.39, NEW-SUB-1/2/3), instant page transitions (NEW-OS-11). alpha.6 = pop-ups (NEW-MKT-4).** `Product.rating`
|
|
37
|
+
> (the platform's published-review aggregate) reaches every product card as `rating: {value, count}`; on the product
|
|
38
|
+
> route the kit asks the snapshot and `fetchProduct` for `reviewsFirst: 50` and fills `StoreContext.reviews`
|
|
39
|
+
> (`ReviewsData`: aggregate, 5→1 star distribution, the newest reviews as `Review` rows, each with its merchant
|
|
40
|
+
> `reply` when there is one; `count: 0` for an unreviewed product, `null` off the product route). A region from before
|
|
41
|
+
> rev 2.38 refuses the new option: the kit asks again without it and the page keeps the older behaviour.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm create tanqory-theme@latest my-theme # a complete theme on the kit (Blank or a Nova fork)
|
|
45
|
+
# or, in an existing theme:
|
|
46
|
+
npm install @tanqory/theme-kit@alpha react@18.3.1 react-dom@18.3.1
|
|
47
|
+
npm install --save-dev @tanqory/theme-abi@alpha
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Source.** Extracted, behaviour-identical, from the Nova V3 theme's platform layer. Nova V3 renders
|
|
51
|
+
byte-identical HTML on it (render diff over 58 fixture routes, en + th).
|
|
52
|
+
|
|
53
|
+
## Entry points
|
|
54
|
+
|
|
55
|
+
| Import | What it is |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `@tanqory/theme-kit` | The authoring API: `defineTheme`, `defineSection`, `defineSchema`, `field.*`, `resolveSettings`, `useThemeContext`, `useThemeActions`, `useSearchSuggestions`, `useRewards`, `useReferrals`, `imageFor` / `menuFor` / `collectionFor` / `productFor`, `sx()`, and the data types (`Shop`, `Menu`, `MenuItem`, `Link`, `Image`, `Video`, `Localization`, `Market`, `CartSummary`, `Customer`, `Product`, `Collection`, `Cart`, …). The earlier `Nova*` type names are kept as `@deprecated` aliases. |
|
|
58
|
+
| `@tanqory/theme-kit/headless` | **The headless storefront API** (2.0.0-alpha.1): data hooks (`useProduct`, `useCollection`, `useCart`, `useSearch`, `useLocalization`, …), accessible commerce primitives with no styling (`<ProductForm>`, `<VariantPicker>`, `<AddToCart>`, `<CartDrawer>`, `<FacetFilters>`, `<SortSelect>`, `<LocalizationForm>`, `<NewsletterForm>`, `<ConsentBanner>`, …), `<Seo>`, `<Image>`, `t()`, `formatMoney`, `defineSection` / `defineBlock` / `defineTheme` and the `ai.*` roles. Reference: [docs/headless-api.md](docs/headless-api.md). |
|
|
59
|
+
| `@tanqory/theme-kit/build` | `buildManifest(...)`: the theme's ABI manifest (components, settings, routes, forms, capabilities with `data:shop`, `x-tanqory-ai`) from its declarations; `checkContent`, `withKitStrings`. Pure, for a theme's build script. |
|
|
60
|
+
| `@tanqory/theme-kit/server` | `createRender(options)` → the ABI `render(request, ctx)`. Every theme gets hreflang alternates (`<canonical>?locale=<lang>` per published language, plus `x-default`; 2.0.0-alpha.2, `hreflang: false` turns them off). `storefront: {}` turns on what the headless API needs (Breadcrumb/Collection JSON-LD, `<Seo>`, merchant strings, data-plan flags); absent, the render is otherwise the alpha.0 one. |
|
|
61
|
+
| `@tanqory/theme-kit/client` | `hydrate(options)`: the browser entry. Wires the editor canvas live edit (`tq:canvas` / `tq:canvas-live`) automatically in preview mode. |
|
|
62
|
+
| `@tanqory/theme-kit/runtime` | Low-level runtime pieces (providers, data plan, wire client, cart provider, converters, SEO helpers). For a theme's own tests and for custom entries. |
|
|
63
|
+
| `@tanqory/theme-kit/contract` | The content contract (page and section-group documents, roles, validation, transforms). Pure, loads in Node. |
|
|
64
|
+
|
|
65
|
+
## Headless themes
|
|
66
|
+
|
|
67
|
+
A theme written against `@tanqory/theme-kit/headless` owns all its markup and CSS and gets every storefront
|
|
68
|
+
function from the kit: variants and `?variant=`, add to cart and the cart drawer, cart lines and checkout
|
|
69
|
+
hand-off, sort / filter / paging, predictive search, market and language, consent, platform forms, account
|
|
70
|
+
slot, SEO and JSON-LD, th/en strings with merchant overrides, live edit on the editor canvas, and the AI-compat
|
|
71
|
+
profile. The primitives render semantic HTML with the `tq-storefront-hooks/1` attributes and accept
|
|
72
|
+
`className` and render-prop children. See [docs/headless-api.md](docs/headless-api.md) and the complete example
|
|
73
|
+
theme Aurora (in the kit's source repository, not part of the published package; `npm create tanqory-theme` gives you an equivalent Blank starter).
|
|
74
|
+
|
|
75
|
+
## Using it
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
// entry.abi.tsx: the server entry, built into ONE file with no imports
|
|
79
|
+
import type { ThemeManifest } from '@tanqory/theme-abi'
|
|
80
|
+
import { createRender } from '@tanqory/theme-kit/server'
|
|
81
|
+
import { bundle } from './lib/bundle'
|
|
82
|
+
import manifestJson from './lib/abi/generated/manifest.json'
|
|
83
|
+
|
|
84
|
+
export const manifest = manifestJson as unknown as ThemeManifest
|
|
85
|
+
export const render = createRender({ manifest, bundle })
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
// main.abi.tsx: the browser entry
|
|
90
|
+
import { hydrate } from '@tanqory/theme-kit/client'
|
|
91
|
+
import { bundle } from './lib/bundle'
|
|
92
|
+
|
|
93
|
+
hydrate({ bundle })
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`bundle` is the theme's `ThemeBundle`: its `defineTheme(...)` definition, `templates/*.json`,
|
|
97
|
+
`groups/*.json`, `locales/*.json`, settings and settings schema. The not-found section shown for an
|
|
98
|
+
unknown product, collection, page or blog comes from the bundle's `templates/404.json`.
|
|
99
|
+
|
|
100
|
+
Optional hooks (all default to "unchanged"):
|
|
101
|
+
|
|
102
|
+
| Hook | Where | Runs |
|
|
103
|
+
|---|---|---|
|
|
104
|
+
| `effectiveSettings(settings)` | `createRender` | first: manifest defaults + the store's values → what the theme renders (and hydrates) with |
|
|
105
|
+
| `transformNodes(nodes, settings)` | `createRender` and `hydrate` (pass the same function to both) | on the page's section nodes before render, server and browser |
|
|
106
|
+
| `shopSettings(settings, shop)` | `createRender` | once the store's shop record is loaded |
|
|
107
|
+
|
|
108
|
+
## What the compiled output guarantees
|
|
109
|
+
|
|
110
|
+
`pnpm build` runs `tsc` and then `scripts/check-dist.mjs`, which fails the build unless:
|
|
111
|
+
|
|
112
|
+
- every relative import names an existing `.js` file (Node ESM and the platform build sandbox resolve it as written);
|
|
113
|
+
- there is no dynamic `import()` and no `import.meta.glob`, so the theme's server entry stays one file with no imports;
|
|
114
|
+
- there are no `node:` / Node built-in imports and no CSS imports in runtime code;
|
|
115
|
+
- the only bare imports are the peer dependencies (`react`, `react-dom`, `@tanqory/theme-abi`).
|
|
116
|
+
|
|
117
|
+
The runtime reads `import.meta.env` (`DEV`, and the optional `VITE_TANQORY_*` build variables), as
|
|
118
|
+
every theme bundler on the platform defines it. Under Vitest, list the kit in
|
|
119
|
+
`test.server.deps.inline` so it is transformed like the theme's own source.
|
|
120
|
+
|
|
121
|
+
## Layout
|
|
11
122
|
|
|
12
123
|
```
|
|
13
124
|
src/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
125
|
+
index.ts @tanqory/theme-kit (= sdk/ + ThemeBundle, ContentNode)
|
|
126
|
+
server.tsx @tanqory/theme-kit/server createRender()
|
|
127
|
+
client.tsx @tanqory/theme-kit/client hydrate()
|
|
128
|
+
runtime.ts @tanqory/theme-kit/runtime
|
|
129
|
+
contract.ts @tanqory/theme-kit/contract
|
|
130
|
+
sdk/ the authoring API: schema, theme, runtime context, data types, sx
|
|
131
|
+
runtime/ rendering: section tree, store data layer, cart, SEO head, render helpers, content contract
|
|
132
|
+
abi/ the ABI v2 layer: data plan over ctx.data, data API, wire client, cart, loyalty, live edit
|
|
133
|
+
test/ vitest
|
|
134
|
+
scripts/ check-dist.mjs, check-release-integrity.mjs
|
|
17
135
|
```
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live section edits on the editor canvas (a PREVIEW render only — `ctx.mode === 'preview'`).
|
|
3
|
+
*
|
|
4
|
+
* The platform gateway injects its editor bridge into every preview page.
|
|
5
|
+
* The bridge checks the editor's origin and hands each content message to the page as a `tq:canvas` DOM event; this
|
|
6
|
+
* module applies those messages to the section nodes the page rendered, so a setting edit re-renders its section at
|
|
7
|
+
* once instead of waiting for a save and a reload. The bridge also does selection, scrolling and click-to-select; the
|
|
8
|
+
* theme does none of that here.
|
|
9
|
+
*
|
|
10
|
+
* tanqory-preview-update-section {sectionId, settings, blocks?, order?} that section's settings (and blocks)
|
|
11
|
+
* tq:set-content {doc: ContentNode[]} the editor's tree: every node it names
|
|
12
|
+
* that is on this page takes its settings
|
|
13
|
+
*
|
|
14
|
+
* tq:theme-settings {settings} the theme settings (colours, fonts, layout):
|
|
15
|
+
* the provider re-renders with them
|
|
16
|
+
*
|
|
17
|
+
* Reorder and remove are applied from `tq:set-content` when every node the editor names is on this page (`tq:set-content:structure`
|
|
18
|
+
* in LIVE_TYPES tells the editor so). An ADD is not: a new section needs its server data, and the editor reloads the
|
|
19
|
+
* canvas for it from the saved workspace. A node the editor names that this page does not render is never inserted.
|
|
20
|
+
*
|
|
21
|
+
* Pure (no DOM, no React): the store is the boundary — main.abi.tsx subscribes React to it and wires the window
|
|
22
|
+
* events. Unit-tested in lib/abi/canvas-live.test.ts.
|
|
23
|
+
*/
|
|
24
|
+
import type { ContentNode } from '../runtime/kit/types.js';
|
|
25
|
+
export declare const CANVAS_EVENT = "tq:canvas";
|
|
26
|
+
export declare const CANVAS_LIVE_EVENT = "tq:canvas-live";
|
|
27
|
+
export declare const CANVAS_BRIDGE_EVENT = "tq:canvas-bridge";
|
|
28
|
+
/** The message types this theme applies live (announced to the bridge, which tells the editor). */
|
|
29
|
+
export declare const LIVE_TYPES: readonly string[];
|
|
30
|
+
/** Editor → canvas: the theme's settings file as the editor holds it (`settings: null` = back to what was rendered). */
|
|
31
|
+
export declare const THEME_SETTINGS_TYPE = "tq:theme-settings";
|
|
32
|
+
/**
|
|
33
|
+
* The editor's block shapes → an array: an id-keyed map with an `order`, or already an array. Nested theme blocks
|
|
34
|
+
* (a block holding blocks) come in the same shape at every level and are converted all the way down.
|
|
35
|
+
*/
|
|
36
|
+
export declare function blocksOf(raw: unknown, order: unknown): ContentNode[] | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The nodes after one canvas message. Returns the SAME array when the message changes nothing on this page (an
|
|
39
|
+
* unknown type, a section that is not here), so React does not re-render for it.
|
|
40
|
+
*/
|
|
41
|
+
export declare function applyCanvasMessage(nodes: ContentNode[], msg: unknown): ContentNode[];
|
|
42
|
+
/** The theme settings the editor holds, laid over what the server rendered with. `null` = what was rendered. */
|
|
43
|
+
export declare function applyThemeSettings(rendered: Record<string, unknown>, current: Record<string, unknown>, msg: unknown): Record<string, unknown>;
|
|
44
|
+
export interface SettingsStore {
|
|
45
|
+
get(): Record<string, unknown>;
|
|
46
|
+
subscribe(listener: () => void): () => void;
|
|
47
|
+
apply(msg: unknown): void;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The page's theme settings as an external store (preview only, like the section nodes). `finish` runs the theme's own
|
|
51
|
+
* settings hooks over the editor's settings laid over the render (effectiveSettings, then shopSettings with the page's
|
|
52
|
+
* shop record), as the server did: without it an empty colour in the editor's file hid the Settings > Brand colour the
|
|
53
|
+
* server had filled in (board 35 #110, Dev check 2026-11-24). Default: unchanged.
|
|
54
|
+
*/
|
|
55
|
+
export declare function createSettingsStore(rendered: Record<string, unknown>, finish?: (settings: Record<string, unknown>) => Record<string, unknown>): SettingsStore;
|
|
56
|
+
export interface CanvasStore {
|
|
57
|
+
get(): ContentNode[];
|
|
58
|
+
subscribe(listener: () => void): () => void;
|
|
59
|
+
apply(msg: unknown): void;
|
|
60
|
+
}
|
|
61
|
+
/** The page's section nodes as a small external store (React subscribes with useSyncExternalStore). */
|
|
62
|
+
export declare function createCanvasStore(initial: ContentNode[]): CanvasStore;
|
|
63
|
+
interface EventWindow {
|
|
64
|
+
addEventListener(type: string, listener: (e: Event) => void): void;
|
|
65
|
+
dispatchEvent(e: Event): boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Connects the store to the bridge: every `tq:canvas` event is applied, and the theme announces what it applies —
|
|
69
|
+
* now, and again whenever a bridge says it started (it may load after this script).
|
|
70
|
+
*/
|
|
71
|
+
export declare function connectCanvas(win: EventWindow, store: CanvasStore, makeEvent: (type: string, detail?: unknown) => Event, settings?: SettingsStore): void;
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
export const CANVAS_EVENT = 'tq:canvas';
|
|
2
|
+
export const CANVAS_LIVE_EVENT = 'tq:canvas-live';
|
|
3
|
+
export const CANVAS_BRIDGE_EVENT = 'tq:canvas-bridge';
|
|
4
|
+
/** The message types this theme applies live (announced to the bridge, which tells the editor). */
|
|
5
|
+
export const LIVE_TYPES = ['tanqory-preview-update-section', 'tq:set-content', 'tq:theme-settings', 'tq:set-content:structure'];
|
|
6
|
+
/** Editor → canvas: the theme's settings file as the editor holds it (`settings: null` = back to what was rendered). */
|
|
7
|
+
export const THEME_SETTINGS_TYPE = 'tq:theme-settings';
|
|
8
|
+
const isObj = (v) => typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
9
|
+
/**
|
|
10
|
+
* The editor's block shapes → an array: an id-keyed map with an `order`, or already an array. Nested theme blocks
|
|
11
|
+
* (a block holding blocks) come in the same shape at every level and are converted all the way down.
|
|
12
|
+
*/
|
|
13
|
+
export function blocksOf(raw, order) {
|
|
14
|
+
const node = (b, id) => {
|
|
15
|
+
const { order: childOrder, blocks: childRaw, ...rest } = b;
|
|
16
|
+
const kids = childRaw === undefined ? undefined : blocksOf(childRaw, childOrder);
|
|
17
|
+
return {
|
|
18
|
+
...rest,
|
|
19
|
+
...(id !== undefined ? { id: typeof b.id === 'string' ? b.id : id } : {}),
|
|
20
|
+
...(kids && kids.length ? { blocks: kids } : {}),
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
if (Array.isArray(raw))
|
|
24
|
+
return raw.filter((b) => isObj(b) && typeof b.type === 'string').map((b) => node(b));
|
|
25
|
+
if (!isObj(raw))
|
|
26
|
+
return undefined;
|
|
27
|
+
const ids = Array.isArray(order) && order.length ? order.filter((x) => typeof x === 'string') : Object.keys(raw);
|
|
28
|
+
const out = [];
|
|
29
|
+
for (const id of ids) {
|
|
30
|
+
const b = raw[id];
|
|
31
|
+
if (!isObj(b) || typeof b.type !== 'string')
|
|
32
|
+
continue;
|
|
33
|
+
out.push(node(b, id));
|
|
34
|
+
}
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
function patched(node, settings, blocks) {
|
|
38
|
+
return {
|
|
39
|
+
...node,
|
|
40
|
+
settings: { ...(node.settings ?? {}), ...(isObj(settings) ? settings : {}) },
|
|
41
|
+
...(blocks ? { blocks } : {}),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The nodes after one canvas message. Returns the SAME array when the message changes nothing on this page (an
|
|
46
|
+
* unknown type, a section that is not here), so React does not re-render for it.
|
|
47
|
+
*/
|
|
48
|
+
export function applyCanvasMessage(nodes, msg) {
|
|
49
|
+
if (!isObj(msg))
|
|
50
|
+
return nodes;
|
|
51
|
+
if (msg.type === 'tanqory-preview-update-section') {
|
|
52
|
+
const id = msg.sectionId;
|
|
53
|
+
if (typeof id !== 'string' || !nodes.some((n) => n.id === id))
|
|
54
|
+
return nodes;
|
|
55
|
+
const blocks = blocksOf(msg.blocks, msg.order);
|
|
56
|
+
return nodes.map((n) => (n.id === id ? patched(n, msg.settings, blocks) : n));
|
|
57
|
+
}
|
|
58
|
+
if (msg.type === 'tq:set-content' && Array.isArray(msg.doc)) {
|
|
59
|
+
const byId = new Map();
|
|
60
|
+
for (const d of msg.doc)
|
|
61
|
+
if (isObj(d) && typeof d.id === 'string')
|
|
62
|
+
byId.set(d.id, d);
|
|
63
|
+
if (!nodes.some((n) => n.id !== undefined && byId.has(n.id)))
|
|
64
|
+
return nodes;
|
|
65
|
+
const next = nodes.map((n) => {
|
|
66
|
+
const d = n.id !== undefined ? byId.get(n.id) : undefined;
|
|
67
|
+
// a node whose TYPE changed is structure, not a setting: leave it for the reload
|
|
68
|
+
return d && d.type === n.type ? patched(n, d.settings, blocksOf(d.blocks, d.order)) : n;
|
|
69
|
+
});
|
|
70
|
+
return restructured(next, msg.doc);
|
|
71
|
+
}
|
|
72
|
+
return nodes;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Reorder and remove, from the editor's whole tree (`doc`, in order). Applied only when the tree holds nothing this page
|
|
76
|
+
* cannot show: a node the doc names that is not here and not hidden is an added section (or another page's doc), and
|
|
77
|
+
* then the structure stays as rendered until the editor reloads the canvas. A hidden node is never rendered, so it does
|
|
78
|
+
* not count. Nodes without an id (the page's own furniture) keep their place.
|
|
79
|
+
*/
|
|
80
|
+
function restructured(nodes, doc) {
|
|
81
|
+
const here = new Map();
|
|
82
|
+
for (const n of nodes)
|
|
83
|
+
if (n.id !== undefined)
|
|
84
|
+
here.set(n.id, n);
|
|
85
|
+
const named = doc.filter((d) => isObj(d) && typeof d.id === 'string');
|
|
86
|
+
const hidden = (d) => isObj(d.settings) && d.settings.__hidden === true;
|
|
87
|
+
if (named.some((d) => !here.has(d.id) && !hidden(d)))
|
|
88
|
+
return nodes;
|
|
89
|
+
const wanted = named.filter((d) => here.has(d.id)).map((d) => d.id);
|
|
90
|
+
const inDoc = new Set(wanted);
|
|
91
|
+
const remaining = nodes.filter((n) => n.id === undefined || inDoc.has(n.id));
|
|
92
|
+
let i = 0;
|
|
93
|
+
const ordered = remaining.map((n) => (n.id === undefined ? n : here.get(wanted[i++])));
|
|
94
|
+
const same = ordered.length === nodes.length && ordered.every((n, k) => n === nodes[k]);
|
|
95
|
+
return same ? nodes : ordered;
|
|
96
|
+
}
|
|
97
|
+
/** The theme settings the editor holds, laid over what the server rendered with. `null` = what was rendered. */
|
|
98
|
+
export function applyThemeSettings(rendered, current, msg) {
|
|
99
|
+
if (!isObj(msg) || msg.type !== THEME_SETTINGS_TYPE)
|
|
100
|
+
return current;
|
|
101
|
+
if (msg.settings === null)
|
|
102
|
+
return rendered;
|
|
103
|
+
return isObj(msg.settings) ? { ...rendered, ...msg.settings } : current;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The page's theme settings as an external store (preview only, like the section nodes). `finish` runs the theme's own
|
|
107
|
+
* settings hooks over the editor's settings laid over the render (effectiveSettings, then shopSettings with the page's
|
|
108
|
+
* shop record), as the server did: without it an empty colour in the editor's file hid the Settings > Brand colour the
|
|
109
|
+
* server had filled in (board 35 #110, Dev check 2026-11-24). Default: unchanged.
|
|
110
|
+
*/
|
|
111
|
+
export function createSettingsStore(rendered, finish = (s) => s) {
|
|
112
|
+
let current = rendered;
|
|
113
|
+
const listeners = new Set();
|
|
114
|
+
return {
|
|
115
|
+
get: () => current,
|
|
116
|
+
subscribe(l) {
|
|
117
|
+
listeners.add(l);
|
|
118
|
+
return () => listeners.delete(l);
|
|
119
|
+
},
|
|
120
|
+
apply(msg) {
|
|
121
|
+
const next = applyThemeSettings(rendered, current, msg);
|
|
122
|
+
if (next === current)
|
|
123
|
+
return;
|
|
124
|
+
current = next === rendered ? rendered : finish(next);
|
|
125
|
+
for (const l of listeners)
|
|
126
|
+
l();
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/** The page's section nodes as a small external store (React subscribes with useSyncExternalStore). */
|
|
131
|
+
export function createCanvasStore(initial) {
|
|
132
|
+
let nodes = initial;
|
|
133
|
+
const listeners = new Set();
|
|
134
|
+
return {
|
|
135
|
+
get: () => nodes,
|
|
136
|
+
subscribe(l) {
|
|
137
|
+
listeners.add(l);
|
|
138
|
+
return () => listeners.delete(l);
|
|
139
|
+
},
|
|
140
|
+
apply(msg) {
|
|
141
|
+
const next = applyCanvasMessage(nodes, msg);
|
|
142
|
+
if (next === nodes)
|
|
143
|
+
return;
|
|
144
|
+
nodes = next;
|
|
145
|
+
for (const l of listeners)
|
|
146
|
+
l();
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Connects the store to the bridge: every `tq:canvas` event is applied, and the theme announces what it applies —
|
|
152
|
+
* now, and again whenever a bridge says it started (it may load after this script).
|
|
153
|
+
*/
|
|
154
|
+
export function connectCanvas(win, store, makeEvent, settings) {
|
|
155
|
+
const announce = () => win.dispatchEvent(makeEvent(CANVAS_LIVE_EVENT, { types: [...LIVE_TYPES] }));
|
|
156
|
+
win.addEventListener(CANVAS_EVENT, (e) => { store.apply(e.detail); settings?.apply(e.detail); });
|
|
157
|
+
win.addEventListener(CANVAS_BRIDGE_EVENT, announce);
|
|
158
|
+
announce();
|
|
159
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The cart over Theme ABI v2 (theme-abi-v2.md §4): the same `useCart()` every section already uses,
|
|
3
|
+
* driven by `POST /_tq/actions/cart.*` and `GET /_tq/data/cart.get` instead of a GraphQL endpoint
|
|
4
|
+
* (wire envelope: lib/abi/wire.ts).
|
|
5
|
+
*
|
|
6
|
+
* - Identity is the platform's cart cookie — invisible to the theme. There is no cart id in
|
|
7
|
+
* localStorage any more; `cart.get` answers for the current shopper.
|
|
8
|
+
* - Every mutation carries the cart `version`; a stale version answers `cart_version_conflict`
|
|
9
|
+
* with the current cart, which is applied and the mutation retried once.
|
|
10
|
+
* - Server render never mutates (§4 A3): on the server `remote` is null, the cart route renders
|
|
11
|
+
* the cart the platform resolved (`snapshot().resource.cart`) and every other page renders the
|
|
12
|
+
* empty cart until the browser has asked for it.
|
|
13
|
+
* - A first `cart.get` that FAILS is not an empty cart (QA test-2 F1: a 429 showed "Your cart is
|
|
14
|
+
* empty" over a cart holding a line). `ready` stays false, `loadError` records the code, and the
|
|
15
|
+
* load is retried after the server's `Retry-After` (else exponential backoff). Surfaces show
|
|
16
|
+
* "Couldn't load your cart — retrying". An add before the cart has loaded reads it first; it
|
|
17
|
+
* never `cart.create`s over a cart it could not see.
|
|
18
|
+
*
|
|
19
|
+
* A refused write may say why (theme-abi Cart-1, alpha.13; Cart-3 adds a company location's quantity rule): `refusal`
|
|
20
|
+
* on the `invalid` CartResult, or `error.refusal` when `cart.create` is refused. It is kept for `lastRefusal()`, so the surface
|
|
21
|
+
* that made the write can word it ("You can buy up to 5 of this item").
|
|
22
|
+
*
|
|
23
|
+
* A line write the platform cut for stock (theme-abi Cart-2: the answered cart's `warnings`, the store's
|
|
24
|
+
* MERCHANDISE_OUT_OF_STOCK / MERCHANDISE_NOT_ENOUGH_STOCK) is accepted, but `add` does not pretend it worked: for the
|
|
25
|
+
* variant it added, `lastAddStock()` says `out_of_stock` (nothing added; `add` resolves false) or `not_enough_stock`
|
|
26
|
+
* with how many were added (false when none), counted from the line's quantity before and after.
|
|
27
|
+
*
|
|
28
|
+
* Not in the ABI cart, so not offered: gift-card codes and cart-level attributes after creation.
|
|
29
|
+
* Those methods resolve and set `error`, never pretend to succeed (MISMATCHES.md).
|
|
30
|
+
*/
|
|
31
|
+
import { type ReactNode } from 'react';
|
|
32
|
+
import type { Cart as AbiCart } from '@tanqory/theme-abi';
|
|
33
|
+
import { type CartAddStock, type CartRefusal } from '../runtime/kit/cart.js';
|
|
34
|
+
import { type AbiRemote } from './wire.js';
|
|
35
|
+
/**
|
|
36
|
+
* The refusal the platform sent with a refused write (theme-abi Cart-1 / Cart-3), or null. Only a code this
|
|
37
|
+
* theme knows counts: `cart_limit_exceeded` (`maxQuantity` only when it is a whole number of at least 1) and
|
|
38
|
+
* `quantity_rule` with a `rule` of `minimum`, `maximum` or `increment` (anything else is no refusal).
|
|
39
|
+
*/
|
|
40
|
+
export declare function refusalOf(raw: unknown): CartRefusal | null;
|
|
41
|
+
/**
|
|
42
|
+
* What stock let an add of `variantId` put in the cart (theme-abi Cart-2), from the answered cart's `warnings` on that
|
|
43
|
+
* variant's lines and each line's quantity `before` the write (by line id; a new line had 0). Null when no warning
|
|
44
|
+
* names such a line (nothing was cut, or the platform does not tell). A warning with an unknown code is ignored.
|
|
45
|
+
*/
|
|
46
|
+
export declare function addStockOf(cart: AbiCart | null, variantId: string, before: ReadonlyMap<string, number>): CartAddStock | null;
|
|
47
|
+
/** The wire code of a failed request, for `loadError` / `error`. */
|
|
48
|
+
export declare function wireCode(e: unknown): string;
|
|
49
|
+
/**
|
|
50
|
+
* When to try `cart.get` again after failure number `attempt` (0-based), or null when another try
|
|
51
|
+
* cannot help. The server's Retry-After wins; a 4xx that is not about timing (403
|
|
52
|
+
* capability_denied, 400 …) is final; everything else (network, 5xx, 429 without the header)
|
|
53
|
+
* backs off 1 s, 2 s, 4 s … up to 30 s.
|
|
54
|
+
*/
|
|
55
|
+
export declare function retryDelay(e: unknown, attempt: number): number | null;
|
|
56
|
+
export declare function AbiCartProvider({ initial, remote, children }: {
|
|
57
|
+
initial: AbiCart | null;
|
|
58
|
+
remote: AbiRemote | null;
|
|
59
|
+
children: ReactNode;
|
|
60
|
+
}): JSX.Element;
|