efficient-shell 10.15.0 → 10.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/{Browser-WR4GMYE7.js → Browser-Q5BYSSW3.js} +14 -14
- package/dist/Calculator-6NJNSIRN.js +29 -0
- package/dist/{CurrencyConverter-HEAAQX23.js → CurrencyConverter-42IHLJVV.js} +9 -9
- package/dist/{Documents-NSPKXCTF.js → Documents-GGEPMWB5.js} +27 -27
- package/dist/Files-OVNXUYOV.js +88 -0
- package/dist/{Notepad-5LSFAYXO.js → Notepad-L2LOWTSE.js} +9 -9
- package/dist/{PdfViewer-LU5JKHSG.js → PdfViewer-Y3SAVADX.js} +1 -1
- package/dist/{PomodoroTimer-5V32QOCZ.js → PomodoroTimer-PD7POYX5.js} +19 -19
- package/dist/{Preview-PDVZZRSK.js → Preview-HM2Z3EJO.js} +30 -30
- package/dist/Sidebar-2HHICMZZ.js +44 -0
- package/dist/{Spreadsheet-K4IAI3A2.js → Spreadsheet-2E4TQ64O.js} +13 -13
- package/dist/{Stock-AOCHAKUF.js → Stock-IABQRSXZ.js} +3 -3
- package/dist/{Weather-F2QHTG32.js → Weather-4QPYOENN.js} +22 -22
- package/dist/{WorldClock-G72577HU.js → WorldClock-3ZVRBLEW.js} +6 -6
- package/dist/ai/index.d.ts +77 -2
- package/dist/ai/index.js +80 -62
- 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/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/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-22RQC4EW.js +20 -0
- package/dist/chunk-26RTJKHD.js +2 -0
- package/dist/{chunk-F2R3UFNQ.js → chunk-2E2SUEEE.js} +1 -1
- package/dist/chunk-2H6YNMBE.js +14 -0
- package/dist/{chunk-N2RHM432.js → chunk-2VGQS6CW.js} +1 -1
- package/dist/{chunk-B25RVAVS.js → chunk-2YSGXZOL.js} +63 -63
- package/dist/{chunk-SQCUN2DX.js → chunk-34URULVW.js} +1 -1
- package/dist/{chunk-5LCDCO46.js → chunk-3ELLBQPS.js} +1 -1
- package/dist/{chunk-M22B3Y5Y.js → chunk-3IUPYCW3.js} +1 -1
- package/dist/{chunk-NZQCDFDG.js → chunk-3NW5LD7D.js} +3 -3
- package/dist/{chunk-POQ4ETLL.js → chunk-3PR5YMWZ.js} +1 -1
- package/dist/{chunk-FGJOGBGZ.js → chunk-3UXXA2CS.js} +8 -8
- package/dist/{chunk-XDBG4HPV.js → chunk-4EZIWLJJ.js} +1 -1
- package/dist/{chunk-EYEB3J77.js → chunk-4HBSQGRI.js} +5 -5
- package/dist/{chunk-V2MIQ4GJ.js → chunk-4UKGVLFP.js} +2 -2
- package/dist/{chunk-EZEYKCI6.js → chunk-4ULRP4Y4.js} +1 -1
- package/dist/{chunk-FRVNDEV2.js → chunk-4WEFGKJL.js} +8 -8
- package/dist/{chunk-FUVVO6YP.js → chunk-54NMFQMW.js} +4 -4
- package/dist/{chunk-KJCTXWF7.js → chunk-5QGBVTGS.js} +2 -2
- package/dist/{chunk-LVBO2OMQ.js → chunk-5SIOCKCK.js} +1 -1
- package/dist/{chunk-OSVY6SUO.js → chunk-5TDQPZDB.js} +11 -11
- package/dist/chunk-5TQLUPZD.js +6 -0
- package/dist/{chunk-7PSIPTOE.js → chunk-5WYRAJ5F.js} +1 -1
- package/dist/chunk-67MQ5S32.js +8 -0
- package/dist/chunk-6JSXIEH2.js +4 -0
- package/dist/{chunk-36R3R3IB.js → chunk-6V4INP7J.js} +10 -10
- package/dist/{chunk-Q3IR5SKD.js → chunk-6XBWM453.js} +1 -1
- package/dist/{chunk-RFEET2LS.js → chunk-77AQNJE2.js} +8 -8
- package/dist/chunk-77MOYIQW.js +15 -0
- package/dist/{chunk-AKM6JBMD.js → chunk-7ELJQL7J.js} +1 -1
- package/dist/chunk-7INZ7O3A.js +5 -0
- package/dist/{chunk-G4JTO5PB.js → chunk-7JGR7WPD.js} +1 -1
- package/dist/{chunk-UPQW4GCT.js → chunk-7TZV6G2F.js} +1 -1
- package/dist/{chunk-A267MPGS.js → chunk-7VBXIIEC.js} +3 -3
- package/dist/{chunk-MCYFUIXH.js → chunk-A42MKJA3.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-FFZREKEF.js → chunk-AYDW63LV.js} +7 -7
- package/dist/chunk-B23RG53S.js +14 -0
- package/dist/chunk-B3CN55UI.js +2 -0
- package/dist/{chunk-ZLSUQAD3.js → chunk-C6Y7B73Q.js} +1 -1
- package/dist/{chunk-QP4UPCXQ.js → chunk-C764JODK.js} +1 -1
- package/dist/{chunk-LEDUD23S.js → chunk-CLTRQ7AQ.js} +1 -1
- package/dist/chunk-CUHUZBFH.js +29 -0
- package/dist/chunk-CXYHFGUY.js +9 -0
- package/dist/{chunk-EHGGSUXA.js → chunk-DCRLJMQ6.js} +1 -1
- package/dist/chunk-DESWIPOZ.js +3 -0
- package/dist/{chunk-4XS32UWF.js → chunk-DGZAQXTW.js} +4 -4
- package/dist/{chunk-SP2AUVIU.js → chunk-DHIQ46C5.js} +3 -3
- package/dist/{chunk-IOJNSX4N.js → chunk-DQQKG46I.js} +7 -7
- package/dist/chunk-DYNJ2H6R.js +8 -0
- package/dist/{chunk-INNIWRVU.js → chunk-E6GDAV5R.js} +2 -2
- package/dist/{chunk-ID6WFAXW.js → chunk-ECJKIPWU.js} +1 -1
- package/dist/chunk-EJUNGVK2.js +22 -0
- package/dist/{chunk-3EJ64VKE.js → chunk-EN5NXWT6.js} +1 -1
- package/dist/{chunk-MCDM2G4W.js → chunk-EOWUUOVE.js} +1 -1
- package/dist/{chunk-S52GQQVB.js → chunk-EPY34L26.js} +1 -1
- package/dist/{chunk-AJVUND5A.js → chunk-FACWYKL6.js} +4 -4
- package/dist/{chunk-ZL5OSF26.js → chunk-FKRPQDFX.js} +19 -19
- package/dist/{chunk-4VTJEKHX.js → chunk-FOFZI62F.js} +1 -1
- package/dist/{chunk-IC7BEFE3.js → chunk-FS6EOU4G.js} +1 -1
- package/dist/{chunk-WZ5QSSUM.js → chunk-G4GVLK44.js} +6 -6
- package/dist/chunk-GDQJBQ5B.js +1 -0
- package/dist/{chunk-XJUREXYW.js → chunk-GEP4FROW.js} +1 -1
- package/dist/{chunk-5N5AAYQV.js → chunk-GISDIVFK.js} +1 -1
- package/dist/chunk-HJCUDXLV.js +1 -0
- package/dist/{chunk-ESYYKGN4.js → chunk-HJW67KA7.js} +1 -1
- package/dist/{chunk-NBB2RKDH.js → chunk-HV47GP2C.js} +5 -5
- package/dist/chunk-I33SVQ7P.js +8 -0
- package/dist/chunk-I4VIEGCX.js +2 -0
- package/dist/{chunk-KJ4CBZEQ.js → chunk-IMDGMUE3.js} +1 -1
- package/dist/{chunk-HNBGLF4B.js → chunk-JFV5CQN4.js} +1 -1
- package/dist/{chunk-7MSC3Z5H.js → chunk-JH4ZCPHW.js} +8 -8
- package/dist/chunk-JIGFR7Z3.js +11 -0
- package/dist/chunk-JNQKBN5M.js +7 -0
- package/dist/{chunk-OOLPDASG.js → chunk-JSG2AKCG.js} +1 -1
- package/dist/{chunk-6RX4PVBU.js → chunk-JTMEFXRL.js} +1 -1
- package/dist/{chunk-FQIA5BTN.js → chunk-JYIH2EBG.js} +7 -7
- package/dist/chunk-K4JQ3FQI.js +2 -0
- package/dist/{chunk-ULAGXDOL.js → chunk-LXL2UCUR.js} +1 -1
- package/dist/{chunk-PUBJ5YHQ.js → chunk-LYHJHUQH.js} +1 -1
- package/dist/chunk-MJGK6QTO.js +7 -0
- package/dist/{chunk-B37JVKW5.js → chunk-MNNZGO2E.js} +1 -1
- package/dist/{chunk-XTCXX5LJ.js → chunk-MS5APD3V.js} +1 -1
- package/dist/chunk-MUXGWDEH.js +2 -0
- package/dist/{chunk-S5SRXI4V.js → chunk-MVZRZTQP.js} +1 -1
- package/dist/{chunk-MMQ6ETRD.js → chunk-N67QX3WW.js} +2 -2
- package/dist/{chunk-G7QK7WAK.js → chunk-N6CS2FO2.js} +1 -1
- package/dist/{chunk-4U57ANZF.js → chunk-NFB7PARJ.js} +4 -4
- package/dist/{chunk-HRPXJ4EI.js → chunk-NNZFC4O7.js} +1 -1
- package/dist/{chunk-ZI6SMZJ4.js → chunk-NU5HN3FZ.js} +12 -12
- package/dist/{chunk-66XPG5G3.js → chunk-NVD4AI5Y.js} +1 -1
- package/dist/{chunk-YLGQ6ACR.js → chunk-O47HKK6E.js} +2 -2
- package/dist/{chunk-M5LR7ZZX.js → chunk-O6JJIR4H.js} +1 -1
- package/dist/{chunk-BJXDOM2N.js → chunk-OBJGUJIE.js} +1 -1
- package/dist/{chunk-AUWTGM65.js → chunk-OH5L6HYW.js} +3 -3
- package/dist/{chunk-XPPLCLYK.js → chunk-OORL6BIG.js} +1 -1
- package/dist/{chunk-CHAWFMV4.js → chunk-OP5DOO3K.js} +4 -4
- package/dist/{chunk-ZURB2DCM.js → chunk-OPN4I565.js} +1 -1
- package/dist/{chunk-7SMV6G4Z.js → chunk-ORIXCEKO.js} +1 -1
- package/dist/{chunk-TOVKWNI2.js → chunk-P3RXXWXN.js} +6 -6
- package/dist/{chunk-ON67HF5K.js → chunk-PCTOL2FX.js} +8 -8
- package/dist/chunk-PLK2WHZG.js +27 -0
- package/dist/chunk-PN5FQVMB.js +7 -0
- package/dist/chunk-PUF75SMJ.js +1 -0
- package/dist/{chunk-YFMZKTJC.js → chunk-PW52RXPI.js} +1 -1
- package/dist/chunk-QDKAA3HR.js +2 -0
- package/dist/{chunk-SOGQZVPJ.js → chunk-QHPVAXHR.js} +5 -5
- package/dist/chunk-QO5E33DH.js +8 -0
- package/dist/{chunk-ARCQYF7G.js → chunk-QRYSL6QU.js} +17 -17
- package/dist/{chunk-LPXMHYTM.js → chunk-QVZKRROQ.js} +1 -1
- package/dist/{chunk-EXJXOKUU.js → chunk-QYL26AB4.js} +1 -1
- package/dist/{chunk-5FRFSPQ2.js → chunk-RBBIAIPH.js} +8 -8
- package/dist/{chunk-GKIU55T5.js → chunk-REWKL7MX.js} +2 -2
- package/dist/{chunk-CFAELIKH.js → chunk-RT4WOEVS.js} +6 -6
- package/dist/{chunk-PB3OC4BO.js → chunk-RUGQO7YF.js} +10 -10
- package/dist/{chunk-AJFWBEIG.js → chunk-RVRDDTEG.js} +9 -9
- package/dist/{chunk-5LXT3IUL.js → chunk-RXCGE2AY.js} +1 -1
- package/dist/{chunk-KKOADH55.js → chunk-S74LKSUB.js} +1 -1
- package/dist/{chunk-QYRMFGES.js → chunk-SAP4YI2Y.js} +1 -1
- package/dist/{chunk-NWURIQI3.js → chunk-SDDV3UCN.js} +18 -18
- package/dist/{chunk-KEPJWZJZ.js → chunk-SL77N7VT.js} +3 -3
- package/dist/chunk-SLU45G5J.js +19 -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-ZMRGHVKS.js → chunk-TKJBZIHT.js} +1 -1
- package/dist/chunk-TLMFVEMC.js +9 -0
- package/dist/{chunk-MQU3PZUS.js → chunk-TMMNCXQT.js} +1 -1
- package/dist/{chunk-EQZZ4V5X.js → chunk-TXDA7TTP.js} +1 -1
- package/dist/{chunk-ZL7O4KGQ.js → chunk-UDKTAG57.js} +1 -1
- package/dist/{chunk-UTWJKSET.js → chunk-UEISJFZH.js} +5 -5
- package/dist/{chunk-HL3DJTIC.js → chunk-UYRMW5MO.js} +7 -7
- package/dist/chunk-V6Y4OC6K.js +9 -0
- package/dist/{chunk-W5CJD54C.js → chunk-VAK5FQXH.js} +1 -1
- package/dist/{chunk-EK5WJQTR.js → chunk-VDUXPMOQ.js} +1 -1
- package/dist/{chunk-O7DW2BKY.js → chunk-VHF3CJVO.js} +28 -28
- package/dist/{chunk-OAT7OEWP.js → chunk-VIQ6OME2.js} +8 -8
- package/dist/{chunk-AJFR35CO.js → chunk-VN4KSRZ5.js} +4 -4
- package/dist/chunk-VQCSHJEF.js +6 -0
- package/dist/chunk-VWIYC2NB.js +13 -0
- package/dist/{chunk-UPCLAEKC.js → chunk-W3OWPBQL.js} +2 -2
- package/dist/chunk-WRQ4A5QY.js +1 -0
- package/dist/{chunk-NZCSLS4O.js → chunk-WTYQF7XJ.js} +3 -3
- package/dist/{chunk-N4REWGMM.js → chunk-WYFMSL4Q.js} +8 -8
- package/dist/{chunk-55W5TTKS.js → chunk-XCHAU2UN.js} +5 -5
- package/dist/chunk-XGJQVIEG.js +2 -0
- package/dist/{chunk-UWIFXNH6.js → chunk-XLWMM53L.js} +3 -3
- package/dist/{chunk-VKKK4WLS.js → chunk-XQZL6JDD.js} +6 -6
- package/dist/{chunk-JEH5EVIG.js → chunk-XSJHN2GD.js} +1 -1
- package/dist/chunk-XYBI57KO.js +12 -0
- package/dist/{chunk-3AH524CN.js → chunk-XYECIBVX.js} +1 -1
- package/dist/{chunk-TXNCDDB4.js → chunk-Y62TTKSY.js} +3 -3
- package/dist/{chunk-6C6TRDNI.js → chunk-YG2TWBDH.js} +1 -1
- package/dist/{chunk-U2WCV56F.js → chunk-YILGAEW3.js} +1 -1
- package/dist/chunk-YJ5IHIAI.js +2 -0
- package/dist/{chunk-LWEWURFT.js → chunk-YJXS7BR5.js} +13 -13
- package/dist/{chunk-NBVHJZVS.js → chunk-YQFGRYEF.js} +12 -12
- package/dist/{chunk-N3YBOXOF.js → chunk-YSDPFDAG.js} +1 -1
- package/dist/{chunk-SSM3EN7G.js → chunk-Z5A4EY2R.js} +1 -1
- package/dist/{chunk-ZW3IDCP2.js → chunk-ZGOHRLXG.js} +1 -1
- package/dist/{chunk-2RAOWHHM.js → chunk-ZHAWOZA7.js} +12 -12
- package/dist/chunk-ZQKA2XKH.js +12 -0
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/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/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 +1 -1
- package/dist/index.js +300 -300
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +4 -4
- 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.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-MV5JVQBS.js +0 -29
- package/dist/Files-5HAUE2PR.js +0 -88
- package/dist/Sidebar-E3VDFBF6.js +0 -44
- package/dist/chunk-25M7CYCR.js +0 -9
- package/dist/chunk-2JG5JU4M.js +0 -8
- package/dist/chunk-3GHTOSJP.js +0 -14
- package/dist/chunk-4AQ67NP2.js +0 -15
- package/dist/chunk-4PAWQEXM.js +0 -1
- package/dist/chunk-5JU53T3U.js +0 -27
- package/dist/chunk-6BB6A5OB.js +0 -6
- package/dist/chunk-6WSH6D5N.js +0 -29
- package/dist/chunk-7LQGPMRP.js +0 -3
- package/dist/chunk-CDA2VXBN.js +0 -8
- package/dist/chunk-CNLYFW47.js +0 -9
- package/dist/chunk-EFU4Z66K.js +0 -8
- package/dist/chunk-FJYTYW6M.js +0 -7
- package/dist/chunk-FX6DBXXD.js +0 -1
- package/dist/chunk-HXNMRJQ4.js +0 -2
- package/dist/chunk-IFA2EOAF.js +0 -4
- package/dist/chunk-KMEERBZV.js +0 -2
- package/dist/chunk-KORKSPHQ.js +0 -6
- package/dist/chunk-LWWMRL2Y.js +0 -5
- package/dist/chunk-M4K6FLIY.js +0 -1
- package/dist/chunk-NLGMJGD6.js +0 -14
- package/dist/chunk-OET2Q7P6.js +0 -19
- package/dist/chunk-RSS2ALHH.js +0 -9
- package/dist/chunk-SCYL5V5X.js +0 -20
- package/dist/chunk-SM7IDX7Y.js +0 -1
- package/dist/chunk-TIPU74XW.js +0 -22
- package/dist/chunk-UUKTYAWY.js +0 -7
- package/dist/chunk-V6F42DX3.js +0 -11
- package/dist/chunk-VWEG2WM4.js +0 -12
- package/dist/chunk-XIB72X74.js +0 -2
- package/dist/chunk-ZE5TNYWX.js +0 -7
- package/dist/chunk-ZHPHNQKM.js +0 -13
- package/dist/chunk-ZO244TWH.js +0 -8
- package/dist/chunk-ZZTCYEQ4.js +0 -12
- /package/dist/{chunk-6V6ANLHW.js → chunk-Y2AGVGOP.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-
|
|
1
|
+
import{Tooltip as e}from"./chunk-6XBWM453.js";import{jsxs as r,Fragment as n,jsx as i}from"react/jsx-runtime";var l=e=>!0===e||"true"===e;function o(e){e.preventDefault(),e.stopPropagation()}var t=(e,r)=>[e,r].filter(Boolean).join(" ")||void 0;function a({reason:l,id:o,block:t=!1,children:a}){/* @__PURE__ */
|
|
2
2
|
return r(n,{children:[
|
|
3
3
|
/* @__PURE__ */i(e,{content:l,describe:!1,className:t?"relative flex w-full":"relative inline-flex",children:a}),
|
|
4
4
|
/* @__PURE__ */i("span",{id:o,className:"sr-only",children:l})]})}export{a as OffWithReason,t as describedByWith,l as isAriaDisabled,o as swallowPress};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{choiceTrackClass as e,choiceTipClass as l,ChoiceContent as a,choiceItemClass as i}from"./chunk-JDQGHQ2C.js";import{Tooltip as r}from"./chunk-
|
|
1
|
+
import{choiceTrackClass as e,choiceTipClass as l,ChoiceContent as a,choiceItemClass as i}from"./chunk-JDQGHQ2C.js";import{Tooltip as r}from"./chunk-6XBWM453.js";import{useId as s}from"react";import{jsx as n,jsxs as o}from"react/jsx-runtime";function t({value:t,onChange:c,options:d,name:b,size:u="md",block:m=!1,label:h,className:p="","aria-labelledby":v,"aria-describedby":f}){const g={"aria-label":v?void 0:h,"aria-labelledby":v,"aria-describedby":f},N=s(),y=e(m,p),k=l(m);/* @__PURE__ */
|
|
2
2
|
return n("div",b?{role:"radiogroup",...g,className:y,children:d.map(e=>{const l=`${N}-${e.value}`,s=e.value===t,d=/* @__PURE__ */o("label",{htmlFor:l,className:i({size:u,selected:s,disabled:e.disabled,block:m}),children:[
|
|
3
3
|
/* @__PURE__ */n("input",{id:l,type:"radio",name:b,value:e.value,checked:s,disabled:e.disabled,"aria-describedby":e.title?`${l}-note`:void 0,onChange:()=>c(e.value),className:"absolute inset-0 m-0 h-full w-full appearance-none rounded-[inherit] bg-transparent cursor-[inherit] rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"}),
|
|
4
4
|
/* @__PURE__ */n(a,{icon:e.icon,label:e.label}),e.title&&/* @__PURE__ */n("span",{id:`${l}-note`,className:"sr-only",children:e.title})]},e.value);return e.title?/* @__PURE__ */n(r,{content:e.title,className:k,children:d},e.value):d})}:{role:"group",...g,className:y,children:d.map(e=>{const l=e.value===t,s=/* @__PURE__ */n("button",{type:"button","aria-pressed":l,disabled:e.disabled,onClick:()=>c(e.value),className:i({size:u,selected:l,disabled:e.disabled,block:m}),children:/* @__PURE__ */n(a,{icon:e.icon,label:e.label})},e.value);return e.title?/* @__PURE__ */n(r,{content:e.title,className:k,children:s},e.value):s})})}export{t as Segmented};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{useId as e}from"react";import{jsx as i,jsxs as s}from"react/jsx-runtime";function o({height:o=220,width:a=720,variant:h="area",bars:l=9,label:c,className:n}){const f=t().charts,p=c??f.loading,d=`${e()}-shimmer`,m=48,g=a-16,y=12,u=o-26;/* @__PURE__ */
|
|
2
2
|
return i("div",{className:n,children:/* @__PURE__ */s("svg",{width:"100%",height:o,viewBox:`0 0 ${a} ${o}`,role:"img","aria-label":p,"aria-busy":"true",children:[
|
|
3
3
|
/* @__PURE__ */i("defs",{children:/* @__PURE__ */s("linearGradient",{id:d,x1:"0",y1:"0",x2:"1",y2:"0",children:[
|
|
4
4
|
/* @__PURE__ */i("stop",{offset:"0%",stopColor:r.surface,stopOpacity:"0"}),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-JDQGHQ2C.js";import{Tooltip as l}from"./chunk-
|
|
2
|
-
return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=f(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),w(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${h(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,w=(e,t)=>`${e}-panel-${t}`;function y(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:f,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:C,className:F="","aria-label":E,"aria-labelledby":R,labelsFit:A=!1}){const L=i([]),$=i(null),N="pill"===x,[D,S]=c(null),
|
|
3
|
-
return s("div",{ref:$,role:"tablist","data-labels-shown":A?
|
|
1
|
+
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{ChoiceContent as t,choiceItemClass as n,choiceTipClass as r,choiceTrackClass as o}from"./chunk-JDQGHQ2C.js";import{Tooltip as l}from"./chunk-6XBWM453.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{useRef as i,useState as c,useEffect as d}from"react";import{jsx as s,jsxs as u,Fragment as m}from"react/jsx-runtime";var b=(e,t)=>`flex items-center border-b border-gray-200${e?"":" gap-1"} ${t}`.trim();function h(e,t,n="default"){return`-mb-px inline-flex items-center gap-2 border-b-2 px-3 py-2 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${t?"flex-1 justify-center ":""}${e?"border-blue-600 text-blue-600":`border-transparent ${"warning"===n?"text-amber-700":"text-gray-900"} hover:border-gray-300`}`}function f(e){if(!e||!e.startsWith("#")||e.length<2)return null;try{return document.getElementById(decodeURIComponent(e.slice(1)))}catch{return null}}function p(e,t){const n=e.filter(e=>!e.disabled).map(e=>({id:e.id,section:f(e.href)})).filter(e=>null!=e.section);if(0===n.length)return null;const r=function(e){for(let t=e.parentElement;t;t=t.parentElement){const e=getComputedStyle(t).overflowY;if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t}return document.scrollingElement??document.documentElement}(n[0].section);if(r.scrollTop>0&&r.scrollTop+r.clientHeight>=r.scrollHeight-1)return n[n.length-1].id;const o=Math.max(0,t.getBoundingClientRect().bottom)+8;let l=n[0].id;for(const e of n)e.section.getBoundingClientRect().top<=o&&(l=e.id);return l}function g({items:e,value:n,onChange:o,block:c=!1,className:u="","aria-label":m,"aria-labelledby":g}){const v=i(null),w=function(e,t,n,r){const o=i(0),l=i({items:t,value:n,onChange:r});l.current={items:t,value:n,onChange:r};const c=i(()=>{});return c.current=()=>{const t=e.current;if(!t||Date.now()<o.current)return;const n=p(l.current.items,t);null!=n&&n!==l.current.value&&l.current.onChange(n)},a(()=>{c.current()},[t]),d(()=>{let e=0;const t=()=>{e||(e=requestAnimationFrame(()=>{e=0,c.current()}))};return document.addEventListener("scroll",t,{capture:!0,passive:!0}),window.addEventListener("resize",t),()=>{document.removeEventListener("scroll",t,{capture:!0}),window.removeEventListener("resize",t),e&&cancelAnimationFrame(e)}},[]),e=>{o.current=Date.now()+800,e!==l.current.value&&l.current.onChange(e),window.setTimeout(()=>c.current(),850)}}(v,e,n,o);/* @__PURE__ */
|
|
2
|
+
return s("nav",{ref:v,"aria-label":m,"aria-labelledby":g,className:b(c,u),children:e.map(e=>{const o=e.id===n,a=/* @__PURE__ */s("a",{href:e.disabled?void 0:e.href,"aria-current":o?"location":void 0,"aria-disabled":e.disabled||void 0,onClick:e.disabled?void 0:t=>((e,t)=>{const n=f(t.href);n&&(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&(e.preventDefault(),w(t.id),n.scrollIntoView({block:"start",behavior:"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}),n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))})(t,e),className:`${h(o,c,"warning"===e.tone?"warning":"default")}${e.disabled?" cursor-not-allowed opacity-50":""}`,children:/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id);return null!=e.tooltip&&!1!==e.tooltip?/* @__PURE__ */s(l,{content:e.tooltip,className:c?r(c):void 0,children:a},e.id):a})})}var v=(e,t)=>`${e}-tab-${t}`,w=(e,t)=>`${e}-panel-${t}`;function y(e,t){const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=(parseFloat(n.columnGap)||0)*Math.max(0,t-1),l=e.parentElement;let a=1/0;if(l){const e=getComputedStyle(l);a=l.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:r+o,room:a}}function x(e){return e.items.some(e=>null!=e.href)?/* @__PURE__ */s(g,{...e}):/* @__PURE__ */s(k,{...e})}function k({items:f,value:p,onChange:g,variant:x="underline",block:k=!1,idPrefix:C,className:F="","aria-label":E,"aria-labelledby":R,labelsFit:A=!1}){const L=i([]),$=i(null),N="pill"===x,[D,S]=c(null),W=D??"none",H=i(()=>{});H.current=()=>{const t=$.current;if(!t||!A)return;const n=function(e){return[...e.querySelectorAll('[role="tab"]')].map(e=>{const t=getComputedStyle(e),n=(parseFloat(t.paddingLeft)||0)+(parseFloat(t.paddingRight)||0)+(parseFloat(t.borderLeftWidth)||0)+(parseFloat(t.borderRightWidth)||0),r=e.querySelector("[data-tab-glyph]")?.getBoundingClientRect().width??0,o=e.querySelector("[data-tab-word]")?.scrollWidth??0;return{bare:n+r,worded:n+r+(r&&o?8:0)+o,active:"true"===e.getAttribute("aria-selected")}})}(t);S(function({tabs:t,block:n,chrome:r,room:o}){if(!n)return e({buttons:t,orientation:"horizontal",chrome:r,room:o});if(0===t.length)return"none";const l=e=>r+e*t.length<=o+.5;if(l(Math.max(...t.map(e=>e.worded))))return"all";const a=t.find(e=>e.active);return a&&l(Math.max(a.worded,...t.map(e=>e.bare)))?"chosen":"none"}({tabs:n,block:k,...y(t,n.length)}))},a(()=>{H.current()}),d(()=>{const e=$.current?.parentElement;if(!A||!e)return;let t=!0;const n=()=>{t&&H.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[A]);const M=(e,t)=>{for(let n=1;n<=f.length;n+=1){const r=((e+t*n)%f.length+f.length)%f.length;if(!f[r]?.disabled)return r}return null},j=e=>{const t=1===e?f.map((e,t)=>t):f.map((e,t)=>f.length-1-t);for(const e of t)if(!f[e]?.disabled)return e;return null};/* @__PURE__ */
|
|
3
|
+
return s("div",{ref:$,role:"tablist","data-labels-shown":A?W:void 0,"aria-label":E,"aria-labelledby":R,onKeyDown:e=>{const t=f.findIndex(e=>e.id===p);let n=null;if("ArrowRight"===e.key||"ArrowDown"===e.key)n=M(t,1);else if("ArrowLeft"===e.key||"ArrowUp"===e.key)n=M(t,-1);else if("Home"===e.key)n=j(1);else{if("End"!==e.key)return;n=j(-1)}e.preventDefault(),null!==n&&n!==t&&(g(f[n].id),L.current[n]?.focus())},className:N?o(k,F):b(k,F),children:f.map((e,o)=>{const a=e.id===p,i=A&&null!=e.icon,c="all"===W||"chosen"===W&&a,d=/* @__PURE__ */s("button",{ref:e=>{L.current[o]=e},type:"button",role:"tab",id:C?v(C,e.id):void 0,"aria-controls":C?w(C,e.id):void 0,"aria-selected":a,tabIndex:a?0:-1,disabled:e.disabled,onClick:()=>g(e.id),className:N?n({selected:a,disabled:e.disabled,block:k}):h(a,k,"warning"===e.tone?"warning":"default"),children:i?/* @__PURE__ */u(m,{children:[
|
|
4
4
|
/* @__PURE__ */s("span",{"aria-hidden":"true","data-tab-glyph":"",className:"inline-flex shrink-0",children:e.icon}),
|
|
5
5
|
/* @__PURE__ */s("span",{"data-tab-word":c?"shown":"hidden",className:c?"whitespace-nowrap":"sr-only",children:e.label})]}):/* @__PURE__ */s(t,{icon:e.icon,label:e.label})},e.id),b=i?e.tooltip??e.label:e.tooltip;return null!=b&&!1!==b?/* @__PURE__ */s(l,{content:b,className:N||k?r(k):void 0,children:d},e.id):d})})}export{x as Tabs,v as tabButtonId,w as tabPanelId};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Button_default as t}from"./chunk-
|
|
1
|
+
import{isSafeLinkHref as e}from"./chunk-PJPK2ADX.js";import{Button_default as t}from"./chunk-I4VIEGCX.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useShellStrings as r}from"./chunk-GDQJBQ5B.js";import{createContext as l,useContext as s}from"react";import{jsx as a,jsxs as i}from"react/jsx-runtime";var c=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|`([^`]+)`|\*([^*]+)\*/g,o=l(void 0);function d({href:t,children:n}){const r=s(o),l=(t=>e(t.trim()))(t)?t:void 0;/* @__PURE__ */
|
|
2
2
|
return a("a",{href:l,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline",onClick:l&&r?e=>{(e=>!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))(e)&&r(l)&&e.preventDefault()}:void 0,children:n})}function u(e){const t=[];let n,r=0,l=0;const s=new RegExp(c.source,"g");for(;null!==(n=s.exec(e));)n.index>r&&t.push(e.slice(r,n.index)),void 0!==n[1]?t.push(
|
|
3
3
|
/* @__PURE__ */i("span",{className:"text-gray-400",children:["[",n[1],"]"]},l++)):void 0!==n[3]?t.push(
|
|
4
4
|
/* @__PURE__ */a(d,{href:n[4],children:n[3]},l++)):void 0!==n[5]?t.push(
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-
|
|
2
|
-
return v("div",{...Te?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Te?t=>{t.target.closest?.("button")||
|
|
1
|
+
import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-Z5A4EY2R.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-JTMEFXRL.js";import{ColoredBadge as u}from"./chunk-EPY34L26.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-2UO47XB4.js";import{Tooltip as f}from"./chunk-6XBWM453.js";import{useShellStrings as h}from"./chunk-GDQJBQ5B.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:T,dropType:C,onDropData:A,label:E,hint:F,error:L,required:O,className:I,accept:P="image/*",maxSizeBytes:z,maxFiles:B,fit:M="cover",thumbSize:S=96,placeholder:$,cta:R,acceptHint:H,showCover:Q=!1,coverLabel:W,busy:X=!1,busyLabel:Y,progress:q,disabled:J=!1,readOnly:U=!1,selected:G,onItemClick:Z,onItemDoubleClick:V,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=R??te.cta,ae=W??te.cover,ne=Y??te.uploading,le=g(),[ie,oe]=b(null),se=J||X,de=!(!k&&!N||se||U),ce=!!w&&!se&&!U,ue=!!j&&!se&&!U,me=!!K&&!J&&!ue,pe=!(!C||!A||se||U),fe=t(se),he=$??r(P,te),ge=d({accept:P,maxSizeBytes:z,maxFiles:B,acceptHint:H,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(C),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(C);t&&A(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:S,height:S},Ke=null==G?null:new Set(G),Te=!!Z,Ce=S<112,Ae=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,P),a=e.name??o(e.url),n=Q&&(e.cover??0===t);/* @__PURE__ */
|
|
2
|
+
return v("div",{...Te?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Te?t=>{t.target.closest?.("button")||Z(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:V?()=>V(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);T?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&T?t=>T("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Te?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Te?a:void 0,onKeyDown:Te&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),Z(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Te?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:M}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:M}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
|
|
3
3
|
/* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-surface p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Ce?
|
|
4
4
|
/* @__PURE__ */x(f,{content:e.label,children:/* @__PURE__ */x("span",{tabIndex:0,"aria-label":e.label,className:`flex rounded-full ${fe}`,children:/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"inline-flex items-center gap-0.5",children:[
|
|
5
|
-
/* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},
|
|
5
|
+
/* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Ee=de&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":te.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${fe}`,style:je,children:[
|
|
6
6
|
/* @__PURE__ */x(a,{className:"h-5 w-5"}),
|
|
7
|
-
/* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),
|
|
7
|
+
/* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Fe=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:S+32},children:[
|
|
8
8
|
/* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(a,{})}),
|
|
9
9
|
/* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:he}),
|
|
10
|
-
/* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),
|
|
11
|
-
return v(e,{label:
|
|
12
|
-
/* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":
|
|
13
|
-
/* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof
|
|
10
|
+
/* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),H&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:H})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:S+32},children:/* @__PURE__ */x("span",{className:X?"invisible":void 0,children:te.empty})});/* @__PURE__ */
|
|
11
|
+
return v(e,{label:E,labelId:E?`${le}-label`:void 0,htmlFor:le,hint:F,error:L,required:O,className:I,children:[
|
|
12
|
+
/* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":E?`${le}-label`:void 0,"aria-describedby":L?`${le}-error`:F?`${le}-hint`:void 0,"aria-busy":X||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Fe:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Te?
|
|
13
|
+
/* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof E?E:te.files,className:"contents",children:p.map(Ae)}):p.map(Ae),Ee]}),X&&/* @__PURE__ */x(l,{label:ne,progress:q})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
|
|
14
14
|
/* @__PURE__ */x(c,{rejections:ge.rejections})]})}export{k as FULL_BADGE_TILE_PX,N as MediaUploadGrid};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-2UO47XB4.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-2UO47XB4.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-GDQJBQ5B.js";import{jsx as r}from"react/jsx-runtime";var n=["left","center","right","justify"],a={left:"align-left",center:"align-center",right:"align-right",justify:"align-justify"};function i(t){switch(t){case"left":/* @__PURE__ */
|
|
2
2
|
return r(e,{name:"align-left"});case"center":/* @__PURE__ */
|
|
3
3
|
return r(e,{name:"align-center"});case"right":/* @__PURE__ */
|
|
4
4
|
return r(e,{name:"align-right"});case"justify":/* @__PURE__ */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{IconButton_default as e}from"./chunk-PUF75SMJ.js";import{CloseGlyph as t}from"./chunk-Z5A4EY2R.js";import{humanSize as n,useFileIntake as r,FileIntakeAlert as a}from"./chunk-JTMEFXRL.js";import{Button_default as s}from"./chunk-I4VIEGCX.js";import{Icon as i}from"./chunk-2UO47XB4.js";import{useShellStrings as c}from"./chunk-GDQJBQ5B.js";import{useRef as l,useEffect as o}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
2
2
|
return d(i,{name:"attach",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function p({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
3
3
|
return d(i,{name:"page",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function h({intake:e,dropLabel:t,className:n="",children:r}){const a=c().files;/* @__PURE__ */
|
|
4
4
|
return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,children:[r,
|
|
5
|
-
/* @__PURE__ */d("input",{...e.inputProps}),e.dragOver&&/* @__PURE__ */d("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-lg border-2 border-dashed border-blue-500 bg-blue-50/80 text-sm font-medium text-blue-600",children:t??a.drop})]})}function f({files:
|
|
5
|
+
/* @__PURE__ */d("input",{...e.inputProps}),e.dragOver&&/* @__PURE__ */d("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-lg border-2 border-dashed border-blue-500 bg-blue-50/80 text-sm font-medium text-blue-600",children:t??a.drop})]})}function f({files:e,onRemove:r,disabled:a=!1,className:s=""}){const i=c().files,m=l(/* @__PURE__ */new Map);o(()=>{const t=new Set(e);for(const[e,n]of m.current)t.has(e)||(URL.revokeObjectURL(n),m.current.delete(e))},[e]),o(()=>()=>{for(const e of m.current.values())URL.revokeObjectURL(e);m.current.clear()},[]);const h=e=>{if(!e.type.startsWith("image/")||"undefined"==typeof URL||"function"!=typeof URL.createObjectURL)return null;let t=m.current.get(e);return t||(t=URL.createObjectURL(e),m.current.set(e,t)),t};return 0===e.length?null:/* @__PURE__ */d("ul",{className:`flex flex-wrap gap-2 ${s}`,children:e.map((e,s)=>{const c=h(e);/* @__PURE__ */
|
|
6
6
|
return u("li",{className:"flex max-w-full items-center gap-2 rounded-md border border-line bg-surface-sunken py-1 pl-2 pr-1 text-xs text-ink",children:[c?/* @__PURE__ */d("img",{src:c,alt:"",className:"h-6 w-6 shrink-0 rounded object-cover"}):/* @__PURE__ */d("span",{className:"text-gray-400",children:/* @__PURE__ */d(p,{})}),
|
|
7
|
-
/* @__PURE__ */d("span",{className:"min-w-0 truncate",title:
|
|
8
|
-
/* @__PURE__ */d("span",{className:"shrink-0 tabular-nums text-gray-400",children:n(
|
|
9
|
-
/* @__PURE__ */d(
|
|
7
|
+
/* @__PURE__ */d("span",{className:"min-w-0 truncate",title:e.name,children:e.name}),
|
|
8
|
+
/* @__PURE__ */d("span",{className:"shrink-0 tabular-nums text-gray-400",children:n(e.size,i)}),r&&/* @__PURE__ */d("button",{type:"button",disabled:a,onClick:()=>r(s),"aria-label":i.remove(e.name),className:"shrink-0 rounded p-0.5 text-gray-400 hover:bg-gray-200 hover:text-gray-600 disabled:cursor-not-allowed",children:/* @__PURE__ */d(t,{className:"h-3.5 w-3.5"})})]},`${e.name}-${e.size}-${s}`)})})}function b({onClick:t,count:n=0,variant:r="button",label:a,disabled:i=!1}){const l=c().files,o=a??l.attach,p=n>0?`${o} (${n})`:o;return"icon"===r?/* @__PURE__ */u("span",{className:"relative inline-flex",children:[
|
|
9
|
+
/* @__PURE__ */d(e,{"aria-label":p,onClick:t,disabled:i,size:"sm",children:/* @__PURE__ */d(m,{})}),n>0&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"pointer-events-none absolute -right-1 -top-1 min-w-[1rem] rounded-full bg-accent-fill px-1 text-center text-2xs font-semibold leading-4 text-on-accent",children:n})]}):/* @__PURE__ */d(s,{type:"button",variant:"secondary",size:"sm",onClick:t,disabled:i,leftIcon:/* @__PURE__ */d(m,{}),children:p})}function x({files:e,onChange:t,accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m=!1,dropLabel:p,attachLabel:x,trigger:g="button",actions:k,onReject:j,className:N="",children:v}){const L=r({accept:n,maxSizeBytes:s,maxFiles:i,acceptHint:c,disabled:m,multiple:!0,currentCount:e.length,onAccept:n=>t([...e,...n])}),y=l([]);return o(()=>{j&&L.rejections.length>0&&L.rejections!==y.current&&(y.current=L.rejections,j(L.rejections))},[L.rejections,j]),/* @__PURE__ */u(h,{intake:L,dropLabel:p,className:N,children:[v,
|
|
10
10
|
/* @__PURE__ */d(f,{files:e,disabled:m,onRemove:n=>{L.clearRejections(),t(e.filter((e,t)=>t!==n))},className:"mt-2"}),
|
|
11
11
|
/* @__PURE__ */u("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[
|
|
12
12
|
/* @__PURE__ */d(b,{onClick:L.open,count:e.length,variant:g,label:x,disabled:m}),k]}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{PopupMenuDivider as e,PopupMenuLabel as l,menuTextRowStyle as t,PopupSubmenu as i,itemLook as a,MenuCheckMark as r}from"./chunk-
|
|
1
|
+
import{PopupMenuDivider as e,PopupMenuLabel as l,menuTextRowStyle as t,PopupSubmenu as i,itemLook as a,MenuCheckMark as r}from"./chunk-4WEFGKJL.js";import{jsx as n,jsxs as s}from"react/jsx-runtime";var d=e=>!!e&&"label"!==e.type&&"status"!==e.type&&"divider"!==e.type&&!e.disabled,c=(e,l)=>`${e}-status-${l}`;function o(e,l){return e.flatMap((e,t)=>"status"===e.type?[c(l,t)]:[]).join(" ")||void 0}function u(d,o){const{menuId:y,choose:b,toggle:h,followLink:p,rowProps:m=()=>({}),linkAs:k}=o,f=k??"a",v=(d,k)=>{if("divider"===d.type)/* @__PURE__ */
|
|
2
2
|
return n("div",{role:"separator",children:/* @__PURE__ */n(e,{})},d.key);if("label"===d.type)/* @__PURE__ */
|
|
3
3
|
return n("div",{id:`${y}-label-${k}`,children:/* @__PURE__ */n(l,{children:d.label})},d.key);if("status"===d.type)/* @__PURE__ */
|
|
4
4
|
return n("div",{id:c(y,k),className:"text-xs",style:t(),children:d.label},d.key);if("submenu"===d.type)/* @__PURE__ */
|
|
@@ -7,4 +7,4 @@ return s("button",{type:"button",role:"menuitemcheckbox","aria-checked":d.checke
|
|
|
7
7
|
/* @__PURE__ */n(r,{kind:"checkbox",checked:d.checked}),d.icon,d.label]},d.key)}if("radio"===d.type){const e=a(!1,d.disabled,"");/* @__PURE__ */
|
|
8
8
|
return s("button",{type:"button",role:"menuitemradio","aria-checked":d.checked,disabled:d.disabled,className:e.className,style:e.style,onClick:()=>b(d),...m(k,d),children:[
|
|
9
9
|
/* @__PURE__ */n(r,{kind:"radio",checked:d.checked}),d.icon,d.label]},d.key)}if((e=>"link"===e.type||void 0===e.type&&"string"==typeof e.href)(d)){const e=a(!1,d.disabled,"no-underline "+(d.current?"font-medium":""));return d.disabled?/* @__PURE__ */s("a",{role:"menuitem","aria-disabled":"true",className:e.className,style:e.style,...m(k,d),children:[d.icon,d.label]},d.key):/* @__PURE__ */s(f,{href:d.href,role:"menuitem","aria-current":d.current?"page":void 0,className:e.className,style:e.style,onClick:p,...m(k,d),children:[d.icon,d.label]},d.key)}const v=a(d.danger,d.disabled,"");/* @__PURE__ */
|
|
10
|
-
return s("button",{type:"button",role:"menuitem",disabled:d.disabled,className:v.className,style:v.style,onClick:()=>b(d),...m(k,d),children:[d.icon,d.label]},d.key)},
|
|
10
|
+
return s("button",{type:"button",role:"menuitem",disabled:d.disabled,className:v.className,style:v.style,onClick:()=>b(d),...m(k,d),children:[d.icon,d.label]},d.key)},g=[];for(let e=0;e<d.length;){const l=d[e];if("radio"!==l.type&&"checkbox"!==l.type){g.push(v(l,e)),e+=1;continue}const t=l.type,i=e,a=[];for(;e<d.length&&d[e].type===t;)a.push(v(d[e],e)),e+=1;const r="label"===d[i-1]?.type?`${y}-label-${i-1}`:void 0;g.push(/* @__PURE__ */n("div",{role:"group","aria-labelledby":r,children:a},`group:${l.key}`))}return g}export{d as isFocusableEntry,o as menuStatusIds,u as renderMenuEntries};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{SpinnerRing as e}from"./chunk-R2VKEMZH.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{jsxs as n,Fragment as o,jsx as l}from"react/jsx-runtime";function r({selectedCount:r,hiddenSelectedCount:c=0,loadedCount:d,totalCount:i,label:s,isFetchingMore:a,extra:u}){const m=t().list,h=i??d,f=d>=h,p=c>0?m.selectedNotShown(r,c):r>0?m.selected(r):"";/* @__PURE__ */
|
|
2
2
|
return n(o,{children:[u,p?`${p} — `:"",f?null!=i?m.allLoaded(h,s):m.count(h,s):m.loadedOf(d,h,s),a?/* @__PURE__ */n(o,{children:[" · ",
|
|
3
3
|
/* @__PURE__ */n("span",{className:"inline-flex items-center gap-1",role:"status",children:[
|
|
4
4
|
/* @__PURE__ */l(e,{}),m.loadingMore]})]}):""]})}export{r as ListFooter};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&H}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&H})}var P=u(function({onClick:
|
|
3
|
-
return x("button",{ref:f,id:u,role:"radio"===T?"menuitemradio":"checkbox"===T?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":T?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:d,onClick:()=>{
|
|
1
|
+
import{optionNoteClass as e}from"./chunk-URHGHXDN.js";import{keepsNativeMenu as t}from"./chunk-5QFPTDQF.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{onOverlayOpen as r}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as o}from"./chunk-62LW225J.js";import{useHydrated as i,useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{glassStyle as l,GLASS_DIVIDER as c}from"./chunk-F27JJHNJ.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{createContext as d,forwardRef as u,useContext as p,useId as m,useRef as h,useState as f,useEffect as g,useMemo as y,useCallback as b}from"react";import{createPortal as w}from"react-dom";import{jsxs as x,jsx as k,Fragment as v}from"react/jsx-runtime";function N(e,t,n){return e.length===t+1&&e[t].key===n.key?e:[...e.slice(0,t),n]}function C(e,t){const n=Math.max(0,t);return e.length>n?e.slice(0,n):e}function E(e,t,n){if(0===t.length||0===e.length)return[];const r=[e];for(let e=1;e<t.length;e++){const o=r[e-1].find(n=>n.to===t[e].key),i=o?n(o):[];if(0===i.length)break;r.push(i)}return r}function T(e,t,n,r){const o=Math.max(0,r-n),i=Math.min(t,o),a=e-i/2;return a<n?n:a+i>r?Math.max(n,r-i):a}function M(e,t,n,r,o,i=!1,a=8){const l=t+o,c=e-o-n,s=c>=a;return i&&s?{left:c,flipped:!0}:l+n<=r-a?{left:l,flipped:!1}:s?{left:c,flipped:!0}:i?{left:a,flipped:!0}:{left:Math.max(a,r-a-n),flipped:!1}}function W(){try{return getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal"}catch{return"normal"}}var $=d(null),B=d(!1);function L({children:e,style:n,className:a="",onClose:c,minWidth:d=180,portal:u=!1}){const p=h(null),b=m(),[x,v]=f([]),E=h();g(()=>()=>clearTimeout(E.current),[]);const T=i(),M=y(()=>{const e=()=>clearTimeout(E.current);return{id:b,depth:0,path:x,open:(t,n)=>{e(),v(e=>N(e,t,n))},scheduleClose:t=>{e(),E.current=setTimeout(()=>v(e=>C(e,t)),200)},closeBelow:t=>{e(),v(e=>C(e,t))},cancelClose:e,closeTree:()=>{e(),v([]),c?.()},root:p}},[b,x,c]);g(()=>{if(!c)return;const e=e=>{e.target.closest("[data-menu-toggle]")||e.target.closest?.(`[data-popup-menu-tree="${b}"]`)||p.current&&!p.current.contains(e.target)&&c()},t=e=>{"Escape"===e.key&&c()};window.addEventListener("pointerdown",e),window.addEventListener("keydown",t);const n=r(c),o=s(()=>!1,()=>p.current);return()=>{window.removeEventListener("pointerdown",e),window.removeEventListener("keydown",t),n(),o()}},[c,b]),g(()=>{const e=p.current;e&&requestAnimationFrame(()=>{const t=e.getBoundingClientRect();if(t.right>window.innerWidth-8){const n=t.right-window.innerWidth+8;e.style.left?e.style.left=parseFloat(e.style.left)-n+"px":e.style.right||(e.style.left=t.left-n+"px")}if(t.left<8&&(e.style.left?e.style.left="8px":e.style.right&&(e.style.right=window.innerWidth-t.width-8+"px")),t.bottom>window.innerHeight-8){const n=t.bottom-window.innerHeight+8;e.style.top?e.style.top=parseFloat(e.style.top)-n+"px":e.style.bottom?e.style.bottom="8px":e.style.top=t.top-n+"px"}t.top<8&&(e.style.top?e.style.top="8px":e.style.bottom&&(e.style.bottom=window.innerHeight-t.height-8+"px"))})});const B=W(),L=/(^|[\s:])!?z-/.test(a),j=/* @__PURE__ */k("div",{ref:p,"data-popup-menu-tree":b,className:`fixed rounded-(--radius-popup) ${"tight"===B?"py-1":"large"===B?"py-2":"py-1"} ${a}`,onContextMenu:e=>{t(e.target)||e.preventDefault()},style:{...L?{}:{zIndex:o.menu},minWidth:d,animation:"popup-in 0.12s ease-out",...l(),...n},children:/* @__PURE__ */k($.Provider,{value:M,children:e})});return u?T?w(j,document.body):null:j}function j(e,t,n,r=!1){const o=W(),i="tight"===o?"0.25rem":"large"===o?"0.6rem":0;return{className:`w-full flex items-center gap-2 text-left transition-colors rounded-lg mx-auto\n ${e?"text-red-600 not-disabled:not-aria-disabled:hover:bg-red-50":r?"bg-accent-tint text-blue-700":"text-ink not-disabled:not-aria-disabled:hover:bg-accent-tint not-disabled:not-aria-disabled:hover:text-blue-700"}\n ${t?"opacity-40 cursor-not-allowed":""}\n ${n}`,style:{width:"calc(100% - 8px)",marginLeft:4,marginRight:4,fontSize:"var(--menu-font-size, 14px)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:i,paddingBottom:i,..."normal"===o?{minHeight:"calc(var(--row-height-menu, 2.25rem) + 2 * (var(--menu-padding-y, 0.5rem) - 0.5rem))"}:{}}}}var H=/* @__PURE__ */k(n,{name:"check","aria-hidden":!0,className:"h-4 w-4",strokeWidth:2});function D({kind:e,checked:t}){/* @__PURE__ */
|
|
2
|
+
return k("span","checkbox"===e?{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border "+(t?"border-blue-600 bg-blue-600 text-white":"border-gray-400"),children:t&&H}:{"aria-hidden":!0,"data-menu-check":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:t&&H})}var P=u(function({onClick:t,children:n,className:r="",danger:o,disabled:i,role:a,checked:l,icon:c,description:s,tabIndex:d,id:u,onMouseEnter:h},f){const g=p($),y=m(),b=null!=s&&!1!==s,w=`${u??y}-label`,N=`${u??y}-note`,C=p(B),E=j(o,i,r),T=void 0===l?null:"menuitemradio"===a?"radio":"checkbox";/* @__PURE__ */
|
|
3
|
+
return x("button",{ref:f,id:u,role:"radio"===T?"menuitemradio":"checkbox"===T?"menuitemcheckbox":a??(C?"menuitem":void 0),"aria-checked":T?l:void 0,"aria-labelledby":b?w:void 0,"aria-describedby":b?N:void 0,tabIndex:d,onClick:()=>{t?.(),g&&g.depth>0&&"checkbox"!==T&&g.closeTree()},onMouseEnter:()=>{g?.scheduleClose(g.depth),h?.()},disabled:i,className:E.className,style:E.style,children:[T&&/* @__PURE__ */k(D,{kind:T,checked:!!l}),b?
|
|
4
4
|
/* @__PURE__ */x("span",{className:"block min-w-0 flex-1 py-2",children:[
|
|
5
5
|
/* @__PURE__ */x("span",{className:"flex items-center gap-2",children:[null!=c&&/* @__PURE__ */k(R,{children:c}),
|
|
6
6
|
/* @__PURE__ */k("span",{id:w,className:"min-w-0",children:n})]}),
|
|
7
|
-
/* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:
|
|
8
|
-
return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var A=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function F(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function z(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function I({label:
|
|
7
|
+
/* @__PURE__ */k("span",{id:N,"data-menu-note":"",className:e(),style:null!=c?{paddingLeft:"1.5rem"}:void 0,children:s})]}):/* @__PURE__ */x(v,{children:[null!=c&&/* @__PURE__ */k(R,{children:c}),n]})]})});function R({children:e}){/* @__PURE__ */
|
|
8
|
+
return k("span",{"aria-hidden":"true","data-menu-icon":"",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:e})}var A=/* @__PURE__ */k(n,{name:"chevron-right","aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2});function F(e){let t=o.menu;for(let n=e;n&&n!==document.body;n=n.parentElement){const e=parseInt(getComputedStyle(n).zIndex,10);Number.isNaN(e)||(t=e)}return t}function z(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(t=>t.closest("[data-popup-submenu-panel]")===e):[]}function I({label:e,icon:n,children:r,disabled:o,className:i="",minWidth:c=180,maxHeight:d,rowProps:u}){const f=p($),N=m(),C=h(null),E=h(null),B=h(),L=h(!1),H=`${N}-menu`;g(()=>()=>clearTimeout(B.current),[]);const D=f?.depth??0,P=f?.path[D],R=!!P&&P.key===N&&!o,I=b(e=>{if(!f||o||!C.current)return;clearTimeout(B.current),L.current=e;const t=C.current.getBoundingClientRect(),n=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),r=n?.getBoundingClientRect()??t,i=D>0&&(f.path[D-1]?.flipped??!1),a=M(r.left,r.right,c,window.innerWidth,4,i);f.open(D,{key:N,y:t.top,...a})},[f,o,D,N,c]),S=e=>{f?.closeBelow(D),C.current?.focus()};g(()=>{if(R)return s(e=>"Escape"===e.key&&(!(f&&f.path.length>D+1)&&(S(),!0)),()=>E.current)}),a(()=>{if(!R||!P)return;const e=()=>{const e=E.current;if(!e||!C.current)return;const t=C.current.closest("[data-popup-submenu-panel]")??C.current.closest("[data-popup-menu-tree]"),n=t?.getBoundingClientRect()??C.current.getBoundingClientRect(),r=D>0&&(f?.path[D-1]?.flipped??!1),o=e.offsetWidth||c,i=M(n.left,n.right,o,window.innerWidth,4,r,8),a=e.offsetHeight,l=T(C.current.getBoundingClientRect().top+a/2,a,8,window.innerHeight-8);e.style.left=`${i.left}px`,e.style.top=`${l}px`,e.dataset.flipped=String(i.flipped)};e();let t=0;const n=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(n),cancelAnimationFrame(t)}}),g(()=>{R&&L.current&&(L.current=!1,z(E.current)[0]?.focus())},[R]);const U=y(()=>f&&{...f,depth:D+1},[f,D]);if(!f)throw new Error("PopupSubmenu must be rendered inside a PopupMenu");const J=j(!1,o,i,R),q=W();/* @__PURE__ */
|
|
9
9
|
return x(v,{children:[
|
|
10
10
|
/* @__PURE__ */x("button",{ref:C,type:"button",role:"menuitem","aria-haspopup":"menu","aria-expanded":R,"aria-controls":R?H:void 0,disabled:o,"data-popup-submenu-row":!0,className:J.className,style:J.style,onClick:e=>{const t=0===e.detail;R?t&&z(E.current)[0]?.focus():I(t)},...u,onKeyDown:e=>{"ArrowRight"===e.key&&(e.preventDefault(),e.stopPropagation(),I(!0))},onMouseEnter:()=>{u?.onMouseEnter?.(),o||(f.cancelClose(),R?f.closeBelow(D+1):(clearTimeout(B.current),B.current=setTimeout(()=>I(!1),120)))},onMouseLeave:()=>{clearTimeout(B.current),f.scheduleClose(D)},children:[n,
|
|
11
|
-
/* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:
|
|
12
|
-
/* @__PURE__ */k("div",{ref:E,id:H,role:"menu","data-popup-menu-tree":f.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===q?"py-1":"large"===q?"py-2":"py-1"),style:{left:P.left,top:P.y,minWidth:c,maxHeight:void 0===d?"calc(100vh - 16px)":`min(${"number"==typeof d?`${d}px`:d}, calc(100vh - 16px))`,zIndex:F(f.root.current)+D+1,animation:(P.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...
|
|
13
|
-
return k("div",{className:`border-t ${
|
|
11
|
+
/* @__PURE__ */k("span",{className:"min-w-0 flex-1 truncate",children:e}),A]}),R&&w(
|
|
12
|
+
/* @__PURE__ */k("div",{ref:E,id:H,role:"menu","data-popup-menu-tree":f.id,"data-popup-submenu-panel":!0,className:"fixed rounded-(--radius-popup) overflow-x-hidden overflow-y-auto overscroll-contain "+("tight"===q?"py-1":"large"===q?"py-2":"py-1"),style:{left:P.left,top:P.y,minWidth:c,maxHeight:void 0===d?"calc(100vh - 16px)":`min(${"number"==typeof d?`${d}px`:d}, calc(100vh - 16px))`,zIndex:F(f.root.current)+D+1,animation:(P.flipped?"popup-submenu-in-left":"popup-submenu-in")+" 0.1s ease-out",...l()},onKeyDown:e=>{if(e.target.closest("[data-popup-submenu-panel]")!==e.currentTarget)return;const t=z(E.current),n=t.indexOf(document.activeElement),r=n=>{e.preventDefault(),e.stopPropagation(),t[(n+t.length)%t.length]?.focus()};"ArrowDown"===e.key?r(n+1):"ArrowUp"===e.key?r(n<0?t.length-1:n-1):"Home"===e.key?r(0):"End"===e.key?r(t.length-1):"ArrowLeft"===e.key&&(e.preventDefault(),e.stopPropagation(),S())},onMouseEnter:()=>{f.cancelClose(),clearTimeout(B.current)},onMouseLeave:()=>f.scheduleClose(D+1),onContextMenu:e=>{t(e.target)||e.preventDefault()},children:/* @__PURE__ */k($.Provider,{value:U,children:r})}),document.body)]})}function S(){const e=W();/* @__PURE__ */
|
|
13
|
+
return k("div",{className:`border-t ${c} ${"tight"===e?"my-0.5":"large"===e?"my-2":"my-1"} mx-3`})}function U(){const e=W(),t="tight"===e?"0.125rem":"large"===e?"0.375rem":"0.25rem";return{color:"var(--ink-muted)",paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:t,paddingBottom:t}}function J({children:e}){/* @__PURE__ */
|
|
14
14
|
return k("div",{className:"text-xs font-medium uppercase tracking-wide",style:U(),children:e})}function q({d:e,className:t="h-4 w-4"}){/* @__PURE__ */
|
|
15
15
|
return k("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */k("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})})}export{D as MenuCheckMark,q as MenuIcon,B as MenuSemanticsContext,L as PopupMenu,S as PopupMenuDivider,P as PopupMenuItem,J as PopupMenuLabel,I as PopupSubmenu,T as clampMenuTop,C as closeMenuBelow,j as itemLook,M as menuPanelLeft,U as menuTextRowStyle,N as openMenuLevel,E as resolveMenuLevels};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(H&&$&&$.col===e){const n=(
|
|
1
|
+
import{LoadingSpinner as e}from"./chunk-R2VKEMZH.js";import{useBrowserLayoutEffect as n}from"./chunk-D65T4H6J.js";import{useShellStrings as t,useShellLocale as r}from"./chunk-GDQJBQ5B.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{useState as o,useMemo as l,useRef as i,Fragment as s}from"react";import{jsx as d,Fragment as c,jsxs as u}from"react/jsx-runtime";function m({items:m,columns:f,columnOf:p,getId:g,onMove:h,renderCard:x,onCardClick:b,sortInColumn:y,isLoading:v=!1,loadingText:N,emptyState:k,showColumnsWhenEmpty:w=!1,columnEmptyText:C,onAddItem:D,addItemText:E}){const j=t().kanban,I=r(),T=N??j.loading,M=C??j.dropHere,A=E??j.addItem,[H,O]=o(null),[$,B]=o(null),Q=l(()=>{const e={};for(const n of f)e[n.value]=[];for(const n of m)(e[p(n)]??=[]).push(n);if(y)for(const n of Object.keys(e))e[n].sort(y);return e},[m,f,p,y]),R=()=>{O(null),B(null)},S=i(null),q=i(/* @__PURE__ */new Map);n(()=>{if(null!==H)return;const e=S.current;if(!e)return;const n=/* @__PURE__ */new Map,t=[];if(e.querySelectorAll("[data-kanban-card]").forEach(e=>{const r=e.dataset.kanbanCard,a=e.getBoundingClientRect();n.set(r,a);const o=q.current.get(r);if(o){const n=o.left-a.left,r=o.top-a.top;(n||r)&&t.push([e,n,r])}}),q.current=n,t.length){for(const[e,n,r]of t)e.style.transition="none",e.style.transform=`translate(${n}px, ${r}px)`;requestAnimationFrame(()=>{for(const[e]of t)e.style.transition="transform 200ms cubic-bezier(0.2, 0, 0, 1)",e.style.transform="",e.addEventListener("transitionend",()=>{e.style.transition="",e.style.transform=""},{once:!0})})}},[Q,H]);return v?/* @__PURE__ */d(e,{size:"sm",padding:"p-4",label:T}):0!==m.length||w?/* @__PURE__ */d("div",{ref:S,className:"flex-1 overflow-x-auto grid-scroll",children:/* @__PURE__ */d("div",{className:"flex gap-3 h-full min-w-max pb-2",children:f.map(e=>{const n=Q[e.value]??[],t=null!==$&&$.col===e.value,r=null!==H?n.findIndex(e=>g(e)===H):-1,o=t&&(-1===r||$.index!==r&&$.index!==r+1)?$.index:-1;/* @__PURE__ */
|
|
2
|
+
return u("div",{className:"group flex flex-col w-72 shrink-0 rounded-xl bg-gray-50 border transition-colors "+(t?"border-blue-400 ring-2 ring-blue-300/60":"border-gray-200"),onDragOver:e=>{e.preventDefault();try{e.dataTransfer.dropEffect="move"}catch{}},onDrop:n=>{n.preventDefault(),(e=>{if(H&&$&&$.col===e){const n=(Q[e]??[]).findIndex(e=>g(e)===H),t=-1!==n;if(!t||$.index!==n&&$.index!==n+1){const r=t&&$.index>n?$.index-1:$.index;h(H,e,r)}}R()})(e.value)},children:[
|
|
3
3
|
/* @__PURE__ */u("div",{className:`flex items-center justify-between px-3 py-2 rounded-t-xl text-sm font-medium ${e.accent??"text-gray-700 bg-gray-100"}`,children:[
|
|
4
4
|
/* @__PURE__ */u("span",{className:"flex items-center gap-2",children:[
|
|
5
5
|
/* @__PURE__ */d("span",{className:`h-2 w-2 rounded-full ${e.dot??"bg-gray-400"}`}),e.label]}),
|
|
6
6
|
/* @__PURE__ */d("span",{className:"text-xs opacity-70",children:a(n.length,I)})]}),
|
|
7
|
-
/* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>
|
|
7
|
+
/* @__PURE__ */u("div",{className:"flex-1 overflow-y-auto p-2 space-y-2 min-h-[120px]",onDragEnter:()=>B(t=>t&&t.col===e.value&&t.index===n.length?t:{col:e.value,index:n.length}),children:[n.map((t,r)=>{const a=g(t),l=a===H;/* @__PURE__ */
|
|
8
8
|
return u(s,{children:[o===r&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),
|
|
9
|
-
/* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{O(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==H?n.findIndex(e=>g(e)===H):-1,o=-1!==a&&a<r?r+1:r;
|
|
9
|
+
/* @__PURE__ */d("div",{"data-kanban-card":a,draggable:!0,onDragStart:e=>{O(a);try{e.dataTransfer.effectAllowed="move"}catch{}},onDragEnter:t=>{t.stopPropagation();const a=null!==H?n.findIndex(e=>g(e)===H):-1,o=-1!==a&&a<r?r+1:r;B(n=>n&&n.col===e.value&&n.index===o?n:{col:e.value,index:o})},onDragEnd:R,onClick:b?()=>b(t):void 0,style:null===H?void 0:{opacity:l?.4:1,transition:"opacity 120ms ease"},className:"rounded-lg bg-white border border-gray-200 p-3 shadow-sm hover:border-blue-400 hover:shadow transition "+(b?"cursor-pointer":""),children:x(t)})]},a)}),n.length>0&&o===n.length&&/* @__PURE__ */d("div",{className:"h-0.5 rounded-full bg-blue-500","aria-hidden":!0}),0===n.length&&/* @__PURE__ */d("div",{className:"text-2xs text-center rounded-lg transition-all duration-150 "+(t?"border-2 border-dashed border-blue-300 bg-blue-50/50 text-blue-400 py-8":"text-gray-400 py-6"),children:M})]}),D&&/* @__PURE__ */d("div",{className:"p-2 pt-0",children:/* @__PURE__ */u("button",{type:"button",onClick:()=>D(e.value),className:"flex w-full items-center justify-center gap-1 rounded-lg px-2 min-h-8 py-1 text-xs font-medium text-ink-faint opacity-0 transition hover:bg-gray-100 hover:text-ink focus-visible:opacity-100 group-hover:opacity-100",children:[
|
|
10
10
|
/* @__PURE__ */d("span",{"aria-hidden":!0,className:"text-sm leading-none",children:"+"}),A]})})]},e.value)})})}):/* @__PURE__ */d(c,{children:k??/* @__PURE__ */d("div",{className:"text-sm text-gray-500 p-4",children:j.empty})})}export{m as Kanban};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-
|
|
2
|
-
return s(e,{content:z??k.hint,side:
|
|
1
|
+
import{Tooltip as e}from"./chunk-6XBWM453.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-GDQJBQ5B.js";import{useRef as o,useEffect as n,useCallback as i}from"react";import{jsx as s}from"react/jsx-runtime";var a=(e,r,t)=>Math.min(t,Math.max(r,e));function l(e,r,t,o,n){return Math.round(a("left"===t||"top"===t?e+r:e-r,o,n))}function u(e,r,t){let o=null;try{o=window.localStorage.getItem(e)}catch{return null}const n=o?parseInt(o,10):NaN;return Number.isNaN(n)?null:a(n,r,t)}function c({width:c,onResize:d,orientation:h="vertical",side:m,min:f,max:p,defaultWidth:v=f,step:g=16,storageKey:b,label:w,hint:z,controls:y,className:x=""}){const P="horizontal"===h,k=t().resizeHandle,N=o(null),D=o({onResize:d,min:f,max:p,side:m});D.current={onResize:d,min:f,max:p,side:m},r(()=>{if(!b)return;const e=u(b,f,p);null!==e&&e!==c&&d(e)},[b]),n(()=>{if(!b)return;const e=window.setTimeout(()=>{try{window.localStorage.setItem(b,String(Math.round(c)))}catch{}},200);return()=>window.clearTimeout(e)},[c,b]);const M=i(()=>{N.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>M,[M]);const C=e=>{N.current&&(e.currentTarget.hasPointerCapture?.(N.current.pointer)&&e.currentTarget.releasePointerCapture(N.current.pointer),M())},I="left"===m?"right-0":"right"===m?"left-0":"top"===m?"bottom-0":"top-0",T="left"===m?"right":"right"===m?"left":"top"===m?"bottom":"top",$=P?`absolute inset-x-0 ${I} z-10 flex h-2`:`absolute inset-y-0 ${I} z-10 flex w-2`;/* @__PURE__ */
|
|
2
|
+
return s(e,{content:z??k.hint,side:T,delay:600,className:`${$} ${x}`.trim(),children:/* @__PURE__ */s("div",{role:"separator",tabIndex:0,"aria-orientation":h,"aria-label":w??k.label,"aria-valuenow":Math.round(c),"aria-valuemin":f,"aria-valuemax":p,"aria-controls":y,"data-resize-handle":m,onPointerDown:e=>{0===e.button&&(e.preventDefault(),N.current={x:P?e.clientY:e.clientX,width:c,moved:!1,pointer:e.pointerId},e.currentTarget.setPointerCapture?.(e.pointerId),document.body.style.cursor=P?"row-resize":"col-resize",document.body.style.userSelect="none")},onPointerMove:e=>{const r=N.current;if(!r)return;if(0===e.buttons)return void M();const t=(P?e.clientY:e.clientX)-r.x;if(!r.moved){if(Math.abs(t)<3)return;r.moved=!0}const{onResize:o,min:n,max:i,side:s}=D.current;o(l(r.width,t,s,n,i))},onPointerUp:C,onPointerCancel:C,onLostPointerCapture:()=>{N.current&&M()},onDoubleClick:()=>d(a(v,f,p)),onKeyDown:e=>{const r=P?"ArrowDown":"ArrowRight",t=P?"ArrowUp":"ArrowLeft",o=e.key===r?g:e.key===t?-g:null,n=null!==o?l(c,o,m,f,p):"Home"===e.key?f:"End"===e.key?p:"Enter"===e.key?a(v,f,p):null;null!==n&&(e.preventDefault(),n!==c&&d(n))},className:P?"group/resize relative h-full w-full cursor-row-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]":"group/resize relative h-full w-full cursor-col-resize touch-none rosh-focus-ring focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */s("div",{"aria-hidden":"true",className:P?`absolute inset-x-0 ${I} h-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:h-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`:`absolute inset-y-0 ${I} w-px bg-transparent transition-colors group-hover/resize:bg-[var(--accent-500,var(--rosh-resize-handle))] group-focus-visible/resize:w-0.5 group-focus-visible/resize:bg-[var(--accent-500,var(--rosh-resize-handle))]`})})})}export{c as ResizeHandle,u as readStoredWidth,l as resizedWidth};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{useSettingAuto as e}from"./chunk-2NMW66P5.js";import{
|
|
1
|
+
import{useSettingAuto as e}from"./chunk-2NMW66P5.js";import{IconButton_default as r}from"./chunk-PUF75SMJ.js";import{inputClasses as t}from"./chunk-AYZY3YNC.js";import{Icon as n}from"./chunk-2UO47XB4.js";import{useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as o}from"./chunk-TWVUQUUD.js";import{useShellStrings as a}from"./chunk-GDQJBQ5B.js";import{forwardRef as l,useId as c,useState as u,useRef as s,useCallback as d,useEffect as p}from"react";import{jsx as m,jsxs as f,Fragment as v}from"react/jsx-runtime";function h(e){const r=String(e),t=/e-(\d+)$/.exec(r);return t?Number(t[1]):r.split(".")[1]?.length??0}var b=(e,r)=>null==e?"":null!=r?e.toFixed(r):String(e);function y({dir:e,compact:t,label:i,disabled:o,onStep:a}){const l=s(a);l.current=a;const c=s({}),u=d(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);p(()=>u,[u]),p(()=>{o&&u()},[o,u]);const f=/* @__PURE__ */m(n,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:t?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:t?2.6:2}),v={tabIndex:-1,"aria-label":i,disabled:o,onPointerDown:e=>{if(0!==e.button||o)return;e.preventDefault(),u();const r=e.shiftKey;l.current(r);const t=e.currentTarget.ownerDocument.defaultView??window;t.addEventListener("pointerup",u),c.current={off:()=>t.removeEventListener("pointerup",u),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(r),60)},400)}},onPointerLeave:u,onPointerCancel:u,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return t?/* @__PURE__ */m("button",{type:"button",...v,className:"flex min-h-0 flex-1 items-center justify-center text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900 disabled:cursor-not-allowed disabled:opacity-40",children:f}):/* @__PURE__ */m(r,{size:"sm",...v,children:f})}var g=l(function({value:r,onChange:n,min:l,max:g,precision:x,step:w,shiftStep:k,disabled:N,readOnly:j,invalid:E,placeholder:D,size:B,prefix:C,suffix:F,id:M,name:O,className:S="",onBlur:U,onFocus:P,steppers:W,stepFrom:K,snap:T=!1,allowEmpty:$=!0,appearance:z="box",display:L,reportWhileTyping:R=!0,onRevert:Y,"aria-label":A,"aria-labelledby":I,"aria-describedby":J,auto:Q,...V},X){const G="bare"===z,H=e(),Z=Q??H,q=c(),_="string"==typeof F&&""!==F.trim()?F.trim():void 0,ee=e=>function(e,r){let t=e.trim();if(r&&t.endsWith(r)&&(t=t.slice(0,-r.length).trim()),t=t.replace(",","."),""===t||"-"===t||"."===t||"-."===t)return null;const n=Number(t);return Number.isFinite(n)?n:null}(e,_),re=Object.fromEntries(Object.entries(V).filter(([e])=>e.startsWith("data-"))),te=a(),[ne,ie]=u(()=>b(r,x)),oe=s(ne);oe.current=ne;const ae=s(null),le=d(e=>{ae.current=e,"function"==typeof X?X(e):X&&(X.current=e)},[X]),ce=s(r),ue=s(r);ue.current=r;const se=Boolean(N||j),de=W??!1,pe="compact"===de,me=s(null),[fe,ve]=u(0);i(()=>{const e=me.current;if(!e)return;const r=()=>ve(Math.ceil(e.getBoundingClientRect().width));if(r(),"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(r);return t.observe(e),()=>t.disconnect()},[C]),p(()=>{ee(oe.current)!==r&&ie(b(r,x))},[r,x]);const he=e=>{if(se)return;let r=(ee(oe.current)??K??(D?ee(D):null)??0)+e;null!=l&&r<l&&(r=l),null!=g&&r>g&&(r=g);const t=x??String(w??1).split(".")[1]?.length??0;r=Number(r.toFixed(t));const i=b(r,x);oe.current=i,ie(i),n(r),Ne()},be=s(he);be.current=he;const ye=s({unit:w??1,big:k??10*(w??1),locked:se});ye.current={unit:w??1,big:k??10*(w??1),locked:se},p(()=>{const e=ae.current;if(!e)return;const r=r=>{const{unit:t,big:n,locked:i}=ye.current;if(i||e.ownerDocument.activeElement!==e)return;const o=r.deltaY||r.deltaX;o&&(r.preventDefault(),be.current((o<0?1:-1)*(r.shiftKey?n:t)))};return e.addEventListener("wheel",r,{passive:!1}),()=>e.removeEventListener("wheel",r)},[]);const[ge,xe]=u(!1),[we,ke]=u(0),Ne=()=>{G&&ke(e=>e+1)};p(()=>{G&&ge&&document.activeElement===ae.current&&ae.current?.select()},[G,ge,we]);const je=s(!1);p(()=>{if(ge&&!se)return o(e=>{if("Escape"!==e.key||document.activeElement!==ae.current)return!1;const r=ce.current;if(ee(oe.current)===r)return!1;const t=b(r,x);return oe.current=t,ie(t),ue.current!==r&&(Y??n)(r),Ne(),!0})},[ge,se,x,n,Y]);const Ee=()=>{const e=ee(oe.current);if(null==e){if(!$){const e=b(ue.current,x);return oe.current=e,ie(e),ue.current}return oe.current="",ie(""),null!==ue.current&&n(null),null}let r=e;const t=x??(T?Math.max(h(w??1),h(l??0)):void 0);T&&(r=function(e,r,t){const n=(e-t)/r;return t+Math.round(n+1e-9*Math.sign(e))*r}(r,w??1,l??0)),null!=l&&r<l&&(r=l),null!=g&&r>g&&(r=g),null!=t&&(r=Number(r.toFixed(t)));const i=b(r,x);return oe.current=i,ie(i),r===e&&r===ue.current||n(r),r},De=/* @__PURE__ */m("input",{ref:le,id:M,"data-number-input":"",name:O,type:"text",inputMode:0===x?"numeric":"decimal",value:!ge&&L?L(r):ne,disabled:N,readOnly:j,placeholder:D,step:w,role:"spinbutton","aria-valuenow":r??void 0,"aria-valuemin":l,"aria-valuemax":g,"aria-valuetext":null==r?D||void 0:`${b(r,x)}${G&&_?_:""}`,"aria-describedby":[J,Z?q:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":G?"bare":void 0,...re,autoComplete:G?"off":void 0,spellCheck:!G&&void 0,"aria-invalid":E||void 0,"aria-label":A,"aria-labelledby":I,onChange:e=>(e=>{if(j)return;const r=_&&e.trimEnd().endsWith(_)?e.trimEnd().slice(0,-_.length).trimEnd():e;if(""!==r&&!/^-?\d*[.,]?\d*$/.test(r))return;if(ie(e),!R)return;const t=ee(e);(null!==t||$)&&n(t)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!se)return ce.current=Ee(),void Ne();const r=w??1,t=k??10*r,n="ArrowUp"===e.key?e.shiftKey?t:r:"ArrowDown"===e.key?-(e.shiftKey?t:r):"PageUp"===e.key?10*r:"PageDown"===e.key?10*-r:null;null===n||se||(e.preventDefault(),he(n))},onFocus:()=>{ce.current=ue.current,xe(!0),je.current=!0,P?.()},onMouseUp:G?e=>{je.current&&(je.current=!1,e.preventDefault())}:void 0,onBlur:()=>{xe(!1),je.current=!1,Ee(),U?.()},className:G?["block min-w-0 m-0 rounded-(--radius-control) border-0 p-0 text-center tabular-nums","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",ge?"bg-surface":"bg-transparent",se?"cursor-default":"cursor-text",S].filter(Boolean).join(" "):t({invalid:E,size:B,readOnly:j,auto:Z,className:[C?"pl-[max(var(--space-24),calc(var(--space-control-x-sm)+var(--rosh-number-prefix-width)+var(--space-icon-gap-sm)))]":"",pe?F?"pr-10":"pr-6":de?F?"pr-24":"pr-16":F?"pr-10":"","text-left tabular-nums",S].filter(Boolean).join(" ")})}),Be=Z?/* @__PURE__ */m("span",{id:q,hidden:!0,children:te.settingView.auto}):null;if(G||!C&&!F&&!de)return Be?/* @__PURE__ */f(v,{children:[De,Be]}):De;const Ce=ee(ne);/* @__PURE__ */
|
|
2
2
|
return f("div",{className:"relative","data-number-box":"",style:C?{"--rosh-number-prefix-width":`${fe}px`}:void 0,children:[C&&/* @__PURE__ */m("span",{ref:me,className:"pointer-events-none absolute left-(--space-control-x-sm) top-1/2 -translate-y-1/2 whitespace-nowrap text-sm text-ink-faint",children:C}),De,Be,F&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${pe?"right-6":de?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-ink-faint`,children:F}),de&&(()=>{const e=/* @__PURE__ */m(y,{dir:-1,compact:pe,label:te.number.decrease,disabled:se||null!=l&&null!=Ce&&Ce<=l,onStep:e=>be.current(-(e?k??10*(w??1):w??1))}),r=/* @__PURE__ */m(y,{dir:1,compact:pe,label:te.number.increase,disabled:se||null!=g&&null!=Ce&&Ce>=g,onStep:e=>be.current(e?k??10*(w??1):w??1)});/* @__PURE__ */
|
|
3
3
|
return f("span",pe?{"data-steppers":"compact",className:"absolute inset-y-px right-px flex w-4 flex-col overflow-hidden rounded-r-(--radius-control)",children:[r,e]}:{className:"absolute right-1 top-1/2 flex -translate-y-1/2 items-center gap-0.5",children:[e,r]})})()]})});export{g as InputNumber_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{SpinnerRing as c,LoadingSpinner as d}from"./chunk-R2VKEMZH.js";import{Z_LAYERS as u}from"./chunk-62LW225J.js";import{glassStyle as p}from"./chunk-F27JJHNJ.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:u.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:p(),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(c,{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(d,{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};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-4EZIWLJJ.js";import{IconButton_default as a}from"./chunk-PUF75SMJ.js";import{Icon as o}from"./chunk-2UO47XB4.js";import{Tooltip as n}from"./chunk-6XBWM453.js";import{useShellStrings as s}from"./chunk-GDQJBQ5B.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m(e,l,r,a){const o=h.filter(l=>"link"!==l&&e.has(l)).length+(l?1:0);return r&&0!==o?a>0?"paragraph":"words":null}function w({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s,clear:i}){let t=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),d=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);const c=m(l,r,i,d);return"paragraph"===c&&(d+=1),"words"===c&&(t+=1),{words:t>0,paragraph:d>0,oneRow:t>0&&d>0&&t+1+d<=9,flow:t>0&&d>0&&t+1+d>9&&t<=7,cells:{words:t,paragraph:d}}}function g(e,l){/* @__PURE__ */
|
|
2
|
+
return i(n,{content:e,children:l},l.key??void 0)}function f({offered:n,pressed:h,onMark:f,color:k,linkOpen:v=!1,last:N,alignment:C,list:M,letterCase:D,clear:x,disabled:y=!1,"aria-label":B,windows:j,className:q="",layout:A="grid"}){const I=s().textToolbar,L=w({offered:n,color:k,last:N,alignment:C,list:M,letterCase:D,clear:x});if(!L.words&&!L.paragraph)return null;const S=m(n,k,x,L.cells.paragraph),U=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,$=(e,l,r,o)=>n.has(e)?g(l,/* @__PURE__ */i(a,"link"===e?{pressed:v,className:U(v),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":v,"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r}:{className:U(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:y,onMouseDown:c,onClick:()=>f(e),children:r},e)):null,J=l(I),R=e.map(e=>[e,J[e],r(e)]),K=C?e.filter(e=>C.allow.includes(e)):[],T=C&&K.includes(C.value)?C.value:K[0],E=[["none",I.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",I.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",I.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],O=x&&S?g(I.clear,/* @__PURE__ */i(a,{className:U(!1),"aria-label":I.clear,disabled:y,onMouseDown:c,onClick:x.onClear,children:/* @__PURE__ */i(o,{name:"revert"})},"clear")):null,Q=/* @__PURE__ */t(d,{children:[$("bold",I.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),$("italic",I.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),$("underline",I.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),$("strike",I.strike,/* @__PURE__ */i(o,{name:"strike"})),k?g(I.color,/* @__PURE__ */i(a,{pressed:k.open,className:U(k.open,"rosh-tb-color"),"aria-label":I.color,"aria-haspopup":"dialog","aria-expanded":k.open,disabled:y,style:k.run?{"--rosh-tb-run":k.run}:void 0,onMouseDown:c,onClick:k.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,$("link",I.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),$("sup",I.sup,/* @__PURE__ */i(o,{name:"superscript"})),$("sub",I.sub,/* @__PURE__ */i(o,{name:"subscript"})),$("code",I.code,/* @__PURE__ */i(o,{name:"code"})),u(N)?N:null,"words"===S?O:null]}),W=/* @__PURE__ */t(d,{children:[C&&K.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":I.alignment,onKeyDown:e=>p(e,K,e=>C.onChange(e)),children:R.map(([e,l,r])=>C.allow.includes(e)?g(l,/* @__PURE__ */i(a,{role:"radio",pressed:C.value===e,className:U(C.value===e),"aria-checked":C.value===e,"aria-label":l,tabIndex:e===T?0:-1,disabled:y||C.disabled,onMouseDown:c,onClick:()=>C.onChange(e),children:r},e)):null)}):null,M&&n.has("bullet")?g(I.bullet,/* @__PURE__ */i(a,{className:U("bullet"===M.pressed),"aria-label":I.bullet,"aria-pressed":"bullet"===M.pressed,disabled:y,onMouseDown:c,onClick:()=>M.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,M&&n.has("number")?g(I.number,/* @__PURE__ */i(a,{className:U("number"===M.pressed),"aria-label":I.number,"aria-pressed":"number"===M.pressed,disabled:y,onMouseDown:c,onClick:()=>M.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,$("quote",I.quote,/* @__PURE__ */i(o,{name:"quote"})),D?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":I.letterCase,onKeyDown:e=>p(e,E.map(([e])=>e),e=>D.onChange(e)),children:E.map(([e,l,r])=>g(l,/* @__PURE__ */i(a,{role:"radio",pressed:D.value===e,className:U(D.value===e),"aria-checked":D.value===e,"aria-label":l,tabIndex:e===(D.value||"none")?0:-1,disabled:y||D.disabled,onMouseDown:c,onClick:()=>D.onChange(D.value===e?"":e),children:r},e)))}):null,"paragraph"===S?O:null]}),X="row"===A,F=X?" is-row":L.flow?" is-flow":L.oneRow?" is-one-row":L.words&&void 0===N&&"words"!==S?" is-eight":"",G=b(n,Boolean(k)),H={"--rosh-tb-color-col":String(G.color),"--rosh-tb-link-col":String(G.link),...X?{"--rosh-tb-cells":String(L.cells.words+L.cells.paragraph),"--rosh-tb-groupgap":L.words&&L.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let P;return P=X?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[L.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:Q}):null,L.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:W}):null]}):L.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[Q,
|
|
3
|
+
/* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),W]}):L.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
|
|
4
|
+
/* @__PURE__ */i("div",{className:"rosh-tb-words",children:Q}),
|
|
5
|
+
/* @__PURE__ */i("div",{className:"rosh-tb-para",children:W})]}):/* @__PURE__ */t(d,{children:[L.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===N&&"words"!==S?" is-eight":""),children:Q}):null,L.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:W}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${F} ${q}`.trim(),style:H,children:[
|
|
6
|
+
/* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":B??I.formatting,children:P}),j]})}export{f as TextToolbar,w as textToolbarRows,b as textToolbarWindowColumns};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-
|
|
1
|
+
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-CLTRQ7AQ.js";import{Tooltip as n}from"./chunk-6XBWM453.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{createContext as o,useRef as a,useState as i,useEffect as l,useContext as s}from"react";import{jsx as c,jsxs as d,Fragment as u}from"react/jsx-runtime";var h=o({labels:"none",shown:"none"}),f="button[data-icon-rail-button]:not([disabled])";function b(e,t,n){const r=getComputedStyle(e),o=(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)+(parseFloat(r.borderLeftWidth)||0)+(parseFloat(r.borderRightWidth)||0),a="horizontal"===t?(parseFloat(r.columnGap)||0)*Math.max(0,n-1):0,i=e.parentElement;let l=1/0;if(i){const e=getComputedStyle(i);l=i.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:o+a,room:l}}function m({"aria-label":t,orientation:n="vertical",children:o,className:s="",labels:d="none",labelsFit:u=!1,onLabelsShown:m}){const p=a(null),g="none"!==d&&u,[v,y]=i(null),w="none"===d?"none":g?v??"none":"all",x=a(()=>{});x.current=()=>{const t=p.current;if(!t||!g)return;const r=function(e,t){return[...e.querySelectorAll("button[data-icon-rail-button]")].map(e=>{const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=parseFloat(n.minWidth)||0,a=e.querySelector("[data-icon-rail-glyph]")?.getBoundingClientRect().width??0,i=e.querySelector("[data-icon-rail-word]")?.scrollWidth??0;return{bare:Math.max(o,r+a),worded:"below"===t?Math.max(o,r+Math.max(a,i)):Math.max(o,r+a+8+i),active:"true"===e.getAttribute("aria-pressed")}})}(t,d);y(e({buttons:r,orientation:n,...b(t,n,r.length)}))},r(()=>{x.current()}),l(()=>{const e=p.current?.parentElement;if(!g||!e)return;let t=!0;const n=()=>{t&&x.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[g]);const F=a(null),k=a(m);k.current=m,l(()=>{g&&null!==v&&F.current!==v&&(F.current=v,k.current?.(v))},[g,v]),r(()=>{const e=p.current;if(!e)return;const t=[...e.querySelectorAll(f)];if(0===t.length)return;const n=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-pressed"))??t[0];for(const t of e.querySelectorAll("button[data-icon-rail-button]"))t.tabIndex=t===n?0:-1});/* @__PURE__ */
|
|
2
2
|
return c("div",{ref:p,role:"toolbar","aria-label":t,"aria-orientation":n,"data-orientation":n,onKeyDown:e=>{const t=p.current;if(!t)return;const r=[...t.querySelectorAll(f)],o=r.indexOf(e.target);if(o<0)return;const a="vertical"===n?"ArrowUp":"ArrowLeft",i="vertical"===n?"ArrowDown":"ArrowRight",l=e.key===i?(o+1)%r.length:e.key===a?(o-1+r.length)%r.length:"Home"===e.key?0:"End"===e.key?r.length-1:-1;if(!(l<0)){e.preventDefault();for(const e of r)e.tabIndex=e===r[l]?0:-1;r[l].focus()}},"data-labels":"none"===d?void 0:d,"data-labels-shown":"none"===d?void 0:w,className:`flex gap-1 ${"vertical"===n?"flex-col items-center":"flex-row items-center"} ${s}`.trim(),children:/* @__PURE__ */c(h.Provider,{value:{labels:d,shown:w},children:o})})}function p({label:e,icon:r,active:o,disabled:a,onClick:i,badge:l,tooltipSide:f="right",className:b=""}){const m=!0===o,{labels:p,shown:g}=s(h),v=void 0===l||!1===l||0===l?r:/* @__PURE__ */c(t,{count:"number"==typeof l?l:void 0,dot:!0===l,max:99,children:r}),y="none"!==p,w=y&&("all"===g||"chosen"===g&&m),x=/* @__PURE__ */c("button",{type:"button","data-icon-rail-button":"","aria-label":e,"aria-pressed":"boolean"==typeof o?o:void 0,disabled:a,onClick:a?void 0:i,className:[`relative inline-flex ${y?"beside"===p?"h-9 min-w-9 justify-center px-2":"min-h-9 min-w-9 flex-col justify-center px-1 py-1":"h-9 w-9 justify-center"} shrink-0 items-center rounded-lg transition-colors`,"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-40",m?"bg-accent-tint text-blue-700":"text-gray-600 not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest",b].filter(Boolean).join(" "),children:y?/* @__PURE__ */d(u,{children:[
|
|
3
3
|
/* @__PURE__ */c("span",{"data-icon-rail-glyph":"",className:"inline-flex shrink-0 items-center justify-center",children:v}),
|
|
4
4
|
/* @__PURE__ */c("span",{"data-icon-rail-word":"","aria-hidden":"true",className:["overflow-hidden whitespace-nowrap text-xs font-medium leading-none",w?"beside"===p?"ml-2":"mt-1":"max-h-0 max-w-0"].join(" "),children:e})]}):v});/* @__PURE__ */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{AccessibleTable as t}from"./chunk-TKJBZIHT.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-G4GVLK44.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-GDQJBQ5B.js";import{formatPlain as s}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),i=t.length>l,s=i?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(s.map((t,e)=>[t,e])),d=i?s.length:-1,m=i?[...s.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:i?t.length-s.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:k,className:v,emptyLabel:M}){const $=l().charts,w=i(),N=k??(t=>s(t,w)),j=M??$.noFlows,[y,E]=c(null),{highlighted:F}=o(),C=h(u,f,x,$.other),{labels:I,matrix:Q,otherIndex:z,foldedCount:A}=C,B=(t,e)=>Q[t]?.[e]??0,L=t=>t===z?r.muted:a(t),T=C.totals,G=I.map((t,e)=>e).sort((t,e)=>T[e]-T[t]),H=G.reduce((t,e)=>t+T[e],0);if(H<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${v??""}`,children:j});const O=p/2,V=p/2,J=p/2-44,K=J-b,P=g*G.length,R=/* @__PURE__ */new Map;let U=-Math.PI/2;G.forEach((t,e)=>{const o=T[t]/H*(2*Math.PI-P);R.set(t,{start:U,end:U+o,slot:e}),U+=o+g});const W=/* @__PURE__ */new Map,Y=[];for(const t of G)for(const e of G){const o=B(t,e);if(o<=0)continue;const n=R.get(t),r=o/Math.max(1,T[t])*(n.end-n.start),a=W.get(t)??0;W.set(t,a+r),Y.push({from:t,to:e,value:o,a:n.start+a+r/2,b:R.get(e).start+(R.get(e).end-R.get(e).start)/2})}const Z=(t,e)=>[O+e*Math.cos(t),V+e*Math.sin(t)],D="arc"===y?.kind?y.index:void 0,S="ribbon"===y?.kind?Y[y.index]:void 0;/* @__PURE__ */
|
|
2
|
+
return m("div",{className:`relative ${v??""}`,children:[
|
|
3
|
+
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(G.length),onMouseLeave:()=>E(null),children:[Y.map((t,e)=>{const[o,n]=Z(t.a,K),[r,a]=Z(t.b,K),l=L(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==F?I[t.from]===F||I[t.to]===F:null)(t,e);/* @__PURE__ */
|
|
4
|
+
return d("path",{d:`M${o},${n} Q${O},${V} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/H*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>E({kind:"ribbon",index:e})},`${I[t.from]}→${I[t.to]}`)}),G.map(t=>{const o=R.get(t),n=(o.start+o.end)/2,[a,l]=Z(n,J+16),i=(t=>y?"arc"===y.kind?y.index===t:Y[y.index].from===t||Y[y.index].to===t:null!==F?I[t]===F:null)(t);/* @__PURE__ */
|
|
5
|
+
return m("g",{onMouseEnter:()=>E({kind:"arc",index:t}),children:[
|
|
6
|
+
/* @__PURE__ */d("path",{d:e(O,V,K,J,o.start,o.end),fill:L(t),fillOpacity:null===i||i?1:.45}),
|
|
7
|
+
/* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:I[t]})]},t)})]}),A>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(A)}),void 0!==D&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:I[D],rows:[{key:"total",label:$.totalFlow,color:L(D),value:N(T[D])}]})}),S&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${I[S.from]} → ${I[S.to]}`,rows:[{key:"value",label:$.flow,color:L(S.from),value:N(S.value)}]})}),
|
|
8
|
+
/* @__PURE__ */d(t,{caption:$.chord(G.length),head:[$.tableFrom,$.tableTo,$.value],rows:Y.map(t=>[I[t.from],I[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|