efficient-shell 13.11.0 → 13.13.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 +1 -1
- package/dist/{Browser-S2ISEYGX.js → Browser-H3A2AO7Q.js} +16 -16
- package/dist/{Calculator-TJ4XFVNQ.js → Calculator-3PVLP3UK.js} +22 -22
- package/dist/{CurrencyConverter-6H3QM3TU.js → CurrencyConverter-JLRIAP2Z.js} +6 -6
- package/dist/{Files-37P4KZOM.js → Files-YVC66K6X.js} +77 -77
- package/dist/{Notepad-4PQFMUYM.js → Notepad-BCND3SM3.js} +9 -9
- package/dist/PdfViewer-PFQGQRQX.js +1 -0
- package/dist/{PomodoroTimer-2MFWO3KK.js → PomodoroTimer-I575OSRR.js} +46 -46
- package/dist/{Preview-CC7QJZGV.js → Preview-UXATJW7C.js} +49 -49
- package/dist/Sidebar-GYGYAXS2.js +44 -0
- package/dist/{Stock-OYUZ4D3M.js → Stock-EPJQJ3XE.js} +3 -3
- package/dist/{Weather-377NKPA5.js → Weather-RPCD2UW3.js} +22 -22
- package/dist/{WorldClock-M6AMXQY2.js → WorldClock-AC3EUSVG.js} +7 -7
- package/dist/ai/index.d.ts +25 -1
- package/dist/ai/index.js +103 -103
- package/dist/apps/ImageAnnotator.js +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/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-MZCYB2MW.js → chunk-223XYIIH.js} +1 -1
- package/dist/{chunk-R5SVNFUG.js → chunk-22N3KA7A.js} +4 -4
- package/dist/{chunk-TZBNN6HD.js → chunk-23LK4PLJ.js} +8 -8
- package/dist/{chunk-7WMFHPKS.js → chunk-2GMYO6ET.js} +1 -1
- package/dist/{chunk-FCWBO7I3.js → chunk-2QE6QD4Y.js} +7 -7
- package/dist/{chunk-H4GOJ26X.js → chunk-2YK6ZB7C.js} +1 -1
- package/dist/chunk-3J4SFHC7.js +15 -0
- package/dist/{chunk-5UPLN44S.js → chunk-3PLQKRD4.js} +12 -12
- package/dist/chunk-47UTEV3P.js +23 -0
- package/dist/{chunk-65JCQLM4.js → chunk-4F3SUYN5.js} +1 -1
- package/dist/{chunk-TAEO2JC6.js → chunk-4IYHQNKZ.js} +1 -1
- package/dist/chunk-4Q2CZ4US.js +7 -0
- package/dist/{chunk-CVXJKHPD.js → chunk-4S3E3VJH.js} +6 -6
- package/dist/{chunk-5LHEPE4B.js → chunk-4U5M37SF.js} +1 -1
- package/dist/{chunk-F3MO56N4.js → chunk-5HFKVEWW.js} +1 -1
- package/dist/{chunk-YMUHIJDJ.js → chunk-5POQCJL6.js} +4 -4
- package/dist/chunk-65FZQ572.js +8 -0
- package/dist/{chunk-VWYICGVA.js → chunk-6AUQWWUA.js} +1 -1
- package/dist/{chunk-RJ24VXBZ.js → chunk-6HYO2W3O.js} +4 -4
- package/dist/{chunk-WAKWESOR.js → chunk-6LDXTZGE.js} +1 -1
- package/dist/{chunk-FOE2QHDE.js → chunk-6LYKIC7W.js} +9 -9
- package/dist/{chunk-EQFWFQOZ.js → chunk-6QKTQOEV.js} +27 -27
- package/dist/{chunk-2FQBY4ED.js → chunk-7RGHV3J5.js} +5 -5
- package/dist/chunk-7TJZ5AJE.js +11 -0
- package/dist/{chunk-VMKTA5HL.js → chunk-AEEK74UI.js} +6 -6
- package/dist/{chunk-CCPUNN4F.js → chunk-AHMYBYXJ.js} +1 -1
- package/dist/chunk-B53VREFW.js +8 -0
- package/dist/{chunk-GHLXZDLU.js → chunk-BG3C4ALM.js} +1 -1
- package/dist/{chunk-GAGCE2ML.js → chunk-CKTFXTJL.js} +1 -1
- package/dist/{chunk-BXZLSY2S.js → chunk-CWVQH2SP.js} +1 -1
- package/dist/chunk-DEYVAMJQ.js +19 -0
- package/dist/{chunk-IODIQ77P.js → chunk-DO3DSSAW.js} +1 -1
- package/dist/chunk-DQTYV6AC.js +9 -0
- package/dist/{chunk-4RSBPRCQ.js → chunk-DVVB2CY5.js} +1 -1
- package/dist/{chunk-XOZ5VPXF.js → chunk-EHNQGKW4.js} +1 -1
- package/dist/{chunk-75TPMXA7.js → chunk-ELPW25CA.js} +1 -1
- package/dist/{chunk-BNPJHOAC.js → chunk-EMRTVPQ5.js} +9 -9
- package/dist/{chunk-4HJNHI4A.js → chunk-F4VILY3O.js} +1 -1
- package/dist/{chunk-ZDCCYRFF.js → chunk-F5B5WOQ7.js} +2 -2
- package/dist/{chunk-AJ5GLMGD.js → chunk-FBS55WOX.js} +7 -7
- package/dist/{chunk-TDG5WGLR.js → chunk-FDDM7VMQ.js} +1 -1
- package/dist/chunk-FQD6P6EZ.js +4 -0
- package/dist/{chunk-57GRXAXJ.js → chunk-FT2YDMG7.js} +1 -1
- package/dist/{chunk-PR6FNBKR.js → chunk-FTKLODQK.js} +1 -1
- package/dist/{chunk-VUM6BYAX.js → chunk-G4D2WM3J.js} +1 -1
- package/dist/{chunk-H7CIK74N.js → chunk-G53Y6EPJ.js} +13 -13
- package/dist/{chunk-ZDDMFFQK.js → chunk-GITRDCHS.js} +1 -1
- package/dist/{chunk-4YWQE67T.js → chunk-GO2TZ35U.js} +1 -1
- package/dist/{chunk-6XPS3H5Z.js → chunk-GYPYOBG5.js} +8 -8
- package/dist/{chunk-ZGIAMYTI.js → chunk-HK53EKZH.js} +1 -1
- package/dist/{chunk-X22SFR5F.js → chunk-HOROMBJB.js} +8 -8
- package/dist/{chunk-XCY7A5UM.js → chunk-HZ7TUMNL.js} +1 -1
- package/dist/{chunk-Z62HFEFS.js → chunk-I6QVXM2M.js} +15 -15
- package/dist/{chunk-6SOS6OBB.js → chunk-IE6TRMIW.js} +1 -1
- package/dist/{chunk-NVAH2NQI.js → chunk-IG7JPSBG.js} +1 -1
- package/dist/chunk-IJNQ2BUY.js +2 -0
- package/dist/{chunk-NUDL6UO3.js → chunk-IOLUF3UL.js} +1 -1
- package/dist/chunk-IUVGHHR3.js +1 -0
- package/dist/chunk-J6QC45OS.js +8 -0
- package/dist/{chunk-KV6XCHAG.js → chunk-JGKDWDVM.js} +16 -16
- package/dist/{chunk-JOYGSKWG.js → chunk-JHGBFZHL.js} +5 -5
- package/dist/{chunk-PZNF2TEB.js → chunk-JNSRDEB6.js} +9 -9
- package/dist/{chunk-SC3AQXJY.js → chunk-JPCPO4MX.js} +8 -8
- package/dist/{chunk-BSEQJM7X.js → chunk-JPKNVTTK.js} +1 -1
- package/dist/{chunk-NDWX5Z4D.js → chunk-JR2HHKVP.js} +1 -1
- package/dist/{chunk-DU7TJVX5.js → chunk-KEVJBI5Q.js} +1 -1
- package/dist/{chunk-R5TSUJTK.js → chunk-KLUCEASW.js} +6 -6
- package/dist/{chunk-2UBR4YUF.js → chunk-KNZ7YTFH.js} +1 -1
- package/dist/{chunk-3DV5YLAI.js → chunk-KYQKMBSY.js} +5 -5
- package/dist/{chunk-3YCU6V3U.js → chunk-L2WBCXG7.js} +1 -1
- package/dist/{chunk-ROKUEMAK.js → chunk-L3BECLHD.js} +1 -1
- package/dist/{chunk-VOD5MRBF.js → chunk-L3STE7JN.js} +2 -2
- package/dist/{chunk-YW6BODBX.js → chunk-LURBH6G4.js} +1 -1
- package/dist/{chunk-PC3MYH2K.js → chunk-LXPDURUL.js} +2 -2
- package/dist/{chunk-DASRJ26L.js → chunk-M2TQOJ3G.js} +1 -1
- package/dist/{chunk-IRCASURW.js → chunk-M7W63T6H.js} +8 -8
- package/dist/{chunk-ZHR2HNT2.js → chunk-MEF4JVXP.js} +15 -15
- package/dist/{chunk-VVXBBU6R.js → chunk-MHCNQKEK.js} +3 -3
- package/dist/{chunk-FEQQMRHJ.js → chunk-MOKABQCY.js} +2 -2
- package/dist/{chunk-ARBS2EZ6.js → chunk-NA4XPE7S.js} +3 -3
- package/dist/{chunk-HWJQLLJA.js → chunk-NEHVW324.js} +8 -8
- package/dist/{chunk-AKKDFFUO.js → chunk-NILGK2KJ.js} +1 -1
- package/dist/{chunk-6D6Q3ZCG.js → chunk-NJD7HVTP.js} +5 -5
- package/dist/chunk-NMP74ZCB.js +1 -0
- package/dist/{chunk-XPSWZQR4.js → chunk-OEPQIIYL.js} +1 -1
- package/dist/{chunk-CUJA3HBZ.js → chunk-OLSA36VX.js} +8 -8
- package/dist/{chunk-FVORTWUY.js → chunk-ORV2AVIJ.js} +1 -1
- package/dist/chunk-OWAYSIQH.js +8 -0
- package/dist/{chunk-YM7AWNMY.js → chunk-OZ4R6U2M.js} +1 -1
- package/dist/{chunk-G5U7IRH4.js → chunk-P5C7DI5A.js} +5 -5
- package/dist/{chunk-F3G7S5HO.js → chunk-PALWXHBQ.js} +27 -27
- package/dist/{chunk-QO7UHTUE.js → chunk-PKXHAF43.js} +6 -6
- package/dist/chunk-PR3VNBQY.js +28 -0
- package/dist/{chunk-NZKR3JPM.js → chunk-QBMMORYP.js} +1 -1
- package/dist/{chunk-AEMTJGD4.js → chunk-QNWC3RWK.js} +1 -1
- package/dist/{chunk-QDEQHT2T.js → chunk-QQGNTDMO.js} +1 -1
- package/dist/{chunk-V5VAKDLS.js → chunk-QTVE3OSD.js} +6 -6
- package/dist/{chunk-ZAL72BPF.js → chunk-R6GXVLY7.js} +1 -1
- package/dist/chunk-RDGXSAOD.js +2 -0
- package/dist/{chunk-OAKXWYZD.js → chunk-RFR2K7JO.js} +2 -2
- package/dist/{chunk-Y43S6YS5.js → chunk-RZJ63ZM4.js} +10 -10
- package/dist/{chunk-2A2C2YBE.js → chunk-S5N37QIV.js} +2 -2
- package/dist/{chunk-ROPVIMIR.js → chunk-SR6DDTUN.js} +1 -1
- package/dist/chunk-TNNH6F3V.js +11 -0
- package/dist/{chunk-IEW5JTIR.js → chunk-U2ZTHOQL.js} +1 -1
- package/dist/{chunk-BRFUQAVC.js → chunk-U7WDBCVV.js} +1 -1
- package/dist/{chunk-O5UD3ZWM.js → chunk-UC5IC3AM.js} +10 -10
- package/dist/{chunk-HTHNDX32.js → chunk-UFX7F3KG.js} +1 -1
- package/dist/{chunk-Q6GECV4J.js → chunk-UXGNF3OG.js} +1 -1
- package/dist/{chunk-2LRSUDGN.js → chunk-VADWTS7H.js} +5 -5
- package/dist/{chunk-IYTOOV7Q.js → chunk-VCR3RADH.js} +1 -1
- package/dist/{chunk-ITEOA45V.js → chunk-VFSAJMNX.js} +1 -1
- package/dist/{chunk-TMSSR5UH.js → chunk-VQ35LXDC.js} +1 -1
- package/dist/{chunk-3TCGXYUC.js → chunk-VXSYHTBP.js} +1 -1
- package/dist/{chunk-WEZ2RO72.js → chunk-VYHVIKP6.js} +8 -8
- package/dist/{chunk-YAM3L5N4.js → chunk-W2TPXKCV.js} +1 -1
- package/dist/chunk-W6NGPSMM.js +22 -0
- package/dist/{chunk-DFOKJAIS.js → chunk-WBXPA7TY.js} +1 -1
- package/dist/{chunk-FXG7TOZN.js → chunk-WF4A2HSB.js} +1 -1
- package/dist/{chunk-PGATHOTX.js → chunk-WIFK6TLB.js} +1 -1
- package/dist/{chunk-IOZSLFGR.js → chunk-WJMPTW3G.js} +1 -1
- package/dist/chunk-WWCAVO3R.js +14 -0
- package/dist/{chunk-4HJX2M4W.js → chunk-XEPA5J6K.js} +1 -1
- package/dist/{chunk-YEEMRWBS.js → chunk-XHD6Q6JV.js} +1 -1
- package/dist/{chunk-P62QGXRW.js → chunk-XMFJDT6Y.js} +13 -13
- package/dist/{chunk-BLXHT72M.js → chunk-XOQGBU25.js} +1 -1
- package/dist/{chunk-H4LUHKUJ.js → chunk-XRTH47EO.js} +49 -49
- package/dist/chunk-XSHDPG45.js +9 -0
- package/dist/{chunk-ID35S5Y6.js → chunk-XWJT6TFU.js} +1 -1
- package/dist/{chunk-PA3OU3Y7.js → chunk-YDFDTRZF.js} +5 -5
- package/dist/{chunk-44ZHEIJZ.js → chunk-YGKLZBWC.js} +11 -11
- package/dist/{chunk-5PSFENSW.js → chunk-YM2Z4LZ2.js} +16 -16
- package/dist/{chunk-LOFFHXZ4.js → chunk-YMHCLK3F.js} +10 -10
- package/dist/{chunk-KGBB6REQ.js → chunk-YNVH2EIE.js} +3 -3
- package/dist/{chunk-O32GIVYD.js → chunk-YY7OFUT2.js} +3 -3
- package/dist/{chunk-JWUNK2PW.js → chunk-ZCGT5YNR.js} +1 -1
- package/dist/{chunk-NLHGFQ54.js → chunk-ZNV75GAG.js} +1 -1
- package/dist/{chunk-E44RNULN.js → chunk-ZYU5HAIC.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.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.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.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.d.ts +5 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/index.js +665 -665
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +4 -4
- package/dist/model-viewer/index.js +3 -3
- 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.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/language.js +1 -1
- package/dist/shell/strings.d.ts +3 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/PdfViewer-OLQBTKOC.js +0 -1
- package/dist/Sidebar-7SHI7P5Z.js +0 -44
- package/dist/chunk-3RX5KCUH.js +0 -9
- package/dist/chunk-B3KQELHS.js +0 -7
- package/dist/chunk-B447IHIL.js +0 -4
- package/dist/chunk-BKZOTBDP.js +0 -23
- package/dist/chunk-BLXEDMZM.js +0 -8
- package/dist/chunk-D53FU245.js +0 -8
- package/dist/chunk-DEJIH3ZQ.js +0 -1
- package/dist/chunk-FBMYLCCE.js +0 -11
- package/dist/chunk-FW6KE6OU.js +0 -1
- package/dist/chunk-HTHD7STJ.js +0 -9
- package/dist/chunk-KITSIQCV.js +0 -19
- package/dist/chunk-OZV5P5A7.js +0 -15
- package/dist/chunk-QXXMRV4E.js +0 -2
- package/dist/chunk-R3R6ZJNW.js +0 -28
- package/dist/chunk-RMEYKJEH.js +0 -8
- package/dist/chunk-UF76AFFY.js +0 -22
- package/dist/chunk-UHQBHSWL.js +0 -11
- package/dist/chunk-V3KQIY6T.js +0 -8
- package/dist/chunk-WUEH6DLJ.js +0 -14
- package/dist/chunk-YJGA4LPG.js +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{Popover as e}from"./chunk-64RHGJXK.js";import{InputNumber_default as r}from"./chunk-
|
|
2
|
-
return v("button",{ref:l,type:o,"aria-pressed":a,className:N({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(e)})})}),z=(e,r,a)=>Math.min(a,Math.max(r,e)),D=e=>"string"==typeof e?{value:e}:e;function I(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:z(e.s+o[0],0,1),v:z(e.v+o[1],0,1)}:null}function A(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,359);case"ArrowRight":case"ArrowUp":return z(e+n,0,359);case"PageDown":return z(e-10,0,359);case"PageUp":return z(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var M={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function P(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,100);case"ArrowRight":case"ArrowUp":return z(e+n,0,100);case"PageDown":return z(e-10,0,100);case"PageUp":return z(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function j({value:e,onChange:r,label:i,presets:u,clearable:g=!1,fallback:f,dragWrites:x="live",disabled:N=!1,opacity:z,onOpacityChange:j,onClose:S,id:K,className:T=""}){const
|
|
3
|
-
return w("div",{id:K,className:`flex w-56 flex-col gap-3 ${N?"opacity-60":""} ${T}`.trim(),onKeyDown:e=>{"Escape"===e.key&&S&&(e.preventDefault(),e.stopPropagation(),S())},children:[(ne.length>0||g)&&/* @__PURE__ */w("div",{role:"group","aria-label":
|
|
4
|
-
return v(d,{content:n,children:/* @__PURE__ */v($,{color:r??e.value,size:"sm","aria-label":n,selected:null!==r&&r===oe,disabled:N,onClick:()=>
|
|
5
|
-
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":
|
|
6
|
-
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":
|
|
1
|
+
import{Popover as e}from"./chunk-64RHGJXK.js";import{InputNumber_default as r}from"./chunk-F5B5WOQ7.js";import{parseHexColor as a,hexToHsv as n,hsvToHex as o,hexReadout as t,HUE_GRADIENT as l,HEX_MAX_LENGTH as i,svFromPoint as s,hueFromPoint as c}from"./chunk-S6OB6HJB.js";import{inputClasses as u}from"./chunk-AYZY3YNC.js";import{Tooltip as d}from"./chunk-SOZCWT6I.js";import{useShellStrings as h}from"./chunk-IUVGHHR3.js";import{forwardRef as g,useState as p,useRef as b,useEffect as m,useId as f}from"react";import{jsx as v,jsxs as w}from"react/jsx-runtime";var x={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},y={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function k(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function C(e,r){if(!e)return y;const a=k(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`}}function N({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",x[e],a].filter(Boolean).join(" ")}var $=g(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
|
|
2
|
+
return v("button",{ref:l,type:o,"aria-pressed":a,className:N({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(e)})})}),z=(e,r,a)=>Math.min(a,Math.max(r,e)),D=e=>"string"==typeof e?{value:e}:e;function I(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:z(e.s+o[0],0,1),v:z(e.v+o[1],0,1)}:null}function A(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,359);case"ArrowRight":case"ArrowUp":return z(e+n,0,359);case"PageDown":return z(e-10,0,359);case"PageUp":return z(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var M={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function P(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return z(e-n,0,100);case"ArrowRight":case"ArrowUp":return z(e+n,0,100);case"PageDown":return z(e-10,0,100);case"PageUp":return z(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function j({value:e,onChange:r,label:i,presets:u,clearable:g=!1,fallback:f,dragWrites:x="live",disabled:N=!1,opacity:z,onOpacityChange:j,onClose:S,id:K,className:T=""}){const R=h().color,H=k(z),U=e=>{const r=k(e);N||r===H||j?.(r)},L=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:H},W=a(f??""),[E,X]=p(()=>n(e||W||"")),Y=b(e);m(()=>{e!==Y.current&&(Y.current=e,e?X(n(e)):W&&X(n(W)))},[e]);const q=a=>{N||a===e||(Y.current=a,r(a))},F=e=>{const r=a(e);r&&(X(n(r)),q(r))},G=e=>{X(e),q(o(e))},[J,V]=p(!1),Z=b(E);Z.current=E;const Q=e=>({onPointerDown:r=>{if(N||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,Z.current);"end"===x?(V(!0),X(a)):G(a)},onPointerMove:r=>{if(N||!(1&r.buttons))return;const a=e(r,Z.current);"end"===x?X(a):G(a)},onPointerUp:r=>{"end"===x&&J&&(V(!1),G(e(r,Z.current)))}}),_=Q((e,r)=>({...r,...s(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),ee=Q((e,r)=>({...r,h:c(e.clientX,e.currentTarget.getBoundingClientRect())})),re=J?o(E):e,ae=e=>`${Math.round(100*e)}%`,ne=(u??[]).map(D),oe=a(e),te=re||W||"";/* @__PURE__ */
|
|
3
|
+
return w("div",{id:K,className:`flex w-56 flex-col gap-3 ${N?"opacity-60":""} ${T}`.trim(),onKeyDown:e=>{"Escape"===e.key&&S&&(e.preventDefault(),e.stopPropagation(),S())},children:[(ne.length>0||g)&&/* @__PURE__ */w("div",{role:"group","aria-label":R.presets,className:"flex flex-wrap gap-2",children:[g&&/* @__PURE__ */v(d,{content:R.clear,children:/* @__PURE__ */v($,{color:"",size:"sm","aria-label":R.clear,selected:""===e,disabled:N,onClick:()=>{N||""===e||(Y.current="",r(""))}})}),ne.map(e=>{const r=a(e.value),n=e.label?`${e.label} · ${t(r??e.value)}`:t(r??e.value);/* @__PURE__ */
|
|
4
|
+
return v(d,{content:n,children:/* @__PURE__ */v($,{color:r??e.value,size:"sm","aria-label":n,selected:null!==r&&r===oe,disabled:N,onClick:()=>F(e.value)})},`${e.label??""}:${e.value}`)})]}),
|
|
5
|
+
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":R.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*E.v),"aria-valuetext":R.squareValue(Math.round(100*E.s),Math.round(100*E.v)),"aria-disabled":N||void 0,"data-color-square":"",onKeyDown:e=>{if(N)return;const r=I(E,e.key,e.shiftKey);r&&(e.preventDefault(),G(r))},..._,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:o({h:E.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ae(E.s),top:ae(1-E.v),...M}})}),
|
|
6
|
+
/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":R.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(E.h),"aria-orientation":"horizontal","aria-disabled":N||void 0,"data-color-hue":"",onKeyDown:e=>{if(N)return;const r=A(E.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),G({...E,h:r}))},...ee,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:l},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:E.h/360*100+"%",background:o({h:E.h,s:1,v:1}),...M}})}),j&&/* @__PURE__ */v("div",{role:"slider",tabIndex:N?-1:0,"aria-label":R.opacity(i),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":H,"aria-valuetext":`${H}%`,"aria-orientation":"horizontal","aria-disabled":N||void 0,"data-color-opacity":"",onKeyDown:e=>{if(N)return;const r=P(H,e.key,e.shiftKey);null!==r&&(e.preventDefault(),U(r))},onPointerDown:e=>{N||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),U(L(e)))},onPointerMove:e=>{!N&&1&e.buttons&&U(L(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${te||"black"}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`},children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${H}%`,...C(te||"black",H),...M}})}),
|
|
7
7
|
/* @__PURE__ */w("div",{className:"flex items-center gap-2",children:[
|
|
8
8
|
/* @__PURE__ */v("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-line-strong",style:C(te,j?H:null)}),
|
|
9
|
-
/* @__PURE__ */v(
|
|
10
|
-
return v("input",{id:s,type:"text",value:g??(e?t(e):""),"aria-label":n,placeholder:o,maxLength:i,spellCheck:!1,autoComplete:"off",disabled:l,onChange:n=>{b(n.target.value);const o=a(n.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),b(null))},onBlur:()=>b(null),"data-hex-look":d,className:m})}function
|
|
11
|
-
return v("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */v(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function
|
|
9
|
+
/* @__PURE__ */v(B,{value:re,placeholder:!e&&W?t(W):void 0,onChange:F,label:R.hex(i),disabled:N}),j&&/* @__PURE__ */v(O,{value:H,onChange:U,label:R.opacity(i),disabled:N})]})]})}var S={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},K={sm:"h-6",md:"h-8",lg:"h-10"},T=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-ink-strong placeholder:text-[color:var(--ink-placeholder)] hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function B({value:e,onChange:r,label:n,placeholder:o,disabled:l,id:s,size:c="md",look:d="box",className:h=""}){const[g,b]=p(null),m="text"===d?`${T} ${K[c]} ${h}`.trim():u({size:c,className:`${S[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
|
|
10
|
+
return v("input",{id:s,type:"text",value:g??(e?t(e):""),"aria-label":n,placeholder:o,maxLength:i,spellCheck:!1,autoComplete:"off",disabled:l,onChange:n=>{b(n.target.value);const o=a(n.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),b(null))},onBlur:()=>b(null),"data-hex-look":d,className:m})}function O({value:e,onChange:a,label:n,disabled:o,size:t="md"}){/* @__PURE__ */
|
|
11
|
+
return v("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */v(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function R({value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,id:d,showHexInput:g=!1,opacity:p,onOpacityChange:b,size:m="md",align:x="start",open:y,onOpenChange:$,className:z=""}){const D=h().color,I=k(p),A=f(),M=a(s??""),P=r||M||"",S=r?t(r):M?t(M):D.none;
|
|
12
12
|
/* @__PURE__ */
|
|
13
13
|
return w("div",{className:`inline-flex items-center ${b?"flex-wrap justify-end gap-1":g?"gap-1":"gap-2"} ${z}`.trim(),children:[
|
|
14
14
|
/* @__PURE__ */v(e,{id:d,trigger:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"absolute inset-0",style:C(P,b?I:null)}),triggerLabel:D.swatch(o,S),triggerClassName:N({size:m}),"aria-label":D.panel(o),align:x,open:y,onOpenChange:$,disabled:u,children:/* @__PURE__ */v(j,{id:A,value:r,onChange:n,label:o,presets:l,clearable:i,fallback:s,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),g&&
|
|
15
|
-
/* @__PURE__ */v(
|
|
15
|
+
/* @__PURE__ */v(B,{value:r,placeholder:!r&&M?t(M):void 0,onChange:e=>{u||e===r||n(e)},label:D.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */v(O,{value:I,onChange:e=>{u||e===I||b(e)},label:D.opacity(o),disabled:u,size:m})]})}export{R as ColorPicker,j as ColorPickerPanel,$ as ColorSwatch,B as HexInput,y as NO_COLOR_FILL,k as clampOpacity,C as colorFill,N as colorSwatchClasses,A as stepHue,P as stepOpacity,I as stepSquare};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{formatMoney as e}from"./chunk-OJI4ROSD.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-
|
|
1
|
+
import{formatMoney as e}from"./chunk-OJI4ROSD.js";import{EMPTY_VALUE as r}from"./chunk-36BRD5J3.js";import{TimeSeriesChart as t}from"./chunk-W6NGPSMM.js";import{ChartFrame as a}from"./chunk-6AUQWWUA.js";import{ColumnChart as l}from"./chunk-YDFDTRZF.js";import{TH_ONE_LINE as s}from"./chunk-G67CJAQ2.js";import{jsxs as o,jsx as i}from"react/jsx-runtime";function n({spec:n,height:c=200,width:m,animate:d=!0,className:h}){const u=function(r){if(r.currency)return t=>e(t,r.currency);const t=r.unit?` ${r.unit}`:"";return e=>`${e.toLocaleString("en-US",{maximumFractionDigits:2})}${t}`}(n),p=n.currency?r=>e(r,n.currency,{whole:!0}):u,b=n.series.map((e,r)=>({key:`s${r}`,label:e.name,data:e.values})),y=n.title??n.series.map(e=>e.name).join(", "),f=/* @__PURE__ */o("table",{className:"w-full border-collapse text-sm",children:[
|
|
2
2
|
/* @__PURE__ */i("thead",{children:/* @__PURE__ */o("tr",{children:[
|
|
3
3
|
/* @__PURE__ */i("td",{className:"border-b border-gray-200"}),n.series.map((e,r)=>/* @__PURE__ */i("th",{scope:"col",className:`${s} border-b border-gray-200 px-2 py-1 text-right font-semibold text-gray-700`,children:e.name},r))]})}),
|
|
4
4
|
/* @__PURE__ */i("tbody",{children:n.x.map((e,t)=>/* @__PURE__ */o("tr",{children:[
|
|
5
5
|
/* @__PURE__ */i("th",{scope:"row",className:`${s} border-t border-gray-100 px-2 py-1 text-left font-normal text-gray-700`,children:e}),n.series.map((e,a)=>{const l=e.values[t];/* @__PURE__ */
|
|
6
6
|
return i("td",{className:"border-t border-gray-100 px-2 py-1 text-right tabular-nums text-gray-700",children:null===l?r:u(l)},a)})]},t))})]});/* @__PURE__ */
|
|
7
|
-
return i(
|
|
7
|
+
return i(a,{title:y,legend:b.map(e=>({key:e.key,label:e.label,swatch:"line"===n.type?"bar":"square"})),table:f,className:h,children:"line"===n.type?/* @__PURE__ */i(t,{series:b,labels:n.x,height:c,width:m,animate:d,dots:"all",formatValue:p,formatTooltipValue:u}):/* @__PURE__ */i(l,{series:b,labels:n.x,stacked:n.stacked,height:c,width:m,animate:d,formatValue:p,formatTooltipValue:u})})}export{n as SpecChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{SidebarLayout as e}from"./chunk-
|
|
1
|
+
import{SidebarLayout as e}from"./chunk-NJD7HVTP.js";import{Avatar as t}from"./chunk-W2TPXKCV.js";import{Input_default as a}from"./chunk-PT4GMPUB.js";import{Button_default as i}from"./chunk-EVYD6UFQ.js";import{useState as s}from"react";import{jsx as n,jsxs as l}from"react/jsx-runtime";var r=[{id:1,name:"Priya Patel",last:"Sounds good — shipping it now",time:"9:41",status:"online"},{id:2,name:"Design team",last:"Marco: updated the tokens",time:"9:12",status:"away"},{id:3,name:"Tom Becker",last:"Thanks!",time:"Yest",status:"offline"},{id:4,name:"Sara Lind",last:"See you Friday 🎉",time:"Yest",status:"busy"}],m=[{mine:!1,text:"Hey! Did the latest build go out?"},{mine:!0,text:"Just merged — deploying now."},{mine:!1,text:"Nice. Any breaking changes for the portal?"},{mine:!0,text:"Nope, fully additive. New components only."},{mine:!1,text:"Sounds good — shipping it now"}];function d(){const[d,o]=s(1),c=r.find(e=>e.id===d)??r[0];/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full",children:/* @__PURE__ */n(e,{side:"left",defaultWidth:260,sidebar:/* @__PURE__ */n("div",{className:"h-full overflow-auto",children:r.map(e=>/* @__PURE__ */l("button",{onClick:()=>o(e.id),className:"flex w-full items-center gap-3 border-b border-gray-100 px-3 py-3 text-left hover:bg-gray-50 "+(e.id===d?"bg-blue-50/50":""),children:[
|
|
3
3
|
/* @__PURE__ */n(t,{name:e.name,status:e.status}),
|
|
4
4
|
/* @__PURE__ */l("div",{className:"min-w-0 flex-1",children:[
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{FormField as e}from"./chunk-6KBDNYRW.js";import{ImageFocusPoint as i}from"./chunk-5POQCJL6.js";import{Segmented as a}from"./chunk-HNIIDDLJ.js";import{isVideoUrl as t,mediaPromptLine as r,mediaFileName as o,FilenameBadge as n,BusyOverlay as s,UploadGlyph as l,zoneFocusClass as c,dropzoneClass as d}from"./chunk-AHMYBYXJ.js";import{TransferProgress as u}from"./chunk-L3BECLHD.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-VFSAJMNX.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{useShellStrings as b}from"./chunk-IUVGHHR3.js";import{useState as f,useRef as g,useEffect as v,useId as y}from"react";import{jsxs as k,jsx as x,Fragment as j}from"react/jsx-runtime";var N=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:C,label:$,hint:F,error:U,required:z,className:H,accept:P="image/*",maxSizeBytes:O,fit:I="cover",height:B,shape:D="rect",placeholder:S,cta:q,acceptHint:J,showFilename:V=!0,allowReplace:A=!0,allowRemove:Y=!0,replaceLabel:K,removeLabel:M,busy:W=!1,busyLabel:X,choosingLabel:_,pickFailedLabel:E,progress:G,disabled:Q=!1,kind:T,onKindChange:Z,focus:ee,onFocusChange:ie,focusLabel:ae}){const te=b().media,re="circle"===D,oe=B??(re?96:112),ne=q??te.cta,se=T??(/video/.test(P)&&!/image/.test(P)?"video":"image"),le="string"==typeof M&&M?M:te.remove,[ce,de]=f(!1),[ue,me]=f(!1),he=g(!0);v(()=>()=>{he.current=!1},[]);const pe=W||ce,be=ce&&!W?_??te.choosing:X??te.uploading,fe=U??(ue?E??te.pickFailed:void 0),ge=e=>{if(!R)return;me(!1);const i=R(e);i&&"function"==typeof i.then&&(de(!0),i.then(e=>{he.current&&(de(!1),"string"==typeof e&&e&&L(e))},()=>{he.current&&(de(!1),me(!0))}))},ve=y(),ye=g(null),[ke,xe]=f(null);v(()=>()=>{ye.current&&URL.revokeObjectURL(ye.current)},[]);const je=Q||pe,Ne=!!w&&(t(w,P)||w===ke),we=S??r(P,te),Le=K??(Ne||"video"===se?te.changeVideo:te.changeImage),Re=e=>{R?ge(e):C?C(e):(e=>{ye.current&&URL.revokeObjectURL(ye.current);const i=URL.createObjectURL(e);ye.current=i,xe(e.type.startsWith("video/")?i:null),L(i)})(e)},Ce=m({accept:P,maxSizeBytes:O,acceptHint:J,multiple:!1,disabled:je,onAccept:([e])=>Re(e)}),{dragOver:$e}=Ce,Fe=()=>{je||(R?ge():Ce.open())},Ue=w?o(w):"",ze=!re&&!Ne&&!!ie,He=Q||!A&&!Y?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:[re?"absolute inset-0 flex items-center justify-center gap-1 p-1 text-(--status-on-solid)":"absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[A&&/* @__PURE__ */k("button",{id:ze?void 0:ve,type:"button","aria-labelledby":`${ve}-change`,onClick:()=>Fe(),disabled:pe,className:re?`w-8 shrink-0 ${N}`:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${N}`,children:[
|
|
2
|
+
/* @__PURE__ */x(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
3
|
+
/* @__PURE__ */x("span",{id:`${ve}-change`,className:re?"sr-only":"truncate",children:Le})]}),Y&&/* @__PURE__ */x("button",{type:"button","aria-label":le,onClick:()=>{ye.current&&(URL.revokeObjectURL(ye.current),ye.current=null),xe(null),L("")},disabled:pe,className:`${re?"":"ml-auto "}w-8 shrink-0 ${N}`,children:/* @__PURE__ */x(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Pe=/* @__PURE__ */k("div",{...Ce.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden border transition-colors",re?"shrink-0 rounded-full":"rounded-(--radius-control)",ze?"":"bg-gray-100",$e?"border-blue-500":"border-line"].join(" "),style:ze?void 0:re?{height:oe,width:oe}:{height:oe},children:[ze?
|
|
4
|
+
/* @__PURE__ */x(i,{value:ee??"",onChange:e=>ie?.(e),label:ae??te.focus,image:w,hint:null,id:ve,disabled:je,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):Ne?/* @__PURE__ */x("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ue||void 0,className:"h-full w-full",style:{objectFit:I}}):/* @__PURE__ */x("img",{src:w??void 0,alt:Ue,className:"h-full w-full",style:{objectFit:I,objectPosition:ee||void 0}}),V&&!re&&w&&/* @__PURE__ */x(n,{children:Ue}),He,pe&&/* @__PURE__ */x(s,{label:be,progress:G,rounded:re?"rounded-full":"rounded-md"})]}),Oe=/* @__PURE__ */k(j,{children:[
|
|
5
|
+
/* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:we}),
|
|
6
|
+
/* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:ne}),J&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:J})]}),Ie=/* @__PURE__ */k("button",{type:"button",id:ve,onClick:()=>Fe(),disabled:je,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:F?`${ve}-hint`:void 0,...Ce.zoneProps,"data-media-circle":"",className:["group/zone flex w-full items-center gap-4 rounded-lg text-left",je?"cursor-not-allowed opacity-60":"cursor-pointer",c(je)].join(" "),children:[
|
|
7
|
+
/* @__PURE__ */x("span",{className:["flex shrink-0 items-center justify-center rounded-full border-2 border-dashed text-ink-faintest transition-colors",$e?"border-accent-fill bg-accent-tint":"border-line-strong bg-surface-sunken group-hover/zone:bg-accent-tint"].join(" "),style:{height:oe,width:oe},children:/* @__PURE__ */x(l,{})}),
|
|
8
|
+
/* @__PURE__ */x("span",{className:"flex min-w-0 flex-col items-start gap-1 [&>span]:px-0",children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:G}):Oe})]}),Be=re?Ie:/* @__PURE__ */x("button",{type:"button",id:ve,onClick:()=>Fe(),disabled:je,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:F?`${ve}-hint`:void 0,...Ce.zoneProps,className:d($e,je,c(je)),style:{minHeight:oe},children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:G}):/* @__PURE__ */k(j,{children:[
|
|
9
|
+
/* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(l,{})}),Oe]})});/* @__PURE__ */
|
|
10
|
+
return k(e,{label:$,htmlFor:ve,hint:F,error:fe,required:z,className:H,children:[Z&&/* @__PURE__ */x("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */x(a,{value:se,onChange:e=>Z(e),options:[{value:"image",label:te.image,icon:/* @__PURE__ */x(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:je},{value:"video",label:te.video,icon:/* @__PURE__ */x(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:je}],block:!0,size:"md",label:"string"==typeof $&&$?$:te.upload})}),w?Pe:Be,!R&&/* @__PURE__ */x("input",{...Ce.inputProps}),
|
|
11
|
+
/* @__PURE__ */x(h,{rejections:Ce.rejections})]})}export{w as MediaUploadField};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{STATUS_VARS as e,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as a,useShellLocale as t}from"./chunk-
|
|
1
|
+
import{STATUS_VARS as e,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as a,useShellLocale as t}from"./chunk-IUVGHHR3.js";import{formatPercent as i}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var s=e=>Math.max(0,Math.min(1,e));function o({value:o,segments:m,objective:u,label:d,detail:c,formatValue:h,tone:f,className:x,unavailableLabel:b}){const v=a().charts,g=t(),p=h??(e=>i(100*e,1,g)),N=b??v.notEnough;if(null==o||!Number.isFinite(o))/* @__PURE__ */
|
|
2
2
|
return n("div",{className:x,children:[d&&/* @__PURE__ */r("p",{className:"text-sm font-medium text-gray-700",children:d}),
|
|
3
3
|
/* @__PURE__ */r("p",{className:"mt-1 text-sm text-gray-500",children:N})]});const j=s(o),y=null==u||o>=u,k=f??(y?"good":"critical"),w=e[k],$=[m?.length?m.map(e=>`${e.label} ${p(e.value)}`).join(" · "):"",c??"",null!=u?(y?v.objectiveMet:v.objectiveMissed)(p(u)):""].filter(Boolean).join(" · ");/* @__PURE__ */
|
|
4
4
|
return n("div",{className:x,children:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tabs as e}from"./chunk-I5EVMLPB.js";import{Card as a}from"./chunk-
|
|
1
|
+
import{Tabs as e}from"./chunk-I5EVMLPB.js";import{Card as a}from"./chunk-4S3E3VJH.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"}),
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import{CountBadge as e}from"./chunk-
|
|
1
|
+
import{CountBadge as e}from"./chunk-5HFKVEWW.js";import{isShown as i}from"./chunk-HCP7WOAL.js";import{SettingRowNameContext as n,SettingAutoContext as a}from"./chunk-2NMW66P5.js";import{useShellStrings as t}from"./chunk-IUVGHHR3.js";import{isValidElement as l}from"react";import{jsx as s,jsxs as r,Fragment as d}from"react/jsx-runtime";var c={pad:"p-4",gap:"gap-4",text:"text-sm",bodyTop:"mt-4",bodyPad:"pt-3"},m=e=>Array.isArray(e)?e.some(m):l(e);function o({label:l,icon:o,action:h,value:u,readout:f,changed:p=!1,description:x,children:N,controlId:v,labelId:g,unknownText:b="—",quiet:y=!1,size:k="default",viewState:w,divider:$=!0,showWhen:j,values:P,context:W,className:H=""}){const V=t();if(!i(j,P,W))return null;const A="auto"===w?/* @__PURE__ */s("span",{"data-setting-auto":"","aria-hidden":"true",className:"shrink-0 rounded-sm border border-line px-1 text-2xs font-normal leading-4 text-ink-faint",children:V.settingView.auto}):"edited"===w?/* @__PURE__ */r("span",{"data-setting-edited":"",className:"inline-flex shrink-0 items-center",children:[
|
|
2
2
|
/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex",children:/* @__PURE__ */s(e,{dot:!0,tone:"accent"})}),
|
|
3
|
-
/* @__PURE__ */s("span",{className:"sr-only",children:
|
|
4
|
-
/* @__PURE__ */s("span",{className:"es-field-label",id:t,children:l}),
|
|
3
|
+
/* @__PURE__ */s("span",{className:"sr-only",children:V.settingView.edited})]}):null,F=null!=f&&!1!==f;if("compact"===k){const e=m(u),i=m(h);if(!e&&!i)return null;const t=g,c=["es-field"];e||c.push("is-inline"),p&&c.push("is-changed"),H&&c.push(H);const b=/* @__PURE__ */r(d,{children:[null!=o&&/* @__PURE__ */s("span",{className:"es-field-icon","aria-hidden":"true",children:o}),
|
|
4
|
+
/* @__PURE__ */s("span",{className:"es-field-label",id:t,children:l}),A]}),y=e=>/* @__PURE__ */s(n.Provider,{value:t,children:/* @__PURE__ */s(a.Provider,{value:"auto"===w,children:e})});/* @__PURE__ */
|
|
5
5
|
return r("div",{className:c.join(" "),children:[
|
|
6
|
-
/* @__PURE__ */r("div",{className:"es-field-head",children:[v?/* @__PURE__ */s("label",{className:"es-field-name",htmlFor:v,children:b}):/* @__PURE__ */s("span",{className:"es-field-name",children:b}),
|
|
7
|
-
return r("div",
|
|
6
|
+
/* @__PURE__ */r("div",{className:"es-field-head",children:[v?/* @__PURE__ */s("label",{className:"es-field-name",htmlFor:v,children:b}):/* @__PURE__ */s("span",{className:"es-field-name",children:b}),F&&/* @__PURE__ */s("span",{className:"es-field-value",children:f}),i&&y(h)]}),e&&/* @__PURE__ */s("div",{className:"es-field-ctl",children:y(u)}),x?/* @__PURE__ */s("p",{className:"es-field-hint",children:x}):null,N]})}const I=c,T=void 0!==u||void 0===N&&null==h,q=null==u||""===u,z=y?"text-gray-500":"text-gray-800",B=q?"text-gray-400":y?"text-gray-500":"text-gray-900",C=`${I.text} font-medium ${z}`,E=v?/* @__PURE__ */s("label",{htmlFor:v,id:g,className:C,children:l}):/* @__PURE__ */s("span",{id:g,className:C,children:l}),G=/* @__PURE__ */s(n.Provider,{value:g,children:/* @__PURE__ */s(a.Provider,{value:"auto"===w,children:q?b:u})}),K=[$?"border-t border-line-subtle first:border-t-0":"",I.pad,H].filter(Boolean).join(" "),L=null!=N&&!1!==N&&/* @__PURE__ */s("div",{className:`${I.bodyTop} border-t border-line-subtle ${I.bodyPad}`,children:N});/* @__PURE__ */
|
|
7
|
+
return r("div",F?{className:K,children:[
|
|
8
8
|
/* @__PURE__ */r("div",{"data-setting-line":"",className:"flex flex-wrap items-center justify-between gap-x-2 gap-y-2",children:[
|
|
9
|
-
/* @__PURE__ */s("div",{className:"flex-1 basis-0",children:/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${
|
|
9
|
+
/* @__PURE__ */s("div",{className:"flex-1 basis-0",children:/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${z}`,children:[null!=o&&/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),E,A]})}),
|
|
10
10
|
/* @__PURE__ */r("div",{"data-setting-end":"",className:"ml-auto flex shrink-0 items-center gap-1",children:[
|
|
11
|
-
/* @__PURE__ */s("span",{"data-setting-readout":"",className:`whitespace-nowrap ${
|
|
12
|
-
/* @__PURE__ */r("div",{className:`flex items-center justify-between ${
|
|
11
|
+
/* @__PURE__ */s("span",{"data-setting-readout":"",className:`whitespace-nowrap ${I.text} ${y?"text-ink-faint":"text-ink-strongest"}`,children:f}),null!=h&&/* @__PURE__ */s("span",{"data-setting-reset":"",className:"inline-flex h-6 w-6 shrink-0 items-center justify-center",children:h})]})]}),x&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-ink-faint",children:x}),void 0!==u&&/* @__PURE__ */s("div",{"data-setting-value":"",className:`mt-2 flex justify-end ${I.text} ${B}`,children:G}),L]}:{className:K,children:[
|
|
12
|
+
/* @__PURE__ */r("div",{className:`flex items-center justify-between ${I.gap}`,children:[
|
|
13
13
|
/* @__PURE__ */r("div",{className:"min-w-0 flex-1",children:[null!=o?
|
|
14
|
-
/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${
|
|
15
|
-
/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),
|
|
14
|
+
/* @__PURE__ */r("div",{className:`flex min-w-0 items-center gap-2 ${z}`,children:[
|
|
15
|
+
/* @__PURE__ */s("span",{"aria-hidden":"true",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center",children:o}),E,A]}):A?/* @__PURE__ */r("div",{className:"flex min-w-0 items-center gap-2",children:[E,A]}):E,x&&/* @__PURE__ */s("p",{className:"mt-0.5 text-xs text-ink-faint",children:x})]}),null!=h?/* @__PURE__ */r("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[T&&/* @__PURE__ */s("div",{className:`${I.text} ${B}`,children:G}),h]}):T&&/* @__PURE__ */s("div",{className:`shrink-0 ${I.text} ${B}`,children:G})]}),L]})}export{o as SettingRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toast_default as t}from"./chunk-
|
|
1
|
+
import{toast_default as t}from"./chunk-VQ35LXDC.js";import{currentShellStrings as e}from"./chunk-IUVGHHR3.js";function n(t){let e=null;try{e=window.getSelection()}catch{return null}if(!e||0===e.rangeCount||e.isCollapsed)return null;const n=t;if(n&&"number"==typeof n.nodeType){let t=!1;for(let r=0;r<e.rangeCount&&!t;r++)t=e.getRangeAt(r).intersectsNode(n);if(!t)return null}const r=e.toString();if(!r.trim())return null;const o=document.createElement("div");for(let t=0;t<e.rangeCount;t++)o.appendChild(e.getRangeAt(t).cloneContents());return{text:r,html:o.innerHTML}}async function r(t,e){try{if(e&&"undefined"!=typeof ClipboardItem&&navigator.clipboard?.write)return await navigator.clipboard.write([new ClipboardItem({"text/plain":new Blob([t],{type:"text/plain"}),"text/html":new Blob([e],{type:"text/html"})})]),!0;if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(t),!0}catch{}const n=n=>{n.clipboardData?.setData("text/plain",t),e&&n.clipboardData?.setData("text/html",e),n.preventDefault()},r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.select(),document.addEventListener("copy",n);try{return document.execCommand("copy")}catch{return!1}finally{document.removeEventListener("copy",n),r.remove()}}async function o(n,o,a){const i=await r(o,a),l=e().copy;return i?t.success(l.copiedLabel(n)):t.error(l.failed),i}export{o as copyToClipboard,n as selectionAt,r as writeClipboard};
|
|
@@ -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-5HFKVEWW.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,6 +1,6 @@
|
|
|
1
|
-
import{InputNumber_default as e}from"./chunk-
|
|
2
|
-
return f(F.Provider,{value:i,children:e})}function k({value:o,onChange:a,min:y,max:z,step:k=1,shiftStep:N,precision:
|
|
3
|
-
/* @__PURE__ */f("input",{id:oe,type:"range",min:y,max:z,step:k,value:de,disabled:
|
|
4
|
-
/* @__PURE__ */f(n,{content:xe?.cut?me:null,className:"relative flex min-w-0 max-w-[calc(100%-var(--rosh-slider-floor)-var(--rosh-slider-gap))] shrink-0",describe:!1,children:/* @__PURE__ */m("div",{ref:pe,"data-slider-box":"",onKeyUp:$&&(e=>{const t=e.target;"Enter"===e.key&&"INPUT"===t.tagName&&"range"!==t.getAttribute("type")&&
|
|
1
|
+
import{InputNumber_default as e}from"./chunk-F5B5WOQ7.js";import{useSettingAuto as t}from"./chunk-2NMW66P5.js";import{Tooltip as n}from"./chunk-SOZCWT6I.js";import{useBrowserLayoutEffect as r}from"./chunk-D65T4H6J.js";import{useShellStrings as i}from"./chunk-IUVGHHR3.js";import{createContext as o,useState as l,useMemo as a,useId as u,useRef as s,useEffect as c,useContext as d}from"react";import{jsx as f,jsxs as m}from"react/jsx-runtime";var p=(e,t,n)=>Math.min(n,Math.max(t,e));function h(e){const t=String(e),n=/e-(\d+)$/.exec(t);return n?Number(n[1]):t.split(".")[1]?.length??0}var x={sm:{left:10,plain:8,unit:40,text:"text-xs"},md:{left:14,plain:12,unit:40,text:"text-sm"}},v={"--rosh-slider-gap":"var(--space-12)","--rosh-slider-floor":"4rem"},b={position:"absolute",left:0,top:0,width:"max-content",height:0,overflow:"hidden",visibility:"hidden",pointerEvents:"none",whiteSpace:"pre"},g={display:"block",width:"max-content"},y=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u;function w(e){return Math.max(1,...e.map(e=>[...e??""].reduce((e,t)=>e+(y.test(t)?2:1),0)))}function S(e,t,n,r){return Number(p(e,t,n).toFixed(r))}var F=o(null);function z({children:e}){const[t,n]=l({}),r=a(()=>(e,t)=>n(n=>{if(null===t){if(!(e in n))return n;const t={...n};return delete t[e],t}return n[e]===t?n:{...n,[e]:t}}),[]),i=a(()=>{const e=Object.values(t);return{set:r,width:e.length?`max(${e.join(", ")})`:null}},[t,r]);/* @__PURE__ */
|
|
2
|
+
return f(F.Provider,{value:i,children:e})}function k({value:o,onChange:a,min:y,max:z,step:k=1,shiftStep:N,precision:L,inputMin:R,inputMax:j,suffix:C,units:E,onCommit:$,showInput:B=!0,emptyLabel:W,placeholderValue:K,stepFrom:M,label:O,"aria-labelledby":H,valueText:A,id:D,disabled:V,size:q="md",boxSize:I="sm",className:P="",auto:T}){const U=i(),G=u(),J=s(o);r(()=>{J.current=o},[o]);const Q=s(o),Z=e=>{J.current=e,a(e)},X=()=>{Q.current=J.current},Y=()=>{$&&J.current!==Q.current&&(Q.current=J.current,$(J.current))},_=s(null),ee=s(Y);ee.current=Y;const te=Boolean($);c(()=>{const e=_.current;if(!te||!e)return;const t=()=>ee.current();return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[te]);const ne=t(),re=T??ne,ie=u(),oe=D??G,le=L??h(k),ae=R??y,ue=j??z,se=void 0!==W||void 0!==K,ce=M??K,de=p(o??K??y,y,z),fe=[y.toFixed(le),z.toFixed(le),o?.toFixed(le),W,K?.toFixed(le)],me=null!=o?o.toFixed(le):W||(null!=K?K.toFixed(le):void 0),pe=s(null),he=s(null),[xe,ve]=l(null),be=s(null),ge=Boolean(C);r(()=>{if(!B)return;const e=()=>{const e=pe.current?.querySelector("input"),t=he.current;if(!e||!t)return;const n=getComputedStyle(e),r=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"].reduce((e,t)=>e+(parseFloat(n[t])||0),0);if(r<=0)return;Object.assign(t.style,{fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,fontVariantNumeric:n.fontVariantNumeric,letterSpacing:n.letterSpacing});const i=Math.ceil(t.getBoundingClientRect().width);if(i<=0)return;const o=t.querySelector("[data-shown]"),l=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),a=!!o&&o.getBoundingClientRect().width>l+.5,u=be.current;if(be.current={box:u?.box??{frame:r,fontSize:n.fontSize,text:i,cut:a},room:l},u&&u.box.frame===r&&u.box.fontSize===n.fontSize&&u.box.text===i&&u.box.cut===a)return;const s={frame:r,fontSize:n.fontSize,text:i,cut:a};be.current={box:s,room:l},ve(s)};e(),window.addEventListener("resize",e);const t="undefined"!=typeof document?document.fonts:void 0;t?.addEventListener?.("loadingdone",e);let n=null;if("undefined"!=typeof ResizeObserver){n=new ResizeObserver(()=>e());const t=pe.current?.querySelector("input");t&&n.observe(t),he.current&&n.observe(he.current)}return()=>{window.removeEventListener("resize",e),t?.removeEventListener?.("loadingdone",e),n?.disconnect()}},[ge,B,I]),r(()=>{const e=be.current;if(!e)return;const t=e.box.text<=e.room+.5?null:he.current?.querySelector("[data-shown]"),n=!!t&&t.getBoundingClientRect().width>e.room+.5;if(n===e.box.cut)return;const r={...e.box,cut:n};be.current={box:r,room:e.room},ve(r)},[me]);const ye=e=>A?A(e):"string"==typeof C?`${e.toFixed(le)} ${C}`:void 0,we=null==o?W??(null!=K?ye(K)??String(K):void 0):ye(o),Se=x[I],Fe=fe.filter(e=>Boolean(e)),ze=void 0===me?-1:Fe.indexOf(me),ke=xe?`${xe.text+xe.frame+2}px`:`calc(${w(fe)}ch + ${Se.left+(ge?Se.unit:Se.plain)+2}px)`,Ne=d(F),Le=u(),Re=Ne?.set;return r(()=>{Re&&Re(Le,B?ke:null)},[Re,Le,ke,B]),c(()=>()=>Re?.(Le,null),[Re,Le]),/* @__PURE__ */m("div",{"data-slider":"",className:`flex w-full min-w-0 items-center gap-(--rosh-slider-gap) ${P}`.trim(),style:v,children:[
|
|
3
|
+
/* @__PURE__ */f("input",{id:oe,type:"range",min:y,max:z,step:k,value:de,disabled:V,"aria-label":H?void 0:O,"aria-labelledby":H,"aria-valuetext":we,"aria-describedby":re?ie:void 0,onKeyDown:e=>{const t="ArrowUp"===e.key||"ArrowRight"===e.key?1:"ArrowDown"===e.key||"ArrowLeft"===e.key?-1:0;if(!t||e.altKey||e.ctrlKey||e.metaKey)return;const n=e.shiftKey&&null!=N;if(!n&&!(null==o&&null!=ce))return;e.preventDefault();Z(S((o??ce??de)+t*(n?N??k:k),y,z,le)),Y()},ref:_,onFocus:$&&X,onPointerDown:$&&X,onChange:e=>Z(S(Number(e.target.value),y,z,le)),className:"min-w-(--rosh-slider-floor) flex-1 cursor-pointer accent-blue-600 disabled:cursor-not-allowed disabled:opacity-60 "+("sm"===q?"h-1":"h-1.5")}),B&&
|
|
4
|
+
/* @__PURE__ */f(n,{content:xe?.cut?me:null,className:"relative flex min-w-0 max-w-[calc(100%-var(--rosh-slider-floor)-var(--rosh-slider-gap))] shrink-0",describe:!1,children:/* @__PURE__ */m("div",{ref:pe,"data-slider-box":"",onKeyUp:$&&(e=>{const t=e.target;"Enter"===e.key&&"INPUT"===t.tagName&&"range"!==t.getAttribute("type")&&Y()}),onFocus:$&&X,className:`relative min-w-0 max-w-full shrink-0 ${Se.text}`,style:{position:"relative",width:Ne?.width??ke,...xe?{fontSize:xe.fontSize}:{}},children:[
|
|
5
5
|
/* @__PURE__ */f("span",{ref:he,"data-slider-sizer":"","aria-hidden":"true",style:b,children:Fe.map((e,t)=>/* @__PURE__ */f("span",{"data-shown":t===ze?"":void 0,style:g,children:e},t))}),
|
|
6
|
-
/* @__PURE__ */f(e,{value:o,onChange:e=>{null!=e?e<ae||e>ue||
|
|
6
|
+
/* @__PURE__ */f(e,{value:o,onChange:e=>{null!=e?e<ae||e>ue||Z(e):se&&Z(null)},min:ae,max:ue,step:k,shiftStep:N,stepFrom:ce,precision:le,snap:!0,allowEmpty:se,suffix:C,units:E,onBlur:$&&Y,disabled:V,placeholder:W??(null!=K?K.toFixed(le):void 0),size:I,auto:re,"aria-label":O?U.slider.value(O):void 0,"aria-labelledby":O?void 0:H})]})}),re&&/* @__PURE__ */f("span",{id:ie,hidden:!0,children:U.settingView.auto})]})}export{k as Slider,z as SliderGroup,S as settleSliderValue,w as sliderBoxChars,h as stepDecimals};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Button_default as e}from"./chunk-EVYD6UFQ.js";import{Icon as r}from"./chunk-ISVODSRP.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{Button_default as e}from"./chunk-EVYD6UFQ.js";import{Icon as r}from"./chunk-ISVODSRP.js";import{useShellStrings as t}from"./chunk-IUVGHHR3.js";import{jsxs as a,jsx as d}from"react/jsx-runtime";function n({title:n,message:o,onRetry:s,variant:i="dashed"}){const m=t().list;/* @__PURE__ */
|
|
2
2
|
return a("div",{className:`flex flex-col items-center justify-center text-center ${"card"===i?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===i?"px-6 py-12":"rounded-lg border-2 border-dashed border-red-200 px-6 py-12"}`,role:"alert",children:[
|
|
3
3
|
/* @__PURE__ */d(r,{name:"warning",className:"h-10 w-10 text-red-300 mb-3",strokeWidth:1,"aria-hidden":"true"}),
|
|
4
4
|
/* @__PURE__ */d("h3",{className:"text-sm font-medium text-gray-900",children:n??m.loadError}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-
|
|
1
|
+
import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-IUVGHHR3.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}function u({onAccept:e,accept:a,maxSizeBytes:u,maxFiles:f,multiple:p=!0,currentCount:m=0,acceptHint:d,disabled:h=!1}){const g=t().files,y=r(null),[x,v]=n(!1),[D,L]=n([]),b=r(0),A="string"==typeof d?d:"",j=s(t=>{if(h||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of p?r:r.slice(0,1))o(e,a)?null!=u&&e.size>u?s.push({file:e,reason:"size",message:g.tooLarge(e.name,l(e.size,g),l(u,g))}):p&&null!=f&&m+n.length>=f?s.push({file:e,reason:"count",message:g.tooMany(e.name,f)}):n.push(e):s.push({file:e,reason:"type",message:g.notAccepted(e.name,A)});L(s),n.length&&e(n),y.current&&(y.current.value="")},[h,p,a,A,u,f,m,e,g]),k=s(()=>{h||y.current?.click()},[h]),z=s(()=>L([]),[]);return{inputRef:y,inputProps:{ref:y,type:"file",accept:a||void 0,multiple:p,disabled:h,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>j(e.target.files)},zoneProps:h?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),b.current+=1,v(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),x||v(!0))},onDragLeave:e=>{i(e)&&(b.current=Math.max(0,b.current-1),0===b.current&&v(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),b.current=0,v(!1),j(e.dataTransfer.files))}},pasteProps:h?{}:{onPaste:e=>{const t=c(e);0!==t.length&&(e.preventDefault(),j(t))}},open:k,take:j,dragOver:x,rejections:D,clearRejections:z}}function f({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{f as FileIntakeAlert,o as acceptsFile,l as humanSize,i as isFileDrag,c as pastedFiles,u as useFileIntake};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{SPINNER_RING as e}from"./chunk-MRJKZWWV.js";import{currentShellStrings as n}from"./chunk-
|
|
1
|
+
import{buttonClasses as t}from"./chunk-UQYNPYF4.js";import{SPINNER_RING as e}from"./chunk-MRJKZWWV.js";import{currentShellStrings as n}from"./chunk-IUVGHHR3.js";var o="http://www.w3.org/2000/svg",s={},r=/* @__PURE__ */new Map;function i(t,e){let n=document.getElementById(t);return n||(n=document.createElement("div"),n.id=t,n.className=e,document.body.appendChild(n)),n}var a={success:"M5 13l4 4L19 7",error:"M6 18L18 6M6 6l12 12",warning:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",bell:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"};function c(t,e){const n=document.createElementNS(o,"svg");n.setAttribute("class",e),n.setAttribute("fill","none"),n.setAttribute("viewBox","0 0 24 24"),n.setAttribute("stroke","currentColor"),n.setAttribute("stroke-width","2");const s=document.createElementNS(o,"path");return s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),s.setAttribute("d",a[t]),n.appendChild(s),n}function l(t,e){const n=document.createElement("div");return n.className=t,void 0!==e&&(n.textContent=e),n}function d(n,o,a){const d={...s,...a},u=d.placement??"top",m=d.sticky??!1,p=`${u}|${n}|${o}`;if(d.dedupe){const t=r.get(p);if(t)return t.restart(),{dismiss:t.dismiss}}"loading"!==n&&!1!==d.sound&&import("./sounds-E5OTSJLX.js").then(t=>{"success"===n?t.playSuccess():"error"===n?t.playError():t.playNotification()}).catch(()=>{});const f="bottom"===u?i("toast-container-bottom","fixed bottom-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col-reverse gap-2 items-center pointer-events-none"):i("toast-container","fixed top-4 left-1/2 -translate-x-1/2 z-(--z-toast) flex flex-col gap-2 items-center pointer-events-none"),h="bottom"===u?"translateY(10px)":"translateY(-10px)",y=l("pointer-events-auto cursor-pointer rosh-toast");if(y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,y.setAttribute("role","error"===n?"alert":"status"),y.setAttribute("aria-atomic","true"),"loading"===n){const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.className=`${e} h-4 w-4 rosh-tone-loading`,y.appendChild(t)}else y.appendChild(c(n,`h-4 w-4 rosh-tone-${n}`));const v=document.createElement("span");if(v.textContent=o,y.appendChild(v),d.action){const{label:e,onClick:n}=d.action,o=document.createElement("button");o.type="button",o.className=t({variant:"link",size:"sm"}),o.textContent=e,o.addEventListener("click",t=>{t.stopPropagation(),g||(n(),x("action"))}),y.appendChild(o)}let b;f.appendChild(y),requestAnimationFrame(()=>{y.style.opacity="1",y.style.transform="translateY(0) scale(1)"});let g=!1;const x=t=>{g||(g=!0,b&&clearTimeout(b),r.delete(p),y.style.opacity="0",y.style.transform=`${h} scale(0.95)`,setTimeout(()=>y.remove(),300),d.onClose?.(t))},w=()=>x("dismissed"),E=d.duration??("info"===n?4500:3e3),C=()=>{b&&clearTimeout(b),m||(b=setTimeout(()=>x("timeout"),E))};return C(),y.addEventListener("mouseenter",()=>{b&&clearTimeout(b)}),y.addEventListener("mouseleave",()=>{g||C()}),y.addEventListener("click",w),r.set(p,{el:y,restart:C,dismiss:w}),{dismiss:w}}var u=8e3,m=/* @__PURE__ */new Map,p=!1;var f={success:(t,e)=>d("success",t,e),error:(t,e)=>d("error",t,e),warning:(t,e)=>d("warning",t,e),info:(t,e)=>d("info",t,e),notify:(t,e)=>function(t,e){!1!==(e?.sound??s.sound)&&import("./sounds-E5OTSJLX.js").then(t=>t.playNotification()).catch(()=>{});const o=i("notif-container","fixed top-4 right-4 z-(--z-toast) flex flex-col gap-3 items-end pointer-events-none"),r=l("pointer-events-auto cursor-pointer rosh-notif");r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)";const a=l("rosh-notif-badge");a.appendChild(c("bell","h-5 w-5"));const d=l("rosh-notif-body");d.append(l("rosh-notif-title",n().toast.notification),l("notif-msg rosh-notif-msg",t));const u=document.createElement("button");u.className="rosh-notif-close",u.textContent="×",r.append(a,d,u);const m=()=>{r.style.opacity="0",r.style.transform="translateX(30px) scale(0.95)",setTimeout(()=>r.remove(),300)};u.addEventListener("click",t=>{t.stopPropagation(),m()}),r.addEventListener("click",m),o.appendChild(r),requestAnimationFrame(()=>{r.style.opacity="1",r.style.transform="translateX(0) scale(1)"}),setTimeout(m,e?.duration??1e4)}(t,e),promise:(t,e,n)=>{const o=d("loading",e.loading,{...n,sticky:!0});return t.then(t=>{o.dismiss(),d("success","function"==typeof e.success?e.success(t):e.success,n)},t=>{o.dismiss(),d("error","function"==typeof e.error?e.error(t):e.error,n)}),t},configure:t=>{s={...t}},undoable:function(t,e){p||"undefined"==typeof window||(p=!0,window.addEventListener("pagehide",()=>{const t=[...m.values()];m.clear();for(const e of t)e.run({keepalive:!0})}));const o=/* @__PURE__ */Symbol("undoable");let s=!1,r=null;const i=async t=>{if(!s){s=!0,m.delete(o);try{await(t?e.commit(t):e.commit())}catch(t){e.onFail?.(t)}}},a=()=>!s&&(s=!0,m.delete(o),e.undo(),!0);return m.set(o,{run:i}),r=d("success",t,{sound:!1,placement:e.placement,duration:e.duration??8e3,action:{label:e.actionLabel??n().toast.undo,onClick:()=>{a()}},onClose:t=>{"action"!==t&&i()}}),{undo:()=>{const t=a();return t&&r?.dismiss(),t},commit:async()=>{if(s)return;const t=i();r?.dismiss(),await t}}}};export{u as UNDOABLE_MS,f as toast_default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as t}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as t}from"./chunk-IUVGHHR3.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";function n({title:n,message:s,description:d,hint:i,variant:m,frameless:c,icon:o,children:l}){const h=c?"none":m??"dashed",x="boolean"!=typeof o&&null!=o?o:null,p=!x&&(o??"card"!==h),u=t().emptyState,y=s??(n?void 0:u.message),f=d??i;/* @__PURE__ */
|
|
2
2
|
return r("div",{className:`flex flex-col items-center justify-center text-center ${"card"===h?"rounded-md border border-gray-200 bg-white px-6 py-12":"none"===h?"px-6 py-12":"rounded-lg border-2 border-dashed border-gray-300 px-6 py-12"}`,children:[x&&/* @__PURE__ */a("div",{className:"mb-3 flex h-10 w-10 items-center justify-center text-gray-300","aria-hidden":"true",children:x}),p&&/* @__PURE__ */a(e,{name:"inbox",className:"h-10 w-10 text-gray-300 mb-3","aria-hidden":"true",strokeWidth:1}),n&&/* @__PURE__ */a("h3",{className:"text-sm font-medium text-gray-900",children:n}),y&&/* @__PURE__ */a("p",{className:"text-sm text-gray-500 "+(n?"mt-2":""),children:y}),f&&/* @__PURE__ */a("p",{className:"text-xs text-gray-400 mt-1",children:f}),l&&/* @__PURE__ */a("div",{className:"mt-4",children:l})]})}export{n as EmptyState};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a,CHART_INK as n,STATUS_VARS as r}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as i}from"./chunk-
|
|
2
|
-
return f("div",{className:`relative ${k??""}`,ref:
|
|
3
|
-
/* @__PURE__ */f("svg",{width:"100%",height:
|
|
4
|
-
/* @__PURE__ */d("title",{id:z,children:N.funnel(x.length,S(x[0].value),S(x[x.length-1].value))}),x.map((e,t)=>{const l=t*
|
|
1
|
+
import{useHighlight as e}from"./chunk-CNYAHYE6.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{ChartTooltip as l}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as a,CHART_INK as n,STATUS_VARS as r}from"./chunk-TZFACUMR.js";import{useShellStrings as o,useShellLocale as i}from"./chunk-IUVGHHR3.js";import{formatPercent as u,formatPlain as h}from"./chunk-C3QOHMR6.js";import{useId as c,useState as m,useRef as s}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function x({stages:x,shape:v="funnel",height:p,width:$,gap:g=4,minBandWidth:M=0,formatValue:y,color:b,className:k,emptyLabel:A}){const N=o().charts,L=i(),S=y??(e=>h(e,L)),j=A??N.noStages,z=c(),[V,F]=m(null),{highlighted:H}=e(),W=s(null),w=t(W,560),C=$??w;if(0===x.length)/* @__PURE__ */return d("p",{className:`text-sm text-gray-500 ${k??""}`,children:j});const Z=b??a(0),E=p??54*x.length,R=Math.max(...x.map(e=>e.value),1),U="bars"===v,B=U?Math.round(Math.min(132,Math.max(80,.24*C))):Math.round(Math.min(168,Math.max(104,.38*C))),I=e=>{const t=x[e-1]?.value;return null!=t&&t>0?100*(1-x[e].value/t):null},Q=e=>{const t=I(e);return{count:S(x[e].value),drop:null!=t?`−${u(t,1,L)}`:""}},Y=U?Math.ceil(Math.max(...x.map((e,t)=>{const{count:l,drop:a}=Q(t);return.62*(l.length+(a?a.length+1:0))*12}))+16):0,D=C-B-Y,G=Math.max(U?2:0,Math.min(M,D)),O=e=>Math.max(G,D*Math.max(0,e/R)),P=e=>O(e)/2,T=B+D/2,X=e=>46+e/Math.max(1,x.length-1)*54,q=e=>`color-mix(in oklab, ${Z} ${X(e).toFixed(0)}%, ${n.surface})`,J=e=>X(e)>=55?n.surface:n.label,K=(e,t)=>null!==V?V!==e:null!==H&&H!==t,_=null!==V?x[V]:void 0;/* @__PURE__ */
|
|
2
|
+
return f("div",{className:`relative ${k??""}`,ref:W,children:[
|
|
3
|
+
/* @__PURE__ */f("svg",{width:"100%",height:E,viewBox:`0 0 ${C} ${E}`,role:"img","aria-labelledby":z,onMouseLeave:()=>F(null),children:[
|
|
4
|
+
/* @__PURE__ */d("title",{id:z,children:N.funnel(x.length,S(x[0].value),S(x[x.length-1].value))}),x.map((e,t)=>{const l=t*E/x.length+g/2,a=(t+1)*E/x.length-g/2,r=(l+a)/2,o=u(e.value/(x[0].value||1)*100,0,L),i=.62*o.length*12+12;if(U){const u=B,h=u+O(e.value),{count:c,drop:m}=Q(t);/* @__PURE__ */
|
|
5
5
|
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>F(t),children:[
|
|
6
6
|
/* @__PURE__ */d("path",{d:`M${u},${l} L${h},${l} L${h},${a} L${u},${a} Z`,fill:q(t)}),
|
|
7
|
-
/* @__PURE__ */d("text",{x:
|
|
7
|
+
/* @__PURE__ */d("text",{x:B-12,y:r+4,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),h-u>=i&&/* @__PURE__ */d("text",{x:u+8,y:r+4,textAnchor:"start",fontSize:12,fontWeight:600,fill:J(t),style:{fontVariantNumeric:"tabular-nums"},children:o}),
|
|
8
8
|
/* @__PURE__ */f("text",{"data-funnel-value":"true",x:h+8,y:r+4,textAnchor:"start",fontSize:12,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:[
|
|
9
9
|
/* @__PURE__ */d("tspan",{fontWeight:600,children:c}),m&&/* @__PURE__ */d("tspan",{fill:n.muted,children:` ${m}`})]})]},e.key)}const h=P(e.value),c="cone"===v?P(x[t+1]?.value??e.value):h,m=I(t),s=2*Math.min(h,c)>=i;/* @__PURE__ */
|
|
10
10
|
return f("g",{opacity:K(t,e.key)?.45:1,onMouseEnter:()=>F(t),children:[
|
|
11
11
|
/* @__PURE__ */d("path",{d:`M${T-h},${l} L${T+h},${l} L${T+c},${a} L${T-c},${a} Z`,fill:q(t)}),
|
|
12
|
-
/* @__PURE__ */d("text",{x:
|
|
13
|
-
/* @__PURE__ */f("text",{x:
|
|
14
|
-
/* @__PURE__ */d("text",{x:s?T:T+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?
|
|
12
|
+
/* @__PURE__ */d("text",{x:B-14,y:r-2,textAnchor:"end",fontSize:12,fill:n.label,children:e.label}),
|
|
13
|
+
/* @__PURE__ */f("text",{x:B-14,y:r+14,textAnchor:"end",fontSize:11,fill:n.muted,style:{fontVariantNumeric:"tabular-nums"},children:[S(e.value),null!=m?` · −${u(m,1,L)}`:""]}),
|
|
14
|
+
/* @__PURE__ */d("text",{x:s?T:T+Math.max(h,c)+6,y:r+4,textAnchor:s?"middle":"start",fontSize:12,fontWeight:600,fill:s?J(t):n.label,style:{fontVariantNumeric:"tabular-nums"},children:o})]},e.key)})]}),_&&null!==V&&/* @__PURE__ */d("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */d(l,{title:_.label,rows:[{key:"value",label:N.count,color:q(V),value:S(_.value)},{key:"share",label:N.ofFirstStage,color:n.muted,value:u(_.value/(x[0].value||1)*100,0,L)},...V>0&&x[V-1].value>0?[{key:"drop",label:N.droppedHere,color:r.critical,value:`−${u(100*(1-_.value/x[V-1].value),1,L)}`}]:[]]})})]})}export{x as FunnelChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-IUVGHHR3.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{useState as r,useEffect as n,Children as i}from"react";import{jsxs as l,jsx as a}from"react/jsx-runtime";var s={"2xs":16,xs:24,sm:32,md:40,lg:56},o={online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-amber-500"};function m(e){if(!e)return"?";const t=e.trim().split(/\s+/).filter(Boolean);if(0===t.length)return"?";return((t[0][0]??"")+(t.length>1?t[t.length-1][0]:"")).toUpperCase()||"?"}function c({src:e,name:t,size:i="md",status:c,className:h=""}){const u=s[i],g=Math.max(8,Math.round(.28*u)),[d,f]=r(!1);n(()=>{f(!1)},[e]);const p=Boolean(e)&&!d;
|
|
2
2
|
/* @__PURE__ */
|
|
3
3
|
return l("span",{className:`relative inline-flex shrink-0 align-top ${h}`.trim(),style:{width:u,height:u},...t?{role:"img","aria-label":t}:{"aria-hidden":!0},children:[p?/* @__PURE__ */a("img",{src:e,alt:"",onError:()=>f(!0),className:"h-full w-full rounded-full object-cover"}):/* @__PURE__ */a("span",{className:"flex h-full w-full items-center justify-center rounded-full bg-gray-100 font-medium leading-none text-gray-600",style:{fontSize:Math.max(7,Math.round(.4*u))},children:m(t)}),c&&/* @__PURE__ */a("span",{className:`absolute bottom-0 right-0 rounded-full ring-2 ring-white ${o[c]}`,style:{width:g,height:g}})]})}function h({children:r,max:n,size:o="md",className:m=""}){const c=i.toArray(r),h=n?c.slice(0,n):c,u=n?c.length-h.length:0,g=s[o],d=Math.round(.3*g),f=e();/* @__PURE__ */
|
|
4
4
|
return l("div",{className:`flex items-center ${m}`.trim(),children:[h.map((e,t)=>/* @__PURE__ */a("span",{className:"rounded-full ring-2 ring-white",style:{marginLeft:0===t?0:-d},children:e},t)),u>0&&/* @__PURE__ */l("span",{className:"flex items-center justify-center rounded-full bg-gray-200 font-medium text-gray-600 ring-2 ring-white",style:{width:g,height:g,marginLeft:-d,fontSize:Math.round(.36*g)},children:["+",t(u,f)]})]})}export{c as Avatar,h as AvatarGroup};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{ChartBrush as t}from"./chunk-MOKABQCY.js";import{ChartDot as e}from"./chunk-CK2YOGUS.js";import{stepPath as a,curvePath as r,areaBetween as o,areaFrom as l}from"./chunk-VFC6QUEN.js";import{ChartDefs as n,MOTION as i,stagger as s,fillFor as c,dashFor as d,maskId as m}from"./chunk-465RRWBY.js";import{ChartSkeleton as h}from"./chunk-ZNV75GAG.js";import{useHighlight as u,highlightOpacity as f}from"./chunk-CNYAHYE6.js";import{useDragZoom as p,DragBand as g,ChartZoomSummary as y,tooltipBesideBand as k}from"./chunk-KNZ7YTFH.js";import{usePlotWidth as x}from"./chunk-MAFUXCPZ.js";import{pairedAxes as v,niceAxis as b,niceMax as M,linearScale as N,axisGutter as w,bandScale as j,ladderScale as $}from"./chunk-2JWPNR2U.js";import{ChartTooltip as V}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as A,CHART_INK as z,STATUS_VARS as R}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as W}from"./chunk-TWVUQUUD.js";import{useShellStrings as C,useShellLocale as L}from"./chunk-IUVGHHR3.js";import{formatPercent as S,formatPlain as D}from"./chunk-C3QOHMR6.js";import{useRef as E,useState as T,useId as U,useEffect as I}from"react";import{jsx as F,jsxs as P}from"react/jsx-runtime";var O=12,Y=16,B=26,H=52,Q=t=>"number"==typeof t&&Number.isFinite(t);function G({series:G,labels:K,height:Z=200,stacked:J=!1,stackMode:X="value",levels:q,curve:_="linear",tension:tt=0,max:et,yTickCount:at=4,formatValue:rt,formatTooltipValue:ot,tooltipLabels:lt,yAxisLabel:nt,referenceLines:it,labelEndpoints:st=!1,dots:ct,dotVariant:dt="border",pulse:mt=!1,brush:ht=!1,range:ut,onRangeChange:ft,zoomable:pt=!0,columnStrip:gt,onSelect:yt,loading:kt=!1,animate:xt=!0,reveal:vt="left-to-right",fillVariant:bt="gradient",gridStyle:Mt="solid",width:Nt,className:wt,emptyLabel:jt}){const $t=C().charts,Vt=L(),At=rt??(t=>D(t,Vt)),zt=ot??At,Rt=jt??$t.noData,Wt=E(null),Ct=x(Wt),Lt=Nt??Ct,[St,Dt]=T(null),[Et,Tt]=T(null),{highlighted:Ut}=u(),It=U(),Ft=ut??Et,Pt=p(ht&&Ft?Ft[1]-Ft[0]+1:K.length,pt);if(I(()=>{if(null!==St)return W(t=>"Escape"===t.key&&(Dt(null),!0))},[St]),kt)/* @__PURE__ */
|
|
2
|
+
return F("div",{className:wt,ref:Wt,children:/* @__PURE__ */F(h,{height:Z,width:Nt??Ct})});const Ot=K,Yt=ut??Et??[0,Math.max(0,Ot.length-1)],[Bt,Ht]=Yt,Qt=t=>Pt.slice(ht?t.slice(Bt,Ht+1):t),Gt=lt?Qt(lt):void 0,Kt=G.map((t,e)=>({...t,slot:e})).filter(t=>t.data.some(Q)).map(t=>({...t,data:Qt(t.data),pointTones:t.pointTones?Qt(t.pointTones):void 0})),Zt=t=>(ht?Bt:0)+(Pt.view?.[0]??0)+t;if(K=Qt(Ot),0===Kt.length||0===K.length)/* @__PURE__ */
|
|
3
|
+
return F("div",{className:wt,ref:Wt,children:/* @__PURE__ */F("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:Z},children:Rt})});const Jt=K.map((t,e)=>Kt.reduce((t,a)=>t+(Q(a.data[e])?a.data[e]:0),0)),Xt=(t,e)=>Jt[e]>0?t/Jt[e]:null,qt=[];if(J){let t=K.map(()=>0);for(const e of Kt)t=t.map((t,a)=>t+(Q(e.data[a])?e.data[a]:0)),qt.push("percent"===X?t.map((t,e)=>Xt(t,e)):[...t])}const _t=!!q&&q.length>0,te=t=>"right"===t.axis,ee=!J&&!_t&&void 0===et&&Kt.some(te)&&Kt.some(t=>!te(t)),ae=gt&&!J?gt:null,re=t=>!!ae&&"column"===t.mode,oe=(ee?Kt.filter(t=>!te(t)):Kt).filter(t=>!re(t)),le=ee?Kt.filter(te).flatMap(t=>t.data.filter(Q)):[],ne=J?(qt.at(-1)??[]).filter(Q):oe.flatMap(t=>t.data.filter(Q)),ie=ee?v([Math.min(0,...ne),Math.max(0,...ne)],[Math.min(0,...le),Math.max(0,...le)],{intervals:at+1,integerLeft:ne.every(Number.isInteger),integerRight:le.every(Number.isInteger)}):null,se=ie?ie.left:J&&"percent"===X||_t||void 0!==et?null:b(J?0:Math.min(0,...ne),Math.max(0,...ne),{intervals:at+1,integer:ne.every(Number.isInteger)}),ce=se?se.lo:0,de=J&&"percent"===X?1:se?se.hi:et??M(Math.max(...ne,0)),me=J&&"percent"===X?t=>S(Math.round(100*t),0,Vt):At,he=_t?q:se?se.ticks:N([ce,de],{from:0,to:1}).ticks(at+1),ue=w(he.map(me),H),fe=ie?w(ie.right.ticks.map(At),Y):Y,pe={left:ue,right:Math.max(ue+1,Lt-fe),top:O,bottom:Z-B},ge=j(K.length,{from:pe.left,to:pe.right}),ye=_t?$(q,{from:pe.bottom,to:pe.top}):null,ke=N([ce,de],{from:pe.bottom,to:pe.top}),xe=ke(Math.max(ce,0)),ve=t=>ye?ye(t):ke(t),be=Kt.filter(re),Me=Math.max(0,...K.map((t,e)=>be.reduce((t,a)=>t+Math.max(0,Q(a.data[e])?a.data[e]:0),0))),Ne=t=>xe-(Me>0?t/Me:0)*(pe.bottom-pe.top)*(ae??0),we=ie?N([ie.right.lo,ie.right.hi],{from:pe.bottom,to:pe.top}):null,je=t=>we&&te(t)?we:ve,$e=ye?ye.levels.map(t=>({value:t,y:ye(t)})):he.map(t=>({value:t,y:ke(t)})),Ve=t=>e=>{e.preventDefault(),Dt(e=>{const a=(e??0)+t;return Math.min(K.length-1,Math.max(0,a))})},Ae=Math.max(1,Math.ceil(K.length/Math.max(1,Math.floor(Lt/96))));/* @__PURE__ */
|
|
4
|
+
return P("div",{className:`relative ${wt??""}`,ref:Wt,children:[
|
|
5
|
+
/* @__PURE__ */P("svg",{width:"100%",height:Z,viewBox:`0 0 ${Lt} ${Z}`,role:"img","aria-label":$t.overIntervals(Kt.map(t=>t.label),K.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>Dt(null),onBlur:()=>Dt(null),style:pt?{userSelect:"none",touchAction:"pan-y"}:void 0,onKeyDown:t=>{if(yt&&null!==St&&("Enter"===t.key||" "===t.key))return t.preventDefault(),void yt(Zt(St));"ArrowRight"===t.key&&Ve(1)(t),"ArrowLeft"===t.key&&Ve(-1)(t)},children:[
|
|
6
|
+
/* @__PURE__ */F("defs",{children:/* @__PURE__ */F("clipPath",{id:It,children:/* @__PURE__ */F("rect",{x:pe.left,y:pe.top,width:pe.right-pe.left,height:pe.bottom-pe.top})})}),
|
|
7
|
+
/* @__PURE__ */F(n,{id:It,fills:Kt.map((t,e)=>({color:A(t.slot,t.color,t.tone),variant:t.fillVariant??bt})),fadeFrom:J?.42:.3,reveal:!!xt&&vt}),$e.map(t=>/* @__PURE__ */F("line",{x1:pe.left,y1:t.y,x2:pe.right,y2:t.y,stroke:z.grid,strokeWidth:1,shapeRendering:"crispEdges",strokeDasharray:"dashed"===Mt?"3 3":void 0},`grid-${t.value}`)),
|
|
8
|
+
/* @__PURE__ */F("line",{x1:pe.left,y1:xe,x2:pe.right,y2:xe,stroke:z.axis,strokeWidth:1,shapeRendering:"crispEdges"}),$e.map(t=>/* @__PURE__ */F("text",{x:pe.left-8,y:t.y+4,textAnchor:"end","data-axis-tick":"true",fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:me(t.value)},`ytick-${t.value}`)),ie&&$e.map((t,e)=>/* @__PURE__ */F("text",{x:pe.right+8,y:t.y+4,textAnchor:"start","data-axis-tick":"true",fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:At(ie.right.ticks[e])},`ytick-r-${t.value}`)),nt&&/* @__PURE__ */F("text",{x:12,y:(pe.top+pe.bottom)/2,transform:`rotate(-90 12 ${(pe.top+pe.bottom)/2})`,textAnchor:"middle",fontSize:11,fill:z.label,children:nt}),
|
|
9
|
+
/* @__PURE__ */F("g",{clipPath:`url(#${It})`,mask:xt&&vt?`url(#${m(It)})`:void 0,children:Kt.map((t,e)=>{const n=A(t.slot,t.color,t.tone),m=t.mode??(J?"area":"line"),h=f(t.key,Ut);if("step"===m){const e=K.map((e,a)=>({start:ge(a),end:ge.end(a),value:t.data[a]})).filter(t=>Q(t.value)).map(e=>({start:e.start,end:e.end,y:je(t)(e.value)}));/* @__PURE__ */
|
|
10
|
+
return F("path",{d:a(e),fill:"none",stroke:n,strokeWidth:2.5,strokeLinecap:"butt",strokeLinejoin:"miter",opacity:h??void 0,className:"rosh-viz-mark"},t.key)}const u=K.map((a,r)=>{const o=J?qt[e]?.[r]:t.data[r];return Q(o)?[ge.center(r),je(t)(o)]:null}).filter(t=>null!==t);if(0===u.length)return null;if("column"===m){const a=Math.max(1,.62*ge.bandwidth),r="solid"===t.fillVariant,o=je(t);return re(t)?/* @__PURE__ */F("g",{opacity:h??void 0,className:"rosh-viz-mark",children:K.map((o,l)=>{const i=t.data[l];if(!Q(i)||i<=0)return null;const s=((t,e)=>be.slice(0,be.findIndex(e=>e.key===Kt[t]?.key)).reduce((t,a)=>t+Math.max(0,Q(a.data[e])?a.data[e]:0),0))(e,l),c=Ne(s+i),d=Ne(s)-(s>0?1:0);/* @__PURE__ */
|
|
11
|
+
return F("rect",{x:ge.center(l)-a/2,y:c,width:a,height:Math.max(0,d-c),rx:2,fill:t.pointTones?.[l]?R[t.pointTones[l]]:n,fillOpacity:r?1:.55},l)})},t.key):/* @__PURE__ */F("g",{opacity:h??void 0,className:"rosh-viz-mark",children:K.map((l,c)=>{const d=J?qt[e]?.[c]:t.data[c];if(!Q(d))return null;const m=o(d);/* @__PURE__ */
|
|
12
|
+
return F("rect",{x:ge.center(c)-a/2,y:Math.min(m,xe),width:a,height:Math.abs(xe-m),rx:2,fill:n,fillOpacity:r?1:.35,className:xt?i.rise:void 0,style:xt?s(c,26):void 0},c)})},t.key)}const p=r(u,_,tt),g=J&&e>0?K.map((t,a)=>[ge.center(a),ve(qt[e-1]?.[a]??0)-2]):null,y=g?o(p,g):l(p,u,xe);/* @__PURE__ */
|
|
13
|
+
return P("g",{opacity:h??void 0,className:"rosh-viz-mark",children:[("area"===m||J)&&
|
|
14
|
+
/* @__PURE__ */F("path",{d:y,fill:c(It,e,t.fillVariant??bt,n),stroke:"none"}),
|
|
15
|
+
/* @__PURE__ */F("path",{d:p,fill:"none",stroke:n,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round",strokeDasharray:d(t.stroke??(t.forecast?"animated-dashed":"solid")),className:xt&&("animated-dashed"===t.stroke||t.forecast&&!t.stroke)?i.march:void 0})]},t.key)})}),it?.map((t,e)=>{const a=t.color??R[t.tone??"critical"],r=ve(t.value);/* @__PURE__ */
|
|
16
|
+
return P("g",{children:[
|
|
17
|
+
/* @__PURE__ */F("line",{x1:pe.left,y1:r,x2:pe.right,y2:r,stroke:a,strokeWidth:1,strokeDasharray:"5 4"}),t.label&&/* @__PURE__ */F("text",{x:pe.right-4,y:r-5,textAnchor:"end",fontSize:11,fontWeight:600,fill:a,children:t.label})]},`rule-${e}`)}),"none"!==(ct??(st?"last":"none"))&&Kt.map((t,a)=>{if("column"===t.mode)return null;const r=ct??(st?"last":"none"),o=A(t.slot,t.color,t.tone),l=[...t.data].map(Q).lastIndexOf(!0),n="all"===r?K.map((t,e)=>e).filter(e=>Q(J?qt[a]?.[e]:t.data[e])):l>=0?[l]:[];/* @__PURE__ */
|
|
18
|
+
return P("g",{children:[n.map(r=>{const n=J?qt[a]?.[r]:t.data[r];return Q(n)?/* @__PURE__ */F(e,{cx:ge.center(r),cy:je(t)(n),color:o,variant:dt,pulse:mt&&r===l,title:`${K[r]}: ${t.label} ${At(n)}`},r):null}),st&&l>=0&&Q(J?qt[a]?.[l]:t.data[l])&&/* @__PURE__ */F("text",{x:ge.center(l)-10,y:je(t)(J?qt[a]?.[l]:t.data[l])-9,textAnchor:"end",fontSize:12,fontWeight:600,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:At(J?qt[a]?.[l]:t.data[l])})]},`dots-${t.key}`)}),K.map((t,e)=>e%Ae===0?/* @__PURE__ */F("text",{x:ge.center(e),y:Z-8,textAnchor:"middle",fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:t},`xtick-${e}`):null),null!==St&&/* @__PURE__ */F("line",{x1:ge.center(St),y1:pe.top,x2:ge.center(St),y2:pe.bottom,stroke:z.axis,strokeWidth:1}),ae&&Me>0&&
|
|
19
|
+
/* @__PURE__ */P("g",{pointerEvents:"none","data-column-strip":"true",children:[
|
|
20
|
+
/* @__PURE__ */F("line",{x1:pe.left,y1:Ne(Me),x2:pe.right,y2:Ne(Me),stroke:z.grid,strokeWidth:1,strokeDasharray:"2 3",shapeRendering:"crispEdges"}),
|
|
21
|
+
/* @__PURE__ */F("text",{x:pe.left+4,y:Ne(Me)-4,fontSize:11,fill:z.label,style:{fontVariantNumeric:"tabular-nums"},children:At(Me)})]}),Pt.drag&&/* @__PURE__ */F(g,{x0:ge(Pt.drag[0]),x1:ge(Pt.drag[1])+ge.bandwidth,top:pe.top,bottom:pe.bottom}),K.map((t,e)=>/* @__PURE__ */F("rect",{x:ge(e),y:pe.top,width:Math.max(1,ge.bandwidth),height:pe.bottom-pe.top,fill:"transparent",onMouseEnter:()=>Dt(e),onPointerDown:()=>Pt.press(e),onPointerEnter:()=>Pt.over(e),onPointerUp:Pt.release,onClick:yt?()=>yt(Zt(e)):void 0,style:yt?{cursor:"pointer"}:void 0},`hit-${e}`))]}),Pt.view&&/* @__PURE__ */F(y,{from:Gt?.[0]??K[0],to:Gt?.at(-1)??K[K.length-1],count:K.length,total:J&&"percent"!==X?zt(Jt.reduce((t,e)=>t+e,0)):ae?zt(be.reduce((t,e)=>t+e.data.filter(Q).reduce((t,e)=>t+e,0),0)):void 0,rows:(ae?be:Kt).filter(t=>t.data.some(Q)).map(t=>{const e=t.data.filter(Q),a=A(t.slot,t.color,t.tone);if(0===e.length)return{key:t.key,label:t.label,color:a,value:"—"};const r=e.reduce((t,e)=>t+e,0),o=J||"column"===t.mode?zt(r):$t.zoomLevel(zt(r/e.length),zt(Math.max(...e)));return{key:t.key,label:t.label,color:a,value:o}}),onClear:Pt.clear}),ht&&Ot.length>2&&/* @__PURE__ */F(t,{className:"mt-1",labels:Ot,width:Lt,data:G[0]?.data??[],range:Yt,onRangeChange:t=>{ft?ft(t):Tt(t)}}),null!==St&&
|
|
22
|
+
/* @__PURE__ */F("div",{className:"pointer-events-none absolute top-2 z-10",style:k(ge.center(St),ge.bandwidth,Lt),children:/* @__PURE__ */F(V,{title:Gt?.[St]??K[St],rows:Kt.map((t,e)=>({key:t.key,label:t.label,color:A(t.slot,t.color,t.tone),value:Q(t.data[St])?J&&"percent"===X?`${S(100*(Xt(t.data[St],St)??0),1,Vt)} · ${zt(t.data[St])}`:zt(t.data[St]):void 0})),footnote:J&&"percent"===X?$t.inBucket(zt(Jt[St])):void 0})})]})}export{G as TimeSeriesChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{IconButton_default as e}from"./chunk-SV5RRBVA.js";import{CloseGlyph as t}from"./chunk-
|
|
1
|
+
import{IconButton_default as e}from"./chunk-SV5RRBVA.js";import{CloseGlyph as t}from"./chunk-AHMYBYXJ.js";import{humanSize as n,useFileIntake as r,FileIntakeAlert as a}from"./chunk-VFSAJMNX.js";import{Button_default as s}from"./chunk-EVYD6UFQ.js";import{Icon as i}from"./chunk-ISVODSRP.js";import{useShellStrings as c}from"./chunk-IUVGHHR3.js";import{useRef as l,useEffect as o}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";function m({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
2
2
|
return d(i,{name:"attach",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function p({className:e="h-4 w-4"}){/* @__PURE__ */
|
|
3
3
|
return d(i,{name:"page",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:e})}function h({intake:e,dropLabel:t,className:n="",children:r}){const a=c().files;/* @__PURE__ */
|
|
4
4
|
return u("div",{...e.zoneProps,...e.pasteProps,className:`relative ${n}`,children:[r,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{useShellStrings as e}from"./chunk-
|
|
1
|
+
import{Tooltip as r}from"./chunk-SOZCWT6I.js";import{useShellStrings as e}from"./chunk-IUVGHHR3.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";var i="Alt+ArrowUp Alt+ArrowDown";function c(r){return!r.altKey||r.ctrlKey||r.metaKey?null:"ArrowUp"===r.key?"up":"ArrowDown"===r.key?"down":null}var a=/* @__PURE__ */n("svg",{"aria-hidden":"true",viewBox:"0 0 4 14",fill:"currentColor",className:"h-3.5 w-1",children:[
|
|
2
2
|
/* @__PURE__ */t("circle",{cx:"2",cy:"3",r:"1.1"}),
|
|
3
3
|
/* @__PURE__ */t("circle",{cx:"2",cy:"7",r:"1.1"}),
|
|
4
4
|
/* @__PURE__ */t("circle",{cx:"2",cy:"11",r:"1.1"})]});function l({hint:n,dragging:i,revealClassName:c,marker:l}){const o=e().tree;/* @__PURE__ */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Card as e}from"./chunk-
|
|
1
|
+
import{Card as e}from"./chunk-4S3E3VJH.js";import{Select_default as l}from"./chunk-DEYVAMJQ.js";import{FormField as a}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Banner as i}from"./chunk-XWJT6TFU.js";import{Input_default as c}from"./chunk-PT4GMPUB.js";import{Button_default as s}from"./chunk-EVYD6UFQ.js";import{useState as d}from"react";import{jsx as n,jsxs as t}from"react/jsx-runtime";var h=[{name:"Mechanical keyboard",qty:1,price:129},{name:"USB-C cable (2m)",qty:2,price:12},{name:"Laptop stand",qty:1,price:48}];function m(){const[m,o]=d(!0),[p,u]=d("us"),y=h.reduce((e,l)=>e+l.qty*l.price,0),g=y+9;/* @__PURE__ */
|
|
2
2
|
return n("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */t("div",{className:"mx-auto max-w-5xl space-y-5",children:[
|
|
3
3
|
/* @__PURE__ */n("h1",{className:"text-xl font-semibold text-gray-900",children:"Checkout"}),
|
|
4
4
|
/* @__PURE__ */t("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-3",children:[
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-OJI4ROSD.js";import{formatDateTime as o}from"./chunk-NHKT5IH6.js";import{useShellLocale as c}from"./chunk-
|
|
1
|
+
import{EmptyValue as r}from"./chunk-HNQPF5QZ.js";import{toInstant as e,timeAgo as t}from"./chunk-OJI4ROSD.js";import{formatDateTime as o}from"./chunk-NHKT5IH6.js";import{useShellLocale as c}from"./chunk-IUVGHHR3.js";import{jsx as i}from"react/jsx-runtime";function m({value:m,precise:n,locale:s,className:l}){const a=c(),p=e(m);if(!p)/* @__PURE__ */return i(r,{});const u="string"==typeof m?m:p.toISOString();/* @__PURE__ */
|
|
2
2
|
return i("time",{dateTime:u,title:o(u,{locale:s??a}),className:l,children:t(p,{precise:n,locale:s??a})})}export{m as TimeAgo};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{SearchableSelect as e}from"./chunk-XMFJDT6Y.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-DEYVAMJQ.js";import{isSafeLinkHref as t}from"./chunk-Z5TE3MEG.js";import{Input_default as r}from"./chunk-PT4GMPUB.js";import{INPUT_SIZES as n}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-EVYD6UFQ.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-IUVGHHR3.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:n,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:F,className:j="",tidyAddress:O,addressAddon:E}=t,D=void 0!==t.onApply,T=u().link,$=y.isSafe??k,A=d(),U=c(null),Y=c(null),[z,M]=p({url:n}),P=D?z.url:n,[V,Q]=p(!1),[R,S]=p(null),[B,G]=p(null),[H,K]=p(!1),W=c(null),I=c(()=>{});I.current=D?t.onCancel:()=>{},m(()=>{if(D)return s(e=>{const a=U.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(I.current(),!0)},()=>U.current)},[D]),m(()=>{if(!D)return;const e=Y.current;e?(e.focus(),e.select()):U.current?.querySelector("button, input")?.focus()},[]);const J=o??[{value:b,label:T.address,target:{type:"text"}}],L=R&&R.against===P?R.kind:y.kindOf(P),X=J.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===L),Z=X.find(e=>"text"===e.target.type),q=X.find(e=>e.value===L)??Z??X[0];if(!q)return null;const _="text"!==q.target.type,ee=_?y.targetOf(P):P,ae=h(q.target),le=ae.find(e=>e.value===ee),te=e=>({value:e,label:T.unavailable(e)}),re="select"===q.target.type&&ee&&w?w(ee):null,ne=re?y.readFilter(P):null,ie=ne?re?.find(e=>e.param===ne.param):void 0,oe=B&&B.against===P?B.text:P,se=_?P:O?O(oe.trim()).trim():oe.trim(),ue=D&&O?se:oe,de=!_&&""!==ue.trim()&&!$(ue),ce=de&&(!D||V);_&&H&&K(!1);const pe=(e,a)=>{D?M({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},me=(e,a)=>{S(a=>a?{...a,against:e}:a),pe(e,a)},fe=e=>{if(!e)return me("");const a=ae.find(a=>a.value===e);me(e,a?.label)},ve=e=>{Q(!1);const a=e.trim();a?$(e)?(G({text:e,against:a}),me(a)):G({text:e,against:P}):(G({text:e,against:""}),me(""))},ge=e=>{const a=e.relatedTarget;if(a&&(a===Y.current||W.current?.contains(a)))return;if(K(!1),D||!O||C)return;const l=O(oe.trim());l.trim()!==oe.trim()&&ve(l)},he=()=>{if(!D||!se)return;if(!_&&de)return void Q(!0);const e=_&&z.url===se?z.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},be=(e,a)=>a&&!e.some(e=>e.value===a)?[te(a),...e]:[...e],xe=(a,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=r.some(e=>""===e.value);/* @__PURE__ */
|
|
2
|
+
return f(e,{"aria-label":a,value:t,options:o,disabled:C,clearable:l,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
|
|
3
|
+
return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:n})};let ke;if("text"===q.target.type)ke=/* @__PURE__ */f(r,{ref:Y,id:`${A}-address`,size:"sm",type:"text",invalid:ce,"aria-label":T.address,"aria-describedby":ce?`${A}-why`:void 0,placeholder:F??T.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:oe,readOnly:C,onChange:e=>ve(e.target.value),onFocus:()=>K(!0),onBlur:ge,onKeyDown:O&&!D?e=>{"Enter"===e.key&&e.currentTarget.blur()}:void 0});else{const e="groups"===q.target.type?q.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):q.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:q.target.placeholder},...be(e,ee)];ke=xe(q.label,ee,a,fe,e.length>10)}const ye=/* @__PURE__ */v(g,{children:[o&&xe(T.linkType,q.value,X.map(e=>({value:e.value,label:e.label})),e=>{G(null),Q(!1);const a=X.find(a=>a.value===e);if(!a||"text"===a.target.type)return void S({kind:e,against:P});const l=h(a.target)[0];S({kind:e,against:l?l.value:""}),l?pe(l.value,l.label):pe("")},!1),ke,E&&H&&!C&&"text"===q.target.type&&/* @__PURE__ */f("div",{ref:W,onBlur:ge,children:E({url:oe,onChange:ve})}),re&&xe(T.filter,ne?.param??"",[{value:"",label:T.noFilter},...ne&&!ie?[te(ne.param)]:[],...re.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return me(ee,le?.label);const a=re?.find(a=>a.param===e),l=a?.values[0];l&&me(y.withFilter(ee,{param:e,value:l.value}),l.label)},!1),re&&ne&&xe(T.value,ne.value,be((ie?.values??[]).map(e=>({value:e.value,label:e.label})),ne.value),e=>{if(!ne)return;const a=ie?.values.find(a=>a.value===e);me(y.withFilter(ee,{param:ne.param,value:e}),a?.label)},(ie?.values.length??0)>10),ce&&/* @__PURE__ */f("p",{id:`${A}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:T.unsafe}),q.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:q.hint}),re&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:T.filterHint})]});if(!D)/* @__PURE__ */
|
|
4
|
+
return f("div",{ref:U,className:`flex min-w-0 flex-auto flex-col gap-2 ${j}`.trim(),role:N?"group":void 0,"aria-label":N,children:ye});const we=t.onRemove;/* @__PURE__ */
|
|
5
|
+
return v("div",{ref:U,role:"dialog","aria-label":N??T.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${j}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),he())},children:[_?/* @__PURE__ */f("span",{className:a({inline:!0}),children:T.title}):/* @__PURE__ */f("label",{htmlFor:`${A}-address`,className:a({inline:!0}),children:T.title}),ye,
|
|
6
|
+
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[we?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:we,children:T.remove}):null,
|
|
7
|
+
/* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
|
|
8
|
+
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>I.current(),children:T.cancel}),
|
|
9
|
+
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:he,disabled:C||""===se,children:T.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,N]=p(!1),C=c(null),F=d(),j=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
|
|
10
|
+
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
|
+
/* @__PURE__ */f(r,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
|
|
12
|
+
/* @__PURE__ */v("button",{ref:C,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?F:void 0,disabled:b,onClick:()=>N(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${n.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
|
|
13
|
+
/* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(t?"text-blue-600":"text-ink-faintest")}),
|
|
14
|
+
/* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:F,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),j()},onRemove:t?()=>{i(""),j()}:void 0,onCancel:j})})]})}export{y as LinkPicker,w as TextLinkField};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-ISVODSRP.js";import{Tooltip as t}from"./chunk-SOZCWT6I.js";import{useShellStrings as n}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-ISVODSRP.js";import{Tooltip as t}from"./chunk-SOZCWT6I.js";import{useShellStrings as n}from"./chunk-IUVGHHR3.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 S="desktop"===u,x=p??(S?j.resetName(o):j.inheritName(o)),T=b?j.backTo(b):S?j.backToDefault:j.backToAuto,g=m??(b?j.tip(x,T):x);
|
|
2
2
|
/* @__PURE__ */
|
|
3
3
|
return r(t,{content:g,describe:!1,children:[
|
|
4
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"})}),
|