efficient-shell 12.30.0 → 12.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -1
- package/dist/{Browser-FQHXHI3R.js → Browser-36SDGA64.js} +17 -17
- package/dist/Calculator-GDHNFSB6.js +29 -0
- package/dist/{CurrencyConverter-EHIQIFJK.js → CurrencyConverter-PXCCCUS2.js} +6 -6
- package/dist/{Files-LTUUGPAM.js → Files-NVUIAUO5.js} +141 -141
- package/dist/{Notepad-JPAXNEFR.js → Notepad-QA2CD6GC.js} +9 -9
- package/dist/PdfViewer-627HEAIL.js +1 -0
- package/dist/{PomodoroTimer-IVDZBBUN.js → PomodoroTimer-HD2ZNOUV.js} +69 -69
- package/dist/{Preview-KRK4XT2B.js → Preview-FW2KT6FQ.js} +27 -27
- package/dist/Sidebar-QNJNEBT2.js +44 -0
- package/dist/{Stock-OBS2LPX4.js → Stock-EDZSOJAQ.js} +7 -7
- package/dist/{Weather-I4TJBIEN.js → Weather-OTVZZEE7.js} +17 -17
- package/dist/{WorldClock-YU2ZPVSA.js → WorldClock-PDKFE5S7.js} +4 -4
- package/dist/ai/index.js +88 -88
- package/dist/apps/ImageAnnotator.js +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/StatTile.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-LQD54ZL5.js → chunk-246K337V.js} +1 -1
- package/dist/{chunk-CIOPLPZW.js → chunk-25M4CAB3.js} +1 -1
- package/dist/{chunk-JA5WM66L.js → chunk-26Y66IXU.js} +2 -2
- package/dist/chunk-2PNG5UR6.js +22 -0
- package/dist/chunk-3ECUHYHI.js +28 -0
- package/dist/{chunk-77BK2IAJ.js → chunk-3MAGUYG2.js} +1 -1
- package/dist/{chunk-6EXWWPAW.js → chunk-3TR6C5V4.js} +1 -1
- package/dist/{chunk-YNE5YC6E.js → chunk-3UMS74TZ.js} +1 -1
- package/dist/{chunk-XXRUDMD5.js → chunk-4U2OUX65.js} +5 -5
- package/dist/{chunk-FYGPJPU7.js → chunk-4XN6ACGV.js} +1 -1
- package/dist/{chunk-3R2TMLKH.js → chunk-555KW6TM.js} +5 -5
- package/dist/{chunk-5ZS3VOJH.js → chunk-5OJFYNEZ.js} +1 -1
- package/dist/{chunk-V64XY7L4.js → chunk-5R3NDBCD.js} +7 -7
- package/dist/{chunk-XK3VYRLR.js → chunk-5XHJ3H6Y.js} +4 -4
- package/dist/{chunk-LBLWN3SH.js → chunk-5XOF3O4B.js} +1 -1
- package/dist/{chunk-NJ6WZHXC.js → chunk-6AAGZ34A.js} +10 -10
- package/dist/{chunk-3ZC53F4T.js → chunk-6MA7VXZR.js} +3 -3
- package/dist/{chunk-KHFPF534.js → chunk-6ZTVZIPI.js} +6 -6
- package/dist/chunk-7CHEHWGL.js +9 -0
- package/dist/{chunk-AIGLJYQ5.js → chunk-7IRO4JAA.js} +1 -1
- package/dist/{chunk-N2BWOHNM.js → chunk-7JR2O3IX.js} +5 -5
- package/dist/{chunk-I6V4DMNR.js → chunk-A6YUCAGF.js} +1 -1
- package/dist/{chunk-NSNM4QIV.js → chunk-A7JAHN75.js} +5 -5
- package/dist/chunk-ADNUV6OV.js +8 -0
- package/dist/chunk-AFLG5E4O.js +7 -0
- package/dist/{chunk-KNNFNOX7.js → chunk-AFVI75RH.js} +7 -7
- package/dist/{chunk-KKYNDLOC.js → chunk-AGNHOSES.js} +6 -6
- package/dist/{chunk-RMUOUMV2.js → chunk-AJ2EEWZT.js} +2 -2
- package/dist/chunk-AWY2ZOXT.js +14 -0
- package/dist/{chunk-WM37FXRK.js → chunk-B7UT3W4C.js} +1 -1
- package/dist/{chunk-HJECGV6W.js → chunk-BEN2LJWQ.js} +1 -1
- package/dist/{chunk-U45APXV3.js → chunk-BIBQAEHV.js} +1 -1
- package/dist/{chunk-Y6H5C6A4.js → chunk-BLC6HAU3.js} +1 -1
- package/dist/{chunk-X5RFTIHV.js → chunk-BXPEEPYH.js} +1 -1
- package/dist/{chunk-JOANOIVK.js → chunk-CAIUI3DC.js} +1 -1
- package/dist/{chunk-5O5QMMMG.js → chunk-CHRK5R3Y.js} +8 -8
- package/dist/{chunk-B27XRZ47.js → chunk-COF2CF5R.js} +1 -1
- package/dist/{chunk-42GNFUAP.js → chunk-CYTK7DCA.js} +11 -11
- package/dist/{chunk-DOKA65JI.js → chunk-DGFC5BX4.js} +1 -1
- package/dist/{chunk-IQTURGC4.js → chunk-DHLXSL3Y.js} +1 -1
- package/dist/{chunk-4WW3SNL6.js → chunk-DRIO2Y4R.js} +4 -4
- package/dist/{chunk-IBPULOGJ.js → chunk-DWGMTMDU.js} +2 -2
- package/dist/{chunk-E7RMS776.js → chunk-E6GGE7E5.js} +14 -14
- package/dist/{chunk-FM34DWV7.js → chunk-FE6J5S5X.js} +5 -5
- package/dist/chunk-FKJPBQ6I.js +7 -0
- package/dist/{chunk-MYJ3HQYG.js → chunk-FXS2P23Q.js} +10 -10
- package/dist/chunk-G3NE4SGZ.js +11 -0
- package/dist/chunk-GX4CDXPK.js +9 -0
- package/dist/chunk-H74VN7OI.js +2 -0
- package/dist/chunk-H7WMOY62.js +1 -0
- package/dist/{chunk-HU24RSAE.js → chunk-HGGDOMBV.js} +1 -1
- package/dist/{chunk-CBBU74QT.js → chunk-HWV6UDFC.js} +1 -1
- package/dist/{chunk-OMSIXLK4.js → chunk-IBLRSK7V.js} +1 -1
- package/dist/{chunk-2N6WWL7Y.js → chunk-IE5XWHDU.js} +1 -1
- package/dist/chunk-IESNUXYH.js +1 -0
- package/dist/chunk-IYM5N7FH.js +4 -0
- package/dist/{chunk-IOIY54KO.js → chunk-J44SUUOG.js} +1 -1
- package/dist/{chunk-4SEPQN2N.js → chunk-JI55MXP4.js} +8 -8
- package/dist/{chunk-PAVOVX3D.js → chunk-JIBU7YY4.js} +2 -2
- package/dist/{chunk-WCJR2GNH.js → chunk-JLQ7N54N.js} +17 -17
- package/dist/chunk-JROPOGQP.js +2 -0
- package/dist/{chunk-GBPGZFBS.js → chunk-JTJDXCJU.js} +4 -4
- package/dist/{chunk-CVEVPB3O.js → chunk-JYVHFRKK.js} +5 -5
- package/dist/{chunk-MFZ4YMXE.js → chunk-JZ4V3RHK.js} +6 -6
- package/dist/{chunk-QF4FYOVE.js → chunk-K4BM6PPZ.js} +1 -1
- package/dist/{chunk-GN3AHAVY.js → chunk-K4RY57UX.js} +1 -1
- package/dist/{chunk-XMAOLCQV.js → chunk-K73KBA5C.js} +4 -4
- package/dist/{chunk-VREZFFRE.js → chunk-KDG7NWYX.js} +1 -1
- package/dist/{chunk-5X3Z45SL.js → chunk-KFNQVNND.js} +1 -1
- package/dist/{chunk-JTRQ7HAS.js → chunk-KTKFCR6T.js} +1 -1
- package/dist/chunk-L6XEON5Q.js +1 -0
- package/dist/{chunk-3N4XJS43.js → chunk-LNXYVWEF.js} +1 -1
- package/dist/chunk-LOJAJARD.js +8 -0
- package/dist/{chunk-GL4NELAT.js → chunk-LOMNX5VH.js} +1 -1
- package/dist/{chunk-ILSE5F5F.js → chunk-LQC5U5YT.js} +3 -3
- package/dist/chunk-LUAA4LKY.js +19 -0
- package/dist/{chunk-MRVW6F5E.js → chunk-M2TQQKJO.js} +1 -1
- package/dist/chunk-M3D5FW5R.js +6 -0
- package/dist/{chunk-NLQLVXMJ.js → chunk-M3FBPZ4G.js} +1 -1
- package/dist/{chunk-3B3QIHF7.js → chunk-MMSQZKJY.js} +5 -5
- package/dist/{chunk-X27K2NCU.js → chunk-NDGPJKE3.js} +5 -5
- package/dist/chunk-NMWV6BOL.js +8 -0
- package/dist/{chunk-36MM4YRK.js → chunk-NQ43KRRX.js} +7 -7
- package/dist/{chunk-FIXZT5TZ.js → chunk-NQA267J3.js} +7 -7
- package/dist/{chunk-VEF3STCH.js → chunk-NZ74N2IQ.js} +1 -1
- package/dist/{chunk-YGKQMENL.js → chunk-OA55OBDP.js} +1 -1
- package/dist/{chunk-2DCATU5B.js → chunk-OL2XKAX2.js} +1 -1
- package/dist/chunk-OQGCQQ7H.js +6 -0
- package/dist/{chunk-4FUQK2LK.js → chunk-OU3J5TOO.js} +1 -1
- package/dist/{chunk-MHVWUYEN.js → chunk-OWFJRER6.js} +1 -1
- package/dist/{chunk-M2GF44WC.js → chunk-PK5KDLIG.js} +12 -12
- package/dist/chunk-PPVZMIBL.js +4 -0
- package/dist/{chunk-5XYRFK7D.js → chunk-PR5CON2G.js} +1 -1
- package/dist/chunk-PTEKHRNX.js +26 -0
- package/dist/{chunk-UOHHIEH4.js → chunk-PUXSFLWR.js} +1 -1
- package/dist/{chunk-MVBDE4AX.js → chunk-Q2LKH6RN.js} +1 -1
- package/dist/{chunk-SAAXAAAH.js → chunk-Q2T5DRIK.js} +1 -1
- package/dist/{chunk-U22563X2.js → chunk-QB4LAGMN.js} +1 -1
- package/dist/{chunk-HE2I6KWY.js → chunk-QBQMMOP6.js} +2 -2
- package/dist/{chunk-PBZ3UQMS.js → chunk-QJ6HVBAA.js} +4 -4
- package/dist/{chunk-23CZSU3H.js → chunk-QPSKEDR7.js} +1 -1
- package/dist/{chunk-3HLV6BEC.js → chunk-QTWHMCCX.js} +10 -10
- package/dist/{chunk-Q4BJW37U.js → chunk-QUN3RSMN.js} +1 -1
- package/dist/{chunk-RPXRMTOU.js → chunk-QXLYU5FR.js} +1 -1
- package/dist/{chunk-37EYKPR6.js → chunk-QXTCEUFC.js} +1 -1
- package/dist/{chunk-HC3BZPWX.js → chunk-QYKWVZ3R.js} +1 -1
- package/dist/{chunk-6UB6YY3H.js → chunk-R3W6LZBG.js} +1 -1
- package/dist/{chunk-GANZLRMW.js → chunk-R3ZEDJDZ.js} +8 -8
- package/dist/chunk-RIULA2CH.js +15 -0
- package/dist/{chunk-ANGNTN36.js → chunk-RLFZRIO4.js} +1 -1
- package/dist/{chunk-TIYRBJSB.js → chunk-RPSNYIDY.js} +4 -4
- package/dist/{chunk-QT34GMZR.js → chunk-RSRTE7RG.js} +1 -1
- package/dist/{chunk-5RLJAXDR.js → chunk-S54Z2JAZ.js} +5 -5
- package/dist/{chunk-UQNKFMJR.js → chunk-T5UMQZ5X.js} +12 -12
- package/dist/{chunk-ZSVBEJ4G.js → chunk-TBXFRW3E.js} +1 -1
- package/dist/{chunk-KPPKPGQI.js → chunk-UJ23EKXU.js} +1 -1
- package/dist/{chunk-FSORYU5C.js → chunk-V2OE6OTK.js} +8 -8
- package/dist/{chunk-BEB3AGSY.js → chunk-V7BHDLP2.js} +1 -1
- package/dist/{chunk-DHRCI7KE.js → chunk-VERSP62V.js} +1 -1
- package/dist/{chunk-O3SCB4QZ.js → chunk-VI54L75G.js} +8 -8
- package/dist/{chunk-HOXXEF52.js → chunk-VTDW5GLS.js} +1 -1
- package/dist/chunk-VVI4Y6XA.js +23 -0
- package/dist/{chunk-AYCWVVJ3.js → chunk-VW3ZUWW2.js} +56 -56
- package/dist/{chunk-P4NWDRHS.js → chunk-WJTZE3PL.js} +11 -11
- package/dist/chunk-WW5AXVBX.js +2 -0
- package/dist/{chunk-2IEKMFVL.js → chunk-X4IFSC57.js} +1 -1
- package/dist/{chunk-UEADX2GV.js → chunk-X6AMAYXV.js} +2 -2
- package/dist/{chunk-JGZEZHMP.js → chunk-XBC7CBVJ.js} +1 -1
- package/dist/chunk-XFC7AWPW.js +11 -0
- package/dist/{chunk-TJ5ZX5HP.js → chunk-XKBCF6SK.js} +7 -7
- package/dist/chunk-XOQH6VSU.js +14 -0
- package/dist/chunk-XOXTMWV3.js +6 -0
- package/dist/{chunk-6EETON2U.js → chunk-XR7SPONC.js} +1 -1
- package/dist/{chunk-QV5A7NFQ.js → chunk-Y7XX6Z3M.js} +8 -8
- package/dist/chunk-YELYAGCX.js +13 -0
- package/dist/{chunk-QHWD3G7T.js → chunk-YG6ONZIB.js} +2 -2
- package/dist/{chunk-K6LO6QI5.js → chunk-ZFQI3EVU.js} +6 -6
- package/dist/chunk-ZGY2OK7Q.js +13 -0
- package/dist/{chunk-64ZDYUE7.js → chunk-ZHVWK5NL.js} +17 -17
- package/dist/{chunk-HRNT4UDG.js → chunk-ZP3UAWJL.js} +13 -13
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.d.ts +107 -0
- package/dist/data/Gantt.js +2 -0
- 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/data/ResizableTable.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.d.ts +14 -2
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/payment.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +665 -665
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +2 -2
- package/dist/model-viewer/index.js +3 -3
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +22 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.d.ts +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +2 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +35 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-XCRU5K4O.js +0 -29
- package/dist/PdfViewer-J55QKFNS.js +0 -1
- package/dist/Sidebar-FCXIPW5K.js +0 -44
- package/dist/chunk-4MCI7UHQ.js +0 -7
- package/dist/chunk-4YCWO2GZ.js +0 -14
- package/dist/chunk-67JLD6AU.js +0 -6
- package/dist/chunk-7DTWIWFO.js +0 -6
- package/dist/chunk-7IGWU6DK.js +0 -8
- package/dist/chunk-AJVL6LXI.js +0 -22
- package/dist/chunk-CHV7U5UV.js +0 -9
- package/dist/chunk-CXXMSYA6.js +0 -1
- package/dist/chunk-EWSOX4WP.js +0 -28
- package/dist/chunk-FEWWCWKV.js +0 -11
- package/dist/chunk-FPYOZOUY.js +0 -13
- package/dist/chunk-GCTJIZTJ.js +0 -2
- package/dist/chunk-GKX3C3JE.js +0 -13
- package/dist/chunk-HCDG7EUR.js +0 -1
- package/dist/chunk-KLG6RYYC.js +0 -6
- package/dist/chunk-KPFP2I2S.js +0 -8
- package/dist/chunk-LHATGPIE.js +0 -19
- package/dist/chunk-MKPZIEQP.js +0 -23
- package/dist/chunk-MUSNAMWH.js +0 -1
- package/dist/chunk-PRWA4AAC.js +0 -11
- package/dist/chunk-QB7TIWHT.js +0 -9
- package/dist/chunk-RJG67VRP.js +0 -15
- package/dist/chunk-RVD6HJUJ.js +0 -4
- package/dist/chunk-TN3W72FC.js +0 -8
- package/dist/chunk-UK2D2CSB.js +0 -14
- package/dist/chunk-VLI2ED22.js +0 -7
- package/dist/chunk-VY5NO4TS.js +0 -2
- package/dist/chunk-XJTZU7UH.js +0 -4
- package/dist/chunk-YS3CF7GL.js +0 -2
- /package/dist/{chunk-GMHMWDXU.js → chunk-KH3253OM.js} +0 -0
package/dist/Sidebar-FCXIPW5K.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as n,RAIL_WIDTH_KEY as i,toggleOpenSection as a,writeStored as o}from"./chunk-U6LKNGC6.js";import{ResizeHandle as l}from"./chunk-UEADX2GV.js";import{openGlobalSearch as s}from"./chunk-NJ6WZHXC.js";import{partitionNav as c,visibleNavChildren as d,visibleSectionItems as m,rowsContainRoute as u}from"./chunk-HGOWQO63.js";import{BrandMark as h}from"./chunk-MI67DI3H.js";import{IconButton_default as p}from"./chunk-SV5RRBVA.js";import{RAIL_MENU_GAP as b,navSections as f,startMenuCategories as g,RAIL_W as x,TAB_STRIP_H as k,RAIL_COLLAPSED_INSET as y,RAIL_MAX_W as v,RAIL_MIN_W as N,navIcons as w,sectionIcons as j}from"./chunk-4LXCCZDM.js";import"./chunk-5A7MWTXX.js";import"./chunk-7QSDPSXP.js";import"./chunk-2QY5BJLA.js";import{PopupMenu as C,PopupMenuItem as S,PopupMenuDivider as L}from"./chunk-GOAFMGUI.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-M5K4AX4E.js";import{Icon as $}from"./chunk-ISVODSRP.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import{useShellStrings as z}from"./chunk-HCDG7EUR.js";import"./chunk-C3QOHMR6.js";import{useMemo as A,useState as W,useRef as I,useEffect as T,isValidElement as H,cloneElement as D}from"react";import{jsx as R,jsxs as K,Fragment as M}from"react/jsx-runtime";var O="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform),P=150,U=250;function Q(e,t,r){const n=Math.max(8,r-t.bottom);return{left:e+b,bottom:n,maxHeight:r-n-8,overflowY:"auto"}}var E=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),G="flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",J="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function X({open:e,children:t}){const r=I(null);return T(()=>{r.current?.toggleAttribute("inert",!e)},[e]),/* @__PURE__ */R("div",{ref:r,className:"grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",style:{gridTemplateRows:e?"1fr":"0fr",opacity:e?1:0},"aria-hidden":!e,"data-fold":e?"open":"closed",children:/* @__PURE__ */R("div",{className:"min-h-0 overflow-hidden",children:t})})}function B({open:e}){/* @__PURE__ */
|
|
2
|
-
return R($,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function V({dir:e}){/* @__PURE__ */
|
|
3
|
-
return R($,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function F({className:e}){/* @__PURE__ */
|
|
4
|
-
return R($,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var Y=e=>.75+1.75*e+"rem";function Z({width:b,openWidth:P=x,collapsed:U,onToggleCollapsed:Z,onResize:_,onHome:q,onOpen:ee,activeRoute:te,profile:re,user:ne,onLogout:ie,onSwitchToDesktop:ae,onReportBug:oe,onClose:le,navSections:se=f,navIcons:ce=w,sectionIcons:de=j,categories:me=g,productName:ue,productIcon:he,tagline:pe,adaptiveLogo:be=!1,logoHasAlpha:fe=null,logoIsLight:ge=null}){const xe=z().layout,{hasAnyPerm:ke}=e(),ye=A(()=>c(se,me,ke),[se,me,ke]),[ve,Ne]=W(()=>t(r(n))),we=A(()=>[...ye.topItems.filter(e=>d(e,ke).length>0).map(e=>`child:${e.to}`),...[...ye.erpSections,...ye.systemSections,...ye.virtualSections,...ye.footerSections].map(e=>e.label)],[ye,ke]),je=(e,t=we)=>Ne(r=>{const i=a(r,e,t);return o(n,JSON.stringify([...i])),i}),[Ce,Se]=W(!1),Le=I(null),$e=U&&!le,[ze,Ae]=W(!1),We=I("pointer"),Ie=I(void 0),Te=I(!1),He=I(null),De=()=>{clearTimeout(Ie.current),Ie.current=void 0},Re=e=>{De(),We.current=e,Ae(!0)},Ke=()=>{De(),Ae(!1)};T(()=>{De(),Ae(!1)},[U]),T(()=>()=>De(),[]),T(()=>{if(!ze)return;const e=e=>{const t=e.target;t&&(He.current?.contains(t)||t.closest?.('[role="menu"]'))||(De(),Ae(!1))};return document.addEventListener("pointerdown",e,!0),()=>document.removeEventListener("pointerdown",e,!0)},[ze]);const Me=U&&!ze,Oe=U&&ze?P:b,Pe=(e,t)=>{Ke(),e.onSelect?e.onSelect():ee(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Ue=(e,t)=>{const r=t[e];/* @__PURE__ */
|
|
5
|
-
return R("span",{className:J,"aria-hidden":"true",children:r&&H(r)?D(r,{className:"size-[18px]"}):r})},Qe=e=>e.filter(e=>d(e,ke).length>0).map(e=>`child:${e.to}`),Ee=(e,t,r=we)=>{const n=d(e,ke),i=e.menuLabel??e.label;if(n.length>0){const a=`child:${e.to}`,o=ve.has(a),l=!o&&u(n,te,ke);/* @__PURE__ */
|
|
6
|
-
return K("div",{children:[
|
|
7
|
-
/* @__PURE__ */K("button",{type:"button",onClick:()=>je(a,r),"aria-expanded":o,className:E(l,!1),style:t>0?{paddingLeft:Y(t)}:void 0,children:[0===t&&Ue(e.to,ce),
|
|
8
|
-
/* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:i}),
|
|
9
|
-
/* @__PURE__ */R(B,{open:o})]}),
|
|
10
|
-
/* @__PURE__ */R(X,{open:o,children:/* @__PURE__ */R("div",{className:"space-y-0.5 pt-0.5",children:n.map(e=>Ee(e,t+1,Qe(n)))})}),e.dividerAfter&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:Y(t)},"aria-hidden":"true"})]},e.to)}const a=e.to===te;/* @__PURE__ */
|
|
11
|
-
return K("div",{children:[
|
|
12
|
-
/* @__PURE__ */K("button",{type:"button",onClick:t=>Pe(e,t),onAuxClick:t=>{1===t.button&&Pe(e,t)},"aria-current":a?"page":void 0,className:E(a,!1),style:t>0?{paddingLeft:Y(t)}:void 0,children:[0===t&&Ue(e.to,ce),
|
|
13
|
-
/* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:i})]}),e.dividerAfter&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:Y(t)},"aria-hidden":"true"})]},e.to)},Ge=(e,t)=>{const r=t?e.items:m(e,ke);if(0===r.length)return null;const n="icon"in e&&e.icon?/* @__PURE__ */R("span",{className:J,"aria-hidden":"true",children:e.icon}):Ue(e.label,de),i=e.menuLabel??e.label,a=u(r,te,ke),o="dividerAfter"in e&&e.dividerAfter;if(Me)/* @__PURE__ */
|
|
14
|
-
return K("div",{children:[
|
|
15
|
-
/* @__PURE__ */R("button",{type:"button",title:i,"aria-label":i,"aria-expanded":!1,onClick:()=>{ve.has(e.label)||je(e.label),Re("tap")},className:E(a,!0),children:n}),o&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label);const l=ve.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
|
|
16
|
-
return K("div",{children:[
|
|
17
|
-
/* @__PURE__ */K("button",{type:"button",onClick:()=>je(e.label),"aria-expanded":l,"aria-controls":s,className:E(!l&&a,!1),children:[n,
|
|
18
|
-
/* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate",children:i}),
|
|
19
|
-
/* @__PURE__ */R(B,{open:l})]}),
|
|
20
|
-
/* @__PURE__ */R(X,{open:l,children:/* @__PURE__ */R("div",{id:s,role:"group","aria-label":i,className:"space-y-0.5 pt-0.5",children:r.map(e=>Ee(e,1,Qe(r)))})}),o&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label)},Je=re?.first_name?`${re.first_name} ${re.last_name||""}`.trim():ne?.email||"",Xe=(re?.first_name?.charAt(0)||ne?.email?.charAt(0)||"?").toUpperCase(),Be=re?.avatar_url?/* @__PURE__ */R("img",{src:re.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */R("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Xe}),Ve=Ce?Le.current?.getBoundingClientRect():void 0,Fe=Me?"":"px-3",Ye=Me?{paddingInline:y}:void 0,Ze=`${U?xe.expandSidebar:xe.collapseSidebar} (${O?"⌘":"Ctrl"} .)`,_e=q?{run:q,label:xe.goHome,title:xe.goHome}:le?null:{run:Z,label:U?xe.expandSidebar:xe.collapseSidebar,title:Ze},qe=/* @__PURE__ */K(M,{children:[he&&/* @__PURE__ */R(h,{src:he,alt:"",slot:"compact",surface:"light",adaptive:be,hasAlpha:fe,isLight:ge,size:28,decorative:!0}),!Me&&/* @__PURE__ */K("span",{className:"min-w-0 text-left leading-tight",children:[
|
|
21
|
-
/* @__PURE__ */R("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:ue??"Apps"}),pe&&/* @__PURE__ */R("span",{className:"block truncate text-2xs font-medium text-gray-500",children:pe})]})]}),et=ye.erpSections.length>0||ye.systemSections.length>0||ye.virtualSections.length>0;/* @__PURE__ */
|
|
22
|
-
return K("aside",{ref:He,"aria-label":xe.navLabel,"data-rail-peek":ze?"":void 0,className:`fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-line bg-surface text-ink-strong ${U?"overflow-hidden transition-[width] duration-150 ease-out motion-reduce:transition-none":""} ${ze?"rounded-r-(--radius-panel)":""}`,style:{width:Oe,boxShadow:ze?"var(--elevation-popup)":void 0},onPointerEnter:e=>{"touch"!==e.pointerType&&(Te.current=!0,$e&&(ze?De():(De(),Ie.current=setTimeout(()=>Re("pointer"),150))))},onPointerLeave:e=>{"touch"!==e.pointerType&&(Te.current=!1,$e&&(De(),ze&&!Ce&&"pointer"===We.current&&(Ie.current=setTimeout(Ke,250))))},onFocus:e=>{$e&&!ze&&(e=>{try{return e.matches(":focus-visible")}catch{return!1}})(e.target)&&Re("focus")},onBlur:e=>{if(!ze||"focus"!==We.current)return;const t=e.relatedTarget;t&&He.current?.contains(t)||Ce||Te.current||Ke()},onKeyDown:e=>{"Escape"===e.key&&ze&&Ke()},children:[
|
|
23
|
-
/* @__PURE__ */K("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(Me?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:k},children:[_e?/* @__PURE__ */R("button",{type:"button",onClick:_e.run,"aria-label":_e.label,title:_e.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(Me?"justify-center p-0.5":"-ml-1 p-1"),children:qe}):/* @__PURE__ */R("span",{className:"flex min-w-0 items-center gap-2",children:qe}),le?/* @__PURE__ */R(p,{onClick:le,"aria-label":xe.closeMenu,children:/* @__PURE__ */R($,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):U?ze&&
|
|
24
|
-
/* @__PURE__ */R("button",{type:"button",onClick:()=>{Ke(),Z()},"aria-label":xe.keepSidebarOpen,title:`${xe.keepSidebarOpen} (${O?"⌘":"Ctrl"} .)`,className:G,children:/* @__PURE__ */R(V,{dir:"right"})}):/* @__PURE__ */R("button",{type:"button",onClick:Z,"aria-label":xe.collapseSidebar,title:`${xe.collapseSidebar} (${O?"⌘":"Ctrl"} .)`,className:G,children:/* @__PURE__ */R(V,{dir:"left"})})]}),
|
|
25
|
-
/* @__PURE__ */R("div",{className:`shrink-0 pt-3 ${Fe}`,style:Ye,children:Me?/* @__PURE__ */R("button",{type:"button",onClick:s,"aria-label":xe.search,title:`${xe.search} (${O?"⌘K":"Ctrl K"})`,className:E(!1,!0),children:/* @__PURE__ */R(F,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */K("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-line bg-surface px-3 text-left transition-colors hover:bg-gray-100",children:[
|
|
26
|
-
/* @__PURE__ */R(F,{className:"size-3.5 text-gray-500"}),
|
|
27
|
-
/* @__PURE__ */R("span",{className:"min-w-0 flex-1 truncate text-sm text-ink-faint",children:xe.search}),
|
|
28
|
-
/* @__PURE__ */R("kbd",{className:"rounded border border-line bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-ink-faint",children:O?"⌘K":"Ctrl K"})]})}),
|
|
29
|
-
/* @__PURE__ */K("nav",{"aria-label":xe.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Fe} ${Me?"space-y-1":"space-y-0.5"}`,style:Ye,children:[Me&&/* @__PURE__ */R("button",{type:"button",onClick:Z,"aria-label":xe.expandSidebar,title:`${xe.expandSidebar} (${O?"⌘":"Ctrl"} .)`,className:`${E(!1,!0)} mb-3`,children:/* @__PURE__ */R(V,{dir:"right"})}),ye.topItems.map(e=>{if(!Me)return Ee(e,0);const t=d(e,ke),r=e.to===te||u(t,te,ke),n=e.menuLabel??e.label;/* @__PURE__ */
|
|
30
|
-
return K("div",{children:[
|
|
31
|
-
/* @__PURE__ */R("button",{type:"button",title:n,"aria-label":n,onClick:r=>{if(0===t.length)return void Pe(e,r);const n=`child:${e.to}`;ve.has(n)||je(n),Re("tap")},className:E(r,!0),children:Ue(e.to,ce)}),e.dividerAfter&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.to)}),ye.topItems.length>0&&et&&!ye.topItems[ye.topItems.length-1].dividerAfter&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ye.erpSections.map(e=>Ge(e,!1)),ye.systemSections.map(e=>Ge(e,!1)),ye.virtualSections.map(e=>Ge(e,!0)),ye.footerSections.length>0&&/* @__PURE__ */R("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ye.footerSections.map(e=>Ge(e,!1))]}),
|
|
32
|
-
/* @__PURE__ */R("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Fe}`,style:Ye,children:/* @__PURE__ */K("button",{ref:Le,type:"button",onClick:()=>Se(e=>!e),"aria-haspopup":"menu","aria-expanded":Ce,"aria-label":Me?xe.accountMenu(Je):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(Me?"justify-center py-2":"px-2 py-2"),children:[Be,!Me&&/* @__PURE__ */K("span",{className:"min-w-0 flex-1 text-left",children:[
|
|
33
|
-
/* @__PURE__ */R("span",{className:"block truncate text-sm font-semibold text-ink-strong",children:Je}),ne?.email&&Je!==ne.email&&/* @__PURE__ */R("span",{className:"block truncate text-2xs text-ink-faint",children:ne.email})]})]})}),_&&!U&&!le&&/* @__PURE__ */R(l,{side:"left",width:b,onResize:_,min:N,max:v,defaultWidth:x,storageKey:i,label:xe.resizeSidebar}),Ce&&Ve&&/* @__PURE__ */K(C,{portal:!0,minWidth:224,onClose:()=>{Se(!1),ze&&"pointer"===We.current&&!Te.current&&Ke()},style:Q(Oe,Ve,window.innerHeight),children:[Me&&/* @__PURE__ */K("div",{className:"border-b border-line px-3 py-3",children:[
|
|
34
|
-
/* @__PURE__ */R("p",{className:"truncate text-sm font-semibold text-gray-800",children:Je}),ne?.email&&/* @__PURE__ */R("p",{className:"truncate text-xs text-gray-500",children:ne.email})]}),
|
|
35
|
-
/* @__PURE__ */K(S,{onClick:()=>{Se(!1),Ke(),ee("/profile",!1)},children:[
|
|
36
|
-
/* @__PURE__ */R($,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),xe.profile]}),ye.footerItems.map(e=>/* @__PURE__ */K(S,{onClick:()=>{Se(!1),Pe(e)},children:[
|
|
37
|
-
/* @__PURE__ */R("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:ce[e.to]}),e.menuLabel??e.label]},e.to)),oe&&/* @__PURE__ */K(S,{onClick:()=>{Se(!1),Ke(),oe()},children:[
|
|
38
|
-
/* @__PURE__ */R($,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),xe.reportIssue]}),
|
|
39
|
-
/* @__PURE__ */R(L,{}),ae&&/* @__PURE__ */K(M,{children:[
|
|
40
|
-
/* @__PURE__ */K(S,{onClick:()=>{Se(!1),Ke(),ae()},children:[
|
|
41
|
-
/* @__PURE__ */R($,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),xe.switchToDesktop]}),
|
|
42
|
-
/* @__PURE__ */R(L,{})]}),
|
|
43
|
-
/* @__PURE__ */K(S,{danger:!0,onClick:()=>{Se(!1),Ke(),ie()},children:[
|
|
44
|
-
/* @__PURE__ */R($,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),xe.signOut]})]})]})}export{U as RAIL_PEEK_CLOSE_MS,P as RAIL_PEEK_OPEN_MS,Q as accountMenuPosition,Z as default};
|
package/dist/chunk-4MCI7UHQ.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{writeClipboard as e}from"./chunk-WM37FXRK.js";import{IconButton_default as r}from"./chunk-SV5RRBVA.js";import{Icon as t}from"./chunk-ISVODSRP.js";import{toast_default as n}from"./chunk-5X3Z45SL.js";import{useShellStrings as a}from"./chunk-HCDG7EUR.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
|
|
2
|
-
return s(t,{name:"copy",className:"h-4 w-4","aria-hidden":"true"})}function h(){/* @__PURE__ */
|
|
3
|
-
return s(t,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:t,children:y,symbol:f,label:x,size:g="md",variant:k="bordered",hideCopyButton:v=!1,onCopy:w,multiline:N=!1,id:j,"aria-describedby":R,className:C=""}){const[S,B]=i(!1),T=o(null),V=a().copy;c(()=>()=>{T.current&&clearTimeout(T.current)},[]);const D=l(async()=>{await e(t)?(B(!0),T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{B(!1),T.current=null},2e3),w?.(t)):n.error(V.failed)},[t,w,V]),{box:L,button:X}=p[g],z=!v;/* @__PURE__ */
|
|
4
|
-
return m("div",{id:z?void 0:j,"aria-describedby":z?void 0:R,className:["inline-flex max-w-full items-center rounded-md",u[k],L,C].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
|
|
5
|
-
/* @__PURE__ */s("span",{className:"min-w-0 font-mono text-gray-800 "+(N?"whitespace-pre-wrap break-all":"truncate"),title:N?void 0:t,children:y??t}),!v&&/* @__PURE__ */m(d,{children:[
|
|
6
|
-
/* @__PURE__ */s(r,{id:j,"aria-label":x?V.copyLabel(x):V.copy,"aria-describedby":R,onClick:D,className:`${X} text-gray-400`,children:/* @__PURE__ */s(S?h:b,{})}),
|
|
7
|
-
/* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:S?V.copied:""})]})]})}export{y as Snippet};
|
package/dist/chunk-4YCWO2GZ.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{SearchableSelect as e}from"./chunk-GKX3C3JE.js";import{Select_default as a}from"./chunk-LHATGPIE.js";import{labelClasses as l}from"./chunk-EQKUFYX6.js";import{isSafeLinkHref as t}from"./chunk-Z5TE3MEG.js";import{Input_default as r}from"./chunk-PT4GMPUB.js";import{INPUT_SIZES as n}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-EVYD6UFQ.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-HCDG7EUR.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:n,kinds:o,rules:y=x,filtersFor:w,label:C,readOnly:N,placeholder:F,className:j="",tidyAddress:E,addressAddon:O}=t,T=void 0!==t.onApply,$=u().link,A=y.isSafe??k,D=d(),P=c(null),U=c(null),[z,G]=p({url:n}),Y=T?z.url:n,[K,M]=p(!1),[R,S]=p(null),[B,H]=p(null),[L,Q]=p(!1),V=c(null),W=c(()=>{});W.current=T?t.onCancel:()=>{},m(()=>{if(T)return s(e=>{const a=P.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(W.current(),!0)},()=>P.current)},[T]),m(()=>{if(!T)return;const e=U.current;e?(e.focus(),e.select()):P.current?.querySelector("button, input")?.focus()},[]);const I=o??[{value:b,label:$.address,target:{type:"text"}}],X=R&&R.against===Y?R.kind:y.kindOf(Y),Z=I.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===X),q=Z.find(e=>"text"===e.target.type),J=Z.find(e=>e.value===X)??q??Z[0];if(!J)return null;const _="text"!==J.target.type,ee=_?y.targetOf(Y):Y,ae=h(J.target),le=ae.find(e=>e.value===ee),te=e=>({value:e,label:$.unavailable(e)}),re="select"===J.target.type&&ee&&w?w(ee):null,ne=re?y.readFilter(Y):null,ie=ne?re?.find(e=>e.param===ne.param):void 0,oe=B&&B.against===Y?B.text:Y,se=_?Y:E?E(oe.trim()).trim():oe.trim(),ue=T&&E?se:oe,de=!_&&""!==ue.trim()&&!A(ue),ce=de&&(!T||K);_&&L&&Q(!1);const pe=(e,a)=>{T?G({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},me=(e,a)=>{S(a=>a?{...a,against:e}:a),pe(e,a)},fe=e=>{if(!e)return me("");const a=ae.find(a=>a.value===e);me(e,a?.label)},ve=e=>{M(!1);const a=e.trim();a?A(e)?(H({text:e,against:a}),me(a)):H({text:e,against:Y}):(H({text:e,against:""}),me(""))},ge=e=>{const a=e.relatedTarget;if(a&&(a===U.current||V.current?.contains(a)))return;if(Q(!1),T||!E||N)return;const l=E(oe.trim());l.trim()!==oe.trim()&&ve(l)},he=()=>{if(!T||!se)return;if(!_&&de)return void M(!0);const e=_&&z.url===se?z.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},be=(e,a)=>a&&!e.some(e=>e.value===a)?[te(a),...e]:[...e],xe=(l,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const a=r.some(e=>""===e.value);/* @__PURE__ */
|
|
2
|
-
return f(e,{"aria-label":l,value:t,options:o,disabled:N,clearable:a,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
|
|
3
|
-
return f(a,{size:"sm","aria-label":l,value:t,options:o,readOnly:N,onChange:n})};let ke;if("text"===J.target.type)ke=/* @__PURE__ */f(r,{ref:U,id:`${D}-address`,size:"sm",type:"text",invalid:ce,"aria-label":$.address,"aria-describedby":ce?`${D}-why`:void 0,placeholder:F??$.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:oe,readOnly:N,onChange:e=>ve(e.target.value),onFocus:()=>Q(!0),onBlur:ge,onKeyDown:E&&!T?e=>{"Enter"===e.key&&e.currentTarget.blur()}:void 0});else{const e="groups"===J.target.type?J.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):J.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:J.target.placeholder},...be(e,ee)];ke=xe(J.label,ee,a,fe,e.length>10)}const ye=/* @__PURE__ */v(g,{children:[o&&xe($.linkType,J.value,Z.map(e=>({value:e.value,label:e.label})),e=>{H(null),M(!1);const a=Z.find(a=>a.value===e);if(!a||"text"===a.target.type)return void S({kind:e,against:Y});const l=h(a.target)[0];S({kind:e,against:l?l.value:""}),l?pe(l.value,l.label):pe("")},!1),ke,O&&L&&!N&&"text"===J.target.type&&/* @__PURE__ */f("div",{ref:V,onBlur:ge,children:O({url:oe,onChange:ve})}),re&&xe($.filter,ne?.param??"",[{value:"",label:$.noFilter},...ne&&!ie?[te(ne.param)]:[],...re.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return me(ee,le?.label);const a=re?.find(a=>a.param===e),l=a?.values[0];l&&me(y.withFilter(ee,{param:e,value:l.value}),l.label)},!1),re&&ne&&xe($.value,ne.value,be((ie?.values??[]).map(e=>({value:e.value,label:e.label})),ne.value),e=>{if(!ne)return;const a=ie?.values.find(a=>a.value===e);me(y.withFilter(ee,{param:ne.param,value:e}),a?.label)},(ie?.values.length??0)>10),ce&&/* @__PURE__ */f("p",{id:`${D}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:$.unsafe}),J.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:J.hint}),re&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:$.filterHint})]});if(!T)/* @__PURE__ */
|
|
4
|
-
return f("div",{ref:P,className:`flex min-w-0 flex-auto flex-col gap-2 ${j}`.trim(),role:C?"group":void 0,"aria-label":C,children:ye});const we=t.onRemove;/* @__PURE__ */
|
|
5
|
-
return v("div",{ref:P,role:"dialog","aria-label":C??$.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${j}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),he())},children:[_?/* @__PURE__ */f("span",{className:l({inline:!0}),children:$.title}):/* @__PURE__ */f("label",{htmlFor:`${D}-address`,className:l({inline:!0}),children:$.title}),ye,
|
|
6
|
-
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[we?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:we,children:$.remove}):null,
|
|
7
|
-
/* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
|
|
8
|
-
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>W.current(),children:$.cancel}),
|
|
9
|
-
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:he,disabled:N||""===se,children:$.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,C]=p(!1),N=c(null),F=d(),j=()=>{C(!1),N.current?.focus()};/* @__PURE__ */
|
|
10
|
-
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
|
-
/* @__PURE__ */f(r,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
|
|
12
|
-
/* @__PURE__ */v("button",{ref:N,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?F:void 0,disabled:b,onClick:()=>C(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${n.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
|
|
13
|
-
/* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(t?"text-blue-600":"text-ink-faintest")}),
|
|
14
|
-
/* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:F,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),j()},onRemove:t?()=>{i(""),j()}:void 0,onCancel:j})})]})}export{y as LinkPicker,w as TextLinkField};
|
package/dist/chunk-67JLD6AU.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-RMUOUMV2.js";import{Tooltip as i}from"./chunk-SOZCWT6I.js";import{useShellStrings as l}from"./chunk-HCDG7EUR.js";import{useId as a,useRef as s,useState as c,useEffect as u,Fragment as d}from"react";import{jsxs as h,jsx as f}from"react/jsx-runtime";var m=(e,t,r)=>Math.min(r,Math.max(t,e)),p=e=>e.reduce((e,t)=>e+t,0),v=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var g,b="w-0.5",y=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var w=["text-blue-700","text-gray-600"];function x({count:x,value:$,onChange:k,label:C,"aria-labelledby":N,readOnly:P=!1,disabled:M=!1,className:R=""}){const j=l().widths,z=a(),O=m(Math.round(x)||1,1,n),S=e($,O),A=S??[...t[O]??[]],B=[...A,100-p(A)],D=P||M,T=s(null),E=s({onChange:k,shown:A,locked:D,n:O,stored:S});E.current={onChange:k,shown:A,locked:D,n:O,stored:S};const K=t=>{const{onChange:r,shown:n,locked:o,n:i}=E.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},U=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=m(Math.round(n),r,o-r),i[t+1]=o-i[t],K(i.slice(0,-1))&&(ne.current=null)},H=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=B[e]+B[e+1],i="ArrowRight"===t.key?B[e]+n:"ArrowLeft"===t.key?B[e]-n:"PageUp"===t.key?B[e]+10:"PageDown"===t.key?B[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),U(B,e,i))},I=s(null),[G,L]=c(null),W=()=>{I.current=null,L(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>W,[]);const F=e=>t=>{if(0!==t.button||D)return;t.preventDefault();const r=T.current?.getBoundingClientRect().width??0;r<=0||(I.current={i:e,x:t.clientX,width:r,from:B,moved:!1,pointer:t.pointerId},L(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},V=e=>{const t=I.current;if(!t)return;if(0===e.buttons)return void W();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}U(t.from,t.i,t.from[t.i]+r/t.width*100)},X=e=>{const t=I.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),W())},q=(e,t)=>{const{shown:n}=E.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=m(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-p(n)],e,t);return K(o.slice(0,-1))?o:null},[J,Z]=c(0);u(()=>{const e=T.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Z(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const Q=s(null),[Y,_]=c(null),[ee,te]=c([]),re=(e,t)=>_(r=>t?e:r===e?null:r),ne=s(null),oe=(e,t)=>{const r=ne.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=E.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:v(l,a))||n(r.stored),!0},ie=B.join(",");u(()=>{const e=null===Y?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===g&&(g=document.createElement("canvas").getContext("2d")),!g)return[];const o=g;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(Q.current,Y);te(t=>v(t,e)?t:e)},[Y,ie,J]);const le=j.hint(O,r),ae=B.slice(0,-1).map((e,t)=>p(B.slice(0,t+1)));/* @__PURE__ */
|
|
2
|
-
return h("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":O>1?z:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${R}`.trim(),children:[
|
|
3
|
-
/* @__PURE__ */h("div",{ref:Q,"data-widths-bar":"",className:"relative h-8",children:[
|
|
4
|
-
/* @__PURE__ */f("div",{ref:T,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:B.map((e,t)=>/* @__PURE__ */f("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[t%2]} ${t%2==0?"bg-accent-tint":""}`,children:1===O&&/* @__PURE__ */f("span",{"data-widths-label":"",children:`${e}%`})},t))}),
|
|
5
|
-
/* @__PURE__ */f("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),O>1&&B.map((e,t)=>/* @__PURE__ */h(d,{children:[(()=>{const n=Y===t,l=p(B.slice(0,t)),a=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
|
|
6
|
-
return f("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */f(i,{content:le,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */f(o,{appearance:"bare",value:e,display:()=>(e=>J>0&&J*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(O-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":j.column(t+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||q(t,e)},onRevert:e=>((e,t)=>{E.current.locked||null===t||oe(e,t)||q(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:E.current.stored},re(t,!0)},onBlur:()=>re(t,!1),className:`absolute inset-0 text-xs font-medium ${w[t%2]} ${ee.includes(t)&&!n?"opacity-0":""}`})})})})(),t<O-1&&/* @__PURE__ */f("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${ae[t]}%`},children:/* @__PURE__ */f(i,{content:j.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */f("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":j.divider(t+1,t+2),"aria-valuenow":B[t],"aria-valuemin":r,"aria-valuemax":B[t]+B[t+1]-r,"aria-valuetext":j.dividerValue(t+1,B[t],t+2,B[t+1]),"aria-disabled":D||void 0,onKeyDown:D?void 0:H(t),onPointerDown:F(t),onPointerMove:V,onPointerUp:X,onPointerCancel:X,onLostPointerCapture:()=>{I.current&&W()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(D?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(D?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${G===t?"w-1":y}`)})})})})]},t))]}),O>1&&/* @__PURE__ */f("span",{id:z,className:"sr-only",children:le})]})}export{x as WidthsBar};
|
package/dist/chunk-7DTWIWFO.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-DOKA65JI.js";import{IconButton_default as a}from"./chunk-SV5RRBVA.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as s}from"./chunk-HCDG7EUR.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
|
|
2
|
-
return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:D,letterCase:M,clear:x,disabled:y=!1,"aria-label":R,windows:S,className:A="",layout:I="grid"}){const j=s().textToolbar,q=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!q.words&&!q.paragraph)return null;const B=m(n,k,x,q.cells.paragraph),$=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,K=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:$(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:$(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,L=l(j),O=e.map(e=>[e,L[e],r(e)]),T=C?e.filter(e=>C.allow.includes(e)):[],U=C&&T.includes(C.value)?C.value:T[0],V=[["none",j.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",j.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",j.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],E=x&&B?g(j.clear,/* @__PURE__ */i(a,{className:$(!1),"aria-label":j.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,H=/* @__PURE__ */t(d,{children:[K("bold",j.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),K("italic",j.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),K("underline",j.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),K("strike",j.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(j.color,/* @__PURE__ */i(a,{pressed:k.open,className:$(k.open,"rosh-tb-color"),"aria-label":j.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,K("link",j.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),K("sup",j.sup,/* @__PURE__ */i(o,{name:"superscript"})),K("sub",j.sub,/* @__PURE__ */i(o,{name:"subscript"})),K("code",j.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===B?E:null]}),G=/* @__PURE__ */t(d,{children:[C&&T.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":j.alignment,onKeyDown:e=>p(e,T,e=>C.onChange(e)),children:O.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:$(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===U?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,D&&n.has("bullet")?g(j.bullet,/* @__PURE__ */i(a,{className:$("bullet"===D.pressed),"aria-label":j.bullet,"aria-pressed":"bullet"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,D&&n.has("number")?g(j.number,/* @__PURE__ */i(a,{className:$("number"===D.pressed),"aria-label":j.number,"aria-pressed":"number"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,K("quote",j.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":j.letterCase,onKeyDown:e=>p(e,V.map(([e])=>e),e=>M.onChange(e)),children:V.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:$(M.value===e),"aria-checked":M.value===e,"aria-label":l,tabIndex:e===(M.value||"none")?0:-1,disabled:y||M.disabled,onMouseDown:c,onClick:()=>M.onChange(M.value===e?"":e),children:r},e)))}):null,"paragraph"===B?E:null]}),J="row"===I,P=J?" is-row":q.flow?" is-flow":q.oneRow?" is-one-row":q.words&&void 0===N&&"words"!==B?" is-eight":"",W=b(n,Boolean(k)),Z={"--rosh-tb-color-col":String(W.color),"--rosh-tb-link-col":String(W.link),...J?{"--rosh-tb-cells":String(q.cells.words+q.cells.paragraph),"--rosh-tb-groupgap":q.words&&q.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let z;return z=J?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[q.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:H}):null,q.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:G}):null]}):q.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[H,
|
|
3
|
-
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),G]}):q.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:H}),
|
|
5
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:G})]}):/* @__PURE__ */t(d,{children:[q.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==B?" is-eight":""),children:H}):null,q.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:G}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${P} ${A}`.trim(),style:Z,children:[
|
|
6
|
-
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":R??j.formatting,children:z}),S]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
package/dist/chunk-7IGWU6DK.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{DragBand as e,tooltipBesideBand as t}from"./chunk-U22563X2.js";import{usePlotWidth as r}from"./chunk-MAFUXCPZ.js";import{niceAxis as i,niceMax as n,linearScale as o,axisGutter as l,bandScale as a}from"./chunk-2JWPNR2U.js";import{CHART_INK as h}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as c,useShellLocale as m}from"./chunk-HCDG7EUR.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:U,xTickAnchor:E="center",children:P,overlay:R,tooltip:D,onSelect:z,zoom:C,ariaLabel:L,className:S,emptyLabel:F}){const I=c().charts,T=m(),V=j??(e=>d(e,T)),W=F??I.noData,B=u(null),H=r(B),Q=M??H,[X,Z]=f(null),G=g();if(p(()=>{if(null!==X)return s(e=>"Escape"===e.key&&(Z(null),!0))},[X]),0===v.length||!b.some(Number.isFinite))/* @__PURE__ */
|
|
2
|
-
return x("div",{className:S,ref:B,children:/* @__PURE__ */x("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:W})});const J=b.filter(Number.isFinite),K=J.every(Number.isInteger),O=void 0===N&&void 0===A?i(Math.min(0,...J),Math.max(0,...J),{intervals:$+1,integer:K}):null,q=void 0!==N&&void 0===A?i(N,Math.max(N,...J),{intervals:$+1,integer:K,zero:!1}):null,Y=O?O.lo:N??Math.min(0,...J),_=O?O.hi:q?q.hi:A??n(Math.max(...J,0)),ee=O?O.ticks:q?[Y,...q.ticks.filter(e=>e>Y)]:o([Y,_],{from:0,to:1}).ticks($+1),te={top:12,right:16,bottom:26,left:l(ee.map(V),48)+(U?10:0)},re=te.left,ie=Math.max(re+1,Q-te.right),ne=te.top,oe=k-te.bottom,le=o([Y,_],{from:oe,to:ne}),ae=a(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(Q/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 ${S??""}`,ref:B,children:[
|
|
4
|
-
/* @__PURE__ */y("svg",{width:"100%",height:k,viewBox:`0 0 ${Q} ${k}`,role:"img","aria-label":L,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Z(null),onBlur:()=>Z(null),onKeyDown:e=>{if(z&&null!==X&&("Enter"===e.key||" "===e.key))return e.preventDefault(),void z(X);if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1;Z(e=>Math.min(v.length-1,Math.max(0,(e??0)+t)))},style:C?{userSelect:"none",touchAction:"pan-y"}:void 0,children:[
|
|
5
|
-
/* @__PURE__ */x("defs",{children:/* @__PURE__ */x("clipPath",{id:G,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:h.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:h.axis,strokeWidth:1,shapeRendering:"crispEdges"}),ee.map(e=>/* @__PURE__ */x("text",{x:re-8,y:le(e)+4,textAnchor:"end",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:V(e)},`t${e}`)),U&&/* @__PURE__ */x("text",{x:14,y:(ne+oe)/2,transform:`rotate(-90 14 ${(ne+oe)/2})`,textAnchor:"middle",fontSize:11,fill:h.label,children:U}),
|
|
7
|
-
/* @__PURE__ */x("g",{clipPath:`url(#${G})`,children:P({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:Q,height:k,clipId:G,active:X})}),R?.({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:Q,height:k,clipId:G,active:X}),v.map((e,t)=>t%ce===0?/* @__PURE__ */x("text",{x:"start"===E?ae(t):ae.center(t),y:k-8,textAnchor:"middle",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:de(e)},`x${t}`):null),C?.drag&&/* @__PURE__ */x(e,{x0:ae.center(C.drag[0])-(ie-re)/v.length/2,x1:ae.center(C.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:()=>Z(t),onPointerDown:C?()=>C.press(t):void 0,onPointerEnter:C?()=>C.over(t):void 0,onPointerUp:C?.release,onClick:z?()=>z(t):void 0,style:z?{cursor:"pointer"}:void 0},`h${t}`))]}),D&&null!==X&&
|
|
8
|
-
/* @__PURE__ */x("div",{className:"pointer-events-none absolute top-2 z-10",style:t(ae.center(X),ae.bandwidth,Q),children:D(X)})]})}export{v as CartesianPlot};
|
package/dist/chunk-AJVL6LXI.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{ChartDefs as t,MOTION as e,stagger as a,fillFor as r,dashFor as o,maskId as l}from"./chunk-465RRWBY.js";import{ChartBrush as n}from"./chunk-TIYRBJSB.js";import{ChartDot as i}from"./chunk-CK2YOGUS.js";import{ChartSkeleton as s}from"./chunk-QT34GMZR.js";import{stepPath as c,curvePath as d,areaBetween as m,areaFrom as h}from"./chunk-VFC6QUEN.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{useDragZoom as p,DragBand as g,ChartZoomSummary as y,tooltipBesideBand as k}from"./chunk-U22563X2.js";import{usePlotWidth as x}from"./chunk-MAFUXCPZ.js";import{pairedAxes as v,niceAxis as b,niceMax as M,linearScale as N,axisGutter as w,bandScale as j,ladderScale as $}from"./chunk-2JWPNR2U.js";import{ChartTooltip as R}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as V,CHART_INK as z,STATUS_VARS as A}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as S}from"./chunk-TWVUQUUD.js";import{useShellStrings as W,useShellLocale as C}from"./chunk-HCDG7EUR.js";import{formatPercent as D,formatPlain as E}from"./chunk-C3QOHMR6.js";import{useRef as L,useState as T,useId as U,useEffect as I}from"react";import{jsx as P,jsxs as B}from"react/jsx-runtime";var F=12,O=16,Q=26,Y=52,G=t=>"number"==typeof t&&Number.isFinite(t);function H({series:H,labels:Z,height:J=200,stacked:K=!1,stackMode:X="value",levels:q,curve:_="linear",tension:tt=0,max:et,yTickCount:at=4,formatValue:rt,formatTooltipValue:ot,tooltipLabels:lt,yAxisLabel:nt,referenceLines:it,labelEndpoints:st=!1,dots:ct,dotVariant:dt="border",pulse:mt=!1,brush:ht=!1,range:ut,onRangeChange:ft,zoomable:pt=!0,columnStrip:gt,onSelect:yt,loading:kt=!1,animate:xt=!0,reveal:vt="left-to-right",fillVariant:bt="gradient",gridStyle:Mt="solid",width:Nt,className:wt,emptyLabel:jt}){const $t=W().charts,Rt=C(),Vt=rt??(t=>E(t,Rt)),zt=ot??Vt,At=jt??$t.noData,St=L(null),Wt=x(St),Ct=Nt??Wt,[Dt,Et]=T(null),[Lt,Tt]=T(null),{highlighted:Ut}=u(),It=U(),Pt=ut??Lt,Bt=p(ht&&Pt?Pt[1]-Pt[0]+1:Z.length,pt);if(I(()=>{if(null!==Dt)return S(t=>"Escape"===t.key&&(Et(null),!0))},[Dt]),kt)/* @__PURE__ */
|
|
2
|
-
return P("div",{className:wt,ref:St,children:/* @__PURE__ */P(s,{height:J,width:Nt??Wt})});const Ft=Z,Ot=ut??Lt??[0,Math.max(0,Ft.length-1)],[Qt,Yt]=Ot,Gt=t=>Bt.slice(ht?t.slice(Qt,Yt+1):t),Ht=lt?Gt(lt):void 0,Zt=H.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(G)).map(t=>({...t,data:Gt(t.data),pointTones:t.pointTones?Gt(t.pointTones):void 0})),Jt=t=>(ht?Qt:0)+(Bt.view?.[0]??0)+t;if(Z=Gt(Ft),0===Zt.length||0===Z.length)/* @__PURE__ */
|
|
3
|
-
return P("div",{className:wt,ref:St,children:/* @__PURE__ */P("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:J},children:At})});const Kt=Z.map((t,e)=>Zt.reduce((t,a)=>t+(G(a.data[e])?a.data[e]:0),0)),Xt=(t,e)=>Kt[e]>0?t/Kt[e]:null,qt=[];if(K){let t=Z.map(()=>0);for(const e of Zt)t=t.map((t,a)=>t+(G(e.data[a])?e.data[a]:0)),qt.push("percent"===X?t.map((t,e)=>Xt(t,e)):[...t])}const _t=!!q&&q.length>0,te=t=>"right"===t.axis,ee=!K&&!_t&&void 0===et&&Zt.some(te)&&Zt.some(t=>!te(t)),ae=gt&&!K?gt:null,re=t=>!!ae&&"column"===t.mode,oe=(ee?Zt.filter(t=>!te(t)):Zt).filter(t=>!re(t)),le=ee?Zt.filter(te).flatMap(t=>t.data.filter(G)):[],ne=K?(qt.at(-1)??[]).filter(G):oe.flatMap(t=>t.data.filter(G)),ie=ee?v([Math.min(0,...ne),Math.max(0,...ne)],[Math.min(0,...le),Math.max(0,...le)],{intervals:at+1,integerLeft:ne.every(Number.isInteger),integerRight:le.every(Number.isInteger)}):null,se=ie?ie.left:K&&"percent"===X||_t||void 0!==et?null:b(K?0:Math.min(0,...ne),Math.max(0,...ne),{intervals:at+1,integer:ne.every(Number.isInteger)}),ce=se?se.lo:0,de=K&&"percent"===X?1:se?se.hi:et??M(Math.max(...ne,0)),me=K&&"percent"===X?t=>D(Math.round(100*t),0,Rt):Vt,he=_t?q:se?se.ticks:N([ce,de],{from:0,to:1}).ticks(at+1),ue=w(he.map(me),Y),fe=ie?w(ie.right.ticks.map(Vt),O):O,pe={left:ue,right:Math.max(ue+1,Ct-fe),top:F,bottom:J-Q},ge=j(Z.length,{from:pe.left,to:pe.right}),ye=_t?$(q,{from:pe.bottom,to:pe.top}):null,ke=N([ce,de],{from:pe.bottom,to:pe.top}),xe=ke(Math.max(ce,0)),ve=t=>ye?ye(t):ke(t),be=Zt.filter(re),Me=Math.max(0,...Z.map((t,e)=>be.reduce((t,a)=>t+Math.max(0,G(a.data[e])?a.data[e]:0),0))),Ne=t=>xe-(Me>0?t/Me:0)*(pe.bottom-pe.top)*(ae??0),we=ie?N([ie.right.lo,ie.right.hi],{from:pe.bottom,to:pe.top}):null,je=t=>we&&te(t)?we:ve,$e=ye?ye.levels.map(t=>({value:t,y:ye(t)})):he.map(t=>({value:t,y:ke(t)})),Re=t=>e=>{e.preventDefault(),Et(e=>{const a=(e??0)+t;return Math.min(Z.length-1,Math.max(0,a))})},Ve=Math.max(1,Math.ceil(Z.length/Math.max(1,Math.floor(Ct/96))));/* @__PURE__ */
|
|
4
|
-
return B("div",{className:`relative ${wt??""}`,ref:St,children:[
|
|
5
|
-
/* @__PURE__ */B("svg",{width:"100%",height:J,viewBox:`0 0 ${Ct} ${J}`,role:"img","aria-label":$t.overIntervals(Zt.map(t=>t.label),Z.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Et(null),onBlur:()=>Et(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==Dt&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Jt(Dt));"ArrowRight"===t.key&&Re(1)(t),"ArrowLeft"===t.key&&Re(-1)(t)},children:[
|
|
6
|
-
/* @__PURE__ */P("defs",{children:/* @__PURE__ */P("clipPath",{id:It,children:/* @__PURE__ */P("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
|
|
7
|
-
/* @__PURE__ */P(t,{id:It,fills:Zt.map((t,e)=>({color:V(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:K?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */P("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:z.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
|
|
8
|
-
/* @__PURE__ */P("line",{x1:pe.left,y1:xe,x2:pe.right,y2:xe,stroke:z.axis,strokeWidth:1,shapeRendering:"crispEdges"}),$e.map(t=>/* @__PURE__ */P("text",{x:pe.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:me(t.value)},`ytick-${t.value}`)),ie&&$e.map((t,e)=>/* @__PURE__ */P("text",{x:pe.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:Vt(ie.right.ticks[e])},`ytick-r-${t.value}`)),nt&&/* @__PURE__ */P("text",{x:12,y:(pe.top+pe.bottom)/2,transform:`rotate(-90 12 ${(pe.top+pe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:z.label,children:nt}),
|
|
9
|
-
/* @__PURE__ */P("g",{clipPath:`url(#${It})`,mask:xt&&vt?`url(#${l(It)})`:void 0,children:Zt.map((t,l)=>{const n=V(t.slot,t.color,t.tone),i=t.mode??(K?"area":"line"),s=f(t.key,Ut);if("step"===i){const e=Z.map((e,a)=>({start:ge(a),end:ge.end(a),value:t.data[a]})).filter(t=>G(t.value)).map(e=>({start:e.start,end:e.end,y:je(t)(e.value)}));/* @__PURE__ */
|
|
10
|
-
return P("path",{d:c(e),fill:"none",stroke:n,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:s??void 0,className:"rosh-viz-mark"},t.key)}const u=Z.map((e,a)=>{const r=K?qt[l]?.[a]:t.data[a];return G(r)?[ge.center(a),je(t)(r)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===i){const r=Math.max(1,.62*ge.bandwidth),o="solid"===t.fillVariant,i=je(t);return re(t)?/* @__PURE__ */P("g",{opacity:s??void 0,className:"rosh-viz-mark",children:Z.map((e,a)=>{const i=t.data[a];if(!G(i)||i<=0)return null;const s=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Zt[t]?.key)).reduce((t,a)=>t+Math.max(0,G(a.data[e])?a.data[e]:0),0))(l,a),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
|
|
11
|
-
return P("rect",{x:ge.center(a)-r/2,y:c,width:r,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[a]?A[t.pointTones[a]]:n,fillOpacity:o?1:.55},a)})},t.key):/* @__PURE__ */P("g",{opacity:s??void 0,className:"rosh-viz-mark",children:Z.map((s,c)=>{const d=K?qt[l]?.[c]:t.data[c];if(!G(d))return null;const m=i(d);/* @__PURE__ */
|
|
12
|
-
return P("rect",{x:ge.center(c)-r/2,y:Math.min(m,xe),width:r,height:Math.abs(xe-m),rx:2,fill:n,fillOpacity:o?1:.35,className:xt?e.rise:void 0,style:xt?a(c,26):void 0},c)})},t.key)}const p=d(u,_,tt),g=K&&l>0?Z.map((t,e)=>[ge.center(e),ve(qt[l-1]?.[e]??0)-2]):null,y=g?m(p,g):h(p,u,xe);/* @__PURE__ */
|
|
13
|
-
return B("g",{opacity:s??void 0,className:"rosh-viz-mark",children:[("area"===i||K)&&
|
|
14
|
-
/* @__PURE__ */P("path",{d:y,fill:r(It,l,t.fillVariant??bt,n),stroke:"none"}),
|
|
15
|
-
/* @__PURE__ */P("path",{d:p,fill:"none",stroke:n,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:o(t.stroke??(t.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?e.march:void 0})]},t.key)})}),it?.map((t,e)=>{const a=t.color??A[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
|
|
16
|
-
return B("g",{children:[
|
|
17
|
-
/* @__PURE__ */P("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */P("text",{x:pe.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(ct??(st?"last":"none"))&&Zt.map((t,e)=>{if("column"===t.mode)return null;const a=ct??(st?"last":"none"),r=V(t.slot,t.color,t.tone),o=[...t.data].map(G).lastIndexOf(!0),l="all"===a?Z.map((t,e)=>e).filter(a=>G(K?qt[e]?.[a]:t.data[a])):o>=0?[o]:[];/* @__PURE__ */
|
|
18
|
-
return B("g",{children:[l.map(a=>{const l=K?qt[e]?.[a]:t.data[a];return G(l)?/* @__PURE__ */P(i,{cx:ge.center(a),cy:je(t)(l),color:r,variant:dt,pulse:mt&&a===o,title:`${Z[a]}: ${t.label} ${Vt(l)}`},a):null}),st&&o>=0&&G(K?qt[e]?.[o]:t.data[o])&&/* @__PURE__ */P("text",{x:ge.center(o)-10,y:je(t)(K?qt[e]?.[o]:t.data[o])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:Vt(K?qt[e]?.[o]:t.data[o])})]},`dots-${t.key}`)}),Z.map((t,e)=>e%Ve===0?/* @__PURE__ */P("text",{x:ge.center(e),y:J-8,textAnchor:"middle",fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Dt&&/* @__PURE__ */P("line",{x1:ge.center(Dt),y1:pe.top,x2:ge.center(Dt),y2:pe.bottom,stroke:z.axis,strokeWidth:1}),ae&&Me>0&&
|
|
19
|
-
/* @__PURE__ */B("g",{pointerEvents:"none","data-column-strip":"true",children:[
|
|
20
|
-
/* @__PURE__ */P("line",{x1:pe.left,y1:Ne(Me),x2:pe.right,y2:Ne(Me),stroke:z.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
|
|
21
|
-
/* @__PURE__ */P("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:Vt(Me)})]}),Bt.drag&&/* @__PURE__ */P(g,{x0:ge(Bt.drag[0]),x1:ge(Bt.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),Z.map((t,e)=>/* @__PURE__ */P("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>Et(e),onPointerDown:()=>Bt.press(e),onPointerEnter:()=>Bt.over(e),onPointerUp:Bt.release,onClick:yt?()=>yt(Jt(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),Bt.view&&/* @__PURE__ */P(y,{from:Ht?.[0]??Z[0],to:Ht?.at(-1)??Z[Z.length-1],count:Z.length,total:K&&"percent"!==X?zt(Kt.reduce((t,e)=>t+e,0)):ae?zt(be.reduce((t,e)=>t+e.data.filter(G).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Zt).filter(t=>t.data.some(G)).map(t=>{const e=t.data.filter(G),a=V(t.slot,t.color,t.tone);if(0===e.length)return{key:t.key,label:t.label,color:a,value:"—"};const r=e.reduce((t,e)=>t+e,0),o=K||"column"===t.mode?zt(r):$t.zoomLevel(zt(r/e.length),zt(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:Bt.clear}),ht&&Ft.length>2&&/* @__PURE__ */P(n,{className:"mt-1",labels:Ft,width:Ct,data:H[0]?.data??[],range:Ot,onRangeChange:t=>{ft?ft(t):Tt(t)}}),null!==Dt&&
|
|
22
|
-
/* @__PURE__ */P("div",{className:"pointer-events-none absolute top-2 z-10",style:k(ge.center(Dt),ge.bandwidth,Ct),children:/* @__PURE__ */P(R,{title:Ht?.[Dt]??Z[Dt],rows:Zt.map((t,e)=>({key:t.key,label:t.label,color:V(t.slot,t.color,t.tone),value:G(t.data[Dt])?K&&"percent"===X?`${D(100*(Xt(t.data[Dt],Dt)??0),1,Rt)} · ${zt(t.data[Dt])}`:zt(t.data[Dt]):void 0})),footnote:K&&"percent"===X?$t.inBucket(zt(Kt[Dt])):void 0})})]})}export{H as TimeSeriesChart};
|
package/dist/chunk-CHV7U5UV.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{useOverlayTarget as e,usePopupAnchor as t,usePopupLevel as r,usePopupLevelBindings as i,windowScrimStyle as o,OverlayLayerProvider as n,scrimHasCorners as l,popupLayerStyle as s}from"./chunk-RIG5FEVS.js";import{useDiscardGuard as a}from"./chunk-CIOPLPZW.js";import{dialogA11y as d}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as c}from"./chunk-7QSDPSXP.js";import{useFocusTrap as m,useScrollLock as h}from"./chunk-DWGYC7OD.js";import{Icon as u}from"./chunk-ISVODSRP.js";import{useHydrated as p}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as b}from"./chunk-HCDG7EUR.js";import{useRef as g,useId as x,useState as y,useEffect as v}from"react";import{createPortal as w}from"react-dom";import{jsxs as k,Fragment as N,jsx as j}from"react/jsx-runtime";var C={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},D={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function W(e,t){const r=window.innerHeight-(t.top+t.height);if("bottom"===e)return{left:t.left,width:t.width,bottom:r};const i={top:t.top,height:t.height};return"left"===e?{...i,left:t.left}:{...i,right:window.innerWidth-(t.left+t.width)}}function P({onClose:e}){const t=b().dialog;/* @__PURE__ */
|
|
2
|
-
return j("button",{type:"button",onClick:e,"aria-label":t.close,className:"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__ */j(u,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function S({open:u,onClose:b,side:S="right",size:G="md",title:H,description:I,footer:U,children:V,blocking:E=!1,dirty:O=!1,initialFocus:R,"aria-label":z,"aria-labelledby":B,"aria-describedby":F,className:L=""}){const Q=g(null),T=x(),Y=x(),Z=x(),A=e(p()),[J,X]=y(null),$=a({open:u,dirty:O,onClose:b,title:H,layer:J}),q=g(null),K=t(u&&null!==A,q),M=r(u&&null!==A,q),_=i(M,J),ee=o(M),te=null!==M.host;if(c(u),m(Q,u&&null!==A,R,_),h(u),v(()=>{if(u)return f(()=>!_.current?.(document.activeElement)&&(E||$(),!0),()=>Q.current)},[u,E,$,_]),!u||!A)return null;const re="bottom"===S,ie={...re?{maxHeight:"85vh"}:{},...K?W(S,K):{}};/* @__PURE__ */
|
|
3
|
-
return k(N,{children:[/* @__PURE__ */j("span",{ref:q,hidden:!0,"data-popup-anchor":""}),w(
|
|
4
|
-
/* @__PURE__ */j(n,{value:J,children:/* @__PURE__ */k("div",{ref:X,className:te?"fixed inset-0 pointer-events-none":"fixed inset-0",style:s(M),role:"presentation","data-overlay-layer":"",children:[
|
|
5
|
-
/* @__PURE__ */j("div",{className:"fixed bg-black/30 backdrop-blur-sm "+(te?"pointer-events-auto"+(l(M)?" rounded-(--radius-window)":""):"inset-0"),style:ee??void 0,hidden:te&&!ee,onClick:E?void 0:$,"aria-hidden":"true","data-popup-scrim":te?"window":"system"}),
|
|
6
|
-
/* @__PURE__ */k("div",{ref:Q,...d({modal:!0,titleId:H?Z:void 0,labelledBy:B,label:z}),"aria-describedby":F??(I?Y:V?T:void 0),"data-drawer-side":S,"data-popup-panel":"",style:ie,className:["fixed flex flex-col bg-white shadow-xl",te?"pointer-events-auto":"",re?"":`w-full max-w-full ${C[G]}`,K?"":D[S],re?"rounded-t-xl":"",L].filter(Boolean).join(" "),children:[H?/* @__PURE__ */k("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
|
|
7
|
-
/* @__PURE__ */k("div",{className:"min-w-0",children:[
|
|
8
|
-
/* @__PURE__ */j("h2",{id:Z,className:"text-base font-semibold text-gray-900",children:H}),I&&/* @__PURE__ */j("p",{id:Y,className:"mt-0.5 text-sm text-gray-500",children:I})]}),!E&&/* @__PURE__ */j(P,{onClose:$})]}):!E&&/* @__PURE__ */j("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */j(P,{onClose:$})}),
|
|
9
|
-
/* @__PURE__ */k("div",{id:T,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[I&&!H&&/* @__PURE__ */j("p",{id:Y,className:("mb-3 text-sm text-gray-500 "+(E?"":"pr-8")).trim(),children:I}),V]}),U&&/* @__PURE__ */j("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:U})]})]})}),A)]})}export{S as Drawer};
|
package/dist/chunk-CXXMSYA6.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="12.30.0",a=r;export{a as APP_VERSION,r as VERSION};
|
package/dist/chunk-EWSOX4WP.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-42GNFUAP.js";import{MarqueeBox as r}from"./chunk-IC72MGON.js";import{EmptyState as a}from"./chunk-LQD54ZL5.js";import{ImageLightbox as i}from"./chunk-QV5A7NFQ.js";import{DescriptionList as t}from"./chunk-SACUSHVN.js";import{Drawer as o}from"./chunk-CHV7U5UV.js";import{Breadcrumbs as d}from"./chunk-GL4NELAT.js";import{ROOT_KEY as s,mediaLibraryMenu as c}from"./chunk-4FUQK2LK.js";import{useMediaMoveItems as u}from"./chunk-YNE5YC6E.js";import{RenameField as m}from"./chunk-QIPO4EVJ.js";import{NativeSelect as p}from"./chunk-LHATGPIE.js";import{MediaUploadGrid as h}from"./chunk-O3SCB4QZ.js";import{MediaUsedInList as f}from"./chunk-FYGPJPU7.js";import{Segmented as g}from"./chunk-HNIIDDLJ.js";import{useGridSelection as v}from"./chunk-VLKDWKVR.js";import{useMarquee as k}from"./chunk-OLFYNMTD.js";import{copyToClipboard as y}from"./chunk-WM37FXRK.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as x}from"./chunk-QMBMK6PP.js";import{Banner as C}from"./chunk-6UB6YY3H.js";import{Input_default as N}from"./chunk-PT4GMPUB.js";import{DropdownMenu as I}from"./chunk-3DSGJIC7.js";import{IconButton_default as D}from"./chunk-SV5RRBVA.js";import{useFileIntake as S,FileIntakeAlert as j}from"./chunk-VREZFFRE.js";import{setModalDragAside as F,modalIdHolding as L}from"./chunk-EIFNESXS.js";import{ColoredBadge as z}from"./chunk-SAAXAAAH.js";import{Button_default as E}from"./chunk-EVYD6UFQ.js";import{Icon as T}from"./chunk-ISVODSRP.js";import{Tooltip as O}from"./chunk-SOZCWT6I.js";import{buttonClasses as P}from"./chunk-UQYNPYF4.js";import{usePlotWidth as A}from"./chunk-MAFUXCPZ.js";import{useShellStrings as U}from"./chunk-HCDG7EUR.js";import{useRef as M,useMemo as R,useCallback as V,useState as B,useEffect as K}from"react";import{jsxs as G,Fragment as H,jsx as Q}from"react/jsx-runtime";var Y="application/x-efficient-media-files",J="application/x-efficient-media-folder",$="application/x-efficient-media-file";function W(e){if(!e||!Array.from(e.types).includes($))return null;try{const n=JSON.parse(e.getData($));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 Z={type:"all",use:"any",sort:"newest"},q={lock:/* @__PURE__ */Q(T,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */Q(T,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */Q(T,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */Q(T,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */Q(T,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */Q(T,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */Q(T,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */Q(T,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */Q(T,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */Q(T,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */Q(T,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */Q(T,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */Q(T,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */Q(T,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */Q(T,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */Q(T,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},X={link:/* @__PURE__ */Q(T,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */Q(T,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */Q(T,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */Q(T,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function _(T){const{mode:W="manage",layout:_="auto",location:ee,onLocationChange:ne,folders:le,products:re,allFilesCount:ae,trashCount:ie,files:te,query:oe,onQueryChange:de,filters:se=Z,onFiltersChange:ce,extraFilters:ue,view:me="grid",onViewChange:pe,selectedIds:he,onSelectionChange:fe,usedIn:ge,denied:ve={},accept:ke="image/*,video/*",maxSizeBytes:ye,busy:be,progress:we,onUpload:xe,onNewFolder:Ce,onRename:Ne,onMove:Ie,onTrash:De,onDeleteFolder:Se,onRestore:je,onDeleteForever:Fe,onEmptyTrash:Le,onReplace:ze,onCropEdit:Ee,onOpenInDesign:Te,onChoose:Oe,onCancel:Pe,pickNote:Ae,onDragOut:Ue,className:Me=""}=T,Re=U().mediaLibrary,Ve=U().media,Be="pick"===W,Ke=!Be,Ge=M(null),He=A(Ge,"phone"===_?343:1200),Qe="phone"===_||"auto"===_&&He<640,Ye=R(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,r)=>{for(const a of e){const e=[...r,a];n.set(a.id,{node:a,path:e}),a.children&&l(a.children,e)}};return l(e,[]),n}(re),[re]),Je=R(()=>new Map(le.map(e=>[e.id,e])),[le]),$e=R(()=>{const e=/* @__PURE__ */new Map;for(const n of le){const l=n.parentId&&Je.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[le,Je]),We=V(e=>{const n=[];for(let l=e?Je.get(e):void 0;l&&(n.unshift(l),!(n.length>le.length));l=l.parentId?Je.get(l.parentId):void 0);return n},[Je,le.length]),Ze=V((e,n)=>We(e).some(e=>e.id===n),[We]),[qe,Xe]=B(()=>/* @__PURE__ */new Set(["@files"])),_e=e=>Xe(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),en=V(e=>{Xe(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),nn="files"===(ln=ee).place?`files:${ln.folderId??""}`:"products"===ln.place?`products:${ln.nodeId??""}`:"trash";var ln;K(()=>{if("files"===ee.place)en(["@files",...We(ee.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===ee.place){const e=ee.nodeId?Ye.get(ee.nodeId)?.path??[]:[];en(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[nn]);const rn="products"===ee.place,an="trash"===ee.place,tn="files"===ee.place,on=tn?ee.folderId:null,dn=rn&&ee.nodeId?Ye.get(ee.nodeId)?.path[0]:void 0,sn=e=>e?.sharedFrom?`${Re.readOnly} ${Re.editedAtHq(e.sharedFrom)}`:Re.readOnly,cn=R(()=>te.map(e=>e.id),[te]),un=R(()=>new Map(te.map(e=>[e.id,e])),[te]),mn=v(cn),pn=R(()=>cn.filter(e=>mn.selected.has(e)),[cn,mn.selected]),hn=1===pn.length?un.get(pn[0]):void 0,fn=M(!0);K(()=>{fn.current?fn.current=!1:mn.clear()},[nn]);const gn=he?.join("\0");K(()=>{he&&mn.setSelection(he)},[gn]);const vn=M(gn??""),kn=pn.join("\0");K(()=>{vn.current!==kn&&(vn.current=kn,fe?.(pn))},[kn]);const yn=(e,n={})=>{Be?mn.select(e):mn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[bn,wn]=B(null),xn=e=>{const n=bn;if(wn(null),!n||null==e)return;e!==("folder"===n.kind?Je.get(n.id)?.name:un.get(n.id)?.name)&&Ne?.(n,e)},Cn=async e=>{if(!Ce)return;const n=await Ce(e);en(["@files",...e?[e]:[]]),"string"==typeof n&&wn({kind:"folder",id:n})},Nn=V(e=>{const n=[],l=n=>{if("files"===e.kind)return n===on&&tn?Re.alreadyHere:void 0;const l=Je.get(e.id);return n===e.id||n&&Ze(n,e.id)?Re.notIntoItself:(l?.parentId??null)===n?Re.folderAlreadyHere:void 0};n.push({key:s,label:Re.allFiles,disabledReason:l(null)});const r=(e,a)=>{for(const i of $e.get(e)??[])n.push({key:i.id,label:i.name,depth:a,disabledReason:l(i.id)}),r(i.id,a+1)};return r(null,1),n},[$e,Je,tn,Ze,on,Re]),In=V(e=>{const n=new Set(e.map(e=>un.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[un]),[Dn,Sn]=B(null),jn={words:Re,media:Ve,denied:ve,moveTargets:Nn,kindOf:In,urlOf:e=>un.get(e)?.url,newSubfolder:Ce&&Ke?e=>{Cn(e)}:void 0,rename:Ne&&Ke?e=>{"file"!==e.kind||mn.isSelected(e.id)||mn.select(e.id),wn(e)}:void 0,move:Ie&&Ke?Ie:void 0,trash:De&&Ke?De:void 0,deleteFolder:Se&&Ke?Se:void 0,folderNotEmpty:e=>!!Je.get(e)?.notEmpty,replace:ze&&Ke?ze:void 0,copyUrl:e=>{const n=un.get(e)?.url;n&&y(Re.urlLabel,n)},openInDesign:Te,restore:je,deleteForever:Fe},Fn=e=>c(e,jn),Ln=w(),zn=(e,n)=>{Be||(mn.isSelected(e)||mn.select(e),Ln.open(n,(e=>{const n=mn.isSelected(e)?pn:[e];return rn?{kind:"render",id:e}:an?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[En,Tn]=B(null),[On,Pn]=B(null),[An,Un]=B(null);K(()=>{if(!On&&!En)return;const e=()=>{Pn(null),Tn(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[On,En]);const Mn=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),Rn=(e,n)=>!(!Ie||ve.move||Be)&&(!!Mn(e,Y)||!(!Mn(e,J)||!An)&&(n!==An&&!(n&&Ze(n,An)))),Vn=(e,n)=>({onDragEnter:l=>{Rn(l,n)&&(l.preventDefault(),Tn(e))},onDragOver:l=>{Rn(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",En!==e&&Tn(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Tn(n=>n===e?null:n)},onDrop:e=>{if(Rn(e,n))if(e.preventDefault(),Tn(null),Mn(e,Y)){let l;try{l=JSON.parse(e.dataTransfer.getData(Y))}catch{l=null}Array.isArray(l)&&l.length&&Ie({kind:"files",ids:l.map(String)},n)}else An&&(Ie({kind:"folder",id:An},n),Un(null))}}),Bn=e=>{const n=e=>Mn(e,Y)||Mn(e,J)||Mn(e,"Files");return{onDragEnter:l=>{n(l)&&Pn(e)},onDragOver:l=>{n(l)&&On!==e&&Pn(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Pn(n=>n===e?null:n)}}},Kn=(e,n,l)=>/* @__PURE__ */Q(O,{side:"right",content:On===e?Re.noDropProducts:sn(l),open:On===e||!On&&void 0,children:/* @__PURE__ */Q("span",{children:n})}),Gn=e=>({onContextMenu:n=>{Ln.open(n,e)}}),Hn=(e,r,a)=>e.map(e=>{const i=`p:${e.id}`,t=a??e,o=qe.has(i),d=e.children?.length?e.children:null;/* @__PURE__ */
|
|
2
|
-
return G("div",{role:"none",className:"contents",children:[
|
|
3
|
-
/* @__PURE__ */Q(n,{label:Kn(i,e.name,t),level:r,icon:d&&o?q.folderOpen:q.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Re.fileCount(e.count):void 0,selected:rn&&ee.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>_e(i):void 0,onSelect:()=>ne({place:"products",nodeId:e.id}),rowProps:{"data-media-row":i,...Bn(i),...Ke?Gn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */Q(l,{children:Hn(d,r+1,t)})]},e.id)}),Qn=(e,r)=>($e.get(e)??[]).map(e=>{const a=$e.get(e.id),i=qe.has(e.id),t="folder"===bn?.kind&&bn.id===e.id,o=Fn({kind:"folder",id:e.id});/* @__PURE__ */
|
|
4
|
-
return G("div",{role:"none",className:"contents",children:[
|
|
5
|
-
/* @__PURE__ */Q(n,{label:e.name,level:r,icon:a&&i?q.folderOpen:q.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Re.fileCount(e.count):void 0,selected:t||tn&&ee.folderId===e.id,expanded:a?i:void 0,onToggle:a?()=>_e(e.id):void 0,onSelect:()=>ne({place:"files",folderId:e.id}),drop:En===e.id?"into":void 0,dragging:An===e.id,draggable:Ke&&!!Ie&&!ve.move,rename:t?/* @__PURE__ */Q(m,{value:e.name,label:Re.folderName,onDone:xn}):void 0,actions:Ke&&o.length?/* @__PURE__ */Q(I,{align:"end","aria-label":Re.folderActions,trigger:q.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Vn(e.id,e.id),...Ke?Gn({kind:"folder",id:e.id}):{},...Ke&&Ie&&!ve.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(J,e.id),Un(e.id)},onDragEnd:()=>{Un(null),Tn(null)}}:{}}}),a&&i&&/* @__PURE__ */Q(l,{children:Qn(e.id,r+1)})]},e.id)}),Yn=qe.has("@files"),Jn=qe.has("@products"),$n=/* @__PURE__ */G(e,{"aria-label":Re.folders,children:[re&&/* @__PURE__ */G(H,{children:[
|
|
6
|
-
/* @__PURE__ */Q(n,{label:Kn("@products",Re.products),level:1,icon:q.lock,badge:{label:Re.readOnlyBadge,tone:"neutral"},expanded:re.length?Jn:void 0,onToggle:()=>_e("@products"),selected:rn&&null==ee.nodeId,onSelect:()=>ne({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Bn("@products")}}),Jn&&re.length>0&&/* @__PURE__ */Q(l,{children:Hn(re,2)})]}),
|
|
7
|
-
/* @__PURE__ */Q(n,{label:Re.allFiles,level:1,icon:Yn?q.folderOpen:q.folder,count:ae,countLabel:null!=ae?Re.fileCount(ae):void 0,expanded:$e.get(null)?.length?Yn:void 0,onToggle:()=>_e("@files"),selected:tn&&null==ee.folderId,onSelect:()=>ne({place:"files",folderId:null}),drop:"@files"===En?"into":void 0,rowProps:{"data-media-row":"@files",...Vn("@files",null)}}),Yn&&($e.get(null)?.length??0)>0&&/* @__PURE__ */Q(l,{children:Qn(null,2)}),Ke&&/* @__PURE__ */Q(n,{label:Re.trash,level:1,icon:q.trash,count:ie,countLabel:null!=ie?Re.fileCount(ie):void 0,selected:an,onSelect:()=>ne({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Wn=(()=>{if(an)return[{label:Re.trash}];if(rn){const e=ee.nodeId?Ye.get(ee.nodeId)?.path??[]:[];return[{label:Re.products,onClick:e.length?()=>ne({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"products",nodeId:n.id}):void 0}))]}const e=We(on);return[{label:Re.allFiles,onClick:e.length?()=>ne({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>ne({place:"files",folderId:n.id}):void 0}))]})(),Zn=rn?Re.readOnly:ve.upload,qn=!!xe&&!an&&!Zn,Xn=S({accept:ke,maxSizeBytes:ye,multiple:!0,disabled:!qn,onAccept:e=>xe?.(e,on)}),_n=rn?Re.noProductFolder:ve.newFolder,el=e=>e?{"aria-disabled":!0,disabledReason:e}:{},nl=/* @__PURE__ */G("div",{className:"flex flex-wrap items-center gap-2",children:[Ke&&Ce&&!an&&/* @__PURE__ */Q(E,{variant:"secondary",size:"sm",leftIcon:q.folderPlus,onClick:()=>{Cn(on)},...el(_n),children:Re.newFolder}),xe&&!an&&/* @__PURE__ */Q(E,{variant:"primary",size:"sm",leftIcon:q.upload,onClick:()=>Xn.open(),...el(Zn),children:Re.upload}),Ke&&an&&Le&&te.length>0&&/* @__PURE__ */Q(E,{variant:"danger",size:"sm",onClick:Le,...el(ve.deleteForever),children:Re.emptyTrash})]}),ll=(e,n,l,r,a)=>/* @__PURE__ */Q("div",{style:{width:Qe?void 0:a,flex:Qe?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */Q(p,{size:"sm","aria-label":e,value:n,onChange:r,options:l})},e),rl=e=>n=>ce?.({...se,[e]:n}),al=/* @__PURE__ */G("div",{className:"flex flex-wrap items-center gap-2",children:[de&&/* @__PURE__ */Q("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */Q(N,{size:"sm",type:"search",leftIcon:q.search,placeholder:rn?Re.searchProducts:Re.search,"aria-label":rn?Re.searchProducts:Re.search,value:oe??"",onChange:e=>de(e.target.value)})}),ce&&ll(Re.mediaType,se.type,[{value:"all",label:Re.allTypes},{value:"image",label:Re.images},{value:"video",label:Re.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],rl("type"),130),ce&&!rn&&!an&&ll(Re.use,se.use,[{value:"any",label:Re.anyUse},{value:"email",label:Re.emailOnly},{value:"website",label:Re.websiteOnly},{value:"unused",label:Re.notUsed}],rl("use"),130),ce&&Ke&&ll(Re.sort,se.sort,[{value:"newest",label:Re.newest},{value:"name",label:Re.byName},{value:"size",label:Re.bySize}],rl("sort"),110),ue?.map(e=>ll(e.label,e.value,e.options,e.onChange,120)),pe&&/* @__PURE__ */Q(g,{size:"sm",label:Re.view,value:me,onChange:pe,options:[{value:"grid",label:Re.grid,icon:q.grid},{value:"list",label:Re.list,icon:q.list}]})]}),il=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Re.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:X.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Re.used(e.usedCount),count:e.usedCount,icon:X.link,tone:"active"}),e.email&&n.push({key:"e",label:Re.email,icon:X.email,tone:"queued"}),e.private&&n.push({key:"p",label:Re.private,icon:X.lock,tone:"neutral"}),n},tl=e=>il(e).map(e=>/* @__PURE__ */Q(z,{tone:e.tone,size:"xs",children:e.label},e.key)),ol=Ke&&tn&&!!Ie&&!ve.move,dl=!!Ue&&!an,sl=M(""),cl=M(null),ul=()=>cl.current?.dropped?"dropped":"cancelled",ml=M(Ue);ml.current=Ue;const pl=V(e=>{const n=cl.current;n&&(cl.current=null,n.stop(),F(sl.current,!1),e&&ml.current?.(e))},[]),hl=V(e=>{pl(ul());const n=Ge.current?.ownerDocument;if(!n)return;sl.current=L(Ge.current);const l=Ge.current?.closest("[data-modal-panel]"),r=e=>{sl.current&&!l?.contains(e.target)&&F(sl.current,!0)},a=()=>!!e&&!e.isConnected,i=()=>{const e=cl.current;if(e){if(a())return pl("dropped");e.dropped=!0,F(sl.current,!1)}},t=e=>{const n=e.dataTransfer?.dropEffect;pl(n&&"none"!==n?"dropped":a()?ul():"cancelled")},o=()=>{a()&&pl(ul())},d=["pointermove","pointerdown","mousemove","mousedown"];n.addEventListener("dragover",r,!0),n.addEventListener("drop",i,!0),n.addEventListener("dragend",t,!0);for(const e of d)n.addEventListener(e,o,!0);cl.current={dropped:!1,stop:()=>{n.removeEventListener("dragover",r,!0),n.removeEventListener("drop",i,!0),n.removeEventListener("dragend",t,!0);for(const e of d)n.removeEventListener(e,o,!0)}}},[pl]);K(()=>()=>pl(ul()),[pl]);const fl=(e,n,l)=>{if("start"!==e)return;const r=un.get(n);r&&gl(r)&&(hl(l??null),Ue(e))},gl=e=>!dl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),vl=te.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:il(e),dragData:ol?JSON.stringify(mn.isSelected(e.id)?pn:[e.id]):gl(e),...ol&&gl(e)?{dragAlso:{[$]:gl(e)}}:{}})),kl=Qe?Math.max(72,Math.floor((He-24-16-1)/3)):112,yl=M(null),bl=k({containerRef:yl,enabled:Ke&&!Qe&&te.length>0,selected:mn.selected,setSelection:e=>mn.setSelection(e),clearSelection:mn.clear}),wl=e=>{if(Be){const n=un.get(e);return void(!n||n.private||n.pickDisabledReason||Oe?.(n))}const n=cn.indexOf(e);n>=0&&Sn(n)},xl=te.length?null:oe?/* @__PURE__ */Q(a,{variant:"dashed",title:Re.noMatches}):rn?/* @__PURE__ */Q(a,{variant:"dashed",title:Re.emptyProducts,description:sn(dn)}):an?/* @__PURE__ */Q(a,{variant:"dashed",title:Re.trashEmpty}):!qn||Be?/* @__PURE__ */Q(a,{variant:"dashed",title:Re.emptyFolder}):null,Cl="list"===me&&te.length>0,Nl=xl??(Cl?/* @__PURE__ */Q("ul",{role:"listbox","aria-multiselectable":Ke||void 0,"aria-label":Re.folders,className:"flex flex-col gap-1",children:te.map(e=>/* @__PURE__ */G("li",{role:"option","aria-selected":mn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>yn(e.id,n),onDoubleClick:()=>wl(e.id),onContextMenu:n=>zn(e.id,n),draggable:!!gl(e)||void 0,onDragStart:gl(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData($,gl(e)),fl("start",e.id,n.currentTarget)}:void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),yn(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)] "+(mn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
|
|
8
|
-
/* @__PURE__ */Q("img",{src:e.thumbUrl??e.url,alt:"",className:"h-10 w-10 shrink-0 rounded bg-gray-100 object-contain"}),
|
|
9
|
-
/* @__PURE__ */Q("span",{className:"min-w-0 flex-1 truncate",children:e.name}),
|
|
10
|
-
/* @__PURE__ */Q("span",{className:"flex shrink-0 items-center gap-1",children:tl(e)}),e.sizeLabel&&/* @__PURE__ */Q("span",{className:"w-16 shrink-0 text-right text-xs text-ink-faint",children:e.sizeLabel})]},e.id))}):/* @__PURE__ */Q(h,{items:vl,readOnly:!qn||Be,onFiles:qn&&!Be?e=>xe(e,on):void 0,accept:ke,maxSizeBytes:ye,busy:be,progress:we,fit:"contain",thumbSize:kl,dragType:ol?Y:dl?$:void 0,onDragOutChange:dl?(e,n,l)=>fl(e,n,l):void 0,selected:mn.selected,onItemClick:yn,onItemDoubleClick:wl,onItemContextMenu:Ke?zn:void 0,menuOnMedia:Ke})),Il=u({count:pn.length,kind:In(pn),targets:Nn({kind:"files",ids:pn}),onPick:e=>Ie?.({kind:"files",ids:pn},e.key===s?null:e.key)}),Dl=P({variant:"secondary",size:"sm"}),Sl=/* @__PURE__ */Q(I,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */G(H,{children:[q.folder,Re.moveTo]}),items:Il,disabled:!!ve.move}),jl=Ke&&pn.length>1&&!rn?/* @__PURE__ */G("div",{"data-media-bulk":"",className:"flex flex-wrap items-center gap-2 rounded-lg border border-line px-3 py-2",children:[
|
|
11
|
-
/* @__PURE__ */Q(b,{checked:pn.length===te.length,indeterminate:pn.length<te.length,onChange:e=>e?mn.selectAll():mn.clear(),label:Re.selected(pn.length)}),/* @__PURE__ */G(H,an?{children:[je&&/* @__PURE__ */Q(E,{variant:"secondary",size:"sm",leftIcon:q.undo,onClick:()=>je(pn),...el(ve.restore),children:Re.restore}),Fe&&/* @__PURE__ */Q(E,{variant:"secondary-danger",size:"sm",onClick:()=>Fe(pn),...el(ve.deleteForever),children:Re.deleteForever})]}:{children:[Ie&&Sl,Ne&&/* @__PURE__ */Q(E,{variant:"secondary",size:"sm",leftIcon:q.edit,disabled:!0,children:Re.rename}),De&&/* @__PURE__ */Q(E,{variant:"secondary",size:"sm",leftIcon:q.trash,onClick:()=>De({kind:"files",ids:pn}),...el(ve.trash),children:Re.moveFilesToTrash(pn.length)})]}),
|
|
12
|
-
/* @__PURE__ */Q(E,{variant:"ghost",size:"sm",onClick:mn.clear,children:Re.clearSelection})]}):null,Fl=e=>{const n=[],l=(e,l,r)=>{null!=r&&""!==r&&n.push({key:e,label:l,value:r})},r="file"===bn?.kind&&bn.id===e.id;l("name",Re.name,r?/* @__PURE__ */Q(m,{value:e.name,label:Re.fileName,onDone:xn}):e.name),l("type",Re.type,e.typeLabel),l("size",Re.size,e.sizeLabel),l("resolution",Re.resolution,e.resolution),rn?(l("design",Re.design,e.design),l("finish",Re.finish,e.finish),l("angle",Re.angleLug,e.angleLug),l("owner",Re.owner,e.owner)):(l("added",Re.addedBy,e.addedBy),l("folder",Re.folder,e.folderPath)),l("used",Re.usedIn,null!=e.usedCount?Re.places(e.usedCount):void 0);const a=c({kind:"files",ids:[e.id]},jn).find(e=>"submenu"===e.type);/* @__PURE__ */
|
|
13
|
-
return G("div",{"data-media-details":"",className:"flex flex-col gap-3",children:[
|
|
14
|
-
/* @__PURE__ */Q("img",{src:e.url,alt:e.name,className:"aspect-square w-full rounded-lg bg-gray-100 object-contain"}),rn&&/* @__PURE__ */Q(C,{tone:"neutral",title:Re.readOnlyBadge,children:sn(dn)}),
|
|
15
|
-
/* @__PURE__ */Q(t,{size:"sm",columns:1,items:n}),!an&&/* @__PURE__ */G("div",{className:"flex gap-2",children:[
|
|
16
|
-
/* @__PURE__ */Q("div",{style:{flex:"1 1 0",minWidth:0},children:/* @__PURE__ */Q(N,{size:"sm",readOnly:!0,value:e.url,"aria-label":Re.fileUrl,onFocus:e=>e.currentTarget.select()})}),
|
|
17
|
-
/* @__PURE__ */Q(E,{variant:"secondary",size:"sm",leftIcon:q.copy,onClick:()=>jn.copyUrl(e.id),children:Re.copyUrl})]}),tn&&Ke&&/* @__PURE__ */G("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */Q(E,{variant:"secondary",size:"sm",leftIcon:q.swap,onClick:()=>ze(e.id),...el(ve.replace),children:Re.replace}),Ee&&/* @__PURE__ */Q(E,{variant:"secondary",size:"sm",leftIcon:q.crop,onClick:()=>Ee(e.id),children:Re.cropEdit}),Ie&&"submenu"===a?.type&&/* @__PURE__ */Q(I,{align:"start",triggerClassName:Dl,trigger:/* @__PURE__ */G(H,{children:[q.folder,Re.moveTo]}),items:a.items,disabled:!!ve.move}),Ne&&/* @__PURE__ */Q(E,{variant:"secondary",size:"sm",leftIcon:q.edit,onClick:()=>wn({kind:"file",id:e.id}),...el(ve.rename),children:Re.rename}),De&&/* @__PURE__ */Q(D,{"aria-label":Re.moveToTrash,size:"sm",onClick:()=>De({kind:"files",ids:[e.id]}),disabledReason:ve.trash,"aria-disabled":!!ve.trash||void 0,children:q.trash})]}),an&&Ke&&/* @__PURE__ */G("div",{className:"flex flex-wrap gap-2",children:[je&&/* @__PURE__ */Q(E,{variant:"primary",size:"sm",leftIcon:q.undo,onClick:()=>je([e.id]),...el(ve.restore),children:Re.restore}),Fe&&/* @__PURE__ */Q(E,{variant:"danger",size:"sm",onClick:()=>Fe([e.id]),...el(ve.deleteForever),children:Re.deleteForever})]}),rn&&Te&&/* @__PURE__ */Q(E,{variant:"secondary",size:"sm",leftIcon:q.external,onClick:()=>Te({kind:"render",id:e.id}),children:Re.openInDesign}),ge&&/* @__PURE__ */Q(f,{items:ge})]})},Ll=hn?hn.private?Re.privateNoPick:hn.pickDisabledReason:void 0,zl=Be?/* @__PURE__ */G("div",{"data-media-picker-footer":"",className:"flex flex-wrap items-center justify-between gap-2 border-t border-line px-3 py-2",children:[
|
|
18
|
-
/* @__PURE__ */Q("span",{className:"min-w-0 truncate text-sm text-ink-faint",children:hn?Re.oneChosen(hn.name):Re.noneChosen}),
|
|
19
|
-
/* @__PURE__ */G("div",{className:"flex gap-2",children:[Pe&&/* @__PURE__ */Q(E,{variant:"secondary",size:"sm",onClick:Pe,children:Re.cancel}),
|
|
20
|
-
/* @__PURE__ */Q(E,{variant:"primary",size:"sm",disabled:!hn,...el(Ll),onClick:()=>{hn&&!Ll&&Oe?.(hn)},children:Re.chooseImage})]})]}):null,El=Ke&&!!hn,Tl=/* @__PURE__ */G("div",{className:"flex min-w-0 flex-col gap-3",children:[Ae&&/* @__PURE__ */Q(C,{tone:"neutral",children:Ae}),
|
|
21
|
-
/* @__PURE__ */G("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
|
|
22
|
-
/* @__PURE__ */Q(d,{items:Wn}),nl]}),al,jl,
|
|
23
|
-
/* @__PURE__ */G("div",{ref:yl,className:"relative",onPointerDown:bl.onPointerDown,onKeyDown:e=>{Ke&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),mn.selectAll()):"Escape"===e.key&&mn.size&&mn.clear()},children:[Nl,
|
|
24
|
-
/* @__PURE__ */Q(r,{rect:bl.rect})]}),qn&&/* @__PURE__ */Q("input",{...Xn.inputProps}),
|
|
25
|
-
/* @__PURE__ */Q(j,{rejections:Xn.rejections})]});/* @__PURE__ */
|
|
26
|
-
return G("div",{ref:Ge,"data-media-library":"","data-layout":Qe?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Me}`.trim(),children:[/* @__PURE__ */G("div",Qe?{className:"flex flex-col gap-3 p-3",children:[$n,Tl]}:{className:"flex min-h-0 min-w-0 flex-1",children:[
|
|
27
|
-
/* @__PURE__ */Q("div",{className:"shrink-0 overflow-y-auto border-r border-line p-3",style:{width:280,"--rosh-tree-ground":"var(--surface)"},children:$n}),
|
|
28
|
-
/* @__PURE__ */Q("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Tl}),El&&/* @__PURE__ */Q("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:Fl(hn)})]}),zl,Qe&&/* @__PURE__ */Q(o,{open:El,onClose:mn.clear,side:"bottom",title:hn?.name,children:hn&&Fl(hn)}),Ln.state&&/* @__PURE__ */Q(x,{...Ln.props,items:Fn(Ln.state.data)}),null!=Dn&&te.length>0&&/* @__PURE__ */Q(i,{images:te.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Dn,te.length-1),onClose:()=>Sn(null)})]})}export{Y as MEDIA_FILES_DRAG_TYPE,$ as MEDIA_FILE_DRAG_TYPE,J as MEDIA_FOLDER_DRAG_TYPE,_ as MediaLibrary,W as readMediaFileDrag};
|
package/dist/chunk-FEWWCWKV.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{Segmented as e}from"./chunk-HNIIDDLJ.js";import{ImageFocusPoint as i}from"./chunk-3R2TMLKH.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{isVideoUrl as t,mediaPromptLine as r,mediaFileName as o,FilenameBadge as n,BusyOverlay as s,UploadGlyph as l,zoneFocusClass as c,dropzoneClass as d}from"./chunk-B27XRZ47.js";import{TransferProgress as u}from"./chunk-XMAOLCQV.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-VREZFFRE.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{useShellStrings as b}from"./chunk-HCDG7EUR.js";import{useState as f,useRef as g,useEffect as v,useId as y}from"react";import{jsxs as k,jsx as x,Fragment as j}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:C,label:F,hint:$,error:U,required:z,className:O,accept:P="image/*",maxSizeBytes:H,fit:D="cover",height:I,shape:q="rect",placeholder:B,cta:S,acceptHint:V,showFilename:E=!0,allowReplace:K=!0,allowRemove:A=!0,replaceLabel:M,removeLabel:W,busy:X=!1,busyLabel:Z,choosingLabel:_,pickFailedLabel:G,progress:J,disabled:Q=!1,kind:T,onKindChange:Y,focus:ee,onFocusChange:ie,focusLabel:ae}){const te=b().media,re="circle"===q,oe=I??(re?96:112),ne=S??te.cta,se=T??(/video/.test(P)&&!/image/.test(P)?"video":"image"),le="string"==typeof W&&W?W:te.remove,[ce,de]=f(!1),[ue,me]=f(!1),he=g(!0);v(()=>()=>{he.current=!1},[]);const pe=X||ce,be=ce&&!X?_??te.choosing:Z??te.uploading,fe=U??(ue?G??te.pickFailed:void 0),ge=e=>{if(!R)return;me(!1);const i=R(e);i&&"function"==typeof i.then&&(de(!0),i.then(e=>{he.current&&(de(!1),"string"==typeof e&&e&&L(e))},()=>{he.current&&(de(!1),me(!0))}))},ve=y(),ye=g(null),[ke,xe]=f(null);v(()=>()=>{ye.current&&URL.revokeObjectURL(ye.current)},[]);const je=Q||pe,Ne=!!w&&(t(w,P)||w===ke),we=B??r(P,te),Le=M??(Ne||"video"===se?te.changeVideo:te.changeImage),Re=e=>{R?ge(e):C?C(e):(e=>{ye.current&&URL.revokeObjectURL(ye.current);const i=URL.createObjectURL(e);ye.current=i,xe(e.type.startsWith("video/")?i:null),L(i)})(e)},Ce=m({accept:P,maxSizeBytes:H,acceptHint:V,multiple:!1,disabled:je,onAccept:([e])=>Re(e)}),{dragOver:Fe}=Ce,$e=()=>{je||(R?ge():Ce.open())},Ue=w?o(w):"",ze=!re&&!Ne&&!!ie,Oe=Q||!K&&!A?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:[re?"absolute inset-0 flex items-center justify-center gap-1 p-1 text-(--status-on-solid)":"absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[K&&/* @__PURE__ */k("button",{id:ze?void 0:ve,type:"button","aria-labelledby":`${ve}-change`,onClick:()=>$e(),disabled:pe,className:re?`w-8 shrink-0 ${N}`:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
|
|
2
|
-
/* @__PURE__ */x(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
3
|
-
/* @__PURE__ */x("span",{id:`${ve}-change`,className:re?"sr-only":"truncate",children:Le})]}),A&&/* @__PURE__ */x("button",{type:"button","aria-label":le,onClick:()=>{ye.current&&(URL.revokeObjectURL(ye.current),ye.current=null),xe(null),L("")},disabled:pe,className:`${re?"":"ml-auto "}w-8 shrink-0 ${N}`,children:/* @__PURE__ */x(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Pe=/* @__PURE__ */k("div",{...Ce.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden border transition-colors",re?"shrink-0 rounded-full":"rounded-(--radius-control)",ze?"":"bg-gray-100",Fe?"border-blue-500":"border-line"].join(" "),style:ze?void 0:re?{height:oe,width:oe}:{height:oe},children:[ze?
|
|
4
|
-
/* @__PURE__ */x(i,{value:ee??"",onChange:e=>ie?.(e),label:ae??te.focus,image:w,hint:null,id:ve,disabled:je,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):Ne?/* @__PURE__ */x("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ue||void 0,className:"h-full w-full",style:{objectFit:D}}):/* @__PURE__ */x("img",{src:w??void 0,alt:Ue,className:"h-full w-full",style:{objectFit:D,objectPosition:ee||void 0}}),E&&!re&&w&&/* @__PURE__ */x(n,{children:Ue}),Oe,pe&&/* @__PURE__ */x(s,{label:be,progress:J,rounded:re?"rounded-full":"rounded-md"})]}),He=/* @__PURE__ */k(j,{children:[
|
|
5
|
-
/* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:we}),
|
|
6
|
-
/* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:ne}),V&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:V})]}),De=/* @__PURE__ */k("button",{type:"button",id:ve,onClick:()=>$e(),disabled:je,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:$?`${ve}-hint`:void 0,...Ce.zoneProps,"data-media-circle":"",className:["group/zone flex w-full items-center gap-4 rounded-lg text-left",je?"cursor-not-allowed opacity-60":"cursor-pointer",c(je)].join(" "),children:[
|
|
7
|
-
/* @__PURE__ */x("span",{className:["flex shrink-0 items-center justify-center rounded-full border-2 border-dashed text-ink-faintest transition-colors",Fe?"border-accent-fill bg-accent-tint":"border-line-strong bg-surface-sunken group-hover/zone:bg-accent-tint"].join(" "),style:{height:oe,width:oe},children:/* @__PURE__ */x(l,{})}),
|
|
8
|
-
/* @__PURE__ */x("span",{className:"flex min-w-0 flex-col items-start gap-1 [&>span]:px-0",children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:J}):He})]}),Ie=re?De:/* @__PURE__ */x("button",{type:"button",id:ve,onClick:()=>$e(),disabled:je,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:$?`${ve}-hint`:void 0,...Ce.zoneProps,className:d(Fe,je,c(je)),style:{minHeight:oe},children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:J}):/* @__PURE__ */k(j,{children:[
|
|
9
|
-
/* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(l,{})}),He]})});/* @__PURE__ */
|
|
10
|
-
return k(a,{label:F,htmlFor:ve,hint:$,error:fe,required:z,className:O,children:[Y&&/* @__PURE__ */x("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */x(e,{value:se,onChange:e=>Y(e),options:[{value:"image",label:te.image,icon:/* @__PURE__ */x(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:je},{value:"video",label:te.video,icon:/* @__PURE__ */x(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:je}],block:!0,size:"md",label:"string"==typeof F&&F?F:te.upload})}),w?Pe:Ie,!R&&/* @__PURE__ */x("input",{...Ce.inputProps}),
|
|
11
|
-
/* @__PURE__ */x(h,{rejections:Ce.rejections})]})}export{w as MediaUploadField};
|
package/dist/chunk-FPYOZOUY.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{MOTION as e,stagger as t}from"./chunk-465RRWBY.js";import{arcPath as l}from"./chunk-VFC6QUEN.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{usePlotWidth as r}from"./chunk-MAFUXCPZ.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{ChartTooltip as o}from"./chunk-WDQI3FV6.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-HCDG7EUR.js";import{formatPercent as m,formatPlain as u}from"./chunk-C3QOHMR6.js";import{useId as d,useState as f,useRef as y}from"react";import{jsx as p,jsxs as g}from"react/jsx-runtime";function x({segments:x,variant:v="pie",size:k=280,innerRadius:M,padAngle:b=.012,maxSegments:N=6,otherLabel:I,formatValue:$,centerLabel:j,animate:F=!0,labels:w="none",labelMinShare:C=.04,className:P,emptyLabel:S}){const A=h().charts,R=c(),W=$??(e=>u(e,R)),E=I??A.other,z=S??A.nothingToBreakDown,T=d(),[U,V]=f(null),{highlighted:_}=a(),L=y(null),Y=r(L,Number.POSITIVE_INFINITY),B=x.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===B.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${P??""}`,children:z});const D=[...B].sort((e,t)=>t.value-e.value),H=D.slice(0,N),O=D.slice(N),Q=O.length>0?[...H,{key:"__other__",label:E,value:O.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:H,Z=e=>i(e.slot,e.color,e.tone),q=Q.reduce((e,t)=>e+t.value,0),G=Math.ceil(.62*Math.max(...Q.map(e=>String(e.label).length),4)*11)+24,J="outside"===w&&Y>=120+2*G,X=J?G:0,K=J?Math.max(120,Math.min(k,Y-2*X)):k,ee=K+2*X,te=X+K/2,le=K/2,ae=K/2-12,re=M??("ring"===v?.58*ae:0),ne=n(Q.length,b),oe=Math.max(...Q.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!J)return[];let e=-Math.PI/2;const t=Q.map((t,l)=>{const a="rose"===v?n(Q.length,b).step:t.value/q*Math.PI*2,r="rose"===v?n(Q.length,b).center(l):e+a/2;e+=a;const o="rose"===v?se(t.value):ae;return{key:t.key,label:t.label,share:t.value/q,right:Math.cos(r)>=0,anchor:[te+o*Math.cos(r),le+o*Math.sin(r)],y:le+(o+14)*Math.sin(r),index:l}}).filter(e=>e.share>=C),l=Math.max(1,Math.floor((K-11-13)/26)+1),a=/* @__PURE__ */new Set;for(const e of[!0,!1]){const r=t.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,l).sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e+=1)r[e].y-r[e-1].y<26&&(r[e].y=r[e-1].y+26);for(let e=r.length-1;e>=0;e-=1){const t=e===r.length-1?K-13:r[e+1].y-26;r[e].y=Math.min(r[e].y,t)}r.forEach((e,t)=>{e.y=Math.max(e.y,0===t?11:r[t-1].y+26),a.add(e.key)})}return t.filter(e=>a.has(e.key))})(),ce=(e,t)=>null!==U?U!==e:null!==_&&_!==t,me=null!==U?Q[U]:void 0;/* @__PURE__ */
|
|
2
|
-
return g("div",{className:`relative ${P??""}`,ref:L,children:[
|
|
3
|
-
/* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":T,onMouseLeave:()=>V(null),children:[
|
|
4
|
-
/* @__PURE__ */p("title",{id:T,children:A.breakdown(W(q),Q.length)}),Q.map((a,r)=>{const n=Z(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/q*Math.PI*2-b;"rose"!==v&&(ie+=a.value/q*Math.PI*2);const h=o+Math.max(.001,i),c="rose"===v?se(a.value):ae;/* @__PURE__ */
|
|
5
|
-
return p("path",{d:l(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:F?e.sweep:void 0,style:F?t(r,55):void 0,onMouseEnter:()=>V(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
|
|
6
|
-
return g("g",{children:[
|
|
7
|
-
/* @__PURE__ */p("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${l},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:s.grid,strokeWidth:1}),
|
|
8
|
-
/* @__PURE__ */p("text",{x:t,y:e.y-2,fontSize:11,fill:s.label,textAnchor:e.right?"end":"start",children:e.label}),
|
|
9
|
-
/* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,R)})]},`lbl-${e.key}`)}),j&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:j})]}),me&&null!==U&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(o,{title:me.label,rows:[{key:"value",label:A.value,color:Z(me),value:W(me.value)},{key:"share",label:A.share,color:s.muted,value:m(me.value/q*100,1,R)}]})}),
|
|
10
|
-
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:Q.map((e,t)=>/* @__PURE__ */g("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
11
|
-
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:Z(e)}}),
|
|
12
|
-
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
13
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/q*100,1,R)})]},e.key))})]})}export{x as PieChart};
|
package/dist/chunk-GCTJIZTJ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-SOZCWT6I.js";import{jsx as a,jsxs as l}from"react/jsx-runtime";var r="58px";function i({options:i,value:s,onChange:o,onClear:n,columns:t,captions:c=!1,label:d,className:u="","aria-labelledby":b}){const p=t?{flex:`0 1 calc((100% - ${t-1} * var(--space-8)) / ${t})`}:{flex:`0 1 ${r}`};/* @__PURE__ */
|
|
2
|
-
return a("div",{role:"group","aria-label":b?void 0:d,"aria-labelledby":b,style:c?void 0:{gridTemplateColumns:t?`repeat(${t}, minmax(0, 1fr))`:`repeat(auto-fill, minmax(${r}, 1fr))`},className:`${c?"flex flex-wrap":"grid"} gap-(--space-8) ${u}`.replace(/\s+/g," ").trim(),children:i.map(r=>{const i=r.value===s,t=/* @__PURE__ */l("button",{type:"button","aria-pressed":i,"aria-label":c?void 0:r.label,disabled:r.disabled||void 0,onClick:()=>{i?n?.():o(r.value)},className:`flex w-full min-w-0 flex-col items-center justify-center gap-(--space-4) rounded-(--radius-control) border transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)] disabled:cursor-not-allowed disabled:opacity-50 ${c?"px-(--space-4) py-(--space-8)":"p-(--space-4)"} ${i?"border-blue-600 bg-surface text-blue-600 ring-2 ring-blue-400/40":"border-line bg-surface text-ink-faint hover:bg-row-hover hover:text-ink"}`,children:[r.picture,c&&/* @__PURE__ */a("span",{className:"max-w-full text-center text-2xs leading-4 break-normal",children:r.label})]});return c?/* @__PURE__ */a("div",{className:"flex min-w-min",style:p,children:t},r.value):/* @__PURE__ */a(e,{content:r.label,describe:!1,className:"relative flex min-w-0",children:t},r.value)})})}export{i as PictureTiles};
|
package/dist/chunk-GKX3C3JE.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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-K5YT5PMJ.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-PT4GMPUB.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-EVYD6UFQ.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{GLASS_DIVIDER as k,glassStyle as j}from"./chunk-5FYDNH4Y.js";import{useShellStrings as $}from"./chunk-HCDG7EUR.js";import{useState as D,useId as N,useRef as C,useMemo as S,useEffect as W}from"react";import{createPortal as M}from"react-dom";import{jsxs as R,jsx as E}from"react/jsx-runtime";function T(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}}var F=["right-2","right-8","right-16"],z=[8,32,64];function L(L){const{options:O,placeholder:U,emptyOptionLabel:A,className:Y="",disabled:H,id:I,filter:B=!1,allowFreeText:P=!1,freeTextOption:G,onSearchChange:J,loading:V=!1,error:K,onRetry:Z,rightAdornment:Q,endAction:X,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=L,re=!0===L.multiple,le=L.multiple?L.value:L.value?[L.value]:[],oe=L.multiple?"":L.value,ie=e=>{L.multiple?L.onChange(e):L.onChange(e[0]??"")},ae=le.length>0,se=B&&ae&&!H,ce=re||B,ue=null!=G,de=P||ue,[he,pe]=D(!1),[me,fe]=D(-1),be=N(),ge=I??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=D(""),ke=$(),je=A??ke.select.none,$e=e=>{xe(e),fe(-1),J?.(e)},De=C(null),Ne=C(null),Ce=C(null),Se=C(null),We=C(he);We.current=he;const Me=C(!1),Re=e=>{We.current&&(We.current=!1,e&&P&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),$e(""))},Ee=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?$e(""):fe(t));ie([e.value]),Re(!1)}},[Te,Fe]=D(null);y(()=>{if(!Q||he)return void Fe(null);const e=Se.current?.offsetWidth??0;Fe(e?e+z[He]+6:null)});const ze=v(Ne,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),Le=S(()=>t(O),[O]),Oe=le.join("\0"),Ue=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Le)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[Le,Oe,de]),Ae=Ue.join(", "),Ye=_&&ae&&!H,He=(Ye?1:0)+(X?1:0),[Ie,Be]=D(null),Pe=C(null),Ge=C(""),Je=C(()=>{});Je.current=()=>{const e=Ne.current,t=Pe.current;if(!re||!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}|${Ue.join("\0")}`;if(o===Ge.current)return;Ge.current=o;let i=null;r>0&&Ue.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=T(Ue,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Be(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Je.current()}),W(()=>{const e=Ne.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Je.current());return t.observe(e),()=>t.disconnect()},[re]);const Ve=Ue.length,Ke=!re||!Ie||Ie.shown>=Ve?Ae:0===Ie.shown?ke.select.selectedCount(Ve):`${Ue.slice(0,Ie.shown).join(", ")} +${Ve-Ie.shown}`,Ze=re&&null!==Ie&&(Ie.shown<Ve||Ie.cut),Qe=he&&ae&&ce;W(()=>{if(!he)return;const e=e=>{const t=e.target;De.current?.contains(t)||Ce.current?.contains(t)||Re(!0)};document.addEventListener("mousedown",e);const t=b(()=>Re(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,P,ye,Oe,L.onChange]),W(()=>{if(he)return x(e=>!("Escape"!==e.key||!We.current)&&(Re(!1),Ne.current?.blur(),!0),()=>Ce.current)},[he]);const Xe=S(()=>{const e=/* @__PURE__ */new Set;return n(O,t=>!e.has(t.value)&&(e.add(t.value),!0))},[O]),qe=S(()=>{if(J)return Xe;const e=ye.trim().toLowerCase();return e?n(Xe,t=>r(t,e)):Xe},[Xe,ye,J]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?Le.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,Le,Oe]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
|
-
return R("div",{ref:De,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(De.current?.contains(t)||Ce.current?.contains(t))||Me.current||document.activeElement!==Ne.current&&Re(!0)},children:[(rt=/* @__PURE__ */E("input",{id:ge,ref:Ne,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Ke,onChange:e=>{$e(e.target.value),pe(!0)},onFocus:()=>{H||($e(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(H)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Ee(nt[me],me):1!==_e.length||_e[0].disabled?P&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),$e("")):(ie([et]),Re(!1),Ne.current?.blur())):Ee(_e[0],0)):"Escape"===t.key?(Re(!1),Ne.current?.blur()):"Tab"===t.key&&Re(!0)},placeholder:Qe?Ke:U||je,className:`${se?u:d} ${Y} ${a[He]}${H?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Qe?" rosh-field-shows-choice":""}`,style:Te?{paddingRight:Te}:void 0,disabled:H}),re?/* @__PURE__ */E(f,{content:!he&&Ze?Ae:null,className:"block",children:rt}):rt),re&&
|
|
3
|
-
/* @__PURE__ */E("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */E("span",{ref:Pe,className:"whitespace-pre"})}),He>0&&
|
|
4
|
-
/* @__PURE__ */R(s,{children:[Ye&&
|
|
5
|
-
/* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */E(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */E(p,{name:"close"}),onClick:()=>{ie([]),Re(!1)}}})}),X&&/* @__PURE__ */E("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */E(c,{action:X})})]}),Q&&!he&&/* @__PURE__ */E("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${F[He]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Q}),he&&M(
|
|
6
|
-
/* @__PURE__ */R("div",{ref:Ce,onMouseDownCapture:()=>{Me.current=!0,setTimeout(()=>{Me.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:ze?.left,right:ze?.right,top:ze?.top,bottom:ze?.bottom,minWidth:ze?.minWidth,width:ze?.width,...ce&&{maxWidth:ze?.maxWidth},visibility:ze?void 0:"hidden",...j()},children:[re&&ae&&_&&!H&&
|
|
7
|
-
/* @__PURE__ */E("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},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 ${k}`,children:ke.select.clearAll}),V?
|
|
8
|
-
/* @__PURE__ */E(m,{size:"sm",padding:"py-2",label:ke.search.searching}):K?/* @__PURE__ */R("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
|
-
/* @__PURE__ */E("span",{className:"min-w-0 flex-1",children:K}),Z&&/* @__PURE__ */E(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:Z,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
|
-
/* @__PURE__ */R("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:ze?.maxHeight??w},children:[0===nt.length?V||K?null:/* @__PURE__ */E("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
|
-
return R("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Ee(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===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */E(o,{selected:n}),
|
|
12
|
-
/* @__PURE__ */E("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */E(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&G&&
|
|
13
|
-
/* @__PURE__ */E("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Ee(tt,_e.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 ${_e.length?`border-t ${k}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */E("span",{className:"min-w-0 flex-1 truncate",children:G(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{L as SearchableSelect,T as fitChoice};
|
package/dist/chunk-HCDG7EUR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{formatPlain as e,formatFixed as o,formatGrouped as t,formatPercent as a}from"./chunk-C3QOHMR6.js";import{createContext as i,useContext as n,useMemo as r,useEffect as s}from"react";import{jsx as l}from"react/jsx-runtime";function d(i){const n=o=>e(o,i),r=e=>t(e,i),s=(e,t)=>o(e,t,i),l=(e,o)=>a(e,o,i);return{window:{minimize:"Minimize",restore:"Restore",maximize:"Maximize",windowed:"Windowed",pinOnTop:"Pin on top",unpin:"Unpin from top",close:"Close",edit:"Edit",discard:"Discard",windowSuffix:"window",prev:"Prev",next:"Next",snapLayouts:"Snap layouts",snapLeft:"Snap left half",snapRight:"Snap right half",snapTopLeft:"Snap top-left quarter",snapTopRight:"Snap top-right quarter",snapBottomLeft:"Snap bottom-left quarter",snapBottomRight:"Snap bottom-right quarter"},taskbar:{closeWindow:"Close window",offscreenHint:"This window is off screen — click to bring it back",offscreenDot:"Off screen — click to bring this window back",expose:"Exposé — show all open windows as thumbnails",addToDesktop:"Add to desktop",removeFromDesktop:"Remove from desktop",minimizeAllWindows:"Minimize all",restoreAllWindows:"Restore all",closeAllWindows:"Close all"},logout:{goodbye:"Goodbye",seeYou:"See you next time"},about:{aboutPrefix:"About",thisApp:"this app",openSourceLicenses:"Open Source Licenses",whatsNew:"What's New",noChangelog:"No changelog available."},table:{empty:"Nothing to show",loading:"Loading",selectAll:"Select all rows",selectRow:"Select row"},select:{none:"— None —",noMatches:"No matches",allSelected:"All options selected",clear:"Clear selection",clearAll:"Clear all",changed:"Changed",selectedCount:e=>`${n(e)} selected`,remove:"Remove"},notifications:{title:"Notifications",markAllRead:"Mark all read",dnd:"Do not disturb",dndOn:"Do not disturb is on",caughtUp:"All caught up",empty:"No notifications yet",viewAll:"View all notifications",byActor:e=>`by ${e}`,cardLabel:"Notification",dismiss:"Dismiss notification"},form:{errorSummaryTitle:"There is a problem"},help:{title:"Help",searchPlaceholder:"Search help…",empty:"No help articles yet.",noResults:"No articles match your search.",loading:"Loading",pickArticle:"Pick a help article from the left.",noBody:"This article has no body yet.",draft:"Draft",newArticle:"+ New",edit:"Edit"},update:{available:"A new version is available.",refreshNow:"Refresh now"},pageTabs:{label:"Open pages",close:"Close",favorite:"Favorite",closeOthers:"Close other tabs",closeRight:"Close tabs to the right",closeAll:"Close all tabs",unsaved:"Unsaved changes",copy:e=>`Copy ${e}`,copied:"Copied",tabMenu:"Window menu",groupToggle:(e,o)=>`${e}: ${n(o)} ${1===o?"tab":"tabs"}`,discardTitle:"Discard unsaved changes?",discardOne:"This page has changes that have not been saved. Close it anyway?",discardMany:"pages have changes that have not been saved. Close them anyway?",discardConfirm:"Discard and close",keepEditing:"Keep editing"},dialog:{close:"Close",cancel:"Cancel",ok:"OK",confirmTitle:"Confirm",destructiveTitle:"Confirm Action",destructiveCancel:"Dismiss",destructiveConfirm:"Delete",typeToConfirm:e=>`Type ${e} to confirm:`,promptTitle:"Enter a value",discardTitle:"Discard changes?",discardMessage:e=>e?`“${e}” has unsaved changes. Are you sure you want to close? All changes will be lost.`:"You have unsaved changes. Are you sure you want to close? All changes will be lost.",discardConfirm:"Discard",keepEditing:"Keep Editing"},calendar:{previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",monthPanel:"Choose a month",yearPanel:"Choose a year",chooseMonth:e=>`Choose a month, currently ${e}`,chooseYear:e=>`Choose a year, currently ${e}`},datePicker:{placeholder:"Select a date",dialog:"Choose a date",clear:"Clear",today:"Today",required:"Required"},dateRange:{placeholder:"Date Range",clearRange:"Clear date range",dialog:"Date range",from:"From",to:"To",start:"Start",end:"End",fromOnly:e=>`From ${e}`,toOnly:e=>`To ${e}`,range:(e,o)=>`${e} to ${o}`,required:"Required",last2Weeks:"Last 2 Weeks",lastMonth:"Last Month",last3Months:"Last 3 Months",last6Months:"Last 6 Months",last12Months:"Last 12 Months",lastHeading:"Last",last2WeeksShort:"2 weeks",lastMonthShort:"Month",last3MonthsShort:"3 months",last6MonthsShort:"6 months",last12MonthsShort:"12 months",custom:"Custom",clear:"Clear",cancel:"Cancel",apply:"Apply"},pagination:{label:"Pagination",first:"First page",previous:"Previous page",next:"Next page",last:"Last page"},list:{selected:e=>`${n(e)} selected`,selectedNotShown:(e,o)=>`${n(e)} selected, ${n(o)} not shown`,allLoaded:(e,o)=>`All ${r(e)} ${o} loaded`,count:(e,o)=>`${r(e)} ${o}`,loadedOf:(e,o,t)=>`${r(e)} of ${r(o)} ${t}`,loadingMore:"Loading more",loadError:"Couldn't load this list",loadErrorMessage:"Something went wrong fetching these records. Check your connection and try again.",retry:"Try again"},kanban:{loading:"Loading",empty:"No items.",dropHere:"Drop here",addItem:"Add item"},files:{attach:"Attach files",drop:"Drop files to attach",remove:e=>`Remove ${e}`,chooseMany:"Choose files",chooseOne:"Choose a file",dragMany:"or drag them here",dragOne:"or drag it here",notAccepted:(e,o)=>`${e} is not an accepted file type${o?` (${o})`:""}`,tooLarge:(e,o,t)=>`${e} is ${o} — the limit is ${t}`,tooMany:(e,o)=>`${e} was not added — ${n(o)} ${1===o?"file":"files"} is the limit`,bytes:e=>`${n(e)} B`,kilobytes:e=>`${n(e)} KB`,megabytes:e=>`${s(e,1)} MB`},media:{uploadImage:"Upload an image",uploadVideo:"Upload a video",uploadFile:"Upload a file",upload:"Upload media",cta:"Choose from library or upload",replace:"Replace",remove:"Remove",uploading:"Uploading",choosing:"Choosing",pickFailed:"The library could not be opened. Try again.",cover:"Cover",add:"Add",addMedia:"Add media",empty:"No media.",removeItem:e=>`Remove ${e}`,reorder:(e,o,t)=>`${e}, item ${n(o)} of ${n(t)}. Use arrow keys to reorder.`,image:"Image",video:"Video",changeImage:"Change image",changeVideo:"Change video",focus:"Image focus",usedIn:e=>`Used in ${n(e)} ${1===e?"place":"places"}`,notUsed:"Not used anywhere",moveTo:(e,o)=>{const t="image"===o?"image":"video"===o?"video":"file";return`Move ${n(e)} ${t}${1===e?"":"s"} to`},moveNowhere:"There is no folder to move to",moveToMenu:"Move to",files:"Files"},mediaLibrary:{products:"Products",allFiles:"All files",trash:"Trash",readOnlyBadge:"Read-only",folders:"Folders",readOnly:"Read-only. Edit these pictures in Products > Design > Media.",editedAtHq:e=>`Edited at HQ (${e}).`,readOnlyMenu:"Read-only · edited in Products > Design > Media",noProductFolder:"Products folders come from brand > design > finish. You cannot make a folder here.",noDropProducts:"Read-only. You cannot move or upload files into Products.",newFolder:"New folder",newSubfolder:"New subfolder",folderName:"Folder name",fileName:"File name",folderActions:"Folder actions",upload:"Upload",rename:"Rename",moveTo:"Move to",moveToTrash:"Move to Trash",deleteFolder:"Delete folder",folderNotEmpty:"Only an empty folder can be deleted. Move or delete what is in it first.",moveFilesToTrash:e=>`Move ${n(e)} files to Trash`,filesSelected:e=>`${n(e)} files selected`,fileCount:e=>`${n(e)} ${1===e?"file":"files"}`,selected:e=>`${n(e)} selected`,clearSelection:"Clear selection",selectAll:"Select all",replace:"Replace",cropEdit:"Crop & edit",copyUrl:"Copy URL",fileUrl:"File URL",urlLabel:"URL",openOriginal:"Open original",openInDesign:"Open in Design",restore:"Restore",deleteForever:"Delete forever",emptyTrash:"Empty trash",search:"Search file name",searchProducts:"Search design, finish, part number",mediaType:"Media type",allTypes:"All types",images:"Images",videos:"Videos",use:"Use",anyUse:"Any use",emailOnly:"Email only",websiteOnly:"Website only",notUsed:"Not used",sort:"Sort",newest:"Newest",byName:"Name",bySize:"Size",view:"View",grid:"Grid",list:"List",used:e=>`Used ${n(e)}`,email:"Email",private:"Private",daysAgo:e=>1===e?"1 day ago":`${n(e)} days ago`,details:"Details",name:"Name",type:"Type",size:"Size",resolution:"Resolution",addedBy:"Added by",folder:"Folder",usedIn:"Used in",places:e=>`${n(e)} ${1===e?"place":"places"}`,design:"Design",finish:"Finish",angleLug:"Angle · Lug",owner:"Owner",emptyProducts:"No pictures here yet",trashEmpty:"Trash is empty.",noMatches:"No matches.",emptyFolder:"No files in this folder yet.",oneChosen:e=>`1 selected · ${e}`,noneChosen:"Nothing selected",cancel:"Cancel",chooseImage:"Choose image",privateNoPick:"A private file cannot be used here.",alreadyHere:"The files are already here",folderAlreadyHere:"The folder is already here",notIntoItself:"A folder cannot go inside itself"},lightbox:{label:"Preview",close:"Close preview",previous:"Previous",next:"Next",counter:(e,o)=>`${n(e)} / ${n(o)}`,openOriginal:"Open original",openFile:"Open file"},brandAsset:{save:e=>`Save ${e}`,remove:e=>`Remove ${e}`,discard:"Discard change",saveFailed:e=>`Could not save ${e}.`,removeFailed:e=>`Could not remove ${e}.`,region:(e,o)=>`${e} for ${o}`,usedFor:e=>`Used for ${e}.`,previews:e=>`${e} previews`,preview:"Preview",alt:(e,o)=>`${e} ${o}`},copy:{copy:"Copy",copyLabel:e=>`Copy ${e}`,copied:"Copied",copyValue:e=>`Copy ${e}`,copiedValue:"Copied!",copiedLabel:e=>`${e} copied`,failed:"Could not copy to the clipboard"},keypad:{backspace:"Backspace",enter:"Enter"},banner:{dismiss:"Dismiss"},transfer:{uploading:"Uploading",error:"Error",retry:"Retry",dismiss:"Dismiss",cancel:"Cancel",cancelVerb:e=>`Cancel ${e}`},count:{items:e=>`${n(e)} ${1===e?"item":"items"}`,tabs:e=>`${n(e)} ${1===e?"tab":"tabs"}`,windows:e=>`${n(e)} ${1===e?"window":"windows"}`},badge:{remove:"Remove",removeItem:e=>`Remove ${e}`},breadcrumbs:{label:"Breadcrumb",hidden:"Hidden crumbs"},emptyState:{message:"Nothing here yet."},errors:{notFound:"Page not found",notFoundBody:"The page you're looking for doesn't exist or was moved.",forbidden:"Access denied",forbiddenBody:"You don't have permission to view this page.",noAccess:"You don't have access to this",serverError:"Something went wrong",serverErrorBody:"An unexpected error occurred. Please try again.",retry:"Try again",details:"Error details"},search:{placeholder:"Search...",escBadge:"ESC",searching:"Searching",noResults:"No results found.",minChars:e=>`Type at least ${n(e)} characters to search...`,navigate:"navigate",open:"open",close:"close",enterKey:"Enter",escKey:"Esc",recent:"Recent",favorites:"Favorites",actions:"Actions",listLabel:"Search results",groupCount:(e,o)=>`${n(e)}${o?"+":""}`,groupLabel:(e,o,t)=>`${e}, ${n(o)}${t?"+":""}`,seeAll:e=>`See all ${e}`,searchFailed:"Search failed — check your connection and try again.",partialFailure:"Some results could not be loaded.",tabKey:"Tab",nextGroup:"next group"},grid:{selectAll:"Select all",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:e=>`Delete row ${e}`,insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteColumn:e=>`Delete column ${e}`,resize:"Drag to resize · double-click to auto-fit",fill:"Drag to fill"},sidebar:{resize:"Drag to resize · double-click to reset",sections:"Sections",closeSections:"Close sections"},resizeHandle:{label:"Resize panel",hint:"Drag to resize · double-click to reset"},number:{increase:"Increase",decrease:"Decrease"},slider:{value:e=>`${e} value`},accordion:{changed:e=>`${e} changed`},settingView:{auto:"auto",edited:"Changed in this view",resetName:e=>`Reset ${e}`,inheritName:e=>`Inherit parent layout for ${e}`,inheritParentLayout:"Inherit parent layout",backToDefault:"back to the site default",backToAuto:"back to auto",backTo:e=>`back to ${e}`,tip:(e,o)=>`${e} (${o})`,viewDesktop:"Desktop",viewTablet:"Tablet",viewPhone:"Phone"},displayChips:{shown:"Shown",hidden:"Hidden",shownHint:"Shown · click to hide",hiddenHint:"Hidden · click to show"},corners:{radius:"Corner radius",unit:"px",radiusMark:"R"},iconPicker:{button:(e,o)=>`${e}: ${o}`},iconNames:{none:"None","arrow-right":"Arrow","arrow-long-right":"Long arrow","arrow-up-right":"Arrow up right","chevron-right":"Chevron",external:"External",cart:"Cart",bag:"Bag",tag:"Tag",email:"Email",location:"Location",play:"Play",download:"Download",search:"Search",car:"Car",phone:"Phone",chat:"Chat","chevron-left":"Chevron left",package:"Package",truck:"Truck","shield-check":"Shield check",wheel:"Wheel","receipt-refund":"Refund receipt",dot:"Dot",cross:"Cross",slash:"Slash",triangle:"Triangle"},widths:{column:e=>`Column ${e}`,divider:(e,o)=>`Divider between column ${e} and column ${o}`,dividerValue:(e,o,t,a)=>`Column ${e} ${l(o,0)}, column ${t} ${l(a,0)}`,dragHint:"Drag to change the widths",hint:(e,o)=>`Type a width or drag a line. No column goes below ${l(o,0)}.`,equal:"equal widths"},color:{swatch:(e,o)=>`${e}: ${o}`,none:"None",panel:e=>`${e} picker`,square:"Saturation and brightness",squareValue:(e,o)=>`Saturation ${l(e,0)}, brightness ${l(o,0)}`,hue:"Hue",opacity:e=>`${e} opacity`,hex:e=>`${e} hex code`,presets:"Presets",clear:"No color"},imageFocus:{picture:(e,o)=>`${e}: ${o}`,hint:"Drag the dot on the picture, or move it with the arrow keys. Shift moves it further.",noImage:"Choose an image first. There is nothing to focus yet."},link:{linkType:"Link type",address:"Link address",addressPlaceholder:"Link (e.g. /wheels or https://…)",unsafe:"Use a web address (https://…), a page on this site (/…), mailto: or tel:.",unavailable:e=>`${e} (unavailable)`,filter:"Filter",noFilter:"No filter (all products)",value:"Value",filterHint:"Filters come from Product Types. Only values in this site's catalogue are listed.",title:"Link",apply:"Apply",cancel:"Cancel",remove:"Remove",addLink:"Add a link",text:e=>`${e} text`,linkOf:(e,o)=>`${e} link: ${o||"none"}`},textToolbar:{formatting:"Formatting",bold:"Bold",italic:"Italic",underline:"Underline",strike:"Strikethrough",color:"Color",link:"Link",sup:"Superscript",sub:"Subscript",code:"Code",alignment:"Alignment",alignLeft:"Left",alignCenter:"Center",alignRight:"Right",alignJustify:"Justify",bullet:"Bulleted list",number:"Numbered list",quote:"Quote",letterCase:"Letter case",caseNone:"As typed",caseUpper:"Uppercase",caseLower:"Lowercase",clear:"Clear formatting"},tree:{empty:"Nothing here yet",dropHere:"Drop here",dragHint:"Drag to move",moveHint:"Alt+Arrow Up or Alt+Arrow Down moves it",insertHere:"Insert here"},layout:{desktop:"Desktop",sidebar:"Sidebar",switchToDesktop:"Switch to Desktop",switchToSidebar:"Switch to Sidebar",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",keepSidebarOpen:"Keep sidebar open",goHome:"Go to Home",resizeSidebar:"Resize sidebar",search:"Search…",navLabel:"Main menu",openWindows:"Open windows",favoriteApps:"Favorite apps",openFavorite:e=>`Open ${e}`,removeFavorite:"Remove from Favorites",pageResult:"Page",accountMenu:e=>`Account menu for ${e}`,profile:"My Profile",notifications:"Notifications",reportIssue:"Suggestion or Bug",signOut:"Sign Out",signOutTitle:"Sign Out",signOutMessage:"Do you want to log out? All windows will reopen when you log back in.",openMenu:"Open menu",closeMenu:"Close menu",openTabs:"Open tabs",getTheApp:e=>`Get the ${e} app`,openApp:"Open",dismiss:"Dismiss",deviceUsesSidebar:"This device always uses the Sidebar layout. Your choice still applies when you sign in on a computer.",largerScreensOnly:"Larger screens only",usedOnThisDevice:"Used on this device",back:"Back"},markdown:{screenshot:"Screenshot"},severity:{success:"ok",warning:"warning",danger:"critical",unrecognised:e=>`unrecognised severity ${e}`},meter:{noData:"no data",warningAt:e=>`warning ≥ ${n(e)}`,criticalAt:e=>`critical ≥ ${n(e)}`,legendWarning:"warning",legendCritical:"critical",noReading:"no reading",noBudget:"no budget",ofBudget:e=>`${e} of budget`,budget:"budget",pace:"expected by now",hoursMinutes:(e,o)=>`${n(e)}h ${n(o)}m`,minutesSeconds:(e,o)=>`${n(e)}m ${n(o)}s`,seconds:e=>`${n(e)}s`},charts:{showTable:"Show the data as a table",loading:"Loading chart data",noData:"No data in this window.",windowStart:"Window start",windowEnd:"Window end",window:(e,o,t)=>`Time window — showing ${e} to ${o} of ${n(t)} intervals`,overIntervals:(e,o)=>`${e.join(", ")} over ${n(o)} intervals`,acrossCategories:(e,o)=>`${e.join(", ")} across ${n(o)} categories`,acrossMeasures:(e,o)=>`${e.join(", ")} across ${n(o)} measures`,breakdown:(e,o)=>`Breakdown of ${e} across ${n(o)} segments`,funnel:(e,o,t)=>`Funnel of ${n(e)} stages, ${o} down to ${t}`,radialTrack:e=>`${n(e)} categories, as concentric proportions`,radialCycle:e=>`${n(e)} categories, around a cycle`,tableFrom:"From",tableTo:"To",tableItem:"Item",tableLevel:"Level",tableSeries:"Series",inBucket:e=>`${e} in this bucket`,zoomRange:(e,o,t)=>`${e} – ${o} · ${n(t)} ${1===t?"interval":"intervals"}`,zoomClear:"Clear",zoomLevel:(e,o)=>`${e} avg · ${o} peak`,inCategory:e=>`${e} in this category`,value:"Value",share:"Share",count:"Count",flow:"Flow",totalFlow:"Total flow",throughput:"Throughput",open:"Open",high:"High",low:"Low",close:"Close",maximum:"Maximum",q3:"Q3",median:"Median",q1:"Q1",minimum:"Minimum",distribution:"Distribution",fiveNumber:(e,o)=>`${e}: five-number summary for ${n(o)} categories`,outliers:e=>`${n(e)} outlier${e>1?"s":""} beyond the whiskers`,price:"Price",ohlc:(e,o)=>`${e}: open, high, low and close across ${n(o)} periods`,closedAbove:"Closed above its open",closedBelow:"Closed below its open",noFlows:"No flows to chart.",chord:e=>`Flows between ${n(e)} participants`,chordFolded:e=>`+${n(e)} more in Other`,noStages:"No stages to chart.",ofFirstStage:"Of first stage",droppedHere:"Dropped here",intensity:"Intensity",noActivity:"No activity in this window.",heatmap:(e,o,t)=>`${e} across ${n(o)} rows and ${n(t)} columns`,countAxis:"count",histogram:(e,o,t)=>`${e}: ${n(o)} bins over ${n(t)} observations`,observations:"Observations",notEnough:"Not enough eligible requests to judge.",objectiveMet:e=>`objective ${e} met`,objectiveMissed:e=>`objective ${e} missed`,nothingToPlot:"Nothing to plot.",nothingToCompare:"Nothing to compare.",other:"Other",nothingToBreakDown:"Nothing to break down.",range:"Range",rangeLabel:(e,o)=>`${e}: low and high across ${n(o)} categories`,nothingToRank:"Nothing to rank in this window.",emphasised:"(emphasised)",sankey:(e,o)=>`Flow between ${n(e)} nodes over ${n(o)} links`,noObservations:"No observations in this window.",xAxis:"x",yAxis:"y",size:"Size",scatter:(e,o,t)=>`${e.join(", ")}: ${o} against ${t}`,outsideRange:e=>`${n(e)} ${1===e?"point":"points"} outside the shown range`,waterfall:(e,o,t)=>`Waterfall of ${n(e)} steps from ${o} to ${t}`,balance:"Balance",increase:"Increase",decrease:"Decrease",runningTotal:"Running total",sunburst:(e,o)=>`Hierarchy of ${e} across ${n(o)} levels`,treemap:e=>`Treemap of ${n(e)} items`,trendUp:"up",trendDown:"down",trendFlat:"flat"},timeline:{days:e=>`${r(e)} days`,daysToToday:e=>`${r(e)} days to today`,notReached:"Not yet reached",next:"Next",more:e=>`+${n(e)} more`,today:"Today",todayTitle:e=>`Today — ${e}`,open:e=>`Open ${e}`,openButton:"Open",scrub:"Scrub the timeline",alsoToCome:e=>`Also to come: ${e.join(", ")}`,start:e=>`Start · ${e}`,events:(e,o)=>`${n(e)} events · ${o.join(", ")}`,started:e=>`started ${e}`,duration:e=>`${r(e)} day${1===e?"":"s"}`,reached:(e,o)=>`${n(e)} of ${n(o)} milestones`,milestones:e=>`${e} milestones`},production:{heading:"Production progress",start:"Start",estimated:"Estimated",estimatedCompletion:"Estimated completion",estDone:"Est. done",play:"Play",pause:"Pause",playTitle:"Play the timeline, report by report",backTo:e=>`Back to ${e}`,showing:e=>`Showing ${e}`,overall:e=>`${l(e,0)} overall`,inStock:e=>`${r(e)} pc in stock`,noReport:"No production report filed yet",leadTime:e=>`${r(e)} day${1===e?"":"s"} lead time`,report:"Production report",shipment:"Shipment",inspection:"Inspection",invoice:"Invoice",scrub:"Scrub the production timeline",label:(e,o)=>`Production reports and events, ${e} to ${o}`},containers:{items:e=>`${n(e)} items`,pieces:e=>`${n(e)} pcs`,split:(e,o)=>`(${n(e)} instr / ${n(o)} loaded)`,added:(e,o)=>`${n(e)} new (${n(o)} pcs)`,fill:(e,o)=>`${s(e,1)} / ${n(o)} m³`,total:"Total:",instructed:e=>`${s(e,2)} m³ instruction`,loaded:e=>`${s(e,2)} m³ loaded`,volume:e=>`${s(e,2)} m³`,noVolume:"Volume: N/A (no volume data for these part numbers)"},toast:{notification:"Notification",undo:"Undo"},map:{failed:"The map could not be drawn here. The list has everything it shows.",approximate:e=>`${e}, approximate location`,approximateTitle:e=>`${e} (approximate)`,places:e=>1===e?"place":"places",group:(e,o)=>`${n(e)} ${o} here`,stops:e=>`Stops ${e}`,closeBy:(e,o)=>`${n(e)} more ${o} close by, drawn when the map is closer`,spread:"Press to see them apart",cycle:"They stand on one spot: press for the next of them",fullScreen:"Full screen",leaveFullScreen:"Leave full screen",chosen:e=>`${e}, chosen on the map`,closeCard:"Close",openRecord:"Open"},modelViewer:{loading:"Loading the 3D model",noWebgl:"This browser can't show 3D, so this is a still picture.",failed:"The 3D model didn't load, so this is a still picture. Reload the page to try again."},pdf:{previousPage:"Previous page",nextPage:"Next page",pageOf:(e,o)=>`${n(e)} / ${n(o)}`,zoomOut:"Zoom out",zoomIn:"Zoom in",zoom:"Zoom",fitWidth:"Fit width",fitPage:"Fit page",fit:"Fit",fitHint:"Fit to the pane: follows its size until you zoom by hand",print:"Print",download:"Download",email:"Email",loading:"Loading PDF",loadFailed:"Failed to load PDF",allowPopups:"Allow popups to print"},loading:{label:"Loading"},language:{title:"Language",description:"The language of menus, labels and messages.",reloadNote:"The page reloads when you change the language."},entityList:{open:"Open",copy:"Copy",copyColumn:e=>`Copy ${e}`,copyRows:e=>1===e?"Copy row":`Copy ${n(e)} rows`,exportSelected:"Export selected to CSV",selectAll:"Select all",selectAllLoaded:e=>`Select all ${n(e)} loaded`,clearSelection:"Clear selection",refresh:"Refresh",copiedText:"Text",copiedRows:e=>1===e?"Row":`${n(e)} rows`,exported:e=>`Exported ${n(e)} ${1===e?"row":"rows"}.`,exportTruncated:(e,o)=>`Exported ${n(e)} of ${n(o)} rows. The server capped this export, so the file is incomplete.`,exportTruncatedUnknown:e=>`Exported only some of the ${n(e)} rows. The server capped this export, so the file is incomplete.`,exportFailed:"CSV export failed."},columns:{choose:"Choose columns",heading:"Columns",reset:"Reset",saveDefault:"Save as default for all users",savedDefault:"Saved as default",select:"Select",selectDone:"Done",showSelection:"Show selection column",hideSelection:"Hide selection column"},record:{loading:"Loading record",signInRequired:"Sign in required",signInBody:"Your session may have expired. Sign in again to open this record.",notFound:"Record not found",loadFailed:"Couldn't load record",checkConnection:"Check your connection and try again.",rejected:"The server rejected this request.",retry:"Try again"},password:{current:"Current Password",newPassword:"New Password",confirm:"Confirm Password",submit:"Change Password",submitting:"Changing",done:"Done",currentRequired:"Current password is required.",tooShort:e=>`New password must be at least ${n(e)} characters.`,mismatch:"Passwords do not match.",failed:"Failed to change password.",changed:"Your password has been changed successfully."},pdfAction:{label:"PDF",loading:"Loading",preview:"Preview",download:"Download",email:"Send by Email",downloaded:e=>`${e} downloaded.`,tookTooLong:e=>`${e} took too long to load. Please try again.`,previewLoading:"LOADING PDF",previewTookTooLong:"This document took too long to load. Close this window and try again.",previewFailed:"Failed to load PDF."},undo:{undo:"Undo",redo:"Redo",undoStep:(e,o)=>`Undo ${e} (${o})`,redoStep:(e,o)=>`Redo ${e} (${o})`,nothingToUndo:"Nothing to undo",nothingToRedo:"Nothing to redo"},sounds:{title:"Sounds",enable:"Sound effects",autosave:"Changes are saved automatically",choice:(e,o)=>`${e} — ${o}`,packClassic:"Classic",packMinimal:"Minimal",packRetro:"Retro",packSoft:"Soft",packArcade:"Arcade",packSilent:"Silent",eventClick:"Click",eventSuccess:"Success",eventError:"Error",eventNotification:"Notification",eventStartup:"Startup",eventTimerDone:"Timer",eventLogout:"Logout"},serverStatus:{connected:"Connected",disconnected:"Disconnected",checking:"Checking",lastOkTitle:(e,o)=>`${e} · last ok ${o}`,details:"Server connection details",lastPoll:e=>`Last poll ${e}.`,lastFailure:e=>`Last failure ${e}.`,firstPoll:"First poll in flight",server:"Server",protocol:"Protocol",browser:"Browser",online:"Online",offline:"Offline",lastOk:"Last OK",lastFail:"Last fail",latency:"Latency",poll:"Poll",pollEvery:e=>`every ${n(e)} s`,session:"Session",user:"User",notSignedIn:"Not signed in",role:"Role",build:"Build",app:"App",userAgent:"UA",pingHint:"Click ↻ to ping now",refresh:"Refresh"},bulkImport:{description:"Paste from spreadsheets, type directly, or upload a CSV. Rows don't need to be in order — they'll be matched. Values not in the list will be added to the end. Fields left blank will not be affected.",lines:e=>`${n(e)} lines`,total:(e,o)=>`${e}: ${o}`,clear:"Clear",upload:"Upload CSV",importLines:e=>`Import ${n(e)} Lines`,importing:"Importing",importFailed:"Import failed.",enterAtLeastOne:e=>`Enter at least one ${e||"value"}.`,allSkipped:"All rows skipped.",cancel:"Cancel",mapTitle:"Map CSV columns to fields",skip:"— Skip —",columnOption:(e,o)=>`Column ${n(e)} (e.g. ${o})`,rowsDetected:e=>`${n(e)} rows detected`,confirmMapping:"Confirm Mapping",duplicatesTitle:"Duplicate entries detected",duplicatesFound:e=>`${n(e)} ${1===e?"value appears":"values appear"} more than once in your import. Choose how to handle each before proceeding.`,occurrences:e=>`${n(e)} occurrences`,keepFirst:"Keep first",keepLast:"Keep last",keepAll:"Keep all",skipAll:"Skip all",keptDropped:(e,o)=>`${n(e)} kept · ${n(o)} dropped`,proceed:"Proceed",duplicatesMerged:e=>`${n(e)} ${1===e?"value appeared":"values appeared"} more than once. Each is merged into a single line with its quantity summed — review before proceeding.`,mergedFrom:"Merged from",mergedRows:e=>`${n(e)} rows`,mergeSummary:(e,o)=>`${n(e)} duplicate rows → ${n(o)} merged line${1===o?"":"s"}`},preview:{windowTitle:e=>`${e} - Preview`,untitled:"Untitled",open:"Open",formats:"PDF · DXF · 3D · Images",dropHere:e=>`Drop a file here, or click ${e}.`,supportedFormats:"Supported formats",formatPdf:"multi-page document viewer",formatDxf:e=>`vector CAD drawings (optional ${e} peer dep)`,format3d:e=>`3D models (optional ${e} peer dep)`,formatImage:"raster images",dwgNote:"DWG files need to be converted to PDF or DXF first (server-side).",dropToOpen:"Drop to open",dwgUnsupported:"DWG files need server-side conversion. Convert to PDF or DXF first.",unsupportedType:e=>`Unsupported file type: .${e||"unknown"}`,converting:"Converting file",download:"Download",email:"Email",howToNavigate:"How to navigate",stopMeasuring:"Stop measuring (Esc)",scrollToZoom:"Scroll to zoom",closePanel:"Close",annotate:"Annotate",annotateHint:"Annotate this image",view:"View",viewHint:"Back to viewer",copy:"Copy",save:"Save",imageFailed:"Failed to load image.",downloadFailed:"Download failed — couldn't reach the file."},drawing:{loading:"Loading drawing",notInstalled:"dxf-viewer is not installed in this app.",renderFailed:"Failed to render DXF.",layers:"Layers",layersHint:"Toggle layer visibility",allLayers:"All",noLayers:"None",measure:"Measure",measureHint:"Measure distance — click two points on the drawing, or type DI / DIM below",auto:"Auto",autoHint:"Auto — AutoCAD DIMLINEAR: measures ΔX or ΔY, whichever is larger between the two picks",horizontalHint:"Horizontal — distance along the X axis between two picks (AutoCAD DIMLINEAR horizontal)",verticalHint:"Vertical — distance along the Y axis between two picks (AutoCAD DIMLINEAR vertical)",point:"Point",pointHint:"Point — straight-line (Euclidean) distance between two picks (AutoCAD DIST)",fixX:"fix Δx",fixY:"fix Δy",fixHint:"Lock the second pick's axis coord to first pick + this value (mm). The reported measurement becomes the perpendicular distance.",clearFixed:"Clear fixed distance",horizontalDistance:e=>"Horizontal distance (Δx) between the two picked points"+(e?" — Auto resolved to the X axis":""),verticalDistance:e=>"Vertical distance (Δy) between the two picked points"+(e?" — Auto resolved to the Y axis":""),straightDistance:"Straight-line distance between the two picked points",fit:"Fit",fitHint:"Fit drawing to view",dragToPan:"Drag to pan",fitToReset:"Fit to reset",typeToMeasure:e=>`Type ${e} to measure`,commandPlaceholder:"Type a command — DI, DIM, H, V, Z, LA (? for help)",commandHelp:"Commands: DI distance · DIM/DLI linear dim · H / V force axis · <number> lock Δ · U undo pick · Z fit · LA layers · Esc exit",echoDistance:(e,o,t)=>`Distance = ${e} ΔX = ${o} ΔY = ${t}`,echoLinear:(e,o)=>`Linear dimension = ${e} (${o})`,echoLocked:(e,o,t,a)=>`${e} = ${o} with ${t} locked to ${a}`,axisLocked:(e,o)=>`${e} locked to ${o} — the label shows the perpendicular distance`,fixedCleared:"Fixed distance cleared.",fixedNeedsAxis:"Fixed distances apply in H or V mode — type H or V first.",echoDist:"DIST — click two points; straight-line distance (Esc to exit)",echoDimLinear:"DIMLINEAR — click two points; measures ΔX or ΔY, whichever is larger (H / V to force)",echoHorizontal:"Horizontal — ΔX between the two picks",echoVertical:"Vertical — ΔY between the two picks",echoAuto:"Auto (DIMLINEAR) — measures along the dominant axis of the two picks",measureOn:"Measure on — click two points.",measureOff:"Measure off.",pickRemoved:"Last pick removed.",zoomExtents:"Zoom extents.",layersToggled:"Layer panel toggled.",measurementCleared:"Measurement cleared.",readOnly:e=>`${e} is a drawing command — Preview is a read-only viewer. Measuring: DI, DIM, H, V (? for help)`,unknownCommand:e=>`Unknown command "${e}" — try DI, DIM, H, V, Z, LA (? for help)`,cancelled:"*Cancel*"},model:{loading:"Loading 3D model",stepNote:"STEP files load OpenCascade WASM (~5 MB) on first use.",notInstalled:"online-3d-viewer is not installed in this app. Add it to enable 3D file viewing.",loadFailed:"Failed to load 3D model.",rootNode:"Root",node:"Node",collapse:"Collapse",expand:"Expand",fitToView:"Fit to view",hide:"Hide",show:"Show",isometric:"ISO",isometricView:"Isometric view",top:"TOP",topView:"Top view",front:"FRT",frontView:"Front view",side:"SDE",sideView:"Side view",perspective:"Perspective",orthographic:"Orthographic",toPerspective:"Switch to perspective view",toOrthographic:"Switch to orthographic view",snapshot:"Save snapshot as PNG",measureHint:"Measure distance — click two points on the model",point:"Point",pointHint:"Point — measure straight-line distance between two picked points",perpendicularHint:"Perpendicular — pick two surfaces and measure the perpendicular gap between them",straightDistance:"Straight-line distance between the two picked points",perpendicularDistance:"Perpendicular distance between the two picked surfaces",meshesHint:"Toggle meshes panel",displayHint:"Toggle display panel",downloadOriginal:"Download original file",meshes:"Meshes",readingModel:"Reading model",noStructure:"No structure available",allVisible:"All visible",hiddenCount:e=>`${n(e)} hidden`,dragToRotate:"Drag to rotate",rightDragToPan:"Right-click drag to pan",display:"Model Display",backgroundColor:"Background Color",showEdges:"Show Edges",edgeColor:"Edge Color",edgeThreshold:"Edge Threshold",sectionView:"Section View",angle:"Angle",axis:"Axis",flipHint:"Flip section direction",flip:"flip →",flipped:"← flipped",position:"Position",resetDisplay:"Reset to Default"},annotator:{toolSelect:"Select / Move",toolDraw:"Pen / Draw",toolRect:"Rectangle",toolEllipse:"Ellipse",toolArrow:"Arrow",toolMosaic:"Mosaic",toolText:"Text",toolCrop:"Crop",weight:"Weight",radius:"Radius",size:"Size",padding:"Pad",fontSystem:"System",fontSerif:"Serif",fontMono:"Mono",fontCursive:"Cursive",bold:"Bold",boldLetter:"B",italic:"Italic",italicLetter:"I",underline:"Underline",underlineLetter:"U",border:"Border",borderColor:"Text-box border color",addBorder:"Add a border",removeBorder:"Remove border",fill:"Fill",fillColor:"Text-box background color",addFill:"Add a background fill",removeFill:"Remove fill",add:"Add",zoomOut:"Zoom out",zoomIn:"Zoom in",fit:"Fit",fitHint:"Fit to area",undo:"Undo",applyCrop:"Apply Crop",cancel:"Cancel",apply:"Apply",hintSelected:"Drag to move. Drag a corner to resize. Delete / Backspace removes. Click outside to deselect.",hintSelect:"Tap a shape to select. Double-click text to edit.",hintText:"Click to drop a text label.",hintCrop:"Drag a rectangle to set the crop region.",hintDraw:"Drag to draw freehand.",hintShape:"Drag on the image to draw.",textPlaceholder:"Type then Enter…",loadFailed:"Failed to load image",exportFailed:"Failed to export",clipboardUnsupported:"Clipboard images not supported in this browser",copyFailed:"Failed to copy",copied:"Copied to clipboard",copyRefused:"Copy failed (clipboard permission?)"},attachment:{fallbackName:"attachment",noLink:"This attachment has no download link.",spreadsheetFailed:"Could not open the spreadsheet — opening the file instead.",workbookUnavailable:"Spreadsheet preview is unavailable for this file type. Opening the file instead.",noViewer:"Opening this file outside the app — no viewer can show it here.",loading:"LOADING FILE",loadFailed:"Failed to load this file."},aboutApp:{title:e=>`About ${e}`,version:e=>`Version ${e}`,partOf:e=>`Part of the ${e} desktop environment`,shellVersion:e=>`shell v${e}`,notepad:"Color-coded notes with checklists, desktop stickies and entity autolinking.",preview:"Viewer for PDF documents, images, DXF drawings and 3D models — CAD-style measuring with object snap and an AutoCAD-like command bar.",files:"Personal file manager with folders, uploads, quota, trash, sharing and desktop shortcut folders.",browser:"Minimal web browser with bookmarks, history and navigation bar."}}}var c=d(),p=/* @__PURE__ */new Map;var h=i(c),u=i(null),g=/* @__PURE__ */new Set;var m=c,w={};function f(){return m}function v({value:e=w,locale:o,children:t}){const a=n(u),i=r(()=>function(e){if(e)try{return Intl.getCanonicalLocales(e)[0]}catch{return void(g.has(e)||(g.add(e),console.error(`[efficient-shell] ShellStringsProvider: locale="${e}" is not a BCP 47 language tag, so it is ignored and numbers and dates keep their default formatting. Pass a tag such as "de-DE" or "ja".`)))}}(o),[o]),f=void 0===o?a?.locale:i,v=r(()=>{const o=function(e){if(!e)return c;let o=p.get(e);return o||(o=d(e),p.set(e,o)),o}(f),t={};for(const a of Object.keys(o))t[a]={...o[a],...e[a]??{}};return t},[e,f]),$=r(()=>({locale:f}),[f]),y=null!==a;return s(()=>{if(!y)return m=v,()=>{m===v&&(m=c)}},[v,y]),/* @__PURE__ */l(u.Provider,{value:$,children:/* @__PURE__ */l(h.Provider,{value:v,children:t})})}function $(){return n(h)}function y(){return n(u)?.locale}function b(e){const[o="",...t]=e("\0").split("\0");return[o,t.join("")]}export{c as DEFAULT_SHELL_STRINGS,v as ShellStringsProvider,f as currentShellStrings,b as splitAround,y as useShellLocale,$ as useShellStrings};
|