@40rty/ams-ui 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.js +1 -1
- package/dist/catalog-data.js +1 -1
- package/dist/catalog-entries.js +2 -2
- package/dist/{chunk-RKPDCXL4.js → chunk-2HM6EVDV.js} +18 -0
- package/dist/chunk-2QRYXSCB.js +5344 -0
- package/dist/{chunk-CKGGECAQ.js → chunk-KW2DLXHP.js} +1 -1
- package/dist/{chunk-LQLOG2V3.js → chunk-N5XACWEX.js} +1 -1
- package/dist/conversation/manifests/conversation/explain.md +13 -0
- package/dist/conversation/manifests/conversation/facts.md +13 -0
- package/dist/conversation/manifests/conversation/guidedPick.md +13 -0
- package/dist/conversation/manifests/conversation/note.md +13 -0
- package/dist/conversation/manifests/conversation/paths.md +13 -0
- package/dist/conversation/manifests/conversation/shortlist.md +13 -0
- package/dist/conversation/manifests/conversation/tradeoff.md +13 -0
- package/dist/conversation/manifests/conversation/verdict.md +13 -0
- package/dist/conversation.js +947 -0
- package/dist/css/conversation/conversation.css +20 -0
- package/dist/css/shell/mobile/island.css +2 -2
- package/dist/index.js +14 -12
- package/dist/shell.js +47 -5295
- package/dist/types/agent/presence/PresenceFiller.d.ts +1 -1
- package/dist/types/agent/presence/folded.d.ts +1 -1
- package/dist/types/components/ecommerce/product/AddToRegistry.d.ts +1 -1
- package/dist/types/components/ecommerce/product/PresenceProductRail.d.ts +1 -1
- package/dist/types/components/ecommerce/product/ProductGrid.d.ts +1 -1
- package/dist/types/components/layout/Modal.d.ts +1 -1
- package/dist/types/conversation/ClosingQuestion.d.ts +13 -0
- package/dist/types/conversation/ConversationCanvas.d.ts +11 -0
- package/dist/types/conversation/PageComposer.d.ts +12 -0
- package/dist/types/conversation/ResultSheet.d.ts +9 -0
- package/dist/types/conversation/TurnCanvas.d.ts +12 -0
- package/dist/types/conversation/TurnHeader.d.ts +9 -0
- package/dist/types/conversation/activity-line.d.ts +3 -0
- package/dist/types/conversation/blocks/ProductTile.d.ts +31 -0
- package/dist/types/conversation/blocks/blocks.d.ts +27 -0
- package/dist/types/conversation/blocks/index.d.ts +7 -0
- package/dist/types/conversation/blocks/product-blocks.d.ts +3 -0
- package/dist/types/conversation/blocks/schemas.d.ts +4322 -0
- package/dist/types/conversation/index.d.ts +11 -0
- package/dist/types/conversation/presence-parts.d.ts +15 -0
- package/dist/types/conversation/turn-text.d.ts +31 -0
- package/dist/types/conversation/use-page-products.d.ts +3 -0
- package/dist/types/labels.d.ts +21 -2
- package/dist/types/shell/MenuDrawer.d.ts +2 -2
- package/dist/types/shell/ShellScaffold.d.ts +1 -1
- package/dist/types/shell/mobile/MobileChrome.d.ts +1 -1
- package/dist/types/shell/mobile/MorphIsland.d.ts +1 -1
- package/dist/types/shell/mobile/hero-entry-point.d.ts +1 -1
- package/package.json +7 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { ConversationCanvas } from './ConversationCanvas';
|
|
2
|
+
export { PageComposer, PAGE_COMPOSER_INPUT_ID } from './PageComposer';
|
|
3
|
+
export { TurnHeader } from './TurnHeader';
|
|
4
|
+
export { ResultSheet } from './ResultSheet';
|
|
5
|
+
export { TurnCanvas } from './TurnCanvas';
|
|
6
|
+
export { ClosingQuestion } from './ClosingQuestion';
|
|
7
|
+
export { Facts, ThinkingBand, BentoSkeleton } from './presence-parts';
|
|
8
|
+
export { Rich, RisingWords, crumbLabel, productNamed } from './turn-text';
|
|
9
|
+
export { useActivityLine } from './activity-line';
|
|
10
|
+
export { usePageProducts } from './use-page-products';
|
|
11
|
+
export * from './blocks';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ConversationFact } from '@40rty/ams-sdk';
|
|
3
|
+
export declare const EASE: [number, number, number, number];
|
|
4
|
+
/** What the agent knows; with `onForget`, each fact can be cleared (and all of them at once). */
|
|
5
|
+
export declare function Facts({ facts, onForget }: {
|
|
6
|
+
facts: ConversationFact[];
|
|
7
|
+
onForget?: (fact: ConversationFact) => void;
|
|
8
|
+
}): React.ReactElement;
|
|
9
|
+
/** The agent at work, in the page: what it knows, what it is doing, what it is reading. */
|
|
10
|
+
export declare function ThinkingBand({ facts, status }: {
|
|
11
|
+
facts: ConversationFact[];
|
|
12
|
+
status: string;
|
|
13
|
+
}): React.ReactElement;
|
|
14
|
+
/** Where the answer's blocks will land, held while the turn composes (an 8+4 row, then a full one). */
|
|
15
|
+
export declare function BentoSkeleton(): React.ReactElement;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type Product } from '@40rty/ams-sdk';
|
|
3
|
+
/** A breadcrumb for a turn, from the visitor's own words (no per-turn title exists). */
|
|
4
|
+
export declare function crumbLabel(visitorText: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* The product a name in the prose refers to: the one whose title carries the
|
|
7
|
+
* name as whole words ("Global Travel Pack" in "35L Global Travel Pack"). A name no product carries, or that several do,
|
|
8
|
+
* refers to none — a link that might open the wrong product is not offered.
|
|
9
|
+
*/
|
|
10
|
+
export declare function productNamed(name: string, products: readonly Product[]): Product | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* `**bold**` in the agent's prose, rendered; everything else is plain text.
|
|
13
|
+
* A bold run that names one of `products` is a link to it. `products` is left
|
|
14
|
+
* out where the text already sits inside a control (the folded turn's toggle).
|
|
15
|
+
*/
|
|
16
|
+
export declare function Rich({ text, products }: {
|
|
17
|
+
text: string;
|
|
18
|
+
products?: readonly Product[];
|
|
19
|
+
}): React.ReactElement;
|
|
20
|
+
/**
|
|
21
|
+
* Text whose words rise into place out of a blur, one after another — the
|
|
22
|
+
* design's headline reveal. Streaming-safe: a word that was already shown
|
|
23
|
+
* never re-animates; words arriving together cascade from where the last
|
|
24
|
+
* batch ended. `**bold**` is honoured, and a bold run that names one of
|
|
25
|
+
* `products` is a link to it.
|
|
26
|
+
*/
|
|
27
|
+
export declare function RisingWords({ text, products, delayS }: {
|
|
28
|
+
text: string;
|
|
29
|
+
products: readonly Product[];
|
|
30
|
+
delayS?: number;
|
|
31
|
+
}): React.ReactElement;
|
package/dist/types/labels.d.ts
CHANGED
|
@@ -186,7 +186,7 @@ export interface Labels {
|
|
|
186
186
|
cart: {
|
|
187
187
|
/** Header title above the drawer body — defaults to "bag" per the
|
|
188
188
|
* base design language; brands that use "cart" terminology
|
|
189
|
-
*
|
|
189
|
+
* override here. */
|
|
190
190
|
title: string;
|
|
191
191
|
/** Empty-state primary line. */
|
|
192
192
|
empty: string;
|
|
@@ -197,7 +197,7 @@ export interface Labels {
|
|
|
197
197
|
/** Secondary cart CTA — exits to the merchant's official store with
|
|
198
198
|
* the cart contents (rendered only when the cart carries a
|
|
199
199
|
* `storeCartUrl`). Brands override with their store name, e.g.
|
|
200
|
-
* "continue on
|
|
200
|
+
* "continue on acme.example". */
|
|
201
201
|
viewOnStore: string;
|
|
202
202
|
/** Free-shipping threshold in the store's currency. Brands that
|
|
203
203
|
* offer free shipping above an amount set this; `null` (default)
|
|
@@ -242,5 +242,24 @@ export interface Labels {
|
|
|
242
242
|
* last settled ones and do not yet include that line. */
|
|
243
243
|
totalsPending: string;
|
|
244
244
|
};
|
|
245
|
+
/** The conversation page (`@fourty/ui/conversation`): its chrome and blocks. */
|
|
246
|
+
conversation: {
|
|
247
|
+
home: string;
|
|
248
|
+
thisPage: string;
|
|
249
|
+
whatIKnow: string;
|
|
250
|
+
startOver: string;
|
|
251
|
+
clearFacts: string;
|
|
252
|
+
searching: (query: string) => string;
|
|
253
|
+
working: string;
|
|
254
|
+
lookedAt: (count: number) => string;
|
|
255
|
+
send: string;
|
|
256
|
+
verdict: string;
|
|
257
|
+
ourPick: string;
|
|
258
|
+
tradeoff: string;
|
|
259
|
+
tradeoffCaveat: (caveat: string) => string;
|
|
260
|
+
pathsTitle: string;
|
|
261
|
+
noteEyebrow: string;
|
|
262
|
+
explainProducts: string;
|
|
263
|
+
};
|
|
245
264
|
}
|
|
246
265
|
export declare const DEFAULT_LABELS: Labels;
|
|
@@ -2,8 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { AgentSignalInput, ShellMenuItem } from '@40rty/ams-sdk';
|
|
3
3
|
/**
|
|
4
4
|
* Platform category drawer — the "shop by category" navigation a storefront
|
|
5
|
-
* visitor reaches for, extracted out of
|
|
6
|
-
* mount the same pattern
|
|
5
|
+
* visitor reaches for, extracted out of one brand's shell so any brand can
|
|
6
|
+
* mount the same pattern instead of re-implementing it.
|
|
7
7
|
* Split into dumb pieces so the shell (the common parent) owns open/close state:
|
|
8
8
|
*
|
|
9
9
|
* - `MenuTrigger` — the button that opens the drawer. The brand supplies its
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ShellScaffold — the reusable spacefront shell skeleton.
|
|
3
3
|
*
|
|
4
4
|
* Extracts the layout structure every brand shell re-implements by hand
|
|
5
|
-
* (
|
|
5
|
+
* (a 2,808-line brand shell being the reference): a flex-col
|
|
6
6
|
* container → presence notch → a relative canvas region with the agent canvas
|
|
7
7
|
* scroll, a floating header overlay, the side-dock composer, a floating
|
|
8
8
|
* launcher row, and drawers — plus the dock open/close state and the mobile
|
|
@@ -29,6 +29,6 @@ export interface MobileChromeProps {
|
|
|
29
29
|
* content JAMMING into the chrome — a headline sliced mid-glyph with no
|
|
30
30
|
* separation. So the bar earns a lift exactly while there's something under
|
|
31
31
|
* it to lift off: `data-scrolled` flips at the first pixel of scroll. Same
|
|
32
|
-
* shape as every storefront header
|
|
32
|
+
* shape as every storefront header.
|
|
33
33
|
*/
|
|
34
34
|
export declare function MobileChrome({ logo, launchers }: MobileChromeProps): React.ReactElement;
|
|
@@ -75,7 +75,7 @@ export interface MorphIslandProps {
|
|
|
75
75
|
* visitor is typing. */
|
|
76
76
|
onComposeFocusChange?: (focused: boolean) => void;
|
|
77
77
|
/** The mark the pill carries once it has condensed. Slot-driven because the
|
|
78
|
-
* best answer is brand-owned:
|
|
78
|
+
* best answer is brand-owned: a brand passes e.g. its own initial, which
|
|
79
79
|
* says whose assistant this is in a way no platform glyph can. Omit for
|
|
80
80
|
* `DEFAULT_COLLAPSED_MARK`.
|
|
81
81
|
*
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
* On a phone the island is normally the only way to talk to the space, so it
|
|
6
6
|
* is docked on the floor from first paint. But a brand hero can carry its own
|
|
7
7
|
* entry point — a prompt box sitting in the hero, where the visitor is already
|
|
8
|
-
* looking, with the brand's own conversation starters under it (
|
|
8
|
+
* looking, with the brand's own conversation starters under it (a brand's
|
|
9
9
|
* `HeroPromptInput`). When it does, two surfaces are asking the same question
|
|
10
10
|
* at once, and the one at the bottom of the screen is the one the visitor did
|
|
11
11
|
* not come for.
|
package/package.json
CHANGED
|
@@ -50,10 +50,15 @@
|
|
|
50
50
|
"types": "./dist/types/presence/index.d.ts",
|
|
51
51
|
"default": "./dist/presence.js"
|
|
52
52
|
},
|
|
53
|
+
"./conversation": {
|
|
54
|
+
"types": "./dist/types/conversation/index.d.ts",
|
|
55
|
+
"default": "./dist/conversation.js"
|
|
56
|
+
},
|
|
53
57
|
"./motion.css": "./dist/css/preset/motion.css",
|
|
54
58
|
"./island.css": "./dist/css/shell/spacefront-island.css",
|
|
55
59
|
"./thread-panel.css": "./dist/css/shell/spacefront-thread-panel.css",
|
|
56
60
|
"./presence.css": "./dist/css/shell/spacefront-presence.css",
|
|
61
|
+
"./conversation.css": "./dist/css/conversation/conversation.css",
|
|
57
62
|
"./preset/tailwind-theme.css": "./dist/css/preset/tailwind-theme.css"
|
|
58
63
|
},
|
|
59
64
|
"sideEffects": [
|
|
@@ -71,12 +76,12 @@
|
|
|
71
76
|
"zod": "^3.23.0"
|
|
72
77
|
},
|
|
73
78
|
"peerDependencies": {
|
|
74
|
-
"@40rty/ams-sdk": "0.5.
|
|
79
|
+
"@40rty/ams-sdk": "0.5.4",
|
|
75
80
|
"lucide-react": ">=0.400.0",
|
|
76
81
|
"react": ">=18.0.0",
|
|
77
82
|
"react-dom": ">=18.0.0"
|
|
78
83
|
},
|
|
79
|
-
"version": "0.5.
|
|
84
|
+
"version": "0.5.4",
|
|
80
85
|
"homepage": "https://docs.40rty.ai",
|
|
81
86
|
"license": "UNLICENSED",
|
|
82
87
|
"engines": {
|