efficient-shell 9.9.1 → 9.10.1
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/dist/{Browser-GQ2ZK4PR.js → Browser-4SQ4P24B.js} +14 -14
- package/dist/Calculator-6NA35GFS.js +29 -0
- package/dist/{CurrencyConverter-SSR2XDIC.js → CurrencyConverter-EDEJOKHC.js} +8 -8
- package/dist/{Documents-5AC4WSNK.js → Documents-4TQFZOMU.js} +9 -9
- package/dist/Files-GGJYYELO.js +88 -0
- package/dist/{Notepad-EUIQXFUA.js → Notepad-JRRC5U3N.js} +10 -10
- package/dist/{PdfViewer-XSISAJZP.js → PdfViewer-FFQOKKFW.js} +1 -1
- package/dist/{PomodoroTimer-EV6D4OFU.js → PomodoroTimer-HCLT2JVD.js} +24 -24
- package/dist/{Preview-QK5HYJ6U.js → Preview-FFHAUR6X.js} +16 -16
- package/dist/Sidebar-BBZ7UFYQ.js +43 -0
- package/dist/{Spreadsheet-HR6GBICY.js → Spreadsheet-QTTDPD3U.js} +14 -14
- package/dist/{Stock-6ZIQHGPH.js → Stock-3IBS63UR.js} +3 -3
- package/dist/{Weather-II7NFRMK.js → Weather-EFIIVKFE.js} +17 -17
- package/dist/{WorldClock-NBLNO63Q.js → WorldClock-ERQQ4VWP.js} +6 -6
- package/dist/ai/index.js +35 -35
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.d.ts +24 -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.d.ts +4 -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.d.ts +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/charts/types.d.ts +35 -1
- package/dist/{chunk-7WGOLPGM.js → chunk-2AHLONPR.js} +1 -1
- package/dist/{chunk-2MLRK7IO.js → chunk-2GPHHW7C.js} +4 -4
- package/dist/{chunk-Y44ABEW3.js → chunk-2J2OU65F.js} +2 -2
- package/dist/{chunk-P3OBE43Q.js → chunk-2LDOLQ7F.js} +6 -6
- package/dist/{chunk-EFFF3FCS.js → chunk-2SJDTKQA.js} +19 -19
- package/dist/{chunk-SC63O7AL.js → chunk-3C4RNMN4.js} +1 -1
- package/dist/{chunk-HQMN5THW.js → chunk-3FBYM6O5.js} +14 -14
- package/dist/{chunk-EXNAAHN4.js → chunk-3MHBALGV.js} +2 -2
- package/dist/{chunk-CJB73MHF.js → chunk-3XRBVYTO.js} +2 -2
- package/dist/{chunk-BVTNGW5S.js → chunk-46YVA2BF.js} +1 -1
- package/dist/{chunk-CO5RKOVX.js → chunk-4DBPKTVX.js} +16 -16
- package/dist/{chunk-XD34TCRG.js → chunk-4XZXY2AF.js} +1 -1
- package/dist/{chunk-732XHVR4.js → chunk-4YZZYB42.js} +3 -3
- package/dist/{chunk-6JU3WQOR.js → chunk-4ZKTUUQK.js} +1 -1
- package/dist/{chunk-5JRL5LXD.js → chunk-5AWV5R6E.js} +6 -6
- package/dist/{chunk-PYLNMN6E.js → chunk-5CVQN2BR.js} +8 -8
- package/dist/{chunk-RWJCKZEY.js → chunk-5Q3PFKB5.js} +1 -1
- package/dist/{chunk-LUWRPPJA.js → chunk-5R6RNUDB.js} +5 -5
- package/dist/{chunk-WUKN5WUM.js → chunk-5RAOFJYT.js} +6 -6
- package/dist/{chunk-ZAU2HIRH.js → chunk-5XNN2SSR.js} +4 -4
- package/dist/{chunk-O5LQBBW2.js → chunk-5Y6LGPZI.js} +7 -7
- package/dist/{chunk-2HEJDLPP.js → chunk-5ZGL2BRZ.js} +2 -2
- package/dist/{chunk-3APSMJPN.js → chunk-64R3IYAM.js} +1 -1
- package/dist/{chunk-Z3JW77LH.js → chunk-65DYHG73.js} +1 -1
- package/dist/{chunk-DZTAGMNY.js → chunk-6FI3HVUR.js} +42 -42
- package/dist/{chunk-5VOVNIOU.js → chunk-6O2W4X2V.js} +1 -1
- package/dist/{chunk-VVGL5O4F.js → chunk-6TRE326A.js} +6 -6
- package/dist/chunk-7BYBGPWU.js +9 -0
- package/dist/chunk-7DMTFIQN.js +11 -0
- package/dist/{chunk-OV2SWQPT.js → chunk-7JJUI52C.js} +1 -1
- package/dist/{chunk-IMOPDLMA.js → chunk-7WLFHDWA.js} +1 -1
- package/dist/chunk-7YZJLFAK.js +11 -0
- package/dist/{chunk-56RAOI7O.js → chunk-AG63JVX7.js} +6 -6
- package/dist/{chunk-ZTL2RPNY.js → chunk-AOSLOKAL.js} +1 -1
- package/dist/chunk-AVAYZK3Z.js +3 -0
- package/dist/{chunk-6MVHRNWC.js → chunk-BF7PZFKT.js} +1 -1
- package/dist/{chunk-IJWFKUYA.js → chunk-BJONHLET.js} +4 -4
- package/dist/{chunk-H7MJM2WI.js → chunk-BJWPPUM6.js} +2 -2
- package/dist/{chunk-B4KMHEFZ.js → chunk-BNKULSCG.js} +1 -1
- package/dist/{chunk-VG2R6PZV.js → chunk-BYHKYYL6.js} +1 -1
- package/dist/chunk-CBMXYXBH.js +15 -0
- package/dist/{chunk-GVC535IA.js → chunk-D4KZOYXQ.js} +1 -1
- package/dist/chunk-D7JY2KHG.js +7 -0
- package/dist/{chunk-PDXPMHG3.js → chunk-DRNB7KDC.js} +1 -1
- package/dist/{chunk-U5N6PSXO.js → chunk-E6EUGQGA.js} +5 -5
- package/dist/{chunk-N3JXHNID.js → chunk-E72USUUR.js} +10 -10
- package/dist/{chunk-C4UL2UNR.js → chunk-EOWOVR55.js} +1 -1
- package/dist/{chunk-GS5AISRS.js → chunk-ERLZDA75.js} +2 -2
- package/dist/{chunk-CE5BARZI.js → chunk-EWJELWIT.js} +3 -3
- package/dist/chunk-F52WQG3M.js +9 -0
- package/dist/{chunk-OQ2EDMB2.js → chunk-FEPBXJUR.js} +1 -1
- package/dist/{chunk-BWUU565Y.js → chunk-FKA6ZVQO.js} +9 -9
- package/dist/chunk-FLXIPEWL.js +2 -0
- package/dist/{chunk-RULVWW4A.js → chunk-FVDX6ZSZ.js} +6 -6
- package/dist/{chunk-CRXFSN5K.js → chunk-G6LOKIFC.js} +11 -11
- package/dist/{chunk-LNQVTH5S.js → chunk-GP5UNEKY.js} +1 -1
- package/dist/{chunk-P3DTYFMC.js → chunk-GSKWYMM4.js} +2 -2
- package/dist/{chunk-EW3L4W2I.js → chunk-GVAWCTJN.js} +8 -8
- package/dist/{chunk-X7PM7JOD.js → chunk-H2XCQJRG.js} +1 -1
- package/dist/{chunk-FBUUXK5G.js → chunk-H4YFANH5.js} +1 -1
- package/dist/{chunk-FPGRKHUW.js → chunk-HAFB45DT.js} +7 -7
- package/dist/{chunk-ZYDZY6ED.js → chunk-HMG5TW2R.js} +1 -1
- package/dist/{chunk-442FFHQJ.js → chunk-HRAK46H7.js} +12 -12
- package/dist/chunk-I5XVZLDH.js +14 -0
- package/dist/{chunk-CXMTDYVI.js → chunk-IENPHB5B.js} +1 -1
- package/dist/{chunk-QZKWIVZW.js → chunk-IK332TWA.js} +1 -1
- package/dist/{chunk-JKDEE35P.js → chunk-IZQ3XTD2.js} +1 -1
- package/dist/{chunk-IB4333CI.js → chunk-JECMVR4S.js} +7 -7
- package/dist/{chunk-ZHHEMSOD.js → chunk-JENEVLJU.js} +2 -2
- package/dist/{chunk-MWIT4UN2.js → chunk-JGDLTIOX.js} +9 -9
- package/dist/{chunk-6ZHX56NM.js → chunk-JQDRM6UK.js} +1 -1
- package/dist/{chunk-QC6OK3ED.js → chunk-JVYSRH6U.js} +1 -1
- package/dist/{chunk-XS4HFUTW.js → chunk-JWX7QRGE.js} +1 -1
- package/dist/{chunk-5VRMQTKV.js → chunk-KAHYUBXM.js} +7 -7
- package/dist/{chunk-YWGC7J6B.js → chunk-KECOZKJU.js} +7 -7
- package/dist/{chunk-WH3JHMEA.js → chunk-KJHXCVNI.js} +5 -5
- package/dist/{chunk-NHVXVHUR.js → chunk-KQSUSVMF.js} +17 -17
- package/dist/{chunk-BBEOFKLY.js → chunk-KTRNAMHY.js} +1 -1
- package/dist/chunk-LFPJ263N.js +6 -0
- package/dist/chunk-LFSCENKW.js +1 -0
- package/dist/{chunk-F4DIVARP.js → chunk-LYX55RI3.js} +1 -1
- package/dist/{chunk-XZYAFTW4.js → chunk-M5MAIJQQ.js} +4 -4
- package/dist/{chunk-XNWQ72WA.js → chunk-MCMUJDEP.js} +1 -1
- package/dist/{chunk-UE4PVCA5.js → chunk-MLPIJMOV.js} +2 -2
- package/dist/{chunk-ZOHQVSB3.js → chunk-MUHWI4GK.js} +12 -12
- package/dist/chunk-N3CTLEJS.js +9 -0
- package/dist/{chunk-HJWTWS5E.js → chunk-N52D37FS.js} +5 -5
- package/dist/{chunk-P4XTWAKJ.js → chunk-NCRLKFXD.js} +1 -1
- package/dist/{chunk-43ONX6UZ.js → chunk-NGQHXTUK.js} +1 -1
- package/dist/{chunk-SOP447EP.js → chunk-NRGBXEBU.js} +1 -1
- package/dist/{chunk-IQWIYZB5.js → chunk-NU2YQSOP.js} +2 -2
- package/dist/chunk-NUTVIQAV.js +8 -0
- package/dist/{chunk-EGAV5LSX.js → chunk-O25B75XX.js} +1 -1
- package/dist/{chunk-JS6ZSEZJ.js → chunk-O426Q7KC.js} +1 -1
- package/dist/{chunk-CAG3TSV2.js → chunk-O4NPQ23Q.js} +1 -1
- package/dist/{chunk-IJIESSTX.js → chunk-O56CY36U.js} +4 -4
- package/dist/chunk-OEFMBTDH.js +6 -0
- package/dist/{chunk-B6YOP2IX.js → chunk-OVDHEMLK.js} +5 -5
- package/dist/{chunk-ENL5L6NR.js → chunk-P65C5TUU.js} +1 -1
- package/dist/chunk-P6SATWL5.js +22 -0
- package/dist/chunk-PEM7UXQ3.js +1 -0
- package/dist/{chunk-FLEG5KP5.js → chunk-PWBLGKQ3.js} +5 -5
- package/dist/chunk-QCFN3ET4.js +9 -0
- package/dist/{chunk-F7F6Z64G.js → chunk-QLOKT22X.js} +1 -1
- package/dist/{chunk-IK2WXW2E.js → chunk-QLYOGT3U.js} +13 -13
- package/dist/{chunk-N7T63BVD.js → chunk-QMYQ4B5A.js} +3 -3
- package/dist/{chunk-EWVOGTEX.js → chunk-QSUQC4AN.js} +1 -1
- package/dist/{chunk-RDKBMX6U.js → chunk-QXK2HO4Q.js} +1 -1
- package/dist/{chunk-DNWV6N4P.js → chunk-R6R57BWQ.js} +4 -4
- package/dist/{chunk-M5GMIQ47.js → chunk-R7JTTKG2.js} +3 -3
- package/dist/{chunk-JIW5CJXC.js → chunk-RISKWWMD.js} +3 -3
- package/dist/{chunk-AGUA3O5O.js → chunk-RLLONZJJ.js} +1 -1
- package/dist/chunk-RSHNWBW2.js +4 -0
- package/dist/{chunk-24K6GVNM.js → chunk-SAHQB2JD.js} +17 -17
- package/dist/chunk-SC6HJBQA.js +8 -0
- package/dist/{chunk-OUSKOWNP.js → chunk-SGR4V5YI.js} +3 -3
- package/dist/chunk-SYH7EPLF.js +29 -0
- package/dist/{chunk-CVNJSD2J.js → chunk-T2ITXX7R.js} +6 -6
- package/dist/chunk-T76X2SHR.js +4 -0
- package/dist/{chunk-ARWMJSQJ.js → chunk-T7O2TNNX.js} +1 -1
- package/dist/{chunk-ANFLQSGX.js → chunk-TQH6E5V2.js} +1 -1
- package/dist/{chunk-KEK47CP3.js → chunk-TRUPMMDJ.js} +9 -9
- package/dist/chunk-UAECFZRW.js +8 -0
- package/dist/{chunk-L67VXJMF.js → chunk-UL4G6JY2.js} +1 -1
- package/dist/{chunk-E4E7MACR.js → chunk-UZGVIHFI.js} +14 -14
- package/dist/{chunk-DWBZ3Z34.js → chunk-V5QEPNPK.js} +2 -2
- package/dist/{chunk-MV6WDGB6.js → chunk-VANJPZ3H.js} +1 -1
- package/dist/{chunk-VVAJ23SD.js → chunk-VBNA237H.js} +1 -1
- package/dist/chunk-VVZE27M4.js +7 -0
- package/dist/{chunk-2R3BVU75.js → chunk-VZV7Q5V2.js} +1 -1
- package/dist/{chunk-BCUQXILM.js → chunk-WZQCRTXF.js} +1 -1
- package/dist/chunk-X4BKHXU5.js +9 -0
- package/dist/{chunk-UKDJUYIV.js → chunk-XI45TSEK.js} +1 -1
- package/dist/{chunk-IGNZULKG.js → chunk-YBU7NOD7.js} +1 -1
- package/dist/{chunk-QSJR7EI7.js → chunk-YQB5OYDC.js} +1 -1
- package/dist/{chunk-TVL3JPMY.js → chunk-YWR2WRDR.js} +1 -1
- package/dist/{chunk-FLQZ7GQ3.js → chunk-Z3CYLDHB.js} +11 -11
- package/dist/{chunk-K4D63NP3.js → chunk-ZC3CCRPG.js} +7 -7
- package/dist/{chunk-IPTCV6CQ.js → chunk-ZPW3KQ27.js} +30 -30
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/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/icons/index.js +1 -1
- package/dist/index.js +168 -168
- 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/ContextMenu.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.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/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +6 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-CSYRZAS5.js +0 -29
- package/dist/Files-4SD6LLKX.js +0 -88
- package/dist/Sidebar-Y4DTQYW2.js +0 -43
- package/dist/chunk-5SJ45P5E.js +0 -8
- package/dist/chunk-6453ISTQ.js +0 -4
- package/dist/chunk-D7IXMMZT.js +0 -9
- package/dist/chunk-FKNJSD6B.js +0 -14
- package/dist/chunk-G4EVQD5U.js +0 -8
- package/dist/chunk-G6CTTBKE.js +0 -9
- package/dist/chunk-HUF34LSW.js +0 -15
- package/dist/chunk-IMA5SXEC.js +0 -2
- package/dist/chunk-IX6QMUJQ.js +0 -9
- package/dist/chunk-JKHWZ2ZY.js +0 -19
- package/dist/chunk-KWT6GT4M.js +0 -29
- package/dist/chunk-LB3A53D5.js +0 -8
- package/dist/chunk-MG7A3R75.js +0 -1
- package/dist/chunk-N45ACN3G.js +0 -6
- package/dist/chunk-OX2DOOOI.js +0 -8
- package/dist/chunk-PDB5W7VI.js +0 -6
- package/dist/chunk-POCQ7ZL4.js +0 -3
- package/dist/chunk-PVR4KU7H.js +0 -7
- package/dist/chunk-Q7KTTDUS.js +0 -11
- package/dist/chunk-QWHQJNKL.js +0 -1
- package/dist/chunk-RC6UHOAV.js +0 -4
- package/dist/chunk-TNTQL6SX.js +0 -1
- package/dist/chunk-TTHWXGT7.js +0 -11
- package/dist/chunk-WE7CYRZT.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
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:[
|
|
1
|
+
import{Segmented as e}from"./chunk-CKPVXDKX.js";import{ColorPicker as t}from"./chunk-Z3CYLDHB.js";import{InputNumber_default as l}from"./chunk-JENEVLJU.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),E="number"==typeof d.width?d.width:S.every(e=>null!==e&&e===S[0])?S[0]:null,O=null===E&&S.some(e=>null!==e),V=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",z=e=>j(e)??("number"==typeof d.width?d.width:null),D=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,z("left"),String(u.sides.left),e=>k("left",e)),C("top",b.sides.top,h.top,z("top"),String(u.sides.top),e=>k("top",e)),C("right",b.sides.right,h.right,z("right"),String(u.sides.right),e=>k("right",e)),C("bottom",b.sides.bottom,h.bottom,z("bottom"),String(u.sides.bottom),e=>k("bottom",e))]}):C("all",b.width,h.all,E,O?"–":V,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:D,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
|
-
/* @__PURE__ */i("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */i(
|
|
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{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-FSPFV4MI.js";import{useShellStrings as r}from"./chunk-PEM7UXQ3.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check",...t});case"error":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"error",...t});default:/* @__PURE__ */
|
|
@@ -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-PEM7UXQ3.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:E}=r(),L=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",L),0===L.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const T=Math.max(...L.map(e=>e.depth))+1,F=f/2,P=f/2,R=(f/2-8-b)/T,U=L.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),z=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,A=e=>null!==w?e.id===w:null===E||e.branchKey===E,B=w?L.find(e=>e.id===w):void 0,H=e=>c(e.value/U*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(U),T),onMouseLeave:()=>C(null),children:[L.map(e=>/* @__PURE__ */s("path",{d:t(F,P,b+e.depth*R+v/2,b+(e.depth+1)*R-v/2,e.start,e.end),fill:z(e),fillOpacity:A(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>C(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:F,y:P+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),B&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:B.label,rows:[{key:"value",label:M.value,color:z(B),value:j(B.value)},{key:"share",label:M.share,color:a.muted,value:H(B)}]})}),
|
|
4
|
+
/* @__PURE__ */s(e,{caption:M.sunburst(j(U),T),head:[M.tableLevel,M.tableItem,M.value,M.share],rows:L.map(e=>[e.depth+1,e.label,j(e.value),H(e)])})]})}export{f as SunburstChart};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import{useCopyText as e,CopyGlyph as t}from"./chunk-
|
|
1
|
+
import{useCopyText as e,CopyGlyph as t}from"./chunk-BYHKYYL6.js";import{ItemCount as n}from"./chunk-DRNB7KDC.js";import{PopupMenu as r,PopupMenuItem as i,PopupMenuDivider as l}from"./chunk-HAFB45DT.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{useShellStrings as a}from"./chunk-PEM7UXQ3.js";import{useState as s,useMemo as d,useRef as c,useEffect as u,Fragment as m,useLayoutEffect as f}from"react";import{jsxs as p,jsx as y,Fragment as h}from"react/jsx-runtime";function g(e){const t=[];let n=0;for(;n<e.length;){const r=e[n].group;let i=n;for(;void 0!==r&&i+1<e.length&&e[i+1].group===r;)i++;t.push(i>n?{group:r,start:n,end:i}:{start:n,end:n}),n=i+1}return t}function b(e,t){return e.find(e=>t>=e.start&&t<=e.end)}function k(e,t,n,r){const i=e.findIndex(e=>e.key===t.key);let l=e.findIndex(e=>e.key===n);if(i<0||l<0)return null;const o=g(e),a=b(o,i),s="group"===t.kind&&void 0!==a.group?e.slice(a.start,a.end+1).map(e=>e.key):[t.key];if(s.includes(n))return null;const d=b(o,l);if("tab"===t.kind&&void 0!==a.group){if(d!==a)return null}else void 0!==d.group&&(l="before"===r?d.start:d.end);return{key:e[l].key,side:r,moving:s}}function x(e,t,n,r){const i=k(e,t,n,r);if(!i)return null;const l=e.map(e=>e.key).filter(e=>!i.moving.includes(e)),o=l.indexOf(i.key)+("after"===i.side?1:0),a=[...l.slice(0,o),...i.moving,...l.slice(o)];return a.every((t,n)=>t===e[n].key)?null:a}var v="flex-[0_1_15rem]",w=v,N="outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-500";function C(){/* @__PURE__ */
|
|
2
2
|
return y(o,{name:"close",look:"mini","aria-hidden":"true",className:"size-3.5"})}function $({text:n,label:r,copiedLabel:i}){const{copied:l,copy:o}=e(n);/* @__PURE__ */
|
|
3
|
-
return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(t,{copied:l,className:"size-3.5"})})}function z({node:e}){const t=c(null);return f(()=>{const n=t.current;if(n)return n.appendChild(e),()=>{e.parentNode===n&&n.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:t,className:"ml-1 flex shrink-0 items-center"})}function I({tabs:e,activeKey:t,idFor:f,panelMounted:b,onActivate:I,onClose:
|
|
3
|
+
return y("button",{type:"button",tabIndex:-1,"aria-label":l?i:r,title:l?i:r,onClick:o,className:"flex size-5 shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 @max-[10rem]:hidden",children:/* @__PURE__ */y(t,{copied:l,className:"size-3.5"})})}function z({node:e}){const t=c(null);return f(()=>{const n=t.current;if(n)return n.appendChild(e),()=>{e.parentNode===n&&n.removeChild(e)}},[e]),/* @__PURE__ */y("span",{ref:t,className:"ml-1 flex shrink-0 items-center"})}function I({tabs:e,activeKey:t,idFor:f,panelMounted:b,onActivate:I,onClose:D,onCloseMany:j,label:T,className:A,activeClassName:B,end:M,afterPinned:E,onIconMenu:_,menuItems:K,sizing:R="even",tall:S=!1,onReorder:F,groupInfo:L}){const O=a().pageTabs,Y=a().count,[H,P]=s(null),X=S?"h-[34px]":"h-8",V=d(()=>e.map(e=>({key:e.key,group:L?e.group:void 0})),[e,L]),W=d(()=>g(V),[V]),[Q,U]=s(()=>/* @__PURE__ */new Set),q=e=>U(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),G=d(()=>{const n=[];for(const r of W)for(let i=r.start;i<=r.end;i++)void 0!==r.group&&Q.has(r.group)&&e[i].key!==t||n.push(e[i]);return n},[W,Q,e,t]),J=c(null),[Z,ee]=s(null),te=(t,n)=>F?{draggable:!0,onDragStart:n=>{J.current=t,n.dataTransfer.effectAllowed="move",n.dataTransfer.setData("text/plain",e.find(e=>e.key===t.key)?.title??"")},onDragOver:e=>{const r=J.current;if(!r)return;const i=e.currentTarget.getBoundingClientRect(),l=n!==t.key||"tab"===t.kind?e.clientX<i.left+i.width/2?"before":"after":"before",o=x(V,r,n,l)?k(V,r,n,l):null;o?(e.preventDefault(),e.dataTransfer.dropEffect="move",Z?.key===o.key&&Z.side===o.side||ee({key:o.key,side:o.side})):Z&&ee(null)},onDrop:e=>{const t=J.current;if(!t||!Z)return;e.preventDefault();const n=x(V,t,Z.key,Z.side);J.current=null,ee(null),n&&F(n)},onDragEnd:()=>{J.current=null,ee(null)}}:{},ne=d(()=>new Set(W.filter(e=>void 0!==e.group&&L).map(t=>e[t.start].key)),[W,e,L]),re=e=>"pointer-events-none absolute inset-y-1 z-[3] w-0.5 rounded-full bg-blue-500 "+("before"===e?"-left-px":"-right-px"),ie=e=>Z?.key===e&&!("before"===Z.side&&ne.has(e))&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:re(Z.side)}),le=e.length;u(()=>{if(!t)return;const e=document.getElementById(f(t,"tab"));e?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[f,t,le]);const oe=E?G.findIndex(e=>!e.pinned):-1,ae=G.some(e=>e.key===t)?t:G[0]?.key,se=e=>{const t=G[(e+G.length)%G.length];t&&document.getElementById(f(t.key,"tab"))?.focus()},de=(e,t)=>{const n=G[e+t];if(!F||!n)return;const r=x(V,{kind:"tab",key:G[e].key},n.key,t<0?"before":"after");r&&(F(r),setTimeout(()=>document.getElementById(f(G[e].key,"tab"))?.focus(),0))},ce=H?e.find(e=>e.key===H.key):void 0,ue=ce&&K?K(ce.key):[],me=ce?e.indexOf(ce):-1,fe=e=>e.some(e=>!e.pinned),pe=e=>()=>{P(null),e()},ye=(e,n)=>{const r=e.key===t,i=!!e.dirty,l=e.icon,a=r?B??"z-[1] border-gray-200 bg-gray-50 text-gray-900":"border-transparent text-gray-600 hover:bg-gray-200/70 hover:text-gray-900",s=!!n&&!r&&n.key!==t,d={type:"button",role:"tab",id:f(e.key,"tab"),"aria-selected":r,"aria-controls":b?.(e.key)?f(e.key,"panel"):void 0,tabIndex:e.key===ae?0:-1,title:e.title,onClick:()=>I(e.key)},c={onContextMenu:t=>((e,t)=>{e.preventDefault(),P({x:e.clientX,y:e.clientY,key:t.key})})(t,e),onAuxClick:t=>((e,t)=>{1!==e.button||t.pinned||(e.preventDefault(),D(t.key))})(t,e),onMouseDown:e=>{1===e.button&&e.preventDefault()}},u=l&&
|
|
4
4
|
/* @__PURE__ */p("span",{className:"relative flex size-4 shrink-0 items-center justify-center text-gray-500 [&>svg]:size-4","aria-hidden":"true",children:[l,i&&!r&&!e.pinned&&
|
|
5
|
-
/* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),h=r&&!!
|
|
5
|
+
/* @__PURE__ */y("span",{className:"absolute -right-1 -top-1 hidden size-2 rounded-full bg-gray-500 ring-2 ring-gray-100 @max-[6.5rem]:block @max-[6.5rem]:group-hover:hidden"})]}),h=r&&!!_&&!!l;return e.pinned?/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex flex-none items-center justify-center rounded-t-md border border-b-0 transition-colors ${X} ${l?"w-10":""} ${a}`,...c,...te({kind:"tab",key:e.key},e.key),children:[ie(e.key),
|
|
6
6
|
/* @__PURE__ */p("button",{...d,className:`flex h-full items-center justify-center rounded-t-md ${l?"w-full":"px-3"} ${N}`,children:[u,
|
|
7
7
|
/* @__PURE__ */y("span",{className:l?"sr-only":"whitespace-nowrap text-sm",children:e.title})]})]},e.key):/* @__PURE__ */p(m,{children:[s&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:"mb-3 h-4 w-px shrink-0 self-end border-l border-gray-300"}),
|
|
8
|
-
/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-md border border-b-0 text-sm transition-colors ${
|
|
9
|
-
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":
|
|
8
|
+
/* @__PURE__ */p("div",{role:"presentation",className:`group relative flex items-center rounded-t-md border border-b-0 text-sm transition-colors ${X} ${"active-full"===R&&r?"":"@container"} ${"active-full"===R?r?"flex-[0_0_15rem] min-w-0":w:r&&(e.copy||h)?"flex-[0_1_20rem]":v} ${r?"active-full"===R?"":"min-w-[4.25rem]":"min-w-[4rem]"} ${a}`,...c,...te({kind:"tab",key:e.key},e.key),children:[ie(e.key),h&&
|
|
9
|
+
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-haspopup":"menu","aria-label":O.tabMenu,title:O.tabMenu,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();_?.(e.key,n.left,n.bottom+4)},className:`ml-2 flex size-6 shrink-0 items-center justify-center rounded hover:bg-gray-200 @max-[5rem]:ml-2 ${N}`,children:u}),
|
|
10
10
|
/* @__PURE__ */p("button",{...d,className:`flex h-full min-w-0 flex-1 items-center gap-2 rounded-t-md pr-1 text-left ${h?"pl-2":"pl-3"} ${N} ${r?h?"":"@max-[5rem]:pl-3":"@max-[6.5rem]:pr-3 @max-[4.5rem]:justify-center @max-[4.5rem]:px-0 @max-[4.5rem]:group-hover:pl-2 @max-[4.5rem]:group-hover:pr-3"}`,children:[!h&&u,
|
|
11
|
-
/* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===
|
|
12
|
-
/* @__PURE__ */y("span",{role:"img","aria-label":
|
|
13
|
-
/* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":
|
|
14
|
-
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":
|
|
11
|
+
/* @__PURE__ */p("span",{className:`min-w-0 flex-1 overflow-hidden whitespace-nowrap [mask-image:linear-gradient(to_right,#000_calc(100%-1rem),transparent)] ${"active-full"===R&&r?"pr-4":""} ${l?r?"@max-[5rem]:sr-only":"@max-[4.5rem]:sr-only":""}`,children:[e.title,e.favorite&&
|
|
12
|
+
/* @__PURE__ */y("span",{role:"img","aria-label":O.favorite,title:O.favorite,className:"ml-1 inline-flex align-[-0.125em] text-yellow-500",children:/* @__PURE__ */y(o,{name:"star","aria-hidden":"true",className:"size-3.5",fill:"currentColor",strokeWidth:1.5})})]})]}),r&&e.actions&&/* @__PURE__ */y(z,{node:e.actions}),r&&e.copy&&/* @__PURE__ */y($,{text:e.copy,label:O.copy(e.copy),copiedLabel:O.copied}),
|
|
13
|
+
/* @__PURE__ */p("span",{className:"mr-2 flex size-5 shrink-0 items-center justify-center "+(r?"":"@max-[6.5rem]:hidden @max-[6.5rem]:group-hover:flex"),children:[i&&/* @__PURE__ */y("span",{role:"img","aria-label":O.unsaved,className:"size-2 rounded-full bg-gray-500 group-hover:hidden"}),
|
|
14
|
+
/* @__PURE__ */y("button",{type:"button",tabIndex:-1,"aria-label":O.closeTab?.(e.title)??`${O.close} ${e.title}`,onClick:()=>D(e.key),className:"size-5 items-center justify-center rounded text-gray-400 hover:bg-gray-200 hover:text-gray-700 "+(i?"hidden group-hover:flex":r?"flex":"flex opacity-0 group-hover:opacity-100 focus-visible:opacity-100"),children:/* @__PURE__ */y(C,{})})]})]})]},e.key)},he=[];let ge,be=0,ke=!E;for(const t of W){const r=G.filter(n=>{const r=e.indexOf(n);return r>=t.start&&r<=t.end});if(ke||be!==oe||(ke=!0,he.push(/* @__PURE__ */y(m,{children:E},"rosh-after-pinned")),ge=void 0),be+=r.length,void 0===t.group||!L){for(const e of r)he.push(ye(e,ge)),ge=e;continue}ge=void 0;const i=t.group,l=L(i),a=t.end-t.start+1,s=!Q.has(i),d=e[t.start].key;he.push(
|
|
15
15
|
/* @__PURE__ */p("div",{role:"group","aria-label":l.label,"data-tab-group":i,className:"relative mx-1 flex shrink-0 items-end first:ml-0 min-w-0",children:[
|
|
16
|
-
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":s,title:
|
|
16
|
+
/* @__PURE__ */p("button",{type:"button",tabIndex:-1,"aria-expanded":s,title:O.groupToggle(l.label,a),onClick:()=>q(i),...te({kind:"group",key:d},d),className:`relative mb-1 mr-1 flex h-6 shrink-0 items-center gap-1 rounded-full bg-blue-100 px-2 text-xs font-medium text-blue-700 hover:bg-blue-200 ${N}`,children:[
|
|
17
17
|
/* @__PURE__ */y(o,{name:s?"chevron-down":"chevron-right","aria-hidden":"true",className:"size-3",strokeWidth:2}),l.icon&&/* @__PURE__ */y("span",{className:"flex size-3.5 items-center justify-center [&>svg]:size-3.5","aria-hidden":"true",children:l.icon}),
|
|
18
18
|
/* @__PURE__ */y("span",{className:"max-w-[8rem] truncate",children:l.label}),
|
|
19
|
-
/* @__PURE__ */y(n,{count:a,label:
|
|
20
|
-
/* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-[2] h-0.5 bg-blue-500"})]},`rosh-group-${d}`))}return ke||he.push(/* @__PURE__ */y(m,{children:
|
|
19
|
+
/* @__PURE__ */y(n,{count:a,label:Y.tabs(a),active:!0})]}),Z?.key===d&&"before"===Z.side&&/* @__PURE__ */y("span",{"aria-hidden":"true",className:re("before")}),r.map((e,t)=>ye(e,t>0?r[t-1]:void 0)),
|
|
20
|
+
/* @__PURE__ */y("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 z-[2] h-0.5 bg-blue-500"})]},`rosh-group-${d}`))}return ke||he.push(/* @__PURE__ */y(m,{children:E},"rosh-after-pinned")),/* @__PURE__ */p("div",{className:A??"relative flex h-10 shrink-0 items-end gap-3 bg-gray-100 px-3",children:[
|
|
21
21
|
/* @__PURE__ */y("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 bottom-0 h-px bg-gray-200"}),
|
|
22
|
-
/* @__PURE__ */y("div",{role:"tablist","aria-label":
|
|
22
|
+
/* @__PURE__ */y("div",{role:"tablist","aria-label":T,onKeyDown:e=>{const t=G.findIndex(t=>document.getElementById(f(t.key,"tab"))===e.target);if(t<0)return;const n=e.shiftKey&&(e.ctrlKey||e.metaKey);if(n&&"ArrowRight"===e.key)de(t,1);else if(n&&"ArrowLeft"===e.key)de(t,-1);else if("ArrowRight"===e.key)se(t+1);else if("ArrowLeft"===e.key)se(t-1);else if("Home"===e.key)se(0);else if("End"===e.key)se(G.length-1);else{if("Delete"!==e.key||G[t].pinned)return;D(G[t].key)}e.preventDefault()},className:"flex min-w-0 flex-1 items-end overflow-x-auto overflow-y-hidden [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:he}),M&&/* @__PURE__ */y("div",{className:"flex shrink-0 items-center gap-2 self-center",children:M}),H&&ce&&/* @__PURE__ */p(r,{portal:!0,style:{left:H.x,top:H.y},onClose:()=>P(null),children:[ue.length>0&&/* @__PURE__ */p(h,{children:[ue.map((e,t)=>/* @__PURE__ */p(i,{onClick:pe(e.onSelect),children:[e.icon,e.label]},t)),
|
|
23
23
|
/* @__PURE__ */y(l,{})]}),
|
|
24
|
-
/* @__PURE__ */y(i,{disabled:ce.pinned,onClick:pe(()=>
|
|
24
|
+
/* @__PURE__ */y(i,{disabled:ce.pinned,onClick:pe(()=>D(ce.key)),children:O.close}),
|
|
25
25
|
/* @__PURE__ */y(l,{}),
|
|
26
|
-
/* @__PURE__ */y(i,{disabled:!fe(e.filter(e=>e.key!==ce.key)),onClick:pe(()=>
|
|
27
|
-
/* @__PURE__ */y(i,{disabled:!fe(e.slice(me+1)),onClick:pe(()=>
|
|
28
|
-
/* @__PURE__ */y(i,{disabled:!fe(e),onClick:pe(()=>
|
|
26
|
+
/* @__PURE__ */y(i,{disabled:!fe(e.filter(e=>e.key!==ce.key)),onClick:pe(()=>j("others",ce.key)),children:O.closeOthers}),
|
|
27
|
+
/* @__PURE__ */y(i,{disabled:!fe(e.slice(me+1)),onClick:pe(()=>j("right",ce.key)),children:O.closeRight}),
|
|
28
|
+
/* @__PURE__ */y(i,{disabled:!fe(e),onClick:pe(()=>j("all",null)),children:O.closeAll})]})]})}export{I as TabStrip};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{AccessibleTable as t}from"./chunk-TBPHW42V.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-TLRCTNUF.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-PEM7UXQ3.js";import{formatPlain as s}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),i=t.length>l,s=i?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(s.map((t,e)=>[t,e])),d=i?s.length:-1,m=i?[...s.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:i?t.length-s.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:k,className:v,emptyLabel:M}){const $=l().charts,w=i(),N=k??(t=>s(t,w)),j=M??$.noFlows,[y,E]=c(null),{highlighted:F}=o(),C=h(u,f,x,$.other),{labels:T,matrix:z,otherIndex:A,foldedCount:I}=C,L=(t,e)=>z[t]?.[e]??0,P=t=>t===A?r.muted:a(t),Q=C.totals,U=T.map((t,e)=>e).sort((t,e)=>Q[e]-Q[t]),H=U.reduce((t,e)=>t+Q[e],0);if(H<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:j});const O=p/2,R=p/2,V=p/2-44,W=V-b,B=g*U.length,Y=/* @__PURE__ */new Map;let S=-Math.PI/2;U.forEach((t,e)=>{const o=Q[t]/H*(2*Math.PI-B);Y.set(t,{start:S,end:S+o,slot:e}),S+=o+g});const X=/* @__PURE__ */new Map,Z=[];for(const t of U)for(const e of U){const o=L(t,e);if(o<=0)continue;const n=Y.get(t),r=o/Math.max(1,Q[t])*(n.end-n.start),a=X.get(t)??0;X.set(t,a+r),Z.push({from:t,to:e,value:o,a:n.start+a+r/2,b:Y.get(e).start+(Y.get(e).end-Y.get(e).start)/2})}const q=(t,e)=>[O+e*Math.cos(t),R+e*Math.sin(t)],D="arc"===y?.kind?y.index:void 0,G="ribbon"===y?.kind?Z[y.index]:void 0;/* @__PURE__ */
|
|
2
|
+
return m("div",{className:`relative ${v??""}`,children:[
|
|
3
|
+
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(U.length),onMouseLeave:()=>E(null),children:[Z.map((t,e)=>{const[o,n]=q(t.a,W),[r,a]=q(t.b,W),l=P(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==F?T[t.from]===F||T[t.to]===F:null)(t,e);/* @__PURE__ */
|
|
4
|
+
return d("path",{d:`M${o},${n} Q${O},${R} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/H*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>E({kind:"ribbon",index:e})},`${T[t.from]}→${T[t.to]}`)}),U.map(t=>{const o=Y.get(t),n=(o.start+o.end)/2,[a,l]=q(n,V+16),i=(t=>y?"arc"===y.kind?y.index===t:Z[y.index].from===t||Z[y.index].to===t:null!==F?T[t]===F:null)(t);/* @__PURE__ */
|
|
5
|
+
return m("g",{onMouseEnter:()=>E({kind:"arc",index:t}),children:[
|
|
6
|
+
/* @__PURE__ */d("path",{d:e(O,R,W,V,o.start,o.end),fill:P(t),fillOpacity:null===i||i?1:.45}),
|
|
7
|
+
/* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:T[t]})]},t)})]}),I>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(I)}),void 0!==D&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:T[D],rows:[{key:"total",label:$.totalFlow,color:P(D),value:N(Q[D])}]})}),G&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${T[G.from]} → ${T[G.to]}`,rows:[{key:"value",label:$.flow,color:P(G.from),value:N(G.value)}]})}),
|
|
8
|
+
/* @__PURE__ */d(t,{caption:$.chord(U.length),head:[$.tableFrom,$.tableTo,$.value],rows:Z.map(t=>[T[t.from],T[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{CountBadge as e}from"./chunk-
|
|
2
|
-
return s("div",{"data-accordion":$,className:`@container/acc flex flex-col ${"band"===$?"gap-0.5":""} ${g}`.trim(),children:d.map(i=>{const t=
|
|
1
|
+
import{CountBadge as e}from"./chunk-5Q3PFKB5.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{useShellStrings as i,useShellLocale as t}from"./chunk-PEM7UXQ3.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useState as a,useId as o}from"react";import{jsx as s,jsxs as c,Fragment as l}from"react/jsx-runtime";var d="px-4 @max-[260px]/acc:px-3",h={band:{head:`${d} py-3 bg-(--rosh-fold-band)`,press:"hover:bg-(--rosh-fold-band-hover)",title:"text-base font-semibold text-(--ink-strongest)",chev:"text-(--ink-strongest)",body:`${d} pb-2`},row:{head:`${d} py-2`,press:"hover:bg-row-hover",title:"text-sm font-medium text-(--ink-strong)",chev:"text-(--ink-strong)",body:`${d} pb-2`}},m=e=>[...e].map(e=>/[A-Za-z0-9_-]/.test(e)?e:`-u${e.codePointAt(0).toString(16)}-`).join(""),u="m-0 p-0 border-0 [font:inherit] [letter-spacing:inherit] [text-transform:inherit]";function f({items:d,defaultOpenIds:f=[],openIds:p,onOpenChange:b,allowMultiple:v=!1,level:x=3,tier:$="band",className:g=""}){const N=h[$],y=i(),k=t(),[w,j]=a(f),M=o(),P=`h${x}`,C=p??w;/* @__PURE__ */
|
|
2
|
+
return s("div",{"data-accordion":$,className:`@container/acc flex flex-col ${"band"===$?"gap-0.5":""} ${g}`.trim(),children:d.map(i=>{const t=C.includes(i.id),a=`${M}-${m(i.id)}-head`,o=`${M}-${m(i.id)}-panel`;/* @__PURE__ */
|
|
3
3
|
return c("div",{children:[
|
|
4
|
-
/* @__PURE__ */s(
|
|
4
|
+
/* @__PURE__ */s(P,{className:u,children:/* @__PURE__ */c("button",{type:"button",id:a,disabled:i.disabled,"aria-expanded":t,"aria-controls":t?o:void 0,onClick:()=>(e=>{const n=C.includes(e)?C.filter(n=>n!==e):v?[...C,e]:[e];void 0===p&&j(n),b?.(n)})(i.id),className:`flex w-full items-center gap-2 text-left transition-colors duration-(--motion-fast) disabled:cursor-not-allowed disabled:opacity-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${N.head} ${N.press}`,children:[null!=i.icon&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:`inline-flex h-4 w-4 shrink-0 items-center justify-center ${N.chev}`,children:i.icon}),
|
|
5
5
|
/* @__PURE__ */s("span",{className:`min-w-0 flex-1 ${N.title}`,children:i.title}),"number"==typeof i.count&&i.count>0&&
|
|
6
6
|
/* @__PURE__ */c(l,{children:[
|
|
7
7
|
/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */s(e,{count:i.count,tone:"accent"})}),
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-G6LOKIFC.js";import{MarqueeBox as a}from"./chunk-IC72MGON.js";import{EmptyState as i}from"./chunk-QSUQC4AN.js";import{ImageLightbox as r}from"./chunk-7YZJLFAK.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-5Y6LGPZI.js";import{Breadcrumbs as d}from"./chunk-NGQHXTUK.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-XI45TSEK.js";import{useMediaMoveItems as u}from"./chunk-WZQCRTXF.js";import{copyToClipboard as m}from"./chunk-H4YFANH5.js";import{DropdownMenu as p}from"./chunk-VVZE27M4.js";import{MediaUploadGrid as h}from"./chunk-JECMVR4S.js";import{MediaUsedInList as f}from"./chunk-T7O2TNNX.js";import{NativeSelect as g}from"./chunk-4DBPKTVX.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-7WLFHDWA.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-LYX55RI3.js";import{ColoredBadge as F}from"./chunk-H2XCQJRG.js";import{Button_default as j}from"./chunk-NHH2MXFU.js";import{buttonClasses as z}from"./chunk-UQYNPYF4.js";import{Icon as T}from"./chunk-FSPFV4MI.js";import{Tooltip as O}from"./chunk-BCDG4N6L.js";import{usePlotWidth as L}from"./chunk-MAFUXCPZ.js";import{useShellStrings as P}from"./chunk-PEM7UXQ3.js";import{useRef as A,useMemo as E,useCallback as M,useState as U,useEffect as K}from"react";import{jsxs as R,Fragment as H,jsx as V}from"react/jsx-runtime";var X="application/x-efficient-media-files",B="application/x-efficient-media-folder",Q="application/x-efficient-media-file";function G(e){if(!e||!Array.from(e.types).includes(Q))return null;try{const n=JSON.parse(e.getData(Q));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 J={type:"all",use:"any",sort:"newest"},W={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"})},Y={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 $({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 Z(T){const{mode:G="manage",layout:Z="auto",location:q,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=J,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:Fe,onReplace:je,onCropEdit:ze,onOpenInDesign:Te,onChoose:Oe,onCancel:Le,pickNote:Pe,onDragOut:Ae,className:Ee=""}=T,Me=P().mediaLibrary,Ue=P().media,Ke="pick"===G,Re=!Ke,He=A(null),Ve=L(He,"phone"===Z?343:1200),Xe="phone"===Z||"auto"===Z&&Ve<640,Be=E(()=>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]),Qe=E(()=>new Map(ee.map(e=>[e.id,e])),[ee]),Ge=E(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&Qe.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,Qe]),Je=M(e=>{const n=[];for(let l=e?Qe.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?Qe.get(l.parentId):void 0);return n},[Qe,ee.length]),We=M((e,n)=>Je(e).some(e=>e.id===n),[Je]),[Ye,$e]=U(()=>/* @__PURE__ */new Set(["@files"])),Ze=e=>$e(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),qe=M(e=>{$e(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",...Je(q.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===q.place){const e=q.nodeId?Be.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?Be.get(q.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Me.readOnly} ${Me.editedAtHq(e.sharedFrom)}`:Me.readOnly,dn=E(()=>ie.map(e=>e.id),[ie]),sn=E(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=k(dn),un=E(()=>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?Qe.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=M(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Me.alreadyHere:void 0;const l=Qe.get(e.id);return n===e.id||n&&We(n,e.id)?Me.notIntoItself:(l?.parentId??null)===n?Me.folderAlreadyHere:void 0};n.push({key:s,label:Me.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,Qe,an,We,rn,Me]),xn=M(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:Me,media:Ue,denied:fe,moveTargets:Cn,kindOf:xn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Re?e=>{wn(e)}:void 0,rename:Ce&&Re?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:xe&&Re?xe:void 0,trash:Ne&&Re?Ne:void 0,deleteFolder:Ie&&Re?Ie:void 0,folderNotEmpty:e=>!!Qe.get(e)?.notEmpty,replace:je&&Re?je:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&m(Me.urlLabel,n)},openInDesign:Te,restore:De,deleteForever:Se},Sn=e=>c(e,Dn),Fn=w(),jn=(e,n)=>{Ke||(cn.isSelected(e)||cn.select(e),Fn.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)))},[zn,Tn]=U(null),[On,Ln]=U(null),[Pn,An]=U(null);K(()=>{if(!On&&!zn)return;const e=()=>{Ln(null),Tn(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[On,zn]);const En=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Mn=(e,n)=>!(!xe||fe.move||Ke)&&(!!En(e,X)||!(!En(e,B)||!Pn)&&(n!==Pn&&!(n&&We(n,Pn)))),Un=(e,n)=>({onDragEnter:l=>{Mn(l,n)&&(l.preventDefault(),Tn(e))},onDragOver:l=>{Mn(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",zn!==e&&Tn(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Tn(n=>n===e?null:n)},onDrop:e=>{if(Mn(e,n))if(e.preventDefault(),Tn(null),En(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 Pn&&(xe({kind:"folder",id:Pn},n),An(null))}}),Kn=e=>{const n=e=>En(e,X)||En(e,B)||En(e,"Files");return{onDragEnter:l=>{n(l)&&Ln(e)},onDragOver:l=>{n(l)&&On!==e&&Ln(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Ln(n=>n===e?null:n)}}},Rn=(e,n,l)=>/* @__PURE__ */V(O,{side:"right",content:On===e?Me.noDropProducts:on(l),open:On===e||!On&&void 0,children:/* @__PURE__ */V("span",{children:n})}),Hn=e=>({onContextMenu:n=>{Fn.open(n,e)}}),Vn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=Ye.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
|
|
3
|
+
return R("div",{role:"none",className:"contents",children:[
|
|
4
|
+
/* @__PURE__ */V(n,{label:Rn(r,e.name,t),level:a,icon:d&&o?W.folderOpen:W.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Me.fileCount(e.count):void 0,selected:nn&&q.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>Ze(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Kn(r),...Re?Hn({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=Ye.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=Sn({kind:"folder",id:e.id});/* @__PURE__ */
|
|
5
|
+
return R("div",{role:"none",className:"contents",children:[
|
|
6
|
+
/* @__PURE__ */V(n,{label:e.name,level:a,icon:i&&r?W.folderOpen:W.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Me.fileCount(e.count):void 0,selected:t||an&&q.folderId===e.id,expanded:i?r:void 0,onToggle:i?()=>Ze(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:zn===e.id?"into":void 0,dragging:Pn===e.id,draggable:Re&&!!xe&&!fe.move,rename:t?/* @__PURE__ */V($,{value:e.name,label:Me.folderName,onDone:bn}):void 0,actions:Re&&o.length?/* @__PURE__ */V(p,{align:"end","aria-label":Me.folderActions,trigger:W.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Un(e.id,e.id),...Re?Hn({kind:"folder",id:e.id}):{},...Re&&xe&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(B,e.id),An(e.id)},onDragEnd:()=>{An(null),Tn(null)}}:{}}}),i&&r&&/* @__PURE__ */V(l,{children:Xn(e.id,a+1)})]},e.id)}),Bn=Ye.has("@files"),Qn=Ye.has("@products"),Gn=/* @__PURE__ */R(e,{"aria-label":Me.folders,children:[ne&&/* @__PURE__ */R(H,{children:[
|
|
7
|
+
/* @__PURE__ */V(n,{label:Rn("@products",Me.products),level:1,icon:W.lock,badge:{label:Me.readOnlyBadge,tone:"neutral"},expanded:ne.length?Qn:void 0,onToggle:()=>Ze("@products"),selected:nn&&null==q.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Kn("@products")}}),Qn&&ne.length>0&&/* @__PURE__ */V(l,{children:Vn(ne,2)})]}),
|
|
8
|
+
/* @__PURE__ */V(n,{label:Me.allFiles,level:1,icon:Bn?W.folderOpen:W.folder,count:le,countLabel:null!=le?Me.fileCount(le):void 0,expanded:Ge.get(null)?.length?Bn:void 0,onToggle:()=>Ze("@files"),selected:an&&null==q.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===zn?"into":void 0,rowProps:{"data-media-row":"@files",...Un("@files",null)}}),Bn&&(Ge.get(null)?.length??0)>0&&/* @__PURE__ */V(l,{children:Xn(null,2)}),Re&&/* @__PURE__ */V(n,{label:Me.trash,level:1,icon:W.trash,count:ae,countLabel:null!=ae?Me.fileCount(ae):void 0,selected:ln,onSelect:()=>_({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Jn=(()=>{if(ln)return[{label:Me.trash}];if(nn){const e=q.nodeId?Be.get(q.nodeId)?.path??[]:[];return[{label:Me.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=Je(rn);return[{label:Me.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}))]})(),Wn=nn?Me.readOnly:fe.upload,Yn=!!be&&!ln&&!Wn,$n=D({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!Yn,onAccept:e=>be?.(e,rn)}),Zn=nn?Me.noProductFolder:fe.newFolder,qn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */R("div",{className:"flex flex-wrap items-center gap-2",children:[Re&&we&&!ln&&/* @__PURE__ */V(j,{variant:"secondary",size:"sm",leftIcon:W.folderPlus,onClick:()=>{wn(rn)},...qn(Zn),children:Me.newFolder}),be&&!ln&&/* @__PURE__ */V(j,{variant:"primary",size:"sm",leftIcon:W.upload,onClick:()=>$n.open(),...qn(Wn),children:Me.upload}),Re&&ln&&Fe&&ie.length>0&&/* @__PURE__ */V(j,{variant:"danger",size:"sm",onClick:Fe,...qn(fe.deleteForever),children:Me.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__ */R("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:W.search,placeholder:nn?Me.searchProducts:Me.search,"aria-label":nn?Me.searchProducts:Me.search,value:re??"",onChange:e=>te(e.target.value)})}),de&&el(Me.mediaType,oe.type,[{value:"all",label:Me.allTypes},{value:"image",label:Me.images},{value:"video",label:Me.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],nl("type"),130),de&&!nn&&!ln&&el(Me.use,oe.use,[{value:"any",label:Me.anyUse},{value:"email",label:Me.emailOnly},{value:"website",label:Me.websiteOnly},{value:"unused",label:Me.notUsed}],nl("use"),130),de&&Re&&el(Me.sort,oe.sort,[{value:"newest",label:Me.newest},{value:"name",label:Me.byName},{value:"size",label:Me.bySize}],nl("sort"),110),se?.map(e=>el(e.label,e.value,e.options,e.onChange,120)),ue&&/* @__PURE__ */V(v,{size:"sm",label:Me.view,value:ce,onChange:ue,options:[{value:"grid",label:Me.grid,icon:W.grid},{value:"list",label:Me.list,icon:W.list}]})]}),al=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Me.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:Y.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Me.used(e.usedCount),count:e.usedCount,icon:Y.link,tone:"active"}),e.email&&n.push({key:"e",label:Me.email,icon:Y.email,tone:"queued"}),e.private&&n.push({key:"p",label:Me.private,icon:Y.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */V(F,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Re&&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:{[Q]:ol(e)}}:{}})),sl=Xe?Math.max(72,Math.floor((Ve-24-16-1)/3)):112,cl=A(null),ul=y({containerRef:cl,enabled:Re&&!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:Me.noMatches}):nn?/* @__PURE__ */V(i,{variant:"dashed",title:Me.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */V(i,{variant:"dashed",title:Me.trashEmpty}):!Yn||Ke?/* @__PURE__ */V(i,{variant:"dashed",title:Me.emptyFolder}):null,hl="list"===ce&&ie.length>0,fl=pl??(hl?/* @__PURE__ */V("ul",{role:"listbox","aria-multiselectable":Re||void 0,"aria-label":Me.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */R("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=>jn(e.id,n),draggable:!!ol(e)||void 0,onDragStart:ol(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(Q,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:!Yn||Ke,onFiles:Yn&&!Ke?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?X:tl?Q:void 0,onDragOutChange:tl?e=>Ae(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Re?jn:void 0,menuOnMedia:Re})),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=z({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */V(p,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */R(H,{children:[W.folder,Me.moveTo]}),items:gl,disabled:!!fe.move}),yl=Re&&un.length>1&&!nn?/* @__PURE__ */R("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:Me.selected(un.length)}),/* @__PURE__ */R(H,ln?{children:[De&&/* @__PURE__ */V(j,{variant:"secondary",size:"sm",leftIcon:W.undo,onClick:()=>De(un),...qn(fe.restore),children:Me.restore}),Se&&/* @__PURE__ */V(j,{variant:"secondary-danger",size:"sm",onClick:()=>Se(un),...qn(fe.deleteForever),children:Me.deleteForever})]}:{children:[xe&&kl,Ce&&/* @__PURE__ */V(j,{variant:"secondary",size:"sm",leftIcon:W.edit,disabled:!0,children:Me.rename}),Ne&&/* @__PURE__ */V(j,{variant:"secondary",size:"sm",leftIcon:W.trash,onClick:()=>Ne({kind:"files",ids:un}),...qn(fe.trash),children:Me.moveFilesToTrash(un.length)})]}),
|
|
13
|
+
/* @__PURE__ */V(j,{variant:"ghost",size:"sm",onClick:cn.clear,children:Me.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",Me.name,a?/* @__PURE__ */V($,{value:e.name,label:Me.fileName,onDone:bn}):e.name),l("type",Me.type,e.typeLabel),l("size",Me.size,e.sizeLabel),l("resolution",Me.resolution,e.resolution),nn?(l("design",Me.design,e.design),l("finish",Me.finish,e.finish),l("angle",Me.angleLug,e.angleLug),l("owner",Me.owner,e.owner)):(l("added",Me.addedBy,e.addedBy),l("folder",Me.folder,e.folderPath)),l("used",Me.usedIn,null!=e.usedCount?Me.places(e.usedCount):void 0);const i=c({kind:"files",ids:[e.id]},Dn).find(e=>"submenu"===e.type);/* @__PURE__ */
|
|
14
|
+
return R("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:Me.readOnlyBadge,children:on(tn)}),
|
|
16
|
+
/* @__PURE__ */V(t,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */R("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":Me.fileUrl,onFocus:e=>e.currentTarget.select()})}),
|
|
18
|
+
/* @__PURE__ */V(j,{variant:"secondary",size:"sm",leftIcon:W.copy,onClick:()=>Dn.copyUrl(e.id),children:Me.copyUrl})]}),an&&Re&&/* @__PURE__ */R("div",{className:"flex flex-wrap gap-2",children:[je&&/* @__PURE__ */V(j,{variant:"secondary",size:"sm",leftIcon:W.swap,onClick:()=>je(e.id),...qn(fe.replace),children:Me.replace}),ze&&/* @__PURE__ */V(j,{variant:"secondary",size:"sm",leftIcon:W.crop,onClick:()=>ze(e.id),children:Me.cropEdit}),xe&&"submenu"===i?.type&&/* @__PURE__ */V(p,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */R(H,{children:[W.folder,Me.moveTo]}),items:i.items,disabled:!!fe.move}),Ce&&/* @__PURE__ */V(j,{variant:"secondary",size:"sm",leftIcon:W.edit,onClick:()=>yn({kind:"file",id:e.id}),...qn(fe.rename),children:Me.rename}),Ne&&/* @__PURE__ */V(I,{"aria-label":Me.moveToTrash,size:"sm",onClick:()=>Ne({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:W.trash})]}),ln&&Re&&/* @__PURE__ */R("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */V(j,{variant:"primary",size:"sm",leftIcon:W.undo,onClick:()=>De([e.id]),...qn(fe.restore),children:Me.restore}),Se&&/* @__PURE__ */V(j,{variant:"danger",size:"sm",onClick:()=>Se([e.id]),...qn(fe.deleteForever),children:Me.deleteForever})]}),nn&&Te&&/* @__PURE__ */V(j,{variant:"secondary",size:"sm",leftIcon:W.external,onClick:()=>Te({kind:"render",id:e.id}),children:Me.openInDesign}),he&&/* @__PURE__ */V(f,{items:he})]})},wl=mn?mn.private?Me.privateNoPick:mn.pickDisabledReason:void 0,Cl=Ke?/* @__PURE__ */R("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?Me.oneChosen(mn.name):Me.noneChosen}),
|
|
20
|
+
/* @__PURE__ */R("div",{className:"flex gap-2",children:[Le&&/* @__PURE__ */V(j,{variant:"secondary",size:"sm",onClick:Le,children:Me.cancel}),
|
|
21
|
+
/* @__PURE__ */V(j,{variant:"primary",size:"sm",disabled:!mn,...qn(wl),onClick:()=>{mn&&!wl&&Oe?.(mn)},children:Me.chooseImage})]})]}):null,xl=Re&&!!mn,Nl=/* @__PURE__ */R("div",{className:"flex min-w-0 flex-col gap-3",children:[Pe&&/* @__PURE__ */V(x,{tone:"neutral",children:Pe}),
|
|
22
|
+
/* @__PURE__ */R("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
|
|
23
|
+
/* @__PURE__ */V(d,{items:Jn}),_n]}),ll,yl,
|
|
24
|
+
/* @__PURE__ */R("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Re&&(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})]}),Yn&&/* @__PURE__ */V("input",{...$n.inputProps}),
|
|
26
|
+
/* @__PURE__ */V(S,{rejections:$n.rejections})]});/* @__PURE__ */
|
|
27
|
+
return R("div",{ref:He,"data-media-library":"","data-layout":Xe?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Ee}`.trim(),children:[/* @__PURE__ */R("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)}),Fn.state&&/* @__PURE__ */V(C,{...Fn.props,items:Sn(Fn.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,Q as MEDIA_FILE_DRAG_TYPE,B as MEDIA_FOLDER_DRAG_TYPE,Z as MediaLibrary,G as readMediaFileDrag};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as e}from"./chunk-PEM7UXQ3.js";import{jsxs as t,jsx as a,Fragment as l}from"react/jsx-runtime";var n=e=>"number"==typeof e?e:parseInt(String(e??""))||0;function s({items:s,getVolume:i,getInstructionVolume:r,getActualVolume:c,qtyField:m="instruction",showNewIndicator:d=!1,getInstructionQty:u=e=>e.quantity,getActualQty:h=e=>e.actual_qty,isFilled:o,isNew:g=e=>Boolean(e._isNew),className:x,style:f}){const p=e().containers,y=o?s.filter(o):s,N=e=>n(u(e)),b=e=>n(h(e)),w=y.some(e=>null!=h(e)&&b(e)>0),v=e=>w?N(e):"actual"===m?h(e)??u(e)??0:u(e)??0,M=y.reduce((e,t)=>e+n(v(t)),0),$=y.filter(e=>g(e)).length,k=y.filter(e=>g(e)).reduce((e,t)=>e+n(v(t)),0),j=y.reduce((e,t)=>e+N(t),0),I=y.reduce((e,t)=>e+b(t),0),V=e=>i?.(e)??0,q=r??(e=>V(e)*N(e)),A=c??(e=>V(e)*b(e)),Q=y.reduce((e,t)=>e+q(t),0),F=y.reduce((e,t)=>e+A(t),0),_=w?Math.max(Q,F):"actual"===m&&F||Q,B=_<=34.65?"20ft":"40ft",E="20ft"===B?33:67,P=_>0?Math.max(1,Math.ceil(_/E)):0,S=P*E,U=_>0&&_>=.95*S&&_<=1.1*S;if(0===y.length)return null;const X=(e,t)=>E>0?Math.max(0,Math.min((e-t*E)/E*100,100)):0;/* @__PURE__ */
|
|
2
2
|
return t("div",{className:`mt-2 px-1 space-y-2 ${x??""}`.trim(),style:f,children:[
|
|
3
3
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[
|
|
4
|
-
/* @__PURE__ */t("span",{children:[`${p.items(
|
|
5
|
-
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,k)]})]}),_>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:
|
|
4
|
+
/* @__PURE__ */t("span",{children:[`${p.items(y.length)} · ${p.pieces(M)}`,w&&j!==I&&/* @__PURE__ */a("span",{className:"ml-1 text-gray-400",children:p.split(j,I)})]}),d&&$>0&&/* @__PURE__ */t("span",{className:"flex items-center gap-1 text-green-600",children:[
|
|
5
|
+
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,k)]})]}),_>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:P}).map((e,l)=>{const n=X(Q,l),s=X(F,l),i=w,r=Math.max(n,s),c=Math.min(n,s),m=n>=s,d=i?m?"bg-blue-500":"bg-green-500":"bg-blue-500",u=i?m?"bg-green-500":"bg-blue-500":"";/* @__PURE__ */
|
|
6
6
|
return t("div",{className:"flex items-center gap-2",children:[
|
|
7
7
|
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faintest w-8 shrink-0",children:B}),
|
|
8
8
|
/* @__PURE__ */t("div",{className:"relative flex-1 h-4 bg-gray-100 rounded-full overflow-hidden border border-gray-200",children:[
|
|
9
9
|
/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${d} transition-all`,style:{width:`${r}%`}}),i&&c>0&&/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${u} transition-all`,style:{width:`${c}%`}})]}),
|
|
10
|
-
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faint w-16 text-right",children:i?p.fill(Math.min(F-l*
|
|
10
|
+
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faint w-16 text-right",children:i?p.fill(Math.min(F-l*E,E),E):p.fill(Math.min(Q-l*E,E),E)})]},`bar-${l}`)}),
|
|
11
11
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs pt-0.5",children:[
|
|
12
12
|
/* @__PURE__ */t("span",{className:"text-gray-500 inline-flex items-center gap-1",children:[p.total,w?/* @__PURE__ */t(l,{children:[
|
|
13
13
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-blue-700",children:[
|
|
14
|
-
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(
|
|
14
|
+
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(Q)]}),
|
|
15
15
|
/* @__PURE__ */a("span",{className:"text-gray-400",children:"/"}),
|
|
16
16
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-green-700",children:[
|
|
17
17
|
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(F)]})]}):/* @__PURE__ */a("b",{className:"text-gray-700",children:p.volume(_)})]}),
|
|
18
|
-
/* @__PURE__ */t("span",{className:"font-medium "+(
|
|
18
|
+
/* @__PURE__ */t("span",{className:"font-medium "+(U?"text-green-600":"text-gray-500"),children:[U&&"✓ ",P," × ",B]})]})]}):/* @__PURE__ */a("div",{className:"text-xs text-gray-400",children:p.noVolume})]})}export{s as ContainerFillChart};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{useOverlayTarget as e,OverlayLayerProvider as r}from"./chunk-4AJRHTTB.js";import{dialogA11y as i}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as t}from"./chunk-PKXQDCNR.js";import{useFocusTrap as a,useScrollLock as o}from"./chunk-CDAJKLGL.js";import{Icon as l}from"./chunk-FSPFV4MI.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{useHydrated as n}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as d}from"./chunk-TWVUQUUD.js";import{useShellStrings as c}from"./chunk-PEM7UXQ3.js";import{useRef as m,useId as u,useState as f,useEffect as h}from"react";import{createPortal as p}from"react-dom";import{jsx as x,jsxs as b}from"react/jsx-runtime";var g={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function v({open:v,onClose:y,title:k,description:j,role:N="dialog",children:w,footer:C,blocking:T=!1,size:W="md",aside:D=!1,initialFocus:J,"aria-label":L,"aria-labelledby":U,"aria-describedby":A,className:F=""}){const I=m(null),P=u(),Q=u(),V=!T,z=u(),B=c().dialog,G=e(n()),[H,K]=f(null);return t(v),a(I,v&&null!==G,J),o(v),h(()=>{if(v)return d(()=>(T||y(),!0),()=>I.current)},[v,T,y]),v&&G?p(
|
|
2
|
+
/* @__PURE__ */x(r,{value:H,children:/* @__PURE__ */b("div",{ref:K,className:"fixed inset-0"+(D?" pointer-events-none opacity-0":""),style:{zIndex:s.overlay},role:"presentation","data-aside":D?"":void 0,children:[
|
|
3
|
+
/* @__PURE__ */x("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
|
|
4
|
+
/* @__PURE__ */x("div",{className:"fixed inset-0 flex items-center justify-center p-4",onClick:T?void 0:e=>{e.target===e.currentTarget&&y()},children:/* @__PURE__ */b("div",{ref:I,...i({role:N,modal:!0,titleId:k?z:void 0,labelledBy:U,label:L}),"aria-describedby":A??(j?Q:w?P:void 0),className:`relative max-h-full w-full ${g[W]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${F}`.trim(),children:[k&&/* @__PURE__ */x("h2",{id:z,className:(V?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:k}),j&&/* @__PURE__ */x("p",{id:Q,className:((k?"mt-1":V?"pr-8":"")+" text-sm text-gray-500").trim(),children:j}),w&&/* @__PURE__ */x("div",{id:P,className:"mt-2 text-sm text-gray-600",children:w}),C&&/* @__PURE__ */x("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:C}),V&&/* @__PURE__ */x("button",{type:"button",onClick:y,"aria-label":B.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */x(l,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),G):null}export{v as Dialog};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{ColoredBadge as e}from"./chunk-
|
|
1
|
+
import{ColoredBadge as e}from"./chunk-H2XCQJRG.js";import{Button_default as n}from"./chunk-NHH2MXFU.js";import{useShellStrings as i}from"./chunk-PEM7UXQ3.js";import{useId as t}from"react";import{jsx as m,jsxs as a}from"react/jsx-runtime";function s({items:s,heading:l,emptyText:r,className:c=""}){const o=i().media,d=t();return s.length?/* @__PURE__ */a("div",{className:c||void 0,children:[
|
|
2
2
|
/* @__PURE__ */m("p",{id:d,className:"text-xs font-medium text-ink-faint",children:l??o.usedIn(s.length)}),
|
|
3
3
|
/* @__PURE__ */m("ul",{"aria-labelledby":d,className:"mt-2 flex flex-col gap-1",children:s.map(i=>/* @__PURE__ */a("li",{className:"flex min-w-0 items-center gap-2 text-sm",children:[null!=i.kind&&/* @__PURE__ */m(e,{size:"xs",className:"flex-none",children:i.kind}),i.onOpen?/* @__PURE__ */m(n,{variant:"link",size:"sm",onClick:i.onOpen,className:"min-w-0 text-left",children:i.name}):/* @__PURE__ */m("span",{className:"min-w-0 break-words text-ink",children:i.name})]},i.key))})]}):/* @__PURE__ */m("p",{className:`text-sm text-ink-faint ${c}`.trim(),children:r??o.notUsed})}export{s as MediaUsedInList};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-
|
|
1
|
+
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-5Q3PFKB5.js";import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{createContext as o,useRef as a,useState as i,useEffect as l,useContext as s}from"react";import{jsx as c,jsxs as d,Fragment as u}from"react/jsx-runtime";var h=o({labels:"none",shown:"none"}),f="button[data-icon-rail-button]:not([disabled])";function b(e,t,n){const r=getComputedStyle(e),o=(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)+(parseFloat(r.borderLeftWidth)||0)+(parseFloat(r.borderRightWidth)||0),a="horizontal"===t?(parseFloat(r.columnGap)||0)*Math.max(0,n-1):0,i=e.parentElement;let l=1/0;if(i){const e=getComputedStyle(i);l=i.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:o+a,room:l}}function m({"aria-label":t,orientation:n="vertical",children:o,className:s="",labels:d="none",labelsFit:u=!1,onLabelsShown:m}){const p=a(null),g="none"!==d&&u,[v,y]=i(null),w="none"===d?"none":g?v??"none":"all",x=a(()=>{});x.current=()=>{const t=p.current;if(!t||!g)return;const r=function(e,t){return[...e.querySelectorAll("button[data-icon-rail-button]")].map(e=>{const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=parseFloat(n.minWidth)||0,a=e.querySelector("[data-icon-rail-glyph]")?.getBoundingClientRect().width??0,i=e.querySelector("[data-icon-rail-word]")?.scrollWidth??0;return{bare:Math.max(o,r+a),worded:"below"===t?Math.max(o,r+Math.max(a,i)):Math.max(o,r+a+8+i),active:"true"===e.getAttribute("aria-pressed")}})}(t,d);y(e({buttons:r,orientation:n,...b(t,n,r.length)}))},r(()=>{x.current()}),l(()=>{const e=p.current?.parentElement;if(!g||!e)return;let t=!0;const n=()=>{t&&x.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[g]);const F=a(null),k=a(m);k.current=m,l(()=>{g&&null!==v&&F.current!==v&&(F.current=v,k.current?.(v))},[g,v]),r(()=>{const e=p.current;if(!e)return;const t=[...e.querySelectorAll(f)];if(0===t.length)return;const n=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-pressed"))??t[0];for(const t of e.querySelectorAll("button[data-icon-rail-button]"))t.tabIndex=t===n?0:-1});/* @__PURE__ */
|
|
2
2
|
return c("div",{ref:p,role:"toolbar","aria-label":t,"aria-orientation":n,"data-orientation":n,onKeyDown:e=>{const t=p.current;if(!t)return;const r=[...t.querySelectorAll(f)],o=r.indexOf(e.target);if(o<0)return;const a="vertical"===n?"ArrowUp":"ArrowLeft",i="vertical"===n?"ArrowDown":"ArrowRight",l=e.key===i?(o+1)%r.length:e.key===a?(o-1+r.length)%r.length:"Home"===e.key?0:"End"===e.key?r.length-1:-1;if(!(l<0)){e.preventDefault();for(const e of r)e.tabIndex=e===r[l]?0:-1;r[l].focus()}},"data-labels":"none"===d?void 0:d,"data-labels-shown":"none"===d?void 0:w,className:`flex gap-1 ${"vertical"===n?"flex-col items-center":"flex-row items-center"} ${s}`.trim(),children:/* @__PURE__ */c(h.Provider,{value:{labels:d,shown:w},children:o})})}function p({label:e,icon:r,active:o,disabled:a,onClick:i,badge:l,tooltipSide:f="right",className:b=""}){const m=!0===o,{labels:p,shown:g}=s(h),v=void 0===l||!1===l||0===l?r:/* @__PURE__ */c(t,{count:"number"==typeof l?l:void 0,dot:!0===l,max:99,children:r}),y="none"!==p,w=y&&("all"===g||"chosen"===g&&m),x=/* @__PURE__ */c("button",{type:"button","data-icon-rail-button":"","aria-label":e,"aria-pressed":"boolean"==typeof o?o:void 0,disabled:a,onClick:a?void 0:i,className:[`relative inline-flex ${y?"beside"===p?"h-9 min-w-9 justify-center px-2":"min-h-9 min-w-9 flex-col justify-center px-1 py-1":"h-9 w-9 justify-center"} shrink-0 items-center rounded-lg transition-colors`,"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-40",m?"bg-accent-tint text-blue-700":"text-gray-600 not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest",b].filter(Boolean).join(" "),children:y?/* @__PURE__ */d(u,{children:[
|
|
3
3
|
/* @__PURE__ */c("span",{"data-icon-rail-glyph":"",className:"inline-flex shrink-0 items-center justify-center",children:v}),
|
|
4
4
|
/* @__PURE__ */c("span",{"data-icon-rail-word":"","aria-hidden":"true",className:["overflow-hidden whitespace-nowrap text-xs font-medium leading-none",w?"beside"===p?"ml-2":"mt-1":"max-h-0 max-w-0"].join(" "),children:e})]}):v});/* @__PURE__ */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-5F7HMNCX.js";import{INPUT_BASE_ON as a,INPUT_BASE as s}from"./chunk-AYZY3YNC.js";import{Button_default as u}from"./chunk-NHH2MXFU.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import{Tooltip as d}from"./chunk-BCDG4N6L.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as b}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as g,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-
|
|
2
|
-
return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function R(R){const{options:F,placeholder:
|
|
3
|
-
return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))
|
|
4
|
-
/* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:He,className:"whitespace-pre"})}),Ee&&/* @__PURE__ */S(
|
|
5
|
-
/* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{
|
|
1
|
+
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-5F7HMNCX.js";import{INPUT_BASE_ON as a,INPUT_BASE as s}from"./chunk-AYZY3YNC.js";import{Button_default as u}from"./chunk-NHH2MXFU.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import{Tooltip as d}from"./chunk-BCDG4N6L.js";import{onOverlayOpen as h}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as p}from"./chunk-62LW225J.js";import{useDropdownPosition as m,MENU_MAX_HEIGHT as f}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as b}from"./chunk-D65T4H6J.js";import{GLASS_DIVIDER as g,glassStyle as v}from"./chunk-DTJRIWFR.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useShellStrings as w}from"./chunk-PEM7UXQ3.js";import{useState as x,useId as k,useRef as $,useMemo as N,useEffect as j}from"react";import{createPortal as D}from"react-dom";import{jsxs as C,jsx as S}from"react/jsx-runtime";function W(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}function M({onClear:e,ariaLabel:t}){/* @__PURE__ */
|
|
2
|
+
return S("button",{type:"button","aria-label":t,onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),e()},className:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity text-base leading-none",children:"×"})}function R(R){const{options:F,placeholder:L,emptyOptionLabel:E,className:T="",disabled:z,id:H,filter:U=!1,allowFreeText:A=!1,freeTextOption:O,onSearchChange:B,loading:I=!1,error:J,onRetry:X,rightAdornment:G,renderOption:P,clearable:Y=!0,"aria-label":K,"aria-labelledby":Q,"aria-describedby":V}=R,Z=!0===R.multiple,q=R.multiple?R.value:R.value?[R.value]:[],_=R.multiple?"":R.value,ee=e=>{R.multiple?R.onChange(e):R.onChange(e[0]??"")},te=q.length>0,ne=U&&te&&!z,re=Z||U,le=null!=O,oe=A||le,[ie,ae]=x(!1),[se,ue]=x(-1),ce=k(),de=H??`${ce}-input`,he=`${ce}-listbox`,pe=e=>`${ce}-opt-${e}`,[me,fe]=x(""),be=w(),ge=E??be.select.none,ve=e=>{fe(e),ue(-1),B?.(e)},ye=$(null),we=$(null),xe=$(null),ke=$(null),$e=$(ie);$e.current=ie;const Ne=$(!1),je=e=>{$e.current&&($e.current=!1,e&&A&&!le&&Ye&&(Z?q.includes(Ye)||ee([...q,Ye]):Ye!==_&&ee([Ye])),ae(!1),ve(""))},De=(e,t)=>{if(!e.disabled){if(Z)return ee(q.includes(e.value)?q.filter(t=>t!==e.value):[...q,e.value]),void(e===Ke?ve(""):ue(t));ee([e.value]),je(!1)}},[Ce,Se]=x(null);b(()=>{if(!G||ie)return void Se(null);const e=ke.current?.offsetWidth??0;Se(e?e+(Ee?32:8)+6:null)});const We=m(we,ie,re?{popupRef:xe}:{matchTriggerWidth:!0}),Me=N(()=>t(F),[F]),Re=q.join("\0"),Fe=N(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Me)q.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(oe)for(const n of q)t.has(n)||e.push(n);return e},[Me,Re,oe]),Le=Fe.join(", "),Ee=Y&&te&&!z,[Te,ze]=x(null),He=$(null),Ue=$(""),Ae=$(()=>{});Ae.current=()=>{const e=we.current,t=He.current;if(!Z||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${Fe.join("\0")}`;if(o===Ue.current)return;Ue.current=o;let i=null;r>0&&Fe.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=W(Fe,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),ze(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},b(()=>{Ae.current()}),j(()=>{const e=we.current;if(!Z||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ae.current());return t.observe(e),()=>t.disconnect()},[Z]);const Oe=Fe.length,Be=!Z||!Te||Te.shown>=Oe?Le:0===Te.shown?be.select.selectedCount(Oe):`${Fe.slice(0,Te.shown).join(", ")} +${Oe-Te.shown}`,Ie=Z&&null!==Te&&(Te.shown<Oe||Te.cut),Je=ie&&te&&re;j(()=>{if(!ie)return;const e=e=>{const t=e.target;ye.current?.contains(t)||xe.current?.contains(t)||je(!0)};document.addEventListener("mousedown",e);const t=h(()=>je(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[ie,A,me,Re,R.onChange]),j(()=>{if(ie)return y(e=>!("Escape"!==e.key||!$e.current)&&(je(!1),we.current?.blur(),!0),()=>xe.current)},[ie]);const Xe=N(()=>{const e=/* @__PURE__ */new Set;return n(F,t=>!e.has(t.value)&&(e.add(t.value),!0))},[F]),Ge=N(()=>{if(B)return Xe;const e=me.trim().toLowerCase();return e?n(Xe,t=>r(t,e)):Xe},[Xe,me,B]),Pe=N(()=>t(Ge),[Ge]),Ye=me.trim(),Ke=N(()=>le&&Ye?Me.some(e=>e.label===Ye)||q.includes(Ye)?null:{value:Ye,label:Ye}:null,[le,Ye,Me,Re]),Qe=N(()=>Ke?[...Pe,Ke]:Pe,[Pe,Ke]);/* @__PURE__ */
|
|
3
|
+
return C("div",{ref:ye,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(ye.current?.contains(t)||xe.current?.contains(t))||Ne.current||document.activeElement!==we.current&&je(!0)},children:[(Ve=/* @__PURE__ */S("input",{id:de,ref:we,type:"text",autoComplete:"off",role:"combobox","aria-expanded":ie,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":ie?he:void 0,"aria-activedescendant":ie&&se>=0&&se<Qe.length?pe(se):void 0,"aria-label":Q?void 0:K,"aria-labelledby":Q,"aria-describedby":V,value:ie?me:Be,onChange:e=>{ve(e.target.value),ae(!0)},onFocus:()=>{z||(ve(""),ae(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(z)return;if(t.preventDefault(),!ie)return void ae(!0);if(0===Qe.length)return;const n="ArrowDown"===t.key?1:-1;return void ue(t=>e(Qe,t,n))}"Enter"===t.key?(t.preventDefault(),ie&&se>=0&&se<Qe.length?De(Qe[se],se):1!==Pe.length||Pe[0].disabled?A&&!le&&Ye&&(Z?(q.includes(Ye)||ee([...q,Ye]),ve("")):(ee([Ye]),je(!1),we.current?.blur())):De(Pe[0],0)):"Escape"===t.key?(je(!1),we.current?.blur()):"Tab"===t.key&&je(!0)},placeholder:Je?Be:L||ge,className:`${ne?a:s} ${T} ${Ee?"pr-8":""} ${z?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Je?" rosh-field-shows-choice":""}`,style:Ce?{paddingRight:Ce}:void 0,disabled:z}),Z?/* @__PURE__ */S(d,{content:!ie&&Ie?Le:null,className:"block",children:Ve}):Ve),Z&&
|
|
4
|
+
/* @__PURE__ */S("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */S("span",{ref:He,className:"whitespace-pre"})}),Ee&&/* @__PURE__ */S(M,{ariaLabel:be.select.clear,onClear:()=>{ee([]),je(!1)}}),G&&!ie&&/* @__PURE__ */S("div",{ref:ke,className:`absolute top-1/2 -translate-y-1/2 ${Ee?"right-8":"right-2"} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:G}),ie&&D(
|
|
5
|
+
/* @__PURE__ */C("div",{ref:xe,onMouseDownCapture:()=>{Ne.current=!0,setTimeout(()=>{Ne.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:p.popup,left:We?.left,right:We?.right,top:We?.top,bottom:We?.bottom,minWidth:We?.minWidth,width:We?.width,...re&&{maxWidth:We?.maxWidth},visibility:We?void 0:"hidden",...v()},children:[Z&&te&&Y&&!z&&
|
|
6
6
|
/* @__PURE__ */S("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ee([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${g}`,children:be.select.clearAll}),I?
|
|
7
7
|
/* @__PURE__ */S(c,{size:"sm",padding:"py-2",label:be.search.searching}):J?/* @__PURE__ */C("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
8
|
-
/* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:J}),
|
|
9
|
-
/* @__PURE__ */C("div",{id:he,role:
|
|
8
|
+
/* @__PURE__ */S("span",{className:"min-w-0 flex-1",children:J}),X&&/* @__PURE__ */S(u,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:X,className:"shrink-0",children:be.list.retry})]}):null,
|
|
9
|
+
/* @__PURE__ */C("div",{id:he,role:Qe.length?"listbox":void 0,"aria-labelledby":Qe.length?Q??(K?void 0:de):void 0,"aria-label":Qe.length&&!Q?K:void 0,"aria-multiselectable":!(!Qe.length||!Z)||void 0,className:"overflow-y-auto",style:{maxHeight:We?.maxHeight??f},children:[0===Qe.length?I||J?null:/* @__PURE__ */S("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:be.select.noMatches}):0===Pe.length?null:l(Ge,(e,t)=>{const n=q.includes(e.value);/* @__PURE__ */
|
|
10
10
|
return C("button",{id:pe(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||Z)&&n.preventDefault(),De(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===se?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[Z&&/* @__PURE__ */S(o,{selected:n}),
|
|
11
|
-
/* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:
|
|
12
|
-
/* @__PURE__ */S("button",{id:pe(
|
|
11
|
+
/* @__PURE__ */S("span",{className:`min-w-0 ${re?"flex-auto":"flex-1"} truncate`,children:P?P(e,{selected:n,active:t===se}):e.label}),e.sublabel&&/* @__PURE__ */S(i,{grows:re,children:e.sublabel})]},e.value)},ce),Ke&&O&&
|
|
12
|
+
/* @__PURE__ */S("button",{id:pe(Pe.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{Z&&e.preventDefault(),De(Ke,Pe.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${Pe.length?`border-t ${g}`:""} ${se===Pe.length?"bg-gray-100":""}`,children:/* @__PURE__ */S("span",{className:"min-w-0 flex-1 truncate",children:O(Ke.value)})},`${ce}-typed`)]})]}),document.body)]});var Ve}export{R as SearchableSelect,W as fitChoice};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{DragBand as e,tooltipBesideBand as t}from"./chunk-QCFN3ET4.js";import{niceAxis as r,niceMax as i,linearScale as n,axisGutter as o,bandScale as l}from"./chunk-2JWPNR2U.js";import{usePlotWidth as a}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as h}from"./chunk-TWVUQUUD.js";import{CHART_INK as s}from"./chunk-TZFACUMR.js";import{useShellStrings as c,useShellLocale as m}from"./chunk-PEM7UXQ3.js";import{formatPlain as d}from"./chunk-C3QOHMR6.js";import{useRef as u,useState as f,useId as g,useEffect as p}from"react";import{jsx as x,jsxs as y}from"react/jsx-runtime";function v({labels:v,values:b,height:k=220,width:M,bandPadding:w=.24,min:N,max:A,yTickCount:$=4,formatValue:j,yAxisLabel:E,xTickAnchor:P="center",children:U,overlay:R,tooltip:z,onSelect:C,zoom:D,ariaLabel:F,className:L,emptyLabel:S}){const T=c().charts,I=m(),Q=j??(e=>d(e,I)),V=S??T.noData,W=u(null),B=a(W),X=M??B,[Z,H]=f(null),J=g();if(p(()=>{if(null!==Z)return h(e=>"Escape"===e.key&&(H(null),!0))},[Z]),0===v.length||!b.some(Number.isFinite))/* @__PURE__ */
|
|
2
|
+
return x("div",{className:L,ref:W,children:/* @__PURE__ */x("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:V})});const K=b.filter(Number.isFinite),O=K.every(Number.isInteger),q=void 0===N&&void 0===A?r(Math.min(0,...K),Math.max(0,...K),{intervals:$+1,integer:O}):null,G=void 0!==N&&void 0===A?r(N,Math.max(N,...K),{intervals:$+1,integer:O,zero:!1}):null,Y=q?q.lo:N??Math.min(0,...K),_=q?q.hi:G?G.hi:A??i(Math.max(...K,0)),ee=q?q.ticks:G?[Y,...G.ticks.filter(e=>e>Y)]:n([Y,_],{from:0,to:1}).ticks($+1),te={top:12,right:16,bottom:26,left:o(ee.map(Q),48)+(E?10:0)},re=te.left,ie=Math.max(re+1,X-te.right),ne=te.top,oe=k-te.bottom,le=n([Y,_],{from:oe,to:ne}),ae=l(v.length,{from:re,to:ie},w),he=(ie-re)/Math.max(1,v.length),se=he>=48,ce=se?1:Math.max(1,Math.ceil(v.length/Math.max(1,Math.floor(X/84)))),me=Math.max(2,Math.floor((he-6)/6.6)),de=e=>se&&e.length>me?`${e.slice(0,me-1).trimEnd()}…`:e;/* @__PURE__ */
|
|
3
|
+
return y("div",{className:`relative ${L??""}`,ref:W,children:[
|
|
4
|
+
/* @__PURE__ */y("svg",{width:"100%",height:k,viewBox:`0 0 ${X} ${k}`,role:"img","aria-label":F,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>H(null),onBlur:()=>H(null),onKeyDown:e=>{if(C&&null!==Z&&("Enter"===e.key||" "===e.key))return e.preventDefault(),void C(Z);if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1;H(e=>Math.min(v.length-1,Math.max(0,(e??0)+t)))},style:D?{userSelect:"none",touchAction:"pan-y"}:void 0,children:[
|
|
5
|
+
/* @__PURE__ */x("defs",{children:/* @__PURE__ */x("clipPath",{id:J,children:/* @__PURE__ */x("rect",{x:re,y:ne,width:ie-re,height:oe-ne})})}),ee.map(e=>/* @__PURE__ */x("line",{x1:re,y1:le(e),x2:ie,y2:le(e),stroke:s.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${e}`)),
|
|
6
|
+
/* @__PURE__ */x("line",{x1:re,y1:le(Math.max(Y,0)),x2:ie,y2:le(Math.max(Y,0)),stroke:s.axis,strokeWidth:1,shapeRendering:"crispEdges"}),ee.map(e=>/* @__PURE__ */x("text",{x:re-8,y:le(e)+4,textAnchor:"end",fontSize:11,fill:s.label,style:{fontVariantNumeric:"tabular-nums"},children:Q(e)},`t${e}`)),E&&/* @__PURE__ */x("text",{x:14,y:(ne+oe)/2,transform:`rotate(-90 14 ${(ne+oe)/2})`,textAnchor:"middle",fontSize:11,fill:s.label,children:E}),
|
|
7
|
+
/* @__PURE__ */x("g",{clipPath:`url(#${J})`,children:U({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:X,height:k,clipId:J,active:Z})}),R?.({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:X,height:k,clipId:J,active:Z}),v.map((e,t)=>t%ce===0?/* @__PURE__ */x("text",{x:"start"===P?ae(t):ae.center(t),y:k-8,textAnchor:"middle",fontSize:11,fill:s.label,style:{fontVariantNumeric:"tabular-nums"},children:de(e)},`x${t}`):null),D?.drag&&/* @__PURE__ */x(e,{x0:ae.center(D.drag[0])-(ie-re)/v.length/2,x1:ae.center(D.drag[1])+(ie-re)/v.length/2,top:ne,bottom:oe}),v.map((e,t)=>/* @__PURE__ */x("rect",{x:ae.center(t)-(ie-re)/v.length/2,y:ne,width:(ie-re)/v.length,height:oe-ne,fill:"transparent",onMouseEnter:()=>H(t),onPointerDown:D?()=>D.press(t):void 0,onPointerEnter:D?()=>D.over(t):void 0,onPointerUp:D?.release,onClick:C?()=>C(t):void 0,style:C?{cursor:"pointer"}:void 0},`h${t}`))]}),z&&null!==Z&&
|
|
8
|
+
/* @__PURE__ */x("div",{className:"pointer-events-none absolute top-2 z-10",style:t(ae.center(Z),ae.bandwidth,X),children:z(Z)})]})}export{v as CartesianPlot};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Banner as e}from"./chunk-
|
|
1
|
+
import{Banner as e}from"./chunk-7WLFHDWA.js";import{Button_default as t}from"./chunk-NHH2MXFU.js";import{useShellStrings as n}from"./chunk-PEM7UXQ3.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};
|