@xenosystem/blocks 0.23.1 → 0.25.0

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.
@@ -0,0 +1,240 @@
1
+ import { ReactNode } from 'react';
2
+ export { P as PLATFORM_SHELL_BLOCK_MANIFEST, a as PLATFORM_SHELL_PANEL_ID } from '../manifest-B2JS8PxD.js';
3
+ import '@xenosystem/block-sdk';
4
+
5
+ /**
6
+ * Pure UI state contract mapped 1:1 to `@xenosystem/primitives/updates` (`UpdateCheck`)
7
+ * plus download and install phases.
8
+ */
9
+ type PlatformUpdateStatus = {
10
+ state: 'idle';
11
+ } | {
12
+ state: 'checking';
13
+ } | {
14
+ state: 'signed-out';
15
+ } | {
16
+ state: 'not-entitled';
17
+ } | {
18
+ state: 'up-to-date';
19
+ version: string;
20
+ } | {
21
+ state: 'available';
22
+ version: string;
23
+ } | {
24
+ state: 'downloading';
25
+ version: string;
26
+ percent?: number;
27
+ } | {
28
+ state: 'ready';
29
+ version: string;
30
+ } | {
31
+ state: 'error';
32
+ code: string;
33
+ message?: string;
34
+ };
35
+ /** Props for {@link PlatformUpdatePill}. */
36
+ interface PlatformUpdatePillProps {
37
+ /** Current update lifecycle status. */
38
+ status: PlatformUpdateStatus;
39
+ /** Triggered when the user requests a manual check or retry. */
40
+ onCheckForUpdates?: () => void;
41
+ /** Triggered when an update is available and the user clicks to download. */
42
+ onDownloadUpdate?: () => void;
43
+ /** Triggered when an update is downloaded and ready to install/restart. */
44
+ onInstallAndRestart?: () => void;
45
+ /** Triggered when the user is signed out and clicks to sign in for updates. */
46
+ onSignIn?: () => void;
47
+ /** Triggered when the user's account lacks update entitlement. */
48
+ onManagePlan?: () => void;
49
+ /** Optional additional class name. */
50
+ className?: string;
51
+ }
52
+ /** Props for native desktop {@link WindowControls}. */
53
+ interface WindowControlsProps {
54
+ /** Minimize window handler. Omit on web/macOS to hide. */
55
+ onMinimize?: () => void;
56
+ /** Maximize or restore window handler. Omit on web/macOS to hide. */
57
+ onMaximize?: () => void;
58
+ /** Close window handler. Omit on web/macOS to hide. */
59
+ onClose?: () => void;
60
+ /** When true, renders restore glyph instead of maximize glyph. */
61
+ isMaximized?: boolean;
62
+ /** Accessible label for minimize button. */
63
+ minimizeLabel?: string;
64
+ /** Accessible label for maximize button. */
65
+ maximizeLabel?: string;
66
+ /** Accessible label for restore button. */
67
+ restoreLabel?: string;
68
+ /** Accessible label for close button. */
69
+ closeLabel?: string;
70
+ /** Optional additional class name. */
71
+ className?: string;
72
+ }
73
+ /** Icon destination in the 56px left {@link PlatformShell} rail. */
74
+ interface PlatformRailItem {
75
+ /** Stable section identifier. */
76
+ id: string;
77
+ /** Accessible label & tooltip text. */
78
+ label: string;
79
+ /** Leading SVG or icon element. */
80
+ icon: ReactNode;
81
+ /** Optional compact badge text or count. */
82
+ badge?: string | number;
83
+ /** Optional status indicator dot tone. */
84
+ tone?: 'ok' | 'warn' | 'err';
85
+ /** Disables interaction when true. */
86
+ disabled?: boolean;
87
+ }
88
+ /** Single row inside a {@link PlatformSidebarSection}. */
89
+ interface PlatformSidebarItem {
90
+ /** Stable item identifier. */
91
+ id: string;
92
+ /** Primary row label. */
93
+ label: ReactNode;
94
+ /** Optional leading icon. */
95
+ icon?: ReactNode;
96
+ /** Optional trailing mono count or metadata. */
97
+ meta?: ReactNode;
98
+ /** Marks this row as active when controlled per-item. */
99
+ active?: boolean;
100
+ /** Disables interaction when true. */
101
+ disabled?: boolean;
102
+ }
103
+ /** Grouped navigation section inside the floating {@link PlatformShell} sidebar plate. */
104
+ interface PlatformSidebarSection {
105
+ /** Optional stable group key. */
106
+ id?: string;
107
+ /** Optional uppercase group heading. */
108
+ title?: string;
109
+ /** Ordered rows in this group. */
110
+ items: readonly PlatformSidebarItem[];
111
+ }
112
+ /** Props for the unified {@link PlatformShell} block. */
113
+ interface PlatformShellProps {
114
+ /** Product SVG mark rendered at the top of the 56px rail (clicks toggle sidebar). */
115
+ brandIcon?: ReactNode;
116
+ /** Product name rendered as the topbar breadcrumb root. */
117
+ brandLabel?: string;
118
+ /** Rail navigation destinations. */
119
+ railItems?: readonly PlatformRailItem[];
120
+ /** Currently active rail section identifier. */
121
+ activeSectionId?: string;
122
+ /** Called when a rail destination is selected. */
123
+ onSelectSection?: (sectionId: string) => void;
124
+ /** Continuous brightness position on the 21-stop platform line (0 Dark, 50 Dim, 100 Light). */
125
+ themePosition?: number;
126
+ /** Called when the user switches or cycles the theme brightness stop. */
127
+ onThemePositionChange?: (position: number) => void;
128
+ /** Optional footer slot pinned to the bottom of the 56px rail (credits, avatar, settings). */
129
+ railFooter?: ReactNode;
130
+ /** Primary title in the floating sidebar header. */
131
+ sidebarTitle?: ReactNode;
132
+ /** Optional mono subtitle below the sidebar title. */
133
+ sidebarSubtitle?: ReactNode;
134
+ /** Controlled open/collapsed state of the floating sidebar plate. */
135
+ sidebarOpen?: boolean;
136
+ /** Initial sidebar open state when uncontrolled (defaults to true). */
137
+ defaultSidebarOpen?: boolean;
138
+ /** Called when sidebar open/closed state changes. */
139
+ onSidebarOpenChange?: (open: boolean) => void;
140
+ /** Structured navigation groups inside the sidebar plate. */
141
+ sidebarSections?: readonly PlatformSidebarSection[];
142
+ /** Currently active sidebar item id when using `sidebarSections`. */
143
+ activeSidebarItemId?: string;
144
+ /** Called when a sidebar row is clicked. */
145
+ onSelectSidebarItem?: (itemId: string) => void;
146
+ /** Optional footer pinned to the bottom of the sidebar plate. */
147
+ sidebarFooter?: ReactNode;
148
+ /** Escape hatch to mount a custom tree/palette inside the sidebar plate instead of `sidebarSections`. */
149
+ sidebarContent?: ReactNode;
150
+ /** Optional sidebar width override in px (defaults to 236px). */
151
+ sidebarWidth?: number;
152
+ /** Enables native Electron/desktop drag region on the 46px topbar (with no-drag on controls). */
153
+ desktopDragRegion?: boolean;
154
+ /** Active section title displayed in the topbar breadcrumb. */
155
+ sectionLabel?: ReactNode;
156
+ /** Custom breadcrumb element overriding the default `brandLabel / sectionLabel`. */
157
+ breadcrumb?: ReactNode;
158
+ /** Optional centered segmented mode switcher slot (e.g. FRONT | BACK). */
159
+ modeSlot?: ReactNode;
160
+ /** Optional custom per-app actions rendered in the topbar right cluster. */
161
+ headerActions?: ReactNode;
162
+ /** When provided, renders the built-in {@link PlatformUpdatePill} in the 46px topbar. */
163
+ updateState?: PlatformUpdateStatus;
164
+ /** Forwarded to {@link PlatformUpdatePill}. */
165
+ onCheckForUpdates?: () => void;
166
+ /** Forwarded to {@link PlatformUpdatePill}. */
167
+ onDownloadUpdate?: () => void;
168
+ /** Forwarded to {@link PlatformUpdatePill}. */
169
+ onInstallAndRestart?: () => void;
170
+ /** Forwarded to {@link PlatformUpdatePill}. */
171
+ onSignIn?: () => void;
172
+ /** Forwarded to {@link PlatformUpdatePill}. */
173
+ onManagePlan?: () => void;
174
+ /** Shows a compact stop cycler (Dark / Dim / Light) in the topbar when true. */
175
+ themeToggle?: boolean;
176
+ /** Optional account avatar or sign-in trigger in the topbar right cluster. */
177
+ accountSlot?: ReactNode;
178
+ /** Desktop window minimize callback (omitting all 3 hides {@link WindowControls}). */
179
+ onMinimize?: () => void;
180
+ /** Desktop window maximize/restore callback. */
181
+ onMaximize?: () => void;
182
+ /** Desktop window close callback. */
183
+ onClose?: () => void;
184
+ /** Current maximized state for {@link WindowControls}. */
185
+ isMaximized?: boolean;
186
+ /** Hides the 46px topbar completely when true. */
187
+ hideTopbar?: boolean;
188
+ /** Primary workspace content rendered inside the floating workspace plate. */
189
+ children?: ReactNode;
190
+ /** Accessible landmark label for the shell container. */
191
+ label?: string;
192
+ /** Extra CSS class name on the root `.xeno` container. */
193
+ className?: string;
194
+ }
195
+
196
+ /**
197
+ * Canonical unified XENO Platform Application Shell block (`@xenosystem/blocks/shell`).
198
+ *
199
+ * Composes the verbatim `data-layout="platform"` architecture:
200
+ * - 56px solid left icon rail (`.xeno-app-rail`)
201
+ * - 15px outward concave corner flares via `@property --xeno-fr` (`.xeno-app-slot`)
202
+ * - Floating 14px-radius collapsible sidebar plate (`.xeno-app-sidebar`)
203
+ * - Floating 14px-radius main workspace plate (`.xeno-app-plate` with `container-type: inline-size`)
204
+ * - Unified 46px header / topbar (`.plate-topbar`) with native desktop drag support,
205
+ * breadcrumb, mode switcher slot, built-in {@link PlatformUpdatePill}, theme stop cycler,
206
+ * account slot, and native {@link WindowControls}.
207
+ */
208
+ declare function PlatformShell({ brandIcon, brandLabel, railItems, activeSectionId, onSelectSection, themePosition, onThemePositionChange, railFooter, sidebarTitle, sidebarSubtitle, sidebarOpen: controlledSidebarOpen, defaultSidebarOpen, onSidebarOpenChange, sidebarSections, activeSidebarItemId, onSelectSidebarItem, sidebarFooter, sidebarContent, sidebarWidth, desktopDragRegion, sectionLabel, breadcrumb, modeSlot, headerActions, updateState, onCheckForUpdates, onDownloadUpdate, onInstallAndRestart, onSignIn, onManagePlan, themeToggle, accountSlot, onMinimize, onMaximize, onClose, isMaximized, hideTopbar, children, label, className, }: PlatformShellProps): ReactNode;
209
+
210
+ /**
211
+ * Compact, unobtrusive updater pill for the 46px PlatformShell topbar.
212
+ *
213
+ * Maps 1:1 to `@xenosystem/primitives/updates` (`UpdateCheck`) plus download/install phases.
214
+ * Never renders raw error messages, tokens, or stack traces into the DOM.
215
+ */
216
+ declare function PlatformUpdatePill({ status, onCheckForUpdates, onDownloadUpdate, onInstallAndRestart, onSignIn, onManagePlan, className, }: PlatformUpdatePillProps): ReactNode;
217
+
218
+ /**
219
+ * Native desktop window controls (Minimize, Maximize / Restore, Close).
220
+ *
221
+ * Returns `null` when none of `onMinimize`, `onMaximize`, or `onClose` are supplied,
222
+ * so macOS and web builds hide desktop chrome cleanly without conditional wrapper code.
223
+ */
224
+ declare function WindowControls({ onMinimize, onMaximize, onClose, isMaximized, minimizeLabel, maximizeLabel, restoreLabel, closeLabel, className, }: WindowControlsProps): ReactNode;
225
+
226
+ /**
227
+ * Token-driven stylesheet for `@xenosystem/blocks/shell`.
228
+ *
229
+ * Every colour and surface resolves strictly through Rung-1 `--xeno-*` custom properties
230
+ * (populated at runtime by `buildPlatformThemeCssVars(themePosition)` from `@xenosystem/elements/tokens`).
231
+ * Zero colour literals, zero hardcoded font stacks, zero circular SVG geometry.
232
+ */
233
+ declare const PLATFORM_SHELL_CSS = "\n@property --xeno-fr {\n syntax: '<length>';\n inherits: true;\n initial-value: 15px;\n}\n\n.xeno-ps-root {\n --xeno-layout-gap: 7px;\n --xeno-layout-gap-y: 7px;\n --xeno-layout-radius: 14px;\n --xeno-layout-rail-w: 56px;\n --xeno-layout-sidebar-w: 236px;\n --xeno-layout-flare: 15px;\n --xeno-ease-open: cubic-bezier(0.22, 0.9, 0.24, 1);\n --xeno-ease-close: cubic-bezier(0.45, 0, 0.2, 1);\n position: relative;\n width: 100%;\n height: 100%;\n min-height: 0;\n box-sizing: border-box;\n font-size: 13px;\n line-height: 1.45;\n -webkit-font-smoothing: antialiased;\n}\n\n.xeno-ps-root *,\n.xeno-ps-root *::before,\n.xeno-ps-root *::after {\n box-sizing: border-box;\n}\n\n.xeno-ps-root .xeno-app-shell {\n position: relative;\n display: flex;\n width: 100%;\n height: 100%;\n min-height: 0;\n background: var(--xeno-canvas);\n color: var(--xeno-text);\n overflow: hidden;\n}\n\n.xeno-ps-root .xeno-app-rail {\n position: relative;\n flex: none;\n width: var(--xeno-layout-rail-w);\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n padding: 10px 0;\n background: var(--xeno-rail-bg);\n z-index: 30;\n}\n\n.xeno-ps-root .xeno-app-rail::after {\n content: '';\n position: absolute;\n right: 0;\n top: 0;\n bottom: 0;\n width: 1px;\n background: var(--xeno-rail-stroke);\n transition: top 260ms var(--xeno-ease-open), bottom 260ms var(--xeno-ease-open);\n}\n\n.xeno-ps-root .xeno-app-shell[data-sidebar='open'] .xeno-app-rail::after {\n top: calc(var(--xeno-layout-flare) + 1px);\n bottom: calc(var(--xeno-layout-flare) + 1px);\n}\n\n.xeno-ps-root .xeno-app-rail-logo {\n width: 40px;\n height: 40px;\n border-radius: 10px;\n border: 0;\n background: transparent;\n color: var(--xeno-text);\n display: grid;\n place-items: center;\n margin-bottom: 4px;\n cursor: pointer;\n padding: 0;\n transition: background 150ms ease, transform 180ms var(--xeno-ease-open);\n}\n\n.xeno-ps-root .xeno-app-rail-logo:hover {\n background: var(--xeno-hover);\n}\n\n.xeno-ps-root .xeno-app-rail-logo:active {\n transform: scale(0.94);\n}\n\n.xeno-ps-root .xeno-app-rail-btn {\n position: relative;\n width: 40px;\n height: 40px;\n border-radius: 10px;\n border: 0;\n background: transparent;\n color: var(--xeno-muted-text);\n display: grid;\n place-items: center;\n cursor: pointer;\n padding: 0;\n transition: background 150ms ease, color 150ms ease;\n}\n\n.xeno-ps-root .xeno-app-rail-btn:hover:not(:disabled) {\n background: var(--xeno-hover);\n color: var(--xeno-text);\n}\n\n.xeno-ps-root .xeno-app-rail-btn[aria-current='page'],\n.xeno-ps-root .xeno-app-rail-btn[aria-current='true'] {\n background: var(--xeno-hover-strong);\n color: var(--xeno-text);\n}\n\n.xeno-ps-root .xeno-app-rail-btn:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.xeno-ps-root .xeno-app-rail-btn:focus-visible,\n.xeno-ps-root .xeno-app-rail-logo:focus-visible,\n.xeno-ps-root .sb-ib:focus-visible,\n.xeno-ps-root .sb-row:focus-visible,\n.xeno-ps-root .xeno-ps-update:focus-visible,\n.xeno-ps-root .xeno-ps-theme-btn:focus-visible,\n.xeno-ps-root .xeno-ps-win-btn:focus-visible {\n outline: 2px solid var(--xeno-accent);\n outline-offset: 1px;\n}\n\n.xeno-ps-root .xeno-app-rail-grow {\n flex: 1 1 auto;\n}\n\n.xeno-ps-root .xeno-app-rail-footer {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 6px;\n}\n\n.xeno-ps-root .xeno-app-rail-dot {\n position: absolute;\n top: 7px;\n right: 7px;\n width: 6px;\n height: 6px;\n border-radius: 2px;\n background: var(--xeno-success-text);\n box-shadow: 0 0 0 2px var(--xeno-rail-bg);\n}\n\n.xeno-ps-root .xeno-app-rail-dot[data-tone='warn'] {\n background: var(--xeno-warning-text);\n}\n\n.xeno-ps-root .xeno-app-rail-dot[data-tone='err'] {\n background: var(--xeno-danger-text);\n}\n\n.xeno-ps-root .xeno-app-rail-badge {\n position: absolute;\n bottom: 4px;\n right: 3px;\n min-width: 15px;\n height: 14px;\n padding: 0 3px;\n border-radius: 4px;\n background: var(--xeno-accent);\n color: var(--xeno-accent-text);\n font-size: 9px;\n font-weight: 700;\n line-height: 14px;\n text-align: center;\n font-variant-numeric: tabular-nums;\n}\n\n.xeno-ps-root .xeno-app-slot {\n position: relative;\n flex: none;\n width: calc(var(--xeno-layout-sidebar-w) + var(--xeno-layout-gap));\n padding: var(--xeno-layout-gap-y) 0 var(--xeno-layout-gap-y) var(--xeno-layout-gap);\n display: flex;\n min-height: 0;\n z-index: 20;\n --xeno-fr: var(--xeno-layout-flare);\n transition: width 280ms var(--xeno-ease-open), padding 280ms var(--xeno-ease-open), --xeno-fr 280ms var(--xeno-ease-open);\n}\n\n.xeno-ps-root .xeno-app-shell[data-sidebar='closed'] .xeno-app-slot {\n width: 0;\n padding: 0;\n --xeno-fr: 0px;\n pointer-events: none;\n overflow: hidden;\n transition: width 240ms var(--xeno-ease-close), padding 240ms var(--xeno-ease-close), --xeno-fr 220ms var(--xeno-ease-close);\n}\n\n.xeno-ps-root .xeno-app-slot::before,\n.xeno-ps-root .xeno-app-slot::after {\n content: '';\n position: absolute;\n left: 0;\n width: calc(var(--xeno-fr) + 1px);\n height: calc(var(--xeno-fr) + 1px);\n pointer-events: none;\n z-index: 25;\n}\n\n.xeno-ps-root .xeno-app-slot::before {\n top: 0;\n background: radial-gradient(\n circle at 100% 100%,\n transparent calc(var(--xeno-fr) - 0.4px),\n var(--xeno-rail-stroke) var(--xeno-fr),\n var(--xeno-rail-stroke) calc(var(--xeno-fr) + 0.6px),\n var(--xeno-rail-bg) calc(var(--xeno-fr) + 1px)\n );\n}\n\n.xeno-ps-root .xeno-app-slot::after {\n bottom: 0;\n background: radial-gradient(\n circle at 100% 0%,\n transparent calc(var(--xeno-fr) - 0.4px),\n var(--xeno-rail-stroke) var(--xeno-fr),\n var(--xeno-rail-stroke) calc(var(--xeno-fr) + 0.6px),\n var(--xeno-rail-bg) calc(var(--xeno-fr) + 1px)\n );\n}\n\n.xeno-ps-root .xeno-app-sidebar {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n min-height: 0;\n background: var(--xeno-surface);\n border: 1px solid var(--xeno-border);\n border-radius: var(--xeno-layout-radius);\n overflow: hidden;\n}\n\n.xeno-ps-root .sb-head {\n display: flex;\n align-items: center;\n gap: 8px;\n height: 46px;\n padding: 0 10px 0 13px;\n flex: none;\n border-bottom: 1px solid var(--xeno-border-subtle);\n}\n\n.xeno-ps-root .sb-head-ttl {\n flex: 1;\n min-width: 0;\n font-weight: 600;\n font-size: 13.5px;\n letter-spacing: -0.01em;\n color: var(--xeno-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.xeno-ps-root .sb-head-ttl small {\n display: block;\n font-weight: 400;\n font-size: 10.5px;\n color: var(--xeno-dim-text);\n}\n\n.xeno-ps-root .sb-ib {\n width: 28px;\n height: 28px;\n border-radius: 7px;\n border: 0;\n background: transparent;\n color: var(--xeno-muted-text);\n display: grid;\n place-items: center;\n cursor: pointer;\n flex: none;\n padding: 0;\n}\n\n.xeno-ps-root .sb-ib:hover {\n background: var(--xeno-hover);\n color: var(--xeno-text);\n}\n\n.xeno-ps-root .sb-body {\n flex: 1 1 auto;\n overflow-y: auto;\n padding: 8px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.xeno-ps-root .sb-grp {\n padding: 10px 9px 4px;\n font-size: 10px;\n font-weight: 600;\n color: var(--xeno-dim-text);\n text-transform: uppercase;\n letter-spacing: 0.06em;\n}\n\n.xeno-ps-root .sb-row {\n display: flex;\n align-items: center;\n gap: 9px;\n width: 100%;\n height: 32px;\n padding: 0 9px;\n border-radius: 8px;\n border: 0;\n background: transparent;\n color: var(--xeno-muted-text);\n font-size: 12.5px;\n font-weight: 500;\n cursor: pointer;\n text-align: left;\n transition: background 120ms, color 120ms;\n}\n\n.xeno-ps-root .sb-row:hover:not(:disabled) {\n background: var(--xeno-hover);\n color: var(--xeno-text);\n}\n\n.xeno-ps-root .sb-row[aria-current='true'] {\n background: var(--xeno-hover-strong);\n color: var(--xeno-text);\n}\n\n.xeno-ps-root .sb-row:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.xeno-ps-root .sb-row-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n}\n\n.xeno-ps-root .sb-row-label {\n flex: 1 1 auto;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.xeno-ps-root .sb-row .meta {\n margin-left: auto;\n font-size: 10.5px;\n font-variant-numeric: tabular-nums;\n color: var(--xeno-dim-text);\n flex: none;\n}\n\n.xeno-ps-root .sb-row[aria-current='true'] .meta {\n color: var(--xeno-muted-text);\n}\n\n.xeno-ps-root .sb-foot {\n flex: none;\n border-top: 1px solid var(--xeno-border-subtle);\n padding: 8px 10px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 6px;\n}\n\n.xeno-ps-root .xeno-app-main {\n flex: 1 1 auto;\n min-width: 0;\n min-height: 0;\n display: flex;\n padding: var(--xeno-layout-gap-y) var(--xeno-layout-gap) var(--xeno-layout-gap-y) var(--xeno-layout-gap);\n}\n\n.xeno-ps-root .xeno-app-plate {\n container-type: inline-size;\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n background: var(--xeno-viewport);\n border: 1px solid var(--xeno-border);\n border-radius: var(--xeno-layout-radius);\n overflow: hidden;\n}\n\n.xeno-ps-root .plate-topbar {\n flex: none;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n height: 46px;\n padding: 0 12px 0 14px;\n border-bottom: 1px solid var(--xeno-border-subtle);\n background: var(--xeno-panel-header);\n user-select: none;\n}\n\n.xeno-ps-root .plate-topbar[data-drag-region='true'] {\n -webkit-app-region: drag;\n}\n\n.xeno-ps-root .plate-topbar[data-drag-region='true'] button,\n.xeno-ps-root .plate-topbar[data-drag-region='true'] a,\n.xeno-ps-root .plate-topbar[data-drag-region='true'] input,\n.xeno-ps-root .plate-topbar[data-drag-region='true'] select,\n.xeno-ps-root .plate-topbar[data-drag-region='true'] [data-no-drag='true'] {\n -webkit-app-region: no-drag;\n}\n\n.xeno-ps-root .plate-topbar-left {\n display: flex;\n align-items: center;\n gap: 8px;\n min-width: 0;\n flex: 1 1 0;\n}\n\n.xeno-ps-root .plate-topbar-center {\n display: flex;\n align-items: center;\n justify-content: center;\n flex: none;\n}\n\n.xeno-ps-root .plate-topbar-right {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 6px;\n flex: 1 1 0;\n min-width: 0;\n}\n\n.xeno-ps-root .plate-crumb {\n display: flex;\n align-items: center;\n gap: 7px;\n font-size: 13px;\n color: var(--xeno-muted-text);\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.xeno-ps-root .plate-crumb-sep {\n color: var(--xeno-dim-text);\n}\n\n.xeno-ps-root .plate-crumb-section {\n color: var(--xeno-text);\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.xeno-ps-root .plate-body {\n flex: 1 1 auto;\n min-height: 0;\n min-width: 0;\n display: flex;\n flex-direction: column;\n overflow: auto;\n}\n\n/* \u2500\u2500 PlatformUpdatePill \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.xeno-ps-update {\n appearance: none;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 26px;\n padding: 0 9px;\n border-radius: 6px;\n border: 1px solid var(--xeno-border);\n background: var(--xeno-control);\n color: var(--xeno-muted-text);\n font-size: 11.5px;\n font-weight: 500;\n line-height: 1;\n white-space: nowrap;\n cursor: pointer;\n flex: none;\n font-variant-numeric: tabular-nums;\n transition: background 120ms ease, color 120ms ease, border-color 120ms ease;\n}\n\n.xeno-ps-update:hover:not(:disabled) {\n background: var(--xeno-hover-strong);\n color: var(--xeno-text);\n}\n\n.xeno-ps-update:disabled {\n cursor: default;\n}\n\n.xeno-ps-update[data-state='idle'],\n.xeno-ps-update[data-state='up-to-date'] {\n background: transparent;\n border-color: var(--xeno-border-subtle);\n color: var(--xeno-dim-text);\n}\n\n.xeno-ps-update[data-state='checking'] {\n background: var(--xeno-control);\n border-color: var(--xeno-border);\n color: var(--xeno-muted-text);\n}\n\n.xeno-ps-update[data-state='available'] {\n background: color-mix(in srgb, var(--xeno-warning-text) 14%, var(--xeno-surface));\n border-color: color-mix(in srgb, var(--xeno-warning-text) 48%, var(--xeno-border));\n color: var(--xeno-warning-text);\n font-weight: 600;\n}\n\n.xeno-ps-update[data-state='downloading'] {\n background: var(--xeno-control);\n border-color: var(--xeno-plate-border);\n color: var(--xeno-text);\n}\n\n.xeno-ps-update[data-state='ready'] {\n background: var(--xeno-accent);\n border-color: transparent;\n color: var(--xeno-accent-text);\n font-weight: 600;\n}\n\n.xeno-ps-update[data-state='ready']:hover:not(:disabled) {\n background: var(--xeno-accent-hover);\n color: var(--xeno-accent-text);\n}\n\n.xeno-ps-update[data-state='signed-out'],\n.xeno-ps-update[data-state='not-entitled'] {\n background: var(--xeno-control);\n border-color: var(--xeno-border-strong);\n color: var(--xeno-text);\n}\n\n.xeno-ps-update[data-state='error'] {\n background: color-mix(in srgb, var(--xeno-danger-text) 12%, var(--xeno-surface));\n border-color: color-mix(in srgb, var(--xeno-danger-text) 48%, var(--xeno-border));\n color: var(--xeno-danger-text);\n}\n\n.xeno-ps-update-pip {\n width: 6px;\n height: 6px;\n border-radius: 1.5px;\n background: currentColor;\n flex: none;\n}\n\n.xeno-ps-update[data-state='up-to-date'] .xeno-ps-update-pip {\n background: var(--xeno-success-text);\n}\n\n.xeno-ps-update-bar {\n width: 34px;\n height: 4px;\n border-radius: 2px;\n background: var(--xeno-border);\n overflow: hidden;\n flex: none;\n}\n\n.xeno-ps-update-fill {\n display: block;\n height: 100%;\n background: var(--xeno-success-text);\n transition: width 160ms ease;\n}\n\n/* \u2500\u2500 Theme Stop Toggle & WindowControls \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.xeno-ps-theme-btn {\n appearance: none;\n display: inline-flex;\n align-items: center;\n gap: 5px;\n height: 26px;\n padding: 0 8px;\n border-radius: 6px;\n border: 1px solid var(--xeno-border);\n background: var(--xeno-control);\n color: var(--xeno-muted-text);\n font-size: 11px;\n font-weight: 500;\n cursor: pointer;\n flex: none;\n white-space: nowrap;\n transition: background 120ms ease, color 120ms ease;\n}\n\n.xeno-ps-theme-btn:hover {\n background: var(--xeno-hover-strong);\n color: var(--xeno-text);\n}\n\n.xeno-ps-win {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n margin-left: 4px;\n padding-left: 6px;\n border-left: 1px solid var(--xeno-border-subtle);\n flex: none;\n}\n\n.xeno-ps-win-btn {\n appearance: none;\n width: 28px;\n height: 26px;\n border-radius: 6px;\n border: 0;\n background: transparent;\n color: var(--xeno-muted-text);\n display: grid;\n place-items: center;\n cursor: pointer;\n padding: 0;\n transition: background 120ms ease, color 120ms ease;\n}\n\n.xeno-ps-win-btn:hover {\n background: var(--xeno-hover);\n color: var(--xeno-text);\n}\n\n.xeno-ps-win-btn[data-win-action='close']:hover {\n background: color-mix(in srgb, var(--xeno-danger) 20%, transparent);\n color: var(--xeno-danger-text);\n}\n\n/* \u2500\u2500 Container-Query Tightening & Narrow Responsive Collapse \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n@container (max-width: 620px) {\n .xeno-ps-root .plate-topbar {\n gap: 6px;\n padding: 0 8px 0 10px;\n }\n .xeno-ps-root .plate-crumb-brand,\n .xeno-ps-root .plate-crumb-sep {\n display: none;\n }\n .xeno-ps-root .xeno-ps-theme-label {\n display: none;\n }\n .xeno-ps-root .xeno-ps-update {\n padding: 0 7px;\n font-size: 11px;\n }\n .xeno-ps-root .xeno-ps-update-bar {\n display: none;\n }\n}\n\n@media (max-width: 780px) {\n .xeno-ps-root .xeno-app-slot {\n display: none;\n }\n .xeno-ps-root .xeno-app-shell[data-sidebar='open'] .xeno-app-rail::after {\n top: 0;\n bottom: 0;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .xeno-ps-root .xeno-app-rail::after,\n .xeno-ps-root .xeno-app-rail-logo,\n .xeno-ps-root .xeno-app-rail-btn,\n .xeno-ps-root .xeno-app-slot,\n .xeno-ps-root .sb-row,\n .xeno-ps-update,\n .xeno-ps-update-fill,\n .xeno-ps-theme-btn,\n .xeno-ps-win-btn {\n transition: none;\n }\n}\n";
234
+ /**
235
+ * Idempotently injects the token-driven PlatformShell stylesheet into `document.head`.
236
+ * Safe in SSR / Node test environments (no-op when `document` is unavailable).
237
+ */
238
+ declare function ensurePlatformShellStyles(): void;
239
+
240
+ export { PLATFORM_SHELL_CSS, type PlatformRailItem, PlatformShell, type PlatformShellProps, type PlatformSidebarItem, type PlatformSidebarSection, PlatformUpdatePill, type PlatformUpdatePillProps, type PlatformUpdateStatus, WindowControls, type WindowControlsProps, ensurePlatformShellStyles };