@zappie/theme-base 0.1.0 → 0.1.1

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 (3) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +26 -53
  3. package/package.json +7 -6
package/CHANGELOG.md ADDED
@@ -0,0 +1,30 @@
1
+ # @zappie/theme-base
2
+
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1e6f420: Each package now has a README written for people installing it from npm: what it does, how to install and use it, its entry points, and links to docs.zappie.ai. `@zappie/kit` gains its first README.
8
+ - Updated dependencies [38f23ac]
9
+ - Updated dependencies [1e6f420]
10
+ - @zappie/sdk@0.1.1
11
+ - @zappie/foundations@0.1.1
12
+ - @zappie/tokens@0.1.1
13
+
14
+ ## 0.1.0
15
+
16
+ ### Minor Changes
17
+
18
+ - - `@zappie/tokens`: Publish the semantic storefront token contract, CSS aliases, validation and compilation tools.
19
+ - `@zappie/sdk`: Publish the framework-agnostic storefront client and its React, server, checkout, customer, places, visits and URL entries.
20
+ - `@zappie/foundations`: Publish accessible, unstyled React primitives for storefront catalogue, item, fulfilment and cart experiences.
21
+ - `@zappie/theme-base`: Publish the reusable base storefront theme and its catalogue, item and cart surfaces.
22
+ - `@zappie/kit`: Publish the built component registry consumed by the Zappie CLI.
23
+ - `zappie`: Publish the component CLI with `add`, `list` and `diff`.
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+ - @zappie/tokens@0.1.0
29
+ - @zappie/sdk@0.1.0
30
+ - @zappie/foundations@0.1.0
package/README.md CHANGED
@@ -1,65 +1,38 @@
1
- # Base storefront theme
1
+ # @zappie/theme-base
2
2
 
3
- Workstream 06, Stage A, PR 3: the cart now supports configured lines, quantity
4
- changes, editing, removal, issue fixes, server-quoted totals and the existing
5
- host payment flow. Empty and loading states use the same foundations overlay.
3
+ The base storefront theme that Zappie's own storefront app renders: the catalogue, item sheets, cart and checkout steps. It's built only from Zappie's public packages, `@zappie/sdk`, `@zappie/foundations` and `@zappie/tokens`, so it also shows how far those packages go on their own.
6
4
 
7
- The adapter seeds the existing host pickup/delivery choice. Fulfilment, address,
8
- schedule and promo editors follow in PR 4; a new delivery address cannot yet be
9
- entered in this cart. Pickup provides the end-to-end payment test path.
5
+ ```sh
6
+ npm install @zappie/theme-base
7
+ ```
10
8
 
11
- The host basket owns initial lines during migration. `connectBasketBridge`
12
- reconciles complete snapshots into the SDK and mirrors subsequent SDK edits
13
- back into the same legacy storage bucket. Line identities, choices, notes and
14
- unavailable-item issues survive. A private SDK import seam makes this atomic;
15
- no backend API or public cart method changes. Scope changes detach the bridge.
9
+ React 19.2 is a peer dependency.
16
10
 
17
- `@zappie/theme-base/host-bridge` exposes the temporary provider contract for
18
- payment, sign-in, customer details and address suggestions. The host checks a
19
- current quote and synchronized basket, closes the cart through foundations,
20
- waits for the URL change and cart unmount, and only then starts the existing
21
- payment flow. Sign-in similarly releases the foundations modal before invoking
22
- the host auth callback, which restores the cart after authentication.
23
- Address lookup uses the existing host Places endpoint. Fulfilment must match
24
- the current host branch and pickup/delivery bucket before checkout.
11
+ ## Who it's for
25
12
 
26
- Use `pnpm dev` and open an existing test store with
27
- `?template=base-next&modal_id=review-menu`. Below 1024px the cart is a full-height
28
- swipeable drawer; from 1024px it is a centred dialog. Deep-link close retains
29
- the store URL. All other storefront templates retain their existing cart.
13
+ Zappie's storefront app mounts this theme and supplies payment, sign-in, rewards and delivery regions through `@zappie/theme-base/host-bridge`. That bridge is a temporary contract with Zappie's own app. It will be replaced, so it isn't a stable way to run the theme in your own project.
30
14
 
