efficient-shell 12.0.0 → 12.2.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 +47 -0
- package/dist/{Browser-CXZAXF55.js → Browser-UK645CZ3.js} +17 -17
- package/dist/Calculator-6XGTP5OQ.js +29 -0
- package/dist/{CurrencyConverter-WFC3TAL4.js → CurrencyConverter-XNWE5MQW.js} +11 -11
- package/dist/Files-LVZNO6EQ.js +121 -0
- package/dist/{Notepad-B7CKQ54M.js → Notepad-JP52QKUC.js} +10 -10
- package/dist/PdfViewer-ZI3QOG4G.js +1 -0
- package/dist/{PomodoroTimer-JMJORKWZ.js → PomodoroTimer-SBV43YX6.js} +68 -68
- package/dist/{Preview-OELV5X55.js → Preview-TKEDKVNI.js} +25 -25
- package/dist/Sidebar-XVVZJ7PR.js +44 -0
- package/dist/{Stock-R3436P6X.js → Stock-GODZPUR3.js} +3 -3
- package/dist/{Weather-6N3ZPO2Q.js → Weather-2IIV4CFT.js} +20 -20
- package/dist/{WorldClock-BJKYHGLS.js → WorldClock-JW4MLMCB.js} +7 -7
- package/dist/ai/index.js +57 -57
- package/dist/apps/index.d.ts +132 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/StatTile.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-YIV7CFBG.js → chunk-27XV4TAU.js} +5 -5
- package/dist/{chunk-YXOFUY4J.js → chunk-2DOMIOYR.js} +1 -1
- package/dist/{chunk-JAQO3TNE.js → chunk-2OMM2AG3.js} +1 -1
- package/dist/chunk-2T7MZ77B.js +3 -0
- package/dist/{chunk-3LGPZAVU.js → chunk-2XQOK3CT.js} +2 -2
- package/dist/{chunk-E47TNYYE.js → chunk-2YBJQUYQ.js} +1 -1
- package/dist/{chunk-RPFONHXQ.js → chunk-32WEY6O5.js} +1 -1
- package/dist/{chunk-X3NYVMXJ.js → chunk-3CMCGOOV.js} +4 -4
- package/dist/{chunk-NK5RRBXY.js → chunk-3WFJ4PYV.js} +6 -6
- package/dist/{chunk-MBY5JIGB.js → chunk-43MCNASD.js} +1 -1
- package/dist/{chunk-CRO56LVN.js → chunk-4H5NTMOF.js} +1 -1
- package/dist/{chunk-MOBJVNLF.js → chunk-4KJ7MLWO.js} +10 -10
- package/dist/{chunk-LPJGF6LK.js → chunk-4RTDZSGH.js} +17 -17
- package/dist/{chunk-PLDMQNKD.js → chunk-4UGFNTZ3.js} +8 -8
- package/dist/{chunk-HCKCQIWA.js → chunk-53EW4M5S.js} +5 -5
- package/dist/{chunk-HNUKXGYP.js → chunk-56ESGDIC.js} +1 -1
- package/dist/{chunk-OXVRXWJL.js → chunk-5F6KJAF3.js} +11 -11
- package/dist/{chunk-VI4NLOVJ.js → chunk-5N6AC3LN.js} +11 -11
- package/dist/{chunk-KSHNA6W2.js → chunk-5NDONLH5.js} +3 -3
- package/dist/chunk-5THF6BJS.js +6 -0
- package/dist/{chunk-DD2ZGHCG.js → chunk-5V6SA77P.js} +6 -6
- package/dist/{chunk-JSUL7UON.js → chunk-63QLZYMN.js} +5 -5
- package/dist/{chunk-GEQC4ABV.js → chunk-6XC3XX7F.js} +6 -6
- package/dist/{chunk-BUHTLO2K.js → chunk-7EK7JNR4.js} +1 -1
- package/dist/{chunk-SCPPW3ZC.js → chunk-7F4U43YN.js} +4 -4
- package/dist/{chunk-4MERJIJJ.js → chunk-7FBAZLBX.js} +1 -1
- package/dist/{chunk-WRRMZAKK.js → chunk-7H7U3HC6.js} +1 -1
- package/dist/{chunk-LBGRLG3Y.js → chunk-7KIDOIPY.js} +1 -1
- package/dist/{chunk-MQXZZBR6.js → chunk-7ZYEDXZX.js} +1 -1
- package/dist/chunk-A2ZEGD2S.js +11 -0
- package/dist/{chunk-U24GFE5L.js → chunk-ACNDPAAT.js} +1 -1
- package/dist/{chunk-ZKYBLZPT.js → chunk-AJ5NU7UH.js} +8 -8
- package/dist/chunk-AJO55X66.js +6 -0
- package/dist/{chunk-RBINX62X.js → chunk-ANSQT5ZS.js} +1 -1
- package/dist/{chunk-OAZX7ZGB.js → chunk-AQULCKKZ.js} +11 -11
- package/dist/{chunk-DV4B26FJ.js → chunk-B5OYS65L.js} +1 -1
- package/dist/chunk-BD4OHYQB.js +13 -0
- package/dist/{chunk-6KGIHI6X.js → chunk-BFA5U5JF.js} +11 -11
- package/dist/{chunk-CFJL6MML.js → chunk-BFO72WQB.js} +1 -1
- package/dist/{chunk-4ALGGYHV.js → chunk-BPECY7I7.js} +9 -9
- package/dist/{chunk-CCA4LQNB.js → chunk-BXZNMSTZ.js} +1 -1
- package/dist/{chunk-UDVUVFRS.js → chunk-BXZSLRNO.js} +12 -12
- package/dist/{chunk-YAZENY3X.js → chunk-C4XV42QP.js} +1 -1
- package/dist/chunk-CC42UKIT.js +1 -0
- package/dist/{chunk-W4UYDSTI.js → chunk-CD7P34VC.js} +7 -7
- package/dist/{chunk-OMCM3SIE.js → chunk-CENTHUBD.js} +7 -7
- package/dist/{chunk-IS7C6OWZ.js → chunk-CF4YOJUQ.js} +10 -10
- package/dist/{chunk-46EBZ7YI.js → chunk-CKURTHGW.js} +1 -1
- package/dist/{chunk-TF6DYDNQ.js → chunk-CNVYM3HP.js} +1 -1
- package/dist/chunk-CQCMJHDM.js +9 -0
- package/dist/{chunk-HKPVHSZ3.js → chunk-CRB5GM4W.js} +1 -1
- package/dist/{chunk-PB6XGDLJ.js → chunk-CRU2BNEM.js} +8 -8
- package/dist/{chunk-3YQICVUP.js → chunk-CTW2OKYS.js} +2 -2
- package/dist/chunk-CWTY4GTU.js +5 -0
- package/dist/{chunk-33F35NNM.js → chunk-DKUF7BD5.js} +1 -1
- package/dist/{chunk-EFBWQWUS.js → chunk-DSHEOC2O.js} +1 -1
- package/dist/{chunk-KABXUBIH.js → chunk-DU5IBIZQ.js} +1 -1
- package/dist/{chunk-QTNMALBN.js → chunk-DZBGJ6X4.js} +1 -1
- package/dist/{chunk-YESTUDOK.js → chunk-E227NVFX.js} +1 -1
- package/dist/{chunk-P75R4EYJ.js → chunk-EEVKJJ5S.js} +4 -4
- package/dist/{chunk-NPTHHWXZ.js → chunk-EOGXCGQF.js} +5 -5
- package/dist/{chunk-DW5Y57I2.js → chunk-ESDWHHQY.js} +2 -2
- package/dist/{chunk-EM6VZSNJ.js → chunk-FAIHSCOG.js} +1 -1
- package/dist/chunk-FEJFGFPF.js +8 -0
- package/dist/{chunk-EO3IKZCP.js → chunk-FLYOI6EW.js} +1 -1
- package/dist/{chunk-AQ3LCE2U.js → chunk-FOTDGSY5.js} +1 -1
- package/dist/{chunk-NZISMTQE.js → chunk-FUUJJ7OH.js} +5 -5
- package/dist/chunk-FWUXYNWF.js +13 -0
- package/dist/{chunk-ZYJAZ5HH.js → chunk-G2X5YYIQ.js} +2 -2
- package/dist/chunk-GEZ45J4Z.js +2 -0
- package/dist/{chunk-LJN77RG6.js → chunk-GFBQ53WN.js} +1 -1
- package/dist/chunk-GGSPY3Q4.js +23 -0
- package/dist/{chunk-XNFZLSWW.js → chunk-GIUX7WUS.js} +6 -6
- package/dist/{chunk-ZU432XW4.js → chunk-GJ23UZDQ.js} +1 -1
- package/dist/{chunk-YJOJ5MUZ.js → chunk-GJJKWGBX.js} +6 -6
- package/dist/chunk-GMLGR4R6.js +8 -0
- package/dist/chunk-GRB4LKZC.js +9 -0
- package/dist/chunk-GZJ5F7SB.js +12 -0
- package/dist/chunk-HB2XXIQG.js +6 -0
- package/dist/chunk-HGZZXA2N.js +9 -0
- package/dist/chunk-HICNRXYB.js +11 -0
- package/dist/{chunk-46VLN6KC.js → chunk-HNQKXOFU.js} +4 -4
- package/dist/{chunk-AIJ6OR6X.js → chunk-HS4EWT6L.js} +2 -2
- package/dist/{chunk-GWDTGCQB.js → chunk-HTDZ3XAJ.js} +8 -8
- package/dist/{chunk-A34PD3XT.js → chunk-HY3JYAUH.js} +14 -14
- package/dist/{chunk-S262RGL6.js → chunk-I3QFYBOP.js} +1 -1
- package/dist/{chunk-DSKROZST.js → chunk-I7H3OIYX.js} +1 -1
- package/dist/{chunk-T6BGS26U.js → chunk-IRZ6XM5A.js} +1 -1
- package/dist/{chunk-LISPTWW3.js → chunk-IYPRFUTT.js} +1 -1
- package/dist/{chunk-CRILBBSU.js → chunk-J5ISQYVM.js} +1 -1
- package/dist/{chunk-WPCNJ4UL.js → chunk-JCTOQOVO.js} +1 -1
- package/dist/{chunk-ED5D2O6E.js → chunk-JCUG572K.js} +1 -1
- package/dist/chunk-KHVECW4M.js +7 -0
- package/dist/{chunk-KRH7UAD2.js → chunk-L75RBQFH.js} +1 -1
- package/dist/{chunk-T4WDJ7IB.js → chunk-LJJSFJA2.js} +28 -28
- package/dist/{chunk-4DDL6NXB.js → chunk-LLBH6PHE.js} +1 -1
- package/dist/{chunk-FGWHTNC3.js → chunk-LOEOCZCN.js} +1 -1
- package/dist/{chunk-NIBYHQLT.js → chunk-LTESFDTF.js} +1 -1
- package/dist/{chunk-7P2WKDGB.js → chunk-LUSIZ2BK.js} +15 -15
- package/dist/{chunk-AICGATHE.js → chunk-M7DFM2N7.js} +58 -58
- package/dist/{chunk-YQEGMCSX.js → chunk-MKP2HSWX.js} +3 -3
- package/dist/{chunk-2UO47XB4.js → chunk-MRFNJZRR.js} +2 -1
- package/dist/{chunk-XZ2WQNOX.js → chunk-NC36LJCA.js} +10 -10
- package/dist/{chunk-UNJWYV6V.js → chunk-NHBDLW52.js} +2 -2
- package/dist/{chunk-TVRKONNH.js → chunk-NHWDB7R6.js} +1 -1
- package/dist/{chunk-63ZLF7LS.js → chunk-NJTFI7AA.js} +1 -1
- package/dist/chunk-NPQBJJLP.js +9 -0
- package/dist/{chunk-CJ4U4C4A.js → chunk-NZYI4XV5.js} +5 -5
- package/dist/{chunk-JQHL4B4C.js → chunk-ONYPN3JY.js} +12 -12
- package/dist/{chunk-4K7BA3PD.js → chunk-ORLQUGIN.js} +6 -6
- package/dist/{chunk-THSKCKAQ.js → chunk-PH3P54QQ.js} +1 -1
- package/dist/chunk-PKNHSZWK.js +8 -0
- package/dist/{chunk-ZU3BD75E.js → chunk-PXIP246B.js} +1 -1
- package/dist/{chunk-5EWKVVUD.js → chunk-QBD7V4TK.js} +1 -1
- package/dist/{chunk-UIOKWFT4.js → chunk-QN56R4V4.js} +1 -1
- package/dist/{chunk-QMTYILTT.js → chunk-QTMRW6DK.js} +1 -1
- package/dist/{chunk-H3IGNWT7.js → chunk-R3JKZXII.js} +4 -4
- package/dist/{chunk-ZHFKBWBU.js → chunk-R3K3LVVS.js} +1 -1
- package/dist/{chunk-IK37Q6LY.js → chunk-RIXX6NRV.js} +1 -1
- package/dist/{chunk-DWYCSJ6O.js → chunk-RM74EAMV.js} +2 -2
- package/dist/{chunk-TOSUM2OI.js → chunk-RXHTIJ64.js} +1 -1
- package/dist/{chunk-6MWLOLLP.js → chunk-SCCAMJB4.js} +1 -1
- package/dist/{chunk-6HO7244M.js → chunk-SCGBCBXP.js} +1 -1
- package/dist/chunk-SX5CSXZO.js +8 -0
- package/dist/{chunk-A3AKJDLI.js → chunk-TRWHVG3A.js} +1 -1
- package/dist/{chunk-O53EQODF.js → chunk-TTSZSLQL.js} +1 -1
- package/dist/{chunk-RDYFZHT3.js → chunk-UDJLRTQB.js} +1 -1
- package/dist/chunk-UDL2A2GT.js +4 -0
- package/dist/chunk-UE54EN4C.js +2 -0
- package/dist/chunk-UVEHJRPE.js +1 -0
- package/dist/{chunk-VNAOZVSM.js → chunk-VFBBGLRA.js} +12 -12
- package/dist/{chunk-B7WTHCTF.js → chunk-VGWYAYHB.js} +3 -3
- package/dist/chunk-VPYD7UJM.js +22 -0
- package/dist/{chunk-MSAQGUGU.js → chunk-VQPZDZ3R.js} +4 -4
- package/dist/{chunk-RSPCCVN4.js → chunk-VW7W6LCV.js} +1 -1
- package/dist/{chunk-34AHFST2.js → chunk-VZLYB5LX.js} +1 -1
- package/dist/chunk-WD3I7AEZ.js +14 -0
- package/dist/{chunk-RLTTAH46.js → chunk-WMLBMR4E.js} +4 -4
- package/dist/{chunk-GCRPI3AL.js → chunk-XARBHOEZ.js} +1 -1
- package/dist/{chunk-62RAGXWK.js → chunk-XBDHRMQI.js} +7 -7
- package/dist/{chunk-VPGQMNW3.js → chunk-XQUXL75F.js} +1 -1
- package/dist/{chunk-ZYDRBF3H.js → chunk-XZH5PEML.js} +5 -5
- package/dist/{chunk-GHMDLZH4.js → chunk-Y46WPTKY.js} +7 -7
- package/dist/chunk-YAD7TML2.js +28 -0
- package/dist/{chunk-LXHTCLNX.js → chunk-YKHAI5IZ.js} +1 -1
- package/dist/{chunk-C4T4APD6.js → chunk-YRZP7JN4.js} +22 -22
- package/dist/{chunk-BYLGKRIT.js → chunk-Z43XVU2P.js} +1 -1
- package/dist/{chunk-L6OPXIZN.js → chunk-ZACNIKIQ.js} +1 -1
- package/dist/{chunk-H34KI3HV.js → chunk-ZG3RF2VE.js} +9 -9
- package/dist/{chunk-VOXX4LNC.js → chunk-ZUBTNUVE.js} +1 -1
- package/dist/{chunk-HK4QAI2A.js → chunk-ZYFBV4C7.js} +2 -2
- 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/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/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.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/StepChain.js +1 -1
- package/dist/shell/Stepper.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/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- 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-TKQRQGTI.js +0 -29
- package/dist/Files-QM5PW6BX.js +0 -88
- package/dist/PdfViewer-3UEC5TNN.js +0 -1
- package/dist/Sidebar-SZ5OGL6C.js +0 -44
- package/dist/chunk-4LNO444F.js +0 -11
- package/dist/chunk-56YJIKVI.js +0 -11
- package/dist/chunk-5PDHKH2A.js +0 -3
- package/dist/chunk-6E47JSLM.js +0 -22
- package/dist/chunk-AEMAGYIZ.js +0 -8
- package/dist/chunk-ATURDO2C.js +0 -14
- package/dist/chunk-D7DRZKUI.js +0 -1
- package/dist/chunk-EJBR5Y4X.js +0 -9
- package/dist/chunk-EZBE3H2W.js +0 -9
- package/dist/chunk-HTB5AEZU.js +0 -9
- package/dist/chunk-IJXMWWTM.js +0 -9
- package/dist/chunk-JINTE3G4.js +0 -1
- package/dist/chunk-K46DLEIX.js +0 -23
- package/dist/chunk-N7GFQZ2J.js +0 -12
- package/dist/chunk-N7LDQZTL.js +0 -8
- package/dist/chunk-NDP2I5HK.js +0 -8
- package/dist/chunk-OMUC6TZT.js +0 -6
- package/dist/chunk-SOWRW647.js +0 -6
- package/dist/chunk-SZC35EYE.js +0 -28
- package/dist/chunk-TLE6VHMJ.js +0 -8
- package/dist/chunk-UMFEOZ75.js +0 -4
- package/dist/chunk-UYNFTF6L.js +0 -2
- package/dist/chunk-WRJP33DN.js +0 -6
- package/dist/chunk-WVIUU4BZ.js +0 -13
- package/dist/chunk-XZU24YKP.js +0 -13
- package/dist/chunk-Y3SVPBUT.js +0 -7
- package/dist/chunk-YN5K72D6.js +0 -5
- package/dist/chunk-ZITMPMUT.js +0 -2
package/dist/Files-QM5PW6BX.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import{openPreviewFile as e}from"./chunk-D7DRZKUI.js";import{SidebarLayout as t}from"./chunk-DD2ZGHCG.js";import"./chunk-QWK6DRSN.js";import"./chunk-3LGPZAVU.js";import{Breadcrumbs as n}from"./chunk-ZU3BD75E.js";import{formatBytes as a}from"./chunk-GEYM4WN3.js";import"./chunk-Y3JW2GW5.js";import"./chunk-36BRD5J3.js";import"./chunk-LF27WIN2.js";import{getFilesDemoTree as r}from"./chunk-34AHFST2.js";import{AboutApp as i}from"./chunk-YQEGMCSX.js";import{peekFilesViewRequest as s,consumeFilesViewRequest as o,FILES_SHOW_TRASH_EVENT as l,FILES_OPEN_DESKTOP_FOLDER_EVENT as c,subscribeDesktopFolders as d,getDesktopFoldersSnapshot as m,FolderGlyph as h,DesktopItemMiniIcon as p,desktopItemTypeLabel as u}from"./chunk-WVIUU4BZ.js";import"./chunk-ESL5TDNA.js";import{useWindowManager as f,WindowTitle as x}from"./chunk-AICGATHE.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-FGWHTNC3.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-6MWLOLLP.js";import{confirm as k,prompt as g}from"./chunk-LPJGF6LK.js";import"./chunk-YN5K72D6.js";import{ItemCount as b}from"./chunk-TOSUM2OI.js";import"./chunk-3DVNXNTF.js";import"./chunk-YAZENY3X.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-KRH7UAD2.js";import"./chunk-6HO7244M.js";import{toast_default as y}from"./chunk-A3AKJDLI.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-F3ZOO23R.js";import"./chunk-JINTE3G4.js";import"./chunk-FZM3ZPW3.js";import"./chunk-CDAJKLGL.js";import"./chunk-6KGIHI6X.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-EOVXFXVV.js";import"./chunk-UQYNPYF4.js";import"./chunk-TE6R53YD.js";import{Icon as N}from"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as w}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import{TH_ONE_LINE as v}from"./chunk-WGLHB6WE.js";import"./chunk-NJN5IKWO.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-TWVUQUUD.js";import"./chunk-MBY5JIGB.js";import"./chunk-C3QOHMR6.js";import{useState as j,useEffect as $,useSyncExternalStore as D,useRef as C,useCallback as L}from"react";import{jsxs as T,jsx as E,Fragment as R}from"react/jsx-runtime";var W="undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000",U={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"};function F(e,t){return"/"===e||""===e?"/"+t:e.replace(/\/$/,"")+"/"+t}function I(e){if(!e)return"—";try{const t=new Date(e);return isNaN(t.getTime())?"—":t.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return e}}function M(){const M=W.replace(/\/$/,""),P=null!==r(),[A,S]=j("/"),[O,G]=j([]),[H,J]=j([]),[K,B]=j(null),[V,Z]=j(!0),[X,Y]=j(!1),[Q,z]=j(null),[_,q]=j(!1),[ee,te]=j(()=>{const e=s();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});$(()=>{o()},[]);const[ne,ae]=j([]);$(()=>{const e=()=>{o(),te("trash")},t=e=>{o();const t=e.detail?.folderId;t&&te({desktopFolderId:t})};return window.addEventListener(l,e),window.addEventListener(c,t),()=>{window.removeEventListener(l,e),window.removeEventListener(c,t)}},[]);const re=D(d,m,m),ie="object"==typeof ee?ee.desktopFolderId:null,se=ie?re?.folders.find(e=>e.id===ie)??null:null,oe=ie&&re?.itemsByFolder[ie]||[];$(()=>{ie&&re&&!re.folders.some(e=>e.id===ie)&&te("files")},[ie,re]);const le=C(0),ce=C(null),{openPage:de,openEntity:me}=f(),he=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>de(e)}):"page"===t.entityType?de(t.entityId):me(t.entityType,t.entityId,null,t.label)},pe=L((e,t={})=>fetch(e,{...t,credentials:"include"}),[]),ue=L(async()=>{try{const e=await pe(`${M}/api/quota`);if(e.ok){const t=await e.json();z({used:t.used,limit:t.limit})}}catch{}},[pe,M]),fe=L(async e=>{if(B(null),P){const t=function(e){const t=r();if(!t)return[];let n=t;for(const t of e.split("/").filter(Boolean)){const e=n.find(e=>"folder"===e.kind&&e.name===t);if(!e||!e.children)return[];n=e.children}return n.map(e=>({name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}(e);return G(t),S(e),Y(!1),Z(!1),void("/"===e&&J(t.filter(e=>"folder"===e.kind).map(e=>e.name)))}Z(!0);try{const t=await pe(`${M}/api/files?path=${encodeURIComponent(e)}`);if(!t.ok){const e=await t.json().catch(()=>({}));return void y.error(e.error||`Failed to list (${t.status})`)}const n=await t.json(),a=n.entries||[];G(a),S(n.path||e),Y(!1),"/"===(n.path||e)&&J(a.filter(e=>"folder"===e.kind).map(e=>e.name))}catch(e){Y(!0)}finally{Z(!1)}ue()},[pe,M,ue,P]),xe=L(async()=>{if(P)return ae([]),void Z(!1);Z(!0),B(null);try{const e=await pe(`${M}/api/trash`);if(!e.ok){const t=await e.json().catch(()=>({}));return void y.error(t.error||`Failed to list trash (${e.status})`)}const t=await e.json();ae(t.entries||[]),Y(!1)}catch{Y(!0)}finally{Z(!1)}ue()},[pe,M,ue,P]);$(()=>{"files"===ee?fe(A):"trash"===ee&&xe()},[A,ee]);const ke=async e=>{const t=F(A,e.name);try{const n=await pe(`${M}/api/file?path=${encodeURIComponent(t)}`);if(!n.ok)return void y.error(`Download failed (${n.status})`);const a=await n.blob(),r=URL.createObjectURL(a),i=document.createElement("a");i.href=r,i.download=e.name,i.click(),setTimeout(()=>URL.revokeObjectURL(r),1e3)}catch(e){y.error(e?.message||"Download failed")}},ge=async e=>{const t=Array.from(e);for(const e of t){const t=new FormData;t.append("file",e);try{const n=await pe(`${M}/api/upload?path=${encodeURIComponent(A)}`,{method:"POST",body:t});if(!n.ok){const t=await n.json().catch(()=>({}));if(413===n.status){const n=Math.max(0,(t.limit||0)-(t.used||0));y.error(`Quota exceeded — ${a(n)} free, ${e.name} is ${a(t.attempted||e.size)}`)}else y.error(`Upload ${e.name}: ${t.error||n.status}`)}}catch(t){y.error(`Upload ${e.name}: ${t?.message||"failed"}`)}}fe(A)},be=()=>{le.current=0,q(!1)};if($(()=>{const e=()=>be();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),X)/* @__PURE__ */
|
|
2
|
-
return T("div",{className:"flex flex-col h-full bg-white",children:[
|
|
3
|
-
/* @__PURE__ */E(x,{title:"Files - offline"}),
|
|
4
|
-
/* @__PURE__ */E("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */T("div",{className:"max-w-md",children:[
|
|
5
|
-
/* @__PURE__ */E(N,{name:"close-circle",className:"h-12 w-12 mx-auto text-gray-300 mb-3",strokeWidth:1.4}),
|
|
6
|
-
/* @__PURE__ */E("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:"Can't reach the file server"}),
|
|
7
|
-
/* @__PURE__ */T("p",{className:"text-sm text-gray-500 mb-3",children:["No response from ",
|
|
8
|
-
/* @__PURE__ */E("span",{className:"font-mono",children:M}),". Make sure the server is running — see ",
|
|
9
|
-
/* @__PURE__ */E("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]}),
|
|
10
|
-
/* @__PURE__ */E("button",{onClick:()=>fe(A),className:"px-3 h-8 text-sm bg-blue-500 text-on-accent rounded hover:bg-blue-600",children:"Retry"})]})})]});const ye="/"===A?[]:A.split("/").filter(Boolean),Ne=Q&&Q.limit>0?Math.min(100,Math.round(Q.used/Q.limit*100)):0,we=Ne>90?"bg-red-500":Ne>75?"bg-amber-500":"bg-blue-500",ve=[{label:"My files",onClick:()=>S("/")},...ye.map((e,t)=>({label:e,onClick:()=>S("/"+ye.slice(0,t+1).join("/"))}))],je=e=>"flex w-full items-center gap-2 rounded-md px-3 min-h-(--row-height-menu) py-2 text-left text-sm transition-colors "+(e?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),$e=e=>/* @__PURE__ */E("svg",{className:"h-4 w-4 shrink-0 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */E("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),De=/* @__PURE__ */T("nav",{className:"p-2",children:[
|
|
11
|
-
/* @__PURE__ */E("div",{className:"px-2 py-2 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Locations"}),
|
|
12
|
-
/* @__PURE__ */T("button",{onClick:()=>{te("files"),S("/")},className:je("files"===ee&&"/"===A),children:[$e("M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0L21.75 12M4.5 9.75v9.75a.75.75 0 00.75.75H9V15a.75.75 0 01.75-.75h4.5A.75.75 0 0115 15v5.25h3.75a.75.75 0 00.75-.75V9.75"),"My files"]}),H.map(e=>/* @__PURE__ */T("button",{onClick:()=>{te("files"),S("/"+e)},className:je("files"===ee&&A==="/"+e),children:[$e("M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"),
|
|
13
|
-
/* @__PURE__ */E("span",{className:"truncate",children:e})]},e)),!P&&/* @__PURE__ */T("button",{onClick:()=>te("trash"),className:je("trash"===ee),children:[$e("M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79"),"Trash"]}),re&&re.folders.length>0&&/* @__PURE__ */T(R,{children:[
|
|
14
|
-
/* @__PURE__ */E("div",{className:"px-2 pt-3 pb-2 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Desktop"}),re.folders.map(e=>/* @__PURE__ */T("button",{onClick:()=>te({desktopFolderId:e.id}),className:je(ie===e.id),children:[
|
|
15
|
-
/* @__PURE__ */E(h,{className:"h-4 w-4 shrink-0 text-amber-500"}),
|
|
16
|
-
/* @__PURE__ */E("span",{className:"truncate",children:e.name}),
|
|
17
|
-
/* @__PURE__ */E(b,{count:e.itemCount,active:ie===e.id,className:"ml-auto"})]},e.id))]})]});/* @__PURE__ */
|
|
18
|
-
return T("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e=>{P||"object"==typeof ee||e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),le.current++,_||q(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{le.current>0&&le.current--,0===le.current&&q(!1)},onDrop:e=>{e.preventDefault(),be(),P||"object"==typeof ee||e.dataTransfer.files?.length&&ge(e.dataTransfer.files)},children:[
|
|
19
|
-
/* @__PURE__ */E(x,{title:se?`Files - ${se.name}`:"Files"+("/"===A?"":" - "+A)}),
|
|
20
|
-
/* @__PURE__ */E(i,{app:"files"}),
|
|
21
|
-
/* @__PURE__ */E("input",{ref:ce,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&ge(e.target.files),ce.current&&(ce.current.value="")}}),
|
|
22
|
-
/* @__PURE__ */E("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */E(t,{sidebar:De,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */T("div",{className:"flex h-full min-w-0 flex-col",children:[
|
|
23
|
-
/* @__PURE__ */T("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-line bg-surface-sunken shrink-0 text-xs",children:[/* @__PURE__ */T(R,"files"===ee?{children:[
|
|
24
|
-
/* @__PURE__ */E("button",{onClick:()=>S(function(e){if("/"===e||""===e)return"/";const t=e.replace(/\/$/,""),n=t.lastIndexOf("/");return n<=0?"/":t.slice(0,n)}(A)),disabled:"/"===A,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",title:"Parent folder",children:/* @__PURE__ */E(N,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
25
|
-
/* @__PURE__ */E("div",{className:"flex-1 min-w-0",children:/* @__PURE__ */E(n,{items:ve,maxItems:5})}),
|
|
26
|
-
/* @__PURE__ */E("button",{onClick:()=>fe(A),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */E(N,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),!P&&/* @__PURE__ */T(R,{children:[
|
|
27
|
-
/* @__PURE__ */T("button",{onClick:()=>te("trash"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",title:"Open trash",children:[
|
|
28
|
-
/* @__PURE__ */E(N,{name:"trash",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Trash"]}),
|
|
29
|
-
/* @__PURE__ */T("button",{onClick:async()=>{const e=await g({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});if(!e)return;if(/[\\/]/.test(e))return void y.error("Folder names cannot contain slashes");const t=F(A,e),n=await pe(`${M}/api/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!n.ok){const e=await n.json().catch(()=>({}));return void y.error(e.error||`Create folder failed (${n.status})`)}fe(A)},className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",children:[
|
|
30
|
-
/* @__PURE__ */E(N,{name:"folder-plus",className:"h-3.5 w-3.5",strokeWidth:1.5}),"New Folder"]}),
|
|
31
|
-
/* @__PURE__ */T("button",{onClick:()=>ce.current?.click(),className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 flex items-center gap-1",children:[
|
|
32
|
-
/* @__PURE__ */E(N,{name:"upload",className:"h-3.5 w-3.5",strokeWidth:1.8}),"Upload"]})]})]}:"trash"===ee?{children:[
|
|
33
|
-
/* @__PURE__ */E("button",{onClick:()=>te("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */E(N,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
34
|
-
/* @__PURE__ */E("span",{className:"flex-1 text-gray-700 font-medium px-2",children:"Trash"}),
|
|
35
|
-
/* @__PURE__ */E("button",{onClick:xe,className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */E(N,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),
|
|
36
|
-
/* @__PURE__ */E("button",{onClick:async()=>{if(0===ne.length)return;if(!await k({title:"Empty trash",message:`${ne.length} item${1===ne.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"}))return;const e=await pe(`${M}/api/trash`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));return void y.error(t.error||`Empty trash failed (${e.status})`)}xe()},disabled:0===ne.length,className:"px-2 py-1 rounded text-red-600 hover:bg-red-50 disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
|
|
37
|
-
/* @__PURE__ */E("button",{onClick:()=>te("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */E(N,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
38
|
-
/* @__PURE__ */E(h,{className:"h-4 w-4 text-amber-500 ml-1"}),
|
|
39
|
-
/* @__PURE__ */E("span",{className:"flex-1 text-gray-700 font-medium px-1 truncate",children:se?.name??"Desktop folder"}),
|
|
40
|
-
/* @__PURE__ */E("span",{className:"text-2xs text-ink-faintest px-2",children:"Desktop shortcuts"})]}),Q&&/* @__PURE__ */T(R,{children:[
|
|
41
|
-
/* @__PURE__ */E("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
|
|
42
|
-
/* @__PURE__ */T("div",{className:"flex items-center gap-2",title:`${a(Q.used)} of ${a(Q.limit)} used`,children:[
|
|
43
|
-
/* @__PURE__ */E("div",{className:"w-20 h-1.5 rounded-full bg-gray-200 overflow-hidden",children:/* @__PURE__ */E("div",{className:`h-full ${we} transition-all`,style:{width:`${Ne}%`}})}),
|
|
44
|
-
/* @__PURE__ */T("span",{className:"text-2xs text-ink-faint tabular-nums whitespace-nowrap",children:[a(Q.used)," / ",a(Q.limit)]})]})]})]}),
|
|
45
|
-
/* @__PURE__ */E("div",{className:"flex-1 overflow-auto",children:"object"==typeof ee?0===oe.length?/* @__PURE__ */E("div",{className:"p-10 text-center text-sm text-gray-400",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */T("table",{className:"w-full text-sm",children:[
|
|
46
|
-
/* @__PURE__ */E("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */T("tr",{children:[
|
|
47
|
-
/* @__PURE__ */E("th",{className:`${v} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
48
|
-
/* @__PURE__ */E("th",{className:`${v} text-left font-medium px-3 h-8 w-28`,children:"Type"}),
|
|
49
|
-
/* @__PURE__ */E("th",{className:`${v} w-56`})]})}),
|
|
50
|
-
/* @__PURE__ */E("tbody",{children:oe.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
|
|
51
|
-
return T("tr",{onClick:()=>B(t),onDoubleClick:()=>he(e),className:"cursor-default border-b border-gray-100 "+(K===t?"bg-blue-50":"hover:bg-gray-50"),children:[
|
|
52
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 flex items-center gap-2",children:[
|
|
53
|
-
/* @__PURE__ */E(p,{item:e}),
|
|
54
|
-
/* @__PURE__ */E("span",{className:"truncate",title:e.label,children:e.label})]}),
|
|
55
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-xs text-ink-faint",children:u(e)}),
|
|
56
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
|
|
57
|
-
/* @__PURE__ */E("button",{onClick:t=>{t.stopPropagation(),he(e)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Open"}),
|
|
58
|
-
/* @__PURE__ */E("button",{onClick:t=>{t.stopPropagation(),re?.moveToDesktop([e])},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-ink-faint text-2xs ml-1",children:"Move to desktop"}),
|
|
59
|
-
/* @__PURE__ */E("button",{onClick:t=>{t.stopPropagation(),re?.removeShortcuts([e])},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Remove"})]})]},t)})})]}):"trash"===ee?V&&0===ne.length?/* @__PURE__ */E(w,{size:"sm",padding:"p-6",label:"Loading"}):0===ne.length?/* @__PURE__ */E("div",{className:"p-10 text-center text-sm text-gray-400",children:"Trash is empty."}):/* @__PURE__ */T("table",{className:"w-full text-sm",children:[
|
|
60
|
-
/* @__PURE__ */E("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */T("tr",{children:[
|
|
61
|
-
/* @__PURE__ */E("th",{className:`${v} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
62
|
-
/* @__PURE__ */E("th",{className:`${v} text-left font-medium px-3 h-8`,children:"Original location"}),
|
|
63
|
-
/* @__PURE__ */E("th",{className:`${v} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
|
|
64
|
-
/* @__PURE__ */E("th",{className:`${v} text-right font-medium px-3 h-8 w-40`,children:"Deleted"}),
|
|
65
|
-
/* @__PURE__ */E("th",{className:`${v} w-44`})]})}),
|
|
66
|
-
/* @__PURE__ */E("tbody",{children:ne.map(e=>/* @__PURE__ */T("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[
|
|
67
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===e.kind?/* @__PURE__ */E(N,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */E(N,{name:"page",className:"h-4 w-4 text-ink-faintest shrink-0",strokeWidth:1.5}),
|
|
68
|
-
/* @__PURE__ */E("span",{className:"truncate",title:e.name,children:e.name})]}),
|
|
69
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-ink-faint text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
|
|
70
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-right tabular-nums text-ink-faint",children:a(e.size)}),
|
|
71
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-right text-ink-faint tabular-nums",children:e.deletedAt?I(e.deletedAt):"—"}),
|
|
72
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
|
|
73
|
-
/* @__PURE__ */E("button",{onClick:()=>(async e=>{const t=await pe(`${M}/api/trash/restore`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})});if(!t.ok){const e=await t.json().catch(()=>({}));return void y.error(e.error||`Restore failed (${t.status})`)}y.success(`Restored "${e.name}"`),xe()})(e),className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Restore"}),
|
|
74
|
-
/* @__PURE__ */E("button",{onClick:()=>(async e=>{if(!await k({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"}))return;const t=await pe(`${M}/api/trash/${encodeURIComponent(e.id)}`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));return void y.error(e.error||`Delete failed (${t.status})`)}xe()})(e),className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete forever"})]})]},e.id))})]}):V&&0===O.length?/* @__PURE__ */E(w,{size:"sm",padding:"p-6",label:"Loading"}):0===O.length?/* @__PURE__ */T("div",{className:"p-10 text-center text-sm text-gray-400",children:["Empty folder.",!P&&/* @__PURE__ */T(R,{children:[" Drop files here or click ",
|
|
75
|
-
/* @__PURE__ */E("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */T("table",{className:"w-full text-sm",children:[
|
|
76
|
-
/* @__PURE__ */E("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */T("tr",{children:[
|
|
77
|
-
/* @__PURE__ */E("th",{className:`${v} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
78
|
-
/* @__PURE__ */E("th",{className:`${v} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
|
|
79
|
-
/* @__PURE__ */E("th",{className:`${v} text-right font-medium px-3 h-8 w-40`,children:"Modified"}),
|
|
80
|
-
/* @__PURE__ */E("th",{className:`${v} w-32`})]})}),
|
|
81
|
-
/* @__PURE__ */E("tbody",{children:O.map(t=>/* @__PURE__ */T("tr",{onClick:()=>B(t.name),onDoubleClick:()=>{"folder"===t.kind?S(F(A,t.name)):(async t=>{if(P)return;const n=F(A,t.name),a=(t.name.split(".").pop()||"").toLowerCase(),r=U[a];r?await e({filePath:n,filename:t.name,kind:r,onStaged:e=>de(e)}):ke(t)})(t)},className:"cursor-default border-b border-gray-100 "+(K===t.name?"bg-blue-50":"hover:bg-gray-50"),children:[
|
|
82
|
-
/* @__PURE__ */T("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===t.kind?/* @__PURE__ */E(N,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */E(N,{name:"page",className:"h-4 w-4 text-ink-faintest shrink-0",strokeWidth:1.5}),
|
|
83
|
-
/* @__PURE__ */E("span",{className:"truncate",title:t.name,children:t.name})]}),
|
|
84
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-right tabular-nums text-ink-faint",children:"folder"===t.kind?"—":a(t.size)}),
|
|
85
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-right text-ink-faint tabular-nums",children:I(t.modifiedAt)}),
|
|
86
|
-
/* @__PURE__ */E("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:!P&&/* @__PURE__ */T(R,{children:["file"===t.kind&&/* @__PURE__ */E("button",{onClick:e=>{e.stopPropagation(),ke(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-ink-faint text-2xs",children:"Download"}),
|
|
87
|
-
/* @__PURE__ */E("button",{onClick:e=>{e.stopPropagation(),(async e=>{const t=await g({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});if(!t||t===e.name)return;if(/[\\/]/.test(t))return void y.error("Names cannot contain slashes");const n=F(A,e.name),a=F(A,t),r=await pe(`${M}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:n,to:a})});if(!r.ok){const e=await r.json().catch(()=>({}));return void y.error(e.error||`Rename failed (${r.status})`)}fe(A)})(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-ink-faint text-2xs ml-1",children:"Rename"}),
|
|
88
|
-
/* @__PURE__ */E("button",{onClick:e=>{e.stopPropagation(),(async e=>{if(!await k({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will be permanently removed.`,confirmLabel:"Delete",variant:"danger"}))return;const t=F(A,e.name),n=await pe(`${M}/api/files?path=${encodeURIComponent(t)}`,{method:"DELETE"});if(!n.ok){const e=await n.json().catch(()=>({}));return void y.error(e.error||`Delete failed (${n.status})`)}fe(A)})(t)},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete"})]})})]},t.name))})]})})]})})}),_&&/* @__PURE__ */E("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */E("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{M as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-OXVRXWJL.js";import"./chunk-A3AKJDLI.js";import"./chunk-UQYNPYF4.js";import"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-MBY5JIGB.js";import"./chunk-C3QOHMR6.js";
|
package/dist/Sidebar-SZ5OGL6C.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as n,RAIL_WIDTH_KEY as a,toggleOpenSection as i,writeStored as l}from"./chunk-U6LKNGC6.js";import{ResizeHandle as o}from"./chunk-3LGPZAVU.js";import{openGlobalSearch as s}from"./chunk-MOBJVNLF.js";import{partitionNav as c,visibleNavChildren as d,flyoutGroups as m,visibleSectionItems as h,rowsContainRoute as u}from"./chunk-WGRS6QBT.js";import{BrandMark as p}from"./chunk-MI67DI3H.js";import{IconButton_default as b}from"./chunk-LE5LWALR.js";import{RAIL_MENU_GAP as f,navSections as g,startMenuCategories as x,TAB_STRIP_H as k,RAIL_COLLAPSED_INSET as y,RAIL_W as v,RAIL_MAX_W as N,RAIL_MIN_W as j,navIcons as w,sectionIcons as C}from"./chunk-4LXCCZDM.js";import"./chunk-5A7MWTXX.js";import"./chunk-7QSDPSXP.js";import"./chunk-2QY5BJLA.js";import{PopupMenu as S,PopupMenuItem as L,PopupMenuDivider as z,PopupMenuLabel as W}from"./chunk-6KGIHI6X.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UQYNPYF4.js";import"./chunk-TE6R53YD.js";import{Icon as $}from"./chunk-2UO47XB4.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-NJN5IKWO.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-TWVUQUUD.js";import{useShellStrings as A}from"./chunk-MBY5JIGB.js";import"./chunk-C3QOHMR6.js";import{useMemo as I,useState as H,useRef as M,useEffect as R,isValidElement as T,cloneElement as B}from"react";import{jsx as K,jsxs as D,Fragment as J}from"react/jsx-runtime";var Q="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function U(e,t,r){const n=Math.max(8,r-t.bottom);return{left:e+f,bottom:n,maxHeight:r-n-8,overflowY:"auto"}}var P=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),G="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function X({open:e,children:t}){const r=M(null);return R(()=>{r.current?.toggleAttribute("inert",!e)},[e]),/* @__PURE__ */K("div",{ref:r,className:"grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",style:{gridTemplateRows:e?"1fr":"0fr",opacity:e?1:0},"aria-hidden":!e,"data-fold":e?"open":"closed",children:/* @__PURE__ */K("div",{className:"min-h-0 overflow-hidden",children:t})})}function Y({open:e}){/* @__PURE__ */
|
|
2
|
-
return K($,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function O({dir:e}){/* @__PURE__ */
|
|
3
|
-
return K($,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function _({className:e}){/* @__PURE__ */
|
|
4
|
-
return K($,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var F=e=>.75+1.75*e+"rem";function V({width:V,collapsed:Z,onToggleCollapsed:E,onResize:q,onHome:ee,onOpen:te,activeRoute:re,profile:ne,user:ae,onLogout:ie,onSwitchToDesktop:le,onReportBug:oe,onClose:se,navSections:ce=g,navIcons:de=w,sectionIcons:me=C,categories:he=x,productName:ue,productIcon:pe,tagline:be,adaptiveLogo:fe=!1,logoHasAlpha:ge=null,logoIsLight:xe=null}){const ke=A().layout,{hasAnyPerm:ye}=e(),ve=I(()=>c(ce,he,ye),[ce,he,ye]),[Ne,je]=H(()=>t(r(n))),we=I(()=>[...ve.topItems.filter(e=>d(e,ye).length>0).map(e=>`child:${e.to}`),...[...ve.erpSections,...ve.systemSections,...ve.virtualSections,...ve.footerSections].map(e=>e.label)],[ve,ye]),Ce=(e,t=we)=>je(r=>{const a=i(r,e,t);return l(n,JSON.stringify([...a])),a}),[Se,Le]=H(null),[ze,We]=H(!1),$e=M(null);R(()=>{Z||Le(null)},[Z]);const Ae=(e,t)=>{Le(null),e.onSelect?e.onSelect():te(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Ie=(e,t)=>{const r=t[e];/* @__PURE__ */
|
|
5
|
-
return K("span",{className:G,"aria-hidden":"true",children:r&&T(r)?B(r,{className:"size-[18px]"}):r})},He=e=>e.filter(e=>d(e,ye).length>0).map(e=>`child:${e.to}`),Me=(e,t,r=we)=>{const n=d(e,ye),a=e.menuLabel??e.label;if(n.length>0){const i=`child:${e.to}`,l=Ne.has(i),o=!l&&u(n,re,ye);/* @__PURE__ */
|
|
6
|
-
return D("div",{children:[
|
|
7
|
-
/* @__PURE__ */D("button",{type:"button",onClick:()=>Ce(i,r),"aria-expanded":l,className:P(o,!1),style:t>0?{paddingLeft:F(t)}:void 0,children:[0===t&&Ie(e.to,de),
|
|
8
|
-
/* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate",children:a}),
|
|
9
|
-
/* @__PURE__ */K(Y,{open:l})]}),
|
|
10
|
-
/* @__PURE__ */K(X,{open:l,children:/* @__PURE__ */K("div",{className:"space-y-0.5 pt-0.5",children:n.map(e=>Me(e,t+1,He(n)))})}),e.dividerAfter&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:F(t)},"aria-hidden":"true"})]},e.to)}const i=e.to===re;/* @__PURE__ */
|
|
11
|
-
return D("div",{children:[
|
|
12
|
-
/* @__PURE__ */D("button",{type:"button",onClick:t=>Ae(e,t),onAuxClick:t=>{1===t.button&&Ae(e,t)},"aria-current":i?"page":void 0,className:P(i,!1),style:t>0?{paddingLeft:F(t)}:void 0,children:[0===t&&Ie(e.to,de),
|
|
13
|
-
/* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate",children:a})]}),e.dividerAfter&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:F(t)},"aria-hidden":"true"})]},e.to)},Re=(e,t)=>{const r=t?e.items:h(e,ye);if(0===r.length)return null;const n="icon"in e&&e.icon?/* @__PURE__ */K("span",{className:G,"aria-hidden":"true",children:e.icon}):Ie(e.label,me),a=e.menuLabel??e.label,i=u(r,re,ye),l="dividerAfter"in e&&e.dividerAfter;if(Z)/* @__PURE__ */
|
|
14
|
-
return D("div",{children:[
|
|
15
|
-
/* @__PURE__ */K("button",{type:"button",title:a,"aria-label":a,"aria-haspopup":"menu","aria-expanded":Se?.label===e.label,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();Le(t=>t?.label===e.label?null:{label:e.label,items:r,top:n.top})},className:P(i||Se?.label===e.label,!0),children:n}),l&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label);const o=Ne.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
|
|
16
|
-
return D("div",{children:[
|
|
17
|
-
/* @__PURE__ */D("button",{type:"button",onClick:()=>Ce(e.label),"aria-expanded":o,"aria-controls":s,className:P(!o&&i,!1),children:[n,
|
|
18
|
-
/* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate",children:a}),
|
|
19
|
-
/* @__PURE__ */K(Y,{open:o})]}),
|
|
20
|
-
/* @__PURE__ */K(X,{open:o,children:/* @__PURE__ */K("div",{id:s,role:"group","aria-label":a,className:"space-y-0.5 pt-0.5",children:r.map(e=>Me(e,1,He(r)))})}),l&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label)},Te=ne?.first_name?`${ne.first_name} ${ne.last_name||""}`.trim():ae?.email||"",Be=(ne?.first_name?.charAt(0)||ae?.email?.charAt(0)||"?").toUpperCase(),Ke=ne?.avatar_url?/* @__PURE__ */K("img",{src:ne.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */K("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Be}),De=ze?$e.current?.getBoundingClientRect():void 0,Je=Z?"":"px-3",Qe=Z?{paddingInline:y}:void 0,Ue=`${Z?ke.expandSidebar:ke.collapseSidebar} (${Q?"⌘":"Ctrl"} .)`,Pe=ee?{run:ee,label:ke.goHome,title:ke.goHome}:se?null:{run:E,label:Z?ke.expandSidebar:ke.collapseSidebar,title:Ue},Ge=/* @__PURE__ */D(J,{children:[pe&&/* @__PURE__ */K(p,{src:pe,alt:"",slot:"compact",surface:"light",adaptive:fe,hasAlpha:ge,isLight:xe,size:28,decorative:!0}),!Z&&/* @__PURE__ */D("span",{className:"min-w-0 text-left leading-tight",children:[
|
|
21
|
-
/* @__PURE__ */K("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:ue??"Apps"}),be&&/* @__PURE__ */K("span",{className:"block truncate text-2xs font-medium text-gray-500",children:be})]})]}),Xe=ve.erpSections.length>0||ve.systemSections.length>0||ve.virtualSections.length>0;/* @__PURE__ */
|
|
22
|
-
return D("aside",{"aria-label":ke.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-line bg-surface text-ink-strong",style:{width:V},children:[
|
|
23
|
-
/* @__PURE__ */D("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(Z?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:k},children:[Pe?/* @__PURE__ */K("button",{type:"button",onClick:Pe.run,"aria-label":Pe.label,title:Pe.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(Z?"justify-center p-0.5":"-ml-1 p-1"),children:Ge}):/* @__PURE__ */K("span",{className:"flex min-w-0 items-center gap-2",children:Ge}),se?/* @__PURE__ */K(b,{onClick:se,"aria-label":ke.closeMenu,children:/* @__PURE__ */K($,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!Z&&/* @__PURE__ */K("button",{type:"button",onClick:E,"aria-label":ke.collapseSidebar,title:`${ke.collapseSidebar} (${Q?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */K(O,{dir:"left"})})]}),
|
|
24
|
-
/* @__PURE__ */K("div",{className:`shrink-0 pt-3 ${Je}`,style:Qe,children:Z?/* @__PURE__ */K("button",{type:"button",onClick:s,"aria-label":ke.search,title:`${ke.search} (${Q?"⌘K":"Ctrl K"})`,className:P(!1,!0),children:/* @__PURE__ */K(_,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */D("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-line bg-surface px-3 text-left transition-colors hover:bg-gray-100",children:[
|
|
25
|
-
/* @__PURE__ */K(_,{className:"size-3.5 text-gray-500"}),
|
|
26
|
-
/* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate text-sm text-ink-faint",children:ke.search}),
|
|
27
|
-
/* @__PURE__ */K("kbd",{className:"rounded border border-line bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-ink-faint",children:Q?"⌘K":"Ctrl K"})]})}),
|
|
28
|
-
/* @__PURE__ */D("nav",{"aria-label":ke.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Je} ${Z?"space-y-1":"space-y-0.5"}`,style:Qe,children:[Z&&/* @__PURE__ */K("button",{type:"button",onClick:E,"aria-label":ke.expandSidebar,title:`${ke.expandSidebar} (${Q?"⌘":"Ctrl"} .)`,className:`${P(!1,!0)} mb-3`,children:/* @__PURE__ */K(O,{dir:"right"})}),ve.topItems.map(e=>{if(!Z)return Me(e,0);const t=d(e,ye),r=e.to===re||u(t,re,ye),n=e.menuLabel??e.label;/* @__PURE__ */
|
|
29
|
-
return D("div",{children:[
|
|
30
|
-
/* @__PURE__ */K("button",{type:"button",title:n,"aria-label":n,onClick:r=>{if(0===t.length)return void Ae(e,r);const n=r.currentTarget.getBoundingClientRect();Le(r=>r?.label===e.to?null:{label:e.to,items:t,top:n.top})},className:P(r,!0),children:Ie(e.to,de)}),e.dividerAfter&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.to)}),ve.topItems.length>0&&Xe&&!ve.topItems[ve.topItems.length-1].dividerAfter&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.erpSections.map(e=>Re(e,!1)),ve.systemSections.map(e=>Re(e,!1)),ve.virtualSections.map(e=>Re(e,!0)),ve.footerSections.length>0&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.footerSections.map(e=>Re(e,!1))]}),
|
|
31
|
-
/* @__PURE__ */K("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Je}`,style:Qe,children:/* @__PURE__ */D("button",{ref:$e,type:"button",onClick:()=>We(e=>!e),"aria-haspopup":"menu","aria-expanded":ze,"aria-label":Z?ke.accountMenu(Te):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(Z?"justify-center py-2":"px-2 py-2"),children:[Ke,!Z&&/* @__PURE__ */D("span",{className:"min-w-0 flex-1 text-left",children:[
|
|
32
|
-
/* @__PURE__ */K("span",{className:"block truncate text-sm font-semibold text-ink-strong",children:Te}),ae?.email&&Te!==ae.email&&/* @__PURE__ */K("span",{className:"block truncate text-2xs text-ink-faint",children:ae.email})]})]})}),q&&!Z&&!se&&/* @__PURE__ */K(o,{side:"left",width:V,onResize:q,min:j,max:N,defaultWidth:v,storageKey:a,label:ke.resizeSidebar}),ze&&De&&/* @__PURE__ */D(S,{portal:!0,minWidth:224,onClose:()=>We(!1),style:U(V,De,window.innerHeight),children:[Z&&/* @__PURE__ */D("div",{className:"border-b border-line px-3 py-3",children:[
|
|
33
|
-
/* @__PURE__ */K("p",{className:"truncate text-sm font-semibold text-gray-800",children:Te}),ae?.email&&/* @__PURE__ */K("p",{className:"truncate text-xs text-gray-500",children:ae.email})]}),
|
|
34
|
-
/* @__PURE__ */D(L,{onClick:()=>{We(!1),te("/profile",!1)},children:[
|
|
35
|
-
/* @__PURE__ */K($,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.profile]}),ve.footerItems.map(e=>/* @__PURE__ */D(L,{onClick:()=>{We(!1),Ae(e)},children:[
|
|
36
|
-
/* @__PURE__ */K("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:de[e.to]}),e.menuLabel??e.label]},e.to)),oe&&/* @__PURE__ */D(L,{onClick:()=>{We(!1),oe()},children:[
|
|
37
|
-
/* @__PURE__ */K($,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.reportIssue]}),
|
|
38
|
-
/* @__PURE__ */K(z,{}),le&&/* @__PURE__ */D(J,{children:[
|
|
39
|
-
/* @__PURE__ */D(L,{onClick:()=>{We(!1),le()},children:[
|
|
40
|
-
/* @__PURE__ */K($,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.switchToDesktop]}),
|
|
41
|
-
/* @__PURE__ */K(z,{})]}),
|
|
42
|
-
/* @__PURE__ */D(L,{danger:!0,onClick:()=>{We(!1),ie()},children:[
|
|
43
|
-
/* @__PURE__ */K($,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.signOut]})]}),Se&&Z&&/* @__PURE__ */K(S,{portal:!0,minWidth:220,onClose:()=>Le(null),style:{left:V+f,top:Math.min(Se.top,window.innerHeight-48*Math.min(Se.items.length,10)-16)},children:m(Se.items,ye).map((e,t)=>/* @__PURE__ */D("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */K(z,{}),e.heading&&/* @__PURE__ */K(W,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */D(L,{onClick:()=>Ae(e),children:[Ie(e.to,de),
|
|
44
|
-
/* @__PURE__ */K("span",{className:e.to===re?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{U as accountMenuPosition,V as default};
|
package/dist/chunk-4LNO444F.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-5EWKVVUD.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-CDAJKLGL.js";import{Button_default as c}from"./chunk-EOVXFXVV.js";import{buttonClasses as s}from"./chunk-UQYNPYF4.js";import{Icon as m}from"./chunk-2UO47XB4.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{useHydrated as d}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-MBY5JIGB.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",U=e=>e.stopPropagation();function V({images:r,startIndex:y=0,onClose:V,onIndexChange:D,onOpenFile:L}){const $=h().lightbox,z=d(),A=p(null),F=p(null),[I,J]=x(y),W=r.length,B=z&&W>0,E=b(e=>{if(W<2)return;const t=((I+e)%W+W)%W;J(t),D?.(t)},[I,W,D]);if(a(B),l(A,B,F),i(B),k(()=>{if(B)return f(()=>(V(),!0),()=>A.current)},[B,V]),k(()=>{if(!B)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),E("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[B,E]),!B)return null;const G=r[Math.min(I,W-1)],O=j(G),P=G.caption||n(G.url);let X;return X="video"===O?/* @__PURE__ */v("video",{src:G.url,controls:!0,playsInline:!0,"aria-label":P,onClick:U,className:`${e} rounded-lg bg-black`}):"file"===O?/* @__PURE__ */w("div",{onClick:U,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
|
|
2
|
-
/* @__PURE__ */v(m,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
|
|
3
|
-
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:P}),L?/* @__PURE__ */v(c,{size:"sm",onClick:()=>L(G),children:$.openFile}):/* @__PURE__ */v("a",{href:G.url,target:"_blank",rel:"noopener noreferrer",className:s({size:"sm"}),children:$.openFile})]}):/* @__PURE__ */v(t,{src:G.url,alt:P,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
|
|
4
|
-
/* @__PURE__ */w("div",{ref:A,...o({role:"dialog",modal:!0,label:$.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:u.overlay},onClick:V,children:[X,
|
|
5
|
-
/* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:U,children:[
|
|
6
|
-
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:$.counter(I+1,W)}),
|
|
7
|
-
/* @__PURE__ */v("button",{ref:F,type:"button",onClick:V,"aria-label":$.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(m,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),W>1&&/* @__PURE__ */w(N,{children:[
|
|
8
|
-
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),E(-1)},"aria-label":$.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
|
|
9
|
-
/* @__PURE__ */v("button",{type:"button",onClick:e=>{U(e),E(1)},"aria-label":$.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(m,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
|
|
10
|
-
/* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:U,children:[
|
|
11
|
-
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:P}),"file"!==O&&/* @__PURE__ */v("a",{href:G.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:$.openOriginal})]})]}),document.body)}export{V as ImageLightbox,j as lightboxKind};
|
package/dist/chunk-56YJIKVI.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{ChartTooltip as e}from"./chunk-36VIGB6J.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.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-MBY5JIGB.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)),B=b??j.intensity,C=w??j.noActivity,D=h(null),F=t(D),G=g??F,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:D,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:C})});const I=y??l(0),L=v??Math.max(1,...p.flat().filter(Number.isFinite)),E=96,J=26*x.length,Q=M??J+26+26,T=Math.max(2,(Math.max(97,G)-E)/d.length),Z=e=>{const t=L>0?Math.max(0,Math.min(1,e/L)):0;return`color-mix(in oklab, ${I} ${(8+92*t).toFixed(1)}%, ${r.surface})`};/* @__PURE__ */
|
|
3
|
-
return u("div",{className:`relative ${k??""}`,ref:D,children:[
|
|
4
|
-
/* @__PURE__ */u("svg",{width:"100%",height:Q,viewBox:`0 0 ${G} ${Q}`,role:"img","aria-label":j.heatmap(B,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*T+A/2,y:26*t+A/2,width:Math.max(1,T-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}: ${z(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((G-E)/56))))===0?/* @__PURE__ */f("text",{x:E+t*T+T/2,y:J+15,textAnchor:"middle",fontSize:11,fill:r.label,children:e},`c${t}`):null),
|
|
9
|
-
/* @__PURE__ */f("rect",{x:E,y:J+26,width:Math.min(180,Math.max(40,G-E)),height:8,rx:4,fill:`url(#${R})`}),
|
|
10
|
-
/* @__PURE__ */f("text",{x:E,y:J+48,fontSize:11,fill:r.label,children:"0"}),
|
|
11
|
-
/* @__PURE__ */f("text",{x:E+Math.min(180,Math.max(40,G-E)),y:J+48,textAnchor:"end",fontSize:11,fill:r.label,style:{fontVariantNumeric:"tabular-nums"},children:z(L)})]}),S&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(e,{title:`${x[S.r]} · ${d[S.c]}`,rows:[{key:"v",label:B,color:I,value:null==p[S.r]?.[S.c]?void 0:z(p[S.r][S.c])}]})})]})}export{x as HeatmapChart};
|
package/dist/chunk-5PDHKH2A.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{DropdownMenu as e}from"./chunk-NZISMTQE.js";import{Button_default as i}from"./chunk-EOVXFXVV.js";import{iconButtonClasses as n}from"./chunk-UQYNPYF4.js";import{Icon as r}from"./chunk-2UO47XB4.js";import{Tooltip as a}from"./chunk-NJN5IKWO.js";import{forwardRef as l,useId as o}from"react";import{jsxs as s,jsx as t}from"react/jsx-runtime";var d="relative focus-visible:z-10",m={secondary:"border-l-0",primary:"border-l border-white/30",warning:"border-l border-white/30"},c=l(function({children:l,onClick:c,type:b="button",items:h,menuLabel:u,variant:f="primary",size:p="md",loading:v=!1,leftIcon:k,disabled:N=!1,disabledReason:g,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:C,menuFooterLabel:O,align:W="end",side:z="bottom",menuMinWidth:F,linkAs:I,block:L=!1,className:M=""},R){const V=N&&(null!=g&&""!==g&&!1!==g)&&!v,X=x&&null!=j&&""!==j&&!1!==j,$=o(),A=/* @__PURE__ */t(i,{ref:R,type:b,variant:f,size:p,loading:v,leftIcon:k,block:L,disabled:N&&!V,"aria-disabled":!!V||void 0,disabledReason:V?g:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),B=L?"relative flex min-w-0 flex-1":"relative inline-flex",D=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
|
|
2
|
-
return s("div",{className:[L?"flex w-full":"inline-flex","items-stretch",M].filter(Boolean).join(" "),children:[null==w||""===w||V?A:/* @__PURE__ */t(a,{content:w,className:B,children:A}),
|
|
3
|
-
/* @__PURE__ */t(a,{content:X?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":X?$:void 0,items:h,align:W,side:z,minWidth:F,linkAs:I,disabled:x&&!X,"aria-disabled":X,onOpenChange:y,footer:C,footerLabel:O,triggerClassName:n({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(r,{name:"chevron-down",className:D,strokeWidth:2,"aria-hidden":"true"})})}),X&&/* @__PURE__ */t("span",{id:$,className:"sr-only",children:j})]})});export{c as SplitButton_default};
|
package/dist/chunk-6E47JSLM.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{ChartBrush as t}from"./chunk-RLTTAH46.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-QTNMALBN.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{ChartTooltip as p}from"./chunk-36VIGB6J.js";import{useDragZoom as g,DragBand as y,ChartZoomSummary as k,tooltipBesideBand as x}from"./chunk-CFJL6MML.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{usePlotWidth as L}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as A,CHART_INK as V,STATUS_VARS as z}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as R}from"./chunk-TWVUQUUD.js";import{useShellStrings as C,useShellLocale as S}from"./chunk-MBY5JIGB.js";import{formatPercent as T,formatPlain as W}from"./chunk-C3QOHMR6.js";import{useRef as E,useState as D,useId as I,useEffect as U}from"react";import{jsx as B,jsxs as P}from"react/jsx-runtime";var F=12,O=16,Y=26,J=52,Q=t=>"number"==typeof t&&Number.isFinite(t);function G({series:G,labels:H,height:K=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,Lt=S(),At=rt??(t=>W(t,Lt)),Vt=ot??At,zt=jt??$t.noData,Rt=E(null),Ct=L(Rt),St=Nt??Ct,[Tt,Wt]=D(null),[Et,Dt]=D(null),{highlighted:It}=u(),Ut=I(),Bt=ut??Et,Pt=g(ht&&Bt?Bt[1]-Bt[0]+1:H.length,pt);if(U(()=>{if(null!==Tt)return R(t=>"Escape"===t.key&&(Wt(null),!0))},[Tt]),kt)/* @__PURE__ */
|
|
2
|
-
return B("div",{className:wt,ref:Rt,children:/* @__PURE__ */B(h,{height:K,width:Nt??Ct})});const Ft=H,Ot=ut??Et??[0,Math.max(0,Ft.length-1)],[Yt,Jt]=Ot,Qt=t=>Pt.slice(ht?t.slice(Yt,Jt+1):t),Gt=lt?Qt(lt):void 0,Ht=G.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(Q)).map(t=>({...t,data:Qt(t.data),pointTones:t.pointTones?Qt(t.pointTones):void 0})),Kt=t=>(ht?Yt:0)+(Pt.view?.[0]??0)+t;if(H=Qt(Ft),0===Ht.length||0===H.length)/* @__PURE__ */
|
|
3
|
-
return B("div",{className:wt,ref:Rt,children:/* @__PURE__ */B("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:K},children:zt})});const Zt=H.map((t,e)=>Ht.reduce((t,a)=>t+(Q(a.data[e])?a.data[e]:0),0)),Xt=(t,e)=>Zt[e]>0?t/Zt[e]:null,qt=[];if(Z){let t=H.map(()=>0);for(const e of Ht)t=t.map((t,a)=>t+(Q(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&&Ht.some(te)&&Ht.some(t=>!te(t)),ae=gt&&!Z?gt:null,re=t=>!!ae&&"column"===t.mode,oe=(ee?Ht.filter(t=>!te(t)):Ht).filter(t=>!re(t)),le=ee?Ht.filter(te).flatMap(t=>t.data.filter(Q)):[],ne=Z?(qt.at(-1)??[]).filter(Q):oe.flatMap(t=>t.data.filter(Q)),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=>T(Math.round(100*t),0,Lt):At,he=_t?q:se?se.ticks:N([ce,de],{from:0,to:1}).ticks(at+1),ue=w(he.map(me),J),fe=ie?w(ie.right.ticks.map(At),O):O,pe={left:ue,right:Math.max(ue+1,St-fe),top:F,bottom:K-Y},ge=j(H.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=Ht.filter(re),Me=Math.max(0,...H.map((t,e)=>be.reduce((t,a)=>t+Math.max(0,Q(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)})),Le=t=>e=>{e.preventDefault(),Wt(e=>{const a=(e??0)+t;return Math.min(H.length-1,Math.max(0,a))})},Ae=Math.max(1,Math.ceil(H.length/Math.max(1,Math.floor(St/96))));/* @__PURE__ */
|
|
4
|
-
return P("div",{className:`relative ${wt??""}`,ref:Rt,children:[
|
|
5
|
-
/* @__PURE__ */P("svg",{width:"100%",height:K,viewBox:`0 0 ${St} ${K}`,role:"img","aria-label":$t.overIntervals(Ht.map(t=>t.label),H.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Wt(null),onBlur:()=>Wt(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==Tt&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Kt(Tt));"ArrowRight"===t.key&&Le(1)(t),"ArrowLeft"===t.key&&Le(-1)(t)},children:[
|
|
6
|
-
/* @__PURE__ */B("defs",{children:/* @__PURE__ */B("clipPath",{id:Ut,children:/* @__PURE__ */B("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
|
|
7
|
-
/* @__PURE__ */B(n,{id:Ut,fills:Ht.map((t,e)=>({color:A(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:Z?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */B("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:V.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
|
|
8
|
-
/* @__PURE__ */B("line",{x1:pe.left,y1:xe,x2:pe.right,y2:xe,stroke:V.axis,strokeWidth:1,shapeRendering:"crispEdges"}),$e.map(t=>/* @__PURE__ */B("text",{x:pe.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:V.label,style:{fontVariantNumeric:"tabular-nums"},children:me(t.value)},`ytick-${t.value}`)),ie&&$e.map((t,e)=>/* @__PURE__ */B("text",{x:pe.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:V.label,style:{fontVariantNumeric:"tabular-nums"},children:At(ie.right.ticks[e])},`ytick-r-${t.value}`)),nt&&/* @__PURE__ */B("text",{x:12,y:(pe.top+pe.bottom)/2,transform:`rotate(-90 12 ${(pe.top+pe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:V.label,children:nt}),
|
|
9
|
-
/* @__PURE__ */B("g",{clipPath:`url(#${Ut})`,mask:xt&&vt?`url(#${m(Ut)})`:void 0,children:Ht.map((t,e)=>{const n=A(t.slot,t.color,t.tone),m=t.mode??(Z?"area":"line"),h=f(t.key,It);if("step"===m){const e=H.map((e,a)=>({start:ge(a),end:ge.end(a),value:t.data[a]})).filter(t=>Q(t.value)).map(e=>({start:e.start,end:e.end,y:je(t)(e.value)}));/* @__PURE__ */
|
|
10
|
-
return B("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=H.map((a,r)=>{const o=Z?qt[e]?.[r]:t.data[r];return Q(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__ */B("g",{opacity:h??void 0,className:"rosh-viz-mark",children:H.map((o,l)=>{const i=t.data[l];if(!Q(i)||i<=0)return null;const s=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Ht[t]?.key)).reduce((t,a)=>t+Math.max(0,Q(a.data[e])?a.data[e]:0),0))(e,l),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
|
|
11
|
-
return B("rect",{x:ge.center(l)-a/2,y:c,width:a,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[l]?z[t.pointTones[l]]:n,fillOpacity:r?1:.55},l)})},t.key):/* @__PURE__ */B("g",{opacity:h??void 0,className:"rosh-viz-mark",children:H.map((l,c)=>{const d=Z?qt[e]?.[c]:t.data[c];if(!Q(d))return null;const m=o(d);/* @__PURE__ */
|
|
12
|
-
return B("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?H.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 P("g",{opacity:h??void 0,className:"rosh-viz-mark",children:[("area"===m||Z)&&
|
|
14
|
-
/* @__PURE__ */B("path",{d:y,fill:c(Ut,e,t.fillVariant??bt,n),stroke:"none"}),
|
|
15
|
-
/* @__PURE__ */B("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??z[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
|
|
16
|
-
return P("g",{children:[
|
|
17
|
-
/* @__PURE__ */B("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */B("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"))&&Ht.map((t,a)=>{if("column"===t.mode)return null;const r=ct??(st?"last":"none"),o=A(t.slot,t.color,t.tone),l=[...t.data].map(Q).lastIndexOf(!0),n="all"===r?H.map((t,e)=>e).filter(e=>Q(Z?qt[a]?.[e]:t.data[e])):l>=0?[l]:[];/* @__PURE__ */
|
|
18
|
-
return P("g",{children:[n.map(r=>{const n=Z?qt[a]?.[r]:t.data[r];return Q(n)?/* @__PURE__ */B(e,{cx:ge.center(r),cy:je(t)(n),color:o,variant:dt,pulse:mt&&r===l,title:`${H[r]}: ${t.label} ${At(n)}`},r):null}),st&&l>=0&&Q(Z?qt[a]?.[l]:t.data[l])&&/* @__PURE__ */B("text",{x:ge.center(l)-10,y:je(t)(Z?qt[a]?.[l]:t.data[l])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:V.label,style:{fontVariantNumeric:"tabular-nums"},children:At(Z?qt[a]?.[l]:t.data[l])})]},`dots-${t.key}`)}),H.map((t,e)=>e%Ae===0?/* @__PURE__ */B("text",{x:ge.center(e),y:K-8,textAnchor:"middle",fontSize:11,fill:V.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==Tt&&/* @__PURE__ */B("line",{x1:ge.center(Tt),y1:pe.top,x2:ge.center(Tt),y2:pe.bottom,stroke:V.axis,strokeWidth:1}),ae&&Me>0&&
|
|
19
|
-
/* @__PURE__ */P("g",{pointerEvents:"none","data-column-strip":"true",children:[
|
|
20
|
-
/* @__PURE__ */B("line",{x1:pe.left,y1:Ne(Me),x2:pe.right,y2:Ne(Me),stroke:V.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
|
|
21
|
-
/* @__PURE__ */B("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:V.label,style:{fontVariantNumeric:"tabular-nums"},children:At(Me)})]}),Pt.drag&&/* @__PURE__ */B(y,{x0:ge(Pt.drag[0]),x1:ge(Pt.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),H.map((t,e)=>/* @__PURE__ */B("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>Wt(e),onPointerDown:()=>Pt.press(e),onPointerEnter:()=>Pt.over(e),onPointerUp:Pt.release,onClick:yt?()=>yt(Kt(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),Pt.view&&/* @__PURE__ */B(k,{from:Gt?.[0]??H[0],to:Gt?.at(-1)??H[H.length-1],count:H.length,total:Z&&"percent"!==X?Vt(Zt.reduce((t,e)=>t+e,0)):ae?Vt(be.reduce((t,e)=>t+e.data.filter(Q).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Ht).filter(t=>t.data.some(Q)).map(t=>{const e=t.data.filter(Q),a=A(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?Vt(r):$t.zoomLevel(Vt(r/e.length),Vt(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:Pt.clear}),ht&&Ft.length>2&&/* @__PURE__ */B(t,{className:"mt-1",labels:Ft,width:St,data:G[0]?.data??[],range:Ot,onRangeChange:t=>{ft?ft(t):Dt(t)}}),null!==Tt&&
|
|
22
|
-
/* @__PURE__ */B("div",{className:"pointer-events-none absolute top-2 z-10",style:x(ge.center(Tt),ge.bandwidth,St),children:/* @__PURE__ */B(p,{title:Gt?.[Tt]??H[Tt],rows:Ht.map((t,e)=>({key:t.key,label:t.label,color:A(t.slot,t.color,t.tone),value:Q(t.data[Tt])?Z&&"percent"===X?`${T(100*(Xt(t.data[Tt],Tt)??0),1,Lt)} · ${Vt(t.data[Tt])}`:Vt(t.data[Tt]):void 0})),footnote:Z&&"percent"===X?$t.inBucket(Vt(Zt[Tt])):void 0})})]})}export{G as TimeSeriesChart};
|
package/dist/chunk-AEMAGYIZ.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as t}from"./chunk-5PP435FL.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-36VIGB6J.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-MBY5JIGB.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,F]=c(null),{highlighted:E}=o(),C=h(u,f,x,$.other),{labels:I,matrix:z,otherIndex:A,foldedCount:B}=C,L=(t,e)=>z[t]?.[e]??0,P=t=>t===A?r.muted:a(t),O=C.totals,Q=I.map((t,e)=>e).sort((t,e)=>O[e]-O[t]),V=Q.reduce((t,e)=>t+O[e],0);if(V<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:j});const Y=p/2,G=p/2,H=p/2-44,J=H-b,R=g*Q.length,T=/* @__PURE__ */new Map;let U=-Math.PI/2;Q.forEach((t,e)=>{const o=O[t]/V*(2*Math.PI-R);T.set(t,{start:U,end:U+o,slot:e}),U+=o+g});const W=/* @__PURE__ */new Map,S=[];for(const t of Q)for(const e of Q){const o=L(t,e);if(o<=0)continue;const n=T.get(t),r=o/Math.max(1,O[t])*(n.end-n.start),a=W.get(t)??0;W.set(t,a+r),S.push({from:t,to:e,value:o,a:n.start+a+r/2,b:T.get(e).start+(T.get(e).end-T.get(e).start)/2})}const Z=(t,e)=>[Y+e*Math.cos(t),G+e*Math.sin(t)],q="arc"===y?.kind?y.index:void 0,D="ribbon"===y?.kind?S[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(Q.length),onMouseLeave:()=>F(null),children:[S.map((t,e)=>{const[o,n]=Z(t.a,J),[r,a]=Z(t.b,J),l=P(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==E?I[t.from]===E||I[t.to]===E:null)(t,e);/* @__PURE__ */
|
|
4
|
-
return d("path",{d:`M${o},${n} Q${Y},${G} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/V*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>F({kind:"ribbon",index:e})},`${I[t.from]}→${I[t.to]}`)}),Q.map(t=>{const o=T.get(t),n=(o.start+o.end)/2,[a,l]=Z(n,H+16),i=(t=>y?"arc"===y.kind?y.index===t:S[y.index].from===t||S[y.index].to===t:null!==E?I[t]===E:null)(t);/* @__PURE__ */
|
|
5
|
-
return m("g",{onMouseEnter:()=>F({kind:"arc",index:t}),children:[
|
|
6
|
-
/* @__PURE__ */d("path",{d:e(Y,G,J,H,o.start,o.end),fill:P(t),fillOpacity:null===i||i?1:.45}),
|
|
7
|
-
/* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:I[t]})]},t)})]}),B>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(B)}),void 0!==q&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:I[q],rows:[{key:"total",label:$.totalFlow,color:P(q),value:N(O[q])}]})}),D&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${I[D.from]} → ${I[D.to]}`,rows:[{key:"value",label:$.flow,color:P(D.from),value:N(D.value)}]})}),
|
|
8
|
-
/* @__PURE__ */d(t,{caption:$.chord(Q.length),head:[$.tableFrom,$.tableTo,$.value],rows:S.map(t=>[I[t.from],I[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
package/dist/chunk-ATURDO2C.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{ChartTooltip as t}from"./chunk-36VIGB6J.js";import{usePlotWidth as l}from"./chunk-MAFUXCPZ.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-MBY5JIGB.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,B]=m(null),{highlighted:w}=e(),C=s(null),F=l(C,560),W=$??F;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const Z=b??a(0),E=p??54*x.length,H=Math.max(...x.map(e=>e.value),1),Y="bars"===v,G=Y?Math.round(Math.min(132,Math.max(80,.24*W))):Math.round(Math.min(168,Math.max(104,.38*W))),I=e=>{const t=x[e-1]?.value;return null!=t&&t>0?100*(1-x[e].value/t):null},J=e=>{const t=I(e);return{count:S(x[e].value),drop:null!=t?`−${u(t,1,L)}`:""}},R=Y?Math.ceil(Math.max(...x.map((e,t)=>{const{count:l,drop:a}=J(t);return.62*(l.length+(a?a.length+1:0))*12}))+16):0,U=W-G-R,O=Math.max(Y?2:0,Math.min(M,U)),P=e=>Math.max(O,U*Math.max(0,e/H)),Q=e=>P(e)/2,T=G+U/2,X=e=>46+e/Math.max(1,x.length-1)*54,q=e=>`color-mix(in oklab, ${Z} ${X(e).toFixed(0)}%, ${n.surface})`,D=e=>X(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:C,children:[
|
|
3
|
-
/* @__PURE__ */f("svg",{width:"100%",height:E,viewBox:`0 0 ${W} ${E}`,role:"img","aria-labelledby":z,onMouseLeave:()=>B(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*E/x.length+g/2,a=(t+1)*E/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(Y){const u=G,h=u+P(e.value),{count:c,drop:m}=J(t);/* @__PURE__ */
|
|
5
|
-
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>B(t),children:[
|
|
6
|
-
/* @__PURE__ */d("path",{d:`M${u},${l} L${h},${l} L${h},${a} L${u},${a} Z`,fill:q(t)}),
|
|
7
|
-
/* @__PURE__ */d("text",{x:G-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:D(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=Q(e.value),c="cone"===v?Q(x[t+1]?.value??e.value):h,m=I(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
|
|
10
|
-
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>B(t),children:[
|
|
11
|
-
/* @__PURE__ */d("path",{d:`M${T-h},${l} L${T+h},${l} L${T+c},${a} L${T-c},${a} Z`,fill:q(t)}),
|
|
12
|
-
/* @__PURE__ */d("text",{x:G-14,y:r-2,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),
|
|
13
|
-
/* @__PURE__ */f("text",{x:G-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?T:T+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?D(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(t,{title:_.label,rows:[{key:"value",label:N.count,color:q(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-D7DRZKUI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{setSpreadsheetPreview as e}from"./chunk-WVIUU4BZ.js";import{setPdfPreview as t}from"./chunk-ESL5TDNA.js";import{toast_default as n}from"./chunk-A3AKJDLI.js";var i="react-os-shell:preview-opened";async function o(o){const{filePath:a,filename:r,kind:c,onStaged:s}=o;try{const o=await fetch(`${("undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000").replace(/\/$/,"")}/api/file?path=${encodeURIComponent(a)}`,{credentials:"include"});if(!o.ok)return n.error(`Download failed (${o.status})`),!1;const d=await o.blob();if("csv"===c){const t=await d.text();e({csv:t,filename:r}),s?.("/spreadsheet")}else{const e=URL.createObjectURL(d);t({url:e,filename:r,kind:c}),s?.("/preview")}return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(i,{detail:{filePath:a,filename:r,kind:c}})),!0}catch(e){return n.error(e?.message||"Open failed"),!1}}export{i as PREVIEW_OPENED_EVENT,o as openPreviewFile};
|
package/dist/chunk-EJBR5Y4X.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{ImageFocusPoint as e}from"./chunk-HCKCQIWA.js";import{Segmented as a}from"./chunk-S4FPYCUU.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-5EWKVVUD.js";import{TransferProgress as u}from"./chunk-46VLN6KC.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-LBGRLG3Y.js";import{Icon as p}from"./chunk-2UO47XB4.js";import{useShellStrings as b}from"./chunk-MBY5JIGB.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 L({value:L,onChange:w,onPick:C,onFile:R,label:U,hint:F,error:B,required:O,className:P,accept:$="image/*",maxSizeBytes:z,fit:K="cover",height:H=112,placeholder:I,cta:V,acceptHint:W,showFilename:Y=!0,allowReplace:q=!0,allowRemove:G=!0,replaceLabel:S,removeLabel:A,busy:D=!1,busyLabel:_,choosingLabel:E,pickFailedLabel:J,progress:M,disabled:Q=!1,kind:X,onKindChange:T,focus:Z,onFocusChange:ee,focusLabel:ae}){const ie=b().media,te=V??ie.cta,oe=X??(/video/.test($)&&!/image/.test($)?"video":"image"),re="string"==typeof A&&A?A:ie.remove,[ne,le]=g(!1),[se,ce]=g(!1),de=v(!0);f(()=>()=>{de.current=!1},[]);const ue=D||ne,me=ne&&!D?E??ie.choosing:_??ie.uploading,he=B??(se?J??ie.pickFailed:void 0),pe=e=>{if(!C)return;ce(!1);const a=C(e);a&&"function"==typeof a.then&&(le(!0),a.then(e=>{de.current&&(le(!1),"string"==typeof e&&e&&w(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=Q||ue,ke=!!L&&(t(L,$)||L===ve),je=I??o($,ie),xe=S??(ke||"video"===oe?ie.changeVideo:ie.changeImage),Ne=e=>{C?pe(e):R?R(e):(e=>{ge.current&&URL.revokeObjectURL(ge.current);const a=URL.createObjectURL(e);ge.current=a,fe(e.type.startsWith("video/")?a:null),w(a)})(e)},Le=m({accept:$,maxSizeBytes:z,acceptHint:W,multiple:!1,disabled:ye,onAccept:([e])=>Ne(e)}),{dragOver:we}=Le,Ce=()=>{ye||(C?pe():Le.open())},Re=L?r(L):"",Ue=!ke&&!!ee,Fe=Q||!q&&!G?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:[q&&/* @__PURE__ */k("button",{id:Ue?void 0:be,type:"button","aria-labelledby":`${be}-change`,onClick:()=>Ce(),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})]}),G&&/* @__PURE__ */j("button",{type:"button","aria-label":re,onClick:()=>{ge.current&&(URL.revokeObjectURL(ge.current),ge.current=null),fe(null),w("")},disabled:ue,className:`ml-auto w-8 shrink-0 ${N}`,children:/* @__PURE__ */j(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Be=/* @__PURE__ */k("div",{...Le.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden rounded-(--radius-control) border transition-colors",Ue?"":"bg-gray-100",we?"border-blue-500":"border-line"].join(" "),style:Ue?void 0:{height:H},children:[Ue?
|
|
4
|
-
/* @__PURE__ */j(e,{value:Z??"",onChange:e=>ee?.(e),label:ae??ie.focus,image:L,hint:null,id:be,disabled:ye,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):ke?/* @__PURE__ */j("video",{src:L??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Re||void 0,className:"h-full w-full",style:{objectFit:K}}):/* @__PURE__ */j("img",{src:L??void 0,alt:Re,className:"h-full w-full",style:{objectFit:K,objectPosition:Z||void 0}}),Y&&L&&/* @__PURE__ */j(n,{children:Re}),Fe,ue&&/* @__PURE__ */j(l,{label:me,progress:M,rounded:"rounded-md"})]}),Oe=/* @__PURE__ */j("button",{type:"button",id:be,onClick:()=>Ce(),disabled:ye,"aria-label":"string"==typeof je?je:ie.upload,"aria-busy":ue||void 0,"aria-invalid":!!he||void 0,"aria-required":O||void 0,"aria-describedby":he?`${be}-error`:F?`${be}-hint`:void 0,...Le.zoneProps,className:c(we,ye,d(ye)),style:{minHeight:H},children:ue?/* @__PURE__ */j(u,{state:"busy",verb:me,pct:M}):/* @__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}),W&&/* @__PURE__ */j("span",{className:"text-xs text-ink-faintest",children:W})]})});/* @__PURE__ */
|
|
8
|
-
return k(i,{label:U,htmlFor:be,hint:F,error:he,required:O,className:P,children:[T&&/* @__PURE__ */j("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */j(a,{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})}),L?Be:Oe,!C&&/* @__PURE__ */j("input",{...Le.inputProps}),
|
|
9
|
-
/* @__PURE__ */j(h,{rejections:Le.rejections})]})}export{L as MediaUploadField};
|
package/dist/chunk-EZBE3H2W.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-5PP435FL.js";import{bumpPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as n}from"./chunk-CNYAHYE6.js";import{ChartTooltip as o}from"./chunk-36VIGB6J.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-MBY5JIGB.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,F=c(null),C=l(F),E=x??C,[A,B]=m(null),{highlighted:P}=n();if(0===f.length||0===k.length)/* @__PURE__ */
|
|
2
|
-
return d("div",{className:M,ref:F,children:/* @__PURE__ */d("p",{className:"py-8 text-center text-sm text-gray-500",children:N})});const z=[...new Set(f.map(e=>e.depth))].sort((e,t)=>e-t),L=e=>z.length<=1?0:z.indexOf(e)/(z.length-1)*(E-g-140)+70,O=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)]})),U=/* @__PURE__ */new Map;for(const e of f)U.set(e.depth,[...U.get(e.depth)??[],e]);const V=Math.max(...[...U.values()].map(e=>e.reduce((e,t)=>e+(O.get(t.key)??0),0))),Y=p-20,G=V>0?(Y-y*(Math.max(...[...U.values()].map(e=>e.length))-1))/V:0,H=/* @__PURE__ */new Map;for(const[e,t]of U){const n=t.map(e=>Math.max(2,(O.get(e.key)??0)*G)),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>Y&&l>0?Math.max(0,1-(o-Y)/l):1;let a=10;t.forEach((t,o)=>{const l=2+Math.max(0,n[o]-2)*r;H.set(t.key,{x:L(e),y:a,h:l,index:o}),a+=l+y})}const I=/* @__PURE__ */new Map,J=/* @__PURE__ */new Map,Q=/* @__PURE__ */new Map,R=(e,t)=>e.from===t||e.to===t,S="link"===A?.kind?k[A.index]:void 0,T="node"===A?.kind?f.find(e=>e.key===A.key):void 0;/* @__PURE__ */
|
|
3
|
-
return u("div",{className:`relative ${M??""}`,ref:F,children:[
|
|
4
|
-
/* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${E} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>B(null),children:[k.map((e,n)=>{const o=H.get(e.from),l=H.get(e.to);if(!o||!l)return null;const a=Math.max(1,e.value*G),i=o.y+(I.get(e.from)??0)+a/2,s=l.y+(J.get(e.to)??0)+a/2;I.set(e.from,(I.get(e.from)??0)+a),J.set(e.to,(J.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=Q.get(u)??0;Q.set(u,f+1);const k=((e,t)=>A?"link"===A.kind?A.index===t:R(e,A.key):null!==P?R(e,P):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:()=>B({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=H.get(e.key);if(!t)return null;const n=t.x>E/2,o=(l=e.key,A?"node"===A.kind?A.key===l:R(k[A.index],l):null!==P?P===l:null);var l;/* @__PURE__ */
|
|
6
|
-
return u("g",{opacity:null===o||o?1:.45,onMouseEnter:()=>B({kind:"node",key:e.key}),children:[
|
|
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)})]}),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(H.get(S.from)?.index??0,S.color),value:$(S.value)}]})}),T&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(o,{title:T.label,rows:[{key:"value",label:b.throughput,color:r(H.get(T.key)?.index??0,T.color,T.tone),value:$(O.get(T.key)??0)}]})}),
|
|
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};
|
package/dist/chunk-HTB5AEZU.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{Calendar as e}from"./chunk-JQHL4B4C.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-MBY5JIGB.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 C=f(function({value:f,onChange:k,min:C,max:F,invalid:W,size:J,native:L,weekStartsOn:O,className:Y="","aria-label":$,"aria-describedby":q,"aria-labelledby":E,id:I,name:S,disabled:U,placeholder:z,required:G,clearable:M,form:T,title:H,tabIndex:P,autoFocus:Q,onFocus:X,onBlur:A,...K},R){const V=M??!G,Z=B(f),_=B(C),ee=B(F),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=!!I&&(le.current?.labels?.length??0)>0;e!==be&&fe(e)});const pe=!$&&(!!E||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]),L)/* @__PURE__ */
|
|
2
|
-
return x("input",{ref:R,type:"date",lang:re,id:I,name:S,disabled:U,"aria-label":$,"aria-describedby":q,"aria-invalid":W||void 0,value:Z,min:_||void 0,max:ee||void 0,onChange:e=>k?.(t(e.target.value)),className:a({invalid:W,size:J,className:Y}),"aria-labelledby":E,required:G,form:T,title:H,tabIndex:P,autoFocus:Q,onFocus:X,onBlur:A,...K});const he=Object.fromEntries(Object.entries(K).filter(([e])=>j.test(e)&&!w.has(e))),ve=K["aria-required"],ge=!!G||!0===ve||"true"===ve,ye=[pe?ue:void 0,ge?ce:void 0,q].filter(Boolean).join(" ")||void 0,xe=r(/* @__PURE__ */new Date),Ne=(!_||xe>=_)&&(!ee||xe<=ee),ke=z??te.placeholder;/* @__PURE__ */
|
|
3
|
-
return N("div",{ref:oe,className:"relative",children:[
|
|
4
|
-
/* @__PURE__ */x("input",{ref:R,type:"hidden",name:S,form:T,value:Z}),
|
|
5
|
-
/* @__PURE__ */N("button",{ref:le,type:"button",...he,id:I,disabled:U,title:H,tabIndex:P,autoFocus:Q,onFocus:X,onBlur:A,"aria-haspopup":"dialog","aria-expanded":ne,"aria-controls":ne?de:void 0,"aria-labelledby":E,"aria-describedby":ye,"aria-label":$?`${$}${Z?`, ${D(Z,ae)}`:""}`:void 0,onClick:()=>ie(e=>!e),className:`${a({invalid:W,size:J,className:Y})} flex items-center justify-between text-left`,children:[
|
|
6
|
-
/* @__PURE__ */x("span",{className:Z?"text-ink-strongest":n,children:Z?D(Z,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:Z?D(Z,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":$??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:Z||null,min:_||null,max:ee||null,weekStartsOn:O,onSelect:e=>{ie(!1),le.current?.focus(),k?.(t(e))}}),(V||Ne)&&/* @__PURE__ */N("div",{className:"mt-2 flex justify-between border-t border-gray-100 pt-2",children:[V&&/* @__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{C as DatePicker_default};
|
package/dist/chunk-IJXMWWTM.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{ChartDefs as t,MOTION as e,stagger as a,glowId as i}from"./chunk-465RRWBY.js";import{ChartSkeleton as n}from"./chunk-QTNMALBN.js";import{useHighlight as o,autoHighlightIndex as l,highlightOpacity as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as s}from"./chunk-36VIGB6J.js";import{CartesianPlot as m}from"./chunk-N7LDQZTL.js";import{useDragZoom as u,ChartZoomSummary as c}from"./chunk-CFJL6MML.js";import{CHART_INK as d,resolveSeriesColor as h,STATUS_VARS as f}from"./chunk-TZFACUMR.js";import{useShellStrings as p,useShellLocale as b}from"./chunk-MBY5JIGB.js";import{formatPercent as x,formatPlain as y}from"./chunk-C3QOHMR6.js";import{useId as M}from"react";import{jsx as v,jsxs as g,Fragment as k}from"react/jsx-runtime";function N({stacked:N=!1,stackMode:w="value",height:$=220,width:L,max:C,formatValue:j,yAxisLabel:F,className:A,emptyLabel:T,radius:z=3,loading:B=!1,animate:V=!0,glow:S=!1,emphasise:R=!1,activeKey:Y,highlight:E="none",valueLabels:G=!1,onSelect:J,min:O,formatTooltipValue:Q,tooltipLabels:H,barGap:I=4,seriesLabels:W=!1,zoomable:Z=!0,series:D,labels:K}){const U=M(),q=u(K.length,Z),P=q.view?.[0]??0,X=q.slice(K),_=H?q.slice(H):void 0,tt=D.map(t=>({...t,data:q.slice(t.data),pointTones:t.pointTones?q.slice(t.pointTones):void 0,pointColors:t.pointColors?q.slice(t.pointColors):void 0})),{highlighted:et}=o(),at=p().charts,it=b(),nt=j??(t=>y(t,it)),ot=Q??nt;if(B)/* @__PURE__ */return v(n,{height:$,width:L,variant:"bars",className:A});const lt=(t,e)=>{const a=t.pointColors?.[e];if(a)return a;const i=t.pointTones?.[e];return i?f[i]:h(t.slot,t.color,t.tone)},rt=tt.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(t=>Number.isFinite(t))),st=(t,e)=>{const a=t.data[e];return"number"==typeof a&&Number.isFinite(a)?a:0},mt=X.map((t,e)=>rt.reduce((t,a)=>t+st(a,e),0)),ut=X.map((t,e)=>rt.reduce((t,a)=>t+Math.max(0,st(a,e)),0)),ct=X.map((t,e)=>rt.reduce((t,a)=>t+Math.min(0,st(a,e)),0)),dt=N&&"percent"===w,ht=(t,e)=>mt[e]>0?t/mt[e]:null,ft=dt?[1]:N?[...ut,...ct]:rt.flatMap(t=>t.data.filter(Number.isFinite)),pt=(t,e)=>{const a=t.bandwidth/Math.max(1,rt.length),i=rt.length>1?Math.min(I,.25*a):0;return{offset:e*a+i/2,width:Math.max(1,a-i)}},bt=W&&!N?({x:t,y:e})=>{const a=Math.min(e.domain[1],Math.max(e.domain[0],0));return X.map((i,n)=>rt.map((i,o)=>{const l=i.data[n];if(!Number.isFinite(l))return null;const r=Math.min(e.domain[1],Math.max(e.domain[0],l)),{offset:s,width:m}=pt(t,o),u=t(n)+s+m/2,c=Math.min(e(r),e(a)),h=Math.max(e(r),e(a));if(m<13)return null;const f=Math.floor((h-c-12)/6.6),p=f>=Math.min(4,i.label.length),b=p&&i.label.length>f?`${i.label.slice(0,f-1).trimEnd()}…`:i.label,x=p?h-6:c-4;/* @__PURE__ */
|
|
2
|
-
return v("text",{"data-series-label":"true",x:u,y:x,transform:`rotate(-90 ${u} ${x})`,textAnchor:"start",dominantBaseline:"central",fontSize:11,fill:p?d.surface:d.label,children:b},`n${i.key}-${n}`)}))}:null;/* @__PURE__ */
|
|
3
|
-
return g(k,{children:[
|
|
4
|
-
/* @__PURE__ */v(m,{labels:X,values:ft,height:$,width:L,max:dt?1:C,min:dt?void 0:O,formatValue:dt?t=>x(Math.round(100*t),0,it):nt,yAxisLabel:F,className:A,emptyLabel:T,onSelect:J?t=>J(P+t):void 0,zoom:Z?q:void 0,ariaLabel:at.acrossCategories(rt.map(t=>t.label),X.length),tooltip:t=>/* @__PURE__ */v(s,{title:_?.[t]??X[t],rows:rt.map(e=>({key:e.key,label:e.label,color:lt(e,t),value:Number.isFinite(e.data[t])?dt?`${x(100*(ht(e.data[t],t)??0),1,it)} · ${ot(e.data[t])}`:ot(e.data[t]):void 0})),footnote:dt?at.inCategory(ot(mt[t])):void 0}),overlay:G&&!dt||bt?({x:t,y:e})=>/* @__PURE__ */g("g",{pointerEvents:"none",children:[bt?.({x:t,y:e}),G&&!dt&&X.map((a,i)=>{if(N){if(!rt.some(t=>Number.isFinite(t.data[i])))return null;const a=rt.reduce((t,e)=>t+st(e,i),0),n=a>=0?ut[i]:ct[i];/* @__PURE__ */
|
|
5
|
-
return v("text",{"data-value-label":"true",x:t.center(i),y:a>=0?e(n)-4:e(n)+12,textAnchor:"middle",fontSize:11,fill:d.label,style:{fontVariantNumeric:"tabular-nums"},children:nt(a)},`v${i}`)}return rt.map((a,n)=>{const o=a.data[i];if(!Number.isFinite(o))return null;const l=o,{offset:r,width:s}=pt(t,n);/* @__PURE__ */
|
|
6
|
-
return v("text",{"data-value-label":"true",x:t(i)+r+s/2,y:l>=0?e(l)-4:e(l)+12,textAnchor:"middle",fontSize:11,fill:d.label,style:{fontVariantNumeric:"tabular-nums"},children:nt(l)},`v${a.key}-${i}`)})})]}):void 0,children:({x:n,y:o,bottom:s,active:m})=>{const u=Y?X.indexOf(Y):-1,c=l(N?mt:rt[0]?.data??[],E),h=m??(u>=0?u:c);/* @__PURE__ */
|
|
7
|
-
return g("g",{children:[
|
|
8
|
-
/* @__PURE__ */v(t,{id:U,glow:S}),X.map((t,l)=>{let s=0,m=0;const u=o(Math.min(o.domain[1],Math.max(o.domain[0],0)));return rt.map((t,c)=>{const f=t.data[l];if(!Number.isFinite(f))return null;const p=dt?ht(f,l):f;if(null===p)return null;const b=lt(t,l),x=pt(n,c),y=N?n(l):n(l)+x.offset,M=N?Math.max(1,n.bandwidth):x.width;let g,k,w=!0;if(N){const t=p>=0?s:m,e=t+p;p>=0?s=e:m=e,g=o(Math.max(t,e)),k=o(Math.min(t,e)),w=0===t}else g=Math.min(o(p),u),k=Math.max(o(p),u);const $=Math.max(0,k-g-(N&&!w?2:0)),L=null===h||h===l,C=L?b:R?d.muted:b,j=r(t.key,et);/* @__PURE__ */
|
|
9
|
-
return v("rect",{x:y,y:g,width:M,height:$,rx:z,fill:C,fillOpacity:j??(L?1:R?.32:.45),filter:S&&h===l?`url(#${i(U)})`:void 0,className:"rosh-viz-mark"+(V?` ${e.rise}`:""),style:V?a(l*(N?1:rt.length)+c,26):void 0},`${t.key}-${l}`)})}),null!==m&&!R&&/* @__PURE__ */v("line",{x1:n.center(m),y1:o(o.domain[1]),x2:n.center(m),y2:s,stroke:d.axis,strokeWidth:1})]})}}),q.view&&/* @__PURE__ */v(c,{from:_?.[0]??X[0],to:_?.at(-1)??X[X.length-1],count:X.length,total:N?ot(mt.reduce((t,e)=>t+e,0)):void 0,rows:rt.map(t=>({s:t,sum:t.data.reduce((e,a,i)=>e+st(t,i),0)})).sort((t,e)=>e.sum-t.sum).map(({s:t,sum:e})=>({key:t.key,label:t.label,color:h(t.slot,t.color,t.tone),value:ot(e)})),onClear:q.clear})]})}export{N as ColumnChart};
|
package/dist/chunk-JINTE3G4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r="12.0.0",a=r;export{a as APP_VERSION,r as VERSION};
|
package/dist/chunk-K46DLEIX.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import{Calendar as e}from"./chunk-JQHL4B4C.js";import{toDateKey as t,fromDateKey as r,toMonthKey as n}from"./chunk-2HMNOLKX.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as o,InputEndActionButton as l}from"./chunk-HNUKXGYP.js";import{FILTER_ON as i,FILTER_ON_INK as s,FILTER_OFF as c}from"./chunk-AYZY3YNC.js";import{calendarNames as d}from"./chunk-Y3JW2GW5.js";import{pad2 as m}from"./chunk-LF27WIN2.js";import{buttonClasses as u}from"./chunk-UQYNPYF4.js";import{Icon as h}from"./chunk-2UO47XB4.js";import{onOverlayOpen as p}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as f}from"./chunk-62LW225J.js";import{useDropdownPosition as g}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as b}from"./chunk-D65T4H6J.js";import{glassStyle as x}from"./chunk-5FYDNH4Y.js";import{useShellStrings as v,useShellLocale as y}from"./chunk-MBY5JIGB.js";import{useState as w,useRef as N,useId as k,useEffect as C}from"react";import{createPortal as M}from"react-dom";import{jsxs as j,Fragment as W,jsx as D}from"react/jsx-runtime";var $=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],Y=t;function F(e,r){const n=r.getFullYear(),a=r.getMonth(),o=new Date(n,a,r.getDate()),l=new Date(n,a,0),i=e=>new Date(n,a-e,1);switch(e){case"last2Weeks":return{from:t(new Date(n,a,r.getDate()-14)),to:t(o)};case"lastMonth":return{from:t(i(1)),to:t(l)};case"last3Months":return{from:t(i(3)),to:t(l)};case"last6Months":return{from:t(i(6)),to:t(l)};case"last12Months":return{from:t(i(12)),to:t(l)}}}function B(e,t,r){const a=n(e);return t&&a<t.slice(0,7)?t.slice(0,7):r&&a>r.slice(0,7)?r.slice(0,7):a}function H(e){const t=r(e);return t?`${m(t.getDate())}/${m(t.getMonth()+1)}/${t.getFullYear()}`:e}var O=/* @__PURE__ */new Map;function S({from:t,to:n,onChange:m,formatDisplay:Y,clearable:S,required:L=!1,name:G,id:J,"aria-labelledby":U,"aria-label":T,weekStartsOn:E,placeholder:I,fullWidth:R=!1,min:q,max:A,disabled:P=!1,allowOpenEnd:X=!1}){const K=v().dateRange,Q=y(),Z=Y??(Q?function(e){let t=O.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),O.set(e,t));const n=t;return e=>{const t=r(e);return t?n.format(new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))):e}}(Q):H),z=I??K.placeholder,V=S??!L,[_,ee]=w(!1),[te,re]=w(t),[ne,ae]=w(n),[oe,le]=w(null),[ie,se]=w("from"),ce=N(null),de=N(null),me=N(null),ue=k(),he=k(),pe=k(),[fe,ge]=w(!1),be=g(ce,_,{preferredMaxWidth:520,preferredMaxHeight:fe?720:560,popupRef:me}),xe=N(null),ve=N(null),[ye,we]=w(!0);b(()=>{const e=ve.current;if(!_||!fe||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ye&&we(a)});const Ne=N(null);b(()=>{const e=me.current;if(!_||!be||!e)return;const t=getComputedStyle(e),r=be.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(fe)null!==Ne.current&&Ne.current<=r&&ge(!1);else{const e=xe.current?.offsetWidth??0;if(0===e)return;Ne.current=e,e>r+.5&&ge(!0)}});const[ke,Ce]=w(!1);b(()=>{const e=!!J&&(de.current?.labels?.length??0)>0;e!==ke&&Ce(e)});const Me=!!T||!!U||ke,je=/* @__PURE__ */new Date,[We,De]=w(()=>t?t.slice(0,7):B(je,q,A)),$e=$.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(F(e,je),q,A)),Ye=e=>e?Z(e):"";C(()=>{if(!_)return;const e=e=>{const t=e.target;ce.current?.contains(t)||me.current?.contains(t)||ee(!1)};document.addEventListener("mousedown",e);const t=p(()=>ee(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[_]),C(()=>{P&&ee(!1)},[P]);const Fe=()=>{m("",""),ee(!1)},Be=V&&!P&&Boolean(t||n),He=t&&n?`${Ye(t)} — ${Ye(n)}`:t?K.fromOnly(Ye(t)):n?K.toOnly(Ye(n)):"",Oe=d(Q),Se=e=>{const t=r(e);return t?Oe.longDate(t.getFullYear(),t.getMonth(),t.getDate()):e},Le=t&&n?K.range(Se(t),Se(n)):t?K.fromOnly(Se(t)):n?K.toOnly(Se(n)):z,Ge=e=>fe?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(oe===e?"border-blue-300 bg-accent-tint text-blue-700 font-medium":"border-line text-ink hover:bg-row-hover"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(oe===e?"bg-accent-tint text-blue-700 font-medium":"text-ink hover:bg-row-hover"),Je=/* @__PURE__ */j(W,{children:[$e.map(e=>/* @__PURE__ */D("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=F(e,je);re(t.from),ae(t.to),le(e),De(t.from.slice(0,7))})(e),className:Ge(e),"aria-label":fe?K[e]:void 0,children:fe?ye?K[e]:K[`${e}Short`]:K[e]},e)),
|
|
2
|
-
/* @__PURE__ */D("button",{type:"button",onClick:()=>le("Custom"),className:Ge("Custom"),children:K.custom})]}),Ue=(e,t)=>X?/* @__PURE__ */D("button",{type:"button","data-range-end":e,"aria-pressed":ie===e,onClick:()=>se(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */D("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Te=e=>X&&ie===e?" ring-1 ring-blue-400":"",Ee=
|
|
3
|
-
/* @__PURE__ */D(e,{mode:"range",min:q,max:A,value:te||null,endValue:ne||null,month:We,onMonthChange:De,onSelect:e=>{le("Custom"),X?"from"===ie?(ne&&e>ne?(re(ne),ae(e)):re(e),se("to")):te&&e<te?(ae(te),re(e)):ae(e):!te||te&&ne?(re(e),ae("")):e<te?(ae(te),re(e)):ae(e)},weekStartsOn:E,"aria-label":K.dialog});/* @__PURE__ */
|
|
4
|
-
return j("div",{className:"relative"+(R?" w-full":""),ref:ce,children:[
|
|
5
|
-
/* @__PURE__ */j("div",{className:`relative ${R?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 ${Be?a[1]:""} text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${t||n?`${i} ${s}`:c}${P?" cursor-not-allowed opacity-60":""}`,children:[
|
|
6
|
-
/* @__PURE__ */j("button",{ref:de,type:"button",onClick:()=>{P||(re(t),ae(n),le(null),se(t&&!n?"to":"from"),De(t?t.slice(0,7):B(je,q,A)),ee(!0))},"aria-haspopup":"dialog","aria-expanded":_,id:J,disabled:P||void 0,"aria-label":T,"aria-labelledby":U,"aria-describedby":[Me?he:void 0,L?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":_?ue:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(R?" min-w-0 flex-1 justify-start":""),children:[
|
|
7
|
-
/* @__PURE__ */D(h,{name:"date",className:"w-4 h-4 shrink-0",strokeWidth:"2","aria-hidden":"true"}),
|
|
8
|
-
/* @__PURE__ */D("span",{className:"truncate",children:He||z})]}),Be&&/* @__PURE__ */D(o,{children:/* @__PURE__ */D(l,{action:{label:K.clearRange,icon:/* @__PURE__ */D(h,{name:"close"}),onClick:Fe}})})]}),Me&&/* @__PURE__ */D("span",{id:he,className:"sr-only",children:Le}),L&&/* @__PURE__ */D("span",{id:pe,className:"sr-only",children:K.required}),G&&/* @__PURE__ */j(W,{children:[
|
|
9
|
-
/* @__PURE__ */D("input",{type:"hidden",name:G.from,value:t,disabled:P||void 0}),
|
|
10
|
-
/* @__PURE__ */D("input",{type:"hidden",name:G.to,value:n,disabled:P||void 0})]}),_&&M(
|
|
11
|
-
/* @__PURE__ */j("div",{ref:me,id:ue,role:"dialog","aria-label":K.dialog,"data-layout":fe?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:f.popup,left:be?.left,right:be?.right,top:be?.top,bottom:be?.bottom,width:fe&&be?be.maxWidth:"max-content",maxWidth:be?.maxWidth,maxHeight:be?.maxHeight,overflowY:"auto",visibility:be?void 0:"hidden",...x()},children:[
|
|
12
|
-
/* @__PURE__ */j("div",{className:fe?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[Ue("from",/* @__PURE__ */j(W,{children:[
|
|
13
|
-
/* @__PURE__ */D("span",{className:"text-xs font-medium text-gray-500",children:K.from}),
|
|
14
|
-
/* @__PURE__ */D("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${te?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Te("from")}`,children:te?Ye(te):K.start})]})),!fe&&/* @__PURE__ */D("span",{className:"text-gray-300",children:"—"}),Ue("to",/* @__PURE__ */j(W,{children:[
|
|
15
|
-
/* @__PURE__ */D("span",{className:"text-xs font-medium text-gray-500",children:K.to}),
|
|
16
|
-
/* @__PURE__ */D("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ne?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Te("to")}`,children:ne?Ye(ne):K.end})]}))]}),fe?/* @__PURE__ */j(W,{children:[$e.length>0&&/* @__PURE__ */j("div",{className:"mb-3 @container",children:[!ye&&/* @__PURE__ */D("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-ink-faint",children:K.lastHeading}),
|
|
17
|
-
/* @__PURE__ */j("div",{ref:ve,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Je,$e.map(e=>/* @__PURE__ */D("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:K[e]},e))]})]}),
|
|
18
|
-
/* @__PURE__ */D("div",{className:"w-full",children:Ee})]}):
|
|
19
|
-
/* @__PURE__ */j("div",{ref:xe,className:"flex w-max gap-4",children:[
|
|
20
|
-
/* @__PURE__ */D("div",{className:"w-64",children:Ee}),$e.length>0&&/* @__PURE__ */D("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Je})]}),
|
|
21
|
-
/* @__PURE__ */j("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[V&&/* @__PURE__ */D("button",{type:"button",onClick:Fe,className:u({variant:"ghost"}),children:K.clear}),
|
|
22
|
-
/* @__PURE__ */D("button",{type:"button",onClick:()=>ee(!1),className:u({variant:"secondary"}),children:K.cancel}),
|
|
23
|
-
/* @__PURE__ */D("button",{type:"button",onClick:()=>{m(te,ne),ee(!1)},disabled:X?!te&&!ne:!te||!ne,className:u({variant:"primary"}),children:K.apply})]})]}),document.body)]})}export{S as DateRangePicker,F as presetRange,Y as toISODate};
|
package/dist/chunk-N7GFQZ2J.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{ChartTooltip as r}from"./chunk-36VIGB6J.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{resolveSeriesColor as o,CHART_INK as i}from"./chunk-TZFACUMR.js";import{useShellStrings as s,useShellLocale as c}from"./chunk-MBY5JIGB.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(),B=y??(e=>m(e,w)),R=b??C.nothingToPlot,E=h(),[I,P]=u(null),{highlighted:T}=l();if(0===g.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${N??""}`,children:R});const Y=v/2,$=v/2,G=v/2-10,J=x??Math.max(...g.map(e=>e.value),1),U="track"===k?Math.max(6,(G-.16*v)/g.length):0,V=Math.max(1,Math.floor((G-.16*v)/U||1)),z="track"===k?g.slice(0,V):g,A=Math.min(j,Math.max(1,U-2)),F=n(z.length,.03),H=null!==I?z[I]: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":E,onMouseLeave:()=>P(null),children:[
|
|
4
|
-
/* @__PURE__ */p("title",{id:E,children:"track"===k?C.radialTrack(z.length):C.radialCycle(z.length)}),z.map((l,r)=>{const n=o(r,l.color,l.tone),s=Math.max(0,Math.min(1,l.value/J)),c=((e,t)=>null!==I?I!==e:null!==T&&T!==t)(r,l.key);if("track"===k){const o=G-r*U,m=o-U+A,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(Y,$,m,o,h,h+f),fill:i.grid}),
|
|
7
|
-
/* @__PURE__ */p("path",{d:e(Y,$,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(Y,$,m,m+(G-m)*s,F(r),F(r)+F.step),fill:n})},l.key)})]}),H&&null!==I&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:H.label,rows:[{key:"value",label:C.value,color:o(I,H.color,H.tone),value:B(H.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:B(e.value)})]},e.key))})]})}export{g as RadialBarChart};
|
package/dist/chunk-N7LDQZTL.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{DragBand as e,tooltipBesideBand as t}from"./chunk-CFJL6MML.js";import{niceAxis as r,niceMax as i,linearScale as n,axisGutter as o,bandScale as l}from"./chunk-2JWPNR2U.js";import{usePlotWidth as a}from"./chunk-MAFUXCPZ.js";import{CHART_INK as h}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as c,useShellLocale as m}from"./chunk-MBY5JIGB.js";import{formatPlain as d}from"./chunk-C3QOHMR6.js";import{useRef as u,useState as f,useId as g,useEffect as p}from"react";import{jsx as x,jsxs as y}from"react/jsx-runtime";function v({labels:v,values:M,height:b=220,width:k,bandPadding:w=.24,min:N,max:A,yTickCount:$=4,formatValue:j,yAxisLabel:P,xTickAnchor:E="center",children:L,overlay:R,tooltip:U,onSelect:z,zoom:C,ariaLabel:D,className:F,emptyLabel:I}){const S=c().charts,B=m(),T=j??(e=>d(e,B)),V=I??S.noData,W=u(null),J=a(W),Q=k??J,[Z,G]=f(null),H=g();if(p(()=>{if(null!==Z)return s(e=>"Escape"===e.key&&(G(null),!0))},[Z]),0===v.length||!M.some(Number.isFinite))/* @__PURE__ */
|
|
2
|
-
return x("div",{className:F,ref:W,children:/* @__PURE__ */x("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:b},children:V})});const K=M.filter(Number.isFinite),O=K.every(Number.isInteger),X=void 0===N&&void 0===A?r(Math.min(0,...K),Math.max(0,...K),{intervals:$+1,integer:O}):null,Y=void 0!==N&&void 0===A?r(N,Math.max(N,...K),{intervals:$+1,integer:O,zero:!1}):null,q=X?X.lo:N??Math.min(0,...K),_=X?X.hi:Y?Y.hi:A??i(Math.max(...K,0)),ee=X?X.ticks:Y?[q,...Y.ticks.filter(e=>e>q)]:n([q,_],{from:0,to:1}).ticks($+1),te={top:12,right:16,bottom:26,left:o(ee.map(T),48)+(P?10:0)},re=te.left,ie=Math.max(re+1,Q-te.right),ne=te.top,oe=b-te.bottom,le=n([q,_],{from:oe,to:ne}),ae=l(v.length,{from:re,to:ie},w),he=(ie-re)/Math.max(1,v.length),se=he>=48,ce=se?1:Math.max(1,Math.ceil(v.length/Math.max(1,Math.floor(Q/84)))),me=Math.max(2,Math.floor((he-6)/6.6)),de=e=>se&&e.length>me?`${e.slice(0,me-1).trimEnd()}…`:e;/* @__PURE__ */
|
|
3
|
-
return y("div",{className:`relative ${F??""}`,ref:W,children:[
|
|
4
|
-
/* @__PURE__ */y("svg",{width:"100%",height:b,viewBox:`0 0 ${Q} ${b}`,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:()=>G(null),onBlur:()=>G(null),onKeyDown:e=>{if(z&&null!==Z&&("Enter"===e.key||" "===e.key))return e.preventDefault(),void z(Z);if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1;G(e=>Math.min(v.length-1,Math.max(0,(e??0)+t)))},style:C?{userSelect:"none",touchAction:"pan-y"}:void 0,children:[
|
|
5
|
-
/* @__PURE__ */x("defs",{children:/* @__PURE__ */x("clipPath",{id:H,children:/* @__PURE__ */x("rect",{x:re,y:ne,width:ie-re,height:oe-ne})})}),ee.map(e=>/* @__PURE__ */x("line",{x1:re,y1:le(e),x2:ie,y2:le(e),stroke:h.grid,strokeWidth:1,shapeRendering:"crispEdges"},`g${e}`)),
|
|
6
|
-
/* @__PURE__ */x("line",{x1:re,y1:le(Math.max(q,0)),x2:ie,y2:le(Math.max(q,0)),stroke:h.axis,strokeWidth:1,shapeRendering:"crispEdges"}),ee.map(e=>/* @__PURE__ */x("text",{x:re-8,y:le(e)+4,textAnchor:"end",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:T(e)},`t${e}`)),P&&/* @__PURE__ */x("text",{x:14,y:(ne+oe)/2,transform:`rotate(-90 14 ${(ne+oe)/2})`,textAnchor:"middle",fontSize:11,fill:h.label,children:P}),
|
|
7
|
-
/* @__PURE__ */x("g",{clipPath:`url(#${H})`,children:L({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:Q,height:b,clipId:H,active:Z})}),R?.({x:ae,y:le,left:re,right:ie,top:ne,bottom:oe,width:Q,height:b,clipId:H,active:Z}),v.map((e,t)=>t%ce===0?/* @__PURE__ */x("text",{x:"start"===E?ae(t):ae.center(t),y:b-8,textAnchor:"middle",fontSize:11,fill:h.label,style:{fontVariantNumeric:"tabular-nums"},children:de(e)},`x${t}`):null),C?.drag&&/* @__PURE__ */x(e,{x0:ae.center(C.drag[0])-(ie-re)/v.length/2,x1:ae.center(C.drag[1])+(ie-re)/v.length/2,top:ne,bottom:oe}),v.map((e,t)=>/* @__PURE__ */x("rect",{x:ae.center(t)-(ie-re)/v.length/2,y:ne,width:(ie-re)/v.length,height:oe-ne,fill:"transparent",onMouseEnter:()=>G(t),onPointerDown:C?()=>C.press(t):void 0,onPointerEnter:C?()=>C.over(t):void 0,onPointerUp:C?.release,onClick:z?()=>z(t):void 0,style:z?{cursor:"pointer"}:void 0},`h${t}`))]}),U&&null!==Z&&
|
|
8
|
-
/* @__PURE__ */x("div",{className:"pointer-events-none absolute top-2 z-10",style:t(ae.center(Z),ae.bandwidth,Q),children:U(Z)})]})}export{v as CartesianPlot};
|
package/dist/chunk-NDP2I5HK.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-FZM3ZPW3.js";import{Tooltip as r}from"./chunk-NJN5IKWO.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{glassStyle as u}from"./chunk-5FYDNH4Y.js";import{useShellStrings as d}from"./chunk-MBY5JIGB.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:W="",tone:M,tooltip:Y,split:B}){const[E,J]=m(!1),[$,F]=m(""),G=d(),I=h(null),H=h(null),S=h(null),Z=s(I,E),K=e=>k.find(t=>t.value===e)?.label??e,P=p(()=>{const t=new Set(o),n=[],r=$.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,$]),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]),F("")):F("")},A=e=>y(o.filter(t=>t!==e)),O=()=>{const e=$.trim();if(B&&e)return T(e.split(B)),void F("");j&&e?z(e):F("")},R=h(()=>{});R.current=()=>{O(),J(!1)},f(()=>{if(!E)return;const e=e=>{const t=e.target;I.current?.contains(t)||S.current?.contains(t)||(O(),J(!1))};document.addEventListener("mousedown",e);const t=l(()=>R.current());return()=>{document.removeEventListener("mousedown",e),t()}});const U=k.length>0;/* @__PURE__ */
|
|
2
|
-
return g("div",{ref:I,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":""} ${W}`}),children:[o.map(e=>{const t=M?.(e),n=w[t??"accent"],o=/* @__PURE__ */g("span",{"data-tone":t,className:n.chip,children:[
|
|
4
|
-
/* @__PURE__ */x("span",{className:"truncate",children:K(e)}),!L&&/* @__PURE__ */x("button",{type:"button","aria-label":G.select.removeItem?.(K(e))??`${G.select.remove} ${K(e)}`,onClick:()=>A(e),className:n.remove,children:"×"})]},e),l=Y?.(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":E&&U,"aria-invalid":C||void 0,disabled:L,value:$,placeholder:0===o.length?N:void 0,onChange:e=>{(e=>{if(B){const t=e.split(B);if(t.length>1)return T(t.slice(0,-1)),void F(t[t.length-1])}F(e)})(e.target.value),J(!0)},onFocus:()=>{!L&&U&&J(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=$.trim(),o=n?P.filter(t=>e(t,n.toLowerCase())):[];1===o.length?z(o[0].value):O()}else"Backspace"===t.key&&""===$&&o.length>0?A(o[o.length-1]):"Escape"===t.key?(J(!1),F(""),H.current?.blur()):"Tab"===t.key&&(O(),J(!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"})]}),E&&U&&v(
|
|
6
|
-
/* @__PURE__ */x("div",{ref:S,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:Z?.left,right:Z?.right,top:Z?.top,bottom:Z?.bottom,minWidth:Z?.minWidth,maxWidth:Z?.maxWidth??a,width:"max-content",visibility:Z?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:Z?.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?G.select.allSelected:G.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};
|