efficient-shell 5.1.0 → 5.2.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.
Files changed (69) hide show
  1. package/README.md +70 -1
  2. package/dist/{Browser-WUVL7ZSM.js → Browser-FKZ6M2MK.js} +17 -17
  3. package/dist/Calculator-LBFBTFSD.js +29 -0
  4. package/dist/ConfirmDialog-JAEFVRJM.js +1 -0
  5. package/dist/{CurrencyConverter-LF2WHJW4.js → CurrencyConverter-OV5ZQIAJ.js} +6 -6
  6. package/dist/{Documents-MB4TJGNY.js → Documents-HGGL3AWI.js} +8 -8
  7. package/dist/Files-DAQKIF6W.js +87 -0
  8. package/dist/{Notepad-UQSG5BE3.js → Notepad-PO724TVP.js} +11 -11
  9. package/dist/PdfViewer-6ALXGVTV.js +1 -0
  10. package/dist/{PomodoroTimer-XARF7DO3.js → PomodoroTimer-LN5MYRZO.js} +20 -20
  11. package/dist/{Preview-LETK6AJS.js → Preview-CUOO5WQ7.js} +9 -9
  12. package/dist/Sidebar-T4ABK2WV.js +44 -0
  13. package/dist/{Spreadsheet-RCHOM2RE.js → Spreadsheet-2N2JXBCY.js} +14 -14
  14. package/dist/{Stock-25FQMI2G.js → Stock-65WVUGLI.js} +4 -4
  15. package/dist/{Weather-KLQ55R64.js → Weather-TXJICMJN.js} +15 -15
  16. package/dist/{WorldClock-RMPU7D2M.js → WorldClock-RIHLKZGC.js} +6 -6
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/{chunk-FA6E75W5.js → chunk-3PTA2C74.js} +1 -1
  21. package/dist/chunk-4QBLTEFU.js +1 -0
  22. package/dist/{chunk-GPNNQIRY.js → chunk-6GV4467L.js} +1 -1
  23. package/dist/chunk-AJB5G52B.js +1 -0
  24. package/dist/{chunk-2KTBZE5F.js → chunk-ASSDCWKP.js} +1 -1
  25. package/dist/{chunk-LY2G6LHW.js → chunk-BFFXVA53.js} +1 -1
  26. package/dist/{chunk-4KLBITSY.js → chunk-BFUBBDU6.js} +11 -11
  27. package/dist/{chunk-JK2KQ4PF.js → chunk-H3UEYXRA.js} +1 -1
  28. package/dist/{chunk-ZDF5AR5W.js → chunk-HIAHERCD.js} +7 -7
  29. package/dist/{chunk-XUF7VW4U.js → chunk-JJIPGAXI.js} +29 -28
  30. package/dist/{chunk-HKLW5KTW.js → chunk-KHJ5XSEH.js} +8 -8
  31. package/dist/{chunk-DXNCJBGY.js → chunk-M4OGNYOM.js} +6 -6
  32. package/dist/{chunk-P4SGJTK3.js → chunk-ML22KF7T.js} +1 -1
  33. package/dist/{chunk-VOY6TCS2.js → chunk-MTH7EAH3.js} +20 -20
  34. package/dist/{chunk-N3W6PH55.js → chunk-OTP5WPI4.js} +11 -11
  35. package/dist/chunk-PS6PSCOR.js +1018 -0
  36. package/dist/{chunk-5LCZFVE4.js → chunk-QZNRMJE6.js} +2 -2
  37. package/dist/{chunk-XNHYCOPO.js → chunk-R3622MOL.js} +1 -1
  38. package/dist/{chunk-2TP4GK53.js → chunk-SSBOC52S.js} +6 -6
  39. package/dist/{chunk-DBB4DB7J.js → chunk-TKFAFZRY.js} +1 -1
  40. package/dist/{chunk-TMZVVRTA.js → chunk-TLTFS2D6.js} +58 -58
  41. package/dist/{chunk-6TCHOT4R.js → chunk-UAJQB45Y.js} +1 -1
  42. package/dist/{chunk-H5NEXQTX.js → chunk-UG4ZPXXU.js} +1 -1
  43. package/dist/{chunk-LTGIQ7HO.js → chunk-Y553QKEH.js} +14 -14
  44. package/dist/{chunk-MDI265RK.js → chunk-YJ6JMGMS.js} +1 -1
  45. package/dist/{chunk-LMIQV3NB.js → chunk-YQI7KXX3.js} +2 -2
  46. package/dist/file-intake/index.js +1 -1
  47. package/dist/i18n/index.d.ts +1 -1
  48. package/dist/{index-CzMz_Y9A.d.ts → index-Dk5VKml6.d.ts} +264 -2
  49. package/dist/index.d.ts +3 -3
  50. package/dist/index.js +488 -488
  51. package/dist/locales/zh-Hans.d.ts +1 -1
  52. package/dist/locales/zh-Hans.js +1 -1
  53. package/dist/map/index.js +6 -6
  54. package/dist/markdown/index.js +1 -1
  55. package/dist/page-tabs/index.js +5 -5
  56. package/dist/pdf/index.js +1 -1
  57. package/dist/{strings-BEuOOURI.d.ts → strings-aKfRDZWB.d.ts} +35 -0
  58. package/dist/ui/index.d.ts +2 -2
  59. package/dist/ui/index.js +1 -1
  60. package/dist/ui.css +63 -0
  61. package/package.json +1 -1
  62. package/dist/Calculator-E2CBADVF.js +0 -29
  63. package/dist/ConfirmDialog-ZM364NPI.js +0 -1
  64. package/dist/Files-JQYIBZEP.js +0 -87
  65. package/dist/PdfViewer-4VGNBBED.js +0 -1
  66. package/dist/Sidebar-VR4QYFQU.js +0 -44
  67. package/dist/chunk-3JK2LSFU.js +0 -1
  68. package/dist/chunk-LOXV3J6X.js +0 -1005
  69. package/dist/chunk-OBMR6BEP.js +0 -1
