@zappie/theme-base 0.0.0-stage → 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.
- package/CHANGELOG.md +30 -0
- package/LICENSE +21 -0
- package/README.md +37 -2
- package/dist/address.d.ts +32 -0
- package/dist/address.js +4 -0
- package/dist/address.js.map +1 -0
- package/dist/cart.d.ts +12 -0
- package/dist/cart.js +1140 -0
- package/dist/cart.js.map +1 -0
- package/dist/catalogue.d.ts +60 -0
- package/dist/catalogue.js +1389 -0
- package/dist/catalogue.js.map +1 -0
- package/dist/checkout.d.ts +36 -0
- package/dist/checkout.js +4 -0
- package/dist/checkout.js.map +1 -0
- package/dist/chunk-2MV6KU3R.js +352 -0
- package/dist/chunk-2MV6KU3R.js.map +1 -0
- package/dist/chunk-FB5DRCU7.js +146 -0
- package/dist/chunk-FB5DRCU7.js.map +1 -0
- package/dist/chunk-IG63ONID.js +139 -0
- package/dist/chunk-IG63ONID.js.map +1 -0
- package/dist/chunk-ILOCSCZL.js +217 -0
- package/dist/chunk-ILOCSCZL.js.map +1 -0
- package/dist/chunk-JFEI2OUZ.js +13 -0
- package/dist/chunk-JFEI2OUZ.js.map +1 -0
- package/dist/chunk-NTJONY3N.js +95 -0
- package/dist/chunk-NTJONY3N.js.map +1 -0
- package/dist/chunk-QWST2TA2.js +22 -0
- package/dist/chunk-QWST2TA2.js.map +1 -0
- package/dist/chunk-USSLDBDY.js +48 -0
- package/dist/chunk-USSLDBDY.js.map +1 -0
- package/dist/chunk-VIAJ27YC.js +59 -0
- package/dist/chunk-VIAJ27YC.js.map +1 -0
- package/dist/host-bridge.d.ts +100 -0
- package/dist/host-bridge.js +4 -0
- package/dist/host-bridge.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/item-frame.d.ts +20 -0
- package/dist/item-frame.js +5 -0
- package/dist/item-frame.js.map +1 -0
- package/dist/item.d.ts +20 -0
- package/dist/item.js +153 -0
- package/dist/item.js.map +1 -0
- package/dist/navigation.d.ts +64 -0
- package/dist/navigation.js +4 -0
- package/dist/navigation.js.map +1 -0
- package/dist/styles.css +842 -0
- package/package.json +74 -3
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/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Zappie
|
|
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,3 +1,38 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @zappie/theme-base
|
|
2
2
|
|
|
3
|
-
|
|
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.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install @zappie/theme-base
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
React 19.2 is a peer dependency.
|
|
10
|
+
|
|
11
|
+
## Who it's for
|
|
12
|
+
|
|
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.
|
|
14
|
+
|
|
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.
|
|
16
|
+
|
|
17
|
+
## Entry points
|
|
18
|
+
|
|
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 |
|
|
26
|
+
|
|
27
|
+
## Docs
|
|
28
|
+
|
|
29
|
+
- [Open Storefronts](https://docs.zappie.ai/open-storefronts)
|
|
30
|
+
- [Build a storefront](https://docs.zappie.ai/guides/build-a-storefront)
|
|
31
|
+
|
|
32
|
+
## Status
|
|
33
|
+
|
|
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
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { DeliveryAddress } from '@zappie/sdk';
|
|
3
|
+
import { PlacesClient } from '@zappie/sdk/places';
|
|
4
|
+
import { ComponentType, ReactNode } from 'react';
|
|
5
|
+
|
|
6
|
+
type AddressSuggestion = {
|
|
7
|
+
placeId: string;
|
|
8
|
+
address: string;
|
|
9
|
+
sessionToken?: string;
|
|
10
|
+
};
|
|
11
|
+
type AddressLookup = {
|
|
12
|
+
suggest(query: string): Promise<AddressSuggestion[]>;
|
|
13
|
+
reverse?(coordinates: {
|
|
14
|
+
lat: number;
|
|
15
|
+
lng: number;
|
|
16
|
+
}): Promise<DeliveryAddress>;
|
|
17
|
+
resolve?(address: DeliveryAddress, sessionToken?: string): Promise<DeliveryAddress>;
|
|
18
|
+
Map?: ComponentType<{
|
|
19
|
+
address: DeliveryAddress;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
declare function AddressLookupProvider({ lookup, children, }: {
|
|
23
|
+
lookup: AddressLookup;
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}): react_jsx_runtime.JSX.Element;
|
|
26
|
+
declare function useAddressLookup(): AddressLookup;
|
|
27
|
+
declare function createSdkAddressLookup({ places, branchId, }: {
|
|
28
|
+
places: PlacesClient;
|
|
29
|
+
branchId: string;
|
|
30
|
+
}): AddressLookup;
|
|
31
|
+
|
|
32
|
+
export { type AddressLookup, AddressLookupProvider, type AddressSuggestion, createSdkAddressLookup, useAddressLookup };
|
package/dist/address.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"address.js"}
|
package/dist/cart.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `themeClass` lets a template reuse this cart under its own design: the class
|
|
5
|
+
* is added to every overlay root, so the template's tokens (compiled under
|
|
6
|
+
* that class) and its own rules apply. Without it the cart uses the base theme.
|
|
7
|
+
*/
|
|
8
|
+
declare function CartReview({ themeClass }?: {
|
|
9
|
+
themeClass?: string;
|
|
10
|
+
}): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { CartReview };
|