@40rty/ams-ui 0.5.3 → 0.5.5

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 (35) hide show
  1. package/dist/{chunk-2QRYXSCB.js → chunk-CKNELL6G.js} +582 -823
  2. package/dist/{chunk-JQNZ5UUK.js → chunk-I5QE47QY.js} +12 -41
  3. package/dist/chunk-WDL5PHO2.js +36 -0
  4. package/dist/chunk-WVD2Y2N2.js +318 -0
  5. package/dist/conversation.js +10 -7
  6. package/dist/css/shell/spacefront-island.css +113 -74
  7. package/dist/index.js +12 -12
  8. package/dist/island.js +80 -51
  9. package/dist/shell.js +19 -11
  10. package/dist/types/catalog-data/content.d.ts +16 -16
  11. package/dist/types/catalog-data/ecommerce.d.ts +88 -88
  12. package/dist/types/catalog-data/social.d.ts +28 -28
  13. package/dist/types/conversation/ClosingQuestion.d.ts +13 -0
  14. package/dist/types/conversation/ConversationCanvas.d.ts +11 -0
  15. package/dist/types/conversation/PageComposer.d.ts +12 -0
  16. package/dist/types/conversation/ResultSheet.d.ts +9 -0
  17. package/dist/types/conversation/TurnCanvas.d.ts +12 -0
  18. package/dist/types/conversation/TurnHeader.d.ts +9 -0
  19. package/dist/types/conversation/activity-line.d.ts +3 -0
  20. package/dist/types/conversation/blocks/ProductTile.d.ts +31 -0
  21. package/dist/types/conversation/blocks/blocks.d.ts +27 -0
  22. package/dist/types/conversation/blocks/index.d.ts +7 -0
  23. package/dist/types/conversation/blocks/product-blocks.d.ts +3 -0
  24. package/dist/types/conversation/blocks/schemas.d.ts +4322 -0
  25. package/dist/types/conversation/index.d.ts +11 -0
  26. package/dist/types/conversation/presence-parts.d.ts +15 -0
  27. package/dist/types/conversation/turn-text.d.ts +31 -0
  28. package/dist/types/conversation/use-page-products.d.ts +3 -0
  29. package/dist/types/shell/SpacefrontIsland.d.ts +13 -10
  30. package/dist/types/shell/index.d.ts +1 -1
  31. package/dist/types/shell/mobile/MorphIsland.d.ts +1 -1
  32. package/dist/types/shell/mobile/{hero-entry-point.d.ts → entry-point.d.ts} +35 -14
  33. package/dist/types/shell/mobile/island-metrics.d.ts +1 -1
  34. package/dist/types/shell/use-scroll-edges.d.ts +15 -0
  35. package/package.json +2 -2
@@ -147,6 +147,7 @@ export declare const reviewsProps: z.ZodObject<{
147
147
  width?: number | undefined;
148
148
  height?: number | undefined;
149
149
  }[];