31
- `theme.json` copies the approved default-template tokens. Regenerate the scoped
32
- CSS with `pnpm base-next:tokens`. Explicit `.dark` / `data-theme="dark"` choices
33
- use dark tokens; the default ignores the operating-system preference.
15
+ Building your own storefront or template? Start from `@zappie/sdk`, `@zappie/foundations` and the kit's copy-in components (`npx zappie add <name>`). Use this theme as a reference for how the parts fit together.
34
16
 
35
- The host adapters in `lib/templates/base-next` reuse the default catalogue,
36
- manifest and SEO. This package imports only public commerce packages. The
37
- host-side seam owns its provider and legacy template contract.
17
+ ## Entry points
38
18
 
39
- Registration is build-time gated: production serves base-next only with
40
- `ZAPPIE_ENABLE_BASE_NEXT=1`. The generated registry contains static gated entries;
41
- builds do not rewrite tracked files. Workspace themes never enter artifact
42
- admission. The external-template development host keeps its existing cart.
19
+ | Import | For |
20
+ | ------------------------------------------------------ | --------------------------------------------------- |
21
+ | `@zappie/theme-base/catalogue`, `/item`, `/item-frame` | The menu and item views |
22
+ | `@zappie/theme-base/cart` and `/checkout` | The cart and checkout steps |
23
+ | `@zappie/theme-base/address` and `/navigation` | Address entry and in-page navigation |
24
+ | `@zappie/theme-base/styles.css` | The theme's styles, scoped to its own root |
25
+ | `@zappie/theme-base/host-bridge` | The temporary contract with Zappie's storefront app |
43
26
 
44
- `pnpm base-next:metrics` updates `docs/base-next-metrics.json`, preserving the
45
- pre-migration baseline. Counts cover the explicit PRD legacy paths and all
46
- non-test cart source. CSS totals include compiled tokens; legacy shared CSS
47
- cannot be attributed to cart alone. These incremental metrics are not a claim of
48
- full cart parity or a completed Stage A reduction.
27
+ ## Docs
49
28
 
50
- The catalogue is exported from `@zappie/theme-base/catalogue`. A template wraps
51
- it in `CatalogueNavigationProvider` from `@zappie/theme-base/navigation`, using
52
- its own router implementation or the framework-independent
53
- `createUrlNavigation()` default. Item links and URL state come from that
54
- navigation context. `initialMenu` contains menus/categories and no items;
55
- the supplied policy chooses eager or progressive reads. `orderAction` supplies
56
- the Place/Schedule/View label. Search's controlled source performs bounded
57
- reads, and themeClass reaches mobile overlay portals.
29
+ - [Open Storefronts](https://docs.zappie.ai/open-storefronts)
30
+ - [Build a storefront](https://docs.zappie.ai/guides/build-a-storefront)
58
31
 
59
- ## Visit counting
32
+ ## Status
60
33
 
61
- A template app calls `countPage` from `@zappie/sdk/visits` after each route
62
- change, with `enabled: false` in editors and previews. The base screens then
63
- count successful item adds and cart opens, and attach the visit's source and
64
- campaign to SDK checkout. The current Next app does not call `countPage`, so
65
- these events remain disabled there.
34
+ The theme is at `0.x`. It changes with Zappie's storefront app, and any release can change its entry points. Each change is listed in `CHANGELOG.md`.
35
+
36
+ ## License
37
+
38
+ MIT
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zappie/theme-base",
3
- "version": "0.1.0",
4
- "description": "The base Zappie storefront theme, built only from public packages (template id base-next).",
3
+ "version": "0.1.1",
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": [
7
7
  "**/*.css"
@@ -50,12 +50,13 @@
50
50
  "provenance": false
51
51
  },
52
52
  "files": [
53
- "dist"
53
+ "dist",
54
+ "CHANGELOG.md"
54
55
  ],
55
56
  "dependencies": {
56
- "@zappie/foundations": "^0.1.0",
57
- "@zappie/sdk": "^0.1.0",
58
- "@zappie/tokens": "^0.1.0"
57
+ "@zappie/foundations": "^0.1.1",
58
+ "@zappie/sdk": "^0.1.1",
59
+ "@zappie/tokens": "^0.1.1"
59
60
  },
60
61
  "peerDependencies": {
61
62
  "react": "^19.2.0"