efficient-shell 10.16.0 → 10.17.1
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/dist/{Browser-RI5X7GMK.js → Browser-4B76MFTG.js} +13 -13
- package/dist/Calculator-AXFKAC7G.js +29 -0
- package/dist/{CurrencyConverter-2GUEE7ZR.js → CurrencyConverter-36BFSFRS.js} +8 -8
- package/dist/{Documents-GI346UL5.js → Documents-VKAMBKSP.js} +15 -15
- package/dist/Files-NRYZG4KY.js +88 -0
- package/dist/{Notepad-HRZKLHO3.js → Notepad-AQXGH6VP.js} +10 -10
- package/dist/{PdfViewer-LU5JKHSG.js → PdfViewer-Y3SAVADX.js} +1 -1
- package/dist/{PomodoroTimer-QYCTTTPZ.js → PomodoroTimer-RHDLKJBY.js} +63 -63
- package/dist/{Preview-LSGN5GN7.js → Preview-DEBTZQP5.js} +47 -47
- package/dist/Sidebar-CB6KRPW2.js +44 -0
- package/dist/{Spreadsheet-7JBZY6KJ.js → Spreadsheet-FSHLWXYP.js} +13 -13
- package/dist/{Stock-ZVQT25IE.js → Stock-CV53A432.js} +3 -3
- package/dist/{Weather-RAUDLLVU.js → Weather-R4MCLH7F.js} +19 -19
- package/dist/{WorldClock-2XBWZ6SZ.js → WorldClock-CSFPCZHU.js} +6 -6
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +81 -80
- package/dist/ai.css +1 -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/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChartTooltip.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/StatTile.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/chunk-26RTJKHD.js +2 -0
- package/dist/{chunk-F2R3UFNQ.js → chunk-2E2SUEEE.js} +1 -1
- package/dist/chunk-2EVTN26H.js +2 -0
- package/dist/{chunk-M22B3Y5Y.js → chunk-3IUPYCW3.js} +1 -1
- package/dist/{chunk-N3TOHWFF.js → chunk-3J2PO3KW.js} +1 -1
- package/dist/{chunk-X6BFVDB4.js → chunk-3PR7FLTZ.js} +2 -2
- package/dist/{chunk-PCFBDXLN.js → chunk-3TKMH5VR.js} +1 -1
- package/dist/{chunk-4WEFGKJL.js → chunk-3VLG6LR3.js} +4 -4
- package/dist/{chunk-CBEKJTXU.js → chunk-4D66DUU5.js} +5 -5
- package/dist/{chunk-XDBG4HPV.js → chunk-4EZIWLJJ.js} +1 -1
- package/dist/{chunk-FWVC4A2O.js → chunk-4MJA2SPJ.js} +13 -13
- package/dist/chunk-4Q25UHWB.js +22 -0
- package/dist/{chunk-EZEYKCI6.js → chunk-4ULRP4Y4.js} +1 -1
- package/dist/chunk-4V73LGZG.js +11 -0
- package/dist/{chunk-S6FBMSFU.js → chunk-5IPFQV34.js} +2 -2
- package/dist/{chunk-3ELLBQPS.js → chunk-5LCDCO46.js} +1 -1
- package/dist/{chunk-GISDIVFK.js → chunk-5N5AAYQV.js} +1 -1
- package/dist/{chunk-7HTRLRVO.js → chunk-5VAIVRK6.js} +62 -62
- package/dist/{chunk-RLJHRDDW.js → chunk-5W2OEDUD.js} +8 -8
- package/dist/chunk-6ACS4S4P.js +15 -0
- package/dist/{chunk-ULXCDM7Y.js → chunk-6V4INP7J.js} +10 -10
- package/dist/{chunk-LCJRTJXT.js → chunk-7AZAMDGG.js} +9 -9
- package/dist/{chunk-AKM6JBMD.js → chunk-7ELJQL7J.js} +1 -1
- package/dist/chunk-7RPYVQEV.js +2 -0
- package/dist/{chunk-UPQW4GCT.js → chunk-7TZV6G2F.js} +1 -1
- package/dist/{chunk-VTFZ6W2D.js → chunk-7X4QNWA7.js} +2 -2
- package/dist/{chunk-D7F442OZ.js → chunk-AEJYSUVQ.js} +1 -1
- package/dist/{chunk-QYSEYYV7.js → chunk-AFINCNY3.js} +1 -1
- package/dist/{chunk-DKGZPVLL.js → chunk-AFYLVV74.js} +1 -1
- package/dist/{chunk-H4HB5OET.js → chunk-AWKJZSTO.js} +1 -1
- package/dist/chunk-B3CN55UI.js +2 -0
- package/dist/{chunk-CQV3VSI2.js → chunk-B4HSNEBK.js} +1 -1
- package/dist/{chunk-57HN6MPC.js → chunk-BE777IO7.js} +2 -2
- package/dist/{chunk-K4ANB6AF.js → chunk-BVIOCAEU.js} +1 -1
- package/dist/{chunk-4UKGVLFP.js → chunk-BZUA5F33.js} +1 -1
- package/dist/{chunk-QP4UPCXQ.js → chunk-C764JODK.js} +1 -1
- package/dist/chunk-CCIGAU5Y.js +6 -0
- package/dist/{chunk-CKKUFDZ3.js → chunk-CF7BMDU3.js} +18 -18
- package/dist/{chunk-LEDUD23S.js → chunk-CLTRQ7AQ.js} +1 -1
- package/dist/{chunk-7TNAOZZ2.js → chunk-CNUHLJYD.js} +1 -1
- package/dist/chunk-CUKDQPEN.js +19 -0
- package/dist/{chunk-ISJPW2FZ.js → chunk-D6OYQM4V.js} +11 -11
- package/dist/{chunk-W6URVLQF.js → chunk-DOC52JBV.js} +17 -17
- package/dist/{chunk-IOJNSX4N.js → chunk-DQQKG46I.js} +7 -7
- package/dist/{chunk-INNIWRVU.js → chunk-E6GDAV5R.js} +2 -2
- package/dist/{chunk-TM33D3CE.js → chunk-EC527NE3.js} +1 -1
- package/dist/{chunk-RCPFUDPS.js → chunk-EDMDKQNO.js} +3 -3
- package/dist/{chunk-3EJ64VKE.js → chunk-EN5NXWT6.js} +1 -1
- package/dist/{chunk-MTEFYFUO.js → chunk-ENDCV7B3.js} +9 -9
- package/dist/{chunk-MCDM2G4W.js → chunk-EOWUUOVE.js} +1 -1
- package/dist/{chunk-4G2C6J4I.js → chunk-EQCFPRKJ.js} +1 -1
- package/dist/{chunk-TXDA7TTP.js → chunk-EQZZ4V5X.js} +1 -1
- package/dist/{chunk-WINNA7LS.js → chunk-EZUQ5NXE.js} +1 -1
- package/dist/chunk-F7Z47OIF.js +12 -0
- package/dist/{chunk-2SY76NFO.js → chunk-FEATDGFD.js} +4 -4
- package/dist/chunk-FX6DBXXD.js +1 -0
- package/dist/{chunk-7JGR7WPD.js → chunk-G4JTO5PB.js} +1 -1
- package/dist/{chunk-SG4LO2AN.js → chunk-G4PGEQOX.js} +10 -10
- package/dist/{chunk-W3OWPBQL.js → chunk-GD7ILVPF.js} +2 -2
- package/dist/chunk-GDQJBQ5B.js +1 -0
- package/dist/chunk-GLBLKHYA.js +5 -0
- package/dist/{chunk-WB4P4QE2.js → chunk-H7BKSATJ.js} +1 -1
- package/dist/{chunk-L4IW77TD.js → chunk-HJ2BDUO6.js} +4 -4
- package/dist/chunk-HJCUDXLV.js +1 -0
- package/dist/{chunk-SDQIXE5M.js → chunk-HLQVB7FG.js} +8 -8
- package/dist/chunk-HLVOHOBC.js +6 -0
- package/dist/{chunk-QHOBK35Y.js → chunk-HS2E7DVI.js} +1 -1
- package/dist/chunk-HXNMRJQ4.js +2 -0
- package/dist/chunk-HXZ5XPBS.js +3 -0
- package/dist/{chunk-3LDXURVU.js → chunk-HYDVHGVT.js} +2 -2
- package/dist/chunk-IDV32UV7.js +29 -0
- package/dist/chunk-IHFZ7OXO.js +14 -0
- package/dist/{chunk-MNSKGMVZ.js → chunk-ILP7QVW5.js} +8 -8
- package/dist/{chunk-KJ4CBZEQ.js → chunk-IMDGMUE3.js} +1 -1
- package/dist/{chunk-JGTGQGHY.js → chunk-IX7QXMNJ.js} +1 -1
- package/dist/chunk-JFH5HW2G.js +12 -0
- package/dist/{chunk-HNBGLF4B.js → chunk-JFV5CQN4.js} +1 -1
- package/dist/{chunk-7MSC3Z5H.js → chunk-JH4ZCPHW.js} +8 -8
- package/dist/{chunk-OOLPDASG.js → chunk-JSG2AKCG.js} +1 -1
- package/dist/{chunk-6RX4PVBU.js → chunk-JTMEFXRL.js} +1 -1
- package/dist/{chunk-YOSUCCHG.js → chunk-K7L3ZCPB.js} +3 -3
- package/dist/chunk-KLBJ646Z.js +8 -0
- package/dist/{chunk-7NBSBGLX.js → chunk-L2RS2UQM.js} +8 -8
- package/dist/{chunk-PYAJCN2Q.js → chunk-LAMRQE2P.js} +1 -1
- package/dist/{chunk-ULAGXDOL.js → chunk-LXL2UCUR.js} +1 -1
- package/dist/{chunk-O6JJIR4H.js → chunk-M5LR7ZZX.js} +1 -1
- package/dist/{chunk-UWIZX3RK.js → chunk-MAFSELZK.js} +1 -1
- package/dist/{chunk-N67QX3WW.js → chunk-MMQ6ETRD.js} +2 -2
- package/dist/{chunk-XTCXX5LJ.js → chunk-MS5APD3V.js} +1 -1
- package/dist/chunk-MUXGWDEH.js +2 -0
- package/dist/{chunk-GPJO34QP.js → chunk-N4ZEB4UD.js} +9 -9
- package/dist/{chunk-E3753CWP.js → chunk-NRI26RYC.js} +2 -2
- package/dist/{chunk-7HLC352T.js → chunk-NVFYLTJ6.js} +17 -17
- package/dist/chunk-NXVFY22L.js +9 -0
- package/dist/{chunk-QDQ347RL.js → chunk-NYEMGKAE.js} +1 -1
- package/dist/{chunk-5UYZ75F3.js → chunk-NZGNOMWX.js} +12 -12
- package/dist/{chunk-3NW5LD7D.js → chunk-NZQCDFDG.js} +3 -3
- package/dist/{chunk-BJXDOM2N.js → chunk-OBJGUJIE.js} +1 -1
- package/dist/{chunk-AUWTGM65.js → chunk-OH5L6HYW.js} +3 -3
- package/dist/{chunk-ZURB2DCM.js → chunk-OPN4I565.js} +1 -1
- package/dist/{chunk-7SMV6G4Z.js → chunk-ORIXCEKO.js} +1 -1
- package/dist/{chunk-FEQDZTZ7.js → chunk-OUIE2N2Z.js} +6 -6
- package/dist/{chunk-TOVKWNI2.js → chunk-P3RXXWXN.js} +6 -6
- package/dist/{chunk-ON67HF5K.js → chunk-PCTOL2FX.js} +8 -8
- package/dist/{chunk-6XBWM453.js → chunk-Q3IR5SKD.js} +1 -1
- package/dist/{chunk-7ZP64SC7.js → chunk-Q5QS5MFX.js} +1 -1
- package/dist/{chunk-4QJOEHM6.js → chunk-QEB2UTHO.js} +7 -7
- package/dist/{chunk-I2XGPTCN.js → chunk-QJLBBDX2.js} +1 -1
- package/dist/{chunk-AJO72CPB.js → chunk-QLVJ5W4G.js} +2 -2
- package/dist/chunk-QO5E33DH.js +8 -0
- package/dist/{chunk-LPXMHYTM.js → chunk-QVZKRROQ.js} +1 -1
- package/dist/{chunk-EXJXOKUU.js → chunk-QYL26AB4.js} +1 -1
- package/dist/chunk-RAAH4TQU.js +1 -0
- package/dist/{chunk-JJW43QPS.js → chunk-RBEI4CKX.js} +5 -5
- package/dist/{chunk-TVH7IZQ4.js → chunk-REWKL7MX.js} +2 -2
- package/dist/{chunk-MVZRZTQP.js → chunk-S5SRXI4V.js} +1 -1
- package/dist/{chunk-QYRMFGES.js → chunk-SAP4YI2Y.js} +1 -1
- package/dist/{chunk-KTA77U3P.js → chunk-SDATPJM2.js} +4 -4
- package/dist/{chunk-KEPJWZJZ.js → chunk-SL77N7VT.js} +3 -3
- package/dist/{chunk-UDRMZ22J.js → chunk-SOBGCIPF.js} +1 -1
- package/dist/{chunk-H32EQG5Z.js → chunk-SOJEQHZ2.js} +9 -9
- package/dist/{chunk-34URULVW.js → chunk-SQCUN2DX.js} +1 -1
- package/dist/chunk-SRWZE3WA.js +6 -0
- package/dist/{chunk-5RE6R3XC.js → chunk-SXNQHIBY.js} +1 -1
- package/dist/{chunk-GGK27H67.js → chunk-TGGUYAWA.js} +1 -1
- package/dist/chunk-TGXO3CDO.js +2 -0
- package/dist/{chunk-74OUAR6L.js → chunk-TIGTIT3L.js} +6 -6
- package/dist/{chunk-UYRITNQW.js → chunk-TLWGOQI3.js} +3 -3
- package/dist/{chunk-MQU3PZUS.js → chunk-TMMNCXQT.js} +1 -1
- package/dist/chunk-TNDRHHKN.js +14 -0
- package/dist/{chunk-SHKBDFSE.js → chunk-TXDBOSSB.js} +1 -1
- package/dist/{chunk-DRDYZ633.js → chunk-U32J7D4Q.js} +2 -2
- package/dist/{chunk-LDE5IV2M.js → chunk-UABVKJK7.js} +4 -4
- package/dist/{chunk-UTWJKSET.js → chunk-UEISJFZH.js} +5 -5
- package/dist/{chunk-B7UCXROE.js → chunk-UG6RI525.js} +1 -1
- package/dist/chunk-UXPBVRSE.js +7 -0
- package/dist/{chunk-W5CJD54C.js → chunk-VAK5FQXH.js} +1 -1
- package/dist/{chunk-O7DW2BKY.js → chunk-VHF3CJVO.js} +28 -28
- package/dist/{chunk-7X5FABQS.js → chunk-VHPT7ZS5.js} +5 -5
- package/dist/{chunk-MHB52H2Y.js → chunk-WON5GBJY.js} +12 -12
- package/dist/{chunk-D4I3U7UE.js → chunk-WS7XIJS6.js} +1 -1
- package/dist/{chunk-AOK3BHRT.js → chunk-WWLKVGV7.js} +4 -4
- package/dist/{chunk-G4GVLK44.js → chunk-WZ5QSSUM.js} +6 -6
- package/dist/{chunk-LO5T2K4B.js → chunk-X2KMUHBB.js} +3 -3
- package/dist/{chunk-CPZ42W2B.js → chunk-XCAO2F3H.js} +1 -1
- package/dist/chunk-XGJQVIEG.js +2 -0
- package/dist/{chunk-PVZGSCCB.js → chunk-XKJ7GEVA.js} +5 -5
- package/dist/chunk-XPTOKPUM.js +11 -0
- package/dist/{chunk-XZGGJHJC.js → chunk-XQMPLXGG.js} +15 -15
- package/dist/{chunk-VKKK4WLS.js → chunk-XQZL6JDD.js} +6 -6
- package/dist/{chunk-JEH5EVIG.js → chunk-XSJHN2GD.js} +1 -1
- package/dist/{chunk-2VGQS6CW.js → chunk-XTV3CAV7.js} +1 -1
- package/dist/{chunk-3AH524CN.js → chunk-XYECIBVX.js} +1 -1
- package/dist/{chunk-6C6TRDNI.js → chunk-YG2TWBDH.js} +1 -1
- package/dist/chunk-YG6Y5X7S.js +7 -0
- package/dist/chunk-YJ5IHIAI.js +2 -0
- package/dist/{chunk-NBVHJZVS.js → chunk-YQFGRYEF.js} +12 -12
- package/dist/chunk-YUECA3XB.js +8 -0
- package/dist/chunk-YYZ73H64.js +7 -0
- package/dist/{chunk-7UTPXU6K.js → chunk-ZF2MNQXY.js} +1 -1
- package/dist/{chunk-ZW3IDCP2.js → chunk-ZGOHRLXG.js} +1 -1
- package/dist/{chunk-6AS5PHHK.js → chunk-ZI3DGOW6.js} +17 -17
- package/dist/{chunk-TKJBZIHT.js → chunk-ZMRGHVKS.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/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/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.d.ts +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.d.ts +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.d.ts +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.d.ts +2 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +4 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +2 -0
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +2 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/SeparatorSlashIcon.d.ts +8 -0
- package/dist/icons/glyphs/SeparatorSlashIcon.js +1 -0
- package/dist/icons/glyphs/SeparatorTriangleIcon.d.ts +8 -0
- package/dist/icons/glyphs/SeparatorTriangleIcon.js +1 -0
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/SeparatorSlashMiniIcon.d.ts +8 -0
- package/dist/icons/looks/SeparatorSlashMiniIcon.js +1 -0
- package/dist/icons/looks/SeparatorSlashSolidIcon.d.ts +8 -0
- package/dist/icons/looks/SeparatorSlashSolidIcon.js +1 -0
- package/dist/icons/looks/SeparatorTriangleMiniIcon.d.ts +8 -0
- package/dist/icons/looks/SeparatorTriangleMiniIcon.js +1 -0
- package/dist/icons/looks/SeparatorTriangleSolidIcon.d.ts +8 -0
- package/dist/icons/looks/SeparatorTriangleSolidIcon.js +1 -0
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +256 -256
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +8 -8
- package/dist/{names-Bmx_9y41.d.ts → names-CkQuQ47O.d.ts} +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/FloatingBar.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.d.ts +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/Popover.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +6 -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.d.ts +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-Y566OMJZ.js +0 -29
- package/dist/Files-UA23KXN7.js +0 -88
- package/dist/Sidebar-2P26444H.js +0 -44
- package/dist/chunk-2JG5JU4M.js +0 -8
- package/dist/chunk-4PAWQEXM.js +0 -1
- package/dist/chunk-7XYTJPWW.js +0 -29
- package/dist/chunk-BNJWZAQE.js +0 -12
- package/dist/chunk-COJYPNKF.js +0 -2
- package/dist/chunk-DESWIPOZ.js +0 -3
- package/dist/chunk-DWR7MYQU.js +0 -7
- package/dist/chunk-EU3JZGV2.js +0 -14
- package/dist/chunk-I4VIEGCX.js +0 -2
- package/dist/chunk-IKNG7EFQ.js +0 -12
- package/dist/chunk-JSGQWVYH.js +0 -7
- package/dist/chunk-KTVXPGGB.js +0 -11
- package/dist/chunk-LU6NA4RU.js +0 -5
- package/dist/chunk-M4K6FLIY.js +0 -1
- package/dist/chunk-PJQGYKN6.js +0 -11
- package/dist/chunk-PN5FQVMB.js +0 -7
- package/dist/chunk-PN65IIYN.js +0 -8
- package/dist/chunk-PUF75SMJ.js +0 -1
- package/dist/chunk-Q6YNMNUH.js +0 -6
- package/dist/chunk-RPYFOQM2.js +0 -6
- package/dist/chunk-RRUHQLUY.js +0 -14
- package/dist/chunk-TMNAHOJ7.js +0 -9
- package/dist/chunk-UBMY23AG.js +0 -6
- package/dist/chunk-VNACNNCJ.js +0 -19
- package/dist/chunk-W35N7SL3.js +0 -8
- package/dist/chunk-W4OBVKN4.js +0 -1
- package/dist/chunk-WMEYNKXZ.js +0 -22
- package/dist/chunk-Y3R267FV.js +0 -15
- package/dist/chunk-ZZVE64OI.js +0 -2
- /package/dist/{chunk-6V6ANLHW.js → chunk-Y2AGVGOP.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{DAY_MS as e,fmtSliderDate as t}from"./chunk-7TC3LJQM.js";import{calendarNames as n}from"./chunk-Y3JW2GW5.js";import{stagger as r}from"./chunk-465RRWBY.js";import{popupBounds as l}from"./chunk-GLUJS42B.js";import{
|
|
1
|
+
import{DAY_MS as e,fmtSliderDate as t}from"./chunk-7TC3LJQM.js";import{calendarNames as n}from"./chunk-Y3JW2GW5.js";import{stagger as r}from"./chunk-465RRWBY.js";import{popupBounds as l}from"./chunk-GLUJS42B.js";import{registerModalEscapeInterceptor as a}from"./chunk-TWVUQUUD.js";import{useBrowserValueOnce as s,useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as c}from"./chunk-GDQJBQ5B.js";import{useRef as u,useState as d,useId as m,useEffect as h,useCallback as p}from"react";import{jsx as x,jsxs as f,Fragment as y}from"react/jsx-runtime";var k={receipt:/* @__PURE__ */f(y,{children:[
|
|
2
2
|
/* @__PURE__ */x("path",{d:"M3.4 1.9h5.2v7.2l-1.3-.9-1.3.9-1.3-.9-1.3.9z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),
|
|
3
3
|
/* @__PURE__ */x("path",{d:"M4.9 4.4h2.2M4.9 6.1h2.2",stroke:"currentColor",strokeWidth:"1.1",strokeLinecap:"round"})]}),check:/* @__PURE__ */x("path",{d:"M2.6 6.3 4.9 8.6 9.4 3.6",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round"}),doc:/* @__PURE__ */f(y,{children:[
|
|
4
4
|
/* @__PURE__ */x("path",{d:"M3.5 1.9h3.4l2 2v6.2H3.5z",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),
|
|
@@ -13,7 +13,7 @@ return x("svg",{viewBox:"0 0 12 12","aria-hidden":"true",children:k[e]})}functio
|
|
|
13
13
|
return f("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",children:[
|
|
14
14
|
/* @__PURE__ */x("path",{d:"M4.2 2.2v11.6"}),
|
|
15
15
|
/* @__PURE__ */x("path",{d:"M4.2 3.1h7.4l-1.6 2.5 1.6 2.6H4.2z"})]})}function v(){/* @__PURE__ */
|
|
16
|
-
return x("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",children:/* @__PURE__ */x("path",{d:"M2.8 11.6V8.2M6.6 11.6V5.4M10.4 11.6V7M14.2 11.6V3.6"})})}var b=1e-6;function $(e,t,n={}){const r=Number.isFinite(t)&&t>0?t:0,l=Array.from(new Set(e.filter(e=>Number.isFinite(e)))).sort((e,t)=>e-t);if(r<=0||l.length<2){const e=l[0]??0;return{anchorsMs:l,xs:l.map(()=>0),gaps:[],xByMs:()=>0,msByPx:()=>e,inCut:()=>!1}}const a=l[l.length-1]-l[0],s=n.maxTimeShare??.3,i=Math.min(n.breakPx??48,r),o=n.minGapPx??48,c=[],u=[],d=[];for(let e=0;e+1<l.length;e++){const t=l[e+1]-l[e];c.push(t),u.push(a>0?t/a*r:0),d.push(a>0&&t/a>s)}const m=d.filter(Boolean).length,h=Math.max(0,r-m*i);let p=0,x=0;for(let e=0;e<c.length;e++)d[e]||(p+=c[e],x+=1);const f=c.map((e,t)=>d[t]?i:0===x?0:p>0?h*e/p:h/x),y=function(e,t,n){const r=e.slice();let l=0;for(let e=0;e<r.length;e++)t[e]||r[e]>=n-b||(l+=n-r[e],r[e]=n);if(l<=b)return r;let a=0;for(let e=0;e<r.length;e++)!t[e]&&r[e]>n+b&&(a+=r[e]-n);if(a<=b)return r;const s=Math.min(l,a);for(let e=0;e<r.length;e++)t[e]||r[e]<=n+b||(r[e]-=s*(r[e]-n)/a);return r}(f,d,o),k=y.reduce((e,t,n)=>d[n]?e:e+t,0),g=y.map((e,t)=>d[t]?e:k>0?e*h/k:e),M=[0];for(let e=0;e<g.length;e++)M.push(M[e]+g[e]);M[M.length-1]=r;const v=M.slice(0,-1).map((e,t)=>({fromMs:l[t],toMs:l[t+1],gapMs:c[t],fromPx:e,toPx:M[t+1],wantPx:u[t],clampedPx:f[t],px:M[t+1]-e,compressed:d[t]}));return{anchorsMs:l,xs:M,gaps:v,xByMs:e=>{if(!Number.isFinite(e)||e<=l[0])return 0;if(e>=l[l.length-1])return r;for(let t=0;t+1<l.length;t++){if(e>l[t+1])continue;const n=l[t+1]-l[t],r=n>0?(e-l[t])/n:0;return M[t]+r*(M[t+1]-M[t])}return r},msByPx:e=>{const t=Math.min(Math.max(Number.isFinite(e)?e:0,0),r);for(let e=0;e+1<l.length;e++){if(t>M[e+1]&&e+2<l.length)continue;const n=M[e+1]-M[e],r=n>0?(t-M[e])/n:0;return l[e]+r*(l[e+1]-l[e])}return l[l.length-1]},inCut:e=>v.some(t=>t.compressed&&e>t.fromMs&&e<t.toMs)}}function w(e,t,n){return Math.max(0,Math.min(e-t/2,Math.max(0,n-t)))}var P="mixed";function N(e,t){return 5.6*Math.max(e.length,t.length)+8}var C=(e,t,n)=>Math.min(Math.max(e,t),n),T=e=>-(Math.cos(Math.PI*e)-1)/2;function B(e,t){if(!(t>0))return{px:e.fromPx,ms:e.fromMs};if(t>=1||e.durationMs<=0)return{px:e.toPx,ms:e.toMs};const n=e.fromPx+(e.toPx-e.fromPx)*T(t);return{px:n,ms:e.msByPx(n)}}var L={lanes:{tag:0,laneA:17,laneH:30,rail:52,ruler:64,laneB:86,height:120},active:{tag:0,laneA:17,laneH:30,rail:38,ruler:50,laneB:74,height:108},none:{tag:0,laneA:16,laneH:14,rail:34,ruler:46,laneB:46,height:72}};function D(){try{return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}var K=e=>5.6*e.length,A={default:{},dfm:{glyph:"doc",token:"var(--tl-dfm)"},shipment:{diamond:!0,glyph:"truck",token:"var(--tl-shipment)"},testing:{glyph:"flask",token:"var(--tl-testing)"},completion:{glyph:"check",token:"var(--tl-completion)"},inspection:{glyph:"flask",token:"var(--tl-inspection)"},invoice:{glyph:"receipt",token:"var(--tl-invoice)"},report:{}},F={doc:"dfm",flask:"testing",check:"completion",truck:"shipment",receipt:"invoice"};function j(e,t,n){if("none"!==e.glyph)return e.glyph?e.glyph:A[t].glyph??(n?"flag":void 0)}function R(e,t,n=!1){const r=A[e],l=["rosh-tl-node","rosh-tl-mark",`is-${t}`];r.diamond&&l.push("is-diamond"),n&&l.push("is-provisional");const a="current"===t?"var(--tl-accent)":r.token??"var(--tl-accent)",s="dot"===t||n?{borderColor:a,color:a}:{backgroundColor:a,color:"var(--tl-on-kind)"};return{className:l.join(" "),style:s}}function U(e){const t=(e=>"string"==typeof e?e:"")(e.detail);return`${e.label} · ${e.dateText}${t?` · ${t}`:""}`}function H(e,t){const[n,r]=d(0);return
|
|
16
|
+
return x("svg",{viewBox:"0 0 16 16","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",children:/* @__PURE__ */x("path",{d:"M2.8 11.6V8.2M6.6 11.6V5.4M10.4 11.6V7M14.2 11.6V3.6"})})}var b=1e-6;function $(e,t,n={}){const r=Number.isFinite(t)&&t>0?t:0,l=Array.from(new Set(e.filter(e=>Number.isFinite(e)))).sort((e,t)=>e-t);if(r<=0||l.length<2){const e=l[0]??0;return{anchorsMs:l,xs:l.map(()=>0),gaps:[],xByMs:()=>0,msByPx:()=>e,inCut:()=>!1}}const a=l[l.length-1]-l[0],s=n.maxTimeShare??.3,i=Math.min(n.breakPx??48,r),o=n.minGapPx??48,c=[],u=[],d=[];for(let e=0;e+1<l.length;e++){const t=l[e+1]-l[e];c.push(t),u.push(a>0?t/a*r:0),d.push(a>0&&t/a>s)}const m=d.filter(Boolean).length,h=Math.max(0,r-m*i);let p=0,x=0;for(let e=0;e<c.length;e++)d[e]||(p+=c[e],x+=1);const f=c.map((e,t)=>d[t]?i:0===x?0:p>0?h*e/p:h/x),y=function(e,t,n){const r=e.slice();let l=0;for(let e=0;e<r.length;e++)t[e]||r[e]>=n-b||(l+=n-r[e],r[e]=n);if(l<=b)return r;let a=0;for(let e=0;e<r.length;e++)!t[e]&&r[e]>n+b&&(a+=r[e]-n);if(a<=b)return r;const s=Math.min(l,a);for(let e=0;e<r.length;e++)t[e]||r[e]<=n+b||(r[e]-=s*(r[e]-n)/a);return r}(f,d,o),k=y.reduce((e,t,n)=>d[n]?e:e+t,0),g=y.map((e,t)=>d[t]?e:k>0?e*h/k:e),M=[0];for(let e=0;e<g.length;e++)M.push(M[e]+g[e]);M[M.length-1]=r;const v=M.slice(0,-1).map((e,t)=>({fromMs:l[t],toMs:l[t+1],gapMs:c[t],fromPx:e,toPx:M[t+1],wantPx:u[t],clampedPx:f[t],px:M[t+1]-e,compressed:d[t]}));return{anchorsMs:l,xs:M,gaps:v,xByMs:e=>{if(!Number.isFinite(e)||e<=l[0])return 0;if(e>=l[l.length-1])return r;for(let t=0;t+1<l.length;t++){if(e>l[t+1])continue;const n=l[t+1]-l[t],r=n>0?(e-l[t])/n:0;return M[t]+r*(M[t+1]-M[t])}return r},msByPx:e=>{const t=Math.min(Math.max(Number.isFinite(e)?e:0,0),r);for(let e=0;e+1<l.length;e++){if(t>M[e+1]&&e+2<l.length)continue;const n=M[e+1]-M[e],r=n>0?(t-M[e])/n:0;return l[e]+r*(l[e+1]-l[e])}return l[l.length-1]},inCut:e=>v.some(t=>t.compressed&&e>t.fromMs&&e<t.toMs)}}function w(e,t,n){return Math.max(0,Math.min(e-t/2,Math.max(0,n-t)))}var P="mixed";function N(e,t){return 5.6*Math.max(e.length,t.length)+8}var C=(e,t,n)=>Math.min(Math.max(e,t),n),T=e=>-(Math.cos(Math.PI*e)-1)/2;function B(e,t){if(!(t>0))return{px:e.fromPx,ms:e.fromMs};if(t>=1||e.durationMs<=0)return{px:e.toPx,ms:e.toMs};const n=e.fromPx+(e.toPx-e.fromPx)*T(t);return{px:n,ms:e.msByPx(n)}}var L={lanes:{tag:0,laneA:17,laneH:30,rail:52,ruler:64,laneB:86,height:120},active:{tag:0,laneA:17,laneH:30,rail:38,ruler:50,laneB:74,height:108},none:{tag:0,laneA:16,laneH:14,rail:34,ruler:46,laneB:46,height:72}};function D(){try{return"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}var K=e=>5.6*e.length,A={default:{},dfm:{glyph:"doc",token:"var(--tl-dfm)"},shipment:{diamond:!0,glyph:"truck",token:"var(--tl-shipment)"},testing:{glyph:"flask",token:"var(--tl-testing)"},completion:{glyph:"check",token:"var(--tl-completion)"},inspection:{glyph:"flask",token:"var(--tl-inspection)"},invoice:{glyph:"receipt",token:"var(--tl-invoice)"},report:{}},F={doc:"dfm",flask:"testing",check:"completion",truck:"shipment",receipt:"invoice"};function j(e,t,n){if("none"!==e.glyph)return e.glyph?e.glyph:A[t].glyph??(n?"flag":void 0)}function R(e,t,n=!1){const r=A[e],l=["rosh-tl-node","rosh-tl-mark",`is-${t}`];r.diamond&&l.push("is-diamond"),n&&l.push("is-provisional");const a="current"===t?"var(--tl-accent)":r.token??"var(--tl-accent)",s="dot"===t||n?{borderColor:a,color:a}:{backgroundColor:a,color:"var(--tl-on-kind)"};return{className:l.join(" "),style:s}}function U(e){const t=(e=>"string"==typeof e?e:"")(e.detail);return`${e.label} · ${e.dateText}${t?` · ${t}`:""}`}function H(e,t){const[n,r]=d(0);return i(()=>{const n=t?e.current:null;if(!n)return;const l=()=>{const e=n.getBoundingClientRect().width;e>0&&r(e)};if(l(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(l);return a.observe(n),()=>{a.disconnect()}},[e,t]),n}function O(e,t,n){const r=/* @__PURE__ */new Map;for(const e of t)Number.isFinite(e.x)&&r.set(e.x,Math.max(r.get(e.x)??0,e.widthPx));const l=[...r.keys()].sort((e,t)=>e-t);if(n<=0||l.length<2)return e;const a=Math.max(0,l[0]),s=Math.min(n,l[l.length-1]),i=s-a,o=[];for(let e=0;e+1<l.length;e++){const t=(r.get(l[e])??0)/2+(r.get(l[e+1])??0)/2+8;o.push(Math.max(28,t,l[e+1]-l[e]))}const c=o.reduce((e,t)=>e+t,0),u=Math.min(Math.max(c,i),.8*n);if(u<=i+.5)return e;const d=a,m=n-s,h=d+m,p=Math.max(0,n-u),x=h>0?p*d/h:0,f=x,y=x+u,k=o.map(e=>c>0?e*u/c:0),g=e=>{if(e<=a)return d>0?e*x/d:f;if(e>=s)return m>0?y+(e-s)*(n-y)/m:y;let t=f;for(let n=0;n+1<l.length;n++){if(e>l[n+1]){t+=k[n];continue}const r=l[n+1]-l[n];return t+(r>0?(e-l[n])/r*k[n]:0)}return y};return{anchorsMs:e.anchorsMs,xs:e.xs.map(g),gaps:e.gaps.map(e=>({...e,fromPx:g(e.fromPx),toPx:g(e.toPx),px:g(e.toPx)-g(e.fromPx)})),xByMs:t=>g(e.xByMs(t)),msByPx:t=>e.msByPx((e=>{if(e<=f)return x>0?e*d/x:a;if(e>=y)return n-y>0?s+(e-y)*m/(n-y):s;let t=f;for(let n=0;n+1<l.length;n++){if(!(e>t+k[n]))return l[n]+(k[n]>0?(e-t)/k[n]*(l[n+1]-l[n]):0);t+=k[n]}return s})(t)),inCut:e.inCut}}function I(e){if(!e||0===e.length)return null;const t=e.filter(e=>Number.isFinite(e)).sort((e,t)=>e-t);return t.length>0?t:null}function W({marks:e,innerRef:t}){/* @__PURE__ */
|
|
17
17
|
return x("div",{ref:t,"aria-hidden":"true",className:"rosh-tl-measure",children:e.map(e=>/* @__PURE__ */f("div",{"data-lane-key":e.key,className:"rosh-tl-measure-box",children:[
|
|
18
18
|
/* @__PURE__ */x("span",{className:"rosh-tl-name",children:e.label}),
|
|
19
19
|
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})}function z({startMs:t,endMs:r,axis:l,geo:a,reveal:s}){const i=o().timeline,u=n(c()),d=a.ruler,m=[],h=[],p=l.gaps.filter(e=>e.compressed),y=new Date(t);y.setUTCDate(y.getUTCDate()+(8-y.getUTCDay())%7);for(let t=y.getTime();t<r;t+=7*e){if(l.inCut(t))continue;const n=l.xByMs(t);l.xByMs(t+7*e)-n<14||m.push(
|
|
@@ -50,12 +50,12 @@ return f("div",{"aria-hidden":"true","data-timeline-part":"start",children:[
|
|
|
50
50
|
/* @__PURE__ */x("i",{className:`rosh-tl-start${r?" is-around":""}${i}`,style:{left:"0px",top:`${e.rail+3}px`,...o}}),null!=t&&!1!==t&&/* @__PURE__ */x("span",{className:`rosh-tl-edge${i}`,"data-timeline-part":"start-caption",style:{left:"0px",top:`${s}px`,...o},children:t}),null!=n&&!1!==n&&/* @__PURE__ */x("span",{className:`rosh-tl-edge is-end${i}`,"data-timeline-part":"end-caption",style:{left:`${a}px`,top:`${s}px`,...o},children:n})]})}function G({x:e,geo:t,trackPx:n,label:r,reveal:l}){const a=o().timeline;/* @__PURE__ */
|
|
51
51
|
return f("div",{"aria-hidden":"true","data-timeline-part":"today",children:[
|
|
52
52
|
/* @__PURE__ */x("div",{className:"rosh-tl-todayline"+(l?" rosh-tl-fade":""),style:{left:`${e}px`,top:`${t.laneA}px`,height:t.ruler+20-t.laneA+"px",...l?{animationDelay:"420ms"}:{}}}),
|
|
53
|
-
/* @__PURE__ */x("span",{className:"rosh-tl-todaytag"+(l?" rosh-tl-fade":""),title:a.todayTitle(r),style:{left:`${w(e,48,n)}px`,top:`${t.tag}px`,...l?{animationDelay:"420ms"}:{}},children:a.today})]})}function J({nodes:e,geo:t,reveal:n}){const r=e.map(e=>{const t=e.members.map(e=>e.caption).filter(e=>!!e);return 0===t.length?null:{x:e.x,first:t[0],last:t[t.length-1]}}).filter(e=>null!==e).sort((e,t)=>e.x-t.x),l=[];let a=null;const s=()=>{a&&(l.push({x:(a.from+a.to)/2,text:a.first===a.last?a.first:`${a.first}–${a.last}`}),a=null)};for(const e of r){const t=e.first===e.last?e.first:`${e.first}–${e.last}`,n=K(t)/2;a&&e.x-n<a.right+6?(a.to=e.x,a.last=e.last,a.right=e.x+n):(s(),a={from:e.x,to:e.x,first:e.first,last:e.last,right:e.x+n})}return s(),/* @__PURE__ */x("div",{"aria-hidden":"true","data-timeline-part":"captions",children:l.map(e=>/* @__PURE__ */x("span",{className:"rosh-tl-caption"+(n?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:`${t.laneA}px`,...n?{animationDelay:"360ms"}:{}},children:e.text},`${e.x}-${e.text}`))})}function
|
|
53
|
+
/* @__PURE__ */x("span",{className:"rosh-tl-todaytag"+(l?" rosh-tl-fade":""),title:a.todayTitle(r),style:{left:`${w(e,48,n)}px`,top:`${t.tag}px`,...l?{animationDelay:"420ms"}:{}},children:a.today})]})}function J({nodes:e,geo:t,reveal:n}){const r=e.map(e=>{const t=e.members.map(e=>e.caption).filter(e=>!!e);return 0===t.length?null:{x:e.x,first:t[0],last:t[t.length-1]}}).filter(e=>null!==e).sort((e,t)=>e.x-t.x),l=[];let a=null;const s=()=>{a&&(l.push({x:(a.from+a.to)/2,text:a.first===a.last?a.first:`${a.first}–${a.last}`}),a=null)};for(const e of r){const t=e.first===e.last?e.first:`${e.first}–${e.last}`,n=K(t)/2;a&&e.x-n<a.right+6?(a.to=e.x,a.last=e.last,a.right=e.x+n):(s(),a={from:e.x,to:e.x,first:e.first,last:e.last,right:e.x+n})}return s(),/* @__PURE__ */x("div",{"aria-hidden":"true","data-timeline-part":"captions",children:l.map(e=>/* @__PURE__ */x("span",{className:"rosh-tl-caption"+(n?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:`${t.laneA}px`,...n?{animationDelay:"360ms"}:{}},children:e.text},`${e.x}-${e.text}`))})}function Q({phase:e,geo:t,xOf:n}){const r=n(e.minMs),l=Math.max(n(e.maxMs)-r,4);/* @__PURE__ */
|
|
54
54
|
return f("div",{"aria-hidden":"true","data-timeline-part":"phase",children:[
|
|
55
55
|
/* @__PURE__ */x("div",{className:"rosh-tl-phase border-gray-300",style:{left:`${r}px`,width:`${l}px`,top:t.laneB+t.laneH-4+"px"}}),
|
|
56
|
-
/* @__PURE__ */f("span",{className:"rosh-tl-phase-label text-gray-500",style:{left:`${r+l/2}px`,top:`${t.laneB+t.laneH+5}px`},children:[e.label," · parallel"]})]})}function
|
|
56
|
+
/* @__PURE__ */f("span",{className:"rosh-tl-phase-label text-gray-500",style:{left:`${r+l/2}px`,top:`${t.laneB+t.laneH+5}px`},children:[e.label," · parallel"]})]})}function Y({nodes:e,trackPx:t,geo:n,activeKey:r,hoveredKey:l,currentKey:a}){const s=o().timeline,i=(e,t)=>null!==t&&(e.key===t||e.members.some(e=>e.key===t)),c=e.find(e=>e.key===l)??e.find(e=>i(e,r))??null;if(!c)return null;const u=c.mark,d=u?u.label:`×${c.members.length}`,m=u?u.dateText:function(e){const t=e[0].dateText,n=e[e.length-1].dateText;return t===n?t:`${t} – ${n}`}(c.members),h=u?u.widthPx:N(d,m),p=u?.onOpen;/* @__PURE__ */
|
|
57
57
|
return f("div",{"data-timeline-part":"label",className:`rosh-tl-label${c.key===l?" is-hot":""}${i(c,a)?" is-current":""}`,style:{left:`${w(c.x,h,t)}px`,top:`${n.laneB}px`,width:`${h}px`,height:`${n.laneH}px`},children:[p?/* @__PURE__ */x("button",{type:"button",className:"rosh-tl-name rosh-tl-open","data-timeline-part":"open","aria-label":s.open(d),onClick:p,children:d}):/* @__PURE__ */x("span",{className:"rosh-tl-name","aria-hidden":"true",children:d}),
|
|
58
|
-
/* @__PURE__ */x("span",{className:"rosh-tl-date","aria-hidden":"true",children:m})]})}function
|
|
58
|
+
/* @__PURE__ */x("span",{className:"rosh-tl-date","aria-hidden":"true",children:m})]})}function _({groups:t,trackPx:n,geo:r,startMs:l,endMs:a,currentKey:s,hoveredKey:i,reveal:o,step:c,zoomedKey:u,popId:d,aimBubble:m,openCluster:h,setOpenCluster:p,previewCluster:k,setPreviewCluster:g,setZoomKey:M,startCaptionPx:v}){const b=[];t.forEach((e,t)=>{if("cluster"===e.type){const r=`cluster-${e.members[0].key}`,l=(n=e.members,`${(n[0]?.label??"").replace(/\s*v?\d+$/i,"").trim()||(n[0]?.label??"")} ×${n.length}`);if(b.push({key:r,group:e,text:l,x:e.members.reduce((e,t)=>e+t.baseX,0)/e.members.length,index:t,lane:-1,left:0,widthPx:Math.ceil(K(l))+28}),r===u)for(const n of e.members)b.push({key:n.key,group:{type:"item",mark:n},text:n.label,x:n.x,index:t,lane:-1,left:0,widthPx:n.widthPx});return}var n;b.push({key:e.mark.key,group:e,text:e.mark.label,x:e.mark.x,index:t,lane:-1,left:0,widthPx:e.mark.widthPx})}),b.sort((e,t)=>e.x-t.x);const $=function(e,t,n,r,l={}){const a=t>0?t:0,s=r>0?r:1,i=l.gapPx??6,o=Math.max(1,l.laneCount??4),c=e.map((e,t)=>({item:e,index:t})).sort((e,t)=>(e.item.priority??0)-(t.item.priority??0)||e.item.ms-t.item.ms||e.index-t.index),u=Array.from({length:o},()=>[]),d=/* @__PURE__ */new Map;for(const{item:e}of c){const t=Math.max(0,e.widthPx);if(a<=0||t>a){d.set(e.key,-1);continue}const r=e.xPx??(e.ms-n)/s*a,l=Math.min(Math.max(r-t/2,0),a-t),c=l+t;let m=-1;for(let e=0;e<o;e++)if(u[e].every(e=>l>e.right+i||c+i<e.left)){u[e].push({left:l,right:c}),m=e;break}d.set(e.key,m)}return e.map(e=>({key:e.key,lane:d.get(e.key)??-1}))}([...v>0?[{key:"__rosh-tl-start__",ms:l,xPx:0,widthPx:v,priority:-2}]:[],...b.map(e=>({key:e.key,ms:"cluster"===e.group.type?e.group.members[0].ms:e.group.mark.ms,xPx:e.x,widthPx:e.widthPx,priority:"cluster"===e.group.type?-1:0}))],n,l,Math.max(a-l,e),{laneCount:2}),P=new Map($.map(e=>[e.key,e.lane]));for(const e of b)e.lane=P.get(e.key)??-1,e.left=w(e.x,e.widthPx,n);const N=b.find(e=>e.key===(h??k)),C=e=>0===e?r.laneA:r.laneB,T=e=>0===e?r.rail-4:r.rail+6+3;/* @__PURE__ */
|
|
59
59
|
return f(y,{children:[b.map(e=>{const t=Math.max(0,e.lane),n=Math.round(e.index*c+60);if("cluster"===e.group.type){const l=h===e.key,a=e.group.members.map(e=>e.x),s=()=>{g(null),l||M(null)};/* @__PURE__ */
|
|
60
60
|
return f("div",{children:[
|
|
61
61
|
/* @__PURE__ */f("button",{type:"button","data-timeline-part":"cluster",className:`rosh-tl-pill${A[e.group.kind]?.token?"":" text-blue-600"}${o?" rosh-tl-fade":""}`,"aria-expanded":l,"aria-controls":d,style:{left:`${e.left}px`,top:`${0===t?r.laneA+r.laneH-19:r.laneB}px`,color:A[e.group.kind]?.token,...o?{animationDelay:`${n}ms`}:{}},onMouseEnter:()=>{g(e.key),M(e.key)},onMouseLeave:s,onFocus:()=>{g(e.key),M(e.key)},onBlur:s,onClick:()=>{p(l?null:e.key),M(l?null:e.key)},children:[
|
|
@@ -70,24 +70,24 @@ return f("div",{children:[
|
|
|
70
70
|
/* @__PURE__ */x("p",{className:"rosh-tl-popover-head",children:N.text}),
|
|
71
71
|
/* @__PURE__ */x("ol",{children:N.group.members.map(e=>/* @__PURE__ */f("li",{children:[
|
|
72
72
|
/* @__PURE__ */x("span",{children:e.label}),
|
|
73
|
-
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})]})]})}function q({thumb:n,value:r,snap:l,axis:a,geo:s,startMs:i,endMs:d,trackPx:m,layerRef:h,glide:p,onScrub:k,nodes:g,onProgress:M}){const v=o().timeline,b=c(),$=u(!1),P=p?p.px:a.xByMs(r),N=p?p.ms:r,T=
|
|
73
|
+
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]},e.key))})]})]})}function q({thumb:n,value:r,snap:l,axis:a,geo:s,startMs:i,endMs:d,trackPx:m,layerRef:h,glide:p,onScrub:k,nodes:g,onProgress:M}){const v=o().timeline,b=c(),$=u(!1),P=p?p.px:a.xByMs(r),N=p?p.ms:r,T=I(n.stops),B=T?T.indexOf(r):-1,L=e=>{const t=h.current?.getBoundingClientRect();return t?a.msByPx(e-t.left):r},D=e=>{const t=l(e);t!==r&&n.onChange(t)},K=e=>{k?.(),$.current=!0,e.currentTarget.setPointerCapture?.(e.pointerId),n.onDragStart?.()},A=e=>{$.current&&($.current=!1,e.currentTarget.releasePointerCapture?.(e.pointerId),M(null),n.onDragEnd?.())},F=e=>{if(!$.current)return;const t=L(e.clientX);D(t),M(function(e,t){if(!Number.isFinite(t))return null;const n=e.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms);for(let e=0;e+1<n.length;e++){const r=n[e],l=n[e+1];if(t<r.ms||t>l.ms)continue;const a=l.ms-r.ms;return{fromKey:r.key,toKey:l.key,t:a>0?C((t-r.ms)/a,0,1):1,ms:t}}return null}(g,t))},j=n.valueText?n.valueText(N):t(N,b),R=Math.max(1,Math.round((d-i)/e));/* @__PURE__ */
|
|
74
74
|
return f(y,{children:[
|
|
75
75
|
/* @__PURE__ */x("div",{className:"rosh-tl-hit","aria-hidden":"true","data-timeline-part":"hit",style:{top:s.rail-9+"px",height:"24px"},onPointerDown:e=>{K(e),D(L(e.clientX))},onPointerMove:F,onPointerUp:A,onPointerCancel:A}),
|
|
76
76
|
/* @__PURE__ */x("div",{className:"rosh-tl-chip","data-timeline-part":"chip",style:{left:`${w(P,88,m)+44}px`,top:`${s.tag}px`},children:n.chip?n.chip(N):t(N,b)}),
|
|
77
|
-
/* @__PURE__ */x("div",{role:"slider",tabIndex:0,className:"rosh-tl-thumb text-blue-600","data-timeline-part":"thumb","aria-label":n.ariaLabel??v.scrub,"aria-valuemin":0,"aria-valuemax":T&&T.length>0?T.length-1:R,"aria-valuenow":T&&T.length>0?Math.max(0,B):Math.round((r-i)/e),"aria-valuetext":j,style:{left:`${P}px`,top:`${s.rail+3}px`},onPointerDown:K,onPointerMove:F,onPointerUp:A,onPointerCancel:A,onKeyDown:t=>{const n=(t=>{const{key:n}=t;if(T&&T.length>0){const e=B<0?0:B;return"ArrowRight"===n||"ArrowUp"===n?T[Math.min(e+1,T.length-1)]:"ArrowLeft"===n||"ArrowDown"===n?T[Math.max(e-1,0)]:"Home"===n?T[0]:"End"===n?T[T.length-1]:null}const l=(t.shiftKey?7:1)*e;return"ArrowRight"===n||"ArrowUp"===n?r+l:"ArrowLeft"===n||"ArrowDown"===n?r-l:"Home"===n?i:"End"===n?d:null})(t);null!==n&&(t.preventDefault(),k?.(),D(n))}})]})}function Z(e,t,n){return(t?e.height:e.ruler+26)+(n?22:0)}function ee({startMs:n,endMs:k,axis:M="linear",items:v,markers:b=[],pending:w=[],fillToMs:ee,todayMs:te,labels:ne="lanes",activeKey:re=null,onActivate:le,thumb:ae,playback:se,edgeCaptions:ie,phases:oe=[],currentKey:ce,zoomRange:ue=null,motion:de=!0,ariaLabel:me,highlightKeys:he=null,onHoverChange:pe,endMark:xe=null}){const fe="none"===ne,ye=a(Date.now,null),ke=a(D,!1),ge=te??ye,Me=u(null),ve=o().timeline,be=c(),$e=e=>t(e,be),we=u(null),Pe=u(null),Ne=u(null),Ce=u(/* @__PURE__ */new Map),Te=u(void 0),Be=u(void 0),Le=u(null),[De,Ke]=d({}),[Ae,Fe]=d(null),[je,Re]=d(null),[Ue,He]=d(null),[Oe,We]=d(null),[Ie,ze]=d(null),[Se,Ee]=d(null),Xe=m(),Ve=m(),Ge=H(Me,!0),Je=Ge>0?Ge-(w.length>0&&!fe?176:0):0,Ye=Je>0&&Je-20<320,_e=H(we,!Ye),Qe=_e>0?_e:600,qe=L[ne],Ze=fe&&w.length>0,et=Ze?Math.max(0,Qe-36):Qe,tt=t=>t>=n-e&&t<=k+e,nt=v.filter(e=>Number.isFinite(e.ms)&&tt(e.ms)).slice().sort((e,t)=>e.ms-t.ms),rt="spread"===M?b.map(e=>new Date(e.date).getTime()).filter(e=>Number.isFinite(e)):[],lt=$([n,...[...nt.map(e=>e.ms),...rt].filter(e=>e>n&&e<k),k],et,"compressed"===(at=M)?{}:"spread"===at?{maxTimeShare:1/0}:{maxTimeShare:1/0,minGapPx:0});var at;const st=lt.xByMs,it=nt.filter(e=>!e.provisional),ot=ce??(it.length>0?it[it.length-1].key:null),ct=nt.map((e,t)=>{const n=e.date??$e(e.ms),r=(e.priority??0)>0||"report"===e.kind,l=function(e){const t=e.kind??"default";return"default"===t&&e.glyph&&"none"!==e.glyph?F[e.glyph]??t:t}(e);return{key:e.key,ms:e.ms,x:st(e.ms),baseX:st(e.ms),kind:l,label:e.label,dateText:n,detail:e.detail,preview:e.preview,glyph:j(e,l,0===t&&"default"===l),role:e.key===ot?"current":r?"dot":"key",widthPx:fe?Math.max(16,K(e.caption??"")+6):De[e.key]||N(e.label,n),collapsible:r,onClick:e.onClick,onOpen:e.onOpen,isItem:!0,caption:e.caption,provisional:!!e.provisional,isCap:!1}}),ut=b.map(e=>({marker:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)&&tt(e)).map(({marker:e,ms:t})=>{const n=`marker-${e.id}`,r=$e(t);return{key:n,ms:t,x:st(t),baseX:st(t),kind:e.kind,label:e.label,dateText:r,detail:e.detail,preview:e.preview,glyph:e.glyph??A[e.kind].glyph,role:"key",widthPx:De[n]||N(e.label,r),collapsible:!1,onClick:e.onClick?()=>e.onClick?.(e):void 0,onOpen:e.onOpen?()=>e.onOpen?.(e):void 0,isItem:!1,provisional:!1,isCap:!1}}),dt=Ze?(()=>{const t=w[w.length-1],n=w.slice(0,-1).map(e=>e.label);return[{key:t.key,ms:k+e,x:Qe,baseX:Qe,kind:t.kind??"default",label:t.label,dateText:ve.notReached,detail:n.length>0?ve.alsoToCome(n):void 0,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]})():[],mt=fe&&xe&&!Ze?[{key:xe.key,ms:k,x:et,baseX:et,kind:"default",label:xe.label,dateText:xe.dateText??$e(k),detail:xe.detail,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]:[],ht=[...ct,...ut,...dt,...mt].sort((e,t)=>e.x-t.x||e.ms-t.ms),pt=ie?.start??ve.start($e(n)),xt=null==pt||!1===pt?0:"string"==typeof pt?Math.ceil(K(pt)):96,ft="lanes"===ne?function(e,t={}){const n=t.minPitchPx??40,r=[];let l=0;for(;l<e.length;){const t=e[l];if(!t.collapsible){r.push({type:"item",mark:t}),l+=1;continue}let a=l+1;for(;a<e.length&&e[a].collapsible&&e[a].kind===t.kind;)a+=1;const s=e.slice(l,a),i=s.length>1&&s.every((e,t)=>{if(0===t)return!0;const r=s[t-1],l=Math.max(n,Math.max(e.widthPx,r.widthPx)+8);return e.x-r.x<l});if(s.length>=3||i)r.push({type:"cluster",kind:t.kind,members:s});else for(const e of s)r.push({type:"item",mark:e});l=a}return r}(ht):[],yt=function(e,t=16){const n=[];let r=0;for(;r<e.length;){let l=r+1;for(;l<e.length&&e[l].x-e[l-1].x<t;)l+=1;if(l-r===1)n.push({type:"item",mark:e[r]});else{const t=e.slice(r,l),a=new Set(t.map(e=>e.kind));n.push({type:"cluster",kind:1===a.size?t[0].kind:P,members:t})}r=l}return n}(ht),kt=e=>"cluster"===e.type?`fold-${e.members[0].key}`:e.mark.key,gt=/* @__PURE__ */new Map;for(const e of yt)if("cluster"===e.type)for(const t of e.members)gt.set(t.key,kt(e));const Mt=Ue??Oe??Ie,vt=ft.find(e=>"cluster"===e.type&&(e=>"cluster"===e.type?`cluster-${e.members[0].key}`:e.mark.key)(e)===Mt)??yt.find(e=>"cluster"===e.type&&kt(e)===Mt),bt=e=>({x:e.baseX,widthPx:e.widthPx}),$t=vt&&"cluster"===vt.type?vt.members.map(bt):ue?ht.filter(e=>e.ms>=ue[0]&&e.ms<=ue[1]).map(bt):[],wt=$t.length>1?O(lt,$t,et):lt,Pt=wt!==lt;if(Pt)for(const e of ht)e.isCap||(e.x=wt.xByMs(e.ms));const Nt=ht.some(e=>e.x<14),Ct=Pt&&vt?Mt:null,Tt=e=>({key:e.key,mark:e,members:[e],x:e.x,kind:e.kind,openable:!1}),Bt=Ye?ht.map(Tt):yt.flatMap(e=>{if("item"===e.type)return[Tt(e.mark)];const t=kt(e);if(t===Ct&&(n=e.members).every((e,t)=>0===t||e.x-n[t-1].x>=16))return e.members.map(Tt);var n;const r=e.members.map(e=>e.x);return[{key:t,mark:null,members:e.members,x:r.reduce((e,t)=>e+t,0)/r.length,kind:e.kind,openable:new Set(e.members.map(e=>e.ms)).size>1}]}),Lt=/* @__PURE__ */new Map;for(const e of Bt)for(const t of e.members)Lt.set(t.key,e.key);const Dt=yt.find(e=>"cluster"===e.type&&kt(e)===Ct),Kt=Dt&&"cluster"===Dt.type?{from:Math.min(...Dt.members.map(e=>e.x))-16,to:Math.max(...Dt.members.map(e=>e.x))+16}:null,At=u(Ct),[Ft,jt]=d(!1);h(()=>{if(At.current===Ct)return;At.current=Ct,jt(!0);const e=setTimeout(()=>jt(!1),240);return()=>clearTimeout(e)},[Ct]);const Rt=ht.map(e=>`${e.key} ${e.label} ${e.dateText}`).join("|");s(()=>{const e=Pe.current;if(!e)return;const t={};for(const n of Array.from(e.children)){const e=n.dataset.laneKey,r=n.getBoundingClientRect().width;e&&r>0&&(t[e]=r)}Ke(e=>function(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Math.abs((e[n]??0)-(t[n]??0))<.5)}(e,t)?e:t)},[Rt]);const Ut=`${ne}|${M}|${ht.map(e=>`${e.key}@${e.ms}`).join("|")}`,[Ht,Ot]=d(Ut),Wt=de&&Ht===Ut;h(()=>{Ht!==Ut&&Ot(Ut)},[Ht,Ut]);const It=Math.min(28,340/Math.max(1,ht.length-1)),zt=W(ae?.stops),St=e=>{const t=Math.min(Math.max(e,n),k);if(!zt)return t;let r=zt[0];for(const e of zt)Math.abs(e-t)<Math.abs(r-t)&&(r=e);return r},Et=ae?St(ae.valueMs):null,Xt=se&&ae?ct.filter(e=>!zt||zt.includes(e.ms)).map(e=>({key:e.key,ms:e.ms})):[],Vt=function(e,t,n={}){const r=Number.isFinite(n.speed)&&(n.speed??0)>0?n.speed:1,l=Math.max(0,n.dwellMs??700)/r,a=t.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms),s=[];for(let t=0;t+1<a.length;t++){const i=a[t],o=a[t+1],c=e.xByMs(i.ms),u=e.xByMs(o.ms),d=Math.max(0,u-c),m=d<=.5||n.reducedMotion?0:C(350*d/100,450,1400)/r;s.push({fromKey:i.key,toKey:o.key,fromMs:i.ms,toMs:o.ms,fromPx:c,toPx:u,lengthPx:d,durationMs:m,dwellMs:l,msByPx:e.msByPx})}return s}(wt,Xt,{speed:se?.speed,reducedMotion:ke}),[Gt,Jt]=d(null),Yt=u(null),_t=u({segments:Vt,value:Et,playback:se});h(()=>{_t.current={segments:Vt,value:Et,playback:se}});const Qt=u(null),qt=p(e=>{null===e&&null===Qt.current||(Qt.current=e,_t.current.playback?.onProgress?.(e))},[]),Zt=p(()=>{Yt.current=null,Jt(null),qt(null),_t.current.playback?.onStop?.()},[qt]),en=!!se?.playing&&!!ae;h(()=>{if(!en)return;const e=_t.current,t=null===e.value?-1:e.segments.findIndex(t=>t.fromMs===e.value);if(t<0)return void Zt();Yt.current&&Yt.current.index===t||(Yt.current={index:t,phase:"rest",t:0,restLeftMs:e.segments[t].dwellMs,sinceMs:null});let n,r=0;const l=e=>Jt(t=>t&&t.px===e.px&&t.ms===e.ms?t:e),a=()=>{clearTimeout(n);const e=Yt.current;"rest"===e?.phase&&(n=setTimeout(s,Math.max(0,e.restLeftMs)))},s=()=>{const e=Yt.current;if("rest"!==e?.phase)return;const t=_t.current.segments[e.index];t?(Yt.current={index:e.index,phase:"glide",t:0,restLeftMs:0,sinceMs:null},l(B(t,0))):Zt()},i=e=>{const t=_t.current,n=Yt.current;if(!n)return;const s=function(e,t,n){const r=e[t.index];if(!r)return{cursor:null,at:null,arrived:null,progress:null};const l=null===t.sinceMs?0:Math.max(0,n-t.sinceMs);if("rest"===t.phase){const e=t.restLeftMs-l;return e>0?{cursor:{...t,restLeftMs:e,sinceMs:n},at:B(r,0),arrived:null,progress:null}:{cursor:{index:t.index,phase:"glide",t:0,restLeftMs:0,sinceMs:n},at:B(r,0),arrived:null,progress:null}}const a=r.durationMs>0?Math.min(1,t.t+l/r.durationMs):1,s=B(r,a);if(a<1)return{cursor:{...t,t:a,sinceMs:n},at:s,arrived:null,progress:{fromKey:r.fromKey,toKey:r.toKey,t:T(a),ms:s.ms}};const i=e[t.index+1];return{cursor:i?{index:t.index+1,phase:"rest",t:0,restLeftMs:i.dwellMs,sinceMs:n}:null,at:s,arrived:{key:r.toKey,ms:r.toMs},progress:null}}(t.segments,n,e);Yt.current=s.cursor,s.at&&l(s.at),qt(s.progress),s.arrived&&t.playback?.onArrive(s.arrived.key,s.arrived.ms),s.cursor?(s.cursor.phase===n.phase&&s.cursor.index===n.index||a(),r=requestAnimationFrame(i)):Zt()};return a(),r=requestAnimationFrame(i),()=>{cancelAnimationFrame(r),clearTimeout(n),Yt.current&&(Yt.current.sinceMs=null,qt(null))}},[en,Zt,qt]);const tn=ct.filter(e=>!e.provisional),nn=ae?Gt?Gt.ms:Et:void 0!==ee?ee:tn.length>0?null===ge?tn[tn.length-1].ms:Math.min(tn[tn.length-1].ms,ge):null,rn=new Set(he??[]),ln=ht.filter(e=>rn.has(e.key)).map(e=>e.x),an=ln.length>0?{from:Math.min(...ln),to:Math.max(...ln)}:null,sn=p(()=>{clearTimeout(Te.current),clearTimeout(Be.current),Fe(null),Re(null),He(null),We(null),ze(null)},[]);h(()=>()=>{clearTimeout(Te.current),clearTimeout(Be.current)},[]),h(()=>{const e=Le.current;e&&(Le.current=null,Ce.current.get(e)?.focus())});const on=null!==je||null!==Ue||null!==Oe||null!==Ie;h(()=>{if(on)return i(e=>"Escape"===e.key&&(sn(),!0))},[on,sn]);const cn=p((e,t)=>{if(!e)return;const n=e.offsetWidth/2;let r=n>0?Math.max(n,Math.min(t,Qe-n)):t;const a=e.parentElement;if(n>0&&a){const t=l(e),s=a.getBoundingClientRect().left,i=t.left+8+n-s,o=t.right-8-n-s;i<=o&&(r=Math.max(i,Math.min(r,o)))}e.style.left=`${r}px`,e.style.setProperty("--rosh-tl-arrow",`${n+(t-r)}px`)},[Qe]),un=Bt.find(e=>e.key===je)??null,dn=un?un.x:0;s(()=>{cn(Ne.current,dn)},[cn,je,dn]);const mn=Et??void 0,hn=u(null);h(()=>{if(void 0===mn)return;const e=wt.xByMs(mn),t=hn.current;if(hn.current=e,null===t||e<=t)return;const n=[];for(const r of ht){if(r.x<=t||r.x>e)continue;const l=Ce.current.get(Lt.get(r.key)??r.key);l&&(l.classList.add("is-hit"),n.push(setTimeout(()=>l.classList.remove("is-hit"),460)))}return()=>{for(const e of n)clearTimeout(e)}},[mn]);const pn=Bt.map(e=>e.key),xn=ot?Lt.get(ot)??null:null,fn=Se&&pn.includes(Se)?Se:xn&&pn.includes(xn)?xn:pn[0],yn=e=>{const t=pn.indexOf(e.target.dataset?.timelineKey??"");if(t<0)return;const n="ArrowRight"===e.key||"ArrowDown"===e.key?t+1:"ArrowLeft"===e.key||"ArrowUp"===e.key?t-1:"Home"===e.key?0:"End"===e.key?pn.length-1:-1;n<0||n>pn.length-1||(e.preventDefault(),Ee(pn[n]),Ce.current.get(pn[n])?.focus())},kn=()=>clearTimeout(Be.current),gn=e=>{kn(),ze(e)},Mn=()=>{clearTimeout(Be.current),Be.current=setTimeout(()=>ze(null),260)},vn=e=>{Ct&>.get(e)===Ct?kn():(kn(),ze(null))},bn=e=>{clearTimeout(Te.current),Fe(e),Re(e),pe?.((e=>{const t=Bt.find(t=>t.key===e);return t?.members[0]?.key??e})(e))},$n=e=>{Fe(t=>t===e?null:t),clearTimeout(Te.current),Te.current=setTimeout(()=>Re(t=>t===e?null:t),160),pe?.(null)},wn=e=>({type:"button","data-timeline-node":e.isCap?"cap":e.isItem?"item":"marker","data-timeline-key":e.key,"aria-label":U(e),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{vn(e.key),bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{vn(e.key),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),e.onClick?.(),e.isItem&&le?.(e.key)}}),Pn=e=>{return{type:"button","data-timeline-node":"fold","data-timeline-key":e.key,"data-timeline-count":String(e.members.length),"aria-label":(t=e.members,n=ve,n.events(t.length,t.map(U))),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{e.openable?gn(e.key):bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{kn(),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{if(t.stopPropagation(),!e.openable)return void bn(e.key);gn(e.key);const n=e.members[0];Ee(n.key),Le.current=n.key}};var t,n},Nn="lanes"!==ne||ht.length>1;if(Ye)/* @__PURE__ */
|
|
78
|
-
return x("div",{ref:Me,children:/* @__PURE__ */x(E,{marks:ht.filter(e=>!e.isCap),pending:w,currentKey:ot,todayMs:ge,reveal:
|
|
77
|
+
/* @__PURE__ */x("div",{role:"slider",tabIndex:0,className:"rosh-tl-thumb text-blue-600","data-timeline-part":"thumb","aria-label":n.ariaLabel??v.scrub,"aria-valuemin":0,"aria-valuemax":T&&T.length>0?T.length-1:R,"aria-valuenow":T&&T.length>0?Math.max(0,B):Math.round((r-i)/e),"aria-valuetext":j,style:{left:`${P}px`,top:`${s.rail+3}px`},onPointerDown:K,onPointerMove:F,onPointerUp:A,onPointerCancel:A,onKeyDown:t=>{const n=(t=>{const{key:n}=t;if(T&&T.length>0){const e=B<0?0:B;return"ArrowRight"===n||"ArrowUp"===n?T[Math.min(e+1,T.length-1)]:"ArrowLeft"===n||"ArrowDown"===n?T[Math.max(e-1,0)]:"Home"===n?T[0]:"End"===n?T[T.length-1]:null}const l=(t.shiftKey?7:1)*e;return"ArrowRight"===n||"ArrowUp"===n?r+l:"ArrowLeft"===n||"ArrowDown"===n?r-l:"Home"===n?i:"End"===n?d:null})(t);null!==n&&(t.preventDefault(),k?.(),D(n))}})]})}function Z(e,t,n){return(t?e.height:e.ruler+26)+(n?22:0)}function ee({startMs:n,endMs:k,axis:M="linear",items:v,markers:b=[],pending:w=[],fillToMs:ee,todayMs:te,labels:ne="lanes",activeKey:re=null,onActivate:le,thumb:ae,playback:se,edgeCaptions:ie,phases:oe=[],currentKey:ce,zoomRange:ue=null,motion:de=!0,ariaLabel:me,highlightKeys:he=null,onHoverChange:pe,endMark:xe=null}){const fe="none"===ne,ye=s(Date.now,null),ke=s(D,!1),ge=te??ye,Me=u(null),ve=o().timeline,be=c(),$e=e=>t(e,be),we=u(null),Pe=u(null),Ne=u(null),Ce=u(/* @__PURE__ */new Map),Te=u(void 0),Be=u(void 0),Le=u(null),[De,Ke]=d({}),[Ae,Fe]=d(null),[je,Re]=d(null),[Ue,He]=d(null),[Oe,Ie]=d(null),[We,ze]=d(null),[Se,Ee]=d(null),Xe=m(),Ve=m(),Ge=H(Me,!0),Je=Ge>0?Ge-(w.length>0&&!fe?176:0):0,Qe=Je>0&&Je-20<320,Ye=H(we,!Qe),_e=Ye>0?Ye:600,qe=L[ne],Ze=fe&&w.length>0,et=Ze?Math.max(0,_e-36):_e,tt=t=>t>=n-e&&t<=k+e,nt=v.filter(e=>Number.isFinite(e.ms)&&tt(e.ms)).slice().sort((e,t)=>e.ms-t.ms),rt="spread"===M?b.map(e=>new Date(e.date).getTime()).filter(e=>Number.isFinite(e)):[],lt=$([n,...[...nt.map(e=>e.ms),...rt].filter(e=>e>n&&e<k),k],et,"compressed"===(at=M)?{}:"spread"===at?{maxTimeShare:1/0}:{maxTimeShare:1/0,minGapPx:0});var at;const st=lt.xByMs,it=nt.filter(e=>!e.provisional),ot=ce??(it.length>0?it[it.length-1].key:null),ct=nt.map((e,t)=>{const n=e.date??$e(e.ms),r=(e.priority??0)>0||"report"===e.kind,l=function(e){const t=e.kind??"default";return"default"===t&&e.glyph&&"none"!==e.glyph?F[e.glyph]??t:t}(e);return{key:e.key,ms:e.ms,x:st(e.ms),baseX:st(e.ms),kind:l,label:e.label,dateText:n,detail:e.detail,preview:e.preview,glyph:j(e,l,0===t&&"default"===l),role:e.key===ot?"current":r?"dot":"key",widthPx:fe?Math.max(16,K(e.caption??"")+6):De[e.key]||N(e.label,n),collapsible:r,onClick:e.onClick,onOpen:e.onOpen,isItem:!0,caption:e.caption,provisional:!!e.provisional,isCap:!1}}),ut=b.map(e=>({marker:e,ms:new Date(e.date).getTime()})).filter(({ms:e})=>Number.isFinite(e)&&tt(e)).map(({marker:e,ms:t})=>{const n=`marker-${e.id}`,r=$e(t);return{key:n,ms:t,x:st(t),baseX:st(t),kind:e.kind,label:e.label,dateText:r,detail:e.detail,preview:e.preview,glyph:e.glyph??A[e.kind].glyph,role:"key",widthPx:De[n]||N(e.label,r),collapsible:!1,onClick:e.onClick?()=>e.onClick?.(e):void 0,onOpen:e.onOpen?()=>e.onOpen?.(e):void 0,isItem:!1,provisional:!1,isCap:!1}}),dt=Ze?(()=>{const t=w[w.length-1],n=w.slice(0,-1).map(e=>e.label);return[{key:t.key,ms:k+e,x:_e,baseX:_e,kind:t.kind??"default",label:t.label,dateText:ve.notReached,detail:n.length>0?ve.alsoToCome(n):void 0,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]})():[],mt=fe&&xe&&!Ze?[{key:xe.key,ms:k,x:et,baseX:et,kind:"default",label:xe.label,dateText:xe.dateText??$e(k),detail:xe.detail,glyph:void 0,role:"key",widthPx:16,collapsible:!1,isItem:!1,provisional:!1,isCap:!0}]:[],ht=[...ct,...ut,...dt,...mt].sort((e,t)=>e.x-t.x||e.ms-t.ms),pt=ie?.start??ve.start($e(n)),xt=null==pt||!1===pt?0:"string"==typeof pt?Math.ceil(K(pt)):96,ft="lanes"===ne?function(e,t={}){const n=t.minPitchPx??40,r=[];let l=0;for(;l<e.length;){const t=e[l];if(!t.collapsible){r.push({type:"item",mark:t}),l+=1;continue}let a=l+1;for(;a<e.length&&e[a].collapsible&&e[a].kind===t.kind;)a+=1;const s=e.slice(l,a),i=s.length>1&&s.every((e,t)=>{if(0===t)return!0;const r=s[t-1],l=Math.max(n,Math.max(e.widthPx,r.widthPx)+8);return e.x-r.x<l});if(s.length>=3||i)r.push({type:"cluster",kind:t.kind,members:s});else for(const e of s)r.push({type:"item",mark:e});l=a}return r}(ht):[],yt=function(e,t=16){const n=[];let r=0;for(;r<e.length;){let l=r+1;for(;l<e.length&&e[l].x-e[l-1].x<t;)l+=1;if(l-r===1)n.push({type:"item",mark:e[r]});else{const t=e.slice(r,l),a=new Set(t.map(e=>e.kind));n.push({type:"cluster",kind:1===a.size?t[0].kind:P,members:t})}r=l}return n}(ht),kt=e=>"cluster"===e.type?`fold-${e.members[0].key}`:e.mark.key,gt=/* @__PURE__ */new Map;for(const e of yt)if("cluster"===e.type)for(const t of e.members)gt.set(t.key,kt(e));const Mt=Ue??Oe??We,vt=ft.find(e=>"cluster"===e.type&&(e=>"cluster"===e.type?`cluster-${e.members[0].key}`:e.mark.key)(e)===Mt)??yt.find(e=>"cluster"===e.type&&kt(e)===Mt),bt=e=>({x:e.baseX,widthPx:e.widthPx}),$t=vt&&"cluster"===vt.type?vt.members.map(bt):ue?ht.filter(e=>e.ms>=ue[0]&&e.ms<=ue[1]).map(bt):[],wt=$t.length>1?O(lt,$t,et):lt,Pt=wt!==lt;if(Pt)for(const e of ht)e.isCap||(e.x=wt.xByMs(e.ms));const Nt=ht.some(e=>e.x<14),Ct=Pt&&vt?Mt:null,Tt=e=>({key:e.key,mark:e,members:[e],x:e.x,kind:e.kind,openable:!1}),Bt=Qe?ht.map(Tt):yt.flatMap(e=>{if("item"===e.type)return[Tt(e.mark)];const t=kt(e);if(t===Ct&&(n=e.members).every((e,t)=>0===t||e.x-n[t-1].x>=16))return e.members.map(Tt);var n;const r=e.members.map(e=>e.x);return[{key:t,mark:null,members:e.members,x:r.reduce((e,t)=>e+t,0)/r.length,kind:e.kind,openable:new Set(e.members.map(e=>e.ms)).size>1}]}),Lt=/* @__PURE__ */new Map;for(const e of Bt)for(const t of e.members)Lt.set(t.key,e.key);const Dt=yt.find(e=>"cluster"===e.type&&kt(e)===Ct),Kt=Dt&&"cluster"===Dt.type?{from:Math.min(...Dt.members.map(e=>e.x))-16,to:Math.max(...Dt.members.map(e=>e.x))+16}:null,At=u(Ct),[Ft,jt]=d(!1);h(()=>{if(At.current===Ct)return;At.current=Ct,jt(!0);const e=setTimeout(()=>jt(!1),240);return()=>clearTimeout(e)},[Ct]);const Rt=ht.map(e=>`${e.key} ${e.label} ${e.dateText}`).join("|");i(()=>{const e=Pe.current;if(!e)return;const t={};for(const n of Array.from(e.children)){const e=n.dataset.laneKey,r=n.getBoundingClientRect().width;e&&r>0&&(t[e]=r)}Ke(e=>function(e,t){const n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Math.abs((e[n]??0)-(t[n]??0))<.5)}(e,t)?e:t)},[Rt]);const Ut=`${ne}|${M}|${ht.map(e=>`${e.key}@${e.ms}`).join("|")}`,[Ht,Ot]=d(Ut),It=de&&Ht===Ut;h(()=>{Ht!==Ut&&Ot(Ut)},[Ht,Ut]);const Wt=Math.min(28,340/Math.max(1,ht.length-1)),zt=I(ae?.stops),St=e=>{const t=Math.min(Math.max(e,n),k);if(!zt)return t;let r=zt[0];for(const e of zt)Math.abs(e-t)<Math.abs(r-t)&&(r=e);return r},Et=ae?St(ae.valueMs):null,Xt=se&&ae?ct.filter(e=>!zt||zt.includes(e.ms)).map(e=>({key:e.key,ms:e.ms})):[],Vt=function(e,t,n={}){const r=Number.isFinite(n.speed)&&(n.speed??0)>0?n.speed:1,l=Math.max(0,n.dwellMs??700)/r,a=t.filter(e=>Number.isFinite(e.ms)).slice().sort((e,t)=>e.ms-t.ms),s=[];for(let t=0;t+1<a.length;t++){const i=a[t],o=a[t+1],c=e.xByMs(i.ms),u=e.xByMs(o.ms),d=Math.max(0,u-c),m=d<=.5||n.reducedMotion?0:C(350*d/100,450,1400)/r;s.push({fromKey:i.key,toKey:o.key,fromMs:i.ms,toMs:o.ms,fromPx:c,toPx:u,lengthPx:d,durationMs:m,dwellMs:l,msByPx:e.msByPx})}return s}(wt,Xt,{speed:se?.speed,reducedMotion:ke}),[Gt,Jt]=d(null),Qt=u(null),Yt=u({segments:Vt,value:Et,playback:se});h(()=>{Yt.current={segments:Vt,value:Et,playback:se}});const _t=u(null),qt=p(e=>{null===e&&null===_t.current||(_t.current=e,Yt.current.playback?.onProgress?.(e))},[]),Zt=p(()=>{Qt.current=null,Jt(null),qt(null),Yt.current.playback?.onStop?.()},[qt]),en=!!se?.playing&&!!ae;h(()=>{if(!en)return;const e=Yt.current,t=null===e.value?-1:e.segments.findIndex(t=>t.fromMs===e.value);if(t<0)return void Zt();Qt.current&&Qt.current.index===t||(Qt.current={index:t,phase:"rest",t:0,restLeftMs:e.segments[t].dwellMs,sinceMs:null});let n,r=0;const l=e=>Jt(t=>t&&t.px===e.px&&t.ms===e.ms?t:e),a=()=>{clearTimeout(n);const e=Qt.current;"rest"===e?.phase&&(n=setTimeout(s,Math.max(0,e.restLeftMs)))},s=()=>{const e=Qt.current;if("rest"!==e?.phase)return;const t=Yt.current.segments[e.index];t?(Qt.current={index:e.index,phase:"glide",t:0,restLeftMs:0,sinceMs:null},l(B(t,0))):Zt()},i=e=>{const t=Yt.current,n=Qt.current;if(!n)return;const s=function(e,t,n){const r=e[t.index];if(!r)return{cursor:null,at:null,arrived:null,progress:null};const l=null===t.sinceMs?0:Math.max(0,n-t.sinceMs);if("rest"===t.phase){const e=t.restLeftMs-l;return e>0?{cursor:{...t,restLeftMs:e,sinceMs:n},at:B(r,0),arrived:null,progress:null}:{cursor:{index:t.index,phase:"glide",t:0,restLeftMs:0,sinceMs:n},at:B(r,0),arrived:null,progress:null}}const a=r.durationMs>0?Math.min(1,t.t+l/r.durationMs):1,s=B(r,a);if(a<1)return{cursor:{...t,t:a,sinceMs:n},at:s,arrived:null,progress:{fromKey:r.fromKey,toKey:r.toKey,t:T(a),ms:s.ms}};const i=e[t.index+1];return{cursor:i?{index:t.index+1,phase:"rest",t:0,restLeftMs:i.dwellMs,sinceMs:n}:null,at:s,arrived:{key:r.toKey,ms:r.toMs},progress:null}}(t.segments,n,e);Qt.current=s.cursor,s.at&&l(s.at),qt(s.progress),s.arrived&&t.playback?.onArrive(s.arrived.key,s.arrived.ms),s.cursor?(s.cursor.phase===n.phase&&s.cursor.index===n.index||a(),r=requestAnimationFrame(i)):Zt()};return a(),r=requestAnimationFrame(i),()=>{cancelAnimationFrame(r),clearTimeout(n),Qt.current&&(Qt.current.sinceMs=null,qt(null))}},[en,Zt,qt]);const tn=ct.filter(e=>!e.provisional),nn=ae?Gt?Gt.ms:Et:void 0!==ee?ee:tn.length>0?null===ge?tn[tn.length-1].ms:Math.min(tn[tn.length-1].ms,ge):null,rn=new Set(he??[]),ln=ht.filter(e=>rn.has(e.key)).map(e=>e.x),an=ln.length>0?{from:Math.min(...ln),to:Math.max(...ln)}:null,sn=p(()=>{clearTimeout(Te.current),clearTimeout(Be.current),Fe(null),Re(null),He(null),Ie(null),ze(null)},[]);h(()=>()=>{clearTimeout(Te.current),clearTimeout(Be.current)},[]),h(()=>{const e=Le.current;e&&(Le.current=null,Ce.current.get(e)?.focus())});const on=null!==je||null!==Ue||null!==Oe||null!==We;h(()=>{if(on)return a(e=>"Escape"===e.key&&(sn(),!0))},[on,sn]);const cn=p((e,t)=>{if(!e)return;const n=e.offsetWidth/2;let r=n>0?Math.max(n,Math.min(t,_e-n)):t;const a=e.parentElement;if(n>0&&a){const t=l(e),s=a.getBoundingClientRect().left,i=t.left+8+n-s,o=t.right-8-n-s;i<=o&&(r=Math.max(i,Math.min(r,o)))}e.style.left=`${r}px`,e.style.setProperty("--rosh-tl-arrow",`${n+(t-r)}px`)},[_e]),un=Bt.find(e=>e.key===je)??null,dn=un?un.x:0;i(()=>{cn(Ne.current,dn)},[cn,je,dn]);const mn=Et??void 0,hn=u(null);h(()=>{if(void 0===mn)return;const e=wt.xByMs(mn),t=hn.current;if(hn.current=e,null===t||e<=t)return;const n=[];for(const r of ht){if(r.x<=t||r.x>e)continue;const l=Ce.current.get(Lt.get(r.key)??r.key);l&&(l.classList.add("is-hit"),n.push(setTimeout(()=>l.classList.remove("is-hit"),460)))}return()=>{for(const e of n)clearTimeout(e)}},[mn]);const pn=Bt.map(e=>e.key),xn=ot?Lt.get(ot)??null:null,fn=Se&&pn.includes(Se)?Se:xn&&pn.includes(xn)?xn:pn[0],yn=e=>{const t=pn.indexOf(e.target.dataset?.timelineKey??"");if(t<0)return;const n="ArrowRight"===e.key||"ArrowDown"===e.key?t+1:"ArrowLeft"===e.key||"ArrowUp"===e.key?t-1:"Home"===e.key?0:"End"===e.key?pn.length-1:-1;n<0||n>pn.length-1||(e.preventDefault(),Ee(pn[n]),Ce.current.get(pn[n])?.focus())},kn=()=>clearTimeout(Be.current),gn=e=>{kn(),ze(e)},Mn=()=>{clearTimeout(Be.current),Be.current=setTimeout(()=>ze(null),260)},vn=e=>{Ct&>.get(e)===Ct?kn():(kn(),ze(null))},bn=e=>{clearTimeout(Te.current),Fe(e),Re(e),pe?.((e=>{const t=Bt.find(t=>t.key===e);return t?.members[0]?.key??e})(e))},$n=e=>{Fe(t=>t===e?null:t),clearTimeout(Te.current),Te.current=setTimeout(()=>Re(t=>t===e?null:t),160),pe?.(null)},wn=e=>({type:"button","data-timeline-node":e.isCap?"cap":e.isItem?"item":"marker","data-timeline-key":e.key,"aria-label":U(e),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{vn(e.key),bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{vn(e.key),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{t.stopPropagation(),e.onClick?.(),e.isItem&&le?.(e.key)}}),Pn=e=>{return{type:"button","data-timeline-node":"fold","data-timeline-key":e.key,"data-timeline-count":String(e.members.length),"aria-label":(t=e.members,n=ve,n.events(t.length,t.map(U))),"aria-describedby":je===e.key?Xe:void 0,tabIndex:e.key===fn?0:-1,ref:t=>{t?Ce.current.set(e.key,t):Ce.current.delete(e.key)},onMouseEnter:()=>{e.openable?gn(e.key):bn(e.key)},onMouseLeave:()=>{Mn(),$n(e.key)},onFocus:()=>{kn(),bn(e.key),Ee(e.key)},onBlur:()=>{Mn(),$n(e.key)},onPointerDown:e=>e.stopPropagation(),onClick:t=>{if(t.stopPropagation(),!e.openable)return void bn(e.key);gn(e.key);const n=e.members[0];Ee(n.key),Le.current=n.key}};var t,n},Nn="lanes"!==ne||ht.length>1;if(Qe)/* @__PURE__ */
|
|
78
|
+
return x("div",{ref:Me,children:/* @__PURE__ */x(E,{marks:ht.filter(e=>!e.isCap),pending:w,currentKey:ot,todayMs:ge,reveal:It,ariaLabel:me,step:Wt,nodeProps:wn,onKeyDown:yn})});const Cn=(e,t)=>null==e||!1===e?null:/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-flank"+(t?" is-end":""),"data-timeline-part":t?"end-caption":"start-caption",style:{paddingTop:qe.rail-3+"px"},children:e});/* @__PURE__ */
|
|
79
79
|
return f("div",{ref:Me,className:"rosh-tl-body"+(w.length>0&&!fe?"":" is-solo"),children:[
|
|
80
80
|
/* @__PURE__ */f("div",{className:"flex items-stretch gap-3",children:[fe&&Cn(pt,!1),
|
|
81
|
-
/* @__PURE__ */x("div",{className:"rosh-tl-stage",style:{height:`${Z(qe,Nn,oe.length>0&&!fe)}px`},children:/* @__PURE__ */f("div",{ref:we,className:`rosh-tl-layer${Ft?" is-zooming":""}${Gt?" is-gliding":""}`,onMouseMove:e=>{if(!Kt)return;const t=we.current?.getBoundingClientRect();if(!t)return;const n=e.clientX-t.left;n>=Kt.from&&n<=Kt.to?kn():Mn()},onMouseLeave:Mn,children:[!fe&&/* @__PURE__ */x(
|
|
82
|
-
/* @__PURE__ */x(X,{axis:wt,geo:qe,fillTo:nn,reveal:
|
|
83
|
-
/* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-tail","data-timeline-part":"tail",style:{left:`${et}px`,width:
|
|
84
|
-
/* @__PURE__ */x(z,{startMs:n,endMs:k,axis:wt,geo:qe,reveal:
|
|
85
|
-
/* @__PURE__ */x(V,{geo:qe,caption:fe?null:pt,endCaption:fe?null:ie?.end,around:Nt,reveal:
|
|
86
|
-
/* @__PURE__ */x("ol",{className:"rosh-tl-nodes","aria-label":me,onKeyDown:yn,children:Bt.map((e,t)=>{const n=t=>null!==t&&e.members.some(e=>e.key===t),l=`${qe.rail+3}px`,a=
|
|
87
|
-
return x("li",{children:/* @__PURE__ */x("button",{...wn(e.mark),className:`rosh-tl-node rosh-tl-mark is-cap${s}${
|
|
81
|
+
/* @__PURE__ */x("div",{className:"rosh-tl-stage",style:{height:`${Z(qe,Nn,oe.length>0&&!fe)}px`},children:/* @__PURE__ */f("div",{ref:we,className:`rosh-tl-layer${Ft?" is-zooming":""}${Gt?" is-gliding":""}`,onMouseMove:e=>{if(!Kt)return;const t=we.current?.getBoundingClientRect();if(!t)return;const n=e.clientX-t.left;n>=Kt.from&&n<=Kt.to?kn():Mn()},onMouseLeave:Mn,children:[!fe&&/* @__PURE__ */x(W,{marks:ht,innerRef:Pe}),
|
|
82
|
+
/* @__PURE__ */x(X,{axis:wt,geo:qe,fillTo:nn,reveal:It,trackPx:et,tweened:!!ae}),Ze&&
|
|
83
|
+
/* @__PURE__ */x("i",{"aria-hidden":"true",className:"rosh-tl-tail","data-timeline-part":"tail",style:{left:`${et}px`,width:_e-et+"px",top:qe.rail+3-1+"px"}}),an&&/* @__PURE__ */x("div",{"aria-hidden":"true",className:"rosh-tl-band","data-timeline-part":"highlight",style:{left:an.from-10+"px",width:an.to-an.from+20+"px",top:qe.rail-7+"px",height:"20px"}}),
|
|
84
|
+
/* @__PURE__ */x(z,{startMs:n,endMs:k,axis:wt,geo:qe,reveal:It}),
|
|
85
|
+
/* @__PURE__ */x(V,{geo:qe,caption:fe?null:pt,endCaption:fe?null:ie?.end,around:Nt,reveal:It,trackPx:_e}),fe&&/* @__PURE__ */x(J,{nodes:Bt,geo:qe,reveal:It}),null!==ge&&ge>n&&ge<=k+e&&/* @__PURE__ */x(G,{x:wt.xByMs(Math.min(ge,k)),geo:qe,trackPx:_e,label:$e(ge),reveal:It}),!fe&&oe.map(e=>/* @__PURE__ */x(Q,{phase:e,geo:qe,xOf:wt.xByMs},e.key)),
|
|
86
|
+
/* @__PURE__ */x("ol",{className:"rosh-tl-nodes","aria-label":me,onKeyDown:yn,children:Bt.map((e,t)=>{const n=t=>null!==t&&e.members.some(e=>e.key===t),l=`${qe.rail+3}px`,a=It?r(t,Wt):{},s=(e=>!!an&&e.x>=an.from-.5&&e.x<=an.to+.5)(e)?" is-lit":"";if(e.mark?.isCap)/* @__PURE__ */
|
|
87
|
+
return x("li",{children:/* @__PURE__ */x("button",{...wn(e.mark),className:`rosh-tl-node rosh-tl-mark is-cap${s}${It?" rosh-tl-pop":""}`,style:{left:`${e.x}px`,top:l,...a}})},e.key);if(!e.mark){const t=e.kind===P,r=R(t?"default":e.kind,"key"),i=t?void 0:A[e.kind]?.glyph;/* @__PURE__ */
|
|
88
88
|
return f("li",{...n(ot)?{"aria-current":"step"}:{},children:[
|
|
89
|
-
/* @__PURE__ */f("button",{...Pn(e),className:`${r.className} is-fold${t?" is-mixed":""}${n(re)?" is-active":""}${s}${
|
|
90
|
-
return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */f("button",{...wn(i),className:`${o.className}${i.key===re?" is-active":""}${s}${
|
|
89
|
+
/* @__PURE__ */f("button",{...Pn(e),className:`${r.className} is-fold${t?" is-mixed":""}${n(re)?" is-active":""}${s}${It?" rosh-tl-pop":""}`,style:{...r.style,left:`${e.x}px`,top:l,...a},children:[i&&/* @__PURE__ */x(g,{name:i}),t&&/* @__PURE__ */f("span",{"aria-hidden":"true",className:"rosh-tl-foldnum",children:["×",e.members.length]})]}),!t&&/* @__PURE__ */f("i",{"aria-hidden":"true",className:"rosh-tl-count"+(It?" rosh-tl-fade":""),style:{left:`${e.x}px`,top:l},children:["×",e.members.length]})]},e.key)}const i=e.mark,o=R(i.kind,i.role,i.provisional),{glyph:c}=i;/* @__PURE__ */
|
|
90
|
+
return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */f("button",{...wn(i),className:`${o.className}${i.key===re?" is-active":""}${s}${It?" rosh-tl-pop":""}`,style:{...o.style,left:`${i.x}px`,top:l,...a},children:[c&&/* @__PURE__ */x(g,{name:c}),"current"===i.role&&/* @__PURE__ */x("span",{"aria-hidden":"true",className:"rosh-tl-pulse bg-blue-600"+(It?" is-on":"")})]})},i.key)})}),"lanes"===ne?/* @__PURE__ */x(_,{groups:ft,trackPx:_e,geo:qe,startMs:n,endMs:k,currentKey:ot,hoveredKey:Ae,reveal:It,step:Wt,zoomedKey:Ct,popId:Ve,aimBubble:cn,startCaptionPx:xt,openCluster:Ue,setOpenCluster:He,previewCluster:Oe,setPreviewCluster:Ie,setZoomKey:ze}):"active"===ne?/* @__PURE__ */x(Y,{nodes:Bt,trackPx:_e,geo:qe,activeKey:re,hoveredKey:Ae,currentKey:ot}):null,un&&/* @__PURE__ */x("div",{ref:Ne,id:Xe,role:"tooltip",className:"rosh-tl-bubble"+(un.members.some(e=>e.preview)?" is-preview":""),"data-timeline-part":"tooltip",style:{top:`${qe.rail+6+6}px`},onMouseEnter:()=>{kn(),bn(un.key)},onMouseLeave:()=>{Mn(),$n(un.key)},onFocus:()=>{kn(),bn(un.key)},onBlur:()=>{Mn(),$n(un.key)},children:un.mark?/* @__PURE__ */f(y,{children:[
|
|
91
91
|
/* @__PURE__ */x("span",{className:"rosh-tl-name",children:un.mark.label}),
|
|
92
92
|
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:un.mark.dateText}),un.mark.preview?/* @__PURE__ */x("div",{className:"rosh-tl-preview","data-timeline-part":"preview",children:un.mark.preview}):un.mark.detail&&/* @__PURE__ */x("span",{className:"rosh-tl-detail",children:un.mark.detail}),(un.mark.onOpen??un.mark.onClick)&&/* @__PURE__ */x("button",{type:"button",className:"rosh-tl-bubble-open text-blue-600","data-timeline-part":"bubble-open",onClick:()=>(un.mark?.onOpen??un.mark?.onClick)?.(),children:ve.openButton})]}):
|
|
93
93
|
/* @__PURE__ */f("div",{className:"rosh-tl-fold-list","data-timeline-part":"fold-members",children:[
|
|
@@ -96,4 +96,4 @@ return x("li",{...i.key===ot?{"aria-current":"step"}:{},children:/* @__PURE__ */
|
|
|
96
96
|
/* @__PURE__ */f("p",{className:"rosh-tl-foldrow",children:[
|
|
97
97
|
/* @__PURE__ */x("span",{children:e.label}),
|
|
98
98
|
/* @__PURE__ */x("span",{className:"rosh-tl-date",children:e.dateText})]}),e.preview?/* @__PURE__ */x("div",{className:"rosh-tl-preview","data-timeline-part":"preview",children:e.preview}):e.detail&&/* @__PURE__ */x("span",{className:"rosh-tl-detail",children:e.detail})]},e.key))})]})}),ae&&null!==Et&&
|
|
99
|
-
/* @__PURE__ */x(q,{thumb:ae,value:Et,snap:St,axis:wt,geo:qe,startMs:n,endMs:k,trackPx:
|
|
99
|
+
/* @__PURE__ */x(q,{thumb:ae,value:Et,snap:St,axis:wt,geo:qe,startMs:n,endMs:k,trackPx:_e,layerRef:we,glide:Gt,onScrub:se?Zt:void 0,nodes:Xt,onProgress:qt})]})}),fe&&Cn(ie?.end,!0)]}),w.length>0&&!fe&&/* @__PURE__ */x(S,{pending:w,reveal:It})]})}export{g as TimelineGlyph,M as TimelineMilestoneIcon,v as TimelineProgressIcon,ee as TimelineTrack};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-GDQJBQ5B.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as r,jsxs as n}from"react/jsx-runtime";var i={danger:"bg-red-600 text-white",neutral:"bg-gray-600 text-white",accent:"bg-blue-600 text-white"};function a({count:a=0,max:l=99,dot:s=!1,tone:o="danger",showZero:c=!1,children:m,className:u=""}){const h=s||a>0||0===a&&c,d=e(),x=a>l?`${t(l,d)}+`:t(a,d),f=m?"":u,g=h?/* @__PURE__ */r("span",s?{className:`block h-2.5 w-2.5 rounded-full ring-2 ring-white ${i[o]} ${f}`.trim(),"aria-hidden":m?"true":void 0}:{className:`flex h-5 min-w-[1.25rem] items-center justify-center whitespace-nowrap rounded-full px-1 text-xs font-semibold tabular-nums ring-2 ring-white ${i[o]} ${f}`.trim(),children:x}):null;return m?/* @__PURE__ */n("span",{className:`relative inline-flex ${u}`.trim(),children:[m,g&&/* @__PURE__ */r("span",{className:"absolute -right-1.5 -top-1.5 flex",children:g})]}):g}export{a as CountBadge};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-EQZZ4V5X.js";import{Icon as i}from"./chunk-2UO47XB4.js";import{OneLineLabel as r}from"./chunk-S5SRXI4V.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
|
|
2
2
|
return t("span",{className:[o,"font-medium",y,b,d,x].filter(Boolean).join(" "),children:[
|
|
3
3
|
/* @__PURE__ */n(r,{children:a}),u&&/* @__PURE__ */n("button",{type:"button",onClick:f,"aria-label":j,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */n(i,{name:"close",look:"mini",className:k,"aria-hidden":"true"})})]})}export{l as ColoredBadge};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{firstEnabledIndex as e,matchTypeahead as t,lastEnabledIndex as r,nextEnabledIndex as i}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as n,groupedRows as a,isOptionGroup as l,OptionCheck as o}from"./chunk-LJN77RG6.js";import{useSettingAuto as d}from"./chunk-2NMW66P5.js";import{inputClasses as s,PLACEHOLDER_INK as c}from"./chunk-AYZY3YNC.js";import{useIsMobile as u}from"./chunk-UGTRSRIW.js";import{optionNoteClass as p}from"./chunk-URHGHXDN.js";import{Icon as m}from"./chunk-2UO47XB4.js";import{onOverlayOpen as v}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as h}from"./chunk-62LW225J.js";import{useDropdownPosition as f,MENU_MAX_HEIGHT as b}from"./chunk-GLUJS42B.js";import{solidSurfaceStyle as g}from"./chunk-F27JJHNJ.js";import{registerModalEscapeInterceptor as y}from"./chunk-TWVUQUUD.js";import{useBrowserLayoutEffect as x}from"./chunk-D65T4H6J.js";import{useShellStrings as k}from"./chunk-GDQJBQ5B.js";import{forwardRef as N,useId as w,useState as $,useRef as D,useMemo as j,useCallback as H,useEffect as S}from"react";import{createPortal as T}from"react-dom";import{jsxs as C,jsx as E,Fragment as O}from"react/jsx-runtime";var I=e=>e.labelStyle?{lineHeight:1.25,...e.labelStyle}:void 0,z=N(function({value:e,onChange:t,options:r,placeholder:i,invalid:n,className:a="",size:l,touchSize:o,renderOption:c,renderValue:u,valueText:p,readOnly:m,footer:v,changed:h,auto:f,multiple:b,"aria-describedby":g,...y},x){const N=t,$=k(),D=d(),j=f??D,H=w(),S=/* @__PURE__ */C("select",{ref:x,value:e,multiple:b||void 0,onChange:e=>N(b?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),"aria-invalid":n||void 0,"aria-describedby":[g,j?H:void 0].filter(Boolean).join(" ")||void 0,className:s({invalid:n,size:l,auto:j,className:`pr-8 ${a}`.trim()}),...y,children:[void 0!==i&&!b&&/* @__PURE__ */E("option",{value:"",disabled:!0,children:i}),
|
|
2
|
+
/* @__PURE__ */E(B,{items:r})]});return j?/* @__PURE__ */C(O,{children:[S,
|
|
3
|
+
/* @__PURE__ */E("span",{id:H,hidden:!0,children:$.settingView.auto})]}):S});function B({items:e}){const t=e=>/* @__PURE__ */E("option",{value:e.value,disabled:e.disabled,lang:e.lang,children:e.label},e.value);/* @__PURE__ */
|
|
4
|
+
return E(O,{children:e.map((e,r)=>(e=>l(e))(e)?/* @__PURE__ */E("optgroup",{label:e.label,children:e.options.map(t)},`group-${r}`):t(e))})}var U=N(function({value:l,onChange:u,options:N,placeholder:z,invalid:U,className:A="",id:J,disabled:R,size:K,touchSize:V,title:G,multiple:L,renderOption:P,renderValue:W,valueText:F,readOnly:M=!1,footer:Y,changed:Q=!1,auto:X,"aria-describedby":q,"aria-label":Z,"aria-labelledby":_,...ee},te){const[re,ie]=$(!1),[ne,ae]=$(-1),le=D(null),oe=D(null),de=D(null),se=D(null),ce=D([]),ue=()=>se.current??de.current,pe=!!Y?.length,me="sm"===K,ve=me?"min-h-7 px-3 py-1 text-xs leading-4":"min-h-(--row-height-menu) px-3 py-2 text-sm leading-5",he=p(me),[fe,be]=$(null),ge=k(),ye=D(re);ye.current=re;const xe=D({buffer:"",timer:null}),ke=w(),Ne=`${ke}-listbox`,we=J??`${ke}-trigger`,$e=e=>`${ke}-opt-${e}`,De=`${ke}-changed`,je=d(),He=X??je,Se=`${ke}-auto`,Te=[q,Q?De:void 0,He?Se:void 0].filter(Boolean).join(" ")||void 0,Ce=j(()=>n(N),[N]),Ee=L?l:[],Oe=u,Ie=f(oe,re,{matchTriggerWidth:!0,...Y?.length?{preferredMaxHeight:Number.POSITIVE_INFINITY}:{}}),ze=`${re}|${Ie?.top}|${Ie?.bottom}|${Ie?.maxHeight}|${N.length}`;x(()=>{be(null)},[ze]),x(()=>{const e=de.current;if(!re||!e||null!==fe)return;if(e.scrollHeight<=e.clientHeight+1)return;const t=getComputedStyle(e),r=parseFloat(t.paddingTop)||0;parseFloat(t.paddingBottom);const i=e.getBoundingClientRect().top;let n=0;for(const t of e.querySelectorAll('[role="option"]')){const r=t.getBoundingClientRect().bottom-i+e.scrollTop;if(!(r<=e.clientHeight+.5))break;n=r}n>r&&be(Math.floor(n))},[re,fe,ze]);const Be=L?Ce.findIndex(e=>Ee.includes(e.value)):Ce.findIndex(e=>e.value===l),Ue=L?Ce.filter(e=>Ee.includes(e.value)).map(e=>e.label).join(", ")||void 0:Be>=0?Ce[Be].label:void 0,Ae=!L&&Be>=0?Ce[Be].lang:void 0,Je=L?Ce.filter(e=>Ee.includes(e.value)):Be>=0?[Ce[Be]]:[],Re=W&&Je.length?W(Je):void 0,Ke=void 0!==Re&&F?F(Je):void 0,Ve=H((e=!0)=>{ie(!1),ae(-1),e&&oe.current?.focus()},[]),Ge=H(()=>{R||M||(ae(Be>=0?Be:e(Ce)),ie(!0))},[R,M,Ce,Be]),Le=H(e=>{const t=Ce[e];if(t&&!t.disabled){if(L){const r=l;return Oe(r.includes(t.value)?r.filter(e=>e!==t.value):[...r,t.value]),void ae(e)}Oe(t.value),Ve()}},[Ce,L,l,Oe,Ve]);S(()=>{if(!re)return;return y(e=>!("Escape"!==e.key||!ye.current)&&(Ve(),!0),ue)},[re,Ve]),S(()=>{if(!re)return;const e=e=>{const t=e.target;le.current?.contains(t)||ue()?.contains(t)||Ve(!1)};document.addEventListener("pointerdown",e);const t=v(()=>Ve(!1));return()=>{document.removeEventListener("pointerdown",e),t()}},[re,Ve]),S(()=>{!re||ne<0||de.current?.querySelector(`#${CSS.escape($e(ne))}`)?.scrollIntoView({block:"nearest"})},[re,ne]);const Pe=H(e=>{const r=xe.current;r.timer&&clearTimeout(r.timer),r.buffer+=e,r.timer=setTimeout(()=>{r.buffer="",r.timer=null},500);const i=re?ne:Be,n=t(Ce,r.buffer,i);n<0||(re?ae(n):L?(ae(n),ie(!0)):Le(n))},[re,ne,Be,Ce,Le,L]),We=re?a(N,(e,t)=>{const r=(i=e.value,L?Ee.includes(i):l===i);var i;const n=t===ne;/* @__PURE__ */
|
|
5
|
+
return C("div",{id:$e(t),role:"option",lang:e.description||e.labelStyle||P?void 0:e.lang,"aria-selected":r,"aria-disabled":e.disabled||void 0,onPointerEnter:()=>{e.disabled||ae(t)},onClick:()=>Le(t),className:`mx-1 cursor-pointer truncate rounded-lg ${ve}${L?" flex items-center gap-2":""}\n ${e.disabled?"cursor-not-allowed text-gray-400":n?"bg-blue-50 text-blue-700":r?"font-medium text-blue-600":"text-gray-700"}`,children:[L&&/* @__PURE__ */E(o,{selected:r}),P?/* @__PURE__ */E("span",{className:"block min-w-0 flex-1 truncate",children:P(e,{selected:r,active:n})}):L?/* @__PURE__ */C("span",{className:"block min-w-0 flex-1",children:[
|
|
6
|
+
/* @__PURE__ */E("span",{lang:e.lang,className:"block truncate",style:I(e),children:e.label}),e.description&&/* @__PURE__ */E("span",{className:he,children:e.description})]}):e.description||e.labelStyle?
|
|
7
|
+
/* @__PURE__ */C(O,{children:[
|
|
8
|
+
/* @__PURE__ */E("span",{lang:e.lang,className:"block truncate",style:I(e),children:e.label}),e.description&&/* @__PURE__ */E("span",{className:he,children:e.description})]}):e.label]},e.value)},ke,"mx-1"):null,Fe=void 0!==Re?
|
|
9
|
+
/* @__PURE__ */C("span",{className:"relative block min-w-0 truncate",children:[
|
|
10
|
+
/* @__PURE__ */E("span",{"aria-hidden":"true","data-select-value":"",className:"flex min-w-0 items-center gap-2 truncate",children:Re}),
|
|
11
|
+
/* @__PURE__ */E("span",{lang:void 0===Ke?Ae:void 0,className:"sr-only",children:Ke??Ue})]}):/* @__PURE__ */E("span",{lang:Ae,className:`block truncate ${void 0===Ue?c:""}`,children:Ue??z??" "}),Me={zIndex:h.popup,left:Ie?.left,top:Ie?.top,bottom:Ie?.bottom,width:Ie?.width,maxHeight:Ie?.maxHeight??b,visibility:Ie?void 0:"hidden",...g()},Ye=/* @__PURE__ */E("div",{ref:de,id:Ne,role:"listbox","aria-labelledby":_??(Z?void 0:we),"aria-label":_?void 0:Z,"aria-multiselectable":L||void 0,className:pe?"min-h-0 shrink overflow-y-auto py-1":"fixed overflow-y-auto rounded-(--radius-popup) py-1",style:pe?null!==fe?{maxHeight:fe}:void 0:null!==fe?{...Me,maxHeight:fe}:Me,children:We}),Qe=pe?/* @__PURE__ */C("div",{ref:se,className:"fixed flex flex-col overflow-hidden rounded-(--radius-popup)",style:Me,children:[Ye,
|
|
12
|
+
/* @__PURE__ */E("div",{className:"shrink-0 border-t border-(--rosh-glass-solid-border) px-1 py-1",children:Y.map((e,t)=>/* @__PURE__ */C("button",{ref:e=>{ce.current[t]=e},type:"button","data-select-action":"","aria-disabled":e.disabled||void 0,onClick:()=>(e=>{e.disabled||(Ve(),e.onSelect())})(e),onKeyDown:e=>((e,t)=>{const r=(Y?.length??0)-1,i=t=>{e.preventDefault(),ce.current[t]?.focus()},n=()=>{e.preventDefault(),oe.current?.focus()};switch(e.key){case"ArrowDown":return void i(Math.min(t+1,r));case"ArrowUp":return void(0===t?n():i(t-1));case"Home":return void i(0);case"End":return void i(r);case"Tab":return e.shiftKey?void(0===t?n():i(t-1)):t<r?void i(t+1):(e.preventDefault(),void Ve());case"Escape":return e.preventDefault(),e.stopPropagation(),void Ve()}})(e,t),className:`flex w-full items-center gap-2 rounded-lg ${ve} text-left rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] ${e.disabled?"cursor-not-allowed text-ink-faintest":"cursor-pointer text-ink hover:bg-accent-tint hover:text-blue-700"}`,children:[e.icon&&/* @__PURE__ */E(m,{name:e.icon,"aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
13
|
+
/* @__PURE__ */E("span",{className:"min-w-0 flex-1 truncate",children:e.label})]},e.label))})]}):Ye;/* @__PURE__ */
|
|
14
|
+
return C("div",{ref:le,className:"relative",children:[
|
|
15
|
+
/* @__PURE__ */E("button",{ref:oe,id:we,type:"button",role:"combobox","aria-haspopup":"listbox","aria-expanded":re,"aria-controls":re?Ne:void 0,"aria-activedescendant":re&&ne>=0?$e(ne):void 0,"aria-invalid":U||void 0,"aria-describedby":Te,"aria-label":Z,"aria-labelledby":_,title:G,disabled:R,"aria-readonly":M||void 0,onClick:()=>re?Ve():Ge(),onKeyDown:t=>{if(!R&&!M)switch(t.key){case"ArrowDown":return t.preventDefault(),void(re?ae(e=>i(Ce,e,1)):Ge());case"ArrowUp":return t.preventDefault(),void(re?ae(e=>i(Ce,e,-1)):Ge());case"Home":return void(re&&(t.preventDefault(),ae(e(Ce))));case"End":return void(re&&(t.preventDefault(),ae(r(Ce))));case"Enter":return void(re&&(t.preventDefault(),Le(ne)));case" ":return t.preventDefault(),void(re?Le(ne):Ge());case"Escape":return void(re&&(t.preventDefault(),t.stopPropagation(),Ve()));case"Tab":return re&&pe&&!t.shiftKey?(t.preventDefault(),void ce.current[0]?.focus()):void(re&&Ve(!1));default:1!==t.key.length||t.metaKey||t.ctrlKey||t.altKey||(t.preventDefault(),Pe(t.key))}},className:s({invalid:U,size:K,readOnly:M,auto:He,className:`${M?"":"pr-8 "}text-left ${A}`.trim()}),children:Q?
|
|
16
|
+
/* @__PURE__ */C("span",{className:"flex min-w-0 items-center gap-1",children:[Fe,
|
|
17
|
+
/* @__PURE__ */E("span",{"aria-hidden":"true","data-select-changed":"",className:"shrink-0",children:"*"})]}):Fe}),Q&&/* @__PURE__ */E("span",{id:De,hidden:!0,children:ge.select.changed}),He&&/* @__PURE__ */E("span",{id:Se,hidden:!0,children:ge.settingView.auto}),!M&&/* @__PURE__ */E(m,{name:"chevron-up-down","aria-hidden":"true",className:`pointer-events-none absolute right-2.5 top-1/2 h-4 w-4 -translate-y-1/2 ${c}`,strokeWidth:2}),
|
|
18
|
+
/* @__PURE__ */C("select",{ref:te,value:l,multiple:L||void 0,onChange:e=>Oe(L?Array.from(e.target.selectedOptions,e=>e.value):e.target.value),disabled:R,"aria-hidden":"true",tabIndex:-1,className:"sr-only",...ee,children:[void 0!==z&&!L&&/* @__PURE__ */E("option",{value:"",disabled:!0,children:z}),
|
|
19
|
+
/* @__PURE__ */E(B,{items:N})]}),re&&T(Qe,document.body)]})}),A=N(function({touchSize:e,...t},r){const i=u(),n=e??"touch";return!i||void 0===t.footer&&void 0===t.changed||t.readOnly?i&&!t.readOnly?/* @__PURE__ */E(z,{ref:r,...t,size:n}):/* @__PURE__ */E(U,{ref:r,...t}):/* @__PURE__ */E(U,{ref:r,...t,size:n})});export{z as NativeSelect,A as Select_default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-7QSDPSXP.js";import{
|
|
1
|
+
import{buildQuerySections as e,buildEmptySections as t,flattenRows as r,DEFAULT_MAGNIFIER as n,stepIndex as a,nextGroupIndex as s,SEE_ALL_ICON as l,resultTypeKey as o}from"./chunk-WGRS6QBT.js";import{useDismissPopupsOnOpen as i}from"./chunk-7QSDPSXP.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{glassStyle as d}from"./chunk-F27JJHNJ.js";import{SpinnerRing as u,LoadingSpinner as p}from"./chunk-R2VKEMZH.js";import{useShellStrings as m}from"./chunk-GDQJBQ5B.js";import{useState as h,useRef as f,useEffect as y,useMemo as g,useId as x,useCallback as b}from"react";import{createPortal as k}from"react-dom";import{jsxs as v,jsx as w}from"react/jsx-runtime";function N(e){if(Array.isArray(e))return{results:e,truncatedTypes:[]};if(e&&"object"==typeof e&&Array.isArray(e.results)){const{results:t,truncatedTypes:r}=e;return{results:t,truncatedTypes:Array.isArray(r)?r:[]}}return{results:[],truncatedTypes:[]}}var A=[];function L(e,t,r){const[n,a]=h([]),[s,l]=h(A),[o,i]=h(!1),[c,d]=h("none"),u=f(function(){let e=0,t=null;const r=()=>{e+=1,t?.abort(),t=null};return{begin:()=>{r();const n=e,a=new AbortController;return t=a,{signal:a.signal,isCurrent:()=>n===e}},cancel:r}}());y(()=>{const n=u.current;if(e.length<r||!t||0===t.length)return n.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),void i(!1);i(!0);const s=setTimeout(async()=>{const r=n.begin(),s=await async function(e,t,r){const n=await Promise.all(e.map(async e=>{try{return{failed:!1,...N(await e(t,{signal:r}))}}catch(e){const t=r.aborted||function(e){if(!e||"object"!=typeof e)return!1;const{name:t,code:r}=e;return"AbortError"===t||"CanceledError"===t||"ERR_CANCELED"===r}(e);return{failed:!t,results:[],truncatedTypes:[]}}}));return{results:n.flatMap(e=>e.results),truncatedTypes:Array.from(new Set(n.flatMap(e=>e.truncatedTypes))),failed:n.filter(e=>e.failed).length}}(t,e,r.signal);r.isCurrent()&&(a(s.results),l(s.truncatedTypes),d(0===s.failed?"none":s.failed>=t.length?"all":"some"),i(!1))},250);return()=>{clearTimeout(s),n.cancel()}},[e,t,r]);return{results:n,truncatedTypes:s,loading:o,failure:c,reset:b(()=>{u.current.cancel(),a(e=>0===e.length?e:[]),l(A),d("none"),i(!1)},[])}}var C=(e,t)=>`${e}-opt-${t}`;function E(e,t){if("seeAll"===e.kind)return l;if("action"===e.kind)return e.icon??n;if(e.icon)return e.icon;const r=t?.[o(e.result)];return r||n}function T({sections:e,activeIdx:t,listId:r,label:n,typeIcons:a,groupCount:s,groupLabel:l,onHover:o,onPick:i}){let c=0;/* @__PURE__ */
|
|
2
2
|
return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.map(e=>/* @__PURE__ */v("div",{role:"group","aria-label":l(e.title,e.count,!!e.truncated),children:[
|
|
3
3
|
/* @__PURE__ */v("div",{"aria-hidden":"true",className:"flex items-center justify-between px-4 pt-2 pb-1 text-2xs font-semibold uppercase tracking-wide text-ink-faintest",children:[
|
|
4
4
|
/* @__PURE__ */w("span",{children:e.title}),
|
|
@@ -6,22 +6,22 @@ return w("div",{id:r,role:"listbox","aria-label":n,className:"py-1",children:e.m
|
|
|
6
6
|
return v("div",{id:C(r,n),role:"option","aria-selected":s,className:"flex items-center gap-3 w-full px-4 py-3 text-left cursor-pointer transition-colors "+(s?"bg-blue-50":"hover:bg-gray-50"),onMouseDown:e=>e.preventDefault(),onClick:()=>i(e),onMouseEnter:()=>o(n),children:[
|
|
7
7
|
/* @__PURE__ */w("svg",{className:"h-4 w-4 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,"aria-hidden":"true",children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:E(e,a)})}),
|
|
8
8
|
/* @__PURE__ */v("div",{className:"flex-1 min-w-0",children:[
|
|
9
|
-
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:E,quickActions:D,onSelect:I,recent:K,onRecord:
|
|
10
|
-
/* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:
|
|
9
|
+
/* @__PURE__ */w("p",{className:"text-sm font-medium truncate "+(u?"text-blue-600":"text-gray-900"),children:e.label}),d&&/* @__PURE__ */w("p",{className:"text-xs text-gray-400 truncate",children:d})]}),l&&/* @__PURE__ */w("span",{className:"shrink-0 rounded-full bg-gray-100 px-2 py-0.5 text-3xs font-medium text-ink-faint",children:l})]},e.key)})]},e.key))})}var j="react-os-shell:open-global-search";function D(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(j))}function I({providers:l,typeIcons:o,typeLabels:N,listRoutes:A,placeholder:E,quickActions:D,onSelect:I,recent:K,onRecord:R,favorites:B,hotkey:M=!0}={}){const P=m().search,S=E??P.placeholder,[$,J]=h(!1),[H,Q]=h(""),[W,z]=h(0),F=f(null),{results:G,truncatedTypes:V,loading:q,failure:U,reset:X}=L(H,l,2);y(()=>{const e=e=>{M&&!e.defaultPrevented&&(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),J(e=>!e)),"Escape"===e.key&&$&&J(!1)},t=()=>J(!0);return window.addEventListener("keydown",e),window.addEventListener(j,t),()=>{window.removeEventListener("keydown",e),window.removeEventListener(j,t)}},[$,M]),i($);const[Z,_]=h(!1);$!==Z&&(_($),$&&(Q(""),z(0),X())),y(()=>{$?setTimeout(()=>F.current?.focus(),50):Q("")},[$]),y(()=>{z(0)},[G]);const O=H.length>=2,Y=g(()=>O?e(G,D,H,P.actions,{truncatedTypes:V,listRoutes:A,typeLabels:N,seeAllLabel:P.seeAll}):t({recent:K,favorites:B,actions:D,typeLabels:N},P),[O,G,V,A,N,D,H,K,B,P]),ee=g(()=>r(Y),[Y]),te=Math.min(W,Math.max(ee.length-1,0)),re=x(),ne=ee.length>0;y(()=>{$&&0!==ee.length&&document.getElementById(C(re,te))?.scrollIntoView?.({block:"nearest"})},[$,te,ee.length,re]);const ae=b(e=>{J(!1),"action"!==e.kind?("result"!==e.kind&&"recent"!==e.kind||R?.(e.result),I?.(e.result)):e.action.onSelect()},[I,R]);return $?k(
|
|
10
|
+
/* @__PURE__ */v("div",{"data-global-search":"",className:"fixed inset-0 flex items-start justify-center pt-[15vh]",style:{zIndex:c.overlay},onClick:()=>J(!1),children:[
|
|
11
11
|
/* @__PURE__ */w("div",{"data-global-search-backdrop":"",className:"absolute inset-0 bg-black/50 backdrop-blur-sm"}),
|
|
12
|
-
/* @__PURE__ */v("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:
|
|
12
|
+
/* @__PURE__ */v("div",{className:"relative z-10 w-full max-w-xl rounded-(--radius-popup) overflow-hidden",onClick:e=>e.stopPropagation(),style:d(),children:[
|
|
13
13
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-gray-200",children:[
|
|
14
14
|
/* @__PURE__ */w("svg",{className:"h-5 w-5 text-gray-400 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */w("path",{strokeLinecap:"round",strokeLinejoin:"round",d:n})}),
|
|
15
|
-
/* @__PURE__ */w("input",{ref:
|
|
16
|
-
/* @__PURE__ */w("kbd",{className:"hidden sm:inline-flex items-center rounded border border-line-strong px-2 py-0.5 text-2xs font-medium text-ink-faintest",children:
|
|
17
|
-
/* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[
|
|
15
|
+
/* @__PURE__ */w("input",{ref:F,type:"text",value:H,onChange:e=>{Q(e.target.value),z(0)},onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),z(a(te,1,ee.length))):"ArrowUp"===e.key?(e.preventDefault(),z(a(te,-1,ee.length))):"Tab"===e.key&&ee.length>0?(e.preventDefault(),z(s(Y.map(e=>e.rows.length),te,e.shiftKey?-1:1))):"Enter"===e.key&&ee[te]&&ae(ee[te])},placeholder:S,role:"combobox","aria-expanded":ne,"aria-controls":ne?re:void 0,"aria-activedescendant":ne?C(re,te):void 0,"aria-autocomplete":"list",className:"flex-1 text-sm bg-transparent border-0 rosh-focus-ring placeholder-gray-400"}),q&&/* @__PURE__ */w("span",{"data-global-search-spinner":"",role:"status","aria-label":P.searching,className:"flex shrink-0",children:/* @__PURE__ */w(u,{className:"h-4 w-4",ink:"text-ink-faint"})}),
|
|
16
|
+
/* @__PURE__ */w("kbd",{className:"hidden sm:inline-flex items-center rounded border border-line-strong px-2 py-0.5 text-2xs font-medium text-ink-faintest",children:P.escBadge})]}),
|
|
17
|
+
/* @__PURE__ */v("div",{className:"max-h-[50vh] overflow-y-auto",children:[q&&0===ee.length&&/* @__PURE__ */w(p,{size:"sm",padding:"py-6",label:P.searching}),!q&&"all"===U&&O&&/* @__PURE__ */w("div",{role:"alert",className:"px-4 py-3 text-center text-sm text-red-600",children:P.searchFailed}),!q&&O&&0===ee.length&&"all"!==U&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:P.noResults}),ne&&/* @__PURE__ */w(T,{sections:Y,activeIdx:te,listId:re,label:P.listLabel,typeIcons:o,groupCount:P.groupCount,groupLabel:P.groupLabel,onHover:z,onPick:ae}),!q&&"some"===U&&O&&/* @__PURE__ */w("div",{role:"status",className:"px-4 py-2 text-xs text-amber-600",children:P.partialFailure}),!q&&!O&&0===ee.length&&/* @__PURE__ */w("div",{className:"px-4 py-6 text-center text-sm text-gray-400",children:P.minChars(2)})]}),
|
|
18
18
|
/* @__PURE__ */v("div",{className:"flex items-center justify-between px-4 py-2 border-t border-line-subtle bg-surface-sunken text-2xs text-ink-faintest",children:[
|
|
19
19
|
/* @__PURE__ */v("div",{className:"flex items-center gap-3",children:[
|
|
20
20
|
/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
21
21
|
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↑"}),
|
|
22
|
-
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↓"}),` ${
|
|
22
|
+
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:"↓"}),` ${P.navigate}`]}),
|
|
23
23
|
/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
24
|
-
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:
|
|
25
|
-
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:
|
|
24
|
+
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:P.enterKey}),` ${P.open}`]}),Y.length>1&&/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
25
|
+
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:P.tabKey}),` ${P.nextGroup}`]})]}),
|
|
26
26
|
/* @__PURE__ */v("span",{className:"flex items-center gap-1",children:[
|
|
27
|
-
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:
|
|
27
|
+
/* @__PURE__ */w("kbd",{className:"rounded border border-gray-300 px-1 py-0.5 font-medium",children:P.escKey}),` ${P.close}`]})]})]})]}),document.body):null}export{I as GlobalSearch,D as openGlobalSearch};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-
|
|
1
|
+
import{Checkbox_default as e}from"./chunk-CGZBDI6C.js";import{Pagination as t}from"./chunk-LXL2UCUR.js";import{TH_ONE_LINE as r,OneLineLabel as o}from"./chunk-S5SRXI4V.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{SpinnerRing as l}from"./chunk-R2VKEMZH.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{useState as i,useRef as a}from"react";import{jsxs as c,Fragment as d,jsx as h}from"react/jsx-runtime";function u(e){const t={};if(!e)return t;for(const[r,o]of Object.entries(e))!r.startsWith("data-")||"string"!=typeof o&&"number"!=typeof o&&"boolean"!=typeof o||(t[r]=o);return t}var m=e=>Array.isArray(e.columns),f=e=>"wide"===e.only?"rosh-dt-only-wide":"stacked"===e.only?"rosh-dt-only-stacked":"",g="rosh-dt-row-link rosh-focus-ring underline-offset-4 hover:underline",p={sm:"px-2 py-2",md:"px-3 py-2"},y={left:"text-left",right:"text-right",center:"text-center"};function b({direction:e}){/* @__PURE__ */
|
|
2
2
|
return c("span",{className:"ml-1 inline-flex flex-col leading-none","aria-hidden":"true",children:[
|
|
3
3
|
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("asc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 0L8 5H0z"})}),
|
|
4
|
-
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered
|
|
5
|
-
return h("th",{scope:"col",...
|
|
6
|
-
/* @__PURE__ */h(
|
|
7
|
-
/* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(
|
|
8
|
-
/* @__PURE__ */c("div",{onScroll:_,style:
|
|
4
|
+
/* @__PURE__ */h("svg",{className:"h-2 w-2 "+("desc"===e?"text-gray-700":"text-gray-300"),viewBox:"0 0 8 5",fill:"currentColor",children:/* @__PURE__ */h("path",{d:"M4 5L0 0h8z"})})]})}function w(e,t=!1){const r=t?"":" whitespace-nowrap";return e.code?`font-mono${r}`:e.numeric?`tabular-nums${r}`:""}function x({columns:x,data:v,rowKey:k,sort:N=null,onSortChange:C,pagination:j,caption:M,loading:B=!1,bordered:S=!1,size:$="md",minWidth:z,rowClassName:H,onRow:I,rowHref:T,onRowPress:L,linkAs:R,emptyText:D,selection:A,footer:E,virtualized:F,stackOnNarrow:O=!1,stackBelow:P,className:K=""}){const W=s(),G=D??W.table.empty,J=(e,t)=>"function"==typeof k?k(e,t):String(e[k]),Q=O&&!F,U=Q?x:x.flatMap(e=>{if(!m(e))return"stacked"===e.only?[]:[e];const t=e.columns.filter(e=>"stacked"!==e.only);return t.length?[{...e,columns:t}]:[]}),V=e=>Q?{role:e}:{},X=(e,t)=>(t??("string"==typeof e||"number"==typeof e?String(e):"")).trim()||void 0,[Z,q]=i(0),Y=F?.overscan??6,_=F?e=>{const t=Math.max(0,Math.floor(e.currentTarget.scrollTop/F.rowHeight)-Y);q(e=>e===t?e:t)}:void 0,ee=F?Math.ceil(F.height/F.rowHeight)+2*Y:v.length,te=F?Math.min(Z,Math.max(0,v.length-ee)):0,re=Math.min(v.length,te+ee),oe=F?te*F.rowHeight:0,ne=F?(v.length-re)*F.rowHeight:0,le=a(null),[se,ie]=i(0);n(()=>{if(!F)return;const e=le.current?.offsetHeight??0;ie(t=>t===e?t:e)});const ae=e=>e.sortField??e.key,ce=e=>N&&N.field===ae(e)?N.direction:null,de=U.flatMap(e=>m(e)?e.columns:[e]),he=U.some(m),ue=/* @__PURE__ */new Map;if(Q)for(const e of U)if(m(e))for(const t of e.columns)ue.set(t,X(e.title,e.label));const me=e=>{const t=X(e.title,e.label),r=ue.get(e);return t&&r?`${r} · ${t}`:t},fe=new Set(A?.selected??[]),ge=A?v.map((e,t)=>J(e,t)):[],pe=ge.length>0&&ge.every(e=>fe.has(e)),ye=ge.some(e=>fe.has(e)),be=A?36:0,we=de.length+(A?1:0),xe=de.some(e=>"left"===e.fixed),ve=Q&&!A&&de.some(e=>e.cardCorner),ke=R??"a",Ne=`${p[$]} ${"sm"===$?"text-xs":"text-sm"}`,Ce=(e,t)=>e.ellipsis?/* @__PURE__ */h("span",{className:"block w-0 min-w-full",children:t}):t,je=(e,t,n,l=0)=>{const s=ce(e),i=y[e.align??(e.numeric?"right":"left")],a="left"===e.fixed,d=!(!e.sortable||!C);/* @__PURE__ */
|
|
5
|
+
return h("th",{scope:"col",...V("columnheader"),rowSpan:n>1?n:void 0,"aria-sort":"asc"===s?"ascending":"desc"===s?"descending":d?"none":void 0,style:{width:e.width,...a?{left:(Be[t]??0)+be}:{},...F?{top:l}:{}},className:[Ne,i,r,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs",a?F?"sticky z-20 bg-gray-50":"sticky z-10 bg-gray-50":F?"sticky z-10 bg-gray-50":"",Q&&d?"rosh-dt-sort":"",Q?f(e):"",e.headerClassName??""].filter(Boolean).join(" "),children:Ce(e,d?/* @__PURE__ */c("button",{type:"button",onClick:()=>(e=>{if(!C)return;const t=ae(e),r=ce(e),o=e.sortFirst??"asc";C(null===r?{field:t,direction:o}:r===o?{field:t,direction:"asc"===o?"desc":"asc"}:null)})(e),"data-group":Q?ue.get(e):void 0,className:`inline-flex max-w-full items-center font-semibold uppercase tracking-wide hover:text-ink ${i}`,children:[
|
|
6
|
+
/* @__PURE__ */h(o,{children:e.title}),
|
|
7
|
+
/* @__PURE__ */h(b,{direction:s})]}):/* @__PURE__ */h(o,{children:e.title}))},e.key)};let Me=0;const Be=de.map(e=>{if("left"!==e.fixed)return null;const t=Me;return Me+=e.width??0,t}),Se=/* @__PURE__ */c(d,{children:[
|
|
8
|
+
/* @__PURE__ */c("div",{onScroll:_,style:F?{maxHeight:F.height}:void 0,className:`relative overflow-x-auto ${F?"overflow-y-auto":""} ${S?"rounded-lg border border-gray-200":""}${Q?" rosh-dt-scroll":""}`.trim(),children:[B&&
|
|
9
9
|
/* @__PURE__ */c("div",{className:"absolute inset-0 z-20 flex items-start justify-center bg-white/60 pt-8",role:"status","aria-live":"polite",children:[
|
|
10
|
-
/* @__PURE__ */h(
|
|
11
|
-
/* @__PURE__ */h("span",{className:"sr-only",children:
|
|
12
|
-
/* @__PURE__ */c("table",{...
|
|
13
|
-
/* @__PURE__ */c("thead",{...
|
|
14
|
-
/* @__PURE__ */c("tr",{ref:le,...
|
|
15
|
-
/* @__PURE__ */h("tbody",{...
|
|
16
|
-
return c("tr",{...u(n),...
|
|
17
|
-
return h("td",{...
|
|
18
|
-
return h("td",{...
|
|
19
|
-
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},
|
|
20
|
-
return h("div",Q?void 0!==
|
|
10
|
+
/* @__PURE__ */h(l,{className:"h-6 w-6"}),
|
|
11
|
+
/* @__PURE__ */h("span",{className:"sr-only",children:W.table.loading})]}),
|
|
12
|
+
/* @__PURE__ */c("table",{...V("table"),className:(Q?"rosh-dt-table ":"")+"w-full border-collapse tabular-nums",style:z?{minWidth:z}:void 0,children:[M&&/* @__PURE__ */h("caption",{className:"sr-only",children:M}),
|
|
13
|
+
/* @__PURE__ */c("thead",{...V("rowgroup"),className:Q?"rosh-dt-head":void 0,children:[
|
|
14
|
+
/* @__PURE__ */c("tr",{ref:le,...V("row"),className:"border-b border-gray-200 bg-gray-50",children:[A&&/* @__PURE__ */h("th",{scope:"col",...V("columnheader"),rowSpan:he?2:void 0,style:{width:36,...F?{top:0}:{}},className:[Ne,r,xe||F?"sticky z-20 bg-gray-50":"",xe?"left-0":"",Q?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":W.table.selectAll,checked:pe,indeterminate:ye&&!pe,onChange:()=>{if(!A)return;const e=new Set(ge);A.onChange(pe?A.selected.filter(t=>!e.has(t)):[...A.selected,...ge.filter(e=>!fe.has(e))])}})}),U.map((e,t)=>m(e)?/* @__PURE__ */h("th",{scope:"colgroup",...V("columnheader"),colSpan:e.columns.length,style:F?{top:0}:void 0,className:[Ne,"text-center",r,"font-semibold uppercase tracking-wide text-gray-500","sm"===$?"text-2xs":"text-xs","border-b border-gray-200",F?"sticky z-10 bg-gray-50":"",e.headerClassName??""].filter(Boolean).join(" "),children:/* @__PURE__ */h(o,{children:e.title})},e.key??`group-${t}`):je(e,de.indexOf(e),he?2:1))]}),he&&/* @__PURE__ */h("tr",{...V("row"),className:"border-b border-gray-200 bg-gray-50",children:U.flatMap(e=>m(e)?e.columns:[]).map(e=>je(e,de.indexOf(e),1,se))})]}),
|
|
15
|
+
/* @__PURE__ */h("tbody",{...V("rowgroup"),className:Q?"rosh-dt-body":void 0,children:0!==v.length||B?/* @__PURE__ */c(d,{children:[oe>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:oe,padding:0,border:0}})}),v.slice(te,re).map((t,r)=>{const o=te+r,n=I?.(t,o),l=!!n?.current,s=T?.(t,o),i=void 0===s&&L?()=>L(t,o):void 0,a=void 0!==s||void 0!==i;let d=!1;const m=(e,t)=>{if(d=!0,!a)return e;const r=[g,i?"cursor-pointer text-left":"",t?.className??""].filter(Boolean).join(" "),o=l?"true":void 0;return void 0!==s?/* @__PURE__ */h(ke,{href:s,className:r,"aria-current":o,children:e}):/* @__PURE__ */h("button",{type:"button",onClick:i,className:r,"aria-current":o,children:e})},p=de.map(e=>e.render?e.render(t,o,m):e.dataIndex?t[e.dataIndex]:null);if(a&&!d){const e=de.findIndex(e=>"stacked"!==e.only&&!e.cardCorner),t=de.findIndex(e=>"wide"!==e.only&&!e.cardCorner);for(const r of/* @__PURE__ */new Set([e,t]))r>=0&&(p[r]=m(p[r]))}const b=e=>e?t=>{t.currentTarget.contains(t.relatedTarget)||e()}:void 0;/* @__PURE__ */
|
|
16
|
+
return c("tr",{...u(n),...V("row"),style:F?{height:F.rowHeight}:void 0,onClick:n?.onClick,onMouseEnter:n?.onMouseEnter,onMouseLeave:n?.onMouseLeave,onFocus:b(n?.onFocus),onBlur:b(n?.onBlur),"aria-current":l&&!a?"true":void 0,...n?.onClick?{tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&("Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick?.()))}}:{},className:[Q?A?"rosh-dt-row rosh-dt-row-select":"rosh-dt-row":"",Q&&ve?"rosh-dt-row-corner":"","border-b border-gray-100 last:border-b-0",n?.onClick?"cursor-pointer hover:bg-gray-50 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"",a?"rosh-dt-linked hover:bg-gray-50":"",l?"rosh-dt-current":"",H?.(t,o)??"",n?.className??""].filter(Boolean).join(" "),children:[A&&(()=>{const r=J(t,o);/* @__PURE__ */
|
|
17
|
+
return h("td",{...V("cell"),style:{width:36},onClick:e=>e.stopPropagation(),className:[Ne,xe?"sticky left-0 z-10 bg-white":"",Q?"rosh-dt-select":""].filter(Boolean).join(" "),children:/* @__PURE__ */h(e,{"aria-label":W.table.selectRow,checked:fe.has(r),onChange:()=>(e=>{A&&A.onChange(fe.has(e)?A.selected.filter(t=>t!==e):[...A.selected,e])})(r)})})})(),de.map((e,t)=>{const r="left"===e.fixed,o=p[t],n=ve&&!!e.cardCorner,l=Q&&!n&&"wide"!==e.only;/* @__PURE__ */
|
|
18
|
+
return h("td",{...V("cell"),"data-label":l?me(e):void 0,style:r?{left:(Be[t]??0)+be}:void 0,className:[l?e.ellipsis?"rosh-dt-cell rosh-dt-clip":"rosh-dt-cell":"",n?"rosh-dt-corner":"",Q?f(e):"",Ne,y[e.align??(e.numeric?"right":"left")],Q?"":w(e),"text-ink-strongest",e.ellipsis?"max-w-0 truncate":"",r?"sticky z-10 bg-white":"",e.className??""].filter(Boolean).join(" "),children:Q?
|
|
19
|
+
/* @__PURE__ */h("span",{className:["rosh-dt-value",w(e,!0)].filter(Boolean).join(" "),children:o}):o},e.key)})]},J(t,o))}),ne>0&&/* @__PURE__ */h("tr",{"aria-hidden":"true",children:/* @__PURE__ */h("td",{colSpan:we,style:{height:ne,padding:0,border:0}})})]}):/* @__PURE__ */h("tr",{...V("row"),className:Q?"rosh-dt-empty":void 0,children:/* @__PURE__ */h("td",{...V("cell"),colSpan:we,className:`${Ne} py-10 text-center text-gray-500`,children:G})})})]}),E]}),j&&j.pageCount>1&&/* @__PURE__ */h("div",{className:Q?"rosh-dt-pager mt-3 flex justify-end":"mt-3 flex justify-end",children:/* @__PURE__ */h(t,{page:j.page,pageCount:j.pageCount,onPageChange:j.onPageChange})})]});/* @__PURE__ */
|
|
20
|
+
return h("div",Q?void 0!==P&&P>0&&40!==P?{className:`rosh-dt-at ${K}`.trim(),children:/* @__PURE__ */h("div",{className:"rosh-dt-stack",style:{width:40/P*100+"%"},children:/* @__PURE__ */h("div",{className:"rosh-dt-fit",style:{width:P/40*100+"%"},children:Se})})}:{className:`rosh-dt-stack ${K}`.trim(),children:Se}:{className:K,children:Se})}export{x as DataTable};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-
|
|
2
|
-
return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:$,className:M=""}){const
|
|
3
|
-
/* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${
|
|
1
|
+
import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-GDQJBQ5B.js";import{formatPercent as u,formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsxs as c,jsx as o}from"react/jsx-runtime";function d({at:a,title:e,className:t}){/* @__PURE__ */
|
|
2
|
+
return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:$,className:M=""}){const B=r().meter,j=s(),A=w??B.noData,D=null!=p&&Number.isFinite(p)?p:null,F=Number.isFinite(f)&&f>0?f:null;null==F&&a(`MetricBar:max:${String(f)}`,`[efficient-shell] MetricBar: max=${String(f)} is not a positive finite number, so there is no scale to draw a proportional bar against. Printing the value without a bar. Pass the real capacity, or leave the reading out entirely (value={null}) when it is unknown — do not pass 0.`);const G=e(v,"MetricBar"),Q=null!=D?G??t(l(D,g,b)):null,C=n(g),E=n(b),L=null!=D&&null!=F?x(D/F*100):0,P=null!=D?(y??(a=>100===F?u(a,1,j):m(a,j)))(D):"—",R=null!=D&&null!=F&&(null!=C||null!=E),S="md"===k||"lg"===k,z=S?"h-2":"h-1.5",H=null!=D&&null!=F,J=/* @__PURE__ */c("div",{...H?{role:"meter","aria-label":$??("string"==typeof h?h:void 0),"aria-valuemin":0,"aria-valuemax":F,"aria-valuenow":Math.min(F,Math.max(0,D)),"aria-valuetext":P}:{"aria-hidden":!0},className:H&&Q?`relative mt-2 ${z} rounded-full bg-gray-200`:`relative mt-2 ${z} rounded-full border border-dashed border-gray-300 bg-transparent`,children:[H&&
|
|
3
|
+
/* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${Q?Q.fill:"bg-gray-400"}`,style:{width:`${L}%`}}),R&&null!=F&&null!=C&&/* @__PURE__ */o(d,{at:x(C/F*100),title:B.warningAt(C),className:i.warning}),R&&null!=F&&null!=E&&/* @__PURE__ */o(d,{at:x(E/F*100),title:B.criticalAt(E),className:i.critical})]}),O=Q?Q.ink:null!=D?"text-gray-900":"text-gray-400";if(S){const a="lg"===k;/* @__PURE__ */
|
|
4
4
|
return c("div",{className:M,children:[null!=h&&/* @__PURE__ */o("div",{className:(a?"text-xs":"text-3xs")+" font-medium uppercase tracking-wide text-gray-500",children:h}),
|
|
5
5
|
/* @__PURE__ */c("div",{className:"mt-1 flex items-baseline gap-2",children:[
|
|
6
|
-
/* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${
|
|
7
|
-
/* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=
|
|
6
|
+
/* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${O}`,children:P}),
|
|
7
|
+
/* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=D?N:A})]}),J]})}/* @__PURE__ */
|
|
8
8
|
return c("div",{className:M,children:[
|
|
9
9
|
/* @__PURE__ */c("div",{className:"flex items-baseline gap-2",children:[null!=h&&/* @__PURE__ */o("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:h}),
|
|
10
|
-
/* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${
|
|
11
|
-
/* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=
|
|
10
|
+
/* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${O}`,children:P}),
|
|
11
|
+
/* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=D?N:A})]}),J]})}export{h as MetricBar};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-
|
|
2
|
-
return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:
|
|
1
|
+
import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-GDQJBQ5B.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),D=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=D[D.length-1];r&&r.to===e-1?r.to=e:D.push({from:e,to:e})});const F=D.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),j=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},C=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),j(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),j(t,o+r)),"Home"===e.key&&(e.preventDefault(),j(t,0)),"End"===e.key&&(e.preventDefault(),j(t,p))},P=o(null),A=t=>e=>{P.current=t,e.currentTarget.setPointerCapture(e.pointerId)},B=t=>e=>{P.current===t&&j(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},L=t=>()=>{P.current===t&&(P.current=null)},N=t=>{const e="from"===t?w:x;/* @__PURE__ */
|
|
2
|
+
return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:C(t),onPointerDown:A(t),onPointerMove:B(t),onPointerUp:L(t),onPointerCancel:L(t)},t)};/* @__PURE__ */
|
|
3
3
|
return n("div",{className:m,children:/* @__PURE__ */i("svg",{ref:g,width:"100%",height:u,viewBox:`0 0 ${s} ${u}`,role:"group","aria-label":d.window(a[w],a[x],a.length),children:[
|
|
4
4
|
/* @__PURE__ */n("path",{d:F,fill:e.grid}),
|
|
5
5
|
/* @__PURE__ */n("rect",{x:0,y:0,width:y(w),height:u,fill:e.surface,fillOpacity:.72}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-5VAIVRK6.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{AccessibleTable as e}from"./chunk-
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-ZMRGHVKS.js";import{arcPath as t}from"./chunk-VFC6QUEN.js";import{useHighlight as r}from"./chunk-CNYAHYE6.js";import{ChartTooltip as l}from"./chunk-WZ5QSSUM.js";import{CHART_INK as a,resolveSeriesColor as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as o}from"./chunk-GDQJBQ5B.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,[w,Q]=u(null),{highlighted:B}=r(),C=[];if(m(p,-Math.PI/2,2*Math.PI,0,0,"","",C),0===C.length)/* @__PURE__ */return s("p",{className:`text-sm text-gray-500 ${g??""}`,children:N});const E=Math.max(...C.map(e=>e.depth))+1,L=f/2,R=f/2,S=(f/2-8-b)/E,z=C.filter(e=>0===e.depth).reduce((e,t)=>e+t.value,0),A=e=>`color-mix(in oklab, ${n(e.branch)} ${Math.max(16,100-24*e.depth).toFixed(0)}%, ${a.surface})`,F=e=>null!==w?e.id===w:null===B||e.branchKey===B,G=w?C.find(e=>e.id===w):void 0,H=e=>c(e.value/z*100,1,$);/* @__PURE__ */
|
|
2
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":
|
|
4
|
-
/* @__PURE__ */s(e,{caption:
|
|
3
|
+
/* @__PURE__ */d("svg",{width:"100%",height:f,viewBox:`0 0 ${f} ${f}`,role:"img","aria-label":y.sunburst(j(z),E),onMouseLeave:()=>Q(null),children:[C.map(e=>/* @__PURE__ */s("path",{d:t(L,R,b+e.depth*S+v/2,b+(e.depth+1)*S-v/2,e.start,e.end),fill:A(e),fillOpacity:F(e)?1:.45,stroke:a.surface,strokeWidth:1,onMouseEnter:()=>Q(e.id)},e.id)),x&&/* @__PURE__ */s("text",{x:L,y:R+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:a.label,children:x})]}),G&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(l,{title:G.label,rows:[{key:"value",label:y.value,color:A(G),value:j(G.value)},{key:"share",label:y.share,color:a.muted,value:H(G)}]})}),
|
|
4
|
+
/* @__PURE__ */s(e,{caption:y.sunburst(j(z),E),head:[y.tableLevel,y.tableItem,y.value,y.share],rows:C.map(e=>[e.depth+1,e.label,j(e.value),H(e)])})]})}export{f as SunburstChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Breadcrumbs as e}from"./chunk-
|
|
1
|
+
import{Breadcrumbs as e}from"./chunk-XYECIBVX.js";import{jsxs as t,jsx as s}from"react/jsx-runtime";function i({title:i,description:r,subtitle:c,actions:a,children:n,icon:l,breadcrumbs:m}){const d=r??c,h=a??n;/* @__PURE__ */
|
|
2
2
|
return t("div",{className:"mb-6",children:[m&&m.length>0&&/* @__PURE__ */s(e,{items:m,className:"mb-3"}),
|
|
3
3
|
/* @__PURE__ */t("div",{className:"flex items-start justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */t("div",{children:[
|