@burdenoff/fe-libs 2026.1117.2 → 2026.1117.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.
Files changed (55) hide show
  1. package/dist/shared/assistant/history/historyControls.d.ts +5 -0
  2. package/dist/shared/assistant/history/historyControls.js +9 -5
  3. package/dist/shared/assistant/home/AssistantHomeActions.d.ts +37 -0
  4. package/dist/shared/assistant/home/AssistantHomeActions.js +68 -0
  5. package/dist/shared/assistant/home/AssistantHomeComposer.d.ts +36 -0
  6. package/dist/shared/assistant/home/AssistantHomeComposer.js +85 -0
  7. package/dist/shared/assistant/home/AssistantHomeHistory.d.ts +106 -0
  8. package/dist/shared/assistant/home/AssistantHomeHistory.js +499 -0
  9. package/dist/shared/assistant/home/AssistantHomePage.d.ts +67 -0
  10. package/dist/shared/assistant/home/AssistantHomePage.js +78 -0
  11. package/dist/shared/assistant/home/AssistantHomeStart.d.ts +171 -0
  12. package/dist/shared/assistant/home/AssistantHomeStart.js +224 -0
  13. package/dist/shared/assistant/home/assistantHomeChat.d.ts +47 -0
  14. package/dist/shared/assistant/home/assistantHomeChat.js +49 -0
  15. package/dist/shared/assistant/home/assistantHomeHistoryRows.d.ts +93 -0
  16. package/dist/shared/assistant/home/assistantHomeHistoryRows.js +113 -0
  17. package/dist/shared/assistant/home/assistantHomeRoutes.d.ts +49 -0
  18. package/dist/shared/assistant/home/assistantHomeRoutes.js +48 -0
  19. package/dist/shared/assistant/home/assistantHomeTopBar.d.ts +4 -0
  20. package/dist/shared/assistant/home/assistantHomeTopBar.js +10 -0
  21. package/dist/shared/assistant/home/useAssistantHomeHistoryRows.d.ts +46 -0
  22. package/dist/shared/assistant/home/useAssistantHomeHistoryRows.js +120 -0
  23. package/dist/shared/assistant/home.d.ts +19 -0
  24. package/dist/shared/assistant/home.js +11 -0
  25. package/dist/shared/assistant/i18nManifest.d.ts +21 -1
  26. package/dist/shared/assistant/i18nManifest.js +22 -2
  27. package/dist/shared/assistant/index.d.ts +18 -0
  28. package/dist/shared/assistant/ui/AIAssistantPanel.js +195 -194
  29. package/dist/shared/assistant/ui/AssistantChatArea.js +1339 -1332
  30. package/dist/shared/assistant/ui/AssistantConversationList.js +44 -48
  31. package/dist/shared/assistant/ui/compact/AssistantLanguagePill.d.ts +12 -0
  32. package/dist/shared/assistant/ui/compact/AssistantLanguagePill.js +13 -14
  33. package/dist/shared/assistant/ui/compact/AssistantWindowHeader.d.ts +8 -2
  34. package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +45 -39
  35. package/dist/shared/assistant/ui/compact/AssistantWindowWelcome.d.ts +44 -0
  36. package/dist/shared/assistant/ui/compact/AssistantWindowWelcome.js +110 -0
  37. package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeCard.d.ts +29 -0
  38. package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeCard.js +84 -0
  39. package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeHero.d.ts +15 -0
  40. package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeHero.js +64 -0
  41. package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeSuggestions.d.ts +12 -0
  42. package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeSuggestions.js +31 -0
  43. package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeTips.d.ts +9 -0
  44. package/dist/shared/assistant/ui/compact/AssistantWindowWelcomeTips.js +37 -0
  45. package/dist/shared/assistant/ui/compact/windowTitle.d.ts +15 -0
  46. package/dist/shared/assistant/ui/compact/windowTitle.js +13 -0
  47. package/dist/shared/assistant/ui/compact/windowWelcome.d.ts +136 -0
  48. package/dist/shared/assistant/ui/compact/windowWelcome.js +119 -0
  49. package/dist/shared/assistant/ui/compact/windowWelcomeHooks.d.ts +49 -0
  50. package/dist/shared/assistant/ui/compact/windowWelcomeHooks.js +70 -0
  51. package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.d.ts +3 -1
  52. package/dist/shared/assistant/ui/composer/AssistantConnectSourceItem.js +27 -26
  53. package/dist/shared-assistant.js +230 -212
  54. package/package.json +2 -1
  55. package/src/shared/tokens/tokens.css +523 -0
