efficient-shell 9.12.0 → 9.14.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 +11 -1
- package/dist/{Browser-G7AXZ4OT.js → Browser-42NYVAPR.js} +13 -13
- package/dist/Calculator-PCTFUS5O.js +29 -0
- package/dist/{CurrencyConverter-EDEJOKHC.js → CurrencyConverter-OIXAMDP7.js} +8 -8
- package/dist/{Documents-7AVOO2DA.js → Documents-V2OKP6JZ.js} +26 -26
- package/dist/{Files-MT6PMAHO.js → Files-OAMTKHYK.js} +18 -18
- package/dist/{Notepad-KBRNR5BU.js → Notepad-3LG227K2.js} +10 -10
- package/dist/{PdfViewer-FFQOKKFW.js → PdfViewer-DFBPEUY5.js} +1 -1
- package/dist/{PomodoroTimer-HCLT2JVD.js → PomodoroTimer-AYGPGA6Q.js} +11 -11
- package/dist/{Preview-4SOGNXHL.js → Preview-BBQWQ4DG.js} +28 -28
- package/dist/Sidebar-RHGWTAPS.js +44 -0
- package/dist/{Spreadsheet-W2AGKEWT.js → Spreadsheet-MS5FU7ET.js} +14 -14
- package/dist/{Stock-3IBS63UR.js → Stock-GSQNTV7E.js} +3 -3
- package/dist/{Weather-EFIIVKFE.js → Weather-5XLO2GLO.js} +15 -15
- package/dist/{WorldClock-ERQQ4VWP.js → WorldClock-CG3NF4GA.js} +6 -6
- package/dist/ai/index.js +51 -51
- 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/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-BNKULSCG.js → chunk-2OE5VVBE.js} +1 -1
- package/dist/{chunk-FVDX6ZSZ.js → chunk-2TQ6BLSN.js} +6 -6
- 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-65DYHG73.js → chunk-5VTRKWKO.js} +1 -1
- package/dist/{chunk-7WLFHDWA.js → chunk-66JYKX4T.js} +1 -1
- package/dist/{chunk-M5MAIJQQ.js → chunk-6L2UAAGT.js} +1 -1
- package/dist/{chunk-JENEVLJU.js → chunk-6TCJOVFX.js} +2 -2
- package/dist/{chunk-HRAK46H7.js → chunk-6YQPLI5M.js} +12 -12
- package/dist/{chunk-3MHBALGV.js → chunk-76IDLFXI.js} +1 -1
- 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-VBNA237H.js → chunk-A4HA7EXR.js} +1 -1
- package/dist/{chunk-SGR4V5YI.js → chunk-A7CCSRPB.js} +1 -1
- package/dist/chunk-AEJNFA2K.js +6 -0
- package/dist/{chunk-CBMXYXBH.js → chunk-AG2OLB3E.js} +9 -9
- package/dist/{chunk-ZPW3KQ27.js → chunk-APXQMZSV.js} +28 -28
- package/dist/{chunk-IK332TWA.js → chunk-B4DR72FR.js} +1 -1
- package/dist/{chunk-WZQCRTXF.js → chunk-B7AHMB3U.js} +1 -1
- package/dist/{chunk-TQH6E5V2.js → chunk-BDAKGS7O.js} +1 -1
- package/dist/chunk-BGNJQMAZ.js +1 -0
- package/dist/{chunk-MCMUJDEP.js → chunk-BMQCUHSD.js} +1 -1
- package/dist/{chunk-GVAWCTJN.js → chunk-C45OKLRM.js} +7 -7
- 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-R6R57BWQ.js → chunk-D46AP6U5.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-H2XCQJRG.js → chunk-DXHLUB36.js} +1 -1
- package/dist/{chunk-YBU7NOD7.js → chunk-E7WY4GZ3.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-EXJZUNNW.js +29 -0
- package/dist/{chunk-EWJELWIT.js → chunk-F24QTMTY.js} +3 -3
- package/dist/{chunk-QSUQC4AN.js → chunk-FTWWJHFX.js} +1 -1
- 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-UL4G6JY2.js → chunk-GRBBQ3VF.js} +1 -1
- package/dist/{chunk-AOSLOKAL.js → chunk-GXGBBMGV.js} +1 -1
- package/dist/{chunk-6O2W4X2V.js → chunk-HI6IE5HI.js} +1 -1
- package/dist/chunk-HJPCHES5.js +8 -0
- package/dist/{chunk-ZC3CCRPG.js → chunk-IGEFUHYE.js} +5 -5
- package/dist/{chunk-RISKWWMD.js → chunk-IKQVK3I3.js} +2 -2
- 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-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-2AHLONPR.js → chunk-KJXF5WAJ.js} +1 -1
- package/dist/{chunk-B74Y4QR2.js → chunk-KTKMM2XW.js} +1 -1
- package/dist/chunk-LKW3YAZN.js +11 -0
- package/dist/chunk-LPUGK2MC.js +2 -0
- package/dist/{chunk-HMG5TW2R.js → chunk-M33225G6.js} +1 -1
- package/dist/{chunk-2J2OU65F.js → chunk-M5YG57UP.js} +2 -2
- package/dist/{chunk-6FI3HVUR.js → chunk-M7H3OCIL.js} +50 -50
- package/dist/{chunk-Z3CYLDHB.js → chunk-ME4VRJMK.js} +11 -11
- package/dist/{chunk-JGDLTIOX.js → chunk-MNIULUQY.js} +10 -10
- package/dist/{chunk-AG63JVX7.js → chunk-MPALY3CL.js} +5 -5
- package/dist/{chunk-KJHXCVNI.js → chunk-MRUJRFIX.js} +1 -1
- 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-O56CY36U.js → chunk-NFJDLIRM.js} +5 -5
- 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-5ZGL2BRZ.js → chunk-PF5CKD4C.js} +2 -2
- package/dist/{chunk-27W6BXT6.js → chunk-PKHZTFBK.js} +2 -2
- package/dist/{chunk-TBLN4MDQ.js → chunk-PKIDVVAE.js} +2 -2
- package/dist/{chunk-YWR2WRDR.js → chunk-PUCPFBYO.js} +1 -1
- package/dist/{chunk-5AWV5R6E.js → chunk-PUIQFTCO.js} +6 -6
- package/dist/{chunk-PWBLGKQ3.js → chunk-Q3MNSM7W.js} +4 -4
- package/dist/chunk-QMUAY24U.js +8 -0
- package/dist/{chunk-SAHQB2JD.js → chunk-QO35WRYA.js} +17 -17
- package/dist/{chunk-5XNN2SSR.js → chunk-QRJRGP2K.js} +8 -8
- package/dist/{chunk-6TRE326A.js → chunk-QSW3YHPK.js} +4 -4
- 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-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-SKETTGCJ.js +2 -0
- package/dist/{chunk-OVDHEMLK.js → chunk-SVQJZF66.js} +5 -5
- package/dist/{chunk-EOWOVR55.js → chunk-SWO4VPOB.js} +1 -1
- package/dist/chunk-TIUFFVP5.js +9 -0
- 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-ERLZDA75.js → chunk-UX5L3MOB.js} +3 -3
- package/dist/{chunk-4DBPKTVX.js → chunk-UXPZQID4.js} +15 -15
- 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-YQB5OYDC.js → chunk-VVVWVOG7.js} +1 -1
- package/dist/{chunk-O4NPQ23Q.js → chunk-VXP5L6DI.js} +1 -1
- 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-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-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/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.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.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/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.js +111 -111
- 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.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/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/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.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/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.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-6NA35GFS.js +0 -29
- package/dist/Sidebar-LIP2DYTO.js +0 -44
- package/dist/chunk-3XRBVYTO.js +0 -2
- package/dist/chunk-4CPE5NBC.js +0 -8
- package/dist/chunk-4GPUKEYQ.js +0 -1
- package/dist/chunk-5R6RNUDB.js +0 -7
- package/dist/chunk-7BYBGPWU.js +0 -9
- package/dist/chunk-GCB5S2OI.js +0 -8
- package/dist/chunk-GVH3NG6G.js +0 -22
- package/dist/chunk-J7OKOVSL.js +0 -11
- package/dist/chunk-LFPJ263N.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-SYH7EPLF.js +0 -29
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-X2PZMXDP.js";import{jsx as r}from"react/jsx-runtime";var n=["left","center","right","justify"],a={left:"align-left",center:"align-center",right:"align-right",justify:"align-justify"};function i(t){switch(t){case"left":/* @__PURE__ */
|
|
2
2
|
return r(e,{name:"align-left"});case"center":/* @__PURE__ */
|
|
3
3
|
return r(e,{name:"align-center"});case"right":/* @__PURE__ */
|
|
4
4
|
return r(e,{name:"align-right"});case"justify":/* @__PURE__ */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{GROUP_COLORS as e}from"./chunk-LNARMEEZ.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e}from"./chunk-LNARMEEZ.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-X2PZMXDP.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
|
|
2
2
|
return t(n,{content:e,describe:!1,children:/* @__PURE__ */t("button",{type:"button",onClick:l,"aria-label":e,className:"flex h-4 w-4 items-center justify-center rounded-full leading-none hover:bg-current/10 rosh-focus-ring focus-visible:ring-2",children:/* @__PURE__ */t("span",{"aria-hidden":"true",children:r})})})}function c({state:n,label:c,verb:u,subject:m,pct:p,onCancel:d,onRetry:h,onDismiss:f,className:b=""}){const g=l().transfer;if("idle"===n)return null==c?null:/* @__PURE__ */t("span",{className:`${s} ${e.neutral} pr-2 ${b}`.trim(),children:c});if("error"===n)/* @__PURE__ */
|
|
3
3
|
return i("span",{role:"status",className:`${s} ${e.danger} ${b}`.trim(),children:[
|
|
4
4
|
/* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,N=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),$="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,k=e=>[e,m,null==N?"":`${N}%`].filter(Boolean).join(" ");/* @__PURE__ */
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-ZMVCN4OA.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-FTWWJHFX.js";import{ImageLightbox as r}from"./chunk-XSJJPACH.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-VG5NGCMQ.js";import{Breadcrumbs as d}from"./chunk-GKZUAT3K.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-YFUMK2E7.js";import{useMediaMoveItems as u}from"./chunk-B7AHMB3U.js";import{copyToClipboard as m}from"./chunk-VC42SDAC.js";import{DropdownMenu as p}from"./chunk-VVZE27M4.js";import{MediaUploadGrid as h}from"./chunk-C6MV6IAX.js";import{MediaUsedInList as f}from"./chunk-TXMAWCR7.js";import{NativeSelect as g}from"./chunk-UXPZQID4.js";import{Segmented as v}from"./chunk-CKPVXDKX.js";import{useGridSelection as k}from"./chunk-VLKDWKVR.js";import{useMarquee as y}from"./chunk-OLFYNMTD.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as C}from"./chunk-NU2YQSOP.js";import{Banner as x}from"./chunk-66JYKX4T.js";import{Input_default as N}from"./chunk-MAMWQCJ6.js";import{IconButton_default as I}from"./chunk-RUTUVS4H.js";import{useFileIntake as D,FileIntakeAlert as S}from"./chunk-P6LB3I3D.js";import{ColoredBadge as j}from"./chunk-DXHLUB36.js";import{Button_default as z}from"./chunk-NHH2MXFU.js";import{buttonClasses as F}from"./chunk-UQYNPYF4.js";import{Icon as T}from"./chunk-FSPFV4MI.js";import{Tooltip as O}from"./chunk-BCDG4N6L.js";import{usePlotWidth as P}from"./chunk-MAFUXCPZ.js";import{useShellStrings as M}from"./chunk-X2PZMXDP.js";import{useRef as A,useMemo as L,useCallback as E,useState as U,useEffect as K}from"react";import{jsxs as B,Fragment as R,jsx as V}from"react/jsx-runtime";var X="application/x-efficient-media-files",H="application/x-efficient-media-folder",J="application/x-efficient-media-file";function G(e){if(!e||!Array.from(e.types).includes(J))return null;try{const n=JSON.parse(e.getData(J));if(n&&"string"==typeof n.id&&"string"==typeof n.url&&"string"==typeof n.name&&("image"===n.kind||"video"===n.kind))return{id:n.id,url:n.url,kind:n.kind,name:n.name}}catch{}return null}var W={type:"all",use:"any",sort:"newest"},Z={lock:/* @__PURE__ */V(T,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */V(T,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */V(T,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */V(T,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */V(T,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */V(T,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */V(T,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */V(T,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */V(T,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */V(T,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */V(T,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */V(T,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */V(T,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */V(T,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */V(T,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */V(T,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},$={link:/* @__PURE__ */V(T,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */V(T,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */V(T,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */V(T,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function Q({value:e,label:n,onDone:l}){const[a,i]=U(e),r=A(!1),t=e=>{r.current||(r.current=!0,l(e))};/* @__PURE__ */
|
|
2
|
+
return V(N,{size:"sm",autoFocus:!0,"aria-label":n,value:a,onChange:e=>i(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:n=>{n.stopPropagation(),"Enter"===n.key?(n.preventDefault(),t(a.trim()||e)):"Escape"===n.key&&(n.preventDefault(),t(null))},onBlur:()=>t(a.trim()||e),onClick:e=>e.stopPropagation()})}function Y(T){const{mode:G="manage",layout:Y="auto",location:q,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=W,onFiltersChange:de,extraFilters:se,view:ce="grid",onViewChange:ue,selectedIds:me,onSelectionChange:pe,usedIn:he,denied:fe={},accept:ge="image/*,video/*",maxSizeBytes:ve,busy:ke,progress:ye,onUpload:be,onNewFolder:we,onRename:Ce,onMove:xe,onTrash:Ne,onDeleteFolder:Ie,onRestore:De,onDeleteForever:Se,onEmptyTrash:je,onReplace:ze,onCropEdit:Fe,onOpenInDesign:Te,onChoose:Oe,onCancel:Pe,pickNote:Me,onDragOut:Ae,className:Le=""}=T,Ee=M().mediaLibrary,Ue=M().media,Ke="pick"===G,Be=!Ke,Re=A(null),Ve=P(Re,"phone"===Y?343:1200),Xe="phone"===Y||"auto"===Y&&Ve<640,He=L(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,a)=>{for(const i of e){const e=[...a,i];n.set(i.id,{node:i,path:e}),i.children&&l(i.children,e)}};return l(e,[]),n}(ne),[ne]),Je=L(()=>new Map(ee.map(e=>[e.id,e])),[ee]),Ge=L(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&Je.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,Je]),We=E(e=>{const n=[];for(let l=e?Je.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?Je.get(l.parentId):void 0);return n},[Je,ee.length]),Ze=E((e,n)=>We(e).some(e=>e.id===n),[We]),[$e,Qe]=U(()=>/* @__PURE__ */new Set(["@files"])),Ye=e=>Qe(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),qe=E(e=>{Qe(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),_e="files"===(en=q).place?`files:${en.folderId??""}`:"products"===en.place?`products:${en.nodeId??""}`:"trash";var en;K(()=>{if("files"===q.place)qe(["@files",...We(q.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===q.place){const e=q.nodeId?He.get(q.nodeId)?.path??[]:[];qe(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[_e]);const nn="products"===q.place,ln="trash"===q.place,an="files"===q.place,rn=an?q.folderId:null,tn=nn&&q.nodeId?He.get(q.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Ee.readOnly} ${Ee.editedAtHq(e.sharedFrom)}`:Ee.readOnly,dn=L(()=>ie.map(e=>e.id),[ie]),sn=L(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=k(dn),un=L(()=>dn.filter(e=>cn.selected.has(e)),[dn,cn.selected]),mn=1===un.length?sn.get(un[0]):void 0,pn=A(!0);K(()=>{pn.current?pn.current=!1:cn.clear()},[_e]);const hn=me?.join("\0");K(()=>{me&&cn.setSelection(me)},[hn]);const fn=A(hn??""),gn=un.join("\0");K(()=>{fn.current!==gn&&(fn.current=gn,pe?.(un))},[gn]);const vn=(e,n={})=>{Ke?cn.select(e):cn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[kn,yn]=U(null),bn=e=>{const n=kn;if(yn(null),!n||null==e)return;e!==("folder"===n.kind?Je.get(n.id)?.name:sn.get(n.id)?.name)&&Ce?.(n,e)},wn=async e=>{if(!we)return;const n=await we(e);qe(["@files",...e?[e]:[]]),"string"==typeof n&&yn({kind:"folder",id:n})},Cn=E(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Ee.alreadyHere:void 0;const l=Je.get(e.id);return n===e.id||n&&Ze(n,e.id)?Ee.notIntoItself:(l?.parentId??null)===n?Ee.folderAlreadyHere:void 0};n.push({key:s,label:Ee.allFiles,disabledReason:l(null)});const a=(e,i)=>{for(const r of Ge.get(e)??[])n.push({key:r.id,label:r.name,depth:i,disabledReason:l(r.id)}),a(r.id,i+1)};return a(null,1),n},[Ge,Je,an,Ze,rn,Ee]),xn=E(e=>{const n=new Set(e.map(e=>sn.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[sn]),[Nn,In]=U(null),Dn={words:Ee,media:Ue,denied:fe,moveTargets:Cn,kindOf:xn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Be?e=>{wn(e)}:void 0,rename:Ce&&Be?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:xe&&Be?xe:void 0,trash:Ne&&Be?Ne:void 0,deleteFolder:Ie&&Be?Ie:void 0,folderNotEmpty:e=>!!Je.get(e)?.notEmpty,replace:ze&&Be?ze:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&m(Ee.urlLabel,n)},openInDesign:Te,restore:De,deleteForever:Se},Sn=e=>c(e,Dn),jn=w(),zn=(e,n)=>{Ke||(cn.isSelected(e)||cn.select(e),jn.open(n,(e=>{const n=cn.isSelected(e)?un:[e];return nn?{kind:"render",id:e}:ln?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Fn,Tn]=U(null),[On,Pn]=U(null),[Mn,An]=U(null);K(()=>{if(!On&&!Fn)return;const e=()=>{Pn(null),Tn(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[On,Fn]);const Ln=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),En=(e,n)=>!(!xe||fe.move||Ke)&&(!!Ln(e,X)||!(!Ln(e,H)||!Mn)&&(n!==Mn&&!(n&&Ze(n,Mn)))),Un=(e,n)=>({onDragEnter:l=>{En(l,n)&&(l.preventDefault(),Tn(e))},onDragOver:l=>{En(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Fn!==e&&Tn(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Tn(n=>n===e?null:n)},onDrop:e=>{if(En(e,n))if(e.preventDefault(),Tn(null),Ln(e,X)){let l;try{l=JSON.parse(e.dataTransfer.getData(X))}catch{l=null}Array.isArray(l)&&l.length&&xe({kind:"files",ids:l.map(String)},n)}else Mn&&(xe({kind:"folder",id:Mn},n),An(null))}}),Kn=e=>{const n=e=>Ln(e,X)||Ln(e,H)||Ln(e,"Files");return{onDragEnter:l=>{n(l)&&Pn(e)},onDragOver:l=>{n(l)&&On!==e&&Pn(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Pn(n=>n===e?null:n)}}},Bn=(e,n,l)=>/* @__PURE__ */V(O,{side:"right",content:On===e?Ee.noDropProducts:on(l),open:On===e||!On&&void 0,children:/* @__PURE__ */V("span",{children:n})}),Rn=e=>({onContextMenu:n=>{jn.open(n,e)}}),Vn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=$e.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
|
|
3
|
+
return B("div",{role:"none",className:"contents",children:[
|
|
4
|
+
/* @__PURE__ */V(n,{label:Bn(r,e.name,t),level:a,icon:d&&o?Z.folderOpen:Z.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ee.fileCount(e.count):void 0,selected:nn&&q.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>Ye(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Kn(r),...Be?Rn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */V(l,{children:Vn(d,a+1,t)})]},e.id)}),Xn=(e,a)=>(Ge.get(e)??[]).map(e=>{const i=Ge.get(e.id),r=$e.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=Sn({kind:"folder",id:e.id});/* @__PURE__ */
|
|
5
|
+
return B("div",{role:"none",className:"contents",children:[
|
|
6
|
+
/* @__PURE__ */V(n,{label:e.name,level:a,icon:i&&r?Z.folderOpen:Z.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ee.fileCount(e.count):void 0,selected:t||an&&q.folderId===e.id,expanded:i?r:void 0,onToggle:i?()=>Ye(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:Fn===e.id?"into":void 0,dragging:Mn===e.id,draggable:Be&&!!xe&&!fe.move,rename:t?/* @__PURE__ */V(Q,{value:e.name,label:Ee.folderName,onDone:bn}):void 0,actions:Be&&o.length?/* @__PURE__ */V(p,{align:"end","aria-label":Ee.folderActions,trigger:Z.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Un(e.id,e.id),...Be?Rn({kind:"folder",id:e.id}):{},...Be&&xe&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(H,e.id),An(e.id)},onDragEnd:()=>{An(null),Tn(null)}}:{}}}),i&&r&&/* @__PURE__ */V(l,{children:Xn(e.id,a+1)})]},e.id)}),Hn=$e.has("@files"),Jn=$e.has("@products"),Gn=/* @__PURE__ */B(e,{"aria-label":Ee.folders,children:[ne&&/* @__PURE__ */B(R,{children:[
|
|
7
|
+
/* @__PURE__ */V(n,{label:Bn("@products",Ee.products),level:1,icon:Z.lock,badge:{label:Ee.readOnlyBadge,tone:"neutral"},expanded:ne.length?Jn:void 0,onToggle:()=>Ye("@products"),selected:nn&&null==q.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Kn("@products")}}),Jn&&ne.length>0&&/* @__PURE__ */V(l,{children:Vn(ne,2)})]}),
|
|
8
|
+
/* @__PURE__ */V(n,{label:Ee.allFiles,level:1,icon:Hn?Z.folderOpen:Z.folder,count:le,countLabel:null!=le?Ee.fileCount(le):void 0,expanded:Ge.get(null)?.length?Hn:void 0,onToggle:()=>Ye("@files"),selected:an&&null==q.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===Fn?"into":void 0,rowProps:{"data-media-row":"@files",...Un("@files",null)}}),Hn&&(Ge.get(null)?.length??0)>0&&/* @__PURE__ */V(l,{children:Xn(null,2)}),Be&&/* @__PURE__ */V(n,{label:Ee.trash,level:1,icon:Z.trash,count:ae,countLabel:null!=ae?Ee.fileCount(ae):void 0,selected:ln,onSelect:()=>_({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Wn=(()=>{if(ln)return[{label:Ee.trash}];if(nn){const e=q.nodeId?He.get(q.nodeId)?.path??[]:[];return[{label:Ee.products,onClick:e.length?()=>_({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"products",nodeId:n.id}):void 0}))]}const e=We(rn);return[{label:Ee.allFiles,onClick:e.length?()=>_({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"files",folderId:n.id}):void 0}))]})(),Zn=nn?Ee.readOnly:fe.upload,$n=!!be&&!ln&&!Zn,Qn=D({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!$n,onAccept:e=>be?.(e,rn)}),Yn=nn?Ee.noProductFolder:fe.newFolder,qn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[Be&&we&&!ln&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.folderPlus,onClick:()=>{wn(rn)},...qn(Yn),children:Ee.newFolder}),be&&!ln&&/* @__PURE__ */V(z,{variant:"primary",size:"sm",leftIcon:Z.upload,onClick:()=>Qn.open(),...qn(Zn),children:Ee.upload}),Be&&ln&&je&&ie.length>0&&/* @__PURE__ */V(z,{variant:"danger",size:"sm",onClick:je,...qn(fe.deleteForever),children:Ee.emptyTrash})]}),el=(e,n,l,a,i)=>/* @__PURE__ */V("div",{style:{width:Xe?void 0:i,flex:Xe?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */V(g,{size:"sm","aria-label":e,value:n,onChange:a,options:l})},e),nl=e=>n=>de?.({...oe,[e]:n}),ll=/* @__PURE__ */B("div",{className:"flex flex-wrap items-center gap-2",children:[te&&/* @__PURE__ */V("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */V(N,{size:"sm",type:"search",leftIcon:Z.search,placeholder:nn?Ee.searchProducts:Ee.search,"aria-label":nn?Ee.searchProducts:Ee.search,value:re??"",onChange:e=>te(e.target.value)})}),de&&el(Ee.mediaType,oe.type,[{value:"all",label:Ee.allTypes},{value:"image",label:Ee.images},{value:"video",label:Ee.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],nl("type"),130),de&&!nn&&!ln&&el(Ee.use,oe.use,[{value:"any",label:Ee.anyUse},{value:"email",label:Ee.emailOnly},{value:"website",label:Ee.websiteOnly},{value:"unused",label:Ee.notUsed}],nl("use"),130),de&&Be&&el(Ee.sort,oe.sort,[{value:"newest",label:Ee.newest},{value:"name",label:Ee.byName},{value:"size",label:Ee.bySize}],nl("sort"),110),se?.map(e=>el(e.label,e.value,e.options,e.onChange,120)),ue&&/* @__PURE__ */V(v,{size:"sm",label:Ee.view,value:ce,onChange:ue,options:[{value:"grid",label:Ee.grid,icon:Z.grid},{value:"list",label:Ee.list,icon:Z.list}]})]}),al=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Ee.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:$.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ee.used(e.usedCount),count:e.usedCount,icon:$.link,tone:"active"}),e.email&&n.push({key:"e",label:Ee.email,icon:$.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ee.private,icon:$.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */V(j,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Be&&an&&!!xe&&!fe.move,tl=!!Ae&&!ln,ol=e=>!tl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),dl=ie.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:al(e),dragData:rl?JSON.stringify(cn.isSelected(e.id)?un:[e.id]):ol(e),...rl&&ol(e)?{dragAlso:{[J]:ol(e)}}:{}})),sl=Xe?Math.max(72,Math.floor((Ve-24-16-1)/3)):112,cl=A(null),ul=y({containerRef:cl,enabled:Be&&!Xe&&ie.length>0,selected:cn.selected,setSelection:e=>cn.setSelection(e),clearSelection:cn.clear}),ml=e=>{if(Ke){const n=sn.get(e);return void(!n||n.private||n.pickDisabledReason||Oe?.(n))}const n=dn.indexOf(e);n>=0&&In(n)},pl=ie.length?null:re?/* @__PURE__ */V(i,{variant:"dashed",title:Ee.noMatches}):nn?/* @__PURE__ */V(i,{variant:"dashed",title:Ee.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */V(i,{variant:"dashed",title:Ee.trashEmpty}):!$n||Ke?/* @__PURE__ */V(i,{variant:"dashed",title:Ee.emptyFolder}):null,hl="list"===ce&&ie.length>0,fl=pl??(hl?/* @__PURE__ */V("ul",{role:"listbox","aria-multiselectable":Be||void 0,"aria-label":Ee.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */B("li",{role:"option","aria-selected":cn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>vn(e.id,n),onDoubleClick:()=>ml(e.id),onContextMenu:n=>zn(e.id,n),draggable:!!ol(e)||void 0,onDragStart:ol(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(J,ol(e)),Ae("start")}:void 0,onDragEnd:ol(e)?e=>Ae("none"===e.dataTransfer.dropEffect?"cancelled":"dropped"):void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),vn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(cn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
|
|
9
|
+
/* @__PURE__ */V("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
|
|
10
|
+
/* @__PURE__ */V("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
|
|
11
|
+
/* @__PURE__ */V("span",{className:"flex shrink-0 items-center gap-1",children:il(e)}),e.sizeLabel&&/* @__PURE__ */V("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */V(h,{items:dl,readOnly:!$n||Ke,onFiles:$n&&!Ke?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?X:tl?J:void 0,onDragOutChange:tl?e=>Ae(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Be?zn:void 0,menuOnMedia:Be})),gl=u({count:un.length,kind:xn(un),targets:Cn({kind:"files",ids:un}),onPick:e=>xe?.({kind:"files",ids:un},e.key===s?null:e.key)}),vl=F({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */V(p,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */B(R,{children:[Z.folder,Ee.moveTo]}),items:gl,disabled:!!fe.move}),yl=Be&&un.length>1&&!nn?/* @__PURE__ */B("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
|
|
12
|
+
/* @__PURE__ */V(b,{checked:un.length===ie.length,indeterminate:un.length<ie.length,onChange:e=>e?cn.selectAll():cn.clear(),label:Ee.selected(un.length)}),/* @__PURE__ */B(R,ln?{children:[De&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.undo,onClick:()=>De(un),...qn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */V(z,{variant:"secondary-danger",size:"sm",onClick:()=>Se(un),...qn(fe.deleteForever),children:Ee.deleteForever})]}:{children:[xe&&kl,Ce&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.edit,disabled:!0,children:Ee.rename}),Ne&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.trash,onClick:()=>Ne({kind:"files",ids:un}),...qn(fe.trash),children:Ee.moveFilesToTrash(un.length)})]}),
|
|
13
|
+
/* @__PURE__ */V(z,{variant:"ghost",size:"sm",onClick:cn.clear,children:Ee.clearSelection})]}):null,bl=e=>{const n=[],l=(e,l,a)=>{null!=a&&""!==a&&n.push({key:e,label:l,value:a})},a="file"===kn?.kind&&kn.id===e.id;l("name",Ee.name,a?/* @__PURE__ */V(Q,{value:e.name,label:Ee.fileName,onDone:bn}):e.name),l("type",Ee.type,e.typeLabel),l("size",Ee.size,e.sizeLabel),l("resolution",Ee.resolution,e.resolution),nn?(l("design",Ee.design,e.design),l("finish",Ee.finish,e.finish),l("angle",Ee.angleLug,e.angleLug),l("owner",Ee.owner,e.owner)):(l("added",Ee.addedBy,e.addedBy),l("folder",Ee.folder,e.folderPath)),l("used",Ee.usedIn,null!=e.usedCount?Ee.places(e.usedCount):void 0);const i=c({kind:"files",ids:[e.id]},Dn).find(e=>"submenu"===e.type);/* @__PURE__ */
|
|
14
|
+
return B("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
|
|
15
|
+
/* @__PURE__ */V("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),nn&&/* @__PURE__ */V(x,{tone:"neutral",title:Ee.readOnlyBadge,children:on(tn)}),
|
|
16
|
+
/* @__PURE__ */V(t,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */B("div",{className:"flex gap-2",children:[
|
|
17
|
+
/* @__PURE__ */V("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */V(N,{size:"sm",readOnly:!0,value:e.url,"aria-label":Ee.fileUrl,onFocus:e=>e.currentTarget.select()})}),
|
|
18
|
+
/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.copy,onClick:()=>Dn.copyUrl(e.id),children:Ee.copyUrl})]}),an&&Be&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.swap,onClick:()=>ze(e.id),...qn(fe.replace),children:Ee.replace}),Fe&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.crop,onClick:()=>Fe(e.id),children:Ee.cropEdit}),xe&&"submenu"===i?.type&&/* @__PURE__ */V(p,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */B(R,{children:[Z.folder,Ee.moveTo]}),items:i.items,disabled:!!fe.move}),Ce&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.edit,onClick:()=>yn({kind:"file",id:e.id}),...qn(fe.rename),children:Ee.rename}),Ne&&/* @__PURE__ */V(I,{"aria-label":Ee.moveToTrash,size:"sm",onClick:()=>Ne({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:Z.trash})]}),ln&&Be&&/* @__PURE__ */B("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */V(z,{variant:"primary",size:"sm",leftIcon:Z.undo,onClick:()=>De([e.id]),...qn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */V(z,{variant:"danger",size:"sm",onClick:()=>Se([e.id]),...qn(fe.deleteForever),children:Ee.deleteForever})]}),nn&&Te&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",leftIcon:Z.external,onClick:()=>Te({kind:"render",id:e.id}),children:Ee.openInDesign}),he&&/* @__PURE__ */V(f,{items:he})]})},wl=mn?mn.private?Ee.privateNoPick:mn.pickDisabledReason:void 0,Cl=Ke?/* @__PURE__ */B("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
|
|
19
|
+
/* @__PURE__ */V("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:mn?Ee.oneChosen(mn.name):Ee.noneChosen}),
|
|
20
|
+
/* @__PURE__ */B("div",{className:"flex gap-2",children:[Pe&&/* @__PURE__ */V(z,{variant:"secondary",size:"sm",onClick:Pe,children:Ee.cancel}),
|
|
21
|
+
/* @__PURE__ */V(z,{variant:"primary",size:"sm",disabled:!mn,...qn(wl),onClick:()=>{mn&&!wl&&Oe?.(mn)},children:Ee.chooseImage})]})]}):null,xl=Be&&!!mn,Nl=/* @__PURE__ */B("div",{className:"flex min-w-0 flex-col gap-3",children:[Me&&/* @__PURE__ */V(x,{tone:"neutral",children:Me}),
|
|
22
|
+
/* @__PURE__ */B("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
|
|
23
|
+
/* @__PURE__ */V(d,{items:Wn}),_n]}),ll,yl,
|
|
24
|
+
/* @__PURE__ */B("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Be&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),cn.selectAll()):"Escape"===e.key&&cn.size&&cn.clear()},children:[fl,
|
|
25
|
+
/* @__PURE__ */V(a,{rect:ul.rect})]}),$n&&/* @__PURE__ */V("input",{...Qn.inputProps}),
|
|
26
|
+
/* @__PURE__ */V(S,{rejections:Qn.rejections})]});/* @__PURE__ */
|
|
27
|
+
return B("div",{ref:Re,"data-media-library":"","data-layout":Xe?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Le}`.trim(),children:[/* @__PURE__ */B("div",Xe?{className:"flex flex-col gap-3 p-3",children:[Gn,Nl]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
|
|
28
|
+
/* @__PURE__ */V("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:Gn}),
|
|
29
|
+
/* @__PURE__ */V("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Nl}),xl&&/* @__PURE__ */V("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:bl(mn)})]}),Cl,Xe&&/* @__PURE__ */V(o,{open:xl,onClose:cn.clear,side:"bottom",title:mn?.name,children:mn&&bl(mn)}),jn.state&&/* @__PURE__ */V(C,{...jn.props,items:Sn(jn.state.data)}),null!=Nn&&ie.length>0&&/* @__PURE__ */V(r,{images:ie.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Nn,ie.length-1),onClose:()=>In(null)})]})}export{X as MEDIA_FILES_DRAG_TYPE,J as MEDIA_FILE_DRAG_TYPE,H as MEDIA_FOLDER_DRAG_TYPE,Y as MediaLibrary,G as readMediaFileDrag};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-
|
|
1
|
+
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as n}from"./chunk-TZFNWAED.js";import{ItemCount as r}from"./chunk-GMRZX2ET.js";import{Icon as l}from"./chunk-FSPFV4MI.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-X2PZMXDP.js";import{useId as o,useRef as c,useEffect as s,Children as u,isValidElement as d}from"react";import{jsx as m,jsxs as h,Fragment as p}from"react/jsx-runtime";function f({children:e,count:t,countLabel:n}){return null==t?/* @__PURE__ */m("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */h("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
|
|
2
2
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate",children:e}),
|
|
3
|
-
/* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),
|
|
3
|
+
/* @__PURE__ */m(r,{count:t,label:n,showZero:!0})]})}function b(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-accent-tint font-medium text-blue-700":"border-line text-ink hover:bg-gray-100")}function x({label:l,count:a,countLabel:u,active:d,onClick:f,icon:x,trailing:g,severity:w,depth:k=0}){const y=t(w,"SidebarNavItem"),v=i().severity,N=y?n(y,v):void 0,j=e(),S=o(),I=c(null),C=c(l);C.current=l,s(()=>{if(j&&d)return j.report(S,()=>C.current,I.current)},[j,d,S]);const Z=/* @__PURE__ */h(p,{children:[null!=x&&/* @__PURE__ */m("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:x}),y&&
|
|
4
4
|
/* @__PURE__ */m("span",{"aria-hidden":"true",title:N,className:`shrink-0 h-1.5 w-1.5 rounded-full ${y.fill}`}),
|
|
5
5
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof l?l:void 0,children:l}),y&&/* @__PURE__ */m("span",{className:"sr-only",children:N}),null!=a&&/* @__PURE__ */m(r,{count:a,label:u,active:d}),null!=g&&/* @__PURE__ */m("span",{className:"shrink-0",children:g})]});/* @__PURE__ */
|
|
6
|
-
return m("button",1===k?{ref:
|
|
6
|
+
return m("button",1===k?{ref:I,type:"button",onClick:f,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */m("span",{className:b(d),children:Z})}:{ref:I,type:"button",onClick:f,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(d?"bg-accent-tint font-medium text-blue-700":"text-ink hover:bg-gray-100"),children:Z})}function g({label:e,count:t,countLabel:n,children:i,defaultExpanded:c=!0,storageKey:s}){const p=o(),[f,b]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return c},c),x=!f&&u.toArray(i).some(e=>d(e)&&!0===e.props.active);/* @__PURE__ */
|
|
7
7
|
return h("div",{children:[
|
|
8
8
|
/* @__PURE__ */h("button",{type:"button",onClick:()=>{const e=!f;if(b(e),s)try{window.localStorage.setItem(s,e?"1":"0")}catch{}},"aria-expanded":f,"aria-controls":p,className:"flex w-full items-center gap-2 rounded-lg h-8 px-3 text-sm font-medium text-left "+(x?"bg-accent-tint text-blue-700":"text-ink-strong hover:bg-gray-100"),children:[
|
|
9
9
|
/* @__PURE__ */m("span",{className:"min-w-0 truncate",title:e,children:e}),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as t}from"./chunk-X2PZMXDP.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
|
|
2
2
|
return r("div",{className:`flex flex-col items-center justify-center text-center ${"card"===h?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===h?"px-6 py-12":"rounded-lg border-2 border-dashed border-gray-300 px-6 py-12"}`,children:[x&&/* @__PURE__ */a("div",{className:"mb-3 flex h-10 w-10 items-center justify-center text-gray-300","aria-hidden":"true",children:x}),p&&/* @__PURE__ */a(e,{name:"inbox",className:"h-10 w-10 text-gray-300 mb-3","aria-hidden":"true",strokeWidth:1}),n&&/* @__PURE__ */a("h3",{className:"text-sm font-medium text-gray-900",children:n}),y&&/* @__PURE__ */a("p",{className:"text-sm text-gray-500 "+(n?"mt-2":""),children:y}),f&&/* @__PURE__ */a("p",{className:"text-xs text-gray-400 mt-1",children:f}),l&&/* @__PURE__ */a("div",{className:"mt-4",children:l})]})}export{n as EmptyState};
|
|
@@ -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{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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{InputNumber_default as a}from"./chunk-
|
|
1
|
+
import{InputNumber_default as a}from"./chunk-6TCJOVFX.js";import{Icon as e}from"./chunk-FSPFV4MI.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
|
|
2
2
|
return r("div",{role:"group","aria-label":e,className:"grid min-w-0 grid-cols-2 gap-2",children:[u("x"),u("y")]})}export{s as PositionInput};
|
|
@@ -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,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,4 +1,4 @@
|
|
|
1
|
-
import{Segmented as e}from"./chunk-CKPVXDKX.js";import{ColorPicker as t}from"./chunk-
|
|
2
|
-
return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[C("left",b.sides.left,h.left,
|
|
1
|
+
import{Segmented as e}from"./chunk-CKPVXDKX.js";import{ColorPicker as t}from"./chunk-ME4VRJMK.js";import{InputNumber_default as l}from"./chunk-6TCJOVFX.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{jsxs as a,Fragment as o,jsx as i}from"react/jsx-runtime";var s=["solid","dashed","dotted"],n=["top","right","bottom","left"];function d(e){const t=e??{},l="number"==typeof t.width?t.width:0;return Object.fromEntries(n.map(e=>[e,"number"==typeof t[e]?t[e]:l]))}function m(e,t){const l=e??{},r=d(t),a=n.some(e=>"number"==typeof l[e]),o=n.map(e=>"number"==typeof l[e]?l[e]:"number"==typeof l.width?l.width:a?0:r[e]);return!o.every(e=>e===o[0])}var c="h-3.5 w-3.5",h={all:/* @__PURE__ */i(r,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */i(r,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */i(r,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */i(r,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */i(r,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */i(r,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */i(r,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */i(r,{name:"line-dotted","aria-hidden":"true",className:c})};function u({label:r,value:d,onChange:m,each:c,placeholder:u,presets:f,words:b,widths:w=!0,styles:y=!0,min:g=0,max:v=20,step:N=1,readOnly:x}){const j=e=>"number"==typeof d[e]?d[e]:null,k=(e,t)=>{const l={...d};if("number"==typeof d.width)for(const e of n)null===j(e)&&(l[e]=d.width);l[e]=t,delete l.width,m(l)},C=(e,t,r,a,o,s)=>/* @__PURE__ */i("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */i(l,{value:a,onChange:s,min:g,max:v,step:N,precision:0,steppers:"compact",readOnly:x,placeholder:o,prefix:r,suffix:b.unit,"aria-label":t})}),S=n.map(j),O="number"==typeof d.width?d.width:S.every(e=>null!==e&&e===S[0])?S[0]:null,V=null===O&&S.some(e=>null!==e),F=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",K=e=>j(e)??("number"==typeof d.width?d.width:null),M=d.style??u.style;/* @__PURE__ */
|
|
2
|
+
return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[C("left",b.sides.left,h.left,K("left"),String(u.sides.left),e=>k("left",e)),C("top",b.sides.top,h.top,K("top"),String(u.sides.top),e=>k("top",e)),C("right",b.sides.right,h.right,K("right"),String(u.sides.right),e=>k("right",e)),C("bottom",b.sides.bottom,h.bottom,K("bottom"),String(u.sides.bottom),e=>k("bottom",e))]}):C("all",b.width,h.all,O,V?"–":F,e=>{const t={...d,width:e};for(const e of n)delete t[e];m(t)}):null,y&&/* @__PURE__ */i("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */i(e,{block:!0,size:"sm",label:b.style,value:M,onChange:e=>{x||m({...d,style:e})},options:s.map(e=>({value:e,label:/* @__PURE__ */a(o,{children:[p[e],
|
|
3
3
|
/* @__PURE__ */i("span",{className:"sr-only",children:b.styles[e]})]}),title:b.styles[e]}))})}),
|
|
4
4
|
/* @__PURE__ */i("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */i(t,{value:d.color??"",onChange:e=>{x||m({...d,color:e})},label:b.color,presets:f,fallback:u.color,showHexInput:!0,size:"md",disabled:x})})]})}export{s as BORDER_LINE_STYLES,u as BorderInput,d as borderSides,m as borderStartEach};
|
|
@@ -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,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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{IconButton_default as e}from"./chunk-RUTUVS4H.js";import{Icon as t}from"./chunk-FSPFV4MI.js";import{Tooltip as r}from"./chunk-BCDG4N6L.js";import{useShellStrings as o}from"./chunk-
|
|
1
|
+
import{IconButton_default as e}from"./chunk-RUTUVS4H.js";import{Icon as t}from"./chunk-FSPFV4MI.js";import{Tooltip as r}from"./chunk-BCDG4N6L.js";import{useShellStrings as o}from"./chunk-X2PZMXDP.js";import{useId as i}from"react";import{jsxs as n,jsx as a}from"react/jsx-runtime";var s=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function d({label:d,onReset:l,view:c="desktop",detail:b,disabled:m}){const f=o().settingView,u=i(),p="desktop"===c,h=p?f.resetName(d):f.inheritName(d),k=b?f.backTo(b):p?f.backToDefault:f.backToAuto;
|
|
2
2
|
/* @__PURE__ */
|
|
3
3
|
return n(r,{content:f.tip(h,k),describe:!1,children:[
|
|
4
4
|
/* @__PURE__ */a(e,{size:"sm","aria-label":h,"aria-describedby":u,disabled:m,className:"relative before:absolute before:-top-2.5 before:-bottom-2.5 before:-left-1 before:-right-4",onClick:e=>{l(),function(e){const t=e.currentTarget,r=t.closest("[data-setting-reset]")??t;let o=r.parentElement;for(let e=0;o&&e<4;e+=1,o=o.parentElement){const e=[...o.querySelectorAll(s)].find(e=>!r.contains(e)&&!e.closest('[aria-hidden="true"]'));if(e)return void e.focus()}}(e)},children:/* @__PURE__ */a(t,{name:"revert",size:16,"aria-hidden":"true"})}),
|