@burdenoff/fe-libs 2026.722.2 → 2026.723.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.
@@ -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;AAiBH,MAAM,WAAW,2BAA2B;IAC1C,sEAAsE;IACtE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AA8OD,wBAAgB,sBAAsB,CAAC,EACrC,eAA8B,EAC9B,cAAiC,GAClC,EAAE,2BAA2B,kDA6C7B;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,mDAyBpC"}
@@ -1,102 +1,202 @@
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";
5
6
  //#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", {
7
+ function h(e, t) {
8
+ let { surfaces: n, availableSurfaceIds: r, resolvedSurfaceId: i } = e, a = (e) => e === "everything" ? t : n.find((t) => t.id === e)?.label ?? e, o = [...r];
9
+ return o.sort((e, t) => {
10
+ let n = (e) => e === i ? 0 : e === "everything" ? 2 : 1;
11
+ return n(e) - n(t);
12
+ }), o.map((e) => ({
13
+ id: e,
14
+ label: a(e),
15
+ isResolved: e === i
16
+ }));
17
+ }
18
+ function g({ everythingLabel: e }) {
19
+ let u = t(), [g, _] = a(!1), [v, y] = a(""), b = i(null), x = i(null), S = n(() => {
20
+ _(!1), y("");
21
+ }, []);
22
+ if (r(() => {
23
+ if (!g) return;
24
+ let e = (e) => {
25
+ b.current?.contains(e.target) || S();
26
+ };
27
+ return document.addEventListener("mousedown", e), document.addEventListener("touchstart", e), () => {
28
+ document.removeEventListener("mousedown", e), document.removeEventListener("touchstart", e);
29
+ };
30
+ }, [g, S]), r(() => {
31
+ g && x.current?.focus();
32
+ }, [g]), !u) return null;
33
+ let { activeSurfaceId: C, surfaces: w, resolvedSurfaceId: T, setSurfaceId: E, canSimulate: D, simulation: O, startSimulation: k, stopSimulation: A, simulatableRoles: j, simulatableRolesLoading: M, loadSimulatableRoles: N } = u, P = h(u, e), F = v.trim().toLowerCase(), I = F ? P.filter((e) => e.label.toLowerCase().includes(F)) : P, L = F ? j.filter((e) => e.name.toLowerCase().includes(F)) : j, R = O ? O.roleName : P.find((e) => e.id === C)?.label ?? w.find((e) => e.id === C)?.label ?? e, z = () => {
34
+ if (g) {
35
+ S();
36
+ return;
37
+ }
38
+ D && N(), _(!0);
39
+ }, B = (e) => {
40
+ e.key === "Escape" && g && (e.preventDefault(), e.stopPropagation(), S());
41
+ }, V = (e) => {
42
+ O && A(), E(e === T ? null : e), S();
43
+ }, H = "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", U = "px-2.5 pb-1 pt-2.5 text-[11px] font-medium uppercase tracking-wider text-text-muted";
44
+ return /* @__PURE__ */ m("div", {
45
+ ref: b,
46
+ className: "relative min-w-0 flex-1",
47
+ onKeyDown: B,
48
+ children: [g && /* @__PURE__ */ m("div", {
49
+ className: "absolute inset-x-0 bottom-full z-20 mb-2 flex max-h-80 flex-col overflow-hidden rounded-card border border-border-subtle bg-bg-canvas shadow-lg",
50
+ role: "listbox",
51
+ "data-testid": "persona-view-panel",
52
+ children: [/* @__PURE__ */ m("div", {
53
+ className: "flex items-center gap-2 border-b border-border-subtle px-2.5 py-2",
54
+ children: [/* @__PURE__ */ p(l, { className: "size-4 flex-shrink-0 text-text-muted" }), /* @__PURE__ */ p("input", {
55
+ ref: x,
56
+ value: v,
57
+ onChange: (e) => y(e.target.value),
58
+ placeholder: "Search views & roles",
59
+ className: "w-full bg-transparent text-body-sm text-text-primary outline-none placeholder:text-text-muted",
60
+ "data-testid": "persona-view-search"
61
+ })]
62
+ }), /* @__PURE__ */ m("div", {
63
+ className: "overflow-y-auto py-1",
64
+ children: [
65
+ I.length > 0 && /* @__PURE__ */ p("p", {
66
+ className: U,
67
+ children: "Views"
68
+ }),
69
+ I.map((e) => {
70
+ let t = !O && e.id === C;
71
+ return /* @__PURE__ */ m("button", {
72
+ type: "button",
73
+ onClick: () => V(e.id),
74
+ className: H,
75
+ "data-testid": `persona-view-${e.id}`,
76
+ children: [
77
+ /* @__PURE__ */ p(o, { className: `size-4 flex-shrink-0 ${t ? "text-text-primary" : "invisible"}` }),
78
+ /* @__PURE__ */ p("span", {
79
+ className: "truncate",
80
+ children: e.label
81
+ }),
82
+ e.isResolved && /* @__PURE__ */ p("span", {
83
+ className: "ml-auto flex-shrink-0 rounded-full bg-bg-sunken px-2 py-0.5 text-[11px] text-text-secondary",
84
+ children: "Your role"
85
+ })
86
+ ]
87
+ }, e.id);
88
+ }),
89
+ D && /* @__PURE__ */ m(f, { children: [
90
+ /* @__PURE__ */ p("p", {
91
+ className: U,
92
+ children: "Preview a role"
93
+ }),
94
+ O && /* @__PURE__ */ m("button", {
95
+ type: "button",
96
+ onClick: () => {
97
+ A(), S();
98
+ },
99
+ className: `${H} text-status-warning-text`,
100
+ "data-testid": "persona-view-exit-preview",
101
+ children: [/* @__PURE__ */ p(d, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ p("span", { children: "Exit preview" })]
102
+ }),
103
+ M && /* @__PURE__ */ p("p", {
104
+ className: "px-2.5 py-1.5 text-body-sm text-text-muted",
105
+ children: "Loading roles…"
106
+ }),
107
+ L.map((e) => {
108
+ let t = O?.roleId === e.id;
109
+ return /* @__PURE__ */ m("button", {
110
+ type: "button",
111
+ onClick: () => {
112
+ k(e), S();
113
+ },
114
+ className: H,
115
+ "data-testid": `persona-preview-${e.id}`,
116
+ children: [
117
+ /* @__PURE__ */ p(c, { className: `size-4 flex-shrink-0 ${t ? "text-status-warning-text" : "text-text-muted"}` }),
118
+ /* @__PURE__ */ p("span", {
119
+ className: "truncate",
120
+ children: e.name
121
+ }),
122
+ t && /* @__PURE__ */ p(o, { className: "ml-auto size-4 flex-shrink-0" })
123
+ ]
124
+ }, e.id);
125
+ }),
126
+ !M && L.length === 0 && F && /* @__PURE__ */ p("p", {
127
+ className: "px-2.5 py-1.5 text-body-sm text-text-muted",
128
+ children: "No matching roles"
129
+ })
130
+ ] }),
131
+ I.length === 0 && (!D || L.length === 0) && F && /* @__PURE__ */ p("p", {
132
+ className: "px-2.5 py-1.5 text-body-sm text-text-muted",
133
+ children: "No matches"
134
+ })
135
+ ]
136
+ })]
137
+ }), /* @__PURE__ */ m("button", {
138
+ type: "button",
139
+ onClick: z,
140
+ "aria-expanded": g,
141
+ "aria-haspopup": "listbox",
142
+ 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 ${O ? "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"}`,
143
+ "data-testid": "persona-view-trigger",
144
+ children: [
145
+ O ? /* @__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" }),
146
+ /* @__PURE__ */ p("span", {
147
+ className: "min-w-0 flex-1 truncate text-left",
148
+ children: O ? `Preview: ${R}` : R
149
+ }),
150
+ /* @__PURE__ */ p(s, { className: "size-4 flex-shrink-0 text-text-muted" })
151
+ ]
152
+ })]
153
+ });
154
+ }
155
+ function _({ everythingLabel: n = "Everything", customizeLabel: r = "Customize menu" }) {
156
+ let i = t(), { sidebarCollapsed: a, toggleSidebar: o } = e();
157
+ if (!i) return null;
158
+ let { setCustomizeOpen: s } = i, c = /* @__PURE__ */ p("button", {
10
159
  type: "button",
11
- onClick: () => g(!0),
160
+ onClick: () => {
161
+ typeof window < "u" && window.innerWidth < 768 && !a && o(), s(!0);
162
+ },
12
163
  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,
164
+ "aria-label": r,
165
+ title: r,
15
166
  "data-testid": "persona-customize-trigger",
16
- children: /* @__PURE__ */ a(r, { className: "size-4" })
167
+ children: /* @__PURE__ */ p(u, { className: "size-4" })
17
168
  });
18
- if (u) return /* @__PURE__ */ a("div", {
169
+ return a ? /* @__PURE__ */ p("div", {
19
170
  className: "hidden md:flex justify-center",
20
171
  "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", {
172
+ children: c
173
+ }) : /* @__PURE__ */ m("div", {
53
174
  className: "flex items-center gap-1",
54
175
  "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]
176
+ children: [/* @__PURE__ */ p(g, { everythingLabel: n }), c]
77
177
  });
78
178
  }
79
- function c() {
179
+ function v() {
80
180
  let e = t();
81
- return e?.simulation ? /* @__PURE__ */ o("div", {
181
+ return e?.simulation ? /* @__PURE__ */ m("div", {
82
182
  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
183
  style: { marginBottom: "env(safe-area-inset-bottom)" },
84
184
  role: "status",
85
185
  "data-testid": "persona-simulation-pill",
86
186
  children: [
87
- /* @__PURE__ */ a(n, { className: "size-4 flex-shrink-0 text-status-warning-text" }),
88
- /* @__PURE__ */ o("span", {
187
+ /* @__PURE__ */ p(c, { className: "size-4 flex-shrink-0 text-status-warning-text" }),
188
+ /* @__PURE__ */ m("span", {
89
189
  className: "truncate text-body-sm text-text-primary",
90
190
  children: [
91
191
  "Viewing as ",
92
- /* @__PURE__ */ a("span", {
192
+ /* @__PURE__ */ p("span", {
93
193
  className: "font-semibold",
94
194
  children: e.simulation.roleName
95
195
  }),
96
196
  " (simulated)"
97
197
  ]
98
198
  }),
99
- /* @__PURE__ */ a("button", {
199
+ /* @__PURE__ */ p("button", {
100
200
  type: "button",
101
201
  onClick: e.stopSimulation,
102
202
  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 +207,4 @@ function c() {
107
207
  }) : null;
108
208
  }
109
209
  //#endregion
110
- export { c as PersonaSimulationPill, s as PersonaSurfaceControls };
210
+ export { v as PersonaSimulationPill, _ 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,mFA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,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,2CA+GrB"}
@@ -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":"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,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;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I,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,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,KAAK,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;KAC/C,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;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,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,2CA+M7B;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.1",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "imports": {