@burdenoff/fe-libs 2026.1118.3 → 2026.1118.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/platform-pages/AppearanceSettingsPage.d.ts +9 -13
- package/dist/platform-pages/AppearanceSettingsPage.js +7 -4
- package/dist/platform-pages/index.d.ts +5 -1
- package/dist/platform-pages/oauth/AuthorizedAppsPage.d.ts +13 -0
- package/dist/platform-pages/oauth/AuthorizedAppsPage.js +154 -0
- package/dist/platform-pages/oauth/ConnectAuthorizePage.d.ts +23 -0
- package/dist/platform-pages/oauth/ConnectAuthorizePage.js +196 -0
- package/dist/platform-pages/oauth/operations.d.ts +49 -0
- package/dist/platform-pages/oauth/operations.js +55 -0
- package/dist/platform-pages.js +3 -1
- package/dist/shared/assistant/home/AssistantHomePage.d.ts +29 -1
- package/dist/shared/assistant/home/AssistantHomePage.js +63 -36
- package/dist/shared/assistant/home/AssistantHomeStart.d.ts +12 -0
- package/dist/shared/assistant/home/AssistantHomeStart.js +24 -15
- package/dist/shared/assistant/home.js +5 -5
- package/dist/shared/backgrounds/BackgroundEffect.d.ts +7 -0
- package/dist/shared/backgrounds/BackgroundEffect.js +24 -0
- package/dist/shared/backgrounds/BackgroundPicker.d.ts +49 -0
- package/dist/shared/backgrounds/BackgroundPicker.js +133 -0
- package/dist/shared/backgrounds/BackgroundRoot.d.ts +13 -0
- package/dist/shared/backgrounds/BackgroundRoot.js +44 -0
- package/dist/shared/backgrounds/CursorWave.d.ts +19 -0
- package/dist/shared/backgrounds/CursorWave.js +40 -0
- package/dist/shared/backgrounds/DottedWaves.d.ts +20 -0
- package/dist/shared/backgrounds/DottedWaves.js +36 -0
- package/dist/shared/backgrounds/Glimmer.d.ts +18 -0
- package/dist/shared/backgrounds/Glimmer.js +38 -0
- package/dist/shared/backgrounds/backgroundGround.d.ts +5 -0
- package/dist/shared/backgrounds/backgroundGround.js +16 -0
- package/dist/shared/backgrounds/backgroundTypes.d.ts +38 -0
- package/dist/shared/backgrounds/backgroundTypes.js +20 -0
- package/dist/shared/backgrounds/canvasEffect.d.ts +51 -0
- package/dist/shared/backgrounds/canvasEffect.js +97 -0
- package/dist/shared/backgrounds/color.d.ts +56 -0
- package/dist/shared/backgrounds/color.js +153 -0
- package/dist/shared/backgrounds/cursorWavePool.d.ts +7 -0
- package/dist/shared/backgrounds/cursorWavePool.js +14 -0
- package/dist/shared/backgrounds/cursorWaveRenderer.d.ts +43 -0
- package/dist/shared/backgrounds/cursorWaveRenderer.js +146 -0
- package/dist/shared/backgrounds/dottedWavesRenderer.d.ts +72 -0
- package/dist/shared/backgrounds/dottedWavesRenderer.js +176 -0
- package/dist/shared/backgrounds/glimmerRenderer.d.ts +65 -0
- package/dist/shared/backgrounds/glimmerRenderer.js +254 -0
- package/dist/shared/backgrounds/index.d.ts +31 -0
- package/dist/shared/backgrounds/noise.d.ts +19 -0
- package/dist/shared/backgrounds/noise.js +143 -0
- package/dist/shared/backgrounds/originalPalettes.d.ts +36 -0
- package/dist/shared/backgrounds/originalPalettes.js +24 -0
- package/dist/shared/backgrounds/useBackgroundColors.d.ts +40 -0
- package/dist/shared/backgrounds/useBackgroundColors.js +165 -0
- package/dist/shared/backgrounds/useBackgroundPreference.d.ts +26 -0
- package/dist/shared/backgrounds/useBackgroundPreference.js +109 -0
- package/dist/shared/config/shellRoutes.js +7 -0
- package/dist/shared-assistant.js +79 -79
- package/dist/shared-backgrounds.d.ts +2 -0
- package/dist/shared-backgrounds.js +16 -0
- package/package.json +9 -1
|
@@ -3,51 +3,78 @@ import { useAssistantPageSurface as t } from "../ui/assistantPageSurface.js";
|
|
|
3
3
|
import { AssistantHomeNewChatContext as n, assistantHomeNewChat as r, useAssistantHomeStartChat as i } from "./assistantHomeChat.js";
|
|
4
4
|
import { useAssistantHomeChatShown as a, useAssistantHomePrompt as o, useAssistantHomeTab as s } from "./assistantHomeRoutes.js";
|
|
5
5
|
import { AssistantHomeActions as c, AssistantHomeActionsBar as l } from "./AssistantHomeActions.js";
|
|
6
|
-
import {
|
|
7
|
-
import { Fragment as
|
|
6
|
+
import { AssistantHomeBackdrop as u, AssistantHomeGlow as d, AssistantHomeHero as f, AssistantHomeRecentChats as p, AssistantHomeSections as m, AssistantHomeSuggestions as h } from "./AssistantHomeStart.js";
|
|
7
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
8
8
|
// src/shared/assistant/home/AssistantHomePage.tsx
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
let { tab:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
var y = "flex h-[calc(100dvh-7rem)] min-h-0 flex-col bg-bg-canvas md:h-dvh", b = "min-h-full bg-bg-canvas", x = "relative isolate [&_[data-assistant-page-hosted]]:bg-transparent", S = "[&_.boff-mesh-duo]:hidden";
|
|
10
|
+
function C({ chat: e, hero: c, history: d, actions: f, newChat: p = r, chatFrameClassName: m = y, background: h, backgroundGround: x }) {
|
|
11
|
+
let { tab: S } = s(), C = a(), { available: T } = t(), E = o(), D = S === "chat" && T && !(E && !C);
|
|
12
|
+
i(D && !C, p);
|
|
13
|
+
let O = D ? m : b, k = S === "history" ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(l, {
|
|
14
|
+
newChat: !0,
|
|
15
|
+
...f
|
|
16
|
+
}), d] }) : D ? e : c, { backdrop: A, ground: j, frameProps: M } = w(O, S === "chat" && !(D && C), h, x);
|
|
17
|
+
return /* @__PURE__ */ _(n.Provider, {
|
|
18
|
+
value: p,
|
|
19
|
+
children: /* @__PURE__ */ _("div", {
|
|
20
|
+
...M,
|
|
16
21
|
"data-testid": "assistant-home",
|
|
17
|
-
children:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}),
|
|
22
|
+
children: h === void 0 ? k : /* @__PURE__ */ v(g, { children: [A ? /* @__PURE__ */ _(u, {
|
|
23
|
+
ground: j,
|
|
24
|
+
children: h
|
|
25
|
+
}) : null, k] })
|
|
21
26
|
})
|
|
22
27
|
});
|
|
23
28
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
29
|
+
function w(e, t, n, r) {
|
|
30
|
+
let i = n != null && t;
|
|
31
|
+
if (!i) return {
|
|
32
|
+
backdrop: i,
|
|
33
|
+
ground: null,
|
|
34
|
+
frameProps: { className: e }
|
|
35
|
+
};
|
|
36
|
+
let a = `${e} ${x}`;
|
|
37
|
+
return r ? {
|
|
38
|
+
backdrop: i,
|
|
39
|
+
ground: r,
|
|
40
|
+
frameProps: {
|
|
41
|
+
className: `${a} ${S}`,
|
|
42
|
+
"data-assistant-home-ground": "",
|
|
43
|
+
style: { backgroundColor: r }
|
|
44
|
+
}
|
|
45
|
+
} : {
|
|
46
|
+
backdrop: i,
|
|
47
|
+
ground: null,
|
|
48
|
+
frameProps: { className: a }
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function T({ start: t, actions: n }) {
|
|
52
|
+
return /* @__PURE__ */ _("div", {
|
|
26
53
|
className: "flex h-full min-h-0 w-full flex-col",
|
|
27
54
|
"data-testid": "assistant-home-chat",
|
|
28
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ _(e, {
|
|
29
56
|
className: "min-h-0 flex-1",
|
|
30
57
|
start: {
|
|
31
|
-
above: /* @__PURE__ */
|
|
58
|
+
above: /* @__PURE__ */ v("div", {
|
|
32
59
|
className: "relative isolate w-full",
|
|
33
60
|
children: [
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ _(d, {}),
|
|
62
|
+
/* @__PURE__ */ _(l, { ...n }),
|
|
63
|
+
/* @__PURE__ */ _("div", {
|
|
37
64
|
className: "mx-auto flex w-full max-w-3xl flex-col items-center gap-6 px-4 pt-10 pb-6 md:pt-6",
|
|
38
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ _(f, { ...t.hero })
|
|
39
66
|
})
|
|
40
67
|
]
|
|
41
68
|
}),
|
|
42
|
-
below: /* @__PURE__ */
|
|
69
|
+
below: /* @__PURE__ */ v("div", {
|
|
43
70
|
className: "w-full",
|
|
44
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ v("div", {
|
|
45
72
|
className: "mx-auto flex w-full max-w-3xl flex-col items-center gap-6 px-4 pt-6 pb-12",
|
|
46
|
-
children: [/* @__PURE__ */
|
|
47
|
-
}), /* @__PURE__ */
|
|
73
|
+
children: [/* @__PURE__ */ _(h, { ...t.suggestions }), /* @__PURE__ */ _(p, { ...t.recentChats })]
|
|
74
|
+
}), /* @__PURE__ */ _(m, { ...t.sections })]
|
|
48
75
|
})
|
|
49
76
|
},
|
|
50
|
-
actions: /* @__PURE__ */
|
|
77
|
+
actions: /* @__PURE__ */ _(c, {
|
|
51
78
|
history: !0,
|
|
52
79
|
newChat: !0,
|
|
53
80
|
...n
|
|
@@ -56,23 +83,23 @@ function x({ start: t, actions: n }) {
|
|
|
56
83
|
})
|
|
57
84
|
});
|
|
58
85
|
}
|
|
59
|
-
function
|
|
60
|
-
return /* @__PURE__ */
|
|
86
|
+
function E({ start: e, actions: t, composer: n }) {
|
|
87
|
+
return /* @__PURE__ */ v("div", {
|
|
61
88
|
className: "relative isolate min-h-full",
|
|
62
89
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ _(d, {}),
|
|
91
|
+
/* @__PURE__ */ _(l, { ...t }),
|
|
92
|
+
/* @__PURE__ */ v("div", {
|
|
66
93
|
className: "mx-auto flex w-full max-w-3xl flex-col items-center gap-6 px-4 pt-10 pb-12 md:pt-6",
|
|
67
94
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ _(f, { ...e.hero }),
|
|
69
96
|
n,
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ _(h, { ...e.suggestions }),
|
|
98
|
+
/* @__PURE__ */ _(p, { ...e.recentChats })
|
|
72
99
|
]
|
|
73
100
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ _(m, { ...e.sections })
|
|
75
102
|
]
|
|
76
103
|
});
|
|
77
104
|
}
|
|
78
|
-
export {
|
|
105
|
+
export { x as ASSISTANT_HOME_BACKDROP_FRAME, y as ASSISTANT_HOME_CHAT_FRAME, S as ASSISTANT_HOME_GROUND_FRAME, b as ASSISTANT_HOME_PAGE_FRAME, E as AssistantHomeHeroChat, T as AssistantHomeInPageChat, C as AssistantHomePage };
|
|
@@ -16,6 +16,18 @@ declare const TILE_GLOW: {
|
|
|
16
16
|
* clips itself (no sideways scroll on a phone, in either reading direction).
|
|
17
17
|
*/
|
|
18
18
|
export declare function AssistantHomeGlow(): import('react').JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* BOFF-15169: a page background behind the start page (say, an animated one from
|
|
21
|
+
* `@burdenoff/fe-libs/shared/backgrounds`), with a veil behind the greeting and the message box
|
|
22
|
+
* that keeps them readable. It fills the page's frame (`ASSISTANT_HOME_BACKDROP_FRAME`), at most
|
|
23
|
+
* one screen tall, behind everything on it, and takes no pointer events. Decorative: hidden from
|
|
24
|
+
* screen readers. `ground`: the opaque ground the page paints behind it, which the veil then takes
|
|
25
|
+
* in place of the canvas (only the veil reads the canvas token here).
|
|
26
|
+
*/
|
|
27
|
+
export declare function AssistantHomeBackdrop({ children, ground, }: {
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
ground?: string | null;
|
|
30
|
+
}): import('react').JSX.Element;
|
|
19
31
|
export interface AssistantHomeHeroContent {
|
|
20
32
|
/** The badge over the greeting (say, the assistant's name). */
|
|
21
33
|
chip: string;
|
|
@@ -19,7 +19,16 @@ function g() {
|
|
|
19
19
|
children: /* @__PURE__ */ a("div", { className: "absolute -inset-x-[14%] inset-y-0 boff-mesh-duo" })
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
function _({
|
|
22
|
+
function _({ children: e, ground: t = null }) {
|
|
23
|
+
return /* @__PURE__ */ o("div", {
|
|
24
|
+
"aria-hidden": "true",
|
|
25
|
+
className: "pointer-events-none absolute inset-x-0 top-0 -z-10 h-full max-h-dvh overflow-hidden",
|
|
26
|
+
"data-testid": "assistant-home-backdrop",
|
|
27
|
+
style: t ? { "--color-bg-canvas": t } : void 0,
|
|
28
|
+
children: [e, /* @__PURE__ */ a("div", { className: "absolute inset-0 bg-radial-[ellipse_64%_74%_at_50%_40%] from-bg-canvas/90 via-bg-canvas/60 to-transparent" })]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function v({ chip: e, heading: t, subtitle: n }) {
|
|
23
32
|
return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("span", {
|
|
24
33
|
className: "inline-flex items-center gap-2 rounded-pill border border-border-subtle bg-bg-elevated px-3 py-1 text-body-sm font-medium text-text-primary boff-glow-pill boff-rise",
|
|
25
34
|
children: [/* @__PURE__ */ a(r, {
|
|
@@ -37,7 +46,7 @@ function _({ chip: e, heading: t, subtitle: n }) {
|
|
|
37
46
|
})]
|
|
38
47
|
})] });
|
|
39
48
|
}
|
|
40
|
-
function
|
|
49
|
+
function y({ label: e, items: t }) {
|
|
41
50
|
return /* @__PURE__ */ a("ul", {
|
|
42
51
|
"aria-label": e,
|
|
43
52
|
className: "flex w-full flex-col gap-2 md:flex-row md:flex-wrap md:justify-center boff-rise boff-delay-4",
|
|
@@ -59,7 +68,7 @@ function v({ label: e, items: t }) {
|
|
|
59
68
|
})
|
|
60
69
|
});
|
|
61
70
|
}
|
|
62
|
-
function
|
|
71
|
+
function b({ title: e, viewAllLabel: t, untitledLabel: r, rows: i, onOpen: s, onViewAll: c }) {
|
|
63
72
|
let l = [...i].sort((e, t) => t.updatedAt.localeCompare(e.updatedAt)).slice(0, 3);
|
|
64
73
|
return l.length === 0 ? null : /* @__PURE__ */ o("section", {
|
|
65
74
|
"aria-labelledby": "assistant-home-recent",
|
|
@@ -99,7 +108,7 @@ function y({ title: e, viewAllLabel: t, untitledLabel: r, rows: i, onOpen: s, on
|
|
|
99
108
|
})]
|
|
100
109
|
});
|
|
101
110
|
}
|
|
102
|
-
function
|
|
111
|
+
function x({ icon: e, title: t, body: n, onSelect: r, tile: i }) {
|
|
103
112
|
return /* @__PURE__ */ o("button", {
|
|
104
113
|
type: "button",
|
|
105
114
|
onClick: r,
|
|
@@ -119,10 +128,10 @@ function b({ icon: e, title: t, body: n, onSelect: r, tile: i }) {
|
|
|
119
128
|
})]
|
|
120
129
|
});
|
|
121
130
|
}
|
|
122
|
-
function
|
|
131
|
+
function S(e) {
|
|
123
132
|
return "items" in e;
|
|
124
133
|
}
|
|
125
|
-
function
|
|
134
|
+
function C({ section: e }) {
|
|
126
135
|
let { key: t, title: n, icon: r, action: i, columns: c, items: l } = e;
|
|
127
136
|
if (l.length === 0) return null;
|
|
128
137
|
let u = `assistant-home-${t}`;
|
|
@@ -149,20 +158,20 @@ function S({ section: e }) {
|
|
|
149
158
|
})]
|
|
150
159
|
});
|
|
151
160
|
}
|
|
152
|
-
function
|
|
161
|
+
function w({ startCards: t, sections: n = [] }) {
|
|
153
162
|
return /* @__PURE__ */ o("div", {
|
|
154
163
|
className: "mx-auto hidden w-full max-w-4xl flex-col gap-8 px-4 pb-16 md:flex",
|
|
155
164
|
children: [t && t.length > 0 ? /* @__PURE__ */ a("ul", {
|
|
156
165
|
className: "grid grid-cols-3 gap-3",
|
|
157
166
|
children: t.map(({ key: e, ...t }, n) => /* @__PURE__ */ a("li", {
|
|
158
167
|
className: `boff-rise ${h[Math.min(n, h.length - 1)]}`,
|
|
159
|
-
children: /* @__PURE__ */ a(
|
|
168
|
+
children: /* @__PURE__ */ a(x, { ...t })
|
|
160
169
|
}, e))
|
|
161
|
-
}) : null, n.map((t) =>
|
|
170
|
+
}) : null, n.map((t) => S(t) ? /* @__PURE__ */ a(C, { section: t }, t.key) : /* @__PURE__ */ a(e, { children: t.content }, t.key))]
|
|
162
171
|
});
|
|
163
172
|
}
|
|
164
|
-
var
|
|
165
|
-
function
|
|
173
|
+
var T = (e, t) => t === void 0 || t === e ? void 0 : t;
|
|
174
|
+
function E({ tone: e, icon: n, title: r, titleInFull: l, body: p, bodyInFull: m, bodyClamp: h = !1, actionLabel: g, href: _, onSelect: v }) {
|
|
166
175
|
let y = /* @__PURE__ */ o(i, { children: [
|
|
167
176
|
/* @__PURE__ */ a("span", {
|
|
168
177
|
className: e === "danger" ? u : f.glow,
|
|
@@ -172,11 +181,11 @@ function T({ tone: e, icon: n, title: r, titleInFull: l, body: p, bodyInFull: m,
|
|
|
172
181
|
className: "flex min-w-0 flex-1 flex-col",
|
|
173
182
|
children: [/* @__PURE__ */ a("span", {
|
|
174
183
|
className: "line-clamp-2 text-body-sm font-semibold text-text-primary",
|
|
175
|
-
title:
|
|
184
|
+
title: T(r, l),
|
|
176
185
|
children: r
|
|
177
186
|
}), /* @__PURE__ */ a("span", {
|
|
178
187
|
className: h ? "line-clamp-2 text-body-sm text-text-secondary" : "text-body-sm text-text-secondary",
|
|
179
|
-
title:
|
|
188
|
+
title: T(p, m),
|
|
180
189
|
children: p
|
|
181
190
|
})]
|
|
182
191
|
}),
|
|
@@ -199,7 +208,7 @@ function T({ tone: e, icon: n, title: r, titleInFull: l, body: p, bodyInFull: m,
|
|
|
199
208
|
children: y
|
|
200
209
|
});
|
|
201
210
|
}
|
|
202
|
-
function
|
|
211
|
+
function D({ href: e, icon: t, badge: n, title: r, meta: i }) {
|
|
203
212
|
return /* @__PURE__ */ o(s, {
|
|
204
213
|
to: e,
|
|
205
214
|
className: `${c} flex h-full flex-col gap-3`,
|
|
@@ -221,4 +230,4 @@ function E({ href: e, icon: t, badge: n, title: r, meta: i }) {
|
|
|
221
230
|
})]
|
|
222
231
|
});
|
|
223
232
|
}
|
|
224
|
-
export {
|
|
233
|
+
export { E as AssistantHomeAttentionCard, _ as AssistantHomeBackdrop, D as AssistantHomeContinueCard, g as AssistantHomeGlow, v as AssistantHomeHero, b as AssistantHomeRecentChats, C as AssistantHomeSection, w as AssistantHomeSections, x as AssistantHomeStartCardButton, y as AssistantHomeSuggestions };
|
|
@@ -4,8 +4,8 @@ import { AssistantHomeNewChatContext as _, assistantHomeNewChat as v, assistantH
|
|
|
4
4
|
import { ASSISTANT_HOME_HISTORY_ENGINE_FILTERS as C, ASSISTANT_HOME_HISTORY_GROUPS as w, assistantHomeHistoryEngineFilterOf as T, assistantHomeHistoryGroupOf as E, assistantHomeHistoryRowOf as D, assistantHomeHistoryTimeLabel as O, assistantHomeLastReplyLink as k, groupAssistantHomeHistoryRows as A, isAssistantHomeHistoryEngineFilter as j, matchesAssistantHomeHistoryKind as M, matchesAssistantHomeHistoryQuery as N } from "./home/assistantHomeHistoryRows.js";
|
|
5
5
|
import { useAssistantHomeHistoryRows as P } from "./home/useAssistantHomeHistoryRows.js";
|
|
6
6
|
import { AssistantHomeActions as F, AssistantHomeActionsBar as I } from "./home/AssistantHomeActions.js";
|
|
7
|
-
import { AssistantHomeAttentionCard as L,
|
|
8
|
-
import { AssistantHomeComposer as
|
|
9
|
-
import { AssistantHomeHistory as
|
|
10
|
-
import { ASSISTANT_HOME_CHAT_FRAME as
|
|
11
|
-
export {
|
|
7
|
+
import { AssistantHomeAttentionCard as L, AssistantHomeBackdrop as R, AssistantHomeContinueCard as z, AssistantHomeGlow as B, AssistantHomeHero as V, AssistantHomeRecentChats as H, AssistantHomeSection as U, AssistantHomeSections as W, AssistantHomeStartCardButton as G, AssistantHomeSuggestions as K } from "./home/AssistantHomeStart.js";
|
|
8
|
+
import { AssistantHomeComposer as q } from "./home/AssistantHomeComposer.js";
|
|
9
|
+
import { AssistantHomeHistory as J } from "./home/AssistantHomeHistory.js";
|
|
10
|
+
import { ASSISTANT_HOME_BACKDROP_FRAME as Y, ASSISTANT_HOME_CHAT_FRAME as X, ASSISTANT_HOME_GROUND_FRAME as Z, ASSISTANT_HOME_PAGE_FRAME as Q, AssistantHomeHeroChat as $, AssistantHomeInPageChat as ee, AssistantHomePage as te } from "./home/AssistantHomePage.js";
|
|
11
|
+
export { Y as ASSISTANT_HOME_BACKDROP_FRAME, X as ASSISTANT_HOME_CHAT_FRAME, e as ASSISTANT_HOME_CHAT_PARAM, Z as ASSISTANT_HOME_GROUND_FRAME, C as ASSISTANT_HOME_HISTORY_ENGINE_FILTERS, w as ASSISTANT_HOME_HISTORY_GROUPS, Q as ASSISTANT_HOME_PAGE_FRAME, t as ASSISTANT_HOME_PATH, n as ASSISTANT_HOME_PROMPT_MAX, r as ASSISTANT_HOME_PROMPT_PARAM, i as ASSISTANT_HOME_TABS, a as ASSISTANT_HOME_TAB_PARAM, F as AssistantHomeActions, I as AssistantHomeActionsBar, L as AssistantHomeAttentionCard, R as AssistantHomeBackdrop, q as AssistantHomeComposer, z as AssistantHomeContinueCard, B as AssistantHomeGlow, V as AssistantHomeHero, $ as AssistantHomeHeroChat, J as AssistantHomeHistory, ee as AssistantHomeInPageChat, _ as AssistantHomeNewChatContext, te as AssistantHomePage, H as AssistantHomeRecentChats, U as AssistantHomeSection, W as AssistantHomeSections, G as AssistantHomeStartCardButton, K as AssistantHomeSuggestions, o as assistantHomeChatHref, h as assistantHomeHidesDesktopTopBar, T as assistantHomeHistoryEngineFilterOf, E as assistantHomeHistoryGroupOf, D as assistantHomeHistoryRowOf, O as assistantHomeHistoryTimeLabel, s as assistantHomeHref, k as assistantHomeLastReplyLink, v as assistantHomeNewChat, y as assistantHomeOpenChatIsNew, c as assistantHomePromptHref, b as assistantHomeReusableOpenChat, A as groupAssistantHomeHistoryRows, j as isAssistantHomeHistoryEngineFilter, l as isAssistantHomePath, M as matchesAssistantHomeHistoryKind, N as matchesAssistantHomeHistoryQuery, u as parseAssistantHomePrompt, d as parseAssistantHomeTab, f as useAssistantHomeChatShown, g as useAssistantHomeHidesDesktopTopBar, P as useAssistantHomeHistoryRows, x as useAssistantHomeNewChat, p as useAssistantHomePrompt, S as useAssistantHomeStartChat, m as useAssistantHomeTab };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BackgroundColorMode, BackgroundCommonProps, BackgroundEffectName } from './backgroundTypes';
|
|
2
|
+
export interface BackgroundEffectProps extends BackgroundCommonProps {
|
|
3
|
+
effect: BackgroundEffectName;
|
|
4
|
+
/** Where the colours come from (default `accent`). */
|
|
5
|
+
colors?: BackgroundColorMode;
|
|
6
|
+
}
|
|
7
|
+
export declare function BackgroundEffect({ effect, colors, strength, backgroundColor, ...rest }: BackgroundEffectProps): import('react').JSX.Element | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useBackgroundGround as e } from "./backgroundGround.js";
|
|
2
|
+
import { CursorWave as t } from "./CursorWave.js";
|
|
3
|
+
import { DottedWaves as n } from "./DottedWaves.js";
|
|
4
|
+
import { Glimmer as r } from "./Glimmer.js";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
// src/shared/backgrounds/BackgroundEffect.tsx
|
|
7
|
+
function a({ effect: a, colors: o = "accent", strength: s = "subtle", backgroundColor: c, ...l }) {
|
|
8
|
+
let u = e(a, o), d = {
|
|
9
|
+
colors: o,
|
|
10
|
+
strength: s,
|
|
11
|
+
backgroundColor: c ?? u ?? void 0
|
|
12
|
+
};
|
|
13
|
+
return a === "dotted-waves" ? /* @__PURE__ */ i(n, {
|
|
14
|
+
...d,
|
|
15
|
+
...l
|
|
16
|
+
}) : a === "glimmer" ? /* @__PURE__ */ i(r, {
|
|
17
|
+
...d,
|
|
18
|
+
...l
|
|
19
|
+
}) : a === "cursor-wave" ? /* @__PURE__ */ i(t, {
|
|
20
|
+
...d,
|
|
21
|
+
...l
|
|
22
|
+
}) : null;
|
|
23
|
+
}
|
|
24
|
+
export { a as BackgroundEffect };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { KeyboardEvent, ReactNode } from 'react';
|
|
2
|
+
import { BackgroundColorMode, BackgroundEffectName, BackgroundStrength } from './backgroundTypes';
|
|
3
|
+
/**
|
|
4
|
+
* Roving focus for a radio group: the chosen option is the group's one tab stop; arrows,
|
|
5
|
+
* Home and End move the choice and the focus together.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useRovingRadio<T extends string>(values: readonly T[], value: T, onChange: (next: T) => void): {
|
|
8
|
+
itemProps: (option: T) => {
|
|
9
|
+
tabIndex: number;
|
|
10
|
+
ref: (element: HTMLElement | null) => void;
|
|
11
|
+
onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export interface BackgroundPickerProps {
|
|
16
|
+
/** The chosen effect. */
|
|
17
|
+
value: BackgroundEffectName;
|
|
18
|
+
onChange: (effect: BackgroundEffectName) => void;
|
|
19
|
+
/** The group's accessible name (translated). */
|
|
20
|
+
label: string;
|
|
21
|
+
/** Each option's name (translated). */
|
|
22
|
+
labels: Readonly<Record<BackgroundEffectName, string>>;
|
|
23
|
+
/** The previews' colours (the person's current choice; default `accent`). */
|
|
24
|
+
colors?: BackgroundColorMode;
|
|
25
|
+
/** The previews' strength (the person's current choice; default `subtle`). */
|
|
26
|
+
strength?: BackgroundStrength;
|
|
27
|
+
/** The effects offered, in order (default all). */
|
|
28
|
+
effects?: readonly BackgroundEffectName[];
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/** The effects as tiles with live previews; a radio group. */
|
|
32
|
+
export declare function BackgroundPicker({ value, onChange, label, labels, colors, strength, effects, className, }: BackgroundPickerProps): import('react').JSX.Element;
|
|
33
|
+
export interface BackgroundOption<T extends string> {
|
|
34
|
+
value: T;
|
|
35
|
+
/** Translated. */
|
|
36
|
+
label: string;
|
|
37
|
+
/** Optional leading content (say, a swatch). */
|
|
38
|
+
icon?: ReactNode;
|
|
39
|
+
}
|
|
40
|
+
export interface BackgroundOptionGroupProps<T extends string> {
|
|
41
|
+
value: T;
|
|
42
|
+
onChange: (value: T) => void;
|
|
43
|
+
/** The group's accessible name (translated). */
|
|
44
|
+
label: string;
|
|
45
|
+
options: readonly BackgroundOption<T>[];
|
|
46
|
+
className?: string;
|
|
47
|
+
}
|
|
48
|
+
/** A segmented radio group (the colours, the strength). */
|
|
49
|
+
export declare function BackgroundOptionGroup<T extends string>({ value, onChange, label, options, className, }: BackgroundOptionGroupProps<T>): import('react').JSX.Element;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { cn as e } from "../../shared-utils.js";
|
|
2
|
+
import { useBackgroundGround as t } from "./backgroundGround.js";
|
|
3
|
+
import { BACKGROUND_EFFECTS as n } from "./backgroundTypes.js";
|
|
4
|
+
import { CursorWave as r } from "./CursorWave.js";
|
|
5
|
+
import { DottedWaves as i } from "./DottedWaves.js";
|
|
6
|
+
import { Glimmer as a } from "./Glimmer.js";
|
|
7
|
+
import { usePrefersReducedMotion as o } from "../assistant/ui/usePrefersReducedMotion.js";
|
|
8
|
+
import { useCallback as s, useEffect as c, useRef as l } from "react";
|
|
9
|
+
import { Check as u } from "lucide-react";
|
|
10
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
|
+
// src/shared/backgrounds/BackgroundPicker.tsx
|
|
12
|
+
var p = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas";
|
|
13
|
+
function m(e, t, n) {
|
|
14
|
+
let r = l(/* @__PURE__ */ new Map()), i = e.includes(t) ? t : e[0], a = s((t, i) => {
|
|
15
|
+
let a = e.indexOf(t), o = i === "first" ? e[0] : i === "last" ? e[e.length - 1] : e[(a + i + e.length) % e.length];
|
|
16
|
+
o !== void 0 && (n(o), r.current.get(o)?.focus());
|
|
17
|
+
}, [e, n]);
|
|
18
|
+
return { itemProps: s((e) => ({
|
|
19
|
+
tabIndex: e === i ? 0 : -1,
|
|
20
|
+
ref: (t) => {
|
|
21
|
+
t ? r.current.set(e, t) : r.current.delete(e);
|
|
22
|
+
},
|
|
23
|
+
onClick: () => n(e),
|
|
24
|
+
onKeyDown: (t) => {
|
|
25
|
+
let r = typeof getComputedStyle == "function" && getComputedStyle(t.currentTarget).direction === "rtl", i = r ? "ArrowLeft" : "ArrowRight", o = r ? "ArrowRight" : "ArrowLeft";
|
|
26
|
+
if (t.key === i || t.key === "ArrowDown") a(e, 1);
|
|
27
|
+
else if (t.key === o || t.key === "ArrowUp") a(e, -1);
|
|
28
|
+
else if (t.key === "Home") a(e, "first");
|
|
29
|
+
else if (t.key === "End") a(e, "last");
|
|
30
|
+
else if (t.key === " " || t.key === "Enter") n(e);
|
|
31
|
+
else return;
|
|
32
|
+
t.preventDefault();
|
|
33
|
+
}
|
|
34
|
+
}), [
|
|
35
|
+
i,
|
|
36
|
+
a,
|
|
37
|
+
n
|
|
38
|
+
]) };
|
|
39
|
+
}
|
|
40
|
+
function h({ effect: e, colors: n, strength: s }) {
|
|
41
|
+
let u = l(null), f = o(), p = t(e, n) ?? void 0;
|
|
42
|
+
return c(() => {
|
|
43
|
+
if (e !== "cursor-wave" || f) return;
|
|
44
|
+
let t = window.setTimeout(() => u.current?.burst(), 400), n = window.setInterval(() => u.current?.burst(), 3200);
|
|
45
|
+
return () => {
|
|
46
|
+
window.clearTimeout(t), window.clearInterval(n);
|
|
47
|
+
};
|
|
48
|
+
}, [e, f]), e === "dotted-waves" ? /* @__PURE__ */ d(i, {
|
|
49
|
+
colors: n,
|
|
50
|
+
strength: s,
|
|
51
|
+
backgroundColor: p,
|
|
52
|
+
interactive: !1,
|
|
53
|
+
spacing: 9,
|
|
54
|
+
size: 1.9,
|
|
55
|
+
jump: 2
|
|
56
|
+
}) : e === "glimmer" ? /* @__PURE__ */ d(a, {
|
|
57
|
+
colors: n,
|
|
58
|
+
strength: s,
|
|
59
|
+
backgroundColor: p,
|
|
60
|
+
count: 420,
|
|
61
|
+
size: 1.1,
|
|
62
|
+
parallax: 0,
|
|
63
|
+
boost: 1,
|
|
64
|
+
waves: !1
|
|
65
|
+
}) : e === "cursor-wave" ? /* @__PURE__ */ d(r, {
|
|
66
|
+
ref: u,
|
|
67
|
+
colors: n,
|
|
68
|
+
strength: s,
|
|
69
|
+
backgroundColor: p,
|
|
70
|
+
cellSize: 16,
|
|
71
|
+
idleScale: .16,
|
|
72
|
+
burstSpeed: 260,
|
|
73
|
+
burstThickness: 60
|
|
74
|
+
}) : null;
|
|
75
|
+
}
|
|
76
|
+
function g({ value: t, onChange: r, label: i, labels: a, colors: o = "accent", strength: s = "subtle", effects: c = n, className: l }) {
|
|
77
|
+
let { itemProps: g } = m(c, t, r);
|
|
78
|
+
return /* @__PURE__ */ d("div", {
|
|
79
|
+
role: "radiogroup",
|
|
80
|
+
"aria-label": i,
|
|
81
|
+
className: e("grid grid-cols-2 gap-3 sm:grid-cols-4", l),
|
|
82
|
+
"data-testid": "background-picker",
|
|
83
|
+
children: c.map((n) => {
|
|
84
|
+
let r = n === t;
|
|
85
|
+
return /* @__PURE__ */ f("button", {
|
|
86
|
+
type: "button",
|
|
87
|
+
role: "radio",
|
|
88
|
+
"aria-checked": r,
|
|
89
|
+
"data-effect": n,
|
|
90
|
+
...g(n),
|
|
91
|
+
className: e("group flex flex-col gap-2 rounded-card border p-2 text-start transition-colors", p, r ? "border-border-focus bg-accent-soft" : "border-border-default bg-bg-surface hover:border-border-strong hover:bg-bg-sunken"),
|
|
92
|
+
children: [/* @__PURE__ */ d("span", {
|
|
93
|
+
"aria-hidden": "true",
|
|
94
|
+
className: "relative block h-16 w-full overflow-hidden rounded-button border border-border-seam bg-bg-canvas",
|
|
95
|
+
children: /* @__PURE__ */ d(h, {
|
|
96
|
+
effect: n,
|
|
97
|
+
colors: o,
|
|
98
|
+
strength: s
|
|
99
|
+
})
|
|
100
|
+
}), /* @__PURE__ */ f("span", {
|
|
101
|
+
className: "flex items-center justify-between gap-1",
|
|
102
|
+
children: [/* @__PURE__ */ d("span", {
|
|
103
|
+
className: "truncate text-xs font-medium text-text-primary",
|
|
104
|
+
children: a[n]
|
|
105
|
+
}), r ? /* @__PURE__ */ d(u, {
|
|
106
|
+
className: "size-3.5 shrink-0 text-action-primary-bg",
|
|
107
|
+
"aria-hidden": "true"
|
|
108
|
+
}) : null]
|
|
109
|
+
})]
|
|
110
|
+
}, n);
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function _({ value: t, onChange: n, label: r, options: i, className: a }) {
|
|
115
|
+
let { itemProps: o } = m(i.map((e) => e.value), t, n);
|
|
116
|
+
return /* @__PURE__ */ d("div", {
|
|
117
|
+
role: "radiogroup",
|
|
118
|
+
"aria-label": r,
|
|
119
|
+
className: e("inline-flex w-full flex-col gap-1 rounded-button border border-border-default bg-bg-sunken p-1 sm:w-auto sm:flex-row", a),
|
|
120
|
+
children: i.map((n) => {
|
|
121
|
+
let r = n.value === t;
|
|
122
|
+
return /* @__PURE__ */ f("button", {
|
|
123
|
+
type: "button",
|
|
124
|
+
role: "radio",
|
|
125
|
+
"aria-checked": r,
|
|
126
|
+
...o(n.value),
|
|
127
|
+
className: e("flex flex-1 items-center justify-center gap-2 rounded-button px-4 py-1.5 text-sm font-medium transition-colors", p, r ? "bg-bg-surface text-text-primary shadow-elevation-1" : "text-text-secondary hover:text-text-primary"),
|
|
128
|
+
children: [n.icon, n.label]
|
|
129
|
+
}, n.value);
|
|
130
|
+
})
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
export { _ as BackgroundOptionGroup, g as BackgroundPicker, m as useRovingRadio };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode, RefObject } from 'react';
|
|
2
|
+
import { BackgroundStrength } from './backgroundTypes';
|
|
3
|
+
export interface BackgroundRootProps {
|
|
4
|
+
/** The effect's name, on the root (`data-background-effect`). */
|
|
5
|
+
effect: string;
|
|
6
|
+
canvasRef: RefObject<HTMLCanvasElement | null>;
|
|
7
|
+
strength: BackgroundStrength;
|
|
8
|
+
backgroundColor: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function BackgroundRoot({ effect, canvasRef, strength, backgroundColor, className, style, children, }: BackgroundRootProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BACKGROUND_STRENGTH_OPACITY as e } from "./backgroundTypes.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
// src/shared/backgrounds/BackgroundRoot.tsx
|
|
4
|
+
var r = {
|
|
5
|
+
position: "relative",
|
|
6
|
+
width: "100%",
|
|
7
|
+
height: "100%",
|
|
8
|
+
overflow: "hidden",
|
|
9
|
+
pointerEvents: "none"
|
|
10
|
+
}, i = {
|
|
11
|
+
position: "absolute",
|
|
12
|
+
inset: 0,
|
|
13
|
+
width: "100%",
|
|
14
|
+
height: "100%",
|
|
15
|
+
display: "block"
|
|
16
|
+
}, a = {
|
|
17
|
+
position: "relative",
|
|
18
|
+
width: "100%",
|
|
19
|
+
height: "100%",
|
|
20
|
+
pointerEvents: "auto"
|
|
21
|
+
};
|
|
22
|
+
function o({ effect: o, canvasRef: s, strength: c, backgroundColor: l, className: u, style: d, children: f }) {
|
|
23
|
+
return /* @__PURE__ */ n("div", {
|
|
24
|
+
className: u,
|
|
25
|
+
style: {
|
|
26
|
+
...r,
|
|
27
|
+
backgroundColor: l,
|
|
28
|
+
...d
|
|
29
|
+
},
|
|
30
|
+
"data-background-effect": o,
|
|
31
|
+
children: [/* @__PURE__ */ t("canvas", {
|
|
32
|
+
ref: s,
|
|
33
|
+
"aria-hidden": "true",
|
|
34
|
+
style: {
|
|
35
|
+
...i,
|
|
36
|
+
opacity: e[c]
|
|
37
|
+
}
|
|
38
|
+
}), f == null ? null : /* @__PURE__ */ t("div", {
|
|
39
|
+
style: a,
|
|
40
|
+
children: f
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
export { o as BackgroundRoot };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Ref } from 'react';
|
|
2
|
+
import { BackgroundColorMode, BackgroundCommonProps } from './backgroundTypes';
|
|
3
|
+
import { CursorWaveColorInput } from './cursorWavePool';
|
|
4
|
+
import { CursorWaveParams } from './cursorWaveRenderer';
|
|
5
|
+
/** What a ref to `CursorWave` can do. */
|
|
6
|
+
export interface CursorWaveHandle {
|
|
7
|
+
/** Rolls a ring out from (x, y), fractions of the frame (the centre by default). */
|
|
8
|
+
burst(x?: number, y?: number): void;
|
|
9
|
+
}
|
|
10
|
+
export interface CursorWaveProps extends Partial<CursorWaveParams>, BackgroundCommonProps {
|
|
11
|
+
/** A colour mode (`original` by default), or the pool of colours and gradients. */
|
|
12
|
+
colors?: BackgroundColorMode | readonly CursorWaveColorInput[];
|
|
13
|
+
/** Container width (default 100%). */
|
|
14
|
+
width?: string | number;
|
|
15
|
+
/** Container height (default 100%). */
|
|
16
|
+
height?: string | number;
|
|
17
|
+
ref?: Ref<CursorWaveHandle>;
|
|
18
|
+
}
|
|
19
|
+
export declare function CursorWave({ colors, strength, backgroundColor, paused, dpr, width, height, className, style, children, ref, ...params }: CursorWaveProps): import('react').JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { usePrefersReducedMotion as e } from "../assistant/ui/usePrefersReducedMotion.js";
|
|
2
|
+
import { BackgroundRoot as t } from "./BackgroundRoot.js";
|
|
3
|
+
import "./backgroundTypes.js";
|
|
4
|
+
import { useCanvasEffect as n, useHostPointer as r } from "./canvasEffect.js";
|
|
5
|
+
import { explicitPool as i } from "./cursorWavePool.js";
|
|
6
|
+
import { CURSOR_WAVE_DEFAULTS as a, createCursorWaveRenderer as o } from "./cursorWaveRenderer.js";
|
|
7
|
+
import { useBackgroundColors as s } from "./useBackgroundColors.js";
|
|
8
|
+
import { useEffect as c, useImperativeHandle as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
9
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
10
|
+
// src/shared/backgrounds/CursorWave.tsx
|
|
11
|
+
function m({ colors: m = "original", strength: h = "bold", backgroundColor: g = "transparent", paused: _ = !1, dpr: v = 2, width: y, height: b, className: x, style: S, children: C, ref: w, ...T }) {
|
|
12
|
+
let E = s(typeof m == "string" ? m : "original", g), D = typeof m == "string" ? null : JSON.stringify(m), O = u(() => D === null ? null : i(JSON.parse(D)), [D]) ?? E.cursorWave, k = JSON.stringify(T), A = u(() => ({
|
|
13
|
+
...a,
|
|
14
|
+
...JSON.parse(k),
|
|
15
|
+
colors: O
|
|
16
|
+
}), [k, O]), [j] = f(() => o(A));
|
|
17
|
+
c(() => j.update(A), [j, A]);
|
|
18
|
+
let M = e() || _, N = d(null);
|
|
19
|
+
n(N, j, {
|
|
20
|
+
maxPixelRatio: v,
|
|
21
|
+
still: M,
|
|
22
|
+
stillTime: 0,
|
|
23
|
+
revision: M ? A : null
|
|
24
|
+
}), r(N, j, !M), l(w, () => ({ burst: (e, t) => j.burst(e, t) }), [j]);
|
|
25
|
+
let P = y !== void 0 || b !== void 0 ? {
|
|
26
|
+
width: y ?? "100%",
|
|
27
|
+
height: b ?? "100%",
|
|
28
|
+
...S
|
|
29
|
+
} : S;
|
|
30
|
+
return /* @__PURE__ */ p(t, {
|
|
31
|
+
effect: "cursor-wave",
|
|
32
|
+
canvasRef: N,
|
|
33
|
+
strength: h,
|
|
34
|
+
backgroundColor: g,
|
|
35
|
+
className: x,
|
|
36
|
+
style: P,
|
|
37
|
+
children: C
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export { m as CursorWave };
|