@burdenoff/fe-libs 2026.1017.12 → 2026.1019.1
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/chrome/AccountSwitcher.js +90 -89
- package/dist/chrome/Breadcrumbs.js +1 -1
- package/dist/chrome/CommandPalette.js +91 -90
- package/dist/chrome/Footer.js +31 -8
- package/dist/chrome/GlobalSearch.js +78 -77
- package/dist/chrome/HeaderBar.js +1 -1
- package/dist/chrome/HeaderThemeSwitcher.js +48 -47
- package/dist/chrome/LanguagePickerSheet.js +23 -22
- package/dist/chrome/NavCustomizeDialog.d.ts +0 -14
- package/dist/chrome/NavCustomizeDialog.js +114 -122
- package/dist/chrome/PanelTabs.js +45 -41
- package/dist/chrome/PersonaSurfaceControls.d.ts +0 -17
- package/dist/chrome/PersonaSurfaceControls.js +115 -118
- package/dist/chrome/PluginSettingsPage.js +29 -28
- package/dist/chrome/PluginWidgetGrid.js +19 -18
- package/dist/chrome/ProductPickerSheet.js +44 -47
- package/dist/chrome/ProductSwitcher.js +2 -6
- package/dist/chrome/ProfileSwitcher.js +6 -10
- package/dist/chrome/ShortcutHelpDialog.js +60 -65
- package/dist/chrome/SideNavigation.js +2 -2
- package/dist/chrome/Sidebar.js +44 -43
- package/dist/chrome/ThemePreferences.js +289 -267
- package/dist/chrome/contextSwitcher/EmptyState.js +31 -27
- package/dist/chrome/contextSwitcher/OrganizationList.js +40 -30
- package/dist/chrome/contextSwitcher/ProjectList.js +48 -44
- package/dist/chrome/contextSwitcher/SearchInput.js +44 -40
- package/dist/chrome/contextSwitcher/TriggerButton.js +2 -2
- package/dist/chrome/contextSwitcher/WorkspaceList.js +36 -32
- package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +128 -126
- package/dist/chrome/globalSearch/ResultsList.js +25 -27
- package/dist/chrome/globalSearch/SearchInput.js +16 -14
- package/dist/chrome/notificationCenter/NotificationCardItem.js +58 -47
- package/dist/chrome/notificationCenter/NotificationFilters.js +76 -62
- package/dist/chrome/notificationCenter/NotificationFooter.js +21 -21
- package/dist/chrome/notificationCenter/NotificationHeader.js +67 -63
- package/dist/chrome/notificationCenter/NotificationList.js +75 -71
- package/dist/chrome/notificationCenter/NotificationPanel.js +37 -33
- package/dist/chrome/notificationCenter/PushOptInToggle.js +33 -32
- package/dist/chrome/notificationCenter/constants.d.ts +6 -1
- package/dist/chrome/notificationCenter/constants.js +12 -11
- package/dist/chrome/useThemeOptionLabels.d.ts +33 -0
- package/dist/chrome/useThemeOptionLabels.js +39 -0
- package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts +6 -6
- package/dist/shared/assistant/ui/AssistantMarkdownRenderer.js +86 -85
- package/dist/shared/assistant/ui/AssistantMessageItem.js +101 -96
- package/dist/shared/assistant/ui/WorkflowAssistantPanel.js +152 -140
- package/dist/shared/events/sinks/RybbitSink.js +2 -2
- package/dist/shared/providers/shell/authProvider/useAuthActions.d.ts +19 -0
- package/dist/shared/providers/shell/authProvider/useAuthActions.js +97 -91
- package/dist/shared/providers/shell/interpolateShellLabel.d.ts +3 -0
- package/dist/shared/providers/shell/interpolateShellLabel.js +11 -0
- package/dist/shared/providers/shell/useAssistantShellLabels.d.ts +45 -0
- package/dist/shared/providers/shell/useAssistantShellLabels.js +54 -0
- package/dist/shared/tours/TourPlayer.js +33 -32
- package/dist/shared/tours/TourTooltip.js +108 -109
- package/dist/shared/tours/tourTrigger/MobileTourSheet.js +98 -85
- package/dist/shared/tours/tourTrigger/TourListItemDesktop.js +20 -18
- package/dist/shared/tours/tourTrigger/TourListItemMobile.js +23 -25
- package/package.json +3 -3
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
|
|
2
2
|
import { useShellUi as t } from "../shared/providers/shell/ShellUiProvider.js";
|
|
3
3
|
import { useSafePersonaSurface as n } from "../shared/providers/shell/PersonaSurfaceProvider.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { interpolateShellLabel as r } from "../shared/providers/shell/interpolateShellLabel.js";
|
|
5
|
+
import { useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
|
|
6
|
+
import { Check as c, ChevronsUpDown as l, Eye as u, Plus as d, Search as f, SlidersHorizontal as p, X as m } from "lucide-react";
|
|
7
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
8
|
+
import { createPortal as ee } from "react-dom";
|
|
8
9
|
//#region src/chrome/PersonaSurfaceControls.tsx
|
|
9
|
-
function
|
|
10
|
+
function v(e, t) {
|
|
10
11
|
let { surfaces: n, availableSurfaceIds: r, resolvedSurfaceId: i } = e, a = (e) => e === "everything" ? t : n.find((t) => t.id === e)?.label ?? e, o = [...r];
|
|
11
12
|
return o.sort((e, t) => {
|
|
12
13
|
let n = (e) => e === i ? 0 : e === "everything" ? 2 : 1;
|
|
@@ -17,15 +18,15 @@ function ee(e, t) {
|
|
|
17
18
|
isResolved: e === i
|
|
18
19
|
}));
|
|
19
20
|
}
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
}, []),
|
|
25
|
-
let e =
|
|
21
|
+
var y = 300;
|
|
22
|
+
function b({ everythingLabel: t, onOpenCustomize: r }) {
|
|
23
|
+
let p = e(), b = n(), [x, S] = s(!1), [C, w] = s(""), [T, E] = s(null), D = o(null), O = o(null), k = o(null), A = o(null), j = i(() => {
|
|
24
|
+
S(!1), w("");
|
|
25
|
+
}, []), M = i(() => {
|
|
26
|
+
let e = O.current?.getBoundingClientRect();
|
|
26
27
|
if (!e) return;
|
|
27
|
-
let t = window.innerWidth, n = Math.min(Math.max(e.width,
|
|
28
|
-
|
|
28
|
+
let t = window.innerWidth, n = Math.min(Math.max(e.width, y), t - 16), r = Math.min(Math.max(8, e.left), t - n - 8);
|
|
29
|
+
E((t) => {
|
|
29
30
|
let i = window.innerHeight - e.top + 8;
|
|
30
31
|
return t && t.left === r && t.bottom === i && t.width === n ? t : {
|
|
31
32
|
left: r,
|
|
@@ -34,242 +35,238 @@ function y({ everythingLabel: e, onOpenCustomize: t }) {
|
|
|
34
35
|
};
|
|
35
36
|
});
|
|
36
37
|
}, []);
|
|
37
|
-
if (
|
|
38
|
-
if (!
|
|
39
|
-
|
|
38
|
+
if (a(() => {
|
|
39
|
+
if (!x) {
|
|
40
|
+
E(null);
|
|
40
41
|
return;
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
-
let e = typeof ResizeObserver < "u" &&
|
|
44
|
-
return e &&
|
|
45
|
-
window.removeEventListener("resize",
|
|
43
|
+
M(), window.addEventListener("resize", M), window.addEventListener("scroll", M, !0);
|
|
44
|
+
let e = typeof ResizeObserver < "u" && O.current ? new ResizeObserver(M) : null;
|
|
45
|
+
return e && O.current && e.observe(O.current), () => {
|
|
46
|
+
window.removeEventListener("resize", M), window.removeEventListener("scroll", M, !0), e?.disconnect();
|
|
46
47
|
};
|
|
47
|
-
}, [
|
|
48
|
-
if (!
|
|
48
|
+
}, [x, M]), a(() => {
|
|
49
|
+
if (!x) return;
|
|
49
50
|
let e = (e) => {
|
|
50
51
|
let t = e.target;
|
|
51
|
-
!
|
|
52
|
+
!D.current?.contains(t) && !k.current?.contains(t) && j();
|
|
52
53
|
};
|
|
53
54
|
return document.addEventListener("mousedown", e), document.addEventListener("touchstart", e), () => {
|
|
54
55
|
document.removeEventListener("mousedown", e), document.removeEventListener("touchstart", e);
|
|
55
56
|
};
|
|
56
|
-
}, [
|
|
57
|
-
|
|
58
|
-
}, [
|
|
59
|
-
let { activeSurfaceId:
|
|
60
|
-
if (
|
|
61
|
-
|
|
57
|
+
}, [x, j]), a(() => {
|
|
58
|
+
x && A.current?.focus();
|
|
59
|
+
}, [x]), !b) return null;
|
|
60
|
+
let { activeSurfaceId: N, surfaces: P, resolvedSurfaceId: F, setSurfaceId: I, canSimulate: L, simulation: R, startSimulation: te, stopSimulation: z, simulatableRoles: B, simulatableRolesLoading: V, loadSimulatableRoles: ne, customViews: H, canManageViews: U } = b, W = v(b, t), G = C.trim().toLowerCase(), K = G ? W.filter((e) => e.label.toLowerCase().includes(G)) : W, q = G ? H.filter((e) => e.name.toLowerCase().includes(G)) : H, J = G ? B.filter((e) => e.name.toLowerCase().includes(G)) : B, Y = R ? R.roleName : W.find((e) => e.id === N)?.label ?? P.find((e) => e.id === N)?.label ?? H.find((e) => e.id === N)?.name ?? t, re = () => {
|
|
61
|
+
if (x) {
|
|
62
|
+
j();
|
|
62
63
|
return;
|
|
63
64
|
}
|
|
64
|
-
|
|
65
|
+
L && ne(), S(!0);
|
|
65
66
|
}, X = (e) => {
|
|
66
|
-
e.key === "Escape" &&
|
|
67
|
+
e.key === "Escape" && x && (e.preventDefault(), e.stopPropagation(), j());
|
|
67
68
|
}, Z = (e) => {
|
|
68
|
-
|
|
69
|
+
R && z(), I(e === F ? null : e), j();
|
|
69
70
|
}, Q = "flex w-full min-h-9 items-center gap-2 rounded-button px-2.5 py-1.5 text-left text-body-sm text-text-primary hover:bg-bg-sunken transition-colors", $ = "px-2.5 pb-1 pt-2.5 text-[11px] font-medium uppercase tracking-wider text-text-muted";
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
ref:
|
|
71
|
+
return /* @__PURE__ */ _("div", {
|
|
72
|
+
ref: D,
|
|
72
73
|
className: "relative min-w-0 flex-1",
|
|
73
74
|
onKeyDown: X,
|
|
74
|
-
children: [
|
|
75
|
-
ref:
|
|
75
|
+
children: [x && T && typeof document < "u" && ee(/* @__PURE__ */ _("div", {
|
|
76
|
+
ref: k,
|
|
76
77
|
style: {
|
|
77
|
-
left:
|
|
78
|
-
bottom:
|
|
79
|
-
width:
|
|
78
|
+
left: T.left,
|
|
79
|
+
bottom: T.bottom,
|
|
80
|
+
width: T.width
|
|
80
81
|
},
|
|
81
82
|
className: "fixed z-[130] flex max-h-80 flex-col overflow-hidden rounded-card border border-border-subtle bg-bg-canvas shadow-lg",
|
|
82
83
|
role: "listbox",
|
|
83
84
|
"data-testid": "persona-view-panel",
|
|
84
85
|
onKeyDown: X,
|
|
85
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ _("div", {
|
|
86
87
|
className: "flex items-center gap-2 border-b border-border-subtle px-2.5 py-2",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
88
|
-
ref:
|
|
89
|
-
value:
|
|
90
|
-
onChange: (e) =>
|
|
91
|
-
placeholder: "Search views & roles",
|
|
88
|
+
children: [/* @__PURE__ */ g(f, { className: "size-4 flex-shrink-0 text-text-muted" }), /* @__PURE__ */ g("input", {
|
|
89
|
+
ref: A,
|
|
90
|
+
value: C,
|
|
91
|
+
onChange: (e) => w(e.target.value),
|
|
92
|
+
placeholder: p("nav.searchViewsRoles", "Search views & roles"),
|
|
92
93
|
className: "w-full bg-transparent text-body-sm text-text-primary outline-none placeholder:text-text-muted",
|
|
93
94
|
"data-testid": "persona-view-search"
|
|
94
95
|
})]
|
|
95
|
-
}), /* @__PURE__ */
|
|
96
|
+
}), /* @__PURE__ */ _("div", {
|
|
96
97
|
className: "overflow-y-auto py-1",
|
|
97
98
|
children: [
|
|
98
|
-
|
|
99
|
+
K.length > 0 && /* @__PURE__ */ g("p", {
|
|
99
100
|
className: $,
|
|
100
|
-
children: "Views"
|
|
101
|
+
children: p("nav.views", "Views")
|
|
101
102
|
}),
|
|
102
|
-
|
|
103
|
-
let t = !
|
|
104
|
-
return /* @__PURE__ */
|
|
103
|
+
K.map((e) => {
|
|
104
|
+
let t = !R && e.id === N;
|
|
105
|
+
return /* @__PURE__ */ _("button", {
|
|
105
106
|
type: "button",
|
|
106
107
|
onClick: () => Z(e.id),
|
|
107
108
|
className: Q,
|
|
108
109
|
"data-testid": `persona-view-${e.id}`,
|
|
109
110
|
children: [
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ g(c, { className: `size-4 flex-shrink-0 ${t ? "text-text-primary" : "invisible"}` }),
|
|
112
|
+
/* @__PURE__ */ g("span", {
|
|
112
113
|
className: "truncate",
|
|
113
114
|
children: e.label
|
|
114
115
|
}),
|
|
115
|
-
e.isResolved && /* @__PURE__ */
|
|
116
|
+
e.isResolved && /* @__PURE__ */ g("span", {
|
|
116
117
|
className: "ml-auto flex-shrink-0 rounded-full bg-bg-sunken px-2 py-0.5 text-[11px] text-text-secondary",
|
|
117
|
-
children: "Your role"
|
|
118
|
+
children: p("nav.yourRole", "Your role")
|
|
118
119
|
})
|
|
119
120
|
]
|
|
120
121
|
}, e.id);
|
|
121
122
|
}),
|
|
122
|
-
(
|
|
123
|
-
/* @__PURE__ */
|
|
123
|
+
(q.length > 0 || U && !G) && /* @__PURE__ */ _(h, { children: [
|
|
124
|
+
/* @__PURE__ */ g("p", {
|
|
124
125
|
className: $,
|
|
125
|
-
children: "My views"
|
|
126
|
+
children: p("nav.myViews", "My views")
|
|
126
127
|
}),
|
|
127
|
-
|
|
128
|
-
let t = !
|
|
129
|
-
return /* @__PURE__ */
|
|
128
|
+
q.map((e) => {
|
|
129
|
+
let t = !R && e.id === N;
|
|
130
|
+
return /* @__PURE__ */ _("button", {
|
|
130
131
|
type: "button",
|
|
131
132
|
onClick: () => Z(e.id),
|
|
132
133
|
className: Q,
|
|
133
134
|
"data-testid": `persona-view-${e.id}`,
|
|
134
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ g(c, { className: `size-4 flex-shrink-0 ${t ? "text-text-primary" : "invisible"}` }), /* @__PURE__ */ g("span", {
|
|
135
136
|
className: "truncate",
|
|
136
137
|
children: e.name
|
|
137
138
|
})]
|
|
138
139
|
}, e.id);
|
|
139
140
|
}),
|
|
140
|
-
|
|
141
|
+
U && !G && /* @__PURE__ */ _("button", {
|
|
141
142
|
type: "button",
|
|
142
143
|
onClick: () => {
|
|
143
|
-
|
|
144
|
+
j(), r();
|
|
144
145
|
},
|
|
145
146
|
className: `${Q} text-text-secondary`,
|
|
146
147
|
"data-testid": "persona-view-create",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
148
|
+
children: [/* @__PURE__ */ g(d, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ g("span", { children: p("nav.newViewFromCurrent", "New view from current…") })]
|
|
148
149
|
})
|
|
149
150
|
] }),
|
|
150
|
-
|
|
151
|
-
/* @__PURE__ */
|
|
151
|
+
L && /* @__PURE__ */ _(h, { children: [
|
|
152
|
+
/* @__PURE__ */ g("p", {
|
|
152
153
|
className: $,
|
|
153
|
-
children: "Preview a role"
|
|
154
|
+
children: p("nav.previewARole", "Preview a role")
|
|
154
155
|
}),
|
|
155
|
-
|
|
156
|
+
R && /* @__PURE__ */ _("button", {
|
|
156
157
|
type: "button",
|
|
157
158
|
onClick: () => {
|
|
158
|
-
|
|
159
|
+
z(), j();
|
|
159
160
|
},
|
|
160
161
|
className: `${Q} text-status-warning-text`,
|
|
161
162
|
"data-testid": "persona-view-exit-preview",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ g(m, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ g("span", { children: p("nav.exitPreview", "Exit preview") })]
|
|
163
164
|
}),
|
|
164
|
-
|
|
165
|
+
V && /* @__PURE__ */ g("p", {
|
|
165
166
|
className: "px-2.5 py-1.5 text-body-sm text-text-muted",
|
|
166
|
-
children: "Loading roles…"
|
|
167
|
+
children: p("inviteMemberDialog.loadingRoles", "Loading roles…")
|
|
167
168
|
}),
|
|
168
|
-
|
|
169
|
-
let t =
|
|
170
|
-
return /* @__PURE__ */
|
|
169
|
+
J.map((e) => {
|
|
170
|
+
let t = R?.roleId === e.id;
|
|
171
|
+
return /* @__PURE__ */ _("button", {
|
|
171
172
|
type: "button",
|
|
172
173
|
onClick: () => {
|
|
173
|
-
|
|
174
|
+
te(e), j();
|
|
174
175
|
},
|
|
175
176
|
className: Q,
|
|
176
177
|
"data-testid": `persona-preview-${e.id}`,
|
|
177
178
|
children: [
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ g(u, { className: `size-4 flex-shrink-0 ${t ? "text-status-warning-text" : "text-text-muted"}` }),
|
|
180
|
+
/* @__PURE__ */ g("span", {
|
|
180
181
|
className: "truncate",
|
|
181
182
|
children: e.name
|
|
182
183
|
}),
|
|
183
|
-
t && /* @__PURE__ */
|
|
184
|
+
t && /* @__PURE__ */ g(c, { className: "ml-auto size-4 flex-shrink-0" })
|
|
184
185
|
]
|
|
185
186
|
}, e.id);
|
|
186
187
|
}),
|
|
187
|
-
!
|
|
188
|
+
!V && J.length === 0 && G && /* @__PURE__ */ g("p", {
|
|
188
189
|
className: "px-2.5 py-1.5 text-body-sm text-text-muted",
|
|
189
|
-
children: "No matching roles"
|
|
190
|
+
children: p("nav.noMatchingRoles", "No matching roles")
|
|
190
191
|
})
|
|
191
192
|
] }),
|
|
192
|
-
|
|
193
|
+
K.length === 0 && (!L || J.length === 0) && G && /* @__PURE__ */ g("p", {
|
|
193
194
|
className: "px-2.5 py-1.5 text-body-sm text-text-muted",
|
|
194
|
-
children: "No matches"
|
|
195
|
+
children: p("conversations.empty.search.title", "No matches")
|
|
195
196
|
})
|
|
196
197
|
]
|
|
197
198
|
})]
|
|
198
|
-
}), document.body), /* @__PURE__ */
|
|
199
|
-
ref:
|
|
199
|
+
}), document.body), /* @__PURE__ */ _("button", {
|
|
200
|
+
ref: O,
|
|
200
201
|
type: "button",
|
|
201
|
-
onClick:
|
|
202
|
-
"aria-expanded":
|
|
202
|
+
onClick: re,
|
|
203
|
+
"aria-expanded": x,
|
|
203
204
|
"aria-haspopup": "listbox",
|
|
204
|
-
className: `flex w-full min-h-9 items-center gap-2 rounded-button border px-2.5 py-1.5 text-body-sm transition-colors ${
|
|
205
|
+
className: `flex w-full min-h-9 items-center gap-2 rounded-button border px-2.5 py-1.5 text-body-sm transition-colors ${R ? "border-status-warning-text/40 bg-status-warning-bg-subtle text-text-primary" : "border-border-subtle bg-bg-canvas text-text-primary hover:bg-bg-sunken"}`,
|
|
205
206
|
"data-testid": "persona-view-trigger",
|
|
206
207
|
children: [
|
|
207
|
-
|
|
208
|
-
/* @__PURE__ */
|
|
208
|
+
R ? /* @__PURE__ */ g(u, { className: "size-4 flex-shrink-0 text-status-warning-text" }) : /* @__PURE__ */ g(c, { className: "size-4 flex-shrink-0 text-text-muted" }),
|
|
209
|
+
/* @__PURE__ */ g("span", {
|
|
209
210
|
className: "min-w-0 flex-1 truncate text-left",
|
|
210
|
-
children:
|
|
211
|
+
children: R ? p("nav.previewNamedView", "Preview: {{name}}", { name: Y }) : Y
|
|
211
212
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ g(l, { className: "size-4 flex-shrink-0 text-text-muted" })
|
|
213
214
|
]
|
|
214
215
|
})]
|
|
215
216
|
});
|
|
216
217
|
}
|
|
217
|
-
function
|
|
218
|
+
function x({ everythingLabel: r, customizeLabel: i }) {
|
|
218
219
|
let a = n(), { sidebarCollapsed: o, toggleSidebar: s } = t(), c = e(), l = r ?? c("nav.everything", "Everything"), u = i ?? c("nav.customizeMenu", "Customize menu");
|
|
219
220
|
if (!a) return null;
|
|
220
|
-
let { setCustomizeOpen: d } = a,
|
|
221
|
+
let { setCustomizeOpen: d } = a, f = () => {
|
|
221
222
|
typeof window < "u" && window.innerWidth < 768 && !o && s(), d(!0);
|
|
222
|
-
}, m = /* @__PURE__ */
|
|
223
|
+
}, m = /* @__PURE__ */ g("button", {
|
|
223
224
|
type: "button",
|
|
224
|
-
onClick:
|
|
225
|
+
onClick: f,
|
|
225
226
|
className: "p-2 rounded-button text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors flex-shrink-0",
|
|
226
227
|
"aria-label": u,
|
|
227
228
|
title: u,
|
|
228
229
|
"data-testid": "persona-customize-trigger",
|
|
229
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ g(p, { className: "size-4" })
|
|
230
231
|
});
|
|
231
|
-
return o ? /* @__PURE__ */
|
|
232
|
+
return o ? /* @__PURE__ */ g("div", {
|
|
232
233
|
className: "hidden md:flex justify-center",
|
|
233
234
|
"data-testid": "persona-controls-collapsed",
|
|
234
235
|
children: m
|
|
235
|
-
}) : /* @__PURE__ */
|
|
236
|
+
}) : /* @__PURE__ */ _("div", {
|
|
236
237
|
className: "flex items-center gap-1",
|
|
237
238
|
"data-testid": "persona-controls",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ g(b, {
|
|
239
240
|
everythingLabel: l,
|
|
240
|
-
onOpenCustomize:
|
|
241
|
+
onOpenCustomize: f
|
|
241
242
|
}), m]
|
|
242
243
|
});
|
|
243
244
|
}
|
|
244
|
-
function
|
|
245
|
-
let e = n();
|
|
246
|
-
return
|
|
245
|
+
function S() {
|
|
246
|
+
let t = e(), i = n();
|
|
247
|
+
return i?.simulation ? /* @__PURE__ */ _("div", {
|
|
247
248
|
className: "fixed bottom-4 left-1/2 z-[120] -translate-x-1/2 flex max-w-[calc(100vw-2rem)] items-center gap-2 rounded-full border border-border-subtle bg-bg-canvas px-4 py-2 shadow-lg",
|
|
248
249
|
style: { marginBottom: "env(safe-area-inset-bottom)" },
|
|
249
250
|
role: "status",
|
|
250
251
|
"data-testid": "persona-simulation-pill",
|
|
251
252
|
children: [
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ g(u, { className: "size-4 flex-shrink-0 text-status-warning-text" }),
|
|
253
254
|
/* @__PURE__ */ g("span", {
|
|
254
255
|
className: "truncate text-body-sm text-text-primary",
|
|
255
|
-
children:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
children: e.simulation.roleName
|
|
260
|
-
}),
|
|
261
|
-
" (simulated)"
|
|
262
|
-
]
|
|
256
|
+
children: r(t("nav.simulationSummary", "Viewing as {{role}} (simulated)"), { role: /* @__PURE__ */ g("span", {
|
|
257
|
+
className: "font-semibold",
|
|
258
|
+
children: i.simulation.roleName
|
|
259
|
+
}) })
|
|
263
260
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ g("button", {
|
|
265
262
|
type: "button",
|
|
266
|
-
onClick:
|
|
263
|
+
onClick: i.stopSimulation,
|
|
267
264
|
className: "rounded-full px-2 py-0.5 text-body-sm font-medium text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
|
|
268
265
|
"data-testid": "persona-simulation-pill-exit",
|
|
269
|
-
children: "Exit"
|
|
266
|
+
children: t("nav.exit", "Exit")
|
|
270
267
|
})
|
|
271
268
|
]
|
|
272
269
|
}) : null;
|
|
273
270
|
}
|
|
274
271
|
//#endregion
|
|
275
|
-
export {
|
|
272
|
+
export { S as PersonaSimulationPill, x as PersonaSurfaceControls };
|
|
@@ -1,57 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
|
|
2
|
+
import { useSettingsRegistryStore as t } from "../shared/plugins/registries/useSettingsRegistry.js";
|
|
3
|
+
import { useEffect as n, useMemo as r, useState as i } from "react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
4
5
|
//#region src/chrome/PluginSettingsPage.tsx
|
|
5
|
-
var
|
|
6
|
-
let
|
|
6
|
+
var s = () => {
|
|
7
|
+
let s = e(), c = t((e) => e.items), l = r(() => c.filter((e) => e.visible !== !1), [c]), u = r(() => {
|
|
7
8
|
let e = /* @__PURE__ */ new Map();
|
|
8
|
-
for (let t of
|
|
9
|
+
for (let t of l) {
|
|
9
10
|
let n = t.category || "General";
|
|
10
11
|
e.has(n) || e.set(n, []), e.get(n).push(t);
|
|
11
12
|
}
|
|
12
13
|
return e;
|
|
13
|
-
}, [
|
|
14
|
-
if (
|
|
15
|
-
(!
|
|
14
|
+
}, [l]), d = Array.from(u.keys()), [f, p] = i(d[0] ?? "");
|
|
15
|
+
if (n(() => {
|
|
16
|
+
(!f || !u.has(f)) && p(d[0] ?? "");
|
|
16
17
|
}, [
|
|
18
|
+
f,
|
|
17
19
|
u,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
]), s.length === 0) return /* @__PURE__ */ i("div", {
|
|
20
|
+
d
|
|
21
|
+
]), l.length === 0) return /* @__PURE__ */ a("div", {
|
|
21
22
|
className: "p-6 text-text-secondary text-sm",
|
|
22
|
-
children: "No plugin settings available."
|
|
23
|
+
children: s("appShell.noPluginSettingsAvailable", "No plugin settings available.")
|
|
23
24
|
});
|
|
24
|
-
let
|
|
25
|
-
return /* @__PURE__ */
|
|
25
|
+
let m = u.get(f) ?? [];
|
|
26
|
+
return /* @__PURE__ */ o("div", {
|
|
26
27
|
className: "flex h-full",
|
|
27
28
|
"data-ui-plugin-settings-page": "true",
|
|
28
|
-
children: [/* @__PURE__ */
|
|
29
|
+
children: [/* @__PURE__ */ o("div", {
|
|
29
30
|
className: "w-52 border-r border-border-default p-4 flex-shrink-0",
|
|
30
|
-
children: [/* @__PURE__ */
|
|
31
|
+
children: [/* @__PURE__ */ a("h2", {
|
|
31
32
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
32
|
-
children: "Settings"
|
|
33
|
-
}), /* @__PURE__ */
|
|
33
|
+
children: s("common.actions.settings", "Settings")
|
|
34
|
+
}), /* @__PURE__ */ a("nav", {
|
|
34
35
|
className: "space-y-1",
|
|
35
|
-
children:
|
|
36
|
-
onClick: () =>
|
|
37
|
-
className: `w-full text-left px-3 py-2 rounded-button text-sm transition-colors ${e ===
|
|
36
|
+
children: d.map((e) => /* @__PURE__ */ a("button", {
|
|
37
|
+
onClick: () => p(e),
|
|
38
|
+
className: `w-full text-left px-3 py-2 rounded-button text-sm transition-colors ${e === f ? "bg-[var(--color-accent-soft)] text-text-primary font-medium" : "text-text-secondary hover:text-text-primary hover:bg-bg-sunken"}`,
|
|
38
39
|
children: e
|
|
39
40
|
}, e))
|
|
40
41
|
})]
|
|
41
|
-
}), /* @__PURE__ */
|
|
42
|
+
}), /* @__PURE__ */ a("div", {
|
|
42
43
|
className: "flex-1 p-6 overflow-auto",
|
|
43
|
-
children:
|
|
44
|
+
children: m.map((e) => {
|
|
44
45
|
let t = e.component;
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
+
return /* @__PURE__ */ o("div", {
|
|
46
47
|
className: "mb-8",
|
|
47
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ a("h3", {
|
|
48
49
|
className: "text-base font-semibold text-text-primary mb-4",
|
|
49
50
|
children: e.label
|
|
50
|
-
}), /* @__PURE__ */
|
|
51
|
+
}), /* @__PURE__ */ a(t, {})]
|
|
51
52
|
}, e.id);
|
|
52
53
|
})
|
|
53
54
|
})]
|
|
54
55
|
});
|
|
55
56
|
};
|
|
56
57
|
//#endregion
|
|
57
|
-
export {
|
|
58
|
+
export { s as PluginSettingsPage };
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
|
|
2
|
+
import { useWidgetRegistryStore as t } from "../shared/plugins/registries/useWidgetRegistry.js";
|
|
3
|
+
import { useMemo as n } from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
5
|
//#region src/chrome/PluginWidgetGrid.tsx
|
|
5
|
-
var
|
|
6
|
-
let
|
|
7
|
-
return
|
|
6
|
+
var a = ({ category: a, emptyState: o }) => {
|
|
7
|
+
let s = e(), c = t((e) => e.items), l = n(() => c.filter((e) => e.visible !== !1).filter((e) => a ? e.category === a : !0).sort((e, t) => (e.order ?? 0) - (t.order ?? 0)), [a, c]);
|
|
8
|
+
return l.length === 0 ? /* @__PURE__ */ r("div", {
|
|
8
9
|
className: "rounded-card border border-border-subtle bg-bg-surface p-6 text-sm text-text-secondary",
|
|
9
|
-
children:
|
|
10
|
-
}) : /* @__PURE__ */
|
|
10
|
+
children: o ?? s("appShell.noPluginWidgets", "No plugin widgets registered.")
|
|
11
|
+
}) : /* @__PURE__ */ r("div", {
|
|
11
12
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4",
|
|
12
13
|
"data-ui-plugin-widget-grid": "true",
|
|
13
|
-
children:
|
|
14
|
-
let t = e.component,
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
className: `rounded-card border border-border-subtle bg-bg-surface shadow-elevation-1 transition-all duration-200 ${
|
|
14
|
+
children: l.map((e) => {
|
|
15
|
+
let t = e.component, n = e.defaultSize.cols >= 4 ? "md:col-span-2 xl:col-span-4" : e.defaultSize.cols === 3 ? "md:col-span-2 xl:col-span-3" : e.defaultSize.cols === 2 ? "md:col-span-2 xl:col-span-2" : "md:col-span-1 xl:col-span-1", a = { minHeight: `${Math.max(1, e.defaultSize.rows) * 10}rem` };
|
|
16
|
+
return /* @__PURE__ */ i("section", {
|
|
17
|
+
className: `rounded-card border border-border-subtle bg-bg-surface shadow-elevation-1 transition-all duration-200 ${n}`,
|
|
17
18
|
style: a,
|
|
18
19
|
"data-ui-plugin-widget": e.id,
|
|
19
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ r("div", {
|
|
20
21
|
className: "flex items-center justify-between border-b border-border-subtle px-4 py-3",
|
|
21
|
-
children: /* @__PURE__ */
|
|
22
|
+
children: /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("h2", {
|
|
22
23
|
className: "text-sm font-semibold text-text-primary",
|
|
23
24
|
children: e.title
|
|
24
|
-
}), e.description ? /* @__PURE__ */
|
|
25
|
+
}), e.description ? /* @__PURE__ */ r("p", {
|
|
25
26
|
className: "mt-1 text-xs text-text-secondary",
|
|
26
27
|
children: e.description
|
|
27
28
|
}) : null] })
|
|
28
|
-
}), /* @__PURE__ */
|
|
29
|
+
}), /* @__PURE__ */ r("div", {
|
|
29
30
|
className: "h-[calc(100%-4rem)] p-4",
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ r(t, { widgetId: e.id })
|
|
31
32
|
})]
|
|
32
33
|
}, e.id);
|
|
33
34
|
})
|
|
34
35
|
});
|
|
35
36
|
};
|
|
36
37
|
//#endregion
|
|
37
|
-
export {
|
|
38
|
+
export { a as PluginWidgetGrid };
|