@saar-ai/web-widget 0.16.2 → 0.18.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/avatar-face.d.ts +9 -3
- package/dist/avatar-face.d.ts.map +1 -1
- package/dist/avatar.d.ts +15 -2
- package/dist/avatar.d.ts.map +1 -1
- package/dist/chunks/{chat-DzSK1ZIU.js → chat-DHMjOVms.js} +1 -1
- package/dist/chunks/{esm-D2iq2DjO.js → esm-5fDiLoFP.js} +4 -4
- package/dist/chunks/{form-fill-dom-skU-ZwLB.js → form-fill-dom-D4ZMwxX1.js} +1 -1
- package/dist/chunks/{host-widget-BA1HJzO_.js → host-widget-BhtqtvaY.js} +1856 -1181
- package/dist/chunks/{livekit-client.esm-OPuvn_z-.js → livekit-client.esm-BSWImnve.js} +27 -21
- package/dist/chunks/{schemas-DC_oWrTO.js → schemas-DgC5Pex0.js} +16 -11
- package/dist/chunks/{telemetry-UHSrhVyf.js → telemetry-ZeV7hBI7.js} +1 -1
- package/dist/concierge-shell.css +1 -1
- package/dist/dock/dock-row.d.ts +4 -2
- package/dist/dock/dock-row.d.ts.map +1 -1
- package/dist/dock/dock.d.ts +6 -0
- package/dist/dock/dock.d.ts.map +1 -1
- package/dist/dock/geometry.d.ts +1 -2
- package/dist/dock/geometry.d.ts.map +1 -1
- package/dist/generated/concierge-shell-css.d.ts.map +1 -1
- package/dist/generated/widget-css.d.ts.map +1 -1
- package/dist/host-widget.d.ts +2 -3
- package/dist/host-widget.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/messages.d.ts +10 -3
- package/dist/messages.d.ts.map +1 -1
- package/dist/next/index.js +1 -1
- package/dist/spoken-transcript.d.ts +113 -0
- package/dist/spoken-transcript.d.ts.map +1 -0
- package/dist/theme/derive.d.ts +71 -3
- package/dist/theme/derive.d.ts.map +1 -1
- package/dist/theme/host-tone.d.ts +0 -7
- package/dist/theme/host-tone.d.ts.map +1 -1
- package/dist/theme/index.d.ts +5 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/widget-derive.d.ts +17 -0
- package/dist/theme/widget-derive.d.ts.map +1 -0
- package/dist/theme/widget-theme-scope.d.ts +17 -0
- package/dist/theme/widget-theme-scope.d.ts.map +1 -0
- package/dist/use-voice-session.d.ts +9 -2
- package/dist/use-voice-session.d.ts.map +1 -1
- package/dist/voice-widget.d.ts +38 -3
- package/dist/voice-widget.d.ts.map +1 -1
- package/dist/widget/call-view.d.ts +146 -0
- package/dist/widget/call-view.d.ts.map +1 -0
- package/dist/widget/concierge-launcher.d.ts +21 -2
- package/dist/widget/concierge-launcher.d.ts.map +1 -1
- package/dist/widget/concierge-shell.d.ts +49 -67
- package/dist/widget/concierge-shell.d.ts.map +1 -1
- package/dist/widget/launcher-look.d.ts +37 -0
- package/dist/widget/launcher-look.d.ts.map +1 -0
- package/dist/widget/mark-look.d.ts +35 -0
- package/dist/widget/mark-look.d.ts.map +1 -0
- package/dist/widget/mark.d.ts +35 -0
- package/dist/widget/mark.d.ts.map +1 -0
- package/dist/widget/mic-button.d.ts +27 -0
- package/dist/widget/mic-button.d.ts.map +1 -0
- package/dist/widget/shell-renderer.d.ts +1 -1
- package/dist/widget/shell-renderer.d.ts.map +1 -1
- package/dist/widget/style-of.d.ts +9 -0
- package/dist/widget/style-of.d.ts.map +1 -0
- package/dist/widget/use-follow-bottom.d.ts +17 -0
- package/dist/widget/use-follow-bottom.d.ts.map +1 -0
- package/dist/widget-cards.d.ts.map +1 -1
- package/dist/widget.css +1 -1
- package/package.json +16 -4
- package/src/styles/call-view.css +280 -0
- package/src/styles/concierge-shell-entry.css +10 -0
- package/src/styles/mark.css +94 -0
- package/src/styles/widget-panel.css +644 -0
- package/dist/widget/transcript-geometry.d.ts +0 -226
- package/dist/widget/transcript-geometry.d.ts.map +0 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { WidgetAvatar } from '../avatar.js';
|
|
3
|
+
import type { BotState } from '../bot-state.js';
|
|
4
|
+
import type { ConciergeState } from '../concierge-state.js';
|
|
5
|
+
import { type WidgetMessages } from '../messages.js';
|
|
6
|
+
import type { ChatCards } from '../use-chat-session.js';
|
|
7
|
+
import type { ConciergeCallPhase, WidgetTurn } from '../voice-widget.js';
|
|
8
|
+
import type { WidgetCartLine } from '../widget-cart-summary.js';
|
|
9
|
+
import type { ConciergeShellVoice } from './concierge-shell.js';
|
|
10
|
+
/**
|
|
11
|
+
* The call view's own words. Kept out of `defaultWidgetMessages` so the dock's
|
|
12
|
+
* `ui.mjs` does not carry them; a host catalogue overrides any of them by key.
|
|
13
|
+
*/
|
|
14
|
+
export declare const defaultCallMessages: {
|
|
15
|
+
call_your_turn: string;
|
|
16
|
+
call_muted: string;
|
|
17
|
+
call_paused: string;
|
|
18
|
+
call_mic_blocked: string;
|
|
19
|
+
call_human: string;
|
|
20
|
+
call_offline: string;
|
|
21
|
+
call_problem: string;
|
|
22
|
+
call_ended: string;
|
|
23
|
+
call_interrupted: string;
|
|
24
|
+
call_try_saying: string;
|
|
25
|
+
call_to_text: string;
|
|
26
|
+
call_back_to_call: string;
|
|
27
|
+
call_back_to_chat: string;
|
|
28
|
+
call_summary_added: string;
|
|
29
|
+
call_summary_checkout: string;
|
|
30
|
+
call_on_call: string;
|
|
31
|
+
};
|
|
32
|
+
export type WidgetCallMessages = {
|
|
33
|
+
readonly [K in keyof typeof defaultCallMessages]?: string;
|
|
34
|
+
};
|
|
35
|
+
export type CallWordKey = keyof typeof defaultCallMessages | 'voice_state_connecting' | 'voice_state_listening' | 'voice_state_thinking' | 'voice_state_speaking' | 'dock_still_here';
|
|
36
|
+
/** One message, from the host's catalogue when it has the key. */
|
|
37
|
+
export declare function callText(messages: WidgetMessages & WidgetCallMessages, key: CallWordKey): string;
|
|
38
|
+
export declare function callStatus(state: ConciergeState, { ended, callerSpeaking }: {
|
|
39
|
+
readonly ended: boolean;
|
|
40
|
+
readonly callerSpeaking: boolean;
|
|
41
|
+
}): {
|
|
42
|
+
readonly word: CallWordKey;
|
|
43
|
+
readonly explain: boolean;
|
|
44
|
+
};
|
|
45
|
+
/** `mm:ss`, minutes uncapped. */
|
|
46
|
+
export declare function formatCallTime(ms: number): string;
|
|
47
|
+
/**
|
|
48
|
+
* One call as the view tracks it, on the monotonic clock.
|
|
49
|
+
*
|
|
50
|
+
* A call begins when the phase leaves `idle` and ends when it returns there.
|
|
51
|
+
* The timer starts at the first `live` or `waiting` phase, so dialling and
|
|
52
|
+
* the permission prompt are not counted. A dropped room is `idle`, so a
|
|
53
|
+
* reconnect is a new call: new `id`, timer from zero, a fresh `from`.
|
|
54
|
+
*/
|
|
55
|
+
export interface CallRecord {
|
|
56
|
+
readonly id: number;
|
|
57
|
+
readonly active: boolean;
|
|
58
|
+
readonly startedAt: number | null;
|
|
59
|
+
readonly endedAt: number | null;
|
|
60
|
+
/** How many turns were on screen before this call: its own start at `from`. */
|
|
61
|
+
readonly from: number;
|
|
62
|
+
/** The basket when the call began. */
|
|
63
|
+
readonly cart: readonly WidgetCartLine[];
|
|
64
|
+
/** A checkout was handed over during this call. Latched, so a capped event list cannot drop it. */
|
|
65
|
+
readonly checkout?: boolean;
|
|
66
|
+
/** The host's `checkout` value when the call began: one left over from the last call is not this one's. */
|
|
67
|
+
readonly checkoutFrom?: unknown;
|
|
68
|
+
}
|
|
69
|
+
export declare const IDLE_CALL_RECORD: CallRecord;
|
|
70
|
+
export declare function advanceCallRecord(prev: CallRecord, next: {
|
|
71
|
+
readonly phase: ConciergeCallPhase;
|
|
72
|
+
readonly now: number;
|
|
73
|
+
readonly turns: number;
|
|
74
|
+
readonly cart: readonly WidgetCartLine[];
|
|
75
|
+
readonly checkout?: unknown;
|
|
76
|
+
}): CallRecord;
|
|
77
|
+
export declare function useCallRecord(phase: ConciergeCallPhase, turns: readonly WidgetTurn[], cart: readonly WidgetCartLine[] | undefined, checkout?: unknown): CallRecord;
|
|
78
|
+
/** The titles whose quantity grew since the call began, in basket order. */
|
|
79
|
+
export declare function addedDuringCall(before: readonly WidgetCartLine[], after: readonly WidgetCartLine[]): readonly string[];
|
|
80
|
+
/** What the view needs from the conversation; `ShellRenderer` builds it. */
|
|
81
|
+
export interface CallViewData {
|
|
82
|
+
/**
|
|
83
|
+
* Says a "Try saying" line on the call (`WidgetCallHooks.sendText`). Absent
|
|
84
|
+
* draws no such row; resolving `false` did not send the line, and its chip
|
|
85
|
+
* stays.
|
|
86
|
+
*/
|
|
87
|
+
readonly onSay?: (line: string) => Promise<boolean> | boolean;
|
|
88
|
+
/**
|
|
89
|
+
* A checkout was handed over: `true`, or the newest checkout event itself.
|
|
90
|
+
* The panel's call record latches a change of it per call.
|
|
91
|
+
*/
|
|
92
|
+
readonly checkout?: boolean | object;
|
|
93
|
+
readonly state: ConciergeState;
|
|
94
|
+
readonly callerSpeaking?: boolean;
|
|
95
|
+
readonly turns: readonly WidgetTurn[];
|
|
96
|
+
readonly renderCards: (cards: ChatCards) => ReactNode;
|
|
97
|
+
readonly suggestions: readonly string[];
|
|
98
|
+
readonly cart?: readonly WidgetCartLine[];
|
|
99
|
+
readonly messages: WidgetMessages & WidgetCallMessages;
|
|
100
|
+
}
|
|
101
|
+
export interface CallViewProps extends CallViewData {
|
|
102
|
+
readonly voice: ConciergeShellVoice;
|
|
103
|
+
/** The agent's name, for a monogram mark. */
|
|
104
|
+
readonly name?: string;
|
|
105
|
+
/** Drawn at the header's end: the panel's own close control. */
|
|
106
|
+
readonly actions?: ReactNode;
|
|
107
|
+
readonly record: CallRecord;
|
|
108
|
+
readonly bot: BotState;
|
|
109
|
+
readonly avatar: WidgetAvatar;
|
|
110
|
+
/** The host's status line, drawn under the header when it explains the state. */
|
|
111
|
+
readonly hint?: ReactNode;
|
|
112
|
+
readonly onText: () => void;
|
|
113
|
+
readonly onBackToChat: () => void;
|
|
114
|
+
readonly testIds?: {
|
|
115
|
+
readonly mic?: string;
|
|
116
|
+
readonly endCall?: string;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export interface CallMode {
|
|
120
|
+
/** The panel draws the call view in place of the chat. */
|
|
121
|
+
readonly shown: boolean;
|
|
122
|
+
readonly record: CallRecord;
|
|
123
|
+
/** The launcher's second line while a call runs ("On call · 01:24"). */
|
|
124
|
+
readonly launcherLabel: string | undefined;
|
|
125
|
+
/** "Type instead": the chat, with this call still running. */
|
|
126
|
+
readonly toText: () => void;
|
|
127
|
+
/** The way back from the chat to the running call. */
|
|
128
|
+
readonly backToCall: () => void;
|
|
129
|
+
/** Closes the ended call's summary. */
|
|
130
|
+
readonly closeSummary: () => void;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* The panel's call lifecycle. A running call takes the panel over unless the
|
|
134
|
+
* shopper chose "Type instead"; an ended one shows its summary until they
|
|
135
|
+
* close it. Both choices hold for that call only: the next one shows again.
|
|
136
|
+
* Absent `call` (the marketing preview), the call view never shows.
|
|
137
|
+
*/
|
|
138
|
+
export declare function useCallMode(voice: ConciergeShellVoice | undefined, call: CallViewData | undefined): CallMode;
|
|
139
|
+
/**
|
|
140
|
+
* The widget generation's call: a header that names the state, the call's
|
|
141
|
+
* own turns with their cards, the "Try saying" lines and the call controls,
|
|
142
|
+
* then the summary once it ends. Styled by `styles/call-view.css` (`.wgc`).
|
|
143
|
+
* See docs/CONCIERGE_GENERATIONS.md "Call mode".
|
|
144
|
+
*/
|
|
145
|
+
export declare function CallView({ state, callerSpeaking, turns, renderCards, suggestions, onSay, checkout, cart, messages, voice, name, actions, record, bot, avatar, hint, onText, onBackToChat, testIds, }: CallViewProps): import("react").JSX.Element;
|
|
146
|
+
//# sourceMappingURL=call-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-view.d.ts","sourceRoot":"","sources":["../../src/widget/call-view.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,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import { type LauncherVariant } from './launcher-look.js';
|
|
3
4
|
import { alignOf, type ConciergePosition } from './position.js';
|
|
4
5
|
/**
|
|
5
6
|
* The collapsed concierge: a pill the visitor can read, press, and move.
|
|
@@ -13,6 +14,9 @@ import { alignOf, type ConciergePosition } from './position.js';
|
|
|
13
14
|
* of it: the mascot is what the concierge IS, and swapping it for a microphone
|
|
14
15
|
* glyph would trade a personality for an icon that says less.
|
|
15
16
|
*
|
|
17
|
+
* `launcher: 'round'` is the tenant's opt-out: the mark alone in a circle, for
|
|
18
|
+
* a storefront with no room for a pill. The pill stays the default.
|
|
19
|
+
*
|
|
16
20
|
* ## Why it is draggable
|
|
17
21
|
*
|
|
18
22
|
* The widget sits on somebody else's page, over content the tenant chose and we
|
|
@@ -45,7 +49,7 @@ export interface ConciergeLauncherProps {
|
|
|
45
49
|
readonly hidden: boolean;
|
|
46
50
|
readonly id?: string;
|
|
47
51
|
readonly testId?: string;
|
|
48
|
-
/** Which face renders inside the
|
|
52
|
+
/** Which face renders inside the launcher. Defaults to `'orb'` — see `avatar.ts`. */
|
|
49
53
|
readonly avatar?: WidgetAvatar;
|
|
50
54
|
/**
|
|
51
55
|
* What the launcher has to say while the panel is closed —
|
|
@@ -61,8 +65,23 @@ export interface ConciergeLauncherProps {
|
|
|
61
65
|
* rather than drawing an empty disc.
|
|
62
66
|
*/
|
|
63
67
|
readonly initials?: string;
|
|
68
|
+
/**
|
|
69
|
+
* `appearance.launcher`: `pill` (mark, label, sub-label) or `round` (the
|
|
70
|
+
* mark alone, in a circle). Defaults to `pill`.
|
|
71
|
+
*/
|
|
72
|
+
readonly launcher?: LauncherVariant;
|
|
73
|
+
/** The agent's name — the `monogram` mark draws its first grapheme. */
|
|
74
|
+
readonly agentName?: string;
|
|
75
|
+
/** The pill's second line at rest, e.g. "Chat or talk". */
|
|
76
|
+
readonly subLabel?: string;
|
|
77
|
+
/**
|
|
78
|
+
* A call is live: its status line, e.g. "On call · 1:24". Replaces the
|
|
79
|
+
* pill's sub-label and lights the round launcher's live dot. The host owns
|
|
80
|
+
* the timer; absent ⇒ no call.
|
|
81
|
+
*/
|
|
82
|
+
readonly callLabel?: string;
|
|
64
83
|
}
|
|
65
|
-
export declare function ConciergeLauncher({ label, srLabel, moveLabel, position, onPositionChange, onOpen, hidden, id, testId, avatar, spec, initials, }: ConciergeLauncherProps): import("react").JSX.Element;
|
|
84
|
+
export declare function ConciergeLauncher({ label, srLabel, moveLabel, position, onPositionChange, onOpen, hidden, id, testId, avatar, spec, initials, launcher, agentName, subLabel, callLabel, }: ConciergeLauncherProps): import("react").JSX.Element;
|
|
66
85
|
/** Re-exported so a host can type its own stored value. */
|
|
67
86
|
export { alignOf };
|
|
68
87
|
//# sourceMappingURL=concierge-launcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concierge-launcher.d.ts","sourceRoot":"","sources":["../../src/widget/concierge-launcher.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"concierge-launcher.d.ts","sourceRoot":"","sources":["../../src/widget/concierge-launcher.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAGxE,OAAO,EAeL,KAAK,eAAe,EACrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,OAAO,EAIP,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,sBAAsB;IACrC,qEAAqE;IACrE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,mEAAmE;IACnE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,4EAA4E;IAC5E,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAClE,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,qFAAqF;IACrF,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;IACpC,uEAAuE;IACvE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,2DAA2D;IAC3D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAWD,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,OAAO,EACP,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,MAAM,EACN,MAAM,EACN,EAAE,EACF,MAAM,EACN,MAA8B,EAC9B,IAAY,EACZ,QAAa,EACb,QAAmC,EACnC,SAAS,EACT,QAAQ,EACR,SAAS,GACV,EAAE,sBAAsB,+BAsRxB;AA6BD,2DAA2D;AAC3D,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -3,50 +3,40 @@ import type { CallerInterruptReason } from '@saar-ai/widget-protocol/telemetry';
|
|
|
3
3
|
import type { WidgetLauncherSpec } from './widget-view.js';
|
|
4
4
|
import type { BotState } from '../bot-state.js';
|
|
5
5
|
import { type WidgetAvatar } from '../avatar.js';
|
|
6
|
+
import type { LauncherVariant } from './launcher-look.js';
|
|
6
7
|
import { type ConciergePosition } from './position.js';
|
|
8
|
+
import { type CallViewData } from './call-view.js';
|
|
7
9
|
/**
|
|
8
|
-
* The concierge widget's chrome: trigger, backdrop, panel,
|
|
10
|
+
* The concierge widget's chrome: trigger, backdrop, panel, header, composer.
|
|
9
11
|
*
|
|
10
12
|
* ## Why it is a package and not a component in one app
|
|
11
13
|
*
|
|
12
14
|
* This widget renders in two places — the scripted preview on the marketing
|
|
13
15
|
* site and the real assistant in the product — and the preview's entire claim
|
|
14
|
-
* is that a visitor is looking at what they would get.
|
|
15
|
-
*
|
|
16
|
-
* touched. So the chrome is defined once, here, and each app supplies what is
|
|
17
|
-
* genuinely its own: the marketing preview replays a script, the product holds
|
|
18
|
-
* a live session with a microphone, product cards and a cart.
|
|
16
|
+
* is that a visitor is looking at what they would get. So the chrome is
|
|
17
|
+
* defined once, here, and each app supplies what is genuinely its own.
|
|
19
18
|
*
|
|
20
19
|
* What is deliberately NOT here: the transcript. `children` is the whole
|
|
21
|
-
* conversation area
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
20
|
+
* conversation area; the product renders bubbles, cards, attachments, markdown
|
|
21
|
+
* and a cart summary there. The panel restyles that shared markup from its own
|
|
22
|
+
* stylesheet (`styles/widget-panel.css`, scoped under `.wgp`) so the dock,
|
|
23
|
+
* which draws the same transcript, keeps its look.
|
|
25
24
|
*
|
|
26
25
|
* ## No i18n, no router, no data
|
|
27
26
|
*
|
|
28
|
-
* Every string arrives in {@link ConciergeShellProps.labels}.
|
|
29
|
-
* no locale of its own, and an app that translates with `next-intl` should not
|
|
30
|
-
* have to reach a translator into a design-system component to render a button.
|
|
27
|
+
* Every string arrives in {@link ConciergeShellProps.labels}.
|
|
31
28
|
*
|
|
32
29
|
* ## It is a modal dialog, and behaves like one
|
|
33
30
|
*
|
|
34
31
|
* `Escape` closes, `Tab` is trapped inside the panel, and focus returns to the
|
|
35
|
-
* trigger on close
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* Focus lands on the COMPOSER, not the close button. It is what a visitor
|
|
39
|
-
* opened the panel to use, and a focused close button swallows the space bar:
|
|
40
|
-
* press space to start typing before clicking into the field and the panel
|
|
41
|
-
* shuts instead — a keyboard user's first keystroke dismissing the thing they
|
|
42
|
-
* just opened.
|
|
32
|
+
* trigger on close. Focus lands on the COMPOSER, not the close button: a
|
|
33
|
+
* focused close button swallows the space bar a visitor presses to start
|
|
34
|
+
* typing.
|
|
43
35
|
*
|
|
44
36
|
* ## The animation carries nothing
|
|
45
37
|
*
|
|
46
|
-
* Every flourish
|
|
47
|
-
*
|
|
48
|
-
* announced in text — see {@link ConciergeShellProps.announcement}, which is
|
|
49
|
-
* the live region and not an afterthought.
|
|
38
|
+
* Every flourish is decorative and stops under `prefers-reduced-motion`; the
|
|
39
|
+
* state is also announced in text — see {@link ConciergeShellProps.announcement}.
|
|
50
40
|
*/
|
|
51
41
|
export interface ConciergeShellLabels {
|
|
52
42
|
/** Accessible name of the collapsed trigger. */
|
|
@@ -64,22 +54,11 @@ export interface ConciergeShellLabels {
|
|
|
64
54
|
readonly close: string;
|
|
65
55
|
/** Accessible name of the dialog itself. */
|
|
66
56
|
readonly dialog: string;
|
|
57
|
+
/** The header's name line — the concierge's name. Defaults to `dialog`. */
|
|
58
|
+
readonly title?: string;
|
|
67
59
|
readonly composerPlaceholder: string;
|
|
68
60
|
readonly send: string;
|
|
69
61
|
}
|
|
70
|
-
/**
|
|
71
|
-
* Where a call is, from the caller's point of view.
|
|
72
|
-
*
|
|
73
|
-
* The panel no longer draws a full status BAR for these — removed on
|
|
74
|
-
* request; the widget reads better without one. What it draws instead, on
|
|
75
|
-
* explicit later request, is a small one-word PILL under the orb (see
|
|
76
|
-
* `ConciergeShellVoice.labels`'s `connecting`/`listening`/`thinking`/
|
|
77
|
-
* `speaking` and the orb overlay below) — a partial reversal, not a
|
|
78
|
-
* contradiction: the pill shows only the call's current state word, never
|
|
79
|
-
* an error or a refusal reason, which still reaches the caller through the
|
|
80
|
-
* host's own status line exactly as before. The phase still decides which
|
|
81
|
-
* control the composer row offers too.
|
|
82
|
-
*/
|
|
83
62
|
import type { ConciergeCallPhase } from '../voice-widget.js';
|
|
84
63
|
export type { ConciergeCallPhase };
|
|
85
64
|
/**
|
|
@@ -96,12 +75,12 @@ export interface ConciergeShellVoice {
|
|
|
96
75
|
readonly onStart: () => void;
|
|
97
76
|
/** Leave the call — a different intention from muting it. */
|
|
98
77
|
readonly onEnd?: () => void;
|
|
99
|
-
/** Ask the browser for the microphone again, after it was refused. */
|
|
100
|
-
readonly onRetryMic?: () => void;
|
|
101
78
|
/**
|
|
102
79
|
* §4's `speaking` row — cut the agent off mid-reply. The dock puts this in
|
|
103
|
-
* its row
|
|
104
|
-
*
|
|
80
|
+
* its row. The widget makes the call view's mark the control, and draws it
|
|
81
|
+
* in the composer's call row whenever the call view is not shown (the
|
|
82
|
+
* "Type instead" view, or a host that passes no `call`). Absent means the
|
|
83
|
+
* host cannot interrupt, and no control is drawn.
|
|
105
84
|
*
|
|
106
85
|
* The reason is `@saar-ai/widget-protocol/telemetry`'s vocabulary, narrowed
|
|
107
86
|
* exactly as `DockVoiceProps.onInterrupt` narrows it and for the same
|
|
@@ -121,9 +100,11 @@ export interface ConciergeShellVoice {
|
|
|
121
100
|
readonly onFixPermission?: () => void;
|
|
122
101
|
readonly muted?: boolean;
|
|
123
102
|
readonly onToggleMute?: () => void;
|
|
124
|
-
/** True while the agent is talking, so the
|
|
103
|
+
/** True while the agent is talking, so the panel can offer the interrupt. */
|
|
125
104
|
readonly agentSpeaking?: boolean;
|
|
126
|
-
/**
|
|
105
|
+
/** @deprecated Read by nothing since the call view replaced the call bar; kept for type compatibility. */
|
|
106
|
+
readonly onRetryMic?: () => void;
|
|
107
|
+
/** @deprecated Read by nothing since the call view replaced the call bar; kept for type compatibility. */
|
|
127
108
|
readonly level?: number;
|
|
128
109
|
/**
|
|
129
110
|
* Present and DISABLED rather than hidden, for a surface that has no voice
|
|
@@ -137,17 +118,17 @@ export interface ConciergeShellVoice {
|
|
|
137
118
|
readonly end?: string;
|
|
138
119
|
readonly mute?: string;
|
|
139
120
|
readonly unmute?: string;
|
|
140
|
-
/** One line for the call bar: "Connecting…", "You can talk now", a reason. */
|
|
141
|
-
readonly status?: string;
|
|
142
121
|
/** Shown while the agent speaks: "go ahead and interrupt". */
|
|
143
122
|
readonly interrupt?: string;
|
|
144
123
|
/** The `fix_browser` control's own label. */
|
|
145
124
|
readonly fixBrowser?: string;
|
|
146
|
-
/**
|
|
125
|
+
/** @deprecated Read by nothing since the call view replaced the call bar. */
|
|
126
|
+
readonly status?: string;
|
|
127
|
+
/** @deprecated Read by nothing since the call view replaced the call bar. */
|
|
147
128
|
readonly retry?: string;
|
|
148
129
|
/**
|
|
149
130
|
* WHY the control cannot be used, replacing `start` as the accessible
|
|
150
|
-
* name for as long as it cannot — see `
|
|
131
|
+
* name for as long as it cannot — see `micControl` (`mic-button.tsx`).
|
|
151
132
|
*
|
|
152
133
|
* `start` names the action the button would perform, and a button that
|
|
153
134
|
* performs nothing must not announce one: a caller who hears "Start
|
|
@@ -159,8 +140,9 @@ export interface ConciergeShellVoice {
|
|
|
159
140
|
*/
|
|
160
141
|
readonly unavailable?: string;
|
|
161
142
|
/**
|
|
162
|
-
* The four words the voice-state pill
|
|
163
|
-
* pill's own doc comment) — one per state a live call
|
|
143
|
+
* The four words the header's voice-state pill shows while the call view
|
|
144
|
+
* is not (see that pill's own doc comment) — one per state a live call
|
|
145
|
+
* can be in. `connecting` also names the microphone while it dials.
|
|
164
146
|
* Defaults to the package's brand-neutral English fallback
|
|
165
147
|
* (`defaultWidgetMessages`, `messages.ts`) so an existing caller that
|
|
166
148
|
* has not been updated to pass these still renders sensibly; a host
|
|
@@ -172,15 +154,6 @@ export interface ConciergeShellVoice {
|
|
|
172
154
|
readonly speaking?: string;
|
|
173
155
|
};
|
|
174
156
|
}
|
|
175
|
-
/**
|
|
176
|
-
* The small wordmark link rendered directly under the open panel — which
|
|
177
|
-
* adopter's framework fork produced this bundle, not a per-tenant value. See
|
|
178
|
-
* {@link ConciergeShellProps.attribution}'s own doc comment for the full
|
|
179
|
-
* "why not just resolve `@wesence/branding` here" reasoning. Exported (rather
|
|
180
|
-
* than declared inline on each prop that carries it) so `voice-widget.tsx`,
|
|
181
|
-
* `host-widget.tsx`, and `cdn/core.ts`'s `UiModule` reference one definition
|
|
182
|
-
* instead of four independent copies of the same two-field shape.
|
|
183
|
-
*/
|
|
184
157
|
import type { WidgetAttribution, WidgetPrivacyChoices } from '../dock/dock.js';
|
|
185
158
|
export type { WidgetAttribution };
|
|
186
159
|
export interface ConciergeShellProps {
|
|
@@ -200,13 +173,16 @@ export interface ConciergeShellProps {
|
|
|
200
173
|
readonly launcher?: WidgetLauncherSpec;
|
|
201
174
|
/** `launcher.initials` — the operator's, already computed by the caller. */
|
|
202
175
|
readonly launcherInitials?: string;
|
|
176
|
+
/** §9.1 `layout.launcher`. Absent ⇒ `pill`. */
|
|
177
|
+
readonly launcherVariant?: LauncherVariant;
|
|
178
|
+
/** §9.1 `identity.name`: the launcher's title and the monogram's letter. */
|
|
179
|
+
readonly agentName?: string;
|
|
203
180
|
/** `typing` — somebody on the other side is composing; drawn at the foot of the transcript. */
|
|
204
181
|
readonly typing?: boolean;
|
|
205
182
|
/**
|
|
206
|
-
* §4's `human` row: the person holding the conversation
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
* while the panel is open.
|
|
183
|
+
* §4's `human` row: the person holding the conversation. The dock says this
|
|
184
|
+
* in its row; the widget says it on the header's status line, which is
|
|
185
|
+
* always visible while the panel is open.
|
|
210
186
|
*/
|
|
211
187
|
readonly operatorName?: string;
|
|
212
188
|
/** Which face — the 'orb' blob or the 'knot' rope line. Defaults to `'orb'`; see `avatar.ts`. */
|
|
@@ -217,7 +193,7 @@ export interface ConciergeShellProps {
|
|
|
217
193
|
* caller supplies list items and nothing about scrolling or padding.
|
|
218
194
|
*/
|
|
219
195
|
readonly children: ReactNode;
|
|
220
|
-
/**
|
|
196
|
+
/** On the header's status line — the product's status, the preview's "scripted" badge. */
|
|
221
197
|
readonly badge?: ReactNode;
|
|
222
198
|
readonly draft: string;
|
|
223
199
|
readonly onDraftChange: (value: string) => void;
|
|
@@ -226,6 +202,12 @@ export interface ConciergeShellProps {
|
|
|
226
202
|
readonly composerDisabled?: boolean;
|
|
227
203
|
/** Omitted ⇒ no voice control renders at all. */
|
|
228
204
|
readonly voice?: ConciergeShellVoice;
|
|
205
|
+
/**
|
|
206
|
+
* The call view's data (`call-view.tsx`). Present, a running call swaps the
|
|
207
|
+
* panel's header, transcript and composer for the call view (`useCallMode`);
|
|
208
|
+
* absent (the marketing preview), the composer row keeps the end-call control.
|
|
209
|
+
*/
|
|
210
|
+
readonly call?: CallViewData;
|
|
229
211
|
/**
|
|
230
212
|
* Rendered inside the composer, before the text field.
|
|
231
213
|
*
|
|
@@ -279,7 +261,7 @@ export interface ConciergeShellProps {
|
|
|
279
261
|
readonly endCall?: string;
|
|
280
262
|
};
|
|
281
263
|
/**
|
|
282
|
-
* The small wordmark link
|
|
264
|
+
* The small wordmark link in the panel's footer, under the composer — which
|
|
283
265
|
* adopter's framework fork produced this bundle, not a per-tenant value.
|
|
284
266
|
*
|
|
285
267
|
* A NAME and DATA prop, same rule this file states above for `labels`: this
|
|
@@ -294,7 +276,7 @@ export interface ConciergeShellProps {
|
|
|
294
276
|
* Absent ⇒ no attribution renders at all, rather than a placeholder.
|
|
295
277
|
*/
|
|
296
278
|
readonly attribution?: WidgetAttribution;
|
|
297
|
-
/** Privacy choices,
|
|
279
|
+
/** Privacy choices, in the panel's footer. See `WidgetPrivacyChoices`. */
|
|
298
280
|
readonly privacyChoices?: WidgetPrivacyChoices;
|
|
299
281
|
/**
|
|
300
282
|
* `false` keeps focus where it is the FIRST time the panel opens — a panel
|
|
@@ -303,5 +285,5 @@ export interface ConciergeShellProps {
|
|
|
303
285
|
*/
|
|
304
286
|
readonly focusOnOpen?: boolean;
|
|
305
287
|
}
|
|
306
|
-
export declare function ConciergeShell({ open, onOpenChange, state, messageArrived, launcher, launcherInitials, typing, operatorName, avatar, labels, children, badge, draft, onDraftChange, onSubmit, composerDisabled, voice, announcement, skin, skinStyle, idPrefix, scrollKey, composerLeading, testIds, position, onPositionChange, attribution, privacyChoices, focusOnOpen, }: ConciergeShellProps): import("react").JSX.Element;
|
|
288
|
+
export declare function ConciergeShell({ open, onOpenChange, state, messageArrived, launcher, launcherInitials, launcherVariant, agentName, typing, operatorName, avatar, labels, children, badge, draft, onDraftChange, onSubmit, composerDisabled, voice, call, announcement, skin, skinStyle, idPrefix, scrollKey, composerLeading, testIds, position, onPositionChange, attribution, privacyChoices, focusOnOpen, }: ConciergeShellProps): import("react").JSX.Element;
|
|
307
289
|
//# sourceMappingURL=concierge-shell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concierge-shell.d.ts","sourceRoot":"","sources":["../../src/widget/concierge-shell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,aAAa,EAElB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAGhF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"concierge-shell.d.ts","sourceRoot":"","sources":["../../src/widget/concierge-shell.tsx"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,aAAa,EAElB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAGhF,OAAO,KAAK,EAAE,k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,WAAW,CAAC,EAAE,iBAAiB,CAAC;IACzC,0EAA0E;IAC1E,QAAQ,CAAC,cAAc,CAAC,EAAE,oBAAoB,CAAC;IAC/C;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,cAAsB,EACtB,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,MAAc,EACd,YAAY,EACZ,MAA8B,EAC9B,MAAM,EACN,QAAQ,EACR,KAAK,EACL,KAAK,EACL,aAAa,EACb,QAAQ,EACR,gBAAwB,EACxB,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,IAAI,EACJ,SAAS,EACT,QAAsB,EACtB,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAqC,EACrC,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,WAAkB,GACnB,EAAE,mBAAmB,+BA2brB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The collapsed launcher's look, shared by `concierge-launcher.tsx` (React)
|
|
3
|
+
* and `cdn/launcher-dom.ts` (the plain-DOM cold twin `core` paints first).
|
|
4
|
+
*
|
|
5
|
+
* One set of declarations, two renderers: the handover from the cold pill to
|
|
6
|
+
* React's must not visibly jump, and the cheapest way to keep two renderings
|
|
7
|
+
* identical is to give them nothing to disagree about. Every value reads a
|
|
8
|
+
* `--wgt-*` token with a literal fallback, because the cold launcher paints
|
|
9
|
+
* before any stylesheet defining those tokens has been adopted. Strings, not
|
|
10
|
+
* objects, for the reason `mark-look.ts` gives. Framework-free: ships in `core`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const LAUNCHER_VARIANTS: readonly ['pill', 'round'];
|
|
13
|
+
export type LauncherVariant = (typeof LAUNCHER_VARIANTS)[number];
|
|
14
|
+
export declare const DEFAULT_LAUNCHER_VARIANT: LauncherVariant;
|
|
15
|
+
export declare function isLauncherVariant(value: unknown): value is LauncherVariant;
|
|
16
|
+
/** Mark diameter inside each launcher. */
|
|
17
|
+
export declare const LAUNCHER_MARK_SIZE: Readonly<Record<LauncherVariant, number>>;
|
|
18
|
+
export declare const LAUNCHER_SURFACE = "var(--wgt-panel-surface,var(--widget-card,#fff))";
|
|
19
|
+
export declare const LAUNCHER_TEXT = "var(--wgt-text,var(--widget-foreground,#1c1618))";
|
|
20
|
+
export declare const LAUNCHER_ELEVATION = "var(--wgt-elevation,0 0 0 1px rgba(0,0,0,.06),0 24px 60px -22px rgba(0,0,0,.32))";
|
|
21
|
+
/** The live-call dot, and `--wgt-live`'s value: constant, so it reads as "live" on every theme. */
|
|
22
|
+
export declare const LIVE_COLOR = "#E5484D";
|
|
23
|
+
/** The fixed root, before the anchor. */
|
|
24
|
+
export declare const launcherRootCss: (variant: LauncherVariant) => string;
|
|
25
|
+
/** The open control: mark + text in the pill, the mark alone in the round. */
|
|
26
|
+
export declare const launcherOpenCss: (variant: LauncherVariant) => string;
|
|
27
|
+
/** The round launcher's mark carries the elevation; the pill's sits on a surface. */
|
|
28
|
+
export declare const ROUND_MARK_CSS = "box-shadow:var(--wgt-elevation,0 0 0 1px rgba(0,0,0,.06),0 24px 60px -22px rgba(0,0,0,.32))";
|
|
29
|
+
export declare const LAUNCHER_TEXT_CSS = "display:block;min-width:0;color:var(--wgt-text,var(--widget-foreground,#1c1618))";
|
|
30
|
+
export declare const LAUNCHER_TITLE_CSS = "display:block;max-width:14rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:600;line-height:1.3;color:var(--wgt-text,var(--widget-foreground,#1c1618))";
|
|
31
|
+
export declare const LAUNCHER_SUB_CSS = "display:block;white-space:nowrap;font-size:12px;line-height:1.3;color:var(--wgt-text-muted,var(--widget-foreground-muted,rgba(28,22,24,.73)));font-variant-numeric:tabular-nums";
|
|
32
|
+
export declare const LAUNCHER_GRIP_CSS = "position:relative;z-index:1;display:grid;place-items:center;min-width:28px;min-height:44px;padding:0;border:0;border-radius:999px;background:none;color:var(--wgt-text-muted,var(--widget-foreground-muted,rgba(28,22,24,.73)));cursor:grab;touch-action:none";
|
|
33
|
+
/** In the round launcher the grip is a small disc on the circle's lower start edge. */
|
|
34
|
+
export declare const ROUND_GRIP_CSS = "position:absolute;bottom:-4px;inset-inline-start:-4px;z-index:1;min-height:28px;background:var(--wgt-panel-surface,var(--widget-card,#fff));box-shadow:var(--wgt-elevation,0 0 0 1px rgba(0,0,0,.06),0 24px 60px -22px rgba(0,0,0,.32))";
|
|
35
|
+
/** The grip's hit area: 44px across around the 28px grip, which keeps its look. */
|
|
36
|
+
export declare const GRIP_HIT_CSS = "position:absolute;inset:-8px";
|
|
37
|
+
//# sourceMappingURL=launcher-look.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launcher-look.d.ts","sourceRoot":"","sources":["../../src/widget/launcher-look.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,iBAAiB,YAAI,MAAM,EAAE,OAAO,CAAU,CAAC;AAC5D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AACjE,eAAO,MAAM,wBAAwB,EAAE,eAAwB,CAAC;AAEhE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED,0CAA0C;AAC1C,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAGxE,CAAC;AAEF,eAAO,MAAM,gBAAgB,qDAAqD,CAAC;AACnF,eAAO,MAAM,aAAa,qDAAqD,CAAC;AAEhF,eAAO,MAAM,kBAAkB,qFACqD,CAAC;AAErF,mGAAmG;AACnG,eAAO,MAAM,UAAU,YAAY,CAAC;AAGpC,yCAAyC;AACzC,eAAO,MAAM,eAAe,YAAa,eAAe,KAAG,MAIlD,CAAC;AAEV,8EAA8E;AAC9E,eAAO,MAAM,eAAe,YAAa,eAAe,KAAG,MAIsB,CAAC;AAElF,qFAAqF;AACrF,eAAO,MAAM,cAAc,gGAAqC,CAAC;AAEjE,eAAO,MAAM,iBAAiB,qFAAqD,CAAC;AAEpF,eAAO,MAAM,kBAAkB,kMAAkK,CAAC;AAElM,eAAO,MAAM,gBAAgB,oLAAqH,CAAC;AAEnJ,eAAO,MAAM,iBAAiB,kQAAmM,CAAC;AAElO,uFAAuF;AACvF,eAAO,MAAM,cAAc,4OAAoJ,CAAC;AAEhL,mFAAmF;AACnF,eAAO,MAAM,YAAY,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The mark's static geometry and colours, shared by the React `Mark`
|
|
3
|
+
* (`mark.tsx`) and the plain-DOM cold launcher (`cdn/launcher-dom.ts`).
|
|
4
|
+
*
|
|
5
|
+
* Framework-free on purpose: `launcher-dom.ts` ships in the `core` artefact,
|
|
6
|
+
* which carries no React. Both renderers read the same declarations, so the
|
|
7
|
+
* cold launcher and the React one cannot drift apart at the handover. They
|
|
8
|
+
* are CSS declaration strings rather than style objects because `core` ships
|
|
9
|
+
* unminified whitespace and a budget with a few hundred bytes of headroom: one
|
|
10
|
+
* line of CSS per element costs a fraction of an object literal. React reads
|
|
11
|
+
* them through `styleOf`. Animation lives in `styles/mark.css`, which only
|
|
12
|
+
* the React stage loads.
|
|
13
|
+
*/
|
|
14
|
+
import { MARK_VARIANTS, type MarkVariant } from '../avatar.js';
|
|
15
|
+
export { MARK_VARIANTS, type MarkVariant };
|
|
16
|
+
export declare function isMarkVariant(value: unknown): value is MarkVariant;
|
|
17
|
+
/** Resting heights of the four bars, as a fraction of the bar box. */
|
|
18
|
+
export declare const MARK_BARS: readonly [0.5, 0.9, 0.65, 0.4];
|
|
19
|
+
export declare const markRootCss: (size: number) => string;
|
|
20
|
+
export declare const markBarsCss: (size: number) => string;
|
|
21
|
+
export declare const markBarCss: (size: number, k: number) => string;
|
|
22
|
+
export declare const markMonoCss: (size: number) => string;
|
|
23
|
+
export declare const MARK_PIP_CSS = "width:30%;height:30%;border-radius:50%;background:currentColor";
|
|
24
|
+
/** What the mark draws: a monogram with no letter falls back to bars. */
|
|
25
|
+
export declare function drawnMark(variant: MarkVariant, name: string | undefined): {
|
|
26
|
+
readonly drawn: MarkVariant;
|
|
27
|
+
readonly letter: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The monogram's letter: the first grapheme of the agent's name, uppercased.
|
|
31
|
+
* A grapheme, not a code unit, so an accented or emoji-led name keeps its
|
|
32
|
+
* first visible character whole. Empty name ⇒ `''`; callers then draw bars.
|
|
33
|
+
*/
|
|
34
|
+
export declare function firstGrapheme(name: string | undefined): string;
|
|
35
|
+
//# sourceMappingURL=mark-look.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mark-look.d.ts","sourceRoot":"","sources":["../../src/widget/mark-look.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,CAAC;AAE3C,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,WAAW,CAElE;AAED,sEAAsE;AACtE,eAAO,MAAM,SAAS,YAAI,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,CAAU,CAAC;AAExD,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,MACiL,CAAC;AAE7N,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,MACgC,CAAC;AAE5E,eAAO,MAAM,UAAU,SAAU,MAAM,KAAK,MAAM,KAAG,MACqF,CAAC;AAE3I,eAAO,MAAM,WAAW,SAAU,MAAM,KAAG,MAC4D,CAAC;AAExG,eAAO,MAAM,YAAY,mEAAmE,CAAC;AAM7F,yEAAyE;AACzE,wBAAgB,SAAS,CACvB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB;IAAE,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAG1D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAO9D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { BotState } from '../bot-state.js';
|
|
2
|
+
import { type MarkVariant } from './mark-look.js';
|
|
3
|
+
export { MARK_VARIANTS, isMarkVariant, firstGrapheme, type MarkVariant } from './mark-look.js';
|
|
4
|
+
/** Every state the mark draws. `muted` and `connecting` come from the voice session, not `BotState`. */
|
|
5
|
+
export declare const MARK_STATES: readonly ['idle', 'connecting', 'listening', 'thinking', 'speaking', 'muted'];
|
|
6
|
+
export type MarkState = (typeof MARK_STATES)[number];
|
|
7
|
+
/**
|
|
8
|
+
* The mark's state from the session's. Muted wins over everything except
|
|
9
|
+
* speaking: the agent can still talk while the shopper's mic is off.
|
|
10
|
+
*/
|
|
11
|
+
export declare function markStateFor(state: BotState, flags?: {
|
|
12
|
+
readonly muted?: boolean;
|
|
13
|
+
}): MarkState;
|
|
14
|
+
export interface MarkProps {
|
|
15
|
+
readonly variant: MarkVariant;
|
|
16
|
+
readonly state?: MarkState;
|
|
17
|
+
/** Diameter in px. */
|
|
18
|
+
readonly size: number;
|
|
19
|
+
/** The agent's name; the monogram draws its first grapheme. Empty ⇒ bars. */
|
|
20
|
+
readonly name?: string;
|
|
21
|
+
/** Accessible name. Omitted ⇒ decorative (`aria-hidden`). */
|
|
22
|
+
readonly label?: string;
|
|
23
|
+
/** Extra declarations on the disc, e.g. the round launcher's elevation. */
|
|
24
|
+
readonly extraCss?: string;
|
|
25
|
+
readonly testId?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The simple brand mark: a flat disc in the tenant's primary with four bars,
|
|
29
|
+
* a monogram, or a dot. Motion carries the state (`styles/mark.css`): bars
|
|
30
|
+
* follow the voice while listening or speaking, a ring ripples while
|
|
31
|
+
* listening, an arc orbits while thinking. Transform and opacity only, and
|
|
32
|
+
* static under `prefers-reduced-motion`.
|
|
33
|
+
*/
|
|
34
|
+
export declare function Mark({ variant, state, size, name, label, extraCss, testId }: MarkProps): import("react").JSX.Element;
|
|
35
|
+
//# sourceMappingURL=mark.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mark.d.ts","sourceRoot":"","sources":["../../src/widget/mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAQL,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE/F,wGAAwG;AACxG,eAAO,MAAM,WAAW,YACtB,MAAM,EACN,YAAY,EACZ,WAAW,EACX,UAAU,EACV,UAAU,EACV,OAAO,CACC,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,SAAS,CAEjG;AAED,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B,sBAAsB;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,EAAE,OAAO,EAAE,KAAc,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,SAAS,+BAqC/F"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ConciergeShellVoice } from './concierge-shell.js';
|
|
2
|
+
/**
|
|
3
|
+
* What the microphone control means right now: start, mute or unmute, or,
|
|
4
|
+
* ahead of all three, the REASON it means nothing (`labels.unavailable`).
|
|
5
|
+
*
|
|
6
|
+
* While connecting, dialling or the browser's prompt still open, it is inert
|
|
7
|
+
* and busy: one impatient press must not become a second call, or a mute of a
|
|
8
|
+
* call that does not exist yet. It reports no pressed state then, because
|
|
9
|
+
* there is no call yet to have muted.
|
|
10
|
+
*/
|
|
11
|
+
export declare function micControl(voice: ConciergeShellVoice): {
|
|
12
|
+
label: string;
|
|
13
|
+
onClick: (() => void) | undefined;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
busy: boolean;
|
|
16
|
+
pressed: boolean | undefined;
|
|
17
|
+
live: boolean;
|
|
18
|
+
muted: boolean;
|
|
19
|
+
connectingLabel: string;
|
|
20
|
+
};
|
|
21
|
+
/** The microphone control, in the composer and in the call view's controls. */
|
|
22
|
+
export declare function MicButton({ voice, testId, className, }: {
|
|
23
|
+
readonly voice: ConciergeShellVoice;
|
|
24
|
+
readonly testId?: string | undefined;
|
|
25
|
+
readonly className?: string;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=mic-button.d.ts.map
|