efficient-shell 11.8.0 → 11.10.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 +9 -0
- package/dist/{Browser-NMILHEUX.js → Browser-FIRNNCSC.js} +17 -17
- package/dist/Calculator-ELI5Z3XW.js +29 -0
- package/dist/{CurrencyConverter-TAWZDMT4.js → CurrencyConverter-LU7QXMOI.js} +9 -9
- package/dist/{Documents-SDOY3ZA3.js → Documents-CE7YKNJM.js} +24 -24
- package/dist/Files-ARRIIZZ6.js +88 -0
- package/dist/{Notepad-DZSDABU7.js → Notepad-HNED2SWM.js} +10 -10
- package/dist/PdfViewer-ZRDIG2L2.js +1 -0
- package/dist/PomodoroTimer-ZJ432VPC.js +91 -0
- package/dist/{Preview-6Z6K5QLK.js → Preview-OGSYTTKC.js} +38 -38
- package/dist/Sidebar-ETWHTFNP.js +44 -0
- package/dist/Spreadsheet-4HZR2TUV.js +75 -0
- package/dist/{Stock-HJN2BSAD.js → Stock-4BOTUHWE.js} +3 -3
- package/dist/{Weather-G7AOUS36.js → Weather-NDUOK3P3.js} +21 -21
- package/dist/{WorldClock-GE3DGYYU.js → WorldClock-FH6NFTOM.js} +4 -4
- package/dist/ai/index.js +78 -78
- 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/ChartTooltip.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-CD7UWMPX.js → chunk-276JUQXK.js} +1 -1
- package/dist/{chunk-6EIZOX6W.js → chunk-2CPYXRR2.js} +8 -8
- package/dist/{chunk-SXNQHIBY.js → chunk-2JTG3U5L.js} +1 -1
- package/dist/{chunk-NGLU2GKE.js → chunk-2UTCGWMZ.js} +3 -3
- package/dist/{chunk-JNQF5CBB.js → chunk-2V3LKX7G.js} +5 -5
- package/dist/{chunk-WDQI3FV6.js → chunk-36VIGB6J.js} +6 -6
- package/dist/{chunk-4XNVIKZZ.js → chunk-37JAU3U7.js} +3 -3
- package/dist/{chunk-DU4WEVNS.js → chunk-4L4GQW7P.js} +1 -1
- package/dist/chunk-4LQRLYB4.js +22 -0
- package/dist/{chunk-4EZIWLJJ.js → chunk-4UKPDURO.js} +1 -1
- package/dist/{chunk-SDDV3UCN.js → chunk-4VF66WBB.js} +12 -12
- package/dist/chunk-5CPRZ27M.js +28 -0
- package/dist/{chunk-YCWALB3A.js → chunk-5DZN6ZDE.js} +9 -9
- package/dist/{chunk-SS5SQMIB.js → chunk-5MGNT7XM.js} +2 -2
- package/dist/{chunk-EYPKBJYG.js → chunk-5PP435FL.js} +1 -1
- package/dist/chunk-5XVXYBIQ.js +8 -0
- package/dist/{chunk-EOWUUOVE.js → chunk-7N4P6LGD.js} +1 -1
- package/dist/chunk-7QRKZOXR.js +12 -0
- package/dist/{chunk-7TZV6G2F.js → chunk-A2SP4IZV.js} +1 -1
- package/dist/chunk-A4FCXZSY.js +8 -0
- package/dist/{chunk-JFV5CQN4.js → chunk-A65PRSKV.js} +4 -4
- package/dist/chunk-ABKCC7VB.js +9 -0
- package/dist/chunk-ABKFALDE.js +8 -0
- package/dist/{chunk-X5TZHOTI.js → chunk-AFROFSDW.js} +1 -1
- package/dist/chunk-AJ6HMM4P.js +20 -0
- package/dist/chunk-ALMBY7QO.js +6 -0
- package/dist/{chunk-72LJMEL6.js → chunk-B4D23ZLJ.js} +1 -1
- package/dist/{chunk-FXOYA2VJ.js → chunk-BAT5B2LE.js} +1 -1
- package/dist/{chunk-SHO35OPO.js → chunk-BXTSBORU.js} +3 -3
- package/dist/{chunk-47DO42IW.js → chunk-CFFT5OCV.js} +1 -1
- package/dist/{chunk-WOXQODYQ.js → chunk-D2BXHFYK.js} +1 -1
- package/dist/{chunk-RHDM7HRD.js → chunk-DGA4SO27.js} +2 -2
- package/dist/{chunk-OTVK7DJM.js → chunk-DH2DKQKS.js} +1 -1
- package/dist/{chunk-VAK5FQXH.js → chunk-DWR6RVX5.js} +4 -4
- package/dist/{chunk-LT6PG6UW.js → chunk-DXFG4H4V.js} +1 -1
- package/dist/{chunk-4TYIYL56.js → chunk-E2LRAOCL.js} +10 -10
- package/dist/{chunk-MS5APD3V.js → chunk-ED6HJBCO.js} +1 -1
- package/dist/{chunk-C764JODK.js → chunk-EMUZJMR3.js} +1 -1
- package/dist/chunk-EOVXFXVV.js +2 -0
- package/dist/{chunk-MXGDFO6A.js → chunk-EOYGTVNS.js} +5 -5
- package/dist/{chunk-FA5FBNWF.js → chunk-EP5BHBZQ.js} +1 -1
- package/dist/chunk-FBACFP4U.js +4 -0
- package/dist/{chunk-JFBL4PR3.js → chunk-FNMF42DQ.js} +2 -2
- package/dist/{chunk-ORIXCEKO.js → chunk-FOHOSUK3.js} +1 -1
- package/dist/{chunk-ECJKIPWU.js → chunk-FRNSCVPN.js} +1 -1
- package/dist/chunk-FSRHVB4A.js +9 -0
- package/dist/{chunk-YQFGRYEF.js → chunk-FTGA5IPI.js} +14 -14
- package/dist/{chunk-JPNAEN53.js → chunk-FZM3ZPW3.js} +1 -1
- package/dist/chunk-G2BZ7NCM.js +19 -0
- package/dist/{chunk-IXOL7Y3Z.js → chunk-GNWK77U7.js} +1 -1
- package/dist/{chunk-OPN4I565.js → chunk-GPCTDEXQ.js} +1 -1
- package/dist/{chunk-C6YAFZG3.js → chunk-GV5VNWPG.js} +2 -2
- package/dist/{chunk-JSG2AKCG.js → chunk-H5YD72OP.js} +1 -1
- package/dist/{chunk-RDYFZHT3.js → chunk-HBS4HYQM.js} +1 -1
- package/dist/{chunk-TQE6O2JA.js → chunk-HRXQCHKI.js} +3 -3
- package/dist/chunk-HTTICQBP.js +27 -0
- package/dist/{chunk-LJN77RG6.js → chunk-HWFBNYNI.js} +1 -1
- package/dist/chunk-HYNUJY6W.js +13 -0
- package/dist/{chunk-5CXFABVD.js → chunk-HYXDKY2L.js} +1 -1
- package/dist/{chunk-5F2AIDPY.js → chunk-IAUEISDQ.js} +9 -9
- package/dist/{chunk-OBJGUJIE.js → chunk-IDRAW6MT.js} +2 -2
- package/dist/chunk-IEHTZR5M.js +7 -0
- package/dist/chunk-IH2KC3NQ.js +5 -0
- package/dist/{chunk-RYLTVHCV.js → chunk-IKKQ4P4R.js} +12 -12
- package/dist/{chunk-MDYJVXWD.js → chunk-IW2QNPDG.js} +2 -2
- package/dist/chunk-IXSSBGRD.js +13 -0
- package/dist/{chunk-54NMFQMW.js → chunk-JADBOQ7S.js} +5 -5
- package/dist/{chunk-ZGOHRLXG.js → chunk-JGVKGEIV.js} +1 -1
- package/dist/{chunk-XYECIBVX.js → chunk-JJHPPTM6.js} +1 -1
- package/dist/{chunk-TMMNCXQT.js → chunk-KMSK6QQB.js} +1 -1
- package/dist/{chunk-4MBYFQOI.js → chunk-KPFYXVCO.js} +9 -9
- package/dist/{chunk-ZXVJL7MS.js → chunk-KZ6JVHFI.js} +1 -1
- package/dist/{chunk-4ULRP4Y4.js → chunk-L3RLB37Y.js} +1 -1
- package/dist/{chunk-ZD36QKQS.js → chunk-L433UT5E.js} +1 -1
- package/dist/{chunk-V6Y4OC6K.js → chunk-LCHU3ZG4.js} +8 -8
- package/dist/{chunk-VCMHBUKI.js → chunk-LE5LWALR.js} +1 -1
- package/dist/{chunk-VHF3CJVO.js → chunk-LLNWE7DR.js} +30 -30
- package/dist/{chunk-B634WHJ2.js → chunk-LNGLJA6K.js} +2 -2
- package/dist/{chunk-QVZKRROQ.js → chunk-LPTN55KO.js} +1 -1
- package/dist/chunk-LVHQJ5TW.js +9 -0
- package/dist/{chunk-AFYLVV74.js → chunk-LZJCULO7.js} +1 -1
- package/dist/{chunk-E6GDAV5R.js → chunk-MFDOGLFO.js} +3 -3
- package/dist/chunk-MG4IUKVP.js +11 -0
- package/dist/{chunk-SXQZ5GTA.js → chunk-MOL2ND6G.js} +6 -6
- package/dist/{chunk-4QK4WNPB.js → chunk-MQHUVZWM.js} +1 -1
- package/dist/{chunk-7ELJQL7J.js → chunk-MWKLLAJT.js} +1 -1
- package/dist/chunk-N3OJ47VK.js +1 -0
- package/dist/{chunk-RQDVAUXD.js → chunk-N5KO2IHG.js} +4 -4
- package/dist/chunk-N7645DNN.js +6 -0
- package/dist/{chunk-DGNAUGZ3.js → chunk-NFNDXE5O.js} +4 -4
- package/dist/{chunk-IDI3IOY4.js → chunk-NGUXPP5Q.js} +65 -65
- package/dist/{chunk-QQ2LDC6C.js → chunk-NJN5IKWO.js} +1 -1
- package/dist/{chunk-QYL26AB4.js → chunk-NSYCJTHE.js} +1 -1
- package/dist/chunk-NTKNM25F.js +15 -0
- package/dist/{chunk-IMDGMUE3.js → chunk-O4OFURPC.js} +1 -1
- package/dist/{chunk-5H4SWQGM.js → chunk-OE77XFOV.js} +1 -1
- package/dist/{chunk-DJW7CM3W.js → chunk-ONIL7WXO.js} +1 -1
- package/dist/{chunk-2E2SUEEE.js → chunk-OQG3XO4Y.js} +1 -1
- package/dist/{chunk-PVPMJ5G2.js → chunk-OS2KE6QG.js} +4 -4
- package/dist/{chunk-VQBEZNHC.js → chunk-OUXSI6X4.js} +1 -1
- package/dist/{chunk-CLTRQ7AQ.js → chunk-OYTRB237.js} +1 -1
- package/dist/{chunk-KTCM64DQ.js → chunk-OZEPYQ7E.js} +1 -1
- package/dist/{chunk-3NRQNKVP.js → chunk-P7NO3NGC.js} +11 -11
- package/dist/{chunk-SX5BSWTN.js → chunk-PAC4LK2N.js} +5 -5
- package/dist/{chunk-UEISJFZH.js → chunk-PBMAMVSE.js} +5 -5
- package/dist/{chunk-O3MBPAWZ.js → chunk-PC44XTGN.js} +1 -1
- package/dist/chunk-PEVWAJUR.js +7 -0
- package/dist/{chunk-6UBOLLBC.js → chunk-PMKR2BF2.js} +21 -21
- package/dist/{chunk-JH4ZCPHW.js → chunk-PR42NIDL.js} +10 -10
- package/dist/{chunk-FT3QRQWY.js → chunk-PTWKG635.js} +3 -3
- package/dist/{chunk-ESZHN7PV.js → chunk-QIEAZN6Z.js} +1 -1
- package/dist/{chunk-DQQKG46I.js → chunk-QIVIQUKB.js} +7 -7
- package/dist/{chunk-KQOY4RGP.js → chunk-QL5E3MU3.js} +1 -1
- package/dist/chunk-QRZBLNOQ.js +4 -0
- package/dist/{chunk-G3KXB7SP.js → chunk-QVAOSKFO.js} +11 -11
- package/dist/{chunk-2UO47XB4.js → chunk-R64OZ6TC.js} +26 -12
- package/dist/{chunk-SYZLS2JA.js → chunk-RDKIYORS.js} +1 -1
- package/dist/{chunk-JTMEFXRL.js → chunk-RDTKMSEK.js} +1 -1
- package/dist/{chunk-RRE2NNFS.js → chunk-RKL47W7I.js} +6 -6
- package/dist/{chunk-3V5GSTZI.js → chunk-RPTOAKLB.js} +1 -1
- package/dist/{chunk-LJAYUDN2.js → chunk-RQ6TC6RM.js} +1 -1
- package/dist/{chunk-T7PVHIXI.js → chunk-RSJLN3EG.js} +1 -1
- package/dist/{chunk-JQBVSPF5.js → chunk-S4FPYCUU.js} +3 -3
- package/dist/{chunk-SAP4YI2Y.js → chunk-SDAX6BXF.js} +1 -1
- package/dist/{chunk-KGSOOXA7.js → chunk-SIA3W7VE.js} +6 -6
- package/dist/{chunk-MTIP5DH2.js → chunk-SJQKEIS7.js} +3 -3
- package/dist/{chunk-OH5L6HYW.js → chunk-SXBOODCJ.js} +4 -4
- package/dist/{chunk-3IUPYCW3.js → chunk-SZTIP6T7.js} +1 -1
- package/dist/{chunk-IBS7647X.js → chunk-T2ZFXPQV.js} +21 -21
- package/dist/{chunk-XWFLIGDQ.js → chunk-TE6R53YD.js} +1 -1
- package/dist/{chunk-M4BPHBKI.js → chunk-TKE3EF2U.js} +1 -1
- package/dist/{chunk-XQZL6JDD.js → chunk-TURECNEK.js} +4 -4
- package/dist/{chunk-AWKJZSTO.js → chunk-U6IJL4Q5.js} +1 -1
- package/dist/{chunk-DUGYWX2R.js → chunk-U7T2ONAY.js} +2 -2
- package/dist/chunk-UGOSZLCD.js +14 -0
- package/dist/{chunk-355CRSFS.js → chunk-UIN2LUCZ.js} +13 -13
- package/dist/{chunk-P4VKU3SL.js → chunk-UZ7TKJRO.js} +1 -1
- package/dist/{chunk-BTRV3SMB.js → chunk-V6LPIDZ6.js} +1 -1
- package/dist/chunk-VNTJ7QO5.js +1 -0
- package/dist/{chunk-SL77N7VT.js → chunk-VTXCCFJ4.js} +3 -3
- package/dist/chunk-WB6E6CSH.js +14 -0
- package/dist/{chunk-CRILBBSU.js → chunk-WDZUPDNC.js} +1 -1
- package/dist/{chunk-CJH2BGXY.js → chunk-WGLHB6WE.js} +1 -1
- package/dist/{chunk-MDV7UQJD.js → chunk-WMS2DCRV.js} +10 -10
- package/dist/chunk-WQGBYFS3.js +8 -0
- package/dist/{chunk-PCTOL2FX.js → chunk-WTTXLWMK.js} +8 -8
- package/dist/{chunk-UGBYAVJV.js → chunk-WYSNMIZN.js} +1 -1
- package/dist/{chunk-EKCQ7XBZ.js → chunk-WZMZ3N5B.js} +2 -2
- package/dist/chunk-Y2LWUBXX.js +2 -0
- package/dist/{chunk-BW47XJLH.js → chunk-YGCVMPIU.js} +1 -1
- package/dist/{chunk-3XTSXZAC.js → chunk-YIFRSPUM.js} +10 -10
- package/dist/{chunk-EN5NXWT6.js → chunk-YKEB576T.js} +1 -1
- package/dist/{chunk-4TGZODSH.js → chunk-YM4XIO4K.js} +5 -5
- package/dist/chunk-YMBNVMFU.js +11 -0
- package/dist/{chunk-N7U622NC.js → chunk-YY5TUQS4.js} +3 -3
- package/dist/{chunk-LXL2UCUR.js → chunk-Z32K3LIJ.js} +1 -1
- package/dist/{chunk-P3RXXWXN.js → chunk-ZDDYTXPK.js} +6 -6
- package/dist/{chunk-X55LUERI.js → chunk-ZGQ6H2PU.js} +4 -4
- package/dist/{chunk-NU5HN3FZ.js → chunk-ZM2NOLT6.js} +12 -12
- package/dist/chunk-ZQJTLJUF.js +2 -0
- package/dist/{chunk-DANLBFBD.js → chunk-ZRLWE3JM.js} +1 -1
- package/dist/chunk-ZVEDA462.js +3 -0
- package/dist/{chunk-TGGUYAWA.js → chunk-ZWLOVJWN.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.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/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.d.ts +22 -0
- 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.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.js +666 -666
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +3 -3
- package/dist/markdown/index.js +1 -1
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +129 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-E7AMPGD5.js +0 -29
- package/dist/Files-YQWVU6KZ.js +0 -88
- package/dist/PdfViewer-Y3SAVADX.js +0 -1
- package/dist/PomodoroTimer-RAZE37BO.js +0 -91
- package/dist/Sidebar-GQX7UM3M.js +0 -44
- package/dist/Spreadsheet-Q5N5KXGP.js +0 -37
- package/dist/chunk-34H3CK7R.js +0 -22
- package/dist/chunk-56KADF2B.js +0 -11
- package/dist/chunk-77AQNJE2.js +0 -9
- package/dist/chunk-7DI3VQCF.js +0 -2
- package/dist/chunk-7GTUUBS2.js +0 -28
- package/dist/chunk-7INZ7O3A.js +0 -5
- package/dist/chunk-CZMSOB2T.js +0 -9
- package/dist/chunk-EUAC2T5D.js +0 -2
- package/dist/chunk-F3ZFCQGP.js +0 -4
- package/dist/chunk-FO6UPEZH.js +0 -7
- package/dist/chunk-FSUQTN34.js +0 -14
- package/dist/chunk-GDQJBQ5B.js +0 -1
- package/dist/chunk-GELPD7EY.js +0 -12
- package/dist/chunk-GOZO6LU2.js +0 -8
- package/dist/chunk-HCXIXV4E.js +0 -8
- package/dist/chunk-IYXNRNAF.js +0 -8
- package/dist/chunk-K4JQ3FQI.js +0 -2
- package/dist/chunk-L7XIGRIT.js +0 -6
- package/dist/chunk-LGDMGDSV.js +0 -14
- package/dist/chunk-LKTUUNGJ.js +0 -1
- package/dist/chunk-M3JNILT2.js +0 -19
- package/dist/chunk-PFKXPSOM.js +0 -6
- package/dist/chunk-PLK2WHZG.js +0 -27
- package/dist/chunk-RABYGQQU.js +0 -8
- package/dist/chunk-RK7MN5L5.js +0 -3
- package/dist/chunk-RPL4H6LE.js +0 -9
- package/dist/chunk-UGGHQYDN.js +0 -11
- package/dist/chunk-VAPSWR5Q.js +0 -13
- package/dist/chunk-WMHZA4EO.js +0 -4
- package/dist/chunk-WUAKIM2B.js +0 -7
- package/dist/chunk-XZAEEX2H.js +0 -13
- package/dist/chunk-YDMXW2Q4.js +0 -15
- package/dist/chunk-ZS3TIQQ4.js +0 -20
package/dist/chunk-34H3CK7R.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{ChartBrush as t}from"./chunk-E6GDAV5R.js";import{ChartDot as e}from"./chunk-CK2YOGUS.js";import{stepPath as a,curvePath as r,areaBetween as o,areaFrom as l}from"./chunk-VFC6QUEN.js";import{ChartDefs as n,MOTION as i,stagger as s,fillFor as c,dashFor as d,maskId as m}from"./chunk-465RRWBY.js";import{ChartSkeleton as h}from"./chunk-3IUPYCW3.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-C764JODK.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 V}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as z,CHART_INK as A,STATUS_VARS as D}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as W}from"./chunk-TWVUQUUD.js";import{useShellStrings as C,useShellLocale as R}from"./chunk-GDQJBQ5B.js";import{formatPercent as E,formatPlain as L}from"./chunk-C3QOHMR6.js";import{useRef as S,useState as U,useId as I,useEffect as T}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 J({series:J,labels:K,height:H=200,stacked:Z=!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=C().charts,Vt=R(),zt=rt??(t=>L(t,Vt)),At=ot??zt,Dt=jt??$t.noData,Wt=S(null),Ct=x(Wt),Rt=Nt??Ct,[Et,Lt]=U(null),[St,Ut]=U(null),{highlighted:It}=u(),Tt=I(),Pt=ut??St,Bt=p(ht&&Pt?Pt[1]-Pt[0]+1:K.length,pt);if(T(()=>{if(null!==Et)return W(t=>"Escape"===t.key&&(Lt(null),!0))},[Et]),kt)/* @__PURE__ */
|
|
2
|
-
return P("div",{className:wt,ref:Wt,children:/* @__PURE__ */P(h,{height:H,width:Nt??Ct})});const Ft=K,Ot=ut??St??[0,Math.max(0,Ft.length-1)],[Qt,Yt]=Ot,Gt=t=>Bt.slice(ht?t.slice(Qt,Yt+1):t),Jt=lt?Gt(lt):void 0,Kt=J.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})),Ht=t=>(ht?Qt:0)+(Bt.view?.[0]??0)+t;if(K=Gt(Ft),0===Kt.length||0===K.length)/* @__PURE__ */
|
|
3
|
-
return P("div",{className:wt,ref:Wt,children:/* @__PURE__ */P("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:H},children:Dt})});const Zt=K.map((t,e)=>Kt.reduce((t,a)=>t+(G(a.data[e])?a.data[e]:0),0)),Xt=(t,e)=>Zt[e]>0?t/Zt[e]:null,qt=[];if(Z){let t=K.map(()=>0);for(const e of Kt)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=!Z&&!_t&&void 0===et&&Kt.some(te)&&Kt.some(t=>!te(t)),ae=gt&&!Z?gt:null,re=t=>!!ae&&"column"===t.mode,oe=(ee?Kt.filter(t=>!te(t)):Kt).filter(t=>!re(t)),le=ee?Kt.filter(te).flatMap(t=>t.data.filter(G)):[],ne=Z?(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:Z&&"percent"===X||_t||void 0!==et?null:b(Z?0:Math.min(0,...ne),Math.max(0,...ne),{intervals:at+1,integer:ne.every(Number.isInteger)}),ce=se?se.lo:0,de=Z&&"percent"===X?1:se?se.hi:et??M(Math.max(...ne,0)),me=Z&&"percent"===X?t=>E(Math.round(100*t),0,Vt):zt,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(zt),O):O,pe={left:ue,right:Math.max(ue+1,Rt-fe),top:F,bottom:H-Q},ge=j(K.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=Kt.filter(re),Me=Math.max(0,...K.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)})),Ve=t=>e=>{e.preventDefault(),Lt(e=>{const a=(e??0)+t;return Math.min(K.length-1,Math.max(0,a))})},ze=Math.max(1,Math.ceil(K.length/Math.max(1,Math.floor(Rt/96))));/* @__PURE__ */
|
|
4
|
-
return B("div",{className:`relative ${wt??""}`,ref:Wt,children:[
|
|
5
|
-
/* @__PURE__ */B("svg",{width:"100%",height:H,viewBox:`0 0 ${Rt} ${H}`,role:"img","aria-label":$t.overIntervals(Kt.map(t=>t.label),K.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Lt(null),onBlur:()=>Lt(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==Et&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Ht(Et));"ArrowRight"===t.key&&Ve(1)(t),"ArrowLeft"===t.key&&Ve(-1)(t)},children:[
|
|
6
|
-
/* @__PURE__ */P("defs",{children:/* @__PURE__ */P("clipPath",{id:Tt,children:/* @__PURE__ */P("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
|
|
7
|
-
/* @__PURE__ */P(n,{id:Tt,fills:Kt.map((t,e)=>({color:z(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:Z?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */P("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:A.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:A.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:A.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:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(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:A.label,children:nt}),
|
|
9
|
-
/* @__PURE__ */P("g",{clipPath:`url(#${Tt})`,mask:xt&&vt?`url(#${m(Tt)})`:void 0,children:Kt.map((t,e)=>{const n=z(t.slot,t.color,t.tone),m=t.mode??(Z?"area":"line"),h=f(t.key,It);if("step"===m){const e=K.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:a(e),fill:"none",stroke:n,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:h??void 0,className:"rosh-viz-mark"},t.key)}const u=K.map((a,r)=>{const o=Z?qt[e]?.[r]:t.data[r];return G(o)?[ge.center(r),je(t)(o)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===m){const a=Math.max(1,.62*ge.bandwidth),r="solid"===t.fillVariant,o=je(t);return re(t)?/* @__PURE__ */P("g",{opacity:h??void 0,className:"rosh-viz-mark",children:K.map((o,l)=>{const i=t.data[l];if(!G(i)||i<=0)return null;const s=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Kt[t]?.key)).reduce((t,a)=>t+Math.max(0,G(a.data[e])?a.data[e]:0),0))(e,l),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
|
|
11
|
-
return P("rect",{x:ge.center(l)-a/2,y:c,width:a,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[l]?D[t.pointTones[l]]:n,fillOpacity:r?1:.55},l)})},t.key):/* @__PURE__ */P("g",{opacity:h??void 0,className:"rosh-viz-mark",children:K.map((l,c)=>{const d=Z?qt[e]?.[c]:t.data[c];if(!G(d))return null;const m=o(d);/* @__PURE__ */
|
|
12
|
-
return P("rect",{x:ge.center(c)-a/2,y:Math.min(m,xe),width:a,height:Math.abs(xe-m),rx:2,fill:n,fillOpacity:r?1:.35,className:xt?i.rise:void 0,style:xt?s(c,26):void 0},c)})},t.key)}const p=r(u,_,tt),g=Z&&e>0?K.map((t,a)=>[ge.center(a),ve(qt[e-1]?.[a]??0)-2]):null,y=g?o(p,g):l(p,u,xe);/* @__PURE__ */
|
|
13
|
-
return B("g",{opacity:h??void 0,className:"rosh-viz-mark",children:[("area"===m||Z)&&
|
|
14
|
-
/* @__PURE__ */P("path",{d:y,fill:c(Tt,e,t.fillVariant??bt,n),stroke:"none"}),
|
|
15
|
-
/* @__PURE__ */P("path",{d:p,fill:"none",stroke:n,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:d(t.stroke??(t.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?i.march:void 0})]},t.key)})}),it?.map((t,e)=>{const a=t.color??D[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"))&&Kt.map((t,a)=>{if("column"===t.mode)return null;const r=ct??(st?"last":"none"),o=z(t.slot,t.color,t.tone),l=[...t.data].map(G).lastIndexOf(!0),n="all"===r?K.map((t,e)=>e).filter(e=>G(Z?qt[a]?.[e]:t.data[e])):l>=0?[l]:[];/* @__PURE__ */
|
|
18
|
-
return B("g",{children:[n.map(r=>{const n=Z?qt[a]?.[r]:t.data[r];return G(n)?/* @__PURE__ */P(e,{cx:ge.center(r),cy:je(t)(n),color:o,variant:dt,pulse:mt&&r===l,title:`${K[r]}: ${t.label} ${zt(n)}`},r):null}),st&&l>=0&&G(Z?qt[a]?.[l]:t.data[l])&&/* @__PURE__ */P("text",{x:ge.center(l)-10,y:je(t)(Z?qt[a]?.[l]:t.data[l])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(Z?qt[a]?.[l]:t.data[l])})]},`dots-${t.key}`)}),K.map((t,e)=>e%ze===0?/* @__PURE__ */P("text",{x:ge.center(e),y:H-8,textAnchor:"middle",fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Et&&/* @__PURE__ */P("line",{x1:ge.center(Et),y1:pe.top,x2:ge.center(Et),y2:pe.bottom,stroke:A.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:A.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
|
|
21
|
-
/* @__PURE__ */P("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:A.label,style:{fontVariantNumeric:"tabular-nums"},children:zt(Me)})]}),Bt.drag&&/* @__PURE__ */P(g,{x0:ge(Bt.drag[0]),x1:ge(Bt.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),K.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:()=>Lt(e),onPointerDown:()=>Bt.press(e),onPointerEnter:()=>Bt.over(e),onPointerUp:Bt.release,onClick:yt?()=>yt(Ht(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),Bt.view&&/* @__PURE__ */P(y,{from:Jt?.[0]??K[0],to:Jt?.at(-1)??K[K.length-1],count:K.length,total:Z&&"percent"!==X?At(Zt.reduce((t,e)=>t+e,0)):ae?At(be.reduce((t,e)=>t+e.data.filter(G).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Kt).filter(t=>t.data.some(G)).map(t=>{const e=t.data.filter(G),a=z(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=Z||"column"===t.mode?At(r):$t.zoomLevel(At(r/e.length),At(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:Bt.clear}),ht&&Ft.length>2&&/* @__PURE__ */P(t,{className:"mt-1",labels:Ft,width:Rt,data:J[0]?.data??[],range:Ot,onRangeChange:t=>{ft?ft(t):Ut(t)}}),null!==Et&&
|
|
22
|
-
/* @__PURE__ */P("div",{className:"pointer-events-none absolute top-2 z-10",style:k(ge.center(Et),ge.bandwidth,Rt),children:/* @__PURE__ */P(V,{title:Jt?.[Et]??K[Et],rows:Kt.map((t,e)=>({key:t.key,label:t.label,color:z(t.slot,t.color,t.tone),value:G(t.data[Et])?Z&&"percent"===X?`${E(100*(Xt(t.data[Et],Et)??0),1,Vt)} · ${At(t.data[Et])}`:At(t.data[Et]):void 0})),footnote:Z&&"percent"===X?$t.inBucket(At(Zt[Et])):void 0})})]})}export{J as TimeSeriesChart};
|
package/dist/chunk-56KADF2B.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{usePlotWidth as e}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as l,CHART_INK as r}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as n}from"./chunk-TWVUQUUD.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-GDQJBQ5B.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:N=2}){const j=i().charts,D=a(),U=$??(e=>o(e,D)),z=b??j.intensity,C=w??j.noActivity,F=h(null),Q=e(F),B=g??Q,R=c(),[S,V]=s(null);if(m(()=>{if(null!==S)return n(e=>"Escape"===e.key&&(V(null),!0))},[S]),0===x.length||0===d.length)/* @__PURE__ */
|
|
2
|
-
return f("div",{className:k,ref:F,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:C})});const G=y??l(0),L=v??Math.max(1,...p.flat().filter(Number.isFinite)),E=96,I=26*x.length,T=M??I+26+26,W=Math.max(2,(Math.max(97,B)-E)/d.length),Z=e=>{const t=L>0?Math.max(0,Math.min(1,e/L)):0;return`color-mix(in oklab, ${G} ${(8+92*t).toFixed(1)}%, ${r.surface})`};/* @__PURE__ */
|
|
3
|
-
return u("div",{className:`relative ${k??""}`,ref:F,children:[
|
|
4
|
-
/* @__PURE__ */u("svg",{width:"100%",height:T,viewBox:`0 0 ${B} ${T}`,role:"img","aria-label":j.heatmap(z,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>V(null),onBlur:()=>V(null),onKeyDown:e=>{const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:0,l="ArrowRight"===e.key?1:"ArrowLeft"===e.key?-1:0;0===t&&0===l||(e.preventDefault(),V(e=>({r:Math.min(x.length-1,Math.max(0,(e?.r??0)+t)),c:Math.min(d.length-1,Math.max(0,(e?.c??0)+l))})))},children:[
|
|
5
|
-
/* @__PURE__ */f("defs",{children:/* @__PURE__ */u("linearGradient",{id:R,x1:"0",x2:"1",children:[
|
|
6
|
-
/* @__PURE__ */f("stop",{offset:"0",stopColor:Z(0)}),
|
|
7
|
-
/* @__PURE__ */f("stop",{offset:"1",stopColor:Z(L)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:r.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=S&&(S.r!==t||S.c!==r);/* @__PURE__ */
|
|
8
|
-
return f("rect",{x:E+r*W+A/2,y:26*t+A/2,width:Math.max(1,W-A),height:26-A,rx:N,fill:Z(n),opacity:i?.55:1,onMouseEnter:()=>V({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${U(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((B-E)/56))))===0?/* @__PURE__ */f("text",{x:E+t*W+W/2,y:I+15,textAnchor:"middle",fontSize:11,fill:r.label,children:e},`c${t}`):null),
|
|
9
|
-
/* @__PURE__ */f("rect",{x:E,y:I+26,width:Math.min(180,Math.max(40,B-E)),height:8,rx:4,fill:`url(#${R})`}),
|
|
10
|
-
/* @__PURE__ */f("text",{x:E,y:I+48,fontSize:11,fill:r.label,children:"0"}),
|
|
11
|
-
/* @__PURE__ */f("text",{x:E+Math.min(180,Math.max(40,B-E)),y:I+48,textAnchor:"end",fontSize:11,fill:r.label,style:{fontVariantNumeric:"tabular-nums"},children:U(L)})]}),S&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(t,{title:`${x[S.r]} · ${d[S.c]}`,rows:[{key:"v",label:z,color:G,value:null==p[S.r]?.[S.c]?void 0:U(p[S.r][S.c])}]})})]})}export{x as HeatmapChart};
|
package/dist/chunk-77AQNJE2.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{Calendar as e}from"./chunk-JH4ZCPHW.js";import{fromDateKey as t,toDateKey as r}from"./chunk-2HMNOLKX.js";import{inputClasses as a,PLACEHOLDER_INK as n}from"./chunk-AYZY3YNC.js";import{calendarNames as i}from"./chunk-Y3JW2GW5.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{useDropdownPosition as d}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as u}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as b}from"./chunk-GDQJBQ5B.js";import{forwardRef as f,useState as p,useRef as h,useId as v,useEffect as g}from"react";import{createPortal as y}from"react-dom";import{jsx as x,jsxs as N}from"react/jsx-runtime";var k=/^\d{4}-\d{2}-\d{2}$/,j=/^(aria|data)-/,w=/* @__PURE__ */new Set(["aria-invalid","aria-required"]);function B(e){if(null==e||""===e)return"";if(e instanceof Date)return Number.isNaN(e.getTime())?"":r(e);if(k.test(e))return e;const t=new Date(e);return Number.isNaN(t.getTime())?"":r(t)}function D(e,r){const a=t(e);return a?r.longDate(a.getFullYear(),a.getMonth(),a.getDate()):""}var W=f(function({value:f,onChange:k,min:W,max:C,invalid:F,size:J,native:O,weekStartsOn:$,className:q="","aria-label":E,"aria-describedby":L,"aria-labelledby":S,id:U,name:Y,disabled:z,placeholder:G,required:H,clearable:I,form:T,title:M,tabIndex:P,autoFocus:Q,onFocus:X,onBlur:Z,...A},K){const R=I??!H,V=B(f),_=B(W),ee=B(C),te=m().datePicker,re=b(),ae=i(re),[ne,ie]=p(!1),oe=h(null),le=h(null),se=h(null),de=v(),ue=v(),ce=v(),me=d(le,ne,{popupRef:se}),[be,fe]=p(!1);u(()=>{const e=!!U&&(le.current?.labels?.length??0)>0;e!==be&&fe(e)});const pe=!E&&(!!S||be);if(g(()=>{if(!ne)return;const e=e=>{const t=e.target;oe.current?.contains(t)||se.current?.contains(t)||ie(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>ie(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[ne]),g(()=>{if(ne)return c(e=>"Escape"===e.key&&(ie(!1),le.current?.focus(),!0),()=>se.current)},[ne]),O)/* @__PURE__ */
|
|
2
|
-
return x("input",{ref:K,type:"date",lang:re,id:U,name:Y,disabled:z,"aria-label":E,"aria-describedby":L,"aria-invalid":F||void 0,value:V,min:_||void 0,max:ee||void 0,onChange:e=>k?.(t(e.target.value)),className:a({invalid:F,size:J,className:q}),"aria-labelledby":S,required:H,form:T,title:M,tabIndex:P,autoFocus:Q,onFocus:X,onBlur:Z,...A});const he=Object.fromEntries(Object.entries(A).filter(([e])=>j.test(e)&&!w.has(e))),ve=A["aria-required"],ge=!!H||!0===ve||"true"===ve,ye=[pe?ue:void 0,ge?ce:void 0,L].filter(Boolean).join(" ")||void 0,xe=r(/* @__PURE__ */new Date),Ne=(!_||xe>=_)&&(!ee||xe<=ee),ke=G??te.placeholder;/* @__PURE__ */
|
|
3
|
-
return N("div",{ref:oe,className:"relative",children:[
|
|
4
|
-
/* @__PURE__ */x("input",{ref:K,type:"hidden",name:Y,form:T,value:V}),
|
|
5
|
-
/* @__PURE__ */N("button",{ref:le,type:"button",...he,id:U,disabled:z,title:M,tabIndex:P,autoFocus:Q,onFocus:X,onBlur:Z,"aria-haspopup":"dialog","aria-expanded":ne,"aria-controls":ne?de:void 0,"aria-labelledby":S,"aria-describedby":ye,"aria-label":E?`${E}${V?`, ${D(V,ae)}`:""}`:void 0,onClick:()=>ie(e=>!e),className:`${a({invalid:F,size:J,className:q})} flex items-center justify-between text-left`,children:[
|
|
6
|
-
/* @__PURE__ */x("span",{className:V?"text-ink-strongest":n,children:V?D(V,ae):ke}),
|
|
7
|
-
/* @__PURE__ */x(o,{name:"date",className:`h-4 w-4 shrink-0 ${n}`,strokeWidth:"1.75","aria-hidden":"true"})]}),pe&&/* @__PURE__ */x("span",{id:ue,className:"sr-only",children:V?D(V,ae):ke}),ge&&/* @__PURE__ */x("span",{id:ce,className:"sr-only",children:te.required}),ne&&y(
|
|
8
|
-
/* @__PURE__ */N("div",{ref:se,id:de,role:"dialog","aria-label":E??te.dialog,className:"fixed w-72 rounded-xl border border-gray-200 bg-white p-3 shadow-lg",style:{zIndex:s.popup,left:me?.left,right:me?.right,top:me?.top,bottom:me?.bottom,maxWidth:me?.maxWidth,visibility:me?void 0:"hidden"},children:[
|
|
9
|
-
/* @__PURE__ */x(e,{value:V||null,min:_||null,max:ee||null,weekStartsOn:$,onSelect:e=>{ie(!1),le.current?.focus(),k?.(t(e))}}),(R||Ne)&&/* @__PURE__ */N("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[R&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(null)},className:"rounded-(--radius-control) px-2 py-1 text-sm text-gray-500 hover:bg-gray-100 hover:text-gray-700",children:te.clear}),Ne&&/* @__PURE__ */x("button",{type:"button",onClick:()=>{ie(!1),le.current?.focus(),k?.(/* @__PURE__ */new Date)},className:"ml-auto rounded-(--radius-control) px-2 py-1 text-sm font-medium text-blue-600 hover:bg-blue-50",children:te.today})]})]}),document.body)]})});export{W as DatePicker_default};
|
package/dist/chunk-7DI3VQCF.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{buttonClasses as e}from"./chunk-UQYNPYF4.js";import{isAriaDisabled as a,swallowPress as r,describedByWith as i,OffWithReason as s}from"./chunk-XWFLIGDQ.js";import{SpinnerRing as l}from"./chunk-R2VKEMZH.js";import{forwardRef as d,useId as n}from"react";import{jsxs as t,jsx as c}from"react/jsx-runtime";var o=d(function({variant:d="primary",size:o="md",loading:m=!1,leftIcon:p,rightIcon:b,block:f=!1,disabled:u,type:h="button",children:k,className:x="",disabledReason:N,onClick:y,pressed:v,"aria-disabled":g,"aria-describedby":j,...I},w){const z=n(),C=u||m,F=null!=N&&""!==N,Q=C&&F,R=!C&&a(g),Y=R&&F,D=Q||Y?z:void 0,E=/* @__PURE__ */t("button",{ref:w,type:h,disabled:C,"aria-busy":m||void 0,"aria-disabled":!!R||g,"aria-describedby":i(j,D),onClick:R?r:y,className:e({variant:d,size:o,block:f,pressed:v??(!0===I["aria-pressed"]||"true"===I["aria-pressed"]),className:x}),...I,children:[m?/* @__PURE__ */c(l,{className:"h-3.5 w-3.5",ink:""}):p,k,!m&&b]});return Y?/* @__PURE__ */c(s,{reason:N,id:z,block:f,children:E}):Q?/* @__PURE__ */t("span",{className:f?"flex w-full flex-col gap-1":"inline-flex flex-col items-start gap-1",children:[E,
|
|
2
|
-
/* @__PURE__ */c("span",{id:D,className:"text-xs text-red-600",children:N})]}):E});export{o as Button_default};
|
package/dist/chunk-7GTUUBS2.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import{Tree as e,TreeRow as n,TreeGroup as l}from"./chunk-3XTSXZAC.js";import{ImageLightbox as a}from"./chunk-UGGHQYDN.js";import{MarqueeBox as i}from"./chunk-IC72MGON.js";import{Drawer as r}from"./chunk-V6Y4OC6K.js";import{EmptyState as t}from"./chunk-QVZKRROQ.js";import{DescriptionList as o}from"./chunk-SACUSHVN.js";import{Breadcrumbs as d}from"./chunk-XYECIBVX.js";import{useGridSelection as s}from"./chunk-VLKDWKVR.js";import{useMarquee as c}from"./chunk-OLFYNMTD.js";import{ROOT_KEY as u,mediaLibraryMenu as m}from"./chunk-MS5APD3V.js";import{useMediaMoveItems as h}from"./chunk-OPN4I565.js";import{RenameField as p}from"./chunk-UGBYAVJV.js";import{MediaUploadGrid as f}from"./chunk-5F2AIDPY.js";import{MediaUsedInList as g}from"./chunk-VQBEZNHC.js";import{NativeSelect as v}from"./chunk-M3JNILT2.js";import{Segmented as k}from"./chunk-JQBVSPF5.js";import{copyToClipboard as y}from"./chunk-TMMNCXQT.js";import{Checkbox_default as b}from"./chunk-CGZBDI6C.js";import{useContextMenu as w,ContextMenu as x}from"./chunk-SS5SQMIB.js";import{Banner as C}from"./chunk-ZGOHRLXG.js";import{Input_default as N}from"./chunk-NGLU2GKE.js";import{DropdownMenu as I}from"./chunk-WUAKIM2B.js";import{IconButton_default as D}from"./chunk-VCMHBUKI.js";import{useFileIntake as S,FileIntakeAlert as j}from"./chunk-JTMEFXRL.js";import{ColoredBadge as z}from"./chunk-BW47XJLH.js";import{Button_default as T}from"./chunk-7DI3VQCF.js";import{buttonClasses as F}from"./chunk-UQYNPYF4.js";import{Icon as O}from"./chunk-2UO47XB4.js";import{Tooltip as L}from"./chunk-QQ2LDC6C.js";import{usePlotWidth as A}from"./chunk-MAFUXCPZ.js";import{useShellStrings as M}from"./chunk-GDQJBQ5B.js";import{useRef as P,useMemo as E,useCallback as B,useState as U,useEffect as R}from"react";import{jsxs as V,Fragment as K,jsx as Q}from"react/jsx-runtime";var G="application/x-efficient-media-files",J="application/x-efficient-media-folder",X="application/x-efficient-media-file";function H(e){if(!e||!Array.from(e.types).includes(X))return null;try{const n=JSON.parse(e.getData(X));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 Y={type:"all",use:"any",sort:"newest"},$={lock:/* @__PURE__ */Q(O,{name:"lock","aria-hidden":"true",className:"h-4 w-4"}),folder:/* @__PURE__ */Q(O,{name:"folder","aria-hidden":"true",className:"h-4 w-4"}),folderOpen:/* @__PURE__ */Q(O,{name:"folder-open","aria-hidden":"true",className:"h-4 w-4"}),folderPlus:/* @__PURE__ */Q(O,{name:"folder-plus","aria-hidden":"true",className:"h-4 w-4"}),trash:/* @__PURE__ */Q(O,{name:"trash","aria-hidden":"true",className:"h-4 w-4"}),upload:/* @__PURE__ */Q(O,{name:"upload","aria-hidden":"true",className:"h-4 w-4"}),search:/* @__PURE__ */Q(O,{name:"search","aria-hidden":"true",className:"h-4 w-4"}),grid:/* @__PURE__ */Q(O,{name:"grid","aria-hidden":"true",className:"h-4 w-4"}),list:/* @__PURE__ */Q(O,{name:"list","aria-hidden":"true",className:"h-4 w-4"}),more:/* @__PURE__ */Q(O,{name:"more","aria-hidden":"true",className:"h-4 w-4"}),copy:/* @__PURE__ */Q(O,{name:"copy","aria-hidden":"true",className:"h-4 w-4"}),edit:/* @__PURE__ */Q(O,{name:"edit","aria-hidden":"true",className:"h-4 w-4"}),swap:/* @__PURE__ */Q(O,{name:"swap","aria-hidden":"true",className:"h-4 w-4"}),crop:/* @__PURE__ */Q(O,{name:"crop","aria-hidden":"true",className:"h-4 w-4"}),external:/* @__PURE__ */Q(O,{name:"external","aria-hidden":"true",className:"h-4 w-4"}),undo:/* @__PURE__ */Q(O,{name:"undo","aria-hidden":"true",className:"h-4 w-4"})},W={link:/* @__PURE__ */Q(O,{name:"link","aria-hidden":"true",className:"h-3 w-3"}),email:/* @__PURE__ */Q(O,{name:"email","aria-hidden":"true",className:"h-3 w-3"}),lock:/* @__PURE__ */Q(O,{name:"lock","aria-hidden":"true",className:"h-3 w-3"}),clock:/* @__PURE__ */Q(O,{name:"clock","aria-hidden":"true",className:"h-3 w-3"})};function Z(O){const{mode:H="manage",layout:Z="auto",location:q,onLocationChange:_,folders:ee,products:ne,allFilesCount:le,trashCount:ae,files:ie,query:re,onQueryChange:te,filters:oe=Y,onFiltersChange:de,extraFilters:se,view:ce="grid",onViewChange:ue,selectedIds:me,onSelectionChange:he,usedIn:pe,denied:fe={},accept:ge="image/*,video/*",maxSizeBytes:ve,busy:ke,progress:ye,onUpload:be,onNewFolder:we,onRename:xe,onMove:Ce,onTrash:Ne,onDeleteFolder:Ie,onRestore:De,onDeleteForever:Se,onEmptyTrash:je,onReplace:ze,onCropEdit:Te,onOpenInDesign:Fe,onChoose:Oe,onCancel:Le,pickNote:Ae,onDragOut:Me,className:Pe=""}=O,Ee=M().mediaLibrary,Be=M().media,Ue="pick"===H,Re=!Ue,Ve=P(null),Ke=A(Ve,"phone"===Z?343:1200),Qe="phone"===Z||"auto"===Z&&Ke<640,Ge=E(()=>function(e=[]){const n=/* @__PURE__ */new Map,l=(e,a)=>{for(const i of e){const e=[...a,i];n.set(i.id,{node:i,path:e}),i.children&&l(i.children,e)}};return l(e,[]),n}(ne),[ne]),Je=E(()=>new Map(ee.map(e=>[e.id,e])),[ee]),Xe=E(()=>{const e=/* @__PURE__ */new Map;for(const n of ee){const l=n.parentId&&Je.has(n.parentId)?n.parentId:null;e.set(l,[...e.get(l)??[],n])}return e},[ee,Je]),He=B(e=>{const n=[];for(let l=e?Je.get(e):void 0;l&&(n.unshift(l),!(n.length>ee.length));l=l.parentId?Je.get(l.parentId):void 0);return n},[Je,ee.length]),Ye=B((e,n)=>He(e).some(e=>e.id===n),[He]),[$e,We]=U(()=>/* @__PURE__ */new Set(["@files"])),Ze=e=>We(n=>{const l=new Set(n);return l.has(e)?l.delete(e):l.add(e),l}),qe=B(e=>{We(n=>e.every(e=>n.has(e))?n:/* @__PURE__ */new Set([...n,...e]))},[]),_e="files"===(en=q).place?`files:${en.folderId??""}`:"products"===en.place?`products:${en.nodeId??""}`:"trash";var en;R(()=>{if("files"===q.place)qe(["@files",...He(q.folderId).slice(0,-1).map(e=>e.id)]);else if("products"===q.place){const e=q.nodeId?Ge.get(q.nodeId)?.path??[]:[];qe(["@products",...e.slice(0,-1).map(e=>`p:${e.id}`)])}},[_e]);const nn="products"===q.place,ln="trash"===q.place,an="files"===q.place,rn=an?q.folderId:null,tn=nn&&q.nodeId?Ge.get(q.nodeId)?.path[0]:void 0,on=e=>e?.sharedFrom?`${Ee.readOnly} ${Ee.editedAtHq(e.sharedFrom)}`:Ee.readOnly,dn=E(()=>ie.map(e=>e.id),[ie]),sn=E(()=>new Map(ie.map(e=>[e.id,e])),[ie]),cn=s(dn),un=E(()=>dn.filter(e=>cn.selected.has(e)),[dn,cn.selected]),mn=1===un.length?sn.get(un[0]):void 0,hn=P(!0);R(()=>{hn.current?hn.current=!1:cn.clear()},[_e]);const pn=me?.join("\0");R(()=>{me&&cn.setSelection(me)},[pn]);const fn=P(pn??""),gn=un.join("\0");R(()=>{fn.current!==gn&&(fn.current=gn,he?.(un))},[gn]);const vn=(e,n={})=>{Ue?cn.select(e):cn.select(e,{ctrl:!(!n.ctrlKey&&!n.metaKey),shift:!!n.shiftKey})},[kn,yn]=U(null),bn=e=>{const n=kn;if(yn(null),!n||null==e)return;e!==("folder"===n.kind?Je.get(n.id)?.name:sn.get(n.id)?.name)&&xe?.(n,e)},wn=async e=>{if(!we)return;const n=await we(e);qe(["@files",...e?[e]:[]]),"string"==typeof n&&yn({kind:"folder",id:n})},xn=B(e=>{const n=[],l=n=>{if("files"===e.kind)return n===rn&&an?Ee.alreadyHere:void 0;const l=Je.get(e.id);return n===e.id||n&&Ye(n,e.id)?Ee.notIntoItself:(l?.parentId??null)===n?Ee.folderAlreadyHere:void 0};n.push({key:u,label:Ee.allFiles,disabledReason:l(null)});const a=(e,i)=>{for(const r of Xe.get(e)??[])n.push({key:r.id,label:r.name,depth:i,disabledReason:l(r.id)}),a(r.id,i+1)};return a(null,1),n},[Xe,Je,an,Ye,rn,Ee]),Cn=B(e=>{const n=new Set(e.map(e=>sn.get(e)?.kind??"image"));return 1===n.size?[...n][0]:"file"},[sn]),[Nn,In]=U(null),Dn={words:Ee,media:Be,denied:fe,moveTargets:xn,kindOf:Cn,urlOf:e=>sn.get(e)?.url,newSubfolder:we&&Re?e=>{wn(e)}:void 0,rename:xe&&Re?e=>{"file"!==e.kind||cn.isSelected(e.id)||cn.select(e.id),yn(e)}:void 0,move:Ce&&Re?Ce:void 0,trash:Ne&&Re?Ne:void 0,deleteFolder:Ie&&Re?Ie:void 0,folderNotEmpty:e=>!!Je.get(e)?.notEmpty,replace:ze&&Re?ze:void 0,copyUrl:e=>{const n=sn.get(e)?.url;n&&y(Ee.urlLabel,n)},openInDesign:Fe,restore:De,deleteForever:Se},Sn=e=>m(e,Dn),jn=w(),zn=(e,n)=>{Ue||(cn.isSelected(e)||cn.select(e),jn.open(n,(e=>{const n=cn.isSelected(e)?un:[e];return nn?{kind:"render",id:e}:ln?{kind:"trashed",ids:n}:{kind:"files",ids:n}})(e)))},[Tn,Fn]=U(null),[On,Ln]=U(null),[An,Mn]=U(null);R(()=>{if(!On&&!Tn)return;const e=()=>{Ln(null),Fn(null)};return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[On,Tn]);const Pn=(e,n)=>Array.from(e.dataTransfer?.types??[]).includes(n),En=(e,n)=>!(!Ce||fe.move||Ue)&&(!!Pn(e,G)||!(!Pn(e,J)||!An)&&(n!==An&&!(n&&Ye(n,An)))),Bn=(e,n)=>({onDragEnter:l=>{En(l,n)&&(l.preventDefault(),Fn(e))},onDragOver:l=>{En(l,n)&&(l.preventDefault(),l.dataTransfer.dropEffect="move",Tn!==e&&Fn(e))},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Fn(n=>n===e?null:n)},onDrop:e=>{if(En(e,n))if(e.preventDefault(),Fn(null),Pn(e,G)){let l;try{l=JSON.parse(e.dataTransfer.getData(G))}catch{l=null}Array.isArray(l)&&l.length&&Ce({kind:"files",ids:l.map(String)},n)}else An&&(Ce({kind:"folder",id:An},n),Mn(null))}}),Un=e=>{const n=e=>Pn(e,G)||Pn(e,J)||Pn(e,"Files");return{onDragEnter:l=>{n(l)&&Ln(e)},onDragOver:l=>{n(l)&&On!==e&&Ln(e)},onDragLeave:n=>{const l=n.relatedTarget;l&&n.currentTarget.contains(l)||Ln(n=>n===e?null:n)}}},Rn=(e,n,l)=>/* @__PURE__ */Q(L,{side:"right",content:On===e?Ee.noDropProducts:on(l),open:On===e||!On&&void 0,children:/* @__PURE__ */Q("span",{children:n})}),Vn=e=>({onContextMenu:n=>{jn.open(n,e)}}),Kn=(e,a,i)=>e.map(e=>{const r=`p:${e.id}`,t=i??e,o=$e.has(r),d=e.children?.length?e.children:null;/* @__PURE__ */
|
|
2
|
-
return V("div",{role:"none",className:"contents",children:[
|
|
3
|
-
/* @__PURE__ */Q(n,{label:Rn(r,e.name,t),level:a,icon:d&&o?$.folderOpen:$.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ee.fileCount(e.count):void 0,selected:nn&&q.nodeId===e.id,expanded:d?o:void 0,onToggle:d?()=>Ze(r):void 0,onSelect:()=>_({place:"products",nodeId:e.id}),rowProps:{"data-media-row":r,...Un(r),...Re?Vn({kind:"product-node",id:e.id}):{}}}),d&&o&&/* @__PURE__ */Q(l,{children:Kn(d,a+1,t)})]},e.id)}),Qn=(e,a)=>(Xe.get(e)??[]).map(e=>{const i=Xe.get(e.id),r=$e.has(e.id),t="folder"===kn?.kind&&kn.id===e.id,o=Sn({kind:"folder",id:e.id});/* @__PURE__ */
|
|
4
|
-
return V("div",{role:"none",className:"contents",children:[
|
|
5
|
-
/* @__PURE__ */Q(n,{label:e.name,level:a,icon:i&&r?$.folderOpen:$.folder,count:e.count,countLabel:null!=e.count?e.countLabel??Ee.fileCount(e.count):void 0,selected:t||an&&q.folderId===e.id,expanded:i?r:void 0,onToggle:i?()=>Ze(e.id):void 0,onSelect:()=>_({place:"files",folderId:e.id}),drop:Tn===e.id?"into":void 0,dragging:An===e.id,draggable:Re&&!!Ce&&!fe.move,rename:t?/* @__PURE__ */Q(p,{value:e.name,label:Ee.folderName,onDone:bn}):void 0,actions:Re&&o.length?/* @__PURE__ */Q(I,{align:"end","aria-label":Ee.folderActions,trigger:$.more,items:o}):void 0,rowProps:{"data-media-row":e.id,...Bn(e.id,e.id),...Re?Vn({kind:"folder",id:e.id}):{},...Re&&Ce&&!fe.move?{draggable:!0,onDragStart:n=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData(J,e.id),Mn(e.id)},onDragEnd:()=>{Mn(null),Fn(null)}}:{}}}),i&&r&&/* @__PURE__ */Q(l,{children:Qn(e.id,a+1)})]},e.id)}),Gn=$e.has("@files"),Jn=$e.has("@products"),Xn=/* @__PURE__ */V(e,{"aria-label":Ee.folders,children:[ne&&/* @__PURE__ */V(K,{children:[
|
|
6
|
-
/* @__PURE__ */Q(n,{label:Rn("@products",Ee.products),level:1,icon:$.lock,badge:{label:Ee.readOnlyBadge,tone:"neutral"},expanded:ne.length?Jn:void 0,onToggle:()=>Ze("@products"),selected:nn&&null==q.nodeId,onSelect:()=>_({place:"products",nodeId:null}),rowProps:{"data-media-row":"@products",...Un("@products")}}),Jn&&ne.length>0&&/* @__PURE__ */Q(l,{children:Kn(ne,2)})]}),
|
|
7
|
-
/* @__PURE__ */Q(n,{label:Ee.allFiles,level:1,icon:Gn?$.folderOpen:$.folder,count:le,countLabel:null!=le?Ee.fileCount(le):void 0,expanded:Xe.get(null)?.length?Gn:void 0,onToggle:()=>Ze("@files"),selected:an&&null==q.folderId,onSelect:()=>_({place:"files",folderId:null}),drop:"@files"===Tn?"into":void 0,rowProps:{"data-media-row":"@files",...Bn("@files",null)}}),Gn&&(Xe.get(null)?.length??0)>0&&/* @__PURE__ */Q(l,{children:Qn(null,2)}),Re&&/* @__PURE__ */Q(n,{label:Ee.trash,level:1,icon:$.trash,count:ae,countLabel:null!=ae?Ee.fileCount(ae):void 0,selected:ln,onSelect:()=>_({place:"trash"}),rowProps:{"data-media-row":"@trash"}})]}),Hn=(()=>{if(ln)return[{label:Ee.trash}];if(nn){const e=q.nodeId?Ge.get(q.nodeId)?.path??[]:[];return[{label:Ee.products,onClick:e.length?()=>_({place:"products",nodeId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"products",nodeId:n.id}):void 0}))]}const e=He(rn);return[{label:Ee.allFiles,onClick:e.length?()=>_({place:"files",folderId:null}):void 0},...e.map((n,l)=>({label:n.name,onClick:l<e.length-1?()=>_({place:"files",folderId:n.id}):void 0}))]})(),Yn=nn?Ee.readOnly:fe.upload,$n=!!be&&!ln&&!Yn,Wn=S({accept:ge,maxSizeBytes:ve,multiple:!0,disabled:!$n,onAccept:e=>be?.(e,rn)}),Zn=nn?Ee.noProductFolder:fe.newFolder,qn=e=>e?{"aria-disabled":!0,disabledReason:e}:{},_n=/* @__PURE__ */V("div",{className:"flex flex-wrap items-center gap-2",children:[Re&&we&&!ln&&/* @__PURE__ */Q(T,{variant:"secondary",size:"sm",leftIcon:$.folderPlus,onClick:()=>{wn(rn)},...qn(Zn),children:Ee.newFolder}),be&&!ln&&/* @__PURE__ */Q(T,{variant:"primary",size:"sm",leftIcon:$.upload,onClick:()=>Wn.open(),...qn(Yn),children:Ee.upload}),Re&&ln&&je&&ie.length>0&&/* @__PURE__ */Q(T,{variant:"danger",size:"sm",onClick:je,...qn(fe.deleteForever),children:Ee.emptyTrash})]}),el=(e,n,l,a,i)=>/* @__PURE__ */Q("div",{style:{width:Qe?void 0:i,flex:Qe?"1 1 120px":"0 0 auto",minWidth:0},children:/* @__PURE__ */Q(v,{size:"sm","aria-label":e,value:n,onChange:a,options:l})},e),nl=e=>n=>de?.({...oe,[e]:n}),ll=/* @__PURE__ */V("div",{className:"flex flex-wrap items-center gap-2",children:[te&&/* @__PURE__ */Q("div",{style:{flex:"1 1 200px",minWidth:0},children:/* @__PURE__ */Q(N,{size:"sm",type:"search",leftIcon:$.search,placeholder:nn?Ee.searchProducts:Ee.search,"aria-label":nn?Ee.searchProducts:Ee.search,value:re??"",onChange:e=>te(e.target.value)})}),de&&el(Ee.mediaType,oe.type,[{value:"all",label:Ee.allTypes},{value:"image",label:Ee.images},{value:"video",label:Ee.videos},{value:"svg",label:"SVG"},{value:"gif",label:"GIF"}],nl("type"),130),de&&!nn&&!ln&&el(Ee.use,oe.use,[{value:"any",label:Ee.anyUse},{value:"email",label:Ee.emailOnly},{value:"website",label:Ee.websiteOnly},{value:"unused",label:Ee.notUsed}],nl("use"),130),de&&Re&&el(Ee.sort,oe.sort,[{value:"newest",label:Ee.newest},{value:"name",label:Ee.byName},{value:"size",label:Ee.bySize}],nl("sort"),110),se?.map(e=>el(e.label,e.value,e.options,e.onChange,120)),ue&&/* @__PURE__ */Q(k,{size:"sm",label:Ee.view,value:ce,onChange:ue,options:[{value:"grid",label:Ee.grid,icon:$.grid},{value:"list",label:Ee.list,icon:$.list}]})]}),al=e=>{const n=[];return null!=e.trashedDaysAgo&&n.push({key:"t",label:Ee.daysAgo(e.trashedDaysAgo),count:e.trashedDaysAgo,icon:W.clock,tone:"neutral"}),e.usedCount&&n.push({key:"u",label:Ee.used(e.usedCount),count:e.usedCount,icon:W.link,tone:"active"}),e.email&&n.push({key:"e",label:Ee.email,icon:W.email,tone:"queued"}),e.private&&n.push({key:"p",label:Ee.private,icon:W.lock,tone:"neutral"}),n},il=e=>al(e).map(e=>/* @__PURE__ */Q(z,{tone:e.tone,size:"xs",children:e.label},e.key)),rl=Re&&an&&!!Ce&&!fe.move,tl=!!Me&&!ln,ol=e=>!tl||e.private||e.pickDisabledReason?void 0:JSON.stringify({id:e.id,url:e.url,kind:"video"===e.kind?"video":"image",name:e.name}),dl=ie.map(e=>({id:e.id,url:e.thumbUrl??e.url,name:e.name,kind:e.kind,caption:e.name,badges:al(e),dragData:rl?JSON.stringify(cn.isSelected(e.id)?un:[e.id]):ol(e),...rl&&ol(e)?{dragAlso:{[X]:ol(e)}}:{}})),sl=Qe?Math.max(72,Math.floor((Ke-24-16-1)/3)):112,cl=P(null),ul=c({containerRef:cl,enabled:Re&&!Qe&&ie.length>0,selected:cn.selected,setSelection:e=>cn.setSelection(e),clearSelection:cn.clear}),ml=e=>{if(Ue){const n=sn.get(e);return void(!n||n.private||n.pickDisabledReason||Oe?.(n))}const n=dn.indexOf(e);n>=0&&In(n)},hl=ie.length?null:re?/* @__PURE__ */Q(t,{variant:"dashed",title:Ee.noMatches}):nn?/* @__PURE__ */Q(t,{variant:"dashed",title:Ee.emptyProducts,description:on(tn)}):ln?/* @__PURE__ */Q(t,{variant:"dashed",title:Ee.trashEmpty}):!$n||Ue?/* @__PURE__ */Q(t,{variant:"dashed",title:Ee.emptyFolder}):null,pl="list"===ce&&ie.length>0,fl=hl??(pl?/* @__PURE__ */Q("ul",{role:"listbox","aria-multiselectable":Re||void 0,"aria-label":Ee.folders,className:"flex flex-col gap-1",children:ie.map(e=>/* @__PURE__ */V("li",{role:"option","aria-selected":cn.isSelected(e.id),tabIndex:0,"data-grid-item":"","data-grid-id":e.id,onClick:n=>vn(e.id,n),onDoubleClick:()=>ml(e.id),onContextMenu:n=>zn(e.id,n),draggable:!!ol(e)||void 0,onDragStart:ol(e)?n=>{n.dataTransfer.effectAllowed="link",n.dataTransfer.setData(X,ol(e)),Me("start")}:void 0,onDragEnd:ol(e)?e=>Me("none"===e.dataTransfer.dropEffect?"cancelled":"dropped"):void 0,onKeyDown:n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),vn(e.id,n))},className:"flex h-12 cursor-pointer items-center gap-3 rounded-md px-2 text-sm rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(cn.isSelected(e.id)?"bg-accent-tint text-blue-700":"text-ink hover:bg-gray-100"),children:[
|
|
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:il(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(f,{items:dl,readOnly:!$n||Ue,onFiles:$n&&!Ue?e=>be(e,rn):void 0,accept:ge,maxSizeBytes:ve,busy:ke,progress:ye,fit:"contain",thumbSize:sl,dragType:rl?G:tl?X:void 0,onDragOutChange:tl?e=>Me(e):void 0,selected:cn.selected,onItemClick:vn,onItemDoubleClick:ml,onItemContextMenu:Re?zn:void 0,menuOnMedia:Re})),gl=h({count:un.length,kind:Cn(un),targets:xn({kind:"files",ids:un}),onPick:e=>Ce?.({kind:"files",ids:un},e.key===u?null:e.key)}),vl=F({variant:"secondary",size:"sm"}),kl=/* @__PURE__ */Q(I,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */V(K,{children:[$.folder,Ee.moveTo]}),items:gl,disabled:!!fe.move}),yl=Re&&un.length>1&&!nn?/* @__PURE__ */V("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:un.length===ie.length,indeterminate:un.length<ie.length,onChange:e=>e?cn.selectAll():cn.clear(),label:Ee.selected(un.length)}),/* @__PURE__ */V(K,ln?{children:[De&&/* @__PURE__ */Q(T,{variant:"secondary",size:"sm",leftIcon:$.undo,onClick:()=>De(un),...qn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */Q(T,{variant:"secondary-danger",size:"sm",onClick:()=>Se(un),...qn(fe.deleteForever),children:Ee.deleteForever})]}:{children:[Ce&&kl,xe&&/* @__PURE__ */Q(T,{variant:"secondary",size:"sm",leftIcon:$.edit,disabled:!0,children:Ee.rename}),Ne&&/* @__PURE__ */Q(T,{variant:"secondary",size:"sm",leftIcon:$.trash,onClick:()=>Ne({kind:"files",ids:un}),...qn(fe.trash),children:Ee.moveFilesToTrash(un.length)})]}),
|
|
12
|
-
/* @__PURE__ */Q(T,{variant:"ghost",size:"sm",onClick:cn.clear,children:Ee.clearSelection})]}):null,bl=e=>{const n=[],l=(e,l,a)=>{null!=a&&""!==a&&n.push({key:e,label:l,value:a})},a="file"===kn?.kind&&kn.id===e.id;l("name",Ee.name,a?/* @__PURE__ */Q(p,{value:e.name,label:Ee.fileName,onDone:bn}):e.name),l("type",Ee.type,e.typeLabel),l("size",Ee.size,e.sizeLabel),l("resolution",Ee.resolution,e.resolution),nn?(l("design",Ee.design,e.design),l("finish",Ee.finish,e.finish),l("angle",Ee.angleLug,e.angleLug),l("owner",Ee.owner,e.owner)):(l("added",Ee.addedBy,e.addedBy),l("folder",Ee.folder,e.folderPath)),l("used",Ee.usedIn,null!=e.usedCount?Ee.places(e.usedCount):void 0);const i=m({kind:"files",ids:[e.id]},Dn).find(e=>"submenu"===e.type);/* @__PURE__ */
|
|
13
|
-
return V("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"}),nn&&/* @__PURE__ */Q(C,{tone:"neutral",title:Ee.readOnlyBadge,children:on(tn)}),
|
|
15
|
-
/* @__PURE__ */Q(o,{size:"sm",columns:1,items:n}),!ln&&/* @__PURE__ */V("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":Ee.fileUrl,onFocus:e=>e.currentTarget.select()})}),
|
|
17
|
-
/* @__PURE__ */Q(T,{variant:"secondary",size:"sm",leftIcon:$.copy,onClick:()=>Dn.copyUrl(e.id),children:Ee.copyUrl})]}),an&&Re&&/* @__PURE__ */V("div",{className:"flex flex-wrap gap-2",children:[ze&&/* @__PURE__ */Q(T,{variant:"secondary",size:"sm",leftIcon:$.swap,onClick:()=>ze(e.id),...qn(fe.replace),children:Ee.replace}),Te&&/* @__PURE__ */Q(T,{variant:"secondary",size:"sm",leftIcon:$.crop,onClick:()=>Te(e.id),children:Ee.cropEdit}),Ce&&"submenu"===i?.type&&/* @__PURE__ */Q(I,{align:"start",triggerClassName:vl,trigger:/* @__PURE__ */V(K,{children:[$.folder,Ee.moveTo]}),items:i.items,disabled:!!fe.move}),xe&&/* @__PURE__ */Q(T,{variant:"secondary",size:"sm",leftIcon:$.edit,onClick:()=>yn({kind:"file",id:e.id}),...qn(fe.rename),children:Ee.rename}),Ne&&/* @__PURE__ */Q(D,{"aria-label":Ee.moveToTrash,size:"sm",onClick:()=>Ne({kind:"files",ids:[e.id]}),disabledReason:fe.trash,"aria-disabled":!!fe.trash||void 0,children:$.trash})]}),ln&&Re&&/* @__PURE__ */V("div",{className:"flex flex-wrap gap-2",children:[De&&/* @__PURE__ */Q(T,{variant:"primary",size:"sm",leftIcon:$.undo,onClick:()=>De([e.id]),...qn(fe.restore),children:Ee.restore}),Se&&/* @__PURE__ */Q(T,{variant:"danger",size:"sm",onClick:()=>Se([e.id]),...qn(fe.deleteForever),children:Ee.deleteForever})]}),nn&&Fe&&/* @__PURE__ */Q(T,{variant:"secondary",size:"sm",leftIcon:$.external,onClick:()=>Fe({kind:"render",id:e.id}),children:Ee.openInDesign}),pe&&/* @__PURE__ */Q(g,{items:pe})]})},wl=mn?mn.private?Ee.privateNoPick:mn.pickDisabledReason:void 0,xl=Ue?/* @__PURE__ */V("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:mn?Ee.oneChosen(mn.name):Ee.noneChosen}),
|
|
19
|
-
/* @__PURE__ */V("div",{className:"flex gap-2",children:[Le&&/* @__PURE__ */Q(T,{variant:"secondary",size:"sm",onClick:Le,children:Ee.cancel}),
|
|
20
|
-
/* @__PURE__ */Q(T,{variant:"primary",size:"sm",disabled:!mn,...qn(wl),onClick:()=>{mn&&!wl&&Oe?.(mn)},children:Ee.chooseImage})]})]}):null,Cl=Re&&!!mn,Nl=/* @__PURE__ */V("div",{className:"flex min-w-0 flex-col gap-3",children:[Ae&&/* @__PURE__ */Q(C,{tone:"neutral",children:Ae}),
|
|
21
|
-
/* @__PURE__ */V("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[
|
|
22
|
-
/* @__PURE__ */Q(d,{items:Hn}),_n]}),ll,yl,
|
|
23
|
-
/* @__PURE__ */V("div",{ref:cl,className:"relative",onPointerDown:ul.onPointerDown,onKeyDown:e=>{Re&&(e.ctrlKey||e.metaKey)&&"a"===e.key.toLowerCase()?(e.preventDefault(),cn.selectAll()):"Escape"===e.key&&cn.size&&cn.clear()},children:[fl,
|
|
24
|
-
/* @__PURE__ */Q(i,{rect:ul.rect})]}),$n&&/* @__PURE__ */Q("input",{...Wn.inputProps}),
|
|
25
|
-
/* @__PURE__ */Q(j,{rejections:Wn.rejections})]});/* @__PURE__ */
|
|
26
|
-
return V("div",{ref:Ve,"data-media-library":"","data-layout":Qe?"phone":"wide",className:`flex h-full min-h-0 min-w-0 flex-col ${Pe}`.trim(),children:[/* @__PURE__ */V("div",Qe?{className:"flex flex-col gap-3 p-3",children:[Xn,Nl]}:{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:Xn}),
|
|
28
|
-
/* @__PURE__ */Q("div",{className:"min-w-0 flex-1 overflow-y-auto p-3",children:Nl}),Cl&&/* @__PURE__ */Q("div",{className:"shrink-0 overflow-y-auto border-l border-line p-3",style:{width:300},children:bl(mn)})]}),xl,Qe&&/* @__PURE__ */Q(r,{open:Cl,onClose:cn.clear,side:"bottom",title:mn?.name,children:mn&&bl(mn)}),jn.state&&/* @__PURE__ */Q(x,{...jn.props,items:Sn(jn.state.data)}),null!=Nn&&ie.length>0&&/* @__PURE__ */Q(a,{images:ie.map(e=>({url:e.url,caption:e.name})),startIndex:Math.min(Nn,ie.length-1),onClose:()=>In(null)})]})}export{G as MEDIA_FILES_DRAG_TYPE,X as MEDIA_FILE_DRAG_TYPE,J as MEDIA_FOLDER_DRAG_TYPE,Z as MediaLibrary,H as readMediaFileDrag};
|
package/dist/chunk-7INZ7O3A.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as l}from"./chunk-ECJKIPWU.js";import{dialogA11y as a}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as o}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as s}from"./chunk-CDAJKLGL.js";import{Icon as d}from"./chunk-2UO47XB4.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{useHydrated as m}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as p}from"./chunk-GDQJBQ5B.js";import{useRef as f,useId as h,useState as x,useEffect as v}from"react";import{createPortal as b}from"react-dom";import{jsxs as y,Fragment as g,jsx as k}from"react/jsx-runtime";var j={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function N({open:N,onClose:w,title:C,description:D,role:W="dialog",children:J,footer:U,blocking:B=!1,size:L="md",aside:Q=!1,dirty:T=!1,initialFocus:G,"aria-label":I,"aria-labelledby":P,"aria-describedby":V,className:X=""}){const $=f(null),z=h(),A=h(),F=!B,K=h(),S=p().dialog,E=e(m()),[H,O]=x(null),Y=l({open:N,dirty:T,onClose:w,title:C,layer:H}),Z=f(null),q=r(N&&null!==E,Z),M=i(q,$);if(o(N),n($,N&&null!==E,G),s(N),v(()=>{if(N)return u(()=>(B||Y(),!0),()=>$.current)},[N,B,Y]),!N||!E)return null;/* @__PURE__ */
|
|
2
|
-
return y(g,{children:[/* @__PURE__ */k("span",{ref:Z,hidden:!0,"data-popup-anchor":""}),b(
|
|
3
|
-
/* @__PURE__ */k(t,{value:H,children:/* @__PURE__ */y("div",{ref:O,className:"fixed inset-0"+(Q?" pointer-events-none opacity-0":""),style:{zIndex:c.overlay},role:"presentation","data-overlay-layer":"","data-aside":Q?"":void 0,children:[
|
|
4
|
-
/* @__PURE__ */k("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),
|
|
5
|
-
/* @__PURE__ */k("div",{className:q?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:B?void 0:e=>{e.target===e.currentTarget&&Y()},children:/* @__PURE__ */y("div",{ref:$,"data-popup-panel":"",style:q?{left:M?.left??0,top:M?.top??0,visibility:M?void 0:"hidden"}:void 0,...a({role:W,modal:!0,titleId:C?K:void 0,labelledBy:P,label:I}),"aria-describedby":V??(D?A:J?z:void 0),className:`${q?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${j[L]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${X}`.trim(),children:[C&&/* @__PURE__ */k("h2",{id:K,className:(F?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:C}),D&&/* @__PURE__ */k("p",{id:A,className:((C?"mt-1":F?"pr-8":"")+" text-sm text-gray-500").trim(),children:D}),J&&/* @__PURE__ */k("div",{id:z,className:"mt-2 text-sm text-gray-600",children:J}),U&&/* @__PURE__ */k("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:U}),F&&/* @__PURE__ */k("button",{type:"button",onClick:Y,"aria-label":S.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */k(d,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),E)]})}export{N as Dialog};
|
package/dist/chunk-CZMSOB2T.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{Segmented as e}from"./chunk-JQBVSPF5.js";import{ImageFocusPoint as a}from"./chunk-XQZL6JDD.js";import{FormField as i}from"./chunk-6KBDNYRW.js";import{isVideoUrl as t,mediaPromptLine as o,mediaFileName as r,FilenameBadge as n,BusyOverlay as l,UploadGlyph as s,dropzoneClass as c,zoneFocusClass as d}from"./chunk-ZD36QKQS.js";import{TransferProgress as u}from"./chunk-PVPMJ5G2.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-JTMEFXRL.js";import{Icon as p}from"./chunk-2UO47XB4.js";import{useShellStrings as b}from"./chunk-GDQJBQ5B.js";import{useState as g,useRef as v,useEffect as f,useId as y}from"react";import{jsxs as k,jsx as j,Fragment as x}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:F,label:U,hint:C,error:P,required:B,className:O,accept:Q="image/*",maxSizeBytes:$,fit:z="cover",height:D=112,placeholder:J,cta:S,acceptHint:q,showFilename:H=!0,allowReplace:K=!0,allowRemove:V=!0,replaceLabel:X,removeLabel:G,busy:I=!1,busyLabel:M,choosingLabel:W,pickFailedLabel:Z,progress:_,disabled:A=!1,kind:E,onKindChange:T,focus:Y,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=S??ie.cta,oe=E??(/video/.test(Q)&&!/image/.test(Q)?"video":"image"),re="string"==typeof G&&G?G:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=I||ne,me=ne&&!I?W??ie.choosing:M??ie.uploading,he=P??(se?Z??ie.pickFailed:void 0),pe=e=>{if(!R)return;ce(!1);const a=R(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&L(e))},()=>{de.current&&(le(!1),ce(!0))}))},be=y(),ge=v(null),[ve,fe]=g(null);f(()=>()=>{ge.current&&URL.revokeObjectURL(ge.current)},[]);const ye=A||ue,ke=!!w&&(t(w,Q)||w===ve),je=J??o(Q,ie),xe=X??(ke||"video"===oe?ie.changeVideo:ie.changeImage),Ne=e=>{R?pe(e):F?F(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),L(a)})(e)},we=m({accept:Q,maxSizeBytes:$,acceptHint:q,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:Le}=we,Re=()=>{ye||(R?pe():we.open())},Fe=w?r(w):"",Ue=!ke&&!!ee,Ce=A||!K&&!V?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:["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:Ue?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Re(),disabled:ue,className:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
|
|
2
|
-
/* @__PURE__ */j(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
3
|
-
/* @__PURE__ */j("span",{id:`${be}-change`,className:"truncate",children:xe})]}),V&&/* @__PURE__ */j("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),L("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Pe=/* @__PURE__ */k("div",{...we.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Ue?"":"bg-gray-100",Le?"border-blue-500":"border-line"].join(" "),style:Ue?void 0:{height:D},children:[Ue?
|
|
4
|
-
/* @__PURE__ */j(a,{value:Y??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:w,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Fe||void 0,className:"h-full w-full",style:{objectFit:z}}):/* @__PURE__ */j("img",{src:w??void 0,alt:Fe,className:"h-full w-full",style:{objectFit:z,objectPosition:Y||void 0}}),H&&w&&/* @__PURE__ */j(n,{children:Fe}),Ce,ue&&/* @__PURE__ */j(l,{label:me,progress:_,rounded:"rounded-md"})]}),Be=/* @__PURE__ */j("button",{type:"button",id:be,onClick:()=>Re(),disabled:ye,"aria-label":"string"==typeof je?je:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":B||void 0,"aria-describedby":he?`${be}-error`:C?`${be}-hint`:void 0,...we.zoneProps,className:c(Le,ye,d(ye)),style:{minHeight:D},children:ue?/* @__PURE__ */j(u,{state:"busy",verb:me,pct:_}):/* @__PURE__ */k(x,{children:[
|
|
5
|
-
/* @__PURE__ */j("span",{className:"text-ink-faintest",children:/* @__PURE__ */j(s,{})}),
|
|
6
|
-
/* @__PURE__ */j("span",{className:"px-3 text-xs text-ink-faint",children:je}),
|
|
7
|
-
/* @__PURE__ */j("span",{className:"text-sm font-medium text-blue-600",children:te}),q&&/* @__PURE__ */j("span",{className:"text-xs text-ink-faintest",children:q})]})});/* @__PURE__ */
|
|
8
|
-
return k(i,{label:U,htmlFor:be,hint:C,error:he,required:B,className:O,children:[T&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(e,{value:oe,onChange:e=>T(e),options:[{value:"image",label:ie.image,icon:/* @__PURE__ */j(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye},{value:"video",label:ie.video,icon:/* @__PURE__ */j(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:ye}],block:!0,size:"md",label:"string"==typeof U&&U?U:ie.upload})}),w?Pe:Be,!R&&/* @__PURE__ */j("input",{...we.inputProps}),
|
|
9
|
-
/* @__PURE__ */j(h,{rejections:we.rejections})]})}export{w as MediaUploadField};
|
package/dist/chunk-EUAC2T5D.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{CartesianPlot as t}from"./chunk-RABYGQQU.js";import{binValues as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-GDQJBQ5B.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const A=e().charts,Q=i(),v=d??(t=>Number.isInteger(t)?m(t,Q):n(t,1,Q)),w=x??(t=>m(t,Q)),L=g??A.countAxis,B=k??A.distribution,M=h??o(c??[],s),N=a(0,b,f),R=M.map(t=>v(t.from)),C=M.map(t=>t.count);/* @__PURE__ */
|
|
2
|
-
return l(t,{labels:R,values:C,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:w,yAxisLabel:L,className:y,emptyLabel:j,ariaLabel:A.histogram(B,M.length,(c??[]).length),tooltip:t=>/* @__PURE__ */l(r,{title:`${v(M[t].from)} – ${v(M[t].to)}`,rows:[{key:"count",label:A.observations,color:N,value:w(M[t].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:M.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:N,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
package/dist/chunk-F3ZFCQGP.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Popover as e}from"./chunk-7JGR7WPD.js";import{IconButton_default as r}from"./chunk-VCMHBUKI.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{Tooltip as t}from"./chunk-QQ2LDC6C.js";import{useShellStrings as a}from"./chunk-GDQJBQ5B.js";import{useRef as i}from"react";import{jsx as l,jsxs as o,Fragment as s}from"react/jsx-runtime";var c={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function u({value:u,onChange:m,options:d,label:h,emptyValue:p,columns:f=5,cell:v,header:g,onPreview:w,tooltips:b=!0,disabled:x=!1,className:N=""}){const k=a(),C=k.iconPicker,j=k.iconNames,y=e=>e.label??j[e.value]??e.value,D=i([]),A=Math.max(0,d.findIndex(e=>e.value===u)),B=d[A],M=B?.value===p,Q=i(null);/* @__PURE__ */
|
|
2
|
-
return l(e,{className:N,disabled:x,triggerLabel:B?C.button(h,y(B)):h,"aria-label":h,initialFocus:Q,panelClassName:"!p-2",trigger:/* @__PURE__ */o("span",{className:"inline-flex items-center gap-2",children:[/* @__PURE__ */l("span",M||!B?{className:"text-sm",children:B?y(B):""}:{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:B.icon}),
|
|
3
|
-
/* @__PURE__ */l(n,{name:"chevron-down",className:"h-4 w-4"})]}),children:({close:e})=>/* @__PURE__ */o(s,{children:["function"==typeof g?g({close:e}):g,
|
|
4
|
-
/* @__PURE__ */l("div",{role:"listbox","aria-label":h,className:"grid gap-1",style:{gridTemplateColumns:`repeat(${f}, ${v?.width??"2rem"})`},children:d.map((n,a)=>{const i=n.value===u,o=/* @__PURE__ */l(r,{ref:e=>{D.current[a]=e,a===A&&(Q.current=e)},role:"option","aria-selected":i,"aria-label":y(n),pressed:i,tabIndex:a===A?0:-1,onKeyDown:e=>((e,r)=>{const n=c[r.key];if(!n)return;r.preventDefault();const t=Math.floor(e/f)+n[0],a=e%f+n[1];if(t<0||a<0||a>=f)return;const i=t*f+a;if(!(i>=d.length)){for(const[e,r]of D.current.entries())r?.setAttribute("tabindex",e===i?"0":"-1");D.current[i]?.focus()}})(a,e),onClick:()=>{m(n.value),e()},onMouseEnter:w?e=>w(n.value,e.currentTarget):void 0,style:v?{width:v.width,height:v.height}:void 0,children:/* @__PURE__ */l("span",{"aria-hidden":"true",className:v?"inline-flex":"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:n.icon})},n.value);return b?/* @__PURE__ */l(t,{content:y(n),children:o},n.value):o})})]})})}export{u as IconPicker};
|
package/dist/chunk-FO6UPEZH.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{squarify as e}from"./chunk-46BYGPGD.js";import{AccessibleTable as t}from"./chunk-EYPKBJYG.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{usePlotWidth as a}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as i,CHART_INK as o}from"./chunk-TZFACUMR.js";import{useShellStrings as n,useShellLocale as m}from"./chunk-GDQJBQ5B.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as u}from"react";import{jsx as s,jsxs as f}from"react/jsx-runtime";function p({items:p,height:d=320,width:v,gap:x=2,radius:g=3,formatValue:y,color:k,className:b,emptyLabel:j}){const w=n().charts,M=m(),N=y??(e=>h(e,M)),B=j??w.nothingToBreakDown,$=c(null),Y=a($),C=v??Y,[D,F]=u(null),{highlighted:G}=l(),Q=e(p,C,d);if(0===Q.length)/* @__PURE__ */
|
|
2
|
-
return s("div",{className:b,ref:$,children:/* @__PURE__ */s("p",{className:"py-8 text-center text-sm text-gray-500",children:B})});const z=k??i(0),A=Math.max(...Q.map(e=>e.value),1),E=e=>34+e/A*62,P=e=>`color-mix(in oklab, ${z} ${E(e).toFixed(0)}%, ${o.surface})`,V=e=>E(e)>=55?o.surface:o.label,H=D??G,I=D?Q.find(e=>e.key===D):void 0;/* @__PURE__ */
|
|
3
|
-
return f("div",{className:`relative ${b??""}`,ref:$,children:[
|
|
4
|
-
/* @__PURE__ */s("svg",{width:"100%",height:d,viewBox:`0 0 ${C} ${d}`,role:"img","aria-label":w.treemap(p.length),onMouseLeave:()=>F(null),children:Q.map(e=>{const t=Math.max(0,e.width-x),l=Math.max(0,e.height-x),a=t>6.2*e.label.length+12&&l>30,r=a&&l>44;/* @__PURE__ */
|
|
5
|
-
return f("g",{opacity:H&&H!==e.key?.55:1,onMouseEnter:()=>F(e.key),children:[
|
|
6
|
-
/* @__PURE__ */s("rect",{x:e.x+x/2,y:e.y+x/2,width:t,height:l,rx:g,fill:P(e.value)}),a&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+18,fontSize:12,fontWeight:600,fill:V(e.value),children:e.label}),r&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+34,fontSize:11,fill:V(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:N(e.value)})]},e.key)})}),I&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(r,{title:I.label,rows:[{key:"value",label:w.value,color:P(I.value),value:N(I.value)}]})}),
|
|
7
|
-
/* @__PURE__ */s(t,{caption:w.treemap(p.length),head:[w.tableItem,w.value],rows:Q.map(e=>[e.label,N(e.value)])})]})}export{p as TreemapChart};
|
package/dist/chunk-FSUQTN34.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{SearchableSelect as e}from"./chunk-XZAEEX2H.js";import{Select_default as a}from"./chunk-M3JNILT2.js";import{labelClasses as l}from"./chunk-EQKUFYX6.js";import{isSafeLinkHref as t}from"./chunk-Q5Z3KHT2.js";import{Input_default as n}from"./chunk-NGLU2GKE.js";import{INPUT_SIZES as r}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-7DI3VQCF.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-GDQJBQ5B.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:r,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:j,className:F=""}=t,O=void 0!==t.onApply,E=u().link,$=y.isSafe??k,z=d(),Q=c(null),U=c(null),[A,D]=p({url:r}),T=O?A.url:r,[K,L]=p(!1),[X,Y]=p(null),[B,G]=p(null),H=c(()=>{});H.current=O?t.onCancel:()=>{},m(()=>{if(O)return s(e=>{const a=Q.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(H.current(),!0)},()=>Q.current)},[O]),m(()=>{if(!O)return;const e=U.current;e?(e.focus(),e.select()):Q.current?.querySelector("button, input")?.focus()},[]);const M=o??[{value:b,label:E.address,target:{type:"text"}}],P=X&&X.against===T?X.kind:y.kindOf(T),W=M.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===P),Z=W.find(e=>"text"===e.target.type),I=W.find(e=>e.value===P)??Z??W[0];if(!I)return null;const J="text"!==I.target.type,R=J?y.targetOf(T):T,S=h(I.target),V=S.find(e=>e.value===R),q=e=>({value:e,label:E.unavailable(e)}),_="select"===I.target.type&&R&&w?w(R):null,ee=_?y.readFilter(T):null,ae=ee?_?.find(e=>e.param===ee.param):void 0,le=B&&B.against===T?B.text:T,te=!J&&""!==le.trim()&&!$(le),ne=te&&(!O||K),re=(e,a)=>{O?D({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},ie=(e,a)=>{Y(a=>a?{...a,against:e}:a),re(e,a)},oe=e=>{if(!e)return ie("");const a=S.find(a=>a.value===e);ie(e,a?.label)},se=J?T:le.trim(),ue=()=>{if(!O||!se)return;if(!J&&te)return void L(!0);const e=J&&A.url===se?A.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},de=(e,a)=>a&&!e.some(e=>e.value===a)?[q(a),...e]:[...e],ce=(l,t,n,r,i)=>{const o=[];for(const e of n){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=n.some(e=>""===e.value);/* @__PURE__ */
|
|
2
|
-
return f(e,{"aria-label":l,value:t,options:o,disabled:C,clearable:a,placeholder:n.find(e=>""===e.value)?.label,onChange:r})}/* @__PURE__ */
|
|
3
|
-
return f(a,{size:"sm","aria-label":l,value:t,options:o,readOnly:C,onChange:r})};let pe;if("text"===I.target.type)pe=/* @__PURE__ */f(n,{ref:U,id:`${z}-address`,size:"sm",type:"text",invalid:ne,"aria-label":E.address,"aria-describedby":ne?`${z}-why`:void 0,placeholder:j??E.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:le,readOnly:C,onChange:e=>(e=>{L(!1);const a=e.trim();a?$(e)?(G({text:e,against:a}),ie(a)):G({text:e,against:T}):(G({text:e,against:""}),ie(""))})(e.target.value)});else{const e="groups"===I.target.type?I.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):I.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:I.target.placeholder},...de(e,R)];pe=ce(I.label,R,a,oe,e.length>10)}const me=/* @__PURE__ */v(g,{children:[o&&ce(E.linkType,I.value,W.map(e=>({value:e.value,label:e.label})),e=>{G(null),L(!1);const a=W.find(a=>a.value===e);if(!a||"text"===a.target.type)return void Y({kind:e,against:T});const l=h(a.target)[0];Y({kind:e,against:l?l.value:""}),l?re(l.value,l.label):re("")},!1),pe,_&&ce(E.filter,ee?.param??"",[{value:"",label:E.noFilter},...ee&&!ae?[q(ee.param)]:[],..._.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return ie(R,V?.label);const a=_?.find(a=>a.param===e),l=a?.values[0];l&&ie(y.withFilter(R,{param:e,value:l.value}),l.label)},!1),_&&ee&&ce(E.value,ee.value,de((ae?.values??[]).map(e=>({value:e.value,label:e.label})),ee.value),e=>{if(!ee)return;const a=ae?.values.find(a=>a.value===e);ie(y.withFilter(R,{param:ee.param,value:e}),a?.label)},(ae?.values.length??0)>10),ne&&/* @__PURE__ */f("p",{id:`${z}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:E.unsafe}),I.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:I.hint}),_&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:E.filterHint})]});if(!O)/* @__PURE__ */
|
|
4
|
-
return f("div",{ref:Q,className:`flex min-w-0 flex-auto flex-col gap-2 ${F}`.trim(),role:N?"group":void 0,"aria-label":N,children:me});const fe=t.onRemove;/* @__PURE__ */
|
|
5
|
-
return v("div",{ref:Q,role:"dialog","aria-label":N??E.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${F}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),ue())},children:[J?/* @__PURE__ */f("span",{className:l({inline:!0}),children:E.title}):/* @__PURE__ */f("label",{htmlFor:`${z}-address`,className:l({inline:!0}),children:E.title}),me,
|
|
6
|
-
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[fe?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:fe,children:E.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:()=>H.current(),children:E.cancel}),
|
|
9
|
-
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:ue,disabled:C||""===se,children:E.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,N]=p(!1),C=c(null),j=d(),F=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
|
|
10
|
-
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
|
-
/* @__PURE__ */f(n,{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:C,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?j:void 0,disabled:b,onClick:()=>N(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 ${r.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:j,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),F()},onRemove:t?()=>{i(""),F()}:void 0,onCancel:F})})]})}export{y as LinkPicker,w as TextLinkField};
|
package/dist/chunk-GDQJBQ5B.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",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",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"},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}`,spreadsheet:"Multi-sheet spreadsheet editor with CSV / TSV import and export.",notepad:"Color-coded notes with checklists, desktop stickies and entity autolinking.",documents:"Letter-page editor for Word documents and plain-text files — images, lists, alignment.",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 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),m=/* @__PURE__ */new Set;var g=c,w={};function f(){return g}function $({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(m.has(e)||(m.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,$=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]),v=r(()=>({locale:f}),[f]),y=null!==a;return s(()=>{if(!y)return g=$,()=>{g===$&&(g=c)}},[$,y]),/* @__PURE__ */l(u.Provider,{value:v,children:/* @__PURE__ */l(h.Provider,{value:$,children:t})})}function v(){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,$ as ShellStringsProvider,f as currentShellStrings,b as splitAround,y as useShellLocale,v as useShellStrings};
|
package/dist/chunk-GELPD7EY.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as a}from"./chunk-465RRWBY.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{angleScale as r}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-GDQJBQ5B.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useId as h,useState as u}from"react";import{jsx as p,jsxs as d}from"react/jsx-runtime";var f=300*Math.PI/180;function g({rows:g,variant:k="track",size:v=300,max:x,formatValue:y,animate:M=!0,className:N,emptyLabel:b,trackGap:j=6}){const C=s().charts,w=c(),Q=y??(e=>m(e,w)),R=b??C.nothingToPlot,B=h(),[E,P]=u(null),{highlighted:T}=l();if(0===g.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${N??""}`,children:R});const $=v/2,F=v/2,I=v/2-10,U=x??Math.max(...g.map(e=>e.value),1),V="track"===k?Math.max(6,(I-.16*v)/g.length):0,W=Math.max(1,Math.floor((I-.16*v)/V||1)),Y="track"===k?g.slice(0,W):g,z=Math.min(j,Math.max(1,V-2)),A=r(Y.length,.03),D=null!==E?Y[E]:void 0;/* @__PURE__ */
|
|
2
|
-
return d("div",{className:`relative ${N??""}`,children:[
|
|
3
|
-
/* @__PURE__ */d("svg",{width:"100%",height:v,viewBox:`0 0 ${v} ${v}`,role:"img","aria-labelledby":B,onMouseLeave:()=>P(null),children:[
|
|
4
|
-
/* @__PURE__ */p("title",{id:B,children:"track"===k?C.radialTrack(Y.length):C.radialCycle(Y.length)}),Y.map((l,r)=>{const n=o(r,l.color,l.tone),s=Math.max(0,Math.min(1,l.value/U)),c=((e,t)=>null!==E?E!==e:null!==T&&T!==t)(r,l.key);if("track"===k){const o=I-r*V,m=o-V+z,h=-Math.PI/2;/* @__PURE__ */
|
|
5
|
-
return d("g",{opacity:c?.4:1,onMouseEnter:()=>P(r),className:M?t.sweep:void 0,style:M?a(r,70):void 0,children:[
|
|
6
|
-
/* @__PURE__ */p("path",{d:e($,F,m,o,h,h+f),fill:i.grid}),
|
|
7
|
-
/* @__PURE__ */p("path",{d:e($,F,m,o,h,h+f*s),fill:n})]},l.key)}const m=.14*v;/* @__PURE__ */
|
|
8
|
-
return p("g",{opacity:c?.4:1,onMouseEnter:()=>P(r),children:/* @__PURE__ */p("path",{d:e($,F,m,m+(I-m)*s,A(r),A(r)+A.step),fill:n})},l.key)})]}),D&&null!==E&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(n,{title:D.label,rows:[{key:"value",label:C.value,color:o(E,D.color,D.tone),value:Q(D.value)}]})}),
|
|
9
|
-
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(150px,1fr))"},children:g.map((e,t)=>/* @__PURE__ */d("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
10
|
-
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:o(t,e.color,e.tone)}}),
|
|
11
|
-
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
12
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:Q(e.value)})]},e.key))})]})}export{g as RadialBarChart};
|
package/dist/chunk-GOZO6LU2.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{optionMatches as e,OptionSublabel as t}from"./chunk-LJN77RG6.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as o}from"./chunk-JPNAEN53.js";import{Tooltip as r}from"./chunk-QQ2LDC6C.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as a,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{useShellStrings as u}from"./chunk-GDQJBQ5B.js";import{glassStyle as d}from"./chunk-5FYDNH4Y.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as v}from"react-dom";import{jsxs as g,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${o.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:o,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:L,id:D,className:E="",tone:B,tooltip:J,split:W}){const[Y,$]=m(!1),[G,M]=m(""),Q=u(),F=h(null),H=h(null),S=h(null),A=s(F,Y),I=e=>k.find(t=>t.value===e)?.label??e,P=p(()=>{const t=new Set(o),n=[],r=G.trim().toLowerCase();for(const o of k)t.has(o.value)||(t.add(o.value),r&&!e(o,r)||n.push(o));return n},[k,o,G]),T=e=>{const t=[...o];for(const n of e){const e=n.trim();if(!e)continue;const o=e.toLowerCase(),r=k.find(t=>t.value===e||t.label.toLowerCase()===o)?.value,l=r??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==o.length&&y(t)},z=e=>{e&&!o.includes(e)?(y([...o,e]),M("")):M("")},K=e=>y(o.filter(t=>t!==e)),R=()=>{const e=G.trim();if(W&&e)return T(e.split(W)),void M("");j&&e?z(e):M("")},U=h(()=>{});U.current=()=>{R(),$(!1)},f(()=>{if(!Y)return;const e=e=>{const t=e.target;F.current?.contains(t)||S.current?.contains(t)||(R(),$(!1))};document.addEventListener("mousedown",e);const t=l(()=>U.current());return()=>{document.removeEventListener("mousedown",e),t()}});const Z=k.length>0;/* @__PURE__ */
|
|
2
|
-
return g("div",{ref:F,className:"relative",children:[
|
|
3
|
-
/* @__PURE__ */g("div",{onMouseDown:e=>{L||e.target.closest("button")||(e.preventDefault(),H.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${L?"bg-gray-50 cursor-not-allowed":""} ${E}`}),children:[o.map(e=>{const t=B?.(e),n=w[t??"accent"],o=/* @__PURE__ */g("span",{"data-tone":t,className:n.chip,children:[
|
|
4
|
-
/* @__PURE__ */x("span",{className:"truncate",children:I(e)}),!L&&/* @__PURE__ */x("button",{type:"button","aria-label":Q.select.removeItem?.(I(e))??`${Q.select.remove} ${I(e)}`,onClick:()=>K(e),className:n.remove,children:"×"})]},e),l=J?.(e);return null==l?o:/* @__PURE__ */x(r,{content:l,className:"relative inline-flex max-w-full",children:o},e)}),
|
|
5
|
-
/* @__PURE__ */x("input",{id:D,ref:H,type:"text",autoComplete:"off",role:"combobox","aria-expanded":Y&&Z,"aria-invalid":C||void 0,disabled:L,value:G,placeholder:0===o.length?N:void 0,onChange:e=>{(e=>{if(W){const t=e.split(W);if(t.length>1)return T(t.slice(0,-1)),void M(t[t.length-1])}M(e)})(e.target.value),$(!0)},onFocus:()=>{!L&&Z&&$(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=G.trim(),o=n?P.filter(t=>e(t,n.toLowerCase())):[];1===o.length?z(o[0].value):R()}else"Backspace"===t.key&&""===G&&o.length>0?K(o[o.length-1]):"Escape"===t.key?($(!1),M(""),H.current?.blur()):"Tab"===t.key&&(R(),$(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),Y&&Z&&v(
|
|
6
|
-
/* @__PURE__ */x("div",{ref:S,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:A?.left,right:A?.right,top:A?.top,bottom:A?.bottom,minWidth:A?.minWidth,maxWidth:A?.maxWidth??a,width:"max-content",visibility:A?void 0:"hidden",...d()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:A?.maxHeight??c},children:0===P.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&o.length>=k.length?Q.select.allSelected:Q.select.noMatches}):P.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),z(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */g(b,{children:[
|
|
7
|
-
/* @__PURE__ */x("span",{className:"min-w-0 truncate",children:e.label}),
|
|
8
|
-
/* @__PURE__ */x(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
|
package/dist/chunk-HCXIXV4E.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{usePlotWidth as e}from"./chunk-MAFUXCPZ.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-GDQJBQ5B.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:$,xDomain:j,yDomain:w,xScale:N="linear",yScale:R="linear",radiusRange:D=[4,22],className:S,emptyLabel:U}){const L=m().charts,Q=h(),W=z??(e=>f(e,Q)),B=$??(e=>f(e,Q)),P=U??L.noObservations,V=u(null),C=e(V),E=v??C,F=p(),[I,O]=d(null);x(()=>{if(null!==I)return c(e=>"Escape"===e.key&&(O(null),!0))},[I]);const J=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),T=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),X=j||w?T.map(e=>({...e,points:e.points.filter(e=>J(e.x,j)&&J(e.y,w))})).filter(e=>e.points.length>0):T,Z=T.reduce((e,t)=>e+t.points.length,0)-X.reduce((e,t)=>e+t.points.length,0);if(0===X.length)/* @__PURE__ */
|
|
2
|
-
return y("div",{className:S,ref:V,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:P})});const G=X.flatMap(e=>e.points),H=G.some(e=>null!=e.size),K=14,Y=20,q=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(G.map(e=>e.y),w,R,{from:k-q,to:K}),ie=t(te.ticks(5).map(B),_),le=Math.max(ie+1,E-Y),re=ee(G.map(e=>e.x),j,N,{from:ie,to:le}),oe=i([0,Math.max(...G.map(e=>e.size??1))],{from:D[0],to:D[1]}),ne=I?X[I.s]:void 0,ae=I&&ne?ne.points[I.i]:void 0,se=X.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
-
return g("div",{className:`relative ${S??""}`,ref:V,children:[
|
|
4
|
-
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${E} ${k}`,role:"img","aria-label":L.scatter(X.map(e=>e.label),A??L.yAxis,M??L.xAxis)+(Z>0?`. ${L.outsideRange(Z)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>O(null),onBlur:()=>O(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=I?se.findIndex(e=>e.s===I.s&&e.i===I.i):0;O(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
-
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:F,children:/* @__PURE__ */y("rect",{x:ie-D[1],y:K-D[1],width:le-ie+2*D[1],height:k-q-K+2*D[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
|
|
6
|
-
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
-
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:B(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:W(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:a.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:A}),
|
|
8
|
-
/* @__PURE__ */y("g",{clipPath:`url(#${F})`,children:X.map((e,t)=>{const i=s(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:H?oe(l.size??0):D[0]+1,fill:i,fillOpacity:I&&I.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>O({s:t,i:r})},`${e.key}-${r}`))})})]}),I&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(n,{title:ae.label??ne.label,rows:[{key:"x",label:M??L.xAxis,color:s(ne.slot,3,ne.color,ne.tone),value:W(ae.x)},{key:"y",label:A??L.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:B(ae.y)},...null!=ae.size?[{key:"size",label:L.size,color:a.muted,value:f(ae.size,Q)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
package/dist/chunk-IYXNRNAF.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as t}from"./chunk-EYPKBJYG.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-GDQJBQ5B.js";import{formatPlain as s}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),i=t.length>l,s=i?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(s.map((t,e)=>[t,e])),d=i?s.length:-1,m=i?[...s.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:i?t.length-s.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:k,className:v,emptyLabel:M}){const $=l().charts,w=i(),N=k??(t=>s(t,w)),j=M??$.noFlows,[y,E]=c(null),{highlighted:F}=o(),C=h(u,f,x,$.other),{labels:Q,matrix:I,otherIndex:z,foldedCount:A}=C,B=(t,e)=>I[t]?.[e]??0,Y=t=>t===z?r.muted:a(t),L=C.totals,O=Q.map((t,e)=>e).sort((t,e)=>L[e]-L[t]),P=O.reduce((t,e)=>t+L[e],0);if(P<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:j});const V=p/2,W=p/2,D=p/2-44,G=D-b,H=g*O.length,J=/* @__PURE__ */new Map;let R=-Math.PI/2;O.forEach((t,e)=>{const o=L[t]/P*(2*Math.PI-H);J.set(t,{start:R,end:R+o,slot:e}),R+=o+g});const T=/* @__PURE__ */new Map,U=[];for(const t of O)for(const e of O){const o=B(t,e);if(o<=0)continue;const n=J.get(t),r=o/Math.max(1,L[t])*(n.end-n.start),a=T.get(t)??0;T.set(t,a+r),U.push({from:t,to:e,value:o,a:n.start+a+r/2,b:J.get(e).start+(J.get(e).end-J.get(e).start)/2})}const K=(t,e)=>[V+e*Math.cos(t),W+e*Math.sin(t)],S="arc"===y?.kind?y.index:void 0,Z="ribbon"===y?.kind?U[y.index]:void 0;/* @__PURE__ */
|
|
2
|
-
return m("div",{className:`relative ${v??""}`,children:[
|
|
3
|
-
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(O.length),onMouseLeave:()=>E(null),children:[U.map((t,e)=>{const[o,n]=K(t.a,G),[r,a]=K(t.b,G),l=Y(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==F?Q[t.from]===F||Q[t.to]===F:null)(t,e);/* @__PURE__ */
|
|
4
|
-
return d("path",{d:`M${o},${n} Q${V},${W} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/P*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>E({kind:"ribbon",index:e})},`${Q[t.from]}→${Q[t.to]}`)}),O.map(t=>{const o=J.get(t),n=(o.start+o.end)/2,[a,l]=K(n,D+16),i=(t=>y?"arc"===y.kind?y.index===t:U[y.index].from===t||U[y.index].to===t:null!==F?Q[t]===F:null)(t);/* @__PURE__ */
|
|
5
|
-
return m("g",{onMouseEnter:()=>E({kind:"arc",index:t}),children:[
|
|
6
|
-
/* @__PURE__ */d("path",{d:e(V,W,G,D,o.start,o.end),fill:Y(t),fillOpacity:null===i||i?1:.45}),
|
|
7
|
-
/* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:Q[t]})]},t)})]}),A>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(A)}),void 0!==S&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:Q[S],rows:[{key:"total",label:$.totalFlow,color:Y(S),value:N(L[S])}]})}),Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${Q[Z.from]} → ${Q[Z.to]}`,rows:[{key:"value",label:$.flow,color:Y(Z.from),value:N(Z.value)}]})}),
|
|
8
|
-
/* @__PURE__ */d(t,{caption:$.chord(O.length),head:[$.tableFrom,$.tableTo,$.value],rows:U.map(t=>[Q[t.from],Q[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
package/dist/chunk-K4JQ3FQI.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-SDDV3UCN.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-7TC3LJQM.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-GDQJBQ5B.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:b}){const M=l(Date.now,null),j=[],C=[],x=o().timeline,D=r();for(const e of p){const n=i(e.date??null);null===n?C.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const L=i(g??null);let N,w,H=!0;0===j.length?(w=L??M??0,N=w-30*a,H=null!==L||null!==M):(N=j[0].ms,w=L??j[j.length-1].ms,w-N<a&&(w=N+a));const J=j.length>0?Math.max(0,Math.round((w-N)/a)):0,O=u??(J>0?x.duration(J):void 0),Q=[j.length>0?x.started(t(j[0].ms,D)):void 0,O,C.length>0?x.reached(j.length,p.length):void 0],B=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),K={};for(const e of j)e.phase&&(K[e.phase]=K[e.phase]||[]).push(e.ms);const S=Object.entries(K).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),T="rail"===v,G=H&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:T?"spread":"compressed",labels:T?"none":"lanes",items:B,pending:C,phases:S,startMs:N,endMs:w,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:x.milestones(m)})});/* @__PURE__ */
|
|
2
|
-
return h("div",T?{className:"shrink-0","data-timeline-variant":"rail",children:G}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:Q,children:G})})}export{m as MilestoneTimeline};
|
package/dist/chunk-L7XIGRIT.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-4EZIWLJJ.js";import{IconButton_default as a}from"./chunk-VCMHBUKI.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{Tooltip as n}from"./chunk-QQ2LDC6C.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.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":B,windows:j,className:I="",layout:L="grid"}){const q=s().textToolbar,A=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!A.words&&!A.paragraph)return null;const U=m(n,k,x,A.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,Q=l(q),R=e.map(e=>[e,Q[e],r(e)]),S=C?e.filter(e=>C.allow.includes(e)):[],J=C&&S.includes(C.value)?C.value:S[0],T=[["none",q.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",q.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",q.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],E=x&&U?g(q.clear,/* @__PURE__ */i(a,{className:$(!1),"aria-label":q.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,H=/* @__PURE__ */t(d,{children:[K("bold",q.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),K("italic",q.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),K("underline",q.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),K("strike",q.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(q.color,/* @__PURE__ */i(a,{pressed:k.open,className:$(k.open,"rosh-tb-color"),"aria-label":q.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",q.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),K("sup",q.sup,/* @__PURE__ */i(o,{name:"superscript"})),K("sub",q.sub,/* @__PURE__ */i(o,{name:"subscript"})),K("code",q.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===U?E:null]}),O=/* @__PURE__ */t(d,{children:[C&&S.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.alignment,onKeyDown:e=>p(e,S,e=>C.onChange(e)),children:R.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===J?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,D&&n.has("bullet")?g(q.bullet,/* @__PURE__ */i(a,{className:$("bullet"===D.pressed),"aria-label":q.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(q.number,/* @__PURE__ */i(a,{className:$("number"===D.pressed),"aria-label":q.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",q.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":q.letterCase,onKeyDown:e=>p(e,T.map(([e])=>e),e=>M.onChange(e)),children:T.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"===U?E:null]}),G="row"===L,V=G?" is-row":A.flow?" is-flow":A.oneRow?" is-one-row":A.words&&void 0===N&&"words"!==U?" is-eight":"",W=b(n,Boolean(k)),X={"--rosh-tb-color-col":String(W.color),"--rosh-tb-link-col":String(W.link),...G?{"--rosh-tb-cells":String(A.cells.words+A.cells.paragraph),"--rosh-tb-groupgap":A.words&&A.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let Z;return Z=G?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[A.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:H}):null,A.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:O}):null]}):A.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[H,
|
|
3
|
-
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),O]}):A.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:O})]}):/* @__PURE__ */t(d,{children:[A.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==U?" is-eight":""),children:H}):null,A.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:O}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${V} ${I}`.trim(),style:X,children:[
|
|
6
|
-
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":B??q.formatting,children:Z}),j]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
package/dist/chunk-LGDMGDSV.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a,CHART_INK as n,STATUS_VARS as r}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as i}from"./chunk-GDQJBQ5B.js";import{formatPercent as u,formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as c,useState as m,useRef as s}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function x({stages:x,shape:v="funnel",height:p,width:$,gap:g=4,minBandWidth:M=0,formatValue:y,color:b,className:k,emptyLabel:A}){const N=o().charts,L=i(),S=y??(e=>h(e,L)),j=A??N.noStages,z=c(),[V,F]=m(null),{highlighted:W}=e(),w=s(null),B=t(w,560),C=$??B;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const Q=b??a(0),Z=p??54*x.length,E=Math.max(...x.map(e=>e.value),1),H="bars"===v,D=H?Math.round(Math.min(132,Math.max(80,.24*C))):Math.round(Math.min(168,Math.max(104,.38*C))),R=e=>{const t=x[e-1]?.value;return null!=t&&t>0?100*(1-x[e].value/t):null},U=e=>{const t=R(e);return{count:S(x[e].value),drop:null!=t?`−${u(t,1,L)}`:""}},Y=H?Math.ceil(Math.max(...x.map((e,t)=>{const{count:l,drop:a}=U(t);return.62*(l.length+(a?a.length+1:0))*12}))+16):0,G=C-D-Y,I=Math.max(H?2:0,Math.min(M,G)),J=e=>Math.max(I,G*Math.max(0,e/E)),O=e=>J(e)/2,P=D+G/2,T=e=>46+e/Math.max(1,x.length-1)*54,X=e=>`color-mix(in oklab, ${Q} ${T(e).toFixed(0)}%, ${n.surface})`,q=e=>T(e)>=55?n.surface:n.label,K=(e,t)=>null!==V?V!==e:null!==W&&W!==t,_=null!==V?x[V]:void 0;/* @__PURE__ */
|
|
2
|
-
return f("div",{className:`relative ${k??""}`,ref:w,children:[
|
|
3
|
-
/* @__PURE__ */f("svg",{width:"100%",height:Z,viewBox:`0 0 ${C} ${Z}`,role:"img","aria-labelledby":z,onMouseLeave:()=>F(null),children:[
|
|
4
|
-
/* @__PURE__ */d("title",{id:z,children:N.funnel(x.length,S(x[0].value),S(x[x.length-1].value))}),x.map((e,t)=>{const l=t*Z/x.length+g/2,a=(t+1)*Z/x.length-g/2,r=(l+a)/2,o=u(e.value/(x[0].value||1)*100,0,L),i=.62*o.length*12+12;if(H){const u=D,h=u+J(e.value),{count:c,drop:m}=U(t);/* @__PURE__ */
|
|
5
|
-
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>F(t),children:[
|
|
6
|
-
/* @__PURE__ */d("path",{d:`M${u},${l} L${h},${l} L${h},${a} L${u},${a} Z`,fill:X(t)}),
|
|
7
|
-
/* @__PURE__ */d("text",{x:D-12,y:r+4,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),h-u>=i&&/* @__PURE__ */d("text",{x:u+8,y:r+4,textAnchor:"start",fontSize:12,fontWeight:600,fill:q(t),style:{fontVariantNumeric:"tabular-nums"},children:o}),
|
|
8
|
-
/* @__PURE__ */f("text",{"data-funnel-value":"true",x:h+8,y:r+4,textAnchor:"start",fontSize:12,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:[
|
|
9
|
-
/* @__PURE__ */d("tspan",{fontWeight:600,children:c}),m&&/* @__PURE__ */d("tspan",{fill:n.muted,children:` ${m}`})]})]},e.key)}const h=O(e.value),c="cone"===v?O(x[t+1]?.value??e.value):h,m=R(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
|
|
10
|
-
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>F(t),children:[
|
|
11
|
-
/* @__PURE__ */d("path",{d:`M${P-h},${l} L${P+h},${l} L${P+c},${a} L${P-c},${a} Z`,fill:X(t)}),
|
|
12
|
-
/* @__PURE__ */d("text",{x:D-14,y:r-2,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),
|
|
13
|
-
/* @__PURE__ */f("text",{x:D-14,y:r+14,textAnchor:"end",fontSize:11,fill:n.muted,style:{fontVariantNumeric:"tabular-nums"},children:[S(e.value),null!=m?` · −${u(m,1,L)}`:""]}),
|
|
14
|
-
/* @__PURE__ */d("text",{x:s?P:P+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?q(t):n.label,style:{fontVariantNumeric:"tabular-nums"},children:o})]},e.key)})]}),_&&null!==V&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:_.label,rows:[{key:"value",label:N.count,color:X(V),value:S(_.value)},{key:"share",label:N.ofFirstStage,color:n.muted,value:u(_.value/(x[0].value||1)*100,0,L)},...V>0&&x[V-1].value>0?[{key:"drop",label:N.droppedHere,color:r.critical,value:`−${u(100*(1-_.value/x[V-1].value),1,L)}`}]:[]]})})]})}export{x as FunnelChart};
|
package/dist/chunk-LKTUUNGJ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="11.8.0",a=r;export{a as APP_VERSION,r as VERSION};
|