@40rty/ams-ui 0.5.6 → 0.5.8

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 (56) hide show
  1. package/dist/agent.js +3 -2
  2. package/dist/{chunk-2HM6EVDV.js → chunk-4ZX4IRC6.js} +241 -389
  3. package/dist/chunk-FSY7MEP5.js +843 -0
  4. package/dist/{chunk-WVD2Y2N2.js → chunk-G3IXNKXL.js} +15 -8
  5. package/dist/{chunk-H6MSAD5M.js → chunk-KNIUL72S.js} +10 -5
  6. package/dist/{chunk-CKNELL6G.js → chunk-M5T3ZTBB.js} +109 -79
  7. package/dist/{chunk-432XYPDT.js → chunk-ZP27BQQE.js} +1 -1
  8. package/dist/conversation.js +24 -21
  9. package/dist/css/preset/motion.css +4 -1
  10. package/dist/css/shell/spacefront-island.css +8 -6
  11. package/dist/css/shell/spacefront-presence.css +9 -4
  12. package/dist/css/shell/spacefront-thread-panel.css +12 -5
  13. package/dist/index.js +473 -403
  14. package/dist/island.js +18 -11
  15. package/dist/motion.js +1 -1
  16. package/dist/presence.js +20 -11
  17. package/dist/shell.js +6 -5
  18. package/dist/thread-panel.js +19 -9
  19. package/dist/types/catalog-data/ecommerce.d.ts +42 -0
  20. package/dist/types/catalog-data/social.d.ts +14 -0
  21. package/dist/types/components/content/article/BlogPosts.d.ts +1 -1
  22. package/dist/types/components/ecommerce/cart/cart-format.d.ts +3 -2
  23. package/dist/types/components/ecommerce/collection/CollectionList.d.ts +1 -1
  24. package/dist/types/components/ecommerce/product/AddToRegistry.d.ts +1 -1
  25. package/dist/types/components/ecommerce/product/ProductPrice.d.ts +1 -0
  26. package/dist/types/components/feedback/HydrationNotice.d.ts +9 -0
  27. package/dist/types/components/layout/Drawer.d.ts +2 -0
  28. package/dist/types/conversation/blocks/schemas.d.ts +40 -0
  29. package/dist/types/index.d.ts +3 -2
  30. package/dist/types/labels/en/agent.d.ts +2 -0
  31. package/dist/types/labels/en/commerce.d.ts +2 -0
  32. package/dist/types/labels/en/content.d.ts +2 -0
  33. package/dist/types/labels/en/notices.d.ts +2 -0
  34. package/dist/types/labels/en/shell.d.ts +2 -0
  35. package/dist/types/labels/he/agent.d.ts +2 -0
  36. package/dist/types/labels/he/commerce.d.ts +2 -0
  37. package/dist/types/labels/he/content.d.ts +2 -0
  38. package/dist/types/labels/he/count.d.ts +17 -0
  39. package/dist/types/labels/he/notices.d.ts +2 -0
  40. package/dist/types/labels/he/shell.d.ts +2 -0
  41. package/dist/types/labels/index.d.ts +34 -0
  42. package/dist/types/{labels.d.ts → labels/types-agent.d.ts} +4 -120
  43. package/dist/types/labels/types-commerce.d.ts +252 -0
  44. package/dist/types/labels/types-content.d.ts +28 -0
  45. package/dist/types/labels/types-notices.d.ts +9 -0
  46. package/dist/types/labels/types-shell.d.ts +137 -0
  47. package/dist/types/labels-context.d.ts +19 -5
  48. package/dist/types/primitives/Money/index.d.ts +1 -1
  49. package/dist/types/shell/Composer.d.ts +1 -1
  50. package/dist/types/shell/SideDock.d.ts +1 -1
  51. package/dist/types/shell/SpacefrontIsland.d.ts +1 -1
  52. package/dist/types/shell/SpacefrontPresence.d.ts +1 -1
  53. package/dist/types/shell/VoiceIsland.d.ts +1 -1
  54. package/dist/types/utils/format-money.d.ts +3 -1
  55. package/dist/types/utils/mirror-x.d.ts +8 -0
  56. package/package.json +2 -2
package/dist/island.js CHANGED
@@ -9,9 +9,12 @@ import {
9
9
  AttachButton,
10
10
  AttachmentStrip,
11
11
  DictationButton
12
- } from "./chunk-WVD2Y2N2.js";
12
+ } from "./chunk-G3IXNKXL.js";
13
13
  import "./chunk-WDL5PHO2.js";
14
- import "./chunk-432XYPDT.js";
14
+ import {
15
+ useLabels
16
+ } from "./chunk-FSY7MEP5.js";
17
+ import "./chunk-ZP27BQQE.js";
15
18
 
16
19
  // src/shell/SpacefrontIsland.tsx
17
20
  import * as React from "react";
@@ -35,18 +38,22 @@ function AnswerProse({ prose, rowKey }) {
35
38
  ] })
