efficient-shell 12.12.0 → 12.14.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 +5 -1
- package/dist/{Browser-KPVR5Z6J.js → Browser-V35ERC75.js} +14 -14
- package/dist/{Calculator-RP4UPGG7.js → Calculator-FY7CWH3U.js} +22 -22
- package/dist/{CurrencyConverter-HZWRB62S.js → CurrencyConverter-X2ZMKSB6.js} +9 -9
- package/dist/{Files-4DVFS74H.js → Files-5QCSSGZO.js} +81 -81
- package/dist/{Notepad-ZQF2NRZZ.js → Notepad-2AXGNMRM.js} +10 -10
- package/dist/PdfViewer-F2TCC5UD.js +1 -0
- package/dist/PomodoroTimer-LQM4OSNO.js +91 -0
- package/dist/{Preview-DBXNCPGO.js → Preview-NI7HTAAW.js} +36 -36
- package/dist/Sidebar-ADAIERCI.js +44 -0
- package/dist/{Stock-WK45DFIC.js → Stock-ENUIGK4M.js} +3 -3
- package/dist/{Weather-BVKZQI4R.js → Weather-QRQVA3LE.js} +21 -21
- package/dist/{WorldClock-L3BQXXQX.js → WorldClock-QJOV3TND.js} +6 -6
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.js +79 -79
- 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/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-YX4MRM7A.js → chunk-232YPI2L.js} +6 -6
- package/dist/{chunk-6ET6JVNL.js → chunk-24JKQX2N.js} +4 -4
- package/dist/{chunk-5EKNXSQG.js → chunk-24LO6OH4.js} +1 -1
- package/dist/{chunk-EDANELWX.js → chunk-2DYVVHZA.js} +1 -1
- package/dist/{chunk-M4MN2GOE.js → chunk-2NZ7CVMW.js} +1 -1
- package/dist/{chunk-GCVIUXKL.js → chunk-2ZPNA7L7.js} +1 -1
- package/dist/{chunk-45HQXTA6.js → chunk-3A6FYWFQ.js} +1 -1
- package/dist/{chunk-ITGFHWYG.js → chunk-3HZS3BAZ.js} +12 -12
- package/dist/{chunk-27ZJQUDS.js → chunk-3N5OI6VM.js} +1 -1
- package/dist/{chunk-JTZVUO3I.js → chunk-3YBXA72C.js} +1 -1
- package/dist/chunk-42XSMAIK.js +2 -0
- package/dist/{chunk-2GS2VOQT.js → chunk-4BKJ6A5H.js} +9 -9
- package/dist/{chunk-Y23BITKG.js → chunk-4I4WZHMV.js} +1 -1
- package/dist/{chunk-JGJWPONL.js → chunk-4IHYWLWE.js} +5 -5
- package/dist/{chunk-KIRLSUQT.js → chunk-4LOHQ4QB.js} +5 -5
- package/dist/{chunk-YVAJ42M2.js → chunk-4Y33Y4OX.js} +6 -6
- package/dist/{chunk-654DGV5Q.js → chunk-56XKHWNL.js} +1 -1
- package/dist/chunk-574SLTKO.js +8 -0
- package/dist/{chunk-MFZPTS7W.js → chunk-5MH5N76F.js} +4 -4
- package/dist/{chunk-OTXJ6VWX.js → chunk-5VGIIMON.js} +1 -1
- package/dist/{chunk-5ZQY42QX.js → chunk-5WZ53AS5.js} +1 -1
- package/dist/{chunk-YFDS6KF3.js → chunk-6A26HUVK.js} +1 -1
- package/dist/chunk-6KITIRNZ.js +3 -0
- package/dist/{chunk-GB2XLSR5.js → chunk-74JMBOQH.js} +10 -10
- package/dist/{chunk-6YIVKPWQ.js → chunk-75H4BWNC.js} +1 -1
- package/dist/{chunk-AUCNJFTP.js → chunk-7K3FYCRZ.js} +9 -9
- package/dist/{chunk-4NLCXHWN.js → chunk-7X2P6IH3.js} +4 -4
- package/dist/{chunk-SEHKTBVM.js → chunk-7ZJRBFHA.js} +1 -1
- package/dist/chunk-A4PFVMQ2.js +7 -0
- package/dist/chunk-AADOAA5N.js +2 -0
- package/dist/{chunk-BFCIOWYI.js → chunk-AELSVMXH.js} +1 -1
- package/dist/{chunk-JZKACEXW.js → chunk-AQZUTW7N.js} +8 -8
- package/dist/chunk-ASM2VLQ2.js +2 -0
- package/dist/{chunk-ZV6WLVD3.js → chunk-B2KQ3T7Q.js} +6 -6
- package/dist/chunk-BHHFVIAD.js +2 -0
- package/dist/{chunk-EQ2KTDOU.js → chunk-BWYOTLJL.js} +3 -3
- package/dist/{chunk-GMJ5WOB2.js → chunk-CBVKGAZH.js} +1 -1
- package/dist/{chunk-BYDSBDVS.js → chunk-CEIIQRK5.js} +6 -6
- package/dist/{chunk-GMLDGXNQ.js → chunk-CJ3MI2NH.js} +1 -1
- package/dist/{chunk-FZWAOYAM.js → chunk-CMJD5URC.js} +9 -9
- package/dist/{chunk-EO6MOQOZ.js → chunk-DCNSQGHJ.js} +12 -12
- package/dist/chunk-DG2TGWXI.js +15 -0
- package/dist/{chunk-D4K72BHN.js → chunk-DGHSCKOE.js} +4 -4
- package/dist/{chunk-GBEDLYND.js → chunk-DJXXY23A.js} +2 -2
- package/dist/{chunk-UDYVA5DV.js → chunk-DJYZ2EF4.js} +10 -10
- package/dist/{chunk-Q64F2EXW.js → chunk-EDX55XGV.js} +6 -6
- package/dist/{chunk-QULE4LAC.js → chunk-EEAY7FJW.js} +17 -17
- package/dist/{chunk-CINGDJPM.js → chunk-EEB5XPWP.js} +1 -1
- package/dist/{chunk-ZLFZJX6M.js → chunk-EGCHJHRR.js} +8 -8
- package/dist/chunk-ENFXDIIZ.js +8 -0
- package/dist/{chunk-U35TIWEP.js → chunk-EZ6O5TQ3.js} +16 -16
- package/dist/{chunk-CB5FQMFB.js → chunk-FI6IJTAJ.js} +12 -12
- package/dist/{chunk-JVNJCRHM.js → chunk-FJVZ2W55.js} +1 -1
- package/dist/{chunk-EAXPSAHZ.js → chunk-FQHPGREQ.js} +9 -9
- package/dist/{chunk-NBUL37WB.js → chunk-FUTLZ6BC.js} +1 -1
- package/dist/chunk-FVKXDF2Q.js +12 -0
- package/dist/chunk-FYNPQAFI.js +1 -0
- package/dist/{chunk-QGFAQVUO.js → chunk-G3E4CD77.js} +6 -6
- package/dist/{chunk-AG6Y62TP.js → chunk-G6LSBF3P.js} +69 -69
- package/dist/{chunk-SFFELHLP.js → chunk-GC4N4UQM.js} +5 -5
- package/dist/{chunk-4UQNNA4K.js → chunk-GEVNBBM7.js} +1 -1
- package/dist/chunk-GOEHP2XM.js +4 -0
- package/dist/{chunk-G3VRO4CK.js → chunk-GUHCKMC7.js} +2 -2
- package/dist/{chunk-B7HTKDT3.js → chunk-H32UNWVU.js} +5 -5
- package/dist/chunk-HGOWQO63.js +1 -0
- package/dist/{chunk-NHIP2S4E.js → chunk-HJF4UZOA.js} +13 -13
- package/dist/chunk-I2DIQQOR.js +2 -0
- package/dist/{chunk-5T4WTFBC.js → chunk-I3TVRNUT.js} +1 -1
- package/dist/{chunk-5NCR64CE.js → chunk-IIC76MWQ.js} +1 -1
- package/dist/{chunk-6BNLDGST.js → chunk-ILIPEY3D.js} +1 -1
- package/dist/{chunk-FSZ3TNAR.js → chunk-JAVTQART.js} +1 -1
- package/dist/{chunk-HEX3EP5F.js → chunk-JFGJJNT2.js} +4 -4
- package/dist/chunk-JSHMIMAJ.js +1 -0
- package/dist/{chunk-SWB32OKH.js → chunk-JTGRLXZN.js} +1 -1
- package/dist/{chunk-NV7QRWQJ.js → chunk-JZBLOIL7.js} +1 -1
- package/dist/{chunk-O3YCIWHF.js → chunk-KAKJ7ENS.js} +2 -2
- package/dist/{chunk-YPZXE67U.js → chunk-KSMEWOCE.js} +1 -1
- package/dist/{chunk-LTN4AQYG.js → chunk-KX53AB74.js} +1 -1
- package/dist/chunk-L7MWAC2P.js +6 -0
- package/dist/{chunk-WJBP5SND.js → chunk-LIWBCIRZ.js} +4 -4
- package/dist/chunk-LIX6KTZJ.js +4 -0
- package/dist/{chunk-P3GBQBDC.js → chunk-LQVQX5B2.js} +1 -1
- package/dist/chunk-MLPXTFDS.js +1 -0
- package/dist/{chunk-WQV7VQ5Z.js → chunk-MRLXGLNZ.js} +1 -1
- package/dist/{chunk-KWTK6TGH.js → chunk-MWTCGJAI.js} +1 -1
- package/dist/{chunk-6JLXXX4H.js → chunk-N2445WHJ.js} +12 -12
- package/dist/{chunk-5POLDDQW.js → chunk-NBNYKV3D.js} +7 -7
- package/dist/{chunk-LY55C5UI.js → chunk-NKP5WCEA.js} +5 -5
- package/dist/{chunk-MEAJGM6F.js → chunk-NOGSS432.js} +1 -1
- package/dist/{chunk-V6FHZGCL.js → chunk-OM6VWUAZ.js} +1 -1
- package/dist/{chunk-EIXMUGVZ.js → chunk-OOWPLQD5.js} +2 -2
- package/dist/chunk-OP4VQWSH.js +2 -0
- package/dist/{chunk-NOEAEXIZ.js → chunk-OVD3ECM7.js} +1 -1
- package/dist/chunk-P6FGTDDX.js +2 -0
- package/dist/chunk-PCZSE6CC.js +5 -0
- package/dist/{chunk-UG5GKEU5.js → chunk-QADNVFV5.js} +1 -1
- package/dist/{chunk-BET6KEY2.js → chunk-QPYVCG74.js} +12 -12
- package/dist/chunk-QU23OGAX.js +27 -0
- package/dist/{chunk-L6LWO5NQ.js → chunk-R7QEGRKE.js} +1 -1
- package/dist/{chunk-ZR2UWJIR.js → chunk-RBS3AWE7.js} +1 -1
- package/dist/{chunk-WM2BBRT6.js → chunk-RF3ZFTAU.js} +1 -1
- package/dist/chunk-RMDVKQJE.js +3 -0
- package/dist/{chunk-42BVXJZN.js → chunk-RZ2DWX4N.js} +5 -5
- package/dist/{chunk-PDCCNHTP.js → chunk-SDL4VWFU.js} +1 -1
- package/dist/{chunk-VPZOSVDF.js → chunk-SE6IQZYW.js} +9 -9
- package/dist/chunk-SNLGA2PZ.js +1 -0
- package/dist/{chunk-ISU4FCEX.js → chunk-SR4W2SYQ.js} +4 -4
- package/dist/chunk-SXUSAHDF.js +2 -0
- package/dist/{chunk-TJCJLKJB.js → chunk-T3JSUBIF.js} +1 -1
- package/dist/{chunk-SY65V6K7.js → chunk-T7D73HT7.js} +9 -9
- package/dist/chunk-TU2L7NW3.js +7 -0
- package/dist/{chunk-VLCHHTX6.js → chunk-TYQ2JL4J.js} +1 -1
- package/dist/{chunk-QQ5XCRZM.js → chunk-UEEELXEN.js} +8 -8
- package/dist/{chunk-LMUB2EAD.js → chunk-UULBPDAH.js} +8 -8
- package/dist/chunk-UWLGKMH5.js +9 -0
- package/dist/{chunk-Z7RXWXR5.js → chunk-V4XR4MOS.js} +1 -1
- package/dist/{chunk-4MUE4CYB.js → chunk-VBLCYL4L.js} +1 -1
- package/dist/chunk-VDYF3WPJ.js +2 -0
- package/dist/{chunk-MAI2DN7N.js → chunk-VEQ45GAH.js} +1 -1
- package/dist/{chunk-HE24VQMU.js → chunk-VFHKD7TQ.js} +1 -1
- package/dist/{chunk-TCMAWDBL.js → chunk-VJXPT53M.js} +18 -18
- package/dist/{chunk-5S4YF5XA.js → chunk-VP2GI3UP.js} +7 -7
- package/dist/{chunk-44VAZ2EL.js → chunk-VYRVSTI6.js} +9 -9
- package/dist/{chunk-QQM36CYU.js → chunk-W2663E4S.js} +3 -3
- package/dist/{chunk-QMNDKNK2.js → chunk-WESNFWM4.js} +1 -1
- package/dist/{chunk-NGQZI7HP.js → chunk-WLUJQLXG.js} +1 -1
- package/dist/chunk-WNOXHJVT.js +9 -0
- package/dist/{chunk-EVEGK57J.js → chunk-WPG3ZHYT.js} +1 -1
- package/dist/{chunk-QCOXJXGZ.js → chunk-WQ4YKWN2.js} +1 -1
- package/dist/{chunk-YVIV7SKG.js → chunk-WXZZGHET.js} +1 -1
- package/dist/{chunk-BGBSEPPH.js → chunk-WYGUHCJ2.js} +8 -8
- package/dist/{chunk-BM5QI2L6.js → chunk-XG5ER6GJ.js} +6 -6
- package/dist/{chunk-ASOVTAIT.js → chunk-XHSMDUEW.js} +3 -3
- package/dist/{chunk-YMJOFWW6.js → chunk-XKJGJNY2.js} +3 -3
- package/dist/{chunk-6P7SIIG4.js → chunk-XKNKRKHH.js} +14 -14
- package/dist/chunk-XQWHKXLS.js +22 -0
- package/dist/{chunk-GOKJZKLV.js → chunk-XU3YOWEG.js} +1 -1
- package/dist/{chunk-SXHNZFUY.js → chunk-Y6E7IRK2.js} +1 -1
- package/dist/{chunk-5HOXR3L4.js → chunk-Y7KDCC6E.js} +1 -1
- package/dist/chunk-YHB6MJYD.js +28 -0
- package/dist/{chunk-AKTEMZOT.js → chunk-YO26RV3H.js} +1 -1
- package/dist/{chunk-SEMV4NCH.js → chunk-YU52WMSH.js} +1 -1
- package/dist/chunk-YX2OOGV7.js +4 -0
- package/dist/chunk-YYW4VNWL.js +1 -0
- package/dist/{chunk-RQKD5AAL.js → chunk-Z66QBDNU.js} +1 -1
- package/dist/{chunk-IARCNQD3.js → chunk-ZGWXSHVM.js} +1 -1
- package/dist/{chunk-AXFNOY2L.js → chunk-ZTRKM3B5.js} +7 -7
- 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/InputNumber.d.ts +13 -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/Select.d.ts +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.d.ts +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.d.ts +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/icons/efficient-glyphs.d.ts +1 -0
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.d.ts +2 -0
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient-meanings.d.ts +2 -1
- package/dist/icons/efficient-meanings.js +1 -1
- package/dist/icons/efficient.d.ts +1 -0
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/glyphs/AccordionIcon.d.ts +8 -0
- package/dist/icons/glyphs/AccordionIcon.js +1 -0
- package/dist/icons/glyphs/TabsIcon.js +1 -1
- package/dist/icons/index.d.ts +2 -2
- package/dist/icons/index.js +1 -1
- package/dist/icons/looks/AccordionMiniIcon.d.ts +8 -0
- package/dist/icons/looks/AccordionMiniIcon.js +1 -0
- package/dist/icons/looks/AccordionSolidIcon.d.ts +8 -0
- package/dist/icons/looks/AccordionSolidIcon.js +1 -0
- package/dist/icons/looks/TabsMiniIcon.js +1 -1
- package/dist/icons/looks/TabsSolidIcon.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 +1 -1
- package/dist/index.js +665 -665
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +2 -2
- package/dist/names-Cj_F68_V.d.ts +23 -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/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.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.d.ts +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/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/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.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/globalSearchModel.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +2 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/PdfViewer-BFP2WCMQ.js +0 -1
- package/dist/PomodoroTimer-ME3BMHKR.js +0 -91
- package/dist/Sidebar-FU7TD5FQ.js +0 -44
- package/dist/chunk-3C5NKOVF.js +0 -1
- package/dist/chunk-3MMMN3U4.js +0 -3
- package/dist/chunk-4CKPY72R.js +0 -2
- package/dist/chunk-5UZYIM2W.js +0 -2
- package/dist/chunk-675RYIWR.js +0 -7
- package/dist/chunk-6VB4TBU6.js +0 -9
- package/dist/chunk-73XILSFF.js +0 -4
- package/dist/chunk-7ADTFFEM.js +0 -5
- package/dist/chunk-B6RQI2PT.js +0 -2
- package/dist/chunk-BUZ5AJLR.js +0 -12
- package/dist/chunk-C5SK5OYU.js +0 -4
- package/dist/chunk-CA3OC4YY.js +0 -9
- package/dist/chunk-EAIHBASJ.js +0 -28
- package/dist/chunk-FQHY6DTF.js +0 -4
- package/dist/chunk-HL3V67JZ.js +0 -2
- package/dist/chunk-HULQSIX5.js +0 -8
- package/dist/chunk-ISZOD5S6.js +0 -2
- package/dist/chunk-J7CHHY7O.js +0 -6
- package/dist/chunk-KFS7WSCC.js +0 -15
- package/dist/chunk-KOPTKTHN.js +0 -7
- package/dist/chunk-LO6TYB5E.js +0 -3
- package/dist/chunk-MTP3MBZA.js +0 -22
- package/dist/chunk-MXITMJCT.js +0 -27
- package/dist/chunk-QV4M7EOV.js +0 -1
- package/dist/chunk-RQ4KY6UZ.js +0 -2
- package/dist/chunk-T23TIJ4P.js +0 -1
- package/dist/chunk-TJSJVC6P.js +0 -1
- package/dist/chunk-WGRS6QBT.js +0 -1
- package/dist/chunk-YMD2F3NL.js +0 -1
- package/dist/chunk-YRG6XJ6M.js +0 -8
- package/dist/names-bEzx4RQ8.d.ts +0 -23
- /package/dist/{chunk-BDUWYLPI.js → chunk-NQJXHV4K.js} +0 -0
|
@@ -1,8 +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-
|
|
2
|
-
return y("div",{className:D,ref:
|
|
3
|
-
return g("div",{className:`relative ${D??""}`,ref:
|
|
4
|
-
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${
|
|
1
|
+
import{usePlotWidth as e}from"./chunk-MAFUXCPZ.js";import{axisGutter as t,radiusScale as i,niceMax as l,logScale as r,linearScale as o}from"./chunk-2JWPNR2U.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as a,resolveSeriesColorWithin as s}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as c}from"./chunk-TWVUQUUD.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-JSHMIMAJ.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:S=[4,22],className:D,emptyLabel:U}){const L=m().charts,W=h(),I=z??(e=>f(e,W)),P=$??(e=>f(e,W)),V=U??L.noObservations,C=u(null),E=e(C),F=v??E,J=p(),[O,Q]=d(null);x(()=>{if(null!==O)return c(e=>"Escape"===e.key&&(Q(null),!0))},[O]);const B=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),H=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),T=j||w?H.map(e=>({...e,points:e.points.filter(e=>B(e.x,j)&&B(e.y,w))})).filter(e=>e.points.length>0):H,X=H.reduce((e,t)=>e+t.points.length,0)-T.reduce((e,t)=>e+t.points.length,0);if(0===T.length)/* @__PURE__ */
|
|
2
|
+
return y("div",{className:D,ref:C,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:V})});const Z=T.flatMap(e=>e.points),K=Z.some(e=>null!=e.size),Y=14,q=20,G=34,_=52,ee=(e,t,i,n)=>{const a=e.filter(e=>e>0),s="log"===i?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,l(Math.max(...e))];return"log"===i?r(c,n):o(c,n)},te=ee(Z.map(e=>e.y),w,R,{from:k-G,to:Y}),ie=t(te.ticks(5).map(P),_),le=Math.max(ie+1,F-q),re=ee(Z.map(e=>e.x),j,N,{from:ie,to:le}),oe=i([0,Math.max(...Z.map(e=>e.size??1))],{from:S[0],to:S[1]}),ne=O?T[O.s]:void 0,ae=O&&ne?ne.points[O.i]:void 0,se=T.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
+
return g("div",{className:`relative ${D??""}`,ref:C,children:[
|
|
4
|
+
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${F} ${k}`,role:"img","aria-label":L.scatter(T.map(e=>e.label),A??L.yAxis,M??L.xAxis)+(X>0?`. ${L.outsideRange(X)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Q(null),onBlur:()=>Q(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=O?se.findIndex(e=>e.s===O.s&&e.i===O.i):0;Q(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
5
|
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:J,children:/* @__PURE__ */y("rect",{x:ie-S[1],y:Y-S[1],width:le-ie+2*S[1],height:k-G-Y+2*S[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
|
|
6
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:
|
|
8
|
-
/* @__PURE__ */y("g",{clipPath:`url(#${J})`,children:
|
|
7
|
+
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:P(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:a.label,style:{fontVariantNumeric:"tabular-nums"},children:I(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(#${J})`,children:T.map((e,t)=>{const i=s(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:K?oe(l.size??0):S[0]+1,fill:i,fillOpacity:O&&O.s!==t?.25:.62,stroke:a.surface,strokeWidth:2,onMouseEnter:()=>Q({s:t,i:r})},`${e.key}-${r}`))})})]}),O&&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:I(ae.x)},{key:"y",label:A??L.yAxis,color:s(ne.slot,3,ne.color,ne.tone),value:P(ae.y)},...null!=ae.size?[{key:"size",label:L.size,color:a.muted,value:f(ae.size,W)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-JOAKKXTL.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-JOAKKXTL.js";import{DEFAULT_SHELL_STRINGS as t}from"./chunk-JSHMIMAJ.js";import{jsx as r}from"react/jsx-runtime";var n=["left","center","right","justify"],a={left:"align-left",center:"align-center",right:"align-right",justify:"align-justify"};function i(t){switch(t){case"left":/* @__PURE__ */
|
|
2
2
|
return r(e,{name:"align-left"});case"center":/* @__PURE__ */
|
|
3
3
|
return r(e,{name:"align-center"});case"right":/* @__PURE__ */
|
|
4
4
|
return r(e,{name:"align-right"});case"justify":/* @__PURE__ */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{AccessibleTable as t}from"./chunk-HY6CBG4M.js";import{arcPath as e}from"./chunk-VFC6QUEN.js";import{useHighlight as o}from"./chunk-CNYAHYE6.js";import{ChartTooltip as n}from"./chunk-WDQI3FV6.js";import{CHART_INK as r,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as l,useShellLocale as i}from"./chunk-JSHMIMAJ.js";import{formatPlain as s}from"./chunk-C3QOHMR6.js";import{useState as c}from"react";import{jsx as d,jsxs as m}from"react/jsx-runtime";function h(t,e,o,n){const r=(t,o)=>{const n=e[t]?.[o];return"number"==typeof n&&Number.isFinite(n)?n:0},a=t.map((e,o)=>t.reduce((t,e,n)=>t+r(o,n)+r(n,o),0)),l=Math.max(2,o),i=t.length>l,s=i?t.map((t,e)=>e).sort((t,e)=>a[e]-a[t]).slice(0,l-1).sort((t,e)=>t-e):t.map((t,e)=>e),c=new Map(s.map((t,e)=>[t,e])),d=i?s.length:-1,m=i?[...s.map(e=>t[e]),n]:[...t],h=m.map(()=>m.map(()=>0));let u=0;t.forEach((e,o)=>t.forEach((t,e)=>{const n=c.get(o)??d,a=c.get(e)??d;n!==d||a!==d?h[n][a]+=r(o,e):u+=r(o,e)}));const f=m.map((t,e)=>m.reduce((t,o,n)=>t+h[e][n]+h[n][e],0));return d>=0&&(f[d]+=u),{labels:m,matrix:h,totals:f,otherIndex:d,foldedCount:i?t.length-s.length:0}}function u({labels:u,matrix:f,size:p=340,maxNodes:x=8,padAngle:g=.04,arcWidth:b=12,formatValue:M,className:k,emptyLabel:v}){const $=l().charts,w=i(),N=M??(t=>s(t,w)),j=v??$.noFlows,[y,F]=c(null),{highlighted:C}=o(),E=h(u,f,x,$.other),{labels:I,matrix:A,otherIndex:z,foldedCount:H}=E,Q=(t,e)=>A[t]?.[e]??0,L=t=>t===z?r.muted:a(t),O=E.totals,V=I.map((t,e)=>e).sort((t,e)=>O[e]-O[t]),W=V.reduce((t,e)=>t+O[e],0);if(W<=0)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const Y=p/2,B=p/2,J=p/2-44,P=J-b,R=g*V.length,S=/* @__PURE__ */new Map;let T=-Math.PI/2;V.forEach((t,e)=>{const o=O[t]/W*(2*Math.PI-R);S.set(t,{start:T,end:T+o,slot:e}),T+=o+g});const U=/* @__PURE__ */new Map,D=[];for(const t of V)for(const e of V){const o=Q(t,e);if(o<=0)continue;const n=S.get(t),r=o/Math.max(1,O[t])*(n.end-n.start),a=U.get(t)??0;U.set(t,a+r),D.push({from:t,to:e,value:o,a:n.start+a+r/2,b:S.get(e).start+(S.get(e).end-S.get(e).start)/2})}const G=(t,e)=>[Y+e*Math.cos(t),B+e*Math.sin(t)],Z="arc"===y?.kind?y.index:void 0,q="ribbon"===y?.kind?D[y.index]:void 0;/* @__PURE__ */
|
|
2
|
+
return m("div",{className:`relative ${k??""}`,children:[
|
|
3
|
+
/* @__PURE__ */m("svg",{width:"100%",height:p,viewBox:`0 0 ${p} ${p}`,role:"img","aria-label":$.chord(V.length),onMouseLeave:()=>F(null),children:[D.map((t,e)=>{const[o,n]=G(t.a,P),[r,a]=G(t.b,P),l=L(t.from),i=((t,e)=>y?"ribbon"===y.kind?y.index===e:y.index===t.from||y.index===t.to:null!==C?I[t.from]===C||I[t.to]===C:null)(t,e);/* @__PURE__ */
|
|
4
|
+
return d("path",{d:`M${o},${n} Q${Y},${B} ${r},${a}`,fill:"none",stroke:l,strokeWidth:Math.max(1,t.value/W*p*.9),strokeOpacity:null===i||i?.34:.07,strokeLinecap:"round",onMouseEnter:()=>F({kind:"ribbon",index:e})},`${I[t.from]}→${I[t.to]}`)}),V.map(t=>{const o=S.get(t),n=(o.start+o.end)/2,[a,l]=G(n,J+16),i=(t=>y?"arc"===y.kind?y.index===t:D[y.index].from===t||D[y.index].to===t:null!==C?I[t]===C:null)(t);/* @__PURE__ */
|
|
5
|
+
return m("g",{onMouseEnter:()=>F({kind:"arc",index:t}),children:[
|
|
6
|
+
/* @__PURE__ */d("path",{d:e(Y,B,P,J,o.start,o.end),fill:L(t),fillOpacity:null===i||i?1:.45}),
|
|
7
|
+
/* @__PURE__ */d("text",{x:a,y:l+4,fontSize:11,fill:r.label,textAnchor:Math.cos(n)>.15?"start":Math.cos(n)<-.15?"end":"middle",children:I[t]})]},t)})]}),H>0&&/* @__PURE__ */d("p",{className:"mt-1 text-xs text-ink-faint",children:$.chordFolded(H)}),void 0!==Z&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:I[Z],rows:[{key:"total",label:$.totalFlow,color:L(Z),value:N(O[Z])}]})}),q&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(n,{title:`${I[q.from]} → ${I[q.to]}`,rows:[{key:"value",label:$.flow,color:L(q.from),value:N(q.value)}]})}),
|
|
8
|
+
/* @__PURE__ */d(t,{caption:$.chord(V.length),head:[$.tableFrom,$.tableTo,$.value],rows:D.map(t=>[I[t.from],I[t.to],N(t.value)])})]})}export{u as ChordChart,h as foldChord};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-JOAKKXTL.js";import{Tooltip as t}from"./chunk-SOZCWT6I.js";import{useShellStrings as n}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-JOAKKXTL.js";import{Tooltip as t}from"./chunk-SOZCWT6I.js";import{useShellStrings as n}from"./chunk-JSHMIMAJ.js";import{useId as i}from"react";import{jsx as a,jsxs as r}from"react/jsx-runtime";var l=['input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","button:not([disabled]):not(.es-default-reset)",'[tabindex]:not([tabindex="-1"])'].join(", "),s=e=>l.split(", ").map(t=>`${e} ${t}`).join(", ");function o({label:o,onReset:d,changed:c=!0,view:u="desktop",detail:b,name:p,tip:m,defaultAction:h,disabled:f,className:k}){const j=n().settingView,y=i(),N=["es-default-reset"];if(c&&N.push("is-changed"),k&&N.push(k),!c&&h)return N.push("is-pressable"),/* @__PURE__ */a(t,{content:h.title,children:/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":h.title,disabled:f,onClick:h.onPress,children:h.icon})});if(!c)/* @__PURE__ */return a("span",{className:N.join(" "),"aria-hidden":"true"});const T="desktop"===u,x=p??(T?j.resetName(o):j.inheritName(o)),A=b?j.backTo(b):T?j.backToDefault:j.backToAuto,S=m??(b?j.tip(x,A):x);
|
|
2
2
|
/* @__PURE__ */
|
|
3
|
-
return r(t,{content:
|
|
4
|
-
/* @__PURE__ */a("button",{type:"button",className:
|
|
5
|
-
/* @__PURE__ */a("span",{id:y,hidden:!0,children:
|
|
3
|
+
return r(t,{content:S,describe:!1,children:[
|
|
4
|
+
/* @__PURE__ */a("button",{type:"button",className:N.join(" "),"aria-label":x,"aria-describedby":y,disabled:f,onClick:e=>{d(),function(e){const t=e.currentTarget,n=t.closest(".es-field");let i=n?.querySelector(s(".es-field-ctl"))??n?.querySelector(s(".es-field-head"))??null,a=n?null:t.parentElement;for(let e=0;!i&&a&&e<4;e+=1,a=a.parentElement)i=[...a.querySelectorAll(l)].find(e=>e!==t&&!e.closest('[aria-hidden="true"]'))??null;i?.focus()}(e)},children:/* @__PURE__ */a(e,{name:"revert",size:15,"aria-hidden":"true"})}),
|
|
5
|
+
/* @__PURE__ */a("span",{id:y,hidden:!0,children:A})]})}export{o as SettingReset};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useWindowMenuItem as e,Modal as t}from"./chunk-
|
|
1
|
+
import{useWindowMenuItem as e,Modal as t}from"./chunk-G6LSBF3P.js";import{navIcons as r}from"./chunk-4LXCCZDM.js";import{VERSION as n}from"./chunk-SNLGA2PZ.js";import{Icon as s}from"./chunk-JOAKKXTL.js";import{DEFAULT_SHELL_STRINGS as i,useShellStrings as o,splitAround as a}from"./chunk-JSHMIMAJ.js";import{useState as l,useCallback as m,isValidElement as c,cloneElement as p}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";var h=i.aboutApp,x={notepad:{name:"Notepad",version:"1.1.0",route:"/notepad",description:h.notepad},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:h.preview},files:{name:"Files",version:"2.0.0",route:"/files",description:h.files},browser:{name:"Browser",version:"1.0.3",route:"/browser",description:h.browser}},u=/* @__PURE__ */d(s,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),w=/* @__PURE__ */d(s,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function v({app:s}){const i=x[s],[h,v]=l(!1),N=m(()=>v(!0),[]),b=o().aboutApp,k=b.title(i.name);if(e(k,N,u),!h)return null;const g=r[i.route],y=c(g)?p(g,{className:"h-9 w-9"}):w,[j,A]=a(b.partOf);/* @__PURE__ */
|
|
2
2
|
return d(t,{open:!0,onClose:()=>v(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */f("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
|
|
3
3
|
/* @__PURE__ */d("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:y}),
|
|
4
4
|
/* @__PURE__ */d("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:i.name}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{client_default as a}from"./chunk-
|
|
1
|
+
import{client_default as a}from"./chunk-G6LSBF3P.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};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Breadcrumbs as e}from"./chunk-
|
|
1
|
+
import{Breadcrumbs as e}from"./chunk-JTGRLXZN.js";import{jsxs as t,jsx as s}from"react/jsx-runtime";function i({title:i,description:r,subtitle:c,actions:a,children:n,icon:l,breadcrumbs:m}){const d=r??c,h=a??n;/* @__PURE__ */
|
|
2
2
|
return t("div",{className:"mb-6",children:[m&&m.length>0&&/* @__PURE__ */s(e,{items:m,className:"mb-3"}),
|
|
3
3
|
/* @__PURE__ */t("div",{className:"flex items-start justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */t("div",{children:[
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{IconPicker as e}from"./chunk-BWYOTLJL.js";import{ColorPicker as t}from"./chunk-DJYZ2EF4.js";import{InputNumber_default as r,stepRounding as l}from"./chunk-RMDVKQJE.js";import{BORDER_LINE_STYLES as o}from"./chunk-NOMWJTN2.js";import{Icon as a}from"./chunk-JOAKKXTL.js";import{jsxs as i,Fragment as s,jsx as n}from"react/jsx-runtime";var d=["top","right","bottom","left"];function m(e){const t=e??{},r="number"==typeof t.width?t.width:0;return Object.fromEntries(d.map(e=>[e,"number"==typeof t[e]?t[e]:r]))}function h(e,t){const r=e??{},l=m(t),o=d.some(e=>"number"==typeof r[e]),a=d.map(e=>"number"==typeof r[e]?r[e]:"number"==typeof r.width?r.width:o?0:l[e]);return!a.every(e=>e===a[0])}var c="h-3.5 w-3.5",p={all:/* @__PURE__ */n(a,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */n(a,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */n(a,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */n(a,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */n(a,{name:"border-left","aria-hidden":"true",className:c})},u={solid:/* @__PURE__ */n(a,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */n(a,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */n(a,{name:"line-dotted","aria-hidden":"true",className:c})};function f({label:a,value:m,onChange:h,each:c,placeholder:f,presets:b,words:w,widths:g=!0,styles:y=!0,min:v=0,max:N=20,step:x=1,readOnly:j}){const k=e=>"number"==typeof m[e]?m[e]:null,O=(e,t)=>{const r={...m};if("number"==typeof m.width)for(const e of d)null===k(e)&&(r[e]=m.width);r[e]=t,delete r.width,h(r)},J=(e,t,o,a,i,s)=>/* @__PURE__ */n("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */n(r,{value:a,onChange:s,min:v,max:N,step:x,...l(x),steppers:"compact",readOnly:j,placeholder:i,prefix:o,suffix:w.unit,"aria-label":t})}),S=d.map(k),C="number"==typeof m.width?m.width:S.every(e=>null!==e&&e===S[0])?S[0]:null,E=null===C&&S.some(e=>null!==e),K=d.every(e=>f.sides[e]===f.sides.top)?String(f.sides.top):"–",L=e=>k(e)??("number"==typeof m.width?m.width:null),T=m.style??f.style;/* @__PURE__ */
|
|
2
|
+
return i("div",{role:"group","aria-label":a,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[g?c?/* @__PURE__ */i(s,{children:[J("left",w.sides.left,p.left,L("left"),String(f.sides.left),e=>O("left",e)),J("top",w.sides.top,p.top,L("top"),String(f.sides.top),e=>O("top",e)),J("right",w.sides.right,p.right,L("right"),String(f.sides.right),e=>O("right",e)),J("bottom",w.sides.bottom,p.bottom,L("bottom"),String(f.sides.bottom),e=>O("bottom",e))]}):J("all",w.width,p.all,C,E?"–":K,e=>{const t={...m,width:e};for(const e of d)delete t[e];h(t)}):null,y&&/* @__PURE__ */n("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */n(e,{label:w.style,value:T,disabled:j,onChange:e=>{j||h({...m,style:e})},options:o.map(e=>({value:e,label:w.styles[e],icon:u[e]}))})}),
|
|
3
|
+
/* @__PURE__ */n("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */n(t,{value:m.color??"",onChange:e=>{j||h({...m,color:e})},label:w.color,presets:b,fallback:f.color,showHexInput:!0,size:"md",disabled:j})})]})}export{f as BorderInput,m as borderSides,h as borderStartEach};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{toast_default as e}from"./chunk-
|
|
1
|
+
import{toast_default as e}from"./chunk-3YBXA72C.js";import{useShellStrings as t}from"./chunk-JSHMIMAJ.js";import{forwardRef as r,useRef as n,useState as o,useMemo as i,useEffect as a,useImperativeHandle as l}from"react";import{jsx as s,jsxs as c,Fragment as d}from"react/jsx-runtime";var h=["#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#8b5cf6","#000000","#ffffff"],u=[{id:"system",name:"fontSystem",css:"-apple-system, system-ui, sans-serif"},{id:"serif",name:"fontSerif",css:'Georgia, "Times New Roman", serif'},{id:"mono",name:"fontMono",css:'ui-monospace, "SF Mono", Menlo, monospace'},{id:"cursive",name:"fontCursive",css:'"Brush Script MT", "Comic Sans MS", cursive'}],p=()=>Math.random().toString(36).slice(2,9),y=r(function({src:r,filename:y,onApply:m,onCancel:g},N){const L=n(null),z=n(null),D=n(null),P=n(null),$=t().annotator,E=n($);E.current=$;const[I,S]=o("select"),[W,B]=o(h[0]),[R,j]=o(4),[H,F]=o(24),[T,A]=o(u[0].id),[U,O]=o(!0),[K,V]=o(!1),[X,Z]=o(!1),[Y,q]=o(null),[G,J]=o(null),[_,Q]=o(6),[ee,te]=o(12),[re,ne]=o([]),[oe,ie]=o(null),[ae,le]=o(null),[se,ce]=o(null),[de,he]=o(1),[ue,pe]=o(null),[ye,xe]=o(null),[me,ge]=o(null),we=n(null),[fe,ve]=o(!1),be=i(()=>se?{w:se.w*de,h:se.h*de}:null,[se,de]),ke=be&&ae?be.w/ae.w:1,Me=i(()=>re.find(e=>e.id===oe)??null,[re,oe]);a(()=>{"select"===I&&Me&&("color"in Me&&B(Me.color),"stroke"in Me&&j(Me.stroke),"rect"===Me.type&&te(Me.radius),"text"===Me.type&&(F(Me.size),A(Me.font),O(Me.bold),V(Me.italic),Z(Me.underline),q(Me.borderColor),J(Me.background),Q(Me.padding)))},[oe]),a(()=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>{P.current=t,le({w:t.naturalWidth,h:t.naturalHeight}),ne([]),ie(null)},t.onerror=()=>e.error(E.current.loadFailed),t.src=r},[r]),a(()=>{if(!ae)return;const e=()=>{const e=L.current;if(!e)return;const t=e.getBoundingClientRect(),r=Math.max(0,t.width-32),n=Math.max(0,t.height-32);if(0===r||0===n)return;const o=ae.w/ae.h;let i=ae.w,a=ae.h;i>r&&(i=r,a=i/o),a>n&&(a=n,i=a*o),ce({w:i,h:a})};e();const t=new ResizeObserver(e);return L.current&&t.observe(L.current),()=>t.disconnect()},[ae]);const Ne=i(()=>re.filter(e=>"mosaic"===e.type),[re]);a(()=>{const e=P.current,t=z.current;if(!e||!t||!ae)return;t.width=ae.w,t.height=ae.h;const r=t.getContext("2d");r.drawImage(e,0,0);for(const e of Ne)C(r,e)},[ae,Ne,se]);const Ce=e=>{const t=D.current;if(!t)return{x:0,y:0};const r=t.createSVGPoint();r.x=e.clientX,r.y=e.clientY;const n=t.getScreenCTM();if(!n)return{x:0,y:0};const o=r.matrixTransform(n.inverse());return{x:o.x,y:o.y}},Le=e=>{we.current=e,ve(!0)};a(()=>{if(!fe)return;const e=e=>{const t=we.current;if(!t)return;const r=Ce(e);if("draw"===t.kind)pe(v(I,t.start,r,W,R,ee));else if("pen"===t.kind){const e=t.points[t.points.length-1];(Math.abs(r.x-e.x)>1||Math.abs(r.y-e.y)>1)&&(t.points.push(r),pe({id:"",type:"draw",points:t.points.slice(),color:W,stroke:R}))}else if("crop"===t.kind)ge(M(t.start,r));else if("move"===t.kind){const e=r.x-t.start.x,n=r.y-t.start.y;ne(r=>r.map(r=>r.id===t.id?b(t.original,e,n):r))}else"resize"===t.kind&&ne(e=>e.map(e=>e.id===t.id?function(e,t,r){if("arrow"===e.type)return"start"===t?{...e,x1:r.x,y1:r.y}:"end"===t?{...e,x2:r.x,y2:r.y}:e;if("text"===e.type||"draw"===e.type)return e;const n=e.x,o=e.x+e.w,i=e.y,a=e.y+e.h;let l=n,s=i,c=o,d=a;"nw"===t&&(l=r.x,s=r.y);"ne"===t&&(c=r.x,s=r.y);"se"===t&&(c=r.x,d=r.y);"sw"===t&&(l=r.x,d=r.y);const h=M({x:l,y:s},{x:c,y:d});return{...e,x:h.x,y:h.y,w:h.w,h:h.h}}(t.original,t.corner,r):e))},t=()=>{const e=we.current;if(we.current=null,ve(!1),"draw"===e?.kind)pe(e=>{if(!e||("arrow"===(t=e).type?Math.abs(t.x2-t.x1)<4&&Math.abs(t.y2-t.y1)<4:"draw"===t.type?t.points.length<2:"w"in t&&"h"in t&&(t.w<4||t.h<4)))return null;var t;const r={...e,id:p()};return ne(e=>[...e,r]),ie(r.id),S("select"),null});else if("pen"===e?.kind){if(e.points.length<2)return void pe(null);const t={id:p(),type:"draw",points:e.points,color:W,stroke:R};ne(e=>[...e,t]),ie(t.id),S("select"),pe(null)}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[fe,I,W,R,ee]);a(()=>{const e=e=>{if(!document.activeElement||!/^(INPUT|TEXTAREA)$/.test(document.activeElement.tagName))return!e.metaKey&&!e.ctrlKey||"z"!==e.key&&"Z"!==e.key||e.shiftKey?void(oe&&("Delete"===e.key||"Backspace"===e.key?(e.preventDefault(),ne(e=>e.filter(e=>e.id!==oe)),ie(null)):"Escape"===e.key&&ie(null))):(e.preventDefault(),ne(e=>e.slice(0,-1)),void ie(null))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[oe]);const ze=e=>{const t=!{bold:U,italic:K,underline:X}[e];"bold"===e&&O(t),"italic"===e&&V(t),"underline"===e&&Z(t),oe&&ne(r=>r.map(r=>r.id===oe&&"text"===r.type?{...r,[e]:t}:r))},De=e=>{q(e),oe&&ne(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,borderColor:e}:t))},Pe=e=>{J(e),oe&&ne(t=>t.map(t=>t.id===oe&&"text"===t.type?{...t,background:e}:t))},$e=e=>{if(!ye)return;const t=e??ye.value;if(!t.trim())return ye.editingId&&ne(e=>e.filter(e=>e.id!==ye.editingId)),void xe(null);if(ye.editingId)ne(e=>e.map(e=>e.id===ye.editingId&&"text"===e.type?{...e,text:t}:e));else{const e={id:p(),type:"text",x:ye.x,y:ye.y,text:t,color:W,size:H,font:T,bold:U,italic:K,underline:X,borderColor:Y,background:G,padding:_};ne(t=>[...t,e]),ie(e.id),S("select")}xe(null)},Ee=async()=>{const e=z.current,t=D.current;if(!e||!t||!ae)return null;const r=document.createElement("canvas");r.width=ae.w,r.height=ae.h;const n=r.getContext("2d");n.drawImage(e,0,0);const o=t.cloneNode(!0);o.querySelectorAll("[data-chrome]").forEach(e=>e.remove());const i=(new XMLSerializer).serializeToString(o),a=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),l=URL.createObjectURL(a),s=new Image;return await new Promise(e=>{s.onload=()=>e(),s.onerror=()=>e(),s.src=l}),n.drawImage(s,0,0,ae.w,ae.h),URL.revokeObjectURL(l),r};l(N,()=>({save:async()=>{const t=await Ee();t&&t.toBlob(t=>{if(!t)return void e.error(E.current.exportFailed);const r=URL.createObjectURL(t),n=document.createElement("a");n.href=r;const o=y.replace(/\.[^.]+$/,"");n.download=`${o}-annotated.png`,n.click(),URL.revokeObjectURL(r)},"image/png")},copy:async()=>{if(!("clipboard"in navigator)||"undefined"==typeof ClipboardItem)return void e.error(E.current.clipboardUnsupported);const t=await Ee();t&&t.toBlob(async t=>{if(t)try{await navigator.clipboard.write([new ClipboardItem({"image/png":t})]),e.success(E.current.copied)}catch{e.error(E.current.copyRefused)}else e.error(E.current.copyFailed)},"image/png")}}),[ae,y]);const Ie=i(()=>[{id:"select",label:$.toolSelect,icon:/* @__PURE__ */s("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */s("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3l7 17 2-7 7-2L5 3z"})})},{id:"draw",label:$.toolDraw,icon:/* @__PURE__ */s("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */s("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487z"})})},{id:"rect",label:$.toolRect,icon:/* @__PURE__ */s("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */s("rect",{x:"4",y:"6",width:"16",height:"12",rx:"3"})})},{id:"circle",label:$.toolEllipse,icon:/* @__PURE__ */s("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */s("ellipse",{cx:"12",cy:"12",rx:"8",ry:"6"})})},{id:"arrow",label:$.toolArrow,icon:/* @__PURE__ */s("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */s("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 19L19 5m0 0h-7m7 0v7"})})},{id:"mosaic",label:$.toolMosaic,icon:/* @__PURE__ */s("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */s("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z"})})},{id:"text",label:$.toolText,icon:/* @__PURE__ */s("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */s("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M12 6v14M9 20h6"})})},{id:"crop",label:$.toolCrop,icon:/* @__PURE__ */s("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.8,children:/* @__PURE__ */s("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 2v15a1 1 0 001 1h15M2 6h15a1 1 0 011 1v15"})})}],[$]),Se=e=>"p-2 rounded transition-colors "+(e?"bg-blue-500 text-on-accent":"text-ink hover:bg-gray-200"),We=Me?.type??("select"===I?null:I),Be="rect"===We||"circle"===We||"arrow"===We||"draw"===We,Re="rect"===We,je="text"===We;/* @__PURE__ */
|
|
2
2
|
return c("div",{className:"flex flex-col h-full bg-gray-100",children:[
|
|
3
3
|
/* @__PURE__ */c("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-line bg-surface shrink-0 flex-wrap text-xs",children:[Ie.map(e=>/* @__PURE__ */s("button",{onClick:()=>{S(e.id),ie(null)},title:e.label,className:Se(I===e.id),children:e.icon},e.id)),
|
|
4
4
|
/* @__PURE__ */s("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
|
|
@@ -14,17 +14,17 @@ return c("div",{className:"flex flex-col h-full bg-gray-100",children:[
|
|
|
14
14
|
/* @__PURE__ */s("input",{type:"range",min:0,max:48,step:1,value:ee,onChange:e=>{return t=Number(e.target.value),te(t),void(oe&&ne(e=>e.map(e=>e.id===oe&&"rect"===e.type?{...e,radius:t}:e)));var t},className:"w-16 accent-blue-500"}),
|
|
15
15
|
/* @__PURE__ */s("span",{className:"tabular-nums w-6 text-right",children:ee})]})]}),je&&/* @__PURE__ */c(d,{children:[
|
|
16
16
|
/* @__PURE__ */s("div",{className:"h-5 w-px bg-gray-300 mx-1"}),
|
|
17
|
-
/* @__PURE__ */s("select",{value:
|
|
18
|
-
/* @__PURE__ */s("button",{onClick:()=>ze("bold"),className:Se(
|
|
19
|
-
/* @__PURE__ */s("button",{onClick:()=>ze("italic"),className:Se(
|
|
20
|
-
/* @__PURE__ */s("button",{onClick:()=>ze("underline"),className:Se(
|
|
17
|
+
/* @__PURE__ */s("select",{value:T,onChange:e=>{return t=e.target.value,A(t),void(oe&&ne(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,font:t}:e)));var t},className:"text-xs border border-gray-300 rounded px-1 py-0.5 bg-white",children:u.map(e=>/* @__PURE__ */s("option",{value:e.id,children:$[e.name]},e.id))}),
|
|
18
|
+
/* @__PURE__ */s("button",{onClick:()=>ze("bold"),className:Se(U),title:$.bold,children:/* @__PURE__ */s("span",{className:"font-bold",children:$.boldLetter})}),
|
|
19
|
+
/* @__PURE__ */s("button",{onClick:()=>ze("italic"),className:Se(K),title:$.italic,children:/* @__PURE__ */s("span",{className:"italic",children:$.italicLetter})}),
|
|
20
|
+
/* @__PURE__ */s("button",{onClick:()=>ze("underline"),className:Se(X),title:$.underline,children:/* @__PURE__ */s("span",{className:"underline",children:$.underlineLetter})}),
|
|
21
21
|
/* @__PURE__ */c("label",{className:"flex items-center gap-2 text-gray-600",children:[
|
|
22
22
|
/* @__PURE__ */s("span",{children:$.size}),
|
|
23
|
-
/* @__PURE__ */s("input",{type:"range",min:10,max:96,step:1,value:
|
|
24
|
-
/* @__PURE__ */s("span",{className:"tabular-nums w-7 text-right",children:
|
|
23
|
+
/* @__PURE__ */s("input",{type:"range",min:10,max:96,step:1,value:H,onChange:e=>{return t=Number(e.target.value),F(t),void(oe&&ne(e=>e.map(e=>e.id===oe&&"text"===e.type?{...e,size:t}:e)));var t},className:"w-16 accent-blue-500"}),
|
|
24
|
+
/* @__PURE__ */s("span",{className:"tabular-nums w-7 text-right",children:H})]}),
|
|
25
25
|
/* @__PURE__ */c("label",{className:"flex items-center gap-1 text-gray-600",children:[
|
|
26
|
-
/* @__PURE__ */s("span",{children:$.border}),
|
|
27
|
-
/* @__PURE__ */s("input",{type:"color",value:
|
|
26
|
+
/* @__PURE__ */s("span",{children:$.border}),Y?/* @__PURE__ */c(d,{children:[
|
|
27
|
+
/* @__PURE__ */s("input",{type:"color",value:Y,onChange:e=>De(e.target.value),title:$.borderColor,className:"h-5 w-6 rounded border border-gray-300 bg-white p-0 cursor-pointer"}),
|
|
28
28
|
/* @__PURE__ */s("button",{onClick:()=>De(null),title:$.removeBorder,className:"px-0.5 text-gray-400 hover:text-gray-700",children:"✕"})]}):/* @__PURE__ */s("button",{onClick:()=>De(W),title:$.addBorder,className:"px-2 py-0.5 rounded border border-line-strong text-gray-600 hover:bg-gray-100",children:$.add})]}),
|
|
29
29
|
/* @__PURE__ */c("label",{className:"flex items-center gap-1 text-gray-600",children:[
|
|
30
30
|
/* @__PURE__ */s("span",{children:$.fill}),G?/* @__PURE__ */c(d,{children:[
|
|
@@ -47,7 +47,7 @@ return c("div",{className:"flex flex-col h-full bg-gray-100",children:[
|
|
|
47
47
|
/* @__PURE__ */s("button",{onClick:async()=>{const t=await Ee();t?t.toBlob(t=>{t?m(t):e.error(E.current.exportFailed)},"image/png"):e.error(E.current.exportFailed)},className:"px-3 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 text-xs font-medium",children:$.apply})]})]})]}),
|
|
48
48
|
/* @__PURE__ */s("div",{ref:L,className:"flex-1 overflow-auto bg-gray-200 flex items-center justify-center p-4 relative",children:be&&ae&&/* @__PURE__ */c("div",{className:"relative shadow-lg rounded overflow-hidden bg-white shrink-0",style:{width:be.w,height:be.h},children:[
|
|
49
49
|
/* @__PURE__ */s("canvas",{ref:z,style:{position:"absolute",inset:0,width:"100%",height:"100%",display:"block"}}),
|
|
50
|
-
/* @__PURE__ */c("svg",{ref:D,viewBox:`0 0 ${ae.w} ${ae.h}`,preserveAspectRatio:"none",style:{position:"absolute",inset:0,width:"100%",height:"100%",touchAction:"none",cursor:"select"===I?"default":"text"===I?"text":"crosshair"},onPointerDown:e=>{if("select"===I)return void ie(null);if("text"===I){if(ye)return void $e();const t=Ce(e);return void xe({x:t.x,y:t.y,value:""})}const t=Ce(e);if("crop"!==I){if("draw"===I)return Le({kind:"pen",points:[t]}),void pe({id:"",type:"draw",points:[t],color:W,stroke:R});pe(v(I,t,t,W,R,ee)),Le({kind:"draw",start:t})}else Le({kind:"crop",start:t})},children:[re.map(e=>/* @__PURE__ */s(x,{anno:e,selected:oe===e.id,zoom:de,onPointerDown:t=>((e,t)=>{"select"===I&&(e.stopPropagation(),ie(t.id),Le({kind:"move",id:t.id,start:Ce(e),original:t}))})(t,e),onDoubleClick:()=>{var t;"text"===(t=e).type&&xe({x:t.x,y:t.y,value:t.text,editingId:t.id})},onHandlePointerDown:(t,r)=>((e,t,r)=>{e.stopPropagation(),Le({kind:"resize",id:t.id,corner:r,start:Ce(e),original:t})})(t,e,r)},e.id)),ue&&/* @__PURE__ */s(x,{anno:{...ue,id:"__preview"},preview:!0}),me&&/* @__PURE__ */s(w,{rect:me,imageSize:ae})]}),ye&&/* @__PURE__ */s(f,{pendingText:ye,color:W,size:
|
|
50
|
+
/* @__PURE__ */c("svg",{ref:D,viewBox:`0 0 ${ae.w} ${ae.h}`,preserveAspectRatio:"none",style:{position:"absolute",inset:0,width:"100%",height:"100%",touchAction:"none",cursor:"select"===I?"default":"text"===I?"text":"crosshair"},onPointerDown:e=>{if("select"===I)return void ie(null);if("text"===I){if(ye)return void $e();const t=Ce(e);return void xe({x:t.x,y:t.y,value:""})}const t=Ce(e);if("crop"!==I){if("draw"===I)return Le({kind:"pen",points:[t]}),void pe({id:"",type:"draw",points:[t],color:W,stroke:R});pe(v(I,t,t,W,R,ee)),Le({kind:"draw",start:t})}else Le({kind:"crop",start:t})},children:[re.map(e=>/* @__PURE__ */s(x,{anno:e,selected:oe===e.id,zoom:de,onPointerDown:t=>((e,t)=>{"select"===I&&(e.stopPropagation(),ie(t.id),Le({kind:"move",id:t.id,start:Ce(e),original:t}))})(t,e),onDoubleClick:()=>{var t;"text"===(t=e).type&&xe({x:t.x,y:t.y,value:t.text,editingId:t.id})},onHandlePointerDown:(t,r)=>((e,t,r)=>{e.stopPropagation(),Le({kind:"resize",id:t.id,corner:r,start:Ce(e),original:t})})(t,e,r)},e.id)),ue&&/* @__PURE__ */s(x,{anno:{...ue,id:"__preview"},preview:!0}),me&&/* @__PURE__ */s(w,{rect:me,imageSize:ae})]}),ye&&/* @__PURE__ */s(f,{pendingText:ye,color:W,size:H,font:u.find(e=>e.id===T)?.css??u[0].css,bold:U,italic:K,underline:X,borderColor:Y,background:G,padding:_,scale:ke,onChange:e=>xe({...ye,value:e}),onCommit:$e,onCancel:()=>xe(null)})]})}),
|
|
51
51
|
/* @__PURE__ */s("div",{className:"px-3 py-2 border-t border-line bg-surface text-2xs text-ink-faint shrink-0",children:"select"===I?oe?$.hintSelected:$.hintSelect:"text"===I?$.hintText:"crop"===I?$.hintCrop:"draw"===I?$.hintDraw:$.hintShape})]})});function x({anno:e,selected:t,preview:r,zoom:n=1,onPointerDown:o,onDoubleClick:i,onHandlePointerDown:a}){const l=k(e),h=o?{onPointerDown:o,pointerEvents:"all",style:{cursor:"move"}}:{},p=i?{onDoubleClick:i}:{};let y;if("rect"===e.type)y=/* @__PURE__ */s("rect",{x:e.x,y:e.y,width:e.w,height:e.h,rx:e.radius,ry:e.radius,fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...h});else if("circle"===e.type)y=/* @__PURE__ */s("ellipse",{cx:e.x+e.w/2,cy:e.y+e.h/2,rx:e.w/2,ry:e.h/2,fill:"none",stroke:e.color,strokeWidth:e.stroke,...h});else if("arrow"===e.type)y=/* @__PURE__ */s(g,{anno:e,interactive:h});else if("draw"===e.type)y=/* @__PURE__ */s("path",{d:N(e.points),fill:"none",stroke:e.color,strokeWidth:e.stroke,strokeLinecap:"round",strokeLinejoin:"round",...h});else if("mosaic"===e.type)y=/* @__PURE__ */s("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:"rgba(0,0,0,0.001)",stroke:"none",strokeWidth:t?2:0,strokeDasharray:t?"6,4":void 0,...h,style:t?{...h.style,stroke:"var(--rosh-annotator-selection)"}:h.style});else{const t=u.find(t=>t.id===e.font)?.css??u[0].css,r=e.padding??0,n=!!e.borderColor||!!e.background,o=k(e),i=e.borderColor?Math.max(1,Math.round(e.size/12)):0;y=/* @__PURE__ */c("g",{...h,...p,children:[n&&/* @__PURE__ */s("rect",{x:o.x-r,y:o.y-r,width:Math.max(0,o.w)+2*r,height:Math.max(0,o.h)+2*r,rx:Math.min(8,r),ry:Math.min(8,r),fill:e.background??"none",stroke:e.borderColor??"none",strokeWidth:i}),
|
|
52
52
|
/* @__PURE__ */s("text",{x:e.x,y:e.y+e.size,fill:e.color,fontSize:e.size,fontWeight:e.bold?700:400,fontStyle:e.italic?"italic":"normal",textDecoration:e.underline?"underline":void 0,fontFamily:t,style:{userSelect:"none"},children:e.text.split("\n").map((t,r)=>/* @__PURE__ */s("tspan",{x:e.x,dy:0===r?0:1.2*e.size,children:t},r))})]})}/* @__PURE__ */
|
|
53
53
|
return c("g",{children:[y,t&&!r&&/* @__PURE__ */c(d,{children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{useShellStrings as t}from"./chunk-JSHMIMAJ.js";import{jsxs as e,jsx as r}from"react/jsx-runtime";var o={403:t=>({title:t.forbidden,body:t.forbiddenBody}),404:t=>({title:t.notFound,body:t.notFoundBody}),500:t=>({title:t.serverError,body:t.serverErrorBody})};function i({code:i=404,actions:n}){const d=o[i](t().errors);/* @__PURE__ */
|
|
2
2
|
return e("div",{className:"flex h-full flex-col items-center justify-center bg-gray-50 p-6 text-center",children:[
|
|
3
3
|
/* @__PURE__ */r("div",{className:"text-7xl font-bold tracking-tight text-gray-400",children:i}),
|
|
4
4
|
/* @__PURE__ */r("h1",{className:"mt-2 text-xl font-semibold text-gray-900",children:d.title}),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-
|
|
2
|
-
return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel
|
|
3
|
-
/* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${
|
|
4
|
-
return c("div",{className
|
|
1
|
+
import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-JSHMIMAJ.js";import{formatPercent as u,formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsxs as c,jsx as o}from"react/jsx-runtime";function d({at:a,title:e,className:t}){/* @__PURE__ */
|
|
2
|
+
return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:M,className:$=""}){const j=r().meter,A=s(),B=w??j.noData,F=null!=p&&Number.isFinite(p)?p:null,S=Number.isFinite(f)&&f>0?f:null;null==S&&a(`MetricBar:max:${String(f)}`,`[efficient-shell] MetricBar: max=${String(f)} is not a positive finite number, so there is no scale to draw a proportional bar against. Printing the value without a bar. Pass the real capacity, or leave the reading out entirely (value={null}) when it is unknown — do not pass 0.`);const C=e(v,"MetricBar"),D=null!=F?C??t(l(F,g,b)):null,E=n(g),G=n(b),H=null!=F&&null!=S?x(F/S*100):0,J=null!=F?(y??(a=>100===S?u(a,1,A):m(a,A)))(F):"—",L=null!=F&&null!=S&&(null!=E||null!=G),P="md"===k||"lg"===k,R=P?"h-2":"h-1.5",z=null!=F&&null!=S,I=/* @__PURE__ */c("div",{...z?{role:"meter","aria-label":M??("string"==typeof h?h:void 0),"aria-valuemin":0,"aria-valuemax":S,"aria-valuenow":Math.min(S,Math.max(0,F)),"aria-valuetext":J}:{"aria-hidden":!0},className:z&&D?`relative mt-2 ${R} rounded-full bg-gray-200`:`relative mt-2 ${R} rounded-full border border-dashed border-gray-300 bg-transparent`,children:[z&&
|
|
3
|
+
/* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${D?D.fill:"bg-gray-400"}`,style:{width:`${H}%`}}),L&&null!=S&&null!=E&&/* @__PURE__ */o(d,{at:x(E/S*100),title:j.warningAt(E),className:i.warning}),L&&null!=S&&null!=G&&/* @__PURE__ */o(d,{at:x(G/S*100),title:j.criticalAt(G),className:i.critical})]}),O=D?D.ink:null!=F?"text-gray-900":"text-gray-400";if(P){const a="lg"===k;/* @__PURE__ */
|
|
4
|
+
return c("div",{className:$,children:[null!=h&&/* @__PURE__ */o("div",{className:(a?"text-xs":"text-3xs")+" font-medium uppercase tracking-wide text-gray-500",children:h}),
|
|
5
5
|
/* @__PURE__ */c("div",{className:"mt-1 flex items-baseline gap-2",children:[
|
|
6
|
-
/* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${
|
|
7
|
-
/* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=
|
|
8
|
-
return c("div",{className
|
|
6
|
+
/* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${O}`,children:J}),
|
|
7
|
+
/* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=F?N:B})]}),I]})}/* @__PURE__ */
|
|
8
|
+
return c("div",{className:$,children:[
|
|
9
9
|
/* @__PURE__ */c("div",{className:"flex items-baseline gap-2",children:[null!=h&&/* @__PURE__ */o("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:h}),
|
|
10
|
-
/* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${
|
|
11
|
-
/* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=
|
|
10
|
+
/* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${O}`,children:J}),
|
|
11
|
+
/* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=F?N:B})]}),I]})}export{h as MetricBar};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{MOVE_KEYS as e,MoveHint as r,moveFromKey as t}from"./chunk-
|
|
2
|
-
return d(u.Provider,{value:i,children:/* @__PURE__ */d("div",{...o,role:"list","aria-label":r?void 0:e,"aria-labelledby":r,"data-sortable-list":i,className:`flex min-w-0 flex-col ${"comfortable"===i?"gap-2":"gap-1"} ${a}`.trim(),children:t})})}function b({children:o,title:f,thumb:b,expanded:p,onToggle:h,actions:g,below:v,active:x=!1,flat:w=!1,draggable:y=!1,dragging:N=!1,drop:k,onMove:j,rowProps:
|
|
1
|
+
import{MOVE_KEYS as e,MoveHint as r,moveFromKey as t}from"./chunk-RF3ZFTAU.js";import{Icon as i}from"./chunk-JOAKKXTL.js";import{useBrowserLayoutEffect as a}from"./chunk-D65T4H6J.js";import{createContext as o,useContext as n,useRef as l,useId as s}from"react";import{jsx as d,jsxs as c,Fragment as m}from"react/jsx-runtime";var u=o("compact");function f({"aria-label":e,"aria-labelledby":r,children:t,spacing:i="compact",className:a="",rootProps:o}){/* @__PURE__ */
|
|
2
|
+
return d(u.Provider,{value:i,children:/* @__PURE__ */d("div",{...o,role:"list","aria-label":r?void 0:e,"aria-labelledby":r,"data-sortable-list":i,className:`flex min-w-0 flex-col ${"comfortable"===i?"gap-2":"gap-1"} ${a}`.trim(),children:t})})}function b({children:o,title:f,thumb:b,expanded:p,onToggle:h,actions:g,below:v,active:x=!1,flat:w=!1,draggable:y=!1,dragging:N=!1,drop:k,onMove:j,rowProps:A,rowRef:D,className:K=""}){const P=x||!!p,T=n(u),B=l(null),$=s(),F=[A?.["aria-describedby"],j?$:void 0].filter(Boolean).join(" ")||void 0,I=A?.tabIndex;a(()=>{const e=B.current;if(!e||void 0!==I)return;const r=[...e.querySelectorAll('a[href], button, input, select, textarea, [contenteditable]:not([contenteditable="false"]), [tabindex]')].some(r=>r!==e);j&&!r?e.tabIndex=0:e.removeAttribute("tabindex")});const J="comfortable"===T?{before:"-top-[5px]",after:"-bottom-[5px]"}:{before:"-top-0.5",after:"-bottom-0.5"},R=null!=f&&/* @__PURE__ */c(m,{children:[null!=b&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"inline-flex h-6 w-6 shrink-0 overflow-hidden rounded-sm",children:b}),
|
|
3
3
|
/* @__PURE__ */d("span",{"data-list-row-name":"",className:"min-w-0 flex-1 break-words font-semibold text-(--ink-strongest)",children:f})]});/* @__PURE__ */
|
|
4
|
-
return c("div",{role:"listitem","data-list-item":"","data-drop":k,"data-open":P||void 0,className:["relative flex min-w-0 flex-col",w?"":"rounded-(--radius-card) border bg-surface transition-colors duration-(--motion-fast)",w?"":P?"border-blue-300":"border-line hover:border-gray-300"].filter(Boolean).join(" "),children:[k&&/* @__PURE__ */d("span",{"aria-hidden":"true","data-list-drop-line":"",className:`pointer-events-none absolute inset-x-2 z-10 h-0.5 rounded-full bg-blue-500 ${
|
|
5
|
-
/* @__PURE__ */c("div",{...
|
|
4
|
+
return c("div",{role:"listitem","data-list-item":"","data-drop":k,"data-open":P||void 0,className:["relative flex min-w-0 flex-col",w?"":"rounded-(--radius-card) border bg-surface transition-colors duration-(--motion-fast)",w?"":P?"border-blue-300":"border-line hover:border-gray-300"].filter(Boolean).join(" "),children:[k&&/* @__PURE__ */d("span",{"aria-hidden":"true","data-list-drop-line":"",className:`pointer-events-none absolute inset-x-2 z-10 h-0.5 rounded-full bg-blue-500 ${J[k]}`}),
|
|
5
|
+
/* @__PURE__ */c("div",{...A,ref:e=>{var r,t;B.current=e,t=e,"function"==typeof(r=D)?r(t):r&&(r.current=t)},"data-list-row":"","data-draggable":y||void 0,"aria-keyshortcuts":A?.["aria-keyshortcuts"]??(j?e:void 0),"aria-describedby":F,onKeyDown:e=>{if(A?.onKeyDown?.(e),e.defaultPrevented||!j)return;const r=t(e);r&&!e.target.closest?.("select")&&(e.preventDefault(),j(r))},className:["group/listrow relative flex min-h-8 min-w-0 items-center gap-1 rounded-md text-sm",w?"":"min-h-10 pl-3",y?"cursor-grab active:cursor-grabbing":"","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",null!=g&&!1!==g?"":"pr-2",N?"opacity-40":"",K].filter(Boolean).join(" "),children:[
|
|
6
6
|
/* @__PURE__ */c("div",{"data-list-row-main":"",className:"flex min-h-8 min-w-0 flex-1 items-center gap-1",children:[R&&(h?/* @__PURE__ */c("button",{type:"button","aria-expanded":!!p,onClick:h,"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 self-stretch rounded-sm py-2 text-left text-(--ink-strongest) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",children:[R,
|
|
7
7
|
/* @__PURE__ */d(i,{name:"chevron-right","aria-hidden":"true",strokeWidth:"2",className:"h-4 w-4 shrink-0 transition-transform duration-(--motion-base) motion-reduce:transition-none "+(p?"rotate-90":"")})]}):/* @__PURE__ */d("span",{"data-list-row-title":"",className:"flex min-w-0 flex-1 items-center gap-2 py-2",children:R})),o]}),null!=g&&!1!==g&&/* @__PURE__ */d("div",{"data-list-actions":"",className:"flex shrink-0 items-center gap-0.5",children:g}),j&&/* @__PURE__ */d(r,{id:$})]}),null!=v&&!1!==v&&/* @__PURE__ */d("div",{"data-list-below":"",className:w?"":"px-3 pb-3",children:v})]})}export{b as ListRow,f as SortableList};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ShellStringsProvider as t}from"./chunk-
|
|
1
|
+
import{ShellStringsProvider as t}from"./chunk-JSHMIMAJ.js";import{createContext as e,useEffect as a,useCallback as n,useMemo as r,useContext as l}from"react";import{jsx as o}from"react/jsx-runtime";var g={tag:"en",name:"English",locale:null},c="react-os-shell:language",u=t=>"string"==typeof t?t:t.tag;function i(t){try{const e=new Intl.Locale(t).maximize();return{language:e.language,script:e.script}}catch{return null}}function s(t,e){const a=e.map(u),n=t.toLowerCase(),r=a.find(t=>t.toLowerCase()===n);if(r)return r;const l=i(t);if(!l)return;const o=a.map(t=>({tag:t,parts:i(t)})).filter(t=>t.parts?.language===l.language);return(o.find(t=>t.parts?.script===l.script)??o[0])?.tag}function f(){try{return globalThis.localStorage?.getItem(c)??null}catch{return null}}function m(t){try{return globalThis.localStorage?.setItem(c,t),globalThis.localStorage?.getItem(c)===t}catch{return!1}}function h({offered:t,fallback:e,saved:a=f(),preferred:n=globalThis.navigator?.languages??[]}){const r=e??(t.length>0?u(t[0]):g.tag);if(a){const e=s(a,t);if(e)return e}for(const e of n){const a=s(e,t);if(a)return a}return r}var d=e({language:g.tag,languages:[g],setLanguage:async()=>{}}),p=()=>globalThis.location?.reload();function b({languages:e,language:l,strings:g,onChange:c,reload:u=p,children:i}){const s=e.find(t=>t.tag===l),f=s?void 0===s.locale?s.tag:s.locale??void 0:void 0;a(()=>{const t=globalThis.document?.documentElement;if(!t)return;const e=t.getAttribute("lang");return t.setAttribute("lang",l),()=>{null===e?t.removeAttribute("lang"):t.setAttribute("lang",e)}},[l]);const h=n(async t=>{if(t!==l&&e.some(e=>e.tag===t)){m(t);try{await(c?.(t))}catch{}u&&u()}},[l,e,c,u]),b=r(()=>({language:l,languages:e,setLanguage:h}),[l,e,h]);/* @__PURE__ */
|
|
2
2
|
return o(d.Provider,{value:b,children:/* @__PURE__ */o(t,{value:g,locale:f,children:i})})}function v(){return l(d)}export{g as ENGLISH,c as SHELL_LANGUAGE_STORAGE_KEY,b as ShellLanguageProvider,s as matchShellLanguage,f as readSavedShellLanguage,h as resolveShellLanguage,m as saveShellLanguage,v as useShellLanguage};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{squarify as e}from"./chunk-46BYGPGD.js";import{AccessibleTable as t}from"./chunk-HY6CBG4M.js";import{useHighlight as l}from"./chunk-CNYAHYE6.js";import{usePlotWidth as a}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as r}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as i,CHART_INK as o}from"./chunk-TZFACUMR.js";import{useShellStrings as n,useShellLocale as m}from"./chunk-JSHMIMAJ.js";import{formatPlain as h}from"./chunk-C3QOHMR6.js";import{useRef as c,useState as u}from"react";import{jsx as s,jsxs as f}from"react/jsx-runtime";function p({items:p,height:d=320,width:v,gap:x=2,radius:g=3,formatValue:y,color:k,className:b,emptyLabel:M}){const j=n().charts,w=m(),N=y??(e=>h(e,w)),$=M??j.nothingToBreakDown,C=c(null),A=a(C),B=v??A,[F,H]=u(null),{highlighted:Y}=l(),z=e(p,B,d);if(0===z.length)/* @__PURE__ */
|
|
2
|
+
return s("div",{className:b,ref:C,children:/* @__PURE__ */s("p",{className:"py-8 text-center text-sm text-gray-500",children:$})});const D=k??i(0),G=Math.max(...z.map(e=>e.value),1),I=e=>34+e/G*62,S=e=>`color-mix(in oklab, ${D} ${I(e).toFixed(0)}%, ${o.surface})`,V=e=>I(e)>=55?o.surface:o.label,E=F??Y,J=F?z.find(e=>e.key===F):void 0;/* @__PURE__ */
|
|
3
|
+
return f("div",{className:`relative ${b??""}`,ref:C,children:[
|
|
4
|
+
/* @__PURE__ */s("svg",{width:"100%",height:d,viewBox:`0 0 ${B} ${d}`,role:"img","aria-label":j.treemap(p.length),onMouseLeave:()=>H(null),children:z.map(e=>{const t=Math.max(0,e.width-x),l=Math.max(0,e.height-x),a=t>6.2*e.label.length+12&&l>30,r=a&&l>44;/* @__PURE__ */
|
|
5
|
+
return f("g",{opacity:E&&E!==e.key?.55:1,onMouseEnter:()=>H(e.key),children:[
|
|
6
|
+
/* @__PURE__ */s("rect",{x:e.x+x/2,y:e.y+x/2,width:t,height:l,rx:g,fill:S(e.value)}),a&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+18,fontSize:12,fontWeight:600,fill:V(e.value),children:e.label}),r&&/* @__PURE__ */s("text",{x:e.x+x/2+8,y:e.y+x/2+34,fontSize:11,fill:V(e.value),fillOpacity:.85,style:{fontVariantNumeric:"tabular-nums"},children:N(e.value)})]},e.key)})}),J&&/* @__PURE__ */s("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */s(r,{title:J.label,rows:[{key:"value",label:j.value,color:S(J.value),value:N(J.value)}]})}),
|
|
7
|
+
/* @__PURE__ */s(t,{caption:j.treemap(p.length),head:[j.tableItem,j.value],rows:z.map(e=>[e.label,N(e.value)])})]})}export{p as TreemapChart};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";function e({size:e=18,...t}){/* @__PURE__ */
|
|
2
|
+
return r("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:/* @__PURE__ */r("path",{d:"M8.25 9.75H19.5A1.5 1.5 0 0 1 21 11.25V18.75A1.5 1.5 0 0 1 19.5 20.25H4.5A1.5 1.5 0 0 1 3 18.75V5.25A1.5 1.5 0 0 1 4.5 3.75H6.75A1.5 1.5 0 0 1 8.25 5.25V9.75M10.5 9.75V7.5A0.75 0.75 0 0 1 11.25 6.75H13.5A0.75 0.75 0 0 1 14.25 7.5V9.75M16.5 9.75V7.5A0.75 0.75 0 0 1 17.25 6.75H19.5A0.75 0.75 0 0 1 20.25 7.5V9.75"})})}export{e as TabsIcon};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Modal as e}from"./chunk-
|
|
1
|
+
import{Modal as e}from"./chunk-G6LSBF3P.js";import{keepsNativeMenu as a}from"./chunk-5QFPTDQF.js";import{jsx as i,jsxs as n}from"react/jsx-runtime";var t={activeOpacity:70,inactiveOpacity:50,activeBlur:0,inactiveBlur:0};function r(e){try{const a=JSON.parse(localStorage.getItem(e)||"");return null!=a.blur&&null==a.activeBlur&&(a.activeBlur=a.blur,a.inactiveBlur=a.blur,delete a.blur),{...t,...a}}catch{return t}}function l({open:t,onClose:r,title:l,appearance:c,onAppearanceChange:s,onSave:d,children:o}){if(!t)return null;const u="w-full h-1.5 rounded-full appearance-none bg-gray-200 cursor-pointer accent-blue-500",p="flex items-center justify-between text-xs text-gray-500";/* @__PURE__ */
|
|
2
2
|
return i("div",{onPointerDown:e=>e.stopPropagation(),onContextMenu:e=>{e.stopPropagation(),a(e.target)||e.preventDefault()},children:/* @__PURE__ */i(e,{open:t,onClose:r,title:l,size:"sm",children:/* @__PURE__ */n("div",{className:"space-y-4",children:[o,
|
|
3
3
|
/* @__PURE__ */n("div",{children:[
|
|
4
4
|
/* @__PURE__ */i("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Appearance"}),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{useOverlayTarget as e,usePopupAnchor as r,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as i}from"./chunk-
|
|
2
|
-
return v("button",{type:"button",onClick:e,"aria-label":r.close,className:"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__ */v(s,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function C({open:s,onClose:h,side:C="right",size:J="md",title:
|
|
3
|
-
return x(y,{children:[/* @__PURE__ */v("span",{ref:
|
|
4
|
-
/* @__PURE__ */v(t,{value:G,children:/* @__PURE__ */x("div",{ref:
|
|
5
|
-
/* @__PURE__ */v("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm",onClick:
|
|
6
|
-
/* @__PURE__ */x("div",{ref:
|
|
1
|
+
import{useOverlayTarget as e,usePopupAnchor as r,OverlayLayerProvider as t}from"./chunk-3DVNXNTF.js";import{useDiscardGuard as i}from"./chunk-3N5OI6VM.js";import{dialogA11y as o}from"./chunk-VWGWZY7A.js";import{useDismissPopupsOnOpen as l}from"./chunk-7QSDPSXP.js";import{useFocusTrap as n,useScrollLock as a}from"./chunk-CDAJKLGL.js";import{Icon as s}from"./chunk-JOAKKXTL.js";import{Z_LAYERS as d}from"./chunk-62LW225J.js";import{useHydrated as c}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as m}from"./chunk-TWVUQUUD.js";import{useShellStrings as h}from"./chunk-JSHMIMAJ.js";import{useRef as f,useId as u,useState as p,useEffect as b}from"react";import{createPortal as g}from"react-dom";import{jsxs as x,Fragment as y,jsx as v}from"react/jsx-runtime";var k={sm:"sm:w-[320px]",md:"sm:w-[448px]",lg:"sm:w-[640px]"},w={right:"inset-y-0 right-0",left:"inset-y-0 left-0",bottom:"inset-x-0 bottom-0"};function N(e,r){const t=window.innerHeight-(r.top+r.height);if("bottom"===e)return{left:r.left,width:r.width,bottom:t};const i={top:r.top,height:r.height};return"left"===e?{...i,left:r.left}:{...i,right:window.innerWidth-(r.left+r.width)}}function j({onClose:e}){const r=h().dialog;/* @__PURE__ */
|
|
2
|
+
return v("button",{type:"button",onClick:e,"aria-label":r.close,className:"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__ */v(s,{name:"close",className:"h-5 w-5",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true"})})}function C({open:s,onClose:h,side:C="right",size:J="md",title:W,description:D,footer:L,children:A,blocking:H=!1,dirty:I=!1,initialFocus:T,"aria-label":V,"aria-labelledby":z,"aria-describedby":K,className:M=""}){const S=f(null),U=u(),X=u(),B=u(),F=e(c()),[G,O]=p(null),P=i({open:s,dirty:I,onClose:h,title:W,layer:G}),Q=f(null),Y=r(s&&null!==F,Q);if(l(s),n(S,s&&null!==F,T),a(s),b(()=>{if(s)return m(()=>(H||P(),!0),()=>S.current)},[s,H,P]),!s||!F)return null;const Z="bottom"===C,$={...Z?{maxHeight:"85vh"}:{},...Y?N(C,Y):{}};/* @__PURE__ */
|
|
3
|
+
return x(y,{children:[/* @__PURE__ */v("span",{ref:Q,hidden:!0,"data-popup-anchor":""}),g(
|
|
4
|
+
/* @__PURE__ */v(t,{value:G,children:/* @__PURE__ */x("div",{ref:O,className:"fixed inset-0",style:{zIndex:d.overlay},role:"presentation","data-overlay-layer":"",children:[
|
|
5
|
+
/* @__PURE__ */v("div",{className:"fixed inset-0 bg-black/30 backdrop-blur-sm",onClick:H?void 0:P,"aria-hidden":"true"}),
|
|
6
|
+
/* @__PURE__ */x("div",{ref:S,...o({modal:!0,titleId:W?B:void 0,labelledBy:z,label:V}),"aria-describedby":K??(D?X:A?U:void 0),"data-drawer-side":C,"data-popup-panel":"",style:$,className:["fixed flex flex-col bg-white shadow-xl",Z?"":`w-full max-w-full ${k[J]}`,Y?"":w[C],Z?"rounded-t-xl":"",M].filter(Boolean).join(" "),children:[W?/* @__PURE__ */x("div",{className:"flex shrink-0 items-center justify-between gap-4 border-b border-gray-100 px-4 py-3",children:[
|
|
7
7
|
/* @__PURE__ */x("div",{className:"min-w-0",children:[
|
|
8
|
-
/* @__PURE__ */v("h2",{id:B,className:"text-base font-semibold text-gray-900",children:
|
|
9
|
-
/* @__PURE__ */x("div",{id:
|
|
8
|
+
/* @__PURE__ */v("h2",{id:B,className:"text-base font-semibold text-gray-900",children:W}),D&&/* @__PURE__ */v("p",{id:X,className:"mt-0.5 text-sm text-gray-500",children:D})]}),!H&&/* @__PURE__ */v(j,{onClose:P})]}):!H&&/* @__PURE__ */v("div",{className:"absolute right-2 top-2 z-10",children:/* @__PURE__ */v(j,{onClose:P})}),
|
|
9
|
+
/* @__PURE__ */x("div",{id:U,className:"min-h-0 flex-1 overflow-y-auto px-4 py-4",children:[D&&!W&&/* @__PURE__ */v("p",{id:X,className:("mb-3 text-sm text-gray-500 "+(H?"":"pr-8")).trim(),children:D}),A]}),L&&/* @__PURE__ */v("div",{className:"flex shrink-0 justify-end gap-3 border-t border-gray-100 px-4 py-3",children:L})]})]})}),F)]})}export{C as Drawer};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as c}from"react/jsx-runtime";function e({size:e=18,...h}){/* @__PURE__ */
|
|
2
|
+
return c("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...h,children:/* @__PURE__ */c("path",{fillRule:"evenodd",d:"M3.75,2.375h12.5c0.49841,0.03274 1.09349,0.26507 1.41421,0.58579c0.32072,0.32072 0.55305,0.9158 0.58579,1.41421v11.25c-0.03274,0.49841 -0.26507,1.09349 -0.58579,1.41421c-0.32072,0.32072 -0.9158,0.55305 -1.41421,0.58579h-12.5c-0.49841,-0.03274 -1.09349,-0.26507 -1.41421,-0.58579c-0.32072,-0.32072 -0.55305,-0.9158 -0.58579,-1.41421l0,-3.125c0,0 0,0 0,0c0,0.41421 0.33579,0.75 0.75,0.75h15c0.41421,0 0.75,-0.33579 0.75,-0.75c0,-0.41421 -0.33579,-0.75 -0.75,-0.75h-15c-0.41421,0 -0.75,0.33579 -0.75,0.75v-4.375c0,0 0,0 0,0c0,0.41421 0.33579,0.75 0.75,0.75h15c0.41421,0 0.75,-0.33579 0.75,-0.75c0,-0.41421 -0.33579,-0.75 -0.75,-0.75h-15c-0.41421,0 -0.75,0.33579 -0.75,0.75v-3.75c0.03274,-0.49841 0.26507,-1.09349 0.58579,-1.41421c0.32072,-0.32072 0.9158,-0.55305 1.41421,-0.58579zM5,6.375h4.375c0.41421,0 0.75,-0.33579 0.75,-0.75c0,-0.41421 -0.33579,-0.75 -0.75,-0.75h-4.375c-0.41421,0 -0.75,0.33579 -0.75,0.75c0,0.41421 0.33579,0.75 0.75,0.75zM12.59467,4.46967c-0.29289,0.29289 -0.29289,0.76777 0,1.06066l1.25,1.25c0.29289,0.29289 0.76777,0.29289 1.06066,0l1.25,-1.25c0.29289,-0.29289 0.29289,-0.76777 0,-1.06066c-0.29289,-0.29289 -0.76777,-0.29289 -1.06066,0l-0.71967,0.71967l-0.71967,-0.71967c-0.29289,-0.29289 -0.76777,-0.29289 -1.06066,0z"})})}export{e as AccordionMiniIcon};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{optionMatches as e,OptionSublabel as t}from"./chunk-RAOM3WIQ.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as o}from"./chunk-JMGDGNM7.js";import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as a,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-5FYDNH4Y.js";import{useShellStrings as d}from"./chunk-
|
|
2
|
-
return g("div",{ref:
|
|
3
|
-
/* @__PURE__ */g("div",{onMouseDown:e=>{
|
|
4
|
-
/* @__PURE__ */x("span",{className:"truncate",children:
|
|
5
|
-
/* @__PURE__ */x("input",{id:
|
|
6
|
-
/* @__PURE__ */x("div",{ref:
|
|
1
|
+
import{optionMatches as e,OptionSublabel as t}from"./chunk-RAOM3WIQ.js";import{inputClasses as n}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as o}from"./chunk-JMGDGNM7.js";import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as s,POPUP_MAX_WIDTH as a,MENU_MAX_HEIGHT as c}from"./chunk-GLUJS42B.js";import{glassStyle as u}from"./chunk-5FYDNH4Y.js";import{useShellStrings as d}from"./chunk-JSHMIMAJ.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as v}from"react-dom";import{jsxs as g,jsx as x,Fragment as b}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${o.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:o,onChange:y,options:k=[],placeholder:N,allowFreeText:j=!1,invalid:C,disabled:M,id:D,className:L="",tone:W,tooltip:E,split:I}){const[J,S]=m(!1),[Y,$]=m(""),G=d(),H=h(null),A=h(null),B=h(null),F=s(H,J),T=e=>k.find(t=>t.value===e)?.label??e,O=p(()=>{const t=new Set(o),n=[],r=Y.trim().toLowerCase();for(const o of k)t.has(o.value)||(t.add(o.value),r&&!e(o,r)||n.push(o));return n},[k,o,Y]),Z=e=>{const t=[...o];for(const n of e){const e=n.trim();if(!e)continue;const o=e.toLowerCase(),r=k.find(t=>t.value===e||t.label.toLowerCase()===o)?.value,l=r??(j?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==o.length&&y(t)},z=e=>{e&&!o.includes(e)?(y([...o,e]),$("")):$("")},K=e=>y(o.filter(t=>t!==e)),P=()=>{const e=Y.trim();if(I&&e)return Z(e.split(I)),void $("");j&&e?z(e):$("")},Q=h(()=>{});Q.current=()=>{P(),S(!1)},f(()=>{if(!J)return;const e=e=>{const t=e.target;H.current?.contains(t)||B.current?.contains(t)||(P(),S(!1))};document.addEventListener("mousedown",e);const t=l(()=>Q.current());return()=>{document.removeEventListener("mousedown",e),t()}});const R=k.length>0;/* @__PURE__ */
|
|
2
|
+
return g("div",{ref:H,className:"relative",children:[
|
|
3
|
+
/* @__PURE__ */g("div",{onMouseDown:e=>{M||e.target.closest("button")||(e.preventDefault(),A.current?.focus())},className:n({invalid:C,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${M?"bg-gray-50 cursor-not-allowed":""} ${L}`}),children:[o.map(e=>{const t=W?.(e),n=w[t??"accent"],o=/* @__PURE__ */g("span",{"data-tone":t,className:n.chip,children:[
|
|
4
|
+
/* @__PURE__ */x("span",{className:"truncate",children:T(e)}),!M&&/* @__PURE__ */x("button",{type:"button","aria-label":G.select.removeItem?.(T(e))??`${G.select.remove} ${T(e)}`,onClick:()=>K(e),className:n.remove,children:"×"})]},e),l=E?.(e);return null==l?o:/* @__PURE__ */x(r,{content:l,className:"relative inline-flex max-w-full",children:o},e)}),
|
|
5
|
+
/* @__PURE__ */x("input",{id:D,ref:A,type:"text",autoComplete:"off",role:"combobox","aria-expanded":J&&R,"aria-invalid":C||void 0,disabled:M,value:Y,placeholder:0===o.length?N:void 0,onChange:e=>{(e=>{if(I){const t=e.split(I);if(t.length>1)return Z(t.slice(0,-1)),void $(t[t.length-1])}$(e)})(e.target.value),S(!0)},onFocus:()=>{!M&&R&&S(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&j){t.preventDefault();const n=Y.trim(),o=n?O.filter(t=>e(t,n.toLowerCase())):[];1===o.length?z(o[0].value):P()}else"Backspace"===t.key&&""===Y&&o.length>0?K(o[o.length-1]):"Escape"===t.key?(S(!1),$(""),A.current?.blur()):"Tab"===t.key&&(P(),S(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),J&&R&&v(
|
|
6
|
+
/* @__PURE__ */x("div",{ref:B,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:F?.left,right:F?.right,top:F?.top,bottom:F?.bottom,minWidth:F?.minWidth,maxWidth:F?.maxWidth??a,width:"max-content",visibility:F?void 0:"hidden",...u()},children:/* @__PURE__ */x("div",{className:"overflow-y-auto",style:{maxHeight:F?.maxHeight??c},children:0===O.length?/* @__PURE__ */x("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&o.length>=k.length?G.select.allSelected:G.select.noMatches}):O.map(e=>/* @__PURE__ */x("button",{type:"button",onMouseDown:t=>{t.preventDefault(),z(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */g(b,{children:[
|
|
7
7
|
/* @__PURE__ */x("span",{className:"min-w-0 truncate",children:e.label}),
|
|
8
8
|
/* @__PURE__ */x(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{TimelineCard as e}from"./chunk-S4Z657L6.js";import{TimelineTrack as n,TimelineMilestoneIcon as s}from"./chunk-CMJD5URC.js";import{toDayMs as i,fmtSliderDate as t,DAY_MS as a}from"./chunk-7TC3LJQM.js";import{useBrowserValueOnce as l}from"./chunk-D65T4H6J.js";import{useShellStrings as o,useShellLocale as r}from"./chunk-JSHMIMAJ.js";import{jsx as h}from"react/jsx-runtime";function m({title:m,heading:d,subject:c,milestones:p,summary:u,endDate:g,phaseLabels:k,variant:v="card",edgeCaptions:f,highlightKeys:M=null,onHoverChange:y}){const b=l(Date.now,null),j=[],C=[],x=o().timeline,J=r();for(const e of p){const n=i(e.date??null);null===n?C.push({key:e.key,label:e.label,kind:e.kind}):j.push({...e,ms:n})}j.sort((e,n)=>e.ms-n.ms);const D=i(g??null);let H,L,w=!0;0===j.length?(L=D??b??0,H=L-30*a,w=null!==D||null!==b):(H=j[0].ms,L=D??j[j.length-1].ms,L-H<a&&(L=H+a));const N=j.length>0?Math.max(0,Math.round((L-H)/a)):0,O=u??(N>0?x.duration(N):void 0),K=[j.length>0?x.started(t(j[0].ms,J)):void 0,O,C.length>0?x.reached(j.length,p.length):void 0],S=j.map(e=>{return{key:e.key,ms:e.ms,kind:e.kind,label:e.label,detail:e.detail,preview:e.preview,glyph:e.glyph,onClick:e.onClick,onOpen:e.onOpen,priority:(n=e.kind,"dfm"===n?1:0),caption:e.caption,provisional:e.provisional};var n}),T={};for(const e of j)e.phase&&(T[e.phase]=T[e.phase]||[]).push(e.ms);const A=Object.entries(T).filter(([,e])=>e.length>=2).map(([e,n])=>({key:e,label:k?.[e]??e,minMs:Math.min(...n),maxMs:Math.max(...n)})),I="rail"===v,Q=w&&/* @__PURE__ */h("div",{className:"select-none",children:/* @__PURE__ */h(n,{axis:I?"spread":"compressed",labels:I?"none":"lanes",items:S,pending:C,phases:A,startMs:H,endMs:L,todayMs:b??void 0,edgeCaptions:f,highlightKeys:M,onHoverChange:y,ariaLabel:x.milestones(m)})});/* @__PURE__ */
|
|
2
|
+
return h("div",I?{className:"shrink-0","data-timeline-variant":"rail",children:Q}:{className:"shrink-0",children:/* @__PURE__ */h(e,{icon:/* @__PURE__ */h(s,{}),heading:d??m,subject:c,meta:K,children:Q})})}export{m as MilestoneTimeline};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Popover as e}from"./chunk-LFYZ7NQ4.js";import{IconButton_default as r}from"./chunk-SV5RRBVA.js";import{Icon as n}from"./chunk-JOAKKXTL.js";import{Tooltip as t}from"./chunk-SOZCWT6I.js";import{useShellStrings as a}from"./chunk-
|
|
2
|
-
return l(e,{className:N,disabled:x,triggerLabel:
|
|
1
|
+
import{Popover as e}from"./chunk-LFYZ7NQ4.js";import{IconButton_default as r}from"./chunk-SV5RRBVA.js";import{Icon as n}from"./chunk-JOAKKXTL.js";import{Tooltip as t}from"./chunk-SOZCWT6I.js";import{useShellStrings as a}from"./chunk-JSHMIMAJ.js";import{useRef as i}from"react";import{jsx as l,jsxs as o,Fragment as s}from"react/jsx-runtime";var c={ArrowLeft:[0,-1],ArrowRight:[0,1],ArrowUp:[-1,0],ArrowDown:[1,0]};function u({value:u,onChange:m,options:d,label:h,emptyValue:p,columns:f=5,cell:v,header:g,onPreview:w,tooltips:b=!0,disabled:x=!1,className:N=""}){const k=a(),A=k.iconPicker,j=k.iconNames,y=e=>e.label??j[e.value]??e.value,C=i([]),M=Math.max(0,d.findIndex(e=>e.value===u)),I=d[M],L=I?.value===p,T=i(null);/* @__PURE__ */
|
|
2
|
+
return l(e,{className:N,disabled:x,triggerLabel:I?A.button(h,y(I)):h,"aria-label":h,initialFocus:T,panelClassName:"!p-2",trigger:/* @__PURE__ */o("span",{className:"inline-flex items-center gap-2",children:[/* @__PURE__ */l("span",L||!I?{className:"text-sm",children:I?y(I):""}:{"aria-hidden":"true",className:"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:I.icon}),
|
|
3
3
|
/* @__PURE__ */l(n,{name:"chevron-down",className:"h-4 w-4"})]}),children:({close:e})=>/* @__PURE__ */o(s,{children:["function"==typeof g?g({close:e}):g,
|
|
4
|
-
/* @__PURE__ */l("div",{role:"listbox","aria-label":h,className:"grid gap-1",style:{gridTemplateColumns:`repeat(${f}, ${v?.width??"2rem"})`},children:d.map((n,a)=>{const i=n.value===u,o=/* @__PURE__ */l(r,{ref:e=>{C.current[a]=e,a===
|
|
4
|
+
/* @__PURE__ */l("div",{role:"listbox","aria-label":h,className:"grid gap-1",style:{gridTemplateColumns:`repeat(${f}, ${v?.width??"2rem"})`},children:d.map((n,a)=>{const i=n.value===u,o=/* @__PURE__ */l(r,{ref:e=>{C.current[a]=e,a===M&&(T.current=e)},role:"option","aria-selected":i,"aria-label":y(n),pressed:i,tabIndex:a===M?0:-1,onKeyDown:e=>((e,r)=>{const n=c[r.key];if(!n)return;r.preventDefault();const t=Math.floor(e/f)+n[0],a=e%f+n[1];if(t<0||a<0||a>=f)return;const i=t*f+a;if(!(i>=d.length)){for(const[e,r]of C.current.entries())r?.setAttribute("tabindex",e===i?"0":"-1");C.current[i]?.focus()}})(a,e),onClick:()=>{m(n.value),e()},onMouseEnter:w?e=>w(n.value,e.currentTarget):void 0,style:v?{width:v.width,height:v.height}:void 0,children:/* @__PURE__ */l("span",{"aria-hidden":"true",className:v?"inline-flex":"inline-flex [&_svg]:h-4 [&_svg]:w-4",children:n.icon})},n.value);return b?/* @__PURE__ */l(t,{content:y(n),children:o},n.value):o})})]})})}export{u as IconPicker};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-
|
|
1
|
+
import{railLabelsShown as e}from"./chunk-FQEALPZJ.js";import{CountBadge as t}from"./chunk-OM6VWUAZ.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{createContext as o,useRef as a,useState as i,useEffect as l,useContext as s}from"react";import{jsx as c,jsxs as d,Fragment as u}from"react/jsx-runtime";var h=o({labels:"none",shown:"none"}),f="button[data-icon-rail-button]:not([disabled])";function b(e,t,n){const r=getComputedStyle(e),o=(parseFloat(r.paddingLeft)||0)+(parseFloat(r.paddingRight)||0)+(parseFloat(r.borderLeftWidth)||0)+(parseFloat(r.borderRightWidth)||0),a="horizontal"===t?(parseFloat(r.columnGap)||0)*Math.max(0,n-1):0,i=e.parentElement;let l=1/0;if(i){const e=getComputedStyle(i);l=i.clientWidth-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)}return{chrome:o+a,room:l}}function m({"aria-label":t,orientation:n="vertical",children:o,className:s="",labels:d="none",labelsFit:u=!1,onLabelsShown:m}){const p=a(null),g="none"!==d&&u,[v,y]=i(null),w="none"===d?"none":g?v??"none":"all",x=a(()=>{});x.current=()=>{const t=p.current;if(!t||!g)return;const r=function(e,t){return[...e.querySelectorAll("button[data-icon-rail-button]")].map(e=>{const n=getComputedStyle(e),r=(parseFloat(n.paddingLeft)||0)+(parseFloat(n.paddingRight)||0)+(parseFloat(n.borderLeftWidth)||0)+(parseFloat(n.borderRightWidth)||0),o=parseFloat(n.minWidth)||0,a=e.querySelector("[data-icon-rail-glyph]")?.getBoundingClientRect().width??0,i=e.querySelector("[data-icon-rail-word]")?.scrollWidth??0;return{bare:Math.max(o,r+a),worded:"below"===t?Math.max(o,r+Math.max(a,i)):Math.max(o,r+a+8+i),active:"true"===e.getAttribute("aria-pressed")}})}(t,d);y(e({buttons:r,orientation:n,...b(t,n,r.length)}))},r(()=>{x.current()}),l(()=>{const e=p.current?.parentElement;if(!g||!e)return;let t=!0;const n=()=>{t&&x.current()},r="undefined"==typeof ResizeObserver?void 0:ResizeObserver,o=r?new r(n):null;return o?.observe(e),document.fonts?.ready.then(n,()=>{}),()=>{t=!1,o?.disconnect()}},[g]);const F=a(null),k=a(m);k.current=m,l(()=>{g&&null!==v&&F.current!==v&&(F.current=v,k.current?.(v))},[g,v]),r(()=>{const e=p.current;if(!e)return;const t=[...e.querySelectorAll(f)];if(0===t.length)return;const n=t.find(e=>e===document.activeElement)??t.find(e=>"true"===e.getAttribute("aria-pressed"))??t[0];for(const t of e.querySelectorAll("button[data-icon-rail-button]"))t.tabIndex=t===n?0:-1});/* @__PURE__ */
|
|
2
2
|
return c("div",{ref:p,role:"toolbar","aria-label":t,"aria-orientation":n,"data-orientation":n,onKeyDown:e=>{const t=p.current;if(!t)return;const r=[...t.querySelectorAll(f)],o=r.indexOf(e.target);if(o<0)return;const a="vertical"===n?"ArrowUp":"ArrowLeft",i="vertical"===n?"ArrowDown":"ArrowRight",l=e.key===i?(o+1)%r.length:e.key===a?(o-1+r.length)%r.length:"Home"===e.key?0:"End"===e.key?r.length-1:-1;if(!(l<0)){e.preventDefault();for(const e of r)e.tabIndex=e===r[l]?0:-1;r[l].focus()}},"data-labels":"none"===d?void 0:d,"data-labels-shown":"none"===d?void 0:w,className:`flex gap-1 ${"vertical"===n?"flex-col items-center":"flex-row items-center"} ${s}`.trim(),children:/* @__PURE__ */c(h.Provider,{value:{labels:d,shown:w},children:o})})}function p({label:e,icon:r,active:o,disabled:a,onClick:i,badge:l,tooltipSide:f="right",className:b=""}){const m=!0===o,{labels:p,shown:g}=s(h),v=void 0===l||!1===l||0===l?r:/* @__PURE__ */c(t,{count:"number"==typeof l?l:void 0,dot:!0===l,max:99,children:r}),y="none"!==p,w=y&&("all"===g||"chosen"===g&&m),x=/* @__PURE__ */c("button",{type:"button","data-icon-rail-button":"","aria-label":e,"aria-pressed":"boolean"==typeof o?o:void 0,disabled:a,onClick:a?void 0:i,className:[`relative inline-flex ${y?"beside"===p?"h-9 min-w-9 justify-center px-2":"min-h-9 min-w-9 flex-col justify-center px-1 py-1":"h-9 w-9 justify-center"} shrink-0 items-center rounded-lg transition-colors`,"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-40",m?"bg-accent-tint text-blue-700":"text-gray-600 not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-ink-strongest",b].filter(Boolean).join(" "),children:y?/* @__PURE__ */d(u,{children:[
|
|
3
3
|
/* @__PURE__ */c("span",{"data-icon-rail-glyph":"",className:"inline-flex shrink-0 items-center justify-center",children:v}),
|
|
4
4
|
/* @__PURE__ */c("span",{"data-icon-rail-word":"","aria-hidden":"true",className:["overflow-hidden whitespace-nowrap text-xs font-medium leading-none",w?"beside"===p?"ml-2":"mt-1":"max-h-0 max-w-0"].join(" "),children:e})]}):v});/* @__PURE__ */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
2
|
-
return t(
|
|
3
|
-
/* @__PURE__ */t("div",{className:`${
|
|
4
|
-
/* @__PURE__ */a("p",{id:v,className:
|
|
5
|
-
/* @__PURE__ */t("div",{className:`${
|
|
6
|
-
/* @__PURE__ */a(j,{id:N,className:
|
|
1
|
+
import{useShellLocale as e}from"./chunk-JSHMIMAJ.js";import{formatPlain as r}from"./chunk-C3QOHMR6.js";import{useId as d,Children as n}from"react";import{jsxs as t,jsx as a}from"react/jsx-runtime";var i={none:{body:"",edge:"px-4 py-3"},sm:{body:"p-3",edge:"px-3 py-2"},md:{body:"p-4",edge:"px-4 py-3"},lg:{body:"p-6",edge:"px-6 py-4"}},l={neutral:"border-line",warning:"border-amber-300",current:"border-line"};function s({children:e,header:r,description:s,footer:c,padded:o=!0,padding:m,headingLevel:b,headerActions:u,"aria-label":p,className:h="",bodyClassName:x="",style:g,tone:f="neutral"}){const y=i[m??(o?"md":"none")],N=d(),v=d(),$=null!=r&&null!=s&&""!==s,w=null!=b&&null!=r,j=`h${b}`,k=null!=p&&""!==p,A=w||k,M=A?"section":"div",C=`rounded-(--radius-card) border ${l[f]} bg-surface shadow-sm ${h}`.trim(),H=n.toArray(e).length>0,J=H?"border-b border-line-subtle ":"",B="current"===f,I=B?"text-base font-semibold text-blue-700":"text-base font-semibold text-ink-strongest",L=B?"rounded-t-(--radius-card) bg-accent-tint ":"",O=`${J}${L}${y.edge} ${I}`;/* @__PURE__ */
|
|
2
|
+
return t(M,{className:C,style:g,...k?{"aria-label":p}:w?{"aria-labelledby":N}:{},...$&&A?{"aria-describedby":v}:{},...B?{"aria-current":!0}:{},children:[$?
|
|
3
|
+
/* @__PURE__ */t("div",{className:`${J}${L}${y.edge}`,children:[null!=u?/* @__PURE__ */t("div",{className:`flex items-center justify-between gap-3 ${I}`,children:[w?/* @__PURE__ */a(j,{id:N,children:r}):/* @__PURE__ */a("span",{children:r}),u]}):w?/* @__PURE__ */a(j,{id:N,className:I,children:r}):/* @__PURE__ */a("div",{className:I,children:r}),
|
|
4
|
+
/* @__PURE__ */a("p",{id:v,className:B?"mt-0.5 text-xs text-gray-600":"mt-0.5 text-xs text-ink-faint",children:s})]}):null!=r&&(null!=u?
|
|
5
|
+
/* @__PURE__ */t("div",{className:`${O} flex items-center justify-between gap-3`,children:[w?/* @__PURE__ */a(j,{id:N,children:r}):/* @__PURE__ */a("span",{children:r}),u]}):w?
|
|
6
|
+
/* @__PURE__ */a(j,{id:N,className:O,children:r}):/* @__PURE__ */a("div",{className:O,children:r})),H&&/* @__PURE__ */a("div",{className:[y.body,x].filter(Boolean).join(" "),children:e}),c&&/* @__PURE__ */a("div",{className:`border-t border-gray-100 ${y.edge}`,children:c})]})}function c({label:d,value:n,icon:i,delta:l,className:s=""}){const c=e(),o="number"==typeof n&&c?r(n,c):n,m="up"===l?.direction?"text-green-600":"down"===l?.direction?"text-red-600":"text-gray-500",b="up"===l?.direction?"▲":"down"===l?.direction?"▼":"→";/* @__PURE__ */
|
|
7
7
|
return t("div",{className:`rounded-(--radius-card) border border-gray-200 bg-white p-4 shadow-sm ${s}`.trim(),children:[
|
|
8
8
|
/* @__PURE__ */t("div",{className:"flex items-center justify-between text-ink-faint",children:[
|
|
9
9
|
/* @__PURE__ */a("span",{className:"text-xs font-medium uppercase tracking-wide",children:d}),i]}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tabs as e}from"./chunk-QJGZOD6X.js";import{Card as a}from"./chunk-
|
|
1
|
+
import{Tabs as e}from"./chunk-QJGZOD6X.js";import{Card as a}from"./chunk-CEIIQRK5.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-JMGDGNM7.js";import{Button_default as l}from"./chunk-EVYD6UFQ.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
|
|
2
2
|
return d(r,{groups:n,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */s("div",{className:"mx-auto max-w-5xl space-y-4",children:[
|
|
3
3
|
/* @__PURE__ */s("div",{className:"flex items-center justify-between gap-4",children:[
|
|
4
4
|
/* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Gallery"}),
|