package/dist/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{APP_UPDATE_POLL_MS,Accordion,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,Banner,BarChart,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,CORNERS,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,DonutChart,Drawer,DropdownMenu,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LineChart,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,Snippet,SortableList,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,Tabs,TagInput,Text,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,curvePath,dashFor,fillFor,fillId,fmtSliderDate,focalFromRect,formatFocal,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,inputClasses,isSeverityTone,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,nudgeFocal,parseFocal,parseHexColor,polygonPoints,radiusScale,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme}from"../chunk-LOXV3J6X.js";export{Breadcrumbs}from"../chunk-XNHYCOPO.js";export{ResizeHandle,SidebarLayout}from"../chunk-MDI265RK.js";export{BrandMark,GlobalSearch,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-DXNCJBGY.js";export{EditableGrid}from"../chunk-HKLW5KTW.js";import"../chunk-BR22X7E5.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-H5NEXQTX.js";export{VERSION}from"../chunk-OBMR6BEP.js";export{toast_default as toast}from"../chunk-DBB4DB7J.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-2TP4GK53.js";import"../chunk-5A7MWTXX.js";export{Button_default as Button,MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,buttonClasses,iconButtonClasses,popupBounds,useDropdownPosition}from"../chunk-OGXU7QFW.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-VOY6TCS2.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-ZDF5AR5W.js";import"../chunk-AFYQTVZO.js";export{GLASS_DIVIDER,glassStyle}from"../chunk-HZZNJHRH.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"../chunk-X4FJ54PP.js";import"../chunk-D65T4H6J.js";import"../chunk-XUF7VW4U.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-FA6E75W5.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-3JK2LSFU.js";import"../chunk-C3QOHMR6.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"../chunk-W32SKK3D.js";export{ICON_NAMES,isIconName}from"../chunk-FWOPZB6I.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-YKZHOXI4.js";
2
+ export{APP_UPDATE_POLL_MS,Accordion,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,Banner,BarChart,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,CONTROL_HEIGHTS,CORNERS,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,DonutChart,Drawer,DropdownMenu,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,FilePicker_default as FilePicker,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,INPUT_BASE,INPUT_SIZES,IconButton_default as IconButton,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LineChart,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,Snippet,SortableList,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,Tabs,TagInput,Text,TextLinkField,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,curvePath,dashFor,fillFor,fillId,fmtSliderDate,focalFromRect,formatFocal,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,inputClasses,isSafeLinkHref,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceMax,nudgeFocal,parseFocal,parseHexColor,polygonPoints,radiusScale,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,toKey as toDateKey,toDayMs,toISODate,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme}from"../chunk-PS6PSCOR.js";export{Breadcrumbs}from"../chunk-R3622MOL.js";export{ResizeHandle,SidebarLayout}from"../chunk-YJ6JMGMS.js";export{BrandMark,GlobalSearch,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"../chunk-M4OGNYOM.js";export{EditableGrid}from"../chunk-KHJ5XSEH.js";import"../chunk-BR22X7E5.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-UG4ZPXXU.js";export{VERSION}from"../chunk-4QBLTEFU.js";export{toast_default as toast}from"../chunk-TKFAFZRY.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,LoadingSpinner,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"../chunk-SSBOC52S.js";import"../chunk-5A7MWTXX.js";export{Button_default as Button,MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,buttonClasses,iconButtonClasses,popupBounds,useDropdownPosition}from"../chunk-OGXU7QFW.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"../chunk-MTH7EAH3.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,leavesContextMenuAlone}from"../chunk-HIAHERCD.js";import"../chunk-AFYQTVZO.js";export{GLASS_DIVIDER,glassStyle}from"../chunk-HZZNJHRH.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"../chunk-X4FJ54PP.js";import"../chunk-D65T4H6J.js";import"../chunk-JJIPGAXI.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-3PTA2C74.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-AJB5G52B.js";import"../chunk-C3QOHMR6.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"../chunk-W32SKK3D.js";export{ICON_NAMES,isIconName}from"../chunk-FWOPZB6I.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-YKZHOXI4.js";
package/dist/ui.css CHANGED
@@ -186,6 +186,69 @@
186
186
  :root:is([data-corners="square"], [data-corners="round"]) .rounded-ee { border-end-end-radius: var(--rosh-radius-bare); }
187
187
  :root:is([data-corners="square"], [data-corners="round"]) .rounded-es { border-end-start-radius: var(--rosh-radius-bare); }
188
188
 
189
+ /*
190
+ * ── Spacing: one scale, named roles, control heights ────────────────────────
191
+ *
192
+ * Owner ruling, 2026-10-12: every margin, padding and gap is one of ten steps —
193
+ * 2 / 4 / 8 / 12 / 16 / 20 / 24 / 32 / 40 / 48, multiples of 4, with 2 kept
194
+ * for hairline gaps. 6 and 10 are left out on purpose: with them, 8 / 10 / 12
195
+ * sit too close to choose between and the code drifts.
196
+ *
197
+ * Every step lands on a Tailwind spacing step (0.5 … 12, at 4px a step), so markup
198
+ * keeps writing utilities; these properties are for a value a utility cannot
199
+ * reach (an inline style, a component class) and for the ROLES, which name one
200
+ * step per common use so nobody chooses between neighbours. Controls take
201
+ * their height from the 24 / 32 / 40 ladder, not from top and bottom padding.
202
+ *
203
+ * Plain custom properties, not `@theme` keys, for the reason the radius roles
204
+ * above are: they are defined whatever the consuming build compiled. Nothing
205
+ * in the kit reads them yet, so declaring them renders nothing new.
206
+ * `src/tokens/spacing.ts` holds the same numbers for code
207
+ * (`tests/spacingTokens.test.ts` keeps the two equal).
208
+ */
209
+ :root {
210
+ --space-2: 0.125rem;
211
+ --space-4: 0.25rem;
212
+ --space-8: 0.5rem;
213
+ --space-12: 0.75rem;
214
+ --space-16: 1rem;
215
+ --space-20: 1.25rem;
216
+ --space-24: 1.5rem;
217
+ --space-32: 2rem;
218
+ --space-40: 2.5rem;
219
+ --space-48: 3rem;
220
+
221
+ /* Apps and portals (owner, 2026-10-12). */
222
+ --space-icon-gap: var(--space-8);
223
+ --space-icon-gap-sm: var(--space-4);
224
+ --space-control-x-sm: var(--space-8);
225
+ --space-control-x: var(--space-12);
226
+ --space-control-x-lg: var(--space-16);
227
+ --space-cell-x: var(--space-12);
228
+ --space-label: var(--space-4);
229
+ --space-toolbar: var(--space-8);
230
+ --space-form-row: var(--space-12);
231
+ --space-card: var(--space-16);
232
+ --space-block: var(--space-16);
233
+ --space-gutter: var(--space-16);
234
+
235
+ /* Editor panels (owner, 2026-10-02): the smaller the number, the more two
236
+ things are one thing. */
237
+ --space-panel-group: var(--space-2);
238
+ --space-panel-sub: var(--space-4);
239
+ --space-panel-layer: var(--space-8);
240
+ --space-panel-row: var(--space-12);
241
+ --space-panel-pad: var(--space-16);
242
+ --space-panel-pad-narrow: var(--space-12);
243
+ --space-panel-setting: var(--space-32);
244
+
245
+ /* Control heights: button, field, select, segmented control, filter chip,
246
+ sidebar row, menu row. */
247
+ --control-height-sm: 1.5rem;
248
+ --control-height-md: 2rem;
249
+ --control-height-lg: 2.5rem;
250
+ }
251
+
189
252
  /* The default `utils/glass.ts` already assumes at `getMenuOpacity()`'s
190
253
  fallback. Declared here so a ui-only consumer gets identical glass to a shell
191
254
  consumer at rest, and has one knob to dial it. <Layout> overrides it inline
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1,29 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-LY2G6LHW.js";import{useWidgetSettings as n}from"./chunk-TMZVVRTA.js";import"./chunk-DSSLOQDW.js";import"./chunk-6TCHOT4R.js";import"./chunk-2TP4GK53.js";import"./chunk-5A7MWTXX.js";import"./chunk-OGXU7QFW.js";import"./chunk-VOY6TCS2.js";import"./chunk-ZDF5AR5W.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import{CheckFallbackB as l,CopyFallbackB as r}from"./chunk-XUF7VW4U.js";import"./chunk-3JK2LSFU.js";import"./chunk-C3QOHMR6.js";import{Icon as c}from"./chunk-YKZHOXI4.js";import{useState as a,useRef as i,useCallback as o,useEffect as s}from"react";import{jsxs as u,Fragment as d,jsx as h}from"react/jsx-runtime";var m="calc_appearance";function b(){const[b,k]=a("0"),[p,g]=a(null),[f,y]=a(null),[x,N]=a(!1),[v,C]=a(""),[$,j]=a([]),[T,w]=a(!1),[S,F]=a(()=>e(m)),[W,E]=a(!1),[O,A]=a(S),H=i(null);n(o(()=>{A({...S}),E(!0)},[S]));const L=o(e=>{C(""),k(t=>x||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[x]),X=o(()=>{k("0"),g(null),y(null),N(!1)},[]),D=o((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),R=o(e=>{const t=parseFloat(b);if(null!==p&&f&&!x){const e=D(p,t,f);k(String(e)),g(e),j(n=>[`${p} ${f} ${t} = ${e}`,...n].slice(0,20))}else g(t);y(e),N(!0)},[b,p,f,x,D]),Z=o(()=>{if(null===p||!f)return;const e=parseFloat(b),t=D(p,e,f),n=`${p} ${f} ${e} =`;j(e=>[`${n} ${t}`,...e].slice(0,20)),C(n),k(String(t)),g(null),y(null),N(!0)},[b,p,f,D]),J=o(()=>{k(e=>String(parseFloat(e)/100))},[]),U=o(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);s(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?L(e.key):"."===e.key?L("."):"+"===e.key?R("+"):"-"===e.key?R("-"):"*"===e.key?R("×"):"/"===e.key?(e.preventDefault(),R("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&H.current?.contains(e.target)&&e.preventDefault(),Z()):"Escape"===e.key?X():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&J())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[L,R,Z,X,J]);const V="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",M=`${V} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,P=`${V} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,Q=`${V} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,Y=`${V} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
- return u(d,{children:[
3
- /* @__PURE__ */u("div",{ref:H,className:"flex flex-col h-full",style:{opacity:S.activeOpacity/100,backdropFilter:S.activeBlur>0?`blur(${S.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */u("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
5
- /* @__PURE__ */h("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:$.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */h("div",{className:"text-[11px] text-slate-400 text-right font-mono truncate",children:e},t))}),(v||f&&null!==p)&&/* @__PURE__ */h("div",{className:"text-base text-slate-600 text-right font-mono",children:v||`${p} ${f} ${x?"":b}`}),
6
- /* @__PURE__ */u("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */h("button",{onClick:()=>{navigator.clipboard.writeText(b),w(!0),setTimeout(()=>w(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */h(c,T?{name:"check",fallback:l,className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",fallback:r,className:"h-5 w-5",strokeWidth:2})}),
8
- /* @__PURE__ */h("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(b)})]})]}),
9
- /* @__PURE__ */u("div",{className:"grid grid-cols-4 grid-rows-5 gap-1.5 flex-1 min-h-0 p-2",children:[
10
- /* @__PURE__ */h("button",{onClick:X,className:Q,children:"AC"}),
11
- /* @__PURE__ */h("button",{onClick:U,className:Q,children:"+/−"}),
12
- /* @__PURE__ */h("button",{onClick:J,className:Q,children:"%"}),
13
- /* @__PURE__ */h("button",{onClick:()=>R("÷"),className:`${P} ${"÷"===f?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
- /* @__PURE__ */h("button",{onClick:()=>L("7"),className:M,children:"7"}),
15
- /* @__PURE__ */h("button",{onClick:()=>L("8"),className:M,children:"8"}),
16
- /* @__PURE__ */h("button",{onClick:()=>L("9"),className:M,children:"9"}),
17
- /* @__PURE__ */h("button",{onClick:()=>R("×"),className:`${P} ${"×"===f?"ring-2 ring-blue-400":""}`,children:"×"}),
18
- /* @__PURE__ */h("button",{onClick:()=>L("4"),className:M,children:"4"}),
19
- /* @__PURE__ */h("button",{onClick:()=>L("5"),className:M,children:"5"}),
20
- /* @__PURE__ */h("button",{onClick:()=>L("6"),className:M,children:"6"}),
21
- /* @__PURE__ */h("button",{onClick:()=>R("-"),className:`${P} ${"-"===f?"ring-2 ring-blue-400":""}`,children:"−"}),
22
- /* @__PURE__ */h("button",{onClick:()=>L("1"),className:M,children:"1"}),
23
- /* @__PURE__ */h("button",{onClick:()=>L("2"),className:M,children:"2"}),
24
- /* @__PURE__ */h("button",{onClick:()=>L("3"),className:M,children:"3"}),
25
- /* @__PURE__ */h("button",{onClick:()=>R("+"),className:`${P} ${"+"===f?"ring-2 ring-blue-400":""}`,children:"+"}),
26
- /* @__PURE__ */h("button",{onClick:()=>L("0"),className:`${M} col-span-2`,children:"0"}),
27
- /* @__PURE__ */h("button",{onClick:()=>L("."),className:M,children:"."}),
28
- /* @__PURE__ */h("button",{onClick:Z,className:Y,children:"="})]})]}),
29
- /* @__PURE__ */h(t,{open:W,onClose:()=>E(!1),title:"Calculator Settings",appearance:O,onAppearanceChange:A,onSave:()=>{F(O),localStorage.setItem(m,JSON.stringify(O)),E(!1)}})]})}export{b as default};
@@ -1 +0,0 @@
1
- export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"./chunk-VOY6TCS2.js";import"./chunk-AFYQTVZO.js";import"./chunk-X4FJ54PP.js";import"./chunk-XUF7VW4U.js";import"./chunk-3JK2LSFU.js";import"./chunk-C3QOHMR6.js";import"./chunk-YKZHOXI4.js";
@@ -1,87 +0,0 @@
1
- import{openPreviewFile as e}from"./chunk-JK2KQ4PF.js";import{Breadcrumbs as t}from"./chunk-XNHYCOPO.js";import{SidebarLayout as a}from"./chunk-MDI265RK.js";import{getFilesDemoTree as r}from"./chunk-P4SGJTK3.js";import{AboutApp as n}from"./chunk-GPNNQIRY.js";import{peekFilesViewRequest as i,consumeFilesViewRequest as s,FILES_SHOW_TRASH_EVENT as l,FILES_OPEN_DESKTOP_FOLDER_EVENT as o,subscribeDesktopFolders as c,getDesktopFoldersSnapshot as d,FolderGlyph as m,DesktopItemMiniIcon as h,desktopItemTypeLabel as p}from"./chunk-LMIQV3NB.js";import"./chunk-ESL5TDNA.js";import"./chunk-VTVSMRFX.js";import{useWindowManager as f,WindowTitle as u}from"./chunk-TMZVVRTA.js";import"./chunk-DSSLOQDW.js";import"./chunk-6TCHOT4R.js";import"./chunk-OBMR6BEP.js";import{toast_default as x}from"./chunk-DBB4DB7J.js";import"./chunk-2TP4GK53.js";import"./chunk-5A7MWTXX.js";import"./chunk-OGXU7QFW.js";import{confirm as g,prompt as y}from"./chunk-VOY6TCS2.js";import"./chunk-ZDF5AR5W.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import{CloseCircleFallback as b,ArrowLeftFallback as k,RefreshFallback as N,TrashFallback as w,FolderPlusFallback as v,UploadFallbackB as j,FolderFallback as $,PageFallback as C}from"./chunk-XUF7VW4U.js";import"./chunk-3JK2LSFU.js";import"./chunk-C3QOHMR6.js";import{formatBytes as D}from"./chunk-W32SKK3D.js";import{Icon as T}from"./chunk-YKZHOXI4.js";import{useState as L,useEffect as E,useSyncExternalStore as R,useRef as P,useCallback as S}from"react";import{jsxs as F,jsx as O,Fragment as W}from"react/jsx-runtime";var I="undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000",M={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"};function A(e,t){return"/"===e||""===e?"/"+t:e.replace(/\/$/,"")+"/"+t}function U(e){if(!e)return"—";try{const t=new Date(e);return isNaN(t.getTime())?"—":t.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return e}}function V(){const V=I.replace(/\/$/,""),B=null!==r(),[H,K]=L("/"),[J,z]=L([]),[Q,X]=L([]),[_,Z]=L(null),[Y,G]=L(!0),[q,ee]=L(!1),[te,ae]=L(null),[re,ne]=L(!1),[ie,se]=L(()=>{const e=i();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});E(()=>{s()},[]);const[le,oe]=L([]);E(()=>{const e=()=>{s(),se("trash")},t=e=>{s();const t=e.detail?.folderId;t&&se({desktopFolderId:t})};return window.addEventListener(l,e),window.addEventListener(o,t),()=>{window.removeEventListener(l,e),window.removeEventListener(o,t)}},[]);const ce=R(c,d,d),de="object"==typeof ie?ie.desktopFolderId:null,me=de?ce?.folders.find(e=>e.id===de)??null:null,he=de&&ce?.itemsByFolder[de]||[];E(()=>{de&&ce&&!ce.folders.some(e=>e.id===de)&&se("files")},[de,ce]);const pe=P(0),fe=P(null),{openPage:ue,openEntity:xe}=f(),ge=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>ue(e)}):"page"===t.entityType?ue(t.entityId):xe(t.entityType,t.entityId,null,t.label)},ye=S((e,t={})=>fetch(e,{...t,credentials:"include"}),[]),be=S(async()=>{try{const e=await ye(`${V}/api/quota`);if(e.ok){const t=await e.json();ae({used:t.used,limit:t.limit})}}catch{}},[ye,V]),ke=S(async e=>{if(Z(null),B){const t=function(e){const t=r();if(!t)return[];let a=t;for(const t of e.split("/").filter(Boolean)){const e=a.find(e=>"folder"===e.kind&&e.name===t);if(!e||!e.children)return[];a=e.children}return a.map(e=>({name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}(e);return z(t),K(e),ee(!1),G(!1),void("/"===e&&X(t.filter(e=>"folder"===e.kind).map(e=>e.name)))}G(!0);try{const t=await ye(`${V}/api/files?path=${encodeURIComponent(e)}`);if(!t.ok){const e=await t.json().catch(()=>({}));return void x.error(e.error||`Failed to list (${t.status})`)}const a=await t.json(),r=a.entries||[];z(r),K(a.path||e),ee(!1),"/"===(a.path||e)&&X(r.filter(e=>"folder"===e.kind).map(e=>e.name))}catch(e){ee(!0)}finally{G(!1)}be()},[ye,V,be,B]),Ne=S(async()=>{if(B)return oe([]),void G(!1);G(!0),Z(null);try{const e=await ye(`${V}/api/trash`);if(!e.ok){const t=await e.json().catch(()=>({}));return void x.error(t.error||`Failed to list trash (${e.status})`)}const t=await e.json();oe(t.entries||[]),ee(!1)}catch{ee(!0)}finally{G(!1)}be()},[ye,V,be,B]);E(()=>{"files"===ie?ke(H):"trash"===ie&&Ne()},[H,ie]);const we=async e=>{const t=A(H,e.name);try{const a=await ye(`${V}/api/file?path=${encodeURIComponent(t)}`);if(!a.ok)return void x.error(`Download failed (${a.status})`);const r=await a.blob(),n=URL.createObjectURL(r),i=document.createElement("a");i.href=n,i.download=e.name,i.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}catch(e){x.error(e?.message||"Download failed")}},ve=async e=>{const t=Array.from(e);for(const e of t){const t=new FormData;t.append("file",e);try{const a=await ye(`${V}/api/upload?path=${encodeURIComponent(H)}`,{method:"POST",body:t});if(!a.ok){const t=await a.json().catch(()=>({}));if(413===a.status){const a=Math.max(0,(t.limit||0)-(t.used||0));x.error(`Quota exceeded — ${D(a)} free, ${e.name} is ${D(t.attempted||e.size)}`)}else x.error(`Upload ${e.name}: ${t.error||a.status}`)}}catch(t){x.error(`Upload ${e.name}: ${t?.message||"failed"}`)}}ke(H)},je=()=>{pe.current=0,ne(!1)};if(E(()=>{const e=()=>je();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),q)/* @__PURE__ */
2
- return F("div",{className:"flex flex-col h-full bg-white",children:[
3
- /* @__PURE__ */O(u,{title:"Files - offline"}),
4
- /* @__PURE__ */O("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */F("div",{className:"max-w-md",children:[
5
- /* @__PURE__ */O(T,{name:"close-circle",fallback:b,className:"h-12 w-12 mx-auto text-gray-300 mb-3",strokeWidth:1.4}),
6
- /* @__PURE__ */O("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:"Can't reach the file server"}),
7
- /* @__PURE__ */F("p",{className:"text-sm text-gray-500 mb-3",children:["No response from ",
8
- /* @__PURE__ */O("span",{className:"font-mono",children:V}),". Make sure the server is running — see ",
9
- /* @__PURE__ */O("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]}),
10
- /* @__PURE__ */O("button",{onClick:()=>ke(H),className:"px-3 py-1.5 text-sm bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})})]});const $e="/"===H?[]:H.split("/").filter(Boolean),Ce=te&&te.limit>0?Math.min(100,Math.round(te.used/te.limit*100)):0,De=Ce>90?"bg-red-500":Ce>75?"bg-amber-500":"bg-blue-500",Te=[{label:"My files",onClick:()=>K("/")},...$e.map((e,t)=>({label:e,onClick:()=>K("/"+$e.slice(0,t+1).join("/"))}))],Le=e=>"flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-sm transition-colors "+(e?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),Ee=e=>/* @__PURE__ */O("svg",{className:"h-4 w-4 shrink-0 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */O("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),Re=/* @__PURE__ */F("nav",{className:"p-2",children:[
11
- /* @__PURE__ */O("div",{className:"px-2 py-1.5 text-[11px] font-semibold uppercase tracking-wide text-gray-400",children:"Locations"}),
12
- /* @__PURE__ */F("button",{onClick:()=>{se("files"),K("/")},className:Le("files"===ie&&"/"===H),children:[Ee("M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0L21.75 12M4.5 9.75v9.75a.75.75 0 00.75.75H9V15a.75.75 0 01.75-.75h4.5A.75.75 0 0115 15v5.25h3.75a.75.75 0 00.75-.75V9.75"),"My files"]}),Q.map(e=>/* @__PURE__ */F("button",{onClick:()=>{se("files"),K("/"+e)},className:Le("files"===ie&&H==="/"+e),children:[Ee("M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"),
13
- /* @__PURE__ */O("span",{className:"truncate",children:e})]},e)),!B&&/* @__PURE__ */F("button",{onClick:()=>se("trash"),className:Le("trash"===ie),children:[Ee("M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79"),"Trash"]}),ce&&ce.folders.length>0&&/* @__PURE__ */F(W,{children:[
14
- /* @__PURE__ */O("div",{className:"px-2 pt-3 pb-1.5 text-[11px] font-semibold uppercase tracking-wide text-gray-400",children:"Desktop"}),ce.folders.map(e=>/* @__PURE__ */F("button",{onClick:()=>se({desktopFolderId:e.id}),className:Le(de===e.id),children:[
15
- /* @__PURE__ */O(m,{className:"h-4 w-4 shrink-0 text-amber-500"}),
16
- /* @__PURE__ */O("span",{className:"truncate",children:e.name}),e.itemCount>0&&/* @__PURE__ */O("span",{className:"ml-auto text-[10px] text-gray-400 tabular-nums",children:e.itemCount})]},e.id))]})]});/* @__PURE__ */
17
- return F("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e=>{B||"object"==typeof ie||e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),pe.current++,re||ne(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{pe.current>0&&pe.current--,0===pe.current&&ne(!1)},onDrop:e=>{e.preventDefault(),je(),B||"object"==typeof ie||e.dataTransfer.files?.length&&ve(e.dataTransfer.files)},children:[
18
- /* @__PURE__ */O(u,{title:me?`Files - ${me.name}`:"Files"+("/"===H?"":" - "+H)}),
19
- /* @__PURE__ */O(n,{app:"files"}),
20
- /* @__PURE__ */O("input",{ref:fe,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&ve(e.target.files),fe.current&&(fe.current.value="")}}),
21
- /* @__PURE__ */O("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */O(a,{sidebar:Re,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */F("div",{className:"flex h-full min-w-0 flex-col",children:[
22
- /* @__PURE__ */F("div",{className:"flex items-center gap-1 px-2 py-1.5 border-b border-gray-200 bg-gray-50 shrink-0 text-xs",children:[/* @__PURE__ */F(W,"files"===ie?{children:[
23
- /* @__PURE__ */O("button",{onClick:()=>K(function(e){if("/"===e||""===e)return"/";const t=e.replace(/\/$/,""),a=t.lastIndexOf("/");return a<=0?"/":t.slice(0,a)}(H)),disabled:"/"===H,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",title:"Parent folder",children:/* @__PURE__ */O(T,{name:"arrow-left",fallback:k,className:"h-3.5 w-3.5",strokeWidth:2})}),
24
- /* @__PURE__ */O("div",{className:"flex-1 min-w-0",children:/* @__PURE__ */O(t,{items:Te,maxItems:5})}),
25
- /* @__PURE__ */O("button",{onClick:()=>ke(H),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */O(T,{name:"refresh",fallback:N,className:"h-3.5 w-3.5",strokeWidth:1.8})}),!B&&/* @__PURE__ */F(W,{children:[
26
- /* @__PURE__ */F("button",{onClick:()=>se("trash"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",title:"Open trash",children:[
27
- /* @__PURE__ */O(T,{name:"trash",fallback:w,className:"h-3.5 w-3.5",strokeWidth:1.5}),"Trash"]}),
28
- /* @__PURE__ */F("button",{onClick:async()=>{const e=await y({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});if(!e)return;if(/[\\/]/.test(e))return void x.error("Folder names cannot contain slashes");const t=A(H,e),a=await ye(`${V}/api/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!a.ok){const e=await a.json().catch(()=>({}));return void x.error(e.error||`Create folder failed (${a.status})`)}ke(H)},className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",children:[
29
- /* @__PURE__ */O(T,{name:"folder-plus",fallback:v,className:"h-3.5 w-3.5",strokeWidth:1.5}),"New Folder"]}),
30
- /* @__PURE__ */F("button",{onClick:()=>fe.current?.click(),className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 flex items-center gap-1",children:[
31
- /* @__PURE__ */O(T,{name:"upload",fallback:j,className:"h-3.5 w-3.5",strokeWidth:1.8}),"Upload"]})]})]}:"trash"===ie?{children:[
32
- /* @__PURE__ */O("button",{onClick:()=>se("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */O(T,{name:"arrow-left",fallback:k,className:"h-3.5 w-3.5",strokeWidth:2})}),
33
- /* @__PURE__ */O("span",{className:"flex-1 text-gray-700 font-medium px-2",children:"Trash"}),
34
- /* @__PURE__ */O("button",{onClick:Ne,className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */O(T,{name:"refresh",fallback:N,className:"h-3.5 w-3.5",strokeWidth:1.8})}),
35
- /* @__PURE__ */O("button",{onClick:async()=>{if(0===le.length)return;if(!await g({title:"Empty trash",message:`${le.length} item${1===le.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"}))return;const e=await ye(`${V}/api/trash`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));return void x.error(t.error||`Empty trash failed (${e.status})`)}Ne()},disabled:0===le.length,className:"px-2 py-1 rounded text-red-600 hover:bg-red-50 disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
36
- /* @__PURE__ */O("button",{onClick:()=>se("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */O(T,{name:"arrow-left",fallback:k,className:"h-3.5 w-3.5",strokeWidth:2})}),
37
- /* @__PURE__ */O(m,{className:"h-4 w-4 text-amber-500 ml-1"}),
38
- /* @__PURE__ */O("span",{className:"flex-1 text-gray-700 font-medium px-1 truncate",children:me?.name??"Desktop folder"}),
39
- /* @__PURE__ */O("span",{className:"text-[10px] text-gray-400 px-2",children:"Desktop shortcuts"})]}),te&&/* @__PURE__ */F(W,{children:[
40
- /* @__PURE__ */O("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
41
- /* @__PURE__ */F("div",{className:"flex items-center gap-1.5",title:`${D(te.used)} of ${D(te.limit)} used`,children:[
42
- /* @__PURE__ */O("div",{className:"w-20 h-1.5 rounded-full bg-gray-200 overflow-hidden",children:/* @__PURE__ */O("div",{className:`h-full ${De} transition-all`,style:{width:`${Ce}%`}})}),
43
- /* @__PURE__ */F("span",{className:"text-[10px] text-gray-500 tabular-nums whitespace-nowrap",children:[D(te.used)," / ",D(te.limit)]})]})]})]}),
44
- /* @__PURE__ */O("div",{className:"flex-1 overflow-auto",children:"object"==typeof ie?0===he.length?/* @__PURE__ */O("div",{className:"p-10 text-center text-sm text-gray-400",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */F("table",{className:"w-full text-sm",children:[
45
- /* @__PURE__ */O("thead",{className:"bg-gray-50 text-[11px] uppercase tracking-wide text-gray-500",children:/* @__PURE__ */F("tr",{children:[
46
- /* @__PURE__ */O("th",{className:"text-left font-medium px-3 py-1.5",children:"Name"}),
47
- /* @__PURE__ */O("th",{className:"text-left font-medium px-3 py-1.5 w-28",children:"Type"}),
48
- /* @__PURE__ */O("th",{className:"w-56"})]})}),
49
- /* @__PURE__ */O("tbody",{children:he.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
50
- return F("tr",{onClick:()=>Z(t),onDoubleClick:()=>ge(e),className:"cursor-default border-b border-gray-100 "+(_===t?"bg-blue-50":"hover:bg-gray-50"),children:[
51
- /* @__PURE__ */F("td",{className:"px-3 py-1.5 flex items-center gap-2",children:[
52
- /* @__PURE__ */O(h,{item:e}),
53
- /* @__PURE__ */O("span",{className:"truncate",title:e.label,children:e.label})]}),
54
- /* @__PURE__ */O("td",{className:"px-3 py-1.5 text-xs text-gray-500",children:p(e)}),
55
- /* @__PURE__ */F("td",{className:"px-3 py-1.5 text-right whitespace-nowrap",children:[
56
- /* @__PURE__ */O("button",{onClick:t=>{t.stopPropagation(),ge(e)},className:"px-1.5 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-[11px]",children:"Open"}),
57
- /* @__PURE__ */O("button",{onClick:t=>{t.stopPropagation(),ce?.moveToDesktop([e])},className:"px-1.5 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-[11px] ml-1",children:"Move to desktop"}),
58
- /* @__PURE__ */O("button",{onClick:t=>{t.stopPropagation(),ce?.removeShortcuts([e])},className:"px-1.5 py-0.5 rounded hover:bg-red-100 text-red-600 text-[11px] ml-1",children:"Remove"})]})]},t)})})]}):"trash"===ie?Y&&0===le.length?/* @__PURE__ */O("div",{className:"p-6 text-center text-sm text-gray-400",children:"Loading…"}):0===le.length?/* @__PURE__ */O("div",{className:"p-10 text-center text-sm text-gray-400",children:"Trash is empty."}):/* @__PURE__ */F("table",{className:"w-full text-sm",children:[
59
- /* @__PURE__ */O("thead",{className:"bg-gray-50 text-[11px] uppercase tracking-wide text-gray-500",children:/* @__PURE__ */F("tr",{children:[
60
- /* @__PURE__ */O("th",{className:"text-left font-medium px-3 py-1.5",children:"Name"}),
61
- /* @__PURE__ */O("th",{className:"text-left font-medium px-3 py-1.5",children:"Original location"}),
62
- /* @__PURE__ */O("th",{className:"text-right font-medium px-3 py-1.5 w-24",children:"Size"}),
63
- /* @__PURE__ */O("th",{className:"text-right font-medium px-3 py-1.5 w-40",children:"Deleted"}),
64
- /* @__PURE__ */O("th",{className:"w-44"})]})}),
65
- /* @__PURE__ */O("tbody",{children:le.map(e=>/* @__PURE__ */F("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[
66
- /* @__PURE__ */F("td",{className:"px-3 py-1.5 flex items-center gap-2",children:["folder"===e.kind?/* @__PURE__ */O(T,{name:"folder",fallback:$,className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */O(T,{name:"page",fallback:C,className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
67
- /* @__PURE__ */O("span",{className:"truncate",title:e.name,children:e.name})]}),
68
- /* @__PURE__ */O("td",{className:"px-3 py-1.5 text-gray-500 text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
69
- /* @__PURE__ */O("td",{className:"px-3 py-1.5 text-right tabular-nums text-gray-500",children:D(e.size)}),
70
- /* @__PURE__ */O("td",{className:"px-3 py-1.5 text-right text-gray-500 tabular-nums",children:e.deletedAt?U(e.deletedAt):"—"}),
71
- /* @__PURE__ */F("td",{className:"px-3 py-1.5 text-right whitespace-nowrap",children:[
72
- /* @__PURE__ */O("button",{onClick:()=>(async e=>{const t=await ye(`${V}/api/trash/restore`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})});if(!t.ok){const e=await t.json().catch(()=>({}));return void x.error(e.error||`Restore failed (${t.status})`)}x.success(`Restored "${e.name}"`),Ne()})(e),className:"px-1.5 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-[11px]",children:"Restore"}),
73
- /* @__PURE__ */O("button",{onClick:()=>(async e=>{if(!await g({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"}))return;const t=await ye(`${V}/api/trash/${encodeURIComponent(e.id)}`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));return void x.error(e.error||`Delete failed (${t.status})`)}Ne()})(e),className:"px-1.5 py-0.5 rounded hover:bg-red-100 text-red-600 text-[11px] ml-1",children:"Delete forever"})]})]},e.id))})]}):Y&&0===J.length?/* @__PURE__ */O("div",{className:"p-6 text-center text-sm text-gray-400",children:"Loading…"}):0===J.length?/* @__PURE__ */F("div",{className:"p-10 text-center text-sm text-gray-400",children:["Empty folder.",!B&&/* @__PURE__ */F(W,{children:[" Drop files here or click ",
74
- /* @__PURE__ */O("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */F("table",{className:"w-full text-sm",children:[
75
- /* @__PURE__ */O("thead",{className:"bg-gray-50 text-[11px] uppercase tracking-wide text-gray-500",children:/* @__PURE__ */F("tr",{children:[
76
- /* @__PURE__ */O("th",{className:"text-left font-medium px-3 py-1.5",children:"Name"}),
77
- /* @__PURE__ */O("th",{className:"text-right font-medium px-3 py-1.5 w-24",children:"Size"}),
78
- /* @__PURE__ */O("th",{className:"text-right font-medium px-3 py-1.5 w-40",children:"Modified"}),
79
- /* @__PURE__ */O("th",{className:"w-32"})]})}),
80
- /* @__PURE__ */O("tbody",{children:J.map(t=>/* @__PURE__ */F("tr",{onClick:()=>Z(t.name),onDoubleClick:()=>{"folder"===t.kind?K(A(H,t.name)):(async t=>{if(B)return;const a=A(H,t.name),r=(t.name.split(".").pop()||"").toLowerCase(),n=M[r];n?await e({filePath:a,filename:t.name,kind:n,onStaged:e=>ue(e)}):we(t)})(t)},className:"cursor-default border-b border-gray-100 "+(_===t.name?"bg-blue-50":"hover:bg-gray-50"),children:[
81
- /* @__PURE__ */F("td",{className:"px-3 py-1.5 flex items-center gap-2",children:["folder"===t.kind?/* @__PURE__ */O(T,{name:"folder",fallback:$,className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */O(T,{name:"page",fallback:C,className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
82
- /* @__PURE__ */O("span",{className:"truncate",title:t.name,children:t.name})]}),
83
- /* @__PURE__ */O("td",{className:"px-3 py-1.5 text-right tabular-nums text-gray-500",children:"folder"===t.kind?"—":D(t.size)}),
84
- /* @__PURE__ */O("td",{className:"px-3 py-1.5 text-right text-gray-500 tabular-nums",children:U(t.modifiedAt)}),
85
- /* @__PURE__ */O("td",{className:"px-3 py-1.5 text-right whitespace-nowrap",children:!B&&/* @__PURE__ */F(W,{children:["file"===t.kind&&/* @__PURE__ */O("button",{onClick:e=>{e.stopPropagation(),we(t)},className:"px-1.5 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-[11px]",children:"Download"}),
86
- /* @__PURE__ */O("button",{onClick:e=>{e.stopPropagation(),(async e=>{const t=await y({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});if(!t||t===e.name)return;if(/[\\/]/.test(t))return void x.error("Names cannot contain slashes");const a=A(H,e.name),r=A(H,t),n=await ye(`${V}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:a,to:r})});if(!n.ok){const e=await n.json().catch(()=>({}));return void x.error(e.error||`Rename failed (${n.status})`)}ke(H)})(t)},className:"px-1.5 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-[11px] ml-1",children:"Rename"}),
87
- /* @__PURE__ */O("button",{onClick:e=>{e.stopPropagation(),(async e=>{if(!await g({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will be permanently removed.`,confirmLabel:"Delete",variant:"danger"}))return;const t=A(H,e.name),a=await ye(`${V}/api/files?path=${encodeURIComponent(t)}`,{method:"DELETE"});if(!a.ok){const e=await a.json().catch(()=>({}));return void x.error(e.error||`Delete failed (${a.status})`)}ke(H)})(t)},className:"px-1.5 py-0.5 rounded hover:bg-red-100 text-red-600 text-[11px] ml-1",children:"Delete"})]})})]},t.name))})]})})]})})}),re&&/* @__PURE__ */O("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */O("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{V as default};
@@ -1 +0,0 @@
1
- export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-LTGIQ7HO.js";import"./chunk-DBB4DB7J.js";import"./chunk-XUF7VW4U.js";import"./chunk-3JK2LSFU.js";import"./chunk-C3QOHMR6.js";import"./chunk-YKZHOXI4.js";
@@ -1,44 +0,0 @@
1
- import{useAuth as e,parseOpenSections as t,readStored as a,RAIL_OPEN_SECTIONS_KEY as r,toggleOpenSection as n,writeStored as l}from"./chunk-S2PS4IOT.js";import{partitionNav as i,BrandMark as o,openGlobalSearch as s,visibleNavChildren as c,visibleSectionItems as d,rowsContainRoute as m}from"./chunk-DXNCJBGY.js";import{navSections as h,startMenuCategories as p,TAB_STRIP_H as u,navIcons as b,sectionIcons as g}from"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import{PopupMenu as f,PopupMenuItem as x,PopupMenuDivider as y}from"./chunk-ZDF5AR5W.js";import"./chunk-AFYQTVZO.js";import"./chunk-HZZNJHRH.js";import"./chunk-X4FJ54PP.js";import"./chunk-D65T4H6J.js";import{AccountFallback as k,ErrorFallback as N,DesktopFallback as v,LogoutFallback as w,ChevronDoubleLeftFallback as C,ChevronDoubleRightFallback as j,SearchFallback as S,ChevronDownFallback as L}from"./chunk-XUF7VW4U.js";import{useShellStrings as z}from"./chunk-3JK2LSFU.js";import"./chunk-C3QOHMR6.js";import{Icon as A}from"./chunk-YKZHOXI4.js";import{useMemo as $,useState as W,useRef as I,useEffect as H,isValidElement as T,cloneElement as K}from"react";import{jsx as O,jsxs as R}from"react/jsx-runtime";var D="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform),M=(e,t)=>["flex h-9 w-full items-center gap-2.5 rounded-md px-3 text-left text-[13.5px] font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),J="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function P({open:e}){/* @__PURE__ */
2
- return O(A,{name:"chevron-down",fallback:L,className:"size-4 shrink-0 text-gray-400 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function X({dir:e}){/* @__PURE__ */
3
- return O(A,"left"===e?{name:"chevron-double-left",fallback:C,className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",fallback:j,className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}function _({className:e}){/* @__PURE__ */
4
- return O(A,{name:"search",fallback:S,className:e,strokeWidth:2,"aria-hidden":"true"})}function B({width:C,collapsed:j,onToggleCollapsed:S,onOpen:L,activeRoute:B,profile:F,user:Z,onLogout:U,onSwitchToDesktop:Q,onReportBug:Y,navSections:V=h,navIcons:G=b,sectionIcons:q=g,categories:E=p,productName:ee,productIcon:te,tagline:ae,adaptiveLogo:re=!1,logoHasAlpha:ne=null,logoIsLight:le=null}){const ie=z().layout,{hasAnyPerm:oe}=e(),se=$(()=>i(V,E,oe),[V,E,oe]),[ce,de]=W(()=>t(a(r))),me=e=>de(t=>{const a=n(t,e);return l(r,JSON.stringify([...a])),a}),[he,pe]=W(null),[ue,be]=W(!1),ge=I(null);H(()=>{j||pe(null)},[j]);const fe=(e,t)=>{pe(null),e.onSelect?e.onSelect():L(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},xe=(e,t)=>{const a=t[e];/* @__PURE__ */
5
- return O("span",{className:J,"aria-hidden":"true",children:a&&T(a)?K(a,{className:"size-[18px]"}):a})},ye=(e,t)=>{const a=c(e,oe),r=e.menuLabel??e.label;if(a.length>0){const n=`child:${e.to}`,l=ce.has(n),i=!l&&m(a,B,oe);/* @__PURE__ */
6
- return R("div",{children:[
7
- /* @__PURE__ */R("button",{type:"button",onClick:()=>me(n),"aria-expanded":l,className:M(i,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&xe(e.to,G),
8
- /* @__PURE__ */O("span",{className:"min-w-0 flex-1 truncate",children:r}),
9
- /* @__PURE__ */O(P,{open:l})]}),l&&/* @__PURE__ */O("div",{className:"space-y-0.5 pt-0.5",children:a.map(e=>ye(e,t+1))}),e.dividerAfter&&/* @__PURE__ */O("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.to)}const n=e.to===B;/* @__PURE__ */
10
- return R("div",{children:[
11
- /* @__PURE__ */R("button",{type:"button",onClick:t=>fe(e,t),onAuxClick:t=>{1===t.button&&fe(e,t)},"aria-current":n?"page":void 0,className:M(n,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&xe(e.to,G),
12
- /* @__PURE__ */O("span",{className:"min-w-0 flex-1 truncate",children:r})]}),e.dividerAfter&&/* @__PURE__ */O("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.to)},ke=(e,t)=>{const a=t?e.items:d(e,oe);if(0===a.length)return null;const r="icon"in e&&e.icon?/* @__PURE__ */O("span",{className:J,"aria-hidden":"true",children:e.icon}):xe(e.label,q),n=e.menuLabel??e.label,l=m(a,B,oe),i="dividerAfter"in e&&e.dividerAfter;if(j)/* @__PURE__ */
13
- return R("div",{children:[
14
- /* @__PURE__ */O("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":he?.label===e.label,onClick:t=>{const r=t.currentTarget.getBoundingClientRect();pe(t=>t?.label===e.label?null:{label:e.label,items:a,top:r.top})},className:M(l||he?.label===e.label,!0),children:r}),i&&/* @__PURE__ */O("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.label);const o=ce.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
15
- return R("div",{children:[
16
- /* @__PURE__ */R("button",{type:"button",onClick:()=>me(e.label),"aria-expanded":o,"aria-controls":s,className:M(!o&&l,!1),children:[r,
17
- /* @__PURE__ */O("span",{className:"min-w-0 flex-1 truncate",children:n}),
18
- /* @__PURE__ */O(P,{open:o})]}),
19
- /* @__PURE__ */O("div",{id:s,role:"group","aria-label":n,hidden:!o,className:"space-y-0.5 pt-0.5",children:o&&a.map(e=>ye(e,1))}),i&&/* @__PURE__ */O("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.label)},Ne=F?.first_name?`${F.first_name} ${F.last_name||""}`.trim():Z?.email||"",ve=(F?.first_name?.charAt(0)||Z?.email?.charAt(0)||"?").toUpperCase(),we=F?.avatar_url?/* @__PURE__ */O("img",{src:F.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */O("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:ve}),Ce=ue?ge.current?.getBoundingClientRect():void 0,je=j?"px-2.5":"px-3",Se=se.erpSections.length>0||se.systemSections.length>0||se.virtualSections.length>0;/* @__PURE__ */
20
- return R("aside",{"aria-label":ie.navLabel,className:"fixed left-0 top-0 z-[260] flex h-dvh flex-col border-r border-gray-200 bg-white text-gray-800",style:{width:C},children:[
21
- /* @__PURE__ */R("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(j?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:u},children:[
22
- /* @__PURE__ */R("span",{className:"flex min-w-0 items-center gap-2",children:[te&&/* @__PURE__ */O(o,{src:te,alt:"",slot:"compact",surface:"light",adaptive:re,hasAlpha:ne,isLight:le,size:28,decorative:!0}),!j&&/* @__PURE__ */R("span",{className:"min-w-0 leading-tight",children:[
23
- /* @__PURE__ */O("span",{className:"block truncate text-[15px] font-bold tracking-wide text-gray-900",children:ee??"Apps"}),ae&&/* @__PURE__ */O("span",{className:"block truncate text-[11px] font-medium text-gray-500",children:ae})]})]}),!j&&/* @__PURE__ */O("button",{type:"button",onClick:S,"aria-label":ie.collapseSidebar,title:`${ie.collapseSidebar} (${D?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */O(X,{dir:"left"})})]}),
24
- /* @__PURE__ */O("div",{className:`shrink-0 pt-3 ${je}`,children:j?/* @__PURE__ */O("button",{type:"button",onClick:s,"aria-label":ie.search,title:`${ie.search} (${D?"⌘K":"Ctrl K"})`,className:M(!1,!0),children:/* @__PURE__ */O(_,{className:"size-[18px]"})}):/* @__PURE__ */R("button",{type:"button",onClick:s,className:"flex h-[34px] w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-2.5 text-left transition-colors hover:bg-gray-100",children:[
25
- /* @__PURE__ */O(_,{className:"size-3.5 text-gray-500"}),
26
- /* @__PURE__ */O("span",{className:"min-w-0 flex-1 truncate text-[13px] text-gray-500",children:ie.search}),
27
- /* @__PURE__ */O("kbd",{className:"rounded border border-gray-200 bg-gray-100 px-1.5 py-0.5 font-mono text-[11px] font-semibold text-gray-500",children:D?"⌘K":"Ctrl K"})]})}),
28
- /* @__PURE__ */R("nav",{"aria-label":ie.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${je} ${j?"space-y-1":"space-y-0.5"}`,children:[j&&/* @__PURE__ */O("button",{type:"button",onClick:S,"aria-label":ie.expandSidebar,title:`${ie.expandSidebar} (${D?"⌘":"Ctrl"} .)`,className:`${M(!1,!0)} mb-3`,children:/* @__PURE__ */O(X,{dir:"right"})}),se.topItems.map(e=>{if(!j)return ye(e,0);const t=c(e,oe),a=e.to===B||m(t,B,oe),r=e.menuLabel??e.label;/* @__PURE__ */
29
- return R("div",{children:[
30
- /* @__PURE__ */O("button",{type:"button",title:r,"aria-label":r,onClick:a=>{if(0===t.length)return void fe(e,a);const r=a.currentTarget.getBoundingClientRect();pe(a=>a?.label===e.to?null:{label:e.to,items:t,top:r.top})},className:M(a,!0),children:xe(e.to,G)}),e.dividerAfter&&/* @__PURE__ */O("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"})]},e.to)}),se.topItems.length>0&&Se&&/* @__PURE__ */O("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"}),se.erpSections.map(e=>ke(e,!1)),se.systemSections.map(e=>ke(e,!1)),se.virtualSections.map(e=>ke(e,!0)),se.footerSections.length>0&&/* @__PURE__ */O("div",{className:"mx-2 my-1.5 border-t border-gray-200","aria-hidden":"true"}),se.footerSections.map(e=>ke(e,!1))]}),
31
- /* @__PURE__ */O("div",{className:`shrink-0 border-t border-gray-200 py-2 ${je}`,children:/* @__PURE__ */R("button",{ref:ge,type:"button",onClick:()=>be(e=>!e),"aria-haspopup":"menu","aria-expanded":ue,"aria-label":j?ie.accountMenu(Ne):void 0,className:"flex w-full items-center gap-2.5 rounded-md hover:bg-gray-100 "+(j?"justify-center py-2":"px-2 py-2"),children:[we,!j&&/* @__PURE__ */R("span",{className:"min-w-0 flex-1 text-left",children:[
32
- /* @__PURE__ */O("span",{className:"block truncate text-[13px] font-semibold text-gray-800",children:Ne}),Z?.email&&Ne!==Z.email&&/* @__PURE__ */O("span",{className:"block truncate text-[11px] text-gray-500",children:Z.email})]})]})}),ue&&Ce&&/* @__PURE__ */R(f,{portal:!0,minWidth:224,onClose:()=>be(!1),style:{left:Ce.left,bottom:window.innerHeight-Ce.top+8},children:[j&&/* @__PURE__ */R("div",{className:"border-b border-gray-200 px-3 py-2.5",children:[
33
- /* @__PURE__ */O("p",{className:"truncate text-sm font-semibold text-gray-800",children:Ne}),Z?.email&&/* @__PURE__ */O("p",{className:"truncate text-xs text-gray-500",children:Z.email})]}),
34
- /* @__PURE__ */R(x,{onClick:()=>{be(!1),L("/profile",!1)},children:[
35
- /* @__PURE__ */O(A,{name:"account",fallback:k,className:"h-4 w-4 text-gray-400",strokeWidth:1.5,"aria-hidden":"true"}),ie.profile]}),se.footerItems.map(e=>/* @__PURE__ */R(x,{onClick:()=>{be(!1),fe(e)},children:[
36
- /* @__PURE__ */O("span",{className:"h-4 w-4 text-gray-400 [&>svg]:size-4","aria-hidden":"true",children:G[e.to]}),e.menuLabel??e.label]},e.to)),Y&&/* @__PURE__ */R(x,{onClick:()=>{be(!1),Y()},children:[
37
- /* @__PURE__ */O(A,{name:"error",fallback:N,className:"h-4 w-4 text-gray-400",strokeWidth:1.5,"aria-hidden":"true"}),ie.reportIssue]}),
38
- /* @__PURE__ */O(y,{}),
39
- /* @__PURE__ */R(x,{onClick:()=>{be(!1),Q()},children:[
40
- /* @__PURE__ */O(A,{name:"desktop",fallback:v,className:"h-4 w-4 text-gray-400",strokeWidth:1.5,"aria-hidden":"true"}),ie.switchToDesktop]}),
41
- /* @__PURE__ */O(y,{}),
42
- /* @__PURE__ */R(x,{danger:!0,onClick:()=>{be(!1),U()},children:[
43
- /* @__PURE__ */O(A,{name:"logout",fallback:w,className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ie.signOut]})]}),he&&j&&/* @__PURE__ */O(f,{portal:!0,minWidth:220,onClose:()=>pe(null),style:{left:C+6,top:Math.min(he.top,window.innerHeight-48*Math.min(he.items.length,10)-16)},children:he.items.flatMap(e=>{const t=c(e,oe);return(t.length>0?t:[e]).map(e=>/* @__PURE__ */R(x,{onClick:()=>fe(e),children:[xe(e.to,G),
44
- /* @__PURE__ */O("span",{className:e.to===B?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))})})]})}export{B as default};
@@ -1 +0,0 @@
1
- import{formatPlain as e,formatFixed as o,formatGrouped as t,formatPercent as a}from"./chunk-C3QOHMR6.js";import{createContext as i,useContext as n,useMemo as r,useEffect as s}from"react";import{jsx as l}from"react/jsx-runtime";function d(i){const n=o=>e(o,i),r=e=>t(e,i),s=(e,t)=>o(e,t,i),l=(e,o)=>a(e,o,i);return{window:{minimize:"Minimize",restore:"Restore",maximize:"Maximize",windowed:"Windowed",pinOnTop:"Pin on top",unpin:"Unpin from top",close:"Close",windowSuffix:"window",prev:"Prev",next:"Next",snapLayouts:"Snap layouts",snapLeft:"Snap left half",snapRight:"Snap right half",snapTopLeft:"Snap top-left quarter",snapTopRight:"Snap top-right quarter",snapBottomLeft:"Snap bottom-left quarter",snapBottomRight:"Snap bottom-right quarter"},taskbar:{closeWindow:"Close window",offscreenHint:"This window is off screen — click to bring it back",offscreenDot:"Off screen — click to bring this window back",expose:"Exposé — show all open windows as thumbnails",addToDesktop:"Add to desktop",removeFromDesktop:"Remove from desktop",minimizeAllWindows:"Minimize all",restoreAllWindows:"Restore all",closeAllWindows:"Close all"},logout:{goodbye:"Goodbye",seeYou:"See you next time"},about:{aboutPrefix:"About",thisApp:"this app",openSourceLicenses:"Open Source Licenses",whatsNew:"What's New",noChangelog:"No changelog available."},table:{empty:"Nothing to show",loading:"Loading",selectAll:"Select all rows",selectRow:"Select row"},select:{none:"— None —",noMatches:"No matches",allSelected:"All options selected",clear:"Clear selection",remove:"Remove"},notifications:{title:"Notifications",markAllRead:"Mark all read",dnd:"Do not disturb",dndOn:"Do not disturb is on",caughtUp:"All caught up",empty:"No notifications yet",viewAll:"View all notifications",cardLabel:"Notification",dismiss:"Dismiss notification"},form:{errorSummaryTitle:"There is a problem"},help:{title:"Help",searchPlaceholder:"Search help…",empty:"No help articles yet.",noResults:"No articles match your search.",loading:"Loading…",pickArticle:"Pick a help article from the left.",noBody:"This article has no body yet.",draft:"Draft",newArticle:"+ New",edit:"Edit"},update:{available:"A new version is available.",refreshNow:"Refresh now"},pageTabs:{label:"Open pages",close:"Close",closeOthers:"Close other tabs",closeRight:"Close tabs to the right",closeAll:"Close all tabs",unsaved:"Unsaved changes",copy:e=>`Copy ${e}`,copied:"Copied",tabMenu:"Window menu",discardTitle:"Discard unsaved changes?",discardOne:"This page has changes that have not been saved. Close it anyway?",discardMany:"pages have changes that have not been saved. Close them anyway?",discardConfirm:"Discard and close",keepEditing:"Keep editing"},dialog:{close:"Close",cancel:"Cancel",ok:"OK",confirmTitle:"Confirm",destructiveTitle:"Confirm Action",destructiveCancel:"Dismiss",destructiveConfirm:"Delete",typeToConfirm:e=>`Type ${e} to confirm:`,promptTitle:"Enter a value"},calendar:{previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",monthPanel:"Choose a month",yearPanel:"Choose a year",chooseMonth:e=>`Choose a month, currently ${e}`,chooseYear:e=>`Choose a year, currently ${e}`},datePicker:{placeholder:"Select a date",dialog:"Choose a date",clear:"Clear",today:"Today",required:"Required"},dateRange:{placeholder:"Date Range",clearRange:"Clear date range",dialog:"Date range",from:"From",to:"To",start:"Start",end:"End",fromOnly:e=>`From ${e}`,toOnly:e=>`To ${e}`,range:(e,o)=>`${e} to ${o}`,required:"Required",last2Weeks:"Last 2 Weeks",lastMonth:"Last Month",last3Months:"Last 3 Months",last6Months:"Last 6 Months",last12Months:"Last 12 Months",custom:"Custom",clear:"Clear",cancel:"Cancel",apply:"Apply"},pagination:{label:"Pagination",first:"First page",previous:"Previous page",next:"Next page",last:"Last page"},list:{selected:e=>`${n(e)} selected`,selectedNotShown:(e,o)=>`${n(e)} selected, ${n(o)} not shown`,allLoaded:(e,o)=>`All ${r(e)} ${o} loaded`,count:(e,o)=>`${r(e)} ${o}`,loadedOf:(e,o,t)=>`${r(e)} of ${r(o)} ${t}`,loadingMore:"Loading more...",loadError:"Couldn't load this list",loadErrorMessage:"Something went wrong fetching these records. Check your connection and try again.",retry:"Try again"},kanban:{loading:"Loading…",empty:"No items.",dropHere:"Drop here",addItem:"Add item"},files:{attach:"Attach files",drop:"Drop files to attach",remove:e=>`Remove ${e}`,chooseMany:"Choose files",chooseOne:"Choose a file",dragMany:"or drag them here",dragOne:"or drag it here",notAccepted:(e,o)=>`${e} is not an accepted file type${o?` (${o})`:""}`,tooLarge:(e,o,t)=>`${e} is ${o} — the limit is ${t}`,tooMany:(e,o)=>`${e} was not added — ${n(o)} ${1===o?"file":"files"} is the limit`,bytes:e=>`${n(e)} B`,kilobytes:e=>`${n(e)} KB`,megabytes:e=>`${s(e,1)} MB`},media:{uploadImage:"Upload an image",uploadVideo:"Upload a video",uploadFile:"Upload a file",upload:"Upload media",cta:"Choose from library or upload",replace:"Replace",remove:"Remove",uploading:"Uploading…",cover:"Cover",add:"Add",addMedia:"Add media",empty:"No media.",removeItem:e=>`Remove ${e}`,reorder:(e,o,t)=>`${e}, item ${n(o)} of ${n(t)}. Use arrow keys to reorder.`},brandAsset:{save:e=>`Save ${e}`,remove:e=>`Remove ${e}`,discard:"Discard change",saveFailed:e=>`Could not save ${e}.`,removeFailed:e=>`Could not remove ${e}.`,region:(e,o)=>`${e} for ${o}`,usedFor:e=>`Used for ${e}.`,previews:e=>`${e} previews`,preview:"Preview",alt:(e,o)=>`${e} ${o}`},copy:{copy:"Copy",copyLabel:e=>`Copy ${e}`,copied:"Copied",copyValue:e=>`Copy ${e}`,copiedValue:"Copied!",copiedLabel:e=>`${e} copied`,failed:"Could not copy to the clipboard"},keypad:{backspace:"Backspace",enter:"Enter"},banner:{dismiss:"Dismiss"},badge:{remove:"Remove",removeItem:e=>`Remove ${e}`},breadcrumbs:{label:"Breadcrumb",hidden:"Hidden crumbs"},emptyState:{message:"Nothing here yet."},errors:{notFound:"Page not found",notFoundBody:"The page you're looking for doesn't exist or was moved.",forbidden:"Access denied",forbiddenBody:"You don't have permission to view this page.",noAccess:"You don't have access to this",serverError:"Something went wrong",serverErrorBody:"An unexpected error occurred. Please try again.",retry:"Try again",details:"Error details"},search:{placeholder:"Search...",escBadge:"ESC",searching:"Searching...",noResults:"No results found.",minChars:e=>`Type at least ${n(e)} characters to search...`,navigate:"navigate",open:"open",close:"close",enterKey:"Enter",escKey:"Esc",recent:"Recent",favorites:"Favorites",actions:"Actions",listLabel:"Search results",groupCount:(e,o)=>`${n(e)}${o?"+":""}`,groupLabel:(e,o,t)=>`${e}, ${n(o)}${t?"+":""}`,seeAll:e=>`See all ${e}`,searchFailed:"Search failed — check your connection and try again.",partialFailure:"Some results could not be loaded.",tabKey:"Tab",nextGroup:"next group"},grid:{selectAll:"Select all",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:e=>`Delete row ${e}`,insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteColumn:e=>`Delete column ${e}`,resize:"Drag to resize · double-click to auto-fit",fill:"Drag to fill"},sidebar:{resize:"Drag to resize · double-click to reset"},resizeHandle:{label:"Resize panel",hint:"Drag to resize · double-click to reset"},number:{increase:"Increase",decrease:"Decrease"},slider:{value:e=>`${e} value`},displayChips:{shown:"Shown",hidden:"Hidden",shownHint:"Shown · click to hide",hiddenHint:"Hidden · click to show"},color:{swatch:(e,o)=>`${e}: ${o}`,none:"None",panel:e=>`${e} picker`,square:"Saturation and brightness",squareValue:(e,o)=>`Saturation ${l(e,0)}, brightness ${l(o,0)}`,hue:"Hue",hex:e=>`${e} hex code`,presets:"Presets",clear:"No color"},imageFocus:{picture:(e,o)=>`${e}: ${o}`,hint:"Drag the dot on the picture, or move it with the arrow keys. Shift moves it further.",noImage:"Choose an image first. There is nothing to focus yet."},tree:{empty:"Nothing here yet",dropHere:"Drop here",dragHint:"Drag to move",moveHint:"Alt+Arrow Up or Alt+Arrow Down moves it",insertHere:"Insert here"},layout:{desktop:"Desktop",sidebar:"Sidebar",switchToDesktop:"Switch to Desktop",switchToSidebar:"Switch to Sidebar",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",search:"Search…",navLabel:"Main menu",openWindows:"Open windows",pageResult:"Page",accountMenu:e=>`Account menu for ${e}`,profile:"My Profile",notifications:"Notifications",reportIssue:"Suggestion or Bug",signOut:"Sign Out",signOutTitle:"Sign Out",signOutMessage:"Do you want to log out? All windows will reopen when you log back in."},markdown:{screenshot:"Screenshot"},severity:{success:"ok",warning:"warning",danger:"critical",unrecognised:e=>`unrecognised severity ${e}`},meter:{noData:"no data",warningAt:e=>`warning ≥ ${n(e)}`,criticalAt:e=>`critical ≥ ${n(e)}`,noReading:"no reading",noBudget:"no budget",ofBudget:e=>`${e} of budget`,budget:"budget",hoursMinutes:(e,o)=>`${n(e)}h ${n(o)}m`,minutesSeconds:(e,o)=>`${n(e)}m ${n(o)}s`,seconds:e=>`${n(e)}s`},charts:{showTable:"Show the data as a table",loading:"Loading chart data",noData:"No data in this window.",windowStart:"Window start",windowEnd:"Window end",window:(e,o,t)=>`Time window — showing ${e} to ${o} of ${n(t)} intervals`,overIntervals:(e,o)=>`${e.join(", ")} over ${n(o)} intervals`,acrossCategories:(e,o)=>`${e.join(", ")} across ${n(o)} categories`,acrossMeasures:(e,o)=>`${e.join(", ")} across ${n(o)} measures`,breakdown:(e,o)=>`Breakdown of ${e} across ${n(o)} segments`,funnel:(e,o,t)=>`Funnel of ${n(e)} stages, ${o} down to ${t}`,radialTrack:e=>`${n(e)} categories, as concentric proportions`,radialCycle:e=>`${n(e)} categories, around a cycle`,tableFrom:"From",tableTo:"To",tableItem:"Item",tableLevel:"Level",tableSeries:"Series",inBucket:e=>`${e} in this bucket`,inCategory:e=>`${e} in this category`,value:"Value",share:"Share",count:"Count",flow:"Flow",totalFlow:"Total flow",throughput:"Throughput",open:"Open",high:"High",low:"Low",close:"Close",maximum:"Maximum",q3:"Q3",median:"Median",q1:"Q1",minimum:"Minimum",distribution:"Distribution",fiveNumber:(e,o)=>`${e}: five-number summary for ${n(o)} categories`,outliers:e=>`${n(e)} outlier${e>1?"s":""} beyond the whiskers`,price:"Price",ohlc:(e,o)=>`${e}: open, high, low and close across ${n(o)} periods`,closedAbove:"Closed above its open",closedBelow:"Closed below its open",noFlows:"No flows to chart.",chord:e=>`Flows between ${n(e)} participants`,noStages:"No stages to chart.",ofFirstStage:"Of first stage",droppedHere:"Dropped here",intensity:"Intensity",noActivity:"No activity in this window.",heatmap:(e,o,t)=>`${e} across ${n(o)} rows and ${n(t)} columns`,countAxis:"count",histogram:(e,o,t)=>`${e}: ${n(o)} bins over ${n(t)} observations`,observations:"Observations",notEnough:"Not enough eligible requests to judge.",objectiveMet:e=>`objective ${e} met`,objectiveMissed:e=>`objective ${e} missed`,nothingToPlot:"Nothing to plot.",nothingToCompare:"Nothing to compare.",other:"Other",nothingToBreakDown:"Nothing to break down.",range:"Range",rangeLabel:(e,o)=>`${e}: low and high across ${n(o)} categories`,nothingToRank:"Nothing to rank in this window.",emphasised:"(emphasised)",sankey:(e,o)=>`Flow between ${n(e)} nodes over ${n(o)} links`,noObservations:"No observations in this window.",xAxis:"x",yAxis:"y",size:"Size",scatter:(e,o,t)=>`${e.join(", ")}: ${o} against ${t}`,outsideRange:e=>`${n(e)} ${1===e?"point":"points"} outside the shown range`,waterfall:(e,o,t)=>`Waterfall of ${n(e)} steps from ${o} to ${t}`,balance:"Balance",increase:"Increase",decrease:"Decrease",runningTotal:"Running total",sunburst:(e,o)=>`Hierarchy of ${e} across ${n(o)} levels`,treemap:e=>`Treemap of ${n(e)} items`,trendUp:"up",trendDown:"down",trendFlat:"flat"},timeline:{days:e=>`${r(e)} days`,daysToToday:e=>`${r(e)} days to today`,notReached:"Not yet reached",next:"Next",more:e=>`+${n(e)} more`,today:"Today",todayTitle:e=>`Today — ${e}`,open:e=>`Open ${e}`,openButton:"Open",scrub:"Scrub the timeline",alsoToCome:e=>`Also to come: ${e.join(", ")}`,start:e=>`Start · ${e}`,events:(e,o)=>`${n(e)} events · ${o.join(", ")}`,started:e=>`started ${e}`,duration:e=>`${r(e)} day${1===e?"":"s"}`,reached:(e,o)=>`${n(e)} of ${n(o)} milestones`,milestones:e=>`${e} milestones`},production:{heading:"Production progress",start:"Start",estimated:"Estimated",estimatedCompletion:"Estimated completion",estDone:"Est. done",play:"Play",pause:"Pause",playTitle:"Play the timeline, report by report",backTo:e=>`Back to ${e}`,showing:e=>`Showing ${e}`,overall:e=>`${l(e,0)} overall`,inStock:e=>`${r(e)} pc in stock`,noReport:"No production report filed yet",leadTime:e=>`${r(e)} day${1===e?"":"s"} lead time`,report:"Production report",shipment:"Shipment",inspection:"Inspection",invoice:"Invoice",scrub:"Scrub the production timeline",label:(e,o)=>`Production reports and events, ${e} to ${o}`},containers:{items:e=>`${n(e)} items`,pieces:e=>`${n(e)} pcs`,split:(e,o)=>`(${n(e)} instr / ${n(o)} loaded)`,added:(e,o)=>`${n(e)} new (${n(o)} pcs)`,fill:(e,o)=>`${s(e,1)} / ${n(o)} m³`,total:"Total:",instructed:e=>`${s(e,2)} m³ instruction`,loaded:e=>`${s(e,2)} m³ loaded`,volume:e=>`${s(e,2)} m³`,noVolume:"Volume: N/A (no volume data for these part numbers)"},toast:{notification:"Notification"},map:{failed:"The map could not be drawn here. The list has everything it shows.",approximate:e=>`${e}, approximate location`,approximateTitle:e=>`${e} (approximate)`,places:e=>1===e?"place":"places",group:(e,o)=>`${n(e)} ${o} here`,stops:e=>`Stops ${e}`,closeBy:(e,o)=>`${n(e)} more ${o} close by, drawn when the map is closer`,spread:"Press to see them apart",cycle:"They stand on one spot: press for the next of them",fullScreen:"Full screen",leaveFullScreen:"Leave full screen",chosen:e=>`${e}, chosen on the map`,closeCard:"Close",openRecord:"Open"},pdf:{previousPage:"Previous page",nextPage:"Next page",pageOf:(e,o)=>`${n(e)} / ${n(o)}`,zoomOut:"Zoom out",zoomIn:"Zoom in",zoom:"Zoom",fitWidth:"Fit width",fitPage:"Fit page",fit:"Fit",fitHint:"Fit to the pane: follows its size until you zoom by hand",print:"Print",download:"Download",email:"Email",loading:"Loading PDF…",loadFailed:"Failed to load PDF",allowPopups:"Allow popups to print"},loading:{label:"Loading..."},language:{title:"Language",description:"The language of menus, labels and messages.",reloadNote:"The page reloads when you change the language."},entityList:{open:"Open",copy:"Copy",copyColumn:e=>`Copy ${e}`,copyRows:e=>1===e?"Copy row":`Copy ${n(e)} rows`,exportSelected:"Export selected to CSV",selectAll:"Select all",selectAllLoaded:e=>`Select all ${n(e)} loaded`,clearSelection:"Clear selection",refresh:"Refresh",copiedText:"Text",copiedRows:e=>1===e?"Row":`${n(e)} rows`,exported:e=>`Exported ${n(e)} ${1===e?"row":"rows"}.`,exportTruncated:(e,o)=>`Exported ${n(e)} of ${n(o)} rows. The server capped this export, so the file is incomplete.`,exportTruncatedUnknown:e=>`Exported only some of the ${n(e)} rows. The server capped this export, so the file is incomplete.`,exportFailed:"CSV export failed."},columns:{choose:"Choose columns",heading:"Columns",reset:"Reset",saveDefault:"Save as default for all users",savedDefault:"Saved as default",select:"Select",selectDone:"Done",showSelection:"Show selection column",hideSelection:"Hide selection column"},record:{loading:"Loading record…",signInRequired:"Sign in required",signInBody:"Your session may have expired. Sign in again to open this record.",notFound:"Record not found",loadFailed:"Couldn't load record",checkConnection:"Check your connection and try again.",rejected:"The server rejected this request.",retry:"Try again"},password:{current:"Current Password",newPassword:"New Password",confirm:"Confirm Password",submit:"Change Password",submitting:"Changing...",done:"Done",currentRequired:"Current password is required.",tooShort:e=>`New password must be at least ${n(e)} characters.`,mismatch:"Passwords do not match.",failed:"Failed to change password.",changed:"Your password has been changed successfully."},pdfAction:{label:"PDF",loading:"Loading...",preview:"Preview",download:"Download",email:"Send by Email",downloaded:e=>`${e} downloaded.`,tookTooLong:e=>`${e} took too long to load. Please try again.`,previewLoading:"LOADING PDF",previewTookTooLong:"This document took too long to load. Close this window and try again.",previewFailed:"Failed to load PDF."},undo:{undo:"Undo",redo:"Redo",undoStep:(e,o)=>`Undo ${e} (${o})`,redoStep:(e,o)=>`Redo ${e} (${o})`,nothingToUndo:"Nothing to undo",nothingToRedo:"Nothing to redo"},sounds:{title:"Sounds",enable:"Sound effects",autosave:"Changes are saved automatically",choice:(e,o)=>`${e} — ${o}`,packClassic:"Classic",packMinimal:"Minimal",packRetro:"Retro",packSoft:"Soft",packArcade:"Arcade",packSilent:"Silent",eventClick:"Click",eventSuccess:"Success",eventError:"Error",eventNotification:"Notification",eventStartup:"Startup",eventTimerDone:"Timer",eventLogout:"Logout"},serverStatus:{connected:"Connected",disconnected:"Disconnected",checking:"Checking…",lastOkTitle:(e,o)=>`${e} · last ok ${o}`,details:"Server connection details",lastPoll:e=>`Last poll ${e}.`,lastFailure:e=>`Last failure ${e}.`,firstPoll:"First poll in flight…",server:"Server",protocol:"Protocol",browser:"Browser",online:"Online",offline:"Offline",lastOk:"Last OK",lastFail:"Last fail",latency:"Latency",poll:"Poll",pollEvery:e=>`every ${n(e)} s`,session:"Session",user:"User",notSignedIn:"Not signed in",role:"Role",build:"Build",app:"App",userAgent:"UA",pingHint:"Click ↻ to ping now",refresh:"Refresh"},bulkImport:{description:"Paste from spreadsheets, type directly, or upload a CSV. Rows don't need to be in order — they'll be matched. Values not in the list will be added to the end. Fields left blank will not be affected.",lines:e=>`${n(e)} lines`,total:(e,o)=>`${e}: ${o}`,clear:"Clear",upload:"Upload CSV",importLines:e=>`Import ${n(e)} Lines`,importing:"Importing...",importFailed:"Import failed.",enterAtLeastOne:e=>`Enter at least one ${e||"value"}.`,allSkipped:"All rows skipped.",cancel:"Cancel",mapTitle:"Map CSV columns to fields",skip:"— Skip —",columnOption:(e,o)=>`Column ${n(e)} (e.g. ${o})`,rowsDetected:e=>`${n(e)} rows detected`,confirmMapping:"Confirm Mapping",duplicatesTitle:"Duplicate entries detected",duplicatesFound:e=>`${n(e)} ${1===e?"value appears":"values appear"} more than once in your import. Choose how to handle each before proceeding.`,occurrences:e=>`${n(e)} occurrences`,keepFirst:"Keep first",keepLast:"Keep last",keepAll:"Keep all",skipAll:"Skip all",keptDropped:(e,o)=>`${n(e)} kept · ${n(o)} dropped`,proceed:"Proceed",duplicatesMerged:e=>`${n(e)} ${1===e?"value appeared":"values appeared"} more than once. Each is merged into a single line with its quantity summed — review before proceeding.`,mergedFrom:"Merged from",mergedRows:e=>`${n(e)} rows`,mergeSummary:(e,o)=>`${n(e)} duplicate rows → ${n(o)} merged line${1===o?"":"s"}`},preview:{windowTitle:e=>`${e} - Preview`,untitled:"Untitled",open:"Open",formats:"PDF · DXF · 3D · Images",dropHere:e=>`Drop a file here, or click ${e}.`,supportedFormats:"Supported formats",formatPdf:"multi-page document viewer",formatDxf:e=>`vector CAD drawings (optional ${e} peer dep)`,format3d:e=>`3D models (optional ${e} peer dep)`,formatImage:"raster images",dwgNote:"DWG files need to be converted to PDF or DXF first (server-side).",dropToOpen:"Drop to open",dwgUnsupported:"DWG files need server-side conversion. Convert to PDF or DXF first.",unsupportedType:e=>`Unsupported file type: .${e||"unknown"}`,converting:"Converting file",download:"Download",email:"Email",howToNavigate:"How to navigate",stopMeasuring:"Stop measuring (Esc)",scrollToZoom:"Scroll to zoom",closePanel:"Close",annotate:"Annotate",annotateHint:"Annotate this image",view:"View",viewHint:"Back to viewer",copy:"Copy",save:"Save",imageFailed:"Failed to load image.",downloadFailed:"Download failed — couldn't reach the file."},drawing:{loading:"Loading drawing…",notInstalled:"dxf-viewer is not installed in this app.",renderFailed:"Failed to render DXF.",layers:"Layers",layersHint:"Toggle layer visibility",allLayers:"All",noLayers:"None",measure:"Measure",measureHint:"Measure distance — click two points on the drawing, or type DI / DIM below",auto:"Auto",autoHint:"Auto — AutoCAD DIMLINEAR: measures ΔX or ΔY, whichever is larger between the two picks",horizontalHint:"Horizontal — distance along the X axis between two picks (AutoCAD DIMLINEAR horizontal)",verticalHint:"Vertical — distance along the Y axis between two picks (AutoCAD DIMLINEAR vertical)",point:"Point",pointHint:"Point — straight-line (Euclidean) distance between two picks (AutoCAD DIST)",fixX:"fix Δx",fixY:"fix Δy",fixHint:"Lock the second pick's axis coord to first pick + this value (mm). The reported measurement becomes the perpendicular distance.",clearFixed:"Clear fixed distance",horizontalDistance:e=>"Horizontal distance (Δx) between the two picked points"+(e?" — Auto resolved to the X axis":""),verticalDistance:e=>"Vertical distance (Δy) between the two picked points"+(e?" — Auto resolved to the Y axis":""),straightDistance:"Straight-line distance between the two picked points",fit:"Fit",fitHint:"Fit drawing to view",dragToPan:"Drag to pan",fitToReset:"Fit to reset",typeToMeasure:e=>`Type ${e} to measure`,commandPlaceholder:"Type a command — DI, DIM, H, V, Z, LA (? for help)",commandHelp:"Commands: DI distance · DIM/DLI linear dim · H / V force axis · <number> lock Δ · U undo pick · Z fit · LA layers · Esc exit",echoDistance:(e,o,t)=>`Distance = ${e} ΔX = ${o} ΔY = ${t}`,echoLinear:(e,o)=>`Linear dimension = ${e} (${o})`,echoLocked:(e,o,t,a)=>`${e} = ${o} with ${t} locked to ${a}`,axisLocked:(e,o)=>`${e} locked to ${o} — the label shows the perpendicular distance`,fixedCleared:"Fixed distance cleared.",fixedNeedsAxis:"Fixed distances apply in H or V mode — type H or V first.",echoDist:"DIST — click two points; straight-line distance (Esc to exit)",echoDimLinear:"DIMLINEAR — click two points; measures ΔX or ΔY, whichever is larger (H / V to force)",echoHorizontal:"Horizontal — ΔX between the two picks",echoVertical:"Vertical — ΔY between the two picks",echoAuto:"Auto (DIMLINEAR) — measures along the dominant axis of the two picks",measureOn:"Measure on — click two points.",measureOff:"Measure off.",pickRemoved:"Last pick removed.",zoomExtents:"Zoom extents.",layersToggled:"Layer panel toggled.",measurementCleared:"Measurement cleared.",readOnly:e=>`${e} is a drawing command — Preview is a read-only viewer. Measuring: DI, DIM, H, V (? for help)`,unknownCommand:e=>`Unknown command "${e}" — try DI, DIM, H, V, Z, LA (? for help)`,cancelled:"*Cancel*"},model:{loading:"Loading 3D model…",stepNote:"STEP files load OpenCascade WASM (~5 MB) on first use.",notInstalled:"online-3d-viewer is not installed in this app. Add it to enable 3D file viewing.",loadFailed:"Failed to load 3D model.",rootNode:"Root",node:"Node",collapse:"Collapse",expand:"Expand",fitToView:"Fit to view",hide:"Hide",show:"Show",isometric:"ISO",isometricView:"Isometric view",top:"TOP",topView:"Top view",front:"FRT",frontView:"Front view",side:"SDE",sideView:"Side view",perspective:"Perspective",orthographic:"Orthographic",toPerspective:"Switch to perspective view",toOrthographic:"Switch to orthographic view",snapshot:"Save snapshot as PNG",measureHint:"Measure distance — click two points on the model",point:"Point",pointHint:"Point — measure straight-line distance between two picked points",perpendicularHint:"Perpendicular — pick two surfaces and measure the perpendicular gap between them",straightDistance:"Straight-line distance between the two picked points",perpendicularDistance:"Perpendicular distance between the two picked surfaces",meshesHint:"Toggle meshes panel",displayHint:"Toggle display panel",downloadOriginal:"Download original file",meshes:"Meshes",readingModel:"Reading model…",noStructure:"No structure available",allVisible:"All visible",hiddenCount:e=>`${n(e)} hidden`,dragToRotate:"Drag to rotate",rightDragToPan:"Right-click drag to pan",display:"Model Display",backgroundColor:"Background Color",showEdges:"Show Edges",edgeColor:"Edge Color",edgeThreshold:"Edge Threshold",sectionView:"Section View",angle:"Angle",axis:"Axis",flipHint:"Flip section direction",flip:"flip →",flipped:"← flipped",position:"Position",resetDisplay:"Reset to Default"},annotator:{toolSelect:"Select / Move",toolDraw:"Pen / Draw",toolRect:"Rectangle",toolEllipse:"Ellipse",toolArrow:"Arrow",toolMosaic:"Mosaic",toolText:"Text",toolCrop:"Crop",weight:"Weight",radius:"Radius",size:"Size",padding:"Pad",fontSystem:"System",fontSerif:"Serif",fontMono:"Mono",fontCursive:"Cursive",bold:"Bold",boldLetter:"B",italic:"Italic",italicLetter:"I",underline:"Underline",underlineLetter:"U",border:"Border",borderColor:"Text-box border color",addBorder:"Add a border",removeBorder:"Remove border",fill:"Fill",fillColor:"Text-box background color",addFill:"Add a background fill",removeFill:"Remove fill",add:"Add",zoomOut:"Zoom out",zoomIn:"Zoom in",fit:"Fit",fitHint:"Fit to area",undo:"Undo",applyCrop:"Apply Crop",cancel:"Cancel",apply:"Apply",hintSelected:"Drag to move. Drag a corner to resize. Delete / Backspace removes. Click outside to deselect.",hintSelect:"Tap a shape to select. Double-click text to edit.",hintText:"Click to drop a text label.",hintCrop:"Drag a rectangle to set the crop region.",hintDraw:"Drag to draw freehand.",hintShape:"Drag on the image to draw.",textPlaceholder:"Type then Enter…",loadFailed:"Failed to load image",exportFailed:"Failed to export",clipboardUnsupported:"Clipboard images not supported in this browser",copyFailed:"Failed to copy",copied:"Copied to clipboard",copyRefused:"Copy failed (clipboard permission?)"},attachment:{fallbackName:"attachment",noLink:"This attachment has no download link.",spreadsheetFailed:"Could not open the spreadsheet — opening the file instead.",workbookUnavailable:"Spreadsheet preview is unavailable for this file type. Opening the file instead.",noViewer:"Opening this file outside the app — no viewer can show it here.",loading:"LOADING FILE",loadFailed:"Failed to load this file."},aboutApp:{title:e=>`About ${e}`,version:e=>`Version ${e}`,partOf:e=>`Part of the ${e} desktop environment`,shellVersion:e=>`shell v${e}`,spreadsheet:"Multi-sheet spreadsheet editor with CSV / TSV import and export.",notepad:"Color-coded notes with checklists, desktop stickies and entity autolinking.",documents:"Letter-page editor for Word documents and plain-text files — images, lists, alignment.",preview:"Viewer for PDF documents, images, DXF drawings and 3D models — CAD-style measuring with object snap and an AutoCAD-like command bar.",files:"Personal file manager with folders, uploads, quota, trash and desktop shortcut folders.",browser:"Minimal web browser with bookmarks, history and navigation bar."}}}var c=d(),p=/* @__PURE__ */new Map;var h=i(c),u=i(null),m=/* @__PURE__ */new Set;var g=c,w={};function f(){return g}function $({value:e=w,locale:o,children:t}){const a=n(u),i=r(()=>function(e){if(e)try{return Intl.getCanonicalLocales(e)[0]}catch{return void(m.has(e)||(m.add(e),console.error(`[efficient-shell] ShellStringsProvider: locale="${e}" is not a BCP 47 language tag, so it is ignored and numbers and dates keep their default formatting. Pass a tag such as "de-DE" or "ja".`)))}}(o),[o]),f=void 0===o?a?.locale:i,$=r(()=>{const o=function(e){if(!e)return c;let o=p.get(e);return o||(o=d(e),p.set(e,o)),o}(f),t={};for(const a of Object.keys(o))t[a]={...o[a],...e[a]??{}};return t},[e,f]),v=r(()=>({locale:f}),[f]),y=null!==a;return s(()=>{if(!y)return g=$,()=>{g===$&&(g=c)}},[$,y]),/* @__PURE__ */l(u.Provider,{value:v,children:/* @__PURE__ */l(h.Provider,{value:$,children:t})})}function v(){return n(h)}function y(){return n(u)?.locale}function b(e){const[o="",...t]=e("\0").split("\0");return[o,t.join("")]}export{c as DEFAULT_SHELL_STRINGS,$ as ShellStringsProvider,f as currentShellStrings,b as splitAround,y as useShellLocale,v as useShellStrings};