efficient-shell 12.8.1 → 12.11.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 +37 -2
- package/dist/{Browser-DEXVIONU.js → Browser-6O7SDMZ5.js} +16 -16
- package/dist/Calculator-ALPNISJT.js +29 -0
- package/dist/{CurrencyConverter-H4M35SIY.js → CurrencyConverter-KBY2OXQ2.js} +8 -8
- package/dist/Files-3NTP7YKY.js +126 -0
- package/dist/{Notepad-PSDXZTBI.js → Notepad-GF5GBZGV.js} +9 -9
- package/dist/PdfViewer-L4FJS3M6.js +1 -0
- package/dist/{PomodoroTimer-SKAUQXPO.js → PomodoroTimer-NGQPYDI3.js} +68 -68
- package/dist/{Preview-HBB2SWJY.js → Preview-KVV6SE3C.js} +30 -30
- package/dist/Sidebar-QOGK5LJ2.js +44 -0
- package/dist/{Stock-X7GEAET7.js → Stock-O7AQ2WUN.js} +2 -2
- package/dist/{Weather-OH5PIQLU.js → Weather-WHXA5TTP.js} +21 -21
- package/dist/{WorldClock-S5NSJ7ZX.js → WorldClock-CZCIVYKB.js} +6 -6
- package/dist/ai/index.js +34 -34
- package/dist/apps/ImageAnnotator.js +1 -1
- package/dist/apps/index.d.ts +55 -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/FlowChart.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-ROM25ZMZ.js → chunk-22LU6FKN.js} +10 -10
- package/dist/{chunk-NC36LJCA.js → chunk-2GS2VOQT.js} +10 -10
- package/dist/{chunk-UK6XNW3I.js → chunk-2NZBQOA6.js} +12 -12
- package/dist/{chunk-4ZUV6WQT.js → chunk-2WNTDGOP.js} +1 -1
- package/dist/{chunk-MZG3FS5T.js → chunk-2X4U3VX2.js} +6 -6
- package/dist/{chunk-6JDR6T4U.js → chunk-3RDJFCIZ.js} +1 -1
- package/dist/{chunk-5NDONLH5.js → chunk-42BVXJZN.js} +3 -3
- package/dist/{chunk-3KP3EIYP.js → chunk-457SK2XV.js} +5 -5
- package/dist/{chunk-Z2MNXUM6.js → chunk-4GTXRVDF.js} +2 -2
- package/dist/{chunk-G2X5YYIQ.js → chunk-4MUE4CYB.js} +2 -2
- package/dist/{chunk-3CMCGOOV.js → chunk-4UQNNA4K.js} +4 -4
- package/dist/{chunk-NEAT7BIP.js → chunk-5G4CB3E6.js} +1 -1
- package/dist/{chunk-PH3P54QQ.js → chunk-5HOXR3L4.js} +1 -1
- package/dist/{chunk-Y4RERPFN.js → chunk-5QVCBAK2.js} +1 -1
- package/dist/chunk-5RT5XDHG.js +6 -0
- package/dist/{chunk-3UHTHQGK.js → chunk-5S4YF5XA.js} +8 -8
- package/dist/{chunk-OGPCFMNA.js → chunk-5WCHUZ6O.js} +1 -1
- package/dist/{chunk-KUUZFLT6.js → chunk-5YPCZLBW.js} +1 -1
- package/dist/{chunk-PT77FC5X.js → chunk-5Z6XJPAX.js} +1 -1
- package/dist/{chunk-B7LNSGNR.js → chunk-63J2MBXV.js} +10 -10
- package/dist/chunk-675RYIWR.js +7 -0
- package/dist/{chunk-BDWZLMIT.js → chunk-67BWG353.js} +9 -9
- package/dist/{chunk-SCU2CWNJ.js → chunk-6BK3KRT5.js} +18 -18
- package/dist/{chunk-X7APOT53.js → chunk-6BQUSUNK.js} +7 -7
- package/dist/{chunk-NU7LUJX5.js → chunk-6ITEA6SX.js} +1 -1
- package/dist/{chunk-4KJ7MLWO.js → chunk-6JLXXX4H.js} +5 -5
- package/dist/{chunk-C37PXEEH.js → chunk-6P7SIIG4.js} +14 -14
- package/dist/{chunk-CNVYM3HP.js → chunk-6YIVKPWQ.js} +1 -1
- package/dist/{chunk-YJIFJIXV.js → chunk-7Q4DE4CT.js} +1 -1
- package/dist/chunk-7XGUX3TH.js +3 -0
- package/dist/{chunk-NKMSGZZ3.js → chunk-A2JYBUPB.js} +5 -5
- package/dist/{chunk-IYPRFUTT.js → chunk-AKTEMZOT.js} +1 -1
- package/dist/{chunk-F6QSHKUR.js → chunk-AMSE4PMQ.js} +4 -4
- package/dist/{chunk-TX5FZBPQ.js → chunk-ASOVTAIT.js} +1 -1
- package/dist/{chunk-CD7P34VC.js → chunk-AUCNJFTP.js} +7 -7
- package/dist/{chunk-BGJMDP6J.js → chunk-BJAJOIVY.js} +1 -1
- package/dist/chunk-BR7L5NE3.js +13 -0
- package/dist/{chunk-DJ2XDBAO.js → chunk-BUZ5AJLR.js} +6 -6
- package/dist/{chunk-EOGXCGQF.js → chunk-BYDSBDVS.js} +6 -6
- package/dist/{chunk-YUB3TJKO.js → chunk-C3E6XFIC.js} +3 -3
- package/dist/{chunk-45IVWLKF.js → chunk-C7M7KYNY.js} +1 -1
- package/dist/chunk-CA3OC4YY.js +9 -0
- package/dist/{chunk-H7HRYFRQ.js → chunk-CB5FQMFB.js} +9 -9
- package/dist/{chunk-UOUVHHTC.js → chunk-CINGDJPM.js} +1 -1
- package/dist/{chunk-6LYBE7LM.js → chunk-CRRC72EE.js} +9 -9
- package/dist/{chunk-NS37Y5CN.js → chunk-D4K72BHN.js} +1 -1
- package/dist/chunk-DVYIZP7X.js +31 -0
- package/dist/{chunk-BFO72WQB.js → chunk-EDANELWX.js} +1 -1
- package/dist/chunk-EHVBJUQI.js +28 -0
- package/dist/{chunk-ZC3TSMFK.js → chunk-EIXMUGVZ.js} +2 -2
- package/dist/{chunk-7FBAZLBX.js → chunk-EVEGK57J.js} +1 -1
- package/dist/{chunk-7HTDD37H.js → chunk-F7BXUVN4.js} +5 -5
- package/dist/{chunk-XFD4BLP7.js → chunk-FOCQEWUH.js} +1 -1
- package/dist/chunk-FQHY6DTF.js +4 -0
- package/dist/{chunk-4UGFNTZ3.js → chunk-FZWAOYAM.js} +7 -7
- package/dist/{chunk-NEYHBQLG.js → chunk-G3VRO4CK.js} +2 -2
- package/dist/{chunk-FPYABAOX.js → chunk-GB2XLSR5.js} +11 -11
- package/dist/{chunk-TS36J7RW.js → chunk-GBEDLYND.js} +2 -2
- package/dist/{chunk-4EVBKID5.js → chunk-GMJ5WOB2.js} +1 -1
- package/dist/{chunk-4JYHS4VJ.js → chunk-GMLDGXNQ.js} +1 -1
- package/dist/{chunk-PPSA3QLE.js → chunk-HD7OBASH.js} +1 -1
- package/dist/{chunk-NPIZ2Y3P.js → chunk-HE24VQMU.js} +1 -1
- package/dist/{chunk-3WFJ4PYV.js → chunk-HEX3EP5F.js} +3 -3
- package/dist/chunk-HL3V67JZ.js +2 -0
- package/dist/{chunk-5Q7VFXEO.js → chunk-HRDR56SK.js} +3 -3
- package/dist/chunk-HULQSIX5.js +8 -0
- package/dist/{chunk-OY3JH66O.js → chunk-HV4VQ5XV.js} +7 -7
- package/dist/{chunk-E227NVFX.js → chunk-IARCNQD3.js} +1 -1
- package/dist/{chunk-RJKMFIM3.js → chunk-ICNGLA5O.js} +6 -6
- package/dist/{chunk-VVQJHQW6.js → chunk-IIMFLLYT.js} +8 -8
- package/dist/{chunk-GHZ4PP62.js → chunk-INFL4YZF.js} +1 -1
- package/dist/{chunk-Y46WPTKY.js → chunk-ISU4FCEX.js} +7 -7
- package/dist/chunk-ISZOD5S6.js +2 -0
- package/dist/{chunk-H6PFTU3L.js → chunk-J4IT5C3A.js} +1 -1
- package/dist/{chunk-GLJILR2Y.js → chunk-J7BMSKOM.js} +5 -5
- package/dist/{chunk-DW45EZHA.js → chunk-JGJWPONL.js} +5 -5
- package/dist/{chunk-JY2OBPVO.js → chunk-JOD5ISTB.js} +1 -1
- package/dist/{chunk-TRWHVG3A.js → chunk-JTZVUO3I.js} +1 -1
- package/dist/{chunk-YMNWUQGV.js → chunk-JVNJCRHM.js} +4 -4
- package/dist/{chunk-N5LVUI7R.js → chunk-KFS7WSCC.js} +11 -11
- package/dist/{chunk-XZH5PEML.js → chunk-KIRLSUQT.js} +5 -5
- package/dist/{chunk-WMLBMR4E.js → chunk-KOPTKTHN.js} +3 -3
- package/dist/{chunk-3LTZ4N46.js → chunk-KPHYWZXL.js} +13 -13
- package/dist/{chunk-HQA7SPU5.js → chunk-KRUI4LVW.js} +1 -1
- package/dist/chunk-KVU5IQOZ.js +7 -0
- package/dist/{chunk-BXU3LX44.js → chunk-KWTK6TGH.js} +1 -1
- package/dist/{chunk-AXTVK6LU.js → chunk-KZ7RR7EU.js} +1 -1
- package/dist/{chunk-ZYW4KSEE.js → chunk-LFW3CQMF.js} +4 -4
- package/dist/{chunk-6HH6KNJB.js → chunk-LFWRHBTM.js} +2 -2
- package/dist/{chunk-X5ZY35KZ.js → chunk-LS6VU6F7.js} +1 -1
- package/dist/{chunk-5NONOFIV.js → chunk-M4MN2GOE.js} +1 -1
- package/dist/{chunk-GJ23UZDQ.js → chunk-MAI2DN7N.js} +1 -1
- package/dist/{chunk-7B5KFESH.js → chunk-MBXCXFQO.js} +1 -1
- package/dist/{chunk-32WEY6O5.js → chunk-MEAJGM6F.js} +1 -1
- package/dist/{chunk-DNLRUZGS.js → chunk-MPTOEXED.js} +1 -1
- package/dist/chunk-MTP3MBZA.js +22 -0
- package/dist/{chunk-EUUCNDIS.js → chunk-NAWIVFAN.js} +13 -13
- package/dist/{chunk-54K2ADBT.js → chunk-NDAZPAQL.js} +1 -1
- package/dist/{chunk-SYIJRZIS.js → chunk-NOC4WIME.js} +2 -2
- package/dist/chunk-NOCOLZ2W.js +1 -0
- package/dist/{chunk-SCGBCBXP.js → chunk-NV7QRWQJ.js} +1 -1
- package/dist/{chunk-XK4U5MAS.js → chunk-O3YCIWHF.js} +1 -1
- package/dist/{chunk-MCJ4JHLE.js → chunk-OAFFHLJ4.js} +5 -5
- package/dist/chunk-OSNHRKX6.js +5 -0
- package/dist/{chunk-BTUI3MKS.js → chunk-OSQ5NRV3.js} +1 -1
- package/dist/{chunk-GG4ZXQXG.js → chunk-OW5LQWPU.js} +3 -3
- package/dist/{chunk-3I67TIGD.js → chunk-PEIRPNXT.js} +21 -21
- package/dist/{chunk-LGK47SEN.js → chunk-PHJFGLXB.js} +12 -12
- package/dist/{chunk-7FRG5CF7.js → chunk-PICRPJBL.js} +1 -1
- package/dist/{chunk-HS6KTFW6.js → chunk-POOPWYJL.js} +10 -10
- package/dist/chunk-PY7GHIYF.js +19 -0
- package/dist/chunk-PYBPJL5R.js +1 -0
- package/dist/{chunk-7HIHQR3X.js → chunk-Q3RJMQYE.js} +1 -1
- package/dist/{chunk-QR46K5SB.js → chunk-QBSIM4JB.js} +1 -1
- package/dist/{chunk-LLUHE2ZW.js → chunk-QIMMZVWV.js} +1 -1
- package/dist/{chunk-NHWDB7R6.js → chunk-QMNDKNK2.js} +1 -1
- package/dist/{chunk-RIXX6NRV.js → chunk-QQM36CYU.js} +1 -1
- package/dist/{chunk-J33QE4J7.js → chunk-QSK2OWT3.js} +2 -2
- package/dist/{chunk-2JXGTA73.js → chunk-RAQBZUU2.js} +65 -65
- package/dist/{chunk-YMAU4EIK.js → chunk-RGKSJBXJ.js} +8 -8
- package/dist/{chunk-H6IGZWC2.js → chunk-RHD4V6CE.js} +9 -9
- package/dist/{chunk-VQJLH2BU.js → chunk-RIF6BFEH.js} +1 -1
- package/dist/{chunk-TXZR5G55.js → chunk-RLGPIJHB.js} +1 -1
- package/dist/{chunk-R3K3LVVS.js → chunk-RQKD5AAL.js} +1 -1
- package/dist/{chunk-I3QFYBOP.js → chunk-SEHKTBVM.js} +1 -1
- package/dist/{chunk-75MSXRFY.js → chunk-SFFELHLP.js} +5 -5
- package/dist/{chunk-SBZCJNNP.js → chunk-SY65V6K7.js} +10 -10
- package/dist/{chunk-UIWGVOFH.js → chunk-T3NLFOLW.js} +2 -1
- package/dist/{chunk-JYD6PSDA.js → chunk-TDMZFQRB.js} +1 -1
- package/dist/chunk-TJSJVC6P.js +1 -0
- package/dist/{chunk-MX2YRSMZ.js → chunk-TKFINWY6.js} +2 -2
- package/dist/{chunk-MM5AFQ24.js → chunk-TVVSFXWY.js} +7 -7
- package/dist/{chunk-EZWWQHD3.js → chunk-UD4NESX7.js} +1 -1
- package/dist/{chunk-NJTFI7AA.js → chunk-UG5GKEU5.js} +1 -1
- package/dist/{chunk-UZZVI7EN.js → chunk-UMZJRZFN.js} +1 -1
- package/dist/{chunk-LTESFDTF.js → chunk-V6FHZGCL.js} +1 -1
- package/dist/{chunk-2UBASCOK.js → chunk-VLCHHTX6.js} +1 -1
- package/dist/{chunk-VROBW74Y.js → chunk-VN3A43SA.js} +1 -1
- package/dist/{chunk-QQXQQPCD.js → chunk-VPZOSVDF.js} +9 -9
- package/dist/{chunk-DPUM3H5N.js → chunk-VWNHSLFY.js} +1 -1
- package/dist/{chunk-HE767CVB.js → chunk-W5B7UNMJ.js} +1 -1
- package/dist/{chunk-H27KA5IL.js → chunk-WDAOTHX5.js} +3 -3
- package/dist/{chunk-R3JKZXII.js → chunk-WJBP5SND.js} +5 -5
- package/dist/{chunk-LLAYWMYS.js → chunk-WM2BBRT6.js} +1 -1
- package/dist/{chunk-XVIDD6F3.js → chunk-Y4YXZIES.js} +8 -8
- package/dist/chunk-YMD2F3NL.js +1 -0
- package/dist/{chunk-525O4AUQ.js → chunk-YRG6XJ6M.js} +8 -8
- package/dist/chunk-YVAJ42M2.js +8 -0
- package/dist/{chunk-DZBGJ6X4.js → chunk-YVIV7SKG.js} +1 -1
- package/dist/{chunk-53EW4M5S.js → chunk-YX4MRM7A.js} +6 -6
- package/dist/{chunk-EZ6SVQSV.js → chunk-Z334LCCX.js} +1 -1
- package/dist/{chunk-7KIDOIPY.js → chunk-Z7RXWXR5.js} +1 -1
- package/dist/{chunk-23WJCEYD.js → chunk-ZC6MXV4L.js} +1 -1
- package/dist/{chunk-7H7U3HC6.js → chunk-ZR2UWJIR.js} +4 -4
- 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/UnitMenu.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/efficient-meanings.d.ts +37 -37
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.js +665 -665
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +2 -2
- 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.d.ts +8 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-NZ2S6CAK.js +0 -29
- package/dist/Files-HDTNIXUC.js +0 -121
- package/dist/PdfViewer-GUXUWGMG.js +0 -1
- package/dist/Sidebar-XGAVJGOL.js +0 -44
- package/dist/chunk-27TJNID7.js +0 -13
- package/dist/chunk-43MCNASD.js +0 -1
- package/dist/chunk-6DZGOGB2.js +0 -1
- package/dist/chunk-6EHPEBGP.js +0 -5
- package/dist/chunk-A6WZF65N.js +0 -22
- package/dist/chunk-C3SE57NF.js +0 -3
- package/dist/chunk-GEZ45J4Z.js +0 -2
- package/dist/chunk-HEAGOZKJ.js +0 -6
- package/dist/chunk-IFIMUNID.js +0 -4
- package/dist/chunk-IHPAYSTJ.js +0 -8
- package/dist/chunk-KETGA66S.js +0 -9
- package/dist/chunk-KO74S3FL.js +0 -28
- package/dist/chunk-M54OL3YR.js +0 -2
- package/dist/chunk-P2C33RHT.js +0 -1
- package/dist/chunk-QLVH66TE.js +0 -31
- package/dist/chunk-SE3S362N.js +0 -7
- package/dist/chunk-TWFD7A3K.js +0 -1
- package/dist/chunk-U5DSVCWV.js +0 -8
- package/dist/chunk-UDVQORQM.js +0 -19
- package/dist/chunk-WSRM6ZQS.js +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{layoutFlow as e}from"./chunk-FAERBT6Y.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{Icon as n}from"./chunk-
|
|
1
|
+
import{layoutFlow as e}from"./chunk-FAERBT6Y.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{Icon as n}from"./chunk-T3NLFOLW.js";import{CHART_INK as r,STATUS_VARS as o,SERIES_VARS as i}from"./chunk-TZFACUMR.js";import{useMemo as l,useRef as a,useId as c}from"react";import{jsxs as d,jsx as s}from"react/jsx-runtime";var h={downloadPng:"Download PNG",downloadSvg:"Download SVG",toPdf:"Add to the PDF"},m={label:"var(--ink-strong)",note:r.label,line:r.label},f={step:i[0],decision:o.warning,start:r.muted,end:r.muted};function u(e,t){return`${(e.title??"flowchart").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"flowchart"}.${t}`}function g(e){const t=new Map(e.nodes.map(e=>[e.id,e.label]));return e.edges.map(e=>`${t.get(e.from)} to ${t.get(e.to)}${e.label?` (${e.label})`:""}`).join("; ")}function w({node:e}){const t=f[e.kind],n=e.x+e.width/2,r=e.y+e.height/2,o=e.note?[...e.lines,e.note]:e.lines,i=r-15*(o.length-1)/2,l="decision"===e.kind?/* @__PURE__ */s("polygon",{points:`${n},${e.y} ${e.x+e.width},${r} ${n},${e.y+e.height} ${e.x},${r}`}):/* @__PURE__ */s("rect",{x:e.x,y:e.y,width:e.width,height:e.height,rx:"step"===e.kind?4:e.height/2});/* @__PURE__ */
|
|
2
2
|
return d("g",{fill:t,fillOpacity:.14,stroke:t,strokeWidth:1,children:[l,o.map((t,r)=>{const l=void 0!==e.note&&r===o.length-1;/* @__PURE__ */
|
|
3
3
|
return s("text",{x:n,y:i+15*r,textAnchor:"middle",dominantBaseline:"central",fontSize:l?11:12.5,fontWeight:l?400:600,fill:l?m.note:m.label,fillOpacity:1,stroke:"none",children:t},r)})]})}function p(e){const t=e.cloneNode(!0),n=[e,...Array.from(e.querySelectorAll("*"))],r=[t,...Array.from(t.querySelectorAll("*"))],o=e.ownerDocument.defaultView;n.forEach((e,t)=>{for(const n of["fill","stroke"]){const i=e.getAttribute(n);i&&i.includes("var(")&&o&&r[t].setAttribute(n,o.getComputedStyle(e).getPropertyValue(n)||i)}});const i=o?.getComputedStyle(e).getPropertyValue("--viz-surface").trim();if(i){const n=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("width","100%"),n.setAttribute("height","100%"),n.setAttribute("fill",i),t.insertBefore(n,t.firstChild)}return t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("font-family","system-ui, -apple-system, Segoe UI, sans-serif"),(new XMLSerializer).serializeToString(t)}function b(e,t){const n=URL.createObjectURL(e),r=document.createElement("a");r.href=n,r.download=t,r.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}function y({spec:r,labels:o,onToPdf:i,bare:f=!1,className:y}){const k={...h,...o},v=l(()=>e(r),[r]),x=a(null),$=r.title??"Flowchart",A=`flow-arrow-${c().replace(/:/g,"")}`;/* @__PURE__ */
|
|
4
4
|
return d("figure",{className:`my-2 ${y??""}`,children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ErrorPage as r}from"./chunk-
|
|
1
|
+
import{ErrorPage as r}from"./chunk-6YIVKPWQ.js";import{reportBoundaryError as e}from"./chunk-KNUR2UEG.js";import{Button_default as t}from"./chunk-EVYD6UFQ.js";import{useShellStrings as s}from"./chunk-TJSJVC6P.js";import{Component as o}from"react";import{jsxs as i,jsx as a,Fragment as n}from"react/jsx-runtime";function c({pick:r}){/* @__PURE__ */
|
|
2
2
|
return a(n,{children:r(s().errors)})}var l=class extends o{state={error:null};static getDerivedStateFromError(r){return{error:r}}componentDidCatch(r,t){console.error("ErrorBoundary caught an error:",r,t),e(r),this.props.onError?.(r,t)}componentDidUpdate(r){if(!this.state.error)return;const e=r.resetKeys??[],t=this.props.resetKeys??[];(e.length!==t.length||e.some((r,e)=>!Object.is(r,t[e])))&&this.reset()}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):
|
|
3
3
|
/* @__PURE__ */i("div",{className:"flex h-full flex-col",children:[
|
|
4
4
|
/* @__PURE__ */a("div",{role:"alert",className:"min-h-0 flex-1",children:/* @__PURE__ */a(r,{code:500,actions:/* @__PURE__ */i(n,{children:[
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{LoadingSpinner as e}from"./chunk-R2VKEMZH.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-
|
|
2
|
-
return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(H&&S&&S.col===e){const n=(
|
|
1
|
+
import{LoadingSpinner as e}from"./chunk-R2VKEMZH.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-TJSJVC6P.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{useState as o,useMemo as l,useRef as i,Fragment as s}from"react";import{jsx as d,Fragment as c,jsxs as u}from"react/jsx-runtime";function m({items:m,columns:f,columnOf:p,getId:g,onMove:h,renderCard:x,onCardClick:b,sortInColumn:y,isLoading:v=!1,loadingText:N,emptyState:k,showColumnsWhenEmpty:w=!1,columnEmptyText:C,onAddItem:D,addItemText:E}){const j=t().kanban,I=r(),T=N??j.loading,M=C??j.dropHere,A=E??j.addItem,[H,O]=o(null),[S,$]=o(null),J=l(()=>{const e={};for(const n of f)e[n.value]=[];for(const n of m)(e[p(n)]??=[]).push(n);if(y)for(const n of Object.keys(e))e[n].sort(y);return e},[m,f,p,y]),R=()=>{O(null),$(null)},q=i(null),z=i(/* @__PURE__ */new Map);n(()=>{if(null!==H)return;const e=q.current;if(!e)return;const n=/* @__PURE__ */new Map,t=[];if(e.querySelectorAll("[data-kanban-card]").forEach(e=>{const r=e.dataset.kanbanCard,a=e.getBoundingClientRect();n.set(r,a);const o=z.current.get(r);if(o){const n=o.left-a.left,r=o.top-a.top;(n||r)&&t.push([e,n,r])}}),z.current=n,t.length){for(const[e,n,r]of t)e.style.transition="none",e.style.transform=`translate(${n}px, ${r}px)`;requestAnimationFrame(()=>{for(const[e]of t)e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1)",e.style.transform="",e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform=""},{once:!0})})}},[J,H]);return v?/* @__PURE__ */d(e,{size:"sm",padding:"p-4",label:T}):0!==m.length||w?/* @__PURE__ */d("div",{ref:q,className:"flex-1 overflow-x-auto grid-scroll",children:/* @__PURE__ */d("div",{className:"flex gap-3 h-full min-w-max pb-2",children:f.map(e=>{const n=J[e.value]??[],t=null!==S&&S.col===e.value,r=null!==H?n.findIndex(e=>g(e)===H):-1,o=t&&(-1===r||S.index!==r&&S.index!==r+1)?S.index:-1;/* @__PURE__ */
|
|
2
|
+
return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(H&&S&&S.col===e){const n=(J[e]??[]).findIndex(e=>g(e)===H),t=-1!==n;if(!t||S.index!==n&&S.index!==n+1){const r=t&&S.index>n?S.index-1:S.index;h(H,e,r)}}R()})(e.value)},children:[
|
|
3
3
|
/* @__PURE__ */u("div",{className:`flex items-center justify-between px-3 py-2 rounded-t-xl text-sm font-medium ${e.accent??"text-gray-700 bg-gray-100"}`,children:[
|
|
4
4
|
/* @__PURE__ */u("span",{className:"flex items-center gap-2",children:[
|
|
5
5
|
/* @__PURE__ */d("span",{className:`h-2 w-2 rounded-full ${e.dot??"bg-gray-400"}`}),e.label]}),
|
|
6
6
|
/* @__PURE__ */d("span",{className:"text-xs opacity-70",children:a(n.length,I)})]}),
|
|
7
7
|
/* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>$(t=>t&&t.col===e.value&&t.index===n.length?t:{col:e.value,index:n.length}),children:[n.map((t,r)=>{const a=g(t),l=a===H;/* @__PURE__ */
|
|
8
8
|
return u(s,{children:[o===r&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),
|
|
9
|
-
/* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{O(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==H?n.findIndex(e=>g(e)===H):-1,o=-1!==a&&a<r?r+1:r;$(n=>n&&n.col===e.value&&n.index===o?n:{col:e.value,index:o})},onDragEnd:
|
|
9
|
+
/* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{O(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==H?n.findIndex(e=>g(e)===H):-1,o=-1!==a&&a<r?r+1:r;$(n=>n&&n.col===e.value&&n.index===o?n:{col:e.value,index:o})},onDragEnd:R,onClick:b?()=>b(t):void 0,style:null===H?void 0:{opacity:l?.4:1,transition:"opacity 120ms ease"},className:"rounded-lg bg-white border border-gray-200 p-3 shadow-sm hover:border-blue-400 hover:shadow transition "+(b?"cursor-pointer":""),children:x(t)})]},a)}),n.length>0&&o===n.length&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),0===n.length&&/* @__PURE__ */d("div",{className:"text-2xs text-center rounded-lg transition-all duration-150 "+(t?"border-2 border-dashed border-blue-300 bg-blue-50/50 text-blue-400 py-8":"text-gray-400 py-6"),children:M})]}),D&&/* @__PURE__ */d("div",{className:"p-2 pt-0",children:/* @__PURE__ */u("button",{type:"button",onClick:()=>D(e.value),className:"flex w-full items-center justify-center gap-1 rounded-lg px-2 min-h-8 py-1 text-xs font-medium text-ink-faint opacity-0 transition hover:bg-gray-100 hover:text-ink focus-visible:opacity-100 group-hover:opacity-100",children:[
|
|
10
10
|
/* @__PURE__ */d("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"+"}),A]})})]},e.value)})})}):/* @__PURE__ */d(c,{children:k??/* @__PURE__ */d("div",{className:"text-sm text-gray-500 p-4",children:j.empty})})}export{m as Kanban};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-FZWAOYAM.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-7TC3LJQM.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-TJSJVC6P.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:y=null,onHoverChange:b}){const M=l(Date.now,null),j=[],C=[],x=o().timeline,J=r();for(const e of p){const n=i(e.date??null);null===n?C.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const L=i(g??null);let O,w,D=!0;0===j.length?(w=L??M??0,O=w-30*a,D=null!==L||null!==M):(O=j[0].ms,w=L??j[j.length-1].ms,w-O<a&&(w=O+a));const H=j.length>0?Math.max(0,Math.round((w-O)/a)):0,N=u??(H>0?x.duration(H):void 0),T=[j.length>0?x.started(t(j[0].ms,J)):void 0,N,C.length>0?x.reached(j.length,p.length):void 0],A=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),K={};for(const e of j)e.phase&&(K[e.phase]=K[e.phase]||[]).push(e.ms);const S=Object.entries(K).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),Z="rail"===v,F=D&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:Z?"spread":"compressed",labels:Z?"none":"lanes",items:A,pending:C,phases:S,startMs:O,endMs:w,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:x.milestones(m)})});/* @__PURE__ */
|
|
2
|
+
return h("div",Z?{className:"shrink-0","data-timeline-variant":"rail",children:F}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:T,children:F})})}export{m as MilestoneTimeline};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{DropdownMenu as e}from"./chunk-
|
|
1
|
+
import{DropdownMenu as e}from"./chunk-KVU5IQOZ.js";import{IconButton_default as r}from"./chunk-SV5RRBVA.js";import{inputClasses as n,PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Tooltip as i}from"./chunk-SOZCWT6I.js";import{iconButtonClasses as a}from"./chunk-UQYNPYF4.js";import{forwardRef as s}from"react";import{jsx as o,jsxs as l}from"react/jsx-runtime";var c={sm:"sm",md:"sm",lg:"md",touch:"touch-sm"},m={sm:"pr-8",md:"pr-8",lg:"pr-10",touch:"pr-12"};function p({children:e}){/* @__PURE__ */
|
|
2
2
|
return o("span",{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-1",children:e})}function d({action:e,size:r="md"}){/* @__PURE__ */
|
|
3
3
|
return o(h,{action:e,size:c[r]})}var u=["","pr-8","pr-16"];function h({action:n,size:t}){const{label:s,icon:l,onClick:c,menu:m}=n;/* @__PURE__ */
|
|
4
|
-
return o(i,{content:s,describe:!1,children:m?/* @__PURE__ */o(e,{"aria-label":s,trigger:l,items:m,triggerClassName:a({size:t})}):/* @__PURE__ */o(r,{"aria-label":s,size:t,onClick:c,children:l})})}var f=s(function({invalid:e,leftIcon:r,rightAdornment:i,endAction:a,size:s,className:c="",readOnly:u,...h},f){const g=s??"md",
|
|
5
|
-
/* @__PURE__ */o("input",{ref:f,"aria-invalid":e||void 0,readOnly:u,className:n({invalid:e,size:s,readOnly:u,className:[
|
|
4
|
+
return o(i,{content:s,describe:!1,children:m?/* @__PURE__ */o(e,{"aria-label":s,trigger:l,items:m,triggerClassName:a({size:t})}):/* @__PURE__ */o(r,{"aria-label":s,size:t,onClick:c,children:l})})}var f=s(function({invalid:e,leftIcon:r,rightAdornment:i,endAction:a,size:s,className:c="",readOnly:u,...h},f){const g=s??"md",v=`${r?"pl-10":""} ${a?m[g]:i?"pr-10":""}`.trim(),N=
|
|
5
|
+
/* @__PURE__ */o("input",{ref:f,"aria-invalid":e||void 0,readOnly:u,className:n({invalid:e,size:s,readOnly:u,className:[v,c].filter(Boolean).join(" ")}),...h});return r||i||a?/* @__PURE__ */l("div",{className:"relative",children:[r&&/* @__PURE__ */o("span",{className:`pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 ${t}`,children:r}),N,a?/* @__PURE__ */o(p,{children:/* @__PURE__ */o(d,{action:a,size:g})}):i&&/* @__PURE__ */o("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400",children:i})]}):N});export{u as END_ACTIONS_PAD,c as INPUT_END_ACTION_SIZE,d as InputEndActionButton,p as InputEndActionSlot,f as Input_default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{AccessibleTable as t}from"./chunk-HY6CBG4M.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-TJSJVC6P.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,C]=c(null),{highlighted:F}=o(),E=h(u,f,x,$.other),{labels:I,matrix:z,otherIndex:A,foldedCount:Q}=E,V=(t,e)=>z[t]?.[e]??0,H=t=>t===A?r.muted:a(t),L=E.totals,O=I.map((t,e)=>e).sort((t,e)=>L[e]-L[t]),P=O.reduce((t,e)=>t+L[e],0);if(P<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:j});const T=p/2,W=p/2,Y=p/2-44,B=Y-b,J=g*O.length,R=/* @__PURE__ */new Map;let S=-Math.PI/2;O.forEach((t,e)=>{const o=L[t]/P*(2*Math.PI-J);R.set(t,{start:S,end:S+o,slot:e}),S+=o+g});const U=/* @__PURE__ */new Map,D=[];for(const t of O)for(const e of O){const o=V(t,e);if(o<=0)continue;const n=R.get(t),r=o/Math.max(1,L[t])*(n.end-n.start),a=U.get(t)??0;U.set(t,a+r),D.push({from:t,to:e,value:o,a:n.start+a+r/2,b:R.get(e).start+(R.get(e).end-R.get(e).start)/2})}const G=(t,e)=>[T+e*Math.cos(t),W+e*Math.sin(t)],Z="arc"===y?.kind?y.index:void 0,q="ribbon"===y?.kind?D[y.index]:void 0;/* @__PURE__ */
|
|
2
|
+
return m("div",{className:`relative ${v??""}`,children:[
|
|
3
|
+
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(O.length),onMouseLeave:()=>C(null),children:[D.map((t,e)=>{const[o,n]=G(t.a,B),[r,a]=G(t.b,B),l=H(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==F?I[t.from]===F||I[t.to]===F:null)(t,e);/* @__PURE__ */
|
|
4
|
+
return d("path",{d:`M${o},${n} Q${T},${W} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/P*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>C({kind:"ribbon",index:e})},`${I[t.from]}→${I[t.to]}`)}),O.map(t=>{const o=R.get(t),n=(o.start+o.end)/2,[a,l]=G(n,Y+16),i=(t=>y?"arc"===y.kind?y.index===t:D[y.index].from===t||D[y.index].to===t:null!==F?I[t]===F:null)(t);/* @__PURE__ */
|
|
5
|
+
return m("g",{onMouseEnter:()=>C({kind:"arc",index:t}),children:[
|
|
6
|
+
/* @__PURE__ */d("path",{d:e(T,W,B,Y,o.start,o.end),fill:H(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)})]}),Q>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(Q)}),void 0!==Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:I[Z],rows:[{key:"total",label:$.totalFlow,color:H(Z),value:N(L[Z])}]})}),q&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${I[q.from]} → ${I[q.to]}`,rows:[{key:"value",label:$.flow,color:H(q.from),value:N(q.value)}]})}),
|
|
8
|
+
/* @__PURE__ */d(t,{caption:$.chord(O.length),head:[$.tableFrom,$.tableTo,$.value],rows:D.map(t=>[I[t.from],I[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{navIcons as e}from"./chunk-4LXCCZDM.js";import{Icon as t}from"./chunk-
|
|
2
|
-
return o(t,{name:"folder",look:"solid",className:e})}function
|
|
3
|
-
return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o(N,{className:"h-12 w-12 text-amber-500 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]"})});if("page"===e){const e=
|
|
4
|
-
return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o("span",{className:`h-11 w-11 rounded-xl bg-gradient-to-br ${i} flex items-center justify-center text-white border border-white/30 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]`,children:e&&n(e)?r(e,{className:"h-7 w-7 text-white"}):
|
|
1
|
+
import{navIcons as e}from"./chunk-4LXCCZDM.js";import{Icon as t}from"./chunk-T3NLFOLW.js";import{isValidElement as n,cloneElement as r}from"react";import{jsx as o,jsxs as i}from"react/jsx-runtime";var a="react-os-shell:spreadsheet-preview-update",s=null,l=0;function d(e){const t=++l,n={token:t,data:e};return s=n,{update(e){s===n&&(n.data=e),"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(a,{detail:{token:t,data:e}}))}}}function c(){return s}function p(e){s===e&&(s=null)}var u=class extends Error{limit;used;attempted;constructor(e,t,n){super("Not enough space"),this.name="FilesQuotaError",this.limit=e,this.used=t,this.attempted=n}};function f(e,t){return e&&"/"!==e?e.replace(/\/$/,"")+"/"+t:"/"+t}async function h(e,t){const n=await e.json().catch(()=>({}));return new Error(n.error||`${t} failed (${e.status})`)}function w(e){const t=()=>(e??(("undefined"!=typeof window?window.__REACT_OS_SHELL_FILE_SERVER__:void 0)||"http://localhost:4000").replace(/\/$/,"")).replace(/\/$/,""),n=(e,n={})=>fetch(`${t()}${e}`,{...n,credentials:"include"}),r=e=>({method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return{async quota(){const e=await n("/api/quota");if(!e.ok)throw await h(e,"Quota");const t=await e.json();return{used:t.used,limit:t.limit}},async list(e){const t=e??"/",r=await n(`/api/files?path=${encodeURIComponent(t)}`);if(!r.ok)throw await h(r,"Listing");const o=await r.json(),i=o.path||t,a=i.split("/").filter(Boolean);return{folder:{id:"/"===i?null:i,name:a[a.length-1]??"",role:"owner",path:[{id:null,name:""},...a.map((e,t)=>({id:"/"+a.slice(0,t+1).join("/"),name:e}))]},entries:(o.entries||[]).map(e=>({id:f(i,e.name),name:e.name,kind:e.kind,size:e.size,modifiedAt:e.modifiedAt}))}},async upload(e,t){const r=new FormData;r.append("file",t);const o=await n(`/api/upload?path=${encodeURIComponent(e??"/")}`,{method:"POST",body:r});if(413===o.status){const e=await o.json().catch(()=>({}));throw new u(e.limit||0,e.used||0,e.attempted||t.size)}if(!o.ok)throw await h(o,"Upload")},async createFolder(e,t){const o=await n("/api/folder",r({path:f(e,t)}));if(!o.ok)throw await h(o,"Create folder")},async rename(e,t){const o=e.replace(/\/[^/]*$/,"")||"/",i=await n("/api/rename",r({from:e,to:f(o,t)}));if(!i.ok)throw await h(i,"Rename")},async remove(e){const t=await n(`/api/files?path=${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok)throw await h(t,"Delete")},async read(e){const t=await n(`/api/file?path=${encodeURIComponent(e)}`);if(!t.ok)throw await h(t,"Download");return t.blob()},async trash(){const e=await n("/api/trash");if(!e.ok)throw await h(e,"Listing trash");return(await e.json()).entries||[]},async restore(e){const t=await n("/api/trash/restore",r({id:e}));if(!t.ok)throw await h(t,"Restore")},async purge(e){const t=await n(`/api/trash/${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok)throw await h(t,"Delete")},async emptyTrash(){const e=await n("/api/trash",{method:"DELETE"});if(!e.ok)throw await h(e,"Empty trash")}}}var m=null;function y(e){m=e}function g(){return m??w()}function x(){return null!==m}var b=["from-blue-500 to-blue-700","from-indigo-500 to-purple-600","from-purple-500 to-pink-600","from-pink-500 to-rose-600","from-red-500 to-rose-600","from-orange-500 to-red-600","from-amber-500 to-orange-600","from-yellow-500 to-amber-500","from-lime-500 to-green-600","from-green-500 to-emerald-600","from-emerald-500 to-teal-600","from-teal-500 to-cyan-600","from-cyan-500 to-sky-600","from-sky-500 to-blue-600","from-violet-500 to-fuchsia-600"];function v(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n);return b[Math.abs(t)%b.length]}var _={order:"text-blue-600",purchase_order:"text-purple-600",invoice:"text-green-600",client:"text-indigo-600",manufacturer:"text-orange-600",shipment:"text-teal-600",part_number:"text-gray-600",project:"text-pink-600",mould:"text-red-600",design:"text-cyan-600",brand:"text-amber-600",price_sheet:"text-emerald-600",folder:"text-yellow-600",page:"text-blue-500"},k={order:"SO",purchase_order:"PO",invoice:"INV",client:"CLI",manufacturer:"MFR",shipment:"DN",part_number:"PN",project:"PRJ",mould:"MLD",design:"DSN",brand:"BRD",price_sheet:"PS",vendor_invoice:"VI",vendor_payment:"VP",warranty_claim:"WC",qc_report:"QC",vendor_shipment:"GRN",bank_account:"BA",wheel_finish:"WF",weight_log:"WL",production_progress:"PP",vendor_price_sheet:"VPS",proposal:"PR",folder:"FLD"},E={pdf:"PDF",dxf:"DXF","3d":"STP",image:"IMG",csv:"CSV"},C={pdf:"text-red-600",dxf:"text-blue-600","3d":"text-purple-600",image:"text-emerald-600",csv:"text-green-600"};function N({className:e}){/* @__PURE__ */
|
|
2
|
+
return o(t,{name:"folder",look:"solid",className:e})}function T(t,n){return n&&e[n]||(t?e[t]:void 0)}var j=/* @__PURE__ */o("svg",{className:"h-7 w-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */o("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6z"})});function L({entityType:e,isSelected:t,entityId:a,label:s,fileKind:l}){const d="preview-file"===e&&l,c=d?C[l]:null,p=d?E[l]:null;if("folder"===e)/* @__PURE__ */
|
|
3
|
+
return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o(N,{className:"h-12 w-12 text-amber-500 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]"})});if("page"===e){const e=T(a,s),i=v(a||s||"page");/* @__PURE__ */
|
|
4
|
+
return o("div",{className:"w-12 h-12 flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:/* @__PURE__ */o("span",{className:`h-11 w-11 rounded-xl bg-gradient-to-br ${i} flex items-center justify-center text-white border border-white/30 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)]`,children:e&&n(e)?r(e,{className:"h-7 w-7 text-white"}):j})})}/* @__PURE__ */
|
|
5
5
|
return i("div",{className:"w-12 h-12 relative flex items-center justify-center "+(t?"rounded-lg bg-blue-400/30 ring-2 ring-blue-500":""),children:[
|
|
6
6
|
/* @__PURE__ */i("svg",{className:`w-10 h-12 drop-shadow-[0_2px_3px_rgba(0,0,0,0.3)] ${c??_[e]??"text-gray-500"}`,viewBox:"0 0 40 48",fill:"none",children:[
|
|
7
7
|
/* @__PURE__ */o("path",{d:"M4 0h22l10 10v34a4 4 0 01-4 4H4a4 4 0 01-4-4V4a4 4 0 014-4z",fill:"white",fillOpacity:"0.92"}),
|
|
8
8
|
/* @__PURE__ */o("path",{d:"M26 0l10 10H30a4 4 0 01-4-4V0z",fill:"currentColor",fillOpacity:"0.2"}),
|
|
9
9
|
/* @__PURE__ */o("path",{d:"M4 0h22l10 10v34a4 4 0 01-4 4H4a4 4 0 01-4-4V4a4 4 0 014-4z",stroke:"currentColor",strokeWidth:"1.5",strokeOpacity:"0.5"})]}),
|
|
10
|
-
/* @__PURE__ */o("span",{className:`absolute inset-0 flex items-center justify-center text-3xs font-bold pt-2 ${c??_[e]??"text-gray-600"}`,children:p??k[e]??e.slice(0,3).toUpperCase()})]})}function
|
|
11
|
-
return o(N,{className:"h-4 w-4 shrink-0 text-amber-500"});if("page"===e.entityType){const t=
|
|
10
|
+
/* @__PURE__ */o("span",{className:`absolute inset-0 flex items-center justify-center text-3xs font-bold pt-2 ${c??_[e]??"text-gray-600"}`,children:p??k[e]??e.slice(0,3).toUpperCase()})]})}function I({item:e}){if("folder"===e.entityType)/* @__PURE__ */
|
|
11
|
+
return o(N,{className:"h-4 w-4 shrink-0 text-amber-500"});if("page"===e.entityType){const t=T(e.entityId,e.label);/* @__PURE__ */
|
|
12
12
|
return o("span",{className:`h-4 w-4 rounded bg-gradient-to-br ${v(e.entityId||e.label||"page")} flex items-center justify-center text-white shrink-0`,children:t&&n(t)?r(t,{className:"h-3 w-3 text-white"}):/* @__PURE__ */o("span",{className:"h-1.5 w-1.5 rounded-[2px] border border-white/80"})})}const i=("preview-file"===e.entityType&&e.fileKind?C[e.fileKind]:_[e.entityType])??"text-gray-400";/* @__PURE__ */
|
|
13
|
-
return o(t,{name:"page",className:`h-4 w-4 shrink-0 ${i}`,strokeWidth:1.5})}function $(e){return"preview-file"===e.entityType&&e.fileKind?E[e.fileKind]:"page"===e.entityType?"App":"folder"===e.entityType?"Folder":k[e.entityType]??e.entityType.slice(0,3).toUpperCase()}var S=null,R=/* @__PURE__ */new Set;function D(e){S=e,R.forEach(e=>e())}function P(e){return R.add(e),()=>{R.delete(e)}}function F(){return S}var
|
|
13
|
+
return o(t,{name:"page",className:`h-4 w-4 shrink-0 ${i}`,strokeWidth:1.5})}function $(e){return"preview-file"===e.entityType&&e.fileKind?E[e.fileKind]:"page"===e.entityType?"App":"folder"===e.entityType?"Folder":k[e.entityType]??e.entityType.slice(0,3).toUpperCase()}var S=null,R=/* @__PURE__ */new Set;function D(e){S=e,R.forEach(e=>e())}function P(e){return R.add(e),()=>{R.delete(e)}}function F(){return S}var O="__REACT_OS_SHELL_FILES_VIEW__",V="react-os-shell:files-show-trash",A="react-os-shell:files-open-desktop-folder";function M(){"undefined"!=typeof window&&(window[O]="trash",window.dispatchEvent(new CustomEvent(V)))}function U(e){"undefined"!=typeof window&&(window[O]={view:"desktop-folder",folderId:e},window.dispatchEvent(new CustomEvent(A,{detail:{folderId:e}})))}function W(){if("undefined"==typeof window)return null;const e=window[O];return"trash"===e?"trash":e&&"object"==typeof e&&"desktop-folder"===e.view&&"string"==typeof e.folderId?e:null}function z(){const e=W();return"undefined"!=typeof window&&(window[O]=null),e}export{I as DesktopItemMiniIcon,A as FILES_OPEN_DESKTOP_FOLDER_EVENT,V as FILES_SHOW_TRASH_EVENT,L as FileIconTile,u as FilesQuotaError,N as FolderGlyph,a as SPREADSHEET_PREVIEW_UPDATE_EVENT,p as claimSpreadsheetPreviewStage,z as consumeFilesViewRequest,w as createFileServerStore,$ as desktopItemTypeLabel,F as getDesktopFoldersSnapshot,g as getFilesStore,x as hasHostFilesStore,W as peekFilesViewRequest,c as peekSpreadsheetPreviewStage,D as publishDesktopFolders,U as requestFilesDesktopFolderView,M as requestFilesTrashView,y as setFilesStore,d as setSpreadsheetPreview,P as subscribeDesktopFolders};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-GEYM4WN3.js";import{formatDateTime as o}from"./chunk-Y3JW2GW5.js";import{useShellLocale as c}from"./chunk-
|
|
1
|
+
import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-GEYM4WN3.js";import{formatDateTime as o}from"./chunk-Y3JW2GW5.js";import{useShellLocale as c}from"./chunk-TJSJVC6P.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
|
|
2
2
|
return i("time",{dateTime:u,title:o(u,{locale:s??a}),className:l,children:t(p,{precise:n,locale:s??a})})}export{m as TimeAgo};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{MediaUploadField as e}from"./chunk-
|
|
2
|
-
return n("section",{"aria-label":
|
|
1
|
+
import{MediaUploadField as e}from"./chunk-457SK2XV.js";import{BrandMark as r}from"./chunk-MI67DI3H.js";import{Button_default as a}from"./chunk-EVYD6UFQ.js";import{useShellStrings as t}from"./chunk-TJSJVC6P.js";import{useRef as i,useState as l,useEffect as s}from"react";import{jsxs as n,jsx as c}from"react/jsx-runtime";function d({committedUrl:d,committedHasAlpha:o=null,committedIsLight:m=null,fallbackUrl:g,fallbackHasAlpha:h=null,fallbackIsLight:u=null,subjectName:b,assetName:p,onSave:x,onRemove:f,accept:v="image/png,image/x-icon,image/vnd.microsoft.icon,.ico,image/svg+xml,image/jpeg,image/webp",acceptHint:y="PNG · ICO · SVG · JPG · WEBP",maxBytes:N=5242880,previews:w=[],disabled:k=!1}){const j=i(null),[L,U]=l(null),[R,C]=l(""),[F,H]=l(""),[I,S]=l(!1),[A,E]=l(!1),O=function(e){return e.trim().toLocaleLowerCase().split(/\s+/).at(-1)||"image"}(p),P=t().brandAsset,V=R||d||g||"",B=L?null:d?o:h,G=L?null:d?m:u;s(()=>()=>{j.current&&URL.revokeObjectURL(j.current)},[]);const J=()=>{j.current&&(URL.revokeObjectURL(j.current),j.current=null)};/* @__PURE__ */
|
|
2
|
+
return n("section",{"aria-label":P.region(p,b),className:"grid gap-4 lg:grid-cols-2",children:[
|
|
3
3
|
/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4",children:[
|
|
4
|
-
/* @__PURE__ */c(e,{value:
|
|
4
|
+
/* @__PURE__ */c(e,{value:V,onChange:()=>{},onFile:e=>{if(k)return;J();const r=URL.createObjectURL(e);j.current=r,U(e),C(r),H("")},label:p,hint:F||P.usedFor(b),error:F||void 0,accept:v,acceptHint:y,maxSizeBytes:N,fit:"contain",height:180,allowRemove:!1,busy:I||A,disabled:k}),
|
|
5
5
|
/* @__PURE__ */n("div",{className:"mt-3 flex flex-wrap gap-2",children:[
|
|
6
|
-
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!
|
|
7
|
-
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:
|
|
8
|
-
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:
|
|
6
|
+
/* @__PURE__ */c(a,{onClick:async()=>{if(L&&!k&&!I){S(!0),H("");try{await x(L),J(),U(null),C("")}catch(e){H(e instanceof Error?e.message:P.saveFailed(O,p))}finally{S(!1)}}},disabled:!L||k,loading:I,children:P.save(O,p)}),(L||d)&&/* @__PURE__ */c(a,{variant:"ghost-danger",onClick:async()=>{if(!k&&!A){if(L)return J(),U(null),C(""),void H("");if(d){E(!0),H("");try{await f()}catch(e){H(e instanceof Error?e.message:P.removeFailed(O,p))}finally{E(!1)}}}},disabled:k,loading:A,children:L?P.discard:P.remove(O,p)})]})]}),w.length>0&&/* @__PURE__ */n("div",{className:"rounded-lg border border-gray-200 bg-white p-4","aria-label":P.previews(p),children:[
|
|
7
|
+
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-900",children:P.preview}),
|
|
8
|
+
/* @__PURE__ */c("div",{className:"mt-3 grid gap-3",children:w.map(e=>{const a=/* @__PURE__ */c(r,{src:V,alt:P.alt(b,p),slot:e.slot,surface:e.surface,adaptive:!0,hasAlpha:B,isLight:G,size:"browser-tab"===e.kind?16:void 0});/* @__PURE__ */
|
|
9
9
|
return n("div",{"data-brand-preview":!0,className:"dark"===e.surface?"text-white":"text-gray-900",children:[
|
|
10
10
|
/* @__PURE__ */c("div",{className:"mb-2 text-xs font-medium text-gray-500",children:e.label}),"browser-tab"===e.kind?/* @__PURE__ */n("div",{className:"flex items-end gap-1 border-b border-gray-200",children:[
|
|
11
11
|
/* @__PURE__ */n("div",{className:"flex max-w-[220px] items-center gap-2 rounded-t-lg border border-b-0 border-gray-200 bg-white px-3 py-2",children:[a,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Markdown as e}from"./chunk-
|
|
1
|
+
import{Markdown as e}from"./chunk-LS6VU6F7.js";import{PLACEHOLDER_INK as t}from"./chunk-AYZY3YNC.js";import{Icon as l}from"./chunk-T3NLFOLW.js";import{LoadingSpinner as r}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-TJSJVC6P.js";import{useState as a,useMemo as n}from"react";import{jsxs as i,jsx as o,Fragment as c}from"react/jsx-runtime";var d=({open:e})=>/* @__PURE__ */o(l,{name:"chevron-right",look:"mini",className:"h-3.5 w-3.5 shrink-0 transition-transform "+(e?"rotate-90":""),"aria-hidden":"true"});function h({docs:h,loading:m=!1,categoryOrder:p,canEdit:u=!1,onNew:g,onEdit:x,renderBody:f,emptyMessage:b}){const y=s(),[N,v]=a(""),[w,k]=a(null),[C,j]=a({}),L=N.trim().toLowerCase(),M=n(()=>{const e=/* @__PURE__ */new Map;for(const t of h){let l=e.get(t.category);l||(l={key:t.category,label:t.category_label||t.category,docs:[]},e.set(t.category,l)),l.docs.push(t)}if(!p?.length)return[...e.values()];const t=new Map(p.map((e,t)=>[e,t]));return[...e.values()].sort((e,l)=>(t.get(e.key)??1/0)-(t.get(l.key)??1/0))},[h,p]),_=e=>!L||e.title.toLowerCase().includes(L)||e.body.toLowerCase().includes(L)||e.category_label.toLowerCase().includes(L),A=n(()=>M.map(e=>({...e,docs:e.docs.filter(_)})).filter(e=>e.docs.length>0),[M,L]),E=n(()=>A.flatMap(e=>e.docs),[A]),V=(w?E.find(e=>e.slug===w):void 0)??E[0]??null,Y=e=>!!L||(C[e]??e===V?.category);/* @__PURE__ */
|
|
2
2
|
return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
|
|
3
3
|
/* @__PURE__ */i("aside",{className:"w-64 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden",children:[
|
|
4
4
|
/* @__PURE__ */i("div",{className:"flex items-center justify-between gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
@@ -6,16 +6,16 @@ return i("div",{className:"flex h-full gap-4 px-4 py-3 min-h-0",children:[
|
|
|
6
6
|
/* @__PURE__ */o("div",{className:"px-3 py-2 border-b border-line-subtle shrink-0",children:/* @__PURE__ */i("div",{className:"relative",children:[
|
|
7
7
|
/* @__PURE__ */o(l,{name:"search",look:"mini",className:`pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 h-4 w-4 ${t}`,"aria-hidden":"true"}),
|
|
8
8
|
/* @__PURE__ */o("input",{type:"text",value:N,onChange:e=>v(e.target.value),placeholder:y.help.searchPlaceholder,className:"w-full rounded-md border border-line-strong bg-surface h-8 pl-8 pr-2 text-sm shadow-sm focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]"})]})}),
|
|
9
|
-
/* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===
|
|
9
|
+
/* @__PURE__ */o("div",{className:"flex-1 overflow-y-auto py-1",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"py-6",label:y.help.loading}):0===A.length?/* @__PURE__ */o("p",{className:"px-3 py-6 text-center text-xs text-gray-500",children:L?y.help.noResults:b??y.help.empty}):A.map(e=>{const t=Y(e.key);/* @__PURE__ */
|
|
10
10
|
return i("div",{className:"py-0.5",children:[
|
|
11
|
-
/* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!
|
|
11
|
+
/* @__PURE__ */i("button",{type:"button",onClick:()=>{return t=e.key,j(e=>({...e,[t]:!Y(t)}));var t},className:"w-full flex items-center gap-2 h-8 px-3 text-left text-3xs font-semibold uppercase tracking-wide text-ink-faintest hover:text-gray-600",children:[
|
|
12
12
|
/* @__PURE__ */o(d,{open:t}),
|
|
13
|
-
/* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=
|
|
13
|
+
/* @__PURE__ */o("span",{className:"truncate",children:e.label})]}),t&&e.docs.map(e=>{const t=V?.slug===e.slug;/* @__PURE__ */
|
|
14
14
|
return i("button",{type:"button",onClick:()=>k(e.slug),className:"w-full text-left pl-8 pr-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 transition-colors "+(t?"bg-blue-50 text-blue-700 font-medium":"text-gray-700 hover:bg-gray-50"),children:[
|
|
15
15
|
/* @__PURE__ */o("span",{className:"truncate",children:e.title}),!1===e.is_published&&/* @__PURE__ */o("span",{className:"ml-auto shrink-0 text-2xs text-amber-600",children:y.help.draft})]},e.slug)})]},e.key)})})]}),
|
|
16
|
-
/* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:
|
|
16
|
+
/* @__PURE__ */o("main",{className:"flex-1 min-w-0 bg-white rounded-lg shadow overflow-hidden flex flex-col",children:V?/* @__PURE__ */i(c,{children:[
|
|
17
17
|
/* @__PURE__ */i("div",{className:"flex items-start justify-between gap-4 px-5 py-3 border-b border-gray-200 bg-gray-50 shrink-0",children:[
|
|
18
18
|
/* @__PURE__ */i("div",{className:"min-w-0",children:[
|
|
19
|
-
/* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:
|
|
20
|
-
/* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[
|
|
21
|
-
/* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(
|
|
19
|
+
/* @__PURE__ */o("h1",{className:"text-lg font-semibold text-gray-900 truncate",children:V.title}),
|
|
20
|
+
/* @__PURE__ */i("p",{className:"text-xs text-gray-500 mt-0.5",children:[V.category_label,!1===V.is_published&&/* @__PURE__ */i("span",{className:"ml-2 text-amber-600",children:["· ",y.help.draft]})]})]}),u&&x&&/* @__PURE__ */o("button",{type:"button",onClick:()=>x(V),className:"shrink-0 text-sm text-blue-600 hover:underline",children:y.help.edit})]}),
|
|
21
|
+
/* @__PURE__ */o("div",{className:"flex-1 overflow-auto px-5 py-4",children:f?f(V):V.body?/* @__PURE__ */o(e,{children:V.body}):/* @__PURE__ */o("p",{className:"text-sm text-gray-500 italic",children:y.help.noBody})})]}):/* @__PURE__ */o("div",{className:"flex-1 flex items-center justify-center px-6 text-center",children:m?/* @__PURE__ */o(r,{size:"sm",padding:"",label:y.help.loading}):/* @__PURE__ */o("p",{className:"text-sm text-ink-faint",children:y.help.pickArticle})})})]})}export{h as HelpCenter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{InputNumber_default as a}from"./chunk-
|
|
1
|
+
import{InputNumber_default as a}from"./chunk-4GTXRVDF.js";import{Icon as e}from"./chunk-T3NLFOLW.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
|
|
2
2
|
return r("div",{role:"group","aria-label":e,className:"grid min-w-0 grid-cols-2 gap-2",children:[u("x"),u("y")]})}export{s as PositionInput};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as e}from"./chunk-TJSJVC6P.js";import{jsxs as t,jsx as a,Fragment as l}from"react/jsx-runtime";var n=e=>"number"==typeof e?e:parseInt(String(e??""))||0;function s({items:s,getVolume:i,getInstructionVolume:r,getActualVolume:c,qtyField:m="instruction",showNewIndicator:d=!1,getInstructionQty:u=e=>e.quantity,getActualQty:h=e=>e.actual_qty,isFilled:o,isNew:g=e=>Boolean(e._isNew),className:x,style:f}){const p=e().containers,y=o?s.filter(o):s,N=e=>n(u(e)),b=e=>n(h(e)),w=y.some(e=>null!=h(e)&&b(e)>0),v=e=>w?N(e):"actual"===m?h(e)??u(e)??0:u(e)??0,M=y.reduce((e,t)=>e+n(v(t)),0),$=y.filter(e=>g(e)).length,k=y.filter(e=>g(e)).reduce((e,t)=>e+n(v(t)),0),V=y.reduce((e,t)=>e+N(t),0),j=y.reduce((e,t)=>e+b(t),0),I=e=>i?.(e)??0,q=r??(e=>I(e)*N(e)),A=c??(e=>I(e)*b(e)),F=y.reduce((e,t)=>e+q(t),0),J=y.reduce((e,t)=>e+A(t),0),Q=w?Math.max(F,J):"actual"===m&&J||F,S=Q<=34.65?"20ft":"40ft",_="20ft"===S?33:67,B=Q>0?Math.max(1,Math.ceil(Q/_)):0,C=B*_,P=Q>0&&Q>=.95*C&&Q<=1.1*C;if(0===y.length)return null;const T=(e,t)=>_>0?Math.max(0,Math.min((e-t*_)/_*100,100)):0;/* @__PURE__ */
|
|
2
2
|
return t("div",{className:`mt-2 px-1 space-y-2 ${x??""}`.trim(),style:f,children:[
|
|
3
3
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs text-gray-500",children:[
|
|
4
|
-
/* @__PURE__ */t("span",{children:[`${p.items(
|
|
5
|
-
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,k)]})]}),
|
|
4
|
+
/* @__PURE__ */t("span",{children:[`${p.items(y.length)} · ${p.pieces(M)}`,w&&V!==j&&/* @__PURE__ */a("span",{className:"ml-1 text-gray-400",children:p.split(V,j)})]}),d&&$>0&&/* @__PURE__ */t("span",{className:"flex items-center gap-1 text-green-600",children:[
|
|
5
|
+
/* @__PURE__ */a("span",{className:"w-1.5 h-1.5 rounded-full bg-green-500"}),p.added($,k)]})]}),Q>0?/* @__PURE__ */t("div",{className:"space-y-2",children:[Array.from({length:B}).map((e,l)=>{const n=T(F,l),s=T(J,l),i=w,r=Math.max(n,s),c=Math.min(n,s),m=n>=s,d=i?m?"bg-blue-500":"bg-green-500":"bg-blue-500",u=i?m?"bg-green-500":"bg-blue-500":"";/* @__PURE__ */
|
|
6
6
|
return t("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faintest w-8 shrink-0",children:
|
|
7
|
+
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faintest w-8 shrink-0",children:S}),
|
|
8
8
|
/* @__PURE__ */t("div",{className:"relative flex-1 h-4 bg-gray-100 rounded-full overflow-hidden border border-gray-200",children:[
|
|
9
9
|
/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${d} transition-all`,style:{width:`${r}%`}}),i&&c>0&&/* @__PURE__ */a("div",{className:`absolute inset-y-0 left-0 ${u} transition-all`,style:{width:`${c}%`}})]}),
|
|
10
|
-
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faint w-16 text-right",children:i?p.fill(Math.min(
|
|
10
|
+
/* @__PURE__ */a("span",{className:"text-2xs text-ink-faint w-16 text-right",children:i?p.fill(Math.min(J-l*_,_),_):p.fill(Math.min(F-l*_,_),_)})]},`bar-${l}`)}),
|
|
11
11
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-xs pt-0.5",children:[
|
|
12
12
|
/* @__PURE__ */t("span",{className:"text-gray-500 inline-flex items-center gap-1",children:[p.total,w?/* @__PURE__ */t(l,{children:[
|
|
13
13
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-blue-700",children:[
|
|
14
14
|
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-blue-500"}),p.instructed(F)]}),
|
|
15
15
|
/* @__PURE__ */a("span",{className:"text-gray-400",children:"/"}),
|
|
16
16
|
/* @__PURE__ */t("span",{className:"inline-flex items-center gap-1 text-green-700",children:[
|
|
17
|
-
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(
|
|
18
|
-
/* @__PURE__ */t("span",{className:"font-medium "+(
|
|
17
|
+
/* @__PURE__ */a("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),p.loaded(J)]})]}):/* @__PURE__ */a("b",{className:"text-gray-700",children:p.volume(Q)})]}),
|
|
18
|
+
/* @__PURE__ */t("span",{className:"font-medium "+(P?"text-green-600":"text-gray-500"),children:[P&&"✓ ",B," × ",S]})]})]}):/* @__PURE__ */a("div",{className:"text-xs text-gray-400",children:p.noVolume})]})}export{s as ContainerFillChart};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{CartesianPlot as t}from"./chunk-YRG6XJ6M.js";import{binValues as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as e,useShellLocale as i}from"./chunk-TJSJVC6P.js";import{formatPlain as m,formatFixed as n}from"./chunk-C3QOHMR6.js";import{jsx as l}from"react/jsx-runtime";function c({values:c,bins:s=10,precomputed:h,height:u=220,width:p,color:b,tone:f,formatBound:d,formatCount:x,yAxisLabel:g,label:k,className:y,emptyLabel:j}){const v=e().charts,w=i(),A=d??(t=>Number.isInteger(t)?m(t,w):n(t,1,w)),L=x??(t=>m(t,w)),M=g??v.countAxis,C=k??v.distribution,J=h??o(c??[],s),N=a(0,b,f),R=J.map(t=>A(t.from)),P=J.map(t=>t.count);/* @__PURE__ */
|
|
2
|
+
return l(t,{labels:R,values:P,height:u,width:p,bandPadding:0,xTickAnchor:"start",formatValue:L,yAxisLabel:M,className:y,emptyLabel:j,ariaLabel:v.histogram(C,J.length,(c??[]).length),tooltip:t=>/* @__PURE__ */l(r,{title:`${A(J[t].from)} – ${A(J[t].to)}`,rows:[{key:"count",label:v.observations,color:N,value:L(J[t].count)}]}),children:({x:t,y:o,bottom:r,active:a})=>/* @__PURE__ */l("g",{children:J.map((e,i)=>/* @__PURE__ */l("rect",{x:t(i)+.5,y:o(e.count),width:Math.max(1,t.bandwidth-1),height:Math.max(0,r-o(e.count)),fill:N,fillOpacity:null===a||a===i?.85:.42},i))})})}export{c as HistogramChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-T3NLFOLW.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-TJSJVC6P.js";import{jsx as r}from"react/jsx-runtime";var n=["left","center","right","justify"],a={left:"align-left",center:"align-center",right:"align-right",justify:"align-justify"};function i(t){switch(t){case"left":/* @__PURE__ */
|
|
2
2
|
return r(e,{name:"align-left"});case"center":/* @__PURE__ */
|
|
3
3
|
return r(e,{name:"align-center"});case"right":/* @__PURE__ */
|
|
4
4
|
return r(e,{name:"align-right"});case"justify":/* @__PURE__ */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{writeClipboard as e}from"./chunk-
|
|
1
|
+
import{writeClipboard as e}from"./chunk-5HOXR3L4.js";import{IconButton_default as r}from"./chunk-SV5RRBVA.js";import{Icon as t}from"./chunk-T3NLFOLW.js";import{toast_default as n}from"./chunk-JTZVUO3I.js";import{useShellStrings as a}from"./chunk-TJSJVC6P.js";import{useState as i,useRef as o,useEffect as c,useCallback as l}from"react";import{jsxs as m,jsx as s,Fragment as d}from"react/jsx-runtime";var u={bordered:"border border-gray-300 bg-white",flat:"bg-gray-100"},p={sm:{box:"gap-2 px-3 py-1 text-xs",button:"-my-1"},md:{box:"gap-2 px-3 min-h-8 py-1 text-sm",button:"-my-0.5"}};function b(){/* @__PURE__ */
|
|
2
2
|
return s(t,{name:"copy",className:"h-4 w-4","aria-hidden":"true"})}function h(){/* @__PURE__ */
|
|
3
|
-
return s(t,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:t,children:y,symbol:f,label:x,size:g="md",variant:k="bordered",hideCopyButton:N=!1,onCopy:v,multiline:w=!1,id:j,"aria-describedby":
|
|
4
|
-
return m("div",{id:
|
|
3
|
+
return s(t,{name:"check",className:"h-4 w-4 text-green-600","aria-hidden":"true"})}function y({value:t,children:y,symbol:f,label:x,size:g="md",variant:k="bordered",hideCopyButton:N=!1,onCopy:v,multiline:w=!1,id:j,"aria-describedby":T,className:C=""}){const[L,V]=i(!1),B=o(null),J=a().copy;c(()=>()=>{B.current&&clearTimeout(B.current)},[]);const O=l(async()=>{await e(t)?(V(!0),B.current&&clearTimeout(B.current),B.current=setTimeout(()=>{V(!1),B.current=null},2e3),v?.(t)):n.error(J.failed)},[t,v,J]),{box:R,button:S}=p[g],z=!N;/* @__PURE__ */
|
|
4
|
+
return m("div",{id:z?void 0:j,"aria-describedby":z?void 0:T,className:["inline-flex max-w-full items-center rounded-md",u[k],R,C].filter(Boolean).join(" "),children:[null!=f&&""!==f&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"shrink-0 select-none font-mono text-gray-400",children:f}),
|
|
5
5
|
/* @__PURE__ */s("span",{className:"min-w-0 font-mono text-gray-800 "+(w?"whitespace-pre-wrap break-all":"truncate"),title:w?void 0:t,children:y??t}),!N&&/* @__PURE__ */m(d,{children:[
|
|
6
|
-
/* @__PURE__ */s(r,{id:j,"aria-label":x?
|
|
7
|
-
/* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:
|
|
6
|
+
/* @__PURE__ */s(r,{id:j,"aria-label":x?J.copyLabel(x):J.copy,"aria-describedby":T,onClick:O,className:`${S} text-gray-400`,children:/* @__PURE__ */s(L?h:b,{})}),
|
|
7
|
+
/* @__PURE__ */s("span",{"aria-live":"polite",className:"sr-only",children:L?J.copied:""})]})]})}export{y as Snippet};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{CartesianPlot as l}from"./chunk-
|
|
2
|
-
return s(l,{labels:d,values:
|
|
1
|
+
import{areaBetween as e,curvePath as i}from"./chunk-VFC6QUEN.js";import{CartesianPlot as l}from"./chunk-YRG6XJ6M.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as n}from"./chunk-TJSJVC6P.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{jsx as s,jsxs as m,Fragment as c}from"react/jsx-runtime";function u({rows:u,labels:d,variant:p="area",curve:f="linear",height:k=220,width:g,max:b,min:x,formatValue:w,yAxisLabel:y,color:j,tone:v,label:L,className:M,emptyLabel:V,radius:C=3}){const F=o().charts,N=n(),O=w??(e=>h(e,N)),W=L??F.range,A=u.flatMap(e=>[e.low,e.high]).filter(Number.isFinite),J=r(0,j,v);/* @__PURE__ */
|
|
2
|
+
return s(l,{labels:d,values:A,height:k,width:g,max:b,min:x,formatValue:O,yAxisLabel:y,className:M,emptyLabel:V,bandPadding:"bar"===p?.34:0,ariaLabel:F.rangeLabel(W,d.length),tooltip:e=>/* @__PURE__ */s(t,{title:d[e],rows:[{key:"high",label:F.high,color:J,value:null==u[e]?void 0:O(u[e].high)},{key:"low",label:F.low,color:J,value:null==u[e]?void 0:O(u[e].low)}]}),children:({x:l,y:t,active:r})=>"bar"===p?/* @__PURE__ */s("g",{children:u.map((e,i)=>/* @__PURE__ */s("rect",{x:l(i),y:t(e.high),width:Math.max(1,l.bandwidth),height:Math.max(1,t(e.low)-t(e.high)),rx:C,fill:J,fillOpacity:null===r||r===i?.85:.4},i))}):/* @__PURE__ */m("g",{children:[(()=>{const r=u.map((e,i)=>[l.center(i),t(e.high)]),a=u.map((e,i)=>[l.center(i),t(e.low)]);/* @__PURE__ */
|
|
3
3
|
return m(c,{children:[
|
|
4
|
-
/* @__PURE__ */s("path",{d:e(i(r,f),a),fill:
|
|
5
|
-
/* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:
|
|
6
|
-
/* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:
|
|
4
|
+
/* @__PURE__ */s("path",{d:e(i(r,f),a),fill:J,fillOpacity:.2,stroke:"none"}),
|
|
5
|
+
/* @__PURE__ */s("path",{d:i(r,f),fill:"none",stroke:J,strokeWidth:2,strokeLinejoin:"round"}),
|
|
6
|
+
/* @__PURE__ */s("path",{d:i(a,f),fill:"none",stroke:J,strokeWidth:2,strokeLinejoin:"round",strokeOpacity:.7})]})})(),null!==r&&/* @__PURE__ */s("line",{x1:l.center(r),y1:t(u[r].high),x2:l.center(r),y2:t(u[r].low),stroke:a.axis,strokeWidth:1})]})})}export{u as RangeChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{PopupMenuDivider as e,PopupMenuLabel as t,menuTextRowStyle as i,PopupSubmenu as l,itemLook as a,MenuCheckMark as n}from"./chunk-
|
|
1
|
+
import{PopupMenuDivider as e,PopupMenuLabel as t,menuTextRowStyle as i,PopupSubmenu as l,itemLook as a,MenuCheckMark as n}from"./chunk-CRRC72EE.js";import{jsx as r,jsxs as d}from"react/jsx-runtime";var s=e=>!!e&&"label"!==e.type&&"status"!==e.type&&"divider"!==e.type&&!e.disabled,o=(e,t)=>`${e}-status-${t}`;function c(e,t){return e.flatMap((e,i)=>"status"===e.type?[o(t,i)]:[]).join(" ")||void 0}var b={minHeight:"var(--space-32)",paddingTop:0,paddingBottom:0,paddingLeft:"var(--space-12)",paddingRight:"var(--space-12)"};function u(s,c){const{menuId:y,choose:m,toggle:p,followLink:h,rowProps:k=()=>({}),linkAs:f}=c,g=f??"a",v=(s,f)=>{if("divider"===s.type)/* @__PURE__ */
|
|
2
2
|
return r("div",{role:"separator",children:/* @__PURE__ */r(e,{})},s.key);if("label"===s.type)/* @__PURE__ */
|
|
3
3
|
return r("div",{id:`${y}-label-${f}`,children:/* @__PURE__ */r(t,{children:s.label})},s.key);if("status"===s.type)/* @__PURE__ */
|
|
4
4
|
return r("div",{id:o(y,f),className:"text-xs",style:i(),children:s.label},s.key);if("submenu"===s.type)/* @__PURE__ */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{SPINNER_RING as e}from"./chunk-MRJKZWWV.js";import{currentShellStrings as n}from"./chunk-
|
|
1
|
+
import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{SPINNER_RING as e}from"./chunk-MRJKZWWV.js";import{currentShellStrings as n}from"./chunk-TJSJVC6P.js";var o="http://www.w3.org/2000/svg",s={},r=/* @__PURE__ */new Map;function i(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var a={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function c(t,e){const n=document.createElementNS(o,"svg");n.setAttribute("class",e),n.setAttribute("fill","none"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2");const s=document.createElementNS(o,"path");return s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",a[t]),n.appendChild(s),n}function l(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function d(n,o,a){const d={...s,...a},u=d.placement??"top",m=d.sticky??!1,p=`${u}|${n}|${o}`;if(d.dedupe){const t=r.get(p);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==n&&!1!==d.sound&&import("./sounds-E5OTSJLX.js").then(t=>{"success"===n?t.playSuccess():"error"===n?t.playError():t.playNotification()}).catch(()=>{});const f="bottom"===u?i("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):i("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),h="bottom"===u?"translateY(10px)":"translateY(-10px)",y=l("pointer-events-auto cursor-pointer rosh-toast");if(y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,y.setAttribute("role","error"===n?"alert":"status"),y.setAttribute("aria-atomic","true"),"loading"===n){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.className=`${e} h-4 w-4 rosh-tone-loading`,y.appendChild(t)}else y.appendChild(c(n,`h-4 w-4 rosh-tone-${n}`));const v=document.createElement("span");if(v.textContent=o,y.appendChild(v),d.action){const{label:e,onClick:n}=d.action,o=document.createElement("button");o.type="button",o.className=t({variant:"link",size:"sm"}),o.textContent=e,o.addEventListener("click",t=>{t.stopPropagation(),g||(n(),x("action"))}),y.appendChild(o)}let b;f.appendChild(y),requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0) scale(1)"});let g=!1;const x=t=>{g||(g=!0,b&&clearTimeout(b),r.delete(p),y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,setTimeout(()=>y.remove(),300),d.onClose?.(t))},w=()=>x("dismissed"),C=d.duration??("info"===n?4500:3e3),E=()=>{b&&clearTimeout(b),m||(b=setTimeout(()=>x("timeout"),C))};return E(),y.addEventListener("mouseenter",()=>{b&&clearTimeout(b)}),y.addEventListener("mouseleave",()=>{g||E()}),y.addEventListener("click",w),r.set(p,{el:y,restart:E,dismiss:w}),{dismiss:w}}var u=8e3,m=/* @__PURE__ */new Map,p=!1;var f={success:(t,e)=>d("success",t,e),error:(t,e)=>d("error",t,e),warning:(t,e)=>d("warning",t,e),info:(t,e)=>d("info",t,e),notify:(t,e)=>function(t,e){!1!==(e?.sound??s.sound)&&import("./sounds-E5OTSJLX.js").then(t=>t.playNotification()).catch(()=>{});const o=i("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),r=l("pointer-events-auto cursor-pointer rosh-notif");r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)";const a=l("rosh-notif-badge");a.appendChild(c("bell","h-5 w-5"));const d=l("rosh-notif-body");d.append(l("rosh-notif-title",n().toast.notification),l("notif-msg rosh-notif-msg",t));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",r.append(a,d,u);const m=()=>{r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>r.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),r.addEventListener("click",m),o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",r.style.transform="translateX(0) scale(1)"}),setTimeout(m,e?.duration??1e4)}(t,e),promise:(t,e,n)=>{const o=d("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),d("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),d("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{s={...t}},undoable:function(t,e){p||"undefined"==typeof window||(p=!0,window.addEventListener("pagehide",()=>{const t=[...m.values()];m.clear();for(const e of t)e.run({keepalive:!0})}));const o=/* @__PURE__ */Symbol("undoable");let s=!1,r=null;const i=async t=>{if(!s){s=!0,m.delete(o);try{await(t?e.commit(t):e.commit())}catch(t){e.onFail?.(t)}}},a=()=>!s&&(s=!0,m.delete(o),e.undo(),!0);return m.set(o,{run:i}),r=d("success",t,{sound:!1,placement:e.placement,duration:e.duration??8e3,action:{label:e.actionLabel??n().toast.undo,onClick:()=>{a()}},onClose:t=>{"action"!==t&&i()}}),{undo:()=>{const t=a();return t&&r?.dismiss(),t},commit:async()=>{if(s)return;const t=i();r?.dismiss(),await t}}}};export{u as UNDOABLE_MS,f as toast_default};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{GROUP_COLORS as e}from"./chunk-JMGDGNM7.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as l}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e}from"./chunk-JMGDGNM7.js";import{SpinnerRing as r}from"./chunk-R2VKEMZH.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as l}from"./chunk-TJSJVC6P.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
|
|
2
2
|
return t(n,{content:e,describe:!1,children:/* @__PURE__ */t("button",{type:"button",onClick:l,"aria-label":e,className:"flex h-4 w-4 items-center justify-center rounded-full leading-none hover:bg-current/10 rosh-focus-ring focus-visible:ring-2",children:/* @__PURE__ */t("span",{"aria-hidden":"true",children:r})})})}function c({state:n,label:c,verb:u,subject:m,pct:p,onCancel:d,onRetry:h,onDismiss:f,className:b=""}){const g=l().transfer;if("idle"===n)return null==c?null:/* @__PURE__ */t("span",{className:`${s} ${e.neutral} pr-2 ${b}`.trim(),children:c});if("error"===n)/* @__PURE__ */
|
|
3
3
|
return i("span",{role:"status",className:`${s} ${e.danger} ${b}`.trim(),children:[
|
|
4
|
-
/* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading
|
|
5
|
-
return i("span",{role:"status","aria-live":"polite",className:`${s} ${e.info} ${b}`.trim(),children:[null
|
|
6
|
-
/* @__PURE__ */t("span",{className:"tabular-nums",children:"string"==typeof y?
|
|
4
|
+
/* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,$=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),k="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,N=e=>[e,m,null==$?"":`${$}%`].filter(Boolean).join(" ");/* @__PURE__ */
|
|
5
|
+
return i("span",{role:"status","aria-live":"polite",className:`${s} ${e.info} ${b}`.trim(),children:[null==$&&/* @__PURE__ */t(r,{ink:""}),
|
|
6
|
+
/* @__PURE__ */t("span",{className:"tabular-nums",children:"string"==typeof y?N(y):/* @__PURE__ */i(a,{children:[y,N("")&&` ${N("")}`]})}),d&&/* @__PURE__ */t(o,{label:k,glyph:"×",onClick:d})]})}export{c as TransferProgress};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{angleScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-
|
|
2
|
-
return d("p",{className:`text-sm text-gray-500 ${C??""}`,children:
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{polygonPoints as t}from"./chunk-VFC6QUEN.js";import{ChartDefs as r,maskId as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{angleScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-TJSJVC6P.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:C,emptyLabel:$}){const W=m().charts,F=c(),w=N??(e=>h(e,F)),R=$??W.nothingToCompare,A=p(),[L,T]=u(null),{highlighted:V}=a(),Y=x;if(k.length<3||0===Y.length)/* @__PURE__ */
|
|
2
|
+
return d("p",{className:`text-sm text-gray-500 ${C??""}`,children:R});const z=y/2,B=y/2,E=y/2-46,H=o(k.length),J=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...Y.map(e=>e.values[t]??0).filter(Number.isFinite))),Q=(e,t)=>{const r=Math.max(0,Math.min(1,t/J[e])),l=H.center(e)-H.step/2;return[z+E*r*Math.cos(l),B+E*r*Math.sin(l)]},S=(e,t)=>null!==L?L!==e:null!==V&&V!==t,U=null!==L?Y[L]:void 0;/* @__PURE__ */
|
|
3
3
|
return f("div",{className:`relative ${C??""}`,children:[
|
|
4
|
-
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":
|
|
5
|
-
/* @__PURE__ */d("title",{id:
|
|
4
|
+
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":A,onMouseLeave:()=>T(null),children:[
|
|
5
|
+
/* @__PURE__ */d("title",{id:A,children:W.acrossMeasures(Y.map(e=>e.label),k.length)}),Array.from({length:M},(e,r)=>{const l=E*(r+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:z,cy:B,r:l,fill:"none",stroke:i.grid,strokeWidth:1},r):/* @__PURE__ */d("path",{d:g(t(z,B,l,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},r)}),k.map((e,t)=>{const[r,l]=Q(t,J[t]);/* @__PURE__ */
|
|
6
6
|
return f("g",{children:[
|
|
7
|
-
/* @__PURE__ */d("line",{x1:
|
|
8
|
-
/* @__PURE__ */d("text",{x:
|
|
9
|
-
/* @__PURE__ */d(r,{id:
|
|
10
|
-
return f("g",{opacity:
|
|
11
|
-
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),
|
|
12
|
-
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:
|
|
7
|
+
/* @__PURE__ */d("line",{x1:z,y1:B,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
|
|
8
|
+
/* @__PURE__ */d("text",{x:z+(E+18)*Math.cos(H.center(t)-H.step/2),y:B+(E+18)*Math.sin(H.center(t)-H.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
|
|
9
|
+
/* @__PURE__ */d(r,{id:A,reveal:!!j&&"center-out"}),Y.map((e,t)=>{const r=s(t,3,e.color,e.tone),a=k.map((t,r)=>Q(r,e.values[r]??0));/* @__PURE__ */
|
|
10
|
+
return f("g",{opacity:S(t,e.key)?.3:1,onMouseEnter:()=>T(t),mask:j?`url(#${l(A)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:r,fillOpacity:.18,stroke:"none"}),
|
|
11
|
+
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:r,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],l)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:r,stroke:i.surface,strokeWidth:1.5},l))]},e.key)})]}),U&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:U.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(L,3,U.color,U.tone),value:w(U.values[t]??0)}))})}),
|
|
12
|
+
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:Y.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
13
13
|
/* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
|
|
14
14
|
/* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
|
|
15
|
-
/* @__PURE__ */d(e,{caption:W.acrossMeasures(
|
|
15
|
+
/* @__PURE__ */d(e,{caption:W.acrossMeasures(Y.map(e=>e.label),k.length),head:[W.tableSeries,...k.map(e=>e.label)],rows:Y.map(e=>[e.label,...k.map((t,r)=>w(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-
|
|
1
|
+
import{useShellStrings as l,useShellLocale as e,DEFAULT_SHELL_STRINGS as t}from"./chunk-TJSJVC6P.js";import{formatPercent as n}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as u}from"react/jsx-runtime";function s(l){return null!=l&&Number.isFinite(l)&&l>=0?l:null}function i(l,e){const t=s(l);if(null==t)return"no-reading";const n=s(e);return null==n||0===n?"no-budget":t>n?"over":"within"}var r=l=>Math.min(100,Math.max(0,l));function m({label:m,elapsed:o,budget:d,grace:c,detail:f,formatDuration:h,formatValue:x,pace:b,emptyLabel:g,noBudgetLabel:p,size:v="sm",ariaLabel:N,className:y=""}){const w=l().meter,M=e(),$=x??h??(l=>function(l,e=t.meter){const n=Math.round(l),a=Math.floor(n/3600),u=Math.floor(n%3600/60),s=n%60;return a>0?e.hoursMinutes(a,u):u>0?e.minutesSeconds(u,s):e.seconds(s)}(l,w)),k=g??w.noReading,j=p??w.noBudget,B=s(o),L=s(d),C=null!=L&&L>0?L:null,J=s(c)??0,R="over"===i(o,d),S=null!=C?C+J:null,V=null!=C&&null!=S?r(C/S*100):null,z=R&&J>0,D=null==S||null==B?0:R?z?V??0:0:r(B/S*100),F=z?V??0:0,H=R?z&&null!=S&&null!=B?r(B/S*100):100:0,O=Math.max(0,H-F),P=s(b),Q=null!=P&&null!=S?r(P/S*100):null,T=null!=B&&null!=C?B/C*100:null,q=null!=T?n(Math.round(T),0,M):null!=B?$(B):"—",A=f??(null==B?k:null==C?j:`${$(B)} / ${$(C)}`),E="md"===v?"h-2":"h-1.5",G=R?"text-red-600":null!=B?"text-gray-900":"text-gray-400",I=null!=B&&null!=C&&null!=S?/* @__PURE__ */a("div",{role:"meter","aria-label":N??("string"==typeof m?m:void 0),"aria-valuemin":0,"aria-valuemax":S,"aria-valuenow":Math.min(S,B),"aria-valuetext":w.ofBudget(q),className:`relative mt-2 ${E} overflow-hidden rounded-full bg-gray-200`,children:[(!R||z)&&/* @__PURE__ */u("div",{className:"absolute inset-y-0 left-0 rounded-full bg-blue-600",style:{width:`${D}%`}}),O>0&&/* @__PURE__ */u("div",{className:"rosh-budget-overrun absolute inset-y-0",style:{left:`${F}%`,width:`${O}%`}}),J>0&&null!=V&&/* @__PURE__ */u("div",{title:w.budget,className:"absolute inset-y-0 w-0.5 bg-gray-700",style:{left:`${V}%`}}),null!=Q&&/* @__PURE__ */u("div",{title:w.pace,"data-pace":"true",className:"absolute inset-y-0 w-0.5 -translate-x-1/2 bg-gray-700",style:{left:`${Q}%`}})]}):null;/* @__PURE__ */
|
|
2
2
|
return a("div","md"===v?{className:y,children:[null!=m&&/* @__PURE__ */u("div",{className:"text-3xs font-medium uppercase tracking-wide text-ink-faint",children:m}),
|
|
3
3
|
/* @__PURE__ */a("div",{className:"mt-1 flex items-baseline gap-2",children:[
|
|
4
|
-
/* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${
|
|
5
|
-
/* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:
|
|
4
|
+
/* @__PURE__ */u("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${G}`,children:q}),
|
|
5
|
+
/* @__PURE__ */u("span",{className:"min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:A})]}),I]}:{className:y,children:[
|
|
6
6
|
/* @__PURE__ */a("div",{className:"flex items-baseline gap-2",children:[null!=m&&/* @__PURE__ */u("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:m}),
|
|
7
|
-
/* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${
|
|
8
|
-
/* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:
|
|
7
|
+
/* @__PURE__ */u("span",{className:`text-sm font-semibold tabular-nums ${G}`,children:q}),
|
|
8
|
+
/* @__PURE__ */u("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:A})]}),I]})}export{m as BudgetBar,i as budgetState};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-
|
|
2
|
-
return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:
|
|
1
|
+
import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-TJSJVC6P.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),C=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=C[C.length-1];r&&r.to===e-1?r.to=e:C.push({from:e,to:e})});const D=C.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),F=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},P=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),F(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),F(t,o+r)),"Home"===e.key&&(e.preventDefault(),F(t,0)),"End"===e.key&&(e.preventDefault(),F(t,p))},j=o(null),A=t=>e=>{j.current=t,e.currentTarget.setPointerCapture(e.pointerId)},L=t=>e=>{j.current===t&&F(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},N=t=>()=>{j.current===t&&(j.current=null)},R=t=>{const e="from"===t?w:x;/* @__PURE__ */
|
|
2
|
+
return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:P(t),onPointerDown:A(t),onPointerMove:L(t),onPointerUp:N(t),onPointerCancel:N(t)},t)};/* @__PURE__ */
|
|
3
3
|
return n("div",{className:m,children:/* @__PURE__ */i("svg",{ref:g,width:"100%",height:u,viewBox:`0 0 ${s} ${u}`,role:"group","aria-label":d.window(a[w],a[x],a.length),children:[
|
|
4
|
-
/* @__PURE__ */n("path",{d:
|
|
4
|
+
/* @__PURE__ */n("path",{d:D,fill:e.grid}),
|
|
5
5
|
/* @__PURE__ */n("rect",{x:0,y:0,width:y(w),height:u,fill:e.surface,fillOpacity:.72}),
|
|
6
6
|
/* @__PURE__ */n("rect",{x:y(x),y:0,width:Math.max(0,s-y(x)),height:u,fill:e.surface,fillOpacity:.72}),
|
|
7
7
|
/* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),R("from"),R("to")]})})}export{a as ChartBrush};
|