@cimplify/sdk 0.44.12 → 0.44.16
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/dist/advanced.d.mts +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/advanced.js +21 -21
- package/dist/advanced.mjs +2 -2
- package/dist/{chunk-6TVQQYQ5.mjs → chunk-6AZZ6AOF.mjs} +21 -1
- package/dist/{chunk-EZK2FXTM.mjs → chunk-7NML226B.mjs} +1 -1
- package/dist/{chunk-BAWKQRIB.js → chunk-CFD4J32N.js} +21 -21
- package/dist/{chunk-OMAP327U.js → chunk-MBGQP6FZ.js} +62 -61
- package/dist/{chunk-V2O5AO7I.js → chunk-MNIKXG7W.js} +26 -0
- package/dist/{chunk-3WD6U5RD.mjs → chunk-UXLQ7WXI.mjs} +4 -3
- package/dist/chunk-XL4CX75J.js +9370 -0
- package/dist/chunk-ZLEFMQC6.mjs +9318 -0
- package/dist/cli/commands/deploy.mjs +9 -1
- package/dist/{client-lvLvB1_K.d.ts → client-D6ZisKco.d.ts} +7 -0
- package/dist/{client-CkGlXZRd.d.mts → client-Dh-bHyhU.d.mts} +7 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +106 -106
- package/dist/index.mjs +3 -3
- package/dist/mock/cli.mjs +172 -23
- package/dist/mock/library.d.mts +2 -2
- package/dist/mock/library.d.ts +2 -2
- package/dist/mock/library.js +172 -23
- package/dist/mock/library.mjs +172 -23
- package/dist/mock/msw.d.mts +1 -1
- package/dist/mock/msw.d.ts +1 -1
- package/dist/mock/msw.js +172 -23
- package/dist/mock/msw.mjs +172 -23
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +80 -80
- package/dist/react.mjs +3 -3
- package/dist/server-CWpUlLOQ.d.mts +1003 -0
- package/dist/server-CWpUlLOQ.d.ts +1003 -0
- package/dist/{server-CUbuQxOV.d.ts → server-CnECAQDQ.d.mts} +28 -6
- package/dist/{server-CUbuQxOV.d.mts → server-CnECAQDQ.d.ts} +28 -6
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/dist/testing/suite.d.mts +60 -0
- package/dist/testing/suite.d.ts +60 -0
- package/dist/testing/suite.js +169 -0
- package/dist/testing/suite.mjs +165 -0
- package/dist/testing.d.mts +1359 -0
- package/dist/testing.d.ts +1359 -0
- package/dist/testing.js +213 -0
- package/dist/testing.mjs +4 -0
- package/dist/utils.js +28 -28
- package/dist/utils.mjs +1 -1
- package/package.json +18 -3
- package/registry/account.json +15 -0
- package/registry/billing-plan-selector.json +16 -0
- package/registry/cart-drawer.json +17 -0
- package/registry/currency-selector.json +15 -0
- package/registry/customer-input-fields.json +15 -0
- package/registry/delivery-estimate.json +16 -0
- package/registry/index.json +105 -0
- package/registry/location-picker.json +15 -0
- package/registry/recently-viewed.json +16 -0
- package/registry/recommendation-carousel.json +16 -0
- package/registry/resource-picker.json +15 -0
- package/registry/session-message-banner.json +15 -0
- package/templates/storefront-bakery/AGENTS.md +12 -0
- package/templates/storefront-bakery/__tests__/brand.test.ts +4 -0
- package/templates/storefront-bakery/__tests__/cart-flow.test.ts +4 -0
- package/templates/storefront-bakery/__tests__/contract.test.ts +4 -0
- package/templates/storefront-bakery/package.json +11 -3
- package/templates/storefront-bakery/vitest.config.ts +9 -0
- package/templates/storefront-fashion/AGENTS.md +21 -1
- package/templates/storefront-fashion/__tests__/brand.test.ts +4 -0
- package/templates/storefront-fashion/__tests__/cart-flow.test.ts +4 -0
- package/templates/storefront-fashion/__tests__/contract.test.ts +4 -0
- package/templates/storefront-fashion/package.json +11 -3
- package/templates/storefront-fashion/vitest.config.ts +9 -0
- package/templates/storefront-grocery/AGENTS.md +12 -0
- package/templates/storefront-grocery/__tests__/brand.test.ts +4 -0
- package/templates/storefront-grocery/__tests__/cart-flow.test.ts +4 -0
- package/templates/storefront-grocery/__tests__/contract.test.ts +4 -0
- package/templates/storefront-grocery/package.json +11 -3
- package/templates/storefront-grocery/vitest.config.ts +9 -0
- package/templates/storefront-restaurant/AGENTS.md +12 -0
- package/templates/storefront-restaurant/__tests__/brand.test.ts +4 -0
- package/templates/storefront-restaurant/__tests__/cart-flow.test.ts +4 -0
- package/templates/storefront-restaurant/__tests__/contract.test.ts +4 -0
- package/templates/storefront-restaurant/package.json +11 -3
- package/templates/storefront-restaurant/vitest.config.ts +9 -0
- package/templates/storefront-retail/AGENTS.md +12 -0
- package/templates/storefront-retail/__tests__/brand.test.ts +4 -0
- package/templates/storefront-retail/__tests__/cart-flow.test.ts +4 -0
- package/templates/storefront-retail/__tests__/contract.test.ts +4 -0
- package/templates/storefront-retail/package.json +11 -3
- package/templates/storefront-retail/vitest.config.ts +9 -0
- package/templates/storefront-services/AGENTS.md +12 -0
- package/templates/storefront-services/__tests__/brand.test.ts +4 -0
- package/templates/storefront-services/__tests__/cart-flow.test.ts +4 -0
- package/templates/storefront-services/__tests__/contract.test.ts +4 -0
- package/templates/storefront-services/package.json +11 -3
- package/templates/storefront-services/vitest.config.ts +9 -0
|
@@ -8,10 +8,17 @@
|
|
|
8
8
|
"dev:mock": "bunx @cimplify/sdk --seed restaurant",
|
|
9
9
|
"build": "next build",
|
|
10
10
|
"start": "next start",
|
|
11
|
-
"lint": "next lint"
|
|
11
|
+
"lint": "next lint",
|
|
12
|
+
"typecheck": "tsc --noEmit",
|
|
13
|
+
"test": "vitest",
|
|
14
|
+
"test:run": "vitest run",
|
|
15
|
+
"check:brand": "vitest run __tests__/brand.test.ts",
|
|
16
|
+
"check:cart": "vitest run __tests__/cart-flow.test.ts",
|
|
17
|
+
"check:contract": "vitest run __tests__/contract.test.ts",
|
|
18
|
+
"check": "bun run typecheck && bun run lint && bun run test:run"
|
|
12
19
|
},
|
|
13
20
|
"dependencies": {
|
|
14
|
-
"@cimplify/sdk": "^0.44.
|
|
21
|
+
"@cimplify/sdk": "^0.44.14",
|
|
15
22
|
"next": "^16.2.4",
|
|
16
23
|
"react": "^19.0.0",
|
|
17
24
|
"react-dom": "^19.0.0"
|
|
@@ -23,6 +30,7 @@
|
|
|
23
30
|
"@types/react-dom": "^19.0.0",
|
|
24
31
|
"concurrently": "^9.0.0",
|
|
25
32
|
"tailwindcss": "^4.2.4",
|
|
26
|
-
"typescript": "^5.9.3"
|
|
33
|
+
"typescript": "^5.9.3",
|
|
34
|
+
"vitest": "^4.1.5"
|
|
27
35
|
}
|
|
28
36
|
}
|
|
@@ -95,6 +95,18 @@ app/
|
|
|
95
95
|
|
|
96
96
|
Wired to `--seed retail` (Currents Electronics). Edit `dev:mock` in `package.json` to preview another seed.
|
|
97
97
|
|
|
98
|
+
## Customizing SDK components
|
|
99
|
+
|
|
100
|
+
For anything beyond `lib/brand.ts` + `app/globals.css`, lean on the SDK's prebuilt components rather than reinvent. **Especially for product customization** (variants, add-ons, bundles, composites, services with scheduling) — the SDK already gets price math, axis matching, and cart payload contracts right. Default to ejecting and restyling:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
bunx @cimplify/sdk add cart-drawer
|
|
104
|
+
bunx @cimplify/sdk add variant-selector
|
|
105
|
+
bunx @cimplify/sdk add product-page
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Then edit the local copy. **Don't change the cart payload shape** unless you're also touching the SDK mock + backend lens. Full ejection rules and the customizer contract are in the SDK-level [`AGENTS.md`](../../AGENTS.md) → "Don't reinvent product customization".
|
|
109
|
+
|
|
98
110
|
## Quick start
|
|
99
111
|
|
|
100
112
|
```bash
|
|
@@ -8,10 +8,17 @@
|
|
|
8
8
|
"dev:mock": "bunx @cimplify/sdk --seed retail",
|
|
9
9
|
"build": "next build",
|
|
10
10
|
"start": "next start",
|
|
11
|
-
"lint": "next lint"
|
|
11
|
+
"lint": "next lint",
|
|
12
|
+
"typecheck": "tsc --noEmit",
|
|
13
|
+
"test": "vitest",
|
|
14
|
+
"test:run": "vitest run",
|
|
15
|
+
"check:brand": "vitest run __tests__/brand.test.ts",
|
|
16
|
+
"check:cart": "vitest run __tests__/cart-flow.test.ts",
|
|
17
|
+
"check:contract": "vitest run __tests__/contract.test.ts",
|
|
18
|
+
"check": "bun run typecheck && bun run lint && bun run test:run"
|
|
12
19
|
},
|
|
13
20
|
"dependencies": {
|
|
14
|
-
"@cimplify/sdk": "^0.44.
|
|
21
|
+
"@cimplify/sdk": "^0.44.14",
|
|
15
22
|
"next": "^16.2.4",
|
|
16
23
|
"react": "^19.0.0",
|
|
17
24
|
"react-dom": "^19.0.0"
|
|
@@ -23,6 +30,7 @@
|
|
|
23
30
|
"@types/react-dom": "^19.0.0",
|
|
24
31
|
"concurrently": "^9.0.0",
|
|
25
32
|
"tailwindcss": "^4.2.4",
|
|
26
|
-
"typescript": "^5.9.3"
|
|
33
|
+
"typescript": "^5.9.3",
|
|
34
|
+
"vitest": "^4.1.5"
|
|
27
35
|
}
|
|
28
36
|
}
|
|
@@ -79,6 +79,18 @@ app/
|
|
|
79
79
|
- `/book` widget shows every slot as available. For production, wire `useAvailableSlots({ serviceId, date })` from `@cimplify/sdk/react` to filter to genuinely-free windows.
|
|
80
80
|
- Contact + newsletter fake submits.
|
|
81
81
|
|
|
82
|
+
## Customizing SDK components
|
|
83
|
+
|
|
84
|
+
For anything beyond `lib/brand.ts` + `app/globals.css`, lean on the SDK's prebuilt components rather than reinvent. **Especially for service scheduling, booking widgets, and add-on selectors** — the SDK already gets price math, slot matching, and cart payload contracts right. Default to ejecting and restyling:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
bunx @cimplify/sdk add cart-drawer
|
|
88
|
+
bunx @cimplify/sdk add product-page
|
|
89
|
+
bunx @cimplify/sdk add booking-card
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Then edit the local copy. **Don't change the cart payload shape** (`scheduled_start`, `scheduled_end`, `staff_id`, `customer_inputs`, etc.) unless you're also touching the SDK mock + backend lens. Full ejection rules and the customizer contract are in the SDK-level [`AGENTS.md`](../../AGENTS.md) → "Don't reinvent product customization".
|
|
93
|
+
|
|
82
94
|
## Quick start
|
|
83
95
|
|
|
84
96
|
```bash
|
|
@@ -8,10 +8,17 @@
|
|
|
8
8
|
"dev:mock": "bunx @cimplify/sdk --seed services",
|
|
9
9
|
"build": "next build",
|
|
10
10
|
"start": "next start",
|
|
11
|
-
"lint": "next lint"
|
|
11
|
+
"lint": "next lint",
|
|
12
|
+
"typecheck": "tsc --noEmit",
|
|
13
|
+
"test": "vitest",
|
|
14
|
+
"test:run": "vitest run",
|
|
15
|
+
"check:brand": "vitest run __tests__/brand.test.ts",
|
|
16
|
+
"check:cart": "vitest run __tests__/cart-flow.test.ts",
|
|
17
|
+
"check:contract": "vitest run __tests__/contract.test.ts",
|
|
18
|
+
"check": "bun run typecheck && bun run lint && bun run test:run"
|
|
12
19
|
},
|
|
13
20
|
"dependencies": {
|
|
14
|
-
"@cimplify/sdk": "^0.44.
|
|
21
|
+
"@cimplify/sdk": "^0.44.14",
|
|
15
22
|
"next": "^16.2.4",
|
|
16
23
|
"react": "^19.0.0",
|
|
17
24
|
"react-dom": "^19.0.0"
|
|
@@ -23,6 +30,7 @@
|
|
|
23
30
|
"@types/react-dom": "^19.0.0",
|
|
24
31
|
"concurrently": "^9.0.0",
|
|
25
32
|
"tailwindcss": "^4.2.4",
|
|
26
|
-
"typescript": "^5.9.3"
|
|
33
|
+
"typescript": "^5.9.3",
|
|
34
|
+
"vitest": "^4.1.5"
|
|
27
35
|
}
|
|
28
36
|
}
|