150
+ host?: string | undefined;
150
151
  previewImage?: {
151
152
  url: string;
152
153
  altText: string;
@@ -155,9 +156,9 @@ export declare const reviewsProps: z.ZodObject<{
155
156
  srcSet?: string | undefined;
156
157
  } | undefined;
157
158
  embedUrl?: string | undefined;
158
- host?: string | undefined;
159
159
  }, {
160
160
  kind: "hosted" | "external";
161
+ host?: string | undefined;
161
162
  altText?: string | undefined;
162
163
  previewImage?: {
163
164
  url: string;
@@ -173,7 +174,6 @@ export declare const reviewsProps: z.ZodObject<{
173
174
  height?: number | undefined;
174
175
  }[] | undefined;
175
176
  embedUrl?: string | undefined;
176
- host?: string | undefined;
177
177
  }>, "many">>;
178
178
  variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
179
179
  id: z.ZodString;
@@ -318,8 +318,8 @@ export declare const reviewsProps: z.ZodObject<{
318
318
  current: z.ZodDefault<z.ZodBoolean>;
319
319
  }, "strip", z.ZodTypeAny, {
320
320
  id: string;
321
- handle: string;
322
321
  title: string;
322
+ handle: string;
323
323
  available: boolean;
324
324
  color: string;
325
325
  current: boolean;
@@ -332,8 +332,8 @@ export declare const reviewsProps: z.ZodObject<{
332
332
  } | undefined;
333
333
  }, {
334
334
  id: string;
335
- handle: string;
336
335
  title: string;
336
+ handle: string;
337
337
  color: string;
338
338
  available?: boolean | undefined;
339
339
  swatchImage?: {
@@ -377,8 +377,8 @@ export declare const reviewsProps: z.ZodObject<{
377
377
  unavailable: z.ZodDefault<z.ZodBoolean>;
378
378
  }, "strip", z.ZodTypeAny, {
379
379
  id: string;
380
- handle: string;
381
380
  title: string;
381
+ handle: string;
382
382
  unavailable: boolean;
383
383
  description: string;
384
384
  variants: {
@@ -428,6 +428,7 @@ export declare const reviewsProps: z.ZodObject<{
428
428
  width?: number | undefined;
429
429
  height?: number | undefined;
430
430
  }[];
431
+ host?: string | undefined;
431
432
  previewImage?: {
432
433
  url: string;
433
434
  altText: string;
@@ -436,13 +437,12 @@ export declare const reviewsProps: z.ZodObject<{
436
437
  srcSet?: string | undefined;
437
438
  } | undefined;
438
439
  embedUrl?: string | undefined;
439
- host?: string | undefined;
440
440
  }[];
441
441
  availableForSale: boolean;
442
442
  colorVariants: {
443
443
  id: string;
444
- handle: string;
445
444
  title: string;
445
+ handle: string;
446
446
  available: boolean;
447
447
  color: string;
448
448
  current: boolean;
@@ -539,6 +539,7 @@ export declare const reviewsProps: z.ZodObject<{
539
539
  }[] | undefined;
540
540
  videos?: {
541
541
  kind: "hosted" | "external";
542
+ host?: string | undefined;
542
543
  altText?: string | undefined;
543
544
  previewImage?: {
544
545
  url: string;
@@ -554,14 +555,13 @@ export declare const reviewsProps: z.ZodObject<{
554
555
  height?: number | undefined;
555
556
  }[] | undefined;
556
557
  embedUrl?: string | undefined;
557
- host?: string | undefined;
558
558
  }[] | undefined;
559
559
  availableForSale?: boolean | undefined;
560
560
  collections?: string[] | undefined;
561
561
  colorVariants?: {
562
562
  id: string;
563
- handle: string;
564
563
  title: string;
564
+ handle: string;
565
565
  color: string;
566
566
  available?: boolean | undefined;
567
567
  swatchImage?: {
@@ -674,6 +674,7 @@ export declare const reviewsProps: z.ZodObject<{
674
674
  width?: number | undefined;
675
675
  height?: number | undefined;
676
676
  }[];
677
+ host?: string | undefined;
677
678
  previewImage?: {
678
679
  url: string;
679
680
  altText: string;
@@ -682,9 +683,9 @@ export declare const reviewsProps: z.ZodObject<{
682
683
  srcSet?: string | undefined;
683
684
  } | undefined;
684
685
  embedUrl?: string | undefined;
685
- host?: string | undefined;
686
686
  }, {
687
687
  kind: "hosted" | "external";
688
+ host?: string | undefined;
688
689
  altText?: string | undefined;
689
690
  previewImage?: {
690
691
  url: string;
@@ -700,7 +701,6 @@ export declare const reviewsProps: z.ZodObject<{
700
701
  height?: number | undefined;
701
702
  }[] | undefined;
702
703
  embedUrl?: string | undefined;
703
- host?: string | undefined;
704
704
  }>, "many">>;
705
705
  variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
706
706
  id: z.ZodString;
@@ -845,8 +845,8 @@ export declare const reviewsProps: z.ZodObject<{
845
845
  current: z.ZodDefault<z.ZodBoolean>;
846
846
  }, "strip", z.ZodTypeAny, {
847
847
  id: string;
848
- handle: string;
849
848
  title: string;
849
+ handle: string;
850
850
  available: boolean;
851
851
  color: string;
852
852
  current: boolean;
@@ -859,8 +859,8 @@ export declare const reviewsProps: z.ZodObject<{
859
859
  } | undefined;
860
860
  }, {
861
861
  id: string;
862
- handle: string;
863
862
  title: string;
863
+ handle: string;
864
864
  color: string;
865
865
  available?: boolean | undefined;
866
866
  swatchImage?: {
@@ -904,8 +904,8 @@ export declare const reviewsProps: z.ZodObject<{
904
904
  unavailable: z.ZodDefault<z.ZodBoolean>;
905
905
  }, "strip", z.ZodTypeAny, {
906
906
  id: string;
907
- handle: string;
908
907
  title: string;
908
+ handle: string;
909
909
  unavailable: boolean;
910
910
  description: string;
911
911
  variants: {
@@ -955,6 +955,7 @@ export declare const reviewsProps: z.ZodObject<{
955
955
  width?: number | undefined;
956
956
  height?: number | undefined;
957
957
  }[];
958
+ host?: string | undefined;
958
959
  previewImage?: {
959
960
  url: string;
960
961
  altText: string;
@@ -963,13 +964,12 @@ export declare const reviewsProps: z.ZodObject<{
963
964
  srcSet?: string | undefined;
964
965
  } | undefined;
965
966
  embedUrl?: string | undefined;
966
- host?: string | undefined;
967
967
  }[];
968
968
  availableForSale: boolean;
969
969
  colorVariants: {
970
970
  id: string;
971
- handle: string;
972
971
  title: string;
972
+ handle: string;
973
973
  available: boolean;
974
974
  color: string;
975
975
  current: boolean;
@@ -1066,6 +1066,7 @@ export declare const reviewsProps: z.ZodObject<{
1066
1066
  }[] | undefined;
1067
1067
  videos?: {
1068
1068
  kind: "hosted" | "external";
1069
+ host?: string | undefined;
1069
1070
  altText?: string | undefined;
1070
1071
  previewImage?: {
1071
1072
  url: string;
@@ -1081,14 +1082,13 @@ export declare const reviewsProps: z.ZodObject<{
1081
1082
  height?: number | undefined;
1082
1083
  }[] | undefined;
1083
1084
  embedUrl?: string | undefined;
1084
- host?: string | undefined;
1085
1085
  }[] | undefined;
1086
1086
  availableForSale?: boolean | undefined;
1087
1087
  collections?: string[] | undefined;
1088
1088
  colorVariants?: {
1089
1089
  id: string;
1090
- handle: string;
1091
1090
  title: string;
1091
+ handle: string;
1092
1092
  color: string;
1093
1093
  available?: boolean | undefined;
1094
1094
  swatchImage?: {
@@ -1128,8 +1128,8 @@ export declare const reviewsProps: z.ZodObject<{
1128
1128
  title: string;
1129
1129
  product?: {
1130
1130
  id: string;
1131
- handle: string;
1132
1131
  title: string;
1132
+ handle: string;
1133
1133
  unavailable: boolean;
1134
1134
  description: string;
1135
1135
  variants: {
@@ -1179,6 +1179,7 @@ export declare const reviewsProps: z.ZodObject<{
1179
1179
  width?: number | undefined;
1180
1180
  height?: number | undefined;
1181
1181
  }[];
1182
+ host?: string | undefined;
1182
1183
  previewImage?: {
1183
1184
  url: string;
1184
1185
  altText: string;
@@ -1187,13 +1188,12 @@ export declare const reviewsProps: z.ZodObject<{
1187
1188
  srcSet?: string | undefined;
1188
1189
  } | undefined;
1189
1190
  embedUrl?: string | undefined;
1190
- host?: string | undefined;
1191
1191
  }[];
1192
1192
  availableForSale: boolean;
1193
1193
  colorVariants: {
1194
1194
  id: string;
1195
- handle: string;
1196
1195
  title: string;
1196
+ handle: string;
1197
1197
  available: boolean;
1198
1198
  color: string;
1199
1199
  current: boolean;
@@ -1229,8 +1229,8 @@ export declare const reviewsProps: z.ZodObject<{
1229
1229
  } | undefined;
1230
1230
  } | {
1231
1231
  id: string;
1232
- handle: string;
1233
1232
  title: string;
1233
+ handle: string;
1234
1234
  unavailable: boolean;
1235
1235
  description: string;
1236
1236
  variants: {
@@ -1280,6 +1280,7 @@ export declare const reviewsProps: z.ZodObject<{
1280
1280
  width?: number | undefined;
1281
1281
  height?: number | undefined;
1282
1282
  }[];
1283
+ host?: string | undefined;
1283
1284
  previewImage?: {
1284
1285
  url: string;
1285
1286
  altText: string;
@@ -1288,13 +1289,12 @@ export declare const reviewsProps: z.ZodObject<{
1288
1289
  srcSet?: string | undefined;
1289
1290
  } | undefined;
1290
1291
  embedUrl?: string | undefined;
1291
- host?: string | undefined;
1292
1292
  }[];
1293
1293
  availableForSale: boolean;
1294
1294
  colorVariants: {
1295
1295
  id: string;
1296
- handle: string;
1297
1296
  title: string;
1297
+ handle: string;
1298
1298
  available: boolean;
1299
1299
  color: string;
1300
1300
  current: boolean;
@@ -1401,6 +1401,7 @@ export declare const reviewsProps: z.ZodObject<{
1401
1401
  }[] | undefined;
1402
1402
  videos?: {
1403
1403
  kind: "hosted" | "external";
1404
+ host?: string | undefined;
1404
1405
  altText?: string | undefined;
1405
1406
  previewImage?: {
1406
1407
  url: string;
@@ -1416,14 +1417,13 @@ export declare const reviewsProps: z.ZodObject<{
1416
1417
  height?: number | undefined;
1417
1418
  }[] | undefined;
1418
1419
  embedUrl?: string | undefined;
1419
- host?: string | undefined;
1420
1420
  }[] | undefined;
1421
1421
  availableForSale?: boolean | undefined;
1422
1422
  collections?: string[] | undefined;
1423
1423
  colorVariants?: {
1424
1424
  id: string;
1425
- handle: string;
1426
1425
  title: string;
1426
+ handle: string;
1427
1427
  color: string;
1428
1428
  available?: boolean | undefined;
1429
1429
  swatchImage?: {
@@ -1502,6 +1502,7 @@ export declare const reviewsProps: z.ZodObject<{
1502
1502
  }[] | undefined;
1503
1503
  videos?: {
1504
1504
  kind: "hosted" | "external";
1505
+ host?: string | undefined;
1505
1506
  altText?: string | undefined;
1506
1507
  previewImage?: {
1507
1508
  url: string;
@@ -1517,14 +1518,13 @@ export declare const reviewsProps: z.ZodObject<{
1517
1518
  height?: number | undefined;
1518
1519
  }[] | undefined;
1519
1520
  embedUrl?: string | undefined;
1520
- host?: string | undefined;
1521
1521
  }[] | undefined;
1522
1522
  availableForSale?: boolean | undefined;
1523
1523
  collections?: string[] | undefined;
1524
1524
  colorVariants?: {
1525
1525
  id: string;
1526
- handle: string;
1527
1526
  title: string;
1527
+ handle: string;
1528
1528
  color: string;
1529
1529
  available?: boolean | undefined;
1530
1530
  swatchImage?: {
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { type TurnAsk } from '@40rty/ams-sdk';
3
+ /**
4
+ * The question the agent closed its answer on, set as the answer's last line:
5
+ * larger, in ink, with the design's arrow. A `choice` question's answers are
6
+ * the words to tap, in place in the sentence — tapping one replies with it.
7
+ * Only the newest settled turn's answers can be tapped.
8
+ */
9
+ export declare function ClosingQuestion({ ask, answerable, onReply }: {
10
+ ask: TurnAsk;
11
+ answerable: boolean;
12
+ onReply: (answer: string) => void;
13
+ }): React.ReactElement;
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { type CanvasMotionStyle } from '@40rty/ams-sdk';
3
+ /**
4
+ * The conversation page's canvas: each turn opens with its own header (where
5
+ * the visitor is, what the agent knows, their words, the answer), then the
6
+ * blocks as a bento, one page per turn. A shell passes it as `canvas` and
7
+ * `PageComposer` as `canvasComposer` to `ShellScaffold`.
8
+ */
9
+ export declare function ConversationCanvas({ motion }: {
10
+ motion?: CanvasMotionStyle;
11
+ }): React.ReactElement;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ /** Id of the page's input (its label target; tests find it by it). */
3
+ export declare const PAGE_COMPOSER_INPUT_ID = "fourty-page-composer";
4
+ /**
5
+ * The conversation page's prompt input, IN the page: the agent's follow-up chips over
6
+ * one bar pinned to the bottom of the canvas. While the agent works, the bar
7
+ * reads what it is doing instead of taking input.
8
+ */
9
+ export declare function PageComposer({ placeholder, starters }: {
10
+ placeholder: string;
11
+ starters: string[];
12
+ }): React.ReactElement;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * The agent's result page: one sheet holding the answer's header, its blocks
4
+ * and its closing question. The welcome page is the brand's own page, so the
5
+ * sheet is there only while a turn's page is on screen.
6
+ */
7
+ export declare function ResultSheet({ children }: {
8
+ children: React.ReactNode;
9
+ }): React.ReactElement;
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * The canvas under a turn. Once the visitor has asked something, the welcome
4
+ * page's sections are not part of the answer: while the canvas still holds the
5
+ * untouched welcome layout it stands aside, so the turn's header is the whole
6
+ * page. While a new turn works, the page stays sharp and in place — the
7
+ * answer may change it rather than replace it. It stays mounted — the engine
8
+ * keeps its state and scroll.
9
+ */
10
+ export declare function TurnCanvas({ children }: {
11
+ children: React.ReactNode;
12
+ }): React.ReactElement;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * The top of a conversation turn page — where the visitor is in the conversation
4
+ * (crumbs back through every turn), what the agent knows, the visitor's own
5
+ * words, and the answer set as the page's headline. The agent's presence
6
+ * lives here too: while it works, a thinking row stands in for the answer.
7
+ * Hidden on the welcome page.
8
+ */
9
+ export declare function TurnHeader(): React.ReactElement | null;
@@ -0,0 +1,3 @@
1
+ import type { ConversationActivity } from '@40rty/ams-sdk';
2
+ /** The agent's activity as one line — what the thinking row and the composer show while it works. */
3
+ export declare function useActivityLine(activity: ConversationActivity): string;
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import type { Product } from '@40rty/ams-sdk';
3
+ /** What a block hands the brand's tile beside the product: a corner badge, a one-line note. */
4
+ export interface ConversationTileProps {
5
+ product: Product;
6
+ badge?: string;
7
+ blurb?: string;
8
+ }
9
+ export declare function ConversationProvider({ tile, children }: {
10
+ tile: React.ComponentType<ConversationTileProps>;
11
+ children: React.ReactNode;
12
+ }): React.ReactElement;
13
+ /**
14
+ * The block's products with a reserved slot (`null`) for every ref still
15
+ * resolving — the platform's reserve-and-reveal count — so a block is its
16
+ * final size from the frame it lands and each tile fills in place.
17
+ */
18
+ export declare function useReserved<T>(items: T[]): Array<T | null>;
19
+ /** A product in a block, drawn by the brand's tile. Each tile is its own container. */
20
+ export declare function ProductTile(props: ConversationTileProps): React.ReactElement;
21
+ /** A tile's footprint while its product resolves. */
22
+ export declare function TileReserve({ blurb }: {
23
+ blurb?: string;
24
+ }): React.ReactElement;
25
+ /**
26
+ * Whether a product list has landed: true from the first render where no slot
27
+ * was still reserved, and it stays true. Reserved tiles are for the first
28
+ * load only — after it, a block stays on the platform's item engine, so a
29
+ * swap or edit (which re-resolves the list) animates instead of remounting.
30
+ */
31
+ export declare function useLanded(reserved: boolean): boolean;
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ export declare const PILL_SOLID = "inline-flex h-12 min-h-12 items-center justify-center whitespace-nowrap rounded-[var(--fourty-convo-radius)] [text-transform:var(--fourty-convo-button-transform)] px-5 text-sm font-medium leading-5 cursor-pointer [transition:background-color_0.3s,color_0.3s,border-color_0.3s,opacity_0.3s] border border-[var(--fourty-convo-ink)] bg-[var(--fourty-convo-ink)] text-[var(--fourty-convo-sheet)] hover:bg-[var(--fourty-convo-sheet)] hover:text-[var(--fourty-convo-ink)] disabled:cursor-default disabled:opacity-40";
3
+ export declare const PILL_OUTLINE = "inline-flex h-12 min-h-12 items-center justify-center whitespace-nowrap rounded-[var(--fourty-convo-radius)] [text-transform:var(--fourty-convo-button-transform)] px-5 text-sm font-medium leading-5 cursor-pointer [transition:background-color_0.3s,color_0.3s,border-color_0.3s,opacity_0.3s] border border-current bg-transparent text-current hover:border-[var(--fourty-convo-ink)] hover:bg-[var(--fourty-convo-ink)] hover:text-[var(--fourty-convo-sheet)]";
4
+ /**
5
+ * A product feed inside a block: tiles run edge to edge across the sheet,
6
+ * three across, split by hairlines — the grid breaks out of the card's
7
+ * padding to the sheet's edges.
8
+ */
9
+ export declare const FEED_GRID = "-mx-8 -mb-8 grid grid-cols-3 gap-px overflow-hidden bg-[var(--fourty-convo-rule)] @max-[900px]:grid-cols-2 @max-[560px]:grid-cols-1 max-[1025px]:-mx-4 max-[1025px]:-mb-4 [&>*]:bg-[var(--fourty-convo-sheet)]";
10
+ export type CardTone = 'plain' | 'highlight' | 'accent';
11
+ export declare function Card({ children, tone }: {
12
+ children: React.ReactNode;
13
+ tone?: CardTone;
14
+ }): React.ReactElement;
15
+ /** A block's small label — muted in whatever ink the card carries. */
16
+ export declare function Eyebrow({ children }: {
17
+ children: React.ReactNode;
18
+ }): React.ReactElement;
19
+ /** A block's heading: 32px bold, 24px where the block is narrow. */
20
+ export declare function Title({ children }: {
21
+ children: React.ReactNode;
22
+ }): React.ReactElement;
23
+ export declare const guidedPick: import("@40rty/ams-sdk").CatalogComponent;
24
+ export declare const paths: import("@40rty/ams-sdk").CatalogComponent;
25
+ export declare const note: import("@40rty/ams-sdk").CatalogComponent;
26
+ export declare const facts: import("@40rty/ams-sdk").CatalogComponent;
27
+ export declare const explain: import("@40rty/ams-sdk").CatalogComponent;
@@ -0,0 +1,7 @@
1
+ import { explain, facts, guidedPick, note, paths } from './blocks';
2
+ import { shortlist, tradeoff, verdict } from './product-blocks';
3
+ export { explain, facts, guidedPick, note, paths, shortlist, tradeoff, verdict };
4
+ export { Card, Eyebrow, Title, PILL_SOLID, PILL_OUTLINE, FEED_GRID, type CardTone } from './blocks';
5
+ export { ConversationProvider, ProductTile, TileReserve, useReserved, useLanded, type ConversationTileProps } from './ProductTile';
6
+ /** Every shared reasoning block, for a brand to spread into its declarations (or pick from). */
7
+ export declare const conversationBlocks: import("@40rty/ams-sdk").CatalogComponent[];
@@ -0,0 +1,3 @@
1
+ export declare const verdict: import("@40rty/ams-sdk").CatalogComponent;
2
+ export declare const shortlist: import("@40rty/ams-sdk").CatalogComponent;
3
+ export declare const tradeoff: import("@40rty/ams-sdk").CatalogComponent;