36
39
  ] });
37
40
  }
38
- function activityText(activity, workingText) {
41
+ function activityText(activity, workingText, searching) {
39
42
  if (activity.kind === "voice" || activity.kind === "reasoning") return activity.text;
40
- if (activity.kind === "searching") return `Looking through ${activity.query}`;
43
+ if (activity.kind === "searching") return searching(activity.query);
41
44
  return workingText;
42
45
  }
43
46
  function SpacefrontIsland({
44
- placeholder = "Ask anything\u2026",
45
- emptyText = "Tell us what you\u2019re looking for.",
46
- workingText = "Pulling that together\u2026",
47
+ placeholder: placeholderProp,
48
+ emptyText: emptyProp,
49
+ workingText: workingProp,
47
50
  container = "viewport",
48
51
  stopKeyPropagation = true
49
52
  }) {
53
+ const labels = useLabels();
54
+ const placeholder = placeholderProp === void 0 ? labels.thread.placeholder : placeholderProp;
55
+ const emptyText = emptyProp === void 0 ? labels.thread.empty : emptyProp;
56
+ const workingText = workingProp === void 0 ? labels.thread.working : workingProp;
50
57
  const session = useFourtySession();
51
58
  const { value, setValue, attachments, dictation, onPaste, canSend, submit } = usePromptComposer();
52
59
  const presence = useConversationPresence();
@@ -95,7 +102,7 @@ function SpacefrontIsland({
95
102
  onKeyUp: isolate,
96
103
  children: /* @__PURE__ */ jsxs("div", { className: "fourty-si__stack", children: [
97
104
  /* @__PURE__ */ jsx("div", { ref: setPresenceSlot, className: "fourty-si__presence" }),
98
- chips.length > 0 && /* @__PURE__ */ jsx("div", { className: "fourty-si__chips", role: "group", "aria-label": "Suggestions", children: chips.map((chip) => /* @__PURE__ */ jsx("button", { type: "button", className: "fourty-si__chip", onClick: () => selectChip(chip), children: chip.label }, chip.id)) }),
105
+ chips.length > 0 && /* @__PURE__ */ jsx("div", { className: "fourty-si__chips", role: "group", "aria-label": labels.composer.suggestions, children: chips.map((chip) => /* @__PURE__ */ jsx("button", { type: "button", className: "fourty-si__chip", onClick: () => selectChip(chip), children: chip.label }, chip.id)) }),
99
106
  attachments.attachments.length > 0 && /* @__PURE__ */ jsx("div", { className: "fourty-si__tool", children: /* @__PURE__ */ jsx(AttachmentStrip, { attachments: attachments.attachments, onRemove: attachments.remove }) }),
100
107
  /* @__PURE__ */ jsxs("div", { className: "fourty-si__slab", children: [
101
108
  (rows.length > 0 || threadOpen) && /* @__PURE__ */ jsx(
@@ -103,7 +110,7 @@ function SpacefrontIsland({
103
110
  {
104
111
  type: "button",
105
112
  className: "fourty-si__grip",
106
- "aria-label": threadOpen ? "Close the conversation" : "Open the conversation",
113
+ "aria-label": threadOpen ? labels.thread.close : labels.thread.open,
107
114
  "aria-expanded": threadOpen,
108
115
  onClick: () => setThreadOpen(!threadOpen),
109
116
  children: /* @__PURE__ */ jsx("svg", { className: "fourty-si__chevron", viewBox: "0 0 32 5", "aria-hidden": "true", children: /* @__PURE__ */ jsx("polyline", { points: "1,4 16,1 31,4", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
@@ -125,7 +132,7 @@ function SpacefrontIsland({
125
132
  /* @__PURE__ */ jsx("span", {}),
126
133
  /* @__PURE__ */ jsx("span", {})
127
134
  ] }),
128
- /* @__PURE__ */ jsx("span", { className: "fourty-si__activity", children: activityText(presence.activity, workingText) })
135
+ /* @__PURE__ */ jsx("span", { className: "fourty-si__activity", children: activityText(presence.activity, workingText, labels.conversation.searching) })
129
136
  ] }) }),
130
137
  !working && /* @__PURE__ */ jsxs(Fragment, { children: [
131
138
  /* @__PURE__ */ jsx("span", { className: "fourty-si__tool", children: /* @__PURE__ */ jsx(AttachButton, { onFiles: attachments.addFiles }) }),
@@ -151,7 +158,7 @@ function SpacefrontIsland({
151
158
  }
152
159
  ),
153
160
  /* @__PURE__ */ jsx("span", { className: "fourty-si__tool", children: /* @__PURE__ */ jsx(DictationButton, { listening: dictation.listening, supported: dictation.supported, onToggle: dictation.toggle }) }),
154
- /* @__PURE__ */ jsx("button", { type: "submit", className: "fourty-si__stamp", "aria-label": "Send", disabled: !canSend, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M8 13V3M3.5 7.5 8 3l4.5 4.5", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
161
+ /* @__PURE__ */ jsx("button", { type: "submit", className: "fourty-si__stamp", "aria-label": labels.composer.send, disabled: !canSend, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M8 13V3M3.5 7.5 8 3l4.5 4.5", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
155
162
  ] })
156
163
  ]
157
164
  }
package/dist/motion.js CHANGED
@@ -54,7 +54,7 @@ import {
54
54
  useStableValue,
55
55
  useSuccessFlash,
56
56
  useTransform
57
- } from "./chunk-432XYPDT.js";
57
+ } from "./chunk-ZP27BQQE.js";
58
58
  export {
59
59
  ActiveBlockIndicator,
60
60
  AgentCaret,
package/dist/presence.js CHANGED
@@ -6,6 +6,9 @@ import {
6
6
  import {
7
7
  useHostShell
8
8
  } from "./chunk-QXCHHCPU.js";
9
+ import {
10
+ useLabels
11
+ } from "./chunk-FSY7MEP5.js";
9
12
 
10
13
  // src/shell/SpacefrontPresence.tsx
11
14
  import { createPortal } from "react-dom";
@@ -30,9 +33,10 @@ function presenceThumbs(sources, scanning) {
30
33
  return { thumbs: thumbs.slice(0, MAX_THUMBS), count };
31
34
  }
32
35
  function PresenceActivity({ working, thumbs, voice, queryHint, thinkingText }) {
36
+ const copy = useLabels().live;
33
37
  const scanning = working && thumbs.thumbs.length > 0;
34
38
  let line = voice;
35
- if (scanning) line = queryHint === void 0 ? `Looking through ${thumbs.count} results` : `Looking for \u201C${queryHint}\u201D`;
39
+ if (scanning) line = queryHint === void 0 ? copy.lookingThrough(thumbs.count) : copy.lookingFor(queryHint);
36
40
  else if (working && voice === "") line = thinkingText;
37
41
  return /* @__PURE__ */ jsxs("div", { className: "fourty-sp__activity", role: "status", children: [
38
42
  scanning && /* @__PURE__ */ jsx("span", { className: "fourty-sp__thumbs", "aria-hidden": "true", children: thumbs.thumbs.map((thumb) => /* @__PURE__ */ jsx("img", { className: "fourty-sp__thumb", src: thumb.url, alt: "", loading: "lazy", decoding: "async" }, thumb.id)) }),
@@ -44,11 +48,16 @@ function PresenceActivity({ working, thumbs, voice, queryHint, thinkingText }) {
44
48
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
45
49
  var NO_WIDGETS = [];
46
50
  function SpacefrontPresence({
47
- thinkingText = "Thinking\u2026",
48
- factsLabel = "What I understood",
49
- confirmLabel = "Yes",
51
+ thinkingText: thinkingProp,
52
+ factsLabel: factsProp,
53
+ confirmLabel: confirmProp,
50
54
  placement = "auto"
51
55
  }) {
56
+ const labels = useLabels();
57
+ const copy = labels.live;
58
+ const thinkingText = thinkingProp === void 0 ? copy.thinking : thinkingProp;
59
+ const factsLabel = factsProp === void 0 ? copy.understood : factsProp;
60
+ const confirmLabel = confirmProp === void 0 ? copy.confirm : confirmProp;
52
61
  const session = useFourtySession();
53
62
  const { view } = useBandFacts();
54
63
  const { scanning } = useAgentPresence();
@@ -59,7 +68,7 @@ function SpacefrontPresence({
59
68
  const working = session.isRunning || session.isSubmitting;
60
69
  const thumbs = presenceThumbs(view.sources, scanning);
61
70
  const showActivity = expanded && (working || view.voice !== "");
62
- const ask = standingAsk(standing, view.ask);
71
+ const ask = standingAsk(standing, view.ask, labels.presence.ask.fallback);
63
72
  const empty = !showActivity && view.facts.length === 0 && ask === null;
64
73
  let target = "inline";
65
74
  if (placement === "auto") {
@@ -73,7 +82,7 @@ function SpacefrontPresence({
73
82
  ref: rootRef,
74
83
  className: "fourty-sp",
75
84
  role: "region",
76
- "aria-label": "Assistant activity",
85
+ "aria-label": copy.activity,
77
86
  "data-expanded": expanded,
78
87
  "data-working": working,
79
88
  ...rootHandlers,
@@ -85,7 +94,7 @@ function SpacefrontPresence({
85
94
  view.facts.map((fact) => /* @__PURE__ */ jsxs2("li", { className: "fourty-sp__fact", children: [
86
95
  /* @__PURE__ */ jsx2("span", { className: "fourty-sp__fact-label", children: fact.label }),
87
96
  /* @__PURE__ */ jsx2("span", { className: "fourty-sp__fact-value", children: fact.value }),
88
- /* @__PURE__ */ jsx2("button", { type: "button", className: "fourty-sp__forget", "aria-label": `Forget ${fact.label}: ${fact.value}`, onClick: () => forget(fact), children: /* @__PURE__ */ jsx2("svg", { viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("path", { d: "M3 3l6 6M9 3 3 9", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }) }) })
97
+ /* @__PURE__ */ jsx2("button", { type: "button", className: "fourty-sp__forget", "aria-label": copy.forgetFact(fact.label, fact.value), onClick: () => forget(fact), children: /* @__PURE__ */ jsx2("svg", { viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("path", { d: "M3 3l6 6M9 3 3 9", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }) }) })
89
98
  ] }, factIdentity(fact))),
90
99
  view.hiddenFacts > 0 && /* @__PURE__ */ jsxs2("li", { className: "fourty-sp__more", children: [
91
100
  "+",
@@ -93,7 +102,7 @@ function SpacefrontPresence({
93
102
  ] })
94
103
  ] })
95
104
  ] }),
96
- ask !== null && /* @__PURE__ */ jsxs2("div", { className: "fourty-sp__ask", role: "group", "aria-label": "A question from the assistant", children: [
105
+ ask !== null && /* @__PURE__ */ jsxs2("div", { className: "fourty-sp__ask", role: "group", "aria-label": copy.askGroup, children: [
97
106
  /* @__PURE__ */ jsx2("p", { className: "fourty-sp__question", "aria-live": "polite", children: ask.question }),
98
107
  /* @__PURE__ */ jsxs2("div", { className: "fourty-sp__replies", children: [
99
108
  ask.replies.map((reply) => /* @__PURE__ */ jsx2(
@@ -110,7 +119,7 @@ function SpacefrontPresence({
110
119
  reply
111
120
  )),
112
121
  ask.replies.length === 0 && ask.confirm !== void 0 && /* @__PURE__ */ jsx2("button", { type: "button", className: "fourty-sp__reply", onClick: ask.confirm, children: confirmLabel }),
113
- ask.dismiss !== void 0 && /* @__PURE__ */ jsx2("button", { type: "button", className: "fourty-sp__dismiss", "aria-label": "Dismiss the question", onClick: ask.dismiss, children: /* @__PURE__ */ jsx2("svg", { viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("path", { d: "M3 3l6 6M9 3 3 9", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }) }) })
122
+ ask.dismiss !== void 0 && /* @__PURE__ */ jsx2("button", { type: "button", className: "fourty-sp__dismiss", "aria-label": copy.dismissAsk, onClick: ask.dismiss, children: /* @__PURE__ */ jsx2("svg", { viewBox: "0 0 12 12", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("path", { d: "M3 3l6 6M9 3 3 9", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round" }) }) })
114
123
  ] })
115
124
  ] })
116
125
  ]
@@ -118,11 +127,11 @@ function SpacefrontPresence({
118
127
  );
119
128
  return target === "inline" ? band : createPortal(band, target);
120
129
  }
121
- function standingAsk(standing, streamAsk) {
130
+ function standingAsk(standing, streamAsk, fallbackQuestion) {
122
131
  if (standing !== null) {
123
132
  const p = standing.payload;
124
133
  const replies = Array.isArray(p.suggestions) ? p.suggestions.filter((x) => typeof x === "string" && x.length > 0) : [];
125
- const question = typeof p.ask === "string" && p.ask.length > 0 ? p.ask : "Want me to do that?";
134
+ const question = typeof p.ask === "string" && p.ask.length > 0 ? p.ask : fallbackQuestion;
126
135
  return { id: standing.id, question, replies, confirm: standing.confirm, dismiss: standing.dismiss };
127
136
  }
128
137
  if (streamAsk === void 0) return null;
package/dist/shell.js CHANGED
@@ -38,17 +38,17 @@ import {
38
38
  useOnScreen,
39
39
  usePromptComposer,
40
40
  useShellDock
41
- } from "./chunk-CKNELL6G.js";
41
+ } from "./chunk-M5T3ZTBB.js";
42
42
  import {
43
43
  SIDE_DOCK_EASE,
44
44
  SIDE_DOCK_REVEAL_MS,
45
45
  SideDock,
46
46
  useSideDockSpacing
47
- } from "./chunk-H6MSAD5M.js";
47
+ } from "./chunk-KNIUL72S.js";
48
48
  import {
49
49
  DragSheet
50
50
  } from "./chunk-I5QE47QY.js";
51
- import "./chunk-2HM6EVDV.js";
51
+ import "./chunk-4ZX4IRC6.js";
52
52
  import "./chunk-RMJDSHLA.js";
53
53
  import "./chunk-PHXP2SKS.js";
54
54
  import "./chunk-GQURT3IR.js";
@@ -57,11 +57,12 @@ import {
57
57
  AttachmentStrip,
58
58
  DictationButton,
59
59
  ListeningWaveform
60
- } from "./chunk-WVD2Y2N2.js";
60
+ } from "./chunk-G3IXNKXL.js";
61
61
  import {
62
62
  Spinner
63
63
  } from "./chunk-WDL5PHO2.js";
64
- import "./chunk-432XYPDT.js";
64
+ import "./chunk-FSY7MEP5.js";
65
+ import "./chunk-ZP27BQQE.js";
65
66
  export {
66
67
  AnimatedPlaceholder,
67
68
  AttachButton,
@@ -1,12 +1,15 @@
1
1
  'use client';
2
2
  import {
3
3
  SideDock
4
- } from "./chunk-H6MSAD5M.js";
4
+ } from "./chunk-KNIUL72S.js";
5
5
  import {
6
6
  stopHostKeys,
7
7
  useHostShell,
8
8
  usePanelSlot
9
9
  } from "./chunk-QXCHHCPU.js";
10
+ import {
11
+ useLabels
12
+ } from "./chunk-FSY7MEP5.js";
10
13
 
11
14
  // src/shell/SpacefrontThreadPanel.tsx
12
15
  import * as React2 from "react";
@@ -20,6 +23,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
20
23
  var FOLLOW_SLACK = 80;
21
24
  function ThreadPanelConversation({ fieldRef, placeholder, emptyText, workingText }) {
22
25
  const session = useFourtySession();
26
+ const composerCopy = useLabels().composer;
23
27
  const [draft, setDraft] = useComposerDraft();
24
28
  const { rows, isEmpty } = useThreadRows();
25
29
  const selectChip = useComposerChipSelect();
@@ -62,7 +66,7 @@ function ThreadPanelConversation({ fieldRef, placeholder, emptyText, workingText
62
66
  ]
63
67
  }
64
68
  ),
65
- chips.length > 0 && /* @__PURE__ */ jsx("div", { className: "fourty-tp__chips", role: "group", "aria-label": "Suggestions", children: chips.map((chip) => /* @__PURE__ */ jsx("button", { type: "button", className: "fourty-tp__chip", onClick: () => selectChip(chip), children: chip.label }, chip.id)) }),
69
+ chips.length > 0 && /* @__PURE__ */ jsx("div", { className: "fourty-tp__chips", role: "group", "aria-label": composerCopy.suggestions, children: chips.map((chip) => /* @__PURE__ */ jsx("button", { type: "button", className: "fourty-tp__chip", onClick: () => selectChip(chip), children: chip.label }, chip.id)) }),
66
70
  /* @__PURE__ */ jsxs(
67
71
  "form",
68
72
  {
@@ -86,7 +90,7 @@ function ThreadPanelConversation({ fieldRef, placeholder, emptyText, workingText
86
90
  onChange: (event) => setDraft(event.target.value)
87
91
  }
88
92
  ),
89
- /* @__PURE__ */ jsx("button", { type: "submit", className: "fourty-tp__stamp", "aria-label": "Send", disabled: working || draft.trim() === "", children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M8 13V3M3.5 7.5 8 3l4.5 4.5", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
93
+ /* @__PURE__ */ jsx("button", { type: "submit", className: "fourty-tp__stamp", "aria-label": composerCopy.send, disabled: working || draft.trim() === "", children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M8 13V3M3.5 7.5 8 3l4.5 4.5", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
90
94
  ]
91
95
  }
92
96
  )
@@ -134,17 +138,23 @@ function SpacefrontThreadPanel({ storageKey = "fourty-thread-panel", ...props })
134
138
  return /* @__PURE__ */ jsx2(DockPersistenceProvider, { value: persistence, children: /* @__PURE__ */ jsx2(ThreadPanel, { ...props, collapsed, setCollapsed }) });
135
139
  }
136
140
  function ThreadPanel({
137
- title = "Assistant",
138
- placeholder = "Ask anything\u2026",
139
- emptyText = "Tell us what you\u2019re looking for.",
140
- workingText = "Pulling that together\u2026",
141
- tabLabel = "Ask",
141
+ title: titleProp,
142
+ placeholder: placeholderProp,
143
+ emptyText: emptyProp,
144
+ workingText: workingProp,
145
+ tabLabel: tabProp,
142
146
  width = 400,
143
147
  autoOpen = true,
144
148
  stopKeyPropagation = true,
145
149
  collapsed,
146
150
  setCollapsed
147
151
  }) {
152
+ const copy = useLabels().thread;
153
+ const title = titleProp === void 0 ? copy.title : titleProp;
154
+ const placeholder = placeholderProp === void 0 ? copy.placeholder : placeholderProp;
155
+ const emptyText = emptyProp === void 0 ? copy.empty : emptyProp;
156
+ const workingText = workingProp === void 0 ? copy.working : workingProp;
157
+ const tabLabel = tabProp === void 0 ? copy.tab : tabProp;
148
158
  const { isMobile } = useFormFactor();
149
159
  const { islands } = useHostShell();
150
160
  const dock = useDockState(autoOpen && !collapsed, autoOpen);
@@ -209,7 +219,7 @@ function ThreadPanel({
209
219
  {
210
220
  type: "button",
211
221
  className: "fourty-tp__close",
212
- "aria-label": "Close the conversation",
222
+ "aria-label": copy.close,
213
223
  "aria-expanded": dock.open,
214
224
  "aria-controls": panelId,
215
225
  onClick: toggle,
@@ -179,6 +179,7 @@ export declare const productGridProps: z.ZodObject<{
179
179
  height?: number | undefined;
180
180
  srcSet?: string | undefined;
181
181
  }>>;
182
+ sku: z.ZodOptional<z.ZodString>;
182
183
  }, "strip", z.ZodTypeAny, {
183
184
  id: string;
184
185
  title: string;
@@ -203,6 +204,7 @@ export declare const productGridProps: z.ZodObject<{
203
204
  value: string;
204
205
  name: string;
205
206
  }[] | undefined;
207
+ sku?: string | undefined;
206
208
  }, {
207
209
  id: string;
208
210
  title: string;
@@ -227,6 +229,7 @@ export declare const productGridProps: z.ZodObject<{
227
229
  value: string;
228
230
  name: string;
229
231
  }[] | undefined;
232
+ sku?: string | undefined;
230
233
  }>, "many">>;
231
234
  availableForSale: z.ZodDefault<z.ZodBoolean>;
232
235
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -355,6 +358,7 @@ export declare const productGridProps: z.ZodObject<{
355
358
  value: string;
356
359
  name: string;
357
360
  }[] | undefined;
361
+ sku?: string | undefined;
358
362
  }[];
359
363
  price: {
360
364
  currencyCode: string;
@@ -460,6 +464,7 @@ export declare const productGridProps: z.ZodObject<{
460
464
  value: string;
461
465
  name: string;
462
466
  }[] | undefined;
467
+ sku?: string | undefined;
463
468
  }[] | undefined;
464
469
  reviews?: {
465
470
  date: string;
@@ -706,6 +711,7 @@ export declare const productGridProps: z.ZodObject<{
706
711
  height?: number | undefined;
707
712
  srcSet?: string | undefined;
708
713
  }>>;
714
+ sku: z.ZodOptional<z.ZodString>;
709
715
  }, "strip", z.ZodTypeAny, {
710
716
  id: string;
711
717
  title: string;
@@ -730,6 +736,7 @@ export declare const productGridProps: z.ZodObject<{
730
736
  value: string;
731
737
  name: string;
732
738
  }[] | undefined;
739
+ sku?: string | undefined;
733
740
  }, {
734
741
  id: string;
735
742
  title: string;
@@ -754,6 +761,7 @@ export declare const productGridProps: z.ZodObject<{
754
761
  value: string;
755
762
  name: string;
756
763
  }[] | undefined;
764
+ sku?: string | undefined;
757
765
  }>, "many">>;
758
766
  availableForSale: z.ZodDefault<z.ZodBoolean>;
759
767
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -882,6 +890,7 @@ export declare const productGridProps: z.ZodObject<{
882
890
  value: string;
883
891
  name: string;
884
892
  }[] | undefined;
893
+ sku?: string | undefined;
885
894
  }[];
886
895
  price: {
887
896
  currencyCode: string;
@@ -987,6 +996,7 @@ export declare const productGridProps: z.ZodObject<{
987
996
  value: string;
988
997
  name: string;
989
998
  }[] | undefined;
999
+ sku?: string | undefined;
990
1000
  }[] | undefined;
991
1001
  reviews?: {
992
1002
  date: string;
@@ -1205,6 +1215,7 @@ export declare const productGridProps: z.ZodObject<{
1205
1215
  value: string;
1206
1216
  name: string;
1207
1217
  }[] | undefined;
1218
+ sku?: string | undefined;
1208
1219
  }[];
1209
1220
  price: {
1210
1221
  currencyCode: string;
@@ -1306,6 +1317,7 @@ export declare const productGridProps: z.ZodObject<{
1306
1317
  value: string;
1307
1318
  name: string;
1308
1319
  }[] | undefined;
1320
+ sku?: string | undefined;
1309
1321
  }[];
1310
1322
  price: {
1311
1323
  currencyCode: string;
@@ -1445,6 +1457,7 @@ export declare const productGridProps: z.ZodObject<{
1445
1457
  value: string;
1446
1458
  name: string;
1447
1459
  }[] | undefined;
1460
+ sku?: string | undefined;
1448
1461
  }[] | undefined;
1449
1462
  reviews?: {
1450
1463
  date: string;
@@ -1546,6 +1559,7 @@ export declare const productGridProps: z.ZodObject<{
1546
1559
  value: string;
1547
1560
  name: string;
1548
1561
  }[] | undefined;
1562
+ sku?: string | undefined;
1549
1563
  }[] | undefined;
1550
1564
  reviews?: {
1551
1565
  date: string;
@@ -1827,6 +1841,7 @@ export declare const productDetailProps: z.ZodObject<{
1827
1841
  height?: number | undefined;
1828
1842
  srcSet?: string | undefined;
1829
1843
  }>>;
1844
+ sku: z.ZodOptional<z.ZodString>;
1830
1845
  }, "strip", z.ZodTypeAny, {
1831
1846
  id: string;
1832
1847
  title: string;
@@ -1851,6 +1866,7 @@ export declare const productDetailProps: z.ZodObject<{
1851
1866
  value: string;
1852
1867
  name: string;
1853
1868
  }[] | undefined;
1869
+ sku?: string | undefined;
1854
1870
  }, {
1855
1871
  id: string;
1856
1872
  title: string;
@@ -1875,6 +1891,7 @@ export declare const productDetailProps: z.ZodObject<{
1875
1891
  value: string;
1876
1892
  name: string;
1877
1893
  }[] | undefined;
1894
+ sku?: string | undefined;
1878
1895
  }>, "many">>;
1879
1896
  availableForSale: z.ZodDefault<z.ZodBoolean>;
1880
1897
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -2003,6 +2020,7 @@ export declare const productDetailProps: z.ZodObject<{
2003
2020
  value: string;
2004
2021
  name: string;
2005
2022
  }[] | undefined;
2023
+ sku?: string | undefined;
2006
2024
  }[];
2007
2025
  price: {
2008
2026
  currencyCode: string;
@@ -2108,6 +2126,7 @@ export declare const productDetailProps: z.ZodObject<{
2108
2126
  value: string;
2109
2127
  name: string;
2110
2128
  }[] | undefined;
2129
+ sku?: string | undefined;
2111
2130
  }[] | undefined;
2112
2131
  reviews?: {
2113
2132
  date: string;
@@ -2354,6 +2373,7 @@ export declare const productDetailProps: z.ZodObject<{
2354
2373
  height?: number | undefined;
2355
2374
  srcSet?: string | undefined;
2356
2375
  }>>;
2376
+ sku: z.ZodOptional<z.ZodString>;
2357
2377
  }, "strip", z.ZodTypeAny, {
2358
2378
  id: string;
2359
2379
  title: string;
@@ -2378,6 +2398,7 @@ export declare const productDetailProps: z.ZodObject<{
2378
2398
  value: string;
2379
2399
  name: string;
2380
2400
  }[] | undefined;
2401
+ sku?: string | undefined;
2381
2402
  }, {
2382
2403
  id: string;
2383
2404
  title: string;
@@ -2402,6 +2423,7 @@ export declare const productDetailProps: z.ZodObject<{
2402
2423
  value: string;
2403
2424
  name: string;
2404
2425
  }[] | undefined;
2426
+ sku?: string | undefined;
2405
2427
  }>, "many">>;
2406
2428
  availableForSale: z.ZodDefault<z.ZodBoolean>;
2407
2429
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -2530,6 +2552,7 @@ export declare const productDetailProps: z.ZodObject<{
2530
2552
  value: string;
2531
2553
  name: string;
2532
2554
  }[] | undefined;
2555
+ sku?: string | undefined;
2533
2556
  }[];
2534
2557
  price: {
2535
2558
  currencyCode: string;
@@ -2635,6 +2658,7 @@ export declare const productDetailProps: z.ZodObject<{
2635
2658
  value: string;
2636
2659
  name: string;
2637
2660
  }[] | undefined;
2661
+ sku?: string | undefined;
2638
2662
  }[] | undefined;
2639
2663
  reviews?: {
2640
2664
  date: string;
@@ -2734,6 +2758,7 @@ export declare const productDetailProps: z.ZodObject<{
2734
2758
  value: string;
2735
2759
  name: string;
2736
2760
  }[] | undefined;
2761
+ sku?: string | undefined;
2737
2762
  }[];
2738
2763
  price: {
2739
2764
  currencyCode: string;
@@ -2835,6 +2860,7 @@ export declare const productDetailProps: z.ZodObject<{
2835
2860
  value: string;
2836
2861
  name: string;
2837
2862
  }[] | undefined;
2863
+ sku?: string | undefined;
2838
2864
  }[];
2839
2865
  price: {
2840
2866
  currencyCode: string;
@@ -2942,6 +2968,7 @@ export declare const productDetailProps: z.ZodObject<{
2942
2968
  value: string;
2943
2969
  name: string;
2944
2970
  }[] | undefined;
2971
+ sku?: string | undefined;
2945
2972
  }[] | undefined;
2946
2973
  reviews?: {
2947
2974
  date: string;
@@ -3043,6 +3070,7 @@ export declare const productDetailProps: z.ZodObject<{
3043
3070
  value: string;
3044
3071
  name: string;
3045
3072
  }[] | undefined;
3073
+ sku?: string | undefined;
3046
3074
  }[] | undefined;
3047
3075
  reviews?: {
3048
3076
  date: string;
@@ -3293,6 +3321,7 @@ export declare const comparisonTableProps: z.ZodObject<{
3293
3321
  height?: number | undefined;
3294
3322
  srcSet?: string | undefined;
3295
3323
  }>>;
3324
+ sku: z.ZodOptional<z.ZodString>;
3296
3325
  }, "strip", z.ZodTypeAny, {
3297
3326
  id: string;
3298
3327
  title: string;
@@ -3317,6 +3346,7 @@ export declare const comparisonTableProps: z.ZodObject<{
3317
3346
  value: string;
3318
3347
  name: string;
3319
3348
  }[] | undefined;
3349
+ sku?: string | undefined;
3320
3350
  }, {
3321
3351
  id: string;
3322
3352
  title: string;
@@ -3341,6 +3371,7 @@ export declare const comparisonTableProps: z.ZodObject<{
3341
3371
  value: string;
3342
3372
  name: string;
3343
3373
  }[] | undefined;
3374
+ sku?: string | undefined;
3344
3375
  }>, "many">>;
3345
3376
  availableForSale: z.ZodDefault<z.ZodBoolean>;
3346
3377
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -3469,6 +3500,7 @@ export declare const comparisonTableProps: z.ZodObject<{
3469
3500
  value: string;
3470
3501
  name: string;
3471
3502
  }[] | undefined;
3503
+ sku?: string | undefined;
3472
3504
  }[];
3473
3505
  price: {
3474
3506
  currencyCode: string;
@@ -3574,6 +3606,7 @@ export declare const comparisonTableProps: z.ZodObject<{
3574
3606
  value: string;
3575
3607
  name: string;
3576
3608
  }[] | undefined;
3609
+ sku?: string | undefined;
3577
3610
  }[] | undefined;
3578
3611
  reviews?: {
3579
3612
  date: string;
@@ -3820,6 +3853,7 @@ export declare const comparisonTableProps: z.ZodObject<{
3820
3853
  height?: number | undefined;
3821
3854
  srcSet?: string | undefined;
3822
3855
  }>>;
3856
+ sku: z.ZodOptional<z.ZodString>;
3823
3857
  }, "strip", z.ZodTypeAny, {
3824
3858
  id: string;
3825
3859
  title: string;
@@ -3844,6 +3878,7 @@ export declare const comparisonTableProps: z.ZodObject<{
3844
3878
  value: string;
3845
3879
  name: string;
3846
3880
  }[] | undefined;
3881
+ sku?: string | undefined;
3847
3882
  }, {
3848
3883
  id: string;
3849
3884
  title: string;
@@ -3868,6 +3903,7 @@ export declare const comparisonTableProps: z.ZodObject<{
3868
3903
  value: string;
3869
3904
  name: string;
3870
3905
  }[] | undefined;
3906
+ sku?: string | undefined;
3871
3907
  }>, "many">>;
3872
3908
  availableForSale: z.ZodDefault<z.ZodBoolean>;
3873
3909
  options: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -3996,6 +4032,7 @@ export declare const comparisonTableProps: z.ZodObject<{
3996
4032
  value: string;
3997
4033
  name: string;
3998
4034
  }[] | undefined;
4035
+ sku?: string | undefined;
3999
4036
  }[];
4000
4037
  price: {
4001
4038
  currencyCode: string;
@@ -4101,6 +4138,7 @@ export declare const comparisonTableProps: z.ZodObject<{
4101
4138
  value: string;
4102
4139
  name: string;
4103
4140
  }[] | undefined;
4141
+ sku?: string | undefined;
4104
4142
  }[] | undefined;
4105
4143
  reviews?: {
4106
4144
  date: string;
@@ -4218,6 +4256,7 @@ export declare const comparisonTableProps: z.ZodObject<{
4218
4256
  value: string;
4219
4257
  name: string;
4220
4258
  }[] | undefined;
4259
+ sku?: string | undefined;
4221
4260
  }[];
4222
4261
  price: {
4223
4262
  currencyCode: string;
@@ -4319,6 +4358,7 @@ export declare const comparisonTableProps: z.ZodObject<{
4319
4358
  value: string;
4320
4359
  name: string;
4321
4360
  }[] | undefined;
4361
+ sku?: string | undefined;
4322
4362
  }[];
4323
4363
  price: {
4324
4364
  currencyCode: string;
@@ -4434,6 +4474,7 @@ export declare const comparisonTableProps: z.ZodObject<{
4434
4474
  value: string;
4435
4475
  name: string;
4436
4476
  }[] | undefined;
4477
+ sku?: string | undefined;
4437
4478
  }[] | undefined;
4438
4479
  reviews?: {
4439
4480
  date: string;
@@ -4535,6 +4576,7 @@ export declare const comparisonTableProps: z.ZodObject<{
4535
4576
  value: string;
4536
4577
  name: string;
4537
4578
  }[] | undefined;
4579
+ sku?: string | undefined;
4538
4580
  }[] | undefined;
4539
4581
  reviews?: {
4540
4582
  date: string;