@burdenoff/fe-libs 2026.722.2 → 2026.723.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"NavCustomizeDialog.d.ts","sourceRoot":"","sources":["../../src/chrome/NavCustomizeDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAwBH,MAAM,WAAW,uBAAuB;IACtC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA6DD,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EACX,UAAU,EACV,eAA8B,GAC/B,EAAE,uBAAuB,kDAuNzB"}
1
+ {"version":3,"file":"NavCustomizeDialog.d.ts","sourceRoot":"","sources":["../../src/chrome/NavCustomizeDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAwBH,MAAM,WAAW,uBAAuB;IACtC,0EAA0E;IAC1E,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA6DD,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EACX,UAAU,EACV,eAA8B,GAC/B,EAAE,uBAAuB,kDAmIzB"}
@@ -55,131 +55,66 @@ function g({ groupLabels: o, groupOrder: f, everythingLabel: g = "Everything" })
55
55
  o
56
56
  ]);
57
57
  if (!_) return null;
58
- let { surfaces: w, activeSurfaceId: T, activeSurface: E, resolvedSurfaceId: D, availableSurfaceIds: O, setSurfaceId: k, overrides: A, setItemOverride: j, resetOverrides: M, customizeOpen: N, setCustomizeOpen: P, canSimulate: F, simulation: I, startSimulation: L, stopSimulation: R, simulatableRoles: z, simulatableRolesLoading: B, loadSimulatableRoles: V } = _, H = E ? E.visibleItems : null, U = (e, t, n) => {
59
- let r = u(e, t, H, {});
60
- j(e.id, n === r ? null : n ? "shown" : "hidden");
61
- }, W = Object.keys(A).length, G = O.map((e) => ({
62
- id: e,
63
- label: e === "everything" ? g : w.find((t) => t.id === e)?.label ?? e
64
- }));
58
+ let { activeSurfaceId: w, activeSurface: T, overrides: E, setItemOverride: D, resetOverrides: O, customizeOpen: k, setCustomizeOpen: A, simulation: j } = _, M = T ? T.visibleItems : null, N = (e, t, n) => {
59
+ let r = u(e, t, M, {});
60
+ D(e.id, n === r ? null : n ? "shown" : "hidden");
61
+ }, P = Object.keys(E).length, F = w === "everything" ? g : T?.label ?? w;
65
62
  return /* @__PURE__ */ p(e, {
66
- open: N,
67
- onOpenChange: P,
63
+ open: k,
64
+ onOpenChange: A,
68
65
  children: /* @__PURE__ */ m(t, {
69
66
  className: "max-h-[85vh] overflow-y-auto sm:max-w-lg",
70
- children: [/* @__PURE__ */ m(r, { children: [/* @__PURE__ */ p(i, { children: "Customize menu" }), /* @__PURE__ */ p(n, { children: "Choose which pages appear in your sidebar. Hidden pages stay one click away under “more” and in search — nothing is removed." })] }), /* @__PURE__ */ m("div", {
67
+ children: [/* @__PURE__ */ m(r, { children: [/* @__PURE__ */ p(i, { children: "Customize menu" }), /* @__PURE__ */ m(n, { children: [
68
+ "Choose which pages appear in the",
69
+ " ",
70
+ /* @__PURE__ */ p("span", {
71
+ className: "font-medium text-text-primary",
72
+ children: F
73
+ }),
74
+ " view. Hidden pages stay one click away under “more” and in search — nothing is removed."
75
+ ] })] }), /* @__PURE__ */ p("div", {
71
76
  className: "space-y-5",
72
- children: [
73
- /* @__PURE__ */ m("section", {
74
- className: "space-y-2",
75
- children: [
76
- /* @__PURE__ */ p("h3", {
77
- className: "text-[11px] font-medium uppercase tracking-wider text-text-muted",
78
- children: "Menu view"
79
- }),
80
- /* @__PURE__ */ m("select", {
81
- value: T,
82
- onChange: (e) => {
83
- let t = e.target.value;
84
- k(t === D ? null : t);
85
- },
86
- disabled: !!I,
87
- className: "w-full rounded-button border border-border-subtle bg-bg-canvas px-3 py-2 text-body-sm text-text-primary disabled:opacity-60",
88
- "data-testid": "persona-dialog-surface-select",
89
- children: [G.map((e) => /* @__PURE__ */ p("option", {
90
- value: e.id,
91
- children: e.label
92
- }, e.id)), !G.some((e) => e.id === T) && /* @__PURE__ */ p("option", {
93
- value: T,
94
- children: w.find((e) => e.id === T)?.label ?? T
95
- })]
96
- }),
97
- T !== D && !I && /* @__PURE__ */ p("button", {
98
- type: "button",
99
- onClick: () => k(null),
100
- className: "text-body-sm text-text-secondary underline-offset-2 hover:text-text-primary hover:underline",
101
- "data-testid": "persona-dialog-surface-reset",
102
- children: "Reset to my role’s view"
103
- })
104
- ]
105
- }),
106
- F && /* @__PURE__ */ m("section", {
107
- className: "space-y-2",
108
- children: [
109
- /* @__PURE__ */ p("h3", {
110
- className: "text-[11px] font-medium uppercase tracking-wider text-text-muted",
111
- children: "Simulate a role (admin preview)"
112
- }),
113
- /* @__PURE__ */ m("select", {
114
- value: I?.roleId ?? "",
115
- onFocus: V,
116
- onChange: (e) => {
117
- let t = e.target.value;
118
- if (!t) {
119
- R();
120
- return;
121
- }
122
- let n = z.find((e) => e.id === t);
123
- n && L(n);
124
- },
125
- className: "w-full rounded-button border border-border-subtle bg-bg-canvas px-3 py-2 text-body-sm text-text-primary",
126
- "data-testid": "persona-dialog-simulate-select",
127
- children: [/* @__PURE__ */ p("option", {
128
- value: "",
129
- children: B ? "Loading roles…" : "Not simulating"
130
- }), z.map((e) => /* @__PURE__ */ p("option", {
131
- value: e.id,
132
- children: e.name
133
- }, e.id))]
134
- }),
135
- /* @__PURE__ */ p("p", {
136
- className: "text-body-sm text-text-muted",
137
- children: "Preview the menu another role sees. Your own access is unchanged."
138
- })
139
- ]
140
- }),
141
- /* @__PURE__ */ m("section", {
142
- className: "space-y-1",
143
- "data-testid": "persona-dialog-items",
144
- children: [/* @__PURE__ */ m("div", {
145
- className: "flex items-center justify-between",
146
- children: [/* @__PURE__ */ p("h3", {
147
- className: "text-[11px] font-medium uppercase tracking-wider text-text-muted",
148
- children: "Menu items"
149
- }), W > 0 && /* @__PURE__ */ m("button", {
150
- type: "button",
151
- onClick: M,
152
- className: "text-body-sm text-text-secondary underline-offset-2 hover:text-text-primary hover:underline",
153
- "data-testid": "persona-dialog-reset-overrides",
154
- children: [
155
- "Reset ",
156
- W,
157
- " change",
158
- W === 1 ? "" : "s"
159
- ]
160
- })]
161
- }), I ? /* @__PURE__ */ p("p", {
162
- className: "py-2 text-body-sm text-text-muted",
163
- children: "Exit role simulation to customize your own menu."
164
- }) : C.map((e) => /* @__PURE__ */ m("div", {
165
- className: "pt-2",
166
- children: [e.label && /* @__PURE__ */ p("p", {
167
- className: "pb-1 text-[11px] font-medium uppercase tracking-wider text-text-muted",
168
- children: e.label
169
- }), /* @__PURE__ */ p("div", {
170
- className: "divide-y divide-border-subtle",
171
- children: e.items.map((e) => /* @__PURE__ */ p(h, {
172
- item: e,
173
- depth: 0,
174
- parentShown: !1,
175
- surfaceVisibleItems: H,
176
- overrides: A,
177
- onToggle: U
178
- }, e.id))
179
- })]
180
- }, e.key))]
181
- })
182
- ]
77
+ children: /* @__PURE__ */ m("section", {
78
+ className: "space-y-1",
79
+ "data-testid": "persona-dialog-items",
80
+ children: [/* @__PURE__ */ m("div", {
81
+ className: "flex items-center justify-between",
82
+ children: [/* @__PURE__ */ p("h3", {
83
+ className: "text-[11px] font-medium uppercase tracking-wider text-text-muted",
84
+ children: "Menu items"
85
+ }), P > 0 && /* @__PURE__ */ m("button", {
86
+ type: "button",
87
+ onClick: O,
88
+ className: "text-body-sm text-text-secondary underline-offset-2 hover:text-text-primary hover:underline",
89
+ "data-testid": "persona-dialog-reset-overrides",
90
+ children: [
91
+ "Reset ",
92
+ P,
93
+ " change",
94
+ P === 1 ? "" : "s"
95
+ ]
96
+ })]
97
+ }), j ? /* @__PURE__ */ p("p", {
98
+ className: "py-2 text-body-sm text-text-muted",
99
+ children: "Exit role simulation to customize your own menu."
100
+ }) : C.map((e) => /* @__PURE__ */ m("div", {
101
+ className: "pt-2",
102
+ children: [e.label && /* @__PURE__ */ p("p", {
103
+ className: "pb-1 text-[11px] font-medium uppercase tracking-wider text-text-muted",
104
+ children: e.label
105
+ }), /* @__PURE__ */ p("div", {
106
+ className: "divide-y divide-border-subtle",
107
+ children: e.items.map((e) => /* @__PURE__ */ p(h, {
108
+ item: e,
109
+ depth: 0,
110
+ parentShown: !1,
111
+ surfaceVisibleItems: M,
112
+ overrides: E,
113
+ onToggle: N
114
+ }, e.id))
115
+ })]
116
+ }, e.key))]
117
+ })
183
118
  })]
184
119
  })
185
120
  });
@@ -2,12 +2,15 @@
2
2
  * PersonaSurfaceControls — sidebar-footer widget for persona surfaces.
3
3
  *
4
4
  * Rendered automatically by ProductSideNav when a PersonaSurfaceProvider is
5
- * mounted. Expanded sidebar: a compact "Viewing" select (the surfaces the
6
- * user qualifies for + Everything) and a Customize button. Collapsed rail:
7
- * a single Customize icon button. During role simulation the select is
8
- * replaced with the simulated role and an Exit control; a viewport-fixed
9
- * pill (rendered by ProductSideNav OUTSIDE the aside, so backdrop-filter
10
- * doesn't trap the fixed positioning) mirrors the state on all breakpoints.
5
+ * mounted. One compact row: a searchable VIEW DROPDOWN (the user's surfaces
6
+ * their own role preselected and marked plus Everything, and, for workspace
7
+ * admins / super admins, a "Preview a role" section) and a Customize button
8
+ * that opens the per-item visibility dialog. The dropdown panel renders
9
+ * inline above the footer (no portal), so inside the mobile drawer it needs
10
+ * no overlay and never covers the nav. During role preview the trigger tints
11
+ * amber and an "Exit preview" row appears; a viewport-fixed pill (rendered by
12
+ * ProductSideNav OUTSIDE the aside — its backdrop-filter would trap fixed
13
+ * positioning) mirrors the state on all breakpoints.
11
14
  */
12
15
  export interface PersonaSurfaceControlsProps {
13
16
  /** Label for the built-in uncurated surface. @default "Everything" */
@@ -1 +1 @@
1
- {"version":3,"file":"PersonaSurfaceControls.d.ts","sourceRoot":"","sources":["../../src/chrome/PersonaSurfaceControls.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,MAAM,WAAW,2BAA2B;IAC1C,sEAAsE;IACtE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,eAA8B,EAC9B,cAAiC,GAClC,EAAE,2BAA2B,kDAyG7B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,mDAyBpC"}
1
+ {"version":3,"file":"PersonaSurfaceControls.d.ts","sourceRoot":"","sources":["../../src/chrome/PersonaSurfaceControls.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAkBH,MAAM,WAAW,2BAA2B;IAC1C,sEAAsE;IACtE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAqTD,wBAAgB,sBAAsB,CAAC,EACrC,eAA8B,EAC9B,cAAiC,GAClC,EAAE,2BAA2B,kDA6C7B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,mDAyBpC"}
@@ -1,102 +1,235 @@
1
1
  import { useShellUi as e } from "../shared/providers/shell/ShellUiProvider.js";
2
2
  import { useSafePersonaSurface as t } from "../shared/providers/shell/PersonaSurfaceProvider.js";
3
- import { Eye as n, SlidersHorizontal as r, X as i } from "lucide-react";
4
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
+ import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
4
+ import { Check as o, ChevronsUpDown as s, Eye as c, Search as l, SlidersHorizontal as u, X as d } from "lucide-react";
5
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
6
+ import { createPortal as h } from "react-dom";
5
7
  //#region src/chrome/PersonaSurfaceControls.tsx
6
- function s({ everythingLabel: s = "Everything", customizeLabel: c = "Customize menu" }) {
7
- let l = t(), { sidebarCollapsed: u } = e();
8
- if (!l) return null;
9
- let { surfaces: d, activeSurfaceId: f, resolvedSurfaceId: p, availableSurfaceIds: m, setSurfaceId: h, setCustomizeOpen: g, simulation: _, stopSimulation: v } = l, y = /* @__PURE__ */ a("button", {
8
+ function g(e, t) {
9
+ let { surfaces: n, availableSurfaceIds: r, resolvedSurfaceId: i } = e, a = (e) => e === "everything" ? t : n.find((t) => t.id === e)?.label ?? e, o = [...r];
10
+ return o.sort((e, t) => {
11
+ let n = (e) => e === i ? 0 : e === "everything" ? 2 : 1;
12
+ return n(e) - n(t);
13
+ }), o.map((e) => ({
14
+ id: e,
15
+ label: a(e),
16
+ isResolved: e === i
17
+ }));
18
+ }
19
+ var _ = 300;
20
+ function v({ everythingLabel: e }) {
21
+ let u = t(), [v, y] = a(!1), [b, x] = a(""), [S, C] = a(null), w = i(null), T = i(null), E = i(null), D = i(null), O = n(() => {
22
+ y(!1), x("");
23
+ }, []), k = n(() => {
24
+ let e = T.current?.getBoundingClientRect();
25
+ if (!e) return;
26
+ let t = window.innerWidth, n = Math.min(Math.max(e.width, _), t - 16), r = Math.min(Math.max(8, e.left), t - n - 8);
27
+ C((t) => {
28
+ let i = window.innerHeight - e.top + 8;
29
+ return t && t.left === r && t.bottom === i && t.width === n ? t : {
30
+ left: r,
31
+ bottom: i,
32
+ width: n
33
+ };
34
+ });
35
+ }, []);
36
+ if (r(() => {
37
+ if (!v) {
38
+ C(null);
39
+ return;
40
+ }
41
+ k(), window.addEventListener("resize", k), window.addEventListener("scroll", k, !0);
42
+ let e = typeof ResizeObserver < "u" && T.current ? new ResizeObserver(k) : null;
43
+ return e && T.current && e.observe(T.current), () => {
44
+ window.removeEventListener("resize", k), window.removeEventListener("scroll", k, !0), e?.disconnect();
45
+ };
46
+ }, [v, k]), r(() => {
47
+ if (!v) return;
48
+ let e = (e) => {
49
+ let t = e.target;
50
+ !w.current?.contains(t) && !E.current?.contains(t) && O();
51
+ };
52
+ return document.addEventListener("mousedown", e), document.addEventListener("touchstart", e), () => {
53
+ document.removeEventListener("mousedown", e), document.removeEventListener("touchstart", e);
54
+ };
55
+ }, [v, O]), r(() => {
56
+ v && D.current?.focus();
57
+ }, [v]), !u) return null;
58
+ let { activeSurfaceId: A, surfaces: j, resolvedSurfaceId: M, setSurfaceId: N, canSimulate: P, simulation: F, startSimulation: I, stopSimulation: L, simulatableRoles: R, simulatableRolesLoading: z, loadSimulatableRoles: B } = u, V = g(u, e), H = b.trim().toLowerCase(), U = H ? V.filter((e) => e.label.toLowerCase().includes(H)) : V, W = H ? R.filter((e) => e.name.toLowerCase().includes(H)) : R, G = F ? F.roleName : V.find((e) => e.id === A)?.label ?? j.find((e) => e.id === A)?.label ?? e, K = () => {
59
+ if (v) {
60
+ O();
61
+ return;
62
+ }
63
+ P && B(), y(!0);
64
+ }, q = (e) => {
65
+ e.key === "Escape" && v && (e.preventDefault(), e.stopPropagation(), O());
66
+ }, J = (e) => {
67
+ F && L(), N(e === M ? null : e), O();
68
+ }, Y = "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", X = "px-2.5 pb-1 pt-2.5 text-[11px] font-medium uppercase tracking-wider text-text-muted";
69
+ return /* @__PURE__ */ m("div", {
70
+ ref: w,
71
+ className: "relative min-w-0 flex-1",
72
+ onKeyDown: q,
73
+ children: [v && S && typeof document < "u" && h(/* @__PURE__ */ m("div", {
74
+ ref: E,
75
+ style: {
76
+ left: S.left,
77
+ bottom: S.bottom,
78
+ width: S.width
79
+ },
80
+ className: "fixed z-[130] flex max-h-80 flex-col overflow-hidden rounded-card border border-border-subtle bg-bg-canvas shadow-lg",
81
+ role: "listbox",
82
+ "data-testid": "persona-view-panel",
83
+ onKeyDown: q,
84
+ children: [/* @__PURE__ */ m("div", {
85
+ className: "flex items-center gap-2 border-b border-border-subtle px-2.5 py-2",
86
+ children: [/* @__PURE__ */ p(l, { className: "size-4 flex-shrink-0 text-text-muted" }), /* @__PURE__ */ p("input", {
87
+ ref: D,
88
+ value: b,
89
+ onChange: (e) => x(e.target.value),
90
+ placeholder: "Search views & roles",
91
+ className: "w-full bg-transparent text-body-sm text-text-primary outline-none placeholder:text-text-muted",
92
+ "data-testid": "persona-view-search"
93
+ })]
94
+ }), /* @__PURE__ */ m("div", {
95
+ className: "overflow-y-auto py-1",
96
+ children: [
97
+ U.length > 0 && /* @__PURE__ */ p("p", {
98
+ className: X,
99
+ children: "Views"
100
+ }),
101
+ U.map((e) => {
102
+ let t = !F && e.id === A;
103
+ return /* @__PURE__ */ m("button", {
104
+ type: "button",
105
+ onClick: () => J(e.id),
106
+ className: Y,
107
+ "data-testid": `persona-view-${e.id}`,
108
+ children: [
109
+ /* @__PURE__ */ p(o, { className: `size-4 flex-shrink-0 ${t ? "text-text-primary" : "invisible"}` }),
110
+ /* @__PURE__ */ p("span", {
111
+ className: "truncate",
112
+ children: e.label
113
+ }),
114
+ e.isResolved && /* @__PURE__ */ p("span", {
115
+ className: "ml-auto flex-shrink-0 rounded-full bg-bg-sunken px-2 py-0.5 text-[11px] text-text-secondary",
116
+ children: "Your role"
117
+ })
118
+ ]
119
+ }, e.id);
120
+ }),
121
+ P && /* @__PURE__ */ m(f, { children: [
122
+ /* @__PURE__ */ p("p", {
123
+ className: X,
124
+ children: "Preview a role"
125
+ }),
126
+ F && /* @__PURE__ */ m("button", {
127
+ type: "button",
128
+ onClick: () => {
129
+ L(), O();
130
+ },
131
+ className: `${Y} text-status-warning-text`,
132
+ "data-testid": "persona-view-exit-preview",
133
+ children: [/* @__PURE__ */ p(d, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ p("span", { children: "Exit preview" })]
134
+ }),
135
+ z && /* @__PURE__ */ p("p", {
136
+ className: "px-2.5 py-1.5 text-body-sm text-text-muted",
137
+ children: "Loading roles…"
138
+ }),
139
+ W.map((e) => {
140
+ let t = F?.roleId === e.id;
141
+ return /* @__PURE__ */ m("button", {
142
+ type: "button",
143
+ onClick: () => {
144
+ I(e), O();
145
+ },
146
+ className: Y,
147
+ "data-testid": `persona-preview-${e.id}`,
148
+ children: [
149
+ /* @__PURE__ */ p(c, { className: `size-4 flex-shrink-0 ${t ? "text-status-warning-text" : "text-text-muted"}` }),
150
+ /* @__PURE__ */ p("span", {
151
+ className: "truncate",
152
+ children: e.name
153
+ }),
154
+ t && /* @__PURE__ */ p(o, { className: "ml-auto size-4 flex-shrink-0" })
155
+ ]
156
+ }, e.id);
157
+ }),
158
+ !z && W.length === 0 && H && /* @__PURE__ */ p("p", {
159
+ className: "px-2.5 py-1.5 text-body-sm text-text-muted",
160
+ children: "No matching roles"
161
+ })
162
+ ] }),
163
+ U.length === 0 && (!P || W.length === 0) && H && /* @__PURE__ */ p("p", {
164
+ className: "px-2.5 py-1.5 text-body-sm text-text-muted",
165
+ children: "No matches"
166
+ })
167
+ ]
168
+ })]
169
+ }), document.body), /* @__PURE__ */ m("button", {
170
+ ref: T,
171
+ type: "button",
172
+ onClick: K,
173
+ "aria-expanded": v,
174
+ "aria-haspopup": "listbox",
175
+ 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 ${F ? "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"}`,
176
+ "data-testid": "persona-view-trigger",
177
+ children: [
178
+ F ? /* @__PURE__ */ p(c, { className: "size-4 flex-shrink-0 text-status-warning-text" }) : /* @__PURE__ */ p(o, { className: "size-4 flex-shrink-0 text-text-muted" }),
179
+ /* @__PURE__ */ p("span", {
180
+ className: "min-w-0 flex-1 truncate text-left",
181
+ children: F ? `Preview: ${G}` : G
182
+ }),
183
+ /* @__PURE__ */ p(s, { className: "size-4 flex-shrink-0 text-text-muted" })
184
+ ]
185
+ })]
186
+ });
187
+ }
188
+ function y({ everythingLabel: n = "Everything", customizeLabel: r = "Customize menu" }) {
189
+ let i = t(), { sidebarCollapsed: a, toggleSidebar: o } = e();
190
+ if (!i) return null;
191
+ let { setCustomizeOpen: s } = i, c = /* @__PURE__ */ p("button", {
10
192
  type: "button",
11
- onClick: () => g(!0),
193
+ onClick: () => {
194
+ typeof window < "u" && window.innerWidth < 768 && !a && o(), s(!0);
195
+ },
12
196
  className: "p-2 rounded-button text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors flex-shrink-0",
13
- "aria-label": c,
14
- title: c,
197
+ "aria-label": r,
198
+ title: r,
15
199
  "data-testid": "persona-customize-trigger",
16
- children: /* @__PURE__ */ a(r, { className: "size-4" })
200
+ children: /* @__PURE__ */ p(u, { className: "size-4" })
17
201
  });
18
- if (u) return /* @__PURE__ */ a("div", {
202
+ return a ? /* @__PURE__ */ p("div", {
19
203
  className: "hidden md:flex justify-center",
20
204
  "data-testid": "persona-controls-collapsed",
21
- children: y
22
- });
23
- if (_) return /* @__PURE__ */ o("div", {
24
- className: "flex items-center gap-2 rounded-button bg-status-warning-bg-subtle px-2 py-1.5",
25
- "data-testid": "persona-simulation-footer",
26
- children: [
27
- /* @__PURE__ */ a(n, { className: "size-4 flex-shrink-0 text-status-warning-text" }),
28
- /* @__PURE__ */ o("div", {
29
- className: "min-w-0 flex-1",
30
- children: [/* @__PURE__ */ a("p", {
31
- className: "text-[11px] uppercase tracking-wider text-status-warning-text",
32
- children: "Simulating"
33
- }), /* @__PURE__ */ a("p", {
34
- className: "truncate text-body-sm font-medium text-text-primary",
35
- children: _.roleName
36
- })]
37
- }),
38
- /* @__PURE__ */ a("button", {
39
- type: "button",
40
- onClick: v,
41
- className: "p-1.5 rounded-button text-text-secondary hover:bg-bg-sunken hover:text-text-primary transition-colors",
42
- "aria-label": "Exit role simulation",
43
- "data-testid": "persona-simulation-exit",
44
- children: /* @__PURE__ */ a(i, { className: "size-4" })
45
- })
46
- ]
47
- });
48
- let b = m.map((e) => ({
49
- id: e,
50
- label: e === "everything" ? s : d.find((t) => t.id === e)?.label ?? e
51
- }));
52
- return /* @__PURE__ */ o("div", {
205
+ children: c
206
+ }) : /* @__PURE__ */ m("div", {
53
207
  className: "flex items-center gap-1",
54
208
  "data-testid": "persona-controls",
55
- children: [/* @__PURE__ */ o("label", {
56
- className: "min-w-0 flex-1",
57
- children: [/* @__PURE__ */ a("span", {
58
- className: "sr-only",
59
- children: "Menu view"
60
- }), /* @__PURE__ */ o("select", {
61
- value: f,
62
- onChange: (e) => {
63
- let t = e.target.value;
64
- h(t === p ? null : t);
65
- },
66
- className: "w-full truncate rounded-button border border-border-subtle bg-bg-canvas px-2 py-1.5 text-body-sm text-text-primary hover:bg-bg-sunken transition-colors",
67
- "data-testid": "persona-surface-select",
68
- children: [b.map((e) => /* @__PURE__ */ a("option", {
69
- value: e.id,
70
- children: e.label
71
- }, e.id)), !b.some((e) => e.id === f) && /* @__PURE__ */ a("option", {
72
- value: f,
73
- children: d.find((e) => e.id === f)?.label ?? f
74
- })]
75
- })]
76
- }), y]
209
+ children: [/* @__PURE__ */ p(v, { everythingLabel: n }), c]
77
210
  });
78
211
  }
79
- function c() {
212
+ function b() {
80
213
  let e = t();
81
- return e?.simulation ? /* @__PURE__ */ o("div", {
214
+ return e?.simulation ? /* @__PURE__ */ m("div", {
82
215
  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",
83
216
  style: { marginBottom: "env(safe-area-inset-bottom)" },
84
217
  role: "status",
85
218
  "data-testid": "persona-simulation-pill",
86
219
  children: [
87
- /* @__PURE__ */ a(n, { className: "size-4 flex-shrink-0 text-status-warning-text" }),
88
- /* @__PURE__ */ o("span", {
220
+ /* @__PURE__ */ p(c, { className: "size-4 flex-shrink-0 text-status-warning-text" }),
221
+ /* @__PURE__ */ m("span", {
89
222
  className: "truncate text-body-sm text-text-primary",
90
223
  children: [
91
224
  "Viewing as ",
92
- /* @__PURE__ */ a("span", {
225
+ /* @__PURE__ */ p("span", {
93
226
  className: "font-semibold",
94
227
  children: e.simulation.roleName
95
228
  }),
96
229
  " (simulated)"
97
230
  ]
98
231
  }),
99
- /* @__PURE__ */ a("button", {
232
+ /* @__PURE__ */ p("button", {
100
233
  type: "button",
101
234
  onClick: e.stopSimulation,
102
235
  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",
@@ -107,4 +240,4 @@ function c() {
107
240
  }) : null;
108
241
  }
109
242
  //#endregion
110
- export { c as PersonaSimulationPill, s as PersonaSurfaceControls };
243
+ export { b as PersonaSimulationPill, y as PersonaSurfaceControls };
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSideNav.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductSideNav.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAgBpD,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,IAAI,EAAE,SAAS,CAAC;IAChB,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,+BAA+B;IAC/B,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACnC,0DAA0D;IAC1D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAiC,EACjC,aAA0B,GAC3B,EAAE,mBAAmB,2CA2GrB"}
1
+ {"version":3,"file":"ProductSideNav.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductSideNav.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAgBpD,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,IAAI,EAAE,SAAS,CAAC;IAChB,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,+BAA+B;IAC/B,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACnC,0DAA0D;IAC1D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,OAAO,EACP,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,aAAiC,EACjC,aAA0B,GAC3B,EAAE,mBAAmB,2CAiHrB"}
@@ -3,8 +3,8 @@ import { hasMatchingPermission as t, useSafePermissions as n } from "../shared/p
3
3
  import { useShellUi as r } from "../shared/providers/shell/ShellUiProvider.js";
4
4
  import { useSafePersonaSurface as i } from "../shared/providers/shell/PersonaSurfaceProvider.js";
5
5
  import { appendContextToPath as a, useCurrentContextSearchParams as o } from "../shared/hooks/useCurrentContextSearchParams.js";
6
- import { SideNavigation as s } from "./SideNavigation.js";
7
- import { applyNavVisibility as c } from "./sideNavigation/navVisibility.js";
6
+ import { applyNavVisibility as s } from "./sideNavigation/navVisibility.js";
7
+ import { SideNavigation as c } from "./SideNavigation.js";
8
8
  import { NavCustomizeDialog as l } from "./NavCustomizeDialog.js";
9
9
  import { PersonaSimulationPill as u, PersonaSurfaceControls as d } from "./PersonaSurfaceControls.js";
10
10
  import { useMemo as f } from "react";
@@ -23,7 +23,7 @@ function v({ logo: v, appName: y, groupOrder: b, groupLabels: x, mobileActions:
23
23
  I,
24
24
  F
25
25
  ]), R = N?.activeSurface ?? null, z = N?.overrides, B = f(() => {
26
- let { items: e } = c(j.filter((e) => e.visible !== !1).sort((e, t) => (e.order ?? 999) - (t.order ?? 999)), {
26
+ let { items: e } = s(j.filter((e) => e.visible !== !1).sort((e, t) => (e.order ?? 999) - (t.order ?? 999)), {
27
27
  hasPermission: L,
28
28
  surfaceVisibleItems: R ? R.visibleItems : null,
29
29
  labelOverrides: R?.labelOverrides,
@@ -66,7 +66,7 @@ function v({ logo: v, appName: y, groupOrder: b, groupLabels: x, mobileActions:
66
66
  return /* @__PURE__ */ h("div", {
67
67
  "data-tour": "sidenav",
68
68
  className: "h-full",
69
- children: [/* @__PURE__ */ m(s, {
69
+ children: [/* @__PURE__ */ m(c, {
70
70
  items: B,
71
71
  currentPath: D.pathname,
72
72
  collapsed: O,
@@ -79,7 +79,7 @@ function v({ logo: v, appName: y, groupOrder: b, groupLabels: x, mobileActions:
79
79
  header: C ?? U,
80
80
  footer: N ? /* @__PURE__ */ m(d, {}) : void 0,
81
81
  contextSearchParams: A
82
- }), N && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(l, {
82
+ }, N ? `${R?.id ?? "everything"}:${P?.roleId ?? ""}` : void 0), N && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(l, {
83
83
  groupLabels: x,
84
84
  groupOrder: b
85
85
  }), /* @__PURE__ */ m(u, {})] })]
@@ -1 +1 @@
1
- {"version":3,"file":"navVisibility.d.ts","sourceRoot":"","sources":["../../../src/chrome/sideNavigation/navVisibility.ts"],"names":[],"mappings":"AAAA;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E,CAgE/C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,OAAO,EAAE,EAChB,OAAO,EAAE,yBAAyB,GACjC,mBAAmB,CAKrB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,OAAO,EACpB,mBAAmB,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,EACzD,SAAS,EAAE,cAAc,GACxB,OAAO,CAGT"}
1
+ {"version":3,"file":"navVisibility.d.ts","sourceRoot":"","sources":["../../../src/chrome/sideNavigation/navVisibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;AAEhE,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;IAChD;;;OAGG;IACH,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IAC/C,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,mDAAmD;IACnD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,oEAAoE;IACpE,eAAe,EAAE,MAAM,CAAC;IACxB,iDAAiD;IACjD,eAAe,EAAE,MAAM,CAAC;CACzB;AAcD;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,OAAO,EAAE,EAChB,aAAa,EAAE,CAAC,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,SAAS,EAC5D,OAAO,GAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAmB,GAC5C,OAAO,EAAE,CAmBX;AAuDD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,EAAE,EAChB,OAAO,EAAE,IAAI,CACX,yBAAyB,EACzB,qBAAqB,GAAG,gBAAgB,GAAG,WAAW,GAAG,WAAW,CACrE,GACA;IAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CAmE/C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,OAAO,EAAE,EAChB,OAAO,EAAE,yBAAyB,GACjC,mBAAmB,CAKrB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,OAAO,EACpB,mBAAmB,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,EACzD,SAAS,EAAE,cAAc,GACxB,OAAO,CAGT"}
@@ -1 +1 @@
1
- {"version":3,"file":"useSideNavigationState.d.ts","sourceRoot":"","sources":["../../../src/chrome/sideNavigation/useSideNavigationState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGvC,UAAU,0BAA0B;IAClC,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,UAAU,4BAA4B;IACpC,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,WAAW,EACX,SAAS,EACT,gBAAgB,GACjB,EAAE,0BAA0B,GAAG,4BAA4B,CA0E3D"}
1
+ {"version":3,"file":"useSideNavigationState.d.ts","sourceRoot":"","sources":["../../../src/chrome/sideNavigation/useSideNavigationState.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIvC,UAAU,0BAA0B;IAClC,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,UAAU,4BAA4B;IACpC,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,WAAW,EACX,SAAS,EACT,gBAAgB,GACjB,EAAE,0BAA0B,GAAG,4BAA4B,CAkF3D"}
@@ -1,45 +1,46 @@
1
1
  import { findAncestorIds as e } from "./helpers.js";
2
- import { useCallback as t, useEffect as n, useRef as r, useState as i } from "react";
2
+ import { NAV_MORE_ID_PREFIX as t } from "./navVisibility.js";
3
+ import { useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
3
4
  //#region src/chrome/sideNavigation/useSideNavigationState.ts
4
- function a({ items: a, currentPath: o, collapsed: s, onToggleCollapse: c }) {
5
- let [l, u] = i(/* @__PURE__ */ new Set()), d = r(s);
6
- return n(() => {
7
- d.current = s;
8
- }, [s]), n(() => {
9
- let t = e(a, o);
10
- t.size > 0 && u((e) => {
11
- let n = new Set(e), r = !1;
12
- return t.forEach((e) => {
13
- n.has(e) || (n.add(e), r = !0);
14
- }), r ? n : e;
5
+ function o({ items: o, currentPath: s, collapsed: c, onToggleCollapse: l }) {
6
+ let [u, d] = a(/* @__PURE__ */ new Set()), f = i(c);
7
+ return r(() => {
8
+ f.current = c;
9
+ }, [c]), r(() => {
10
+ let n = new Set([...e(o, s)].filter((e) => !e.startsWith(t)));
11
+ n.size > 0 && d((e) => {
12
+ let t = new Set(e), r = !1;
13
+ return n.forEach((e) => {
14
+ t.has(e) || (t.add(e), r = !0);
15
+ }), r ? t : e;
15
16
  });
16
- }, [o, a]), n(() => {
17
- if (typeof window > "u" || !c) return;
17
+ }, [s, o]), r(() => {
18
+ if (typeof window > "u" || !l) return;
18
19
  let e = window.innerWidth < 768, t = () => {
19
20
  let t = window.innerWidth < 768;
20
- t && (!e || !d.current) && c(), e = t;
21
+ t && (!e || !f.current) && l(), e = t;
21
22
  };
22
23
  return t(), window.addEventListener("resize", t), () => {
23
24
  window.removeEventListener("resize", t);
24
25
  };
25
- }, [c]), n(() => {
26
- if (s) return;
26
+ }, [l]), r(() => {
27
+ if (c) return;
27
28
  let e = (e) => {
28
- e.key === "Escape" && c && c();
29
+ e.key === "Escape" && !e.defaultPrevented && l && l();
29
30
  };
30
31
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
31
- }, [s, c]), {
32
- expandedItems: l,
33
- toggleExpand: t((e) => {
34
- u((t) => {
32
+ }, [c, l]), {
33
+ expandedItems: u,
34
+ toggleExpand: n((e) => {
35
+ d((t) => {
35
36
  let n = new Set(t);
36
37
  return n.has(e) ? n.delete(e) : n.add(e), n;
37
38
  });
38
39
  }, []),
39
- collapseAll: t(() => {
40
- u(/* @__PURE__ */ new Set());
40
+ collapseAll: n(() => {
41
+ d(/* @__PURE__ */ new Set());
41
42
  }, [])
42
43
  };
43
44
  }
44
45
  //#endregion
45
- export { a as useSideNavigationState };
46
+ export { o as useSideNavigationState };
package/dist/chrome.js CHANGED
@@ -5,24 +5,24 @@ import { HeaderBar as r } from "./chrome/HeaderBar.js";
5
5
  import { FooterBar as i } from "./chrome/FooterBar.js";
6
6
  import { PluginFooterStrip as a } from "./chrome/PluginFooterStrip.js";
7
7
  import { DEFAULT_FOOTER_COLUMNS as o, DEFAULT_SOCIAL_LINKS as s, Footer as c } from "./chrome/Footer.js";
8
- import { SideNavigation as l } from "./chrome/SideNavigation.js";
9
- import { GlobalSearch as u } from "./chrome/GlobalSearch.js";
10
- import { CommandPalette as d } from "./chrome/CommandPalette.js";
11
- import { Breadcrumbs as f } from "./chrome/Breadcrumbs.js";
12
- import { NavLink as p } from "./chrome/NavLink.js";
13
- import { Tabs as m } from "./chrome/Tabs.js";
14
- import { Sidebar as h } from "./chrome/Sidebar.js";
15
- import { ProfileSwitcher as g } from "./chrome/ProfileSwitcher.js";
16
- import { ProductSwitcher as _ } from "./chrome/ProductSwitcher.js";
17
- import { LanguageSwitcher as v } from "./chrome/LanguageSwitcher.js";
18
- import { ContextSwitcher as y } from "./chrome/ContextSwitcher.js";
19
- import { GeographySwitcher as b } from "./chrome/GeographySwitcher.js";
20
- import { NotificationCenter as x } from "./chrome/NotificationCenter.js";
21
- import { LanguagePickerSheet as S } from "./chrome/LanguagePickerSheet.js";
22
- import { ProductPickerSheet as C } from "./chrome/ProductPickerSheet.js";
23
- import { AccountSwitcher as w } from "./chrome/AccountSwitcher.js";
24
- import { AutoBreadcrumbs as T, registerBreadcrumbName as E, unregisterBreadcrumbName as D } from "./chrome/AutoBreadcrumbs.js";
25
- import { NAV_MORE_ID_PREFIX as O, applyNavVisibility as k, applyPermissionFilter as A, applySurfaceVisibility as j, isItemEffectivelyShown as M } from "./chrome/sideNavigation/navVisibility.js";
8
+ import { NAV_MORE_ID_PREFIX as l, applyNavVisibility as u, applyPermissionFilter as d, applySurfaceVisibility as f, isItemEffectivelyShown as p } from "./chrome/sideNavigation/navVisibility.js";
9
+ import { SideNavigation as m } from "./chrome/SideNavigation.js";
10
+ import { GlobalSearch as h } from "./chrome/GlobalSearch.js";
11
+ import { CommandPalette as g } from "./chrome/CommandPalette.js";
12
+ import { Breadcrumbs as _ } from "./chrome/Breadcrumbs.js";
13
+ import { NavLink as v } from "./chrome/NavLink.js";
14
+ import { Tabs as y } from "./chrome/Tabs.js";
15
+ import { Sidebar as b } from "./chrome/Sidebar.js";
16
+ import { ProfileSwitcher as x } from "./chrome/ProfileSwitcher.js";
17
+ import { ProductSwitcher as S } from "./chrome/ProductSwitcher.js";
18
+ import { LanguageSwitcher as C } from "./chrome/LanguageSwitcher.js";
19
+ import { ContextSwitcher as w } from "./chrome/ContextSwitcher.js";
20
+ import { GeographySwitcher as T } from "./chrome/GeographySwitcher.js";
21
+ import { NotificationCenter as E } from "./chrome/NotificationCenter.js";
22
+ import { LanguagePickerSheet as D } from "./chrome/LanguagePickerSheet.js";
23
+ import { ProductPickerSheet as O } from "./chrome/ProductPickerSheet.js";
24
+ import { AccountSwitcher as k } from "./chrome/AccountSwitcher.js";
25
+ import { AutoBreadcrumbs as A, registerBreadcrumbName as j, unregisterBreadcrumbName as M } from "./chrome/AutoBreadcrumbs.js";
26
26
  import { NavCustomizeDialog as N } from "./chrome/NavCustomizeDialog.js";
27
27
  import { PersonaSimulationPill as P, PersonaSurfaceControls as F } from "./chrome/PersonaSurfaceControls.js";
28
28
  import { ProductSideNav as I } from "./chrome/ProductSideNav.js";
@@ -37,4 +37,4 @@ import { PluginToolbar as W } from "./chrome/PluginToolbar.js";
37
37
  import { PluginWidgetGrid as G } from "./chrome/PluginWidgetGrid.js";
38
38
  import { PluginContextMenuTarget as K } from "./chrome/PluginContextMenuTarget.js";
39
39
  import { ThemePreferences as q } from "./chrome/ThemePreferences.js";
40
- export { w as AccountSwitcher, t as AppShellLayout, T as AutoBreadcrumbs, L as BrandMark, f as Breadcrumbs, d as CommandPalette, y as ContextSwitcher, o as DEFAULT_FOOTER_COLUMNS, s as DEFAULT_SOCIAL_LINKS, R as DynamicFooter, c as Footer, i as FooterBar, b as GeographySwitcher, u as GlobalSearch, r as HeaderBar, S as LanguagePickerSheet, v as LanguageSwitcher, O as NAV_MORE_ID_PREFIX, N as NavCustomizeDialog, p as NavLink, x as NotificationCenter, n as PageHeader, B as PanelContainer, z as PanelTabs, P as PersonaSimulationPill, F as PersonaSurfaceControls, K as PluginContextMenuTarget, a as PluginFooterStrip, H as PluginRoutes, U as PluginSettingsPage, W as PluginToolbar, G as PluginWidgetGrid, C as ProductPickerSheet, I as ProductSideNav, _ as ProductSwitcher, g as ProfileSwitcher, e as ShortcutHelpDialog, l as SideNavigation, h as Sidebar, V as StatusBar, m as Tabs, q as ThemePreferences, k as applyNavVisibility, A as applyPermissionFilter, j as applySurfaceVisibility, M as isItemEffectivelyShown, E as registerBreadcrumbName, D as unregisterBreadcrumbName };
40
+ export { k as AccountSwitcher, t as AppShellLayout, A as AutoBreadcrumbs, L as BrandMark, _ as Breadcrumbs, g as CommandPalette, w as ContextSwitcher, o as DEFAULT_FOOTER_COLUMNS, s as DEFAULT_SOCIAL_LINKS, R as DynamicFooter, c as Footer, i as FooterBar, T as GeographySwitcher, h as GlobalSearch, r as HeaderBar, D as LanguagePickerSheet, C as LanguageSwitcher, l as NAV_MORE_ID_PREFIX, N as NavCustomizeDialog, v as NavLink, E as NotificationCenter, n as PageHeader, B as PanelContainer, z as PanelTabs, P as PersonaSimulationPill, F as PersonaSurfaceControls, K as PluginContextMenuTarget, a as PluginFooterStrip, H as PluginRoutes, U as PluginSettingsPage, W as PluginToolbar, G as PluginWidgetGrid, O as ProductPickerSheet, I as ProductSideNav, S as ProductSwitcher, x as ProfileSwitcher, e as ShortcutHelpDialog, m as SideNavigation, b as Sidebar, V as StatusBar, y as Tabs, q as ThemePreferences, u as applyNavVisibility, d as applyPermissionFilter, f as applySurfaceVisibility, p as isItemEffectivelyShown, j as registerBreadcrumbName, M as unregisterBreadcrumbName };
@@ -1 +1 @@
1
- {"version":3,"file":"PersonaSurfaceProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/PersonaSurfaceProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAO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EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CAClC;AAED,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAqB,GACtB,EAAE,2BAA2B,2CAkM7B;AAMD,uEAAuE;AACvE,wBAAgB,iBAAiB,IAAI,0BAA0B,CAM9D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,0BAA0B,GAAG,IAAI,CAEzE"}
1
+ {"version":3,"file":"PersonaSurfaceProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/PersonaSurfaceProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AASf,MAAM,WAAW,wBAAwB;IACvC,6EAA6E;IAC7E,EAAE,EAAE,MAAM,CAAC;IACX,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gFAAgF;IAChF,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC;AAED,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ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MAAM,IAAI,CAAC;IAC3B,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,uBAAuB,EAAE,OAAO,CAAC;IACjC,yEAAyE;IACzE,oBAAoB,EAAE,MAAM,IAAI,CAAC;CAClC;AA8BD,wBAAgB,oCAAoC,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,EAAE,CAcpF;AAMD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,wBAAwB,EAAE,EACpC,SAAS,EAAE,MAAM,EAAE,GAClB,MAAM,CASR;AA4FD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,SAAS,CAAC;IACpB,gEAAgE;IAChE,QAAQ,EAAE,wBAAwB,EAAE,CAAC;IACrC;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CAClC;AAED,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAqB,GACtB,EAAE,2BAA2B,2CAyM7B;AAMD,uEAAuE;AACvE,wBAAgB,iBAAiB,IAAI,0BAA0B,CAM9D;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,0BAA0B,GAAG,IAAI,CAEzE"}
@@ -67,7 +67,8 @@ function v(e) {
67
67
  }
68
68
  function y(e, t) {
69
69
  if (!(typeof window > "u")) try {
70
- !t.surfaceId && Object.keys(t.overrides ?? {}).length === 0 ? window.localStorage.removeItem(e) : window.localStorage.setItem(e, JSON.stringify(t));
70
+ let n = Object.values(t.overridesBySurface ?? {}).some((e) => Object.keys(e).length > 0);
71
+ !t.surfaceId && !n ? window.localStorage.removeItem(e) : window.localStorage.setItem(e, JSON.stringify(t));
71
72
  } catch {}
72
73
  }
73
74
  var b = "\n query NavSimulatableRoles($scopeId: String!, $filter: RoleFilterInput, $pagination: PaginationInput) {\n roles(scopeId: $scopeId, filter: $filter, pagination: $pagination) {\n id\n name\n templateKey\n priority\n defaultPermissions {\n resourceType\n level\n }\n }\n }\n";
@@ -143,20 +144,23 @@ function x({ children: n, surfaces: r, productKey: f, gateway: p = "workspace" }
143
144
  ...t,
144
145
  surfaceId: e ?? void 0
145
146
  }));
146
- }, [E]), U = o(() => w.overrides ?? {}, [w.overrides]), W = i((e, t) => {
147
+ }, [E]), U = o(() => w.overridesBySurface?.[z] ?? {}, [w.overridesBySurface, z]), W = i((e, t) => {
147
148
  E((n) => {
148
- let r = { ...n.overrides ?? {} };
149
- return t === null ? delete r[e] : r[e] = t, {
149
+ let r = { ...n.overridesBySurface ?? {} }, i = { ...r[z] ?? {} };
150
+ return t === null ? delete i[e] : i[e] = t, Object.keys(i).length === 0 ? delete r[z] : r[z] = i, {
150
151
  ...n,
151
- overrides: r
152
+ overridesBySurface: r
152
153
  };
153
154
  });
154
- }, [E]), G = i(() => {
155
- E((e) => ({
156
- ...e,
157
- overrides: {}
158
- }));
159
- }, [E]), [K, q] = s(!1), J = o(() => ({
155
+ }, [E, z]), G = i(() => {
156
+ E((e) => {
157
+ let t = { ...e.overridesBySurface ?? {} };
158
+ return delete t[z], {
159
+ ...e,
160
+ overridesBySurface: t
161
+ };
162
+ });
163
+ }, [E, z]), [K, q] = s(!1), J = o(() => ({
160
164
  surfaces: r,
161
165
  activeSurfaceId: z,
162
166
  activeSurface: B,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.722.2",
3
+ "version": "2026.723.2",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "imports": {