efficient-shell 9.12.0 → 10.0.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 +26 -20
- package/dist/{Browser-G7AXZ4OT.js → Browser-RFLTFP7Y.js} +14 -14
- package/dist/Calculator-DV2R65OS.js +29 -0
- package/dist/{CurrencyConverter-EDEJOKHC.js → CurrencyConverter-ELSCNMUT.js} +9 -9
- package/dist/{Documents-7AVOO2DA.js → Documents-HKTTXLSR.js} +27 -27
- package/dist/Files-ZSYGKZOV.js +88 -0
- package/dist/{Notepad-KBRNR5BU.js → Notepad-63Q3JSCV.js} +10 -10
- package/dist/{PdfViewer-FFQOKKFW.js → PdfViewer-DFBPEUY5.js} +1 -1
- package/dist/{PomodoroTimer-HCLT2JVD.js → PomodoroTimer-XHNZGBDR.js} +11 -11
- package/dist/{Preview-4SOGNXHL.js → Preview-PLCASIZA.js} +38 -38
- package/dist/Sidebar-QFT5WPK4.js +44 -0
- package/dist/{Spreadsheet-W2AGKEWT.js → Spreadsheet-Y7TJIBI5.js} +14 -14
- package/dist/{Stock-3IBS63UR.js → Stock-KLYWTMMD.js} +3 -3
- package/dist/{Weather-EFIIVKFE.js → Weather-CT2IZHEW.js} +20 -20
- package/dist/{WorldClock-ERQQ4VWP.js → WorldClock-EJCUVIUW.js} +6 -6
- package/dist/ai/index.js +59 -59
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.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/SpecChart.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-25STFYV3.js +8 -0
- package/dist/chunk-2NMW66P5.js +1 -0
- package/dist/{chunk-BNKULSCG.js → chunk-2OE5VVBE.js} +1 -1
- package/dist/{chunk-VZV7Q5V2.js → chunk-3AZBI76O.js} +1 -1
- package/dist/{chunk-NRGBXEBU.js → chunk-43T5JGFB.js} +1 -1
- package/dist/{chunk-QLYOGT3U.js → chunk-4E4GWE4L.js} +17 -17
- package/dist/{chunk-E6EUGQGA.js → chunk-4WZRNPIG.js} +1 -1
- package/dist/{chunk-5CVQN2BR.js → chunk-53KQSCMG.js} +7 -7
- package/dist/chunk-5CH2RGL6.js +29 -0
- package/dist/{chunk-65DYHG73.js → chunk-5VTRKWKO.js} +1 -1
- package/dist/{chunk-7WLFHDWA.js → chunk-66JYKX4T.js} +1 -1
- package/dist/{chunk-ERLZDA75.js → chunk-6I6VSUKY.js} +4 -4
- package/dist/{chunk-M5MAIJQQ.js → chunk-6L2UAAGT.js} +1 -1
- package/dist/{chunk-HRAK46H7.js → chunk-6YQPLI5M.js} +12 -12
- package/dist/{chunk-D4KZOYXQ.js → chunk-7BDZZANS.js} +1 -1
- package/dist/{chunk-CJI3POCE.js → chunk-7KDGW6BR.js} +1 -1
- package/dist/{chunk-QCFN3ET4.js → chunk-7VCAMNCH.js} +1 -1
- package/dist/chunk-7YU27U3Y.js +19 -0
- package/dist/chunk-AEJNFA2K.js +6 -0
- package/dist/{chunk-CBMXYXBH.js → chunk-AG2OLB3E.js} +9 -9
- package/dist/{chunk-KJHXCVNI.js → chunk-AJ3R5QPD.js} +5 -5
- package/dist/{chunk-ZPW3KQ27.js → chunk-APXQMZSV.js} +28 -28
- package/dist/{chunk-WZQCRTXF.js → chunk-B7AHMB3U.js} +1 -1
- package/dist/{chunk-B74Y4QR2.js → chunk-B7KD3DGY.js} +1 -1
- package/dist/{chunk-TQH6E5V2.js → chunk-BDAKGS7O.js} +1 -1
- package/dist/{chunk-AOSLOKAL.js → chunk-BFVL2VTS.js} +1 -1
- package/dist/{chunk-MCMUJDEP.js → chunk-BMQCUHSD.js} +1 -1
- package/dist/{chunk-SAHQB2JD.js → chunk-BXEKX4TB.js} +17 -17
- package/dist/{chunk-JECMVR4S.js → chunk-C6MV6IAX.js} +8 -8
- package/dist/{chunk-5RAOFJYT.js → chunk-CBGKLHPB.js} +6 -6
- package/dist/{chunk-KTRNAMHY.js → chunk-CL7SBEBQ.js} +1 -1
- package/dist/{chunk-O4NPQ23Q.js → chunk-D2WGDTWN.js} +1 -1
- package/dist/{chunk-E72USUUR.js → chunk-D7X2HMMA.js} +9 -9
- package/dist/{chunk-GP5UNEKY.js → chunk-DKQWFQAV.js} +1 -1
- package/dist/{chunk-IBIUI2D3.js → chunk-DL6QIWVR.js} +1 -1
- package/dist/{chunk-7JJUI52C.js → chunk-DPDRFLBY.js} +3 -3
- package/dist/{chunk-IK332TWA.js → chunk-DVOQCAC2.js} +1 -1
- package/dist/{chunk-H2XCQJRG.js → chunk-DXHLUB36.js} +1 -1
- package/dist/{chunk-YBU7NOD7.js → chunk-E7WY4GZ3.js} +1 -1
- package/dist/{chunk-HMG5TW2R.js → chunk-ED3QFXBC.js} +1 -1
- package/dist/{chunk-O25B75XX.js → chunk-EGAV5LSX.js} +1 -1
- package/dist/{chunk-RLLONZJJ.js → chunk-EGEWU776.js} +1 -1
- package/dist/{chunk-46YVA2BF.js → chunk-ELUTQZGP.js} +1 -1
- package/dist/{chunk-BJONHLET.js → chunk-EQN65XOO.js} +1 -1
- package/dist/{chunk-EWJELWIT.js → chunk-F24QTMTY.js} +3 -3
- package/dist/{chunk-HAFB45DT.js → chunk-FPGRKHUW.js} +7 -7
- package/dist/{chunk-VBNA237H.js → chunk-FRINAJU7.js} +1 -1
- package/dist/{chunk-QSUQC4AN.js → chunk-FTWWJHFX.js} +1 -1
- package/dist/chunk-GBLMVFDW.js +5 -0
- package/dist/{chunk-KAHYUBXM.js → chunk-GKK7DR2H.js} +8 -8
- package/dist/{chunk-NGQHXTUK.js → chunk-GKZUAT3K.js} +1 -1
- package/dist/{chunk-DRNB7KDC.js → chunk-GMRZX2ET.js} +1 -1
- package/dist/{chunk-UEIJSV45.js → chunk-GNU3U2TP.js} +1 -1
- package/dist/{chunk-FKA6ZVQO.js → chunk-GQK3U2IO.js} +9 -9
- package/dist/{chunk-YQB5OYDC.js → chunk-GQMS5657.js} +1 -1
- package/dist/{chunk-UL4G6JY2.js → chunk-GRBBQ3VF.js} +1 -1
- package/dist/chunk-GY67Y5SN.js +10 -0
- package/dist/{chunk-6O2W4X2V.js → chunk-HI6IE5HI.js} +1 -1
- package/dist/chunk-HJPCHES5.js +8 -0
- package/dist/{chunk-27W6BXT6.js → chunk-HKAQXFUR.js} +2 -2
- package/dist/chunk-IEAFSVXC.js +1 -0
- package/dist/{chunk-ZC3CCRPG.js → chunk-IGEFUHYE.js} +5 -5
- package/dist/{chunk-NU2YQSOP.js → chunk-IQWIYZB5.js} +2 -2
- package/dist/{chunk-FVDX6ZSZ.js → chunk-IU5KBQEQ.js} +6 -6
- package/dist/{chunk-2GPHHW7C.js → chunk-IWEL2ZCV.js} +1 -1
- package/dist/{chunk-P65C5TUU.js → chunk-IWJRSC7M.js} +1 -1
- package/dist/{chunk-KECOZKJU.js → chunk-J53OQCKC.js} +7 -7
- package/dist/{chunk-BF7PZFKT.js → chunk-JB3WKDD7.js} +1 -1
- package/dist/{chunk-5ZGL2BRZ.js → chunk-JHZV4TN6.js} +2 -2
- package/dist/{chunk-IENPHB5B.js → chunk-JJP54OT4.js} +1 -1
- package/dist/{chunk-MUHWI4GK.js → chunk-JKZJVQIB.js} +5 -5
- package/dist/chunk-KAVFW5CU.js +7 -0
- package/dist/{chunk-VANJPZ3H.js → chunk-KCV7BFKJ.js} +1 -1
- package/dist/chunk-KE5U4KKG.js +4 -0
- package/dist/chunk-LKW3YAZN.js +11 -0
- package/dist/chunk-LPUGK2MC.js +2 -0
- package/dist/chunk-LR77AS3N.js +15 -0
- package/dist/{chunk-BWIX3YIH.js → chunk-M3R4C3A6.js} +2 -2
- package/dist/chunk-MKEYXKZA.js +4 -0
- package/dist/{chunk-AG63JVX7.js → chunk-MPALY3CL.js} +5 -5
- package/dist/{chunk-64R3IYAM.js → chunk-MVQMAIZM.js} +1 -1
- package/dist/{chunk-5Q3PFKB5.js → chunk-MZ26SYFY.js} +1 -1
- package/dist/{chunk-BYHKYYL6.js → chunk-NDEIZUMG.js} +1 -1
- package/dist/{chunk-2LDOLQ7F.js → chunk-NDKQDIWN.js} +5 -5
- package/dist/chunk-O33CUGOI.js +6 -0
- package/dist/{chunk-4XZXY2AF.js → chunk-OQW42DOR.js} +1 -1
- package/dist/{chunk-3FBYM6O5.js → chunk-OUKDGO4N.js} +8 -8
- package/dist/{chunk-LYX55RI3.js → chunk-P6LB3I3D.js} +1 -1
- package/dist/chunk-PA37I5ZX.js +3 -0
- package/dist/{chunk-TBLN4MDQ.js → chunk-PKIDVVAE.js} +2 -2
- package/dist/chunk-POCQ7ZL4.js +3 -0
- package/dist/{chunk-YWR2WRDR.js → chunk-PUCPFBYO.js} +1 -1
- package/dist/{chunk-5AWV5R6E.js → chunk-PUIQFTCO.js} +6 -6
- package/dist/chunk-PVR4KU7H.js +7 -0
- package/dist/{chunk-PWBLGKQ3.js → chunk-Q3MNSM7W.js} +4 -4
- package/dist/chunk-QMUAY24U.js +8 -0
- package/dist/{chunk-5XNN2SSR.js → chunk-QRJRGP2K.js} +8 -8
- package/dist/{chunk-6TRE326A.js → chunk-QSW3YHPK.js} +4 -4
- package/dist/{chunk-RISKWWMD.js → chunk-QTQQKQGQ.js} +3 -3
- package/dist/{chunk-T76X2SHR.js → chunk-R2QDO7NY.js} +3 -3
- package/dist/{chunk-JQDRM6UK.js → chunk-R5EJJ6HC.js} +1 -1
- package/dist/{chunk-V5QEPNPK.js → chunk-RBIGSJ2J.js} +1 -1
- package/dist/chunk-RBXSU25O.js +9 -0
- package/dist/{chunk-N52D37FS.js → chunk-RPMWF42S.js} +5 -5
- package/dist/{chunk-QMYQ4B5A.js → chunk-RQNZ2PVW.js} +4 -4
- package/dist/{chunk-TRUPMMDJ.js → chunk-RYS3URDC.js} +11 -11
- package/dist/{chunk-3MHBALGV.js → chunk-SGTZJMZ6.js} +1 -1
- package/dist/chunk-SKETTGCJ.js +2 -0
- package/dist/{chunk-EOWOVR55.js → chunk-SWO4VPOB.js} +1 -1
- package/dist/{chunk-R6R57BWQ.js → chunk-T5V2GJ4D.js} +4 -4
- package/dist/{chunk-T7O2TNNX.js → chunk-TXMAWCR7.js} +1 -1
- package/dist/{chunk-NCRLKFXD.js → chunk-U5DMF2TX.js} +1 -1
- package/dist/{chunk-T2ITXX7R.js → chunk-UB5TLWZN.js} +7 -7
- package/dist/{chunk-2J2OU65F.js → chunk-UFXE363L.js} +2 -2
- package/dist/chunk-UTQG344L.js +15 -0
- package/dist/{chunk-GVAWCTJN.js → chunk-UZ43AT4O.js} +7 -7
- package/dist/{chunk-H4YFANH5.js → chunk-VC42SDAC.js} +1 -1
- package/dist/{chunk-5Y6LGPZI.js → chunk-VG5NGCMQ.js} +7 -7
- package/dist/{chunk-I5XVZLDH.js → chunk-VO3ZB7C6.js} +7 -7
- package/dist/{chunk-KQSUSVMF.js → chunk-VSAI5TH7.js} +21 -21
- package/dist/{chunk-D7JY2KHG.js → chunk-W244OMOU.js} +6 -6
- package/dist/{chunk-NBKQADMY.js → chunk-WFANOFHG.js} +5 -5
- package/dist/{chunk-IZQ3XTD2.js → chunk-WUMHSI4U.js} +1 -1
- package/dist/chunk-X2PZMXDP.js +1 -0
- package/dist/{chunk-X4BKHXU5.js → chunk-X6TJR6M2.js} +7 -7
- package/dist/{chunk-R7JTTKG2.js → chunk-XILZGSMX.js} +3 -3
- package/dist/chunk-XOKANFQD.js +22 -0
- package/dist/{chunk-JWX7QRGE.js → chunk-XS4HFUTW.js} +1 -1
- package/dist/{chunk-7YZJLFAK.js → chunk-XSJJPACH.js} +10 -10
- package/dist/{chunk-XI45TSEK.js → chunk-YFUMK2E7.js} +1 -1
- package/dist/{chunk-JVYSRH6U.js → chunk-YJSX6JAC.js} +1 -1
- package/dist/{chunk-2SJDTKQA.js → chunk-YL6LLHJA.js} +21 -21
- package/dist/{chunk-N3CTLEJS.js → chunk-YVTKTWZX.js} +6 -6
- package/dist/{chunk-6FI3HVUR.js → chunk-ZBTDMQUI.js} +54 -54
- package/dist/{chunk-QLOKT22X.js → chunk-ZCV377AG.js} +1 -1
- package/dist/{chunk-UZGVIHFI.js → chunk-ZF545DXX.js} +15 -15
- package/dist/{chunk-FEPBXJUR.js → chunk-ZG2HMC7S.js} +1 -1
- package/dist/{chunk-G6LOKIFC.js → chunk-ZMVCN4OA.js} +9 -9
- package/dist/{chunk-CB6ROWOC.js → chunk-ZOBLEXIU.js} +1 -1
- package/dist/{chunk-O426Q7KC.js → chunk-ZPCADTM5.js} +1 -1
- package/dist/{chunk-5VYBPDZ2.js → chunk-ZREDCRTL.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/format/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/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.d.ts +0 -6
- 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/SplitButton.js +1 -1
- package/dist/forms/Switch.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.d.ts +8 -2
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/settingRowContext.d.ts +1 -3
- package/dist/forms/settingRowContext.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +11 -3
- package/dist/index.js +151 -151
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +7 -7
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.d.ts +22 -12
- 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/ContextMenu.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/DropdownMenu.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/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.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.d.ts +23 -5
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.d.ts +9 -14
- 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/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TopNav.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 +2 -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.d.ts +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 +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +247 -32
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-6NA35GFS.js +0 -29
- package/dist/Files-MT6PMAHO.js +0 -88
- package/dist/Sidebar-LIP2DYTO.js +0 -44
- package/dist/chunk-2AHLONPR.js +0 -5
- package/dist/chunk-3XRBVYTO.js +0 -2
- package/dist/chunk-4CPE5NBC.js +0 -8
- package/dist/chunk-4DBPKTVX.js +0 -20
- package/dist/chunk-4GPUKEYQ.js +0 -1
- package/dist/chunk-5R6RNUDB.js +0 -7
- package/dist/chunk-7BYBGPWU.js +0 -9
- package/dist/chunk-AVAYZK3Z.js +0 -3
- package/dist/chunk-GCB5S2OI.js +0 -8
- package/dist/chunk-GVH3NG6G.js +0 -22
- package/dist/chunk-J7OKOVSL.js +0 -11
- package/dist/chunk-JENEVLJU.js +0 -3
- package/dist/chunk-JGDLTIOX.js +0 -14
- package/dist/chunk-L65BESIE.js +0 -1
- package/dist/chunk-LFPJ263N.js +0 -6
- package/dist/chunk-O56CY36U.js +0 -5
- package/dist/chunk-OVDHEMLK.js +0 -6
- package/dist/chunk-PEM7UXQ3.js +0 -1
- package/dist/chunk-QYJQAY6C.js +0 -2
- package/dist/chunk-RSHNWBW2.js +0 -4
- package/dist/chunk-SC6HJBQA.js +0 -8
- package/dist/chunk-SGR4V5YI.js +0 -12
- package/dist/chunk-SYH7EPLF.js +0 -29
- package/dist/chunk-VVZE27M4.js +0 -7
- package/dist/chunk-Z3CYLDHB.js +0 -16
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{Icon as e}from"./chunk-FSPFV4MI.js";import{Tooltip as t}from"./chunk-BCDG4N6L.js";import{useShellStrings as n}from"./chunk-X2PZMXDP.js";import{useId as i}from"react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var l=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),s=e=>l.split(", ").map(t=>`${e} ${t}`).join(", ");function o({label:o,onReset:d,changed:c=!0,view:u="desktop",detail:b,name:p,tip:m,defaultAction:h,disabled:f,className:k}){const j=n().settingView,y=i(),N=["es-default-reset"];if(c&&N.push("is-changed"),k&&N.push(k),!c&&h)return N.push("is-pressable"),/* @__PURE__ */a(t,{content:h.title,children:/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":h.title,disabled:f,onClick:h.onPress,children:h.icon})});if(!c)/* @__PURE__ */return a("span",{className:N.join(" "),"aria-hidden":"true"});const x="desktop"===u,g=p??(x?j.resetName(o):j.inheritName(o)),P=b?j.backTo(b):x?j.backToDefault:j.backToAuto,S=m??(b?j.tip(g,P):g);
|
|
2
|
+
/* @__PURE__ */
|
|
3
|
+
return r(t,{content:S,describe:!1,children:[
|
|
4
|
+
/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":g,"aria-describedby":y,disabled:f,onClick:e=>{d(),function(e){const t=e.currentTarget,n=t.closest(".es-field");let i=n?.querySelector(s(".es-field-ctl"))??n?.querySelector(s(".es-field-head"))??null,a=n?null:t.parentElement;for(let e=0;!i&&a&&e<4;e+=1,a=a.parentElement)i=[...a.querySelectorAll(l)].find(e=>e!==t&&!e.closest('[aria-hidden="true"]'))??null;i?.focus()}(e)},children:/* @__PURE__ */a(e,{name:"revert",size:15,"aria-hidden":"true"})}),
|
|
5
|
+
/* @__PURE__ */a("span",{id:y,hidden:!0,children:P})]})}export{o as SettingReset};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-TLRCTNUF.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-
|
|
1
|
+
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-TLRCTNUF.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-X2PZMXDP.js";import{formatPercent as m,formatPlain as u}from"./chunk-C3QOHMR6.js";import{useId as d,useState as f,useRef as y}from"react";import{jsx as p,jsxs as g}from"react/jsx-runtime";function x({segments:x,variant:v="pie",size:k=280,innerRadius:M,padAngle:b=.012,maxSegments:N=6,otherLabel:$,formatValue:j,centerLabel:I,animate:P=!0,labels:F="none",labelMinShare:w=.04,className:C,emptyLabel:S}){const A=h().charts,R=c(),T=j??(e=>u(e,R)),W=$??A.other,z=S??A.nothingToBreakDown,E=d(),[L,U]=f(null),{highlighted:_}=a(),V=y(null),Y=o(V,Number.POSITIVE_INFINITY),B=x.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===B.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${C??""}`,children:z});const O=[...B].sort((e,t)=>t.value-e.value),X=O.slice(0,N),Z=O.slice(N),D=Z.length>0?[...X,{key:"__other__",label:W,value:Z.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:X,H=e=>i(e.slot,e.color,e.tone),Q=D.reduce((e,t)=>e+t.value,0),q=Math.ceil(.62*Math.max(...D.map(e=>String(e.label).length),4)*11)+24,J="outside"===F&&Y>=120+2*q,G=J?q:0,K=J?Math.max(120,Math.min(k,Y-2*G)):k,ee=K+2*G,te=G+K/2,le=K/2,ae=K/2-12,re=M??("ring"===v?.58*ae:0),ne=n(D.length,b),oe=Math.max(...D.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!J)return[];let e=-Math.PI/2;const t=D.map((t,l)=>{const a="rose"===v?n(D.length,b).step:t.value/Q*Math.PI*2,r="rose"===v?n(D.length,b).center(l):e+a/2;e+=a;const o="rose"===v?se(t.value):ae;return{key:t.key,label:t.label,share:t.value/Q,right:Math.cos(r)>=0,anchor:[te+o*Math.cos(r),le+o*Math.sin(r)],y:le+(o+14)*Math.sin(r),index:l}}).filter(e=>e.share>=w),l=Math.max(1,Math.floor((K-11-13)/26)+1),a=/* @__PURE__ */new Set;for(const e of[!0,!1]){const r=t.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,l).sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e+=1)r[e].y-r[e-1].y<26&&(r[e].y=r[e-1].y+26);for(let e=r.length-1;e>=0;e-=1){const t=e===r.length-1?K-13:r[e+1].y-26;r[e].y=Math.min(r[e].y,t)}r.forEach((e,t)=>{e.y=Math.max(e.y,0===t?11:r[t-1].y+26),a.add(e.key)})}return t.filter(e=>a.has(e.key))})(),ce=(e,t)=>null!==L?L!==e:null!==_&&_!==t,me=null!==L?D[L]:void 0;/* @__PURE__ */
|
|
2
2
|
return g("div",{className:`relative ${C??""}`,ref:V,children:[
|
|
3
|
-
/* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":
|
|
4
|
-
/* @__PURE__ */p("title",{id:
|
|
5
|
-
return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:
|
|
3
|
+
/* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":E,onMouseLeave:()=>U(null),children:[
|
|
4
|
+
/* @__PURE__ */p("title",{id:E,children:A.breakdown(T(Q),D.length)}),D.map((a,r)=>{const n=H(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/Q*Math.PI*2-b;"rose"!==v&&(ie+=a.value/Q*Math.PI*2);const h=o+Math.max(.001,i),c="rose"===v?se(a.value):ae;/* @__PURE__ */
|
|
5
|
+
return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:P?t.sweep:void 0,style:P?l(r,55):void 0,onMouseEnter:()=>U(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
|
|
6
6
|
return g("g",{children:[
|
|
7
7
|
/* @__PURE__ */p("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${l},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:s.grid,strokeWidth:1}),
|
|
8
8
|
/* @__PURE__ */p("text",{x:t,y:e.y-2,fontSize:11,fill:s.label,textAnchor:e.right?"end":"start",children:e.label}),
|
|
9
|
-
/* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,R)})]},`lbl-${e.key}`)}),I&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:I})]}),me&&null!==
|
|
10
|
-
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:
|
|
11
|
-
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:
|
|
9
|
+
/* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,R)})]},`lbl-${e.key}`)}),I&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:I})]}),me&&null!==L&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:me.label,rows:[{key:"value",label:A.value,color:H(me),value:T(me.value)},{key:"share",label:A.share,color:s.muted,value:m(me.value/Q*100,1,R)}]})}),
|
|
10
|
+
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:D.map((e,t)=>/* @__PURE__ */g("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
11
|
+
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:H(e)}}),
|
|
12
12
|
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
13
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/
|
|
13
|
+
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/Q*100,1,R)})]},e.key))})]})}export{x as PieChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as i}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as i}from"./chunk-X2PZMXDP.js";import{Fragment as t}from"react";import{jsx as n,jsxs as a}from"react/jsx-runtime";var s=/* @__PURE__ */n(e,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 text-gray-300","aria-hidden":!0}),r="inline-flex min-w-0 items-center gap-1 truncate rounded px-1 -mx-1 text-gray-500 transition-colors hover:text-gray-900 hover:underline rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]";function l({items:e,separator:l,maxItems:c=0,className:m}){const o=i().breadcrumbs;if(0===e.length)return null;const h=l??s,d=[],u=e.length-1;if(c>0&&e.length>c&&c>=2){const i=Math.max(1,c-1);d.push({kind:"item",item:e[0],isLast:!1}),d.push({kind:"ellipsis"});for(let t=e.length-i;t<=u;t++)d.push({kind:"item",item:e[t],isLast:t===u})}else e.forEach((e,i)=>d.push({kind:"item",item:e,isLast:i===u}));/* @__PURE__ */
|
|
2
2
|
return n("nav",{"aria-label":o.label,className:`min-w-0 ${m??""}`,children:/* @__PURE__ */n("ol",{className:"flex items-center gap-2 text-sm",children:d.map((e,i)=>/* @__PURE__ */a(t,{children:[i>0&&/* @__PURE__ */n("li",{"aria-hidden":!0,className:"flex items-center",children:h}),
|
|
3
3
|
/* @__PURE__ */n("li",{className:"flex min-w-0 items-center",children:"ellipsis"===e.kind?/* @__PURE__ */n("span",{className:"px-0.5 text-gray-400 select-none","aria-label":o.hidden,children:"…"}):e.isLast||!e.item.href&&!e.item.onClick?/* @__PURE__ */a("span",{"aria-current":e.isLast?"page":void 0,className:"inline-flex min-w-0 items-center gap-1 truncate "+(e.isLast?"font-medium text-gray-900":"text-gray-500"),children:[e.item.icon,
|
|
4
4
|
/* @__PURE__ */n("span",{className:"truncate",children:e.item.label})]}):e.item.href?/* @__PURE__ */a("a",{href:e.item.href,onClick:e.item.onClick,className:r,children:[e.item.icon,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as r,useShellLocale as e}from"./chunk-
|
|
1
|
+
import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as r,useShellLocale as e}from"./chunk-X2PZMXDP.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as i,jsxs as o}from"react/jsx-runtime";var a=["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md px-1","text-2xs font-medium normal-case leading-none tabular-nums tracking-normal","ring-1 ring-inset ring-[color:color-mix(in_srgb,currentColor_20%,transparent)]"].join(" ");function s({count:s,label:c,active:l=!1,showZero:m=!1,className:u=""}){const d=r().count,h=e();if(!(s>0||0===s&&m))return null;const f=c??d.items(s);/* @__PURE__ */
|
|
2
2
|
return i(n,{content:f,describe:!1,className:`relative inline-flex shrink-0 ${u}`.trim(),children:/* @__PURE__ */o("span",{"data-item-count":"",className:`${a} ${l?"bg-blue-100 text-blue-700":"bg-[color:color-mix(in_srgb,var(--ink-faint)_14%,transparent)] text-gray-600"}`,children:[
|
|
3
3
|
/* @__PURE__ */i("span",{"aria-hidden":"true",children:t(s,h)}),
|
|
4
4
|
/* @__PURE__ */i("span",{className:"sr-only",children:f})]})})}export{s as ItemCount};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{formatMoney as e}from"./chunk-X2S2XDZI.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-
|
|
1
|
+
import{formatMoney as e}from"./chunk-X2S2XDZI.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-XOKANFQD.js";import{ChartFrame as a}from"./chunk-IWEL2ZCV.js";import{ColumnChart as l}from"./chunk-WFANOFHG.js";import{TH_ONE_LINE as s}from"./chunk-OZAAIE4E.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
|
|
2
2
|
/* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
|
|
3
3
|
/* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
|
|
4
4
|
/* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-
|
|
2
|
-
return o(e,{label:g,htmlFor:
|
|
3
|
-
/* @__PURE__ */o("button",{ref
|
|
1
|
+
import{FormField as e}from"./chunk-6KBDNYRW.js";import{dropzoneClass as t,zoneFocusClass as a,CloseGlyph as r}from"./chunk-7BDZZANS.js";import{useFileIntake as n,humanSize as i,FileIntakeAlert as s}from"./chunk-P6LB3I3D.js";import{useShellStrings as l}from"./chunk-X2PZMXDP.js";import{forwardRef as c,useId as m}from"react";import{jsxs as o,jsx as d}from"react/jsx-runtime";var p=c(function({files:c,onChange:p,accept:u,acceptHint:h,multiple:x=!0,maxSizeBytes:b,maxFiles:f,disabled:y=!1,label:g,hint:N,error:j,required:k,className:v=""},B){const P=m(),$=l().files,z=n({accept:u,acceptHint:h,maxSizeBytes:b,maxFiles:f,multiple:x,disabled:y,currentCount:c.length,onAccept:e=>p(x?[...c,...e]:e.slice(0,1))}),C=j?`${P}-error`:N?`${P}-hint`:void 0;/* @__PURE__ */
|
|
2
|
+
return o(e,{label:g,htmlFor:P,hint:N,error:j,required:k,className:v,children:[
|
|
3
|
+
/* @__PURE__ */o("button",{ref:B,type:"button",id:P,disabled:y,onClick:z.open,"aria-invalid":!!j||void 0,"aria-required":k||void 0,"aria-describedby":C,...z.zoneProps,className:t(z.dragOver,y,a(y),"px-4 py-6"),children:[
|
|
4
4
|
/* @__PURE__ */o("span",{children:[
|
|
5
|
-
/* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x
|
|
6
|
-
/* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x
|
|
7
|
-
/* @__PURE__ */d("input",{...
|
|
5
|
+
/* @__PURE__ */d("span",{className:"text-sm font-medium text-blue-600",children:x?$.chooseMany:$.chooseOne}),
|
|
6
|
+
/* @__PURE__ */d("span",{className:"text-sm text-gray-500",children:` ${x?$.dragMany:$.dragOne}`})]}),h&&/* @__PURE__ */d("span",{className:"text-xs text-gray-400",children:h})]}),
|
|
7
|
+
/* @__PURE__ */d("input",{...z.inputProps}),c.length>0&&/* @__PURE__ */d("ul",{className:"mt-2 flex flex-col gap-1",children:c.map((e,t)=>/* @__PURE__ */o("li",{className:"flex items-center justify-between gap-3 rounded-md bg-gray-50 px-3 py-2",children:[
|
|
8
8
|
/* @__PURE__ */d("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-800",title:e.name,children:e.name}),
|
|
9
|
-
/* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size
|
|
10
|
-
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{
|
|
11
|
-
/* @__PURE__ */d(s,{rejections:
|
|
9
|
+
/* @__PURE__ */d("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i(e.size,$)}),
|
|
10
|
+
/* @__PURE__ */d("button",{type:"button",disabled:y,onClick:()=>{z.clearRejections(),p(c.filter((e,a)=>a!==t))},"aria-label":$.remove(e.name),className:"shrink-0 text-gray-400 hover:text-gray-600",children:/* @__PURE__ */d(r,{})})]},`${e.name}-${t}`))}),
|
|
11
|
+
/* @__PURE__ */d(s,{rejections:z.rejections})]})});export{p as FilePicker_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-CBGKLHPB.js";import{Select_default as l}from"./chunk-7YU27U3Y.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-66JYKX4T.js";import{Input_default as c}from"./chunk-MAMWQCJ6.js";import{Button_default as s}from"./chunk-NHH2MXFU.js";import{useState as d}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=d(!0),[p,u]=d("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
|
|
3
3
|
/* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
|
|
4
4
|
/* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Banner as e}from"./chunk-
|
|
1
|
+
import{Banner as e}from"./chunk-66JYKX4T.js";import{Button_default as t}from"./chunk-NHH2MXFU.js";import{useShellStrings as n}from"./chunk-X2PZMXDP.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};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{useShellStrings as e,useShellLocale as a}from"./chunk-X2PZMXDP.js";import{formatPlain as n}from"./chunk-C3QOHMR6.js";import{useState as i,useId as d}from"react";import{jsx as r,jsxs as c,Fragment as s}from"react/jsx-runtime";var o={band:"es-group-head",row:"es-group-sub"},l=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join("");function t({items:t,defaultOpenIds:u=[],openIds:p,onOpenChange:m,allowMultiple:h=!1,level:N=3,tier:g="band",keepMounted:b=!1,className:$=""}){const v=e(),f=a(),[x,y]=i(u),I=d(),j=`h${N}`,k=p??x;/* @__PURE__ */
|
|
2
|
+
return r("div",{"data-accordion":g,className:$||void 0,children:t.map(e=>{const a=k.includes(e.id),i=e.headId??`${I}-${l(e.id)}-head`,d=e.headId?`${e.headId}-body`:`${I}-${l(e.id)}-panel`,t=a||b;/* @__PURE__ */
|
|
3
|
+
return c("div",{className:e.className?`es-group ${e.className}`:"es-group",children:[
|
|
4
|
+
/* @__PURE__ */r(j,{className:"es-group-title",children:/* @__PURE__ */c("button",{type:"button",id:i,disabled:e.disabled,"aria-expanded":a,"aria-controls":t?d:void 0,onClick:()=>(e=>{const a=k.includes(e)?k.filter(a=>a!==e):h?[...k,e]:[e];void 0===p&&y(a),m?.(a)})(e.id),className:o[g],children:[null!=e.icon&&/* @__PURE__ */r("span",{"aria-hidden":"true",className:"es-group-icon",children:e.icon}),e.title,"number"==typeof e.count&&e.count>0&&
|
|
5
|
+
/* @__PURE__ */c(s,{children:[
|
|
6
|
+
/* @__PURE__ */r("span",{"aria-hidden":"true",className:"es-group-count",children:n(e.count,f)}),
|
|
7
|
+
/* @__PURE__ */r("span",{className:"sr-only",children:v.accordion.changed(n(e.count,f))})]}),
|
|
8
|
+
/* @__PURE__ */r("span",{className:"es-group-sign","aria-hidden":"true"})]})}),t&&/* @__PURE__ */r("div",{id:d,role:"region","aria-labelledby":i,className:"es-group-body",hidden:!a,children:e.content})]},e.id)})})}function u({title:e,icon:a,tier:n="band",level:i=3,id:d,className:s=""}){/* @__PURE__ */
|
|
9
|
+
return c(`h${i}`,{id:d,className:s?`${o[n]} ${s}`:o[n],children:[null!=a&&/* @__PURE__ */r("span",{"aria-hidden":"true",className:"es-group-icon",children:a}),e]})}function p({children:e,className:a=""}){/* @__PURE__ */
|
|
10
|
+
return r("div",{className:`@container/acc ${a}`.trim(),children:/* @__PURE__ */r("div",{"data-accordion-body":"",className:"px-4 @max-[260px]/acc:px-3",children:e})})}export{t as Accordion,p as AccordionBody,u as AccordionHeading,l as accordionIdOf};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{inputClasses as t}from"./chunk-AYZY3YNC.js";import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{inputClasses as t}from"./chunk-AYZY3YNC.js";import{useShellLocale as e}from"./chunk-X2PZMXDP.js";import{forwardRef as n}from"react";import{jsx as a}from"react/jsx-runtime";var r=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?$/,i=t=>String(t).padStart(2,"0");function l(t){return null==t||""===t?"":t instanceof Date?Number.isNaN(t.getTime())?"":`${(e=t).getFullYear()}-${i(e.getMonth()+1)}-${i(e.getDate())}T${i(e.getHours())}:${i(e.getMinutes())}`:r.test(t)?t:"";var e}var o=n(function({value:n,onChange:i,min:o,max:u,invalid:m,size:s,className:c="",...d},g){const p=e();/* @__PURE__ */
|
|
2
2
|
return a("input",{ref:g,type:"datetime-local",lang:p,"aria-invalid":m||void 0,value:l(n),min:l(o)||void 0,max:l(u)||void 0,onChange:t=>i?.(function(t){if(!r.test(t))return null;const[e,n]=t.split("T"),[a,i,l]=e.split("-").map(Number),[o,u,m=0]=n.split(":").map(Number);if(o>23||u>59||m>59)return null;const s=new Date(a,i-1,l,o,u,m);return s.getMonth()===i-1&&s.getDate()===l?s:null}(t.target.value)),className:t({invalid:m,size:s,className:c}),...d})});export{o as DateTimePicker_default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-TLRCTNUF.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{registerModalEscapeInterceptor as a}from"./chunk-TWVUQUUD.js";import{CHART_INK as s,resolveSeriesColorWithin as c}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-X2PZMXDP.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:U=[4,22],className:D,emptyLabel:L}){const P=m().charts,S=h(),C=z??(e=>f(e,S)),T=N??(e=>f(e,S)),W=L??P.noObservations,X=u(null),E=n(X),F=v??E,O=p(),[V,Z]=d(null);x(()=>{if(null!==V)return a(e=>"Escape"===e.key&&(Z(null),!0))},[V]);const B=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),I=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),Q=$||j?I.map(e=>({...e,points:e.points.filter(e=>B(e.x,$)&&B(e.y,j))})).filter(e=>e.points.length>0):I,H=I.reduce((e,t)=>e+t.points.length,0)-Q.reduce((e,t)=>e+t.points.length,0);if(0===Q.length)/* @__PURE__ */
|
|
2
|
+
return y("div",{className:D,ref:X,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:W})});const J=Q.flatMap(e=>e.points),K=J.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(J.map(e=>e.y),j,R,{from:k-G,to:Y}),ie=t(te.ticks(5).map(T),_),le=Math.max(ie+1,F-q),re=ee(J.map(e=>e.x),$,w,{from:ie,to:le}),oe=i([0,Math.max(...J.map(e=>e.size??1))],{from:U[0],to:U[1]}),ne=V?Q[V.s]:void 0,ae=V&&ne?ne.points[V.i]:void 0,se=Q.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
+
return g("div",{className:`relative ${D??""}`,ref:X,children:[
|
|
4
|
+
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${F} ${k}`,role:"img","aria-label":P.scatter(Q.map(e=>e.label),A??P.yAxis,M??P.xAxis)+(H>0?`. ${P.outsideRange(H)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Z(null),onBlur:()=>Z(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=V?se.findIndex(e=>e.s===V.s&&e.i===V.i):0;Z(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
+
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:O,children:/* @__PURE__ */y("rect",{x:ie-U[1],y:Y-U[1],width:le-ie+2*U[1],height:k-G-Y+2*U[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:s.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
+
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:s.label,style:{fontVariantNumeric:"tabular-nums"},children:T(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:s.label,style:{fontVariantNumeric:"tabular-nums"},children:C(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:s.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:s.label,children:A}),
|
|
8
|
+
/* @__PURE__ */y("g",{clipPath:`url(#${O})`,children:Q.map((e,t)=>{const i=c(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):U[0]+1,fill:i,fillOpacity:V&&V.s!==t?.25:.62,stroke:s.surface,strokeWidth:2,onMouseEnter:()=>Z({s:t,i:r})},`${e.key}-${r}`))})})]}),V&&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??P.xAxis,color:c(ne.slot,3,ne.color,ne.tone),value:C(ae.x)},{key:"y",label:A??P.yAxis,color:c(ne.slot,3,ne.color,ne.tone),value:T(ae.y)},...null!=ae.size?[{key:"size",label:P.size,color:s.muted,value:f(ae.size,S)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useWindowMenuItem as e,Modal as t}from"./chunk-
|
|
1
|
+
import{useWindowMenuItem as e,Modal as t}from"./chunk-ZBTDMQUI.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-IEAFSVXC.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as i,splitAround as a}from"./chunk-X2PZMXDP.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var f=o.aboutApp,u={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:f.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:f.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:f.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:f.preview},files:{name:"Files",version:"1.1.4",route:"/files",description:f.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:f.browser}},x=/* @__PURE__ */p(n,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(n,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:n}){const o=u[n],[f,w]=m(!1),N=c(()=>w(!0),[]),b=i().aboutApp,k=b.title(o.name);if(e(k,N,x),!f)return null;const g=r[o.route],y=l(g)?d(g,{className:"h-9 w-9"}):v,[j,A]=a(b.partOf);/* @__PURE__ */
|
|
2
2
|
return p(t,{open:!0,onClose:()=>w(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
|
|
3
3
|
/* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:y}),
|
|
4
4
|
/* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:o.name}),
|
|
@@ -6,4 +6,4 @@ return p(t,{open:!0,onClose:()=>w(!1),title:k,size:"sm",compact:!0,bodyScroll:!1
|
|
|
6
6
|
/* @__PURE__ */p("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:b[n]}),
|
|
7
7
|
/* @__PURE__ */h("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
|
|
8
8
|
/* @__PURE__ */h("p",{className:"text-2xs text-ink-faint",children:[j,
|
|
9
|
-
/* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),
|
|
9
|
+
/* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),A]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(s)})]})]})})}export{w as AboutApp,u as BUILTIN_APP_INFO};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r="10.0.0",a=r;export{a as APP_VERSION,r as VERSION};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-TLRCTNUF.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-
|
|
1
|
+
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-TLRCTNUF.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-X2PZMXDP.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useId as h,useState as u}from"react";import{jsx as p,jsxs as d}from"react/jsx-runtime";var f=300*Math.PI/180;function g({rows:g,variant:k="track",size:v=300,max:x,formatValue:y,animate:M=!0,className:N,emptyLabel:b,trackGap:j=6}){const C=s().charts,w=c(),P=y??(e=>m(e,w)),R=b??C.nothingToPlot,T=h(),[E,U]=u(null),{highlighted:$}=l();if(0===g.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${N??""}`,children:R});const F=v/2,L=v/2,Y=v/2-10,z=x??Math.max(...g.map(e=>e.value),1),A="track"===k?Math.max(6,(Y-.16*v)/g.length):0,B=Math.max(1,Math.floor((Y-.16*v)/A||1)),H="track"===k?g.slice(0,B):g,I=Math.min(j,Math.max(1,A-2)),Q=n(H.length,.03),V=null!==E?H[E]:void 0;/* @__PURE__ */
|
|
2
2
|
return d("div",{className:`relative ${N??""}`,children:[
|
|
3
|
-
/* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":
|
|
4
|
-
/* @__PURE__ */p("title",{id:
|
|
3
|
+
/* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":T,onMouseLeave:()=>U(null),children:[
|
|
4
|
+
/* @__PURE__ */p("title",{id:T,children:"track"===k?C.radialTrack(H.length):C.radialCycle(H.length)}),H.map((l,r)=>{const n=o(r,l.color,l.tone),s=Math.max(0,Math.min(1,l.value/z)),c=((e,t)=>null!==E?E!==e:null!==$&&$!==t)(r,l.key);if("track"===k){const o=Y-r*A,m=o-A+I,h=-Math.PI/2;/* @__PURE__ */
|
|
5
5
|
return d("g",{opacity:c?.4:1,onMouseEnter:()=>U(r),className:M?t.sweep:void 0,style:M?a(r,70):void 0,children:[
|
|
6
6
|
/* @__PURE__ */p("path",{d:e(F,L,m,o,h,h+f),fill:i.grid}),
|
|
7
7
|
/* @__PURE__ */p("path",{d:e(F,L,m,o,h,h+f*s),fill:n})]},l.key)}const m=.14*v;/* @__PURE__ */
|
|
8
|
-
return p("g",{opacity:c?.4:1,onMouseEnter:()=>U(r),children:/* @__PURE__ */p("path",{d:e(F,L,m,m+(
|
|
8
|
+
return p("g",{opacity:c?.4:1,onMouseEnter:()=>U(r),children:/* @__PURE__ */p("path",{d:e(F,L,m,m+(Y-m)*s,Q(r),Q(r)+Q.step),fill:n})},l.key)})]}),V&&null!==E&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:V.label,rows:[{key:"value",label:C.value,color:o(E,V.color,V.tone),value:P(V.value)}]})}),
|
|
9
9
|
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(150px,1fr))"},children:g.map((e,t)=>/* @__PURE__ */d("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
10
10
|
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:o(t,e.color,e.tone)}}),
|
|
11
11
|
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
12
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:
|
|
12
|
+
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:P(e.value)})]},e.key))})]})}export{g as RadialBarChart};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{renderMenuEntries as e,menuStatusIds as t}from"./chunk-
|
|
2
|
-
return p(n,{portal:!0,minWidth:x,style:
|
|
1
|
+
import{renderMenuEntries as e,menuStatusIds as t}from"./chunk-XS4HFUTW.js";import{PopupMenu as n,MenuSemanticsContext as r}from"./chunk-FPGRKHUW.js";import{leavesContextMenuAlone as o}from"./chunk-5QFPTDQF.js";import{placeAtPoint as i,popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useRef as s,useId as a,useState as d,useEffect as m,useCallback as f}from"react";import{jsx as p,jsxs as v}from"react/jsx-runtime";function h(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(e=>!e.closest("[data-popup-submenu-panel]")):[]}function w({at:o,onClose:w,items:y,linkAs:g,children:k,owner:E,"aria-label":b,minWidth:x=180,className:H="",autoFocus:D=!0}){const L=s(null),S=a(),[U,j]=d(null),A=s(w);A.current=w,c(()=>{const e=L.current?.closest("[data-popup-menu-tree]");if(!e)return;const t={width:e.offsetWidth,height:e.offsetHeight},n=i({point:o,menu:t,bounds:l(E??null)});j(e=>e&&e.left===n.left&&e.top===n.top&&e.maxHeight===n.maxHeight?e:{left:n.left,top:n.top,maxHeight:n.maxHeight,scroll:t.height>n.maxHeight})},[o.x,o.y,E]);const W=s(null),C=s(!1);m(()=>(W.current=document.activeElement,()=>{const e=document.activeElement;e&&e!==document.body&&!L.current?.contains(e)||W.current?.focus?.({preventScroll:!0})}),[]),m(()=>{U&&!C.current&&D&&(C.current=!0,h(L.current)[0]?.focus({preventScroll:!0}))},[U,D]),m(()=>{if(D)return;const e=e=>{if(L.current?.contains(document.activeElement))return;const t=h(L.current),n="ArrowDown"===e.key||"Home"===e.key?t[0]:"ArrowUp"===e.key||"End"===e.key?t[t.length-1]:void 0;n&&(e.preventDefault(),n.focus({preventScroll:!0}))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[D]),m(()=>u(e=>"Escape"===e.key&&(A.current(),!0),()=>L.current),[]),m(()=>{const e=()=>A.current();return window.addEventListener("resize",e),window.addEventListener("blur",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("blur",e),window.removeEventListener("scroll",e,!0)}},[]);const F=f(e=>{if(e.target.closest("[data-popup-submenu-panel]"))return;if("Tab"===e.key)return e.preventDefault(),void A.current();const t=h(L.current);if(0===t.length)return;const n=t.indexOf(document.activeElement),r="ArrowDown"===e.key?(n+1)%t.length:"ArrowUp"===e.key?n<=0?t.length-1:n-1:"Home"===e.key?0:"End"===e.key?t.length-1:-1;r<0||(e.preventDefault(),t[r].focus())},[]),T=U?{left:U.left,top:U.top,maxHeight:U.maxHeight,...U.scroll?{overflowY:"auto"}:{}}:{left:o.x,top:o.y,visibility:"hidden"};/* @__PURE__ */
|
|
2
|
+
return p(n,{portal:!0,minWidth:x,style:T,onClose:w,className:H,children:/* @__PURE__ */p(r.Provider,{value:!0,children:/* @__PURE__ */v("div",{ref:L,id:S,role:"menu","aria-label":b,"aria-describedby":y?t(y,S):void 0,"data-context-menu":"",onKeyDown:F,children:[y&&e(y,{menuId:S,choose:e=>{e.disabled||(A.current(),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>A.current(),linkAs:g}),k]})})})}function y(){const[e,t]=d(null),n=f(()=>t(null),[]),r=f((e,n)=>{const r="nativeEvent"in e?e.nativeEvent:e;if(o(r))return!1;e.preventDefault();const i=e.target instanceof Element?e.target:null;let{clientX:l,clientY:c}=e;if(0===l&&0===c&&i){const e=i.getBoundingClientRect();l=e.left,c=e.bottom}return t({x:l,y:c,data:n,owner:i}),!0},[]),i=f(e=>{r(e,void 0)},[r]);return{open:r,onContextMenu:i,close:n,state:e,props:{at:{x:e?.x??0,y:e?.y??0},owner:e?.owner??null,onClose:n}}}export{w as ContextMenu,y as useContextMenu};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{MediaUploadField as e}from"./chunk-
|
|
2
|
-
return n("section",{"aria-label":
|
|
1
|
+
import{MediaUploadField as e}from"./chunk-RBXSU25O.js";import{BrandMark as r}from"./chunk-MI67DI3H.js";import{Button_default as a}from"./chunk-NHH2MXFU.js";import{useShellStrings as t}from"./chunk-X2PZMXDP.js";import{useRef as i,useState as l,useEffect as s}from"react";import{jsxs as n,jsx as c}from"react/jsx-runtime";function d({committedUrl:d,committedHasAlpha:o=null,committedIsLight:m=null,fallbackUrl:g,fallbackHasAlpha:h=null,fallbackIsLight:u=null,subjectName:b,assetName:p,onSave:x,onRemove:f,accept:v="image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",acceptHint:y="PNG · ICO · SVG · JPG · WEBP",maxBytes:N=5242880,previews:w=[],disabled:k=!1}){const j=i(null),[L,U]=l(null),[R,H]=l(""),[C,F]=l(""),[I,O]=l(!1),[P,A]=l(!1),B=function(e){return e.trim().toLocaleLowerCase().split(/\s+/).at(-1)||"image"}(p),S=t().brandAsset,X=R||d||g||"",E=L?null:d?o:h,G=L?null:d?m:u;s(()=>()=>{j.current&&URL.revokeObjectURL(j.current)},[]);const M=()=>{j.current&&(URL.revokeObjectURL(j.current),j.current=null)};/* @__PURE__ */
|
|
2
|
+
return n("section",{"aria-label":S.region(p,b),className:"grid gap-4 lg:grid-cols-2",children:[
|
|
3
3
|
/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[
|
|
4
|
-
/* @__PURE__ */c(e,{value:
|
|
4
|
+
/* @__PURE__ */c(e,{value:X,onChange:()=>{},onFile:e=>{if(k)return;M();const r=URL.createObjectURL(e);j.current=r,U(e),H(r),F("")},label:p,hint:C||S.usedFor(b),error:C||void 0,accept:v,acceptHint:y,maxSizeBytes:N,fit:"contain",height:180,allowRemove:!1,busy:I||P,disabled:k}),
|
|
5
5
|
/* @__PURE__ */n("div",{className:"mt-3 flex flex-wrap gap-2",children:[
|
|
6
|
-
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!
|
|
7
|
-
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:
|
|
8
|
-
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:
|
|
6
|
+
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!I){O(!0),F("");try{await x(L),M(),U(null),H("")}catch(e){F(e instanceof Error?e.message:S.saveFailed(B,p))}finally{O(!1)}}},disabled:!L||k,loading:I,children:S.save(B,p)}),(L||d)&&/* @__PURE__ */c(a,{variant:"ghost-danger",onClick:async()=>{if(!k&&!P){if(L)return M(),U(null),H(""),void F("");if(d){A(!0),F("");try{await f()}catch(e){F(e instanceof Error?e.message:S.removeFailed(B,p))}finally{A(!1)}}}},disabled:k,loading:P,children:L?S.discard:S.remove(B,p)})]})]}),w.length>0&&/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4","aria-label":S.previews(p),children:[
|
|
7
|
+
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:S.preview}),
|
|
8
|
+
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:X,alt:S.alt(b,p),slot:e.slot,surface:e.surface,adaptive:!0,hasAlpha:E,isLight:G,size:"browser-tab"===e.kind?16:void 0});/* @__PURE__ */
|
|
9
9
|
return n("div",{"data-brand-preview":!0,className:"dark"===e.surface?"text-white":"text-gray-900",children:[
|
|
10
10
|
/* @__PURE__ */c("div",{className:"mb-2 text-xs font-medium text-gray-500",children:e.label}),"browser-tab"===e.kind?/* @__PURE__ */n("div",{className:"flex items-end gap-1 border-b border-gray-200",children:[
|
|
11
11
|
/* @__PURE__ */n("div",{className:"flex max-w-[220px] items-center gap-2 rounded-t-lg border border-b-0 border-gray-200 bg-white px-3 py-2",children:[a,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ChartSkeleton as e}from"./chunk-
|
|
1
|
+
import{ChartSkeleton as e}from"./chunk-BMQCUHSD.js";import{ChartHighlightProvider as r,useHighlight as a}from"./chunk-CNYAHYE6.js";import{CHART_INK as t,resolveSeriesColor as s}from"./chunk-TZFACUMR.js";import{useShellStrings as l}from"./chunk-X2PZMXDP.js";import{jsx as n,jsxs as o,Fragment as c}from"react/jsx-runtime";function i({shape:e,colour:r}){const a="shrink-0";switch(e){case"circle":/* @__PURE__ */
|
|
2
2
|
return n("span",{className:`${a} h-2.5 w-2.5 rounded-full`,style:{backgroundColor:r}});case"circle-outline":/* @__PURE__ */
|
|
3
3
|
return n("span",{className:`${a} h-2.5 w-2.5 rounded-full border-2`,style:{borderColor:r}});case"rounded-square-outline":/* @__PURE__ */
|
|
4
4
|
return n("span",{className:`${a} h-2.5 w-2.5 rounded-sm border-2`,style:{borderColor:r}});case"square":/* @__PURE__ */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellStrings as t,useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as t,useShellLocale as e}from"./chunk-X2PZMXDP.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var o="inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40";function l({page:l,pageCount:i,onPageChange:s,siblingCount:c=1,showEdges:b=!1,className:u=""}){const d=t().pagination,g=e();if(i<=1)return null;const m=function(t,e,a){const n=/* @__PURE__ */new Set([1,e]);for(let r=t-a;r<=t+a;r++)r>=1&&r<=e&&n.add(r);const r=[...n].sort((t,e)=>t-e),o=[];let l=0;for(const t of r)l&&t-l>1&&o.push("…"),o.push(t),l=t;return o}(l,i,c),p=t=>{t>=1&&t<=i&&t!==l&&s(t)};/* @__PURE__ */
|
|
2
2
|
return n("nav",{"aria-label":d.label,className:`flex items-center gap-1 ${u}`.trim(),children:[b&&/* @__PURE__ */r("button",{type:"button","aria-label":d.first,disabled:1===l,onClick:()=>p(1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"«"}),
|
|
3
3
|
/* @__PURE__ */r("button",{type:"button","aria-label":d.previous,disabled:1===l,onClick:()=>p(l-1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"‹"}),m.map((t,e)=>"…"===t?/* @__PURE__ */r("span",{className:"px-1 text-gray-400",children:"…"},`gap-${e}`):/* @__PURE__ */r("button",{type:"button","aria-current":t===l?"page":void 0,onClick:()=>p(t),className:`${o} ${t===l?"bg-blue-600 font-medium text-white":"text-gray-700 hover:bg-gray-100"}`,children:a(t,g)},t)),
|
|
4
4
|
/* @__PURE__ */r("button",{type:"button","aria-label":d.next,disabled:l===i,onClick:()=>p(l+1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"›"}),b&&/* @__PURE__ */r("button",{type:"button","aria-label":d.last,disabled:l===i,onClick:()=>p(i),className:`${o} text-gray-600 hover:bg-gray-100`,children:"»"})]})}export{l as Pagination};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-
|
|
2
|
-
return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:$,className:M=""}){const j=r().meter,B=s(),
|
|
3
|
-
/* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${
|
|
1
|
+
import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-X2PZMXDP.js";import{formatPercent as u,formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsxs as c,jsx as o}from"react/jsx-runtime";function d({at:a,title:e,className:t}){/* @__PURE__ */
|
|
2
|
+
return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:$,className:M=""}){const j=r().meter,B=s(),P=w??j.noData,A=null!=p&&Number.isFinite(p)?p:null,D=Number.isFinite(f)&&f>0?f:null;null==D&&a(`MetricBar:max:${String(f)}`,`[efficient-shell] MetricBar: max=${String(f)} is not a positive finite number, so there is no scale to draw a proportional bar against. Printing the value without a bar. Pass the real capacity, or leave the reading out entirely (value={null}) when it is unknown — do not pass 0.`);const F=e(v,"MetricBar"),X=null!=A?F??t(l(A,g,b)):null,C=n(g),E=n(b),G=null!=A&&null!=D?x(A/D*100):0,L=null!=A?(y??(a=>100===D?u(a,1,B):m(a,B)))(A):"—",R=null!=A&&null!=D&&(null!=C||null!=E),S="md"===k||"lg"===k,Z=S?"h-2":"h-1.5",z=null!=A&&null!=D,H=/* @__PURE__ */c("div",{...z?{role:"meter","aria-label":$??("string"==typeof h?h:void 0),"aria-valuemin":0,"aria-valuemax":D,"aria-valuenow":Math.min(D,Math.max(0,A)),"aria-valuetext":L}:{"aria-hidden":!0},className:z&&X?`relative mt-2 ${Z} rounded-full bg-gray-200`:`relative mt-2 ${Z} rounded-full border border-dashed border-gray-300 bg-transparent`,children:[z&&
|
|
3
|
+
/* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${X?X.fill:"bg-gray-400"}`,style:{width:`${G}%`}}),R&&null!=D&&null!=C&&/* @__PURE__ */o(d,{at:x(C/D*100),title:j.warningAt(C),className:i.warning}),R&&null!=D&&null!=E&&/* @__PURE__ */o(d,{at:x(E/D*100),title:j.criticalAt(E),className:i.critical})]}),O=X?X.ink:null!=A?"text-gray-900":"text-gray-400";if(S){const a="lg"===k;/* @__PURE__ */
|
|
4
4
|
return c("div",{className:M,children:[null!=h&&/* @__PURE__ */o("div",{className:(a?"text-xs":"text-3xs")+" font-medium uppercase tracking-wide text-gray-500",children:h}),
|
|
5
5
|
/* @__PURE__ */c("div",{className:"mt-1 flex items-baseline gap-2",children:[
|
|
6
|
-
/* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${
|
|
7
|
-
/* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=
|
|
6
|
+
/* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${O}`,children:L}),
|
|
7
|
+
/* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=A?N:P})]}),H]})}/* @__PURE__ */
|
|
8
8
|
return c("div",{className:M,children:[
|
|
9
9
|
/* @__PURE__ */c("div",{className:"flex items-baseline gap-2",children:[null!=h&&/* @__PURE__ */o("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:h}),
|
|
10
|
-
/* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${
|
|
11
|
-
/* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=
|
|
10
|
+
/* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${O}`,children:L}),
|
|
11
|
+
/* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=A?N:P})]}),H]})}export{h as MetricBar};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-X2PZMXDP.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,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return(new Date).toISOString()}var K=null,
|
|
1
|
+
import{useShellPrefs as t}from"./chunk-KC3EX26K.js";import{toast_default as e}from"./chunk-OQW42DOR.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(F(),R()):"none"!==t&&0!==m||F()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&R())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),F())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);F(),N(s,{volume:u,repeat:d});const t="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(t)}catch{}try{e.info(t)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function N(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>P(t,n),2500*e)}function P(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,O={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function _(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function R(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=_(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*O[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function F(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function G(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=_(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*O[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var V="pomodoro_tasks",W="pomodoro_tasks_migrated";function j(){return Math.random().toString(36).slice(2,11)}function E(){/* @__PURE__ */
|
|
2
|
+
return(new Date).toISOString()}var K=null,q=[],J=!1,L=null,Q=/* @__PURE__ */new Set;function X(){for(const t of Q)t()}function $(t){q=t,X()}function z(){const t=K;return t?L=t.list().then(e=>{K===t&&(q=e,J=!0,X())}).catch(()=>{K===t&&(J=!0,X())}).finally(()=>{L=null}):(q=[],J=!0,X(),Promise.resolve())}function H(t){K=t,q=[],J=!1,t?z():X()}function U(t){return Q.add(t),!K||J||L||z(),()=>{Q.delete(t)}}function Y(){return q}function Z(){const e=function(){const{prefs:e,save:n}=t(),r=a(()=>{const t=e.todo_tasks;return Array.isArray(t)?t:[]},[e.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=j(),n=E(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:E()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(U,Y,Y),i=o(t=>{const n=K;if(!n)return e.addTask(t);const o="tmp-"+j(),a=E(),r={done:!1,...t,name:t.name.trim(),id:o,createdAt:a,updatedAt:a};return $([...q,r]),n.create({...t,name:t.name.trim()}).then(t=>$(q.map(e=>e.id===o?{...r,...t}:e))).catch(()=>$(q.filter(t=>t.id!==o))),o},[e]),c=o((t,n)=>{const o=K;if(!o)return e.updateTask(t,n);$(q.map(e=>e.id===t?{...e,...n,id:t,updatedAt:E()}:e)),o.update(t,n).catch(()=>{z()})},[e]),l=o(t=>{const n=K;if(!n)return e.removeTask(t);const o=q;$(q.filter(e=>e.id!==t)),n.remove(t).catch(()=>$(o))},[e]),s=o(t=>{if(!K)return e.toggleDone(t);const n=q.find(e=>e.id===t);n&&c(t,{done:!n.done})},[e,c]),u=o(t=>{K||e.setAllTasks(t)},[e]);return null===K?e:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(W))return;const n=localStorage.getItem(V);if(!n)return void localStorage.setItem(W,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(V),void localStorage.setItem(W,"1");const a=E(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||j(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(V),localStorage.setItem(W,"1")}catch{try{localStorage.setItem(W,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,N as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,G as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,H as setShellTodoProvider,S as subscribePomo,Z as useTodoTasks};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{TICK_INK as e}from"./chunk-URBCGEXG.js";import{useShellStrings as n}from"./chunk-
|
|
1
|
+
import{TICK_INK as e}from"./chunk-URBCGEXG.js";import{useShellStrings as n}from"./chunk-X2PZMXDP.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";function a({ink:e}){/* @__PURE__ */
|
|
2
2
|
return i("span",{"aria-hidden":"true",className:`h-3 w-0.5 shrink-0 rounded-[1px] ${e}`})}function t({link:t,className:l=""}){const c=n().meter;/* @__PURE__ */
|
|
3
3
|
return r("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-500 ${l}`.trim(),children:[
|
|
4
4
|
/* @__PURE__ */r("span",{className:"inline-flex items-center gap-1",children:[
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-PKXQDCNR.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{glassStyle as p}from"./chunk-DTJRIWFR.js";import{useShellStrings as m}from"./chunk-
|
|
1
|
+
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-PKXQDCNR.js";import{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{glassStyle as p}from"./chunk-DTJRIWFR.js";import{useShellStrings as m}from"./chunk-X2PZMXDP.js";import{useState as h,useRef as f,useEffect as y,useMemo as g,useId as x,useCallback as b}from"react";import{createPortal as k}from"react-dom";import{jsxs as v,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var A=[];function C(e,t,r){const[n,a]=h([]),[s,l]=h(A),[o,i]=h(!1),[c,d]=h("none"),u=f(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());y(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:b(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),i(!1)},[])}}var L=(e,t)=>`${e}-opt-${t}`;function T(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function E({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
|
|
2
2
|
return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.map(e=>/* @__PURE__ */v("div",{role:"group","aria-label":l(e.title,e.count,!!e.truncated),children:[
|
|
3
3
|
/* @__PURE__ */v("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:[
|
|
4
4
|
/* @__PURE__ */w("span",{children:e.title}),
|
|
5
5
|
/* @__PURE__ */w("span",{className:"font-medium normal-case tracking-normal",children:s(e.count,!!e.truncated)})]}),e.rows.map(e=>{const n=c++,s=n===t,l="action"===e.kind||"seeAll"===e.kind?void 0:e.badge,d="action"===e.kind||"seeAll"===e.kind?void 0:e.sub,u="seeAll"===e.kind;/* @__PURE__ */
|
|
6
6
|
return v("div",{id:L(r,n),role:"option","aria-selected":s,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(s?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>o(n),children:[
|
|
7
|
-
/* @__PURE__ */w("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:
|
|
7
|
+
/* @__PURE__ */w("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:T(e,a)})}),
|
|
8
8
|
/* @__PURE__ */v("div",{className:"flex-1 min-w-0",children:[
|
|
9
|
-
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:
|
|
9
|
+
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:T,quickActions:D,onSelect:I,recent:R,onRecord:K,favorites:M,hotkey:P=!0}={}){const $=m().search,B=T??$.placeholder,[W,S]=h(!1),[z,F]=h(""),[H,X]=h(0),G=f(null),{results:J,truncatedTypes:Q,loading:V,failure:Z,reset:q}=C(z,l,2);y(()=>{const e=e=>{P&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),S(e=>!e)),"Escape"===e.key&&W&&S(!1)},t=()=>S(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[W,P]),i(W);const[U,_]=h(!1);W!==U&&(_(W),W&&(F(""),X(0),q())),y(()=>{W?setTimeout(()=>G.current?.focus(),50):F("")},[W]),y(()=>{X(0)},[J]);const O=z.length>=2,Y=g(()=>O?e(J,D,z,$.actions,{truncatedTypes:Q,listRoutes:A,typeLabels:N,seeAllLabel:$.seeAll}):t({recent:R,favorites:M,actions:D,typeLabels:N},$),[O,J,Q,A,N,D,z,R,M,$]),ee=g(()=>r(Y),[Y]),te=Math.min(H,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;y(()=>{W&&0!==ee.length&&document.getElementById(L(re,te))?.scrollIntoView?.({block:"nearest"})},[W,te,ee.length,re]);const ae=b(e=>{S(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||K?.(e.result),I?.(e.result)):e.action.onSelect()},[I,K]);return W?k(
|
|
10
10
|
/* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:u.overlay},onClick:()=>S(!1),children:[
|
|
11
11
|
/* @__PURE__ */w("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
|
|
12
12
|
/* @__PURE__ */v("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:p(),children:[
|
|
13
13
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
|
|
14
14
|
/* @__PURE__ */w("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:n})}),
|
|
15
|
-
/* @__PURE__ */w("input",{ref:G,type:"text",value:z,onChange:e=>{F(e.target.value),
|
|
15
|
+
/* @__PURE__ */w("input",{ref:G,type:"text",value:z,onChange:e=>{F(e.target.value),X(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),X(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),X(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),X(s(Y.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:B,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?L(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),V&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":$.searching,className:"flex shrink-0",children:/* @__PURE__ */w(c,{className:"h-4 w-4",ink:"text-ink-faint"})}),
|
|
16
16
|
/* @__PURE__ */w("kbd",{className:"hidden sm:inline-flex items-center rounded border border-line-strong px-2 py-0.5 text-2xs font-medium text-ink-faintest",children:$.escBadge})]}),
|
|
17
|
-
/* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[V&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:$.searching}),!V&&"all"===
|
|
17
|
+
/* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[V&&0===ee.length&&/* @__PURE__ */w(d,{size:"sm",padding:"py-6",label:$.searching}),!V&&"all"===Z&&O&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:$.searchFailed}),!V&&O&&0===ee.length&&"all"!==Z&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.noResults}),ne&&/* @__PURE__ */w(E,{sections:Y,activeIdx:te,listId:re,label:$.listLabel,typeIcons:o,groupCount:$.groupCount,groupLabel:$.groupLabel,onHover:X,onPick:ae}),!V&&"some"===Z&&O&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:$.partialFailure}),!V&&!O&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:$.minChars(2)})]}),
|
|
18
18
|
/* @__PURE__ */v("div",{className:"flex items-center justify-between px-4 py-2 border-t border-line-subtle bg-surface-sunken text-2xs text-ink-faintest",children:[
|
|
19
19
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3",children:[
|
|
20
20
|
/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{writeClipboard as e}from"./chunk-VC42SDAC.js";import{IconButton_default as r}from"./chunk-RUTUVS4H.js";import{toast_default as t}from"./chunk-OQW42DOR.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{useShellStrings as a}from"./chunk-X2PZMXDP.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
|
|
2
|
+
return s(n,{name:"copy",className:"h-4 w-4","aria-hidden":"true"})}function h(){/* @__PURE__ */
|
|
3
|
+
return s(n,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:n,children:y,symbol:f,label:x,size:g="md",variant:k="bordered",hideCopyButton:v=!1,onCopy:w,multiline:N=!1,id:j,"aria-describedby":C,className:T=""}){const[D,P]=i(!1),S=o(null),V=a().copy;c(()=>()=>{S.current&&clearTimeout(S.current)},[]);const B=l(async()=>{await e(n)?(P(!0),S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{P(!1),S.current=null},2e3),w?.(n)):t.error(V.failed)},[n,w,V]),{box:F,button:M}=p[g],O=!v;/* @__PURE__ */
|
|
4
|
+
return m("div",{id:O?void 0:j,"aria-describedby":O?void 0:C,className:["inline-flex max-w-full items-center rounded-md",u[k],F,T].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
|
|
5
|
+
/* @__PURE__ */s("span",{className:"min-w-0 font-mono text-gray-800 "+(N?"whitespace-pre-wrap break-all":"truncate"),title:N?void 0:n,children:y??n}),!v&&/* @__PURE__ */m(d,{children:[
|
|
6
|
+
/* @__PURE__ */s(r,{id:j,"aria-label":x?V.copyLabel(x):V.copy,"aria-describedby":C,onClick:B,className:`${M} text-gray-400`,children:/* @__PURE__ */s(D?h:b,{})}),
|
|
7
|
+
/* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:D?V.copied:""})]})]})}export{y as Snippet};
|
|
@@ -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-OQW42DOR.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};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-TBPHW42V.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-TLRCTNUF.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-X2PZMXDP.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:L}=r(),P=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",P),0===P.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const T=Math.max(...P.map(e=>e.depth))+1,E=f/2,F=f/2,R=(f/2-8-b)/T,z=P.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),A=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,B=e=>null!==w?e.id===w:null===L||e.branchKey===L,H=w?P.find(e=>e.id===w):void 0,I=e=>c(e.value/z*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(z),T),onMouseLeave:()=>C(null),children:[P.map(e=>/* @__PURE__ */s("path",{d:t(E,F,b+e.depth*R+v/2,b+(e.depth+1)*R-v/2,e.start,e.end),fill:A(e),fillOpacity:B(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>C(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:E,y:F+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),H&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:H.label,rows:[{key:"value",label:M.value,color:A(H),value:j(H.value)},{key:"share",label:M.share,color:a.muted,value:I(H)}]})}),
|
|
4
|
+
/* @__PURE__ */s(e,{caption:M.sunburst(j(z),T),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:P.map(e=>[e.depth+1,e.label,j(e.value),I(e)])})]})}export{f as SunburstChart};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as l}from"./chunk-TWVUQUUD.js";import{resolveSeriesColor as r,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-X2PZMXDP.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:N=2}){const j=i().charts,U=a(),C=$??(e=>o(e,U)),z=b??j.intensity,D=w??j.noActivity,F=h(null),R=t(F),L=g??R,S=c(),[T,P]=s(null);if(m(()=>{if(null!==T)return l(e=>"Escape"===e.key&&(P(null),!0))},[T]),0===x.length||0===d.length)/* @__PURE__ */
|
|
2
|
+
return f("div",{className:k,ref:F,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:D})});const V=y??r(0),X=v??Math.max(1,...p.flat().filter(Number.isFinite)),Z=96,B=26*x.length,E=M??B+26+26,G=Math.max(2,(Math.max(97,L)-Z)/d.length),Q=e=>{const t=X>0?Math.max(0,Math.min(1,e/X)):0;return`color-mix(in oklab, ${V} ${(8+92*t).toFixed(1)}%, ${n.surface})`};/* @__PURE__ */
|
|
3
|
+
return u("div",{className:`relative ${k??""}`,ref:F,children:[
|
|
4
|
+
/* @__PURE__ */u("svg",{width:"100%",height:E,viewBox:`0 0 ${L} ${E}`,role:"img","aria-label":j.heatmap(z,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>P(null),onBlur:()=>P(null),onKeyDown:e=>{const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:0,l="ArrowRight"===e.key?1:"ArrowLeft"===e.key?-1:0;0===t&&0===l||(e.preventDefault(),P(e=>({r:Math.min(x.length-1,Math.max(0,(e?.r??0)+t)),c:Math.min(d.length-1,Math.max(0,(e?.c??0)+l))})))},children:[
|
|
5
|
+
/* @__PURE__ */f("defs",{children:/* @__PURE__ */u("linearGradient",{id:S,x1:"0",x2:"1",children:[
|
|
6
|
+
/* @__PURE__ */f("stop",{offset:"0",stopColor:Q(0)}),
|
|
7
|
+
/* @__PURE__ */f("stop",{offset:"1",stopColor:Q(X)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:n.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=T&&(T.r!==t||T.c!==r);/* @__PURE__ */
|
|
8
|
+
return f("rect",{x:Z+r*G+A/2,y:26*t+A/2,width:Math.max(1,G-A),height:26-A,rx:N,fill:Q(n),opacity:i?.55:1,onMouseEnter:()=>P({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${C(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((L-Z)/56))))===0?/* @__PURE__ */f("text",{x:Z+t*G+G/2,y:B+15,textAnchor:"middle",fontSize:11,fill:n.label,children:e},`c${t}`):null),
|
|
9
|
+
/* @__PURE__ */f("rect",{x:Z,y:B+26,width:Math.min(180,Math.max(40,L-Z)),height:8,rx:4,fill:`url(#${S})`}),
|
|
10
|
+
/* @__PURE__ */f("text",{x:Z,y:B+48,fontSize:11,fill:n.label,children:"0"}),
|
|
11
|
+
/* @__PURE__ */f("text",{x:Z+Math.min(180,Math.max(40,L-Z)),y:B+48,textAnchor:"end",fontSize:11,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:C(X)})]}),T&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(e,{title:`${x[T.r]} · ${d[T.c]}`,rows:[{key:"v",label:z,color:V,value:null==p[T.r]?.[T.c]?void 0:C(p[T.r][T.c])}]})})]})}export{x as HeatmapChart};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ChartTooltip as t}from"./chunk-TLRCTNUF.js";import{CartesianPlot as o}from"./chunk-25STFYV3.js";import{binValues as r}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-X2PZMXDP.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const L=e().charts,v=i(),w=d??(t=>Number.isInteger(t)?m(t,v):n(t,1,v)),A=x??(t=>m(t,v)),M=g??L.countAxis,N=k??L.distribution,T=h??r(c??[],s),C=a(0,b,f),P=T.map(t=>w(t.from)),R=T.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(o,{labels:P,values:R,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:A,yAxisLabel:M,className:y,emptyLabel:j,ariaLabel:L.histogram(N,T.length,(c??[]).length),tooltip:o=>/* @__PURE__ */l(t,{title:`${w(T[o].from)} – ${w(T[o].to)}`,rows:[{key:"count",label:L.observations,color:C,value:A(T[o].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:T.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:C,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|