@@ -0,0 +1,110 @@
1
+ import { useAssistantTr as e } from "../../i18n.js";
2
+ import { useAssistantPageLabel as t, useAssistantProduct as n } from "../../product.js";
3
+ import { assistantPageLabelKey as r, translateProductCopy as i } from "../../productCopy.js";
4
+ import { hasConnectSource as a, useAssistantConnectSource as o } from "../composer/connectSource.js";
5
+ import { usePrefersReducedMotion as s } from "../usePrefersReducedMotion.js";
6
+ import { AssistantConnectSourceItem as c } from "../composer/AssistantConnectSourceItem.js";
7
+ import { WelcomeCard as l } from "./AssistantWindowWelcomeCard.js";
8
+ import { WelcomeHero as u } from "./AssistantWindowWelcomeHero.js";
9
+ import { WelcomeSuggestionList as d } from "./AssistantWindowWelcomeSuggestions.js";
10
+ import { WelcomeTipsBody as f } from "./AssistantWindowWelcomeTips.js";
11
+ import { welcomeCards as p, welcomeTips as m } from "./windowWelcome.js";
12
+ import { useWelcomeAccordion as h, useWelcomeFit as g, useWelcomeGestureGuard as _ } from "./windowWelcomeHooks.js";
13
+ import { useRef as v } from "react";
14
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
15
+ // src/shared/assistant/ui/compact/AssistantWindowWelcome.tsx
16
+ function S({ tr: e, cards: t, page: n, changeWaits: r, tips: i, canConnectSource: a, onSuggestionClick: o }) {
17
+ let s = t.ask ? "ask" : t.change ? "change" : null, l = (e) => a ? /* @__PURE__ */ b("li", {
18
+ className: "boff-welcome-in",
19
+ "data-step": e + 1,
20
+ children: /* @__PURE__ */ b(c, { presentation: "card" })
21
+ }) : null, u = [];
22
+ return t.ask && u.push({
23
+ key: "ask",
24
+ label: n ? e("welcome.askAbout", "Ask about “{{page}}”", { page: n }) : e("welcome.ask", "Ask a question"),
25
+ body: /* @__PURE__ */ b(d, {
26
+ list: t.ask,
27
+ source: s === "ask" ? l(t.ask.length) : null,
28
+ onSuggestionClick: o
29
+ })
30
+ }), t.change && u.push({
31
+ key: "change",
32
+ label: e("welcome.change", "Make a change"),
33
+ body: /* @__PURE__ */ x(y, { children: [r ? /* @__PURE__ */ b("p", {
34
+ className: "sr-only",
35
+ children: e("welcome.approval", "Each change waits for your approval.")
36
+ }) : null, /* @__PURE__ */ b(d, {
37
+ list: t.change,
38
+ source: s === "change" ? l(t.change.length) : null,
39
+ onSuggestionClick: o
40
+ })] })
41
+ }), u.push({
42
+ key: "tips",
43
+ label: e("welcome.tips", "Tips"),
44
+ body: /* @__PURE__ */ b(f, {
45
+ tips: i,
46
+ source: s === null ? l(i.length) : null
47
+ })
48
+ }), u;
49
+ }
50
+ var C = ({ mode: c, auto: d, voiceOffered: f, avatarOffered: y, onSuggestionClick: C }) => {
51
+ let w = e(), { modes: T } = n(), E = t(), D = s(), O = a(o()), k = p({
52
+ modes: T,
53
+ mode: c,
54
+ auto: d
55
+ }), A = k.change !== null && k.waitsForApproval, j = m({
56
+ changeWaits: A,
57
+ voiceOffered: f,
58
+ avatarOffered: y
59
+ }), M = E ? i(w, r(E), E) : null, N = S({
60
+ tr: w,
61
+ cards: k,
62
+ page: M,
63
+ changeWaits: A,
64
+ tips: j,
65
+ canConnectSource: O,
66
+ onSuggestionClick: C
67
+ }), P = N.map((e) => e.key), F = v(null), I = v(null), L = _(F), R = h(P, L), z = g({
68
+ rowRef: F,
69
+ welcomeRef: I,
70
+ keys: P,
71
+ cards: k,
72
+ tips: j,
73
+ canConnectSource: O,
74
+ page: M,
75
+ tr: w
76
+ }), { open: B, single: V } = R;
77
+ return /* @__PURE__ */ b("div", {
78
+ ref: I,
79
+ className: "boff-welcome",
80
+ "data-testid": "assistant-window-welcome",
81
+ "data-open": B,
82
+ "data-approval": B === "change" && A ? "" : void 0,
83
+ "data-strips": N.length - 1,
84
+ "data-still": D ? "" : void 0,
85
+ children: /* @__PURE__ */ x("div", {
86
+ className: "boff-welcome-body",
87
+ children: [/* @__PURE__ */ b(u, {
88
+ page: M,
89
+ hasChange: k.change !== null,
90
+ changeWaits: A
91
+ }), /* @__PURE__ */ b("div", {
92
+ ref: F,
93
+ className: "boff-welcome-row",
94
+ children: N.map((e, t) => /* @__PURE__ */ b(l, {
95
+ spec: e,
96
+ index: t,
97
+ single: V,
98
+ isOpen: V || e.key === B,
99
+ headId: R.headId(e.key),
100
+ panelId: R.panelId(e.key),
101
+ setHead: R.setHead,
102
+ setInner: z,
103
+ onHeadClick: R.onHeadClick(e.key),
104
+ onHeadKeyDown: R.onHeadKeyDown(t)
105
+ }, e.key))
106
+ })]
107
+ })
108
+ });
109
+ };
110
+ export { C as AssistantWindowWelcome };
@@ -0,0 +1,29 @@
1
+ import { FC, KeyboardEvent, MouseEvent, ReactNode } from 'react';
2
+ import { WelcomeCardKey } from './windowWelcome';
3
+ /** One card as the welcome draws it: which card, its name, and what its panel holds. */
4
+ export interface WelcomeCardSpec {
5
+ readonly key: WelcomeCardKey;
6
+ readonly label: string;
7
+ readonly body: ReactNode;
8
+ }
9
+ export interface WelcomeCardProps {
10
+ spec: WelcomeCardSpec;
11
+ /** Its place in the row (0-based): the entrance delay and the header keys' index. */
12
+ index: number;
13
+ /** The only card drawn: no button and no region, just its tile, title and list. */
14
+ single: boolean;
15
+ isOpen: boolean;
16
+ headId: string;
17
+ panelId: string;
18
+ setHead: (key: WelcomeCardKey, node: HTMLButtonElement | null) => void;
19
+ /** The content box's ref, for the fit (`useWelcomeFit`). */
20
+ setInner: (key: WelcomeCardKey, node: HTMLDivElement | null) => void;
21
+ onHeadClick: (event: MouseEvent<HTMLButtonElement>) => void;
22
+ onHeadKeyDown: (event: KeyboardEvent<HTMLButtonElement>) => void;
23
+ }
24
+ /**
25
+ * One welcome card: its header (the accordion button, or just the tile for a single card) and its panel,
26
+ * a region labelled by its header and `inert` while closed. The content is laid out at the open width, so
27
+ * the slide reveals it and never reflows it.
28
+ */
29
+ export declare const WelcomeCard: FC<WelcomeCardProps>;
@@ -0,0 +1,84 @@
1
+ import { ChevronsRight as e, Lightbulb as t, MessageSquareText as n, Zap as r } from "lucide-react";
2
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
3
+ // src/shared/assistant/ui/compact/AssistantWindowWelcomeCard.tsx
4
+ var o = {
5
+ ask: n,
6
+ change: r,
7
+ tips: t
8
+ }, s = ({ spec: t, index: n, single: r, isOpen: s, headId: c, panelId: l, setHead: u, setInner: d, onHeadClick: f, onHeadKeyDown: p }) => {
9
+ let m = o[t.key], h = /* @__PURE__ */ a("div", {
10
+ ref: (e) => {
11
+ d(t.key, e);
12
+ },
13
+ className: "boff-welcome-inner",
14
+ children: [/* @__PURE__ */ i("div", {
15
+ className: "boff-welcome-top boff-welcome-in",
16
+ "data-step": "0",
17
+ "aria-hidden": !r || void 0,
18
+ children: i(r ? "h3" : "span", {
19
+ className: "boff-welcome-title",
20
+ children: t.label
21
+ })
22
+ }), t.body]
23
+ });
24
+ return /* @__PURE__ */ a("div", {
25
+ className: `boff-welcome-card boff-welcome-card--${t.key} boff-rise boff-delay-${n + 2}`,
26
+ "data-welcome-card": t.key,
27
+ "data-open": s ? "" : void 0,
28
+ "data-single": r ? "" : void 0,
29
+ "data-testid": `assistant-welcome-card-${t.key}`,
30
+ children: [r ? /* @__PURE__ */ i("span", {
31
+ className: "boff-welcome-tile",
32
+ "aria-hidden": "true",
33
+ children: /* @__PURE__ */ i(m, { className: "size-4" })
34
+ }) : /* @__PURE__ */ i("h3", {
35
+ className: "boff-welcome-h",
36
+ children: /* @__PURE__ */ a("button", {
37
+ ref: (e) => {
38
+ u(t.key, e);
39
+ },
40
+ type: "button",
41
+ id: c,
42
+ className: "boff-welcome-head",
43
+ "aria-expanded": s,
44
+ "aria-controls": l,
45
+ "aria-disabled": s ? "true" : void 0,
46
+ onClick: f,
47
+ onKeyDown: p,
48
+ "data-testid": `assistant-welcome-head-${t.key}`,
49
+ children: [
50
+ /* @__PURE__ */ i("span", {
51
+ className: "boff-welcome-tile",
52
+ "aria-hidden": "true",
53
+ children: /* @__PURE__ */ i(m, { className: "size-4" })
54
+ }),
55
+ /* @__PURE__ */ i("span", {
56
+ className: "boff-welcome-label",
57
+ children: /* @__PURE__ */ i("span", {
58
+ className: "boff-welcome-vt",
59
+ children: t.label
60
+ })
61
+ }),
62
+ /* @__PURE__ */ i("span", {
63
+ className: "boff-welcome-cue",
64
+ "aria-hidden": "true",
65
+ children: /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(e, { className: "size-3.5" }) })
66
+ })
67
+ ]
68
+ })
69
+ }), r ? /* @__PURE__ */ i("div", {
70
+ className: "boff-welcome-panel",
71
+ "data-testid": `assistant-welcome-panel-${t.key}`,
72
+ children: h
73
+ }) : /* @__PURE__ */ i("div", {
74
+ className: "boff-welcome-panel",
75
+ id: l,
76
+ role: "region",
77
+ "aria-labelledby": c,
78
+ inert: !s,
79
+ "data-testid": `assistant-welcome-panel-${t.key}`,
80
+ children: h
81
+ })]
82
+ });
83
+ };
84
+ export { s as WelcomeCard };
@@ -0,0 +1,15 @@
1
+ import { FC } from 'react';
2
+ export interface WelcomeHeroProps {
3
+ /** The page's translated label, when the host names one. */
4
+ page: string | null;
5
+ /** The Make a change card shows. */
6
+ hasChange: boolean;
7
+ /** ...and its mode holds each change for approval: only then is the approval said (the pill). */
8
+ changeWaits: boolean;
9
+ }
10
+ /**
11
+ * The welcome's top (BOFF-15066): a time-of-day greeting with the person's first name over a soft two-hue
12
+ * glow, a line saying what the assistant can do here, and (only where the mode holds each change for it)
13
+ * the approval pill. The pill is hidden from the accessibility tree: the Make a change card says it.
14
+ */
15
+ export declare const WelcomeHero: FC<WelcomeHeroProps>;
@@ -0,0 +1,64 @@
1
+ import { useSafeAuth as e } from "../../../providers/shell/AuthProvider.js";
2
+ import { useAssistantTr as t } from "../../i18n.js";
3
+ import { welcomeDayPart as n, welcomeFirstName as r } from "./windowWelcome.js";
4
+ import { useState as i } from "react";
5
+ import { Moon as a, ShieldCheck as o, Sun as s, Sunrise as c } from "lucide-react";
6
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
7
+ // src/shared/assistant/ui/compact/AssistantWindowWelcomeHero.tsx
8
+ var f = {
9
+ morning: c,
10
+ afternoon: s,
11
+ evening: a
12
+ }, p = "";
13
+ function m(e, t, n) {
14
+ if (n === null) return t === "morning" ? e("welcome.morning", "Good morning") : t === "afternoon" ? e("welcome.afternoon", "Good afternoon") : e("welcome.evening", "Good evening");
15
+ let r = { name: p }, i = t === "morning" ? e("welcome.morningName", "Good morning, {{name}}", r) : t === "afternoon" ? e("welcome.afternoonName", "Good afternoon, {{name}}", r) : e("welcome.eveningName", "Good evening, {{name}}", r), a = i.indexOf(p), [o, s] = a < 0 ? [`${i} `, ""] : [i.slice(0, a), i.slice(a + 1)];
16
+ return /* @__PURE__ */ d(l, { children: [
17
+ o,
18
+ /* @__PURE__ */ u("span", {
19
+ className: "boff-welcome-name",
20
+ "data-testid": "assistant-welcome-name",
21
+ children: n
22
+ }),
23
+ s
24
+ ] });
25
+ }
26
+ function h(e, t, n) {
27
+ return t ? n ? e("welcome.subPageChange", "Ask about “{{page}}”, or let me change something.", { page: t }) : e("welcome.subPage", "Ask me about “{{page}}”.", { page: t }) : n ? e("welcome.subChange", "Ask a question, or let me change something.") : e("welcome.sub", "Ask me anything.");
28
+ }
29
+ var g = ({ page: a, hasChange: s, changeWaits: c }) => {
30
+ let l = t(), p = e()?.user ?? null, [g] = i(() => n((/* @__PURE__ */ new Date()).getHours())), _ = r(p), v = f[g];
31
+ return /* @__PURE__ */ d("div", {
32
+ className: "boff-welcome-hero boff-rise",
33
+ children: [
34
+ /* @__PURE__ */ u("div", {
35
+ className: "boff-welcome-glow",
36
+ "aria-hidden": "true",
37
+ children: /* @__PURE__ */ u("div", { className: "boff-welcome-mesh boff-mesh-duo" })
38
+ }),
39
+ /* @__PURE__ */ d("p", {
40
+ className: "boff-welcome-hi",
41
+ "data-testid": "assistant-welcome-greeting",
42
+ children: [/* @__PURE__ */ u(v, {
43
+ className: "boff-welcome-time boff-twinkle",
44
+ "aria-hidden": "true",
45
+ "data-day-part": g
46
+ }), /* @__PURE__ */ u("span", { children: m(l, g, _) })]
47
+ }),
48
+ /* @__PURE__ */ d("div", {
49
+ className: "boff-welcome-line",
50
+ children: [/* @__PURE__ */ u("p", {
51
+ className: "boff-welcome-sub",
52
+ "data-testid": "assistant-welcome-subline",
53
+ children: h(l, a, s)
54
+ }), c ? /* @__PURE__ */ d("p", {
55
+ className: "boff-welcome-ok",
56
+ "aria-hidden": "true",
57
+ "data-testid": "assistant-welcome-approval",
58
+ children: [/* @__PURE__ */ u(o, { className: "size-3.5" }), l("welcome.approval", "Each change waits for your approval.")]
59
+ }) : null]
60
+ })
61
+ ]
62
+ });
63
+ };
64
+ export { g as WelcomeHero };
@@ -0,0 +1,12 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { AssistantIntent } from '../../autoRouting';
3
+ import { WelcomeSuggestion } from './windowWelcome';
4
+ export interface WelcomeSuggestionListProps {
5
+ list: readonly WelcomeSuggestion[];
6
+ /** "Connect a source", in the first content card only: the list's last row. */
7
+ source: ReactNode;
8
+ /** A chip was picked: its DISPLAYED words, and (Auto only) the list it came from. */
9
+ onSuggestionClick: (suggestion: string, intent?: AssistantIntent) => void;
10
+ }
11
+ /** An Ask or Make a change card's chips: each sends its DISPLAYED (translated) words. */
12
+ export declare const WelcomeSuggestionList: FC<WelcomeSuggestionListProps>;
@@ -0,0 +1,31 @@
1
+ import { useAssistantTr as e } from "../../i18n.js";
2
+ import { assistantSuggestionKey as t, translateProductCopy as n } from "../../productCopy.js";
3
+ import { ArrowUpRight as r } from "lucide-react";
4
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ // src/shared/assistant/ui/compact/AssistantWindowWelcomeSuggestions.tsx
6
+ var o = ({ list: o, source: s, onSuggestionClick: c }) => {
7
+ let l = e();
8
+ return /* @__PURE__ */ a("ul", {
9
+ className: "boff-welcome-list",
10
+ children: [o.map((e, o) => {
11
+ let s = n(l, t(e.sourceMode, e.text), e.text);
12
+ return /* @__PURE__ */ i("li", {
13
+ className: "boff-welcome-in",
14
+ "data-step": o + 1,
15
+ ...o > 0 ? { "data-welcome-fit": "" } : {},
16
+ children: /* @__PURE__ */ a("button", {
17
+ type: "button",
18
+ onClick: () => c(s, e.intent),
19
+ className: "boff-welcome-chip boff-gloss-card",
20
+ "data-testid": "assistant-suggestion",
21
+ "data-intent": e.intent,
22
+ children: [/* @__PURE__ */ i(r, {
23
+ className: "boff-welcome-go",
24
+ "aria-hidden": "true"
25
+ }), s]
26
+ })
27
+ }, e.text);
28
+ }), s]
29
+ });
30
+ };
31
+ export { o as WelcomeSuggestionList };
@@ -0,0 +1,9 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { WelcomeTip } from './windowWelcome';
3
+ export interface WelcomeTipsBodyProps {
4
+ tips: readonly WelcomeTip[];
5
+ /** "Connect a source", only when no content card shows: its own list after the tips. */
6
+ source: ReactNode;
7
+ }
8
+ /** The Tips card's lines, each only where its feature is (`welcomeTips`). */
9
+ export declare const WelcomeTipsBody: FC<WelcomeTipsBodyProps>;
@@ -0,0 +1,37 @@
1
+ import { useAssistantTr as e } from "../../i18n.js";
2
+ import { AudioLines as t, MessageSquareText as n, ShieldCheck as r, UserRound as i } from "lucide-react";
3
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
4
+ // src/shared/assistant/ui/compact/AssistantWindowWelcomeTips.tsx
5
+ var c = {
6
+ ask: n,
7
+ change: r,
8
+ voice: t,
9
+ avatar: i
10
+ };
11
+ function l(e, t) {
12
+ return t === "ask" ? e("welcome.tipAsk", "Ask about anything on this page.") : t === "change" ? e("welcome.tipChange", "Ask for a change. It waits for your approval.") : t === "voice" ? e("welcome.tipVoice", "Press the voice button to talk.") : e("welcome.tipAvatar", "Switch to Avatar to talk with a video avatar.");
13
+ }
14
+ var u = ({ tips: t, source: n }) => {
15
+ let r = e();
16
+ return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("ul", {
17
+ className: "boff-welcome-tips",
18
+ children: t.map((e, t) => {
19
+ let n = c[e];
20
+ return /* @__PURE__ */ s("li", {
21
+ className: "boff-welcome-in",
22
+ "data-step": t + 1,
23
+ "data-testid": `assistant-welcome-tip-${e}`,
24
+ ...t > 0 ? { "data-welcome-fit": "" } : {},
25
+ children: [/* @__PURE__ */ o("span", {
26
+ className: "boff-welcome-dot",
27
+ "aria-hidden": "true",
28
+ children: /* @__PURE__ */ o(n, { className: "size-[0.8125rem]" })
29
+ }), /* @__PURE__ */ o("span", { children: l(r, e) })]
30
+ }, e);
31
+ })
32
+ }), n ? /* @__PURE__ */ o("ul", {
33
+ className: "boff-welcome-list",
34
+ children: n
35
+ }) : null] });
36
+ };
37
+ export { u as WelcomeTipsBody };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The window's name: "<Product> Assistant" (BOFF-15066), the product's display name from the shared catalog
3
+ * (`config/products.ts`), so every product gets its own name from the SDK with no app change.
4
+ *
5
+ * ★ Its own key, `window.productTitle`, never `window.title`: that one is seeded in every product as "Quick assistant", so
6
+ * reusing it would show the old words wherever a translation exists. A product the catalog does not know (a host's own id)
7
+ * keeps `window.title`: a wrong name is worse than the generic one.
8
+ */
9
+ export declare function useAssistantWindowTitle(): string;
10
+ /**
11
+ * Fit the window's name in its box: 15 px (no attribute), else 14 px (`data-tight`), else 13 px
12
+ * (`data-tighter`); a name that overflows even at 13 px keeps `data-tighter` and truncates. Each step is
13
+ * measured as it is set (the browser lays the heading out again on each read).
14
+ */
15
+ export declare function fitAssistantWindowTitle(heading: HTMLElement): void;
@@ -0,0 +1,13 @@
1
+ import { findProductConfig as e } from "../../../config/products.js";
2
+ import { useAssistantTr as t } from "../../i18n.js";
3
+ import { useAssistantProduct as n } from "../../product.js";
4
+ // src/shared/assistant/ui/compact/windowTitle.ts
5
+ function r() {
6
+ let r = t(), { product: i } = n(), a = i ? e(i)?.name : void 0;
7
+ return a ? r("window.productTitle", "{{product}} Assistant", { product: a }) : r("window.title", "Quick assistant");
8
+ }
9
+ function i(e) {
10
+ let t = () => e.scrollWidth > e.clientWidth;
11
+ e.removeAttribute("data-tight"), e.removeAttribute("data-tighter"), t() && (e.setAttribute("data-tight", ""), t() && (e.removeAttribute("data-tight"), e.setAttribute("data-tighter", "")));
12
+ }
13
+ export { i as fitAssistantWindowTitle, r as useAssistantWindowTitle };
@@ -0,0 +1,136 @@
1
+ import { AssistantIntent } from '../../autoRouting';
2
+ import { AssistantModeConfig } from '../../conversation';
3
+ import { AssistantMode } from '../../types';
4
+ /** The three expanding cards, in their order on screen. */
5
+ export type WelcomeCardKey = 'ask' | 'change' | 'tips';
6
+ /** One suggestion chip: the product's English, the mode its key is derived from, and (Auto only) where it routes. */
7
+ export interface WelcomeSuggestion {
8
+ readonly text: string;
9
+ /** The mode whose `suggestion.<mode>.<slug>` key translates it (`assistantSuggestionKey`). */
10
+ readonly sourceMode: AssistantMode;
11
+ /** Set only for an Auto chip, exactly as `AssistantEmptyState` sends it: which list it came from. */
12
+ readonly intent?: AssistantIntent;
13
+ }
14
+ /** What the Ask and Change cards hold. A card with nothing in it is `null`, and is not drawn. */
15
+ export interface WelcomeCards {
16
+ readonly ask: readonly WelcomeSuggestion[] | null;
17
+ readonly change: readonly WelcomeSuggestion[] | null;
18
+ /**
19
+ * Every change the Change card's mode makes waits for the person's approval. Only then may the
20
+ * welcome SAY so (the approval pill and the Tips line): a write mode without the brake must not be
21
+ * described as having one.
22
+ */
23
+ readonly waitsForApproval: boolean;
24
+ }
25
+ /**
26
+ * The Ask and Change cards for the active mode.
27
+ *
28
+ * ★ AUTO (`auto`: Auto is in effect and the conversation is still in its read mode, the chat area's
29
+ * own test): Ask holds the read mode's suggestions (`intent: 'read'`) and Change the write mode's
30
+ * (`intent: 'act'`), so a click is routed by the list it came from, never by its translated words,
31
+ * exactly as Auto's mixed chips were. A suggestion in both lists shows once, as the read mode's
32
+ * (`autoSuggestions`' rule).
33
+ *
34
+ * ★ A MODE THE PERSON CHOSE: one card, its own suggestions, no intent (the mode decides). A mode that
35
+ * writes (`writeCapable`) is the "Make a change" card, since its suggestions ask for changes; any
36
+ * other is the Ask card. The approval is said only where the mode holds every change for it
37
+ * (`modeRequiresConfirmWrites`, the sandbox's confirm-before-write).
38
+ */
39
+ export declare function welcomeCards(args: {
40
+ modes: readonly AssistantModeConfig[];
41
+ mode: AssistantMode;
42
+ auto: boolean;
43
+ }): WelcomeCards;
44
+ /** The Tips card's lines, each shown only where its feature is there. */
45
+ export type WelcomeTip = 'ask' | 'change' | 'voice' | 'avatar';
46
+ export declare function welcomeTips(args: {
47
+ /** The Change card shows AND its mode holds each change for approval. */
48
+ changeWaits: boolean;
49
+ /** The composer offers the voice conversation in this mode (its wave button). */
50
+ voiceOffered: boolean;
51
+ /** The Chat | Avatar switch is offered in this panel. */
52
+ avatarOffered: boolean;
53
+ }): WelcomeTip[];
54
+ /** The greeting's part of the day. */
55
+ export type WelcomeDayPart = 'morning' | 'afternoon' | 'evening';
56
+ /** The start page's rule: 05:00–11:59 morning, 12:00–17:59 afternoon, otherwise evening. */
57
+ export declare function welcomeDayPart(hour: number): WelcomeDayPart;
58
+ /** The parts of the signed-in user the greeting reads. */
59
+ export interface WelcomeUser {
60
+ readonly firstName?: string | null;
61
+ readonly name?: string | null;
62
+ }
63
+ /**
64
+ * The name the greeting uses: the first name, else the first word of the full name, else none.
65
+ * ★ Never the email: a profile whose name field holds an address (some sign-ups copy it there) is
66
+ * treated as having no name, and the greeting is just "Good evening".
67
+ */
68
+ export declare function welcomeFirstName(user: WelcomeUser | null | undefined): string | null;
69
+ /**
70
+ * Which header a key moves focus to, or null for a key the accordion does not use. Down and Up
71
+ * follow the order; Right and Left follow the screen, so they swap in a right-to-left panel. All
72
+ * of them wrap; Home and End go to the first and last.
73
+ */
74
+ export declare function welcomeHeaderTarget(key: string, index: number, count: number, rtl: boolean): number | null;
75
+ /** How long after its `pointerup` a gesture's record still counts (the mock's measured backstop). */
76
+ export declare const WELCOME_GESTURE_MS = 600;
77
+ /**
78
+ * The cards move while they slide, so a tap counts only on the card where the finger went DOWN
79
+ * (a fast second tap can land on a card that slid under it).
80
+ *
81
+ * ★ The record belongs to ONE gesture: any new pointerdown replaces it, any click or pointercancel
82
+ * clears it, and it goes stale `WELCOME_GESTURE_MS` after its pointerup, so it can never veto a
83
+ * later click that comes with no pointerdown of its own (assistive tech, voice control). A keyboard
84
+ * or programmatic click (`detail` 0) always counts.
85
+ */
86
+ export interface WelcomeGestureGuard {
87
+ /** A pointer went down: on this card's key, or `null` anywhere else. */
88
+ pointerDown(key: string | null): void;
89
+ pointerUp(): void;
90
+ /** The gesture ended without reaching a header (a chip tap, a cancel). */
91
+ clear(): void;
92
+ /** A header was clicked: does it count? Reads the record and ends the gesture. */
93
+ accepts(key: string, pointer: boolean): boolean;
94
+ }
95
+ export declare function createWelcomeGestureGuard(now: () => number): WelcomeGestureGuard;
96
+ /**
97
+ * Keep only the chips that fit in an open card's content box, so a card never scrolls inside
98
+ * itself: the optional rows (`data-welcome-fit`) are hidden from the last while the content
99
+ * overflows. Rows without the attribute always stay: the card's title, its FIRST chip or tip (the
100
+ * component leaves the attribute off it, so a card is never empty) and "Connect a source".
101
+ *
102
+ * ★ "Overflows" counts the box's END PADDING (`welcomeContentHeight`), not `scrollHeight`: a box that
103
+ * does not scroll leaves its end padding out of `scrollHeight`, so a chip could sit flush on the
104
+ * card's rounded bottom and still "fit" (BOFF-15066 review A11Y-1).
105
+ *
106
+ * ★ Measured on the card's FINAL layout: the content box is laid out at the open width even while
107
+ * the card is a strip (container units), so a closed card is fitted the same way and nothing
108
+ * reflows when it opens. Without layout (a server or a fake DOM: height 0) every row stays.
109
+ *
110
+ * `need` measures the content's height; the default is the real one, a test passes its own.
111
+ */
112
+ export declare function fitWelcomeList(inner: HTMLElement, need?: (inner: HTMLElement) => number): void;
113
+ /**
114
+ * The height an open card's content box needs as drawn now (after `fitWelcomeList`): from its top to the
115
+ * bottom of its lowest row, plus its end padding. Rows out of the flow (the screen-reader approval line)
116
+ * and rows the fit hid (no box) do not count. Without layout (a server or a fake DOM) it is 0.
117
+ */
118
+ export declare function welcomeContentHeight(inner: HTMLElement): number;
119
+ /** The row's bounds from its cards' content (`--bw-row-min` / `--bw-row-max`, in px; `null` leaves the stylesheet's). */
120
+ export interface WelcomeRowBounds {
121
+ readonly min: number | null;
122
+ readonly max: number | null;
123
+ }
124
+ /**
125
+ * ★ The cards are as tall as their tallest content, not the cap (BOFF-15066 review R2): a card with a
126
+ * title and one line must not stretch over 200 px of empty gradient. Every card counts, the closed ones
127
+ * too (their content is laid out at the open width), so opening another card never changes the row's
128
+ * height.
129
+ *
130
+ * ★ And never shorter than what a card must keep (review A11Y-1): when even the kept rows (the title,
131
+ * the first chip, "Connect a source") need more than the room, the row grows to them and the WELCOME
132
+ * scrolls, rather than a card clipping its own content.
133
+ *
134
+ * `needs` are `welcomeContentHeight`s; `rowHeight` the row's height before any bound was applied.
135
+ */
136
+ export declare function welcomeRowBounds(needs: readonly number[], rowHeight: number): WelcomeRowBounds;