@plexusone/shell 0.0.0-stage → 0.2.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/index.js ADDED
@@ -0,0 +1,948 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ AppShell: () => AppShell,
24
+ Breadcrumbs: () => Breadcrumbs,
25
+ Navbar: () => Navbar,
26
+ OrgSwitcher: () => OrgSwitcher,
27
+ OrganizationSwitcher: () => OrganizationSwitcher,
28
+ ProductSwitcher: () => ProductSwitcher,
29
+ ProfileMenu: () => ProfileMenu,
30
+ ShellProvider: () => ShellProvider,
31
+ Sidebar: () => Sidebar,
32
+ THEME_CHANGE_EVENT: () => THEME_CHANGE_EVENT,
33
+ THEME_STORAGE_KEY: () => THEME_STORAGE_KEY,
34
+ ThemeToggle: () => ThemeToggle,
35
+ UserMenu: () => UserMenu,
36
+ applyStoredTheme: () => applyStoredTheme,
37
+ applyTheme: () => applyTheme,
38
+ initials: () => initials,
39
+ nextTheme: () => nextTheme,
40
+ readStoredTheme: () => readStoredTheme,
41
+ resolveTheme: () => resolveTheme,
42
+ switcherApps: () => switcherApps,
43
+ useShell: () => useShell,
44
+ useShellOptional: () => useShellOptional,
45
+ useTheme: () => useTheme
46
+ });
47
+ module.exports = __toCommonJS(index_exports);
48
+
49
+ // src/ShellContext.tsx
50
+ var import_react = require("react");
51
+ var import_jsx_runtime = require("react/jsx-runtime");
52
+ var ShellContext = (0, import_react.createContext)(null);
53
+ var COLLAPSED_KEY = "systemforge:sidebar-collapsed";
54
+ function ShellProvider({
55
+ children,
56
+ defaultCollapsed = false,
57
+ onNavigate,
58
+ onCollapseChange
59
+ }) {
60
+ const [sidebarCollapsed, setSidebarCollapsedState] = (0, import_react.useState)(() => {
61
+ if (typeof window !== "undefined") {
62
+ const stored = localStorage.getItem(COLLAPSED_KEY);
63
+ return stored ? stored === "true" : defaultCollapsed;
64
+ }
65
+ return defaultCollapsed;
66
+ });
67
+ const [sidebarVisible, setSidebarVisible] = (0, import_react.useState)(false);
68
+ const [currentPath, setCurrentPath] = (0, import_react.useState)(() => {
69
+ if (typeof window !== "undefined") {
70
+ return window.location.pathname;
71
+ }
72
+ return "/";
73
+ });
74
+ const toggleSidebar = (0, import_react.useCallback)(() => {
75
+ setSidebarCollapsedState((prev) => {
76
+ const next = !prev;
77
+ if (typeof window !== "undefined") {
78
+ localStorage.setItem(COLLAPSED_KEY, String(next));
79
+ }
80
+ onCollapseChange?.(next);
81
+ return next;
82
+ });
83
+ }, [onCollapseChange]);
84
+ const setSidebarCollapsed = (0, import_react.useCallback)(
85
+ (collapsed) => {
86
+ setSidebarCollapsedState(collapsed);
87
+ if (typeof window !== "undefined") {
88
+ localStorage.setItem(COLLAPSED_KEY, String(collapsed));
89
+ }
90
+ onCollapseChange?.(collapsed);
91
+ },
92
+ [onCollapseChange]
93
+ );
94
+ const toggleSidebarVisible = (0, import_react.useCallback)(() => {
95
+ setSidebarVisible((prev) => !prev);
96
+ }, []);
97
+ const navigate = (0, import_react.useCallback)(
98
+ (href) => {
99
+ if (onNavigate) {
100
+ onNavigate(href);
101
+ } else {
102
+ window.location.assign(href);
103
+ }
104
+ setCurrentPath(href);
105
+ setSidebarVisible(false);
106
+ },
107
+ [onNavigate]
108
+ );
109
+ (0, import_react.useEffect)(() => {
110
+ const handlePopState = () => {
111
+ setCurrentPath(window.location.pathname);
112
+ };
113
+ window.addEventListener("popstate", handlePopState);
114
+ return () => window.removeEventListener("popstate", handlePopState);
115
+ }, []);
116
+ const value = (0, import_react.useMemo)(
117
+ () => ({
118
+ sidebarCollapsed,
119
+ toggleSidebar,
120
+ setSidebarCollapsed,
121
+ sidebarVisible,
122
+ toggleSidebarVisible,
123
+ currentPath,
124
+ setCurrentPath,
125
+ navigate
126
+ }),
127
+ [
128
+ sidebarCollapsed,
129
+ toggleSidebar,
130
+ setSidebarCollapsed,
131
+ sidebarVisible,
132
+ toggleSidebarVisible,
133
+ currentPath,
134
+ navigate
135
+ ]
136
+ );
137
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ShellContext.Provider, { value, children });
138
+ }
139
+ function useShell() {
140
+ const context = (0, import_react.useContext)(ShellContext);
141
+ if (!context) {
142
+ throw new Error("useShell must be used within a ShellProvider");
143
+ }
144
+ return context;
145
+ }
146
+ function useShellOptional() {
147
+ return (0, import_react.useContext)(ShellContext);
148
+ }
149
+
150
+ // src/Sidebar.tsx
151
+ var import_tenant = require("@plexusone/tenant");
152
+ var import_ui = require("@plexusone/ui");
153
+ var import_jsx_runtime2 = require("react/jsx-runtime");
154
+ function NavItemComponent({
155
+ item,
156
+ isCollapsed,
157
+ onNavigate,
158
+ currentPath
159
+ }) {
160
+ const { hasRole } = (0, import_tenant.useRoleCheck)();
161
+ if (item.roles && !hasRole(item.roles)) {
162
+ return null;
163
+ }
164
+ const isActive = item.isActive ?? currentPath === item.href;
165
+ const handleClick = (event) => {
166
+ if (item.external) return;
167
+ event.preventDefault();
168
+ if (onNavigate) {
169
+ onNavigate(item.href);
170
+ } else {
171
+ window.location.assign(item.href);
172
+ }
173
+ };
174
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
175
+ "a",
176
+ {
177
+ href: item.href,
178
+ onClick: handleClick,
179
+ target: item.external ? "_blank" : void 0,
180
+ rel: item.external ? "noopener noreferrer" : void 0,
181
+ title: isCollapsed ? item.label : void 0,
182
+ className: (0, import_ui.cn)(
183
+ "flex items-center gap-3 mb-0.5 no-underline rounded-md text-sm transition-colors",
184
+ isCollapsed ? "p-2.5 justify-center" : "px-3 py-2.5",
185
+ isActive ? "bg-accent text-primary font-medium" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground"
186
+ ),
187
+ children: [
188
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "flex items-center justify-center w-5 h-5 flex-shrink-0", children: item.icon }),
189
+ !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
190
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "flex-1", children: item.label }),
191
+ item.badge !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui.Badge, { variant: "secondary", className: "px-1.5 py-0.5 text-xs", children: item.badge }),
192
+ item.external && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui.ExternalLinkIcon, { className: "h-3 w-3 text-muted-foreground" })
193
+ ] })
194
+ ]
195
+ }
196
+ );
197
+ }
198
+ function NavSectionComponent({
199
+ section,
200
+ isCollapsed,
201
+ onNavigate,
202
+ currentPath
203
+ }) {
204
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "mb-4", children: [
205
+ section.title && !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "px-3 py-2 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: section.title }),
206
+ section.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
207
+ NavItemComponent,
208
+ {
209
+ item,
210
+ isCollapsed,
211
+ onNavigate,
212
+ currentPath
213
+ },
214
+ item.id
215
+ ))
216
+ ] });
217
+ }
218
+ function Sidebar({
219
+ navigation,
220
+ isCollapsed,
221
+ onToggleCollapse,
222
+ logo,
223
+ logoCollapsed,
224
+ onNavigate,
225
+ currentPath
226
+ }) {
227
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
228
+ "aside",
229
+ {
230
+ className: (0, import_ui.cn)(
231
+ "h-screen bg-background border-r border-border flex flex-col transition-[width] duration-200 overflow-hidden flex-shrink-0",
232
+ isCollapsed ? "w-16" : "w-64"
233
+ ),
234
+ children: [
235
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
236
+ "div",
237
+ {
238
+ className: (0, import_ui.cn)(
239
+ "p-4 border-b border-border flex items-center h-16",
240
+ isCollapsed ? "justify-center" : "justify-start"
241
+ ),
242
+ children: isCollapsed ? logoCollapsed || logo : logo
243
+ }
244
+ ),
245
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("nav", { className: "flex-1 p-2 overflow-y-auto overflow-x-hidden", children: navigation.map((section, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
246
+ NavSectionComponent,
247
+ {
248
+ section,
249
+ isCollapsed,
250
+ onNavigate,
251
+ currentPath
252
+ },
253
+ section.title || index
254
+ )) }),
255
+ onToggleCollapse && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "p-2 border-t border-border", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
256
+ import_ui.Button,
257
+ {
258
+ variant: "ghost",
259
+ onClick: onToggleCollapse,
260
+ "aria-label": isCollapsed ? "Expand sidebar" : "Collapse sidebar",
261
+ className: (0, import_ui.cn)("w-full", isCollapsed ? "justify-center" : "justify-start"),
262
+ children: isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui.PanelLeftOpenIcon, { className: "h-5 w-5" }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
263
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui.PanelLeftCloseIcon, { className: "h-5 w-5 mr-2" }),
264
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "Collapse" })
265
+ ] })
266
+ }
267
+ ) })
268
+ ]
269
+ }
270
+ );
271
+ }
272
+
273
+ // src/Navbar.tsx
274
+ var import_ui9 = require("@plexusone/ui");
275
+
276
+ // src/OrgSwitcher.tsx
277
+ var import_tenant2 = require("@plexusone/tenant");
278
+ var import_ui2 = require("@plexusone/ui");
279
+ var import_jsx_runtime3 = require("react/jsx-runtime");
280
+ function OrgSwitcher({ compact = false }) {
281
+ const tenant = (0, import_tenant2.useTenantOptional)();
282
+ if (!tenant) {
283
+ return null;
284
+ }
285
+ const { currentOrg, organizations, setCurrentOrg, isLoading } = tenant;
286
+ if (isLoading) {
287
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "px-3 py-2 bg-secondary rounded-md opacity-50 text-sm", children: "Loading..." });
288
+ }
289
+ if (!currentOrg) {
290
+ return null;
291
+ }
292
+ const handleSelect = (orgId) => {
293
+ setCurrentOrg(orgId);
294
+ };
295
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_ui2.DropdownMenu, { children: [
296
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui2.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
297
+ "button",
298
+ {
299
+ type: "button",
300
+ className: (0, import_ui2.cn)(
301
+ "flex items-center gap-2 bg-secondary border border-border rounded-md cursor-pointer text-left",
302
+ compact ? "p-2" : "px-3 py-2 min-w-[180px]"
303
+ ),
304
+ children: [
305
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_ui2.Avatar, { className: "h-5 w-5 rounded", children: [
306
+ currentOrg.logo_url ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui2.AvatarImage, { src: currentOrg.logo_url, alt: "" }) : null,
307
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui2.AvatarFallback, { className: "rounded bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui2.BuildingIcon, { className: "h-4 w-4 text-muted-foreground" }) })
308
+ ] }),
309
+ !compact && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
310
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm font-medium text-foreground", children: currentOrg.name }),
311
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui2.ChevronDownIcon, { className: "h-4 w-4 text-muted-foreground" })
312
+ ] })
313
+ ]
314
+ }
315
+ ) }),
316
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui2.DropdownMenuContent, { align: "start", className: "min-w-[200px]", children: organizations.map((org) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
317
+ import_ui2.DropdownMenuItem,
318
+ {
319
+ onClick: () => handleSelect(org.id),
320
+ className: (0, import_ui2.cn)("cursor-pointer", org.id === currentOrg.id && "bg-accent"),
321
+ children: [
322
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_ui2.Avatar, { className: "h-5 w-5 mr-2 rounded", children: [
323
+ org.logo_url ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui2.AvatarImage, { src: org.logo_url, alt: "" }) : null,
324
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui2.AvatarFallback, { className: "rounded bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui2.BuildingIcon, { className: "h-4 w-4 text-muted-foreground" }) })
325
+ ] }),
326
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm", children: org.name }),
327
+ org.id === currentOrg.id && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_ui2.CheckIcon, { className: "h-4 w-4 text-primary ml-2" })
328
+ ]
329
+ },
330
+ org.id
331
+ )) })
332
+ ] });
333
+ }
334
+
335
+ // src/OrganizationSwitcher.tsx
336
+ var import_auth = require("@plexusone/auth");
337
+ var import_ui3 = require("@plexusone/ui");
338
+ var import_jsx_runtime4 = require("react/jsx-runtime");
339
+ function OrganizationSwitcher({
340
+ value,
341
+ onChange,
342
+ memberships,
343
+ alwaysShow = false,
344
+ className
345
+ }) {
346
+ const ctx = (0, import_auth.useSessionOptional)();
347
+ const list = memberships ?? ctx?.session.user?.memberships ?? [];
348
+ if (list.length === 0 || list.length === 1 && !alwaysShow) {
349
+ return null;
350
+ }
351
+ const current = list.find((m) => m.organizationId === value);
352
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_ui3.DropdownMenu, { children: [
353
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_ui3.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
354
+ "button",
355
+ {
356
+ type: "button",
357
+ "aria-label": "Switch organization",
358
+ className: (0, import_ui3.cn)(
359
+ "flex items-center gap-2 px-3 py-1.5 min-w-[160px] bg-secondary border border-border rounded-md text-left text-sm",
360
+ className
361
+ ),
362
+ children: [
363
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_ui3.BuildingIcon, { className: "h-4 w-4 text-muted-foreground" }),
364
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "flex-1 truncate font-medium text-foreground", children: current ? (0, import_auth.organizationLabel)(current) : "Choose organization" }),
365
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_ui3.ChevronDownIcon, { className: "h-4 w-4 text-muted-foreground" })
366
+ ]
367
+ }
368
+ ) }),
369
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_ui3.DropdownMenuContent, { align: "start", className: "min-w-[200px]", children: list.map((m) => {
370
+ const selected = m.organizationId === value;
371
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
372
+ import_ui3.DropdownMenuItem,
373
+ {
374
+ onSelect: () => {
375
+ if (!selected) onChange(m.organizationId);
376
+ },
377
+ "aria-current": selected ? "true" : void 0,
378
+ className: (0, import_ui3.cn)("cursor-pointer", selected && "bg-accent"),
379
+ children: [
380
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "flex-1 truncate text-sm", children: (0, import_auth.organizationLabel)(m) }),
381
+ selected && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_ui3.CheckIcon, { className: "h-4 w-4 ml-2 text-primary" })
382
+ ]
383
+ },
384
+ m.organizationId
385
+ );
386
+ }) })
387
+ ] });
388
+ }
389
+
390
+ // src/ProductSwitcher.tsx
391
+ var import_auth2 = require("@plexusone/auth");
392
+ var import_ui4 = require("@plexusone/ui");
393
+
394
+ // src/switcher.ts
395
+ function switcherApps(apps, self, membership) {
396
+ const others = apps.filter((a) => a.id !== self.id && Boolean(membership?.applications[a.id]));
397
+ const fromCatalog = apps.find((a) => a.id === self.id);
398
+ return [fromCatalog ? { ...fromCatalog, ...self } : self, ...others];
399
+ }
400
+
401
+ // src/ProductSwitcher.tsx
402
+ var import_jsx_runtime5 = require("react/jsx-runtime");
403
+ function ProductSwitcher({
404
+ self,
405
+ organizationId,
406
+ apps,
407
+ onNavigate,
408
+ className
409
+ }) {
410
+ const ctx = (0, import_auth2.useSessionOptional)();
411
+ const session = ctx?.session;
412
+ const catalog = apps ?? session?.apps ?? [];
413
+ const membership = session ? (0, import_auth2.membershipFor)(session, organizationId) : void 0;
414
+ const entries = switcherApps(catalog, self, membership);
415
+ const follow = (url) => (e) => {
416
+ if (!onNavigate || e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey) {
417
+ return;
418
+ }
419
+ e.preventDefault();
420
+ onNavigate(url);
421
+ };
422
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("nav", { "aria-label": "Products", className: (0, import_ui4.cn)("flex items-center gap-1", className), children: entries.map(
423
+ (app) => app.id === self.id ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
424
+ "span",
425
+ {
426
+ "aria-current": "page",
427
+ className: "px-3 py-1.5 rounded-md text-sm font-medium bg-accent text-foreground",
428
+ children: app.name
429
+ },
430
+ app.id
431
+ ) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
432
+ "a",
433
+ {
434
+ href: app.url,
435
+ onClick: follow(app.url),
436
+ className: "px-3 py-1.5 rounded-md text-sm text-muted-foreground hover:bg-accent hover:text-foreground",
437
+ children: app.name
438
+ },
439
+ app.id
440
+ )
441
+ ) });
442
+ }
443
+
444
+ // src/Navbar.tsx
445
+ var import_auth5 = require("@plexusone/auth");
446
+
447
+ // src/ProfileMenu.tsx
448
+ var import_auth3 = require("@plexusone/auth");
449
+ var import_ui5 = require("@plexusone/ui");
450
+ var import_jsx_runtime6 = require("react/jsx-runtime");
451
+ function initials(nameOrEmail) {
452
+ const s = (nameOrEmail ?? "").trim();
453
+ if (!s) return "?";
454
+ const words = s.split(/[\s@._-]+/).filter(Boolean);
455
+ const letters = words.length > 1 ? words[0][0] + words[1][0] : s[0];
456
+ return letters.toUpperCase();
457
+ }
458
+ function ProfileMenu({
459
+ appId,
460
+ organizationId,
461
+ items = [],
462
+ onNavigate,
463
+ onSignOutError = (err) => console.error("signing out failed", err)
464
+ }) {
465
+ const ctx = (0, import_auth3.useSessionOptional)();
466
+ const user = ctx?.session.user;
467
+ if (!ctx || ctx.status !== "authenticated" || !user) {
468
+ return null;
469
+ }
470
+ const who = user.name || user.email || "Signed in";
471
+ const membership = (0, import_auth3.membershipFor)(ctx.session, organizationId);
472
+ const role = membership ? appId && membership.applications[appId] || membership.role : void 0;
473
+ const run = (item) => {
474
+ if (item.onClick) {
475
+ item.onClick();
476
+ } else if (item.href) {
477
+ if (onNavigate) onNavigate(item.href);
478
+ else window.location.assign(item.href);
479
+ }
480
+ };
481
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_ui5.DropdownMenu, { children: [
482
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui5.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
483
+ "button",
484
+ {
485
+ type: "button",
486
+ "aria-label": `Account: ${who}`,
487
+ title: `Signed in as ${who}`,
488
+ className: "flex items-center p-1 bg-transparent border-none rounded-full cursor-pointer hover:bg-accent",
489
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_ui5.Avatar, { className: "h-8 w-8", children: [
490
+ user.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui5.AvatarImage, { src: user.avatarUrl, alt: "" }) : null,
491
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui5.AvatarFallback, { className: "bg-primary/10 text-primary text-xs font-medium", children: initials(user.name || user.email) })
492
+ ] })
493
+ }
494
+ ) }),
495
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_ui5.DropdownMenuContent, { align: "end", className: "w-64", children: [
496
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui5.DropdownMenuLabel, { className: "font-normal", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-1", children: [
497
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm font-medium leading-none", children: who }),
498
+ user.email && user.email !== who && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-xs leading-none text-muted-foreground", children: user.email })
499
+ ] }) }),
500
+ membership && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
501
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui5.DropdownMenuSeparator, {}),
502
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("dl", { className: "px-2 py-1.5 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs", children: [
503
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("dt", { className: "text-muted-foreground", children: "Organization" }),
504
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("dd", { className: "truncate", children: (0, import_auth3.organizationLabel)(membership) }),
505
+ role && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
506
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("dt", { className: "text-muted-foreground", children: "Role" }),
507
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("dd", { children: role })
508
+ ] })
509
+ ] })
510
+ ] }),
511
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui5.DropdownMenuSeparator, {}),
512
+ items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
513
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui5.DropdownMenuGroup, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
514
+ import_ui5.DropdownMenuItem,
515
+ {
516
+ onSelect: () => run(item),
517
+ className: (0, import_ui5.cn)(
518
+ "cursor-pointer",
519
+ item.destructive && "text-destructive focus:text-destructive"
520
+ ),
521
+ children: [
522
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "mr-2 text-muted-foreground", children: item.icon }),
523
+ item.label
524
+ ]
525
+ },
526
+ item.id
527
+ )) }),
528
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui5.DropdownMenuSeparator, {})
529
+ ] }),
530
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
531
+ import_ui5.DropdownMenuItem,
532
+ {
533
+ onSelect: () => {
534
+ ctx.signOut().catch(onSignOutError);
535
+ },
536
+ className: "cursor-pointer text-destructive focus:text-destructive",
537
+ children: "Sign out"
538
+ }
539
+ )
540
+ ] })
541
+ ] });
542
+ }
543
+
544
+ // src/ThemeToggle.tsx
545
+ var import_ui6 = require("@plexusone/ui");
546
+
547
+ // src/theme.ts
548
+ var import_react2 = require("react");
549
+ var THEME_STORAGE_KEY = "systemforge:theme";
550
+ var THEME_CHANGE_EVENT = "systemforge:theme-change";
551
+ var darkQuery = "(prefers-color-scheme: dark)";
552
+ function isTheme(v) {
553
+ return v === "light" || v === "dark" || v === "system";
554
+ }
555
+ function readStoredTheme() {
556
+ try {
557
+ const v = window.localStorage.getItem(THEME_STORAGE_KEY);
558
+ return isTheme(v) ? v : "system";
559
+ } catch {
560
+ return "system";
561
+ }
562
+ }
563
+ function storeTheme(theme) {
564
+ try {
565
+ window.localStorage.setItem(THEME_STORAGE_KEY, theme);
566
+ } catch {
567
+ }
568
+ }
569
+ function systemPrefersDark() {
570
+ return typeof window.matchMedia === "function" && window.matchMedia(darkQuery).matches;
571
+ }
572
+ function resolveTheme(theme, prefersDark = systemPrefersDark()) {
573
+ if (theme === "system") return prefersDark ? "dark" : "light";
574
+ return theme;
575
+ }
576
+ function applyTheme(theme, root = document.documentElement) {
577
+ const resolved = resolveTheme(theme);
578
+ root.classList.toggle("dark", resolved === "dark");
579
+ root.style.colorScheme = resolved;
580
+ }
581
+ function applyStoredTheme() {
582
+ applyTheme(readStoredTheme());
583
+ }
584
+ function nextTheme(theme) {
585
+ return theme === "light" ? "dark" : theme === "dark" ? "system" : "light";
586
+ }
587
+ function useTheme() {
588
+ const [theme, setThemeState] = (0, import_react2.useState)(
589
+ () => typeof window === "undefined" ? "system" : readStoredTheme()
590
+ );
591
+ (0, import_react2.useEffect)(() => {
592
+ applyTheme(theme);
593
+ if (theme !== "system" || typeof window.matchMedia !== "function") return void 0;
594
+ const mq = window.matchMedia(darkQuery);
595
+ const onChange = () => applyTheme("system");
596
+ mq.addEventListener("change", onChange);
597
+ return () => mq.removeEventListener("change", onChange);
598
+ }, [theme]);
599
+ (0, import_react2.useEffect)(() => {
600
+ const onThemeChange = (e) => {
601
+ const next = e.detail;
602
+ if (isTheme(next)) setThemeState(next);
603
+ };
604
+ window.addEventListener(THEME_CHANGE_EVENT, onThemeChange);
605
+ return () => window.removeEventListener(THEME_CHANGE_EVENT, onThemeChange);
606
+ }, []);
607
+ const setTheme = (0, import_react2.useCallback)((next) => {
608
+ storeTheme(next);
609
+ setThemeState(next);
610
+ window.dispatchEvent(new CustomEvent(THEME_CHANGE_EVENT, { detail: next }));
611
+ }, []);
612
+ return [theme, setTheme];
613
+ }
614
+
615
+ // src/ThemeToggle.tsx
616
+ var import_jsx_runtime7 = require("react/jsx-runtime");
617
+ var labels = {
618
+ light: "Light theme",
619
+ dark: "Dark theme",
620
+ system: "System theme"
621
+ };
622
+ function ThemeToggle() {
623
+ const [theme, setTheme] = useTheme();
624
+ const next = nextTheme(theme);
625
+ const Icon = theme === "light" ? import_ui6.SunIcon : theme === "dark" ? import_ui6.MoonIcon : import_ui6.MonitorIcon;
626
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
627
+ import_ui6.Button,
628
+ {
629
+ variant: "ghost",
630
+ size: "icon",
631
+ "aria-label": `${labels[theme]}; switch to ${labels[next].toLowerCase()}`,
632
+ title: labels[theme],
633
+ onClick: () => setTheme(next),
634
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { className: "h-4 w-4" })
635
+ }
636
+ );
637
+ }
638
+
639
+ // src/UserMenu.tsx
640
+ var import_auth4 = require("@plexusone/auth");
641
+ var import_ui7 = require("@plexusone/ui");
642
+ var import_jsx_runtime8 = require("react/jsx-runtime");
643
+ var defaultActions = [];
644
+ function UserMenu({ actions = defaultActions, onNavigate }) {
645
+ const auth = (0, import_auth4.useAuthOptional)();
646
+ if (!auth || auth.isLoading || !auth.user) {
647
+ return null;
648
+ }
649
+ const { user, logout } = auth;
650
+ const handleAction = (action) => {
651
+ if (action.onClick) {
652
+ action.onClick();
653
+ } else if (action.href) {
654
+ if (onNavigate) {
655
+ onNavigate(action.href);
656
+ } else {
657
+ window.location.assign(action.href);
658
+ }
659
+ }
660
+ };
661
+ const handleLogout = async () => {
662
+ await logout();
663
+ };
664
+ const allActions = [
665
+ ...actions,
666
+ { id: "logout", label: "Sign out", onClick: handleLogout, destructive: true }
667
+ ];
668
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_ui7.DropdownMenu, { children: [
669
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui7.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
670
+ "button",
671
+ {
672
+ type: "button",
673
+ className: "flex items-center gap-2 p-1 bg-transparent border-none rounded-full cursor-pointer hover:bg-accent",
674
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_ui7.Avatar, { className: "h-8 w-8", children: [
675
+ user.avatar_url ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui7.AvatarImage, { src: user.avatar_url, alt: user.name }) : null,
676
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui7.AvatarFallback, { className: "bg-primary/10 text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui7.UserIcon, { className: "h-4 w-4" }) })
677
+ ] })
678
+ }
679
+ ) }),
680
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_ui7.DropdownMenuContent, { align: "end", className: "w-56", children: [
681
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui7.DropdownMenuLabel, { className: "font-normal", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col space-y-1", children: [
682
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm font-medium leading-none", children: user.name }),
683
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs leading-none text-muted-foreground", children: user.email })
684
+ ] }) }),
685
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui7.DropdownMenuSeparator, {}),
686
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui7.DropdownMenuGroup, { children: allActions.map((action, index) => {
687
+ const isLogout = action.id === "logout";
688
+ const showSeparator = isLogout && index > 0;
689
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
690
+ showSeparator && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_ui7.DropdownMenuSeparator, {}),
691
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
692
+ import_ui7.DropdownMenuItem,
693
+ {
694
+ onClick: () => handleAction(action),
695
+ className: (0, import_ui7.cn)(
696
+ "cursor-pointer",
697
+ action.destructive && "text-destructive focus:text-destructive"
698
+ ),
699
+ children: [
700
+ action.icon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
701
+ "span",
702
+ {
703
+ className: (0, import_ui7.cn)(
704
+ "mr-2",
705
+ action.destructive ? "text-destructive" : "text-muted-foreground"
706
+ ),
707
+ children: action.icon
708
+ }
709
+ ),
710
+ action.label
711
+ ]
712
+ }
713
+ )
714
+ ] }, action.id);
715
+ }) })
716
+ ] })
717
+ ] });
718
+ }
719
+
720
+ // src/Breadcrumbs.tsx
721
+ var import_ui8 = require("@plexusone/ui");
722
+ var import_jsx_runtime9 = require("react/jsx-runtime");
723
+ function Breadcrumbs({
724
+ items,
725
+ onNavigate,
726
+ separator,
727
+ maxItems
728
+ }) {
729
+ if (items.length === 0) {
730
+ return null;
731
+ }
732
+ const handleClick = (href, event) => {
733
+ if (!href) return;
734
+ event.preventDefault();
735
+ if (onNavigate) {
736
+ onNavigate(href);
737
+ } else {
738
+ window.location.assign(href);
739
+ }
740
+ };
741
+ let displayItems = items;
742
+ let collapsed = false;
743
+ if (maxItems && items.length > maxItems) {
744
+ collapsed = true;
745
+ displayItems = [items[0], { label: "...", href: void 0 }, ...items.slice(-(maxItems - 2))];
746
+ }
747
+ const defaultSeparator = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ui8.ChevronRightIcon, { className: "h-4 w-4" });
748
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("nav", { "aria-label": "Breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("ol", { className: "flex items-center gap-1 list-none m-0 p-0 text-sm", children: displayItems.map((item, index) => {
749
+ const isLast = index === displayItems.length - 1;
750
+ const isFirst = index === 0;
751
+ const isCollapsed = collapsed && index === 1;
752
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("li", { className: "flex items-center gap-1", children: [
753
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-muted-foreground flex items-center", "aria-hidden": "true", children: separator || defaultSeparator }),
754
+ isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-muted-foreground px-1 py-0.5", children: item.label }) : item.href && !isLast ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
755
+ "a",
756
+ {
757
+ href: item.href,
758
+ onClick: (e) => handleClick(item.href, e),
759
+ className: "flex items-center gap-1 text-muted-foreground no-underline px-1 py-0.5 rounded hover:text-foreground hover:bg-accent",
760
+ children: [
761
+ isFirst && !item.icon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ui8.HomeIcon, { className: "h-4 w-4" }),
762
+ item.icon,
763
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: item.label })
764
+ ]
765
+ }
766
+ ) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
767
+ "span",
768
+ {
769
+ className: (0, import_ui8.cn)(
770
+ "flex items-center gap-1 px-1 py-0.5",
771
+ isLast ? "text-foreground font-medium" : "text-muted-foreground"
772
+ ),
773
+ "aria-current": isLast ? "page" : void 0,
774
+ children: [
775
+ isFirst && !item.icon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_ui8.HomeIcon, { className: "h-4 w-4" }),
776
+ item.icon,
777
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: item.label })
778
+ ]
779
+ }
780
+ )
781
+ ] }, `${item.label}-${index}`);
782
+ }) }) });
783
+ }
784
+
785
+ // src/Navbar.tsx
786
+ var import_jsx_runtime10 = require("react/jsx-runtime");
787
+ function Navbar({
788
+ showOrgSwitcher = true,
789
+ userActions,
790
+ breadcrumbs,
791
+ onToggleSidebar,
792
+ onNavigate,
793
+ brand,
794
+ app,
795
+ organizationId,
796
+ onOrganizationChange,
797
+ onNavigateApp,
798
+ command,
799
+ actions,
800
+ profileItems,
801
+ showThemeToggle = false
802
+ }) {
803
+ const hasSession = (0, import_auth5.useSessionOptional)() !== void 0;
804
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("header", { className: "h-16 bg-background border-b border-border flex items-center px-4 gap-4", children: [
805
+ onToggleSidebar && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
806
+ import_ui9.Button,
807
+ {
808
+ variant: "ghost",
809
+ size: "icon",
810
+ onClick: onToggleSidebar,
811
+ "aria-label": "Toggle sidebar",
812
+ className: "md:hidden",
813
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_ui9.MenuIcon, { className: "h-5 w-5" })
814
+ }
815
+ ),
816
+ brand && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex items-center gap-2 shrink-0", "data-slot": "brand", children: brand }),
817
+ app && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ProductSwitcher, { self: app, organizationId, onNavigate: onNavigateApp }),
818
+ onOrganizationChange ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(OrganizationSwitcher, { value: organizationId, onChange: onOrganizationChange }) : showOrgSwitcher && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(OrgSwitcher, { onNavigate }),
819
+ command && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex items-center min-w-0", "data-slot": "command", children: command }),
820
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-1 min-w-0", children: breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Breadcrumbs, { items: breadcrumbs, onNavigate }) }),
821
+ actions && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex items-center gap-1 shrink-0", "data-slot": "actions", children: actions }),
822
+ showThemeToggle && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ThemeToggle, {}),
823
+ hasSession ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
824
+ ProfileMenu,
825
+ {
826
+ appId: app?.id,
827
+ organizationId,
828
+ items: profileItems ?? userActions,
829
+ onNavigate
830
+ }
831
+ ) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(UserMenu, { actions: profileItems ?? userActions, onNavigate })
832
+ ] });
833
+ }
834
+
835
+ // src/AppShell.tsx
836
+ var import_jsx_runtime11 = require("react/jsx-runtime");
837
+ function AppShellInner({
838
+ children,
839
+ appName,
840
+ logo,
841
+ logoCollapsed,
842
+ navigation = [],
843
+ userActions,
844
+ sidebarCollapsible = true,
845
+ showOrgSwitcher = true,
846
+ breadcrumbs,
847
+ brand,
848
+ app,
849
+ organizationId,
850
+ onOrganizationChange,
851
+ onNavigateApp,
852
+ command,
853
+ actions,
854
+ profileItems,
855
+ showThemeToggle
856
+ }) {
857
+ const {
858
+ sidebarCollapsed,
859
+ toggleSidebar,
860
+ sidebarVisible,
861
+ toggleSidebarVisible,
862
+ currentPath,
863
+ navigate
864
+ } = useShell();
865
+ const defaultLogo = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "font-semibold text-lg text-foreground", children: appName });
866
+ const defaultLogoCollapsed = /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "font-bold text-lg text-primary", children: appName.charAt(0) });
867
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex min-h-screen bg-secondary", children: [
868
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
869
+ Sidebar,
870
+ {
871
+ navigation,
872
+ isCollapsed: sidebarCollapsed,
873
+ onToggleCollapse: sidebarCollapsible ? toggleSidebar : void 0,
874
+ logo: logo || defaultLogo,
875
+ logoCollapsed: logoCollapsed || defaultLogoCollapsed,
876
+ onNavigate: navigate,
877
+ currentPath
878
+ }
879
+ ),
880
+ sidebarVisible && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
881
+ "div",
882
+ {
883
+ className: "fixed inset-0 bg-black/50 z-[1300] md:hidden",
884
+ onClick: toggleSidebarVisible
885
+ }
886
+ ),
887
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-1 flex flex-col min-w-0", children: [
888
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
889
+ Navbar,
890
+ {
891
+ showOrgSwitcher,
892
+ userActions,
893
+ onToggleSidebar: toggleSidebarVisible,
894
+ onNavigate: navigate,
895
+ breadcrumbs,
896
+ brand,
897
+ app,
898
+ organizationId,
899
+ onOrganizationChange,
900
+ onNavigateApp,
901
+ command,
902
+ actions,
903
+ profileItems,
904
+ showThemeToggle
905
+ }
906
+ ),
907
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("main", { className: "flex-1 p-6 overflow-y-auto", children })
908
+ ] })
909
+ ] });
910
+ }
911
+ function AppShell(props) {
912
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
913
+ ShellProvider,
914
+ {
915
+ defaultCollapsed: props.defaultCollapsed,
916
+ onNavigate: props.onNavigate,
917
+ onCollapseChange: props.onCollapseChange,
918
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AppShellInner, { ...props })
919
+ }
920
+ );
921
+ }
922
+ // Annotate the CommonJS export names for ESM import in node:
923
+ 0 && (module.exports = {
924
+ AppShell,
925
+ Breadcrumbs,
926
+ Navbar,
927
+ OrgSwitcher,
928
+ OrganizationSwitcher,
929
+ ProductSwitcher,
930
+ ProfileMenu,
931
+ ShellProvider,
932
+ Sidebar,
933
+ THEME_CHANGE_EVENT,
934
+ THEME_STORAGE_KEY,
935
+ ThemeToggle,
936
+ UserMenu,
937
+ applyStoredTheme,
938
+ applyTheme,
939
+ initials,
940
+ nextTheme,
941
+ readStoredTheme,
942
+ resolveTheme,
943
+ switcherApps,
944
+ useShell,
945
+ useShellOptional,
946
+ useTheme
947
+ });
948
+ //# sourceMappingURL=index.js.map