@cimplify/cli 0.10.1 → 0.11.0

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 (46) hide show
  1. package/dist/{add-ZRSE2STJ.mjs → add-5ODVFWVR.mjs} +1 -1
  2. package/dist/{chunk-2ODNBO3D.mjs → chunk-PQUWRUVT.mjs} +2 -2
  3. package/dist/chunk-W3WLADJP.mjs +6455 -0
  4. package/dist/{chunk-QU6DN3WR.mjs → chunk-WF5HX2WB.mjs} +1 -1
  5. package/dist/dev-OF335HZZ.mjs +762 -0
  6. package/dist/dispatcher.mjs +10 -10
  7. package/dist/{doctor-6YCHMCZO.mjs → doctor-O2XLOCBB.mjs} +2 -2
  8. package/dist/{explain-CUVUG7O5.mjs → explain-327PXAY6.mjs} +1 -1
  9. package/dist/{introspect-J3REAIDU.mjs → introspect-P3BJ7WQL.mjs} +2 -2
  10. package/dist/{list-FCBWJ5DY.mjs → list-27TS2L47.mjs} +1 -1
  11. package/dist/{update-DI3MW7TW.mjs → update-TEHVCICJ.mjs} +1 -1
  12. package/package.json +2 -2
  13. package/templates/storefront-auto/app/layout.tsx +2 -0
  14. package/templates/storefront-auto/bun.lock +456 -8
  15. package/templates/storefront-auto/components/support-chat.tsx +34 -0
  16. package/templates/storefront-auto/package.json +1 -1
  17. package/templates/storefront-bakery/app/layout.tsx +2 -0
  18. package/templates/storefront-bakery/bun.lock +456 -8
  19. package/templates/storefront-bakery/components/support-chat.tsx +34 -0
  20. package/templates/storefront-bakery/package.json +1 -1
  21. package/templates/storefront-fashion/app/layout.tsx +2 -0
  22. package/templates/storefront-fashion/bun.lock +456 -8
  23. package/templates/storefront-fashion/components/support-chat.tsx +34 -0
  24. package/templates/storefront-fashion/package.json +1 -1
  25. package/templates/storefront-grocery/app/layout.tsx +2 -0
  26. package/templates/storefront-grocery/bun.lock +456 -8
  27. package/templates/storefront-grocery/components/support-chat.tsx +34 -0
  28. package/templates/storefront-grocery/package.json +1 -1
  29. package/templates/storefront-pharmacy/app/layout.tsx +2 -0
  30. package/templates/storefront-pharmacy/bun.lock +456 -8
  31. package/templates/storefront-pharmacy/components/support-chat.tsx +34 -0
  32. package/templates/storefront-pharmacy/package.json +1 -1
  33. package/templates/storefront-restaurant/app/layout.tsx +2 -0
  34. package/templates/storefront-restaurant/bun.lock +454 -8
  35. package/templates/storefront-restaurant/components/support-chat.tsx +34 -0
  36. package/templates/storefront-restaurant/package.json +1 -1
  37. package/templates/storefront-retail/app/layout.tsx +2 -0
  38. package/templates/storefront-retail/bun.lock +456 -8
  39. package/templates/storefront-retail/components/support-chat.tsx +34 -0
  40. package/templates/storefront-retail/package.json +1 -1
  41. package/templates/storefront-services/app/layout.tsx +2 -0
  42. package/templates/storefront-services/bun.lock +2 -2
  43. package/templates/storefront-services/components/support-chat.tsx +34 -0
  44. package/templates/storefront-services/package.json +1 -1
  45. package/dist/chunk-WBNI7PWA.mjs +0 -6455
  46. package/dist/dev-ABN3HOO2.mjs +0 -150
@@ -0,0 +1,34 @@
1
+ "use client";
2
+
3
+ import { useRouter } from "next/navigation";
4
+ import {
5
+ CHAT_ACTION_VIEW_ORDER,
6
+ CHAT_ACTION_VIEW_PRODUCT,
7
+ ChatWidget,
8
+ parseChatAction,
9
+ } from "@cimplify/sdk/react";
10
+
11
+ /**
12
+ * The support chat bubble, wired to this template's navigation: structured
13
+ * answers from the assistant carry product and order references, and taps
14
+ * land where this storefront shows them. Identity and currency come from
15
+ * the provider, so there is nothing to configure.
16
+ */
17
+ export function SupportChat() {
18
+ const router = useRouter();
19
+
20
+ return (
21
+ <ChatWidget
22
+ onGenUIAction={({ action }) => {
23
+ const parsed = parseChatAction(action);
24
+ if (!parsed) return;
25
+ if (parsed.verb === CHAT_ACTION_VIEW_PRODUCT) {
26
+ router.push(`?product=${encodeURIComponent(parsed.id)}`);
27
+ }
28
+ if (parsed.verb === CHAT_ACTION_VIEW_ORDER) {
29
+ router.push("/track-order");
30
+ }
31
+ }}
32
+ />
33
+ );
34
+ }
@@ -17,7 +17,7 @@
17
17
  "check": "bun run typecheck && bun run test:run"
18
18
  },
19
19
  "dependencies": {
20
- "@cimplify/sdk": "^0.96.0",
20
+ "@cimplify/sdk": "^0.99.1",
21
21
  "next": "^16.2.6",
22
22
  "react": "^19.0.0",
23
23
  "react-dom": "^19.0.0"
@@ -7,6 +7,7 @@ import { Header } from "@/components/header";
7
7
  import { Footer } from "@/components/footer";
8
8
  import { ProductModal } from "@/components/product-modal";
9
9
  import { CartDrawer } from "@/components/cart-drawer";
10
+ import { SupportChat } from "@/components/support-chat";
10
11
  import { OrganizationJsonLd } from "@/components/json-ld";
11
12
  import { Suspense } from "react";
12
13
  import { brand } from "@/lib/brand";
@@ -70,6 +71,7 @@ export default async function RootLayout({ children }: { children: React.ReactNo
70
71
  <ProductModal />
71
72
  </Suspense>
72
73
  <CartDrawer />
74
+ <SupportChat />
73
75
  </Providers>
74
76
  </body>
75
77
  </html>