@zappie/kit 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @zappie/kit
|
|
2
2
|
|
|
3
|
+
## 0.1.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4f55e71: `Schedule` tells loading and failed hours apart from a closed branch. While the branch's menu hours load or after they fail, `days` and `slots` are empty and `canAsap` is false, which looked the same as a closed branch, so a site could say the branch wasn't taking orders while it was open.
|
|
8
|
+
|
|
9
|
+
`ScheduleState` adds `status` (`"loading"`, `"error"` or `"ready"`), `retry()`, which loads the hours again after an error, and `isClosed`, true only when the hours are known and nothing can be ordered. Show a loading or error state until `status` is `"ready"`, and say the branch is closed only when `isClosed` is true. The `Schedule` element adds `data-status`, sets `aria-busy` while loading and sets `data-invalid` only once the hours are known. `ScheduleStatus` is exported.
|
|
10
|
+
|
|
11
|
+
The kit's and the starter's schedule picker (registry item `schedule-picker` 1.1.0, which requires `@zappie/foundations` ^0.7.0) show "Checking opening hours…" while loading, "Couldn’t load opening hours." with a "Try again" button after an error, and "<branch> isn’t taking orders right now." when the branch is closed.
|
|
12
|
+
|
|
3
13
|
## 0.1.11
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"2026-10-10","items":[{"name":"account-page","type":"block","version":"1.3.0","title":"Account page","description":"Show your profile, manage saved addresses, open your Zappie account and contact the branch or Zappie support."},{"name":"address-picker","type":"component","version":"1.0.0","title":"Address picker","description":"Find delivery addresses and show them on a map."},{"name":"cart-button","type":"component","version":"1.1.1","title":"Cart button","description":"Open the cart from a floating or inline button with count and subtotal."},{"name":"cart-drawer","type":"component","version":"1.1.0","title":"Cart drawer","description":"Show cart lines, issues and totals in a responsive drawer."},{"name":"cart-line","type":"component","version":"1.0.0","title":"Cart line","description":"Show options and let shoppers change quantity or remove a line."},{"name":"category-nav","type":"component","version":"1.0.0","title":"Category navigation","description":"Navigate categories with tabs that follow scrolling."},{"name":"checkout-button","type":"component","version":"1.1.1","title":"Checkout button","description":"Open checkout with quote checks, safe retries and visit attribution."},{"name":"checkout-page","type":"block","version":"1.0.1","title":"Checkout page","description":"Collect contact and delivery details, resolve cart issues and continue to payment."},{"name":"checkout-return","type":"block","version":"1.0.0","title":"Checkout return","description":"Confirm payment and link to the completed order."},{"name":"consent","type":"component","version":"1.0.0","title":"Consent","description":"Save your privacy choice and withdraw consent when you choose."},{"name":"fulfilment-switch","type":"component","version":"1.0.0","title":"Fulfilment switch","description":"Choose pickup or delivery from the branch options."},{"name":"item-card","type":"component","version":"1.1.0","title":"Item card","description":"Show an item, its price, availability and cart feedback."},{"name":"item-sheet","type":"component","version":"1.0.0","title":"Item sheet","description":"Let shoppers configure an item, with optional v2 URL navigation."},{"name":"menu-page","type":"block","version":"1.0.0","title":"Menu page","description":"Combine the catalogue, item view and cart in your framework."},{"name":"money","type":"component","version":"1.0.0","title":"Money","description":"Format SDK money with your theme styles."},{"name":"open-status","type":"component","version":"1.0.0","title":"Open status","description":"Show whether a branch is open and when that changes."},{"name":"order-page","type":"block","version":"1.0.0","title":"Order page","description":"Show order progress and your support links."},{"name":"order-status","type":"component","version":"1.0.0","title":"Order status","description":"Show live order progress, items and totals."},{"name":"orders-page","type":"block","version":"1.0.0","title":"Orders page","description":"Browse your orders and load older orders."},{"name":"provider","type":"component","version":"1.0.0","title":"Zappie provider","description":"Create a storefront client and apply scoped tokens and fonts."},{"name":"quantity","type":"component","version":"1.0.0","title":"Quantity","description":"Adjust quantity within its limits."},{"name":"schedule-picker","type":"component","version":"1.
|
|
1
|
+
{"version":"2026-10-10","items":[{"name":"account-page","type":"block","version":"1.3.0","title":"Account page","description":"Show your profile, manage saved addresses, open your Zappie account and contact the branch or Zappie support."},{"name":"address-picker","type":"component","version":"1.0.0","title":"Address picker","description":"Find delivery addresses and show them on a map."},{"name":"cart-button","type":"component","version":"1.1.1","title":"Cart button","description":"Open the cart from a floating or inline button with count and subtotal."},{"name":"cart-drawer","type":"component","version":"1.1.0","title":"Cart drawer","description":"Show cart lines, issues and totals in a responsive drawer."},{"name":"cart-line","type":"component","version":"1.0.0","title":"Cart line","description":"Show options and let shoppers change quantity or remove a line."},{"name":"category-nav","type":"component","version":"1.0.0","title":"Category navigation","description":"Navigate categories with tabs that follow scrolling."},{"name":"checkout-button","type":"component","version":"1.1.1","title":"Checkout button","description":"Open checkout with quote checks, safe retries and visit attribution."},{"name":"checkout-page","type":"block","version":"1.0.1","title":"Checkout page","description":"Collect contact and delivery details, resolve cart issues and continue to payment."},{"name":"checkout-return","type":"block","version":"1.0.0","title":"Checkout return","description":"Confirm payment and link to the completed order."},{"name":"consent","type":"component","version":"1.0.0","title":"Consent","description":"Save your privacy choice and withdraw consent when you choose."},{"name":"fulfilment-switch","type":"component","version":"1.0.0","title":"Fulfilment switch","description":"Choose pickup or delivery from the branch options."},{"name":"item-card","type":"component","version":"1.1.0","title":"Item card","description":"Show an item, its price, availability and cart feedback."},{"name":"item-sheet","type":"component","version":"1.0.0","title":"Item sheet","description":"Let shoppers configure an item, with optional v2 URL navigation."},{"name":"menu-page","type":"block","version":"1.0.0","title":"Menu page","description":"Combine the catalogue, item view and cart in your framework."},{"name":"money","type":"component","version":"1.0.0","title":"Money","description":"Format SDK money with your theme styles."},{"name":"open-status","type":"component","version":"1.0.0","title":"Open status","description":"Show whether a branch is open and when that changes."},{"name":"order-page","type":"block","version":"1.0.0","title":"Order page","description":"Show order progress and your support links."},{"name":"order-status","type":"component","version":"1.0.0","title":"Order status","description":"Show live order progress, items and totals."},{"name":"orders-page","type":"block","version":"1.0.0","title":"Orders page","description":"Browse your orders and load older orders."},{"name":"provider","type":"component","version":"1.0.0","title":"Zappie provider","description":"Create a storefront client and apply scoped tokens and fonts."},{"name":"quantity","type":"component","version":"1.0.0","title":"Quantity","description":"Adjust quantity within its limits."},{"name":"schedule-picker","type":"component","version":"1.1.0","title":"Schedule picker","description":"Choose ASAP or an available time for the cart."},{"name":"search","type":"component","version":"1.0.0","title":"Search","description":"Search the menu as shoppers type and discard outdated results."},{"name":"sign-in-button","type":"component","version":"1.0.0","title":"Sign-in button","description":"Show customer sign-in and sign-out controls."},{"name":"store-footer","type":"component","version":"1.0.0","title":"Store footer","description":"Show branch contacts, social links and your legal links."},{"name":"store-header","type":"component","version":"1.1.0","title":"Store header","description":"Show store details, opening status and fulfilment."}]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"https://registry.zappie.ai/v1/schema/item.json","name":"schedule-picker","type":"component","version":"1.
|
|
1
|
+
{"$schema":"https://registry.zappie.ai/v1/schema/item.json","name":"schedule-picker","type":"component","version":"1.1.0","title":"Schedule picker","description":"Choose ASAP or an available time for the cart.","requires":{"@zappie/foundations":"^0.7.0","@zappie/sdk":"^0.1.0","@zappie/tokens":"^0.1.0"},"dependencies":{},"registryDependencies":[],"files":[{"path":"schedule-picker.tsx","target":"components/zappie/schedule-picker.tsx","sha256":"c13e87a1d86f94ee0a78bbc03ecfd8d92a8db431c06498490fc647d28ddb45c3","content":"\"use client\";\n\nimport { Schedule } from \"@zappie/foundations\";\nimport type { Branch, CartFulfilment } from \"@zappie/sdk\";\nimport { useCart } from \"@zappie/sdk/react\";\nimport \"./schedule-picker.css\";\n\nexport type SchedulePickerProps = { branch: Branch };\n\nfunction scheduled(value: CartFulfilment, scheduledFor: string | null) {\n if (value.type === \"dine_in\") {\n return value;\n }\n const { scheduledFor: _current, ...rest } = value;\n return scheduledFor ? { ...rest, scheduledFor } : rest;\n}\n\nexport function SchedulePicker({ branch }: SchedulePickerProps) {\n const cart = useCart();\n const fulfilment = cart.fulfilment;\n const value =\n fulfilment && fulfilment.type !== \"dine_in\"\n ? (fulfilment.scheduledFor ?? null)\n : null;\n const change = (next: string | null) => {\n if (fulfilment) {\n cart.actions.setFulfilment(scheduled(fulfilment, next));\n }\n };\n return (\n <Schedule\n branch={branch}\n value={value}\n onValueChange={change}\n className=\"z-kit-schedule-picker\"\n aria-label=\"Order time\"\n >\n {({ status, retry, isClosed, days, canAsap, isAsap, setValue }) =>\n status === \"loading\" ? (\n <p role=\"status\">Checking opening hours…</p>\n ) : status === \"error\" ? (\n <div role=\"alert\">\n <p>Couldn’t load opening hours.</p>\n <button type=\"button\" onClick={retry}>\n Try again\n </button>\n </div>\n ) : (\n <div>\n {isClosed && <p>{branch.name} isn’t taking orders right now.</p>}\n <button\n type=\"button\"\n aria-pressed={isAsap}\n disabled={!canAsap}\n onClick={() => setValue(null)}\n >\n ASAP\n </button>\n {days.map((day) => (\n <fieldset key={day.date}>\n <legend>{day.date}</legend>\n {day.slots.map((slot) => (\n <button\n key={slot.value}\n type=\"button\"\n aria-pressed={value === slot.value}\n onClick={() => setValue(slot.value)}\n >\n {slot.label}\n </button>\n ))}\n </fieldset>\n ))}\n </div>\n )\n }\n </Schedule>\n );\n}\n"},{"path":"schedule-picker.css","target":"components/zappie/schedule-picker.css","sha256":"0252947a1bf9e31db29f973fac12298fd5199b9d5b3de1616558afc35a6e4f53","content":".z-kit-schedule-picker > div {\n display: grid;\n gap: var(--z-space-3);\n color: var(--z-text);\n font-family: var(--z-font-body);\n}\n\n.z-kit-schedule-picker p {\n margin: 0;\n color: var(--z-text-muted);\n}\n\n.z-kit-schedule-picker fieldset {\n display: flex;\n flex-wrap: wrap;\n gap: var(--z-space-2);\n border: 0;\n padding: 0;\n}\n\n.z-kit-schedule-picker legend {\n width: 100%;\n margin-bottom: var(--z-space-2);\n color: var(--z-text-muted);\n}\n\n.z-kit-schedule-picker button {\n border: 1px solid var(--z-border);\n border-radius: var(--z-radius-pill);\n padding: var(--z-space-2) var(--z-space-3);\n background: var(--z-surface);\n color: var(--z-text);\n cursor: pointer;\n}\n\n.z-kit-schedule-picker button[aria-pressed=\"true\"] {\n border-color: var(--z-accent);\n background: var(--z-accent);\n color: var(--z-accent-contrast);\n}\n\n.z-kit-schedule-picker button:focus-visible {\n outline: 2px solid var(--z-focus-ring);\n outline-offset: 2px;\n}\n"}],"tokens":["--z-space-2","--z-space-3","--z-border","--z-radius-pill","--z-surface","--z-text","--z-text-muted","--z-accent","--z-accent-contrast","--z-focus-ring","--z-font-body"],"frameworks":["react-router","next","vite","astro-react"],"docs":"https://docs.zappie.ai/kit/schedule-picker"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zappie/kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "The registry of copy-in Zappie storefront components, installed with the zappie CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"vite": "8.3.5",
|
|
21
21
|
"vitest": "^4.1.12",
|
|
22
22
|
"zod": "^4.6.7",
|
|
23
|
-
"@zappie/foundations": "^0.
|
|
24
|
-
"@zappie/sdk": "^0.
|
|
23
|
+
"@zappie/foundations": "^0.7.0",
|
|
24
|
+
"@zappie/sdk": "^0.7.0",
|
|
25
25
|
"@zappie/tokens": "^0.1.3"
|
|
26
26
|
},
|
|
27
27
|
"license": "MIT",
|