@40rty/ams-ui 0.5.6 → 0.5.7

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-H6MSAD5M.js → chunk-434KIH5P.js} +17 -10
  3. package/dist/{chunk-2HM6EVDV.js → chunk-4ZX4IRC6.js} +241 -389
  4. package/dist/chunk-FSY7MEP5.js +843 -0
  5. package/dist/{chunk-WVD2Y2N2.js → chunk-G3IXNKXL.js} +15 -8
  6. package/dist/{chunk-CKNELL6G.js → chunk-URUKPL57.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
@@ -1,56 +1,5 @@
1
- /**
2
- * UI text constants — every visible string in the catalog components
3
- * lives here so brand overrides + i18n have a single seam. Components
4
- * read via `useLabels()` (see `LabelsContext`); the default export is
5
- * the fallback merged with whatever the brand provides.
6
- *
7
- * RULES:
8
- * - No string literals inside catalog components for visitor-facing
9
- * text. Always go through this map.
10
- * - Keys are intent-named ("addToBag", not "btn1"). Easy to grep.
11
- * - Sub-objects group by feature (`product.*`, `cart.*`) so brand
12
- * overrides can scope cleanly.
13
- */
14
- export interface Labels {
15
- product: {
16
- addToBag: string;
17
- added: string;
18
- save: string;
19
- saved: string;
20
- inStock: string;
21
- outOfStock: string;
22
- /** Heading shown above the auto-surfaced reviews block on PDP. */
23
- reviewsTitle: string;
24
- /**
25
- * Shown when the reviews surface has SETTLED with nothing to show. Not a
26
- * skeleton and not blank: rendering nothing leaves whatever heading sits
27
- * above it promising reviews over a void, which reads as a load failure.
28
- */
29
- reviewsEmpty: string;
30
- /** Spec-row dt labels — keep camelCase keys mapping to display text. */
31
- specs: {
32
- vendor: string;
33
- type: string;
34
- available: string;
35
- rating: string;
36
- tags: string;
37
- variant: string;
38
- };
39
- /** Aria + sr-only copy. */
40
- a11y: {
41
- ratingLabel: (value: number, count: number) => string;
42
- };
43
- };
44
- rating: {
45
- /** Suffix after the numeric average — "4.8 · 230 reviews". */
46
- reviewsCount: (count: number) => string;
47
- };
48
- variantPicker: {
49
- /** Heading shown when add-to-cart needs a choice before it can proceed. */
50
- title: string;
51
- /** Dismiss without adding. */
52
- dismiss: string;
53
- };
1
+ /** The agent's own surfaces: presence, the brief, the conversation page, sharing. */
2
+ export interface AgentLabels {
54
3
  canvas: {
55
4
  /** Share the current canvas as a read-only link. */
56
5
  share: string;
@@ -176,72 +125,6 @@ export interface Labels {
176
125
  dismiss: string;
177
126
  };
178
127
  };
179
- menu: {
180
- /** Leading row inside a department's expanded accordion (touch menu) that
181
- * dispatches the department's own top-level action — the tap-target that
182
- * preserves the "shop the whole department" intent a desktop visitor gets
183
- * by clicking the department header. `label` is the department name. */
184
- shopAll: (label: string) => string;
185
- };
186
- cart: {
187
- /** Header title above the drawer body — defaults to "bag" per the
188
- * base design language; brands that use "cart" terminology
189
- * override here. */
190
- title: string;
191
- /** Empty-state primary line. */
192
- empty: string;
193
- /** Empty-state secondary hint. */
194
- emptyHint: string;
195
- /** Aria-label for the line-removal button. */
196
- removeLine: string;
197
- /** Secondary cart CTA — exits to the merchant's official store with
198
- * the cart contents (rendered only when the cart carries a
199
- * `storeCartUrl`). Brands override with their store name, e.g.
200
- * "continue on acme.example". */
201
- viewOnStore: string;
202
- /** Free-shipping threshold in the store's currency. Brands that
203
- * offer free shipping above an amount set this; `null` (default)
204
- * means the threshold is unknown and shipping defers to checkout. */
205
- freeShippingThreshold: number | null;
206
- /** Shipping row value when subtotal qualifies for free shipping. */
207
- shippingFree: string;
208
- /** Note shown when shipping (and therefore the final total) can
209
- * only be determined at checkout. */
210
- shippingDeferred: string;
211
- /** Promo-code input placeholder + collapsed-toggle label. */
212
- promoPlaceholder: string;
213
- /** Promo-code apply button. */
214
- promoApply: string;
215
- /** Shown next to an applied code that doesn't qualify (expired,
216
- * minimum not met). */
217
- promoNotApplicable: string;
218
- /** Inline error when the backend rejects a code outright
219
- * (not found / malformed) — distinct from accepted-but-not-applicable. */
220
- promoInvalid: string;
221
- /** Discount row label (shown when an applied code lowers the total). */
222
- discount: string;
223
- /** Line-count noun beside the drawer title ("3 items"). Two forms rather
224
- * than a formatter: `Labels` is a plain data contract, so a brand
225
- * overrides the words without shipping code. */
226
- itemSingular: string;
227
- itemPlural: string;
228
- /** Money-row labels in the drawer foot. Overridable like every other
229
- * label — `labels.discount` already was, and leaving its neighbours as
230
- * literals meant a brand could rename one row but not the rest. */
231
- subtotal: string;
232
- shipping: string;
233
- total: string;
234
- /** Stands in for a pending line's name while the add is in flight and the
235
- * product is not yet known. A row that shows nothing reads as broken. */
236
- linePending: string;
237
- /** Stands in for a pending line's price. The amount is genuinely unknown
238
- * until the backend accepts the line — printing "$0" asserts a price the
239
- * store never quoted. */
240
- linePendingPrice: string;
241
- /** Footer note while any line is still pending: the totals shown are the
242
- * last settled ones and do not yet include that line. */
243
- totalsPending: string;
244
- };
245
128
  /** The conversation page (`@fourty/ui/conversation`): its chrome and blocks. */
246
129
  conversation: {
247
130
  home: string;
@@ -249,6 +132,8 @@ export interface Labels {
249
132
  whatIKnow: string;
250
133
  startOver: string;
251
134
  clearFacts: string;
135
+ /** Accessible name of one fact's clear control. */
136
+ clearFact: (label: string) => string;
252
137
  searching: (query: string) => string;
253
138
  working: string;
254
139
  lookedAt: (count: number) => string;
@@ -262,4 +147,3 @@ export interface Labels {
262
147
  explainProducts: string;
263
148
  };
264
149
  }
265
- export declare const DEFAULT_LABELS: Labels;
@@ -0,0 +1,252 @@
1
+ /** Commerce chrome: product, cart, rating, the variant choice. */
2
+ export interface CommerceLabels {
3
+ product: {
4
+ addToBag: string;
5
+ added: string;
6
+ save: string;
7
+ saved: string;
8
+ inStock: string;
9
+ outOfStock: string;
10
+ /** Heading shown above the auto-surfaced reviews block on PDP. */
11
+ reviewsTitle: string;
12
+ /**
13
+ * Shown when the reviews surface has SETTLED with nothing to show. Not a
14
+ * skeleton and not blank: rendering nothing leaves whatever heading sits
15
+ * above it promising reviews over a void, which reads as a load failure.
16
+ */
17
+ reviewsEmpty: string;
18
+ /** Spec-row dt labels — keep camelCase keys mapping to display text. */
19
+ specs: {
20
+ vendor: string;
21
+ type: string;
22
+ available: string;
23
+ rating: string;
24
+ tags: string;
25
+ variant: string;
26
+ };
27
+ /** Aria + sr-only copy. */
28
+ a11y: {
29
+ ratingLabel: (value: number, count: number) => string;
30
+ };
31
+ /** `AddToCartButton`'s three states. */
32
+ addToCart: string;
33
+ addedToCart: string;
34
+ adding: string;
35
+ /** Merchandising badges (`ProductBadge`). */
36
+ badge: {
37
+ sale: string;
38
+ soldOut: string;
39
+ new: string;
40
+ };
41
+ /** Spec-table toggle on the PDP; `hidden` is how many rows are folded away. */
42
+ showFewer: string;
43
+ showAll: (hidden: number) => string;
44
+ /** Placeholders where a product has no media. */
45
+ noImages: string;
46
+ noImage: string;
47
+ /** Accessible title of the product video player when the video has none. */
48
+ video: string;
49
+ /** Card CTA that opens the full spec sheet. */
50
+ specSheet: string;
51
+ /** Accessible name for a control that opens one product. */
52
+ view: (title: string) => string;
53
+ /** Sale badge: `amount` is the saving, already formatted in the space's currency + locale. */
54
+ saveAmount: (amount: string) => string;
55
+ /** Buy-box CTA while a variant group still needs a choice (`name` is the group). */
56
+ selectOption: (name: string) => string;
57
+ selectOptions: string;
58
+ /** Buy-box highlight list heading. */
59
+ coreFeatures: string;
60
+ /** Accessible name of a gallery thumbnail (1-based). */
61
+ viewImage: (index: number) => string;
62
+ /** PDP detail tabs. */
63
+ tabs: {
64
+ features: string;
65
+ specs: string;
66
+ manual: string;
67
+ };
68
+ downloadManual: string;
69
+ /** Spec-table rows the PDP derives itself. `value` is the formatted rating. */
70
+ specRows: {
71
+ category: string;
72
+ rating: string;
73
+ ratingValue: (value: string, count: number) => string;
74
+ };
75
+ registry: {
76
+ title: string;
77
+ /** `provider` is the registry service's own name. */
78
+ addTo: (provider: string) => string;
79
+ };
80
+ };
81
+ /** The comparison table's chrome. */
82
+ comparison: {
83
+ /** Eyebrow over the verdict line. */
84
+ verdict: string;
85
+ /** Eyebrow when the table carries no verdict. */
86
+ headToHead: string;
87
+ /** Badge on the recommended column. */
88
+ myPick: string;
89
+ /** Trade-off line verbs: "<pick> leads on …", "<other> takes …". */
90
+ leadsOn: string;
91
+ takes: string;
92
+ /** Accessible name of the per-row winner mark. */
93
+ wins: string;
94
+ /** The floor rows every comparison carries (sdk `buildComparisonRows`). */
95
+ rows: {
96
+ price: string;
97
+ sale: string;
98
+ rating: string;
99
+ percentOff: (pct: number) => string;
100
+ };
101
+ };
102
+ rating: {
103
+ /** Suffix after the numeric average — "4.8 · 230 reviews". */
104
+ reviewsCount: (count: number) => string;
105
+ /** "1,234 reviews" — `formatted` is `count` already formatted in the space's locale. */
106
+ reviewsTotal: (count: number, formatted: string) => string;
107
+ /** Aggregate caption: "Based on 1,234 reviews". */
108
+ basedOn: (count: number, formatted: string) => string;
109
+ };
110
+ variantPicker: {
111
+ /** Heading shown when add-to-cart needs a choice before it can proceed. */
112
+ title: string;
113
+ /** Dismiss without adding. */
114
+ dismiss: string;
115
+ };
116
+ cart: {
117
+ /** Header title above the drawer body — defaults to "bag" per the
118
+ * base design language; brands that use "cart" terminology
119
+ * override here. */
120
+ title: string;
121
+ /** Empty-state primary line. */
122
+ empty: string;
123
+ /** Empty-state secondary hint. */
124
+ emptyHint: string;
125
+ /** Aria-label for the line-removal button. */
126
+ removeLine: string;
127
+ /** Secondary cart CTA — exits to the merchant's official store with
128
+ * the cart contents (rendered only when the cart carries a
129
+ * `storeCartUrl`). Brands override with their store name, e.g.
130
+ * "continue on acme.example". */
131
+ viewOnStore: string;
132
+ /** Free-shipping threshold in the store's currency. Brands that
133
+ * offer free shipping above an amount set this; `null` (default)
134
+ * means the threshold is unknown and shipping defers to checkout. */
135
+ freeShippingThreshold: number | null;
136
+ /** Shipping row value when subtotal qualifies for free shipping. */
137
+ shippingFree: string;
138
+ /** Note shown when shipping (and therefore the final total) can
139
+ * only be determined at checkout. */
140
+ shippingDeferred: string;
141
+ /** Promo-code input placeholder + collapsed-toggle label. */
142
+ promoPlaceholder: string;
143
+ /** Promo-code apply button. */
144
+ promoApply: string;
145
+ /** Shown next to an applied code that doesn't qualify (expired,
146
+ * minimum not met). */
147
+ promoNotApplicable: string;
148
+ /** Inline error when the backend rejects a code outright
149
+ * (not found / malformed) — distinct from accepted-but-not-applicable. */
150
+ promoInvalid: string;
151
+ /** Discount row label (shown when an applied code lowers the total). */
152
+ discount: string;
153
+ /** Line-count noun beside the drawer title ("3 items"). Two forms rather
154
+ * than a formatter: `Labels` is a plain data contract, so a brand
155
+ * overrides the words without shipping code. */
156
+ itemSingular: string;
157
+ itemPlural: string;
158
+ /** Money-row labels in the drawer foot. Overridable like every other
159
+ * label — `labels.discount` already was, and leaving its neighbours as
160
+ * literals meant a brand could rename one row but not the rest. */
161
+ subtotal: string;
162
+ shipping: string;
163
+ total: string;
164
+ /** Stands in for a pending line's name while the add is in flight and the
165
+ * product is not yet known. A row that shows nothing reads as broken. */
166
+ linePending: string;
167
+ /** Stands in for a pending line's price. The amount is genuinely unknown
168
+ * until the backend accepts the line — printing "$0" asserts a price the
169
+ * store never quoted. */
170
+ linePendingPrice: string;
171
+ /** Footer note while any line is still pending: the totals shown are the
172
+ * last settled ones and do not yet include that line. */
173
+ totalsPending: string;
174
+ /** Count under the drawer title ("3 items"). */
175
+ itemCount: (count: number) => string;
176
+ /** Empty-cart CTA back to the page. */
177
+ continueShopping: string;
178
+ /** Quantity steppers and line removal (accessible names). */
179
+ decrease: string;
180
+ increase: string;
181
+ removeItem: string;
182
+ /** Accessible name for a line that opens its product. */
183
+ openLine: (title: string) => string;
184
+ /** Accessible name for an applied promo code's remove control. */
185
+ removeCode: (code: string) => string;
186
+ /** Accessible name for the cart widget, with its item count. */
187
+ openWithCount: (count: number) => string;
188
+ backToChat: string;
189
+ close: string;
190
+ /** Drawer-foot checkout CTA, and its state while the store's checkout opens. */
191
+ checkout: string;
192
+ redirecting: string;
193
+ /** Tooltip + accessible name of the shell's cart button. */
194
+ bag: string;
195
+ openBag: string;
196
+ /** Accessible name of the storefront header's cart link. */
197
+ headerA11y: string;
198
+ /** …once the cart holds something. */
199
+ headerA11yCount: (count: number) => string;
200
+ /** The compact `CartSummary` block (sentence-case, unlike the drawer foot). */
201
+ summary: {
202
+ subtotal: string;
203
+ note: string;
204
+ checkout: string;
205
+ };
206
+ };
207
+ /** The hearted-products drawer. */
208
+ wishlist: {
209
+ title: string;
210
+ /** Count line under the title ("3 pieces"). */
211
+ pieces: (count: number) => string;
212
+ /** Foot row label beside the count. */
213
+ saved: string;
214
+ viewAll: string;
215
+ /** Title of the product set the "view all" CTA opens. */
216
+ collectionTitle: string;
217
+ close: string;
218
+ /** Accessible name of a row's remove control, and its visible word. */
219
+ remove: string;
220
+ removeShort: string;
221
+ empty: string;
222
+ /** Second line of the empty state. */
223
+ emptyHint: string;
224
+ /** Accessible name of the wishlist launcher. */
225
+ items: string;
226
+ };
227
+ /** A product's reviews surface. */
228
+ reviews: {
229
+ verifiedBuyer: string;
230
+ verified: string;
231
+ /** Shown when the reviews could not be fetched. */
232
+ unavailable: string;
233
+ /** Eyebrow over the agent's synthesis of the reviews. */
234
+ summaryEyebrow: string;
235
+ /** Eyebrow over the reviews that answer the visitor's question. */
236
+ onIntent: (intent: string) => string;
237
+ mostRelevant: string;
238
+ all: string;
239
+ sort: {
240
+ recent: string;
241
+ highest: string;
242
+ lowest: string;
243
+ };
244
+ /** Star filter pills: accessible names and the "All" pill's text. */
245
+ filterAll: (count: number) => string;
246
+ filterAllShort: (count: number) => string;
247
+ filterStars: (stars: number, count: number) => string;
248
+ seeAll: (count: number) => string;
249
+ hideAll: string;
250
+ loadMore: (count: number) => string;
251
+ };
252
+ }
@@ -0,0 +1,28 @@
1
+ /** Content and marketing blocks: blog, collections, policies, hero, announcements, social. */
2
+ export interface ContentLabels {
3
+ content: {
4
+ /** Default eyebrows when the agent gives none. */
5
+ blogEyebrow: string;
6
+ collectionsEyebrow: string;
7
+ /** A collection tile's fallback line when it has no description: its size. */
8
+ collectionStyles: (count: number) => string;
9
+ policyEyebrow: string;
10
+ readFullPolicy: string;
11
+ /** The hero's scroll cue: its word and its accessible name. */
12
+ scroll: string;
13
+ scrollNext: string;
14
+ announcementPrev: string;
15
+ announcementNext: string;
16
+ dismiss: string;
17
+ /** Alt text for a shopper's social post; `author` is their handle. */
18
+ ugcVideoPoster: (author: string) => string;
19
+ ugcUpload: (author: string) => string;
20
+ /** `<Thinking>`'s status line when its caller gives none. */
21
+ reading: string;
22
+ /** A page's last-updated line; `date` is already formatted. */
23
+ updated: (date: string) => string;
24
+ /** Default heading of an article's product rail. */
25
+ featuredInGuide: string;
26
+ readTime: (minutes: number) => string;
27
+ };
28
+ }
@@ -0,0 +1,9 @@
1
+ /** Notices the canvas shows when content could not be drawn. */
2
+ export interface NoticeLabels {
3
+ notices: {
4
+ /** A connector failed: what is missing is unknown. */
5
+ contentFailed: string;
6
+ /** Some referenced items no longer exist (deleted, unpublished). */
7
+ itemsUnavailable: (count: number) => string;
8
+ };
9
+ }
@@ -0,0 +1,137 @@
1
+ import type { AttachmentFailure } from '@40rty/ams-sdk';
2
+ /** Spacefront chrome around the canvas: menu, composer, island, panels. */
3
+ export interface ShellLabels {
4
+ menu: {
5
+ /** Leading row inside a department's expanded accordion (touch menu) that
6
+ * dispatches the department's own top-level action — the tap-target that
7
+ * preserves the "shop the whole department" intent a desktop visitor gets
8
+ * by clicking the department header. `label` is the department name. */
9
+ shopAll: (label: string) => string;
10
+ open: string;
11
+ close: string;
12
+ /** Accessible name of the site navigation landmark. */
13
+ site: string;
14
+ /** Accessible name of one department's sub-menu. */
15
+ categories: (label: string) => string;
16
+ };
17
+ /** The composer — desktop dock, side panel and mobile island alike. */
18
+ composer: {
19
+ /** Default field placeholder when the brand supplies none. */
20
+ placeholder: string;
21
+ /** Accessible name of the field when its placeholder is empty. */
22
+ writeMessage: string;
23
+ /** Accessible name of a page's own entry-point field (the hero prompt box). */
24
+ askQuestion: string;
25
+ send: string;
26
+ sendNow: string;
27
+ stop: string;
28
+ cancel: string;
29
+ /** The collapsed composer bubble: its accessible name and its one word. */
30
+ open: string;
31
+ openLabel: string;
32
+ fold: string;
33
+ back: string;
34
+ forward: string;
35
+ toSidePanel: string;
36
+ toBottomDock: string;
37
+ closePanel: string;
38
+ resizePanel: string;
39
+ suggestions: string;
40
+ followUpSuggestions: string;
41
+ /** Empty-thread hint inside the dock. */
42
+ emptyHint: string;
43
+ attach: string;
44
+ removeAttachment: (name: string) => string;
45
+ /** Why an attachment failed, shown on its thumbnail. */
46
+ attachmentFailure: (failure: AttachmentFailure) => string;
47
+ dictate: string;
48
+ stopDictation: string;
49
+ /** Shown in the field when the browser refused the microphone. */
50
+ micDenied: string;
51
+ listening: string;
52
+ newConversation: string;
53
+ olderConversations: string;
54
+ /** Compact age of an older conversation in the switcher ("now", "5m"…);
55
+ * past a week the row shows a date in the space's locale instead. */
56
+ since: {
57
+ now: string;
58
+ minutes: (count: number) => string;
59
+ hours: (count: number) => string;
60
+ days: (count: number) => string;
61
+ };
62
+ jumpToEarlier: string;
63
+ /** The mobile island notch's expand/collapse control. */
64
+ showMoreDetail: string;
65
+ showLessDetail: string;
66
+ };
67
+ /** The conversation surface itself — island thread, side thread panel. */
68
+ thread: {
69
+ title: string;
70
+ /** The panel's collapsed tab. */
71
+ tab: string;
72
+ placeholder: string;
73
+ /** Empty-thread invitation. */
74
+ empty: string;
75
+ /** Shown while the agent works and nothing has streamed yet. */
76
+ working: string;
77
+ open: string;
78
+ close: string;
79
+ /** Accessible name of the folded mobile island. */
80
+ showAssistant: string;
81
+ /** A shell's own assistant toggle (the desktop launcher). */
82
+ openAssistant: string;
83
+ closeAssistant: string;
84
+ /** Empty-thread intro in a brand's thread panel: headline + one line. */
85
+ introTitle: string;
86
+ introHint: string;
87
+ };
88
+ /** The live presence strip (`SpacefrontPresence`, `PresenceActivity`, `PendingTurn`). */
89
+ live: {
90
+ thinking: string;
91
+ /** Heading over the facts the agent took from the ask. */
92
+ understood: string;
93
+ /** Confirms the agent's question. */
94
+ confirm: string;
95
+ /** Accessible name of the strip itself. */
96
+ activity: string;
97
+ /** Accessible name of the question group. */
98
+ askGroup: string;
99
+ dismissAsk: string;
100
+ forgetFact: (label: string, value: string) => string;
101
+ /** Activity lines while the agent searches. */
102
+ lookingThrough: (count: number) => string;
103
+ lookingFor: (query: string) => string;
104
+ /** Floor line under the pending turn when no live beat has arrived. */
105
+ pendingFloor: string;
106
+ };
107
+ /** The per-session prompt history menu. */
108
+ history: {
109
+ title: string;
110
+ session: string;
111
+ prompts: (count: number) => string;
112
+ empty: string;
113
+ clear: string;
114
+ };
115
+ /** The shell's error banner — the visitor-safe wording of each failure. */
116
+ errors: {
117
+ generic: string;
118
+ noAnswer: string;
119
+ noResponse: string;
120
+ dropped: string;
121
+ sendFailed: string;
122
+ sessionFailed: string;
123
+ expired: string;
124
+ restoreFailed: string;
125
+ reconnecting: string;
126
+ retry: string;
127
+ };
128
+ nav: {
129
+ home: string;
130
+ breadcrumb: string;
131
+ search: string;
132
+ /** Header wordmark when the brand gives no logo. */
133
+ storeFallback: string;
134
+ /** Accessible name of the conversation page's turn navigation. */
135
+ conversation: string;
136
+ };
137
+ }
@@ -1,18 +1,32 @@
1
1
  import * as React from 'react';
2
+ import { useTextDirection } from '@40rty/ams-sdk';
2
3
  import { type Labels } from './labels';
3
4
  export type LabelOverrides = DeepPartial<Labels>;
4
5
  type DeepPartial<T> = {
5
6
  [K in keyof T]?: T[K] extends Record<string, unknown> | object ? DeepPartial<T[K]> : T[K];
6
7
  };
7
8
  export interface LabelsProviderProps {
8
- /** Partial overrides — deep-merged onto DEFAULT_LABELS. */
9
+ /** The space's locale (BCP 47, e.g. `he-IL`). Given, it also picks the base
10
+ * label set (`labelsForLocale`) and is what `useLocale()` returns below this
11
+ * provider; absent, both are inherited from the parent. */
12
+ locale?: string;
13
+ /** A complete label set to build on, replacing the inherited one. Defaults to
14
+ * `labelsForLocale(locale)` when `locale` is given. */
15
+ labels?: Labels;
16
+ /** Partial overrides — deep-merged onto the base set (`labels`, else the
17
+ * locale's set, else the PARENT provider's labels). */
9
18
  overrides?: LabelOverrides;
10
19
  children: React.ReactNode;
11
20
  }
12
- export declare function LabelsProvider({ overrides, children }: LabelsProviderProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function LabelsProvider({ locale, labels, overrides, children }: LabelsProviderProps): import("react/jsx-runtime").JSX.Element;
13
22
  /**
14
- * Read the active labels map. Falls back to `DEFAULT_LABELS` outside a
15
- * provider so storybook / catalog previews work without wrapping.
23
+ * Read the active labels map. Falls back to `DEFAULT_LABELS` (English) outside
24
+ * a provider so storybook / catalog previews work without wrapping.
16
25
  */
17
26
  export declare function useLabels(): Labels;
18
- export {};
27
+ /** The space's locale (BCP 47) — format money, numbers and dates in THIS, never
28
+ * the browser's language. `en-US` outside a provider. */
29
+ export declare function useLocale(): string;
30
+ /** The space's writing direction, for the rare layout that needs it in JS
31
+ * (a transform, a pointer delta). CSS should use logical properties instead. */
32
+ export { useTextDirection };
@@ -7,7 +7,7 @@ export interface MoneyProps extends React.HTMLAttributes<HTMLSpanElement> {
7
7
  amount?: number;
8
8
  /** Currency code (ISO 4217), default 'USD' */
9
9
  currency?: string;
10
- /** Locale for formatting */
10
+ /** Overrides the space locale (`useLocale()`) for this one amount. */
11
11
  locale?: string;
12
12
  }
13
13
  export declare const Money: React.ForwardRefExoticComponent<MoneyProps & React.RefAttributes<HTMLSpanElement>>;
@@ -53,4 +53,4 @@ export interface ComposerProps {
53
53
  * transform is live, then snaps to the viewport when the transform
54
54
  * clears — a guaranteed end-of-animation jump.
55
55
  */
56
- export declare function Composer({ placeholder, starterSuggestions, threadHistory, onChipSelect, typeToFocus, shareCanvas, attachments: attachmentsController, }: ComposerProps): React.ReactElement;
56
+ export declare function Composer({ placeholder: placeholderProp, starterSuggestions, threadHistory, onChipSelect, typeToFocus, shareCanvas, attachments: attachmentsController, }: ComposerProps): React.ReactElement;
@@ -22,7 +22,7 @@ export interface SideDockProps {
22
22
  /** Stacking order within the shell. Defaults to 40 — below drawer
23
23
  * slots (≈60), above canvas content. */
24
24
  zIndex?: number;
25
- /** When set, the dock's left edge becomes a drag handle: the user resizes
25
+ /** When set, the dock's inner (inline-start) edge becomes a drag handle: the user resizes
26
26
  * the panel and this reports the new width (clamped to min/max). Omit for a
27
27
  * fixed-width dock (the default). */
28
28
  onWidthChange?: (width: number) => void;
@@ -36,4 +36,4 @@ export interface SpacefrontIslandProps {
36
36
  * screen — one composer at a time — and `<SpacefrontPresence>` attaches above
37
37
  * its slab (`host-shell-store.ts`).
38
38
  */
39
- export declare function SpacefrontIsland({ placeholder, emptyText, workingText, container, stopKeyPropagation, }: SpacefrontIslandProps): React.ReactElement | null;
39
+ export declare function SpacefrontIsland({ placeholder: placeholderProp, emptyText: emptyProp, workingText: workingProp, container, stopKeyPropagation, }: SpacefrontIslandProps): React.ReactElement | null;
@@ -22,4 +22,4 @@ export interface SpacefrontPresenceProps {
22
22
  * settle dwell after); the facts are the band's own projection (`useBandFacts`).
23
23
  * Silent when there is nothing to say. Styles: `@40rty/ams-ui/presence.css`.
24
24
  */
25
- export declare function SpacefrontPresence({ thinkingText, factsLabel, confirmLabel, placement, }: SpacefrontPresenceProps): React.ReactElement | null;
25
+ export declare function SpacefrontPresence({ thinkingText: thinkingProp, factsLabel: factsProp, confirmLabel: confirmProp, placement, }: SpacefrontPresenceProps): React.ReactElement | null;
@@ -21,4 +21,4 @@ export interface VoiceIslandProps {
21
21
  * running transcript with a single stop control. It does NOT cover the canvas —
22
22
  * a small island at the bottom, so the layout keeps building behind it.
23
23
  */
24
- export declare function VoiceIsland({ transcript, onStop, onCancel, idleHint }: VoiceIslandProps): React.ReactElement;
24
+ export declare function VoiceIsland({ transcript, onStop, onCancel, idleHint: idleHintProp }: VoiceIslandProps): React.ReactElement;
@@ -1,2 +1,4 @@
1
1
  import type { Money } from '../types/commerce';
2
- export declare function formatMoney(money: Money | null | undefined, locale?: string): string;
2
+ /** Format a money value. The currency comes from the money; the `locale` is the
3
+ * SPACE's (`useLocale()`), never the visitor's browser language. */
4
+ export declare function formatMoney(money: Money | null | undefined, locale: string): string;