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
package/dist/Files-HDTNIXUC.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import{openPreviewFile as e}from"./chunk-54K2ADBT.js";import{SidebarLayout as t}from"./chunk-MZG3FS5T.js";import"./chunk-QWK6DRSN.js";import"./chunk-ZC3TSMFK.js";import{SearchableSelect as n}from"./chunk-27TJNID7.js";import{Breadcrumbs as a}from"./chunk-PT77FC5X.js";import{Select_default as r}from"./chunk-UDVQORQM.js";import"./chunk-EO5RLFRX.js";import"./chunk-7HIHQR3X.js";import"./chunk-2NMW66P5.js";import"./chunk-5Q7VFXEO.js";import"./chunk-SE3S362N.js";import"./chunk-JY2OBPVO.js";import{IconButton_default as i}from"./chunk-SV5RRBVA.js";import"./chunk-AYZY3YNC.js";import{formatBytes as s}from"./chunk-GEYM4WN3.js";import"./chunk-Y3JW2GW5.js";import"./chunk-36BRD5J3.js";import"./chunk-LF27WIN2.js";import{getFilesDemoTree as l}from"./chunk-6DZGOGB2.js";import{AboutApp as o}from"./chunk-SYIJRZIS.js";import{getFilesStore as c,peekFilesViewRequest as d,consumeFilesViewRequest as h,FILES_SHOW_TRASH_EVENT as m,FILES_OPEN_DESKTOP_FOLDER_EVENT as p,subscribeDesktopFolders as u,getDesktopFoldersSnapshot as f,hasHostFilesStore as x,FolderGlyph as k,DesktopItemMiniIcon as g,desktopItemTypeLabel as N,FilesQuotaError as w}from"./chunk-OY3JH66O.js";import"./chunk-ESL5TDNA.js";import{useWindowManager as b,WindowTitle as v}from"./chunk-2JXGTA73.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-Y4RERPFN.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-HE767CVB.js";import{confirm as y,prompt as j}from"./chunk-SCU2CWNJ.js";import{Dialog as C}from"./chunk-6EHPEBGP.js";import{ItemCount as D}from"./chunk-BXU3LX44.js";import"./chunk-3DVNXNTF.js";import"./chunk-7B5KFESH.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-EZWWQHD3.js";import"./chunk-SCGBCBXP.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-TWFD7A3K.js";import"./chunk-CDAJKLGL.js";import"./chunk-JMGDGNM7.js";import"./chunk-6LYBE7LM.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import{Button_default as T}from"./chunk-EVYD6UFQ.js";import"./chunk-M5K4AX4E.js";import{Icon as E}from"./chunk-UIWGVOFH.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as W}from"./chunk-R2VKEMZH.js";import{TH_ONE_LINE as $}from"./chunk-G67CJAQ2.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import{toast_default as L}from"./chunk-TRWHVG3A.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-43MCNASD.js";import"./chunk-C3QOHMR6.js";import{useState as S,useEffect as F,useSyncExternalStore as R,useRef as M,useCallback as P}from"react";import{jsxs as A,jsx as V,Fragment as O}from"react/jsx-runtime";var B=[{value:"viewer",label:"Viewer"},{value:"editor",label:"Editor"}];function G({store:e,entry:t,onClose:a,onChanged:s}){const[l,o]=S(null),[c,d]=S(""),[h,m]=S([]),[p,u]=S(!1),[f,x]=S(""),[k,g]=S("viewer"),[N,w]=S(!1),b=M(/* @__PURE__ */new Map),v=t?.id??null;if(F(()=>{if(o(null),x(""),d(""),!v||!e.shares)return;let t=!0;return e.shares(v).then(e=>{t&&o(e)}).catch(e=>{t&&(L.error(e.message),o([]))}),()=>{t=!1}},[v,e]),F(()=>{if(!e.searchPeople||!v)return;let t=!0;u(!0);const n=setTimeout(()=>{e.searchPeople(c).then(e=>{if(t){for(const t of e)b.current.set(t.id,t);m(e)}}).catch(()=>{t&&m([])}).finally(()=>{t&&u(!1)})},250);return()=>{t=!1,clearTimeout(n)}},[c,v,e]),!t)return null;const y=new Set((l??[]).map(e=>e.person.id)),j=h.filter(e=>!y.has(e.id)).map(e=>({value:e.id,label:e.name})),D=async n=>{w(!0);try{await n(),o(await e.shares(t.id)),s()}catch(e){L.error(e.message)}finally{w(!1)}};/* @__PURE__ */
|
|
2
|
-
return A(C,{open:!0,onClose:a,size:"md",title:`Share “${t.name}”`,description:"folder"===t.kind?"Everything inside this folder is shared too. Editors’ uploads count toward your quota.":"Viewers can open and download it. Editors can also replace, rename and delete it.",footer:/* @__PURE__ */V(T,{variant:"secondary",onClick:a,children:"Done"}),children:[
|
|
3
|
-
/* @__PURE__ */A("div",{className:"flex items-center gap-2",children:[
|
|
4
|
-
/* @__PURE__ */V("div",{className:"min-w-0 flex-1",children:/* @__PURE__ */V(n,{value:f,onChange:x,onSearchChange:d,loading:p&&0===h.length,options:j,placeholder:"Search colleagues by name","aria-label":"Colleague to share with"})}),
|
|
5
|
-
/* @__PURE__ */V("div",{className:"w-28 shrink-0",children:/* @__PURE__ */V(r,{value:k,onChange:e=>g(e),options:B,"aria-label":"Access"})}),
|
|
6
|
-
/* @__PURE__ */V(T,{variant:"primary",onClick:()=>{if(!f||!e.share)return;const n=b.current.get(f);D(async()=>{await e.share(t.id,f,k),x(""),d(""),n&&L.success(`Shared with ${n.name}`)})},disabled:!f||N,children:"Add"})]}),
|
|
7
|
-
/* @__PURE__ */V("div",{className:"mt-4 mb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Who has access"}),null===l?/* @__PURE__ */V(W,{size:"sm",padding:"p-4",label:"Loading"}):/* @__PURE__ */A("ul",{className:"divide-y divide-line-subtle text-sm",children:[
|
|
8
|
-
/* @__PURE__ */A("li",{className:"flex items-center gap-2 h-10",children:[
|
|
9
|
-
/* @__PURE__ */V("span",{className:"flex-1 truncate",children:"You"}),
|
|
10
|
-
/* @__PURE__ */V("span",{className:"text-xs text-ink-faint",children:"Owner"})]}),l.map(n=>/* @__PURE__ */A("li",{className:"flex items-center gap-2 h-10",children:[
|
|
11
|
-
/* @__PURE__ */V("span",{className:"flex-1 truncate",title:n.person.name,children:n.person.name}),
|
|
12
|
-
/* @__PURE__ */V("div",{className:"w-28 shrink-0",children:/* @__PURE__ */V(r,{value:n.role,onChange:a=>D(()=>e.share(t.id,n.person.id,a)),options:B,"aria-label":`Access for ${n.person.name}`,disabled:N})}),
|
|
13
|
-
/* @__PURE__ */V(i,{"aria-label":`Remove ${n.person.name}`,variant:"ghost",size:"sm",disabled:N,onClick:()=>D(()=>e.unshare(t.id,n.person.id)),children:/* @__PURE__ */V(E,{name:"close",className:"h-4 w-4",strokeWidth:1.8})})]},n.person.id))]})]})}var 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 H(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 J(e,t){return`Not enough space for “${e}” (${s(t.attempted)}). You've used ${s(t.used)} of ${s(t.limit)}. Empty Trash or ask an administrator for more space.`}var Y=(e,t)=>e instanceof Error&&e.message||t;function I(){const n=c(),r=null!==l(),i=!r&&!!n.shares&&!!n.sharedWithMe,[C,T]=S(null),[B,I]=S(null),[K,Q]=S([]),[X,z]=S([]),[Z,q]=S(null),[_,ee]=S(!0),[te,ne]=S(!1),[ae,re]=S(null),[ie,se]=S(!1),[le,oe]=S(null),[ce,de]=S(()=>{const e=d();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});F(()=>{h()},[]);const[he,me]=S([]);F(()=>{const e=()=>{h(),de("trash")},t=e=>{h();const t=e.detail?.folderId;t&&de({desktopFolderId:t})};return window.addEventListener(m,e),window.addEventListener(p,t),()=>{window.removeEventListener(m,e),window.removeEventListener(p,t)}},[]);const pe=R(u,f,f),ue="object"==typeof ce?ce.desktopFolderId:null,fe=ue?pe?.folders.find(e=>e.id===ue)??null:null,xe=ue&&pe?.itemsByFolder[ue]||[];F(()=>{ue&&pe&&!pe.folders.some(e=>e.id===ue)&&de("files")},[ue,pe]);const ke=M(0),ge=M(null),{openPage:Ne,openEntity:we}=b(),be=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>Ne(e)}):"page"===t.entityType?Ne(t.entityId):we(t.entityType,t.entityId,null,t.label)},ve=P(async()=>{if(!r)try{re(await n.quota())}catch{}},[n,r]),ye=P(async e=>{if(q(null),r){const t=function(e){const t=e??"/",n=t.split("/").filter(Boolean);let a=l()??[];for(const e of n){const t=a.find(t=>"folder"===t.kind&&t.name===e);a=t?.children??[]}return{folder:{id:e,name:n[n.length-1]??"",role:"owner",path:[{id:null,name:""},...n.map((e,t)=>({id:"/"+n.slice(0,t+1).join("/"),name:e}))]},entries:a.map(e=>({id:("/"===t?"":t)+"/"+e.name,name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}}(e);return I(t),ne(!1),ee(!1),void(null===e&&Q(t.entries.filter(e=>"folder"===e.kind)))}ee(!0);try{const t=await n.list(e);I(t),ne(!1),null===e&&Q(t.entries.filter(e=>"folder"===e.kind))}catch(e){e instanceof TypeError?ne(!0):L.error(Y(e,"Failed to list"))}finally{ee(!1)}ve()},[n,ve,r]),je=P(async()=>{if(n.sharedWithMe){ee(!0),q(null);try{z(await n.sharedWithMe()),ne(!1)}catch(e){e instanceof TypeError?ne(!0):L.error(Y(e,"Failed to list shared files"))}finally{ee(!1)}}},[n]),Ce=P(async()=>{if(r)return me([]),void ee(!1);ee(!0),q(null);try{me(await n.trash()),ne(!1)}catch(e){e instanceof TypeError?ne(!0):L.error(Y(e,"Failed to list trash"))}finally{ee(!1)}ve()},[n,ve,r]),De=()=>{"files"===ce?ye(C):"shared"===ce?je():"trash"===ce&&Ce()};F(()=>{De()},[C,ce]);const Te=e=>{de("files"),T(e)},Ee=async(e,t)=>{try{await e()}catch(e){L.error(Y(e,t))}De()},We=async e=>{try{const t=await n.read(e.id),a=URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download=e.name,r.click(),setTimeout(()=>URL.revokeObjectURL(a),1e3)}catch(e){L.error(Y(e,"Download failed"))}},$e=async e=>{for(const t of Array.from(e))try{await n.upload(C,t)}catch(e){e instanceof w?L.error(J(t.name,e)):L.error(`Upload ${t.name}: ${Y(e,"failed")}`)}ye(C)},Le=()=>{ke.current=0,se(!1)};if(F(()=>{const e=()=>Le();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),te)/* @__PURE__ */
|
|
14
|
-
return A("div",{className:"flex flex-col h-full bg-surface",children:[
|
|
15
|
-
/* @__PURE__ */V(v,{title:"Files - offline"}),
|
|
16
|
-
/* @__PURE__ */V("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */A("div",{className:"max-w-md",children:[
|
|
17
|
-
/* @__PURE__ */V(E,{name:"close-circle",className:"h-12 w-12 mx-auto text-ink-faintest mb-3",strokeWidth:1.4}),x()?/* @__PURE__ */A(O,{children:[
|
|
18
|
-
/* @__PURE__ */V("h3",{className:"text-base font-semibold text-ink-strong mb-1",children:"Can't reach your files"}),
|
|
19
|
-
/* @__PURE__ */V("p",{className:"text-sm text-ink-faint mb-3",children:"Check your connection and try again."})]}):/* @__PURE__ */A(O,{children:[
|
|
20
|
-
/* @__PURE__ */V("h3",{className:"text-base font-semibold text-ink-strong mb-1",children:"Can't reach the file server"}),
|
|
21
|
-
/* @__PURE__ */A("p",{className:"text-sm text-ink-faint mb-3",children:["No response from the file server. Make sure the server is running — see ",
|
|
22
|
-
/* @__PURE__ */V("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]})]}),
|
|
23
|
-
/* @__PURE__ */V("button",{onClick:De,className:"px-3 h-8 text-sm bg-accent-fill text-on-accent rounded hover:bg-accent-fill-hover",children:"Retry"})]})})]});const Se="files"===ce?B?.folder??null:null,Fe=Se?.role??"owner",Re="owner"!==Fe,Me=!r&&"files"===ce&&"viewer"!==Fe,Pe="files"===ce?B?.entries??[]:[],Ae=ae&&ae.limit>0?Math.min(100,Math.round(ae.used/ae.limit*100)):0,Ve=Ae>90?"bg-danger":Ae>75?"bg-warning":"bg-accent-fill",Oe=(Se?.path??[]).filter(e=>null!==e.id),Be=[Re?{label:"Shared with me",onClick:()=>de("shared")}:{label:"My files",onClick:()=>Te(null)},...Oe.map(e=>({label:e.name,onClick:()=>Te(e.id)}))],Ge=Oe.length>1?Oe[Oe.length-2].id:null,Ue=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-accent-tint font-medium text-accent-text":"text-ink hover:bg-row-hover"),He=e=>/* @__PURE__ */V("svg",{className:"h-4 w-4 shrink-0 text-ink-faintest",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */V("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),Je=/* @__PURE__ */A("nav",{className:"p-2",children:[
|
|
24
|
-
/* @__PURE__ */V("div",{className:"px-2 py-2 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Locations"}),
|
|
25
|
-
/* @__PURE__ */A("button",{onClick:()=>Te(null),className:Ue("files"===ce&&null===C),children:[He("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"]}),K.map(e=>/* @__PURE__ */A("button",{onClick:()=>Te(e.id),className:Ue("files"===ce&&C===e.id),children:[He("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"),
|
|
26
|
-
/* @__PURE__ */V("span",{className:"truncate",children:e.name})]},e.id)),i&&/* @__PURE__ */A("button",{onClick:()=>de("shared"),className:Ue("shared"===ce||"files"===ce&&Re),children:[
|
|
27
|
-
/* @__PURE__ */V(E,{name:"team",className:"h-4 w-4 shrink-0 text-ink-faintest",strokeWidth:1.6}),"Shared with me"]}),!r&&/* @__PURE__ */A("button",{onClick:()=>de("trash"),className:Ue("trash"===ce),children:[He("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"]}),pe&&pe.folders.length>0&&/* @__PURE__ */A(O,{children:[
|
|
28
|
-
/* @__PURE__ */V("div",{className:"px-2 pt-3 pb-2 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:"Desktop"}),pe.folders.map(e=>/* @__PURE__ */A("button",{onClick:()=>de({desktopFolderId:e.id}),className:Ue(ue===e.id),children:[
|
|
29
|
-
/* @__PURE__ */V(k,{className:"h-4 w-4 shrink-0 text-amber-500"}),
|
|
30
|
-
/* @__PURE__ */V("span",{className:"truncate",children:e.name}),
|
|
31
|
-
/* @__PURE__ */V(D,{count:e.itemCount,active:ue===e.id,className:"ml-auto"})]},e.id))]})]}),Ye=e=>/* @__PURE__ */V(E,"folder"===e?{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}:{name:"page",className:"h-4 w-4 text-ink-faintest shrink-0",strokeWidth:1.5}),Ie="px-2 py-0.5 rounded hover:bg-row-hover text-ink-faint text-2xs ml-1",Ke=t=>{"folder"===t.kind?Te(t.id):(async t=>{if(r)return;if(n.open?.(t))return;const a=(t.name.split(".").pop()||"").toLowerCase(),i=U[a];i?await e({filePath:n.shortcutPath?.(t.id)??t.id,filename:t.name,kind:i,load:()=>n.read(t.id),onStaged:e=>Ne(e)}):We(t)})(t)},Qe=fe?`Files - ${fe.name}`:"shared"===ce?"Files - Shared with me":"trash"===ce?"Files - Trash":Se&&null!==Se.id?`Files - ${Se.name}`:"Files";/* @__PURE__ */
|
|
32
|
-
return A("div",{className:"relative flex flex-col h-full bg-surface",onDragEnter:e=>{Me&&e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),ke.current++,ie||se(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{ke.current>0&&ke.current--,0===ke.current&&se(!1)},onDrop:e=>{e.preventDefault(),Le(),Me&&e.dataTransfer.files?.length&&$e(e.dataTransfer.files)},children:[
|
|
33
|
-
/* @__PURE__ */V(v,{title:Qe}),
|
|
34
|
-
/* @__PURE__ */V(o,{app:"files"}),
|
|
35
|
-
/* @__PURE__ */V("input",{ref:ge,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&$e(e.target.files),ge.current&&(ge.current.value="")}}),
|
|
36
|
-
/* @__PURE__ */V("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */V(t,{sidebar:Je,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */A("div",{className:"flex h-full min-w-0 flex-col",children:[
|
|
37
|
-
/* @__PURE__ */A("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-line bg-surface-sunken shrink-0 text-xs",children:[/* @__PURE__ */A(O,"files"===ce?{children:[
|
|
38
|
-
/* @__PURE__ */V("button",{onClick:()=>{Re&&Oe.length<=1?de("shared"):Te(Ge)},disabled:!Re&&null===C,className:"px-2 py-1 rounded hover:bg-row-hover disabled:opacity-30 text-ink-muted",title:"Parent folder",children:/* @__PURE__ */V(E,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
39
|
-
/* @__PURE__ */A("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[
|
|
40
|
-
/* @__PURE__ */V("div",{className:"min-w-0 flex-1",children:/* @__PURE__ */V(a,{items:Be,maxItems:5})}),Re&&"viewer"===Fe&&/* @__PURE__ */A("span",{className:"shrink-0 inline-flex items-center gap-1 rounded-full bg-surface-sunken px-2 py-0.5 text-2xs text-ink-faint whitespace-nowrap",children:[
|
|
41
|
-
/* @__PURE__ */V(E,{name:"eye",className:"h-3 w-3",strokeWidth:1.8}),"View only"]}),Re&&Se?.owner&&/* @__PURE__ */A("span",{className:"shrink-0 text-2xs text-ink-faint whitespace-nowrap",children:["Shared by ",Se.owner.name]})]}),
|
|
42
|
-
/* @__PURE__ */V("button",{onClick:De,className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted",title:"Refresh",children:/* @__PURE__ */V(E,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),Me&&/* @__PURE__ */A(O,{children:[!Re&&/* @__PURE__ */A("button",{onClick:()=>de("trash"),className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted flex items-center gap-1",title:"Open trash",children:[
|
|
43
|
-
/* @__PURE__ */V(E,{name:"trash",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Trash"]}),
|
|
44
|
-
/* @__PURE__ */A("button",{onClick:async()=>{const e=await j({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});e&&(/[\\/]/.test(e)?L.error("Folder names cannot contain slashes"):Ee(()=>n.createFolder(C,e),"Create folder failed"))},className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted flex items-center gap-1",children:[
|
|
45
|
-
/* @__PURE__ */V(E,{name:"folder-plus",className:"h-3.5 w-3.5",strokeWidth:1.5}),"New Folder"]}),
|
|
46
|
-
/* @__PURE__ */A("button",{onClick:()=>ge.current?.click(),className:"px-2 py-1 rounded bg-accent-fill text-on-accent hover:bg-accent-fill-hover flex items-center gap-1",children:[
|
|
47
|
-
/* @__PURE__ */V(E,{name:"upload",className:"h-3.5 w-3.5",strokeWidth:1.8}),"Upload"]})]})]}:"shared"===ce?{children:[
|
|
48
|
-
/* @__PURE__ */V(E,{name:"team",className:"h-4 w-4 ml-1",strokeWidth:1.6}),
|
|
49
|
-
/* @__PURE__ */V("span",{className:"flex-1 text-ink font-medium px-1",children:"Shared with me"}),
|
|
50
|
-
/* @__PURE__ */V("button",{onClick:je,className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted",title:"Refresh",children:/* @__PURE__ */V(E,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})})]}:"trash"===ce?{children:[
|
|
51
|
-
/* @__PURE__ */V("button",{onClick:()=>de("files"),className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted",title:"Back to files",children:/* @__PURE__ */V(E,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
52
|
-
/* @__PURE__ */V("span",{className:"flex-1 text-ink font-medium px-2",children:"Trash"}),
|
|
53
|
-
/* @__PURE__ */V("button",{onClick:Ce,className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted",title:"Refresh",children:/* @__PURE__ */V(E,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),
|
|
54
|
-
/* @__PURE__ */V("button",{onClick:async()=>{if(0===he.length)return;await y({title:"Empty trash",message:`${he.length} item${1===he.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"})&&Ee(()=>n.emptyTrash(),"Empty trash failed")},disabled:0===he.length,className:"px-2 py-1 rounded text-danger-text hover:bg-status-danger-soft disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
|
|
55
|
-
/* @__PURE__ */V("button",{onClick:()=>de("files"),className:"px-2 py-1 rounded hover:bg-row-hover text-ink-muted",title:"Back to files",children:/* @__PURE__ */V(E,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
|
|
56
|
-
/* @__PURE__ */V(k,{className:"h-4 w-4 text-amber-500 ml-1"}),
|
|
57
|
-
/* @__PURE__ */V("span",{className:"flex-1 text-ink font-medium px-1 truncate",children:fe?.name??"Desktop folder"}),
|
|
58
|
-
/* @__PURE__ */V("span",{className:"text-2xs text-ink-faintest px-2",children:"Desktop shortcuts"})]}),ae&&/* @__PURE__ */A(O,{children:[
|
|
59
|
-
/* @__PURE__ */V("div",{className:"h-4 w-px bg-line-strong mx-1"}),
|
|
60
|
-
/* @__PURE__ */A("div",{className:"flex items-center gap-2",title:`${s(ae.used)} of ${s(ae.limit)} used`,children:[
|
|
61
|
-
/* @__PURE__ */V("div",{className:"w-20 h-1.5 rounded-full bg-line overflow-hidden",children:/* @__PURE__ */V("div",{className:`h-full ${Ve} transition-all`,style:{width:`${Ae}%`}})}),
|
|
62
|
-
/* @__PURE__ */A("span",{className:"text-2xs text-ink-faint tabular-nums whitespace-nowrap",children:[s(ae.used)," / ",s(ae.limit)]})]})]})]}),
|
|
63
|
-
/* @__PURE__ */V("div",{className:"flex-1 overflow-auto",children:"object"==typeof ce?0===xe.length?/* @__PURE__ */V("div",{className:"p-10 text-center text-sm text-ink-faintest",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */A("table",{className:"w-full text-sm",children:[
|
|
64
|
-
/* @__PURE__ */V("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */A("tr",{children:[
|
|
65
|
-
/* @__PURE__ */V("th",{className:`${$} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
66
|
-
/* @__PURE__ */V("th",{className:`${$} text-left font-medium px-3 h-8 w-28`,children:"Type"}),
|
|
67
|
-
/* @__PURE__ */V("th",{className:`${$} w-56`})]})}),
|
|
68
|
-
/* @__PURE__ */V("tbody",{children:xe.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
|
|
69
|
-
return A("tr",{onClick:()=>q(t),onDoubleClick:()=>be(e),className:"cursor-default border-b border-line-subtle "+(Z===t?"bg-accent-tint":"hover:bg-row-hover"),children:[
|
|
70
|
-
/* @__PURE__ */A("td",{className:"px-3 h-8 flex items-center gap-2",children:[
|
|
71
|
-
/* @__PURE__ */V(g,{item:e}),
|
|
72
|
-
/* @__PURE__ */V("span",{className:"truncate",title:e.label,children:e.label})]}),
|
|
73
|
-
/* @__PURE__ */V("td",{className:"px-3 h-8 text-xs text-ink-faint",children:N(e)}),
|
|
74
|
-
/* @__PURE__ */A("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
|
|
75
|
-
/* @__PURE__ */V("button",{onClick:t=>{t.stopPropagation(),be(e)},className:"px-2 py-0.5 rounded hover:bg-row-hover text-accent-text text-2xs",children:"Open"}),
|
|
76
|
-
/* @__PURE__ */V("button",{onClick:t=>{t.stopPropagation(),pe?.moveToDesktop([e])},className:"px-2 py-0.5 rounded hover:bg-row-hover text-ink-faint text-2xs ml-1",children:"Move to desktop"}),
|
|
77
|
-
/* @__PURE__ */V("button",{onClick:t=>{t.stopPropagation(),pe?.removeShortcuts([e])},className:"px-2 py-0.5 rounded hover:bg-status-danger-soft text-danger-text text-2xs ml-1",children:"Remove"})]})]},t)})})]}):"shared"===ce?_&&0===X.length?/* @__PURE__ */V(W,{size:"sm",padding:"p-6",label:"Loading"}):0===X.length?/* @__PURE__ */V("div",{className:"p-10 text-center text-sm text-ink-faintest",children:"Nothing has been shared with you yet. Files and folders colleagues share with you show here."}):/* @__PURE__ */A("table",{className:"w-full text-sm",children:[
|
|
78
|
-
/* @__PURE__ */V("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */A("tr",{children:[
|
|
79
|
-
/* @__PURE__ */V("th",{className:`${$} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
80
|
-
/* @__PURE__ */V("th",{className:`${$} text-left font-medium px-3 h-8 w-40`,children:"Owner"}),
|
|
81
|
-
/* @__PURE__ */V("th",{className:`${$} text-left font-medium px-3 h-8 w-24`,children:"Access"}),
|
|
82
|
-
/* @__PURE__ */V("th",{className:`${$} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
|
|
83
|
-
/* @__PURE__ */V("th",{className:`${$} w-32`})]})}),
|
|
84
|
-
/* @__PURE__ */V("tbody",{children:X.map(e=>/* @__PURE__ */A("tr",{onClick:()=>q(e.id),onDoubleClick:()=>Ke(e),className:"cursor-default border-b border-line-subtle "+(Z===e.id?"bg-accent-tint":"hover:bg-row-hover"),children:[
|
|
85
|
-
/* @__PURE__ */A("td",{className:"px-3 h-8 flex items-center gap-2",children:[Ye(e.kind),
|
|
86
|
-
/* @__PURE__ */V("span",{className:"truncate",title:e.name,children:e.name})]}),
|
|
87
|
-
/* @__PURE__ */V("td",{className:"px-3 h-8 text-ink-faint truncate",children:e.owner?.name??"—"}),
|
|
88
|
-
/* @__PURE__ */V("td",{className:"px-3 h-8 text-ink-faint",children:"editor"===e.role?"Editor":"Viewer"}),
|
|
89
|
-
/* @__PURE__ */V("td",{className:"px-3 h-8 text-right tabular-nums text-ink-faint",children:"folder"===e.kind?"—":s(e.size)}),
|
|
90
|
-
/* @__PURE__ */A("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
|
|
91
|
-
/* @__PURE__ */V("button",{onClick:t=>{t.stopPropagation(),Ke(e)},className:"px-2 py-0.5 rounded hover:bg-row-hover text-accent-text text-2xs",children:"Open"}),"file"===e.kind&&/* @__PURE__ */V("button",{onClick:t=>{t.stopPropagation(),We(e)},className:Ie,children:"Download"})]})]},e.id))})]}):"trash"===ce?_&&0===he.length?/* @__PURE__ */V(W,{size:"sm",padding:"p-6",label:"Loading"}):0===he.length?/* @__PURE__ */V("div",{className:"p-10 text-center text-sm text-ink-faintest",children:"Trash is empty."}):/* @__PURE__ */A("table",{className:"w-full text-sm",children:[
|
|
92
|
-
/* @__PURE__ */V("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */A("tr",{children:[
|
|
93
|
-
/* @__PURE__ */V("th",{className:`${$} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
94
|
-
/* @__PURE__ */V("th",{className:`${$} text-left font-medium px-3 h-8`,children:"Original location"}),
|
|
95
|
-
/* @__PURE__ */V("th",{className:`${$} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
|
|
96
|
-
/* @__PURE__ */V("th",{className:`${$} text-right font-medium px-3 h-8 w-40`,children:"Deleted"}),
|
|
97
|
-
/* @__PURE__ */V("th",{className:`${$} w-44`})]})}),
|
|
98
|
-
/* @__PURE__ */V("tbody",{children:he.map(e=>/* @__PURE__ */A("tr",{className:"border-b border-line-subtle hover:bg-row-hover",children:[
|
|
99
|
-
/* @__PURE__ */A("td",{className:"px-3 h-8 flex items-center gap-2",children:[Ye(e.kind),
|
|
100
|
-
/* @__PURE__ */V("span",{className:"truncate",title:e.name,children:e.name})]}),
|
|
101
|
-
/* @__PURE__ */V("td",{className:"px-3 h-8 text-ink-faint text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
|
|
102
|
-
/* @__PURE__ */V("td",{className:"px-3 h-8 text-right tabular-nums text-ink-faint",children:s(e.size)}),
|
|
103
|
-
/* @__PURE__ */V("td",{className:"px-3 h-8 text-right text-ink-faint tabular-nums",children:e.deletedAt?H(e.deletedAt):"—"}),
|
|
104
|
-
/* @__PURE__ */A("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
|
|
105
|
-
/* @__PURE__ */V("button",{onClick:()=>{return t=e,Ee(async()=>{await n.restore(t.id),L.success(`Restored "${t.name}"`)},"Restore failed");var t},className:"px-2 py-0.5 rounded hover:bg-row-hover text-accent-text text-2xs",children:"Restore"}),
|
|
106
|
-
/* @__PURE__ */V("button",{onClick:()=>(async e=>{await y({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"})&&Ee(()=>n.purge(e.id),"Delete failed")})(e),className:"px-2 py-0.5 rounded hover:bg-status-danger-soft text-danger-text text-2xs ml-1",children:"Delete forever"})]})]},e.id))})]}):_&&0===Pe.length?/* @__PURE__ */V(W,{size:"sm",padding:"p-6",label:"Loading"}):0===Pe.length?/* @__PURE__ */A("div",{className:"p-10 text-center text-sm text-ink-faintest",children:["Empty folder.",Me&&/* @__PURE__ */A(O,{children:[" Drop files here or click ",
|
|
107
|
-
/* @__PURE__ */V("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */A("table",{className:"w-full text-sm",children:[
|
|
108
|
-
/* @__PURE__ */V("thead",{className:"bg-surface-sunken text-2xs uppercase tracking-wide text-ink-faint",children:/* @__PURE__ */A("tr",{children:[
|
|
109
|
-
/* @__PURE__ */V("th",{className:`${$} text-left font-medium px-3 h-8`,children:"Name"}),
|
|
110
|
-
/* @__PURE__ */V("th",{className:`${$} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
|
|
111
|
-
/* @__PURE__ */V("th",{className:`${$} text-right font-medium px-3 h-8 w-40`,children:"Modified"}),i&&!Re&&/* @__PURE__ */V("th",{className:`${$} text-left font-medium px-3 h-8 w-28`,children:"Shared"}),
|
|
112
|
-
/* @__PURE__ */V("th",{className:`${$} w-48`})]})}),
|
|
113
|
-
/* @__PURE__ */V("tbody",{children:Pe.map(e=>{const t=e.role??Fe,a="owner"===t,l=Me&&"viewer"!==t;/* @__PURE__ */
|
|
114
|
-
return A("tr",{onClick:()=>q(e.id),onDoubleClick:()=>Ke(e),className:"cursor-default border-b border-line-subtle "+(Z===e.id?"bg-accent-tint":"hover:bg-row-hover"),children:[
|
|
115
|
-
/* @__PURE__ */A("td",{className:"px-3 h-8 flex items-center gap-2",children:[Ye(e.kind),
|
|
116
|
-
/* @__PURE__ */V("span",{className:"truncate",title:e.name,children:e.name})]}),
|
|
117
|
-
/* @__PURE__ */V("td",{className:"px-3 h-8 text-right tabular-nums text-ink-faint whitespace-nowrap",children:"folder"===e.kind?"—":s(e.size)}),
|
|
118
|
-
/* @__PURE__ */V("td",{className:"px-3 h-8 text-right text-ink-faint tabular-nums whitespace-nowrap",children:H(e.modifiedAt)}),i&&!Re&&/* @__PURE__ */V("td",{className:"px-3 h-8",children:e.shareCount?/* @__PURE__ */V("span",{className:"inline-flex rounded-full bg-accent-tint px-2 py-0.5 text-2xs text-accent-text whitespace-nowrap",children:1===e.shareCount?"1 person":`${e.shareCount} people`}):/* @__PURE__ */V("span",{className:"text-ink-faintest",children:"—"})}),
|
|
119
|
-
/* @__PURE__ */V("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:!r&&/* @__PURE__ */A(O,{children:["file"===e.kind&&/* @__PURE__ */V("button",{onClick:t=>{t.stopPropagation(),We(e)},className:Ie,children:"Download"}),i&&a&&/* @__PURE__ */V("button",{onClick:t=>{t.stopPropagation(),oe(e)},className:Ie,children:"Share"}),l&&/* @__PURE__ */A(O,{children:[
|
|
120
|
-
/* @__PURE__ */V("button",{onClick:t=>{t.stopPropagation(),(async e=>{const t=await j({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});t&&t!==e.name&&(/[\\/]/.test(t)?L.error("Names cannot contain slashes"):Ee(()=>n.rename(e.id,t),"Rename failed"))})(e)},className:Ie,children:"Rename"}),
|
|
121
|
-
/* @__PURE__ */V("button",{onClick:t=>{t.stopPropagation(),(async e=>{const t="owner"!==(e.role??"owner");await y({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will move to `+(t?`${(e.owner??B?.folder.owner)?.name??"its owner"}'s Trash.`:"Trash. You can restore it from there."),confirmLabel:"Delete",variant:"danger"})&&Ee(()=>n.remove(e.id),"Delete failed")})(e)},className:"px-2 py-0.5 rounded hover:bg-status-danger-soft text-danger-text text-2xs ml-1",children:"Delete"})]})]})})]},e.id)})})]})})]})})}),i&&/* @__PURE__ */V(G,{store:n,entry:le,onClose:()=>oe(null),onChanged:()=>ye(C)}),ie&&/* @__PURE__ */V("div",{className:"absolute inset-0 bg-accent-tint border-4 border-dashed border-accent-border pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */V("div",{className:"px-4 py-2 rounded-md bg-accent-fill text-on-accent text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{I as default,J as quotaExceededMessage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-EUUCNDIS.js";import"./chunk-UIWGVOFH.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-TRWHVG3A.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-43MCNASD.js";import"./chunk-C3QOHMR6.js";
|
package/dist/Sidebar-XGAVJGOL.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-ZC3TSMFK.js";import{openGlobalSearch as s}from"./chunk-4KJ7MLWO.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-SV5RRBVA.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 C,sectionIcons as w}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 W,PopupMenuLabel as z}from"./chunk-6LYBE7LM.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-M5K4AX4E.js";import{Icon as $}from"./chunk-UIWGVOFH.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-SOZCWT6I.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import{useShellStrings as A}from"./chunk-43MCNASD.js";import"./chunk-C3QOHMR6.js";import{useMemo as M,useState as I,useRef as H,useEffect as R,isValidElement as T,cloneElement as K}from"react";import{jsx as B,jsxs as D,Fragment as Q}from"react/jsx-runtime";var J="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(" "),O="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function X({open:e,children:t}){const r=H(null);return R(()=>{r.current?.toggleAttribute("inert",!e)},[e]),/* @__PURE__ */B("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__ */B("div",{className:"min-h-0 overflow-hidden",children:t})})}function Y({open:e}){/* @__PURE__ */
|
|
2
|
-
return B($,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function F({dir:e}){/* @__PURE__ */
|
|
3
|
-
return B($,"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 G({className:e}){/* @__PURE__ */
|
|
4
|
-
return B($,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var V=e=>.75+1.75*e+"rem";function Z({width:Z,collapsed:_,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=C,sectionIcons:me=w,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=M(()=>c(ce,he,ye),[ce,he,ye]),[Ne,je]=I(()=>t(r(n))),Ce=M(()=>[...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]),we=(e,t=Ce)=>je(r=>{const a=i(r,e,t);return l(n,JSON.stringify([...a])),a}),[Se,Le]=I(null),[We,ze]=I(!1),$e=H(null);R(()=>{_||Le(null)},[_]);const Ae=(e,t)=>{Le(null),e.onSelect?e.onSelect():te(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Me=(e,t)=>{const r=t[e];/* @__PURE__ */
|
|
5
|
-
return B("span",{className:O,"aria-hidden":"true",children:r&&T(r)?K(r,{className:"size-[18px]"}):r})},Ie=e=>e.filter(e=>d(e,ye).length>0).map(e=>`child:${e.to}`),He=(e,t,r=Ce)=>{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:()=>we(i,r),"aria-expanded":l,className:P(o,!1),style:t>0?{paddingLeft:V(t)}:void 0,children:[0===t&&Me(e.to,de),
|
|
8
|
-
/* @__PURE__ */B("span",{className:"min-w-0 flex-1 truncate",children:a}),
|
|
9
|
-
/* @__PURE__ */B(Y,{open:l})]}),
|
|
10
|
-
/* @__PURE__ */B(X,{open:l,children:/* @__PURE__ */B("div",{className:"space-y-0.5 pt-0.5",children:n.map(e=>He(e,t+1,Ie(n)))})}),e.dividerAfter&&/* @__PURE__ */B("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:V(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:V(t)}:void 0,children:[0===t&&Me(e.to,de),
|
|
13
|
-
/* @__PURE__ */B("span",{className:"min-w-0 flex-1 truncate",children:a})]}),e.dividerAfter&&/* @__PURE__ */B("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:V(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__ */B("span",{className:O,"aria-hidden":"true",children:e.icon}):Me(e.label,me),a=e.menuLabel??e.label,i=u(r,re,ye),l="dividerAfter"in e&&e.dividerAfter;if(_)/* @__PURE__ */
|
|
14
|
-
return D("div",{children:[
|
|
15
|
-
/* @__PURE__ */B("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__ */B("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:()=>we(e.label),"aria-expanded":o,"aria-controls":s,className:P(!o&&i,!1),children:[n,
|
|
18
|
-
/* @__PURE__ */B("span",{className:"min-w-0 flex-1 truncate",children:a}),
|
|
19
|
-
/* @__PURE__ */B(Y,{open:o})]}),
|
|
20
|
-
/* @__PURE__ */B(X,{open:o,children:/* @__PURE__ */B("div",{id:s,role:"group","aria-label":a,className:"space-y-0.5 pt-0.5",children:r.map(e=>He(e,1,Ie(r)))})}),l&&/* @__PURE__ */B("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||"",Ke=(ne?.first_name?.charAt(0)||ae?.email?.charAt(0)||"?").toUpperCase(),Be=ne?.avatar_url?/* @__PURE__ */B("img",{src:ne.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */B("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Ke}),De=We?$e.current?.getBoundingClientRect():void 0,Qe=_?"":"px-3",Je=_?{paddingInline:y}:void 0,Ue=`${_?ke.expandSidebar:ke.collapseSidebar} (${J?"⌘":"Ctrl"} .)`,Pe=ee?{run:ee,label:ke.goHome,title:ke.goHome}:se?null:{run:E,label:_?ke.expandSidebar:ke.collapseSidebar,title:Ue},Oe=/* @__PURE__ */D(Q,{children:[pe&&/* @__PURE__ */B(p,{src:pe,alt:"",slot:"compact",surface:"light",adaptive:fe,hasAlpha:ge,isLight:xe,size:28,decorative:!0}),!_&&/* @__PURE__ */D("span",{className:"min-w-0 text-left leading-tight",children:[
|
|
21
|
-
/* @__PURE__ */B("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:ue??"Apps"}),be&&/* @__PURE__ */B("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:Z},children:[
|
|
23
|
-
/* @__PURE__ */D("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(_?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:k},children:[Pe?/* @__PURE__ */B("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 "+(_?"justify-center p-0.5":"-ml-1 p-1"),children:Oe}):/* @__PURE__ */B("span",{className:"flex min-w-0 items-center gap-2",children:Oe}),se?/* @__PURE__ */B(b,{onClick:se,"aria-label":ke.closeMenu,children:/* @__PURE__ */B($,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!_&&/* @__PURE__ */B("button",{type:"button",onClick:E,"aria-label":ke.collapseSidebar,title:`${ke.collapseSidebar} (${J?"⌘":"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__ */B(F,{dir:"left"})})]}),
|
|
24
|
-
/* @__PURE__ */B("div",{className:`shrink-0 pt-3 ${Qe}`,style:Je,children:_?/* @__PURE__ */B("button",{type:"button",onClick:s,"aria-label":ke.search,title:`${ke.search} (${J?"⌘K":"Ctrl K"})`,className:P(!1,!0),children:/* @__PURE__ */B(G,{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__ */B(G,{className:"size-3.5 text-gray-500"}),
|
|
26
|
-
/* @__PURE__ */B("span",{className:"min-w-0 flex-1 truncate text-sm text-ink-faint",children:ke.search}),
|
|
27
|
-
/* @__PURE__ */B("kbd",{className:"rounded border border-line bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-ink-faint",children:J?"⌘K":"Ctrl K"})]})}),
|
|
28
|
-
/* @__PURE__ */D("nav",{"aria-label":ke.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Qe} ${_?"space-y-1":"space-y-0.5"}`,style:Je,children:[_&&/* @__PURE__ */B("button",{type:"button",onClick:E,"aria-label":ke.expandSidebar,title:`${ke.expandSidebar} (${J?"⌘":"Ctrl"} .)`,className:`${P(!1,!0)} mb-3`,children:/* @__PURE__ */B(F,{dir:"right"})}),ve.topItems.map(e=>{if(!_)return He(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__ */B("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:Me(e.to,de)}),e.dividerAfter&&/* @__PURE__ */B("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__ */B("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__ */B("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.footerSections.map(e=>Re(e,!1))]}),
|
|
31
|
-
/* @__PURE__ */B("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Qe}`,style:Je,children:/* @__PURE__ */D("button",{ref:$e,type:"button",onClick:()=>ze(e=>!e),"aria-haspopup":"menu","aria-expanded":We,"aria-label":_?ke.accountMenu(Te):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(_?"justify-center py-2":"px-2 py-2"),children:[Be,!_&&/* @__PURE__ */D("span",{className:"min-w-0 flex-1 text-left",children:[
|
|
32
|
-
/* @__PURE__ */B("span",{className:"block truncate text-sm font-semibold text-ink-strong",children:Te}),ae?.email&&Te!==ae.email&&/* @__PURE__ */B("span",{className:"block truncate text-2xs text-ink-faint",children:ae.email})]})]})}),q&&!_&&!se&&/* @__PURE__ */B(o,{side:"left",width:Z,onResize:q,min:j,max:N,defaultWidth:v,storageKey:a,label:ke.resizeSidebar}),We&&De&&/* @__PURE__ */D(S,{portal:!0,minWidth:224,onClose:()=>ze(!1),style:U(Z,De,window.innerHeight),children:[_&&/* @__PURE__ */D("div",{className:"border-b border-line px-3 py-3",children:[
|
|
33
|
-
/* @__PURE__ */B("p",{className:"truncate text-sm font-semibold text-gray-800",children:Te}),ae?.email&&/* @__PURE__ */B("p",{className:"truncate text-xs text-gray-500",children:ae.email})]}),
|
|
34
|
-
/* @__PURE__ */D(L,{onClick:()=>{ze(!1),te("/profile",!1)},children:[
|
|
35
|
-
/* @__PURE__ */B($,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.profile]}),ve.footerItems.map(e=>/* @__PURE__ */D(L,{onClick:()=>{ze(!1),Ae(e)},children:[
|
|
36
|
-
/* @__PURE__ */B("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:()=>{ze(!1),oe()},children:[
|
|
37
|
-
/* @__PURE__ */B($,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.reportIssue]}),
|
|
38
|
-
/* @__PURE__ */B(W,{}),le&&/* @__PURE__ */D(Q,{children:[
|
|
39
|
-
/* @__PURE__ */D(L,{onClick:()=>{ze(!1),le()},children:[
|
|
40
|
-
/* @__PURE__ */B($,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.switchToDesktop]}),
|
|
41
|
-
/* @__PURE__ */B(W,{})]}),
|
|
42
|
-
/* @__PURE__ */D(L,{danger:!0,onClick:()=>{ze(!1),ie()},children:[
|
|
43
|
-
/* @__PURE__ */B($,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.signOut]})]}),Se&&_&&/* @__PURE__ */B(S,{portal:!0,minWidth:220,onClose:()=>Le(null),style:{left:Z+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__ */B(W,{}),e.heading&&/* @__PURE__ */B(z,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */D(L,{onClick:()=>Ae(e),children:[Me(e.to,de),
|
|
44
|
-
/* @__PURE__ */B("span",{className:e.to===re?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{U as accountMenuPosition,Z as default};
|
package/dist/chunk-27TJNID7.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-7HIHQR3X.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-5Q7VFXEO.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-EVYD6UFQ.js";import{Icon as p}from"./chunk-UIWGVOFH.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as y}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{GLASS_DIVIDER as k,glassStyle as j}from"./chunk-5FYDNH4Y.js";import{useShellStrings as $}from"./chunk-43MCNASD.js";import{useState as N,useId as D,useRef as C,useMemo as S,useEffect as W}from"react";import{createPortal as F}from"react-dom";import{jsxs as E,jsx as M}from"react/jsx-runtime";function R(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var O=["right-2","right-8","right-16"],T=[8,32,64];function z(z){const{options:A,placeholder:H,emptyOptionLabel:L,className:I="",disabled:U,id:Y,filter:V=!1,allowFreeText:B=!1,freeTextOption:Q,onSearchChange:G,loading:J=!1,error:X,onRetry:Z,rightAdornment:K,endAction:P,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=z,re=!0===z.multiple,le=z.multiple?z.value:z.value?[z.value]:[],oe=z.multiple?"":z.value,ie=e=>{z.multiple?z.onChange(e):z.onChange(e[0]??"")},ae=le.length>0,se=V&&ae&&!U,ce=re||V,ue=null!=Q,de=B||ue,[he,pe]=N(!1),[me,fe]=N(-1),be=D(),ge=Y??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=N(""),ke=$(),je=L??ke.select.none,$e=e=>{xe(e),fe(-1),G?.(e)},Ne=C(null),De=C(null),Ce=C(null),Se=C(null),We=C(he);We.current=he;const Fe=C(!1),Ee=e=>{We.current&&(We.current=!1,e&&B&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),$e(""))},Me=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?$e(""):fe(t));ie([e.value]),Ee(!1)}},[Re,Oe]=N(null);y(()=>{if(!K||he)return void Oe(null);const e=Se.current?.offsetWidth??0;Oe(e?e+T[Ue]+6:null)});const Te=v(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),ze=S(()=>t(A),[A]),Ae=le.join("\0"),He=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of ze)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[ze,Ae,de]),Le=He.join(", "),Ie=_&&ae&&!U,Ue=(Ie?1:0)+(P?1:0),[Ye,Ve]=N(null),Be=C(null),Qe=C(""),Ge=C(()=>{});Ge.current=()=>{const e=De.current,t=Be.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${He.join("\0")}`;if(o===Qe.current)return;Qe.current=o;let i=null;r>0&&He.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=R(He,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Ve(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Ge.current()}),W(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Ge.current());return t.observe(e),()=>t.disconnect()},[re]);const Je=He.length,Xe=!re||!Ye||Ye.shown>=Je?Le:0===Ye.shown?ke.select.selectedCount(Je):`${He.slice(0,Ye.shown).join(", ")} +${Je-Ye.shown}`,Ze=re&&null!==Ye&&(Ye.shown<Je||Ye.cut),Ke=he&&ae&&ce;W(()=>{if(!he)return;const e=e=>{const t=e.target;Ne.current?.contains(t)||Ce.current?.contains(t)||Ee(!0)};document.addEventListener("mousedown",e);const t=b(()=>Ee(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,B,ye,Ae,z.onChange]),W(()=>{if(he)return x(e=>!("Escape"!==e.key||!We.current)&&(Ee(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Pe=S(()=>{const e=/* @__PURE__ */new Set;return n(A,t=>!e.has(t.value)&&(e.add(t.value),!0))},[A]),qe=S(()=>{if(G)return Pe;const e=ye.trim().toLowerCase();return e?n(Pe,t=>r(t,e)):Pe},[Pe,ye,G]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?ze.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,ze,Ae]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
|
-
return E("div",{ref:Ne,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(Ne.current?.contains(t)||Ce.current?.contains(t))||Fe.current||document.activeElement!==De.current&&Ee(!0)},children:[(rt=/* @__PURE__ */M("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Xe,onChange:e=>{$e(e.target.value),pe(!0)},onFocus:()=>{U||($e(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(U)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Me(nt[me],me):1!==_e.length||_e[0].disabled?B&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),$e("")):(ie([et]),Ee(!1),De.current?.blur())):Me(_e[0],0)):"Escape"===t.key?(Ee(!1),De.current?.blur()):"Tab"===t.key&&Ee(!0)},placeholder:Ke?Xe:H||je,className:`${se?u:d} ${I} ${a[Ue]}${U?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Ke?" rosh-field-shows-choice":""}`,style:Re?{paddingRight:Re}:void 0,disabled:U}),re?/* @__PURE__ */M(f,{content:!he&&Ze?Le:null,className:"block",children:rt}):rt),re&&
|
|
3
|
-
/* @__PURE__ */M("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */M("span",{ref:Be,className:"whitespace-pre"})}),Ue>0&&
|
|
4
|
-
/* @__PURE__ */E(s,{children:[Ie&&
|
|
5
|
-
/* @__PURE__ */M("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */M(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */M(p,{name:"close"}),onClick:()=>{ie([]),Ee(!1)}}})}),P&&/* @__PURE__ */M("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */M(c,{action:P})})]}),K&&!he&&/* @__PURE__ */M("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${O[Ue]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:K}),he&&F(
|
|
6
|
-
/* @__PURE__ */E("div",{ref:Ce,onMouseDownCapture:()=>{Fe.current=!0,setTimeout(()=>{Fe.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:Te?.left,right:Te?.right,top:Te?.top,bottom:Te?.bottom,minWidth:Te?.minWidth,width:Te?.width,...ce&&{maxWidth:Te?.maxWidth},visibility:Te?void 0:"hidden",...j()},children:[re&&ae&&_&&!U&&
|
|
7
|
-
/* @__PURE__ */M("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${k}`,children:ke.select.clearAll}),J?
|
|
8
|
-
/* @__PURE__ */M(m,{size:"sm",padding:"py-2",label:ke.search.searching}):X?/* @__PURE__ */E("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
|
-
/* @__PURE__ */M("span",{className:"min-w-0 flex-1",children:X}),Z&&/* @__PURE__ */M(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:Z,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
|
-
/* @__PURE__ */E("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Te?.maxHeight??w},children:[0===nt.length?J||X?null:/* @__PURE__ */M("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
|
-
return E("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Me(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */M(o,{selected:n}),
|
|
12
|
-
/* @__PURE__ */M("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */M(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&Q&&
|
|
13
|
-
/* @__PURE__ */M("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Me(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${k}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */M("span",{className:"min-w-0 flex-1 truncate",children:Q(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{z as SearchableSelect,R as fitChoice};
|
package/dist/chunk-43MCNASD.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{formatPlain as e,formatFixed as o,formatGrouped as t,formatPercent as a}from"./chunk-C3QOHMR6.js";import{createContext as i,useContext as n,useMemo as r,useEffect as s}from"react";import{jsx as l}from"react/jsx-runtime";function d(i){const n=o=>e(o,i),r=e=>t(e,i),s=(e,t)=>o(e,t,i),l=(e,o)=>a(e,o,i);return{window:{minimize:"Minimize",restore:"Restore",maximize:"Maximize",windowed:"Windowed",pinOnTop:"Pin on top",unpin:"Unpin from top",close:"Close",edit:"Edit",discard:"Discard",windowSuffix:"window",prev:"Prev",next:"Next",snapLayouts:"Snap layouts",snapLeft:"Snap left half",snapRight:"Snap right half",snapTopLeft:"Snap top-left quarter",snapTopRight:"Snap top-right quarter",snapBottomLeft:"Snap bottom-left quarter",snapBottomRight:"Snap bottom-right quarter"},taskbar:{closeWindow:"Close window",offscreenHint:"This window is off screen — click to bring it back",offscreenDot:"Off screen — click to bring this window back",expose:"Exposé — show all open windows as thumbnails",addToDesktop:"Add to desktop",removeFromDesktop:"Remove from desktop",minimizeAllWindows:"Minimize all",restoreAllWindows:"Restore all",closeAllWindows:"Close all"},logout:{goodbye:"Goodbye",seeYou:"See you next time"},about:{aboutPrefix:"About",thisApp:"this app",openSourceLicenses:"Open Source Licenses",whatsNew:"What's New",noChangelog:"No changelog available."},table:{empty:"Nothing to show",loading:"Loading",selectAll:"Select all rows",selectRow:"Select row"},select:{none:"— None —",noMatches:"No matches",allSelected:"All options selected",clear:"Clear selection",clearAll:"Clear all",changed:"Changed",selectedCount:e=>`${n(e)} selected`,remove:"Remove"},notifications:{title:"Notifications",markAllRead:"Mark all read",dnd:"Do not disturb",dndOn:"Do not disturb is on",caughtUp:"All caught up",empty:"No notifications yet",viewAll:"View all notifications",byActor:e=>`by ${e}`,cardLabel:"Notification",dismiss:"Dismiss notification"},form:{errorSummaryTitle:"There is a problem"},help:{title:"Help",searchPlaceholder:"Search help…",empty:"No help articles yet.",noResults:"No articles match your search.",loading:"Loading",pickArticle:"Pick a help article from the left.",noBody:"This article has no body yet.",draft:"Draft",newArticle:"+ New",edit:"Edit"},update:{available:"A new version is available.",refreshNow:"Refresh now"},pageTabs:{label:"Open pages",close:"Close",favorite:"Favorite",closeOthers:"Close other tabs",closeRight:"Close tabs to the right",closeAll:"Close all tabs",unsaved:"Unsaved changes",copy:e=>`Copy ${e}`,copied:"Copied",tabMenu:"Window menu",groupToggle:(e,o)=>`${e}: ${n(o)} ${1===o?"tab":"tabs"}`,discardTitle:"Discard unsaved changes?",discardOne:"This page has changes that have not been saved. Close it anyway?",discardMany:"pages have changes that have not been saved. Close them anyway?",discardConfirm:"Discard and close",keepEditing:"Keep editing"},dialog:{close:"Close",cancel:"Cancel",ok:"OK",confirmTitle:"Confirm",destructiveTitle:"Confirm Action",destructiveCancel:"Dismiss",destructiveConfirm:"Delete",typeToConfirm:e=>`Type ${e} to confirm:`,promptTitle:"Enter a value",discardTitle:"Discard changes?",discardMessage:e=>e?`“${e}” has unsaved changes. Are you sure you want to close? All changes will be lost.`:"You have unsaved changes. Are you sure you want to close? All changes will be lost.",discardConfirm:"Discard",keepEditing:"Keep Editing"},calendar:{previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",monthPanel:"Choose a month",yearPanel:"Choose a year",chooseMonth:e=>`Choose a month, currently ${e}`,chooseYear:e=>`Choose a year, currently ${e}`},datePicker:{placeholder:"Select a date",dialog:"Choose a date",clear:"Clear",today:"Today",required:"Required"},dateRange:{placeholder:"Date Range",clearRange:"Clear date range",dialog:"Date range",from:"From",to:"To",start:"Start",end:"End",fromOnly:e=>`From ${e}`,toOnly:e=>`To ${e}`,range:(e,o)=>`${e} to ${o}`,required:"Required",last2Weeks:"Last 2 Weeks",lastMonth:"Last Month",last3Months:"Last 3 Months",last6Months:"Last 6 Months",last12Months:"Last 12 Months",lastHeading:"Last",last2WeeksShort:"2 weeks",lastMonthShort:"Month",last3MonthsShort:"3 months",last6MonthsShort:"6 months",last12MonthsShort:"12 months",custom:"Custom",clear:"Clear",cancel:"Cancel",apply:"Apply"},pagination:{label:"Pagination",first:"First page",previous:"Previous page",next:"Next page",last:"Last page"},list:{selected:e=>`${n(e)} selected`,selectedNotShown:(e,o)=>`${n(e)} selected, ${n(o)} not shown`,allLoaded:(e,o)=>`All ${r(e)} ${o} loaded`,count:(e,o)=>`${r(e)} ${o}`,loadedOf:(e,o,t)=>`${r(e)} of ${r(o)} ${t}`,loadingMore:"Loading more",loadError:"Couldn't load this list",loadErrorMessage:"Something went wrong fetching these records. Check your connection and try again.",retry:"Try again"},kanban:{loading:"Loading",empty:"No items.",dropHere:"Drop here",addItem:"Add item"},files:{attach:"Attach files",drop:"Drop files to attach",remove:e=>`Remove ${e}`,chooseMany:"Choose files",chooseOne:"Choose a file",dragMany:"or drag them here",dragOne:"or drag it here",notAccepted:(e,o)=>`${e} is not an accepted file type${o?` (${o})`:""}`,tooLarge:(e,o,t)=>`${e} is ${o} — the limit is ${t}`,tooMany:(e,o)=>`${e} was not added — ${n(o)} ${1===o?"file":"files"} is the limit`,bytes:e=>`${n(e)} B`,kilobytes:e=>`${n(e)} KB`,megabytes:e=>`${s(e,1)} MB`},media:{uploadImage:"Upload an image",uploadVideo:"Upload a video",uploadFile:"Upload a file",upload:"Upload media",cta:"Choose from library or upload",replace:"Replace",remove:"Remove",uploading:"Uploading",choosing:"Choosing",pickFailed:"The library could not be opened. Try again.",cover:"Cover",add:"Add",addMedia:"Add media",empty:"No media.",removeItem:e=>`Remove ${e}`,reorder:(e,o,t)=>`${e}, item ${n(o)} of ${n(t)}. Use arrow keys to reorder.`,image:"Image",video:"Video",changeImage:"Change image",changeVideo:"Change video",focus:"Image focus",usedIn:e=>`Used in ${n(e)} ${1===e?"place":"places"}`,notUsed:"Not used anywhere",moveTo:(e,o)=>{const t="image"===o?"image":"video"===o?"video":"file";return`Move ${n(e)} ${t}${1===e?"":"s"} to`},moveNowhere:"There is no folder to move to",moveToMenu:"Move to",files:"Files"},mediaLibrary:{products:"Products",allFiles:"All files",trash:"Trash",readOnlyBadge:"Read-only",folders:"Folders",readOnly:"Read-only. Edit these pictures in Products > Design > Media.",editedAtHq:e=>`Edited at HQ (${e}).`,readOnlyMenu:"Read-only · edited in Products > Design > Media",noProductFolder:"Products folders come from brand > design > finish. You cannot make a folder here.",noDropProducts:"Read-only. You cannot move or upload files into Products.",newFolder:"New folder",newSubfolder:"New subfolder",folderName:"Folder name",fileName:"File name",folderActions:"Folder actions",upload:"Upload",rename:"Rename",moveTo:"Move to",moveToTrash:"Move to Trash",deleteFolder:"Delete folder",folderNotEmpty:"Only an empty folder can be deleted. Move or delete what is in it first.",moveFilesToTrash:e=>`Move ${n(e)} files to Trash`,filesSelected:e=>`${n(e)} files selected`,fileCount:e=>`${n(e)} ${1===e?"file":"files"}`,selected:e=>`${n(e)} selected`,clearSelection:"Clear selection",selectAll:"Select all",replace:"Replace",cropEdit:"Crop & edit",copyUrl:"Copy URL",fileUrl:"File URL",urlLabel:"URL",openOriginal:"Open original",openInDesign:"Open in Design",restore:"Restore",deleteForever:"Delete forever",emptyTrash:"Empty trash",search:"Search file name",searchProducts:"Search design, finish, part number",mediaType:"Media type",allTypes:"All types",images:"Images",videos:"Videos",use:"Use",anyUse:"Any use",emailOnly:"Email only",websiteOnly:"Website only",notUsed:"Not used",sort:"Sort",newest:"Newest",byName:"Name",bySize:"Size",view:"View",grid:"Grid",list:"List",used:e=>`Used ${n(e)}`,email:"Email",private:"Private",daysAgo:e=>1===e?"1 day ago":`${n(e)} days ago`,details:"Details",name:"Name",type:"Type",size:"Size",resolution:"Resolution",addedBy:"Added by",folder:"Folder",usedIn:"Used in",places:e=>`${n(e)} ${1===e?"place":"places"}`,design:"Design",finish:"Finish",angleLug:"Angle · Lug",owner:"Owner",emptyProducts:"No pictures here yet",trashEmpty:"Trash is empty.",noMatches:"No matches.",emptyFolder:"No files in this folder yet.",oneChosen:e=>`1 selected · ${e}`,noneChosen:"Nothing selected",cancel:"Cancel",chooseImage:"Choose image",privateNoPick:"A private file cannot be used here.",alreadyHere:"The files are already here",folderAlreadyHere:"The folder is already here",notIntoItself:"A folder cannot go inside itself"},lightbox:{label:"Preview",close:"Close preview",previous:"Previous",next:"Next",counter:(e,o)=>`${n(e)} / ${n(o)}`,openOriginal:"Open original",openFile:"Open file"},brandAsset:{save:e=>`Save ${e}`,remove:e=>`Remove ${e}`,discard:"Discard change",saveFailed:e=>`Could not save ${e}.`,removeFailed:e=>`Could not remove ${e}.`,region:(e,o)=>`${e} for ${o}`,usedFor:e=>`Used for ${e}.`,previews:e=>`${e} previews`,preview:"Preview",alt:(e,o)=>`${e} ${o}`},copy:{copy:"Copy",copyLabel:e=>`Copy ${e}`,copied:"Copied",copyValue:e=>`Copy ${e}`,copiedValue:"Copied!",copiedLabel:e=>`${e} copied`,failed:"Could not copy to the clipboard"},keypad:{backspace:"Backspace",enter:"Enter"},banner:{dismiss:"Dismiss"},transfer:{uploading:"Uploading",error:"Error",retry:"Retry",dismiss:"Dismiss",cancel:"Cancel",cancelVerb:e=>`Cancel ${e}`},count:{items:e=>`${n(e)} ${1===e?"item":"items"}`,tabs:e=>`${n(e)} ${1===e?"tab":"tabs"}`,windows:e=>`${n(e)} ${1===e?"window":"windows"}`},badge:{remove:"Remove",removeItem:e=>`Remove ${e}`},breadcrumbs:{label:"Breadcrumb",hidden:"Hidden crumbs"},emptyState:{message:"Nothing here yet."},errors:{notFound:"Page not found",notFoundBody:"The page you're looking for doesn't exist or was moved.",forbidden:"Access denied",forbiddenBody:"You don't have permission to view this page.",noAccess:"You don't have access to this",serverError:"Something went wrong",serverErrorBody:"An unexpected error occurred. Please try again.",retry:"Try again",details:"Error details"},search:{placeholder:"Search...",escBadge:"ESC",searching:"Searching",noResults:"No results found.",minChars:e=>`Type at least ${n(e)} characters to search...`,navigate:"navigate",open:"open",close:"close",enterKey:"Enter",escKey:"Esc",recent:"Recent",favorites:"Favorites",actions:"Actions",listLabel:"Search results",groupCount:(e,o)=>`${n(e)}${o?"+":""}`,groupLabel:(e,o,t)=>`${e}, ${n(o)}${t?"+":""}`,seeAll:e=>`See all ${e}`,searchFailed:"Search failed — check your connection and try again.",partialFailure:"Some results could not be loaded.",tabKey:"Tab",nextGroup:"next group"},grid:{selectAll:"Select all",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:e=>`Delete row ${e}`,insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteColumn:e=>`Delete column ${e}`,resize:"Drag to resize · double-click to auto-fit",fill:"Drag to fill"},sidebar:{resize:"Drag to resize · double-click to reset",sections:"Sections",closeSections:"Close sections"},resizeHandle:{label:"Resize panel",hint:"Drag to resize · double-click to reset"},number:{increase:"Increase",decrease:"Decrease"},slider:{value:e=>`${e} value`},accordion:{changed:e=>`${e} changed`},settingView:{auto:"auto",edited:"Changed in this view",resetName:e=>`Reset ${e}`,inheritName:e=>`Inherit parent layout for ${e}`,inheritParentLayout:"Inherit parent layout",backToDefault:"back to the site default",backToAuto:"back to auto",backTo:e=>`back to ${e}`,tip:(e,o)=>`${e} (${o})`,viewDesktop:"Desktop",viewTablet:"Tablet",viewPhone:"Phone"},displayChips:{shown:"Shown",hidden:"Hidden",shownHint:"Shown · click to hide",hiddenHint:"Hidden · click to show"},corners:{radius:"Corner radius",unit:"px",radiusMark:"R"},iconPicker:{button:(e,o)=>`${e}: ${o}`},iconNames:{none:"None","arrow-right":"Arrow","arrow-long-right":"Long arrow","arrow-up-right":"Arrow up right","chevron-right":"Chevron",external:"External",cart:"Cart",bag:"Bag",tag:"Tag",email:"Email",location:"Location",play:"Play",download:"Download",search:"Search",car:"Car",dot:"Dot",cross:"Cross",slash:"Slash",triangle:"Triangle"},widths:{column:e=>`Column ${e}`,divider:(e,o)=>`Divider between column ${e} and column ${o}`,dividerValue:(e,o,t,a)=>`Column ${e} ${l(o,0)}, column ${t} ${l(a,0)}`,dragHint:"Drag to change the widths",hint:(e,o)=>`Type a width or drag a line. No column goes below ${l(o,0)}.`,equal:"equal widths"},color:{swatch:(e,o)=>`${e}: ${o}`,none:"None",panel:e=>`${e} picker`,square:"Saturation and brightness",squareValue:(e,o)=>`Saturation ${l(e,0)}, brightness ${l(o,0)}`,hue:"Hue",opacity:e=>`${e} opacity`,hex:e=>`${e} hex code`,presets:"Presets",clear:"No color"},imageFocus:{picture:(e,o)=>`${e}: ${o}`,hint:"Drag the dot on the picture, or move it with the arrow keys. Shift moves it further.",noImage:"Choose an image first. There is nothing to focus yet."},link:{linkType:"Link type",address:"Link address",addressPlaceholder:"Link (e.g. /wheels or https://…)",unsafe:"Use a web address (https://…), a page on this site (/…), mailto: or tel:.",unavailable:e=>`${e} (unavailable)`,filter:"Filter",noFilter:"No filter (all products)",value:"Value",filterHint:"Filters come from Product Types. Only values in this site's catalogue are listed.",title:"Link",apply:"Apply",cancel:"Cancel",remove:"Remove",addLink:"Add a link",text:e=>`${e} text`,linkOf:(e,o)=>`${e} link: ${o||"none"}`},textToolbar:{formatting:"Formatting",bold:"Bold",italic:"Italic",underline:"Underline",strike:"Strikethrough",color:"Color",link:"Link",sup:"Superscript",sub:"Subscript",code:"Code",alignment:"Alignment",alignLeft:"Left",alignCenter:"Center",alignRight:"Right",alignJustify:"Justify",bullet:"Bulleted list",number:"Numbered list",quote:"Quote",letterCase:"Letter case",caseNone:"As typed",caseUpper:"Uppercase",caseLower:"Lowercase",clear:"Clear formatting"},tree:{empty:"Nothing here yet",dropHere:"Drop here",dragHint:"Drag to move",moveHint:"Alt+Arrow Up or Alt+Arrow Down moves it",insertHere:"Insert here"},layout:{desktop:"Desktop",sidebar:"Sidebar",switchToDesktop:"Switch to Desktop",switchToSidebar:"Switch to Sidebar",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",goHome:"Go to Home",resizeSidebar:"Resize sidebar",search:"Search…",navLabel:"Main menu",openWindows:"Open windows",favoriteApps:"Favorite apps",openFavorite:e=>`Open ${e}`,removeFavorite:"Remove from Favorites",pageResult:"Page",accountMenu:e=>`Account menu for ${e}`,profile:"My Profile",notifications:"Notifications",reportIssue:"Suggestion or Bug",signOut:"Sign Out",signOutTitle:"Sign Out",signOutMessage:"Do you want to log out? All windows will reopen when you log back in.",openMenu:"Open menu",closeMenu:"Close menu",openTabs:"Open tabs",getTheApp:e=>`Get the ${e} app`,openApp:"Open",dismiss:"Dismiss",deviceUsesSidebar:"This device always uses the Sidebar layout. Your choice still applies when you sign in on a computer.",largerScreensOnly:"Larger screens only",usedOnThisDevice:"Used on this device",back:"Back"},markdown:{screenshot:"Screenshot"},severity:{success:"ok",warning:"warning",danger:"critical",unrecognised:e=>`unrecognised severity ${e}`},meter:{noData:"no data",warningAt:e=>`warning ≥ ${n(e)}`,criticalAt:e=>`critical ≥ ${n(e)}`,legendWarning:"warning",legendCritical:"critical",noReading:"no reading",noBudget:"no budget",ofBudget:e=>`${e} of budget`,budget:"budget",pace:"expected by now",hoursMinutes:(e,o)=>`${n(e)}h ${n(o)}m`,minutesSeconds:(e,o)=>`${n(e)}m ${n(o)}s`,seconds:e=>`${n(e)}s`},charts:{showTable:"Show the data as a table",loading:"Loading chart data",noData:"No data in this window.",windowStart:"Window start",windowEnd:"Window end",window:(e,o,t)=>`Time window — showing ${e} to ${o} of ${n(t)} intervals`,overIntervals:(e,o)=>`${e.join(", ")} over ${n(o)} intervals`,acrossCategories:(e,o)=>`${e.join(", ")} across ${n(o)} categories`,acrossMeasures:(e,o)=>`${e.join(", ")} across ${n(o)} measures`,breakdown:(e,o)=>`Breakdown of ${e} across ${n(o)} segments`,funnel:(e,o,t)=>`Funnel of ${n(e)} stages, ${o} down to ${t}`,radialTrack:e=>`${n(e)} categories, as concentric proportions`,radialCycle:e=>`${n(e)} categories, around a cycle`,tableFrom:"From",tableTo:"To",tableItem:"Item",tableLevel:"Level",tableSeries:"Series",inBucket:e=>`${e} in this bucket`,zoomRange:(e,o,t)=>`${e} – ${o} · ${n(t)} ${1===t?"interval":"intervals"}`,zoomClear:"Clear",zoomLevel:(e,o)=>`${e} avg · ${o} peak`,inCategory:e=>`${e} in this category`,value:"Value",share:"Share",count:"Count",flow:"Flow",totalFlow:"Total flow",throughput:"Throughput",open:"Open",high:"High",low:"Low",close:"Close",maximum:"Maximum",q3:"Q3",median:"Median",q1:"Q1",minimum:"Minimum",distribution:"Distribution",fiveNumber:(e,o)=>`${e}: five-number summary for ${n(o)} categories`,outliers:e=>`${n(e)} outlier${e>1?"s":""} beyond the whiskers`,price:"Price",ohlc:(e,o)=>`${e}: open, high, low and close across ${n(o)} periods`,closedAbove:"Closed above its open",closedBelow:"Closed below its open",noFlows:"No flows to chart.",chord:e=>`Flows between ${n(e)} participants`,chordFolded:e=>`+${n(e)} more in Other`,noStages:"No stages to chart.",ofFirstStage:"Of first stage",droppedHere:"Dropped here",intensity:"Intensity",noActivity:"No activity in this window.",heatmap:(e,o,t)=>`${e} across ${n(o)} rows and ${n(t)} columns`,countAxis:"count",histogram:(e,o,t)=>`${e}: ${n(o)} bins over ${n(t)} observations`,observations:"Observations",notEnough:"Not enough eligible requests to judge.",objectiveMet:e=>`objective ${e} met`,objectiveMissed:e=>`objective ${e} missed`,nothingToPlot:"Nothing to plot.",nothingToCompare:"Nothing to compare.",other:"Other",nothingToBreakDown:"Nothing to break down.",range:"Range",rangeLabel:(e,o)=>`${e}: low and high across ${n(o)} categories`,nothingToRank:"Nothing to rank in this window.",emphasised:"(emphasised)",sankey:(e,o)=>`Flow between ${n(e)} nodes over ${n(o)} links`,noObservations:"No observations in this window.",xAxis:"x",yAxis:"y",size:"Size",scatter:(e,o,t)=>`${e.join(", ")}: ${o} against ${t}`,outsideRange:e=>`${n(e)} ${1===e?"point":"points"} outside the shown range`,waterfall:(e,o,t)=>`Waterfall of ${n(e)} steps from ${o} to ${t}`,balance:"Balance",increase:"Increase",decrease:"Decrease",runningTotal:"Running total",sunburst:(e,o)=>`Hierarchy of ${e} across ${n(o)} levels`,treemap:e=>`Treemap of ${n(e)} items`,trendUp:"up",trendDown:"down",trendFlat:"flat"},timeline:{days:e=>`${r(e)} days`,daysToToday:e=>`${r(e)} days to today`,notReached:"Not yet reached",next:"Next",more:e=>`+${n(e)} more`,today:"Today",todayTitle:e=>`Today — ${e}`,open:e=>`Open ${e}`,openButton:"Open",scrub:"Scrub the timeline",alsoToCome:e=>`Also to come: ${e.join(", ")}`,start:e=>`Start · ${e}`,events:(e,o)=>`${n(e)} events · ${o.join(", ")}`,started:e=>`started ${e}`,duration:e=>`${r(e)} day${1===e?"":"s"}`,reached:(e,o)=>`${n(e)} of ${n(o)} milestones`,milestones:e=>`${e} milestones`},production:{heading:"Production progress",start:"Start",estimated:"Estimated",estimatedCompletion:"Estimated completion",estDone:"Est. done",play:"Play",pause:"Pause",playTitle:"Play the timeline, report by report",backTo:e=>`Back to ${e}`,showing:e=>`Showing ${e}`,overall:e=>`${l(e,0)} overall`,inStock:e=>`${r(e)} pc in stock`,noReport:"No production report filed yet",leadTime:e=>`${r(e)} day${1===e?"":"s"} lead time`,report:"Production report",shipment:"Shipment",inspection:"Inspection",invoice:"Invoice",scrub:"Scrub the production timeline",label:(e,o)=>`Production reports and events, ${e} to ${o}`},containers:{items:e=>`${n(e)} items`,pieces:e=>`${n(e)} pcs`,split:(e,o)=>`(${n(e)} instr / ${n(o)} loaded)`,added:(e,o)=>`${n(e)} new (${n(o)} pcs)`,fill:(e,o)=>`${s(e,1)} / ${n(o)} m³`,total:"Total:",instructed:e=>`${s(e,2)} m³ instruction`,loaded:e=>`${s(e,2)} m³ loaded`,volume:e=>`${s(e,2)} m³`,noVolume:"Volume: N/A (no volume data for these part numbers)"},toast:{notification:"Notification",undo:"Undo"},map:{failed:"The map could not be drawn here. The list has everything it shows.",approximate:e=>`${e}, approximate location`,approximateTitle:e=>`${e} (approximate)`,places:e=>1===e?"place":"places",group:(e,o)=>`${n(e)} ${o} here`,stops:e=>`Stops ${e}`,closeBy:(e,o)=>`${n(e)} more ${o} close by, drawn when the map is closer`,spread:"Press to see them apart",cycle:"They stand on one spot: press for the next of them",fullScreen:"Full screen",leaveFullScreen:"Leave full screen",chosen:e=>`${e}, chosen on the map`,closeCard:"Close",openRecord:"Open"},pdf:{previousPage:"Previous page",nextPage:"Next page",pageOf:(e,o)=>`${n(e)} / ${n(o)}`,zoomOut:"Zoom out",zoomIn:"Zoom in",zoom:"Zoom",fitWidth:"Fit width",fitPage:"Fit page",fit:"Fit",fitHint:"Fit to the pane: follows its size until you zoom by hand",print:"Print",download:"Download",email:"Email",loading:"Loading PDF",loadFailed:"Failed to load PDF",allowPopups:"Allow popups to print"},loading:{label:"Loading"},language:{title:"Language",description:"The language of menus, labels and messages.",reloadNote:"The page reloads when you change the language."},entityList:{open:"Open",copy:"Copy",copyColumn:e=>`Copy ${e}`,copyRows:e=>1===e?"Copy row":`Copy ${n(e)} rows`,exportSelected:"Export selected to CSV",selectAll:"Select all",selectAllLoaded:e=>`Select all ${n(e)} loaded`,clearSelection:"Clear selection",refresh:"Refresh",copiedText:"Text",copiedRows:e=>1===e?"Row":`${n(e)} rows`,exported:e=>`Exported ${n(e)} ${1===e?"row":"rows"}.`,exportTruncated:(e,o)=>`Exported ${n(e)} of ${n(o)} rows. The server capped this export, so the file is incomplete.`,exportTruncatedUnknown:e=>`Exported only some of the ${n(e)} rows. The server capped this export, so the file is incomplete.`,exportFailed:"CSV export failed."},columns:{choose:"Choose columns",heading:"Columns",reset:"Reset",saveDefault:"Save as default for all users",savedDefault:"Saved as default",select:"Select",selectDone:"Done",showSelection:"Show selection column",hideSelection:"Hide selection column"},record:{loading:"Loading record",signInRequired:"Sign in required",signInBody:"Your session may have expired. Sign in again to open this record.",notFound:"Record not found",loadFailed:"Couldn't load record",checkConnection:"Check your connection and try again.",rejected:"The server rejected this request.",retry:"Try again"},password:{current:"Current Password",newPassword:"New Password",confirm:"Confirm Password",submit:"Change Password",submitting:"Changing",done:"Done",currentRequired:"Current password is required.",tooShort:e=>`New password must be at least ${n(e)} characters.`,mismatch:"Passwords do not match.",failed:"Failed to change password.",changed:"Your password has been changed successfully."},pdfAction:{label:"PDF",loading:"Loading",preview:"Preview",download:"Download",email:"Send by Email",downloaded:e=>`${e} downloaded.`,tookTooLong:e=>`${e} took too long to load. Please try again.`,previewLoading:"LOADING PDF",previewTookTooLong:"This document took too long to load. Close this window and try again.",previewFailed:"Failed to load PDF."},undo:{undo:"Undo",redo:"Redo",undoStep:(e,o)=>`Undo ${e} (${o})`,redoStep:(e,o)=>`Redo ${e} (${o})`,nothingToUndo:"Nothing to undo",nothingToRedo:"Nothing to redo"},sounds:{title:"Sounds",enable:"Sound effects",autosave:"Changes are saved automatically",choice:(e,o)=>`${e} — ${o}`,packClassic:"Classic",packMinimal:"Minimal",packRetro:"Retro",packSoft:"Soft",packArcade:"Arcade",packSilent:"Silent",eventClick:"Click",eventSuccess:"Success",eventError:"Error",eventNotification:"Notification",eventStartup:"Startup",eventTimerDone:"Timer",eventLogout:"Logout"},serverStatus:{connected:"Connected",disconnected:"Disconnected",checking:"Checking",lastOkTitle:(e,o)=>`${e} · last ok ${o}`,details:"Server connection details",lastPoll:e=>`Last poll ${e}.`,lastFailure:e=>`Last failure ${e}.`,firstPoll:"First poll in flight",server:"Server",protocol:"Protocol",browser:"Browser",online:"Online",offline:"Offline",lastOk:"Last OK",lastFail:"Last fail",latency:"Latency",poll:"Poll",pollEvery:e=>`every ${n(e)} s`,session:"Session",user:"User",notSignedIn:"Not signed in",role:"Role",build:"Build",app:"App",userAgent:"UA",pingHint:"Click ↻ to ping now",refresh:"Refresh"},bulkImport:{description:"Paste from spreadsheets, type directly, or upload a CSV. Rows don't need to be in order — they'll be matched. Values not in the list will be added to the end. Fields left blank will not be affected.",lines:e=>`${n(e)} lines`,total:(e,o)=>`${e}: ${o}`,clear:"Clear",upload:"Upload CSV",importLines:e=>`Import ${n(e)} Lines`,importing:"Importing",importFailed:"Import failed.",enterAtLeastOne:e=>`Enter at least one ${e||"value"}.`,allSkipped:"All rows skipped.",cancel:"Cancel",mapTitle:"Map CSV columns to fields",skip:"— Skip —",columnOption:(e,o)=>`Column ${n(e)} (e.g. ${o})`,rowsDetected:e=>`${n(e)} rows detected`,confirmMapping:"Confirm Mapping",duplicatesTitle:"Duplicate entries detected",duplicatesFound:e=>`${n(e)} ${1===e?"value appears":"values appear"} more than once in your import. Choose how to handle each before proceeding.`,occurrences:e=>`${n(e)} occurrences`,keepFirst:"Keep first",keepLast:"Keep last",keepAll:"Keep all",skipAll:"Skip all",keptDropped:(e,o)=>`${n(e)} kept · ${n(o)} dropped`,proceed:"Proceed",duplicatesMerged:e=>`${n(e)} ${1===e?"value appeared":"values appeared"} more than once. Each is merged into a single line with its quantity summed — review before proceeding.`,mergedFrom:"Merged from",mergedRows:e=>`${n(e)} rows`,mergeSummary:(e,o)=>`${n(e)} duplicate rows → ${n(o)} merged line${1===o?"":"s"}`},preview:{windowTitle:e=>`${e} - Preview`,untitled:"Untitled",open:"Open",formats:"PDF · DXF · 3D · Images",dropHere:e=>`Drop a file here, or click ${e}.`,supportedFormats:"Supported formats",formatPdf:"multi-page document viewer",formatDxf:e=>`vector CAD drawings (optional ${e} peer dep)`,format3d:e=>`3D models (optional ${e} peer dep)`,formatImage:"raster images",dwgNote:"DWG files need to be converted to PDF or DXF first (server-side).",dropToOpen:"Drop to open",dwgUnsupported:"DWG files need server-side conversion. Convert to PDF or DXF first.",unsupportedType:e=>`Unsupported file type: .${e||"unknown"}`,converting:"Converting file",download:"Download",email:"Email",howToNavigate:"How to navigate",stopMeasuring:"Stop measuring (Esc)",scrollToZoom:"Scroll to zoom",closePanel:"Close",annotate:"Annotate",annotateHint:"Annotate this image",view:"View",viewHint:"Back to viewer",copy:"Copy",save:"Save",imageFailed:"Failed to load image.",downloadFailed:"Download failed — couldn't reach the file."},drawing:{loading:"Loading drawing",notInstalled:"dxf-viewer is not installed in this app.",renderFailed:"Failed to render DXF.",layers:"Layers",layersHint:"Toggle layer visibility",allLayers:"All",noLayers:"None",measure:"Measure",measureHint:"Measure distance — click two points on the drawing, or type DI / DIM below",auto:"Auto",autoHint:"Auto — AutoCAD DIMLINEAR: measures ΔX or ΔY, whichever is larger between the two picks",horizontalHint:"Horizontal — distance along the X axis between two picks (AutoCAD DIMLINEAR horizontal)",verticalHint:"Vertical — distance along the Y axis between two picks (AutoCAD DIMLINEAR vertical)",point:"Point",pointHint:"Point — straight-line (Euclidean) distance between two picks (AutoCAD DIST)",fixX:"fix Δx",fixY:"fix Δy",fixHint:"Lock the second pick's axis coord to first pick + this value (mm). The reported measurement becomes the perpendicular distance.",clearFixed:"Clear fixed distance",horizontalDistance:e=>"Horizontal distance (Δx) between the two picked points"+(e?" — Auto resolved to the X axis":""),verticalDistance:e=>"Vertical distance (Δy) between the two picked points"+(e?" — Auto resolved to the Y axis":""),straightDistance:"Straight-line distance between the two picked points",fit:"Fit",fitHint:"Fit drawing to view",dragToPan:"Drag to pan",fitToReset:"Fit to reset",typeToMeasure:e=>`Type ${e} to measure`,commandPlaceholder:"Type a command — DI, DIM, H, V, Z, LA (? for help)",commandHelp:"Commands: DI distance · DIM/DLI linear dim · H / V force axis · <number> lock Δ · U undo pick · Z fit · LA layers · Esc exit",echoDistance:(e,o,t)=>`Distance = ${e} ΔX = ${o} ΔY = ${t}`,echoLinear:(e,o)=>`Linear dimension = ${e} (${o})`,echoLocked:(e,o,t,a)=>`${e} = ${o} with ${t} locked to ${a}`,axisLocked:(e,o)=>`${e} locked to ${o} — the label shows the perpendicular distance`,fixedCleared:"Fixed distance cleared.",fixedNeedsAxis:"Fixed distances apply in H or V mode — type H or V first.",echoDist:"DIST — click two points; straight-line distance (Esc to exit)",echoDimLinear:"DIMLINEAR — click two points; measures ΔX or ΔY, whichever is larger (H / V to force)",echoHorizontal:"Horizontal — ΔX between the two picks",echoVertical:"Vertical — ΔY between the two picks",echoAuto:"Auto (DIMLINEAR) — measures along the dominant axis of the two picks",measureOn:"Measure on — click two points.",measureOff:"Measure off.",pickRemoved:"Last pick removed.",zoomExtents:"Zoom extents.",layersToggled:"Layer panel toggled.",measurementCleared:"Measurement cleared.",readOnly:e=>`${e} is a drawing command — Preview is a read-only viewer. Measuring: DI, DIM, H, V (? for help)`,unknownCommand:e=>`Unknown command "${e}" — try DI, DIM, H, V, Z, LA (? for help)`,cancelled:"*Cancel*"},model:{loading:"Loading 3D model",stepNote:"STEP files load OpenCascade WASM (~5 MB) on first use.",notInstalled:"online-3d-viewer is not installed in this app. Add it to enable 3D file viewing.",loadFailed:"Failed to load 3D model.",rootNode:"Root",node:"Node",collapse:"Collapse",expand:"Expand",fitToView:"Fit to view",hide:"Hide",show:"Show",isometric:"ISO",isometricView:"Isometric view",top:"TOP",topView:"Top view",front:"FRT",frontView:"Front view",side:"SDE",sideView:"Side view",perspective:"Perspective",orthographic:"Orthographic",toPerspective:"Switch to perspective view",toOrthographic:"Switch to orthographic view",snapshot:"Save snapshot as PNG",measureHint:"Measure distance — click two points on the model",point:"Point",pointHint:"Point — measure straight-line distance between two picked points",perpendicularHint:"Perpendicular — pick two surfaces and measure the perpendicular gap between them",straightDistance:"Straight-line distance between the two picked points",perpendicularDistance:"Perpendicular distance between the two picked surfaces",meshesHint:"Toggle meshes panel",displayHint:"Toggle display panel",downloadOriginal:"Download original file",meshes:"Meshes",readingModel:"Reading model",noStructure:"No structure available",allVisible:"All visible",hiddenCount:e=>`${n(e)} hidden`,dragToRotate:"Drag to rotate",rightDragToPan:"Right-click drag to pan",display:"Model Display",backgroundColor:"Background Color",showEdges:"Show Edges",edgeColor:"Edge Color",edgeThreshold:"Edge Threshold",sectionView:"Section View",angle:"Angle",axis:"Axis",flipHint:"Flip section direction",flip:"flip →",flipped:"← flipped",position:"Position",resetDisplay:"Reset to Default"},annotator:{toolSelect:"Select / Move",toolDraw:"Pen / Draw",toolRect:"Rectangle",toolEllipse:"Ellipse",toolArrow:"Arrow",toolMosaic:"Mosaic",toolText:"Text",toolCrop:"Crop",weight:"Weight",radius:"Radius",size:"Size",padding:"Pad",fontSystem:"System",fontSerif:"Serif",fontMono:"Mono",fontCursive:"Cursive",bold:"Bold",boldLetter:"B",italic:"Italic",italicLetter:"I",underline:"Underline",underlineLetter:"U",border:"Border",borderColor:"Text-box border color",addBorder:"Add a border",removeBorder:"Remove border",fill:"Fill",fillColor:"Text-box background color",addFill:"Add a background fill",removeFill:"Remove fill",add:"Add",zoomOut:"Zoom out",zoomIn:"Zoom in",fit:"Fit",fitHint:"Fit to area",undo:"Undo",applyCrop:"Apply Crop",cancel:"Cancel",apply:"Apply",hintSelected:"Drag to move. Drag a corner to resize. Delete / Backspace removes. Click outside to deselect.",hintSelect:"Tap a shape to select. Double-click text to edit.",hintText:"Click to drop a text label.",hintCrop:"Drag a rectangle to set the crop region.",hintDraw:"Drag to draw freehand.",hintShape:"Drag on the image to draw.",textPlaceholder:"Type then Enter…",loadFailed:"Failed to load image",exportFailed:"Failed to export",clipboardUnsupported:"Clipboard images not supported in this browser",copyFailed:"Failed to copy",copied:"Copied to clipboard",copyRefused:"Copy failed (clipboard permission?)"},attachment:{fallbackName:"attachment",noLink:"This attachment has no download link.",spreadsheetFailed:"Could not open the spreadsheet — opening the file instead.",workbookUnavailable:"Spreadsheet preview is unavailable for this file type. Opening the file instead.",noViewer:"Opening this file outside the app — no viewer can show it here.",loading:"LOADING FILE",loadFailed:"Failed to load this file."},aboutApp:{title:e=>`About ${e}`,version:e=>`Version ${e}`,partOf:e=>`Part of the ${e} desktop environment`,shellVersion:e=>`shell v${e}`,notepad:"Color-coded notes with checklists, desktop stickies and entity autolinking.",preview:"Viewer for PDF documents, images, DXF drawings and 3D models — CAD-style measuring with object snap and an AutoCAD-like command bar.",files:"Personal file manager with folders, uploads, quota, trash, sharing and desktop shortcut folders.",browser:"Minimal web browser with bookmarks, history and navigation bar."}}}var c=d(),p=/* @__PURE__ */new Map;var h=i(c),u=i(null),m=/* @__PURE__ */new Set;var g=c,w={};function f(){return g}function $({value:e=w,locale:o,children:t}){const a=n(u),i=r(()=>function(e){if(e)try{return Intl.getCanonicalLocales(e)[0]}catch{return void(m.has(e)||(m.add(e),console.error(`[efficient-shell] ShellStringsProvider: locale="${e}" is not a BCP 47 language tag, so it is ignored and numbers and dates keep their default formatting. Pass a tag such as "de-DE" or "ja".`)))}}(o),[o]),f=void 0===o?a?.locale:i,$=r(()=>{const o=function(e){if(!e)return c;let o=p.get(e);return o||(o=d(e),p.set(e,o)),o}(f),t={};for(const a of Object.keys(o))t[a]={...o[a],...e[a]??{}};return t},[e,f]),v=r(()=>({locale:f}),[f]),y=null!==a;return s(()=>{if(!y)return g=$,()=>{g===$&&(g=c)}},[$,y]),/* @__PURE__ */l(u.Provider,{value:v,children:/* @__PURE__ */l(h.Provider,{value:$,children:t})})}function v(){return n(h)}function y(){return n(u)?.locale}function b(e){const[o="",...t]=e("\0").split("\0");return[o,t.join("")]}export{c as DEFAULT_SHELL_STRINGS,$ as ShellStringsProvider,f as currentShellStrings,b as splitAround,y as useShellLocale,v as useShellStrings};
|
package/dist/chunk-6DZGOGB2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{requestFilesTrashView as n}from"./chunk-OY3JH66O.js";var o=null;function r(n){o=n}function t(){return o}function u(){n()}export{t as getFilesDemoTree,u as openFilesInTrashMode,r as setFilesDemoTree};
|
package/dist/chunk-6EHPEBGP.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as l}from"./chunk-7B5KFESH.js";import{dialogA11y as a}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as o}from"./chunk-7QSDPSXP.js";import{useFocusTrap as s,useScrollLock as n}from"./chunk-CDAJKLGL.js";import{Icon as d}from"./chunk-UIWGVOFH.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{useHydrated as m}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useShellStrings as p}from"./chunk-43MCNASD.js";import{useRef as f,useId as h,useState as x,useEffect as b}from"react";import{createPortal as v}from"react-dom";import{jsxs as y,Fragment as g,jsx as k}from"react/jsx-runtime";var N={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function j({open:j,onClose:w,title:C,description:D,role:W="dialog",children:F,footer:L,blocking:S=!1,size:T="md",aside:U=!1,dirty:V=!1,initialFocus:A,"aria-label":G,"aria-labelledby":H,"aria-describedby":I,className:J=""}){const $=f(null),z=h(),B=h(),K=!S,P=h(),Q=p().dialog,X=e(m()),[E,M]=x(null),O=l({open:j,dirty:V,onClose:w,title:C,layer:E}),Y=f(null),Z=r(j&&null!==X,Y),q=i(Z,$);if(o(j),s($,j&&null!==X,A),n(j),b(()=>{if(j)return u(()=>(S||O(),!0),()=>$.current)},[j,S,O]),!j||!X)return null;/* @__PURE__ */
|
|
2
|
-
return y(g,{children:[/* @__PURE__ */k("span",{ref:Y,hidden:!0,"data-popup-anchor":""}),v(
|
|
3
|
-
/* @__PURE__ */k(t,{value:E,children:/* @__PURE__ */y("div",{ref:M,className:"fixed inset-0"+(U?" pointer-events-none opacity-0":""),style:{zIndex:c.overlay},role:"presentation","data-overlay-layer":"","data-aside":U?"":void 0,children:[
|
|
4
|
-
/* @__PURE__ */k("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm","aria-hidden":"true"}),
|
|
5
|
-
/* @__PURE__ */k("div",{className:Z?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:S?void 0:e=>{e.target===e.currentTarget&&O()},children:/* @__PURE__ */y("div",{ref:$,"data-popup-panel":"",style:Z?{left:q?.left??0,top:q?.top??0,visibility:q?void 0:"hidden"}:void 0,...a({role:W,modal:!0,titleId:C?P:void 0,labelledBy:H,label:G}),"aria-describedby":I??(D?B:F?z:void 0),className:`${Z?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${N[T]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl ${J}`.trim(),children:[C&&/* @__PURE__ */k("h2",{id:P,className:(K?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:C}),D&&/* @__PURE__ */k("p",{id:B,className:((C?"mt-1":K?"pr-8":"")+" text-sm text-gray-500").trim(),children:D}),F&&/* @__PURE__ */k("div",{id:z,className:"mt-2 text-sm text-gray-600",children:F}),L&&/* @__PURE__ */k("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:L}),K&&/* @__PURE__ */k("button",{type:"button",onClick:O,"aria-label":Q.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */k(d,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),X)]})}export{j as Dialog};
|
package/dist/chunk-A6WZF65N.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import{ChartBrush as t}from"./chunk-WMLBMR4E.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-DZBGJ6X4.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{useDragZoom as p,DragBand as g,ChartZoomSummary as y,tooltipBesideBand as k}from"./chunk-BFO72WQB.js";import{usePlotWidth as x}from"./chunk-MAFUXCPZ.js";import{pairedAxes as v,niceAxis as b,niceMax as M,linearScale as N,axisGutter as w,bandScale as j,ladderScale as $}from"./chunk-2JWPNR2U.js";import{ChartTooltip as V}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as W,CHART_INK as z,STATUS_VARS as A}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as D}from"./chunk-TWVUQUUD.js";import{useShellStrings as L,useShellLocale as R}from"./chunk-43MCNASD.js";import{formatPercent as S,formatPlain as C}from"./chunk-C3QOHMR6.js";import{useRef as E,useState as T,useId as U,useEffect as B}from"react";import{jsx as I,jsxs as F}from"react/jsx-runtime";var P=12,O=16,Q=26,Y=52,Z=t=>"number"==typeof t&&Number.isFinite(t);function G({series:G,labels:H,height:J=200,stacked:K=!1,stackMode:X="value",levels:q,curve:_="linear",tension:tt=0,max:et,yTickCount:at=4,formatValue:rt,formatTooltipValue:ot,tooltipLabels:lt,yAxisLabel:nt,referenceLines:it,labelEndpoints:st=!1,dots:ct,dotVariant:dt="border",pulse:mt=!1,brush:ht=!1,range:ut,onRangeChange:ft,zoomable:pt=!0,columnStrip:gt,onSelect:yt,loading:kt=!1,animate:xt=!0,reveal:vt="left-to-right",fillVariant:bt="gradient",gridStyle:Mt="solid",width:Nt,className:wt,emptyLabel:jt}){const $t=L().charts,Vt=R(),Wt=rt??(t=>C(t,Vt)),zt=ot??Wt,At=jt??$t.noData,Dt=E(null),Lt=x(Dt),Rt=Nt??Lt,[St,Ct]=T(null),[Et,Tt]=T(null),{highlighted:Ut}=u(),Bt=U(),It=ut??Et,Ft=p(ht&&It?It[1]-It[0]+1:H.length,pt);if(B(()=>{if(null!==St)return D(t=>"Escape"===t.key&&(Ct(null),!0))},[St]),kt)/* @__PURE__ */
|
|
2
|
-
return I("div",{className:wt,ref:Dt,children:/* @__PURE__ */I(h,{height:J,width:Nt??Lt})});const Pt=H,Ot=ut??Et??[0,Math.max(0,Pt.length-1)],[Qt,Yt]=Ot,Zt=t=>Ft.slice(ht?t.slice(Qt,Yt+1):t),Gt=lt?Zt(lt):void 0,Ht=G.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(Z)).map(t=>({...t,data:Zt(t.data),pointTones:t.pointTones?Zt(t.pointTones):void 0})),Jt=t=>(ht?Qt:0)+(Ft.view?.[0]??0)+t;if(H=Zt(Pt),0===Ht.length||0===H.length)/* @__PURE__ */
|
|
3
|
-
return I("div",{className:wt,ref:Dt,children:/* @__PURE__ */I("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:J},children:At})});const Kt=H.map((t,e)=>Ht.reduce((t,a)=>t+(Z(a.data[e])?a.data[e]:0),0)),Xt=(t,e)=>Kt[e]>0?t/Kt[e]:null,qt=[];if(K){let t=H.map(()=>0);for(const e of Ht)t=t.map((t,a)=>t+(Z(e.data[a])?e.data[a]:0)),qt.push("percent"===X?t.map((t,e)=>Xt(t,e)):[...t])}const _t=!!q&&q.length>0,te=t=>"right"===t.axis,ee=!K&&!_t&&void 0===et&&Ht.some(te)&&Ht.some(t=>!te(t)),ae=gt&&!K?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(Z)):[],ne=K?(qt.at(-1)??[]).filter(Z):oe.flatMap(t=>t.data.filter(Z)),ie=ee?v([Math.min(0,...ne),Math.max(0,...ne)],[Math.min(0,...le),Math.max(0,...le)],{intervals:at+1,integerLeft:ne.every(Number.isInteger),integerRight:le.every(Number.isInteger)}):null,se=ie?ie.left:K&&"percent"===X||_t||void 0!==et?null:b(K?0:Math.min(0,...ne),Math.max(0,...ne),{intervals:at+1,integer:ne.every(Number.isInteger)}),ce=se?se.lo:0,de=K&&"percent"===X?1:se?se.hi:et??M(Math.max(...ne,0)),me=K&&"percent"===X?t=>S(Math.round(100*t),0,Vt):Wt,he=_t?q:se?se.ticks:N([ce,de],{from:0,to:1}).ticks(at+1),ue=w(he.map(me),Y),fe=ie?w(ie.right.ticks.map(Wt),O):O,pe={left:ue,right:Math.max(ue+1,Rt-fe),top:P,bottom:J-Q},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,Z(a.data[e])?a.data[e]:0),0))),Ne=t=>xe-(Me>0?t/Me:0)*(pe.bottom-pe.top)*(ae??0),we=ie?N([ie.right.lo,ie.right.hi],{from:pe.bottom,to:pe.top}):null,je=t=>we&&te(t)?we:ve,$e=ye?ye.levels.map(t=>({value:t,y:ye(t)})):he.map(t=>({value:t,y:ke(t)})),Ve=t=>e=>{e.preventDefault(),Ct(e=>{const a=(e??0)+t;return Math.min(H.length-1,Math.max(0,a))})},We=Math.max(1,Math.ceil(H.length/Math.max(1,Math.floor(Rt/96))));/* @__PURE__ */
|
|
4
|
-
return F("div",{className:`relative ${wt??""}`,ref:Dt,children:[
|
|
5
|
-
/* @__PURE__ */F("svg",{width:"100%",height:J,viewBox:`0 0 ${Rt} ${J}`,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:()=>Ct(null),onBlur:()=>Ct(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==St&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Jt(St));"ArrowRight"===t.key&&Ve(1)(t),"ArrowLeft"===t.key&&Ve(-1)(t)},children:[
|
|
6
|
-
/* @__PURE__ */I("defs",{children:/* @__PURE__ */I("clipPath",{id:Bt,children:/* @__PURE__ */I("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
|
|
7
|
-
/* @__PURE__ */I(n,{id:Bt,fills:Ht.map((t,e)=>({color:W(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:K?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */I("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:z.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
|
|
8
|
-
/* @__PURE__ */I("line",{x1:pe.left,y1:xe,x2:pe.right,y2:xe,stroke:z.axis,strokeWidth:1,shapeRendering:"crispEdges"}),$e.map(t=>/* @__PURE__ */I("text",{x:pe.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:me(t.value)},`ytick-${t.value}`)),ie&&$e.map((t,e)=>/* @__PURE__ */I("text",{x:pe.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:Wt(ie.right.ticks[e])},`ytick-r-${t.value}`)),nt&&/* @__PURE__ */I("text",{x:12,y:(pe.top+pe.bottom)/2,transform:`rotate(-90 12 ${(pe.top+pe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:z.label,children:nt}),
|
|
9
|
-
/* @__PURE__ */I("g",{clipPath:`url(#${Bt})`,mask:xt&&vt?`url(#${m(Bt)})`:void 0,children:Ht.map((t,e)=>{const n=W(t.slot,t.color,t.tone),m=t.mode??(K?"area":"line"),h=f(t.key,Ut);if("step"===m){const e=H.map((e,a)=>({start:ge(a),end:ge.end(a),value:t.data[a]})).filter(t=>Z(t.value)).map(e=>({start:e.start,end:e.end,y:je(t)(e.value)}));/* @__PURE__ */
|
|
10
|
-
return I("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=K?qt[e]?.[r]:t.data[r];return Z(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__ */I("g",{opacity:h??void 0,className:"rosh-viz-mark",children:H.map((o,l)=>{const i=t.data[l];if(!Z(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,Z(a.data[e])?a.data[e]:0),0))(e,l),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
|
|
11
|
-
return I("rect",{x:ge.center(l)-a/2,y:c,width:a,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[l]?A[t.pointTones[l]]:n,fillOpacity:r?1:.55},l)})},t.key):/* @__PURE__ */I("g",{opacity:h??void 0,className:"rosh-viz-mark",children:H.map((l,c)=>{const d=K?qt[e]?.[c]:t.data[c];if(!Z(d))return null;const m=o(d);/* @__PURE__ */
|
|
12
|
-
return I("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=K&&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 F("g",{opacity:h??void 0,className:"rosh-viz-mark",children:[("area"===m||K)&&
|
|
14
|
-
/* @__PURE__ */I("path",{d:y,fill:c(Bt,e,t.fillVariant??bt,n),stroke:"none"}),
|
|
15
|
-
/* @__PURE__ */I("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??A[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
|
|
16
|
-
return F("g",{children:[
|
|
17
|
-
/* @__PURE__ */I("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */I("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=W(t.slot,t.color,t.tone),l=[...t.data].map(Z).lastIndexOf(!0),n="all"===r?H.map((t,e)=>e).filter(e=>Z(K?qt[a]?.[e]:t.data[e])):l>=0?[l]:[];/* @__PURE__ */
|
|
18
|
-
return F("g",{children:[n.map(r=>{const n=K?qt[a]?.[r]:t.data[r];return Z(n)?/* @__PURE__ */I(e,{cx:ge.center(r),cy:je(t)(n),color:o,variant:dt,pulse:mt&&r===l,title:`${H[r]}: ${t.label} ${Wt(n)}`},r):null}),st&&l>=0&&Z(K?qt[a]?.[l]:t.data[l])&&/* @__PURE__ */I("text",{x:ge.center(l)-10,y:je(t)(K?qt[a]?.[l]:t.data[l])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:Wt(K?qt[a]?.[l]:t.data[l])})]},`dots-${t.key}`)}),H.map((t,e)=>e%We===0?/* @__PURE__ */I("text",{x:ge.center(e),y:J-8,textAnchor:"middle",fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==St&&/* @__PURE__ */I("line",{x1:ge.center(St),y1:pe.top,x2:ge.center(St),y2:pe.bottom,stroke:z.axis,strokeWidth:1}),ae&&Me>0&&
|
|
19
|
-
/* @__PURE__ */F("g",{pointerEvents:"none","data-column-strip":"true",children:[
|
|
20
|
-
/* @__PURE__ */I("line",{x1:pe.left,y1:Ne(Me),x2:pe.right,y2:Ne(Me),stroke:z.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
|
|
21
|
-
/* @__PURE__ */I("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:Wt(Me)})]}),Ft.drag&&/* @__PURE__ */I(g,{x0:ge(Ft.drag[0]),x1:ge(Ft.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),H.map((t,e)=>/* @__PURE__ */I("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>Ct(e),onPointerDown:()=>Ft.press(e),onPointerEnter:()=>Ft.over(e),onPointerUp:Ft.release,onClick:yt?()=>yt(Jt(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),Ft.view&&/* @__PURE__ */I(y,{from:Gt?.[0]??H[0],to:Gt?.at(-1)??H[H.length-1],count:H.length,total:K&&"percent"!==X?zt(Kt.reduce((t,e)=>t+e,0)):ae?zt(be.reduce((t,e)=>t+e.data.filter(Z).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Ht).filter(t=>t.data.some(Z)).map(t=>{const e=t.data.filter(Z),a=W(t.slot,t.color,t.tone);if(0===e.length)return{key:t.key,label:t.label,color:a,value:"—"};const r=e.reduce((t,e)=>t+e,0),o=K||"column"===t.mode?zt(r):$t.zoomLevel(zt(r/e.length),zt(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:Ft.clear}),ht&&Pt.length>2&&/* @__PURE__ */I(t,{className:"mt-1",labels:Pt,width:Rt,data:G[0]?.data??[],range:Ot,onRangeChange:t=>{ft?ft(t):Tt(t)}}),null!==St&&
|
|
22
|
-
/* @__PURE__ */I("div",{className:"pointer-events-none absolute top-2 z-10",style:k(ge.center(St),ge.bandwidth,Rt),children:/* @__PURE__ */I(V,{title:Gt?.[St]??H[St],rows:Ht.map((t,e)=>({key:t.key,label:t.label,color:W(t.slot,t.color,t.tone),value:Z(t.data[St])?K&&"percent"===X?`${S(100*(Xt(t.data[St],St)??0),1,Vt)} · ${zt(t.data[St])}`:zt(t.data[St]):void 0})),footnote:K&&"percent"===X?$t.inBucket(zt(Kt[St])):void 0})})]})}export{G as TimeSeriesChart};
|
package/dist/chunk-C3SE57NF.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{DropdownMenu as e}from"./chunk-SE3S362N.js";import{Button_default as i}from"./chunk-EVYD6UFQ.js";import{Icon as n}from"./chunk-UIWGVOFH.js";import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{iconButtonClasses as a}from"./chunk-UQYNPYF4.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:g=!1,disabledReason:N,tooltip:w,menuDisabled:x=!1,menuDisabledReason:j,onMenuOpenChange:y,menuFooter:C,menuFooterLabel:W,align:F="end",side:z="bottom",menuMinWidth:I,linkAs:O,block:D=!1,className:L=""},R){const S=g&&(null!=N&&""!==N&&!1!==N)&&!v,U=x&&null!=j&&""!==j&&!1!==j,Y=o(),$=/* @__PURE__ */t(i,{ref:R,type:b,variant:f,size:p,loading:v,leftIcon:k,block:D,disabled:g&&!S,"aria-disabled":!!S||void 0,disabledReason:S?N:void 0,onClick:c,className:`rounded-r-none ${d}`,children:l}),A=D?"relative flex min-w-0 flex-1":"relative inline-flex",E=p.startsWith("touch")?"h-5 w-5":"h-4 w-4";/* @__PURE__ */
|
|
2
|
-
return s("div",{className:[D?"flex w-full":"inline-flex","items-stretch",L].filter(Boolean).join(" "),children:[null==w||""===w||S?$:/* @__PURE__ */t(r,{content:w,className:A,children:$}),
|
|
3
|
-
/* @__PURE__ */t(r,{content:U?j:u,describe:!1,className:"relative inline-flex shrink-0",children:/* @__PURE__ */t(e,{"aria-label":u,"aria-describedby":U?Y:void 0,items:h,align:F,side:z,minWidth:I,linkAs:O,disabled:x&&!U,"aria-disabled":U,onOpenChange:y,footer:C,footerLabel:W,triggerClassName:a({variant:f,size:p,className:`rounded-l-none ${m[f]} ${d}`}),trigger:/* @__PURE__ */t(n,{name:"chevron-down",className:E,strokeWidth:2,"aria-hidden":"true"})})}),U&&/* @__PURE__ */t("span",{id:Y,className:"sr-only",children:j})]})});export{c as SplitButton_default};
|
package/dist/chunk-GEZ45J4Z.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-4UGFNTZ3.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-43MCNASD.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,N=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 D=i(g??null);let L,w,H=!0;0===j.length?(w=D??M??0,L=w-30*a,H=null!==D||null!==M):(L=j[0].ms,w=D??j[j.length-1].ms,w-L<a&&(w=L+a));const O=j.length>0?Math.max(0,Math.round((w-L)/a)):0,T=u??(O>0?x.duration(O):void 0),J=[j.length>0?x.started(t(j[0].ms,N)):void 0,T,C.length>0?x.reached(j.length,p.length):void 0],K=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}),S={};for(const e of j)e.phase&&(S[e.phase]=S[e.phase]||[]).push(e.ms);const Z=Object.entries(S).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),A="rail"===v,F=H&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:A?"spread":"compressed",labels:A?"none":"lanes",items:K,pending:C,phases:Z,startMs:L,endMs:w,todayMs:M??void 0,edgeCaptions:f,highlightKeys:y,onHoverChange:b,ariaLabel:x.milestones(m)})});/* @__PURE__ */
|
|
2
|
-
return h("div",A?{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:J,children:F})})}export{m as MilestoneTimeline};
|
package/dist/chunk-HEAGOZKJ.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-H6PFTU3L.js";import{IconButton_default as a}from"./chunk-SV5RRBVA.js";import{Icon as o}from"./chunk-UIWGVOFH.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useShellStrings as s}from"./chunk-43MCNASD.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
|
|
2
|
-
return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:D,letterCase:M,clear:x,disabled:y=!1,"aria-label":A,windows:S,className:j="",layout:I="grid"}){const R=s().textToolbar,q=w({offered:n,color:k,last:N,alignment:C,list:D,letterCase:M,clear:x});if(!q.words&&!q.paragraph)return null;const B=m(n,k,x,q.cells.paragraph),L=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,T=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:L(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:L(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,U=l(R),$=e.map(e=>[e,U[e],r(e)]),H=C?e.filter(e=>C.allow.includes(e)):[],K=C&&H.includes(C.value)?C.value:H[0],O=[["none",R.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",R.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",R.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],V=x&&B?g(R.clear,/* @__PURE__ */i(a,{className:L(!1),"aria-label":R.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,F=/* @__PURE__ */t(d,{children:[T("bold",R.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),T("italic",R.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),T("underline",R.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),T("strike",R.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(R.color,/* @__PURE__ */i(a,{pressed:k.open,className:L(k.open,"rosh-tb-color"),"aria-label":R.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,T("link",R.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),T("sup",R.sup,/* @__PURE__ */i(o,{name:"superscript"})),T("sub",R.sub,/* @__PURE__ */i(o,{name:"subscript"})),T("code",R.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===B?V:null]}),W=/* @__PURE__ */t(d,{children:[C&&H.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":R.alignment,onKeyDown:e=>p(e,H,e=>C.onChange(e)),children:$.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:L(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===K?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,D&&n.has("bullet")?g(R.bullet,/* @__PURE__ */i(a,{className:L("bullet"===D.pressed),"aria-label":R.bullet,"aria-pressed":"bullet"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,D&&n.has("number")?g(R.number,/* @__PURE__ */i(a,{className:L("number"===D.pressed),"aria-label":R.number,"aria-pressed":"number"===D.pressed,disabled:y,onMouseDown:c,onClick:()=>D.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,T("quote",R.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":R.letterCase,onKeyDown:e=>p(e,O.map(([e])=>e),e=>M.onChange(e)),children:O.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:L(M.value===e),"aria-checked":M.value===e,"aria-label":l,tabIndex:e===(M.value||"none")?0:-1,disabled:y||M.disabled,onMouseDown:c,onClick:()=>M.onChange(M.value===e?"":e),children:r},e)))}):null,"paragraph"===B?V:null]}),E="row"===I,G=E?" is-row":q.flow?" is-flow":q.oneRow?" is-one-row":q.words&&void 0===N&&"words"!==B?" is-eight":"",P=b(n,Boolean(k)),Z={"--rosh-tb-color-col":String(P.color),"--rosh-tb-link-col":String(P.link),...E?{"--rosh-tb-cells":String(q.cells.words+q.cells.paragraph),"--rosh-tb-groupgap":q.words&&q.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let z;return z=E?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[q.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:F}):null,q.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:W}):null]}):q.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[F,
|
|
3
|
-
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),W]}):q.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:F}),
|
|
5
|
-
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:W})]}):/* @__PURE__ */t(d,{children:[q.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==B?" is-eight":""),children:F}):null,q.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:W}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${G} ${j}`.trim(),style:Z,children:[
|
|
6
|
-
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":A??R.formatting,children:z}),S]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
package/dist/chunk-IFIMUNID.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-43MCNASD.js";import{formatPlain as h,formatPercent as c}from"./chunk-C3QOHMR6.js";import{useState as u}from"react";import{jsx as s,jsxs as d}from"react/jsx-runtime";function m(e,t,r,l,a,n,i,o){if(l>=8)return;const h=e.reduce((e,t)=>e+p(t,8-l),0);if(h<=0)return;let c=t;e.forEach((e,t)=>{const u=p(e,8-l),s=u/h*r,d=`${i}/${e.key}`,f=0===l?t:a,b=0===l?e.key:n;o.push({id:d,label:e.label,value:u,depth:l,start:c,end:c+s,branch:f,branchKey:b}),e.children?.length&&m(e.children,c,s,l+1,f,b,d,o),c+=s})}function p(e,t){return t>0&&e.children?.length?e.children.reduce((e,r)=>e+p(r,t-1),0):Math.max(0,e.value??0)}function f({nodes:p,size:f=320,innerRadius:b=44,ringGap:v=2,formatValue:k,centerLabel:x,className:g,emptyLabel:M}){const y=i().charts,$=o(),j=k??(e=>h(e,$)),N=M??y.nothingToBreakDown,[C,w]=u(null),{highlighted:A}=r(),E=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",E),0===E.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const F=Math.max(...E.map(e=>e.depth))+1,I=f/2,L=f/2,z=(f/2-8-b)/F,B=E.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),D=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,H=e=>null!==C?e.id===C:null===A||e.branchKey===A,Q=C?E.find(e=>e.id===C):void 0,R=e=>c(e.value/B*100,1,$);/* @__PURE__ */
|
|
2
|
-
return d("div",{className:`relative ${g??""}`,children:[
|
|
3
|
-
/* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":y.sunburst(j(B),F),onMouseLeave:()=>w(null),children:[E.map(e=>/* @__PURE__ */s("path",{d:t(I,L,b+e.depth*z+v/2,b+(e.depth+1)*z-v/2,e.start,e.end),fill:D(e),fillOpacity:H(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>w(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:I,y:L+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),Q&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:Q.label,rows:[{key:"value",label:y.value,color:D(Q),value:j(Q.value)},{key:"share",label:y.share,color:a.muted,value:R(Q)}]})}),
|
|
4
|
-
/* @__PURE__ */s(e,{caption:y.sunburst(j(B),F),head:[y.tableLevel,y.tableItem,y.value,y.share],rows:E.map(e=>[e.depth+1,e.label,j(e.value),R(e)])})]})}export{f as SunburstChart};
|
package/dist/chunk-IHPAYSTJ.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{usePlotWidth as e}from"./chunk-MAFUXCPZ.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-43MCNASD.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:N,xDomain:$,yDomain:j,xScale:w="linear",yScale:R="linear",radiusRange:D=[4,22],className:S,emptyLabel:U}){const L=m().charts,W=h(),C=z??(e=>f(e,W)),P=N??(e=>f(e,W)),V=U??L.noObservations,E=u(null),F=e(E),I=v??F,O=p(),[Q,B]=d(null);x(()=>{if(null!==Q)return c(e=>"Escape"===e.key&&(B(null),!0))},[Q]);const T=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),X=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),Z=$||j?X.map(e=>({...e,points:e.points.filter(e=>T(e.x,$)&&T(e.y,j))})).filter(e=>e.points.length>0):X,H=X.reduce((e,t)=>e+t.points.length,0)-Z.reduce((e,t)=>e+t.points.length,0);if(0===Z.length)/* @__PURE__ */
|
|
2
|
-
return y("div",{className:S,ref:E,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:V})});const J=Z.flatMap(e=>e.points),K=J.some(e=>null!=e.size),Y=14,q=20,G=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(J.map(e=>e.y),j,R,{from:k-G,to:Y}),ie=t(te.ticks(5).map(P),_),le=Math.max(ie+1,I-q),re=ee(J.map(e=>e.x),$,w,{from:ie,to:le}),oe=i([0,Math.max(...J.map(e=>e.size??1))],{from:D[0],to:D[1]}),ne=Q?Z[Q.s]:void 0,ae=Q&&ne?ne.points[Q.i]:void 0,se=Z.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
-
return g("div",{className:`relative ${S??""}`,ref:E,children:[
|
|
4
|
-
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${I} ${k}`,role:"img","aria-label":L.scatter(Z.map(e=>e.label),A??L.yAxis,M??L.xAxis)+(H>0?`. ${L.outsideRange(H)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>B(null),onBlur:()=>B(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=Q?se.findIndex(e=>e.s===Q.s&&e.i===Q.i):0;B(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
-
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:O,children:/* @__PURE__ */y("rect",{x:ie-D[1],y:Y-D[1],width:le-ie+2*D[1],height:k-G-Y+2*D[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
|
|
6
|
-
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
-
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:P(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:C(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:a.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:A}),
|
|
8
|
-
/* @__PURE__ */y("g",{clipPath:`url(#${O})`,children:Z.map((e,t)=>{const i=s(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:K?oe(l.size??0):D[0]+1,fill:i,fillOpacity:Q&&Q.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>B({s:t,i:r})},`${e.key}-${r}`))})})]}),Q&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(n,{title:ae.label??ne.label,rows:[{key:"x",label:M??L.xAxis,color:s(ne.slot,3,ne.color,ne.tone),value:C(ae.x)},{key:"y",label:A??L.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:P(ae.y)},...null!=ae.size?[{key:"size",label:L.size,color:a.muted,value:f(ae.size,W)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
package/dist/chunk-KETGA66S.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{bumpPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as n}from"./chunk-CNYAHYE6.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as r,CHART_INK as a}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as s}from"./chunk-43MCNASD.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(),N=v??(e=>h(e,j)),$=w??b.noFlows,C=c(null),F=o(C),A=x??F,[E,z]=m(null),{highlighted:H}=n();if(0===f.length||0===k.length)/* @__PURE__ */
|
|
2
|
-
return d("div",{className:M,ref:C,children:/* @__PURE__ */d("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const O=[...new Set(f.map(e=>e.depth))].sort((e,t)=>e-t),Q=e=>O.length<=1?0:O.indexOf(e)/(O.length-1)*(A-g-140)+70,S=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+(S.get(t.key)??0),0))),W=p-20,Y=V>0?(W-y*(Math.max(...[...U.values()].map(e=>e.length))-1))/V:0,B=/* @__PURE__ */new Map;for(const[e,t]of U){const n=t.map(e=>Math.max(2,(S.get(e.key)??0)*Y)),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>W&&l>0?Math.max(0,1-(o-W)/l):1;let a=10;t.forEach((t,o)=>{const l=2+Math.max(0,n[o]-2)*r;B.set(t.key,{x:Q(e),y:a,h:l,index:o}),a+=l+y})}const D=/* @__PURE__ */new Map,L=/* @__PURE__ */new Map,P=/* @__PURE__ */new Map,R=(e,t)=>e.from===t||e.to===t,T="link"===E?.kind?k[E.index]:void 0,Z="node"===E?.kind?f.find(e=>e.key===E.key):void 0;/* @__PURE__ */
|
|
3
|
-
return u("div",{className:`relative ${M??""}`,ref:C,children:[
|
|
4
|
-
/* @__PURE__ */u("svg",{width:"100%",height:p,viewBox:`0 0 ${A} ${p}`,role:"img","aria-label":b.sankey(f.length,k.length),onMouseLeave:()=>z(null),children:[k.map((e,n)=>{const o=B.get(e.from),l=B.get(e.to);if(!o||!l)return null;const a=Math.max(1,e.value*Y),i=o.y+(D.get(e.from)??0)+a/2,s=l.y+(L.get(e.to)??0)+a/2;D.set(e.from,(D.get(e.from)??0)+a),L.set(e.to,(L.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=P.get(u)??0;P.set(u,f+1);const k=((e,t)=>E?"link"===E.kind?E.index===t:R(e,E.key):null!==H?R(e,H):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:()=>z({kind:"link",index:n})},f?`${u}#${f}`:u)}),f.map(e=>{const t=B.get(e.key);if(!t)return null;const n=t.x>A/2,o=(l=e.key,E?"node"===E.kind?E.key===l:R(k[E.index],l):null!==H?H===l:null);var l;/* @__PURE__ */
|
|
6
|
-
return u("g",{opacity:null===o||o?1:.45,onMouseEnter:()=>z({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)})]}),T&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:`${T.from} → ${T.to}`,rows:[{key:"value",label:b.flow,color:r(B.get(T.from)?.index??0,T.color),value:N(T.value)}]})}),Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:Z.label,rows:[{key:"value",label:b.throughput,color:r(B.get(Z.key)?.index??0,Z.color,Z.tone),value:N(S.get(Z.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,N(e.value)])})]})}export{f as SankeyChart};
|