efficient-shell 8.21.0 → 8.22.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 +35 -11
- package/dist/{Browser-WJ7YGO3M.js → Browser-VZU2MTSA.js} +14 -14
- package/dist/Calculator-DKZHOHOD.js +29 -0
- package/dist/{CurrencyConverter-ONCRQNI4.js → CurrencyConverter-BSQCX3HS.js} +9 -9
- package/dist/{Documents-YEMIR4WQ.js → Documents-NR3T434J.js} +17 -17
- package/dist/{Files-QWSOYRD4.js → Files-QMV2E74S.js} +16 -16
- package/dist/{Notepad-MFVUGAGD.js → Notepad-M5MCY5DV.js} +10 -10
- package/dist/{PdfViewer-ZFZ4PEAV.js → PdfViewer-OODU3XIT.js} +1 -1
- package/dist/{PomodoroTimer-JVQ5K7B4.js → PomodoroTimer-I423ZZOQ.js} +58 -58
- package/dist/{Preview-7G2WM7DN.js → Preview-QTDCPMCL.js} +26 -26
- package/dist/Sidebar-UVBEI4DQ.js +43 -0
- package/dist/{Spreadsheet-VKOS3PUA.js → Spreadsheet-V2EWOJML.js} +13 -13
- package/dist/{Stock-TWJNCTNT.js → Stock-U3G45T36.js} +2 -2
- package/dist/{Weather-RM7GPLAH.js → Weather-GEC4VHLM.js} +15 -15
- package/dist/{WorldClock-ITJ2MO75.js → WorldClock-6ORV4NHF.js} +5 -5
- package/dist/ai/index.js +14 -14
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/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-255BENW2.js +7 -0
- package/dist/{chunk-ZBLNVAZ4.js → chunk-2IV4XF3Y.js} +2 -2
- package/dist/{chunk-MHYOQMBV.js → chunk-2JYQF3PJ.js} +1 -1
- package/dist/{chunk-3Z7LIHMB.js → chunk-2RJKMYON.js} +1 -1
- package/dist/{chunk-6V753BUI.js → chunk-2TBC254V.js} +3 -3
- package/dist/{chunk-5Z2WLSFM.js → chunk-352MVBF7.js} +20 -20
- package/dist/{chunk-CFLVEKSH.js → chunk-35VA5UFB.js} +1 -1
- package/dist/{chunk-IJA5ZAGL.js → chunk-3APQ5V6P.js} +1 -1
- package/dist/{chunk-D5HHU5AO.js → chunk-3UL7IB25.js} +7 -7
- package/dist/{chunk-N7VNKAXZ.js → chunk-46M6AYFJ.js} +1 -1
- package/dist/{chunk-AH2AUQYM.js → chunk-4ELYV3L6.js} +1 -1
- package/dist/{chunk-YGEK2Z6P.js → chunk-52L6IBTN.js} +1 -1
- package/dist/{chunk-B55IXYDR.js → chunk-53ROHXAV.js} +2 -2
- package/dist/{chunk-4VK3GJZI.js → chunk-56C5SEZ7.js} +1 -1
- package/dist/{chunk-U5I7IF72.js → chunk-5B73MLXV.js} +1 -1
- package/dist/{chunk-7M7ESM5V.js → chunk-5BBDUKQP.js} +12 -12
- package/dist/{chunk-MWAYM46R.js → chunk-5EK4DFB5.js} +11 -11
- package/dist/{chunk-JYOI66DT.js → chunk-5LNFW5E4.js} +1 -1
- package/dist/{chunk-AJ42UE53.js → chunk-5OGWWBJY.js} +1 -1
- package/dist/{chunk-4CWKK5HV.js → chunk-6AJM3QNG.js} +4 -4
- package/dist/{chunk-2BS74SYW.js → chunk-6DT7HG3F.js} +1 -1
- package/dist/chunk-6JCIQ7XL.js +8 -0
- package/dist/{chunk-7S2I6ACG.js → chunk-6PWLY2LQ.js} +1 -1
- package/dist/{chunk-4XOTP5CB.js → chunk-6UBBY54N.js} +2 -2
- package/dist/{chunk-MFEJ6TYE.js → chunk-74HUZZPT.js} +1 -1
- package/dist/{chunk-735HKUTV.js → chunk-74QAQXSB.js} +1 -1
- package/dist/{chunk-DO6XTJ77.js → chunk-7AINUMUA.js} +1 -1
- package/dist/{chunk-UY47AKZU.js → chunk-ALYBCDHU.js} +5 -5
- package/dist/{chunk-M5BFTFBK.js → chunk-AXQBQH55.js} +15 -15
- package/dist/{chunk-ZDK2JYH5.js → chunk-B73YLHD2.js} +54 -54
- package/dist/{chunk-VY7EPQEG.js → chunk-BBYHBN3R.js} +1 -1
- package/dist/{chunk-DLCIGDKC.js → chunk-BJEBOXTR.js} +3 -3
- package/dist/{chunk-HVVPBAP5.js → chunk-BJKZYQFA.js} +3 -3
- package/dist/{chunk-HYFHCPNJ.js → chunk-BUWOFJGM.js} +8 -8
- package/dist/{chunk-AXZEINMF.js → chunk-C3ZZDCBU.js} +18 -18
- package/dist/chunk-CGUMJZUB.js +2 -0
- package/dist/{chunk-OTU633XJ.js → chunk-CJKDYVNE.js} +6 -6
- package/dist/chunk-CPM3BQGV.js +14 -0
- package/dist/{chunk-HJIBTA6V.js → chunk-CQZEO4UV.js} +9 -9
- package/dist/{chunk-EL3O7ZFQ.js → chunk-CREVU3AF.js} +1 -1
- package/dist/{chunk-P7WUDHIP.js → chunk-D3BDPSVV.js} +6 -6
- package/dist/{chunk-B4XPFCCQ.js → chunk-D7AA5WE2.js} +2 -2
- package/dist/{chunk-OCCHDMEV.js → chunk-DIW6WT5L.js} +1 -1
- package/dist/chunk-DIZW2GZP.js +3 -0
- package/dist/{chunk-L6FLPBU2.js → chunk-DQB3ORB7.js} +5 -5
- package/dist/chunk-DSYIKLOK.js +11 -0
- package/dist/chunk-EUOFKZI3.js +19 -0
- package/dist/{chunk-L65EQCZN.js → chunk-F3AROMIU.js} +6 -6
- package/dist/{chunk-WRJDHFLD.js → chunk-F6YIUCIJ.js} +4 -4
- package/dist/{chunk-TT3S2XVQ.js → chunk-F6YMKW5G.js} +1 -1
- package/dist/{chunk-3PQHPFXP.js → chunk-FDENTKSM.js} +5 -5
- package/dist/{chunk-KZEQJVBO.js → chunk-FLQIF7HC.js} +3 -3
- package/dist/{chunk-BIS5PHHV.js → chunk-FW2EEIDB.js} +2 -2
- package/dist/{chunk-XWH6KVVB.js → chunk-GKTCCPME.js} +1 -1
- package/dist/{chunk-Y5ZWPU4L.js → chunk-GTKNEJ3X.js} +7 -7
- package/dist/{chunk-IKNNHEVY.js → chunk-GVNDUNQL.js} +1 -1
- package/dist/{chunk-IY3CRZRH.js → chunk-HLZZ5Q5E.js} +20 -20
- package/dist/{chunk-VOHZQVFK.js → chunk-I2FHDMIN.js} +6 -6
- package/dist/{chunk-NKJDOQVW.js → chunk-IJICE6KT.js} +1 -1
- package/dist/{chunk-6GVJ6IKD.js → chunk-IMDLBXO3.js} +1 -1
- package/dist/{chunk-IMF537IJ.js → chunk-IOESXYEI.js} +9 -9
- package/dist/{chunk-55WFJELE.js → chunk-IUBWN3OA.js} +1 -1
- package/dist/{chunk-PG6AVBSR.js → chunk-JACPHDTK.js} +1 -1
- package/dist/chunk-JGZLLQAN.js +8 -0
- package/dist/{chunk-DIKOEJ2Y.js → chunk-JLPTSC66.js} +1 -1
- package/dist/{chunk-LMLM4KHQ.js → chunk-JXGYIV44.js} +8 -8
- package/dist/{chunk-ECZT7SIE.js → chunk-KBLMTCTD.js} +1 -1
- package/dist/{chunk-IPOSLLLU.js → chunk-KFSNSDTW.js} +9 -9
- package/dist/{chunk-PTDLNTSK.js → chunk-L2JOLPJR.js} +1 -1
- package/dist/{chunk-ACZZXO5S.js → chunk-LQHWFL5Y.js} +2 -2
- package/dist/{chunk-F2Z6IXMM.js → chunk-LVAGFIWK.js} +2 -2
- package/dist/{chunk-VX4BNYH3.js → chunk-MIZO6SQ3.js} +2 -2
- package/dist/{chunk-OZF4QAJT.js → chunk-MRLQH2GZ.js} +3 -3
- package/dist/{chunk-MKITHLDU.js → chunk-MWNZY33B.js} +9 -9
- package/dist/{chunk-MOOBUMON.js → chunk-NE42BDQX.js} +5 -5
- package/dist/chunk-NHFLTKPK.js +11 -0
- package/dist/{chunk-LDFRVV5R.js → chunk-NYLXA2EG.js} +7 -7
- package/dist/{chunk-H7ZXUGXX.js → chunk-O3NLPJH2.js} +16 -16
- package/dist/chunk-O5KDTFK5.js +8 -0
- package/dist/{chunk-PJCVNFWM.js → chunk-O6JX6RDX.js} +7 -7
- package/dist/{chunk-L2YW3END.js → chunk-ONEF47LG.js} +3 -3
- package/dist/{chunk-CU2B7G5A.js → chunk-OPFCLDVM.js} +1 -1
- package/dist/chunk-PFB2NSSS.js +14 -0
- package/dist/{chunk-NDTMQRR2.js → chunk-PHYI7M45.js} +1 -1
- package/dist/chunk-PMOGQHYX.js +20 -0
- package/dist/{chunk-THDSOVEH.js → chunk-POMS7YQN.js} +2 -2
- package/dist/{chunk-MTSZ66O4.js → chunk-PZFETJAG.js} +1 -1
- package/dist/{chunk-NBVF2CXM.js → chunk-Q6A6W3DI.js} +1 -1
- package/dist/chunk-QLAQ6ASB.js +5 -0
- package/dist/{chunk-EDQBTPDF.js → chunk-QSN7X27F.js} +5 -5
- package/dist/{chunk-OSVN2UF7.js → chunk-QUS3C264.js} +1 -1
- package/dist/{chunk-IGCXJHAK.js → chunk-QZRH7L2E.js} +1 -1
- package/dist/{chunk-DMLJOBQS.js → chunk-R4JU7MU2.js} +6 -6
- package/dist/{chunk-MEOICYR5.js → chunk-R5FFVK2W.js} +1 -1
- package/dist/{chunk-YVBFFE4Z.js → chunk-RIGW3E5M.js} +4 -4
- package/dist/chunk-RPK3U2K2.js +9 -0
- package/dist/chunk-RPTQCFLR.js +29 -0
- package/dist/{chunk-K4DZWCUP.js → chunk-SDORX5C2.js} +5 -5
- package/dist/{chunk-NRDO5IHL.js → chunk-SFWIYB4T.js} +1 -1
- package/dist/{chunk-IURSUMDO.js → chunk-SH6ZLK4K.js} +3 -3
- package/dist/{chunk-ERFM5U3M.js → chunk-SLORZA7W.js} +10 -10
- package/dist/{chunk-YSHS6QIY.js → chunk-SO4WAMVA.js} +5 -5
- package/dist/{chunk-EAEUSMYL.js → chunk-SRMRRJ5K.js} +1 -1
- package/dist/{chunk-RAQESAQZ.js → chunk-SSOLRTVS.js} +1 -1
- package/dist/{chunk-A4U4BTN3.js → chunk-TCN7XUCY.js} +4 -4
- package/dist/{chunk-24L7NLA3.js → chunk-TJPPV7KZ.js} +1 -1
- package/dist/{chunk-OSSFYFXO.js → chunk-TSOBVLV5.js} +1 -1
- package/dist/{chunk-XVJCVYDI.js → chunk-TYZ4IY7F.js} +2 -2
- package/dist/{chunk-QEVIQZIE.js → chunk-U4QZIU7X.js} +2 -2
- package/dist/chunk-URFWJZTV.js +7 -0
- package/dist/{chunk-PWOFYFMO.js → chunk-V23TPYHO.js} +5 -5
- package/dist/{chunk-BXM72C73.js → chunk-V4WNEJ63.js} +1 -1
- package/dist/chunk-VKMEQKYT.js +1 -0
- package/dist/{chunk-NNKMEF3D.js → chunk-VNYFGNHO.js} +1 -1
- package/dist/{chunk-36MUTG34.js → chunk-VWMTQLVS.js} +1 -1
- package/dist/{chunk-ZKOIGLRF.js → chunk-W7NZKU27.js} +6 -6
- package/dist/{chunk-EXMFUK3A.js → chunk-W7ZAFS7C.js} +8 -8
- package/dist/{chunk-YTGWIMXB.js → chunk-WBU7NZBP.js} +1 -1
- package/dist/{chunk-RZBHO74V.js → chunk-WQKGBPOQ.js} +1 -1
- package/dist/{chunk-AX7KPMDV.js → chunk-WSODT2L5.js} +2 -2
- package/dist/{chunk-LVSPLCGG.js → chunk-WXIEWJF7.js} +1 -1
- package/dist/{chunk-RCRI6QZV.js → chunk-X2U5XB7J.js} +1 -1
- package/dist/{chunk-PVSGQN5M.js → chunk-X7JK22X2.js} +6 -6
- package/dist/{chunk-LQQMELJM.js → chunk-XCHY6QVH.js} +7 -7
- package/dist/{chunk-CUT7PAXL.js → chunk-XFBXKKOB.js} +1 -1
- package/dist/{chunk-CMYLTCPA.js → chunk-XFIMTNUH.js} +1 -1
- package/dist/{chunk-WJEDIAG4.js → chunk-XUQQCKKD.js} +1 -1
- package/dist/{chunk-3HNK7IRJ.js → chunk-YF7A3BWA.js} +3 -3
- package/dist/chunk-YPXVOPL4.js +1 -0
- package/dist/{chunk-VHAM5TD2.js → chunk-Z4UKLPGE.js} +1 -1
- package/dist/{chunk-TW6WEYGO.js → chunk-Z5TCGLCM.js} +6 -6
- package/dist/{chunk-NSCLFAKK.js → chunk-ZI7P5YGF.js} +1 -1
- package/dist/{chunk-UFVQ7ZBP.js → chunk-ZLGU4VYO.js} +5 -5
- package/dist/{chunk-RAI3GTS6.js → chunk-ZMLRNHMS.js} +1 -1
- package/dist/{chunk-RDPUVCXR.js → chunk-ZVTOB4RE.js} +1 -1
- package/dist/{chunk-OZPYTSPD.js → chunk-ZY62UQI2.js} +15 -15
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.d.ts +11 -0
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.d.ts +5 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +393 -393
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +5 -5
- 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/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/ZoomableImage.d.ts +9 -1
- package/dist/shell/ZoomableImage.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +4 -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.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -1
- package/dist/Calculator-FHN36ZE3.js +0 -29
- package/dist/Sidebar-OFRMBB5V.js +0 -43
- package/dist/chunk-2H6PDKTC.js +0 -8
- package/dist/chunk-4PZN25MV.js +0 -20
- package/dist/chunk-73DAZUJP.js +0 -14
- package/dist/chunk-DLS2VCBK.js +0 -3
- package/dist/chunk-DNKACLRF.js +0 -11
- package/dist/chunk-DZT2O3JD.js +0 -11
- package/dist/chunk-EKWSGPJ4.js +0 -8
- package/dist/chunk-ETSKG62F.js +0 -1
- package/dist/chunk-FPDKMCQH.js +0 -8
- package/dist/chunk-JGE7S7RQ.js +0 -29
- package/dist/chunk-KPFOXLN4.js +0 -5
- package/dist/chunk-L2HZ7YXS.js +0 -14
- package/dist/chunk-OF6TUQAL.js +0 -7
- package/dist/chunk-U5KIRPLV.js +0 -2
- package/dist/chunk-VT62T6B3.js +0 -19
- package/dist/chunk-WBEMN4JG.js +0 -9
- package/dist/chunk-WDXJWC3Y.js +0 -7
- package/dist/chunk-X4EBWJWO.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{calendarNames as e,firstDayOfWeek as t}from"./chunk-5OTS2G3M.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useBrowserValue as a}from"./chunk-D65T4H6J.js";import{useShellStrings as n,useShellLocale as o}from"./chunk-
|
|
1
|
+
import{calendarNames as e,firstDayOfWeek as t}from"./chunk-5OTS2G3M.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useBrowserValue as a}from"./chunk-D65T4H6J.js";import{useShellStrings as n,useShellLocale as o}from"./chunk-VKMEQKYT.js";import{useMemo as l,useState as i,useRef as s,useEffect as c}from"react";import{jsxs as u,jsx as g,Fragment as d}from"react/jsx-runtime";var h=e=>String(e).padStart(2,"0"),m="grid grid-cols-[repeat(7,minmax(0,40px))] sm:grid-cols-[repeat(7,minmax(0,32px))] justify-center gap-1";function b(e){return`${e.getFullYear()}-${h(e.getMonth()+1)}-${h(e.getDate())}`}function f(e){if(!e)return null;const t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;const r=new Date(Number(t[1]),Number(t[2])-1,Number(t[3]));return Number.isNaN(r.getTime())?null:r}var y=e=>`${e.getFullYear()}-${h(e.getMonth()+1)}`;var v=()=>b(/* @__PURE__ */new Date);var p=(e,t)=>new Date(e.getFullYear(),e.getMonth(),e.getDate()+t),x=(e,t)=>{const r=new Date(e.getFullYear(),e.getMonth()+t,1),a=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return new Date(r.getFullYear(),r.getMonth(),Math.min(e.getDate(),a))};function w({value:h,endValue:w,mode:N="single",onSelect:M,min:D,max:Y,month:k,defaultMonth:F,onMonthChange:j,weekStartsOn:$,quickJump:A=!0,markedDates:S,readOnly:C=!1,"aria-label":K,className:T=""}){const q=l(()=>new Set(S??[]),[S]),P=f(h),E=a(v,null),O=f(E),B=n().calendar,H=o(),I=e(H),J=a(()=>t(H),0),L=$??J,U=()=>{if(!O)return null;const e=y(O);return D&&e<D.slice(0,7)?D.slice(0,7):Y&&e>Y.slice(0,7)?Y.slice(0,7):e},[V,W]=i(()=>F||(P?y(P):U())),G=k??V??U(),Q=null===G?null:function(e,t){const r=/^(\d{4})-(\d{2})$/.exec(e);return r?new Date(Number(r[1]),Number(r[2])-1,1):t}(G,O),[R,z]=i(()=>h??E),X=s(null),Z=s(!1),[_,ee]=i("days"),te=l(()=>Q?function(e,t){const r=new Date(e.getFullYear(),e.getMonth(),1),a=(r.getDay()-t+7)%7,n=new Date(r.getFullYear(),r.getMonth(),1-a);return Array.from({length:42},(e,t)=>new Date(n.getFullYear(),n.getMonth(),n.getDate()+t))}(Q,L):[],[G,L]),re=e=>!!D&&e<D||!!Y&&e>Y,ae=R??E,ne=te.some(e=>b(e)===ae),oe=Q?te.find(e=>e.getMonth()===Q.getMonth())??te[0]:null,le=ne&&ae?ae:oe?b(oe):"";if(c(()=>{Z.current&&(Z.current=!1,X.current?.querySelector('[data-active="true"]')?.focus())},[le,G]),!Q)/* @__PURE__ */
|
|
2
2
|
return u("div",{className:T,"aria-hidden":"true","data-calendar-pending":"",children:[
|
|
3
3
|
/* @__PURE__ */g("div",{className:"mb-2 h-6"}),
|
|
4
|
-
/* @__PURE__ */g("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */g("div",0===t?{className:"py-1 text-xs",children:" "}:{className:m,children:/* @__PURE__ */g("span",{className:"aspect-square"})},t))})]});const ie=e=>"years"===_?new Date(
|
|
4
|
+
/* @__PURE__ */g("div",{className:"space-y-1",children:Array.from({length:7},(e,t)=>/* @__PURE__ */g("div",0===t?{className:"py-1 text-xs",children:" "}:{className:m,children:/* @__PURE__ */g("span",{className:"aspect-square"})},t))})]});const ie=e=>"years"===_?new Date(Q.getFullYear()+12*e,Q.getMonth(),1):"months"===_?new Date(Q.getFullYear()+e,Q.getMonth(),1):x(Q,e),se=e=>{const t=y(e);void 0===k&&W(t),j?.(t)},ce=K??I.monthYear(Q.getFullYear(),Q.getMonth());/* @__PURE__ */
|
|
5
5
|
return u("div",{className:T,children:[
|
|
6
6
|
/* @__PURE__ */u("div",{className:"mb-2 flex items-center justify-between px-1",children:[
|
|
7
7
|
/* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?B.previousYears:"months"===_?B.previousYear:B.previousMonth,onClick:()=>se(ie(-1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-left",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})}),
|
|
8
|
-
/* @__PURE__ */g("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children
|
|
9
|
-
/* @__PURE__ */g("button",{type:"button","aria-label":B.chooseYear(
|
|
10
|
-
/* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?B.nextYears:"months"===_?B.nextYear:B.nextMonth,onClick:()=>se(ie(1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-right",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})})]}),"months"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":B.monthPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:
|
|
11
|
-
/* @__PURE__ */u("div",{ref:X,role:"grid","aria-label":ce,className:"space-y-1","aria-readonly":C||void 0,onKeyDown:e=>{const t=f(le)??O??
|
|
12
|
-
/* @__PURE__ */g("div",{role:"row",className:`${m} text-center text-xs font-medium text-gray-500`,children:Array.from({length:7},(e,t)=>(t+
|
|
13
|
-
/* @__PURE__ */g("div",{role:"columnheader","aria-label":
|
|
14
|
-
return g("div",{role:"gridcell","aria-selected":a,"aria-label":C?l:void 0,children:C?/* @__PURE__ */u("span",{"aria-hidden":"true",className:`grid place-items-center ${i(!1)}`,children:[e.getDate(),s]}):/* @__PURE__ */u("button",{type:"button","data-active":t===le,tabIndex:t===le?0:-1,disabled:o,"aria-label":l,"aria-current":t===E?"date":void 0,onClick:()=>{
|
|
8
|
+
/* @__PURE__ */g("div",{"aria-live":"polite",className:"flex items-center gap-1 text-sm font-semibold text-gray-800",children:A?/* @__PURE__ */u(d,{children:["years"!==_&&/* @__PURE__ */g("button",{type:"button","aria-label":B.chooseMonth(I.months[Q.getMonth()]),onClick:()=>ee(e=>"months"===e?"days":"months"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:I.months[Q.getMonth()]}),
|
|
9
|
+
/* @__PURE__ */g("button",{type:"button","aria-label":B.chooseYear(Q.getFullYear()),onClick:()=>ee(e=>"years"===e?"days":"years"),className:"rounded-md px-2 py-0.5 transition-colors hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:Q.getFullYear()})]}):/* @__PURE__ */g("span",{children:I.monthYear(Q.getFullYear(),Q.getMonth())})}),
|
|
10
|
+
/* @__PURE__ */g("button",{type:"button","aria-label":"years"===_?B.nextYears:"months"===_?B.nextYear:B.nextMonth,onClick:()=>se(ie(1)),className:"rounded-full p-1 text-gray-600 hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */g(r,{name:"chevron-right",className:"h-4 w-4",strokeWidth:"2","aria-hidden":"true"})})]}),"months"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":B.monthPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:I.monthsShort.map((e,t)=>/* @__PURE__ */g("button",{type:"button","aria-pressed":t===Q.getMonth(),onClick:()=>{se(new Date(Q.getFullYear(),t,1)),ee("days")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",t===Q.getMonth()?"bg-blue-600 font-semibold text-white":O&&t===O.getMonth()&&Q.getFullYear()===O.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),"years"===_&&/* @__PURE__ */g("div",{role:"group","aria-label":B.yearPanel,className:"grid grid-cols-3 gap-1 text-center text-sm",children:Array.from({length:12},(e,t)=>{return r=Q.getFullYear(),12*Math.floor(r/12)+t;var r}).map(e=>/* @__PURE__ */g("button",{type:"button","aria-pressed":e===Q.getFullYear(),onClick:()=>{se(new Date(e,Q.getMonth(),1)),ee("months")},className:["rounded-md py-4 transition-colors rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",e===Q.getFullYear()?"bg-blue-600 font-semibold text-white":e===O?.getFullYear()?"font-medium text-blue-600 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100"].join(" "),children:e},e))}),
|
|
11
|
+
/* @__PURE__ */u("div",{ref:X,role:"grid","aria-label":ce,className:"space-y-1","aria-readonly":C||void 0,onKeyDown:e=>{const t=f(le)??O??Q,r={ArrowLeft:()=>p(t,-1),ArrowRight:()=>p(t,1),ArrowUp:()=>p(t,-7),ArrowDown:()=>p(t,7),Home:()=>p(t,-(t.getDay()-L+7)%7),End:()=>p(t,6-(t.getDay()-L+7)%7),PageUp:()=>x(t,e.shiftKey?-12:-1),PageDown:()=>x(t,e.shiftKey?12:1)};if(r[e.key])return e.preventDefault(),a=r[e.key](),Z.current=!0,z(b(a)),void(y(a)!==G&&se(a));var a;"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),C||re(le)||M(le))},hidden:"days"!==_,children:[
|
|
12
|
+
/* @__PURE__ */g("div",{role:"row",className:`${m} text-center text-xs font-medium text-gray-500`,children:Array.from({length:7},(e,t)=>(t+L)%7).map(e=>
|
|
13
|
+
/* @__PURE__ */g("div",{role:"columnheader","aria-label":I.weekdays[e],className:"py-1",children:/* @__PURE__ */g("abbr",{title:I.weekdays[e],className:"no-underline",children:I.weekdaysShort[e]})},e))}),Array.from({length:6},(e,t)=>/* @__PURE__ */g("div",{role:"row",className:`${m} text-center text-sm`,children:te.slice(7*t,7*t+7).map(e=>{const t=b(e),r=e.getMonth()!==Q.getMonth(),a=t===h||"range"===N&&t===w,n=(e=>!("range"!==N||!h||!w)&&e>h&&e<w)(t),o=re(t),l=I.longDate(e.getFullYear(),e.getMonth(),e.getDate()),i=e=>["relative w-full aspect-square rounded-md transition-colors",e?"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",o?"cursor-not-allowed text-gray-300":a?"bg-blue-600 font-semibold text-white":n?"bg-blue-100 text-blue-800":r?"text-gray-500"+(e?" hover:bg-gray-100":""):"text-gray-700"+(e?" hover:bg-gray-100":""),t!==E||a?"":"font-semibold text-blue-600"].filter(Boolean).join(" "),s=q.has(t)&&/* @__PURE__ */g("span",{"data-marked":"","aria-hidden":"true",className:"absolute bottom-1 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full "+(a?"bg-white":r?"bg-gray-400":"bg-blue-500")});/* @__PURE__ */
|
|
14
|
+
return g("div",{role:"gridcell","aria-selected":a,"aria-label":C?l:void 0,children:C?/* @__PURE__ */u("span",{"aria-hidden":"true",className:`grid place-items-center ${i(!1)}`,children:[e.getDate(),s]}):/* @__PURE__ */u("button",{type:"button","data-active":t===le,tabIndex:t===le?0:-1,disabled:o,"aria-label":l,"aria-current":t===E?"date":void 0,onClick:()=>{z(t),M(t)},className:i(!0),children:[e.getDate(),s]})},t)})},t))]})]})}export{w as Calendar,f as fromKey,b as toKey};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{StatCard as e,Card as a}from"./chunk-
|
|
1
|
+
import{StatCard as e,Card as a}from"./chunk-V23TPYHO.js";import{Avatar as t}from"./chunk-7AINUMUA.js";import{Sparkline as r}from"./chunk-CKCDGSTC.js";import{PieChart as s}from"./chunk-MWNZY33B.js";import{ColumnChart as l}from"./chunk-F3AROMIU.js";import{StatusBadgeProvider as i,StatusBadge as d}from"./chunk-D323R2FT.js";import{TH_ONE_LINE as c}from"./chunk-6KO5VTL7.js";import{Button_default as n}from"./chunk-4IU5BSVE.js";import{jsx as o,jsxs as m}from"react/jsx-runtime";var u={paid:"success",shipped:"active",processing:"queued",refunded:"neutral",overdue:"danger"},h=[12,18,14,22,19,27,24,31,28,35,30,38],p=["J","F","M","A","M","J","J","A","S","O","N","D"],g=[{key:"direct",label:"Direct",value:45},{key:"search",label:"Search",value:30},{key:"social",label:"Social",value:15},{key:"email",label:"Email",value:10}],x=[{id:"#3201",customer:"Alice Nguyen",total:"$1,204",status:"paid"},{id:"#3202",customer:"Marco Reyes",total:"$642",status:"shipped"},{id:"#3203",customer:"Priya Patel",total:"$2,980",status:"processing"},{id:"#3204",customer:"Tom Becker",total:"$318",status:"overdue"},{id:"#3205",customer:"Sara Lind",total:"$540",status:"refunded"}];function v(){/* @__PURE__ */
|
|
2
2
|
return o(i,{groups:u,children:/* @__PURE__ */o("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */m("div",{className:"mx-auto max-w-6xl space-y-6",children:[
|
|
3
3
|
/* @__PURE__ */m("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */m("div",{children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useWindowMenuItem as e,Modal as t}from"./chunk-
|
|
1
|
+
import{useWindowMenuItem as e,Modal as t}from"./chunk-B73YLHD2.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-YPXVOPL4.js";import{Icon as o}from"./chunk-KIBL6M3T.js";import{DEFAULT_SHELL_STRINGS as n,useShellStrings as i,splitAround as a}from"./chunk-VKMEQKYT.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var u=n.aboutApp,f={spreadsheet:{name:"Spreadsheets",version:"1.1.3",route:"/spreadsheet",description:u.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:u.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:u.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:u.preview},files:{name:"Files",version:"1.1.3",route:"/files",description:u.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:u.browser}},x=/* @__PURE__ */p(o,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(o,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:o}){const n=f[o],[u,w]=m(!1),N=c(()=>w(!0),[]),g=i().aboutApp,b=g.title(n.name);if(e(b,N,x),!u)return null;const y=r[n.route],k=l(y)?d(y,{className:"h-9 w-9"}):v,[j,Y]=a(g.partOf);/* @__PURE__ */
|
|
2
2
|
return p(t,{open:!0,onClose:()=>w(!1),title:b,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
|
|
3
3
|
/* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:k}),
|
|
4
4
|
/* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:n.name}),
|
|
@@ -6,4 +6,4 @@ return p(t,{open:!0,onClose:()=>w(!1),title:b,size:"sm",compact:!0,bodyScroll:!1
|
|
|
6
6
|
/* @__PURE__ */p("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:g[o]}),
|
|
7
7
|
/* @__PURE__ */h("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
|
|
8
8
|
/* @__PURE__ */h("p",{className:"text-2xs text-gray-500",children:[j,
|
|
9
|
-
/* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),
|
|
9
|
+
/* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),Y]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-gray-400",children:g.shellVersion(s)})]})]})})}export{w as AboutApp,f as BUILTIN_APP_INFO};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{TimelineCard as e}from"./chunk-SURSVJA2.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-
|
|
2
|
-
return h("div",L?{className:"shrink-0","data-timeline-variant":"rail",children:
|
|
1
|
+
import{TimelineCard as e}from"./chunk-SURSVJA2.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-ZY62UQI2.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-YDEIXM2A.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-VKMEQKYT.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=[],x=[],C=o().timeline,D=r();for(const e of p){const n=i(e.date??null);null===n?x.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const K=i(g??null);let w,H,N=!0;0===j.length?(H=K??M??0,w=H-30*a,N=null!==K||null!==M):(w=j[0].ms,H=K??j[j.length-1].ms,H-w<a&&(H=w+a));const O=j.length>0?Math.max(0,Math.round((H-w)/a)):0,Y=u??(O>0?C.duration(O):void 0),A=[j.length>0?C.started(t(j[0].ms,D)):void 0,Y,x.length>0?C.reached(j.length,p.length):void 0],E=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}),I={};for(const e of j)e.phase&&(I[e.phase]=I[e.phase]||[]).push(e.ms);const J=Object.entries(I).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),L="rail"===v,Q=N&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:L?"spread":"compressed",labels:L?"none":"lanes",items:E,pending:x,phases:J,startMs:w,endMs:H,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:C.milestones(m)})});/* @__PURE__ */
|
|
2
|
+
return h("div",L?{className:"shrink-0","data-timeline-variant":"rail",children:Q}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:A,children:Q})})}export{m as MilestoneTimeline};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{useSettingAuto as e,useInSettingRow as t}from"./chunk-E4Z5OXBI.js";import{IconButton_default as r}from"./chunk-4CANQ3B3.js";import{inputClasses as n}from"./chunk-JFSYWEHD.js";import{Icon as i}from"./chunk-KIBL6M3T.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-
|
|
2
|
-
return f("div",{className:"relative","data-number-box":"",children:[
|
|
1
|
+
import{useSettingAuto as e,useInSettingRow as t}from"./chunk-E4Z5OXBI.js";import{IconButton_default as r}from"./chunk-4CANQ3B3.js";import{inputClasses as n}from"./chunk-JFSYWEHD.js";import{Icon as i}from"./chunk-KIBL6M3T.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-VKMEQKYT.js";import{forwardRef as l,useId as c,useState as u,useRef as s,useCallback as d,useEffect as p}from"react";import{jsx as m,jsxs as f,Fragment as b}from"react/jsx-runtime";function v(e){const t=String(e),r=/e-(\d+)$/.exec(t);return r?Number(r[1]):t.split(".")[1]?.length??0}var h=(e,t)=>null==e?"":null!=t?e.toFixed(t):String(e);function y({dir:e,compact:t,label:n,disabled:o,onStep:a}){const l=s(a);l.current=a;const c=s({}),u=d(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);p(()=>u,[u]),p(()=>{o&&u()},[o,u]);const f=/* @__PURE__ */m(i,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:t?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:t?2.6:2}),b={tabIndex:-1,"aria-label":n,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),u();const t=e.shiftKey;l.current(t);const r=e.currentTarget.ownerDocument.defaultView??window;r.addEventListener("pointerup",u),c.current={off:()=>r.removeEventListener("pointerup",u),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(t),60)},400)}},onPointerLeave:u,onPointerCancel:u,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return t?/* @__PURE__ */m("button",{type:"button",...b,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */m(r,{size:"sm",...b,children:f})}var g=l(function({value:r,onChange:i,min:l,max:g,precision:x,step:w,shiftStep:k,disabled:E,readOnly:N,invalid:j,placeholder:D,size:B,prefix:K,suffix:F,id:S,name:C,className:M="",onBlur:T,onFocus:W,steppers:L,stepFrom:O,snap:U=!1,allowEmpty:I=!0,appearance:P="box",display:$,reportWhileTyping:V=!0,onRevert:z,"aria-label":A,"aria-labelledby":Q,"aria-describedby":Y,auto:X,...H},J){const R="bare"===P,Z=e(),q=X??Z,G=c(),_="string"==typeof F&&""!==F.trim()?F.trim():void 0,ee=e=>function(e,t){let r=e.trim();if(t&&r.endsWith(t)&&(r=r.slice(0,-t.length).trim()),r=r.replace(",","."),""===r||"-"===r||"."===r||"-."===r)return null;const n=Number(r);return Number.isFinite(n)?n:null}(e,_),te=Object.fromEntries(Object.entries(H).filter(([e])=>e.startsWith("data-"))),re=a(),[ne,ie]=u(()=>h(r,x)),oe=s(ne);oe.current=ne;const ae=s(null),le=d(e=>{ae.current=e,"function"==typeof J?J(e):J&&(J.current=e)},[J]),ce=s(r),ue=s(r);ue.current=r;const se=Boolean(E||N),de=t(),pe=L??(!!de&&"compact"),me="compact"===pe;p(()=>{ee(oe.current)!==r&&ie(h(r,x))},[r,x]);const fe=e=>{if(se)return;let t=(ee(oe.current)??O??(D?ee(D):null)??0)+e;null!=l&&t<l&&(t=l),null!=g&&t>g&&(t=g);const r=x??String(w??1).split(".")[1]?.length??0;t=Number(t.toFixed(r));const n=h(t,x);oe.current=n,ie(n),i(t),we()},be=s(fe);be.current=fe;const ve=s({unit:w??1,big:k??10*(w??1),locked:se});ve.current={unit:w??1,big:k??10*(w??1),locked:se},p(()=>{const e=ae.current;if(!e)return;const t=t=>{const{unit:r,big:n,locked:i}=ve.current;if(i||e.ownerDocument.activeElement!==e)return;const o=t.deltaY||t.deltaX;o&&(t.preventDefault(),be.current((o<0?1:-1)*(t.shiftKey?n:r)))};return e.addEventListener("wheel",t,{passive:!1}),()=>e.removeEventListener("wheel",t)},[]);const[he,ye]=u(!1),[ge,xe]=u(0),we=()=>{R&&xe(e=>e+1)};p(()=>{R&&he&&document.activeElement===ae.current&&ae.current?.select()},[R,he,ge]);const ke=s(!1);p(()=>{if(he&&!se)return o(e=>{if("Escape"!==e.key||document.activeElement!==ae.current)return!1;const t=ce.current;if(ee(oe.current)===t)return!1;const r=h(t,x);return oe.current=r,ie(r),ue.current!==t&&(z??i)(t),we(),!0})},[he,se,x,i,z]);const Ee=()=>{const e=ee(oe.current);if(null==e){if(!I){const e=h(ue.current,x);return oe.current=e,ie(e),ue.current}return oe.current="",ie(""),null!==ue.current&&i(null),null}let t=e;const r=x??(U?Math.max(v(w??1),v(l??0)):void 0);U&&(t=function(e,t,r){const n=(e-r)/t;return r+Math.round(n+1e-9*Math.sign(e))*t}(t,w??1,l??0)),null!=l&&t<l&&(t=l),null!=g&&t>g&&(t=g),null!=r&&(t=Number(t.toFixed(r)));const n=h(t,x);return oe.current=n,ie(n),t===e&&t===ue.current||i(t),t},Ne=/* @__PURE__ */m("input",{ref:le,id:S,"data-number-input":"",name:C,type:"text",inputMode:0===x?"numeric":"decimal",value:!he&&$?$(r):ne,disabled:E,readOnly:N,placeholder:D,step:w,role:"spinbutton","aria-valuenow":r??void 0,"aria-valuemin":l,"aria-valuemax":g,"aria-valuetext":null==r?D||void 0:`${h(r,x)}${R&&_?_:""}`,"aria-describedby":[Y,q?G:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":R?"bare":void 0,...te,autoComplete:R?"off":void 0,spellCheck:!R&&void 0,"aria-invalid":j||void 0,"aria-label":A,"aria-labelledby":Q,onChange:e=>(e=>{if(N)return;const t=_&&e.trimEnd().endsWith(_)?e.trimEnd().slice(0,-_.length).trimEnd():e;if(""!==t&&!/^-?\d*[.,]?\d*$/.test(t))return;if(ie(e),!V)return;const r=ee(e);(null!==r||I)&&i(r)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!se)return ce.current=Ee(),void we();const t=w??1,r=k??10*t,n="ArrowUp"===e.key?e.shiftKey?r:t:"ArrowDown"===e.key?-(e.shiftKey?r:t):"PageUp"===e.key?10*t:"PageDown"===e.key?10*-t:null;null===n||se||(e.preventDefault(),fe(n))},onFocus:()=>{ce.current=ue.current,ye(!0),ke.current=!0,W?.()},onMouseUp:R?e=>{ke.current&&(ke.current=!1,e.preventDefault())}:void 0,onBlur:()=>{ye(!1),ke.current=!1,Ee(),T?.()},className:R?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",he?"bg-white":"bg-transparent",se?"cursor-default":"cursor-text",M].filter(Boolean).join(" "):n({invalid:j,size:B,readOnly:N,auto:q,className:[K?"pl-6":"",me?F?"pr-10":"pr-6":pe?F?"pr-24":"pr-16":F?"pr-10":"","text-left tabular-nums",M].filter(Boolean).join(" ")})}),je=q?/* @__PURE__ */m("span",{id:G,hidden:!0,children:re.settingView.auto}):null;if(R||!K&&!F&&!pe)return je?/* @__PURE__ */f(b,{children:[Ne,je]}):Ne;const De=ee(ne);/* @__PURE__ */
|
|
2
|
+
return f("div",{className:"relative","data-number-box":"",children:[K&&/* @__PURE__ */m("span",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-sm text-gray-500",children:K}),Ne,je,F&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${me?"right-6":pe?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-gray-500`,children:F}),pe&&(()=>{const e=/* @__PURE__ */m(y,{dir:-1,compact:me,label:re.number.decrease,disabled:se||null!=l&&null!=De&&De<=l,onStep:e=>be.current(-(e?k??10*(w??1):w??1))}),t=/* @__PURE__ */m(y,{dir:1,compact:me,label:re.number.increase,disabled:se||null!=g&&null!=De&&De>=g,onStep:e=>be.current(e?k??10*(w??1):w??1)});/* @__PURE__ */
|
|
3
3
|
return f("span",me?{"data-steppers":"compact",className:"absolute inset-y-px right-px flex w-4 flex-col overflow-hidden rounded-r-(--radius-control)",children:[t,e]}:{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-0.5",children:[e,t]})})()]})});export{g as InputNumber_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[S("left",b.sides.left,h.left,T("left"),String(u.sides.left),e=>k("left",e)),S("top",b.sides.top,h.top,T("top"),String(u.sides.top),e=>k("top",e)),S("right",b.sides.right,h.right,T("right"),String(u.sides.right),e=>k("right",e)),S("bottom",b.sides.bottom,h.bottom,T("bottom"),String(u.sides.bottom),e=>k("bottom",e))]}):S("all",b.width,h.all,
|
|
1
|
+
import{Segmented as e}from"./chunk-N6DTTOB6.js";import{ColorPicker as t}from"./chunk-5EK4DFB5.js";import{InputNumber_default as l}from"./chunk-MIZO6SQ3.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{jsxs as a,Fragment as o,jsx as s}from"react/jsx-runtime";var i=["solid","dashed","dotted"],n=["top","right","bottom","left"];function d(e){const t=e??{},l="number"==typeof t.width?t.width:0;return Object.fromEntries(n.map(e=>[e,"number"==typeof t[e]?t[e]:l]))}function m(e,t){const l=e??{},r=d(t),a=n.some(e=>"number"==typeof l[e]),o=n.map(e=>"number"==typeof l[e]?l[e]:"number"==typeof l.width?l.width:a?0:r[e]);return!o.every(e=>e===o[0])}var c="h-3.5 w-3.5",h={all:/* @__PURE__ */s(r,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */s(r,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */s(r,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */s(r,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */s(r,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */s(r,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */s(r,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */s(r,{name:"line-dotted","aria-hidden":"true",className:c})};function u({label:r,value:d,onChange:m,each:c,placeholder:u,presets:f,words:b,widths:w=!0,styles:y=!0,min:g=0,max:v=20,step:N=1,readOnly:x}){const j=e=>"number"==typeof d[e]?d[e]:null,k=(e,t)=>{const l={...d};if("number"==typeof d.width)for(const e of n)null===j(e)&&(l[e]=d.width);l[e]=t,delete l.width,m(l)},S=(e,t,r,a,o,i)=>/* @__PURE__ */s("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */s(l,{value:a,onChange:i,min:g,max:v,step:N,precision:0,steppers:"compact",readOnly:x,placeholder:o,prefix:r,suffix:b.unit,"aria-label":t})}),O=n.map(j),C="number"==typeof d.width?d.width:O.every(e=>null!==e&&e===O[0])?O[0]:null,B=null===C&&O.some(e=>null!==e),I=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",T=e=>j(e)??("number"==typeof d.width?d.width:null),z=d.style??u.style;/* @__PURE__ */
|
|
2
|
+
return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[S("left",b.sides.left,h.left,T("left"),String(u.sides.left),e=>k("left",e)),S("top",b.sides.top,h.top,T("top"),String(u.sides.top),e=>k("top",e)),S("right",b.sides.right,h.right,T("right"),String(u.sides.right),e=>k("right",e)),S("bottom",b.sides.bottom,h.bottom,T("bottom"),String(u.sides.bottom),e=>k("bottom",e))]}):S("all",b.width,h.all,C,B?"–":I,e=>{const t={...d,width:e};for(const e of n)delete t[e];m(t)}):null,y&&/* @__PURE__ */s("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */s(e,{block:!0,size:"sm",label:b.style,value:z,onChange:e=>{x||m({...d,style:e})},options:i.map(e=>({value:e,label:/* @__PURE__ */a(o,{children:[p[e],
|
|
3
3
|
/* @__PURE__ */s("span",{className:"sr-only",children:b.styles[e]})]}),title:b.styles[e]}))})}),
|
|
4
|
-
/* @__PURE__ */s("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */s(
|
|
4
|
+
/* @__PURE__ */s("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */s(t,{value:d.color??"",onChange:e=>{x||m({...d,color:e})},label:b.color,presets:f,fallback:u.color,showHexInput:!0,size:"sm",disabled:x})})]})}export{i as BORDER_LINE_STYLES,u as BorderInput,d as borderSides,m as borderStartEach};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-P5BOTIJU.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-
|
|
2
|
-
return g("div",{className:`relative ${
|
|
3
|
-
/* @__PURE__ */g("svg",{width:"100%",height:
|
|
4
|
-
/* @__PURE__ */p("title",{id:z,children:C.breakdown(E(
|
|
5
|
-
return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:
|
|
1
|
+
import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-P5BOTIJU.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-VKMEQKYT.js";import{formatPercent as m,formatPlain as u}from"./chunk-C3QOHMR6.js";import{useId as d,useState as f,useRef as y}from"react";import{jsx as p,jsxs as g}from"react/jsx-runtime";function x({segments:x,variant:v="pie",size:k=280,innerRadius:M,padAngle:b=.012,maxSegments:N=6,otherLabel:I,formatValue:$,centerLabel:j,animate:P=!0,labels:w="none",labelMinShare:F=.04,className:S,emptyLabel:A}){const C=h().charts,T=c(),E=$??(e=>u(e,T)),R=I??C.other,W=A??C.nothingToBreakDown,z=d(),[U,V]=f(null),{highlighted:Y}=a(),_=y(null),B=o(_,Number.POSITIVE_INFINITY),L=x.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===L.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${S??""}`,children:W});const O=[...L].sort((e,t)=>t.value-e.value),Q=O.slice(0,N),H=O.slice(N),J=H.length>0?[...Q,{key:"__other__",label:R,value:H.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:Q,K=e=>i(e.slot,e.color,e.tone),Z=J.reduce((e,t)=>e+t.value,0),q=Math.ceil(.62*Math.max(...J.map(e=>String(e.label).length),4)*11)+24,D="outside"===w&&B>=120+2*q,X=D?q:0,G=D?Math.max(120,Math.min(k,B-2*X)):k,ee=G+2*X,te=X+G/2,le=G/2,ae=G/2-12,re=M??("ring"===v?.58*ae:0),ne=n(J.length,b),oe=Math.max(...J.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!D)return[];let e=-Math.PI/2;const t=J.map((t,l)=>{const a="rose"===v?n(J.length,b).step:t.value/Z*Math.PI*2,r="rose"===v?n(J.length,b).center(l):e+a/2;e+=a;const o="rose"===v?se(t.value):ae;return{key:t.key,label:t.label,share:t.value/Z,right:Math.cos(r)>=0,anchor:[te+o*Math.cos(r),le+o*Math.sin(r)],y:le+(o+14)*Math.sin(r),index:l}}).filter(e=>e.share>=F),l=Math.max(1,Math.floor((G-11-13)/26)+1),a=/* @__PURE__ */new Set;for(const e of[!0,!1]){const r=t.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,l).sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e+=1)r[e].y-r[e-1].y<26&&(r[e].y=r[e-1].y+26);for(let e=r.length-1;e>=0;e-=1){const t=e===r.length-1?G-13:r[e+1].y-26;r[e].y=Math.min(r[e].y,t)}r.forEach((e,t)=>{e.y=Math.max(e.y,0===t?11:r[t-1].y+26),a.add(e.key)})}return t.filter(e=>a.has(e.key))})(),ce=(e,t)=>null!==U?U!==e:null!==Y&&Y!==t,me=null!==U?J[U]:void 0;/* @__PURE__ */
|
|
2
|
+
return g("div",{className:`relative ${S??""}`,ref:_,children:[
|
|
3
|
+
/* @__PURE__ */g("svg",{width:"100%",height:G,viewBox:`0 0 ${ee} ${G}`,role:"img","aria-labelledby":z,onMouseLeave:()=>V(null),children:[
|
|
4
|
+
/* @__PURE__ */p("title",{id:z,children:C.breakdown(E(Z),J.length)}),J.map((a,r)=>{const n=K(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/Z*Math.PI*2-b;"rose"!==v&&(ie+=a.value/Z*Math.PI*2);const h=o+Math.max(.001,i),c="rose"===v?se(a.value):ae;/* @__PURE__ */
|
|
5
|
+
return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:P?t.sweep:void 0,style:P?l(r,55):void 0,onMouseEnter:()=>V(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
|
|
6
6
|
return g("g",{children:[
|
|
7
7
|
/* @__PURE__ */p("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${l},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:s.grid,strokeWidth:1}),
|
|
8
8
|
/* @__PURE__ */p("text",{x:t,y:e.y-2,fontSize:11,fill:s.label,textAnchor:e.right?"end":"start",children:e.label}),
|
|
9
|
-
/* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,T)})]},`lbl-${e.key}`)}),j&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:j})]}),me&&null!==U&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:me.label,rows:[{key:"value",label:C.value,color:
|
|
10
|
-
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:
|
|
11
|
-
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:
|
|
9
|
+
/* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,T)})]},`lbl-${e.key}`)}),j&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:j})]}),me&&null!==U&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:me.label,rows:[{key:"value",label:C.value,color:K(me),value:E(me.value)},{key:"share",label:C.share,color:s.muted,value:m(me.value/Z*100,1,T)}]})}),
|
|
10
|
+
/* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:J.map((e,t)=>/* @__PURE__ */g("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
11
|
+
/* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:K(e)}}),
|
|
12
12
|
/* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
|
|
13
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/
|
|
13
|
+
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/Z*100,1,T)})]},e.key))})]})}export{x as PieChart};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-CDRXZBVR.js";import{bumpPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as n}from"./chunk-CNYAHYE6.js";import{ChartTooltip as o}from"./chunk-P5BOTIJU.js";import{usePlotWidth as l}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-
|
|
2
|
-
return d("div",{className:M,ref:C,children:/* @__PURE__ */d("p",{className:"py-8 text-center text-sm text-gray-500",children:N})});const T=[...new Set(f.map(e=>e.depth))].sort((e,t)=>e-t),U=e=>T.length<=1?0:T.indexOf(e)/(T.length-1)*(F-g-140)+70,
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-CDRXZBVR.js";import{bumpPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as n}from"./chunk-CNYAHYE6.js";import{ChartTooltip as o}from"./chunk-P5BOTIJU.js";import{usePlotWidth as l}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-VKMEQKYT.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as m}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function f({nodes:f,links:k,height:p=320,width:x,nodeWidth:g=14,nodePadding:y=12,formatValue:v,className:M,emptyLabel:w}){const b=i().charts,j=s(),$=v??(e=>h(e,j)),N=w??b.noFlows,C=c(null),E=l(C),F=x??E,[A,O]=m(null),{highlighted:R}=n();if(0===f.length||0===k.length)/* @__PURE__ */
|
|
2
|
+
return d("div",{className:M,ref:C,children:/* @__PURE__ */d("p",{className:"py-8 text-center text-sm text-gray-500",children:N})});const T=[...new Set(f.map(e=>e.depth))].sort((e,t)=>e-t),U=e=>T.length<=1?0:T.indexOf(e)/(T.length-1)*(F-g-140)+70,V=new Map(f.map(e=>{const t=k.filter(t=>t.from===e.key).reduce((e,t)=>e+t.value,0),n=k.filter(t=>t.to===e.key).reduce((e,t)=>e+t.value,0);return[e.key,Math.max(t,n,e.value??0)]})),z=/* @__PURE__ */new Map;for(const e of f)z.set(e.depth,[...z.get(e.depth)??[],e]);const B=Math.max(...[...z.values()].map(e=>e.reduce((e,t)=>e+(V.get(t.key)??0),0))),P=p-20,Q=B>0?(P-y*(Math.max(...[...z.values()].map(e=>e.length))-1))/B:0,Y=/* @__PURE__ */new Map;for(const[e,t]of z){const n=t.map(e=>Math.max(2,(V.get(e.key)??0)*Q)),o=n.reduce((e,t)=>e+t,0)+y*(t.length-1),l=n.reduce((e,t)=>e+Math.max(0,t-2),0),r=o>P&&l>0?Math.max(0,1-(o-P)/l):1;let a=10;t.forEach((t,o)=>{const l=2+Math.max(0,n[o]-2)*r;Y.set(t.key,{x:U(e),y:a,h:l,index:o}),a+=l+y})}const Z=/* @__PURE__ */new Map,H=/* @__PURE__ */new Map,K=/* @__PURE__ */new Map,L=(e,t)=>e.from===t||e.to===t,S="link"===A?.kind?k[A.index]:void 0,W="node"===A?.kind?f.find(e=>e.key===A.key):void 0;/* @__PURE__ */
|
|
3
3
|
return u("div",{className:`relative ${M??""}`,ref:C,children:[
|
|
4
|
-
/* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${F} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>O(null),children:[k.map((e,n)=>{const o=
|
|
5
|
-
return d("path",{d:t([[h,i],[c,s]]),fill:"none",stroke:m,strokeWidth:a,strokeOpacity:null===k||k?.42:.12,onMouseEnter:()=>O({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=
|
|
4
|
+
/* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${F} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>O(null),children:[k.map((e,n)=>{const o=Y.get(e.from),l=Y.get(e.to);if(!o||!l)return null;const a=Math.max(1,e.value*Q),i=o.y+(Z.get(e.from)??0)+a/2,s=l.y+(H.get(e.to)??0)+a/2;Z.set(e.from,(Z.get(e.from)??0)+a),H.set(e.to,(H.get(e.to)??0)+a);const h=o.x+g,c=l.x,m=r(o.index,e.color),u=`${e.from}→${e.to}`,f=K.get(u)??0;K.set(u,f+1);const k=((e,t)=>A?"link"===A.kind?A.index===t:L(e,A.key):null!==R?L(e,R):null)(e,n);/* @__PURE__ */
|
|
5
|
+
return d("path",{d:t([[h,i],[c,s]]),fill:"none",stroke:m,strokeWidth:a,strokeOpacity:null===k||k?.42:.12,onMouseEnter:()=>O({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=Y.get(e.key);if(!t)return null;const n=t.x>F/2,o=(l=e.key,A?"node"===A.kind?A.key===l:L(k[A.index],l):null!==R?R===l:null);var l;/* @__PURE__ */
|
|
6
6
|
return u("g",{opacity:null===o||o?1:.45,onMouseEnter:()=>O({kind:"node",key:e.key}),children:[
|
|
7
7
|
/* @__PURE__ */d("rect",{x:t.x,y:t.y,width:g,height:t.h,rx:2,fill:r(t.index,e.color,e.tone)}),
|
|
8
|
-
/* @__PURE__ */d("text",{x:n?t.x-8:t.x+g+8,y:t.y+t.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:a.label,children:e.label})]},e.key)})]}),
|
|
8
|
+
/* @__PURE__ */d("text",{x:n?t.x-8:t.x+g+8,y:t.y+t.h/2+4,textAnchor:n?"end":"start",fontSize:11,fill:a.label,children:e.label})]},e.key)})]}),S&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:`${S.from} → ${S.to}`,rows:[{key:"value",label:b.flow,color:r(Y.get(S.from)?.index??0,S.color),value:$(S.value)}]})}),W&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:W.label,rows:[{key:"value",label:b.throughput,color:r(Y.get(W.key)?.index??0,W.color,W.tone),value:$(V.get(W.key)??0)}]})}),
|
|
9
9
|
/* @__PURE__ */d(e,{caption:b.sankey(f.length,k.length),head:[b.tableFrom,b.tableTo,b.value],rows:k.map(e=>[e.from,e.to,$(e.value)])})]})}export{f as SankeyChart};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{ChartTooltip as e}from"./chunk-P5BOTIJU.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as l}from"./chunk-TWVUQUUD.js";import{resolveSeriesColor as r,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-VKMEQKYT.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:N=2}){const j=i().charts,U=a(),z=$??(e=>o(e,U)),C=b??j.intensity,D=w??j.noActivity,F=h(null),R=t(F),S=g??R,T=c(),[V,B]=s(null);if(m(()=>{if(null!==V)return l(e=>"Escape"===e.key&&(B(null),!0))},[V]),0===x.length||0===d.length)/* @__PURE__ */
|
|
2
|
+
return f("div",{className:k,ref:F,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:D})});const E=y??r(0),K=v??Math.max(1,...p.flat().filter(Number.isFinite)),L=96,Q=26*x.length,G=M??Q+26+26,I=Math.max(2,(Math.max(97,S)-L)/d.length),O=e=>{const t=K>0?Math.max(0,Math.min(1,e/K)):0;return`color-mix(in oklab, ${E} ${(8+92*t).toFixed(1)}%, ${n.surface})`};/* @__PURE__ */
|
|
3
|
+
return u("div",{className:`relative ${k??""}`,ref:F,children:[
|
|
4
|
+
/* @__PURE__ */u("svg",{width:"100%",height:G,viewBox:`0 0 ${S} ${G}`,role:"img","aria-label":j.heatmap(C,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>B(null),onBlur:()=>B(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(),B(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:T,x1:"0",x2:"1",children:[
|
|
6
|
+
/* @__PURE__ */f("stop",{offset:"0",stopColor:O(0)}),
|
|
7
|
+
/* @__PURE__ */f("stop",{offset:"1",stopColor:O(K)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:n.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=V&&(V.r!==t||V.c!==r);/* @__PURE__ */
|
|
8
|
+
return f("rect",{x:L+r*I+A/2,y:26*t+A/2,width:Math.max(1,I-A),height:26-A,rx:N,fill:O(n),opacity:i?.55:1,onMouseEnter:()=>B({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${z(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((S-L)/56))))===0?/* @__PURE__ */f("text",{x:L+t*I+I/2,y:Q+15,textAnchor:"middle",fontSize:11,fill:n.label,children:e},`c${t}`):null),
|
|
9
|
+
/* @__PURE__ */f("rect",{x:L,y:Q+26,width:Math.min(180,Math.max(40,S-L)),height:8,rx:4,fill:`url(#${T})`}),
|
|
10
|
+
/* @__PURE__ */f("text",{x:L,y:Q+48,fontSize:11,fill:n.label,children:"0"}),
|
|
11
|
+
/* @__PURE__ */f("text",{x:L+Math.min(180,Math.max(40,S-L)),y:Q+48,textAnchor:"end",fontSize:11,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:z(K)})]}),V&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(e,{title:`${x[V.r]} · ${d[V.c]}`,rows:[{key:"v",label:C,color:E,value:null==p[V.r]?.[V.c]?void 0:z(p[V.r][V.c])}]})})]})}export{x as HeatmapChart};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as e}from"./chunk-VKMEQKYT.js";import{jsxs as t,jsx as a,Fragment as l}from"react/jsx-runtime";var n=e=>"number"==typeof e?e:parseInt(String(e??""))||0;function s({items:s,getVolume:r,getInstructionVolume:i,getActualVolume:c,qtyField:m="instruction",showNewIndicator:d=!1,getInstructionQty:u=e=>e.quantity,getActualQty:g=e=>e.actual_qty,isFilled:h,isNew:o=e=>Boolean(e._isNew),className:x,style:f}){const p=e().containers,y=h?s.filter(h):s,N=e=>n(u(e)),b=e=>n(g(e)),w=y.some(e=>null!=g(e)&&b(e)>0),v=e=>w?N(e):"actual"===m?g(e)??u(e)??0:u(e)??0,M=y.reduce((e,t)=>e+n(v(t)),0),$=y.filter(e=>o(e)).length,V=y.filter(e=>o(e)).reduce((e,t)=>e+n(v(t)),0),j=y.reduce((e,t)=>e+N(t),0),k=y.reduce((e,t)=>e+b(t),0),I=e=>r?.(e)??0,q=i??(e=>I(e)*N(e)),A=c??(e=>I(e)*b(e)),Q=y.reduce((e,t)=>e+q(t),0),F=y.reduce((e,t)=>e+A(t),0),K=w?Math.max(Q,F):"actual"===m&&F||Q,_=K<=34.65?"20ft":"40ft",B="20ft"===_?33:67,E=K>0?Math.max(1,Math.ceil(K/B)):0,S=E*B,T=K>0&&K>=.95*S&&K<=1.1*S;if(0===y.length)return null;const Y=(e,t)=>B>0?Math.max(0,Math.min((e-t*B)/B*100,100)):0;/* @__PURE__ */
|
|
2
2
|
return t("div",{className:`mt-2 px-1 space-y-2 ${x??""}`.trim(),style:f,children:[
|
|
3
3
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[
|
|
4
|
-
/* @__PURE__ */t("span",{children:[`${p.items(y.length)} · ${p.pieces(M)}`,w&&k
|
|
5
|
-
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,
|
|
4
|
+
/* @__PURE__ */t("span",{children:[`${p.items(y.length)} · ${p.pieces(M)}`,w&&j!==k&&/* @__PURE__ */a("span",{className:"ml-1 text-gray-400",children:p.split(j,k)})]}),d&&$>0&&/* @__PURE__ */t("span",{className:"flex items-center gap-1 text-green-600",children:[
|
|
5
|
+
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,V)]})]}),K>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:E}).map((e,l)=>{const n=Y(Q,l),s=Y(F,l),r=w,i=Math.max(n,s),c=Math.min(n,s),m=n>=s,d=r?m?"bg-blue-500":"bg-green-500":"bg-blue-500",u=r?m?"bg-green-500":"bg-blue-500":"";/* @__PURE__ */
|
|
6
6
|
return t("div",{className:"flex items-center gap-2",children:[
|
|
7
7
|
/* @__PURE__ */a("span",{className:"text-2xs text-gray-400 w-8 shrink-0",children:_}),
|
|
8
8
|
/* @__PURE__ */t("div",{className:"relative flex-1 h-4 bg-gray-100 rounded-full overflow-hidden border border-gray-200",children:[
|
|
9
9
|
/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${d} transition-all`,style:{width:`${i}%`}}),r&&c>0&&/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${u} transition-all`,style:{width:`${c}%`}})]}),
|
|
10
|
-
/* @__PURE__ */a("span",{className:"text-2xs text-gray-500 w-16 text-right",children:r?p.fill(Math.min(
|
|
10
|
+
/* @__PURE__ */a("span",{className:"text-2xs text-gray-500 w-16 text-right",children:r?p.fill(Math.min(F-l*B,B),B):p.fill(Math.min(Q-l*B,B),B)})]},`bar-${l}`)}),
|
|
11
11
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs pt-0.5",children:[
|
|
12
12
|
/* @__PURE__ */t("span",{className:"text-gray-500 inline-flex items-center gap-1",children:[p.total,w?/* @__PURE__ */t(l,{children:[
|
|
13
13
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-blue-700",children:[
|
|
14
|
-
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(
|
|
14
|
+
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(Q)]}),
|
|
15
15
|
/* @__PURE__ */a("span",{className:"text-gray-400",children:"/"}),
|
|
16
16
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-green-700",children:[
|
|
17
|
-
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(
|
|
18
|
-
/* @__PURE__ */t("span",{className:"font-medium "+(
|
|
17
|
+
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(F)]})]}):/* @__PURE__ */a("b",{className:"text-gray-700",children:p.volume(K)})]}),
|
|
18
|
+
/* @__PURE__ */t("span",{className:"font-medium "+(T?"text-green-600":"text-gray-500"),children:[T&&"✓ ",E," × ",_]})]})]}):/* @__PURE__ */a("div",{className:"text-xs text-gray-400",children:p.noVolume})]})}export{s as ContainerFillChart};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{toast_default as e}from"./chunk-
|
|
1
|
+
import{toast_default as e}from"./chunk-QUS3C264.js";import{useShellStrings as t}from"./chunk-VKMEQKYT.js";import{forwardRef as r,useRef as n,useState as o,useMemo as i,useEffect as a,useImperativeHandle as l}from"react";import{jsx as c,jsxs as s,Fragment as d}from"react/jsx-runtime";var h=["#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#8b5cf6","#000000","#ffffff"],u=[{id:"system",name:"fontSystem",css:"-apple-system, system-ui, sans-serif"},{id:"serif",name:"fontSerif",css:'Georgia, "Times New Roman", serif'},{id:"mono",name:"fontMono",css:'ui-monospace, "SF Mono", Menlo, monospace'},{id:"cursive",name:"fontCursive",css:'"Brush Script MT", "Comic Sans MS", cursive'}],p=()=>Math.random().toString(36).slice(2,9),y=r(function({src:r,filename:y,onApply:m,onCancel:g},N){const L=n(null),z=n(null),D=n(null),E=n(null),P=t().annotator,$=n(P);$.current=P;const[I,S]=o("select"),[W,B]=o(h[0]),[R,j]=o(4),[H,T]=o(24),[F,U]=o(u[0].id),[A,K]=o(!0),[O,V]=o(!1),[Z,X]=o(!1),[Y,q]=o(null),[G,Q]=o(null),[_,J]=o(6),[ee,te]=o(12),[re,ne]=o([]),[oe,ie]=o(null),[ae,le]=o(null),[ce,se]=o(null),[de,he]=o(1),[ue,pe]=o(null),[ye,xe]=o(null),[me,ge]=o(null),we=n(null),[fe,be]=o(!1),ve=i(()=>ce?{w:ce.w*de,h:ce.h*de}:null,[ce,de]),ke=ve&&ae?ve.w/ae.w:1,Me=i(()=>re.find(e=>e.id===oe)??null,[re,oe]);a(()=>{"select"===I&&Me&&("color"in Me&&B(Me.color),"stroke"in Me&&j(Me.stroke),"rect"===Me.type&&te(Me.radius),"text"===Me.type&&(T(Me.size),U(Me.font),K(Me.bold),V(Me.italic),X(Me.underline),q(Me.borderColor),Q(Me.background),J(Me.padding)))},[oe]),a(()=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>{E.current=t,le({w:t.naturalWidth,h:t.naturalHeight}),ne([]),ie(null)},t.onerror=()=>e.error($.current.loadFailed),t.src=r},[r]),a(()=>{if(!ae)return;const e=()=>{const e=L.current;if(!e)return;const t=e.getBoundingClientRect(),r=Math.max(0,t.width-32),n=Math.max(0,t.height-32);if(0===r||0===n)return;const o=ae.w/ae.h;let i=ae.w,a=ae.h;i>r&&(i=r,a=i/o),a>n&&(a=n,i=a*o),se({w:i,h:a})};e();const t=new ResizeObserver(e);return L.current&&t.observe(L.current),()=>t.disconnect()},[ae]);const Ne=i(()=>re.filter(e=>"mosaic"===e.type),[re]);a(()=>{const e=E.current,t=z.current;if(!e||!t||!ae)return;t.width=ae.w,t.height=ae.h;const r=t.getContext("2d");r.drawImage(e,0,0);for(const e of Ne)C(r,e)},[ae,Ne,ce]);const Ce=e=>{const t=D.current;if(!t)return{x:0,y:0};const r=t.createSVGPoint();r.x=e.clientX,r.y=e.clientY;const n=t.getScreenCTM();if(!n)return{x:0,y:0};const o=r.matrixTransform(n.inverse());return{x:o.x,y:o.y}},Le=e=>{we.current=e,be(!0)};a(()=>{if(!fe)return;const e=e=>{const t=we.current;if(!t)return;const r=Ce(e);if("draw"===t.kind)pe(b(I,t.start,r,W,R,ee));else if("pen"===t.kind){const e=t.points[t.points.length-1];(Math.abs(r.x-e.x)>1||Math.abs(r.y-e.y)>1)&&(t.points.push(r),pe({id:"",type:"draw",points:t.points.slice(),color:W,stroke:R}))}else if("crop"===t.kind)ge(M(t.start,r));else if("move"===t.kind){const e=r.x-t.start.x,n=r.y-t.start.y;ne(r=>r.map(r=>r.id===t.id?v(t.original,e,n):r))}else"resize"===t.kind&&ne(e=>e.map(e=>e.id===t.id?function(e,t,r){if("arrow"===e.type)return"start"===t?{...e,x1:r.x,y1:r.y}:"end"===t?{...e,x2:r.x,y2:r.y}:e;if("text"===e.type||"draw"===e.type)return e;const n=e.x,o=e.x+e.w,i=e.y,a=e.y+e.h;let l=n,c=i,s=o,d=a;"nw"===t&&(l=r.x,c=r.y);"ne"===t&&(s=r.x,c=r.y);"se"===t&&(s=r.x,d=r.y);"sw"===t&&(l=r.x,d=r.y);const h=M({x:l,y:c},{x:s,y:d});return{...e,x:h.x,y:h.y,w:h.w,h:h.h}}(t.original,t.corner,r):e))},t=()=>{const e=we.current;if(we.current=null,be(!1),"draw"===e?.kind)pe(e=>{if(!e||("arrow"===(t=e).type?Math.abs(t.x2-t.x1)<4&&Math.abs(t.y2-t.y1)<4:"draw"===t.type?t.points.length<2:"w"in t&&"h"in t&&(t.w<4||t.h<4)))return null;var t;const r={...e,id:p()};return ne(e=>[...e,r]),ie(r.id),S("select"),null});else if("pen"===e?.kind){if(e.points.length<2)return void pe(null);const t={id:p(),type:"draw",points:e.points,color:W,stroke:R};ne(e=>[...e,t]),ie(t.id),S("select"),pe(null)}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[fe,I,W,R,ee]);a(()=>{const e=e=>{if(!document.activeElement||!/^(INPUT|TEXTAREA)$/.test(document.activeElement.tagName))return!e.metaKey&&!e.ctrlKey||"z"!==e.key&&"Z"!==e.key||e.shiftKey?void(oe&&("Delete"===e.key||"Backspace"===e.key?(e.preventDefault(),ne(e=>e.filter(e=>e.id!==oe)),ie(null)):"Escape"===e.key&&ie(null))):(e.preventDefault(),ne(e=>e.slice(0,-1)),void ie(null))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[oe]);const ze=e=>{const t=!{bold:A,italic:O,underline:Z}[e];"bold"===e&&K(t),"italic"===e&&V(t),"underline"===e&&X(t),oe&&ne(r=>r.map(r=>r.id===oe&&"text"===r.type?{...r,[e]:t}:r))},De=e=>{q(e),oe&&ne(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,borderColor:e}:t))},Ee=e=>{Q(e),oe&&ne(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,background:e}:t))},Pe=e=>{if(!ye)return;const t=e??ye.value;if(!t.trim())return ye.editingId&&ne(e=>e.filter(e=>e.id!==ye.editingId)),void xe(null);if(ye.editingId)ne(e=>e.map(e=>e.id===ye.editingId&&"text"===e.type?{...e,text:t}:e));else{const e={id:p(),type:"text",x:ye.x,y:ye.y,text:t,color:W,size:H,font:F,bold:A,italic:O,underline:Z,borderColor:Y,background:G,padding:_};ne(t=>[...t,e]),ie(e.id),S("select")}xe(null)},$e=async()=>{const e=z.current,t=D.current;if(!e||!t||!ae)return null;const r=document.createElement("canvas");r.width=ae.w,r.height=ae.h;const n=r.getContext("2d");n.drawImage(e,0,0);const o=t.cloneNode(!0);o.querySelectorAll("[data-chrome]").forEach(e=>e.remove());const i=(new XMLSerializer).serializeToString(o),a=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),l=URL.createObjectURL(a),c=new Image;return await new Promise(e=>{c.onload=()=>e(),c.onerror=()=>e(),c.src=l}),n.drawImage(c,0,0,ae.w,ae.h),URL.revokeObjectURL(l),r};l(N,()=>({save:async()=>{const t=await $e();t&&t.toBlob(t=>{if(!t)return void e.error($.current.exportFailed);const r=URL.createObjectURL(t),n=document.createElement("a");n.href=r;const o=y.replace(/\.[^.]+$/,"");n.download=`${o}-annotated.png`,n.click(),URL.revokeObjectURL(r)},"image/png")},copy:async()=>{if(!("clipboard"in navigator)||"undefined"==typeof ClipboardItem)return void e.error($.current.clipboardUnsupported);const t=await $e();t&&t.toBlob(async t=>{if(t)try{await navigator.clipboard.write([new ClipboardItem({"image/png":t})]),e.success($.current.copied)}catch{e.error($.current.copyRefused)}else e.error($.current.copyFailed)},"image/png")}}),[ae,y]);const Ie=i(()=>[{id:"select",label:P.toolSelect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l7 17 2-7 7-2L5 3z"})})},{id:"draw",label:P.toolDraw,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487z"})})},{id:"rect",label:P.toolRect,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("rect",{x:"4",y:"6",width:"16",height:"12",rx:"3"})})},{id:"circle",label:P.toolEllipse,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("ellipse",{cx:"12",cy:"12",rx:"8",ry:"6"})})},{id:"arrow",label:P.toolArrow,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 19L19 5m0 0h-7m7 0v7"})})},{id:"mosaic",label:P.toolMosaic,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z"})})},{id:"text",label:P.toolText,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M12 6v14M9 20h6"})})},{id:"crop",label:P.toolCrop,icon:/* @__PURE__ */c("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */c("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 2v15a1 1 0 001 1h15M2 6h15a1 1 0 011 1v15"})})}],[P]),Se=e=>"p-2 rounded transition-colors "+(e?"bg-blue-500 text-white":"text-gray-700 hover:bg-gray-200"),We=Me?.type??("select"===I?null:I),Be="rect"===We||"circle"===We||"arrow"===We||"draw"===We,Re="rect"===We,je="text"===We;/* @__PURE__ */
|
|
2
2
|
return s("div",{className:"flex flex-col h-full bg-gray-100",children:[
|
|
3
|
-
/* @__PURE__ */s("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200 bg-white shrink-0 flex-wrap text-xs",children:[
|
|
3
|
+
/* @__PURE__ */s("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200 bg-white shrink-0 flex-wrap text-xs",children:[Ie.map(e=>/* @__PURE__ */c("button",{onClick:()=>{S(e.id),ie(null)},title:e.label,className:Se(I===e.id),children:e.icon},e.id)),
|
|
4
4
|
/* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
|
|
5
5
|
/* @__PURE__ */c("div",{className:"flex items-center gap-1",children:h.map(e=>/* @__PURE__ */c("button",{onClick:()=>(e=>{B(e),oe&&ne(t=>t.map(t=>t.id!==oe||"mosaic"===t.type?t:{...t,color:e}))})(e),title:e,className:"h-5 w-5 rounded-full border "+(W===e?"ring-2 ring-blue-500 ring-offset-1":"border-gray-300"),style:{background:e}},e))}),Be&&/* @__PURE__ */s(d,{children:[
|
|
6
6
|
/* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
|
|
@@ -14,26 +14,26 @@ return s("div",{className:"flex flex-col h-full bg-gray-100",children:[
|
|
|
14
14
|
/* @__PURE__ */c("input",{type:"range",min:0,max:48,step:1,value:ee,onChange:e=>{return t=Number(e.target.value),te(t),void(oe&&ne(e=>e.map(e=>e.id===oe&&"rect"===e.type?{...e,radius:t}:e)));var t},className:"w-16 accent-blue-500"}),
|
|
15
15
|
/* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:ee})]})]}),je&&/* @__PURE__ */s(d,{children:[
|
|
16
16
|
/* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
|
|
17
|
-
/* @__PURE__ */c("select",{value:
|
|
18
|
-
/* @__PURE__ */c("button",{onClick:()=>ze("bold"),className:
|
|
19
|
-
/* @__PURE__ */c("button",{onClick:()=>ze("italic"),className:
|
|
20
|
-
/* @__PURE__ */c("button",{onClick:()=>ze("underline"),className:
|
|
17
|
+
/* @__PURE__ */c("select",{value:F,onChange:e=>{return t=e.target.value,U(t),void(oe&&ne(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,font:t}:e)));var t},className:"text-xs border border-gray-300 rounded px-1 py-0.5 bg-white",children:u.map(e=>/* @__PURE__ */c("option",{value:e.id,children:P[e.name]},e.id))}),
|
|
18
|
+
/* @__PURE__ */c("button",{onClick:()=>ze("bold"),className:Se(A),title:P.bold,children:/* @__PURE__ */c("span",{className:"font-bold",children:P.boldLetter})}),
|
|
19
|
+
/* @__PURE__ */c("button",{onClick:()=>ze("italic"),className:Se(O),title:P.italic,children:/* @__PURE__ */c("span",{className:"italic",children:P.italicLetter})}),
|
|
20
|
+
/* @__PURE__ */c("button",{onClick:()=>ze("underline"),className:Se(Z),title:P.underline,children:/* @__PURE__ */c("span",{className:"underline",children:P.underlineLetter})}),
|
|
21
21
|
/* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
|
|
22
22
|
/* @__PURE__ */c("span",{children:P.size}),
|
|
23
|
-
/* @__PURE__ */c("input",{type:"range",min:10,max:96,step:1,value:
|
|
24
|
-
/* @__PURE__ */c("span",{className:"tabular-nums w-7 text-right",children:
|
|
23
|
+
/* @__PURE__ */c("input",{type:"range",min:10,max:96,step:1,value:H,onChange:e=>{return t=Number(e.target.value),T(t),void(oe&&ne(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,size:t}:e)));var t},className:"w-16 accent-blue-500"}),
|
|
24
|
+
/* @__PURE__ */c("span",{className:"tabular-nums w-7 text-right",children:H})]}),
|
|
25
25
|
/* @__PURE__ */s("label",{className:"flex items-center gap-1 text-gray-600",children:[
|
|
26
|
-
/* @__PURE__ */c("span",{children:P.border}),
|
|
27
|
-
/* @__PURE__ */c("input",{type:"color",value:
|
|
26
|
+
/* @__PURE__ */c("span",{children:P.border}),Y?/* @__PURE__ */s(d,{children:[
|
|
27
|
+
/* @__PURE__ */c("input",{type:"color",value:Y,onChange:e=>De(e.target.value),title:P.borderColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
|
|
28
28
|
/* @__PURE__ */c("button",{onClick:()=>De(null),title:P.removeBorder,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>De(W),title:P.addBorder,className:"px-2 py-0.5 rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:P.add})]}),
|
|
29
29
|
/* @__PURE__ */s("label",{className:"flex items-center gap-1 text-gray-600",children:[
|
|
30
|
-
/* @__PURE__ */c("span",{children:P.fill}),
|
|
31
|
-
/* @__PURE__ */c("input",{type:"color",value:
|
|
30
|
+
/* @__PURE__ */c("span",{children:P.fill}),G?/* @__PURE__ */s(d,{children:[
|
|
31
|
+
/* @__PURE__ */c("input",{type:"color",value:G,onChange:e=>Ee(e.target.value),title:P.fillColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
|
|
32
32
|
/* @__PURE__ */c("button",{onClick:()=>Ee(null),title:P.removeFill,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */c("button",{onClick:()=>Ee("#ffffff"),title:P.addFill,className:"px-2 py-0.5 rounded border border-gray-300 text-gray-600 hover:bg-gray-100",children:P.add})]}),
|
|
33
33
|
/* @__PURE__ */s("label",{className:"flex items-center gap-2 text-gray-600",children:[
|
|
34
34
|
/* @__PURE__ */c("span",{children:P.padding}),
|
|
35
|
-
/* @__PURE__ */c("input",{type:"range",min:0,max:40,step:1,value:
|
|
36
|
-
/* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:
|
|
35
|
+
/* @__PURE__ */c("input",{type:"range",min:0,max:40,step:1,value:_,onChange:e=>{return t=Number(e.target.value),J(t),void(oe&&ne(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,padding:t}:e)));var t},className:"w-14 accent-blue-500"}),
|
|
36
|
+
/* @__PURE__ */c("span",{className:"tabular-nums w-6 text-right",children:_})]})]}),
|
|
37
37
|
/* @__PURE__ */c("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
|
|
38
38
|
/* @__PURE__ */c("button",{onClick:()=>he(e=>Math.max(.25,Math.round(100*(e-.25))/100)),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-700",title:P.zoomOut,children:"−"}),
|
|
39
39
|
/* @__PURE__ */s("span",{className:"text-gray-600 tabular-nums w-10 text-center",children:[Math.round(100*de),"%"]}),
|
|
@@ -47,8 +47,8 @@ return s("div",{className:"flex flex-col h-full bg-gray-100",children:[
|
|
|
47
47
|
/* @__PURE__ */c("button",{onClick:async()=>{const t=await $e();t?t.toBlob(t=>{t?m(t):e.error($.current.exportFailed)},"image/png"):e.error($.current.exportFailed)},className:"px-3 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 text-xs font-medium",children:P.apply})]})]})]}),
|
|
48
48
|
/* @__PURE__ */c("div",{ref:L,className:"flex-1 overflow-auto bg-gray-200 flex items-center justify-center p-4 relative",children:ve&&ae&&/* @__PURE__ */s("div",{className:"relative shadow-lg rounded overflow-hidden bg-white shrink-0",style:{width:ve.w,height:ve.h},children:[
|
|
49
49
|
/* @__PURE__ */c("canvas",{ref:z,style:{position:"absolute",inset:0,width:"100%",height:"100%",display:"block"}}),
|
|
50
|
-
/* @__PURE__ */s("svg",{ref:D,viewBox:`0 0 ${ae.w} ${ae.h}`,preserveAspectRatio:"none",style:{position:"absolute",inset:0,width:"100%",height:"100%",touchAction:"none",cursor:"select"===
|
|
51
|
-
/* @__PURE__ */c("div",{className:"px-3 py-2 border-t border-gray-200 bg-white text-2xs text-gray-500 shrink-0",children:"select"===
|
|
50
|
+
/* @__PURE__ */s("svg",{ref:D,viewBox:`0 0 ${ae.w} ${ae.h}`,preserveAspectRatio:"none",style:{position:"absolute",inset:0,width:"100%",height:"100%",touchAction:"none",cursor:"select"===I?"default":"text"===I?"text":"crosshair"},onPointerDown:e=>{if("select"===I)return void ie(null);if("text"===I){if(ye)return void Pe();const t=Ce(e);return void xe({x:t.x,y:t.y,value:""})}const t=Ce(e);if("crop"!==I){if("draw"===I)return Le({kind:"pen",points:[t]}),void pe({id:"",type:"draw",points:[t],color:W,stroke:R});pe(b(I,t,t,W,R,ee)),Le({kind:"draw",start:t})}else Le({kind:"crop",start:t})},children:[re.map(e=>/* @__PURE__ */c(x,{anno:e,selected:oe===e.id,zoom:de,onPointerDown:t=>((e,t)=>{"select"===I&&(e.stopPropagation(),ie(t.id),Le({kind:"move",id:t.id,start:Ce(e),original:t}))})(t,e),onDoubleClick:()=>{var t;"text"===(t=e).type&&xe({x:t.x,y:t.y,value:t.text,editingId:t.id})},onHandlePointerDown:(t,r)=>((e,t,r)=>{e.stopPropagation(),Le({kind:"resize",id:t.id,corner:r,start:Ce(e),original:t})})(t,e,r)},e.id)),ue&&/* @__PURE__ */c(x,{anno:{...ue,id:"__preview"},preview:!0}),me&&/* @__PURE__ */c(w,{rect:me,imageSize:ae})]}),ye&&/* @__PURE__ */c(f,{pendingText:ye,color:W,size:H,font:u.find(e=>e.id===F)?.css??u[0].css,bold:A,italic:O,underline:Z,borderColor:Y,background:G,padding:_,scale:ke,onChange:e=>xe({...ye,value:e}),onCommit:Pe,onCancel:()=>xe(null)})]})}),
|
|
51
|
+
/* @__PURE__ */c("div",{className:"px-3 py-2 border-t border-gray-200 bg-white text-2xs text-gray-500 shrink-0",children:"select"===I?oe?P.hintSelected:P.hintSelect:"text"===I?P.hintText:"crop"===I?P.hintCrop:"draw"===I?P.hintDraw:P.hintShape})]})});function x({anno:e,selected:t,preview:r,zoom:n=1,onPointerDown:o,onDoubleClick:i,onHandlePointerDown:a}){const l=k(e),h=o?{onPointerDown:o,pointerEvents:"all",style:{cursor:"move"}}:{},p=i?{onDoubleClick:i}:{};let y;if("rect"===e.type)y=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:e.radius,ry:e.radius,fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...h});else if("circle"===e.type)y=/* @__PURE__ */c("ellipse",{cx:e.x+e.w/2,cy:e.y+e.h/2,rx:e.w/2,ry:e.h/2,fill:"none",stroke:e.color,strokeWidth:e.stroke,...h});else if("arrow"===e.type)y=/* @__PURE__ */c(g,{anno:e,interactive:h});else if("draw"===e.type)y=/* @__PURE__ */c("path",{d:N(e.points),fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...h});else if("mosaic"===e.type)y=/* @__PURE__ */c("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:"rgba(0,0,0,0.001)",stroke:t?"#3b82f6":"none",strokeWidth:t?2:0,strokeDasharray:t?"6,4":void 0,...h});else{const t=u.find(t=>t.id===e.font)?.css??u[0].css,r=e.padding??0,n=!!e.borderColor||!!e.background,o=k(e),i=e.borderColor?Math.max(1,Math.round(e.size/12)):0;y=/* @__PURE__ */s("g",{...h,...p,children:[n&&/* @__PURE__ */c("rect",{x:o.x-r,y:o.y-r,width:Math.max(0,o.w)+2*r,height:Math.max(0,o.h)+2*r,rx:Math.min(8,r),ry:Math.min(8,r),fill:e.background??"none",stroke:e.borderColor??"none",strokeWidth:i}),
|
|
52
52
|
/* @__PURE__ */c("text",{x:e.x,y:e.y+e.size,fill:e.color,fontSize:e.size,fontWeight:e.bold?700:400,fontStyle:e.italic?"italic":"normal",textDecoration:e.underline?"underline":void 0,fontFamily:t,style:{userSelect:"none"},children:e.text.split("\n").map((t,r)=>/* @__PURE__ */c("tspan",{x:e.x,dy:0===r?0:1.2*e.size,children:t},r))})]})}/* @__PURE__ */
|
|
53
53
|
return s("g",{children:[y,t&&!r&&/* @__PURE__ */s(d,{children:[
|
|
54
54
|
/* @__PURE__ */c("rect",{"data-chrome":"selection",x:l.x-4,y:l.y-4,width:l.w+8,height:l.h+8,fill:"none",stroke:"#3b82f6",strokeWidth:2/n,strokeDasharray:`${6/n},${4/n}`,pointerEvents:"none"}),a&&/* @__PURE__ */c(m,{anno:e,zoom:n,onHandlePointerDown:a})]})]})}function m({anno:e,zoom:t,onHandlePointerDown:r}){const n=6/t,o=1.5/t,i=e=>({fill:"#fff",stroke:"#3b82f6",strokeWidth:o,pointerEvents:"all",style:{cursor:e},"data-chrome":"handle"});if("arrow"===e.type)/* @__PURE__ */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{tooltipBesideBand as t}from"./chunk-MG7A3R75.js";import{niceAxis as e,niceMax as i,linearScale as r,axisGutter as n,bandScale as l}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{registerModalEscapeInterceptor as a}from"./chunk-TWVUQUUD.js";import{CHART_INK as h}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-VKMEQKYT.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{useRef as d,useState as u,useId as f,useEffect as x}from"react";import{jsx as g,jsxs as p}from"react/jsx-runtime";function y({labels:y,values:v,height:M=220,width:b,bandPadding:k=.24,min:w,max:N,yTickCount:A=4,formatValue:$,yAxisLabel:j,xTickAnchor:R="center",children:E,overlay:U,tooltip:z,onSelect:C,ariaLabel:D,className:L,emptyLabel:P}){const T=s().charts,V=c(),F=$??(t=>m(t,V)),I=P??T.noData,S=d(null),W=o(S),K=b??W,[Q,B]=u(null),Z=f();if(x(()=>{if(null!==Q)return a(t=>"Escape"===t.key&&(B(null),!0))},[Q]),0===y.length||!v.some(Number.isFinite))/* @__PURE__ */
|
|
2
|
+
return g("div",{className:L,ref:S,children:/* @__PURE__ */g("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:M},children:I})});const G=v.filter(Number.isFinite),H=G.every(Number.isInteger),J=void 0===w&&void 0===N?e(Math.min(0,...G),Math.max(0,...G),{intervals:A+1,integer:H}):null,O=void 0!==w&&void 0===N?e(w,Math.max(w,...G),{intervals:A+1,integer:H,zero:!1}):null,X=J?J.lo:w??Math.min(0,...G),Y=J?J.hi:O?O.hi:N??i(Math.max(...G,0)),q=J?J.ticks:O?[X,...O.ticks.filter(t=>t>X)]:r([X,Y],{from:0,to:1}).ticks(A+1),_={top:12,right:16,bottom:26,left:n(q.map(F),48)+(j?10:0)},tt=_.left,et=Math.max(tt+1,K-_.right),it=_.top,rt=M-_.bottom,nt=r([X,Y],{from:rt,to:it}),lt=l(y.length,{from:tt,to:et},k),ot=(et-tt)/Math.max(1,y.length),at=ot>=48,ht=at?1:Math.max(1,Math.ceil(y.length/Math.max(1,Math.floor(K/84)))),st=Math.max(2,Math.floor((ot-6)/6.6)),ct=t=>at&&t.length>st?`${t.slice(0,st-1).trimEnd()}…`:t;/* @__PURE__ */
|
|
3
|
+
return p("div",{className:`relative ${L??""}`,ref:S,children:[
|
|
4
|
+
/* @__PURE__ */p("svg",{width:"100%",height:M,viewBox:`0 0 ${K} ${M}`,role:"img","aria-label":D,tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>B(null),onBlur:()=>B(null),onKeyDown:t=>{if(C&&null!==Q&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void C(Q);if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return;t.preventDefault();const e="ArrowRight"===t.key?1:-1;B(t=>Math.min(y.length-1,Math.max(0,(t??0)+e)))},children:[
|
|
5
|
+
/* @__PURE__ */g("defs",{children:/* @__PURE__ */g("clipPath",{id:Z,children:/* @__PURE__ */g("rect",{x:tt,y:it,width:et-tt,height:rt-it})})}),q.map(t=>/* @__PURE__ */g("line",{x1:tt,y1:nt(t),x2:et,y2:nt(t),stroke:h.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${t}`)),
|
|
6
|
+
/* @__PURE__ */g("line",{x1:tt,y1:nt(Math.max(X,0)),x2:et,y2:nt(Math.max(X,0)),stroke:h.axis,strokeWidth:1,shapeRendering:"crispEdges"}),q.map(t=>/* @__PURE__ */g("text",{x:tt-8,y:nt(t)+4,textAnchor:"end",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:F(t)},`t${t}`)),j&&/* @__PURE__ */g("text",{x:14,y:(it+rt)/2,transform:`rotate(-90 14 ${(it+rt)/2})`,textAnchor:"middle",fontSize:11,fill:h.label,children:j}),
|
|
7
|
+
/* @__PURE__ */g("g",{clipPath:`url(#${Z})`,children:E({x:lt,y:nt,left:tt,right:et,top:it,bottom:rt,width:K,height:M,clipId:Z,active:Q})}),U?.({x:lt,y:nt,left:tt,right:et,top:it,bottom:rt,width:K,height:M,clipId:Z,active:Q}),y.map((t,e)=>e%ht===0?/* @__PURE__ */g("text",{x:"start"===R?lt(e):lt.center(e),y:M-8,textAnchor:"middle",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:ct(t)},`x${e}`):null),y.map((t,e)=>/* @__PURE__ */g("rect",{x:lt.center(e)-(et-tt)/y.length/2,y:it,width:(et-tt)/y.length,height:rt-it,fill:"transparent",onMouseEnter:()=>B(e),onClick:C?()=>C(e):void 0,style:C?{cursor:"pointer"}:void 0},`h${e}`))]}),z&&null!==Q&&
|
|
8
|
+
/* @__PURE__ */g("div",{className:"pointer-events-none absolute top-2 z-10",style:t(lt.center(Q),lt.bandwidth,K),children:z(Q)})]})}export{y as CartesianPlot};
|