@saar-ai/web-widget 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{host-widget-CAPud_Jz.js → host-widget-B97T89b7.js} +615 -101
- package/dist/dock/dock-drag.d.ts +81 -0
- package/dist/dock/dock-drag.d.ts.map +1 -0
- package/dist/dock/dock-pill.d.ts +7 -2
- package/dist/dock/dock-pill.d.ts.map +1 -1
- package/dist/dock/dock-row.d.ts +13 -2
- package/dist/dock/dock-row.d.ts.map +1 -1
- package/dist/dock/dock-sheet.d.ts +11 -1
- package/dist/dock/dock-sheet.d.ts.map +1 -1
- package/dist/dock/dock-state.d.ts +41 -0
- package/dist/dock/dock-state.d.ts.map +1 -1
- package/dist/dock/dock.d.ts +34 -0
- package/dist/dock/dock.d.ts.map +1 -1
- package/dist/dock/geometry.d.ts +74 -2
- package/dist/dock/geometry.d.ts.map +1 -1
- package/dist/generated/widget-css.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/messages.d.ts +14 -0
- package/dist/messages.d.ts.map +1 -1
- package/dist/next/index.js +1 -1
- package/dist/styles.d.ts +3 -3
- package/dist/theme/derive.d.ts +1 -1
- package/dist/theme/derive.d.ts.map +1 -1
- package/dist/voice-widget.d.ts.map +1 -1
- package/dist/widget.css +1 -1
- package/package.json +1 -1
- package/src/styles/concierge.css +160 -7
- package/src/styles/tokens.css +6 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type PointerEvent as ReactPointerEvent, type RefObject } from 'react';
|
|
2
|
+
import { type DesktopAlign } from './geometry.js';
|
|
3
|
+
/**
|
|
4
|
+
* THE DESKTOP DRAG — docs/DOCK_SPEC.md §9.1's `layout.draggable`, added
|
|
5
|
+
* 2026-09-11.
|
|
6
|
+
*
|
|
7
|
+
* On a desktop pointer the shopper may slide the dock sideways and drop it at
|
|
8
|
+
* `left`, `center` or `right`. Five rules, and every one of them is a way the
|
|
9
|
+
* gesture becomes a defect rather than a convenience:
|
|
10
|
+
*
|
|
11
|
+
* 1. **Horizontal only.** The bottom edge is the dock's entire contract with
|
|
12
|
+
* the merchant's furniture — §8.3 stacks above their sticky bar, §8.1
|
|
13
|
+
* clears the home indicator. A dock a shopper can park halfway up a
|
|
14
|
+
* product page is a dock that covers merchandise (§1 rule 3). There is no
|
|
15
|
+
* vertical term anywhere below, which is stronger than clamping one.
|
|
16
|
+
* 2. **`transform` per frame, and nothing else** (§7.1 rule 1). The ANCHOR
|
|
17
|
+
* (`left`/`right` on the fixed container) is not touched until the
|
|
18
|
+
* gesture settles, so no frame of a drag costs the merchant's document a
|
|
19
|
+
* layout. The value is a CSS custom property written straight onto the
|
|
20
|
+
* container (rule 5) — a drag that went through React state would
|
|
21
|
+
* re-render the transcript inside the sheet sixty times a second.
|
|
22
|
+
* 3. **Under `DRAG_TAP_SLOP_PX`, it was a tap.** The handle is the row's
|
|
23
|
+
* mark, which also toggles the sheet, and the pill, which opens the
|
|
24
|
+
* concierge. Both are pressed far more often than they are dragged, and a
|
|
25
|
+
* mouse that travels three pixels between press and release is a click
|
|
26
|
+
* everywhere else the shopper has ever clicked.
|
|
27
|
+
* 4. **The release SNAPS with §7.2's FLIP easing**, by the same mechanism
|
|
28
|
+
* the pill ↔ row swap uses: the anchor changes, the element is put back
|
|
29
|
+
* where the eye last saw it with one `transform`, and that transform is
|
|
30
|
+
* animated to zero. Measuring after the commit is what makes this exact —
|
|
31
|
+
* the three anchors are not the same distance apart, and computing the
|
|
32
|
+
* offset from the gesture instead would drift by a gutter.
|
|
33
|
+
* 5. **The window hears the release.** A pointer dragging a 48 px row across
|
|
34
|
+
* a 1440 px viewport leaves the handle almost immediately, and a
|
|
35
|
+
* `pointerup` that never reaches the handler leaves the dock translated,
|
|
36
|
+
* with its transitions off, until some future drag happens to finish.
|
|
37
|
+
*
|
|
38
|
+
* The hook owns no geometry of its own: `snapAlign` decides where a release
|
|
39
|
+
* lands and `readStoredAlign`/`persistAlign` own the storage key, all three
|
|
40
|
+
* in `geometry.ts` — because `cdn/dock-dom.ts` drags the PILL with exactly
|
|
41
|
+
* the same three, and §4.2 gives the two renderers one frame to disagree in.
|
|
42
|
+
*/
|
|
43
|
+
export interface DockDragOptions {
|
|
44
|
+
/** §9.1: a desktop viewport, a `pointer: fine` device, and the tenant said yes. */
|
|
45
|
+
readonly enabled: boolean;
|
|
46
|
+
/** §9.1's `layout.desktopAlign` — the starting position, and the fallback. */
|
|
47
|
+
readonly published: DesktopAlign;
|
|
48
|
+
/** The window the dock is living in — see `dock.tsx`'s `ownerWindowOf`. */
|
|
49
|
+
readonly win: Window | null;
|
|
50
|
+
/** §7.2's swap duration, 0 under reduced motion (§7.1 rule 10). */
|
|
51
|
+
readonly durationMs: number;
|
|
52
|
+
/**
|
|
53
|
+
* The pill, for rule 4's second half.
|
|
54
|
+
*
|
|
55
|
+
* The container's FLIP cannot express the pill's move: `pillAnchor` decides
|
|
56
|
+
* which END of the container the pill hangs off, and an alignment that
|
|
57
|
+
* changes SIDE changes that too — an untransitionable `left`/`right` swap,
|
|
58
|
+
* on top of the container's own move. So the pill is measured in its own
|
|
59
|
+
* right, before and after, and animated from the real first rect to the
|
|
60
|
+
* real last one.
|
|
61
|
+
*/
|
|
62
|
+
readonly pillRef?: RefObject<HTMLElement | null>;
|
|
63
|
+
}
|
|
64
|
+
export interface DockDragResult {
|
|
65
|
+
/** Where the dock sits: the shopper's remembered choice, else the tenant's. */
|
|
66
|
+
readonly align: DesktopAlign;
|
|
67
|
+
/** Did the gesture that just ended MOVE? Its trailing `click` has to be swallowed. */
|
|
68
|
+
readonly consumeClick: () => boolean;
|
|
69
|
+
/** Spread onto the handle — the row's mark, or the pill. */
|
|
70
|
+
readonly handleProps: {
|
|
71
|
+
onPointerDown?: (event: ReactPointerEvent<HTMLElement>) => void;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/** The one custom property a drag writes (§7.1 rule 5). */
|
|
75
|
+
export declare const DRAG_VAR = "--wgt-drag-x";
|
|
76
|
+
export declare function useDockDrag(containerRef: {
|
|
77
|
+
current: HTMLElement | null;
|
|
78
|
+
}, { enabled, published, win, durationMs, pillRef }: DockDragOptions): DockDragResult;
|
|
79
|
+
/** §7.2's easing, re-exported so the stylesheet's own value has a source. */
|
|
80
|
+
export declare const DRAG_SETTLE_EASING = "cubic-bezier(0.2, 0, 0, 1)";
|
|
81
|
+
//# sourceMappingURL=dock-drag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dock-drag.d.ts","sourceRoot":"","sources":["../../src/dock/dock-drag.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,KAAK,YAAY,IAAI,iBAAiB,EACtC,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,8EAA8E;IAC9E,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;IACjC,2EAA2E;IAC3E,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,mEAAmE;IACnE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,sFAAsF;IACtF,QAAQ,CAAC,YAAY,EAAE,MAAM,OAAO,CAAC;IACrC,4DAA4D;IAC5D,QAAQ,CAAC,WAAW,EAAE;QACpB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;KACjE,CAAC;CACH;AAED,2DAA2D;AAC3D,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AAEvC,wBAAgB,WAAW,CACzB,YAAY,EAAE;IAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAAA;CAAE,EAC7C,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,eAAe,GAChE,cAAc,CA2QhB;AAED,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,+BAAc,CAAC"}
|
package/dist/dock/dock-pill.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RefObject } from 'react';
|
|
1
|
+
import type { PointerEvent as ReactPointerEvent, RefObject } from 'react';
|
|
2
2
|
import { type DockIdentityView } from './dock-row.js';
|
|
3
3
|
import type { DockMark } from './dock-state.js';
|
|
4
4
|
/**
|
|
@@ -32,7 +32,12 @@ export interface DockPillProps {
|
|
|
32
32
|
readonly expandLabel: string;
|
|
33
33
|
readonly form: 'pill' | 'row';
|
|
34
34
|
readonly onPress: () => void;
|
|
35
|
+
/** §9.1 — the pill IS the drag handle when the tenant allows it. */
|
|
36
|
+
readonly draggable?: boolean;
|
|
37
|
+
readonly dragHandleProps?: {
|
|
38
|
+
onPointerDown?: (event: ReactPointerEvent<HTMLElement>) => void;
|
|
39
|
+
};
|
|
35
40
|
readonly pillRef?: RefObject<HTMLButtonElement | null>;
|
|
36
41
|
}
|
|
37
|
-
export declare function DockPill({ identity, mark, label, line, expandLabel, form, onPress, pillRef, }: DockPillProps): import("react").JSX.Element;
|
|
42
|
+
export declare function DockPill({ identity, mark, label, line, expandLabel, form, onPress, draggable, dragHandleProps, pillRef, }: DockPillProps): import("react").JSX.Element;
|
|
38
43
|
//# sourceMappingURL=dock-pill.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dock-pill.d.ts","sourceRoot":"","sources":["../../src/dock/dock-pill.ts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EAAE,aAAa,+BAiCf"}
|
package/dist/dock/dock-row.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RefObject } from 'react';
|
|
1
|
+
import type { PointerEvent as ReactPointerEvent, RefObject } from 'react';
|
|
2
2
|
import { type WidgetMessages } from '../messages.js';
|
|
3
3
|
import type { DockControl, DockMark, DockView } from './dock-state.js';
|
|
4
4
|
/**
|
|
@@ -115,6 +115,17 @@ export interface DockRowProps {
|
|
|
115
115
|
/** §11 — the mark's accessible name carries the live/rest state in words. */
|
|
116
116
|
readonly markStateLabel: string;
|
|
117
117
|
readonly onMarkPress: () => void;
|
|
118
|
+
/**
|
|
119
|
+
* §3.3 (revised 2026-09-11) — the sheet is up, so the two corners the row
|
|
120
|
+
* shares with it are square. An attribute rather than a class, because it
|
|
121
|
+
* is a STATE of the row and not a second kind of row.
|
|
122
|
+
*/
|
|
123
|
+
readonly sheetOpen?: boolean;
|
|
124
|
+
/** §9.1 — the MARK is the row's drag handle; `touch-action: none` lands there only. */
|
|
125
|
+
readonly draggable?: boolean;
|
|
126
|
+
readonly dragHandleProps?: {
|
|
127
|
+
onPointerDown?: (event: ReactPointerEvent<HTMLElement>) => void;
|
|
128
|
+
};
|
|
118
129
|
}
|
|
119
|
-
export declare function DockRow({ view, identity, form, messages, captionLine, captionSwapKey, captionTestId, draft, onDraftChange, onSubmit, placeholder, composerDisabled, onControl, onMicDown, onMicUp, interruptLabelled, micOpen, micDisabled, micUnavailableReason, attachBusy, rowRef, inputRef, captionDurationMs, markStateLabel, onMarkPress, }: DockRowProps): import("react").JSX.Element;
|
|
130
|
+
export declare function DockRow({ view, identity, form, messages, captionLine, captionSwapKey, captionTestId, draft, onDraftChange, onSubmit, placeholder, composerDisabled, onControl, onMicDown, onMicUp, interruptLabelled, micOpen, micDisabled, micUnavailableReason, attachBusy, rowRef, inputRef, captionDurationMs, markStateLabel, onMarkPress, sheetOpen, draggable, dragHandleProps, }: DockRowProps): import("react").JSX.Element;
|
|
120
131
|
//# sourceMappingURL=dock-row.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dock-row.d.ts","sourceRoot":"","sources":["../../src/dock/dock-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"dock-row.d.ts","sourceRoot":"","sources":["../../src/dock/dock-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAc,YAAY,IAAI,iBAAiB,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAEjG,OAAO,EAAwC,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE3F,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAM/D,2EAA2E;AAC3E,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,+BAmDA;AAOD,sFAAsF;AACtF,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAA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AC,EAAE,MAAM,CAAC;IACvC,gGAAgG;IAChG,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACnD,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACvD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,6EAA6E;IAC7E,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,uFAAuF;IACvF,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,eAAe,CAAC,EAAE;QACzB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;KACjE,CAAC;CACH;AAED,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,cAAc,EACd,aAAa,EACb,KAAK,EACL,aAAa,EACb,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,OAAO,EACP,WAAW,EACX,oBAAoB,EACpB,UAAU,EACV,MAAM,EACN,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,SAAS,EACT,SAAS,EACT,eAAe,GAChB,EAAE,YAAY,+BA2Ed"}
|
|
@@ -80,10 +80,20 @@ export interface DockSheetProps {
|
|
|
80
80
|
readonly onDismiss: () => void;
|
|
81
81
|
/** Bumped whenever the contents grew, so the scroll can follow a reader who was at the bottom. */
|
|
82
82
|
readonly followKey?: unknown;
|
|
83
|
+
/**
|
|
84
|
+
* §3.4 — is the sheet showing the WHOLE transcript rather than the latest
|
|
85
|
+
* exchange?
|
|
86
|
+
*
|
|
87
|
+
* False→true is the shopper asking for the history, by either route: the
|
|
88
|
+
* "Show conversation" control, or dragging the sheet open by its handle.
|
|
89
|
+
* That one transition is the only thing this prop is read for — see the
|
|
90
|
+
* follow effect's `justRevealed`.
|
|
91
|
+
*/
|
|
92
|
+
readonly historyRevealed?: boolean;
|
|
83
93
|
readonly sheetRef?: RefObject<HTMLDivElement | null>;
|
|
84
94
|
/** 0 under reduced motion (§7.1 rule 10). */
|
|
85
95
|
readonly durationMs: number;
|
|
86
96
|
readonly dragHandleLabel: string;
|
|
87
97
|
}
|
|
88
|
-
export declare function DockSheet({ snap, onSnapChange, label, peekOnly, header, children, onDismiss, followKey, sheetRef, durationMs, dragHandleLabel, }: DockSheetProps): import("react").JSX.Element;
|
|
98
|
+
export declare function DockSheet({ snap, onSnapChange, label, peekOnly, header, children, onDismiss, followKey, historyRevealed, sheetRef, durationMs, dragHandleLabel, }: DockSheetProps): import("react").JSX.Element;
|
|
89
99
|
//# sourceMappingURL=dock-sheet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dock-sheet.d.ts","sourceRoot":"","sources":["../../src/dock/dock-sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAUf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAE3D;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAQtC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,YAAY,EA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AE,aAAa,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACrD,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,oEAAoE;IACpE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,iGAAiG;IACjG,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC;IAC/B,kGAAkG;IAClG,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;;;OAQG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACrD,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAAS,EACT,eAAuB,EACvB,QAAQ,EACR,UAAU,EACV,eAAe,GAChB,EAAE,cAAc,+BAkXhB"}
|
|
@@ -218,4 +218,45 @@ export declare const idleDockInput: DockStateInput;
|
|
|
218
218
|
* @returns everything the row, the caption and the sheet need for one render
|
|
219
219
|
*/
|
|
220
220
|
export declare function deriveDockState(input: DockStateInput): DockView;
|
|
221
|
+
/**
|
|
222
|
+
* A transcript turn, as the EXCHANGE split reads it: its speaker and nothing
|
|
223
|
+
* else.
|
|
224
|
+
*
|
|
225
|
+
* §3.4's split is a decision about the conversation's shape, so it lives here
|
|
226
|
+
* with the rest of them — and it takes speakers rather than turns because a
|
|
227
|
+
* turn carries text, cards, attachments, a locale and a delivery state, none
|
|
228
|
+
* of which this decision looks at. Nothing about the widget's turn type
|
|
229
|
+
* therefore reaches this module, which is what keeps it assertable without a
|
|
230
|
+
* DOM (`dock-state.test.ts`).
|
|
231
|
+
*/
|
|
232
|
+
export type DockSpeaker = 'caller' | 'agent' | 'event';
|
|
233
|
+
/**
|
|
234
|
+
* §3.4 (revised 2026-09-11) — where the LATEST EXCHANGE begins.
|
|
235
|
+
*
|
|
236
|
+
* An exchange is the shopper's line and the reply to it. The latest one
|
|
237
|
+
* therefore starts at the LAST caller turn and runs to the end, so a reply
|
|
238
|
+
* that arrived as three turns (a filler, the answer, the cards) stays whole.
|
|
239
|
+
*
|
|
240
|
+
* Two cases are not that shape and both are real:
|
|
241
|
+
*
|
|
242
|
+
* - the shopper has not spoken yet. The concierge opens with a greeting of
|
|
243
|
+
* its own, and a proactive nudge can add a second line before anybody has
|
|
244
|
+
* typed; the latest exchange is then the LAST agent turn alone, because
|
|
245
|
+
* two unanswered agent lines are two things said, not one exchange.
|
|
246
|
+
* - a `speaker: 'event'` row — §3.4's handoff marker. It is something that
|
|
247
|
+
* happened TO an exchange rather than a turn in one, so it never starts a
|
|
248
|
+
* new one and never ends the search for the caller line above it.
|
|
249
|
+
*/
|
|
250
|
+
export declare function latestExchangeStart(speakers: readonly DockSpeaker[]): number;
|
|
251
|
+
/**
|
|
252
|
+
* How many exchanges the transcript holds — the number "Show conversation"
|
|
253
|
+
* is offered on (§3.4: the control exists only when there is more than one).
|
|
254
|
+
*
|
|
255
|
+
* A caller line opens an exchange; anything said BEFORE the first one (the
|
|
256
|
+
* greeting, a proactive nudge) is an exchange of its own, because it is
|
|
257
|
+
* something the shopper can scroll back to and would otherwise be counted as
|
|
258
|
+
* nothing at all — leaving a dock that shows a greeting, then an answer, and
|
|
259
|
+
* claims there is nothing more to see.
|
|
260
|
+
*/
|
|
261
|
+
export declare function exchangeCount(speakers: readonly DockSpeaker[]): number;
|
|
221
262
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EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,yGAAyG;AACzG,eAAO,MAAM,aAAa,EAAE,cAuB3B,CAAC;AAmCF;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,cAAc,GAAG,QAAQ,CAO/D;AAqQD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAEvD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,CAM5E;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,CAetE"}
|
package/dist/dock/dock.d.ts
CHANGED
|
@@ -67,6 +67,15 @@ export interface DockLayoutView {
|
|
|
67
67
|
readonly desktopWidth: DesktopWidth;
|
|
68
68
|
/** §5.4. `never` has no pill at all — no recede, no minimise control. */
|
|
69
69
|
readonly minimised: 'never' | 'shopper' | 'startMinimised';
|
|
70
|
+
/**
|
|
71
|
+
* §9.1 (added 2026-09-11) — may a DESKTOP shopper drag the dock sideways?
|
|
72
|
+
*
|
|
73
|
+
* Optional, defaulted `true`, because the api field is younger than this
|
|
74
|
+
* component: a host still passing a `layout` without it must get §9.1's
|
|
75
|
+
* default rather than a dock that refuses to move. Mobile never drags
|
|
76
|
+
* whatever this says — the gesture competes with the page's own scroll.
|
|
77
|
+
*/
|
|
78
|
+
readonly draggable?: boolean;
|
|
70
79
|
}
|
|
71
80
|
/** The tenant's `copy[locale]` (§9.1), as the dock reads it. */
|
|
72
81
|
export interface DockCopyView {
|
|
@@ -191,6 +200,31 @@ export interface DockProps {
|
|
|
191
200
|
readonly shelf?: ChatCards;
|
|
192
201
|
/** The text session's transcript, supplied by the caller (`voice-widget.tsx`). */
|
|
193
202
|
readonly transcript?: ReactNode;
|
|
203
|
+
/**
|
|
204
|
+
* §3.4 (revised 2026-09-11) — the LATEST EXCHANGE, for a text session's
|
|
205
|
+
* `peek` sheet: the shopper's last line and the reply to it, with whatever
|
|
206
|
+
* that reply brought.
|
|
207
|
+
*
|
|
208
|
+
* A second NODE rather than a count the dock slices itself, because the
|
|
209
|
+
* dock is handed a rendered transcript and has no idea what a turn is. The
|
|
210
|
+
* host renders the same turn list twice from one component — sliced at
|
|
211
|
+
* `latestExchangeStart` (`dock-state.ts`) — so a card, a price or an
|
|
212
|
+
* attachment cannot bind differently in the two views.
|
|
213
|
+
*
|
|
214
|
+
* Absent ⇒ the whole transcript is shown at both snap points, which is what
|
|
215
|
+
* every host that has not been updated gets and is the behaviour this
|
|
216
|
+
* revision replaced.
|
|
217
|
+
*/
|
|
218
|
+
readonly latestExchange?: ReactNode;
|
|
219
|
+
/**
|
|
220
|
+
* How many exchanges the transcript holds (`exchangeCount`).
|
|
221
|
+
*
|
|
222
|
+
* The ONE number "Show conversation" is offered on: at one exchange the
|
|
223
|
+
* latest view IS the transcript, and a control that expands a sheet to show
|
|
224
|
+
* exactly what it already showed is a control that teaches the shopper not
|
|
225
|
+
* to press things.
|
|
226
|
+
*/
|
|
227
|
+
readonly exchangeCount?: number;
|
|
194
228
|
/** Anything the sheet holds beside its main content: the basket, chips, the handoff marker. */
|
|
195
229
|
readonly sheetExtra?: ReactNode;
|
|
196
230
|
/** Bumped when the sheet's contents grew, so the scroll can follow a reader at the bottom. */
|
package/dist/dock/dock.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dock.d.ts","sourceRoot":"","sources":["../../src/dock/dock.tsx"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,aAAa,EAClB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAwC,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAQjG,OAAO,EAAwC,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAYL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"dock.d.ts","sourceRoot":"","sources":["../../src/dock/dock.tsx"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,aAAa,EAClB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAwC,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAQjG,OAAO,EAAwC,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3F,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAYL,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAWhD,OAAO,EAAW,KAAK,gBAAgB,EAAsB,MAAM,eAAe,CAAC;AAWnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C3B,6EAA6E;IAC7E,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,0FAA0F;IAC1F,QAAQ,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAEzC,4EAA4E;IAC5E,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,gBAAgB,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D,QAAQ,CAAC,YAAY,CAAC,EAAE,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,QAAQ,CAAC,IAAI,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,YAAY,CAAA;KAAE,CAAC;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAUD,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AAEpE,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,+BAy7CpC;AAuMD,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/dock/geometry.d.ts
CHANGED
|
@@ -41,8 +41,18 @@ export declare const DESKTOP_GUTTER = 16;
|
|
|
41
41
|
export declare const BOTTOM_FLOOR = 10;
|
|
42
42
|
/** Desktop bottom inset (§3.1). */
|
|
43
43
|
export declare const DESKTOP_BOTTOM = 16;
|
|
44
|
-
/**
|
|
45
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Gap between the sheet's floor and the row above it (§3.3).
|
|
46
|
+
*
|
|
47
|
+
* ZERO since 2026-09-11. The 8 px gap read as two unrelated boxes stacked on
|
|
48
|
+
* a merchant's page rather than as one surface the concierge grew, which is
|
|
49
|
+
* what §3.3's "a bottom sheet whose floor is the row" was always describing.
|
|
50
|
+
* The constant stays rather than being deleted: it is the number the sheet's
|
|
51
|
+
* `bottom` is written from, both renderers have to agree about it, and a
|
|
52
|
+
* reader who finds `bottom: var(--wgt-row-h)` in the stylesheet needs
|
|
53
|
+
* somewhere that says why there is nothing added to it.
|
|
54
|
+
*/
|
|
55
|
+
export declare const SHEET_GAP = 0;
|
|
46
56
|
/** The one breakpoint. Below it the dock is full-width and thumb-anchored. */
|
|
47
57
|
export declare const DESKTOP_BREAKPOINT = 768;
|
|
48
58
|
/**
|
|
@@ -93,6 +103,68 @@ export declare const SHEET_TOP_CLEARANCE = 24;
|
|
|
93
103
|
* storage key is two ways for one preference to be lost.
|
|
94
104
|
*/
|
|
95
105
|
export declare const DOCK_MINIMISED_STORAGE_KEY = "wgt_dock_minimised";
|
|
106
|
+
/**
|
|
107
|
+
* §9.1's `layout.draggable` — where a shopper's own horizontal position is
|
|
108
|
+
* remembered, per visitor and per origin.
|
|
109
|
+
*
|
|
110
|
+
* Beside {@link DOCK_MINIMISED_STORAGE_KEY} and for the same reason: the core
|
|
111
|
+
* dock reads it BEFORE first paint (so a returning shopper never watches the
|
|
112
|
+
* dock slide across the page to where they left it) and the React dock writes
|
|
113
|
+
* it when a drag settles. Two copies of a storage key is two ways for one
|
|
114
|
+
* preference to be lost.
|
|
115
|
+
*/
|
|
116
|
+
export declare const DOCK_ALIGN_STORAGE_KEY = "wgt_dock_align";
|
|
117
|
+
/**
|
|
118
|
+
* Under this many pixels of travel, a press-and-release is a TAP (§9.1).
|
|
119
|
+
*
|
|
120
|
+
* Six rather than the sheet drag's four: the sheet's handle does nothing but
|
|
121
|
+
* drag, so a hair-trigger costs nothing, while the pill and the mark are the
|
|
122
|
+
* dock's two most-pressed controls and a mouse that travels three pixels
|
|
123
|
+
* between press and release is a click in every other piece of software the
|
|
124
|
+
* shopper uses. Below it the gesture never became a drag at all — no
|
|
125
|
+
* alignment is written and the press's own click is left to run.
|
|
126
|
+
*/
|
|
127
|
+
export declare const DRAG_TAP_SLOP_PX = 6;
|
|
128
|
+
/**
|
|
129
|
+
* Where a released drag lands (§9.1): the third of the viewport the dock's
|
|
130
|
+
* CENTRE finished in.
|
|
131
|
+
*
|
|
132
|
+
* Thirds rather than nearest-edge, because `center` is one of the three
|
|
133
|
+
* answers and an edge-distance rule can never return it. Pure, and shared by
|
|
134
|
+
* both renderers — the pill's drag is `cdn/dock-dom.ts`'s and the row's is
|
|
135
|
+
* `dock/dock-drag.ts`'s, and a dock that snapped differently depending on
|
|
136
|
+
* which one the shopper grabbed would be a bug nobody could describe.
|
|
137
|
+
*
|
|
138
|
+
* A degenerate viewport (0 wide, or a `NaN` centre from a `pointercancel`
|
|
139
|
+
* that carried no coordinates) resolves to `center`: the tenant's own default,
|
|
140
|
+
* and the only answer that cannot put the dock off the edge of the screen.
|
|
141
|
+
*/
|
|
142
|
+
export declare function snapAlign(centreX: number, viewportWidth: number): DesktopAlign;
|
|
143
|
+
/**
|
|
144
|
+
* `localStorage`, wrapped once for the whole dock.
|
|
145
|
+
*
|
|
146
|
+
* Both preferences the dock remembers (§5.4's minimise, §9.1's alignment) are
|
|
147
|
+
* read by `cdn/dock-dom.ts` before first paint and written by the React dock,
|
|
148
|
+
* so four near-identical `try`/`catch` blocks were four copies of the same
|
|
149
|
+
* three lines in an artefact every visitor to every merchant page downloads.
|
|
150
|
+
*
|
|
151
|
+
* The `try` is the load-bearing part and is not optional: `localStorage`
|
|
152
|
+
* THROWS on access — not on use — in a third-party frame with storage access
|
|
153
|
+
* blocked, in Safari's private mode past its quota, and behind a merchant's
|
|
154
|
+
* own cookie wall. A dock that took the storefront's script down over a
|
|
155
|
+
* remembered position is worse than a dock that forgets one.
|
|
156
|
+
*/
|
|
157
|
+
export declare function readStored(win: Window, key: string): string | undefined;
|
|
158
|
+
export declare function writeStored(win: Window, key: string, value: string): void;
|
|
159
|
+
/**
|
|
160
|
+
* The shopper's remembered alignment, or `undefined` where there is none.
|
|
161
|
+
*
|
|
162
|
+
* Anything that is not one of §9.1's three values is `undefined` rather than
|
|
163
|
+
* a default: the key is on the MERCHANT's origin, shared with whatever else
|
|
164
|
+
* their page stores, and a value we did not write is not a preference.
|
|
165
|
+
*/
|
|
166
|
+
export declare function readStoredAlign(win: Window): DesktopAlign | undefined;
|
|
167
|
+
export declare function persistAlign(win: Window, align: DesktopAlign): void;
|
|
96
168
|
/** §5.6 — how long a proactive nudge holds the row open before it recedes. */
|
|
97
169
|
export declare const PROACTIVE_NUDGE_MS = 8000;
|
|
98
170
|
export type DesktopWidth = keyof typeof DESKTOP_WIDTHS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../src/dock/geometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,mDAAmD;AACnD,eAAO,MAAM,KAAK,KAAK,CAAC;AACxB,yDAAyD;AACzD,eAAO,MAAM,MAAM,KAAK,CAAC;AACzB,8CAA8C;AAC9C,eAAO,MAAM,IAAI,KAAK,CAAC;AACvB,4CAA4C;AAC5C,eAAO,MAAM,SAAS,KAAK,CAAC;AAC5B,2EAA2E;AAC3E,eAAO,MAAM,OAAO,KAAK,CAAC;AAC1B,iEAAiE;AACjE,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,iEAAiE;AACjE,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,yEAAyE;AACzE,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,iEAAiE;AACjE,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,mCAAmC;AACnC,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC
|
|
1
|
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,GACzB,aAAa,GAAG,cAAc,GAAG,cAAc,GAAG,aAAa,GAAG,mBAAmB,GAAG,SAAS,CAAC;AAEpG;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAMpD;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,GAAG,MAAM,CAOlF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAQ5D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,UAAU,GACjB,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CASjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,OAAO,EAClB,YAAY,EAAE,YAAY,GACzB;IAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAQ3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-css.d.ts","sourceRoot":"","sources":["../../src/generated/widget-css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"widget-css.d.ts","sourceRoot":"","sources":["../../src/generated/widget-css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,EAAE,MAAkt9D,CAAC"}
|