efficient-shell 8.1.0 → 8.6.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.
- package/README.md +7 -6
- package/dist/{Browser-DPZW525X.js → Browser-DWCAT7YU.js} +14 -14
- package/dist/Calculator-B44SNFGQ.js +29 -0
- package/dist/{CurrencyConverter-QGJGHF7D.js → CurrencyConverter-QCXULYMM.js} +8 -8
- package/dist/{Documents-JXWMWUYA.js → Documents-TJGLPXWF.js} +24 -24
- package/dist/Files-6A6VPSMP.js +87 -0
- package/dist/{Notepad-HTD5I4TI.js → Notepad-F42I5BFB.js} +9 -9
- package/dist/{PdfViewer-A4YQDCER.js → PdfViewer-IQQM7DOH.js} +1 -1
- package/dist/{PomodoroTimer-42AKGGPS.js → PomodoroTimer-KUB3JUJO.js} +4 -4
- package/dist/{Preview-KQLFA2TJ.js → Preview-D535MRVA.js} +35 -35
- package/dist/Sidebar-EIGME7VA.js +43 -0
- package/dist/{Spreadsheet-FRU2PYVZ.js → Spreadsheet-PUAIM4ZN.js} +14 -14
- package/dist/{Stock-6YBJY53A.js → Stock-DCQEYEND.js} +3 -3
- package/dist/{Weather-CQIK7FA7.js → Weather-UYCFOHGQ.js} +17 -17
- package/dist/{WorldClock-BR7QFSTH.js → WorldClock-WKMFOBKT.js} +6 -6
- package/dist/ai/index.js +12 -12
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/StatTile.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/chunk-26DGOAPH.js +14 -0
- package/dist/{chunk-G4FMVIJT.js → chunk-2DGTGJYJ.js} +9 -9
- package/dist/{chunk-AMTFUUOM.js → chunk-2K76HRXS.js} +1 -1
- package/dist/{chunk-RUTL7QGV.js → chunk-2LKH6JM5.js} +1 -1
- package/dist/{chunk-4AXCIQB2.js → chunk-2M5JD52X.js} +2 -2
- package/dist/{chunk-7ZL7SQCN.js → chunk-2QI3QFX6.js} +1 -1
- package/dist/{chunk-3ACF3KU7.js → chunk-2TPUNCT7.js} +9 -9
- package/dist/{chunk-3ATZYGAU.js → chunk-2VLQECPC.js} +10 -10
- package/dist/{chunk-RERVHKA6.js → chunk-332V47ID.js} +2 -2
- package/dist/{chunk-KPF7K32G.js → chunk-3GMHX3WX.js} +4 -4
- package/dist/{chunk-NDMFITDJ.js → chunk-3OKD2ZZV.js} +11 -11
- package/dist/{chunk-QMIPMPCY.js → chunk-3XLVARRX.js} +6 -6
- package/dist/{chunk-DMZL7OH6.js → chunk-42U4LJT7.js} +9 -9
- package/dist/{chunk-A34WQDNB.js → chunk-4A2X6KLQ.js} +1 -1
- package/dist/{chunk-EWQY4JAO.js → chunk-4AFNDOPF.js} +1 -1
- package/dist/{chunk-VAIO7Q4E.js → chunk-4B7ZRWDA.js} +1 -1
- package/dist/{chunk-GNWSAZRJ.js → chunk-4CXQX5AX.js} +14 -14
- package/dist/{chunk-QRAXICBI.js → chunk-4OYSTWMQ.js} +1 -1
- package/dist/{chunk-4VSM4HUV.js → chunk-53XMYVJO.js} +1 -1
- package/dist/{chunk-BDCNHMRN.js → chunk-5J6IC25E.js} +1 -1
- package/dist/{chunk-CKECXOYL.js → chunk-5J6Y5TOO.js} +1 -1
- package/dist/{chunk-PGWITSJM.js → chunk-5K3QLWUX.js} +1 -1
- package/dist/chunk-6L7MMUMP.js +2 -0
- package/dist/{chunk-TB653ATX.js → chunk-6L7V25YL.js} +5 -5
- package/dist/{chunk-EHPSP6M4.js → chunk-7A7HRAC6.js} +11 -11
- package/dist/chunk-7GU3LUMW.js +11 -0
- package/dist/{chunk-GS7EYBPO.js → chunk-7KYFOYC7.js} +5 -5
- package/dist/{chunk-S2WTV2JH.js → chunk-7MX6CMMN.js} +1 -1
- package/dist/chunk-7NEIYFM2.js +8 -0
- package/dist/chunk-7OLYHD4V.js +5 -0
- package/dist/{chunk-ZNEZO35H.js → chunk-7PCV65OU.js} +5 -5
- package/dist/{chunk-VOAVONPN.js → chunk-7UEFFCQV.js} +8 -8
- package/dist/{chunk-JIBCYZE3.js → chunk-AP67GBSX.js} +8 -8
- package/dist/{chunk-TUR6CTGT.js → chunk-B4LK7WL6.js} +2 -2
- package/dist/{chunk-5FWXYW5W.js → chunk-B7IHOBK6.js} +15 -15
- package/dist/{chunk-EHV7LRGU.js → chunk-BGVN7HOZ.js} +2 -2
- package/dist/{chunk-AZSLR5FC.js → chunk-BHGMJBJ2.js} +1 -1
- package/dist/{chunk-X5W2SHXX.js → chunk-BKV6PH3R.js} +1 -1
- package/dist/{chunk-PO7ELC4X.js → chunk-BULQOYV6.js} +4 -4
- package/dist/{chunk-LEMQKX7D.js → chunk-BXRWPGAT.js} +1 -1
- package/dist/{chunk-GDCUF6V4.js → chunk-C4D4L2E5.js} +1 -1
- package/dist/{chunk-UMYEVQSH.js → chunk-CASSD64W.js} +5 -5
- package/dist/{chunk-CCQLM73G.js → chunk-CJUN2VOD.js} +1 -1
- package/dist/{chunk-X3FLNEKK.js → chunk-CP6FITHO.js} +17 -17
- package/dist/{chunk-IRRF3PRX.js → chunk-CP6Q24MP.js} +7 -7
- package/dist/{chunk-4FMMKKAO.js → chunk-CTB634WT.js} +1 -1
- package/dist/{chunk-IFXAQO67.js → chunk-CXDJXNPZ.js} +1 -1
- package/dist/{chunk-MNY3Y4QD.js → chunk-DSBLBBES.js} +6 -6
- package/dist/chunk-DYSUTUH3.js +15 -0
- package/dist/{chunk-BZMFVAOL.js → chunk-EDEQRSJC.js} +1 -1
- package/dist/chunk-EDYCBXWD.js +8 -0
- package/dist/chunk-EKHT4PDR.js +4 -0
- package/dist/chunk-ELVFPH7Y.js +5 -0
- package/dist/{chunk-IU645JAM.js → chunk-ENSA3NAS.js} +1 -1
- package/dist/{chunk-IXPMFIAS.js → chunk-EPHQ7UQV.js} +1 -1
- package/dist/{chunk-6LLCKIV6.js → chunk-EVKBV6IV.js} +1 -1
- package/dist/{chunk-REWKCHIU.js → chunk-EY74CLGD.js} +11 -11
- package/dist/{chunk-OOUVBV2Q.js → chunk-EZQXLIG3.js} +1 -1
- package/dist/chunk-FQEALPZJ.js +1 -0
- package/dist/chunk-GJDK54K6.js +13 -0
- package/dist/{chunk-GM5QZMZH.js → chunk-GVTWQBRU.js} +8 -8
- package/dist/{chunk-P2HKX4VB.js → chunk-H7BP5LLG.js} +1 -1
- package/dist/{chunk-WZZKQJUJ.js → chunk-HFEYQVKD.js} +1 -1
- package/dist/{chunk-SSS5BYD5.js → chunk-IJMV4F2Q.js} +1 -1
- package/dist/{chunk-OXALEGWD.js → chunk-IQDIWKES.js} +1 -1
- package/dist/{chunk-AEIQP73W.js → chunk-JGZWAEOJ.js} +1 -1
- package/dist/{chunk-DM2BSQ26.js → chunk-JK3QY266.js} +6 -6
- package/dist/{chunk-K2CJGZPQ.js → chunk-JWMQEWCV.js} +19 -19
- package/dist/{chunk-IY56TA4R.js → chunk-KFMRV3MK.js} +3 -3
- package/dist/chunk-KXTR2RPB.js +12 -0
- package/dist/{chunk-NYJC7I7T.js → chunk-L42Q6GVA.js} +1 -1
- package/dist/chunk-LPYFS4RV.js +19 -0
- package/dist/{chunk-PDQJIJ2G.js → chunk-M3DZDBS6.js} +9 -9
- package/dist/chunk-MH4EUGAB.js +11 -0
- package/dist/{chunk-4B33A5LV.js → chunk-MXDW5IFQ.js} +1 -1
- package/dist/chunk-MXMBQS75.js +20 -0
- package/dist/{chunk-STC63JLD.js → chunk-N7LV32EQ.js} +1 -1
- package/dist/{chunk-2PT2CDTN.js → chunk-NIULZZAI.js} +4 -4
- package/dist/{chunk-6ZH6RUZN.js → chunk-O6TKI4F5.js} +1 -1
- package/dist/{chunk-V7T3FV6K.js → chunk-OCBAIXM2.js} +5 -5
- package/dist/chunk-OVNRVFWS.js +1 -0
- package/dist/{chunk-MYCBGGOC.js → chunk-OZ2ALRKX.js} +2 -2
- package/dist/{chunk-KWJY7YLC.js → chunk-P25GL5BQ.js} +1 -1
- package/dist/{chunk-4VTZQT4O.js → chunk-PMJMPYLQ.js} +6 -6
- package/dist/{chunk-YH2TXBGF.js → chunk-PPROO6JU.js} +6 -6
- package/dist/{chunk-7BSBTDKK.js → chunk-PPSIMRJM.js} +8 -8
- package/dist/{chunk-M44R4OFV.js → chunk-PZ6D5DYB.js} +1 -1
- package/dist/{chunk-K3WHR66I.js → chunk-QGU24ERZ.js} +1 -1
- package/dist/chunk-QKIVMRK5.js +5 -0
- package/dist/{chunk-LXV7ANUQ.js → chunk-QQVLFDX6.js} +4 -4
- package/dist/chunk-RA2HF3VC.js +10 -0
- package/dist/{chunk-2D7G2OYC.js → chunk-RD5UPROC.js} +6 -6
- package/dist/{chunk-JVQG3EFU.js → chunk-RFNU5AIH.js} +1 -1
- package/dist/{chunk-AZ7SYI4D.js → chunk-SBHLTCGU.js} +1 -1
- package/dist/{chunk-3I4DYCQK.js → chunk-SDIGC5NU.js} +1 -1
- package/dist/{chunk-VCSHT4SZ.js → chunk-SFNLRK5J.js} +7 -7
- package/dist/{chunk-ZXZMSNJN.js → chunk-TAGZV46K.js} +1 -1
- package/dist/chunk-TKLH7V2R.js +9 -0
- package/dist/{chunk-UDX6UJHN.js → chunk-TLZVEW34.js} +4 -4
- package/dist/{chunk-USG3EG2Y.js → chunk-TTE3GZWH.js} +1 -1
- package/dist/{chunk-LLBP42IT.js → chunk-TWWJLFTD.js} +4 -4
- package/dist/{chunk-VXRW6BIC.js → chunk-TYEXEETI.js} +5 -5
- package/dist/chunk-U5PXB4UW.js +9 -0
- package/dist/{chunk-ECX6BCQG.js → chunk-UHW2CFLV.js} +1 -1
- package/dist/{chunk-KJDEW5MD.js → chunk-UL4WB3VH.js} +1 -1
- package/dist/chunk-URBCGEXG.js +1 -0
- package/dist/{chunk-J7I7R5XZ.js → chunk-US5B4QYS.js} +11 -11
- package/dist/{chunk-KTXEQFVQ.js → chunk-US5YOYS3.js} +1 -1
- package/dist/chunk-UWHGJTAL.js +8 -0
- package/dist/{chunk-PZRKVGML.js → chunk-VAACOJ2H.js} +1 -1
- package/dist/{chunk-AZ6UPURX.js → chunk-VH3IMIS2.js} +6 -6
- package/dist/chunk-VJ56YZY6.js +14 -0
- package/dist/chunk-VLOJ4XJC.js +8 -0
- package/dist/{chunk-UU73FP3I.js → chunk-VUYWYMZZ.js} +2 -2
- package/dist/{chunk-IFA3PKKA.js → chunk-WNJLY7CM.js} +11 -11
- package/dist/chunk-X4KIXGW5.js +1 -0
- package/dist/{chunk-NQJJRKUK.js → chunk-XKCEVZZB.js} +1 -1
- package/dist/chunk-XMGXVMVS.js +6 -0
- package/dist/{chunk-7BIMXRDE.js → chunk-XSY22PWH.js} +2 -2
- package/dist/{chunk-R2R7IVKO.js → chunk-XW7KN6HW.js} +12 -12
- package/dist/{chunk-YFBGRCP2.js → chunk-XYA7NPSZ.js} +6 -6
- package/dist/{chunk-OWUVCQG7.js → chunk-Y3XH4HJQ.js} +2 -2
- package/dist/chunk-YEY6YPTM.js +2 -0
- package/dist/chunk-YT32RSS6.js +7 -0
- package/dist/chunk-YUMPKSS4.js +1 -0
- package/dist/{chunk-XOGC427S.js → chunk-YVOGWINT.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaUploadField.d.ts +13 -2
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +263 -263
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +6 -6
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.d.ts +35 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.d.ts +7 -3
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.d.ts +18 -0
- package/dist/shell/MetricBarLegend.js +2 -0
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.d.ts +10 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/Tabs.d.ts +32 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +8 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +2 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +4 -4
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-6XA52RW2.js +0 -29
- package/dist/Files-U7VDQLXQ.js +0 -87
- package/dist/Sidebar-VP27XAG3.js +0 -43
- package/dist/chunk-3CLJLMGC.js +0 -14
- package/dist/chunk-3CORTJSX.js +0 -5
- package/dist/chunk-54LYZJKD.js +0 -4
- package/dist/chunk-5H4ZKLNG.js +0 -8
- package/dist/chunk-5LHPDU6X.js +0 -1
- package/dist/chunk-64KMJHVU.js +0 -2
- package/dist/chunk-CAVMIKH4.js +0 -10
- package/dist/chunk-DHI24QY6.js +0 -10
- package/dist/chunk-DLQHQ2MW.js +0 -10
- package/dist/chunk-HXQ2DB32.js +0 -8
- package/dist/chunk-IQDJ76DD.js +0 -9
- package/dist/chunk-JS34LPLL.js +0 -11
- package/dist/chunk-K4K3YDW6.js +0 -14
- package/dist/chunk-K5Q5RIQT.js +0 -6
- package/dist/chunk-K62MSU6T.js +0 -8
- package/dist/chunk-KVNWMSXP.js +0 -2
- package/dist/chunk-MFUGVAP5.js +0 -2
- package/dist/chunk-OLASMUGT.js +0 -8
- package/dist/chunk-QAVNMU6V.js +0 -9
- package/dist/chunk-QBYVXYN3.js +0 -5
- package/dist/chunk-QBZXN2U2.js +0 -1
- package/dist/chunk-QUHQCJ5P.js +0 -15
- package/dist/chunk-SRCPFYYU.js +0 -19
- package/dist/chunk-SRFFFPTS.js +0 -20
- package/dist/chunk-XPEUKDPT.js +0 -9
- package/dist/chunk-Y2G5KXA6.js +0 -1
- /package/dist/{chunk-RTRWAKFO.js → chunk-2CGVDBNO.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-C2HHGLLR.js";import{useShellStrings as r}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-C2HHGLLR.js";import{useShellStrings as r}from"./chunk-OVNRVFWS.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check",...t});case"error":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"error",...t});default:/* @__PURE__ */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setPdfPreview as e}from"./chunk-ESL5TDNA.js";import{setSpreadsheetPreview as t}from"./chunk-VTVSMRFX.js";import{toast_default as n}from"./chunk-
|
|
1
|
+
import{setPdfPreview as e}from"./chunk-ESL5TDNA.js";import{setSpreadsheetPreview as t}from"./chunk-VTVSMRFX.js";import{toast_default as n}from"./chunk-2LKH6JM5.js";var i="react-os-shell:preview-opened";async function o(o){const{filePath:a,filename:r,kind:c,onStaged:s}=o;try{const o=await fetch(`${("undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000").replace(/\/$/,"")}/api/file?path=${encodeURIComponent(a)}`,{credentials:"include"});if(!o.ok)return n.error(`Download failed (${o.status})`),!1;const d=await o.blob();if("csv"===c){const e=await d.text();t({csv:e,filename:r}),s?.("/spreadsheet")}else{const t=URL.createObjectURL(d);e({url:t,filename:r,kind:c}),s?.("/preview")}return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(i,{detail:{filePath:a,filename:r,kind:c}})),!0}catch(e){return n.error(e?.message||"Open failed"),!1}}export{i as PREVIEW_OPENED_EVENT,o as openPreviewFile};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{STATUS_VARS as e,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as a,useShellLocale as t}from"./chunk-
|
|
1
|
+
import{STATUS_VARS as e,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as a,useShellLocale as t}from"./chunk-OVNRVFWS.js";import{formatPercent as i}from"./chunk-C3QOHMR6.js";import{jsxs as r,jsx as n}from"react/jsx-runtime";var s=e=>Math.max(0,Math.min(1,e));function o({value:o,segments:m,objective:u,label:d,detail:c,formatValue:h,tone:f,className:x,unavailableLabel:b}){const v=a().charts,g=t(),N=h??(e=>i(100*e,1,g)),p=b??v.notEnough;if(null==o||!Number.isFinite(o))/* @__PURE__ */
|
|
2
2
|
return r("div",{className:x,children:[d&&/* @__PURE__ */n("p",{className:"text-sm font-medium text-gray-700",children:d}),
|
|
3
|
-
/* @__PURE__ */n("p",{className:"mt-1 text-sm text-gray-500",children:
|
|
3
|
+
/* @__PURE__ */n("p",{className:"mt-1 text-sm text-gray-500",children:p})]});const y=s(o),j=null==u||o>=u,k=f??(j?"good":"critical"),w=e[k],F=[m?.length?m.map(e=>`${e.label} ${N(e.value)}`).join(" · "):"",c??"",null!=u?(j?v.objectiveMet:v.objectiveMissed)(N(u)):""].filter(Boolean).join(" · ");/* @__PURE__ */
|
|
4
4
|
return r("div",{className:x,children:[
|
|
5
5
|
/* @__PURE__ */r("div",{className:"mb-2 flex items-baseline justify-between gap-3",children:[
|
|
6
6
|
/* @__PURE__ */n("span",{className:"text-sm font-medium text-gray-700",children:d}),
|
|
7
|
-
/* @__PURE__ */n("span",{className:"text-sm font-semibold tabular-nums",style:{color:w},children:
|
|
8
|
-
/* @__PURE__ */r("div",{className:"relative w-full rounded-full bg-gray-200",style:{height:12},role:"meter","aria-valuenow":Number((100*y).toFixed(2)),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":
|
|
9
|
-
/* @__PURE__ */n("div",m?.length?{className:"flex h-full overflow-hidden rounded-full",children:m.map((l,a)=>/* @__PURE__ */n("div",{className:"h-full shrink-0"+(a===m.length-1?" rounded-r-full":""),style:{width:`${(100*s(l.value)).toFixed(2)}%`,backgroundColor:e[l.tone??(0===a?k:"neutral")]}},`${l.label}-${a}`))}:{className:"h-full rounded-full",style:{width:`${(100*y).toFixed(2)}%`,backgroundColor:w}}),null!=u&&/* @__PURE__ */n("span",{className:"absolute top-[-4px] w-0.5 rounded-full",style:{left:`${(100*s(u)).toFixed(2)}%`,height:20,backgroundColor:l.axis},"aria-hidden":"true"})]})
|
|
7
|
+
/* @__PURE__ */n("span",{className:"text-sm font-semibold tabular-nums",style:{color:w},children:N(o)})]}),
|
|
8
|
+
/* @__PURE__ */r("div",{className:"relative w-full rounded-full bg-gray-200",style:{height:12},role:"meter","aria-valuenow":Number((100*y).toFixed(2)),"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":N(o),"aria-label":d,children:[
|
|
9
|
+
/* @__PURE__ */n("div",m?.length?{className:"flex h-full overflow-hidden rounded-full",children:m.map((l,a)=>/* @__PURE__ */n("div",{className:"h-full shrink-0"+(a===m.length-1?" rounded-r-full":""),style:{width:`${(100*s(l.value)).toFixed(2)}%`,backgroundColor:e[l.tone??(0===a?k:"neutral")]}},`${l.label}-${a}`))}:{className:"h-full rounded-full",style:{width:`${(100*y).toFixed(2)}%`,backgroundColor:w}}),null!=u&&/* @__PURE__ */n("span",{className:"absolute top-[-4px] w-0.5 rounded-full",style:{left:`${(100*s(u)).toFixed(2)}%`,height:20,backgroundColor:l.axis},"aria-hidden":"true"})]}),F&&/* @__PURE__ */n("p",{className:"mt-2 text-xs text-gray-500",children:F})]})}export{o as Meter};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-BOGBLZKS.js";import{OneLineLabel as i}from"./chunk-QMQVOUIV.js";import{Icon as r}from"./chunk-C2HHGLLR.js";import{useShellStrings as s}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-BOGBLZKS.js";import{OneLineLabel as i}from"./chunk-QMQVOUIV.js";import{Icon as r}from"./chunk-C2HHGLLR.js";import{useShellStrings as s}from"./chunk-OVNRVFWS.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
|
|
2
2
|
return t("span",{className:[o,"font-medium",y,b,d,x].filter(Boolean).join(" "),children:[
|
|
3
3
|
/* @__PURE__ */n(i,{children:a}),u&&/* @__PURE__ */n("button",{type:"button",onClick:f,"aria-label":j,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */n(r,{name:"close",look:"mini",className:k,"aria-hidden":"true"})})]})}export{l as ColoredBadge};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import{Dialog as e}from"./chunk-
|
|
1
|
+
import{Dialog as e}from"./chunk-OZ2ALRKX.js";import{buttonClasses as t}from"./chunk-K7U4RWXJ.js";import{Icon as r}from"./chunk-C2HHGLLR.js";import{useShellStrings as n,splitAround as o}from"./chunk-OVNRVFWS.js";import{createContext as l,useContext as a,useState as i,useRef as s,useCallback as c,useEffect as u}from"react";import{jsxs as d,jsx as m,Fragment as h}from"react/jsx-runtime";var b=l(()=>Promise.resolve(!1)),f=()=>a(b),g=()=>Promise.resolve(!1),p=e=>g(e),y=()=>Promise.resolve(!1),v=e=>y(e),x=()=>Promise.resolve(null),N=e=>x(e),k={danger:{icon:"text-red-600 bg-red-100",button:t({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:t({variant:"warning"})},info:{icon:"text-blue-600 bg-blue-100",button:t({variant:"primary"})}},w=t({variant:"secondary"}),C=t({variant:"primary"}),L="w-full rounded-md border border-gray-300 h-8 px-3 text-sm";function P(){/* @__PURE__ */
|
|
2
2
|
return m(r,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function j(){/* @__PURE__ */
|
|
3
|
-
return m(r,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function
|
|
4
|
-
return d(b.Provider,{value
|
|
5
|
-
/* @__PURE__ */m(e,{open:r,onClose:()=>
|
|
6
|
-
/* @__PURE__ */m("button",{ref:
|
|
7
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>
|
|
3
|
+
return m(r,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function F({children:t}){const[r,l]=i(!1),[a,f]=i({message:""}),[p,v]=i(0),N=s(),F=s(null),E=s(0),W=s([]),K=s(null),R=s(null),T=c(e=>{F.current=e.id,N.current=e.resolve,v(e.id),f(e.options),l(!0)},[]),$=c(e=>{const t="string"==typeof e?{message:e}:e;return new Promise(e=>{const r={id:++E.current,options:t,resolve:e};null===F.current?T(r):W.current.push(r)})},[T]),[V,D]=i(!1),[H,O]=i({message:""}),[X,A]=i(""),G=s(),J=c(e=>(O(e),A(""),D(!0),new Promise(e=>{G.current=e})),[]),[S,U]=i(!1),[Z,q]=i({}),[z,B]=i(""),I=s(),M=c(e=>{const t="string"==typeof e?{message:e}:e;return q(t),B(t.defaultValue??""),U(!0),new Promise(e=>{I.current=e})},[]);u(()=>{g=$,y=J,x=M},[$,J,M]);const Q=(e,t)=>{if(F.current!==e)return;const r=N.current,n=W.current.shift();n?T(n):(F.current=null,N.current=void 0,l(!1)),r?.(t)},Y=e=>{D(!1),A(""),G.current?.(e)},_=e=>{if(e){const e=z.trim();if(!e&&!Z.allowEmpty)return U(!1),void I.current?.(null);U(!1),I.current?.(e)}else U(!1),I.current?.(null)},ee=a.variant||(a.confirmLabel?.toLowerCase().includes("delete")||a.message.toLowerCase().includes("delete")?"danger":"info"),te=k[ee],re=k["warning"===H.variant?"warning":"danger"],ne=H.confirmWord,oe=null==ne||X===ne,le=n().dialog,[ae,ie]=o(le.typeToConfirm);/* @__PURE__ */
|
|
4
|
+
return d(b.Provider,{value:$,children:[t,
|
|
5
|
+
/* @__PURE__ */m(e,{open:r,onClose:()=>Q(p,!1),initialFocus:K,footer:/* @__PURE__ */d(h,{children:[
|
|
6
|
+
/* @__PURE__ */m("button",{ref:K,type:"button",onClick:()=>Q(p,!1),className:w,children:a.cancelLabel||le.cancel}),
|
|
7
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>Q(p,!0),className:te.button,children:a.confirmLabel||le.ok})]}),children:/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
8
8
|
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(P,{})}),
|
|
9
9
|
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
10
10
|
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900",children:a.title||le.confirmTitle}),
|
|
11
11
|
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:a.message})]})]})}),
|
|
12
|
-
/* @__PURE__ */d(e,{open:
|
|
13
|
-
/* @__PURE__ */m("button",{ref
|
|
14
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>
|
|
15
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>
|
|
12
|
+
/* @__PURE__ */d(e,{open:V,onClose:()=>Y(!1),initialFocus:null!=ne?void 0:R,footer:/* @__PURE__ */d(h,{children:[
|
|
13
|
+
/* @__PURE__ */m("button",{ref:R,type:"button",onClick:()=>Y(!1),className:w,children:H.cancelLabel||le.destructiveCancel}),
|
|
14
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>Y(!0),disabled:!oe,className:re.button,children:ne??H.confirmLabel??le.destructiveConfirm})]}),children:[
|
|
15
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>Y(!1),"aria-label":le.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */m(j,{})}),
|
|
16
16
|
/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
17
17
|
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(P,{})}),
|
|
18
18
|
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
19
|
-
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:
|
|
20
|
-
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:
|
|
19
|
+
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:H.title||le.destructiveTitle}),
|
|
20
|
+
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:H.message}),null!=ne&&/* @__PURE__ */d(h,{children:[
|
|
21
21
|
/* @__PURE__ */d("p",{className:"mt-3 text-sm text-gray-700",children:[ae,
|
|
22
22
|
/* @__PURE__ */m("kbd",{className:"rounded border border-gray-300 bg-gray-50 px-2 py-0.5 text-xs font-bold text-red-600 font-mono",children:ne}),ie]}),
|
|
23
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:X,onChange:e=>
|
|
24
|
-
/* @__PURE__ */d(e,{open:
|
|
25
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:
|
|
26
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!
|
|
27
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:z,onChange:e=>
|
|
23
|
+
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:X,onChange:e=>A(e.target.value),onKeyDown:e=>{"Enter"===e.key&&X===ne&&Y(!0)},placeholder:ne,className:`mt-2 ${L} focus:border-red-500`})]})]})]})]}),
|
|
24
|
+
/* @__PURE__ */d(e,{open:S,onClose:()=>_(!1),title:Z.title||le.promptTitle,footer:/* @__PURE__ */d(h,{children:[
|
|
25
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:Z.cancelLabel||le.cancel}),
|
|
26
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!Z.allowEmpty&&!z.trim(),className:C,children:Z.confirmLabel||le.ok})]}),children:[Z.message&&/* @__PURE__ */m("p",{className:"text-sm text-gray-600",children:Z.message}),
|
|
27
|
+
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:z,onChange:e=>B(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:Z.placeholder,className:`mt-3 ${L} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{F as ConfirmProvider,p as confirm,v as confirmDestructive,N as prompt,f as useConfirm};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as e}from"./chunk-OVNRVFWS.js";import{jsxs as t,jsx as a,Fragment as l}from"react/jsx-runtime";var n=e=>"number"==typeof e?e:parseInt(String(e??""))||0;function s({items:s,getVolume:r,getInstructionVolume:i,getActualVolume:c,qtyField:m="instruction",showNewIndicator:d=!1,getInstructionQty:u=e=>e.quantity,getActualQty:g=e=>e.actual_qty,isFilled:h,isNew:o=e=>Boolean(e._isNew),className:x,style:f}){const p=e().containers,y=h?s.filter(h):s,N=e=>n(u(e)),b=e=>n(g(e)),w=y.some(e=>null!=g(e)&&b(e)>0),v=e=>w?N(e):"actual"===m?g(e)??u(e)??0:u(e)??0,M=y.reduce((e,t)=>e+n(v(t)),0),$=y.filter(e=>o(e)).length,V=y.filter(e=>o(e)).reduce((e,t)=>e+n(v(t)),0),j=y.reduce((e,t)=>e+N(t),0),k=y.reduce((e,t)=>e+b(t),0),I=e=>r?.(e)??0,q=i??(e=>I(e)*N(e)),A=c??(e=>I(e)*b(e)),F=y.reduce((e,t)=>e+q(t),0),Q=y.reduce((e,t)=>e+A(t),0),S=w?Math.max(F,Q):"actual"===m&&Q||F,_=S<=34.65?"20ft":"40ft",B="20ft"===_?33:67,O=S>0?Math.max(1,Math.ceil(S/B)):0,R=O*B,W=S>0&&S>=.95*R&&S<=1.1*R;if(0===y.length)return null;const z=(e,t)=>B>0?Math.max(0,Math.min((e-t*B)/B*100,100)):0;/* @__PURE__ */
|
|
2
2
|
return t("div",{className:`mt-2 px-1 space-y-2 ${x??""}`.trim(),style:f,children:[
|
|
3
3
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[
|
|
4
|
-
/* @__PURE__ */t("span",{children:[`${p.items(y.length)} · ${p.pieces(M)}`,w&&k
|
|
5
|
-
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,
|
|
4
|
+
/* @__PURE__ */t("span",{children:[`${p.items(y.length)} · ${p.pieces(M)}`,w&&j!==k&&/* @__PURE__ */a("span",{className:"ml-1 text-gray-400",children:p.split(j,k)})]}),d&&$>0&&/* @__PURE__ */t("span",{className:"flex items-center gap-1 text-green-600",children:[
|
|
5
|
+
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,V)]})]}),S>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:O}).map((e,l)=>{const n=z(F,l),s=z(Q,l),r=w,i=Math.max(n,s),c=Math.min(n,s),m=n>=s,d=r?m?"bg-blue-500":"bg-green-500":"bg-blue-500",u=r?m?"bg-green-500":"bg-blue-500":"";/* @__PURE__ */
|
|
6
6
|
return t("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */a("span",{className:"text-2xs text-gray-400 w-8 shrink-0",children:
|
|
7
|
+
/* @__PURE__ */a("span",{className:"text-2xs text-gray-400 w-8 shrink-0",children:_}),
|
|
8
8
|
/* @__PURE__ */t("div",{className:"relative flex-1 h-4 bg-gray-100 rounded-full overflow-hidden border border-gray-200",children:[
|
|
9
9
|
/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${d} transition-all`,style:{width:`${i}%`}}),r&&c>0&&/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${u} transition-all`,style:{width:`${c}%`}})]}),
|
|
10
|
-
/* @__PURE__ */a("span",{className:"text-2xs text-gray-500 w-16 text-right",children:r?p.fill(Math.min(Q-l*
|
|
10
|
+
/* @__PURE__ */a("span",{className:"text-2xs text-gray-500 w-16 text-right",children:r?p.fill(Math.min(Q-l*B,B),B):p.fill(Math.min(F-l*B,B),B)})]},`bar-${l}`)}),
|
|
11
11
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs pt-0.5",children:[
|
|
12
12
|
/* @__PURE__ */t("span",{className:"text-gray-500 inline-flex items-center gap-1",children:[p.total,w?/* @__PURE__ */t(l,{children:[
|
|
13
13
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-blue-700",children:[
|
|
14
14
|
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(F)]}),
|
|
15
15
|
/* @__PURE__ */a("span",{className:"text-gray-400",children:"/"}),
|
|
16
16
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-green-700",children:[
|
|
17
|
-
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(Q)]})]}):/* @__PURE__ */a("b",{className:"text-gray-700",children:p.volume(
|
|
18
|
-
/* @__PURE__ */t("span",{className:"font-medium "+(
|
|
17
|
+
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(Q)]})]}):/* @__PURE__ */a("b",{className:"text-gray-700",children:p.volume(S)})]}),
|
|
18
|
+
/* @__PURE__ */t("span",{className:"font-medium "+(W?"text-green-600":"text-gray-500"),children:[W&&"✓ ",O," × ",_]})]})]}):/* @__PURE__ */a("div",{className:"text-xs text-gray-400",children:p.noVolume})]})}export{s as ContainerFillChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-OVNRVFWS.js";import{formatFixed as t,formatPlain as s}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as r}from"react/jsx-runtime";var l={sm:"text-lg",md:"text-2xl",lg:"text-3xl"},m={default:"text-gray-900",success:"text-green-600",danger:"text-red-600",muted:"text-gray-500"};function n({title:n,value:i,precision:c,prefix:d,suffix:x,tone:u="default",size:o="md",className:f=""}){const p=e(),g="number"!=typeof i?i:null!=c?t(i,c,p):p?s(i,p):i;/* @__PURE__ */
|
|
2
2
|
return a("div",{className:f,children:[n&&/* @__PURE__ */r("div",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:n}),
|
|
3
3
|
/* @__PURE__ */a("div",{className:`mt-1 flex items-baseline gap-1 ${m[u]}`,children:[d&&/* @__PURE__ */r("span",{className:"text-sm",children:d}),
|
|
4
4
|
/* @__PURE__ */r("span",{className:`font-semibold tabular-nums ${l[o]}`,children:g}),x&&/* @__PURE__ */r("span",{className:"text-sm",children:x})]})]})}export{n as Statistic};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{StatCard as e,Card as a}from"./chunk-
|
|
1
|
+
import{StatCard as e,Card as a}from"./chunk-RD5UPROC.js";import{Avatar as t}from"./chunk-UL4WB3VH.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-2DGTGJYJ.js";import{ColumnChart as l}from"./chunk-UWHGJTAL.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-BOGBLZKS.js";import{TH_ONE_LINE as c}from"./chunk-QMQVOUIV.js";import{Button_default as n}from"./chunk-FSP63GKK.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
|
|
2
2
|
return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
|
|
3
3
|
/* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */m("div",{children:[
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{squarify as e}from"./chunk-46BYGPGD.js";import{AccessibleTable as t}from"./chunk-C2FBUQJW.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as a}from"./chunk-P5BOTIJU.js";import{usePlotWidth as r}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as i,CHART_INK as o}from"./chunk-TZFACUMR.js";import{useShellStrings as n,useShellLocale as m}from"./chunk-
|
|
2
|
-
return s("div",{className:b,ref:B,children:/* @__PURE__ */s("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const
|
|
1
|
+
import{squarify as e}from"./chunk-46BYGPGD.js";import{AccessibleTable as t}from"./chunk-C2FBUQJW.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as a}from"./chunk-P5BOTIJU.js";import{usePlotWidth as r}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as i,CHART_INK as o}from"./chunk-TZFACUMR.js";import{useShellStrings as n,useShellLocale as m}from"./chunk-OVNRVFWS.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as u}from"react";import{jsx as s,jsxs as f}from"react/jsx-runtime";function p({items:p,height:d=320,width:v,gap:x=2,radius:g=3,formatValue:y,color:k,className:b,emptyLabel:j}){const w=n().charts,M=m(),N=y??(e=>h(e,M)),$=j??w.nothingToBreakDown,B=c(null),C=r(B),F=v??C,[O,U]=u(null),{highlighted:V}=l(),z=e(p,F,d);if(0===z.length)/* @__PURE__ */
|
|
2
|
+
return s("div",{className:b,ref:B,children:/* @__PURE__ */s("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const A=k??i(0),P=Math.max(...z.map(e=>e.value),1),R=e=>34+e/P*62,S=e=>`color-mix(in oklab, ${A} ${R(e).toFixed(0)}%, ${o.surface})`,T=e=>R(e)>=55?o.surface:o.label,W=O??V,Y=O?z.find(e=>e.key===O):void 0;/* @__PURE__ */
|
|
3
3
|
return f("div",{className:`relative ${b??""}`,ref:B,children:[
|
|
4
|
-
/* @__PURE__ */s("svg",{width:"100%",height:d,viewBox:`0 0 ${
|
|
5
|
-
return f("g",{opacity:
|
|
6
|
-
/* @__PURE__ */s("rect",{x:e.x+x/2,y:e.y+x/2,width:t,height:l,rx:g,fill:
|
|
7
|
-
/* @__PURE__ */s(t,{caption:w.treemap(p.length),head:[w.tableItem,w.value],rows:
|
|
4
|
+
/* @__PURE__ */s("svg",{width:"100%",height:d,viewBox:`0 0 ${F} ${d}`,role:"img","aria-label":w.treemap(p.length),onMouseLeave:()=>U(null),children:z.map(e=>{const t=Math.max(0,e.width-x),l=Math.max(0,e.height-x),a=t>6.2*e.label.length+12&&l>30,r=a&&l>44;/* @__PURE__ */
|
|
5
|
+
return f("g",{opacity:W&&W!==e.key?.55:1,onMouseEnter:()=>U(e.key),children:[
|
|
6
|
+
/* @__PURE__ */s("rect",{x:e.x+x/2,y:e.y+x/2,width:t,height:l,rx:g,fill:S(e.value)}),a&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+18,fontSize:12,fontWeight:600,fill:T(e.value),children:e.label}),r&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+34,fontSize:11,fill:T(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:N(e.value)})]},e.key)})}),Y&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(a,{title:Y.label,rows:[{key:"value",label:w.value,color:S(Y.value),value:N(Y.value)}]})}),
|
|
7
|
+
/* @__PURE__ */s(t,{caption:w.treemap(p.length),head:[w.tableItem,w.value],rows:z.map(e=>[e.label,N(e.value)])})]})}export{p as TreemapChart};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-C2FBUQJW.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as o}from"./chunk-P5BOTIJU.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-OVNRVFWS.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:W,emptyLabel:$}){const C=m().charts,F=c(),R=N??(e=>h(e,F)),w=$??C.nothingToCompare,U=p(),[A,B]=u(null),{highlighted:L}=a(),O=x;if(k.length<3||0===O.length)/* @__PURE__ */
|
|
2
|
+
return d("p",{className:`text-sm text-gray-500 ${W??""}`,children:w});const T=y/2,V=y/2,z=y/2-46,E=n(k.length),J=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...O.map(e=>e.values[t]??0).filter(Number.isFinite))),Q=(e,t)=>{const r=Math.max(0,Math.min(1,t/J[e])),l=E.center(e)-E.step/2;return[T+z*r*Math.cos(l),V+z*r*Math.sin(l)]},S=(e,t)=>null!==A?A!==e:null!==L&&L!==t,Y=null!==A?O[A]:void 0;/* @__PURE__ */
|
|
3
|
+
return f("div",{className:`relative ${W??""}`,children:[
|
|
4
|
+
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":U,onMouseLeave:()=>B(null),children:[
|
|
5
|
+
/* @__PURE__ */d("title",{id:U,children:C.acrossMeasures(O.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=z*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:T,cy:V,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(T,V,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=Q(t,J[t]);/* @__PURE__ */
|
|
6
|
+
return f("g",{children:[
|
|
7
|
+
/* @__PURE__ */d("line",{x1:T,y1:V,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
|
|
8
|
+
/* @__PURE__ */d("text",{x:T+(z+18)*Math.cos(E.center(t)-E.step/2),y:V+(z+18)*Math.sin(E.center(t)-E.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
|
|
9
|
+
/* @__PURE__ */d(r,{id:U,reveal:!!j&&"center-out"}),O.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>Q(r,e.values[r]??0));/* @__PURE__ */
|
|
10
|
+
return f("g",{opacity:S(t,e.key)?.3:1,onMouseEnter:()=>B(t),mask:j?`url(#${l(U)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:r,fillOpacity:.18,stroke:"none"}),
|
|
11
|
+
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),Y&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:Y.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(A,3,Y.color,Y.tone),value:R(Y.values[t]??0)}))})}),
|
|
12
|
+
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:O.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
13
|
+
/* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
|
|
14
|
+
/* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
|
|
15
|
+
/* @__PURE__ */d(e,{caption:C.acrossMeasures(O.map(e=>e.label),k.length),head:[C.tableSeries,...k.map(e=>e.label)],rows:O.map(e=>[e.label,...k.map((t,r)=>R(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{inputClasses as e}from"./chunk-JFSYWEHD.js";import{useShellLocale as t}from"./chunk-
|
|
1
|
+
import{inputClasses as e}from"./chunk-JFSYWEHD.js";import{useShellLocale as t}from"./chunk-OVNRVFWS.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/,i=e=>String(e).padStart(2,"0");function s(e,t){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const n=`${i(e.getHours())}:${i(e.getMinutes())}`;return t?`${n}:${i(e.getSeconds())}`:n}return a.test(e)?e:""}var u=n(function({value:n,onChange:i,min:u,max:o,invalid:m,size:l,className:c="",step:v,...d},f){const g=null!=v&&Number(v)<60,p=t();/* @__PURE__ */
|
|
2
2
|
return r("input",{ref:f,type:"time",lang:p,step:v,"aria-invalid":m||void 0,value:s(n,g),min:s(u,g)||void 0,max:s(o,g)||void 0,onChange:e=>i?.(a.test(e.target.value)?e.target.value:null),className:e({invalid:m,size:l,className:c}),...d})});export{u as TimePicker_default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{usePlotWidth as n}from"./chunk-MAFUXCPZ.js";import{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-OVNRVFWS.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:N,xDomain:$,yDomain:j,xScale:w="linear",yScale:R="linear",radiusRange:S=[4,22],className:U,emptyLabel:D}){const L=m().charts,O=h(),P=z??(e=>f(e,O)),V=N??(e=>f(e,O)),W=D??L.noObservations,B=u(null),C=n(B),E=v??C,F=p(),[I,T]=d(null);x(()=>{if(null!==I)return c(e=>"Escape"===e.key&&(T(null),!0))},[I]);const J=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),Q=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),X=$||j?Q.map(e=>({...e,points:e.points.filter(e=>J(e.x,$)&&J(e.y,j))})).filter(e=>e.points.length>0):Q,Z=Q.reduce((e,t)=>e+t.points.length,0)-X.reduce((e,t)=>e+t.points.length,0);if(0===X.length)/* @__PURE__ */
|
|
2
|
+
return y("div",{className:U,ref:B,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:W})});const H=X.flatMap(e=>e.points),K=H.some(e=>null!=e.size),Y=14,q=20,G=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(H.map(e=>e.y),j,R,{from:k-G,to:Y}),ie=t(te.ticks(5).map(V),_),le=Math.max(ie+1,E-q),re=ee(H.map(e=>e.x),$,w,{from:ie,to:le}),oe=i([0,Math.max(...H.map(e=>e.size??1))],{from:S[0],to:S[1]}),ne=I?X[I.s]:void 0,ae=I&&ne?ne.points[I.i]:void 0,se=X.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
+
return g("div",{className:`relative ${U??""}`,ref:B,children:[
|
|
4
|
+
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${E} ${k}`,role:"img","aria-label":L.scatter(X.map(e=>e.label),A??L.yAxis,M??L.xAxis)+(Z>0?`. ${L.outsideRange(Z)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>T(null),onBlur:()=>T(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=I?se.findIndex(e=>e.s===I.s&&e.i===I.i):0;T(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
+
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:F,children:/* @__PURE__ */y("rect",{x:ie-S[1],y:Y-S[1],width:le-ie+2*S[1],height:k-G-Y+2*S[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
|
|
6
|
+
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
+
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:V(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:P(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:a.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:A}),
|
|
8
|
+
/* @__PURE__ */y("g",{clipPath:`url(#${F})`,children:X.map((e,t)=>{const i=s(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:K?oe(l.size??0):S[0]+1,fill:i,fillOpacity:I&&I.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>T({s:t,i:r})},`${e.key}-${r}`))})})]}),I&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(e,{title:ae.label??ne.label,rows:[{key:"x",label:M??L.xAxis,color:s(ne.slot,3,ne.color,ne.tone),value:P(ae.x)},{key:"y",label:A??L.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:V(ae.y)},...null!=ae.size?[{key:"size",label:L.size,color:a.muted,value:f(ae.size,O)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-C2FBUQJW.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-P5BOTIJU.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-OVNRVFWS.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:y}){const M=i().charts,$=o(),j=k??(e=>h(e,$)),N=y??M.nothingToBreakDown,[w,C]=u(null),{highlighted:F}=r(),B=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",B),0===B.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const E=Math.max(...B.map(e=>e.depth))+1,I=f/2,L=f/2,O=(f/2-8-b)/E,R=B.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),U=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,V=e=>null!==w?e.id===w:null===F||e.branchKey===F,W=w?B.find(e=>e.id===w):void 0,z=e=>c(e.value/R*100,1,$);/* @__PURE__ */
|
|
2
|
+
return d("div",{className:`relative ${g??""}`,children:[
|
|
3
|
+
/* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":M.sunburst(j(R),E),onMouseLeave:()=>C(null),children:[B.map(e=>/* @__PURE__ */s("path",{d:t(I,L,b+e.depth*O+v/2,b+(e.depth+1)*O-v/2,e.start,e.end),fill:U(e),fillOpacity:V(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>C(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:I,y:L+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),W&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:W.label,rows:[{key:"value",label:M.value,color:U(W),value:j(W.value)},{key:"share",label:M.share,color:a.muted,value:z(W)}]})}),
|
|
4
|
+
/* @__PURE__ */s(e,{caption:M.sunburst(j(R),E),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:B.map(e=>[e.depth+1,e.label,j(e.value),z(e)])})]})}export{f as SunburstChart};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-4G5VLI7E.js";import{Tooltip as l}from"./chunk-Z3WKHMVB.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{useRef as i,useState as c,useEffect as d}from"react";import{jsx as s,jsxs as u,Fragment as m}from"react/jsx-runtime";var b=(e,t)=>`flex items-center border-b border-gray-200${e?"":" gap-1"} ${t}`.trim();function h(e,t,n="default"){return`-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t?"flex-1 justify-center ":""}${e?"border-blue-600 text-blue-600":`border-transparent ${"warning"===n?"text-amber-700":"text-gray-900"} hover:border-gray-300`}`}function f(e){if(!e||!e.startsWith("#")||e.length<2)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch{return null}}function p(e,t){const n=e.filter(e=>!e.disabled).map(e=>({id:e.id,section:f(e.href)})).filter(e=>null!=e.section);if(0===n.length)return null;const r=function(e){for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t).overflowY;if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t}return document.scrollingElement??document.documentElement}(n[0].section);if(r.scrollTop>0&&r.scrollTop+r.clientHeight>=r.scrollHeight-1)return n[n.length-1].id;const o=Math.max(0,t.getBoundingClientRect().bottom)+8;let l=n[0].id;for(const e of n)e.section.getBoundingClientRect().top<=o&&(l=e.id);return l}function g({items:e,value:n,onChange:o,block:c=!1,className:u="","aria-label":m,"aria-labelledby":g}){const v=i(null),w=function(e,t,n,r){const o=i(0),l=i({items:t,value:n,onChange:r});l.current={items:t,value:n,onChange:r};const c=i(()=>{});return c.current=()=>{const t=e.current;if(!t||Date.now()<o.current)return;const n=p(l.current.items,t);null!=n&&n!==l.current.value&&l.current.onChange(n)},a(()=>{c.current()},[t]),d(()=>{let e=0;const t=()=>{e||(e=requestAnimationFrame(()=>{e=0,c.current()}))};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t),e&&cancelAnimationFrame(e)}},[]),e=>{o.current=Date.now()+800,e!==l.current.value&&l.current.onChange(e),window.setTimeout(()=>c.current(),850)}}(v,e,n,o);/* @__PURE__ */
|
|
2
|
+
return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=f(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),w(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${h(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,w=(e,t)=>`${e}-panel-${t}`;function y(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:f,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:C,className:F="","aria-label":E,"aria-labelledby":L,labelsFit:R=!1}){const A=i([]),$=i(null),N="pill"===x,[S,W]=c(null),D=S??"none",H=i(()=>{});H.current=()=>{const t=$.current;if(!t||!R)return;const n=function(e){return[...e.querySelectorAll('[role="tab"]')].map(e=>{const t=getComputedStyle(e),n=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)+(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),r=e.querySelector("[data-tab-glyph]")?.getBoundingClientRect().width??0,o=e.querySelector("[data-tab-word]")?.scrollWidth??0;return{bare:n+r,worded:n+r+(r&&o?8:0)+o,active:"true"===e.getAttribute("aria-selected")}})}(t);W(function({tabs:t,block:n,chrome:r,room:o}){if(!n)return e({buttons:t,orientation:"horizontal",chrome:r,room:o});if(0===t.length)return"none";const l=e=>r+e*t.length<=o+.5;if(l(Math.max(...t.map(e=>e.worded))))return"all";const a=t.find(e=>e.active);return a&&l(Math.max(a.worded,...t.map(e=>e.bare)))?"chosen":"none"}({tabs:n,block:k,...y(t,n.length)}))},a(()=>{H.current()}),d(()=>{const e=$.current?.parentElement;if(!R||!e)return;let t=!0;const n=()=>{t&&H.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[R]);const M=(e,t)=>{for(let n=1;n<=f.length;n+=1){const r=((e+t*n)%f.length+f.length)%f.length;if(!f[r]?.disabled)return r}return null},j=e=>{const t=1===e?f.map((e,t)=>t):f.map((e,t)=>f.length-1-t);for(const e of t)if(!f[e]?.disabled)return e;return null};/* @__PURE__ */
|
|
3
|
+
return s("div",{ref:$,role:"tablist","data-labels-shown":R?D:void 0,"aria-label":E,"aria-labelledby":L,onKeyDown:e=>{const t=f.findIndex(e=>e.id===p);let n=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)n=M(t,1);else if("ArrowLeft"===e.key||"ArrowUp"===e.key)n=M(t,-1);else if("Home"===e.key)n=j(1);else{if("End"!==e.key)return;n=j(-1)}e.preventDefault(),null!==n&&n!==t&&(g(f[n].id),A.current[n]?.focus())},className:N?o(k,F):b(k,F),children:f.map((e,o)=>{const a=e.id===p,i=R&&null!=e.icon,c="all"===D||"chosen"===D&&a,d=/* @__PURE__ */s("button",{ref:e=>{A.current[o]=e},type:"button",role:"tab",id:C?v(C,e.id):void 0,"aria-controls":C?w(C,e.id):void 0,"aria-selected":a,tabIndex:a?0:-1,disabled:e.disabled,onClick:()=>g(e.id),className:N?n({selected:a,disabled:e.disabled,block:k}):h(a,k,"warning"===e.tone?"warning":"default"),children:i?/* @__PURE__ */u(m,{children:[
|
|
4
|
+
/* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-glyph":"",className:"inline-flex shrink-0",children:e.icon}),
|
|
5
|
+
/* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:e.label})]}):/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id),b=i?e.tooltip??e.label:e.tooltip;return null!=b&&!1!==b?/* @__PURE__ */s(l,{content:b,className:N||k?r(k):void 0,children:d},e.id):d})})}export{x as Tabs,v as tabButtonId,w as tabPanelId};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SpinnerRing as e}from"./chunk-Q5MD3VY6.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{SpinnerRing as e}from"./chunk-Q5MD3VY6.js";import{useShellStrings as t}from"./chunk-OVNRVFWS.js";import{jsxs as n,Fragment as o,jsx as l}from"react/jsx-runtime";function r({selectedCount:r,hiddenSelectedCount:c=0,loadedCount:d,totalCount:i,label:s,isFetchingMore:a,extra:u}){const m=t().list,h=i??d,f=d>=h,p=c>0?m.selectedNotShown(r,c):r>0?m.selected(r):"";/* @__PURE__ */
|
|
2
2
|
return n(o,{children:[u,p?`${p} — `:"",f?null!=i?m.allLoaded(h,s):m.count(h,s):m.loadedOf(d,h,s),a?/* @__PURE__ */n(o,{children:[" · ",
|
|
3
3
|
/* @__PURE__ */n("span",{className:"inline-flex items-center gap-1",role:"status",children:[
|
|
4
4
|
/* @__PURE__ */l(e,{}),m.loadingMore]})]}):""]})}export{r as ListFooter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{TransferProgress as e}from"./chunk-
|
|
1
|
+
import{TransferProgress as e}from"./chunk-EZQXLIG3.js";import{Icon as r}from"./chunk-C2HHGLLR.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-OVNRVFWS.js";import{jsx as o}from"react/jsx-runtime";var n=/^data:([a-z0-9!#$&^_.+-]+)\/([a-z0-9!#$&^_.+-]+)/i;function i(e){if(/^data:/i.test(e||""))return function(e){const r=n.exec(e);if(!r)return"media";const[,t,o]=r,i=o.split("+")[0].split(".").pop().replace(/^x-/i,"");return i?`${t.toLowerCase()}.${i.toLowerCase()}`:"media"}(e);const r=(e||"").split("?")[0].split("#")[0],t=r.substring(r.lastIndexOf("/")+1);try{return decodeURIComponent(t.replace(/^[0-9a-f]{32}_/i,""))||t||"media"}catch{return t||"media"}}var s=/\.(mp4|webm|ogg|ogv|mov|m4v)(\?|#|$)/i;function a(e,r=t.media){const o=function(e){const r=e.includes("video"),t=e.includes("image")||"*"===e||""===e;return r&&!t?"video":t&&!r?"image":"file"}(e);return"image"===o?r.uploadImage:"video"===o?r.uploadVideo:r.uploadFile}function u(e,r,t="",o="p-4"){return["flex w-full flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed text-center transition-colors",o,r?"cursor-not-allowed opacity-60":"cursor-pointer",e?"border-blue-500 bg-blue-50":"border-gray-300 bg-gray-50 hover:bg-gray-100",t].filter(Boolean).join(" ")}function c(e){return e?"rosh-focus-ring":"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-zone)]"}function d({label:r,progress:t,rounded:n="rounded-lg"}){/* @__PURE__ */
|
|
2
2
|
return o("div",{className:`absolute inset-0 flex items-center justify-center bg-white/60 ${n}`,children:/* @__PURE__ */o(e,{state:"busy",verb:r,pct:t})})}function l({children:e}){/* @__PURE__ */
|
|
3
3
|
return o("span",{className:"absolute inset-x-1 bottom-1 truncate rounded px-2 py-0.5 text-xs text-white",style:{background:"var(--rosh-media-scrim)"},children:e})}function m(e,r=""){if(!e)return!1;const t=n.exec(e);if(t)return"video"===t[1].toLowerCase();const o=r.includes("video"),i=r.includes("image")||"*"===r||""===r;return s.test(e)||o&&!i}function f({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
4
4
|
return o(r,{name:"close",className:e,strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})}function p({className:e="h-6 w-6"}){/* @__PURE__ */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-OVNRVFWS.js";import{useId as e}from"react";import{jsx as i,jsxs as s}from"react/jsx-runtime";function o({height:o=220,width:a=720,variant:h="area",bars:l=9,label:c,className:n}){const f=t().charts,p=c??f.loading,d=`${e()}-shimmer`,m=48,g=a-16,y=12,u=o-26;/* @__PURE__ */
|
|
2
2
|
return i("div",{className:n,children:/* @__PURE__ */s("svg",{width:"100%",height:o,viewBox:`0 0 ${a} ${o}`,role:"img","aria-label":p,"aria-busy":"true",children:[
|
|
3
3
|
/* @__PURE__ */i("defs",{children:/* @__PURE__ */s("linearGradient",{id:d,x1:"0",y1:"0",x2:"1",y2:"0",children:[
|
|
4
4
|
/* @__PURE__ */i("stop",{offset:"0%",stopColor:r.surface,stopOpacity:"0"}),
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{parseHexColor as e,hexToHsv as r,hsvToHex as a,hexReadout as n,HUE_GRADIENT as o,HEX_MAX_LENGTH as t,svFromPoint as l,hueFromPoint as i}from"./chunk-H245LLX4.js";import{Popover as s}from"./chunk-FND3BDOO.js";import{InputNumber_default as c}from"./chunk-
|
|
2
|
-
return w("button",{ref:l,type:o,"aria-pressed":a,className:$({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:
|
|
1
|
+
import{parseHexColor as e,hexToHsv as r,hsvToHex as a,hexReadout as n,HUE_GRADIENT as o,HEX_MAX_LENGTH as t,svFromPoint as l,hueFromPoint as i}from"./chunk-H245LLX4.js";import{Popover as s}from"./chunk-FND3BDOO.js";import{InputNumber_default as c}from"./chunk-332V47ID.js";import{InSettingRowContext as u}from"./chunk-E4Z5OXBI.js";import{inputClasses as d}from"./chunk-JFSYWEHD.js";import{Tooltip as h}from"./chunk-Z3WKHMVB.js";import{useShellStrings as g}from"./chunk-OVNRVFWS.js";import{forwardRef as p,useState as b,useRef as m,useEffect as f,useId as v}from"react";import{jsx as w,jsxs as x}from"react/jsx-runtime";var y={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},k={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function N(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function C(e,r){if(!e)return k;const a=N(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${k.backgroundImage}`,backgroundSize:`auto, ${k.backgroundSize}`}}function $({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",y[e],a].filter(Boolean).join(" ")}var D=p(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
|
|
2
|
+
return w("button",{ref:l,type:o,"aria-pressed":a,className:$({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(e)})})}),z=(e,r,a)=>Math.min(a,Math.max(r,e)),I=e=>"string"==typeof e?{value:e}:e;function M(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:z(e.s+o[0],0,1),v:z(e.v+o[1],0,1)}:null}function P(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,359);case"ArrowRight":case"ArrowUp":return z(e+n,0,359);case"PageDown":return z(e-10,0,359);case"PageUp":return z(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var A={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function j(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,100);case"ArrowRight":case"ArrowUp":return z(e+n,0,100);case"PageDown":return z(e-10,0,100);case"PageUp":return z(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function S({value:t,onChange:s,label:c,presets:d,clearable:p=!1,fallback:v,dragWrites:y="live",disabled:$=!1,opacity:z,onOpacityChange:S,onClose:K,id:O,className:B=""}){const R=g().color,E=N(z),H=e=>{const r=N(e);$||r===E||S?.(r)},U=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:E},W=e(v??""),[V,X]=b(()=>r(t||W||"")),F=m(t);f(()=>{t!==F.current&&(F.current=t,t?X(r(t)):W&&X(r(W)))},[t]);const q=e=>{$||e===t||(F.current=e,s(e))},Y=a=>{const n=e(a);n&&(X(r(n)),q(n))},Z=e=>{X(e),q(a(e))},[J,G]=b(!1),Q=m(V);Q.current=V;const _=e=>({onPointerDown:r=>{if($||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,Q.current);"end"===y?(G(!0),X(a)):Z(a)},onPointerMove:r=>{if($||!(1&r.buttons))return;const a=e(r,Q.current);"end"===y?X(a):Z(a)},onPointerUp:r=>{"end"===y&&J&&(G(!1),Z(e(r,Q.current)))}}),ee=_((e,r)=>({...r,...l(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),re=_((e,r)=>({...r,h:i(e.clientX,e.currentTarget.getBoundingClientRect())})),ae=J?a(V):t,ne=e=>`${Math.round(100*e)}%`,oe=(d??[]).map(I),te=e(t),le=ae||W||"";
|
|
3
3
|
/* @__PURE__ */
|
|
4
|
-
return w(u.Provider,{value:!1,children:/* @__PURE__ */x("div",{id:
|
|
4
|
+
return w(u.Provider,{value:!1,children:/* @__PURE__ */x("div",{id:O,className:`flex w-56 flex-col gap-3 ${$?"opacity-60":""} ${B}`.trim(),onKeyDown:e=>{"Escape"===e.key&&K&&(e.preventDefault(),e.stopPropagation(),K())},children:[(oe.length>0||p)&&/* @__PURE__ */x("div",{role:"group","aria-label":R.presets,className:"flex flex-wrap gap-2",children:[p&&/* @__PURE__ */w(h,{content:R.clear,children:/* @__PURE__ */w(D,{color:"",size:"sm","aria-label":R.clear,selected:""===t,disabled:$,onClick:()=>{$||""===t||(F.current="",s(""))}})}),oe.map(r=>{const a=e(r.value),o=r.label?`${r.label} · ${n(a??r.value)}`:n(a??r.value);/* @__PURE__ */
|
|
5
5
|
return w(h,{content:o,children:/* @__PURE__ */w(D,{color:a??r.value,size:"sm","aria-label":o,selected:null!==a&&a===te,disabled:$,onClick:()=>Y(r.value)})},`${r.label??""}:${r.value}`)})]}),
|
|
6
|
-
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":R.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*
|
|
7
|
-
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":R.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(
|
|
6
|
+
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":R.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*V.v),"aria-valuetext":R.squareValue(Math.round(100*V.s),Math.round(100*V.v)),"aria-disabled":$||void 0,"data-color-square":"",onKeyDown:e=>{if($)return;const r=M(V,e.key,e.shiftKey);r&&(e.preventDefault(),Z(r))},...ee,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:a({h:V.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ne(V.s),top:ne(1-V.v),...A}})}),
|
|
7
|
+
/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":R.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(V.h),"aria-orientation":"horizontal","aria-disabled":$||void 0,"data-color-hue":"",onKeyDown:e=>{if($)return;const r=P(V.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),Z({...V,h:r}))},...re,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:o},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:V.h/360*100+"%",background:a({h:V.h,s:1,v:1}),...A}})}),S&&/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":R.opacity(c),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":E,"aria-valuetext":`${E}%`,"aria-orientation":"horizontal","aria-disabled":$||void 0,"data-color-opacity":"",onKeyDown:e=>{if($)return;const r=j(E,e.key,e.shiftKey);null!==r&&(e.preventDefault(),H(r))},onPointerDown:e=>{$||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),H(U(e)))},onPointerMove:e=>{!$&&1&e.buttons&&H(U(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${le||"black"}), ${k.backgroundImage}`,backgroundSize:`auto, ${k.backgroundSize}`},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${E}%`,...C(le||"black",E),...A}})}),
|
|
8
8
|
/* @__PURE__ */x("div",{className:"flex items-center gap-2",children:[
|
|
9
|
-
/* @__PURE__ */w("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-gray-300",style:
|
|
10
|
-
/* @__PURE__ */w(
|
|
11
|
-
return w("input",{id:s,type:"text",value:g??(r?n(r):""),"aria-label":o,placeholder:l,maxLength:t,spellCheck:!1,autoComplete:"off",disabled:i,onChange:n=>{p(n.target.value);const o=e(n.target.value);null!==o&&o!==r&&a(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),p(null))},onBlur:()=>p(null),"data-hex-look":u,className:m})}function
|
|
12
|
-
return w("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */w(c,{value:e,onChange:e=>{null!==e&&r(e)},min:0,max:100,precision:0,suffix:"%",size:o,"aria-label":a,disabled:n})})}function R({value:r,onChange:a,label:o,presets:t,clearable:l,fallback:i,dragWrites:c,disabled:u,id:d,showHexInput:h=!1,opacity:p,onOpacityChange:b,size:m="md",align:f="start",open:y,onOpenChange:k,className:D=""}){const z=g().color,I=
|
|
9
|
+
/* @__PURE__ */w("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-gray-300",style:C(le,S?E:null)}),
|
|
10
|
+
/* @__PURE__ */w(T,{value:ae,placeholder:!t&&W?n(W):void 0,onChange:Y,label:R.hex(c),disabled:$}),S&&/* @__PURE__ */w(L,{value:E,onChange:H,label:R.opacity(c),disabled:$})]})]})})}var K={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},O={sm:"h-6",md:"h-8",lg:"h-10"},B=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-gray-800 placeholder:text-gray-400 hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function T({value:r,onChange:a,label:o,placeholder:l,disabled:i,id:s,size:c="md",look:u="box",className:h=""}){const[g,p]=b(null),m="text"===u?`${B} ${O[c]} ${h}`.trim():d({size:c,className:`${K[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
|
|
11
|
+
return w("input",{id:s,type:"text",value:g??(r?n(r):""),"aria-label":o,placeholder:l,maxLength:t,spellCheck:!1,autoComplete:"off",disabled:i,onChange:n=>{p(n.target.value);const o=e(n.target.value);null!==o&&o!==r&&a(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),p(null))},onBlur:()=>p(null),"data-hex-look":u,className:m})}function L({value:e,onChange:r,label:a,disabled:n,size:o="md"}){/* @__PURE__ */
|
|
12
|
+
return w("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */w(c,{value:e,onChange:e=>{null!==e&&r(e)},min:0,max:100,precision:0,suffix:"%",size:o,"aria-label":a,disabled:n})})}function R({value:r,onChange:a,label:o,presets:t,clearable:l,fallback:i,dragWrites:c,disabled:u,id:d,showHexInput:h=!1,opacity:p,onOpacityChange:b,size:m="md",align:f="start",open:y,onOpenChange:k,className:D=""}){const z=g().color,I=N(p),M=v(),P=e(i??""),A=r||P||"",j=r?n(r):P?n(P):z.none;
|
|
13
13
|
/* @__PURE__ */
|
|
14
14
|
return x("div",{className:`inline-flex items-center ${b?"flex-wrap justify-end gap-1":h?"gap-1":"gap-2"} ${D}`.trim(),children:[
|
|
15
|
-
/* @__PURE__ */w(s,{id:d,trigger:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:
|
|
16
|
-
/* @__PURE__ */w(
|
|
15
|
+
/* @__PURE__ */w(s,{id:d,trigger:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(A,b?I:null)}),triggerLabel:z.swatch(o,j),triggerClassName:$({size:m}),"aria-label":z.panel(o),align:f,open:y,onOpenChange:k,disabled:u,children:/* @__PURE__ */w(S,{id:M,value:r,onChange:a,label:o,presets:t,clearable:l,fallback:i,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),h&&
|
|
16
|
+
/* @__PURE__ */w(T,{value:r,placeholder:!r&&P?n(P):void 0,onChange:e=>{u||e===r||a(e)},label:z.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */w(L,{value:I,onChange:e=>{u||e===I||b(e)},label:z.opacity(o),disabled:u,size:m})]})}export{R as ColorPicker,S as ColorPickerPanel,D as ColorSwatch,T as HexInput,k as NO_COLOR_FILL,N as clampOpacity,C as colorFill,$ as colorSwatchClasses,P as stepHue,j as stepOpacity,M as stepSquare};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{GROUP_COLORS as e}from"./chunk-BOGBLZKS.js";import{SpinnerRing as r}from"./chunk-Q5MD3VY6.js";import{Tooltip as n}from"./chunk-Z3WKHMVB.js";import{useShellStrings as l}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e}from"./chunk-BOGBLZKS.js";import{SpinnerRing as r}from"./chunk-Q5MD3VY6.js";import{Tooltip as n}from"./chunk-Z3WKHMVB.js";import{useShellStrings as l}from"./chunk-OVNRVFWS.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
|
|
2
2
|
return t(n,{content:e,describe:!1,children:/* @__PURE__ */t("button",{type:"button",onClick:l,"aria-label":e,className:"flex h-4 w-4 items-center justify-center rounded-full leading-none hover:bg-current/10 rosh-focus-ring focus-visible:ring-2",children:/* @__PURE__ */t("span",{"aria-hidden":"true",children:r})})})}function c({state:n,label:c,verb:u,subject:m,pct:p,onCancel:d,onRetry:h,onDismiss:f,className:b=""}){const g=l().transfer;if("idle"===n)return null==c?null:/* @__PURE__ */t("span",{className:`${s} ${e.neutral} pr-2 ${b}`.trim(),children:c});if("error"===n)/* @__PURE__ */
|
|
3
3
|
return i("span",{role:"status",className:`${s} ${e.danger} ${b}`.trim(),children:[
|
|
4
4
|
/* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,$=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),k="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,N=e=>[e,m,null==$?"":`${$}%`].filter(Boolean).join(" ");/* @__PURE__ */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e({buttons:e,orientation:n,chrome:o,room:t}){if(0===e.length)return"none";const r=t=>{const r=e.map(e=>t(e)?e.worded:e.bare);return o+("horizontal"===n?r.reduce((e,n)=>e+n,0):Math.max(...r))};return r(()=>!0)<=t+.5?"all":e.some(e=>e.active)&&r(e=>e.active)<=t+.5?"chosen":"none"}export{e as railLabelsShown};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{CountBadge as e}from"./chunk-IJMV4F2Q.js";import{SettingAutoContext as t,InSettingRowContext as a}from"./chunk-E4Z5OXBI.js";import{isShown as i}from"./chunk-HCP7WOAL.js";import{useShellStrings as n}from"./chunk-OVNRVFWS.js";import{jsx as r,jsxs as s}from"react/jsx-runtime";var l={default:{pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},compact:{pad:"py-2",gap:"gap-2",text:"text-sm",bodyTop:"mt-2",bodyPad:"pt-2"}};function d({label:d,icon:c,action:m,value:o,readout:h,description:p,children:x,controlId:u,unknownText:f="—",quiet:g=!1,size:v="default",viewState:y,divider:N=!0,showWhen:w,values:b,context:$,className:j=""}){const k=n();if(!i(w,b,$))return null;const P=l[v],V=void 0!==o||void 0===x&&null==m,T=null==o||""===o,F=g?"text-gray-500":"text-gray-800",I=T?"text-gray-400":g?"text-gray-500":"text-gray-900",O=null!=h&&!1!==h,W=`${P.text} font-medium ${F}${"compact"!==v||O?"":" whitespace-nowrap"}`,B=u?/* @__PURE__ */r("label",{htmlFor:u,className:W,children:d}):/* @__PURE__ */r("span",{className:W,children:d}),S="auto"===y?/* @__PURE__ */r("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-gray-200 px-1 text-2xs font-normal leading-4 text-gray-500",children:k.settingView.auto}):"edited"===y?/* @__PURE__ */s("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
|
|
2
|
+
/* @__PURE__ */r("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */r(e,{dot:!0,tone:"accent"})}),
|
|
3
|
+
/* @__PURE__ */r("span",{className:"sr-only",children:k.settingView.edited})]}):null,q=/* @__PURE__ */r(t.Provider,{value:"auto"===y,children:T?f:o}),z=[N?"border-t border-gray-100 first:border-t-0":"",P.pad,j].filter(Boolean).join(" "),A=null!=x&&!1!==x&&/* @__PURE__ */r("div",{className:`${P.bodyTop} border-t border-gray-100 ${P.bodyPad}`,children:x});/* @__PURE__ */
|
|
4
|
+
return s("div",O?{className:z,"data-setting-row":"compact"===v?v:void 0,children:[
|
|
5
|
+
/* @__PURE__ */s("div",{"data-setting-line":"",className:"flex items-start gap-2",children:[
|
|
6
|
+
/* @__PURE__ */s("div",{className:`flex min-w-min flex-1 items-start gap-2 ${F}`,children:[null!=c&&/* @__PURE__ */r("span",{"aria-hidden":"true",className:"inline-flex h-5 w-4 shrink-0 items-center justify-center",children:c}),B,S]}),
|
|
7
|
+
/* @__PURE__ */r("span",{"data-setting-readout":"",className:`min-w-0 text-right [overflow-wrap:anywhere] ${P.text} ${g?"text-gray-500":"text-gray-900"}`,children:h}),("compact"===v||null!=m)&&/* @__PURE__ */r("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:m})]}),p&&/* @__PURE__ */r("p",{className:"mt-0.5 text-xs text-gray-500",children:p}),void 0!==o&&/* @__PURE__ */r("div",{"data-setting-value":"",className:`mt-2 flex justify-end ${P.text} ${I}`,children:/* @__PURE__ */r(a.Provider,{value:"compact"===v,children:q})}),A]}:{className:z,"data-setting-row":"compact"===v?v:void 0,children:[
|
|
8
|
+
/* @__PURE__ */s("div",{className:"compact"===v?"flex flex-wrap items-center justify-between gap-x-2 gap-y-2":`flex items-center justify-between ${P.gap}`,children:[
|
|
9
|
+
/* @__PURE__ */s("div",{"data-setting-name":"compact"===v?"":void 0,className:"compact"===v?"flex-1 basis-0":"min-w-0 flex-1",children:[null!=c?
|
|
10
|
+
/* @__PURE__ */s("div",{className:`flex min-w-0 items-center gap-2 ${F}`,children:[
|
|
11
|
+
/* @__PURE__ */r("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:c}),B,S]}):S?/* @__PURE__ */s("div",{className:"flex min-w-0 items-center gap-2",children:[B,S]}):B,p&&/* @__PURE__ */r("p",{className:"mt-0.5 text-xs text-gray-500",children:p})]}),"compact"===v?
|
|
12
|
+
/* @__PURE__ */s("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[V&&/* @__PURE__ */r("div",{"data-setting-value":"",className:`flex items-center justify-end ${P.text} ${I}`,children:/* @__PURE__ */r(a.Provider,{value:!0,children:q})}),
|
|
13
|
+
/* @__PURE__ */r("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:m})]}):null!=m?/* @__PURE__ */s("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[V&&/* @__PURE__ */r("div",{className:`${P.text} ${I}`,children:q}),m]}):V&&/* @__PURE__ */r("div",{className:`shrink-0 ${P.text} ${I}`,children:q})]}),A]})}export{d as SettingRow};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Markdown as e}from"./chunk-
|
|
1
|
+
import{Markdown as e}from"./chunk-2QI3QFX6.js";import{PLACEHOLDER_INK as t}from"./chunk-JFSYWEHD.js";import{Icon as r}from"./chunk-C2HHGLLR.js";import{LoadingSpinner as l}from"./chunk-Q5MD3VY6.js";import{useShellStrings as a}from"./chunk-OVNRVFWS.js";import{useState as s,useMemo as n}from"react";import{jsxs as o,jsx as i,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */i(r,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:y,emptyMessage:f}){const b=a(),[v,N]=s(""),[w,k]=s(null),[C,j]=s({}),L=v.trim().toLowerCase(),M=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let r=e.get(t.category);r||(r={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,r)),r.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,r)=>(t.get(e.key)??1/0)-(t.get(r.key)??1/0))},[h,p]),_=e=>!L||e.title.toLowerCase().includes(L)||e.body.toLowerCase().includes(L)||e.category_label.toLowerCase().includes(L),E=n(()=>M.map(e=>({...e,docs:e.docs.filter(_)})).filter(e=>e.docs.length>0),[M,L]),F=n(()=>E.flatMap(e=>e.docs),[E]),H=(w?F.find(e=>e.slug===w):void 0)??F[0]??null,Q=e=>!!L||(C[e]??e===H?.category);/* @__PURE__ */
|
|
2
2
|
return o("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
|
|
3
3
|
/* @__PURE__ */o("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
|
|
4
4
|
/* @__PURE__ */o("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
@@ -6,16 +6,16 @@ return o("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
|
|
|
6
6
|
/* @__PURE__ */i("div",{className:"px-3 py-2 border-b border-gray-100 shrink-0",children:/* @__PURE__ */o("div",{className:"relative",children:[
|
|
7
7
|
/* @__PURE__ */i(r,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
|
|
8
8
|
/* @__PURE__ */i("input",{type:"text",value:v,onChange:e=>N(e.target.value),placeholder:b.help.searchPlaceholder,className:"w-full rounded-md border border-gray-300 bg-white h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
|
|
9
|
-
/* @__PURE__ */i("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"py-6",label:b.help.loading}):0===
|
|
9
|
+
/* @__PURE__ */i("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"py-6",label:b.help.loading}):0===E.length?/* @__PURE__ */i("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:L?b.help.noResults:f??b.help.empty}):E.map(e=>{const t=Q(e.key);/* @__PURE__ */
|
|
10
10
|
return o("div",{className:"py-0.5",children:[
|
|
11
|
-
/* @__PURE__ */o("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!
|
|
11
|
+
/* @__PURE__ */o("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!Q(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-gray-400 hover:text-gray-600",children:[
|
|
12
12
|
/* @__PURE__ */i(d,{open:t}),
|
|
13
|
-
/* @__PURE__ */i("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=
|
|
13
|
+
/* @__PURE__ */i("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=H?.slug===e.slug;/* @__PURE__ */
|
|
14
14
|
return o("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
|
|
15
15
|
/* @__PURE__ */i("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */i("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:b.help.draft})]},e.slug)})]},e.key)})})]}),
|
|
16
|
-
/* @__PURE__ */i("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:
|
|
16
|
+
/* @__PURE__ */i("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:H?/* @__PURE__ */o(c,{children:[
|
|
17
17
|
/* @__PURE__ */o("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
18
18
|
/* @__PURE__ */o("div",{className:"min-w-0",children:[
|
|
19
|
-
/* @__PURE__ */i("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:
|
|
20
|
-
/* @__PURE__ */o("p",{className:"text-xs text-gray-500 mt-0.5",children:[
|
|
21
|
-
/* @__PURE__ */i("div",{className:"flex-1 overflow-auto px-5 py-4",children:y?y(
|
|
19
|
+
/* @__PURE__ */i("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:H.title}),
|
|
20
|
+
/* @__PURE__ */o("p",{className:"text-xs text-gray-500 mt-0.5",children:[H.category_label,!1===H.is_published&&/* @__PURE__ */o("span",{className:"ml-2 text-amber-600",children:["· ",b.help.draft]})]})]}),u&&x&&/* @__PURE__ */i("button",{type:"button",onClick:()=>x(H),className:"shrink-0 text-sm text-blue-600 hover:underline",children:b.help.edit})]}),
|
|
21
|
+
/* @__PURE__ */i("div",{className:"flex-1 overflow-auto px-5 py-4",children:y?y(H):H.body?/* @__PURE__ */i(e,{children:H.body}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500 italic",children:b.help.noBody})})]}):/* @__PURE__ */i("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */i(l,{size:"sm",padding:"",label:b.help.loading}):/* @__PURE__ */i("p",{className:"text-sm text-gray-500",children:b.help.pickArticle})})})]})}export{h as HelpCenter};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{computeMaximizedBox as e,isSidebarStripReserved as t,boxFillsWorkArea as n,readAlwaysMaximizedFlag as r,WORK_AREA_CHANGED_EVENT as o,useShellAuth as i,scrollerIsFluid as a,growBoxToWidth as s,widthToFit as l,navIcons as c}from"./chunk-TPDOOCFS.js";import{reportBoundaryError as u}from"./chunk-KNUR2UEG.js";import{isStaleChunkError as d}from"./chunk-JDCM2VHG.js";import{Result as h}from"./chunk-
|
|
1
|
+
import{computeMaximizedBox as e,isSidebarStripReserved as t,boxFillsWorkArea as n,readAlwaysMaximizedFlag as r,WORK_AREA_CHANGED_EVENT as o,useShellAuth as i,scrollerIsFluid as a,growBoxToWidth as s,widthToFit as l,navIcons as c}from"./chunk-TPDOOCFS.js";import{reportBoundaryError as u}from"./chunk-KNUR2UEG.js";import{isStaleChunkError as d}from"./chunk-JDCM2VHG.js";import{Result as h}from"./chunk-BXRWPGAT.js";import{CMD_Z as m,CMD_SHIFT_Z as p}from"./chunk-Y53KNQKL.js";import{ColoredBadge as f}from"./chunk-CJUN2VOD.js";import{CopyButton as w}from"./chunk-4A2X6KLQ.js";import{confirm as y}from"./chunk-CP6FITHO.js";import{dialogA11y as g}from"./chunk-VWGWZY7A.js";import{useShellPrefs as b}from"./chunk-KC3EX26K.js";import{PopupMenu as v,PopupMenuItem as x,PopupMenuDivider as k,PopupMenuLabel as E}from"./chunk-RAHIWTPJ.js";import{useIsMobile as C,useIsPhone as M}from"./chunk-UGTRSRIW.js";import{StatusBadge as N}from"./chunk-BOGBLZKS.js";import{focusableIn as S}from"./chunk-CDAJKLGL.js";import{Button_default as L}from"./chunk-FSP63GKK.js";import{Icon as T}from"./chunk-C2HHGLLR.js";import{LoadingSpinner as z}from"./chunk-Q5MD3VY6.js";import{Z_LAYERS as A}from"./chunk-62LW225J.js";import{runEscapeInterceptors as D}from"./chunk-TWVUQUUD.js";import{useShellStrings as P}from"./chunk-OVNRVFWS.js";import{createContext as I,useContext as K,Component as W,useLayoutEffect as R,useRef as $,useEffect as O,useState as j,useSyncExternalStore as F,useCallback as q,isValidElement as B,Fragment as H,Children as U,cloneElement as Y,useMemo as X,useId as V,useReducer as _,Suspense as G}from"react";import{jsxs as J,jsx as Q,Fragment as Z}from"react/jsx-runtime";import{createPortal as ee}from"react-dom";import{useLocation as te}from"react-router-dom";import{useQueryClient as ne,useQuery as re}from"@tanstack/react-query";function oe(e){return"component"in e}function ie(e){return"endpoint"in e}var ae={};function se(e){ae=e}var le=new Proxy({},{get:(e,t)=>ae[t],has:(e,t)=>t in ae,ownKeys:()=>Object.keys(ae),getOwnPropertyDescriptor(e,t){if(t in ae)return{configurable:!0,enumerable:!0,value:ae[t]}}}),ce=null;function ue(e){ce=e}function de(){return null!==ce}var he=/* @__PURE__ */new Set(["get","post","put","patch","delete","head","options","request"]),me=new Proxy({},{get:(e,t)=>ce?ce[t]:"string"==typeof t&&he.has(t)?()=>Promise.resolve({data:null,status:0,statusText:"",headers:{},config:{}}):void 0}),pe=I(null);function fe(){return K(pe)?.pageSearch??""}var we=null,ye=/* @__PURE__ */new Set;function ge(e){we!==e&&(we=e,ye.forEach(e=>e()))}function be(){return we}function ve(e){return ye.add(e),()=>{ye.delete(e)}}function xe({error:e,onReload:t}){const n=d(e);/* @__PURE__ */
|
|
2
2
|
return J("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 py-12 text-center",children:[
|
|
3
3
|
/* @__PURE__ */Q(T,{name:"warning",className:"h-8 w-8 text-amber-500",strokeWidth:1.5}),
|
|
4
4
|
/* @__PURE__ */J("div",{className:"min-w-0",children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-H7BP5LLG.js";import{keepsNativeMenu as a}from"./chunk-GZCAFWWB.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-OVNRVFWS.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as r,jsxs as n}from"react/jsx-runtime";var i={danger:"bg-red-600 text-white",neutral:"bg-gray-600 text-white",accent:"bg-blue-600 text-white"};function a({count:a=0,max:l=99,dot:s=!1,tone:o="danger",showZero:c=!1,children:m,className:u=""}){const h=s||a>0||0===a&&c,d=e(),x=a>l?`${t(l,d)}+`:t(a,d),f=m?"":u,g=h?/* @__PURE__ */r("span",s?{className:`block h-2.5 w-2.5 rounded-full ring-2 ring-white ${i[o]} ${f}`.trim(),"aria-hidden":m?"true":void 0}:{className:`flex h-5 min-w-[1.25rem] items-center justify-center whitespace-nowrap rounded-full px-1 text-xs font-semibold tabular-nums ring-2 ring-white ${i[o]} ${f}`.trim(),children:x}):null;return m?/* @__PURE__ */n("span",{className:`relative inline-flex ${u}`.trim(),children:[m,g&&/* @__PURE__ */r("span",{className:"absolute -right-1.5 -top-1.5 flex",children:g})]}):g}export{a as CountBadge};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Banner as e}from"./chunk-
|
|
1
|
+
import{Banner as e}from"./chunk-TTE3GZWH.js";import{Button_default as t}from"./chunk-FSP63GKK.js";import{useShellStrings as n}from"./chunk-OVNRVFWS.js";import{useState as r,useEffect as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";var s=6e4;function c({currentVersion:e,versionUrl:t="/version.json",pollMs:n=6e4}){const[o,a]=r(null);return i(()=>{if(!e||null!==o)return;let r=!1;const i=async()=>{if("undefined"==typeof document||"hidden"!==document.visibilityState)try{const n=t.includes("?")?"&":"?",i=await fetch(`${t}${n}t=${Date.now()}`,{cache:"no-store"});if(!i.ok)return;const o=await i.json(),s=o&&"object"==typeof o&&"string"==typeof o.version?o.version:null;!r&&s&&s!==e&&a(s)}catch{}};i();const s=setInterval(()=>{i()},n),c=()=>{"visible"===document.visibilityState&&i()};return document.addEventListener("visibilitychange",c),()=>{r=!0,clearInterval(s),document.removeEventListener("visibilitychange",c)}},[e,t,n,o]),o}function l({currentVersion:r,versionUrl:i,pollMs:s,message:l,onRefresh:m,className:u=""}){const d=c({currentVersion:r,versionUrl:i,pollMs:s}),p=n();if(null===d)return null;const f=m??(()=>window.location.reload());/* @__PURE__ */
|
|
2
2
|
return o("div",{"data-app-update-banner":"",className:`fixed left-1/2 top-3 z-(--z-toast) w-max max-w-[calc(100vw-1.5rem)] -translate-x-1/2 ${u}`.trim(),children:/* @__PURE__ */a(e,{tone:"warning",className:"shadow-lg",action:/* @__PURE__ */o(t,{type:"button",variant:"primary",size:"md",onClick:f,children:p.update.refreshNow}),children:[
|
|
3
3
|
/* @__PURE__ */o("span",{className:"font-medium",children:l??p.update.available}),
|
|
4
4
|
/* @__PURE__ */a("span",{className:"ml-2 whitespace-nowrap font-mono text-xs text-gray-500",children:[r," → ",d]})]})})}export{s as APP_UPDATE_POLL_MS,l as AppUpdateBanner,c as useAppUpdate};
|