efficient-shell 12.27.0 → 12.30.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 +38 -0
- package/dist/{Browser-6YRO47YI.js → Browser-FQHXHI3R.js} +18 -18
- package/dist/Calculator-XCRU5K4O.js +29 -0
- package/dist/{CurrencyConverter-G5IYUCN7.js → CurrencyConverter-EHIQIFJK.js} +9 -9
- package/dist/{Files-K7H7WHRS.js → Files-LTUUGPAM.js} +85 -85
- package/dist/{Notepad-EHISTRGJ.js → Notepad-JPAXNEFR.js} +9 -9
- package/dist/PdfViewer-J55QKFNS.js +1 -0
- package/dist/{PomodoroTimer-SFTPXEDV.js → PomodoroTimer-IVDZBBUN.js} +10 -10
- package/dist/{Preview-L4RT7TBC.js → Preview-KRK4XT2B.js} +35 -35
- package/dist/Sidebar-FCXIPW5K.js +44 -0
- package/dist/{Stock-YCPMLYPR.js → Stock-OBS2LPX4.js} +7 -7
- package/dist/{Weather-TLFNIPDG.js → Weather-I4TJBIEN.js} +17 -17
- package/dist/{WorldClock-66IRFS2W.js → WorldClock-YU2ZPVSA.js} +6 -6
- package/dist/ai/index.d.ts +155 -6
- package/dist/ai/index.js +109 -91
- package/dist/ai.css +1 -1
- package/dist/apps/ImageAnnotator.js +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/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FlowChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/Meter.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/RankedBars.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/StatTile.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-W2663E4S.js → chunk-23CZSU3H.js} +3 -3
- package/dist/{chunk-DK5SXOXJ.js → chunk-2DCATU5B.js} +1 -1
- package/dist/{chunk-RF3ZFTAU.js → chunk-2IEKMFVL.js} +1 -1
- package/dist/{chunk-676TKVDM.js → chunk-2N6WWL7Y.js} +1 -1
- package/dist/{chunk-KBI3T6UC.js → chunk-36MM4YRK.js} +9 -9
- package/dist/{chunk-3J3FBYIZ.js → chunk-37EYKPR6.js} +1 -1
- package/dist/{chunk-63TCQAGE.js → chunk-3B3QIHF7.js} +5 -5
- package/dist/chunk-3DSGJIC7.js +7 -0
- package/dist/{chunk-CCK2UWQ5.js → chunk-3HLV6BEC.js} +12 -12
- package/dist/{chunk-X34ZBXIU.js → chunk-3N4XJS43.js} +3 -3
- package/dist/{chunk-232YPI2L.js → chunk-3R2TMLKH.js} +5 -5
- package/dist/{chunk-YW3UKSON.js → chunk-3ZC53F4T.js} +3 -3
- package/dist/{chunk-OLCRYT3N.js → chunk-42GNFUAP.js} +12 -12
- package/dist/{chunk-7LTU5TJD.js → chunk-4EFIUJ7X.js} +1 -1
- package/dist/{chunk-VQ4X3OBR.js → chunk-4FUQK2LK.js} +1 -1
- package/dist/{chunk-QPSJYSET.js → chunk-4MCI7UHQ.js} +5 -5
- package/dist/chunk-4SEPQN2N.js +12 -0
- package/dist/{chunk-GEVNBBM7.js → chunk-4WW3SNL6.js} +1 -1
- package/dist/{chunk-TUPPFC74.js → chunk-4YCWO2GZ.js} +7 -7
- package/dist/{chunk-SSNTJ3M4.js → chunk-5O5QMMMG.js} +8 -8
- package/dist/{chunk-N32LNPPP.js → chunk-5RLJAXDR.js} +7 -7
- package/dist/{chunk-3YBXA72C.js → chunk-5X3Z45SL.js} +1 -1
- package/dist/{chunk-FD6DJRD4.js → chunk-5XYRFK7D.js} +1 -1
- package/dist/{chunk-3JL4TCA7.js → chunk-5ZS3VOJH.js} +1 -1
- package/dist/chunk-64ZDYUE7.js +27 -0
- package/dist/{chunk-XHZVUO6F.js → chunk-67JLD6AU.js} +5 -5
- package/dist/{chunk-OM6VWUAZ.js → chunk-6EETON2U.js} +1 -1
- package/dist/{chunk-4PIQG2ZK.js → chunk-6EXWWPAW.js} +1 -1
- package/dist/{chunk-N3R6N7LG.js → chunk-6UB6YY3H.js} +1 -1
- package/dist/{chunk-ZGWXSHVM.js → chunk-77BK2IAJ.js} +1 -1
- package/dist/chunk-7DTWIWFO.js +6 -0
- package/dist/chunk-7IGWU6DK.js +8 -0
- package/dist/{chunk-DCCYUCBM.js → chunk-7NO4IENQ.js} +1 -1
- package/dist/{chunk-YI6SYUAK.js → chunk-AIGLJYQ5.js} +1 -1
- package/dist/chunk-AJVL6LXI.js +22 -0
- package/dist/{chunk-34TQBJ7I.js → chunk-ANGNTN36.js} +1 -1
- package/dist/chunk-ASDYAASN.js +3 -0
- package/dist/{chunk-KZRZYLN7.js → chunk-AYCWVVJ3.js} +35 -35
- package/dist/{chunk-VLMBXPRM.js → chunk-B27XRZ47.js} +1 -1
- package/dist/{chunk-JN5NUZ6D.js → chunk-BEB3AGSY.js} +1 -1
- package/dist/{chunk-4ZRGMK7Y.js → chunk-CBBU74QT.js} +1 -1
- package/dist/chunk-CHV7U5UV.js +9 -0
- package/dist/{chunk-5WK56FA3.js → chunk-CIOPLPZW.js} +1 -1
- package/dist/{chunk-B4GRHE44.js → chunk-CVEVPB3O.js} +3 -3
- package/dist/chunk-CXXMSYA6.js +1 -0
- package/dist/{chunk-RY7JCGLI.js → chunk-DHRCI7KE.js} +1 -1
- package/dist/{chunk-Y523KUQC.js → chunk-DOKA65JI.js} +1 -1
- package/dist/{chunk-XKNKRKHH.js → chunk-E7RMS776.js} +14 -14
- package/dist/chunk-EWSOX4WP.js +28 -0
- package/dist/{chunk-BZHP645G.js → chunk-FEWWCWKV.js} +9 -9
- package/dist/{chunk-SR4W2SYQ.js → chunk-FIXZT5TZ.js} +7 -7
- package/dist/{chunk-6GWYFUME.js → chunk-FM34DWV7.js} +6 -6
- package/dist/{chunk-VP2GI3UP.js → chunk-FPYOZOUY.js} +8 -8
- package/dist/{chunk-QZCLHKCI.js → chunk-FSORYU5C.js} +12 -12
- package/dist/{chunk-FQ4IRBMA.js → chunk-FYGPJPU7.js} +1 -1
- package/dist/{chunk-KP2JYXEU.js → chunk-GANZLRMW.js} +9 -9
- package/dist/{chunk-WBGJ4XB7.js → chunk-GBPGZFBS.js} +4 -4
- package/dist/chunk-GKX3C3JE.js +13 -0
- package/dist/{chunk-QMSINDXL.js → chunk-GL4NELAT.js} +1 -1
- package/dist/{chunk-DGHSCKOE.js → chunk-GN3AHAVY.js} +4 -4
- package/dist/{chunk-THLXDI76.js → chunk-GOAFMGUI.js} +10 -10
- package/dist/{chunk-7ZJRBFHA.js → chunk-HC3BZPWX.js} +1 -1
- package/dist/{chunk-JSHMIMAJ.js → chunk-HCDG7EUR.js} +1 -1
- package/dist/{chunk-GUHCKMC7.js → chunk-HE2I6KWY.js} +2 -2
- package/dist/chunk-HJECGV6W.js +5 -0
- package/dist/{chunk-TYQ2JL4J.js → chunk-HOXXEF52.js} +1 -1
- package/dist/{chunk-3CKYFCX4.js → chunk-HRNT4UDG.js} +17 -17
- package/dist/{chunk-WPG3ZHYT.js → chunk-HU24RSAE.js} +1 -1
- package/dist/{chunk-I7JU4IU3.js → chunk-I6V4DMNR.js} +2 -2
- package/dist/{chunk-EEB5XPWP.js → chunk-IBPULOGJ.js} +2 -2
- package/dist/{chunk-RZ2DWX4N.js → chunk-ILSE5F5F.js} +5 -5
- package/dist/{chunk-KAKJ7ENS.js → chunk-IOIY54KO.js} +2 -2
- package/dist/{chunk-NUPK6CUV.js → chunk-IQTURGC4.js} +1 -1
- package/dist/{chunk-XZXFUZIK.js → chunk-ISVODSRP.js} +6 -3
- package/dist/{chunk-VBLCYL4L.js → chunk-JA5WM66L.js} +1 -1
- package/dist/{chunk-H6WXTJOT.js → chunk-JGZEZHMP.js} +1 -1
- package/dist/{chunk-CBVKGAZH.js → chunk-JOANOIVK.js} +1 -1
- package/dist/{chunk-24Y5JHIR.js → chunk-JTRQ7HAS.js} +1 -1
- package/dist/{chunk-GLRRX4AL.js → chunk-K5YT5PMJ.js} +1 -1
- package/dist/{chunk-CEIIQRK5.js → chunk-K6LO6QI5.js} +6 -6
- package/dist/chunk-KHFPF534.js +8 -0
- package/dist/{chunk-JGRDG7CB.js → chunk-KKYNDLOC.js} +6 -6
- package/dist/{chunk-4IHYWLWE.js → chunk-KLG6RYYC.js} +5 -5
- package/dist/{chunk-7K3FYCRZ.js → chunk-KNNFNOX7.js} +9 -9
- package/dist/chunk-KPFP2I2S.js +8 -0
- package/dist/{chunk-JZBLOIL7.js → chunk-KPPKPGQI.js} +1 -1
- package/dist/{chunk-SY66VJAI.js → chunk-KTO427N3.js} +1 -1
- package/dist/{chunk-XHSMDUEW.js → chunk-LBLWN3SH.js} +3 -3
- package/dist/chunk-LHATGPIE.js +19 -0
- package/dist/{chunk-T2TZBTSM.js → chunk-LQD54ZL5.js} +1 -1
- package/dist/{chunk-4ZLFAXOC.js → chunk-M2GF44WC.js} +12 -12
- package/dist/{chunk-AQCUGTOR.js → chunk-MFZ4YMXE.js} +6 -6
- package/dist/{chunk-VFHKD7TQ.js → chunk-MHVWUYEN.js} +1 -1
- package/dist/chunk-MKPZIEQP.js +23 -0
- package/dist/{chunk-KZHVKSNF.js → chunk-MRVW6F5E.js} +1 -1
- package/dist/chunk-MUSNAMWH.js +1 -0
- package/dist/{chunk-VEQ45GAH.js → chunk-MVBDE4AX.js} +1 -1
- package/dist/{chunk-3E3LR2PM.js → chunk-MYJ3HQYG.js} +12 -12
- package/dist/{chunk-JFGJJNT2.js → chunk-N2BWOHNM.js} +6 -6
- package/dist/{chunk-ILDPJ26Y.js → chunk-N2FX4O3H.js} +1 -1
- package/dist/{chunk-N2445WHJ.js → chunk-NJ6WZHXC.js} +5 -5
- package/dist/{chunk-YRY64DQV.js → chunk-NLQLVXMJ.js} +1 -1
- package/dist/{chunk-Z3CTYK3U.js → chunk-NSNM4QIV.js} +5 -5
- package/dist/{chunk-PLPMCE44.js → chunk-O3SCB4QZ.js} +8 -8
- package/dist/{chunk-UR2ECNBB.js → chunk-OMSIXLK4.js} +1 -1
- package/dist/{chunk-74JMBOQH.js → chunk-P4NWDRHS.js} +26 -26
- package/dist/{chunk-DMEP2SCP.js → chunk-PAVOVX3D.js} +3 -3
- package/dist/{chunk-LIWBCIRZ.js → chunk-PBZ3UQMS.js} +4 -4
- package/dist/chunk-PRWA4AAC.js +11 -0
- package/dist/{chunk-6RK6R3RY.js → chunk-PT4GMPUB.js} +1 -1
- package/dist/{chunk-MWTCGJAI.js → chunk-Q4BJW37U.js} +1 -1
- package/dist/{chunk-WNOXHJVT.js → chunk-QB7TIWHT.js} +5 -5
- package/dist/{chunk-YO26RV3H.js → chunk-QF4FYOVE.js} +1 -1
- package/dist/{chunk-DJXXY23A.js → chunk-QHWD3G7T.js} +2 -2
- package/dist/{chunk-GEZM6ARD.js → chunk-QIPO4EVJ.js} +1 -1
- package/dist/{chunk-6FZ5JTBY.js → chunk-QMBMK6PP.js} +2 -2
- package/dist/{chunk-TOVEZAIM.js → chunk-QOYKBINM.js} +1 -1
- package/dist/{chunk-WXZZGHET.js → chunk-QT34GMZR.js} +1 -1
- package/dist/chunk-QV5A7NFQ.js +11 -0
- package/dist/chunk-RJG67VRP.js +15 -0
- package/dist/{chunk-LBKKKZ4M.js → chunk-RMUOUMV2.js} +2 -2
- package/dist/{chunk-CALBDO7B.js → chunk-RPXRMTOU.js} +1 -1
- package/dist/chunk-RVD6HJUJ.js +4 -0
- package/dist/{chunk-CJHYOHMU.js → chunk-SAAXAAAH.js} +1 -1
- package/dist/chunk-TIYRBJSB.js +7 -0
- package/dist/{chunk-4BKJ6A5H.js → chunk-TJ5ZX5HP.js} +10 -10
- package/dist/chunk-TN3W72FC.js +8 -0
- package/dist/{chunk-2DYVVHZA.js → chunk-U22563X2.js} +1 -1
- package/dist/{chunk-QADNVFV5.js → chunk-U45APXV3.js} +1 -1
- package/dist/{chunk-OOWPLQD5.js → chunk-UEADX2GV.js} +2 -2
- package/dist/chunk-UK2D2CSB.js +14 -0
- package/dist/{chunk-Z66QBDNU.js → chunk-UOHHIEH4.js} +1 -1
- package/dist/{chunk-MEN4B6NP.js → chunk-UQNKFMJR.js} +12 -12
- package/dist/{chunk-FTMCNC66.js → chunk-UZFFSZFI.js} +1 -1
- package/dist/{chunk-SE6IQZYW.js → chunk-V64XY7L4.js} +9 -9
- package/dist/{chunk-75H4BWNC.js → chunk-VEF3STCH.js} +1 -1
- package/dist/chunk-VLI2ED22.js +7 -0
- package/dist/{chunk-V4XR4MOS.js → chunk-VREZFFRE.js} +1 -1
- package/dist/chunk-VY5NO4TS.js +2 -0
- package/dist/{chunk-QG37GJP2.js → chunk-WBAWJIVM.js} +4 -4
- package/dist/{chunk-CMJD5URC.js → chunk-WCJR2GNH.js} +18 -18
- package/dist/{chunk-Y7KDCC6E.js → chunk-WM37FXRK.js} +1 -1
- package/dist/{chunk-4LOHQ4QB.js → chunk-X27K2NCU.js} +5 -5
- package/dist/{chunk-L543DFHF.js → chunk-X5RFTIHV.js} +1 -1
- package/dist/chunk-XJTZU7UH.js +4 -0
- package/dist/{chunk-RBS3AWE7.js → chunk-XK3VYRLR.js} +1 -1
- package/dist/{chunk-FJVZ2W55.js → chunk-XMAOLCQV.js} +1 -1
- package/dist/{chunk-GC4N4UQM.js → chunk-XXRUDMD5.js} +5 -5
- package/dist/{chunk-34EBBZFK.js → chunk-Y6H5C6A4.js} +1 -1
- package/dist/{chunk-LPPJNZQ6.js → chunk-YGKQMENL.js} +1 -1
- package/dist/{chunk-NOGSS432.js → chunk-YNE5YC6E.js} +1 -1
- package/dist/chunk-YS3CF7GL.js +2 -0
- package/dist/{chunk-R62JKPYY.js → chunk-Z2Z653OO.js} +1 -1
- package/dist/{chunk-G2Y5I5OR.js → chunk-ZSVBEJ4G.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.js +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.d.ts +13 -2
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/UnitMenu.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/payment.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +506 -506
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +5 -5
- package/dist/markdown/index.js +1 -1
- package/dist/model-viewer/index.d.ts +123 -0
- package/dist/model-viewer/index.js +7 -0
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/StepChain.js +1 -1
- package/dist/shell/Stepper.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +10 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.d.ts +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +12 -1
- package/dist/Calculator-LSDVIJVQ.js +0 -29
- package/dist/PdfViewer-UY5SRC63.js +0 -1
- package/dist/Sidebar-BKNCPUOE.js +0 -44
- package/dist/chunk-436PJFHC.js +0 -11
- package/dist/chunk-4Y33Y4OX.js +0 -8
- package/dist/chunk-574SLTKO.js +0 -8
- package/dist/chunk-A4PFVMQ2.js +0 -7
- package/dist/chunk-BHHFVIAD.js +0 -2
- package/dist/chunk-BM2QIV64.js +0 -23
- package/dist/chunk-D2WJAF62.js +0 -4
- package/dist/chunk-DG2TGWXI.js +0 -15
- package/dist/chunk-DRMIQ3YE.js +0 -1
- package/dist/chunk-ENFXDIIZ.js +0 -8
- package/dist/chunk-FI6IJTAJ.js +0 -14
- package/dist/chunk-FVKXDF2Q.js +0 -12
- package/dist/chunk-HMT3MES3.js +0 -27
- package/dist/chunk-INADSWOF.js +0 -28
- package/dist/chunk-LCEQIFPK.js +0 -3
- package/dist/chunk-OM42AUMS.js +0 -4
- package/dist/chunk-OQ6TECLX.js +0 -6
- package/dist/chunk-SFULX4E3.js +0 -7
- package/dist/chunk-T7D73HT7.js +0 -11
- package/dist/chunk-TM4CRQ3W.js +0 -19
- package/dist/chunk-TU2L7NW3.js +0 -7
- package/dist/chunk-UP4HLGMZ.js +0 -9
- package/dist/chunk-VABHQDN5.js +0 -1
- package/dist/chunk-VDYF3WPJ.js +0 -2
- package/dist/chunk-XQWHKXLS.js +0 -22
- package/dist/chunk-YIUWX2IU.js +0 -8
- package/dist/chunk-YX2OOGV7.js +0 -4
- package/dist/chunk-ZQ24H5UO.js +0 -13
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useShellPrefs as t}from"./chunk-KC3EX26K.js";import{toast_default as e}from"./chunk-
|
|
2
|
-
return(new Date).toISOString()}var
|
|
1
|
+
import{useShellPrefs as t}from"./chunk-KC3EX26K.js";import{toast_default as e}from"./chunk-5X3Z45SL.js";import{useSyncExternalStore as n,useCallback as o,useMemo as a}from"react";var r=[{id:"bell",label:"Bell",description:"Soft bell with one harmonic"},{id:"chime",label:"Chime",description:"Two-note ascending chime"},{id:"bowl",label:"Singing Bowl",description:"Long-decay meditation tone"},{id:"wind-chimes",label:"Wind Chimes",description:"Four soft tones in succession"},{id:"off",label:"Off (silent)",description:"No sound — only desktop notification"}],i=[{id:"none",label:"None"},{id:"tick-fast",label:"Ticking Fast"},{id:"tick-slow",label:"Ticking Slow"},{id:"rain",label:"Rain"},{id:"fireplace",label:"Fireplace"},{id:"white",label:"White Noise"},{id:"pink",label:"Pink Noise"},{id:"brown",label:"Brown Noise"}],c=()=>`pomodoro-${/* @__PURE__ */(new Date).toISOString().slice(0,10)}`,l={focus:1500,short:300,long:900},s="bell",u=100,d=1,f="none",m=50,h={autoStartBreaks:!1,autoStartPomodoros:!1,longBreakInterval:4},g={running:!1,remaining:l.focus,mode:"focus",total:l.focus,streak:0,count:"undefined"!=typeof localStorage?(()=>{try{return parseInt(localStorage.getItem(c())||"0",10)||0}catch{return 0}})():0},p=null,k=/* @__PURE__ */new Set,w=t=>{g={...g,...t},k.forEach(t=>t())};function M(){return g}function S(t){return k.add(t),()=>{k.delete(t)}}function b(t){l=t,g.running||g.remaining!==g.total||w({remaining:t[g.mode],total:t[g.mode]})}function y(t){s=t}function v(t,e){u=Math.max(0,Math.min(100,Math.round(t))),d=Math.max(1,Math.min(5,Math.round(e)))}function T(t){h={autoStartBreaks:!!t.autoStartBreaks,autoStartPomodoros:!!t.autoStartPomodoros,longBreakInterval:Math.max(1,Math.min(20,Math.round(t.longBreakInterval||4)))}}function A(t,e){f=t,m=Math.max(0,Math.min(100,Math.round(e))),g.running&&"focus"===g.mode?(F(),R()):"none"!==t&&0!==m||F()}function I(){g.running||(w({running:!0}),p=setInterval(C,1e3),"focus"===g.mode&&R())}function x(){(g.running||null!==p)&&(null!==p&&(clearInterval(p),p=null),w({running:!1}),F())}function B(t){x(),w({mode:t,remaining:l[t],total:l[t]})}function C(){g.remaining<=1?function(){null!==p&&(clearInterval(p),p=null);F(),N(s,{volume:u,repeat:d});const t="focus"===g.mode?"Pomodoro complete — time for a break! 🍅":"Break's over — back to work!";if("undefined"!=typeof Notification&&"granted"===Notification.permission)try{new Notification(t)}catch{}try{e.info(t)}catch{}if("focus"===g.mode){const t=g.streak+1,e=g.count+1;(t=>{try{localStorage.setItem(c(),String(t))}catch{}})(e);const n=t%h.longBreakInterval===0?"long":"short";w({running:!1,streak:t,count:e,mode:n,remaining:l[n],total:l[n]}),h.autoStartBreaks&&setTimeout(()=>I(),50)}else w({running:!1,mode:"focus",remaining:l.focus,total:l.focus}),h.autoStartPomodoros&&setTimeout(()=>I(),50)}():w({remaining:g.remaining-1})}function N(t=s,e={}){if("off"===t)return;const n=Math.max(0,Math.min(100,e.volume??100))/100;if(0===n)return;const o=Math.max(1,Math.min(5,e.repeat??1));for(let e=0;e<o;e++)setTimeout(()=>P(t,n),2500*e)}function P(t,e){try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=(t,n,a,r=.22,i="sine")=>{const c=o.createOscillator(),l=o.createGain();c.connect(l),l.connect(o.destination),c.type=i,c.frequency.value=t;const s=o.currentTime+n;l.gain.setValueAtTime(0,s),l.gain.linearRampToValueAtTime(r*e,s+.03),l.gain.exponentialRampToValueAtTime(1e-4,s+a),c.start(s),c.stop(s+a)};let r=2;"bell"===t?(a(880,0,1.8),a(1320,0,1.4,.1),r=2):"chime"===t?(a(659.25,0,.7),a(880,.2,1.3),r=2):"bowl"===t?(a(440,0,3.4,.22),a(660,0,3,.08),a(880,.05,2.8,.05),r=4):"wind-chimes"===t&&(a(1175,0,1.1,.16),a(880,.15,1.3,.16),a(1318,.3,1.5,.16),a(1047,.5,1.7,.13),r=3),setTimeout(()=>{try{o.close()}catch{}},1e3*r+500)}catch{}}var D=null,_={none:0,white:.3,pink:.3,brown:.3,"tick-fast":.6,"tick-slow":.6,rain:.4,fireplace:.5};function O(t,e){if("none"===e)return null;const n=t.sampleRate,o="white"===e||"pink"===e||"brown"===e?2:4,a=n*o,r=t.createBuffer(1,a,n),i=r.getChannelData(0);if("white"===e)for(let t=0;t<a;t++)i[t]=.5*(2*Math.random()-1);else if("pink"===e){let t=0,e=0,n=0,o=0,r=0,c=0,l=0;for(let s=0;s<a;s++){const a=2*Math.random()-1;t=.99886*t+.0555179*a,e=.99332*e+.0750759*a,n=.969*n+.153852*a,o=.8665*o+.3104856*a,r=.55*r+.5329522*a,c=-.7616*c-.016898*a,i[s]=.11*(t+e+n+o+r+c+l+.5362*a)*.55,l=.115926*a}}else if("brown"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=3.5*t*.5}}else if("tick-fast"===e||"tick-slow"===e){const t="tick-fast"===e?.5:1,r=Math.floor(.045*n);for(let e=0;e<o;e+=t){const t=Math.floor(e*n);for(let e=0;e<r&&t+e<a;e++){const o=Math.exp(-e/n*180),a=2*Math.random()-1,r=Math.sin(2*Math.PI*1100*(e/n));i[t+e]+=(.7*a+.25*r)*o*.55}}}else if("rain"===e){let t=0;for(let e=0;e<a;e++){const o=2*Math.random()-1,a=o-.93*t;t=o;const r=.7+.3*Math.sin(e/n*2*Math.PI*.25);i[e]=a*r*.4}}else if("fireplace"===e){let t=0;for(let e=0;e<a;e++){t=(t+.02*(2*Math.random()-1))/1.02,i[e]=1.6*t}let e=.4*Math.random()*n;for(;e<a;){const t=Math.floor((.012+.05*Math.random())*n),o=.35+.45*Math.random(),r=Math.floor(e);for(let e=0;e<t&&r+e<a;e++){const t=Math.exp(-e/n*90);i[r+e]+=(2*Math.random()-1)*t*o}e+=(.08+.62*Math.random())*n}}return r}function R(){if(!D&&"none"!==f&&0!==m)try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const e=new t,n=O(e,f);if(!n){try{e.close()}catch{}return}const o=e.createBufferSource();o.buffer=n,o.loop=!0;const a=e.createGain();a.gain.value=m/100*_[f],o.connect(a).connect(e.destination),o.start(),D={ctx:e,src:o,gain:a}}catch{}}function F(){if(D){try{D.src.stop()}catch{}try{D.ctx.close()}catch{}D=null}}function G(t,e){if("none"!==t&&0!==e)try{const n=window.AudioContext||window.webkitAudioContext;if(!n)return;const o=new n,a=O(o,t);if(!a){try{o.close()}catch{}return}const r=o.createBufferSource();r.buffer=a,r.loop=!0;const i=o.createGain();i.gain.value=e/100*_[t],r.connect(i).connect(o.destination),r.start(),setTimeout(()=>{try{r.stop()}catch{}try{o.close()}catch{}},3e3)}catch{}}var V="pomodoro_tasks",j="pomodoro_tasks_migrated";function E(){return Math.random().toString(36).slice(2,11)}function K(){/* @__PURE__ */
|
|
2
|
+
return(new Date).toISOString()}var L=null,W=[],X=!1,q=null,J=/* @__PURE__ */new Set;function Z(){for(const t of J)t()}function $(t){W=t,Z()}function z(){const t=L;return t?q=t.list().then(e=>{L===t&&(W=e,X=!0,Z())}).catch(()=>{L===t&&(X=!0,Z())}).finally(()=>{q=null}):(W=[],X=!0,Z(),Promise.resolve())}function H(t){L=t,W=[],X=!1,t?z():Z()}function Q(t){return J.add(t),!L||X||q||z(),()=>{J.delete(t)}}function U(){return W}function Y(){const e=function(){const{prefs:e,save:n}=t(),r=a(()=>{const t=e.todo_tasks;return Array.isArray(t)?t:[]},[e.todo_tasks]),i=o(t=>{n({todo_tasks:t})},[n]),c=o(t=>{const e=E(),n=K(),o={done:!1,...t,name:t.name.trim(),id:e,createdAt:n,updatedAt:n};return i([...r,o]),e},[r,i]),l=o((t,e)=>{i(r.map(n=>n.id===t?{...n,...e,id:n.id,updatedAt:K()}:n))},[r,i]),s=o(t=>{i(r.filter(e=>e.id!==t))},[r,i]),u=o(t=>{const e=r.find(e=>e.id===t);e&&l(t,{done:!e.done})},[r,l]);return{tasks:r,addTask:c,updateTask:l,removeTask:s,toggleDone:u,setAllTasks:i}}(),r=n(Q,U,U),i=o(t=>{const n=L;if(!n)return e.addTask(t);const o="tmp-"+E(),a=K(),r={done:!1,...t,name:t.name.trim(),id:o,createdAt:a,updatedAt:a};return $([...W,r]),n.create({...t,name:t.name.trim()}).then(t=>$(W.map(e=>e.id===o?{...r,...t}:e))).catch(()=>$(W.filter(t=>t.id!==o))),o},[e]),c=o((t,n)=>{const o=L;if(!o)return e.updateTask(t,n);$(W.map(e=>e.id===t?{...e,...n,id:t,updatedAt:K()}:e)),o.update(t,n).catch(()=>{z()})},[e]),l=o(t=>{const n=L;if(!n)return e.removeTask(t);const o=W;$(W.filter(e=>e.id!==t)),n.remove(t).catch(()=>$(o))},[e]),s=o(t=>{if(!L)return e.toggleDone(t);const n=W.find(e=>e.id===t);n&&c(t,{done:!n.done})},[e,c]),u=o(t=>{L||e.setAllTasks(t)},[e]);return null===L?e:{tasks:r,addTask:i,updateTask:c,removeTask:l,toggleDone:s,setAllTasks:u}}function tt(t,e){try{if(localStorage.getItem(j))return;const n=localStorage.getItem(V);if(!n)return void localStorage.setItem(j,"1");const o=JSON.parse(n);if(!Array.isArray(o)||0===o.length)return localStorage.removeItem(V),void localStorage.setItem(j,"1");const a=K(),r=o.filter(t=>"string"==typeof t?.name).map(t=>({id:t.id||E(),name:String(t.name),done:!!t.done,estimated:"number"==typeof t.estimated?t.estimated:void 0,completed:"number"==typeof t.completed?t.completed:void 0,createdAt:a,updatedAt:a})),i=new Set(t.map(t=>t.id));e([...r.filter(t=>!i.has(t.id)),...t]),localStorage.removeItem(V),localStorage.setItem(j,"1")}catch{try{localStorage.setItem(j,"1")}catch{}}}export{r as ALARM_OPTIONS,i as FOCUS_SOUND_OPTIONS,M as getPomoSnapshot,tt as migratePomodoroTasksOnce,N as playAlarm,x as pomoPause,I as pomoStart,B as pomoSwitchMode,G as previewFocusSound,y as setPomoAlarm,v as setPomoAlarmConfig,T as setPomoBehaviour,b as setPomoDurations,A as setPomoFocusSound,H as setShellTodoProvider,S as subscribePomo,Y as useTodoTasks};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Input_default as e}from"./chunk-
|
|
1
|
+
import{Input_default as e}from"./chunk-PT4GMPUB.js";import{useState as r,useRef as t}from"react";import{jsx as o}from"react/jsx-runtime";function n({value:n,label:a,onDone:u}){const[l,c]=r(n),i=t(!1),p=e=>{i.current||(i.current=!0,u(e))};/* @__PURE__ */
|
|
2
2
|
return o(e,{size:"sm",autoFocus:!0,"aria-label":a,value:l,onChange:e=>c(e.target.value),onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{e.stopPropagation(),"Enter"===e.key?(e.preventDefault(),p(l.trim()||n)):"Escape"===e.key&&(e.preventDefault(),p(null))},onBlur:()=>p(l.trim()||n),onClick:e=>e.stopPropagation()})}export{n as RenameField};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{renderMenuEntries as e,menuStatusIds as t}from"./chunk-
|
|
2
|
-
return p(n,{portal:!0,minWidth:x,style:W,onClose:w,className:H,children:/* @__PURE__ */p(r.Provider,{value:!0,children:/* @__PURE__ */v("div",{ref:L,id:
|
|
1
|
+
import{renderMenuEntries as e,menuStatusIds as t}from"./chunk-UZFFSZFI.js";import{PopupMenu as n,MenuSemanticsContext as r}from"./chunk-GOAFMGUI.js";import{leavesContextMenuAlone as o}from"./chunk-5QFPTDQF.js";import{placeAtPoint as i,popupBounds as l}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as u}from"./chunk-TWVUQUUD.js";import{useRef as s,useId as a,useState as d,useEffect as m,useCallback as f}from"react";import{jsx as p,jsxs as v}from"react/jsx-runtime";function h(e){return e?[...e.querySelectorAll("button:not([disabled]), a[href]")].filter(e=>!e.closest("[data-popup-submenu-panel]")):[]}function w({at:o,onClose:w,items:y,linkAs:g,children:k,owner:E,"aria-label":b,minWidth:x=180,className:H="",autoFocus:D=!0}){const L=s(null),A=a(),[S,U]=d(null),j=s(w);j.current=w,c(()=>{const e=L.current?.closest("[data-popup-menu-tree]");if(!e)return;const t={width:e.offsetWidth,height:e.offsetHeight},n=i({point:o,menu:t,bounds:l(E??null)});U(e=>e&&e.left===n.left&&e.top===n.top&&e.maxHeight===n.maxHeight?e:{left:n.left,top:n.top,maxHeight:n.maxHeight,scroll:t.height>n.maxHeight})},[o.x,o.y,E]);const F=s(null),C=s(!1);m(()=>(F.current=document.activeElement,()=>{const e=document.activeElement;e&&e!==document.body&&!L.current?.contains(e)||F.current?.focus?.({preventScroll:!0})}),[]),m(()=>{S&&!C.current&&D&&(C.current=!0,h(L.current)[0]?.focus({preventScroll:!0}))},[S,D]),m(()=>{if(D)return;const e=e=>{if(L.current?.contains(document.activeElement))return;const t=h(L.current),n="ArrowDown"===e.key||"Home"===e.key?t[0]:"ArrowUp"===e.key||"End"===e.key?t[t.length-1]:void 0;n&&(e.preventDefault(),n.focus({preventScroll:!0}))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[D]),m(()=>u(e=>"Escape"===e.key&&(j.current(),!0),()=>L.current),[]),m(()=>{const e=()=>j.current();return window.addEventListener("resize",e),window.addEventListener("blur",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("blur",e),window.removeEventListener("scroll",e,!0)}},[]);const T=f(e=>{if(e.target.closest("[data-popup-submenu-panel]"))return;if("Tab"===e.key)return e.preventDefault(),void j.current();const t=h(L.current);if(0===t.length)return;const n=t.indexOf(document.activeElement),r="ArrowDown"===e.key?(n+1)%t.length:"ArrowUp"===e.key?n<=0?t.length-1:n-1:"Home"===e.key?0:"End"===e.key?t.length-1:-1;r<0||(e.preventDefault(),t[r].focus())},[]),W=S?{left:S.left,top:S.top,maxHeight:S.maxHeight,...S.scroll?{overflowY:"auto"}:{}}:{left:o.x,top:o.y,visibility:"hidden"};/* @__PURE__ */
|
|
2
|
+
return p(n,{portal:!0,minWidth:x,style:W,onClose:w,className:H,children:/* @__PURE__ */p(r.Provider,{value:!0,children:/* @__PURE__ */v("div",{ref:L,id:A,role:"menu","aria-label":b,"aria-describedby":y?t(y,A):void 0,"data-context-menu":"",onKeyDown:T,children:[y&&e(y,{menuId:A,choose:e=>{e.disabled||(j.current(),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>j.current(),linkAs:g}),k]})})})}function y(){const[e,t]=d(null),n=f(()=>t(null),[]),r=f((e,n)=>{const r="nativeEvent"in e?e.nativeEvent:e;if(o(r))return!1;e.preventDefault();const i=e.target instanceof Element?e.target:null;let{clientX:l,clientY:c}=e;if(0===l&&0===c&&i){const e=i.getBoundingClientRect();l=e.left,c=e.bottom}return t({x:l,y:c,data:n,owner:i}),!0},[]),i=f(e=>{r(e,void 0)},[r]);return{open:r,onContextMenu:i,close:n,state:e,props:{at:{x:e?.x??0,y:e?.y??0},owner:e?.owner??null,onClose:n}}}export{w as ContextMenu,y as useContextMenu};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{DropdownMenu as e,TRIGGER_CLASS as n}from"./chunk-
|
|
1
|
+
import{DropdownMenu as e,TRIGGER_CLASS as n}from"./chunk-3DSGJIC7.js";import{Tooltip as a}from"./chunk-SOZCWT6I.js";import{jsx as i,jsxs as l}from"react/jsx-runtime";function t(e,n,a){if(n&&!(n.options.length<2))/* @__PURE__ */
|
|
2
2
|
return i(s,{value:e,options:n.options,onChange:n.onChange,label:n.label,disabled:a})}var r=`${n} -ml-1 h-6 px-1 text-xs`;function s({value:n,options:t,onChange:s,label:o,disabled:c}){
|
|
3
3
|
/* @__PURE__ */
|
|
4
4
|
return i(a,{content:o,describe:!1,children:/* @__PURE__ */i(e,{trigger:
|
|
@@ -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-HCDG7EUR.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"}),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{LIGHTBOX_PICTURE_FIT as e,ZoomableImage as t}from"./chunk-CGUMJZUB.js";import{isVideoUrl as r,mediaFileName as n}from"./chunk-B27XRZ47.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as a}from"./chunk-7QSDPSXP.js";import{useFocusTrap as l,useScrollLock as i}from"./chunk-DWGYC7OD.js";import{Button_default as c}from"./chunk-EVYD6UFQ.js";import{Icon as s}from"./chunk-ISVODSRP.js";import{Z_LAYERS as m}from"./chunk-62LW225J.js";import{useHydrated as u}from"./chunk-D65T4H6J.js";import{buttonClasses as d}from"./chunk-UQYNPYF4.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-HCDG7EUR.js";import{useRef as p,useState as x,useCallback as b,useEffect as k}from"react";import{createPortal as g}from"react-dom";import{jsx as v,jsxs as w,Fragment as N}from"react/jsx-runtime";var y=/\.(pdf|docx?|xlsx?|pptx?|csv|txt|zip|rar|7z|dwg|dxf|stp|step|igs|iges)(?:[?#]|$)/i;function j(e){return e.kind?e.kind:r(e.url)?"video":y.test(e.url)?"file":"image"}var C="flex items-center justify-center rounded-full bg-black/60 text-on-accent hover:bg-black/80 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",D=e=>e.stopPropagation();function U({images:r,startIndex:y=0,onClose:U,onIndexChange:$,onOpenFile:z}){const F=h().lightbox,I=u(),P=p(null),R=p(null),[W,Y]=x(y),A=r.length,E=I&&A>0,G=b(e=>{if(A<2)return;const t=((W+e)%A+A)%A;Y(t),$?.(t)},[W,A,$]);if(a(E),l(P,E,R),i(E),k(()=>{if(E)return f(()=>(U(),!0),()=>P.current)},[E,U]),k(()=>{if(!E)return;const e=e=>{"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.target?.closest?.("video")||(e.preventDefault(),G("ArrowRight"===e.key?1:-1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[E,G]),!E)return null;const L=r[Math.min(W,A-1)],O=j(L),Q=L.caption||n(L.url);let S;return S="video"===O?/* @__PURE__ */v("video",{src:L.url,controls:!0,playsInline:!0,"aria-label":Q,onClick:D,className:`${e} rounded-lg bg-black`}):"file"===O?/* @__PURE__ */w("div",{onClick:D,className:"flex max-w-[calc(100vw-144px)] flex-col items-center gap-3 rounded-lg bg-surface px-10 py-8 text-center text-ink-faint",children:[
|
|
2
|
+
/* @__PURE__ */v(s,{name:"document","aria-hidden":"true",className:"h-10 w-10"}),
|
|
3
|
+
/* @__PURE__ */v("span",{className:"max-w-[60ch] break-all text-sm font-medium text-ink",children:Q}),z?/* @__PURE__ */v(c,{size:"sm",onClick:()=>z(L),children:F.openFile}):/* @__PURE__ */v("a",{href:L.url,target:"_blank",rel:"noopener noreferrer",className:d({size:"sm"}),children:F.openFile})]}):/* @__PURE__ */v(t,{src:L.url,alt:Q,className:`${e} object-contain`,frameClassName:"rounded-lg"}),g(
|
|
4
|
+
/* @__PURE__ */w("div",{ref:P,...o({role:"dialog",modal:!0,label:F.label}),"data-lightbox-backdrop":"",className:"fixed inset-0 flex items-center justify-center bg-black/80",style:{zIndex:m.overlay},onClick:U,children:[S,
|
|
5
|
+
/* @__PURE__ */w("div",{className:"absolute right-4 top-4 flex items-center gap-2",onClick:D,children:[
|
|
6
|
+
/* @__PURE__ */v("span",{className:"rounded bg-black/60 px-2 py-1 text-xs text-on-accent tabular-nums",children:F.counter(W+1,A)}),
|
|
7
|
+
/* @__PURE__ */v("button",{ref:R,type:"button",onClick:U,"aria-label":F.close,className:`${C} h-8 w-8`,children:/* @__PURE__ */v(s,{name:"close","aria-hidden":"true",className:"h-4 w-4"})})]}),A>1&&/* @__PURE__ */w(N,{children:[
|
|
8
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{D(e),G(-1)},"aria-label":F.previous,className:`${C} absolute left-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(s,{name:"chevron-left","aria-hidden":"true",className:"h-5 w-5"})}),
|
|
9
|
+
/* @__PURE__ */v("button",{type:"button",onClick:e=>{D(e),G(1)},"aria-label":F.next,className:`${C} absolute right-4 top-1/2 h-10 w-10 -translate-y-1/2`,children:/* @__PURE__ */v(s,{name:"chevron-right","aria-hidden":"true",className:"h-5 w-5"})})]}),
|
|
10
|
+
/* @__PURE__ */w("div",{className:"absolute inset-x-18 bottom-4 flex items-center justify-center gap-3",onClick:D,children:[
|
|
11
|
+
/* @__PURE__ */v("span",{className:"min-w-0 break-words text-center text-sm text-on-accent/85",children:Q}),"file"!==O&&/* @__PURE__ */v("a",{href:L.url,target:"_blank",rel:"noopener noreferrer",className:"flex-none text-xs font-medium text-on-accent/70 underline decoration-on-accent/30 underline-offset-2 hover:text-on-accent",children:F.openOriginal})]})]}),document.body)}export{U as ImageLightbox,j as lightboxKind};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import{AccessibleTable as e}from"./chunk-HY6CBG4M.js";import{ChartDefs as t,maskId as r}from"./chunk-465RRWBY.js";import{polygonPoints as l}from"./chunk-VFC6QUEN.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{angleScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as i,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{useShellStrings as m,useShellLocale as c}from"./chunk-HCDG7EUR.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as p,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var k=3,g=e=>`${e.map(([e,t],r)=>`${0===r?"M":"L"}${e.toFixed(2)},${t.toFixed(2)}`).join(" ")} Z`;function x({axes:k,series:x,size:y=300,mode:b="area",grid:v="polygon",rings:M=4,formatValue:N,animate:j=!0,className:C,emptyLabel:$}){const W=m().charts,F=c(),R=N??(e=>h(e,F)),w=$??W.nothingToCompare,A=p(),[E,H]=u(null),{highlighted:L}=a(),U=x;if(k.length<3||0===U.length)/* @__PURE__ */
|
|
2
|
+
return d("p",{className:`text-sm text-gray-500 ${C??""}`,children:w});const Y=y/2,z=y/2,B=y/2-46,Q=o(k.length),T=k.map((e,t)=>null!=e.max&&Number.isFinite(e.max)&&e.max>0?e.max:Math.max(1,...U.map(e=>e.values[t]??0).filter(Number.isFinite))),V=(e,t)=>{const r=Math.max(0,Math.min(1,t/T[e])),l=Q.center(e)-Q.step/2;return[Y+B*r*Math.cos(l),z+B*r*Math.sin(l)]},D=(e,t)=>null!==E?E!==e:null!==L&&L!==t,G=null!==E?U[E]:void 0;/* @__PURE__ */
|
|
3
|
+
return f("div",{className:`relative ${C??""}`,children:[
|
|
4
|
+
/* @__PURE__ */f("svg",{width:"100%",height:y,viewBox:`0 0 ${y} ${y}`,role:"img","aria-labelledby":A,onMouseLeave:()=>H(null),children:[
|
|
5
|
+
/* @__PURE__ */d("title",{id:A,children:W.acrossMeasures(U.map(e=>e.label),k.length)}),Array.from({length:M},(e,t)=>{const r=B*(t+1)/M;return"circle"===v?/* @__PURE__ */d("circle",{cx:Y,cy:z,r:r,fill:"none",stroke:i.grid,strokeWidth:1},t):/* @__PURE__ */d("path",{d:g(l(Y,z,r,k.length)),fill:"none",stroke:i.grid,strokeWidth:1},t)}),k.map((e,t)=>{const[r,l]=V(t,T[t]);/* @__PURE__ */
|
|
6
|
+
return f("g",{children:[
|
|
7
|
+
/* @__PURE__ */d("line",{x1:Y,y1:z,x2:r,y2:l,stroke:i.grid,strokeWidth:1}),
|
|
8
|
+
/* @__PURE__ */d("text",{x:Y+(B+18)*Math.cos(Q.center(t)-Q.step/2),y:z+(B+18)*Math.sin(Q.center(t)-Q.step/2)+4,textAnchor:"middle",fontSize:11,fill:i.label,children:e.label})]},e.key)}),
|
|
9
|
+
/* @__PURE__ */d(t,{id:A,reveal:!!j&&"center-out"}),U.map((e,t)=>{const l=s(t,3,e.color,e.tone),a=k.map((t,r)=>V(r,e.values[r]??0));/* @__PURE__ */
|
|
10
|
+
return f("g",{opacity:D(t,e.key)?.3:1,onMouseEnter:()=>H(t),mask:j?`url(#${r(A)})`:void 0,children:["area"===b&&/* @__PURE__ */d("path",{d:g(a),fill:l,fillOpacity:.18,stroke:"none"}),
|
|
11
|
+
/* @__PURE__ */d("path",{d:g(a),fill:"none",stroke:l,strokeWidth:2,strokeLinejoin:"round"}),a.map(([e,t],r)=>/* @__PURE__ */d("circle",{cx:e,cy:t,r:3.5,fill:l,stroke:i.surface,strokeWidth:1.5},r))]},e.key)})]}),G&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:G.label,rows:k.map((e,t)=>({key:e.key,label:e.label,color:s(E,3,G.color,G.tone),value:R(G.values[t]??0)}))})}),
|
|
12
|
+
/* @__PURE__ */d("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:U.map((e,t)=>/* @__PURE__ */f("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
|
|
13
|
+
/* @__PURE__ */d("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:s(t,3,e.color,e.tone)}}),
|
|
14
|
+
/* @__PURE__ */d("span",{className:"flex-1 truncate",children:e.label})]},e.key))}),
|
|
15
|
+
/* @__PURE__ */d(e,{caption:W.acrossMeasures(U.map(e=>e.label),k.length),head:[W.tableSeries,...k.map(e=>e.label)],rows:U.map(e=>[e.label,...k.map((t,r)=>R(e.values[r]??0))])})]})}export{k as RADAR_SERIES_CAP,x as RadarChart};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{unitBox as e}from"./chunk-
|
|
2
|
-
return v("div",{className:"relative","data-number-box":"",style:$||re?{...$?{"--rosh-number-prefix-width":`${we}px`}:{},...re?{"--rosh-number-suffix-room":`max(${je.least}, calc(${je.right} + ${Ne}px))`}:{}}:void 0,children:[$&&/* @__PURE__ */m("span",{ref:ye,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:$}),
|
|
1
|
+
import{unitBox as e}from"./chunk-QOYKBINM.js";import{useSettingAuto as r}from"./chunk-2NMW66P5.js";import{IconButton_default as t}from"./chunk-SV5RRBVA.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{useBrowserLayoutEffect as i}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as a}from"./chunk-TWVUQUUD.js";import{useShellStrings as l}from"./chunk-HCDG7EUR.js";import{forwardRef as c,useId as s,useState as u,useRef as d,useCallback as p,useEffect as f}from"react";import{jsx as m,jsxs as v,Fragment as h}from"react/jsx-runtime";function b(e){const r=String(e),t=/e-(\d+)$/.exec(r);return t?Number(t[1]):r.split(".")[1]?.length??0}function g(e){return 0===b(e)?{precision:0}:{snap:!0}}var x=(e,r)=>null==e?"":null!=r?e.toFixed(r):String(e),y={compact:{right:"var(--space-16)",least:"var(--space-32)"},steppers:{right:"calc(var(--space-40) + var(--space-20))",least:"calc(var(--space-48) * 2)"},plain:{right:"var(--space-8)",least:"var(--space-40)"}};function w(e){const r=d(null),[t,n]=u(0);return i(()=>{const e=r.current;if(!e)return;const t=()=>n(Math.ceil(e.getBoundingClientRect().width));if(t(),"undefined"==typeof ResizeObserver)return;const o=new ResizeObserver(t);return o.observe(e),()=>o.disconnect()},[e]),[r,t]}function k(e,r,t){if(!r)return e;const n=e.trimEnd();for(let e=r.length;e>(t?0:r.length-1);e--)if(n.endsWith(r.slice(0,e)))return n.slice(0,-e).trimEnd();return e}function N({dir:e,compact:r,label:n,disabled:i,onStep:a}){const l=d(a);l.current=a;const c=d({}),s=p(()=>{const e=c.current;void 0!==e.wait&&clearTimeout(e.wait),void 0!==e.every&&clearInterval(e.every),e.off?.(),c.current={}},[]);f(()=>s,[s]),f(()=>{i&&s()},[i,s]);const u=/* @__PURE__ */m(o,{name:e>0?"chevron-up":"chevron-down","aria-hidden":"true",focusable:"false",className:r?"h-2.5 w-2.5":"h-3.5 w-3.5",strokeWidth:r?2.6:2}),v={tabIndex:-1,"aria-label":n,disabled:i,onPointerDown:e=>{if(0!==e.button||i)return;e.preventDefault(),s();const r=e.shiftKey;l.current(r);const t=e.currentTarget.ownerDocument.defaultView??window;t.addEventListener("pointerup",s),c.current={off:()=>t.removeEventListener("pointerup",s),wait:setTimeout(()=>{c.current.every=setInterval(()=>l.current(r),60)},400)}},onPointerLeave:s,onPointerCancel:s,onClick:e=>{0===e.detail&&l.current(e.shiftKey)}};return r?/* @__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:u}):/* @__PURE__ */m(t,{size:"sm",...v,children:u})}var j=c(function({value:t,onChange:o,min:i,max:c,precision:g,step:j,shiftStep:D,disabled:E,readOnly:B,invalid:C,placeholder:S,size:O,prefix:$,suffix:M,suffixControl:R,units:F,id:K,name:P,className:U="",onBlur:T,onFocus:V,steppers:W,stepFrom:z,snap:I=!1,allowEmpty:L=!0,appearance:Y="box",display:A,reportWhileTyping:H=!0,onRevert:Q,"aria-label":G,"aria-labelledby":J,"aria-describedby":X,auto:Z,...q},_){const ee="bare"===Y,re=R??("string"==typeof M?e(M,F,E||B):void 0),te=r(),ne=Z??te,oe=s(),ie="string"==typeof M&&""!==M.trim()?M.trim():void 0,ae=e=>function(e,r,t=!1){let n=k(e.trim(),r,t);if(n=n.replace(",","."),""===n||"-"===n||"."===n||"-."===n)return null;const o=Number(n);return Number.isFinite(o)?o:null}(e,ie,Boolean(re)),le=Boolean(M||re),ce=Object.fromEntries(Object.entries(q).filter(([e])=>e.startsWith("data-"))),se=l(),[ue,de]=u(()=>x(t,g)),pe=d(ue);pe.current=ue;const fe=d(null),me=p(e=>{fe.current=e,"function"==typeof _?_(e):_&&(_.current=e)},[_]),ve=d(t),he=d(t);he.current=t;const be=Boolean(E||B),ge=W??!1,xe="compact"===ge,[ye,we]=w($),[ke,Ne]=w(Boolean(re)),je=xe?y.compact:ge?y.steppers:y.plain;f(()=>{ae(pe.current)!==t&&de(x(t,g))},[t,g]);const De=e=>{if(be)return;let r=(ae(pe.current)??z??(S?ae(S):null)??0)+e;null!=i&&r<i&&(r=i),null!=c&&r>c&&(r=c);const t=g??String(j??1).split(".")[1]?.length??0;r=Number(r.toFixed(t));const n=x(r,g);pe.current=n,de(n),o(r),Me()},Ee=d(De);Ee.current=De;const Be=d({unit:j??1,big:D??10*(j??1),locked:be});Be.current={unit:j??1,big:D??10*(j??1),locked:be},f(()=>{const e=fe.current;if(!e)return;const r=r=>{const{unit:t,big:n,locked:o}=Be.current;if(o||e.ownerDocument.activeElement!==e)return;const i=r.deltaY||r.deltaX;i&&(r.preventDefault(),Ee.current((i<0?1:-1)*(r.shiftKey?n:t)))};return e.addEventListener("wheel",r,{passive:!1}),()=>e.removeEventListener("wheel",r)},[]);const[Ce,Se]=u(!1),[Oe,$e]=u(0),Me=()=>{ee&&$e(e=>e+1)};f(()=>{ee&&Ce&&document.activeElement===fe.current&&fe.current?.select()},[ee,Ce,Oe]);const Re=d(!1);f(()=>{if(Ce&&!be)return a(e=>{if("Escape"!==e.key||document.activeElement!==fe.current)return!1;const r=ve.current;if(ae(pe.current)===r)return!1;const t=x(r,g);return pe.current=t,de(t),he.current!==r&&(Q??o)(r),Me(),!0})},[Ce,be,g,o,Q]);const Fe=()=>{const e=ae(pe.current);if(null==e){if(!L){const e=x(he.current,g);return pe.current=e,de(e),he.current}return pe.current="",de(""),null!==he.current&&o(null),null}let r=e;const t=g??(I?Math.max(b(j??1),b(i??0)):void 0);I&&(r=function(e,r,t){const n=(e-t)/r;return t+Math.round(n+1e-9*Math.sign(e))*r}(r,j??1,i??0)),null!=i&&r<i&&(r=i),null!=c&&r>c&&(r=c),null!=t&&(r=Number(r.toFixed(t)));const n=x(r,g);return pe.current=n,de(n),r===e&&r===he.current||o(r),r},Ke=/* @__PURE__ */m("input",{ref:me,id:K,"data-number-input":"",name:P,type:"text",inputMode:0===g?"numeric":"decimal",value:!Ce&&A?A(t):ue,disabled:E,readOnly:B,placeholder:S,step:j,role:"spinbutton","aria-valuenow":t??void 0,"aria-valuemin":i,"aria-valuemax":c,"aria-valuetext":null==t?S||void 0:`${x(t,g)}${ee&&ie?ie:""}`,"aria-describedby":[X,ne?oe:void 0].filter(Boolean).join(" ")||void 0,"data-appearance":ee?"bare":void 0,...ce,autoComplete:ee?"off":void 0,spellCheck:!ee&&void 0,"aria-invalid":C||void 0,"aria-label":G,"aria-labelledby":J,onChange:e=>(e=>{if(B)return;const r=k(e,ie,Boolean(re));if(""!==r&&!/^-?\d*[.,]?\d*$/.test(r))return;if(de(e),!H)return;const t=ae(e);(null!==t||L)&&o(t)})(e.target.value),onKeyDown:e=>{if("Enter"===e.key&&!be)return ve.current=Fe(),void Me();const r=j??1,t=D??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||be||(e.preventDefault(),De(n))},onFocus:()=>{ve.current=he.current,Se(!0),Re.current=!0,V?.()},onMouseUp:ee?e=>{Re.current&&(Re.current=!1,e.preventDefault())}:void 0,onBlur:()=>{Se(!1),Re.current=!1,Fe(),T?.()},className:ee?["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)]",Ce?"bg-surface":"bg-transparent",be?"cursor-default":"cursor-text",U].filter(Boolean).join(" "):n({invalid:C,size:O,readOnly:B,auto:ne,className:[$?"pl-[max(var(--space-24),calc(var(--space-control-x-sm)+var(--rosh-number-prefix-width)+var(--space-icon-gap-sm)))]":"",re?"pr-(--rosh-number-suffix-room)":xe?le?"pr-10":"pr-6":ge?le?"pr-24":"pr-16":le?"pr-10":"","text-left tabular-nums",re&&!Ce?"text-ellipsis":"",U].filter(Boolean).join(" ")})}),Pe=ne?/* @__PURE__ */m("span",{id:oe,hidden:!0,children:se.settingView.auto}):null;if(ee||!$&&!le&&!ge)return Pe?/* @__PURE__ */v(h,{children:[Ke,Pe]}):Ke;const Ue=ae(ue);/* @__PURE__ */
|
|
2
|
+
return v("div",{className:"relative","data-number-box":"",style:$||re?{...$?{"--rosh-number-prefix-width":`${we}px`}:{},...re?{"--rosh-number-suffix-room":`max(${je.least}, calc(${je.right} + ${Ne}px))`}:{}}:void 0,children:[$&&/* @__PURE__ */m("span",{ref:ye,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:$}),Ke,Pe,re?/* @__PURE__ */m("span",{ref:ke,className:"absolute top-1/2 flex -translate-y-1/2",style:{right:je.right},children:re}):M&&/* @__PURE__ */m("span",{className:`pointer-events-none absolute ${xe?"right-6":ge?"right-16":"right-3"} top-1/2 -translate-y-1/2 text-xs text-ink-faint`,children:M}),ge&&(()=>{const e=/* @__PURE__ */m(N,{dir:-1,compact:xe,label:se.number.decrease,disabled:be||null!=i&&null!=Ue&&Ue<=i,onStep:e=>Ee.current(-(e?D??10*(j??1):j??1))}),r=/* @__PURE__ */m(N,{dir:1,compact:xe,label:se.number.increase,disabled:be||null!=c&&null!=Ue&&Ue>=c,onStep:e=>Ee.current(e?D??10*(j??1):j??1)});/* @__PURE__ */
|
|
3
3
|
return v("span",xe?{"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{j as InputNumber_default,g as stepRounding};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-AYCWVVJ3.js";var t=()=>a.get("/auth/numbering-configs/").then(a=>a.data?.results??a.data??[]),e="uploaded:wallpaper";function r(a,t){return"string"!=typeof a||!a||"none"===a||a.startsWith("#")?"":a===e?t||"":a}var l=()=>a.get("/auth/me/wallpaper/").then(a=>a.data),n=(t,e)=>{const r=new FormData;r.append("wallpaper",t);const l=e?{onUploadProgress:a=>e(a.total?Math.round(a.loaded/a.total*100):null)}:void 0;return a.post("/auth/me/wallpaper/",r,l).then(a=>a.data)},p=()=>a.delete("/auth/me/wallpaper/").then(a=>a.data);function o(a){const t=a?.response?.status,e=a?.response?.data,r=Array.isArray(e?.wallpaper)?e.wallpaper[0]:void 0;return r||(413===t?"That picture is too large to use as a wallpaper.":415===t?"That file is not a picture this can use as a wallpaper.":"The wallpaper could not be saved. Please try again.")}export{e as WALLPAPER_PREF_TOKEN,p as deleteWallpaper,t as getNumberingConfigs,l as getWallpaper,n as uploadWallpaper,r as wallpaperSrc,o as wallpaperUploadError};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{useOverlayTarget as e,usePopupAnchor as r,usePanelPosition as i,usePopupLevel as t,usePopupLevelBindings as a,windowScrimStyle as o,OverlayLayerProvider as l,scrimHasCorners as n,popupLayerStyle as s}from"./chunk-RIG5FEVS.js";import{useDiscardGuard as d}from"./chunk-CIOPLPZW.js";import{dialogA11y as c}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as m}from"./chunk-7QSDPSXP.js";import{useFocusTrap as u,useScrollLock as p}from"./chunk-DWGYC7OD.js";import{Icon as f}from"./chunk-ISVODSRP.js";import{useHydrated as h}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as v}from"./chunk-TWVUQUUD.js";import{useShellStrings as x}from"./chunk-HCDG7EUR.js";import{useRef as b,useId as y,useState as g,useEffect as k}from"react";import{createPortal as w}from"react-dom";import{jsxs as j,Fragment as N,jsx as C}from"react/jsx-runtime";var $="bg-black/30 backdrop-blur-sm",D={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-4xl","2xl":"max-w-6xl"};function W({open:W,onClose:P,title:S,description:G,role:I="dialog",children:U,footer:V,blocking:E=!1,size:O="md",aside:R=!1,dirty:T=!1,initialFocus:F,"aria-label":H,"aria-labelledby":L,"aria-describedby":Q,className:Y=""}){const Z=b(null),z=y(),A=y(),B=!E,J=y(),X=x().dialog,q=e(h()),[K,M]=g(null),_=d({open:W,dirty:T,onClose:P,title:S,layer:K}),ee=b(null),re=r(W&&null!==q,ee),ie=i(re,Z),te=t(W&&null!==q,ee),ae=a(te,K),oe=o(te),le=null!==te.host;if(m(W),u(Z,W&&null!==q,F,ae),p(W),k(()=>{if(W)return v(()=>!ae.current?.(document.activeElement)&&(E||_(),!0),()=>Z.current)},[W,E,_,ae]),!W||!q)return null;/* @__PURE__ */
|
|
2
|
+
return j(N,{children:[/* @__PURE__ */C("span",{ref:ee,hidden:!0,"data-popup-anchor":""}),w(
|
|
3
|
+
/* @__PURE__ */C(l,{value:K,children:/* @__PURE__ */j("div",{ref:M,className:"fixed inset-0"+(R?" pointer-events-none opacity-0":le?" pointer-events-none":""),style:s(te),role:"presentation","data-overlay-layer":"","data-aside":R?"":void 0,children:[!le&&/* @__PURE__ */C("div",{className:`fixed inset-0 ${$}`,"aria-hidden":"true","data-popup-scrim":"system"}),oe&&/* @__PURE__ */C("div",{className:`fixed ${$}${R?"":" pointer-events-auto"}${n(te)?" rounded-(--radius-window)":""}`,style:oe,onClick:E?void 0:_,"aria-hidden":"true","data-popup-scrim":"window"}),
|
|
4
|
+
/* @__PURE__ */C("div",{className:re?"fixed inset-0":"fixed inset-0 flex items-center justify-center p-4",onClick:E||le?void 0:e=>{e.target===e.currentTarget&&_()},children:/* @__PURE__ */j("div",{ref:Z,"data-popup-panel":"",style:re?{left:ie?.left??0,top:ie?.top??0,visibility:ie?void 0:"hidden"}:void 0,...c({role:I,modal:!0,titleId:S?J:void 0,labelledBy:L,label:H}),"aria-describedby":Q??(G?A:U?z:void 0),className:`${re?"absolute max-h-[calc(100%-2rem)] w-[calc(100%-2rem)]":"relative max-h-full w-full"} ${D[O]} overflow-y-auto overscroll-contain rounded-(--radius-card) bg-white p-6 shadow-xl${le&&!R?" pointer-events-auto":""} ${Y}`.trim(),children:[S&&/* @__PURE__ */C("h2",{id:J,className:(B?"pr-8 ":"")+"text-base font-semibold text-gray-900",children:S}),G&&/* @__PURE__ */C("p",{id:A,className:((S?"mt-1":B?"pr-8":"")+" text-sm text-gray-500").trim(),children:G}),U&&/* @__PURE__ */C("div",{id:z,className:"mt-2 text-sm text-gray-600",children:U}),V&&/* @__PURE__ */C("div",{className:"mt-6 flex flex-wrap justify-end gap-3",children:V}),B&&/* @__PURE__ */C("button",{type:"button",onClick:_,"aria-label":X.close,className:"absolute right-3 top-3 rounded-(--radius-control) p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:/* @__PURE__ */C(f,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})]})})]})}),q)]})}export{W as Dialog};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e,BADGE_PILL as o}from"./chunk-JMGDGNM7.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{OneLineLabel as r}from"./chunk-G67CJAQ2.js";import{useShellStrings as s}from"./chunk-HCDG7EUR.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";function l({colorClass:l,tone:c,children:a,size:m="sm",capitalize:p=!1,closable:u=!1,onClose:f,closeLabel:h,className:x=""}){const d=l??e[c??"neutral"],y="xs"===m?"px-2 py-0.5 text-3xs":"md"===m?"px-3 py-0.5 text-xs":"px-2 py-0.5 text-xs",b=p?"capitalize":"",g=s().badge,j=h??("string"==typeof a?g.removeItem(a):g.remove),k="xs"===m?"h-2.5 w-2.5":"h-3 w-3";/* @__PURE__ */
|
|
2
2
|
return t("span",{className:[o,"font-medium",y,b,d,x].filter(Boolean).join(" "),children:[
|
|
3
3
|
/* @__PURE__ */n(r,{children:a}),u&&/* @__PURE__ */n("button",{type:"button",onClick:f,"aria-label":j,className:"-mr-0.5 ml-1 inline-flex shrink-0 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-strong)]",children:/* @__PURE__ */n(i,{name:"close",look:"mini",className:k,"aria-hidden":"true"})})]})}export{l as ColoredBadge};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{resolveSeriesColor as t,CHART_INK as e}from"./chunk-TZFACUMR.js";import{useShellStrings as r}from"./chunk-HCDG7EUR.js";import{useRef as o}from"react";import{jsx as n,jsxs as i}from"react/jsx-runtime";function a({labels:a,data:l,range:h,onRangeChange:c,height:u=46,width:s=720,color:f,className:m}){const d=r().charts,g=o(null),p=a.length-1,[w,x]=h,v=f??t(0),y=t=>0===p?0:t/p*s,M=t=>"number"==typeof t&&Number.isFinite(t),$=l.filter(M),b=Math.max(...$,1),k=t=>u-t/b*(u-6),D=[];a.forEach((t,e)=>{if(!M(l[e]))return;const r=D[D.length-1];r&&r.to===e-1?r.to=e:D.push({from:e,to:e})});const C=D.map(t=>{const e=[];for(let r=t.from;r<=t.to;r+=1)e.push(`${r===t.from?"M":"L"}${y(r).toFixed(2)},${k(l[r]).toFixed(2)}`);return`${e.join(" ")} L${y(t.to).toFixed(2)},${u} L${y(t.from).toFixed(2)},${u} Z`}).join(" "),F=(t,e)=>{const r=Math.max(0,Math.min(p,e));c("from"===t?[Math.min(r,x-1),x]:[w,Math.max(r,w+1)])},j=t=>e=>{const r=e.shiftKey?5:1,o="from"===t?w:x;"ArrowLeft"===e.key&&(e.preventDefault(),F(t,o-r)),"ArrowRight"===e.key&&(e.preventDefault(),F(t,o+r)),"Home"===e.key&&(e.preventDefault(),F(t,0)),"End"===e.key&&(e.preventDefault(),F(t,p))},P=o(null),R=t=>e=>{P.current=t,e.currentTarget.setPointerCapture(e.pointerId)},A=t=>e=>{P.current===t&&F(t,(t=>{const e=g.current?.getBoundingClientRect();if(!e||0===e.width)return w;const r=Math.max(0,Math.min(1,(t-e.left)/e.width));return Math.round(r*p)})(e.clientX))},E=t=>()=>{P.current===t&&(P.current=null)},L=t=>{const e="from"===t?w:x;/* @__PURE__ */
|
|
2
|
+
return n("rect",{x:y(e)-4.5,y:0,width:9,height:u,rx:3,fill:v,className:"cursor-ew-resize rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",tabIndex:0,role:"slider","aria-label":"from"===t?d.windowStart:d.windowEnd,"aria-valuemin":0,"aria-valuemax":p,"aria-valuenow":e,"aria-valuetext":a[e],style:{touchAction:"none"},onKeyDown:j(t),onPointerDown:R(t),onPointerMove:A(t),onPointerUp:E(t),onPointerCancel:E(t)},t)};/* @__PURE__ */
|
|
3
|
+
return n("div",{className:m,children:/* @__PURE__ */i("svg",{ref:g,width:"100%",height:u,viewBox:`0 0 ${s} ${u}`,role:"group","aria-label":d.window(a[w],a[x],a.length),children:[
|
|
4
|
+
/* @__PURE__ */n("path",{d:C,fill:e.grid}),
|
|
5
|
+
/* @__PURE__ */n("rect",{x:0,y:0,width:y(w),height:u,fill:e.surface,fillOpacity:.72}),
|
|
6
|
+
/* @__PURE__ */n("rect",{x:y(x),y:0,width:Math.max(0,s-y(x)),height:u,fill:e.surface,fillOpacity:.72}),
|
|
7
|
+
/* @__PURE__ */n("rect",{x:y(w),y:0,width:Math.max(1,y(x)-y(w)),height:u,fill:"none",stroke:v,strokeWidth:1}),L("from"),L("to")]})})}export{a as ChartBrush};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{CountBadge as e}from"./chunk-
|
|
1
|
+
import{CountBadge as e}from"./chunk-6EETON2U.js";import{SettingRowNameContext as i,SettingAutoContext as n}from"./chunk-2NMW66P5.js";import{isShown as a}from"./chunk-HCP7WOAL.js";import{useShellStrings as t}from"./chunk-HCDG7EUR.js";import{isValidElement as l}from"react";import{jsx as s,jsxs as r,Fragment as d}from"react/jsx-runtime";var c={pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},m=e=>Array.isArray(e)?e.some(m):l(e);function o({label:l,icon:o,action:h,value:u,readout:f,changed:p=!1,description:x,children:N,controlId:v,labelId:g,unknownText:b="—",quiet:y=!1,size:k="default",viewState:w,divider:$=!0,showWhen:j,values:P,context:T,className:A=""}){const E=t();if(!a(j,P,T))return null;const W="auto"===w?/* @__PURE__ */s("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:E.settingView.auto}):"edited"===w?/* @__PURE__ */r("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
|
|
2
2
|
/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */s(e,{dot:!0,tone:"accent"})}),
|
|
3
|
-
/* @__PURE__ */s("span",{className:"sr-only",children:
|
|
4
|
-
/* @__PURE__ */s("span",{className:"es-field-label",id:t,children:l}),
|
|
3
|
+
/* @__PURE__ */s("span",{className:"sr-only",children:E.settingView.edited})]}):null,C=null!=f&&!1!==f;if("compact"===k){const e=m(u),a=m(h);if(!e&&!a)return null;const t=g,c=["es-field"];e||c.push("is-inline"),p&&c.push("is-changed"),A&&c.push(A);const b=/* @__PURE__ */r(d,{children:[null!=o&&/* @__PURE__ */s("span",{className:"es-field-icon","aria-hidden":"true",children:o}),
|
|
4
|
+
/* @__PURE__ */s("span",{className:"es-field-label",id:t,children:l}),W]}),y=e=>/* @__PURE__ */s(i.Provider,{value:t,children:/* @__PURE__ */s(n.Provider,{value:"auto"===w,children:e})});/* @__PURE__ */
|
|
5
5
|
return r("div",{className:c.join(" "),children:[
|
|
6
|
-
/* @__PURE__ */r("div",{className:"es-field-head",children:[v?/* @__PURE__ */s("label",{className:"es-field-name",htmlFor:v,children:b}):/* @__PURE__ */s("span",{className:"es-field-name",children:b}),
|
|
7
|
-
return r("div",
|
|
6
|
+
/* @__PURE__ */r("div",{className:"es-field-head",children:[v?/* @__PURE__ */s("label",{className:"es-field-name",htmlFor:v,children:b}):/* @__PURE__ */s("span",{className:"es-field-name",children:b}),C&&/* @__PURE__ */s("span",{className:"es-field-value",children:f}),a&&y(h)]}),e&&/* @__PURE__ */s("div",{className:"es-field-ctl",children:y(u)}),x?/* @__PURE__ */s("p",{className:"es-field-hint",children:x}):null,N]})}const F=c,H=void 0!==u||void 0===N&&null==h,I=null==u||""===u,O=y?"text-gray-500":"text-gray-800",U=I?"text-gray-400":y?"text-gray-500":"text-gray-900",V=`${F.text} font-medium ${O}`,q=v?/* @__PURE__ */s("label",{htmlFor:v,id:g,className:V,children:l}):/* @__PURE__ */s("span",{id:g,className:V,children:l}),z=/* @__PURE__ */s(i.Provider,{value:g,children:/* @__PURE__ */s(n.Provider,{value:"auto"===w,children:I?b:u})}),B=[$?"border-t border-line-subtle first:border-t-0":"",F.pad,A].filter(Boolean).join(" "),D=null!=N&&!1!==N&&/* @__PURE__ */s("div",{className:`${F.bodyTop} border-t border-line-subtle ${F.bodyPad}`,children:N});/* @__PURE__ */
|
|
7
|
+
return r("div",C?{className:B,children:[
|
|
8
8
|
/* @__PURE__ */r("div",{"data-setting-line":"",className:"flex flex-wrap items-center justify-between gap-x-2 gap-y-2",children:[
|
|
9
|
-
/* @__PURE__ */s("div",{className:"flex-1 basis-0",children:/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${
|
|
9
|
+
/* @__PURE__ */s("div",{className:"flex-1 basis-0",children:/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${O}`,children:[null!=o&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),q,W]})}),
|
|
10
10
|
/* @__PURE__ */r("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[
|
|
11
|
-
/* @__PURE__ */s("span",{"data-setting-readout":"",className:`whitespace-nowrap ${
|
|
12
|
-
/* @__PURE__ */r("div",{className:`flex items-center justify-between ${
|
|
11
|
+
/* @__PURE__ */s("span",{"data-setting-readout":"",className:`whitespace-nowrap ${F.text} ${y?"text-ink-faint":"text-ink-strongest"}`,children:f}),null!=h&&/* @__PURE__ */s("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:h})]})]}),x&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-ink-faint",children:x}),void 0!==u&&/* @__PURE__ */s("div",{"data-setting-value":"",className:`mt-2 flex justify-end ${F.text} ${U}`,children:z}),D]}:{className:B,children:[
|
|
12
|
+
/* @__PURE__ */r("div",{className:`flex items-center justify-between ${F.gap}`,children:[
|
|
13
13
|
/* @__PURE__ */r("div",{className:"min-w-0 flex-1",children:[null!=o?
|
|
14
|
-
/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${
|
|
15
|
-
/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),q,
|
|
14
|
+
/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${O}`,children:[
|
|
15
|
+
/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),q,W]}):W?/* @__PURE__ */r("div",{className:"flex min-w-0 items-center gap-2",children:[q,W]}):q,x&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-ink-faint",children:x})]}),null!=h?/* @__PURE__ */r("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[H&&/* @__PURE__ */s("div",{className:`${F.text} ${U}`,children:z}),h]}):H&&/* @__PURE__ */s("div",{className:`shrink-0 ${F.text} ${U}`,children:z})]}),D]})}export{o as SettingRow};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{usePlotWidth as e}from"./chunk-MAFUXCPZ.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-HCDG7EUR.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:$,xDomain:j,yDomain:w,xScale:N="linear",yScale:R="linear",radiusRange:D=[4,22],className:U,emptyLabel:S}){const L=m().charts,W=h(),C=z??(e=>f(e,W)),E=$??(e=>f(e,W)),P=S??L.noObservations,V=u(null),F=e(V),I=v??F,O=p(),[Q,B]=d(null);x(()=>{if(null!==Q)return c(e=>"Escape"===e.key&&(B(null),!0))},[Q]);const H=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),T=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),X=j||w?T.map(e=>({...e,points:e.points.filter(e=>H(e.x,j)&&H(e.y,w))})).filter(e=>e.points.length>0):T,Z=T.reduce((e,t)=>e+t.points.length,0)-X.reduce((e,t)=>e+t.points.length,0);if(0===X.length)/* @__PURE__ */
|
|
2
|
+
return y("div",{className:U,ref:V,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:P})});const G=X.flatMap(e=>e.points),J=G.some(e=>null!=e.size),K=14,Y=20,q=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(G.map(e=>e.y),w,R,{from:k-q,to:K}),ie=t(te.ticks(5).map(E),_),le=Math.max(ie+1,I-Y),re=ee(G.map(e=>e.x),j,N,{from:ie,to:le}),oe=i([0,Math.max(...G.map(e=>e.size??1))],{from:D[0],to:D[1]}),ne=Q?X[Q.s]:void 0,ae=Q&&ne?ne.points[Q.i]:void 0,se=X.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
+
return g("div",{className:`relative ${U??""}`,ref:V,children:[
|
|
4
|
+
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${I} ${k}`,role:"img","aria-label":L.scatter(X.map(e=>e.label),A??L.yAxis,M??L.xAxis)+(Z>0?`. ${L.outsideRange(Z)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>B(null),onBlur:()=>B(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=Q?se.findIndex(e=>e.s===Q.s&&e.i===Q.i):0;B(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
+
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:O,children:/* @__PURE__ */y("rect",{x:ie-D[1],y:K-D[1],width:le-ie+2*D[1],height:k-q-K+2*D[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
|
|
6
|
+
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:a.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
+
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:E(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:C(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:a.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:a.label,children:A}),
|
|
8
|
+
/* @__PURE__ */y("g",{clipPath:`url(#${O})`,children:X.map((e,t)=>{const i=s(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:J?oe(l.size??0):D[0]+1,fill:i,fillOpacity:Q&&Q.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>B({s:t,i:r})},`${e.key}-${r}`))})})]}),Q&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(n,{title:ae.label??ne.label,rows:[{key:"x",label:M??L.xAxis,color:s(ne.slot,3,ne.color,ne.tone),value:C(ae.x)},{key:"y",label:A??L.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:E(ae.y)},...null!=ae.size?[{key:"size",label:L.size,color:a.muted,value:f(ae.size,W)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as e}from"./chunk-HCDG7EUR.js";import{useState as n,useEffect as t}from"react";import{jsxs as r,jsx as a}from"react/jsx-runtime";function o(l,e=!0){const[r,a]=n(null),[o,s]=n(null),[i,c]=n(null);t(()=>{a(null)},[l]),t(()=>{if(null===o)return;const l=()=>{s(null),c(null)};return window.addEventListener("pointerup",l),()=>window.removeEventListener("pointerup",l)},[o]);const u=r?r[0]:0,m=null!==o&&null!==i&&o!==i?[Math.min(o,i),Math.max(o,i)]:null;return{view:e?r:null,drag:e?m:null,press:l=>{e&&(s(l),c(l))},over:l=>{null!==o&&c(l)},release:()=>{m&&a([u+m[0],u+m[1]]),s(null),c(null)},clear:()=>a(null),slice:l=>e&&r?l.slice(r[0],r[1]+1):l}}function s({from:n,to:t,count:o,total:s,rows:i,onClear:c}){const u=e().charts;/* @__PURE__ */
|
|
2
2
|
return r("div",{className:"mt-1 text-xs","data-chart-zoom":"true",children:[
|
|
3
3
|
/* @__PURE__ */r("div",{className:"flex items-baseline gap-2",children:[
|
|
4
4
|
/* @__PURE__ */a("span",{className:"font-semibold",style:{color:l.label},children:u.zoomRange(n,t,o)}),void 0!==s&&/* @__PURE__ */a("span",{className:"tabular-nums",style:{color:l.label},children:s}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as e}from"./chunk-HCDG7EUR.js";import{useRef as r,useEffect as t}from"react";import{jsxs as n,jsx as l}from"react/jsx-runtime";function o({errors:o,title:s,autoFocus:c=!0,className:i=""}){const d=e(),m=r(null),a=r(!1);if(t(()=>{const e=o.length>0;e&&!a.current&&c&&m.current?.focus(),a.current=e},[o.length>0,c]),0===o.length)return null;/* @__PURE__ */
|
|
2
2
|
return n("div",{ref:m,role:"alert",tabIndex:-1,className:`rounded-md border border-red-300 bg-red-50 px-4 py-3 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-invalid-solid)] ${i}`.trim(),children:[
|
|
3
3
|
/* @__PURE__ */l("h2",{className:"text-sm font-semibold text-red-800",children:s??d.form.errorSummaryTitle}),
|
|
4
4
|
/* @__PURE__ */l("ul",{className:"mt-2 space-y-1",children:o.map(({fieldId:e,message:r},t)=>/* @__PURE__ */l("li",{children:e?/* @__PURE__ */l("a",{href:`#${e}`,onClick:r=>{r.preventDefault(),(e=>{const r=document.getElementById(e);r&&(r.scrollIntoView({block:"center"}),r.focus())})(e)},className:"text-sm text-red-700 underline hover:text-red-900",children:r}):
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Tooltip as e}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-
|
|
2
|
-
return s(e,{content:z??k.hint,side:T,delay:600,className:`${
|
|
1
|
+
import{Tooltip as e}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as t}from"./chunk-HCDG7EUR.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),C=o({onResize:d,min:f,max:p,side:m});C.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 D=i(()=>{N.current=null,document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")},[]);n(()=>D,[D]);const I=e=>{N.current&&(e.currentTarget.hasPointerCapture?.(N.current.pointer)&&e.currentTarget.releasePointerCapture(N.current.pointer),D())},M="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",R=P?`absolute inset-x-0 ${M} z-10 flex h-2`:`absolute inset-y-0 ${M} z-10 flex w-2`;/* @__PURE__ */
|
|
2
|
+
return s(e,{content:z??k.hint,side:T,delay:600,className:`${R} ${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 D();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}=C.current;o(l(r.width,t,s,n,i))},onPointerUp:I,onPointerCancel:I,onLostPointerCapture:()=>{N.current&&D()},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 ${M} 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 ${M} 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};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a,CHART_INK as n,STATUS_VARS as r}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as i}from"./chunk-HCDG7EUR.js";import{formatPercent as u,formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as c,useState as m,useRef as s}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function x({stages:x,shape:v="funnel",height:p,width:$,gap:g=4,minBandWidth:M=0,formatValue:y,color:b,className:k,emptyLabel:A}){const N=o().charts,L=i(),S=y??(e=>h(e,L)),j=A??N.noStages,z=c(),[V,C]=m(null),{highlighted:F}=e(),W=s(null),w=t(W,560),E=$??w;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const H=b??a(0),Z=p??54*x.length,R=Math.max(...x.map(e=>e.value),1),U="bars"===v,B=U?Math.round(Math.min(132,Math.max(80,.24*E))):Math.round(Math.min(168,Math.max(104,.38*E))),D=e=>{const t=x[e-1]?.value;return null!=t&&t>0?100*(1-x[e].value/t):null},Q=e=>{const t=D(e);return{count:S(x[e].value),drop:null!=t?`−${u(t,1,L)}`:""}},Y=U?Math.ceil(Math.max(...x.map((e,t)=>{const{count:l,drop:a}=Q(t);return.62*(l.length+(a?a.length+1:0))*12}))+16):0,G=E-B-Y,I=Math.max(U?2:0,Math.min(M,G)),O=e=>Math.max(I,G*Math.max(0,e/R)),P=e=>O(e)/2,T=B+G/2,X=e=>46+e/Math.max(1,x.length-1)*54,q=e=>`color-mix(in oklab, ${H} ${X(e).toFixed(0)}%, ${n.surface})`,J=e=>X(e)>=55?n.surface:n.label,K=(e,t)=>null!==V?V!==e:null!==F&&F!==t,_=null!==V?x[V]:void 0;/* @__PURE__ */
|
|
2
|
+
return f("div",{className:`relative ${k??""}`,ref:W,children:[
|
|
3
|
+
/* @__PURE__ */f("svg",{width:"100%",height:Z,viewBox:`0 0 ${E} ${Z}`,role:"img","aria-labelledby":z,onMouseLeave:()=>C(null),children:[
|
|
4
|
+
/* @__PURE__ */d("title",{id:z,children:N.funnel(x.length,S(x[0].value),S(x[x.length-1].value))}),x.map((e,t)=>{const l=t*Z/x.length+g/2,a=(t+1)*Z/x.length-g/2,r=(l+a)/2,o=u(e.value/(x[0].value||1)*100,0,L),i=.62*o.length*12+12;if(U){const u=B,h=u+O(e.value),{count:c,drop:m}=Q(t);/* @__PURE__ */
|
|
5
|
+
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>C(t),children:[
|
|
6
|
+
/* @__PURE__ */d("path",{d:`M${u},${l} L${h},${l} L${h},${a} L${u},${a} Z`,fill:q(t)}),
|
|
7
|
+
/* @__PURE__ */d("text",{x:B-12,y:r+4,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),h-u>=i&&/* @__PURE__ */d("text",{x:u+8,y:r+4,textAnchor:"start",fontSize:12,fontWeight:600,fill:J(t),style:{fontVariantNumeric:"tabular-nums"},children:o}),
|
|
8
|
+
/* @__PURE__ */f("text",{"data-funnel-value":"true",x:h+8,y:r+4,textAnchor:"start",fontSize:12,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:[
|
|
9
|
+
/* @__PURE__ */d("tspan",{fontWeight:600,children:c}),m&&/* @__PURE__ */d("tspan",{fill:n.muted,children:` ${m}`})]})]},e.key)}const h=P(e.value),c="cone"===v?P(x[t+1]?.value??e.value):h,m=D(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
|
|
10
|
+
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>C(t),children:[
|
|
11
|
+
/* @__PURE__ */d("path",{d:`M${T-h},${l} L${T+h},${l} L${T+c},${a} L${T-c},${a} Z`,fill:q(t)}),
|
|
12
|
+
/* @__PURE__ */d("text",{x:B-14,y:r-2,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),
|
|
13
|
+
/* @__PURE__ */f("text",{x:B-14,y:r+14,textAnchor:"end",fontSize:11,fill:n.muted,style:{fontVariantNumeric:"tabular-nums"},children:[S(e.value),null!=m?` · −${u(m,1,L)}`:""]}),
|
|
14
|
+
/* @__PURE__ */d("text",{x:s?T:T+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?J(t):n.label,style:{fontVariantNumeric:"tabular-nums"},children:o})]},e.key)})]}),_&&null!==V&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:_.label,rows:[{key:"value",label:N.count,color:q(V),value:S(_.value)},{key:"share",label:N.ofFirstStage,color:n.muted,value:u(_.value/(x[0].value||1)*100,0,L)},...V>0&&x[V-1].value>0?[{key:"drop",label:N.droppedHere,color:r.critical,value:`−${u(100*(1-_.value/x[V-1].value),1,L)}`}]:[]]})})]})}export{x as FunnelChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-HCDG7EUR.js";import{formatFixed as t,formatPlain as s}from"./chunk-C3QOHMR6.js";import{jsxs as a,jsx as r}from"react/jsx-runtime";var l={sm:"text-lg",md:"text-2xl",lg:"text-3xl"},m={default:"text-gray-900",success:"text-green-600",danger:"text-red-600",muted:"text-gray-500"};function n({title:n,value:i,precision:c,prefix:d,suffix:x,tone:u="default",size:o="md",className:f=""}){const p=e(),g="number"!=typeof i?i:null!=c?t(i,c,p):p?s(i,p):i;/* @__PURE__ */
|
|
2
2
|
return a("div",{className:f,children:[n&&/* @__PURE__ */r("div",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:n}),
|
|
3
3
|
/* @__PURE__ */a("div",{className:`mt-1 flex items-baseline gap-1 ${m[u]}`,children:[d&&/* @__PURE__ */r("span",{className:"text-sm",children:d}),
|
|
4
4
|
/* @__PURE__ */r("span",{className:`font-semibold tabular-nums ${l[o]}`,children:g}),x&&/* @__PURE__ */r("span",{className:"text-sm",children:x})]})]})}export{n as Statistic};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{Popover as e}from"./chunk-64RHGJXK.js";import{InputNumber_default as r}from"./chunk-
|
|
2
|
-
return v("button",{ref:l,type:o,"aria-pressed":a,className:N({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(e)})})}),z=(e,r,a)=>Math.min(a,Math.max(r,e)),D=e=>"string"==typeof e?{value:e}:e;function I(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:z(e.s+o[0],0,1),v:z(e.v+o[1],0,1)}:null}function M(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,359);case"ArrowRight":case"ArrowUp":return z(e+n,0,359);case"PageDown":return z(e-10,0,359);case"PageUp":return z(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var A={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function
|
|
3
|
-
return w("div",{id:
|
|
4
|
-
return v(d,{content:n,children:/* @__PURE__ */v($,{color:r??e.value,size:"sm","aria-label":n,selected:null!==r&&r===oe,disabled:N,onClick:()=>
|
|
5
|
-
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":
|
|
6
|
-
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":
|
|
1
|
+
import{Popover as e}from"./chunk-64RHGJXK.js";import{InputNumber_default as r}from"./chunk-RMUOUMV2.js";import{parseHexColor as a,hexToHsv as n,hsvToHex as o,hexReadout as t,HUE_GRADIENT as l,HEX_MAX_LENGTH as i,svFromPoint as s,hueFromPoint as c}from"./chunk-S6OB6HJB.js";import{inputClasses as u}from"./chunk-AYZY3YNC.js";import{Tooltip as d}from"./chunk-SOZCWT6I.js";import{useShellStrings as h}from"./chunk-HCDG7EUR.js";import{forwardRef as g,useState as p,useRef as b,useEffect as m,useId as f}from"react";import{jsx as v,jsxs as w}from"react/jsx-runtime";var x={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},y={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function k(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function C(e,r){if(!e)return y;const a=k(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`}}function N({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",x[e],a].filter(Boolean).join(" ")}var $=g(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
|
|
2
|
+
return v("button",{ref:l,type:o,"aria-pressed":a,className:N({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(e)})})}),z=(e,r,a)=>Math.min(a,Math.max(r,e)),D=e=>"string"==typeof e?{value:e}:e;function I(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:z(e.s+o[0],0,1),v:z(e.v+o[1],0,1)}:null}function M(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,359);case"ArrowRight":case"ArrowUp":return z(e+n,0,359);case"PageDown":return z(e-10,0,359);case"PageUp":return z(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var A={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function P(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,100);case"ArrowRight":case"ArrowUp":return z(e+n,0,100);case"PageDown":return z(e-10,0,100);case"PageUp":return z(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function j({value:e,onChange:r,label:i,presets:u,clearable:g=!1,fallback:f,dragWrites:x="live",disabled:N=!1,opacity:z,onOpacityChange:j,onClose:S,id:K,className:R=""}){const O=h().color,B=k(z),H=e=>{const r=k(e);N||r===B||j?.(r)},E=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:B},L=a(f??""),[W,X]=p(()=>n(e||L||"")),Y=b(e);m(()=>{e!==Y.current&&(Y.current=e,e?X(n(e)):L&&X(n(L)))},[e]);const q=a=>{N||a===e||(Y.current=a,r(a))},G=e=>{const r=a(e);r&&(X(n(r)),q(r))},J=e=>{X(e),q(o(e))},[V,Z]=p(!1),F=b(W);F.current=W;const Q=e=>({onPointerDown:r=>{if(N||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,F.current);"end"===x?(Z(!0),X(a)):J(a)},onPointerMove:r=>{if(N||!(1&r.buttons))return;const a=e(r,F.current);"end"===x?X(a):J(a)},onPointerUp:r=>{"end"===x&&V&&(Z(!1),J(e(r,F.current)))}}),_=Q((e,r)=>({...r,...s(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),ee=Q((e,r)=>({...r,h:c(e.clientX,e.currentTarget.getBoundingClientRect())})),re=V?o(W):e,ae=e=>`${Math.round(100*e)}%`,ne=(u??[]).map(D),oe=a(e),te=re||L||"";/* @__PURE__ */
|
|
3
|
+
return w("div",{id:K,className:`flex w-56 flex-col gap-3 ${N?"opacity-60":""} ${R}`.trim(),onKeyDown:e=>{"Escape"===e.key&&S&&(e.preventDefault(),e.stopPropagation(),S())},children:[(ne.length>0||g)&&/* @__PURE__ */w("div",{role:"group","aria-label":O.presets,className:"flex flex-wrap gap-2",children:[g&&/* @__PURE__ */v(d,{content:O.clear,children:/* @__PURE__ */v($,{color:"",size:"sm","aria-label":O.clear,selected:""===e,disabled:N,onClick:()=>{N||""===e||(Y.current="",r(""))}})}),ne.map(e=>{const r=a(e.value),n=e.label?`${e.label} · ${t(r??e.value)}`:t(r??e.value);/* @__PURE__ */
|
|
4
|
+
return v(d,{content:n,children:/* @__PURE__ */v($,{color:r??e.value,size:"sm","aria-label":n,selected:null!==r&&r===oe,disabled:N,onClick:()=>G(e.value)})},`${e.label??""}:${e.value}`)})]}),
|
|
5
|
+
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":O.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*W.v),"aria-valuetext":O.squareValue(Math.round(100*W.s),Math.round(100*W.v)),"aria-disabled":N||void 0,"data-color-square":"",onKeyDown:e=>{if(N)return;const r=I(W,e.key,e.shiftKey);r&&(e.preventDefault(),J(r))},..._,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:o({h:W.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ae(W.s),top:ae(1-W.v),...A}})}),
|
|
6
|
+
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":O.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(W.h),"aria-orientation":"horizontal","aria-disabled":N||void 0,"data-color-hue":"",onKeyDown:e=>{if(N)return;const r=M(W.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),J({...W,h:r}))},...ee,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:l},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:W.h/360*100+"%",background:o({h:W.h,s:1,v:1}),...A}})}),j&&/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":O.opacity(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":B,"aria-valuetext":`${B}%`,"aria-orientation":"horizontal","aria-disabled":N||void 0,"data-color-opacity":"",onKeyDown:e=>{if(N)return;const r=P(B,e.key,e.shiftKey);null!==r&&(e.preventDefault(),H(r))},onPointerDown:e=>{N||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),H(E(e)))},onPointerMove:e=>{!N&&1&e.buttons&&H(E(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${te||"black"}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${B}%`,...C(te||"black",B),...A}})}),
|
|
7
7
|
/* @__PURE__ */w("div",{className:"flex items-center gap-2",children:[
|
|
8
|
-
/* @__PURE__ */v("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-line-strong",style:C(te,
|
|
9
|
-
/* @__PURE__ */v(
|
|
10
|
-
return v("input",{id:s,type:"text",value:g??(e?t(e):""),"aria-label":n,placeholder:o,maxLength:i,spellCheck:!1,autoComplete:"off",disabled:l,onChange:n=>{b(n.target.value);const o=a(n.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),b(null))},onBlur:()=>b(null),"data-hex-look":d,className:m})}function
|
|
11
|
-
return v("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */v(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function
|
|
8
|
+
/* @__PURE__ */v("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-line-strong",style:C(te,j?B:null)}),
|
|
9
|
+
/* @__PURE__ */v(T,{value:re,placeholder:!e&&L?t(L):void 0,onChange:G,label:O.hex(i),disabled:N}),j&&/* @__PURE__ */v(U,{value:B,onChange:H,label:O.opacity(i),disabled:N})]})]})}var S={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},K={sm:"h-6",md:"h-8",lg:"h-10"},R=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-ink-strong placeholder:text-[color:var(--ink-placeholder)] hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function T({value:e,onChange:r,label:n,placeholder:o,disabled:l,id:s,size:c="md",look:d="box",className:h=""}){const[g,b]=p(null),m="text"===d?`${R} ${K[c]} ${h}`.trim():u({size:c,className:`${S[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
|
|
10
|
+
return v("input",{id:s,type:"text",value:g??(e?t(e):""),"aria-label":n,placeholder:o,maxLength:i,spellCheck:!1,autoComplete:"off",disabled:l,onChange:n=>{b(n.target.value);const o=a(n.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),b(null))},onBlur:()=>b(null),"data-hex-look":d,className:m})}function U({value:e,onChange:a,label:n,disabled:o,size:t="md"}){/* @__PURE__ */
|
|
11
|
+
return v("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */v(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function O({value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,id:d,showHexInput:g=!1,opacity:p,onOpacityChange:b,size:m="md",align:x="start",open:y,onOpenChange:$,className:z=""}){const D=h().color,I=k(p),M=f(),A=a(s??""),P=r||A||"",S=r?t(r):A?t(A):D.none;
|
|
12
12
|
/* @__PURE__ */
|
|
13
13
|
return w("div",{className:`inline-flex items-center ${b?"flex-wrap justify-end gap-1":g?"gap-1":"gap-2"} ${z}`.trim(),children:[
|
|
14
|
-
/* @__PURE__ */v(e,{id:d,trigger:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(
|
|
15
|
-
/* @__PURE__ */v(
|
|
14
|
+
/* @__PURE__ */v(e,{id:d,trigger:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(P,b?I:null)}),triggerLabel:D.swatch(o,S),triggerClassName:N({size:m}),"aria-label":D.panel(o),align:x,open:y,onOpenChange:$,disabled:u,children:/* @__PURE__ */v(j,{id:M,value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),g&&
|
|
15
|
+
/* @__PURE__ */v(T,{value:r,placeholder:!r&&A?t(A):void 0,onChange:e=>{u||e===r||n(e)},label:D.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */v(U,{value:I,onChange:e=>{u||e===I||b(e)},label:D.opacity(o),disabled:u,size:m})]})}export{O as ColorPicker,j as ColorPickerPanel,$ as ColorSwatch,T as HexInput,y as NO_COLOR_FILL,k as clampOpacity,C as colorFill,N as colorSwatchClasses,M as stepHue,P as stepOpacity,I as stepSquare};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{PopupMenuDivider as e,PopupMenuLabel as t,menuTextRowStyle as i,PopupSubmenu as l,itemLook as a,MenuCheckMark as n}from"./chunk-
|
|
1
|
+
import{PopupMenuDivider as e,PopupMenuLabel as t,menuTextRowStyle as i,PopupSubmenu as l,itemLook as a,MenuCheckMark as n}from"./chunk-GOAFMGUI.js";import{jsx as r,jsxs as d}from"react/jsx-runtime";var s=e=>!!e&&"label"!==e.type&&"status"!==e.type&&"divider"!==e.type&&!e.disabled,o=(e,t)=>`${e}-status-${t}`;function c(e,t){return e.flatMap((e,i)=>"status"===e.type?[o(t,i)]:[]).join(" ")||void 0}var b={minHeight:"var(--space-32)",paddingTop:0,paddingBottom:0,paddingLeft:"var(--space-12)",paddingRight:"var(--space-12)"};function u(s,c){const{menuId:y,choose:m,toggle:p,followLink:h,rowProps:k=()=>({}),linkAs:f}=c,g=f??"a",v=(s,f)=>{if("divider"===s.type)/* @__PURE__ */
|
|
2
2
|
return r("div",{role:"separator",children:/* @__PURE__ */r(e,{})},s.key);if("label"===s.type)/* @__PURE__ */
|
|
3
3
|
return r("div",{id:`${y}-label-${f}`,children:/* @__PURE__ */r(t,{children:s.label})},s.key);if("status"===s.type)/* @__PURE__ */
|
|
4
4
|
return r("div",{id:o(y,f),className:"text-xs",style:i(),children:s.label},s.key);if("submenu"===s.type)/* @__PURE__ */
|