efficient-shell 8.21.0 → 8.22.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 +35 -11
- package/dist/{Browser-WJ7YGO3M.js → Browser-VZU2MTSA.js} +14 -14
- package/dist/Calculator-DKZHOHOD.js +29 -0
- package/dist/{CurrencyConverter-ONCRQNI4.js → CurrencyConverter-BSQCX3HS.js} +9 -9
- package/dist/{Documents-YEMIR4WQ.js → Documents-NR3T434J.js} +17 -17
- package/dist/{Files-QWSOYRD4.js → Files-QMV2E74S.js} +16 -16
- package/dist/{Notepad-MFVUGAGD.js → Notepad-M5MCY5DV.js} +10 -10
- package/dist/{PdfViewer-ZFZ4PEAV.js → PdfViewer-OODU3XIT.js} +1 -1
- package/dist/{PomodoroTimer-JVQ5K7B4.js → PomodoroTimer-I423ZZOQ.js} +58 -58
- package/dist/{Preview-7G2WM7DN.js → Preview-QTDCPMCL.js} +26 -26
- package/dist/Sidebar-UVBEI4DQ.js +43 -0
- package/dist/{Spreadsheet-VKOS3PUA.js → Spreadsheet-V2EWOJML.js} +13 -13
- package/dist/{Stock-TWJNCTNT.js → Stock-U3G45T36.js} +2 -2
- package/dist/{Weather-RM7GPLAH.js → Weather-GEC4VHLM.js} +15 -15
- package/dist/{WorldClock-ITJ2MO75.js → WorldClock-6ORV4NHF.js} +5 -5
- package/dist/ai/index.js +14 -14
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/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/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-255BENW2.js +7 -0
- package/dist/{chunk-ZBLNVAZ4.js → chunk-2IV4XF3Y.js} +2 -2
- package/dist/{chunk-MHYOQMBV.js → chunk-2JYQF3PJ.js} +1 -1
- package/dist/{chunk-3Z7LIHMB.js → chunk-2RJKMYON.js} +1 -1
- package/dist/{chunk-6V753BUI.js → chunk-2TBC254V.js} +3 -3
- package/dist/{chunk-5Z2WLSFM.js → chunk-352MVBF7.js} +20 -20
- package/dist/{chunk-CFLVEKSH.js → chunk-35VA5UFB.js} +1 -1
- package/dist/{chunk-IJA5ZAGL.js → chunk-3APQ5V6P.js} +1 -1
- package/dist/{chunk-D5HHU5AO.js → chunk-3UL7IB25.js} +7 -7
- package/dist/{chunk-N7VNKAXZ.js → chunk-46M6AYFJ.js} +1 -1
- package/dist/{chunk-AH2AUQYM.js → chunk-4ELYV3L6.js} +1 -1
- package/dist/{chunk-YGEK2Z6P.js → chunk-52L6IBTN.js} +1 -1
- package/dist/{chunk-B55IXYDR.js → chunk-53ROHXAV.js} +2 -2
- package/dist/{chunk-4VK3GJZI.js → chunk-56C5SEZ7.js} +1 -1
- package/dist/{chunk-U5I7IF72.js → chunk-5B73MLXV.js} +1 -1
- package/dist/{chunk-7M7ESM5V.js → chunk-5BBDUKQP.js} +12 -12
- package/dist/{chunk-MWAYM46R.js → chunk-5EK4DFB5.js} +11 -11
- package/dist/{chunk-JYOI66DT.js → chunk-5LNFW5E4.js} +1 -1
- package/dist/{chunk-AJ42UE53.js → chunk-5OGWWBJY.js} +1 -1
- package/dist/{chunk-4CWKK5HV.js → chunk-6AJM3QNG.js} +4 -4
- package/dist/{chunk-2BS74SYW.js → chunk-6DT7HG3F.js} +1 -1
- package/dist/chunk-6JCIQ7XL.js +8 -0
- package/dist/{chunk-7S2I6ACG.js → chunk-6PWLY2LQ.js} +1 -1
- package/dist/{chunk-4XOTP5CB.js → chunk-6UBBY54N.js} +2 -2
- package/dist/{chunk-MFEJ6TYE.js → chunk-74HUZZPT.js} +1 -1
- package/dist/{chunk-735HKUTV.js → chunk-74QAQXSB.js} +1 -1
- package/dist/{chunk-DO6XTJ77.js → chunk-7AINUMUA.js} +1 -1
- package/dist/{chunk-UY47AKZU.js → chunk-ALYBCDHU.js} +5 -5
- package/dist/{chunk-M5BFTFBK.js → chunk-AXQBQH55.js} +15 -15
- package/dist/{chunk-ZDK2JYH5.js → chunk-B73YLHD2.js} +54 -54
- package/dist/{chunk-VY7EPQEG.js → chunk-BBYHBN3R.js} +1 -1
- package/dist/{chunk-DLCIGDKC.js → chunk-BJEBOXTR.js} +3 -3
- package/dist/{chunk-HVVPBAP5.js → chunk-BJKZYQFA.js} +3 -3
- package/dist/{chunk-HYFHCPNJ.js → chunk-BUWOFJGM.js} +8 -8
- package/dist/{chunk-AXZEINMF.js → chunk-C3ZZDCBU.js} +18 -18
- package/dist/chunk-CGUMJZUB.js +2 -0
- package/dist/{chunk-OTU633XJ.js → chunk-CJKDYVNE.js} +6 -6
- package/dist/chunk-CPM3BQGV.js +14 -0
- package/dist/{chunk-HJIBTA6V.js → chunk-CQZEO4UV.js} +9 -9
- package/dist/{chunk-EL3O7ZFQ.js → chunk-CREVU3AF.js} +1 -1
- package/dist/{chunk-P7WUDHIP.js → chunk-D3BDPSVV.js} +6 -6
- package/dist/{chunk-B4XPFCCQ.js → chunk-D7AA5WE2.js} +2 -2
- package/dist/{chunk-OCCHDMEV.js → chunk-DIW6WT5L.js} +1 -1
- package/dist/chunk-DIZW2GZP.js +3 -0
- package/dist/{chunk-L6FLPBU2.js → chunk-DQB3ORB7.js} +5 -5
- package/dist/chunk-DSYIKLOK.js +11 -0
- package/dist/chunk-EUOFKZI3.js +19 -0
- package/dist/{chunk-L65EQCZN.js → chunk-F3AROMIU.js} +6 -6
- package/dist/{chunk-WRJDHFLD.js → chunk-F6YIUCIJ.js} +4 -4
- package/dist/{chunk-TT3S2XVQ.js → chunk-F6YMKW5G.js} +1 -1
- package/dist/{chunk-3PQHPFXP.js → chunk-FDENTKSM.js} +5 -5
- package/dist/{chunk-KZEQJVBO.js → chunk-FLQIF7HC.js} +3 -3
- package/dist/{chunk-BIS5PHHV.js → chunk-FW2EEIDB.js} +2 -2
- package/dist/{chunk-XWH6KVVB.js → chunk-GKTCCPME.js} +1 -1
- package/dist/{chunk-Y5ZWPU4L.js → chunk-GTKNEJ3X.js} +7 -7
- package/dist/{chunk-IKNNHEVY.js → chunk-GVNDUNQL.js} +1 -1
- package/dist/{chunk-IY3CRZRH.js → chunk-HLZZ5Q5E.js} +20 -20
- package/dist/{chunk-VOHZQVFK.js → chunk-I2FHDMIN.js} +6 -6
- package/dist/{chunk-NKJDOQVW.js → chunk-IJICE6KT.js} +1 -1
- package/dist/{chunk-6GVJ6IKD.js → chunk-IMDLBXO3.js} +1 -1
- package/dist/{chunk-IMF537IJ.js → chunk-IOESXYEI.js} +9 -9
- package/dist/{chunk-55WFJELE.js → chunk-IUBWN3OA.js} +1 -1
- package/dist/{chunk-PG6AVBSR.js → chunk-JACPHDTK.js} +1 -1
- package/dist/chunk-JGZLLQAN.js +8 -0
- package/dist/{chunk-DIKOEJ2Y.js → chunk-JLPTSC66.js} +1 -1
- package/dist/{chunk-LMLM4KHQ.js → chunk-JXGYIV44.js} +8 -8
- package/dist/{chunk-ECZT7SIE.js → chunk-KBLMTCTD.js} +1 -1
- package/dist/{chunk-IPOSLLLU.js → chunk-KFSNSDTW.js} +9 -9
- package/dist/{chunk-PTDLNTSK.js → chunk-L2JOLPJR.js} +1 -1
- package/dist/{chunk-ACZZXO5S.js → chunk-LQHWFL5Y.js} +2 -2
- package/dist/{chunk-F2Z6IXMM.js → chunk-LVAGFIWK.js} +2 -2
- package/dist/{chunk-VX4BNYH3.js → chunk-MIZO6SQ3.js} +2 -2
- package/dist/{chunk-OZF4QAJT.js → chunk-MRLQH2GZ.js} +3 -3
- package/dist/{chunk-MKITHLDU.js → chunk-MWNZY33B.js} +9 -9
- package/dist/{chunk-MOOBUMON.js → chunk-NE42BDQX.js} +5 -5
- package/dist/chunk-NHFLTKPK.js +11 -0
- package/dist/{chunk-LDFRVV5R.js → chunk-NYLXA2EG.js} +7 -7
- package/dist/{chunk-H7ZXUGXX.js → chunk-O3NLPJH2.js} +16 -16
- package/dist/chunk-O5KDTFK5.js +8 -0
- package/dist/{chunk-PJCVNFWM.js → chunk-O6JX6RDX.js} +7 -7
- package/dist/{chunk-L2YW3END.js → chunk-ONEF47LG.js} +3 -3
- package/dist/{chunk-CU2B7G5A.js → chunk-OPFCLDVM.js} +1 -1
- package/dist/chunk-PFB2NSSS.js +14 -0
- package/dist/{chunk-NDTMQRR2.js → chunk-PHYI7M45.js} +1 -1
- package/dist/chunk-PMOGQHYX.js +20 -0
- package/dist/{chunk-THDSOVEH.js → chunk-POMS7YQN.js} +2 -2
- package/dist/{chunk-MTSZ66O4.js → chunk-PZFETJAG.js} +1 -1
- package/dist/{chunk-NBVF2CXM.js → chunk-Q6A6W3DI.js} +1 -1
- package/dist/chunk-QLAQ6ASB.js +5 -0
- package/dist/{chunk-EDQBTPDF.js → chunk-QSN7X27F.js} +5 -5
- package/dist/{chunk-OSVN2UF7.js → chunk-QUS3C264.js} +1 -1
- package/dist/{chunk-IGCXJHAK.js → chunk-QZRH7L2E.js} +1 -1
- package/dist/{chunk-DMLJOBQS.js → chunk-R4JU7MU2.js} +6 -6
- package/dist/{chunk-MEOICYR5.js → chunk-R5FFVK2W.js} +1 -1
- package/dist/{chunk-YVBFFE4Z.js → chunk-RIGW3E5M.js} +4 -4
- package/dist/chunk-RPK3U2K2.js +9 -0
- package/dist/chunk-RPTQCFLR.js +29 -0
- package/dist/{chunk-K4DZWCUP.js → chunk-SDORX5C2.js} +5 -5
- package/dist/{chunk-NRDO5IHL.js → chunk-SFWIYB4T.js} +1 -1
- package/dist/{chunk-IURSUMDO.js → chunk-SH6ZLK4K.js} +3 -3
- package/dist/{chunk-ERFM5U3M.js → chunk-SLORZA7W.js} +10 -10
- package/dist/{chunk-YSHS6QIY.js → chunk-SO4WAMVA.js} +5 -5
- package/dist/{chunk-EAEUSMYL.js → chunk-SRMRRJ5K.js} +1 -1
- package/dist/{chunk-RAQESAQZ.js → chunk-SSOLRTVS.js} +1 -1
- package/dist/{chunk-A4U4BTN3.js → chunk-TCN7XUCY.js} +4 -4
- package/dist/{chunk-24L7NLA3.js → chunk-TJPPV7KZ.js} +1 -1
- package/dist/{chunk-OSSFYFXO.js → chunk-TSOBVLV5.js} +1 -1
- package/dist/{chunk-XVJCVYDI.js → chunk-TYZ4IY7F.js} +2 -2
- package/dist/{chunk-QEVIQZIE.js → chunk-U4QZIU7X.js} +2 -2
- package/dist/chunk-URFWJZTV.js +7 -0
- package/dist/{chunk-PWOFYFMO.js → chunk-V23TPYHO.js} +5 -5
- package/dist/{chunk-BXM72C73.js → chunk-V4WNEJ63.js} +1 -1
- package/dist/chunk-VKMEQKYT.js +1 -0
- package/dist/{chunk-NNKMEF3D.js → chunk-VNYFGNHO.js} +1 -1
- package/dist/{chunk-36MUTG34.js → chunk-VWMTQLVS.js} +1 -1
- package/dist/{chunk-ZKOIGLRF.js → chunk-W7NZKU27.js} +6 -6
- package/dist/{chunk-EXMFUK3A.js → chunk-W7ZAFS7C.js} +8 -8
- package/dist/{chunk-YTGWIMXB.js → chunk-WBU7NZBP.js} +1 -1
- package/dist/{chunk-RZBHO74V.js → chunk-WQKGBPOQ.js} +1 -1
- package/dist/{chunk-AX7KPMDV.js → chunk-WSODT2L5.js} +2 -2
- package/dist/{chunk-LVSPLCGG.js → chunk-WXIEWJF7.js} +1 -1
- package/dist/{chunk-RCRI6QZV.js → chunk-X2U5XB7J.js} +1 -1
- package/dist/{chunk-PVSGQN5M.js → chunk-X7JK22X2.js} +6 -6
- package/dist/{chunk-LQQMELJM.js → chunk-XCHY6QVH.js} +7 -7
- package/dist/{chunk-CUT7PAXL.js → chunk-XFBXKKOB.js} +1 -1
- package/dist/{chunk-CMYLTCPA.js → chunk-XFIMTNUH.js} +1 -1
- package/dist/{chunk-WJEDIAG4.js → chunk-XUQQCKKD.js} +1 -1
- package/dist/{chunk-3HNK7IRJ.js → chunk-YF7A3BWA.js} +3 -3
- package/dist/chunk-YPXVOPL4.js +1 -0
- package/dist/{chunk-VHAM5TD2.js → chunk-Z4UKLPGE.js} +1 -1
- package/dist/{chunk-TW6WEYGO.js → chunk-Z5TCGLCM.js} +6 -6
- package/dist/{chunk-NSCLFAKK.js → chunk-ZI7P5YGF.js} +1 -1
- package/dist/{chunk-UFVQ7ZBP.js → chunk-ZLGU4VYO.js} +5 -5
- package/dist/{chunk-RAI3GTS6.js → chunk-ZMLRNHMS.js} +1 -1
- package/dist/{chunk-RDPUVCXR.js → chunk-ZVTOB4RE.js} +1 -1
- package/dist/{chunk-OZPYTSPD.js → chunk-ZY62UQI2.js} +15 -15
- package/dist/data/DataTable.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/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.d.ts +11 -0
- 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/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.d.ts +5 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +393 -393
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +5 -5
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/Statistic.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/ZoomableImage.d.ts +9 -1
- package/dist/shell/ZoomableImage.js +1 -1
- package/dist/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +4 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -1
- package/dist/Calculator-FHN36ZE3.js +0 -29
- package/dist/Sidebar-OFRMBB5V.js +0 -43
- package/dist/chunk-2H6PDKTC.js +0 -8
- package/dist/chunk-4PZN25MV.js +0 -20
- package/dist/chunk-73DAZUJP.js +0 -14
- package/dist/chunk-DLS2VCBK.js +0 -3
- package/dist/chunk-DNKACLRF.js +0 -11
- package/dist/chunk-DZT2O3JD.js +0 -11
- package/dist/chunk-EKWSGPJ4.js +0 -8
- package/dist/chunk-ETSKG62F.js +0 -1
- package/dist/chunk-FPDKMCQH.js +0 -8
- package/dist/chunk-JGE7S7RQ.js +0 -29
- package/dist/chunk-KPFOXLN4.js +0 -5
- package/dist/chunk-L2HZ7YXS.js +0 -14
- package/dist/chunk-OF6TUQAL.js +0 -7
- package/dist/chunk-U5KIRPLV.js +0 -2
- package/dist/chunk-VT62T6B3.js +0 -19
- package/dist/chunk-WBEMN4JG.js +0 -9
- package/dist/chunk-WDXJWC3Y.js +0 -7
- package/dist/chunk-X4EBWJWO.js +0 -1
package/dist/bin/ui-check.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{execFileSync as e}from"child_process";import{createRequire as t}from"module";import{join as n}from"path";import{existsSync as i,readFileSync as s,writeFileSync as o,readdirSync as r}from"fs";var a=["button","input","range","textarea","select","dialog","title","portal","native","dark","hex","radius","spacing","font-size","z-index","shadow","kit","icon","svg","kit-dep","chart","chart-dep","ellipsis-label"],l=e=>"string"==typeof e&&a.includes(e),c=["kit-dep","chart-dep"],d=e=>c.includes(e),u=a.filter(e=>!d(e)),h={button:{counts:"a raw <button>",instead:"Button or IconButton from efficient-shell/ui"},input:{counts:"a raw <input> (not hidden, not a range)",instead:"Input, InputNumber, Checkbox, Radio or Switch from efficient-shell/ui"},range:{counts:'a raw <input type="range">',instead:"Slider from efficient-shell/ui"},textarea:{counts:"a raw <textarea>",instead:"Textarea from efficient-shell/ui"},select:{counts:"a raw <select>",instead:"Select or SearchableSelect from efficient-shell/ui"},dialog:{counts:'a raw <dialog>, or role="dialog" / role="alertdialog" on a raw element',instead:"Dialog or Modal from efficient-shell"},title:{counts:"a title= on a raw element (the browser's own tooltip)",instead:"Tooltip from efficient-shell/ui (harness UI-17)"},portal:{counts:"a createPortal(…) call (a layer the file floats itself)",instead:"Popover, PopupMenu, DropdownMenu, Tooltip or Dialog from efficient-shell/ui"},native:{counts:"window.confirm / alert / prompt, or a bare call that resolves to one",instead:"confirm, confirmDestructive, prompt or toast from efficient-shell (harness UI-20)"},dark:{counts:"a dark: variant in a class string",instead:"the light Tailwind class alone; the shell remaps it in dark mode (harness UI-7)"},hex:{counts:"a hex colour literal in a .tsx string",instead:"a shell token or a Tailwind palette class (harness FT-1)"},radius:{counts:"a literal corner radius (an arbitrary-value radius class, or an inline borderRadius)",instead:"a radius utility from the scale or a role token such as rounded-(--radius-control); the theme sets how round they are (harness UI-7)"},spacing:{counts:"a padding, margin or gap off the scale (6px, 10px, 14px …) or written as a literal length (an arbitrary-value class, an inline style)",instead:"a step of the scale 2/4/8/12/16/20/24/32/40/48 — a Tailwind step, or a role such as var(--space-control-x) (owner ruling 2026-10-12)"},"font-size":{counts:"a literal font size (an arbitrary-value text class, an inline fontSize)",instead:"a type step 9/11/12/14/16/18/20/24/30 — Tailwind's 3xs … 3xl text steps (owner ruling 2026-10-12)"},"z-index":{counts:"a stack order above 30 written as a number (a z utility, an arbitrary value, an inline zIndex)",instead:"a named layer: Z_LAYERS (efficient-shell/ui) in code, its --z-* custom property in markup"},shadow:{counts:"a literal shadow, or a shadow size that is not an elevation level (md, 2xl, xs)",instead:"an elevation: the sm / lg / xl utilities, or var(--elevation-panel) and its siblings (owner ruling 2026-10-12)"},kit:{counts:"an import of a second UI kit",instead:"the component from efficient-shell/ui, or fold it into the shell (harness FT-3)"},icon:{counts:"an import of an icon package",instead:"<Icon name> from efficient-shell/icons, drawn by the one set (harness UI-24)"},svg:{counts:"an <svg> element written in JSX: an icon drawn in place",instead:"<Icon name> from efficient-shell/icons, drawn by the one set (harness UI-24). A chart, an illustration or a mark a host supplies stays on the baseline"},"kit-dep":{counts:"a UI kit or icon package declared in package.json (not one the shell entries imported here need)",instead:"remove the dependency once nothing imports it (harness FT-3)"},chart:{counts:"an import of a second chart library",instead:"a chart from efficient-shell/ui (ChartFrame, TimeSeriesChart, ColumnChart, RankedBars, PieChart, FunnelChart, ScatterChart, …), or add the chart there: one chart system (harness FT-3)"},"chart-dep":{counts:"a chart library declared in package.json",instead:"remove the dependency once nothing imports it (harness FT-3)"},"ellipsis-label":{counts:'a button, link or menu label that ends in "…" or "..."',instead:'the label without the dots, saying what it does ("Extend trial"): "…" means only "the words are cut" (owner ruling 2026-10-14)'}},p=["@headlessui/","@radix-ui/","@mui/","@chakra-ui/","@mantine/","@floating-ui/","antd","react-aria","react-aria-","react-bootstrap","react-select","react-colorful","react-tooltip","react-hot-toast","react-toastify","sonner"],f=["@heroicons/","@tabler/icons","@tabler/icons-","@phosphor-icons/","@fortawesome/","@iconify/","@radix-ui/react-icons","@mui/icons-material","lucide","lucide-react","simple-icons","react-icons","react-feather"],m=["recharts","chart.js","react-chartjs-2","d3","d3-","@nivo/","victory","victory-","echarts","echarts-for-react","apexcharts","react-apexcharts","@visx/","highcharts","highcharts-react-official","plotly.js","plotly.js-dist","react-plotly.js","lightweight-charts","@antv/g2","@antv/g2plot","chartist","billboard.js","c3","uplot"],g={"efficient-shell":["@headlessui/react"]};function w(e,t){return t.some(t=>t.endsWith("/")||t.endsWith("-")?e.startsWith(t):e===t||e.startsWith(`${t}/`))}function k(e){return w(e,f)?"icon":w(e,p)?"kit":w(e,m)?"chart":null}function x(e){const t=k(e);return"kit"===t||"icon"===t?"kit-dep":"chart"===t?"chart-dep":null}var $=/[.+^$()|[\]\\]/g;function b(e){let t="",n=0;for(let i=0;i<e.length;i++){const s=e[i];"*"===s?"*"===e[i+1]?"/"===e[i+2]?(t+="(?:[^/]+/)*",i+=2):(t+=".*",i+=1):t+="[^/]*":"?"===s?t+="[^/]":"{"===s?(t+="(?:",n+=1):"}"===s&&n>0?(t+=")",n-=1):t+=","===s&&n>0?"|":s.replace($,"\\$&")}if(0!==n)throw new Error(`unbalanced { in glob "${e}"`);return new RegExp(`^${t}$`)}function y(e){const t=e.map(b);return e=>t.some(t=>t.test(e))}var v=new Set(["node_modules",".git"]),S=new Set(["dist","coverage",".next",".turbo"]);function j(e){const t=e.search(/[*?{]/),n=-1===t?e:e.slice(0,t),i=n.lastIndexOf("/");return-1===i?"":n.slice(0,i)}function I(e,t){const i=y(t),s=[...new Set(t.map(j))].sort(),o=s.filter(e=>!s.some(t=>t!==e&&(""===t||e.startsWith(`${t}/`)))),a=new Set,l=t=>{let s;try{s=r(n(e,t),{withFileTypes:!0})}catch{return}for(const e of s){const n=t?`${t}/${e.name}`:e.name;e.isDirectory()?v.has(e.name)||""===t&&S.has(e.name)||l(n):e.isFile()&&i(n)&&a.add(n)}};for(const e of o)l(e);return[...a].sort(L)}var L=(e,t)=>e<t?-1:e>t?1:0,z=class extends Error{},R=(e,t)=>`${e}:${t}`;function E(e){const t=e.lastIndexOf(":");return{file:e.slice(0,t),kind:e.slice(t+1)}}var T=e=>a.indexOf(e);function A(e,t){const n=E(e),i=E(t);return L(n.file,i.file)||T(n.kind)-T(i.kind)}function C(e,t="ui-kit.baseline.json"){let n;try{n=JSON.parse(e)}catch(e){throw new z(`${t} is not valid JSON: ${e.message}`)}const i=e=>{throw new z(`${t}: ${e}. The tool writes this file; do not edit it by hand.`)};if("object"!=typeof n||null===n||Array.isArray(n))return i("must be a JSON object");const s=n;if(1!==s.schema)return i("number"==typeof s.schema&&s.schema>1?`"schema": ${s.schema} is newer than this efficient-shell reads (1); upgrade efficient-shell`:'"schema" must be 1');if(!Array.isArray(s.kinds)||s.kinds.some(e=>"string"!=typeof e))return i('"kinds" must be a list');const o=s.kinds.filter(l);if("object"!=typeof s.counts||null===s.counts||Array.isArray(s.counts))return i('"counts" must be an object');const r=new Map;for(const[e,t]of Object.entries(s.counts)){const{file:n,kind:s}=E(e);if(!n||!s)return i(`"${e}" is not "<file>:<kind>"`);if("number"!=typeof t||!Number.isInteger(t)||t<1)return i(`"${e}" must be a whole number, 1 or more (a line that reaches 0 is deleted)`);l(s)&&r.set(e,t)}return{kinds:o,counts:r}}function M(e){const t=a.filter(t=>e.kinds.includes(t)),n=[...e.counts.keys()].filter(t=>(e.counts.get(t)??0)>0).sort(A).map(t=>` ${JSON.stringify(t)}: ${e.counts.get(t)}`);return["{",' "schema": 1,',` "kinds": [${t.map(e=>JSON.stringify(e)).join(", ")}],`,n.length?` "counts": {\n${n.join(",\n")}\n }`:' "counts": {}',"}",""].join("\n")}function B(e){const t={};for(const[n,i]of e){const{kind:e}=E(n);l(e)&&(t[e]=(t[e]??0)+i)}return t}var P=class extends Error{},N=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),D=new Set(["$schema","schema","kinds","include","exclude","includeImporting","output","allow"]);var O="package.json",F=[2,4,8,12,16,20,24,32,40,48];function J(e){if("0"===e||"px"===e)return!0;const t=Number(e);return!!Number.isFinite(t)&&F.includes(4*t)}var U=new Set(["iframe","frame","object","embed"]),W=new Set(["href","xlinkHref","to","id","key","htmlFor"]),q=/(?<![&\w])(?<!url\()#(?:[0-9a-fA-F]{8}|[0-9a-fA-F]{6}|[0-9a-fA-F]{3,4})(?![\w-])/g,_=/(?<![\w-])rounded(?:-(?:[trblse]|tl|tr|br|bl|ss|se|ee|es))?-\[([^\]]*)\]/g,G=/^border(?:(?:Top|Bottom)(?:Left|Right)|(?:Start|End)(?:Start|End))?Radius$/,K=/^(?:inherit|initial|unset|revert)$|var\(|^(?:50|100)%$|^(?:999|9999)(?:px)?$/,H=/(?<![\w-])-?(?:p|px|py|pt|pr|pb|pl|ps|pe|m|mx|my|mt|mr|mb|ml|ms|me|gap|gap-x|gap-y|space-x|space-y)-(\d+(?:\.\d+)?|px|\[[^\]]*\])(?![\w.[/-])/g,Q=/(?<![\w-])text-\[(?:length:)?(\d*\.?\d+(?:px|rem|em|%))\]/g,V=/(?<![\w-])z-(\d+|\[[^\]]*\])(?![\w.[/-])/g,X=/(?<![\w-])shadow-(xs|2xs|md|2xl|\[[^\]]*\])(?![\w.[/-])/g,Y=/var\(|^(?:inherit|initial|unset|revert|revert-layer|none|auto)$/,Z=/^(?:(?:padding|margin)(?:Top|Right|Bottom|Left|Inline|Block|InlineStart|InlineEnd|BlockStart|BlockEnd)?|gap|rowGap|columnGap)$/,ee=new Set([0,...F]),te=/(?<![\w-])dark:(?=[\w[\-!@*(])/g,ne=new Set(["button","a","option","Button","IconButton","SplitButton","Link","NavLink","PopupMenuItem","PopupMenuLabel","DropdownMenuItem","MenuItem","ContextMenuItem"]),ie=/(?:…|\.\.\.|…)\s*$/,se=new RegExp("\\p{L}","u"),oe=new RegExp("\\p{L}[\\p{L}-]*","u"),re={busy:{words:["Accepting","Adding","Applying","Approving","Arranging","Asking","Assigning","Booking","Building","Calculating","Cancelling","Capturing","Changing","Checking","Choosing","Closing","Combining","Comparing","Completing","Confirming","Connecting","Converting","Copying","Correcting","Counting","Creating","Deleting","Detaching","Downloading","Drawing","Duplicating","Emailing","Ending","Exporting","Fetching","Filing","Finding","Flushing","Generating","Grouping","Importing","Linking","Loading","Locating","Looking","Making","Marking","Matching","Measuring","Merging","Moving","Opening","Ordering","Paying","Pending","Posting","Preparing","Previewing","Pricing","Processing","Provisioning","Publishing","Purging","Pushing","Queued","Queuing","Quoting","Re-booking","Re-importing","Re-opening","Reading","Rebooting","Rebuilding","Receiving","Reconciling","Reconnecting","Recording","Refreshing","Refunding","Regenerating","Registering","Reinstating","Rejecting","Removing","Reopening","Requesting","Resending","Resetting","Resolving","Restarting","Restoring","Resuming","Retrying","Reversing","Reverting","Running","Saving","Searching","Sending","Setting","Settling","Sharing","Signing","Splitting","Starting","Submitting","Suggesting","Switching","Syncing","Taking","Testing","Transferring","Typing","Updating","Uploading","Verifying","Waiting","Withdrawing","Working"],zhStarts:["正在"],zhEnds:["中"]},placeholder:{},prompt:{}},ae=new Set((re.busy?.words??[]).map(e=>e.toLowerCase())),le=new Set(["label","aria-label",...re.placeholder?[]:["placeholder","searchPlaceholder","emptyOptionLabel","blankLabel"]]),ce=(e,t)=>{if(!ie.test(t)||!se.test(e))return!1;const n=e.match(oe)?.[0]?.toLowerCase();if(n&&ae.has(n))return!1;const i=e.replace(ie,"").trim(),s=re.busy;return!(s&&(s.zhStarts.some(e=>i.startsWith(e))||s.zhEnds.some(e=>i.endsWith(e))))},de=new Set(["confirm","alert","prompt"]),ue=new Set(["window","globalThis","self"]);function he(e,t,n,i,s){const o=new Set(i),r=e.createSourceFile(t,n,e.ScriptTarget.Latest,!0,function(e,t){return t.endsWith(".tsx")?e.ScriptKind.TSX:t.endsWith(".jsx")?e.ScriptKind.JSX:/\.[cm]?js$/.test(t)?e.ScriptKind.JS:e.ScriptKind.TS}(e,t)),a={},l=/\.[jt]sx$/.test(t),c=e=>r.getLineAndCharacterOfPosition(e).line+1,d=(e,t)=>{o.has(e)&&(a[e]??=[]).push(c(t.getStart(r)))},u=(t,n)=>t.attributes.properties.find(t=>e.isJsxAttribute(t)&&t.name.getText(r)===n),h=t=>{const n=t?.initializer;if(n)return e.isStringLiteral(n)?n.text:e.isJsxExpression(n)&&n.expression&&e.isStringLiteralLike(n.expression)?n.expression.text:void 0},p=new Set;if(o.has("native")){const t=n=>{if(n)if(e.isIdentifier(n))de.has(n.text)&&p.add(n.text);else if(e.isObjectBindingPattern(n)||e.isArrayBindingPattern(n))for(const i of n.elements)e.isBindingElement(i)&&t(i.name)},n=i=>{(e.isImportClause(i)||e.isImportSpecifier(i)||e.isNamespaceImport(i)||e.isVariableDeclaration(i)||e.isParameter(i)||e.isFunctionDeclaration(i))&&t(i.name),e.forEachChild(i,n)};n(r)}const f=t=>t&&e.isStringLiteralLike(t)?t.text:void 0,m=(e,t)=>{e&&("efficient-shell"===e||e.startsWith("efficient-shell/"))&&s?.add(e);const n=e?k(e):null;n&&d(n,t)},g=(e,t,n)=>{if(o.has("dark"))for(const n of e.matchAll(te))d("dark",t);if(o.has("radius"))for(const n of e.matchAll(_))K.test(n[1].trim())||d("radius",t);if(n&&l&&o.has("hex"))for(const n of e.matchAll(q))d("hex",t);if(o.has("spacing"))for(const n of e.matchAll(H)){const e=n[1];(e.startsWith("[")?Y.test(e.slice(1,-1).trim()):J(e))||d("spacing",t)}if(o.has("font-size"))for(const n of e.matchAll(Q))d("font-size",t);if(o.has("z-index"))for(const n of e.matchAll(V)){const e=n[1].startsWith("[")?n[1].slice(1,-1).trim():n[1];/^\d+$/.test(e)&&Number(e)>30&&d("z-index",t)}if(o.has("shadow"))for(const n of e.matchAll(X))n[1].startsWith("[")&&Y.test(n[1].slice(1,-1).trim())||d("shadow",t)},w=(t,n,i)=>{const s=e.isStringLiteralLike(n)?n.text.trim():void 0;if(o.has("spacing")&&Z.test(t))e.isNumericLiteral(n)?ee.has(Number(n.text))||d("spacing",i):void 0!==s&&!Y.test(s)&&(e=>[...e.matchAll(/(-?\d*\.?\d+)(px|rem|em)\b/g)].map(e=>Math.abs(Number(e[1]))*("px"===e[2]?1:16)))(s).some(e=>!ee.has(e))&&d("spacing",i);else if(o.has("font-size")&&"fontSize"===t)(e.isNumericLiteral(n)||void 0!==s&&!Y.test(s)&&!/^(?:smaller|larger)$/.test(s))&&d("font-size",i);else if(o.has("z-index")&&"zIndex"===t){const t=[],s=n=>{e.isNumericLiteral(n)||e.isStringLiteralLike(n)&&/^\d+$/.test(n.text.trim())?t.push(Number(n.text)):e.forEachChild(n,s)};s(n);for(const e of t)e>30&&d("z-index",i)}else o.has("shadow")&&"boxShadow"===t&&(void 0===s||""===s||Y.test(s)||d("shadow",i))},x=(t,n)=>{if(e.isJsxOpeningElement(t)||e.isJsxSelfClosingElement(t)){const e=t.tagName.getText(r);if(/^[a-z]/.test(e)){const n=h(u(t,"type"));"svg"===e&&d("svg",t),"button"===e?d("button",t):"select"===e?d("select",t):"textarea"===e?d("textarea",t):"input"===e&&("range"===n?d("range",t):"hidden"!==n&&d("input",t));const i=h(u(t,"role"));"dialog"!==e&&"dialog"!==i&&"alertdialog"!==i||d("dialog",t),!U.has(e)&&u(t,"title")&&d("title",t)}}else if(e.isCallExpression(t)){const n=t.expression;e.isIdentifier(n)?"createPortal"===n.text?d("portal",t):de.has(n.text)&&!p.has(n.text)?d("native",t):"require"===n.text&&m(f(t.arguments[0]),t):e.isPropertyAccessExpression(n)?"createPortal"===n.name.text?d("portal",t):de.has(n.name.text)&&e.isIdentifier(n.expression)&&ue.has(n.expression.text)&&d("native",t):n.kind===e.SyntaxKind.ImportKeyword&&m(f(t.arguments[0]),t)}else{if(e.isImportDeclaration(t)||e.isExportDeclaration(t))return void m(f(t.moduleSpecifier),t);if(e.isPropertyAssignment(t)){const n=e.isIdentifier(t.name)||e.isStringLiteralLike(t.name)?t.name.text:"",i=t.initializer;w(n,i,t),o.has("radius")&&G.test(n)&&(e.isNumericLiteral(i)?K.test(i.text)||d("radius",t):e.isStringLiteralLike(i)&&!K.test(i.text.trim())&&d("radius",t))}else if(e.isStringLiteralLike(t))g(t.text,t,n);else if(e.isTemplateExpression(t)){g(t.head.text,t.head,n);for(const e of t.templateSpans)g(e.literal.text,e.literal,n)}}e.isJsxAttribute(t)&&W.has(t.name.getText(r))?e.forEachChild(t,e=>x(e,!1)):e.forEachChild(t,e=>x(e,n))};return x(r,!0),o.has("ellipsis-label")&&function(e,t,n){const i=new Set,s=(e,t)=>{i.has(e)||(i.add(e),n(t))},o=n=>{if(n)if(e.isStringLiteralLike(n))ce(n.text,n.text)&&s(n,n.getStart(t));else if(e.isTemplateExpression(n)){const e=[n.head.text,...n.templateSpans.map(e=>e.literal.text)];ce(e.join(" "),e[e.length-1])&&s(n,n.getStart(t))}else e.isConditionalExpression(n)?(o(n.whenTrue),o(n.whenFalse)):e.isBinaryExpression(n)?(o(n.left),o(n.right)):e.isParenthesizedExpression(n)||e.isAsExpression(n)||e.isJsxExpression(n)?o(n.expression):e.isCallExpression(n)&&pe.has(fe(n.expression))&&n.arguments[0]&&o(n.arguments[0])},r=n=>{for(const i of n)if(e.isJsxText(i)){const e=i.getText(t);ce(e,e)&&s(i,i.getStart(t)+(e.length-e.trimStart().length))}else e.isJsxExpression(i)?o(i.expression):(e.isJsxElement(i)||e.isJsxFragment(i))&&r(i.children)},a=(n,i)=>{const s=n.attributes.properties.find(n=>e.isJsxAttribute(n)&&n.name.getText(t)===i),o=s?.initializer;return o&&e.isStringLiteral(o)?o.text:o&&e.isJsxExpression(o)&&o.expression&&e.isStringLiteralLike(o.expression)?o.expression.text:void 0},l=t=>t.properties.some(t=>e.isPropertyAssignment(t)&&(e.isIdentifier(t.name)||e.isStringLiteralLike(t.name))&&"value"===t.name.text&&e.isStringLiteralLike(t.initializer)&&""===t.initializer.text),c=n=>{if(e.isJsxElement(n)){const e=n.openingElement,i=e.tagName.getText(t),s="option"===i&&re.prompt&&""===a(e,"value");ne.has(i)&&!s&&r(n.children)}else if(e.isJsxAttribute(n))le.has(n.name.getText(t))&&o(n.initializer);else if(e.isPropertyAssignment(n)){const t=e.isIdentifier(n.name)||e.isStringLiteralLike(n.name)?n.name.text:"",i=re.prompt&&e.isObjectLiteralExpression(n.parent)&&l(n.parent);le.has(t)&&!i&&o(n.initializer)}e.forEachChild(n,c)};c(t)}(e,r,e=>(a["ellipsis-label"]??=[]).push(c(e))),a}var pe=new Set(["say","t"]),fe=e=>{const t=e.getText();return t.slice(t.lastIndexOf(".")+1)};function me(e){const t={};for(const[n,i]of Object.entries(e))i.length&&(t[n]=i.length);return t}function ge(e,t,n){const i=e.createSourceFile(t,n,e.ScriptTarget.Latest,!1),s=[];for(const t of i.statements)(e.isImportDeclaration(t)||e.isExportDeclaration(t))&&t.moduleSpecifier&&e.isStringLiteralLike(t.moduleSpecifier)&&s.push(t.moduleSpecifier.text);return s}var we=(e,t)=>e.some(e=>t.some(t=>t.endsWith("/*")?e.startsWith(t.slice(0,-1)):e===t));var ke=e=>new Map(e.allow.map(e=>[R(e.file,e.kind),e.count]));function xe(e,t){return e.kinds.filter(e=>t.kinds.includes(e))}var $e=(e,t,n)=>{if("kit-dep"===n)return` (${e.kitDeps.join(", ")})`;if("chart-dep"===n)return` (${e.chartDeps.join(", ")})`;const i=e.hits.get(t)?.[n]??[];if(0===i.length)return"";const s=i.slice(0,12).join(", ");return` (line${1===i.length?"":"s"} ${s}${i.length>12?", …":""})`};function be(e,t,n){const i=ke(e),s=new Map;for(const[e,o]of t.counts){const{kind:t}=E(e);if(!l(t)||!n.includes(t))continue;const r=o-(i.get(e)??0);r>0&&s.set(e,r)}return{kinds:a.filter(e=>n.includes(e)),counts:s}}function ye(e,t){let n=0;for(const i of new Set([...e.keys(),...t.keys()]))(e.get(i)??0)!==(t.get(i)??0)&&(n+=1);return n}var ve="\n// <button> in a comment is not a button, and <svg> in one is not a drawing\n/* nor is <input title=\"x\"> in this one, or dark:bg-black, or #fff */\nimport { createPortal } from 'react-dom';\nimport { Dialog } from '@headlessui/react';\nimport { TrashIcon } from '@heroicons/react/24/outline';\nimport type { Icon } from 'lucide-react';\nimport { Button, confirm } from 'efficient-shell';\nexport { Slot } from '@radix-ui/react-slot';\nexport { CheckIcon } from '@radix-ui/react-icons';\nimport { LineChart } from 'recharts';\nimport 'd3-scale';\nexport { VictoryPie } from 'victory';\nimport { BarChart } from '@mui/x-charts';\nimport Tree from 'react-d3-tree';\nimport { TimeSeriesChart } from 'efficient-shell/ui';\n// import 'chart.js' in a comment is not an import, and 'echarts' in a string is not one either\nconst chartLabel = 'd3-array';\n\nconst a = <button title=\"Says what it does\">x</button>;\nconst b = <input type=\"range\" />;\nconst c = <input type=\"text\" />;\nconst c2 = <input type={\"hidden\"} name=\"csrf\" />;\nconst c3 = <input type=\"hidden\" />;\nconst c4 = <input type={kind} />;\nconst d = <select />;\nconst d2 = <textarea />;\nconst e = <div role=\"dialog\" />;\nconst e2 = <dialog open />;\nconst e3 = <section role={'alertdialog'} />;\nconst f = <iframe title=\"Preview\" />;\nconst f2 = <object title=\"Chart\" />;\nconst g = <Button title=\"a prop, not a tooltip\" role=\"dialog\" />;\nconst g2 = (\n <button\n type=\"button\"\n title={hint}\n >\n y\n </button>\n);\nconst h = ReactDOM.createPortal(a, document.body);\nconst i = createPortal(a, document.body);\n\nasync function leave() {\n if (window.confirm('Sure?')) return;\n globalThis.alert('No');\n alert('native: nothing binds the name');\n prompt('native too');\n await confirm('the shell: the import binds it');\n record.confirm('a method, not the popup');\n}\n\nconst j = <div className=\"bg-white dark:bg-black dark:hover:text-white is-dark:no\" />;\nconst k = clsx('text-gray-900', on && 'dark:text-gray-100');\nconst l = <span style={{ color: '#fff', background: \"#12ab34\" }} className={`border-[#0a0b0c80] ${x}`} />;\nconst m = <a href=\"#faded\" id=\"#bad\" key=\"#abc\" to=\"#face\">skip</a>;\nconst n = <label htmlFor={'#dead'}>skip</label>;\nconst o = <span>Ӓ and BG#00340 and #12345 and #added are not colours</span>;\nconst p = 'entity  ref BG#00340';\nconst q = <use xlinkHref=\"#abc\" fill=\"url(#fed)\" />;\nconst t = <div className=\"rounded-[4px] rounded-t-[0.5rem] hover:rounded-[2px] rounded-lg rounded-(--radius-card) rounded-[inherit] rounded-[var(--r)]\" />;\nconst u = <div style={{ borderRadius: 6, borderTopLeftRadius: '3px', borderBottomRightRadius: '50%', borderEndEndRadius: 'var(--radius-card)' }} />;\nconst v = <i style={{ borderRadius: 9999 }} />;\nconst w = <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M4 4h16\" /></svg>;\nconst w2 = <Svg viewBox=\"0 0 24 24\" />;\nconst w3 = '<svg viewBox=\"0 0 1 1\"></svg> in a string is not an element';\nconst r = lazy(() => import('@mui/material'));\nconst s = require('react-select');\nconst s2 = require('chart.js/auto');\nconst s3 = import('@nivo/line');\n",Se={button:2,input:2,range:1,textarea:1,select:1,dialog:3,title:2,portal:2,native:4,dark:3,hex:3,radius:5,kit:5,icon:3,svg:1,chart:5},je={kit:1,dark:1,portal:1,radius:2,chart:1},Ie=(...e)=>e.join("-"),Le=`\nconst s1 = <i className="${[Ie("px","2.5"),Ie("py","1.5"),"md:"+Ie("gap","1.5"),"-"+Ie("mt","1.5"),Ie("p","[10px]")].join(" ")}" />;\nconst s2 = <i className="${[Ie("p","0"),Ie("px","px"),Ie("p","0.5"),Ie("p","3"),Ie("gap-x","4"),Ie("p","12"),Ie("p","(--space-12)"),Ie("p","[var(--space-12)]"),Ie("space-x","reverse"),Ie("top","1.5")].join(" ")}" />;\nconst s3 = <i style={{ padding: 6, marginTop: '10px', gap: 8, margin: '0 auto', paddingInline: 'var(--space-12)' }} />;\nconst f1 = <i className="${[Ie("text","[11px]"),Ie("text","[0.8rem]"),Ie("text","xs"),Ie("text","[#fff]"),Ie("text","(--text-2xs)")].join(" ")}" />;\nconst f2 = <i style={{ fontSize: 12 }} />;\nconst f3 = { fontSize: 'var(--x)', font: 'inherit' };\nconst z1 = <i className="${[Ie("z","[9999]"),Ie("z","50"),Ie("z","10"),Ie("z","30"),"-"+Ie("z","10"),Ie("z","auto"),Ie("z","(--z-popup)"),Ie("z","[var(--z-popup)]")].join(" ")}" />;\nconst z2 = { zIndex: on ? 2020 : 2010 };\nconst z3 = { zIndex: Z_LAYERS.popup, top: 9999 };\nconst h1 = <i className="${[Ie("shadow","[0_1px_2px_#000]"),Ie("shadow","md"),"shadow",Ie("shadow","lg"),Ie("shadow","(--elevation-panel)"),Ie("shadow","black/20"),Ie("drop-shadow","md")].join(" ")}" />;\nconst h2 = { boxShadow: '0 1px 2px rgba(0,0,0,.1)' };\nconst h3 = { boxShadow: 'none', outline: 'var(--elevation-raised)' };\n`,ze={spacing:7,"font-size":3,"z-index":4,shadow:3,hex:1},Re={"ellipsis-label":9},Ee=e=>a.filter(t=>e[t]).map(t=>`${t} ${e[t]}`).join(", ")||"nothing";var Te="ui-kit.config.json",Ae="ui-kit.baseline.json",Ce="efficient-shell-ui-check",Me=`${Ce}: every surface a person operates takes its UI from efficient-shell (harness UI-24).\n\n ${Ce} check this repository against ${Ae}\n ${Ce} --print print today's counts as a baseline, and change nothing\n ${Ce} --summary print totals per kind and per folder, as Markdown\n ${Ce} --json print the result as JSON\n ${Ce} --update lower the lines whose counts fell, and delete the ones at zero\n ${Ce} --update --allow-move also follow a renamed or split file (no total may rise)\n ${Ce} --init write the first ${Ae}\n ${Ce} --init --kind <kind> take the baseline for a kind just added to "kinds"\n ${Ce} --no-base do not compare with the pull request's base branch\n\nKinds: ${a.join(", ")}\nReads ${Te} in the current directory.`;var Be=(e,t)=>`${e} ${t}${1===e?"":"s"}`,Pe=(e,t)=>{const n=B(e);return t.map(e=>`${e} ${n[e]??0}`).join(" · ")};process.exitCode=function(e,t){const r=function(e){const t={print:!1,summary:!1,json:!1,update:!1,allowMove:!1,init:!1,noBase:!1,help:!1,version:!1,kinds:[]};for(let n=0;n<e.length;n++){const i=e[n];if("--print"===i)t.print=!0;else if("--summary"===i)t.summary=!0;else if("--json"===i)t.json=!0;else if("--update"===i)t.update=!0;else if("--allow-move"===i)t.allowMove=!0;else if("--init"===i)t.init=!0;else if("--no-base"===i)t.noBase=!0;else if("--help"===i||"-h"===i)t.help=!0;else if("--version"===i||"-v"===i)t.version=!0;else if("--kind"===i){const i=e[++n];if(!i)return"--kind needs a kind after it";t.kinds.push(...i.split(","))}else{if(!i.startsWith("--kind="))return`unknown argument "${i}"`;t.kinds.push(...i.slice(7).split(","))}}return t.allowMove&&!t.update?"--allow-move goes with --update":t.kinds.length&&!t.init?"--kind goes with --init":[t.print,t.summary,t.update,t.init].filter(Boolean).length>1?"choose one of --print, --summary, --update and --init":t}(e);if("string"==typeof r)return t.err(`${Ce}: ${r}\n\n${Me}`),2;if(r.help)return t.out(Me),0;if(r.version)return t.out(t.version),0;const c=e=>(r.json?t.out(JSON.stringify({tool:Ce,version:t.version,ok:!1,failures:[e]},null,2)):t.err(`${Ce}: ${e}`),1),p=n(t.cwd,Te);if(!i(p))return c(`no ${Te} in ${t.cwd}. Run it from the repository root; the harness has the template.`);let f,m;try{f=function(e,t="ui-kit.config.json"){const n=[],i=e=>{n.push(e)},s=(e,t,{required:n=!1}={})=>{if(void 0===e&&!n)return[];if(!Array.isArray(e)||e.some(e=>"string"!=typeof e||""===e))return i(`${t} must be a list of non-empty strings`),[];n&&0===e.length&&i(`${t} must name at least one entry`);for(const n of e)(n.startsWith("/")||n.startsWith("./")||n.includes("\\")||n.split("/").includes(".."))&&i(`${t}: "${n}" must be a path from the repository root, written with / (no ./, .. or \\)`);return e},o=(e,t)=>"string"!=typeof e||e.trim().length<10?(i(`${t} needs a "reason" a reviewer can read (a sentence, not a word)`),""):e,r=(e,t)=>void 0===e?[]:!Array.isArray(e)||e.some(e=>!N(e))?(i(`${t} must be a list of objects`),[]):e;if(!N(e))throw new P(`${t}: must be a JSON object`);for(const t of Object.keys(e))D.has(t)||i(`unknown key "${t}"`);1!==e.schema&&i("number"==typeof e.schema&&e.schema>1?`"schema": ${e.schema} is newer than this efficient-shell reads (1); upgrade efficient-shell`:'"schema" must be 1');const c=[];if(Array.isArray(e.kinds)&&0!==e.kinds.length)for(const t of e.kinds)l(t)?c.includes(t)?i(`"kinds": "${t}" is listed twice`):c.push(t):i(`"kinds": unknown kind ${JSON.stringify(t)} (this efficient-shell knows: ${a.join(", ")})`);else i(`"kinds" must list the kinds this repository checks, from: ${a.join(", ")}`);const d=s(e.include,'"include"'),u=s(e.exclude,'"exclude"'),h=r(e.includeImporting,'"includeImporting"').map((e,t)=>({files:s(e.files,`"includeImporting"[${t}].files`,{required:!0}),modules:s(e.modules,`"includeImporting"[${t}].modules`,{required:!0}),reason:o(e.reason,`"includeImporting"[${t}]`)}));0===d.length&&0===h.length&&i('"include" must name the files that are operator UI (for example ["src/**/*.tsx"])');const p=r(e.output,'"output"').map((e,t)=>({files:s(e.files,`"output"[${t}].files`,{required:!0}),reason:o(e.reason,`"output"[${t}]`)})),f=[],m=new Set;if(r(e.allow,'"allow"').forEach((e,t)=>{const n=`"allow"[${t}]`,[r]=s([e.file],`${n}.file`),d=o(e.reason,n);if(!l(e.kind))return void i(`${n}.kind must be one of: ${a.join(", ")}`);if(c.includes(e.kind)||i(`${n}: kind "${e.kind}" is not in "kinds"`),"number"!=typeof e.count||!Number.isInteger(e.count)||e.count<1)return void i(`${n}.count must be a whole number, 1 or more`);if(!r)return;const u=`${r}:${e.kind}`;m.has(u)&&i(`${n}: ${r} already has an allow entry for "${e.kind}"`),m.add(u),f.push({file:r,kind:e.kind,count:e.count,reason:d})}),n.length)throw new P(`${t}:\n - ${n.join("\n - ")}`);return{schema:1,kinds:a.filter(e=>c.includes(e)),include:d,exclude:u,includeImporting:h,output:p,allow:f}}(JSON.parse(s(p,"utf8")),Te)}catch(e){return c(e instanceof P?e.message:`${Te} is not valid JSON: ${e.message}`)}try{m=t.loadTypeScript()}catch{return c('this check reads the TypeScript AST and found no "typescript" package here. Install it as a devDependency.')}const w=function(e){const t=[],n=u,i=[["fixture.tsx",ve,Se],["fixture.ts","\nimport { toast } from 'sonner';\nimport { extent } from 'd3-array';\nexport const tone = { warn: '#f59e0b' };\nexport const cls = 'ring-1 dark:ring-white rounded-[3px]';\nexport const box = { borderRadius: '0.25rem', radius: 4 };\nexport function ask(confirm: (message: string) => boolean) {\n return confirm('a parameter binds the name');\n}\nexport const mount = (node: unknown) => ReactDOM.createPortal(node, document.body);\n",je],["tokens.tsx",Le,ze],["labels.tsx","\n// <Button>Save…</Button> in a comment is not a label\nconst l1 = <Button>Extend trial…</Button>;\nconst l2 = <PopupMenuItem onClick={go}><span>Read from a PDF...</span></PopupMenuItem>;\nconst l3 = <Button>{busy ? 'Saving…' : 'Duplicate site…'}</Button>;\nconst l4 = <Item label=\"Translate…\" aria-label={'More…'} />;\nconst l5 = [{ label: 'Reject…' }, { value: CUSTOM, label: 'Custom…' }];\nconst l6 = <option value={CUSTOM}>Different address…</option>;\nconst l7 = <PopupMenuLabel>{say(\"Duplicate to page…\")}</PopupMenuLabel>;\nconst n7 = <Button>{t('team:menu.remove')}</Button>;\nconst n1 = <Button>{`${name.slice(0, 9)}…`}</Button>;\nconst n2 = <p>Loading weather…</p>;\nconst n3 = <Input placeholder=\"Search…\" />;\nconst n4 = <option value=\"\">Pick a carrier…</option>;\nconst n5 = [{ value: '', label: 'Select…' }];\nconst n6 = <Button>Extend trial</Button>;\n",Re]];for(const[s,o,r]of i){const i=me(he(e,s,o,n));n.some(e=>(i[e]??0)!==(r[e]??0))&&t.push(`${s}: read ${Ee(i)}; it holds ${Ee(r)}`)}const s=me(he(e,"fixture.tsx",ve,["button"]));return"button"!==Object.keys(s).join()&&t.push(`asked for button alone, the reader reported ${Ee(s)}`),t}(m);if(w.length)return c(`the reader misread its own fixtures with typescript ${m.version}, so nothing it says about this repository can be trusted:\n - `+w.join("\n - "));const k=function(e,t,o){const r=[],a=y(o.exclude),l=y(o.output.flatMap(e=>e.files)),c=new Map,u=e=>{let i=c.get(e);return void 0===i&&c.set(e,i=s(n(t,e),"utf8")),i},h=(e,n)=>{for(const i of e)0===I(t,[i]).length&&r.push(`${n}: "${i}" matches no file. Delete the line, or fix the path.`)};h(o.include,'"include"'),o.output.forEach((e,t)=>h(e.files,`"output"[${t}]`)),o.includeImporting.forEach((e,t)=>h(e.files,`"includeImporting"[${t}]`));const p=new Set,f=e=>(e=>/\.(?:[cm]?[jt]s|[jt]sx)$/.test(e)&&!e.endsWith(".d.ts"))(e)&&!a(e)&&!l(e);for(const e of I(t,o.include))f(e)&&p.add(e);for(const n of o.includeImporting)for(const i of I(t,n.files))f(i)&&!p.has(i)&&we(ge(e,i,u(i)),n.modules)&&p.add(i);const m=[...p].sort(),w=o.kinds.filter(e=>!d(e)),k=new Map,$=new Map,b=new Set;for(const t of m){const n=he(e,t,u(t),w,b);let i=!1;for(const e of w){const s=n[e]?.length??0;s&&($.set(R(t,e),s),i=!0)}i&&k.set(t,n)}let v=[],S=[],j=[];const L=o.kinds.filter(d);if(L.length){const e=n(t,O);if(i(e)){const t=JSON.parse(s(e,"utf8")),n=["dependencies","peerDependencies","optionalDependencies"].flatMap(e=>Object.keys(t[e]??{})),i=new Set([...b].flatMap(e=>g[e]??[])),r=[...new Set(n)].sort();if(o.kinds.includes("kit-dep")){const e=r.filter(e=>"kit-dep"===x(e));v=e.filter(e=>!i.has(e)),S=e.filter(e=>i.has(e)),v.length&&$.set(R(O,"kit-dep"),v.length)}o.kinds.includes("chart-dep")&&(j=r.filter(e=>"chart-dep"===x(e)),j.length&&$.set(R(O,"chart-dep"),j.length))}else for(const e of L)r.push(`"kinds" includes "${e}", and there is no ${O} here to read.`)}for(const e of o.allow)(d(e.kind)?e.file===O:p.has(e.file))||r.push(`"allow": ${e.file} (${e.kind}) is not a file this check reads. Delete the entry, or fix the path.`);return{files:m,hits:k,counts:$,kitDeps:v,shellPeers:S,chartDeps:j,problems:r}}(m,t.cwd,f);if(0===k.files.length)return c(`read no files. "include" in ${Te} matches nothing, so a pass would mean nothing.`);const $=n(t.cwd,Ae),b=r.json,v=e=>{b||t.out(e)};if(r.print)return t.out(M(be(f,k,f.kinds)).trimEnd()),0;if(r.summary){for(const e of function(e,t){const n=new Map,i=new Map;for(const[e,s]of t.counts){const{file:t,kind:o}=E(e);if(!l(o))continue;const r=n.get(o)??{count:0,files:new Set};r.count+=s,r.files.add(t),n.set(o,r);const a=t.split("/"),c=a.length>2?a.slice(0,2).join("/"):2===a.length?a[0]:".",d=i.get(c)??{};d[o]=(d[o]??0)+s,i.set(c,d)}const s=e.kinds.filter(e=>n.has(e)),o=[`**UI kit check (harness UI-24):** ${new Set([...t.counts.keys()].map(e=>E(e).file)).size} of ${Be(t.files.length,"file")} still draw UI of their own.`,"","| Kind | Count | Files | The shell has |","|---|---:|---:|---|",...e.kinds.map(e=>{const t=n.get(e);return`| \`${e}\` | ${t?.count??0} | ${t?.files.size??0} | ${h[e].instead} |`})];if(s.length&&i.size){const e=e=>s.reduce((t,n)=>t+(e[n]??0),0),t=[...i].sort((t,n)=>e(n[1])-e(t[1])||(t[0]<n[0]?-1:1));o.push("",`| Folder | ${s.map(e=>`\`${e}\``).join(" | ")} | Total |`,`|---|${s.map(()=>"---:").join("|")}|---:|`,...t.map(([t,n])=>`| \`${t}\` | ${s.map(e=>n[e]??0).join(" | ")} | ${e(n)} |`))}return o}(f,k))t.out(e);return 0}let S=null;if(i($))try{S=C(s($,"utf8"),Ae)}catch(e){return c(e instanceof z?e.message:String(e))}if(r.init){const e=r.kinds.filter(e=>!l(e)||!f.kinds.includes(e));if(e.length)return c(`--kind ${e.join(", ")}: not in "kinds" in ${Te}. Add it there first.`);const t=r.kinds;if(S){if(0===t.length)return c(`${Ae} already exists, and --init would overwrite what it holds. It is for the adoption pull request only. To start checking a kind, add it to "kinds" and run --init --kind <kind>.`);const e=t.filter(e=>S.kinds.includes(e));if(e.length)return c(`the baseline was already taken for ${e.join(", ")}. Its lines only go down; use --update.`);const n=be(f,k,t);S={kinds:[...S.kinds,...t],counts:new Map([...S.counts,...n.counts])}}else{if(t.length)return c(`there is no ${Ae} yet. Run --init on its own first.`);S=be(f,k,f.kinds)}o($,M(S)),v(`${Ce}: wrote ${Ae} (${Be(S.counts.size,"line")}: ${Pe(S.counts,S.kinds)})`)}if(!S)return c(`no ${Ae}. This repository has not adopted the check yet: run ${Ce} --init, and commit the file.`);if(r.update){const e=function(e,t,n,{allowMove:i=!1}={}){const s=xe(e,t),o=be(e,n,s),r=new Map([...t.counts].filter(([e])=>s.includes(E(e).kind)));if(i){const e=B(r),n=B(o.counts),i=s.filter(t=>(n[t]??0)>(e[t]??0)).map(t=>`${t}: ${n[t]??0} across the repository, and the baseline holds ${e[t]??0}`);return i.length?{baseline:t,lowered:0,refused:i}:{baseline:o,lowered:ye(r,o.counts),refused:[]}}const a=new Map;for(const[e,t]of r){const n=Math.min(t,o.counts.get(e)??0);n>0&&a.set(e,n)}return{baseline:{kinds:s,counts:a},lowered:ye(r,a),refused:[]}}(f,S,k,{allowMove:r.allowMove});if(e.refused.length)return c(`--allow-move follows code that moved, and this is more of it than before:\n - ${e.refused.join("\n - ")}\nNothing was written.`);S=e.baseline,o($,M(S)),v(`${Ce}: ${e.lowered?`changed ${Be(e.lowered,"line")} in`:"nothing to change in"} ${Ae}`)}const j=function(e,t,n){const i=[],s=[],o=[...n.problems],r=ke(e),a=new Set(xe(e,t)),c=e.kinds.filter(e=>!t.kinds.includes(e));c.length&&o.push(`"kinds" names ${c.map(e=>`"${e}"`).join(", ")}, and the baseline was never taken for ${1===c.length?"it":"them"}. Run: efficient-shell-ui-check --init ${c.map(e=>`--kind ${e}`).join(" ")}`);const d=t.kinds.filter(t=>!e.kinds.includes(t));d.length&&s.push(`the baseline still carries ${d.map(e=>`"${e}"`).join(", ")}, which "kinds" no longer names`);const u=new Set([...n.counts.keys(),...t.counts.keys(),...r.keys()]);for(const e of[...u].sort(A)){const{file:c,kind:d}=E(e);if(!l(d)||!a.has(d))continue;const u=n.counts.get(e)??0,p=r.get(e)??0,f=t.counts.get(e)??0;u>p+f?i.push(`${c}: ${d} ${u}, and its line allows ${p+f}${$e(n,c,d)}. ${h[d].counts} is counted; use ${h[d].instead}.`):u<p?o.push(`${c}: ${d} ${u}, and "allow" in ui-kit.config.json says ${p}. ${0===u?"Delete the entry":`Lower its count to ${u}`}: an exception does not outlive what it excused.`):u<p+f&&s.push(`${c}: ${d} ${u}, and its line says ${p+f}`)}return{grown:i,shrunk:s,other:o,updateFixes:0===i.length&&0===o.length&&s.length>0}}(f,S,k),L=r.noBase?{problems:[],note:""}:function(e,t,n){const i=e.env.GITHUB_BASE_REF;if(!i)return{problems:[],note:""};const s=e.git(["rev-parse","--show-prefix"]);if(null===s)return{problems:[],note:"not a git checkout; the base branch was not compared"};const o=`origin/${i}`;if(null===e.git(["rev-parse","--verify","--quiet",`${o}^{commit}`])&&(e.git(["fetch","--no-tags","--depth=1","origin",`+refs/heads/${i}:refs/remotes/origin/${i}`]),null===e.git(["rev-parse","--verify","--quiet",`${o}^{commit}`])))return{problems:[],note:`${o} could not be fetched; the base branch was not compared`};const r=e.git(["show",`${o}:${s.trim()}${Ae}`]);if(null===r)return{problems:[],note:`${o} has no ${Ae} yet (adoption)`};let a;try{a=C(r,`${o}:${Ae}`)}catch{return{problems:[],note:`${o}'s ${Ae} could not be read; the base branch was not compared`}}const l=B(a.counts),c=B(t.counts);return{problems:n.filter(e=>a.kinds.includes(e)&&(c[e]??0)>(l[e]??0)).map(e=>`${Ae} holds ${c[e]??0} of "${e}", and ${o} holds ${l[e]??0}. The baseline only goes down: use ${h[e].instead}. A count that is meant to stay goes in "allow" in ${Te}, with its reason.`),note:`compared with ${o}`}}(t,S,f.kinds),T=f.kinds.filter(e=>S.kinds.includes(e)),F=`${Ce} --update`,J=[...j.other,...j.grown,...j.shrunk.map(e=>`${e}. Run: ${F}`),...L.problems],U=0===J.length;if(r.json){const e=new Map(f.allow.map(e=>[`${e.file}:${e.kind}`,e.count]));return t.out(JSON.stringify({tool:Ce,version:t.version,ok:U,schema:f.schema,kinds:f.kinds,files:k.files.length,counts:B(k.counts),baseline:B(S.counts),allowed:B(e),kitDeps:k.kitDeps,shellPeers:k.shellPeers,chartDeps:k.chartDeps,failures:J},null,2)),U?0:1}t.out(`UI kit check (harness UI-24), efficient-shell ${t.version}\n`);const W=(e,n,i="")=>{if(0===n.length)return t.out(` ok ${e}`);t.err(` FAIL ${e}`);for(const e of n)t.err(` ${e}`);i&&t.err(` ${i}`)};t.out(` ok the reader reads its own fixtures (typescript ${m.version})`),t.out(` ok read ${Be(k.files.length,"file")}`),W(`${Te} and ${Ae} describe this repository`,j.other),W("no file draws more of its own UI than its line allows",j.grown),W("every line is exact: a count that fell is a line to lower",j.shrunk,`Run: ${F}${j.updateFixes?"":" (after the failures above are fixed)"}`),L.note&&W(`the baseline is no higher than the base branch (${L.note})`,L.problems);const q=new Set([...k.counts.keys()].map(e=>E(e).file));return t.out(` ok PROGRESS: ${q.size} of ${Be(k.files.length,"file")} still draw UI of their own: `+Pe(k.counts,T)),t.out(""),U?t.out("UI kit check: ok"):t.err(`UI kit check: FAILED (${Be(J.length,"problem")})`),U?0:1}(process.argv.slice(2),{cwd:process.cwd(),env:process.env,out:e=>console.log(e),err:e=>console.error(e),loadTypeScript:()=>function(e){for(const i of[n(process.cwd(),"package.json"),e])try{return t(i)("typescript")}catch{}throw new Error("typescript is not installed")}(import.meta.url),git:function(t){try{return e("git",t,{cwd:process.cwd(),encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:6e4,maxBuffer:67108864})}catch{return null}},version:"8.21.0"});
|
|
2
|
+
import{execFileSync as e}from"child_process";import{createRequire as t}from"module";import{join as n}from"path";import{existsSync as i,readFileSync as s,writeFileSync as o,readdirSync as r}from"fs";var a=["button","input","range","textarea","select","dialog","title","portal","native","dark","hex","radius","spacing","font-size","z-index","shadow","kit","icon","svg","kit-dep","chart","chart-dep","ellipsis-label"],l=e=>"string"==typeof e&&a.includes(e),c=["kit-dep","chart-dep"],d=e=>c.includes(e),u=a.filter(e=>!d(e)),h={button:{counts:"a raw <button>",instead:"Button or IconButton from efficient-shell/ui"},input:{counts:"a raw <input> (not hidden, not a range)",instead:"Input, InputNumber, Checkbox, Radio or Switch from efficient-shell/ui"},range:{counts:'a raw <input type="range">',instead:"Slider from efficient-shell/ui"},textarea:{counts:"a raw <textarea>",instead:"Textarea from efficient-shell/ui"},select:{counts:"a raw <select>",instead:"Select or SearchableSelect from efficient-shell/ui"},dialog:{counts:'a raw <dialog>, or role="dialog" / role="alertdialog" on a raw element',instead:"Dialog or Modal from efficient-shell"},title:{counts:"a title= on a raw element (the browser's own tooltip)",instead:"Tooltip from efficient-shell/ui (harness UI-17)"},portal:{counts:"a createPortal(…) call (a layer the file floats itself)",instead:"Popover, PopupMenu, DropdownMenu, Tooltip or Dialog from efficient-shell/ui"},native:{counts:"window.confirm / alert / prompt, or a bare call that resolves to one",instead:"confirm, confirmDestructive, prompt or toast from efficient-shell (harness UI-20)"},dark:{counts:"a dark: variant in a class string",instead:"the light Tailwind class alone; the shell remaps it in dark mode (harness UI-7)"},hex:{counts:"a hex colour literal in a .tsx string",instead:"a shell token or a Tailwind palette class (harness FT-1)"},radius:{counts:"a literal corner radius (an arbitrary-value radius class, or an inline borderRadius)",instead:"a radius utility from the scale or a role token such as rounded-(--radius-control); the theme sets how round they are (harness UI-7)"},spacing:{counts:"a padding, margin or gap off the scale (6px, 10px, 14px …) or written as a literal length (an arbitrary-value class, an inline style)",instead:"a step of the scale 2/4/8/12/16/20/24/32/40/48 — a Tailwind step, or a role such as var(--space-control-x) (owner ruling 2026-10-12)"},"font-size":{counts:"a literal font size (an arbitrary-value text class, an inline fontSize)",instead:"a type step 9/11/12/14/16/18/20/24/30 — Tailwind's 3xs … 3xl text steps (owner ruling 2026-10-12)"},"z-index":{counts:"a stack order above 30 written as a number (a z utility, an arbitrary value, an inline zIndex)",instead:"a named layer: Z_LAYERS (efficient-shell/ui) in code, its --z-* custom property in markup"},shadow:{counts:"a literal shadow, or a shadow size that is not an elevation level (md, 2xl, xs)",instead:"an elevation: the sm / lg / xl utilities, or var(--elevation-panel) and its siblings (owner ruling 2026-10-12)"},kit:{counts:"an import of a second UI kit",instead:"the component from efficient-shell/ui, or fold it into the shell (harness FT-3)"},icon:{counts:"an import of an icon package",instead:"<Icon name> from efficient-shell/icons, drawn by the one set (harness UI-24)"},svg:{counts:"an <svg> element written in JSX: an icon drawn in place",instead:"<Icon name> from efficient-shell/icons, drawn by the one set (harness UI-24). A chart, an illustration or a mark a host supplies stays on the baseline"},"kit-dep":{counts:"a UI kit or icon package declared in package.json (not one the shell entries imported here need)",instead:"remove the dependency once nothing imports it (harness FT-3)"},chart:{counts:"an import of a second chart library",instead:"a chart from efficient-shell/ui (ChartFrame, TimeSeriesChart, ColumnChart, RankedBars, PieChart, FunnelChart, ScatterChart, …), or add the chart there: one chart system (harness FT-3)"},"chart-dep":{counts:"a chart library declared in package.json",instead:"remove the dependency once nothing imports it (harness FT-3)"},"ellipsis-label":{counts:'a button, link or menu label that ends in "…" or "..."',instead:'the label without the dots, saying what it does ("Extend trial"): "…" means only "the words are cut" (owner ruling 2026-10-14)'}},p=["@headlessui/","@radix-ui/","@mui/","@chakra-ui/","@mantine/","@floating-ui/","antd","react-aria","react-aria-","react-bootstrap","react-select","react-colorful","react-tooltip","react-hot-toast","react-toastify","sonner"],f=["@heroicons/","@tabler/icons","@tabler/icons-","@phosphor-icons/","@fortawesome/","@iconify/","@radix-ui/react-icons","@mui/icons-material","lucide","lucide-react","simple-icons","react-icons","react-feather"],m=["recharts","chart.js","react-chartjs-2","d3","d3-","@nivo/","victory","victory-","echarts","echarts-for-react","apexcharts","react-apexcharts","@visx/","highcharts","highcharts-react-official","plotly.js","plotly.js-dist","react-plotly.js","lightweight-charts","@antv/g2","@antv/g2plot","chartist","billboard.js","c3","uplot"],g={"efficient-shell":["@headlessui/react"]};function w(e,t){return t.some(t=>t.endsWith("/")||t.endsWith("-")?e.startsWith(t):e===t||e.startsWith(`${t}/`))}function k(e){return w(e,f)?"icon":w(e,p)?"kit":w(e,m)?"chart":null}function x(e){const t=k(e);return"kit"===t||"icon"===t?"kit-dep":"chart"===t?"chart-dep":null}var $=/[.+^$()|[\]\\]/g;function b(e){let t="",n=0;for(let i=0;i<e.length;i++){const s=e[i];"*"===s?"*"===e[i+1]?"/"===e[i+2]?(t+="(?:[^/]+/)*",i+=2):(t+=".*",i+=1):t+="[^/]*":"?"===s?t+="[^/]":"{"===s?(t+="(?:",n+=1):"}"===s&&n>0?(t+=")",n-=1):t+=","===s&&n>0?"|":s.replace($,"\\$&")}if(0!==n)throw new Error(`unbalanced { in glob "${e}"`);return new RegExp(`^${t}$`)}function y(e){const t=e.map(b);return e=>t.some(t=>t.test(e))}var v=new Set(["node_modules",".git"]),S=new Set(["dist","coverage",".next",".turbo"]);function j(e){const t=e.search(/[*?{]/),n=-1===t?e:e.slice(0,t),i=n.lastIndexOf("/");return-1===i?"":n.slice(0,i)}function I(e,t){const i=y(t),s=[...new Set(t.map(j))].sort(),o=s.filter(e=>!s.some(t=>t!==e&&(""===t||e.startsWith(`${t}/`)))),a=new Set,l=t=>{let s;try{s=r(n(e,t),{withFileTypes:!0})}catch{return}for(const e of s){const n=t?`${t}/${e.name}`:e.name;e.isDirectory()?v.has(e.name)||""===t&&S.has(e.name)||l(n):e.isFile()&&i(n)&&a.add(n)}};for(const e of o)l(e);return[...a].sort(L)}var L=(e,t)=>e<t?-1:e>t?1:0,z=class extends Error{},R=(e,t)=>`${e}:${t}`;function E(e){const t=e.lastIndexOf(":");return{file:e.slice(0,t),kind:e.slice(t+1)}}var T=e=>a.indexOf(e);function A(e,t){const n=E(e),i=E(t);return L(n.file,i.file)||T(n.kind)-T(i.kind)}function C(e,t="ui-kit.baseline.json"){let n;try{n=JSON.parse(e)}catch(e){throw new z(`${t} is not valid JSON: ${e.message}`)}const i=e=>{throw new z(`${t}: ${e}. The tool writes this file; do not edit it by hand.`)};if("object"!=typeof n||null===n||Array.isArray(n))return i("must be a JSON object");const s=n;if(1!==s.schema)return i("number"==typeof s.schema&&s.schema>1?`"schema": ${s.schema} is newer than this efficient-shell reads (1); upgrade efficient-shell`:'"schema" must be 1');if(!Array.isArray(s.kinds)||s.kinds.some(e=>"string"!=typeof e))return i('"kinds" must be a list');const o=s.kinds.filter(l);if("object"!=typeof s.counts||null===s.counts||Array.isArray(s.counts))return i('"counts" must be an object');const r=new Map;for(const[e,t]of Object.entries(s.counts)){const{file:n,kind:s}=E(e);if(!n||!s)return i(`"${e}" is not "<file>:<kind>"`);if("number"!=typeof t||!Number.isInteger(t)||t<1)return i(`"${e}" must be a whole number, 1 or more (a line that reaches 0 is deleted)`);l(s)&&r.set(e,t)}return{kinds:o,counts:r}}function M(e){const t=a.filter(t=>e.kinds.includes(t)),n=[...e.counts.keys()].filter(t=>(e.counts.get(t)??0)>0).sort(A).map(t=>` ${JSON.stringify(t)}: ${e.counts.get(t)}`);return["{",' "schema": 1,',` "kinds": [${t.map(e=>JSON.stringify(e)).join(", ")}],`,n.length?` "counts": {\n${n.join(",\n")}\n }`:' "counts": {}',"}",""].join("\n")}function B(e){const t={};for(const[n,i]of e){const{kind:e}=E(n);l(e)&&(t[e]=(t[e]??0)+i)}return t}var P=class extends Error{},N=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),D=new Set(["$schema","schema","kinds","include","exclude","includeImporting","output","allow"]);var O="package.json",F=[2,4,8,12,16,20,24,32,40,48];function J(e){if("0"===e||"px"===e)return!0;const t=Number(e);return!!Number.isFinite(t)&&F.includes(4*t)}var U=new Set(["iframe","frame","object","embed"]),W=new Set(["href","xlinkHref","to","id","key","htmlFor"]),q=/(?<![&\w])(?<!url\()#(?:[0-9a-fA-F]{8}|[0-9a-fA-F]{6}|[0-9a-fA-F]{3,4})(?![\w-])/g,_=/(?<![\w-])rounded(?:-(?:[trblse]|tl|tr|br|bl|ss|se|ee|es))?-\[([^\]]*)\]/g,G=/^border(?:(?:Top|Bottom)(?:Left|Right)|(?:Start|End)(?:Start|End))?Radius$/,K=/^(?:inherit|initial|unset|revert)$|var\(|^(?:50|100)%$|^(?:999|9999)(?:px)?$/,H=/(?<![\w-])-?(?:p|px|py|pt|pr|pb|pl|ps|pe|m|mx|my|mt|mr|mb|ml|ms|me|gap|gap-x|gap-y|space-x|space-y)-(\d+(?:\.\d+)?|px|\[[^\]]*\])(?![\w.[/-])/g,Q=/(?<![\w-])text-\[(?:length:)?(\d*\.?\d+(?:px|rem|em|%))\]/g,V=/(?<![\w-])z-(\d+|\[[^\]]*\])(?![\w.[/-])/g,X=/(?<![\w-])shadow-(xs|2xs|md|2xl|\[[^\]]*\])(?![\w.[/-])/g,Y=/var\(|^(?:inherit|initial|unset|revert|revert-layer|none|auto)$/,Z=/^(?:(?:padding|margin)(?:Top|Right|Bottom|Left|Inline|Block|InlineStart|InlineEnd|BlockStart|BlockEnd)?|gap|rowGap|columnGap)$/,ee=new Set([0,...F]),te=/(?<![\w-])dark:(?=[\w[\-!@*(])/g,ne=new Set(["button","a","option","Button","IconButton","SplitButton","Link","NavLink","PopupMenuItem","PopupMenuLabel","DropdownMenuItem","MenuItem","ContextMenuItem"]),ie=/(?:…|\.\.\.|…)\s*$/,se=new RegExp("\\p{L}","u"),oe=new RegExp("\\p{L}[\\p{L}-]*","u"),re={busy:{words:["Accepting","Adding","Applying","Approving","Arranging","Asking","Assigning","Booking","Building","Calculating","Cancelling","Capturing","Changing","Checking","Choosing","Closing","Combining","Comparing","Completing","Confirming","Connecting","Converting","Copying","Correcting","Counting","Creating","Deleting","Detaching","Downloading","Drawing","Duplicating","Emailing","Ending","Exporting","Fetching","Filing","Finding","Flushing","Generating","Grouping","Importing","Linking","Loading","Locating","Looking","Making","Marking","Matching","Measuring","Merging","Moving","Opening","Ordering","Paying","Pending","Posting","Preparing","Previewing","Pricing","Processing","Provisioning","Publishing","Purging","Pushing","Queued","Queuing","Quoting","Re-booking","Re-importing","Re-opening","Reading","Rebooting","Rebuilding","Receiving","Reconciling","Reconnecting","Recording","Refreshing","Refunding","Regenerating","Registering","Reinstating","Rejecting","Removing","Reopening","Requesting","Resending","Resetting","Resolving","Restarting","Restoring","Resuming","Retrying","Reversing","Reverting","Running","Saving","Searching","Sending","Setting","Settling","Sharing","Signing","Splitting","Starting","Submitting","Suggesting","Switching","Syncing","Taking","Testing","Transferring","Typing","Updating","Uploading","Verifying","Waiting","Withdrawing","Working"],zhStarts:["正在"],zhEnds:["中"]},placeholder:{},prompt:{}},ae=new Set((re.busy?.words??[]).map(e=>e.toLowerCase())),le=new Set(["label","aria-label",...re.placeholder?[]:["placeholder","searchPlaceholder","emptyOptionLabel","blankLabel"]]),ce=(e,t)=>{if(!ie.test(t)||!se.test(e))return!1;const n=e.match(oe)?.[0]?.toLowerCase();if(n&&ae.has(n))return!1;const i=e.replace(ie,"").trim(),s=re.busy;return!(s&&(s.zhStarts.some(e=>i.startsWith(e))||s.zhEnds.some(e=>i.endsWith(e))))},de=new Set(["confirm","alert","prompt"]),ue=new Set(["window","globalThis","self"]);function he(e,t,n,i,s){const o=new Set(i),r=e.createSourceFile(t,n,e.ScriptTarget.Latest,!0,function(e,t){return t.endsWith(".tsx")?e.ScriptKind.TSX:t.endsWith(".jsx")?e.ScriptKind.JSX:/\.[cm]?js$/.test(t)?e.ScriptKind.JS:e.ScriptKind.TS}(e,t)),a={},l=/\.[jt]sx$/.test(t),c=e=>r.getLineAndCharacterOfPosition(e).line+1,d=(e,t)=>{o.has(e)&&(a[e]??=[]).push(c(t.getStart(r)))},u=(t,n)=>t.attributes.properties.find(t=>e.isJsxAttribute(t)&&t.name.getText(r)===n),h=t=>{const n=t?.initializer;if(n)return e.isStringLiteral(n)?n.text:e.isJsxExpression(n)&&n.expression&&e.isStringLiteralLike(n.expression)?n.expression.text:void 0},p=new Set;if(o.has("native")){const t=n=>{if(n)if(e.isIdentifier(n))de.has(n.text)&&p.add(n.text);else if(e.isObjectBindingPattern(n)||e.isArrayBindingPattern(n))for(const i of n.elements)e.isBindingElement(i)&&t(i.name)},n=i=>{(e.isImportClause(i)||e.isImportSpecifier(i)||e.isNamespaceImport(i)||e.isVariableDeclaration(i)||e.isParameter(i)||e.isFunctionDeclaration(i))&&t(i.name),e.forEachChild(i,n)};n(r)}const f=t=>t&&e.isStringLiteralLike(t)?t.text:void 0,m=(e,t)=>{e&&("efficient-shell"===e||e.startsWith("efficient-shell/"))&&s?.add(e);const n=e?k(e):null;n&&d(n,t)},g=(e,t,n)=>{if(o.has("dark"))for(const n of e.matchAll(te))d("dark",t);if(o.has("radius"))for(const n of e.matchAll(_))K.test(n[1].trim())||d("radius",t);if(n&&l&&o.has("hex"))for(const n of e.matchAll(q))d("hex",t);if(o.has("spacing"))for(const n of e.matchAll(H)){const e=n[1];(e.startsWith("[")?Y.test(e.slice(1,-1).trim()):J(e))||d("spacing",t)}if(o.has("font-size"))for(const n of e.matchAll(Q))d("font-size",t);if(o.has("z-index"))for(const n of e.matchAll(V)){const e=n[1].startsWith("[")?n[1].slice(1,-1).trim():n[1];/^\d+$/.test(e)&&Number(e)>30&&d("z-index",t)}if(o.has("shadow"))for(const n of e.matchAll(X))n[1].startsWith("[")&&Y.test(n[1].slice(1,-1).trim())||d("shadow",t)},w=(t,n,i)=>{const s=e.isStringLiteralLike(n)?n.text.trim():void 0;if(o.has("spacing")&&Z.test(t))e.isNumericLiteral(n)?ee.has(Number(n.text))||d("spacing",i):void 0!==s&&!Y.test(s)&&(e=>[...e.matchAll(/(-?\d*\.?\d+)(px|rem|em)\b/g)].map(e=>Math.abs(Number(e[1]))*("px"===e[2]?1:16)))(s).some(e=>!ee.has(e))&&d("spacing",i);else if(o.has("font-size")&&"fontSize"===t)(e.isNumericLiteral(n)||void 0!==s&&!Y.test(s)&&!/^(?:smaller|larger)$/.test(s))&&d("font-size",i);else if(o.has("z-index")&&"zIndex"===t){const t=[],s=n=>{e.isNumericLiteral(n)||e.isStringLiteralLike(n)&&/^\d+$/.test(n.text.trim())?t.push(Number(n.text)):e.forEachChild(n,s)};s(n);for(const e of t)e>30&&d("z-index",i)}else o.has("shadow")&&"boxShadow"===t&&(void 0===s||""===s||Y.test(s)||d("shadow",i))},x=(t,n)=>{if(e.isJsxOpeningElement(t)||e.isJsxSelfClosingElement(t)){const e=t.tagName.getText(r);if(/^[a-z]/.test(e)){const n=h(u(t,"type"));"svg"===e&&d("svg",t),"button"===e?d("button",t):"select"===e?d("select",t):"textarea"===e?d("textarea",t):"input"===e&&("range"===n?d("range",t):"hidden"!==n&&d("input",t));const i=h(u(t,"role"));"dialog"!==e&&"dialog"!==i&&"alertdialog"!==i||d("dialog",t),!U.has(e)&&u(t,"title")&&d("title",t)}}else if(e.isCallExpression(t)){const n=t.expression;e.isIdentifier(n)?"createPortal"===n.text?d("portal",t):de.has(n.text)&&!p.has(n.text)?d("native",t):"require"===n.text&&m(f(t.arguments[0]),t):e.isPropertyAccessExpression(n)?"createPortal"===n.name.text?d("portal",t):de.has(n.name.text)&&e.isIdentifier(n.expression)&&ue.has(n.expression.text)&&d("native",t):n.kind===e.SyntaxKind.ImportKeyword&&m(f(t.arguments[0]),t)}else{if(e.isImportDeclaration(t)||e.isExportDeclaration(t))return void m(f(t.moduleSpecifier),t);if(e.isPropertyAssignment(t)){const n=e.isIdentifier(t.name)||e.isStringLiteralLike(t.name)?t.name.text:"",i=t.initializer;w(n,i,t),o.has("radius")&&G.test(n)&&(e.isNumericLiteral(i)?K.test(i.text)||d("radius",t):e.isStringLiteralLike(i)&&!K.test(i.text.trim())&&d("radius",t))}else if(e.isStringLiteralLike(t))g(t.text,t,n);else if(e.isTemplateExpression(t)){g(t.head.text,t.head,n);for(const e of t.templateSpans)g(e.literal.text,e.literal,n)}}e.isJsxAttribute(t)&&W.has(t.name.getText(r))?e.forEachChild(t,e=>x(e,!1)):e.forEachChild(t,e=>x(e,n))};return x(r,!0),o.has("ellipsis-label")&&function(e,t,n){const i=new Set,s=(e,t)=>{i.has(e)||(i.add(e),n(t))},o=n=>{if(n)if(e.isStringLiteralLike(n))ce(n.text,n.text)&&s(n,n.getStart(t));else if(e.isTemplateExpression(n)){const e=[n.head.text,...n.templateSpans.map(e=>e.literal.text)];ce(e.join(" "),e[e.length-1])&&s(n,n.getStart(t))}else e.isConditionalExpression(n)?(o(n.whenTrue),o(n.whenFalse)):e.isBinaryExpression(n)?(o(n.left),o(n.right)):e.isParenthesizedExpression(n)||e.isAsExpression(n)||e.isJsxExpression(n)?o(n.expression):e.isCallExpression(n)&&pe.has(fe(n.expression))&&n.arguments[0]&&o(n.arguments[0])},r=n=>{for(const i of n)if(e.isJsxText(i)){const e=i.getText(t);ce(e,e)&&s(i,i.getStart(t)+(e.length-e.trimStart().length))}else e.isJsxExpression(i)?o(i.expression):(e.isJsxElement(i)||e.isJsxFragment(i))&&r(i.children)},a=(n,i)=>{const s=n.attributes.properties.find(n=>e.isJsxAttribute(n)&&n.name.getText(t)===i),o=s?.initializer;return o&&e.isStringLiteral(o)?o.text:o&&e.isJsxExpression(o)&&o.expression&&e.isStringLiteralLike(o.expression)?o.expression.text:void 0},l=t=>t.properties.some(t=>e.isPropertyAssignment(t)&&(e.isIdentifier(t.name)||e.isStringLiteralLike(t.name))&&"value"===t.name.text&&e.isStringLiteralLike(t.initializer)&&""===t.initializer.text),c=n=>{if(e.isJsxElement(n)){const e=n.openingElement,i=e.tagName.getText(t),s="option"===i&&re.prompt&&""===a(e,"value");ne.has(i)&&!s&&r(n.children)}else if(e.isJsxAttribute(n))le.has(n.name.getText(t))&&o(n.initializer);else if(e.isPropertyAssignment(n)){const t=e.isIdentifier(n.name)||e.isStringLiteralLike(n.name)?n.name.text:"",i=re.prompt&&e.isObjectLiteralExpression(n.parent)&&l(n.parent);le.has(t)&&!i&&o(n.initializer)}e.forEachChild(n,c)};c(t)}(e,r,e=>(a["ellipsis-label"]??=[]).push(c(e))),a}var pe=new Set(["say","t"]),fe=e=>{const t=e.getText();return t.slice(t.lastIndexOf(".")+1)};function me(e){const t={};for(const[n,i]of Object.entries(e))i.length&&(t[n]=i.length);return t}function ge(e,t,n){const i=e.createSourceFile(t,n,e.ScriptTarget.Latest,!1),s=[];for(const t of i.statements)(e.isImportDeclaration(t)||e.isExportDeclaration(t))&&t.moduleSpecifier&&e.isStringLiteralLike(t.moduleSpecifier)&&s.push(t.moduleSpecifier.text);return s}var we=(e,t)=>e.some(e=>t.some(t=>t.endsWith("/*")?e.startsWith(t.slice(0,-1)):e===t));var ke=e=>new Map(e.allow.map(e=>[R(e.file,e.kind),e.count]));function xe(e,t){return e.kinds.filter(e=>t.kinds.includes(e))}var $e=(e,t,n)=>{if("kit-dep"===n)return` (${e.kitDeps.join(", ")})`;if("chart-dep"===n)return` (${e.chartDeps.join(", ")})`;const i=e.hits.get(t)?.[n]??[];if(0===i.length)return"";const s=i.slice(0,12).join(", ");return` (line${1===i.length?"":"s"} ${s}${i.length>12?", …":""})`};function be(e,t,n){const i=ke(e),s=new Map;for(const[e,o]of t.counts){const{kind:t}=E(e);if(!l(t)||!n.includes(t))continue;const r=o-(i.get(e)??0);r>0&&s.set(e,r)}return{kinds:a.filter(e=>n.includes(e)),counts:s}}function ye(e,t){let n=0;for(const i of new Set([...e.keys(),...t.keys()]))(e.get(i)??0)!==(t.get(i)??0)&&(n+=1);return n}var ve="\n// <button> in a comment is not a button, and <svg> in one is not a drawing\n/* nor is <input title=\"x\"> in this one, or dark:bg-black, or #fff */\nimport { createPortal } from 'react-dom';\nimport { Dialog } from '@headlessui/react';\nimport { TrashIcon } from '@heroicons/react/24/outline';\nimport type { Icon } from 'lucide-react';\nimport { Button, confirm } from 'efficient-shell';\nexport { Slot } from '@radix-ui/react-slot';\nexport { CheckIcon } from '@radix-ui/react-icons';\nimport { LineChart } from 'recharts';\nimport 'd3-scale';\nexport { VictoryPie } from 'victory';\nimport { BarChart } from '@mui/x-charts';\nimport Tree from 'react-d3-tree';\nimport { TimeSeriesChart } from 'efficient-shell/ui';\n// import 'chart.js' in a comment is not an import, and 'echarts' in a string is not one either\nconst chartLabel = 'd3-array';\n\nconst a = <button title=\"Says what it does\">x</button>;\nconst b = <input type=\"range\" />;\nconst c = <input type=\"text\" />;\nconst c2 = <input type={\"hidden\"} name=\"csrf\" />;\nconst c3 = <input type=\"hidden\" />;\nconst c4 = <input type={kind} />;\nconst d = <select />;\nconst d2 = <textarea />;\nconst e = <div role=\"dialog\" />;\nconst e2 = <dialog open />;\nconst e3 = <section role={'alertdialog'} />;\nconst f = <iframe title=\"Preview\" />;\nconst f2 = <object title=\"Chart\" />;\nconst g = <Button title=\"a prop, not a tooltip\" role=\"dialog\" />;\nconst g2 = (\n <button\n type=\"button\"\n title={hint}\n >\n y\n </button>\n);\nconst h = ReactDOM.createPortal(a, document.body);\nconst i = createPortal(a, document.body);\n\nasync function leave() {\n if (window.confirm('Sure?')) return;\n globalThis.alert('No');\n alert('native: nothing binds the name');\n prompt('native too');\n await confirm('the shell: the import binds it');\n record.confirm('a method, not the popup');\n}\n\nconst j = <div className=\"bg-white dark:bg-black dark:hover:text-white is-dark:no\" />;\nconst k = clsx('text-gray-900', on && 'dark:text-gray-100');\nconst l = <span style={{ color: '#fff', background: \"#12ab34\" }} className={`border-[#0a0b0c80] ${x}`} />;\nconst m = <a href=\"#faded\" id=\"#bad\" key=\"#abc\" to=\"#face\">skip</a>;\nconst n = <label htmlFor={'#dead'}>skip</label>;\nconst o = <span>Ӓ and BG#00340 and #12345 and #added are not colours</span>;\nconst p = 'entity  ref BG#00340';\nconst q = <use xlinkHref=\"#abc\" fill=\"url(#fed)\" />;\nconst t = <div className=\"rounded-[4px] rounded-t-[0.5rem] hover:rounded-[2px] rounded-lg rounded-(--radius-card) rounded-[inherit] rounded-[var(--r)]\" />;\nconst u = <div style={{ borderRadius: 6, borderTopLeftRadius: '3px', borderBottomRightRadius: '50%', borderEndEndRadius: 'var(--radius-card)' }} />;\nconst v = <i style={{ borderRadius: 9999 }} />;\nconst w = <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M4 4h16\" /></svg>;\nconst w2 = <Svg viewBox=\"0 0 24 24\" />;\nconst w3 = '<svg viewBox=\"0 0 1 1\"></svg> in a string is not an element';\nconst r = lazy(() => import('@mui/material'));\nconst s = require('react-select');\nconst s2 = require('chart.js/auto');\nconst s3 = import('@nivo/line');\n",Se={button:2,input:2,range:1,textarea:1,select:1,dialog:3,title:2,portal:2,native:4,dark:3,hex:3,radius:5,kit:5,icon:3,svg:1,chart:5},je={kit:1,dark:1,portal:1,radius:2,chart:1},Ie=(...e)=>e.join("-"),Le=`\nconst s1 = <i className="${[Ie("px","2.5"),Ie("py","1.5"),"md:"+Ie("gap","1.5"),"-"+Ie("mt","1.5"),Ie("p","[10px]")].join(" ")}" />;\nconst s2 = <i className="${[Ie("p","0"),Ie("px","px"),Ie("p","0.5"),Ie("p","3"),Ie("gap-x","4"),Ie("p","12"),Ie("p","(--space-12)"),Ie("p","[var(--space-12)]"),Ie("space-x","reverse"),Ie("top","1.5")].join(" ")}" />;\nconst s3 = <i style={{ padding: 6, marginTop: '10px', gap: 8, margin: '0 auto', paddingInline: 'var(--space-12)' }} />;\nconst f1 = <i className="${[Ie("text","[11px]"),Ie("text","[0.8rem]"),Ie("text","xs"),Ie("text","[#fff]"),Ie("text","(--text-2xs)")].join(" ")}" />;\nconst f2 = <i style={{ fontSize: 12 }} />;\nconst f3 = { fontSize: 'var(--x)', font: 'inherit' };\nconst z1 = <i className="${[Ie("z","[9999]"),Ie("z","50"),Ie("z","10"),Ie("z","30"),"-"+Ie("z","10"),Ie("z","auto"),Ie("z","(--z-popup)"),Ie("z","[var(--z-popup)]")].join(" ")}" />;\nconst z2 = { zIndex: on ? 2020 : 2010 };\nconst z3 = { zIndex: Z_LAYERS.popup, top: 9999 };\nconst h1 = <i className="${[Ie("shadow","[0_1px_2px_#000]"),Ie("shadow","md"),"shadow",Ie("shadow","lg"),Ie("shadow","(--elevation-panel)"),Ie("shadow","black/20"),Ie("drop-shadow","md")].join(" ")}" />;\nconst h2 = { boxShadow: '0 1px 2px rgba(0,0,0,.1)' };\nconst h3 = { boxShadow: 'none', outline: 'var(--elevation-raised)' };\n`,ze={spacing:7,"font-size":3,"z-index":4,shadow:3,hex:1},Re={"ellipsis-label":9},Ee=e=>a.filter(t=>e[t]).map(t=>`${t} ${e[t]}`).join(", ")||"nothing";var Te="ui-kit.config.json",Ae="ui-kit.baseline.json",Ce="efficient-shell-ui-check",Me=`${Ce}: every surface a person operates takes its UI from efficient-shell (harness UI-24).\n\n ${Ce} check this repository against ${Ae}\n ${Ce} --print print today's counts as a baseline, and change nothing\n ${Ce} --summary print totals per kind and per folder, as Markdown\n ${Ce} --json print the result as JSON\n ${Ce} --update lower the lines whose counts fell, and delete the ones at zero\n ${Ce} --update --allow-move also follow a renamed or split file (no total may rise)\n ${Ce} --init write the first ${Ae}\n ${Ce} --init --kind <kind> take the baseline for a kind just added to "kinds"\n ${Ce} --no-base do not compare with the pull request's base branch\n\nKinds: ${a.join(", ")}\nReads ${Te} in the current directory.`;var Be=(e,t)=>`${e} ${t}${1===e?"":"s"}`,Pe=(e,t)=>{const n=B(e);return t.map(e=>`${e} ${n[e]??0}`).join(" · ")};process.exitCode=function(e,t){const r=function(e){const t={print:!1,summary:!1,json:!1,update:!1,allowMove:!1,init:!1,noBase:!1,help:!1,version:!1,kinds:[]};for(let n=0;n<e.length;n++){const i=e[n];if("--print"===i)t.print=!0;else if("--summary"===i)t.summary=!0;else if("--json"===i)t.json=!0;else if("--update"===i)t.update=!0;else if("--allow-move"===i)t.allowMove=!0;else if("--init"===i)t.init=!0;else if("--no-base"===i)t.noBase=!0;else if("--help"===i||"-h"===i)t.help=!0;else if("--version"===i||"-v"===i)t.version=!0;else if("--kind"===i){const i=e[++n];if(!i)return"--kind needs a kind after it";t.kinds.push(...i.split(","))}else{if(!i.startsWith("--kind="))return`unknown argument "${i}"`;t.kinds.push(...i.slice(7).split(","))}}return t.allowMove&&!t.update?"--allow-move goes with --update":t.kinds.length&&!t.init?"--kind goes with --init":[t.print,t.summary,t.update,t.init].filter(Boolean).length>1?"choose one of --print, --summary, --update and --init":t}(e);if("string"==typeof r)return t.err(`${Ce}: ${r}\n\n${Me}`),2;if(r.help)return t.out(Me),0;if(r.version)return t.out(t.version),0;const c=e=>(r.json?t.out(JSON.stringify({tool:Ce,version:t.version,ok:!1,failures:[e]},null,2)):t.err(`${Ce}: ${e}`),1),p=n(t.cwd,Te);if(!i(p))return c(`no ${Te} in ${t.cwd}. Run it from the repository root; the harness has the template.`);let f,m;try{f=function(e,t="ui-kit.config.json"){const n=[],i=e=>{n.push(e)},s=(e,t,{required:n=!1}={})=>{if(void 0===e&&!n)return[];if(!Array.isArray(e)||e.some(e=>"string"!=typeof e||""===e))return i(`${t} must be a list of non-empty strings`),[];n&&0===e.length&&i(`${t} must name at least one entry`);for(const n of e)(n.startsWith("/")||n.startsWith("./")||n.includes("\\")||n.split("/").includes(".."))&&i(`${t}: "${n}" must be a path from the repository root, written with / (no ./, .. or \\)`);return e},o=(e,t)=>"string"!=typeof e||e.trim().length<10?(i(`${t} needs a "reason" a reviewer can read (a sentence, not a word)`),""):e,r=(e,t)=>void 0===e?[]:!Array.isArray(e)||e.some(e=>!N(e))?(i(`${t} must be a list of objects`),[]):e;if(!N(e))throw new P(`${t}: must be a JSON object`);for(const t of Object.keys(e))D.has(t)||i(`unknown key "${t}"`);1!==e.schema&&i("number"==typeof e.schema&&e.schema>1?`"schema": ${e.schema} is newer than this efficient-shell reads (1); upgrade efficient-shell`:'"schema" must be 1');const c=[];if(Array.isArray(e.kinds)&&0!==e.kinds.length)for(const t of e.kinds)l(t)?c.includes(t)?i(`"kinds": "${t}" is listed twice`):c.push(t):i(`"kinds": unknown kind ${JSON.stringify(t)} (this efficient-shell knows: ${a.join(", ")})`);else i(`"kinds" must list the kinds this repository checks, from: ${a.join(", ")}`);const d=s(e.include,'"include"'),u=s(e.exclude,'"exclude"'),h=r(e.includeImporting,'"includeImporting"').map((e,t)=>({files:s(e.files,`"includeImporting"[${t}].files`,{required:!0}),modules:s(e.modules,`"includeImporting"[${t}].modules`,{required:!0}),reason:o(e.reason,`"includeImporting"[${t}]`)}));0===d.length&&0===h.length&&i('"include" must name the files that are operator UI (for example ["src/**/*.tsx"])');const p=r(e.output,'"output"').map((e,t)=>({files:s(e.files,`"output"[${t}].files`,{required:!0}),reason:o(e.reason,`"output"[${t}]`)})),f=[],m=new Set;if(r(e.allow,'"allow"').forEach((e,t)=>{const n=`"allow"[${t}]`,[r]=s([e.file],`${n}.file`),d=o(e.reason,n);if(!l(e.kind))return void i(`${n}.kind must be one of: ${a.join(", ")}`);if(c.includes(e.kind)||i(`${n}: kind "${e.kind}" is not in "kinds"`),"number"!=typeof e.count||!Number.isInteger(e.count)||e.count<1)return void i(`${n}.count must be a whole number, 1 or more`);if(!r)return;const u=`${r}:${e.kind}`;m.has(u)&&i(`${n}: ${r} already has an allow entry for "${e.kind}"`),m.add(u),f.push({file:r,kind:e.kind,count:e.count,reason:d})}),n.length)throw new P(`${t}:\n - ${n.join("\n - ")}`);return{schema:1,kinds:a.filter(e=>c.includes(e)),include:d,exclude:u,includeImporting:h,output:p,allow:f}}(JSON.parse(s(p,"utf8")),Te)}catch(e){return c(e instanceof P?e.message:`${Te} is not valid JSON: ${e.message}`)}try{m=t.loadTypeScript()}catch{return c('this check reads the TypeScript AST and found no "typescript" package here. Install it as a devDependency.')}const w=function(e){const t=[],n=u,i=[["fixture.tsx",ve,Se],["fixture.ts","\nimport { toast } from 'sonner';\nimport { extent } from 'd3-array';\nexport const tone = { warn: '#f59e0b' };\nexport const cls = 'ring-1 dark:ring-white rounded-[3px]';\nexport const box = { borderRadius: '0.25rem', radius: 4 };\nexport function ask(confirm: (message: string) => boolean) {\n return confirm('a parameter binds the name');\n}\nexport const mount = (node: unknown) => ReactDOM.createPortal(node, document.body);\n",je],["tokens.tsx",Le,ze],["labels.tsx","\n// <Button>Save…</Button> in a comment is not a label\nconst l1 = <Button>Extend trial…</Button>;\nconst l2 = <PopupMenuItem onClick={go}><span>Read from a PDF...</span></PopupMenuItem>;\nconst l3 = <Button>{busy ? 'Saving…' : 'Duplicate site…'}</Button>;\nconst l4 = <Item label=\"Translate…\" aria-label={'More…'} />;\nconst l5 = [{ label: 'Reject…' }, { value: CUSTOM, label: 'Custom…' }];\nconst l6 = <option value={CUSTOM}>Different address…</option>;\nconst l7 = <PopupMenuLabel>{say(\"Duplicate to page…\")}</PopupMenuLabel>;\nconst n7 = <Button>{t('team:menu.remove')}</Button>;\nconst n1 = <Button>{`${name.slice(0, 9)}…`}</Button>;\nconst n2 = <p>Loading weather…</p>;\nconst n3 = <Input placeholder=\"Search…\" />;\nconst n4 = <option value=\"\">Pick a carrier…</option>;\nconst n5 = [{ value: '', label: 'Select…' }];\nconst n6 = <Button>Extend trial</Button>;\n",Re]];for(const[s,o,r]of i){const i=me(he(e,s,o,n));n.some(e=>(i[e]??0)!==(r[e]??0))&&t.push(`${s}: read ${Ee(i)}; it holds ${Ee(r)}`)}const s=me(he(e,"fixture.tsx",ve,["button"]));return"button"!==Object.keys(s).join()&&t.push(`asked for button alone, the reader reported ${Ee(s)}`),t}(m);if(w.length)return c(`the reader misread its own fixtures with typescript ${m.version}, so nothing it says about this repository can be trusted:\n - `+w.join("\n - "));const k=function(e,t,o){const r=[],a=y(o.exclude),l=y(o.output.flatMap(e=>e.files)),c=new Map,u=e=>{let i=c.get(e);return void 0===i&&c.set(e,i=s(n(t,e),"utf8")),i},h=(e,n)=>{for(const i of e)0===I(t,[i]).length&&r.push(`${n}: "${i}" matches no file. Delete the line, or fix the path.`)};h(o.include,'"include"'),o.output.forEach((e,t)=>h(e.files,`"output"[${t}]`)),o.includeImporting.forEach((e,t)=>h(e.files,`"includeImporting"[${t}]`));const p=new Set,f=e=>(e=>/\.(?:[cm]?[jt]s|[jt]sx)$/.test(e)&&!e.endsWith(".d.ts"))(e)&&!a(e)&&!l(e);for(const e of I(t,o.include))f(e)&&p.add(e);for(const n of o.includeImporting)for(const i of I(t,n.files))f(i)&&!p.has(i)&&we(ge(e,i,u(i)),n.modules)&&p.add(i);const m=[...p].sort(),w=o.kinds.filter(e=>!d(e)),k=new Map,$=new Map,b=new Set;for(const t of m){const n=he(e,t,u(t),w,b);let i=!1;for(const e of w){const s=n[e]?.length??0;s&&($.set(R(t,e),s),i=!0)}i&&k.set(t,n)}let v=[],S=[],j=[];const L=o.kinds.filter(d);if(L.length){const e=n(t,O);if(i(e)){const t=JSON.parse(s(e,"utf8")),n=["dependencies","peerDependencies","optionalDependencies"].flatMap(e=>Object.keys(t[e]??{})),i=new Set([...b].flatMap(e=>g[e]??[])),r=[...new Set(n)].sort();if(o.kinds.includes("kit-dep")){const e=r.filter(e=>"kit-dep"===x(e));v=e.filter(e=>!i.has(e)),S=e.filter(e=>i.has(e)),v.length&&$.set(R(O,"kit-dep"),v.length)}o.kinds.includes("chart-dep")&&(j=r.filter(e=>"chart-dep"===x(e)),j.length&&$.set(R(O,"chart-dep"),j.length))}else for(const e of L)r.push(`"kinds" includes "${e}", and there is no ${O} here to read.`)}for(const e of o.allow)(d(e.kind)?e.file===O:p.has(e.file))||r.push(`"allow": ${e.file} (${e.kind}) is not a file this check reads. Delete the entry, or fix the path.`);return{files:m,hits:k,counts:$,kitDeps:v,shellPeers:S,chartDeps:j,problems:r}}(m,t.cwd,f);if(0===k.files.length)return c(`read no files. "include" in ${Te} matches nothing, so a pass would mean nothing.`);const $=n(t.cwd,Ae),b=r.json,v=e=>{b||t.out(e)};if(r.print)return t.out(M(be(f,k,f.kinds)).trimEnd()),0;if(r.summary){for(const e of function(e,t){const n=new Map,i=new Map;for(const[e,s]of t.counts){const{file:t,kind:o}=E(e);if(!l(o))continue;const r=n.get(o)??{count:0,files:new Set};r.count+=s,r.files.add(t),n.set(o,r);const a=t.split("/"),c=a.length>2?a.slice(0,2).join("/"):2===a.length?a[0]:".",d=i.get(c)??{};d[o]=(d[o]??0)+s,i.set(c,d)}const s=e.kinds.filter(e=>n.has(e)),o=[`**UI kit check (harness UI-24):** ${new Set([...t.counts.keys()].map(e=>E(e).file)).size} of ${Be(t.files.length,"file")} still draw UI of their own.`,"","| Kind | Count | Files | The shell has |","|---|---:|---:|---|",...e.kinds.map(e=>{const t=n.get(e);return`| \`${e}\` | ${t?.count??0} | ${t?.files.size??0} | ${h[e].instead} |`})];if(s.length&&i.size){const e=e=>s.reduce((t,n)=>t+(e[n]??0),0),t=[...i].sort((t,n)=>e(n[1])-e(t[1])||(t[0]<n[0]?-1:1));o.push("",`| Folder | ${s.map(e=>`\`${e}\``).join(" | ")} | Total |`,`|---|${s.map(()=>"---:").join("|")}|---:|`,...t.map(([t,n])=>`| \`${t}\` | ${s.map(e=>n[e]??0).join(" | ")} | ${e(n)} |`))}return o}(f,k))t.out(e);return 0}let S=null;if(i($))try{S=C(s($,"utf8"),Ae)}catch(e){return c(e instanceof z?e.message:String(e))}if(r.init){const e=r.kinds.filter(e=>!l(e)||!f.kinds.includes(e));if(e.length)return c(`--kind ${e.join(", ")}: not in "kinds" in ${Te}. Add it there first.`);const t=r.kinds;if(S){if(0===t.length)return c(`${Ae} already exists, and --init would overwrite what it holds. It is for the adoption pull request only. To start checking a kind, add it to "kinds" and run --init --kind <kind>.`);const e=t.filter(e=>S.kinds.includes(e));if(e.length)return c(`the baseline was already taken for ${e.join(", ")}. Its lines only go down; use --update.`);const n=be(f,k,t);S={kinds:[...S.kinds,...t],counts:new Map([...S.counts,...n.counts])}}else{if(t.length)return c(`there is no ${Ae} yet. Run --init on its own first.`);S=be(f,k,f.kinds)}o($,M(S)),v(`${Ce}: wrote ${Ae} (${Be(S.counts.size,"line")}: ${Pe(S.counts,S.kinds)})`)}if(!S)return c(`no ${Ae}. This repository has not adopted the check yet: run ${Ce} --init, and commit the file.`);if(r.update){const e=function(e,t,n,{allowMove:i=!1}={}){const s=xe(e,t),o=be(e,n,s),r=new Map([...t.counts].filter(([e])=>s.includes(E(e).kind)));if(i){const e=B(r),n=B(o.counts),i=s.filter(t=>(n[t]??0)>(e[t]??0)).map(t=>`${t}: ${n[t]??0} across the repository, and the baseline holds ${e[t]??0}`);return i.length?{baseline:t,lowered:0,refused:i}:{baseline:o,lowered:ye(r,o.counts),refused:[]}}const a=new Map;for(const[e,t]of r){const n=Math.min(t,o.counts.get(e)??0);n>0&&a.set(e,n)}return{baseline:{kinds:s,counts:a},lowered:ye(r,a),refused:[]}}(f,S,k,{allowMove:r.allowMove});if(e.refused.length)return c(`--allow-move follows code that moved, and this is more of it than before:\n - ${e.refused.join("\n - ")}\nNothing was written.`);S=e.baseline,o($,M(S)),v(`${Ce}: ${e.lowered?`changed ${Be(e.lowered,"line")} in`:"nothing to change in"} ${Ae}`)}const j=function(e,t,n){const i=[],s=[],o=[...n.problems],r=ke(e),a=new Set(xe(e,t)),c=e.kinds.filter(e=>!t.kinds.includes(e));c.length&&o.push(`"kinds" names ${c.map(e=>`"${e}"`).join(", ")}, and the baseline was never taken for ${1===c.length?"it":"them"}. Run: efficient-shell-ui-check --init ${c.map(e=>`--kind ${e}`).join(" ")}`);const d=t.kinds.filter(t=>!e.kinds.includes(t));d.length&&s.push(`the baseline still carries ${d.map(e=>`"${e}"`).join(", ")}, which "kinds" no longer names`);const u=new Set([...n.counts.keys(),...t.counts.keys(),...r.keys()]);for(const e of[...u].sort(A)){const{file:c,kind:d}=E(e);if(!l(d)||!a.has(d))continue;const u=n.counts.get(e)??0,p=r.get(e)??0,f=t.counts.get(e)??0;u>p+f?i.push(`${c}: ${d} ${u}, and its line allows ${p+f}${$e(n,c,d)}. ${h[d].counts} is counted; use ${h[d].instead}.`):u<p?o.push(`${c}: ${d} ${u}, and "allow" in ui-kit.config.json says ${p}. ${0===u?"Delete the entry":`Lower its count to ${u}`}: an exception does not outlive what it excused.`):u<p+f&&s.push(`${c}: ${d} ${u}, and its line says ${p+f}`)}return{grown:i,shrunk:s,other:o,updateFixes:0===i.length&&0===o.length&&s.length>0}}(f,S,k),L=r.noBase?{problems:[],note:""}:function(e,t,n){const i=e.env.GITHUB_BASE_REF;if(!i)return{problems:[],note:""};const s=e.git(["rev-parse","--show-prefix"]);if(null===s)return{problems:[],note:"not a git checkout; the base branch was not compared"};const o=`origin/${i}`;if(null===e.git(["rev-parse","--verify","--quiet",`${o}^{commit}`])&&(e.git(["fetch","--no-tags","--depth=1","origin",`+refs/heads/${i}:refs/remotes/origin/${i}`]),null===e.git(["rev-parse","--verify","--quiet",`${o}^{commit}`])))return{problems:[],note:`${o} could not be fetched; the base branch was not compared`};const r=e.git(["show",`${o}:${s.trim()}${Ae}`]);if(null===r)return{problems:[],note:`${o} has no ${Ae} yet (adoption)`};let a;try{a=C(r,`${o}:${Ae}`)}catch{return{problems:[],note:`${o}'s ${Ae} could not be read; the base branch was not compared`}}const l=B(a.counts),c=B(t.counts);return{problems:n.filter(e=>a.kinds.includes(e)&&(c[e]??0)>(l[e]??0)).map(e=>`${Ae} holds ${c[e]??0} of "${e}", and ${o} holds ${l[e]??0}. The baseline only goes down: use ${h[e].instead}. A count that is meant to stay goes in "allow" in ${Te}, with its reason.`),note:`compared with ${o}`}}(t,S,f.kinds),T=f.kinds.filter(e=>S.kinds.includes(e)),F=`${Ce} --update`,J=[...j.other,...j.grown,...j.shrunk.map(e=>`${e}. Run: ${F}`),...L.problems],U=0===J.length;if(r.json){const e=new Map(f.allow.map(e=>[`${e.file}:${e.kind}`,e.count]));return t.out(JSON.stringify({tool:Ce,version:t.version,ok:U,schema:f.schema,kinds:f.kinds,files:k.files.length,counts:B(k.counts),baseline:B(S.counts),allowed:B(e),kitDeps:k.kitDeps,shellPeers:k.shellPeers,chartDeps:k.chartDeps,failures:J},null,2)),U?0:1}t.out(`UI kit check (harness UI-24), efficient-shell ${t.version}\n`);const W=(e,n,i="")=>{if(0===n.length)return t.out(` ok ${e}`);t.err(` FAIL ${e}`);for(const e of n)t.err(` ${e}`);i&&t.err(` ${i}`)};t.out(` ok the reader reads its own fixtures (typescript ${m.version})`),t.out(` ok read ${Be(k.files.length,"file")}`),W(`${Te} and ${Ae} describe this repository`,j.other),W("no file draws more of its own UI than its line allows",j.grown),W("every line is exact: a count that fell is a line to lower",j.shrunk,`Run: ${F}${j.updateFixes?"":" (after the failures above are fixed)"}`),L.note&&W(`the baseline is no higher than the base branch (${L.note})`,L.problems);const q=new Set([...k.counts.keys()].map(e=>E(e).file));return t.out(` ok PROGRESS: ${q.size} of ${Be(k.files.length,"file")} still draw UI of their own: `+Pe(k.counts,T)),t.out(""),U?t.out("UI kit check: ok"):t.err(`UI kit check: FAILED (${Be(J.length,"problem")})`),U?0:1}(process.argv.slice(2),{cwd:process.cwd(),env:process.env,out:e=>console.log(e),err:e=>console.error(e),loadTypeScript:()=>function(e){for(const i of[n(process.cwd(),"package.json"),e])try{return t(i)("typescript")}catch{}throw new Error("typescript is not installed")}(import.meta.url),git:function(t){try{return e("git",t,{cwd:process.cwd(),encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:6e4,maxBuffer:67108864})}catch{return null}},version:"8.22.0"});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BoxPlotChart as default}from"../chunk-
|
|
1
|
+
export{BoxPlotChart as default}from"../chunk-XUQQCKKD.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-O5KDTFK5.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CandlestickChart as default}from"../chunk-
|
|
1
|
+
export{CandlestickChart as default}from"../chunk-TYZ4IY7F.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-O5KDTFK5.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{CartesianPlot as default}from"../chunk-
|
|
2
|
+
export{CartesianPlot as default}from"../chunk-O5KDTFK5.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ChartBrush as default}from"../chunk-
|
|
2
|
+
export{ChartBrush as default}from"../chunk-F6YIUCIJ.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{ChartFrame as default}from"../chunk-
|
|
1
|
+
export{ChartFrame as default}from"../chunk-VNYFGNHO.js";import"../chunk-ZVTOB4RE.js";import"../chunk-CNYAHYE6.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ChartSkeleton as default}from"../chunk-
|
|
2
|
+
export{ChartSkeleton as default}from"../chunk-ZVTOB4RE.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ChordChart as default,foldChord}from"../chunk-
|
|
2
|
+
export{ChordChart as default,foldChord}from"../chunk-Z5TCGLCM.js";import"../chunk-CDRXZBVR.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-6KO5VTL7.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ColumnChart as default}from"../chunk-
|
|
2
|
+
export{ColumnChart as default}from"../chunk-F3AROMIU.js";import"../chunk-465RRWBY.js";import"../chunk-ZVTOB4RE.js";import"../chunk-CNYAHYE6.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-O5KDTFK5.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{FunnelChart as default}from"../chunk-
|
|
2
|
+
export{FunnelChart as default}from"../chunk-CPM3BQGV.js";import"../chunk-CNYAHYE6.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{HeatmapChart as default}from"../chunk-
|
|
2
|
+
export{HeatmapChart as default}from"../chunk-NHFLTKPK.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{HistogramChart as default}from"../chunk-
|
|
1
|
+
export{HistogramChart as default}from"../chunk-6UBBY54N.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-O5KDTFK5.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
package/dist/charts/Meter.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Meter as default}from"../chunk-
|
|
1
|
+
export{Meter as default}from"../chunk-YF7A3BWA.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
package/dist/charts/PieChart.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{PieChart as default}from"../chunk-
|
|
2
|
+
export{PieChart as default}from"../chunk-MWNZY33B.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-CNYAHYE6.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{RADAR_SERIES_CAP,RadarChart as default}from"../chunk-
|
|
2
|
+
export{RADAR_SERIES_CAP,RadarChart as default}from"../chunk-BUWOFJGM.js";import"../chunk-CDRXZBVR.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-CNYAHYE6.js";import"../chunk-6KO5VTL7.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-2JWPNR2U.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{RadialBarChart as default}from"../chunk-
|
|
2
|
+
export{RadialBarChart as default}from"../chunk-QSN7X27F.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-CNYAHYE6.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-2JWPNR2U.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{RangeChart as default}from"../chunk-
|
|
1
|
+
export{RangeChart as default}from"../chunk-FDENTKSM.js";import"../chunk-VFC6QUEN.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-O5KDTFK5.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{RankedBars as default}from"../chunk-
|
|
1
|
+
export{RankedBars as default}from"../chunk-2IV4XF3Y.js";import"../chunk-465RRWBY.js";import"../chunk-CNYAHYE6.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{SankeyChart as default}from"../chunk-
|
|
2
|
+
export{SankeyChart as default}from"../chunk-NE42BDQX.js";import"../chunk-CDRXZBVR.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-6KO5VTL7.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{SCATTER_SERIES_CAP,ScatterChart as default}from"../chunk-
|
|
2
|
+
export{SCATTER_SERIES_CAP,ScatterChart as default}from"../chunk-6JCIQ7XL.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
package/dist/charts/StatTile.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{StatTile as default}from"../chunk-
|
|
1
|
+
export{StatTile as default}from"../chunk-ZMLRNHMS.js";import"../chunk-CKCDGSTC.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{SunburstChart as default}from"../chunk-
|
|
2
|
+
export{SunburstChart as default}from"../chunk-ONEF47LG.js";import"../chunk-CDRXZBVR.js";import"../chunk-VFC6QUEN.js";import"../chunk-CNYAHYE6.js";import"../chunk-6KO5VTL7.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{TimeSeriesChart as default}from"../chunk-
|
|
2
|
+
export{TimeSeriesChart as default}from"../chunk-EUOFKZI3.js";import"../chunk-CK2YOGUS.js";import"../chunk-VFC6QUEN.js";import"../chunk-465RRWBY.js";import"../chunk-ZVTOB4RE.js";import"../chunk-CNYAHYE6.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-F6YIUCIJ.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{TreemapChart as default}from"../chunk-
|
|
2
|
+
export{TreemapChart as default}from"../chunk-W7NZKU27.js";import"../chunk-46BYGPGD.js";import"../chunk-CDRXZBVR.js";import"../chunk-CNYAHYE6.js";import"../chunk-6KO5VTL7.js";import"../chunk-22S6LG6D.js";import"../chunk-PGN5ME7B.js";import"../chunk-62LW225J.js";import"../chunk-GLUJS42B.js";import"../chunk-D65T4H6J.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{WaterfallChart as default}from"../chunk-
|
|
1
|
+
export{WaterfallChart as default}from"../chunk-74QAQXSB.js";import"../chunk-P5BOTIJU.js";import"../chunk-DTJRIWFR.js";import"../chunk-O5KDTFK5.js";import"../chunk-MG7A3R75.js";import"../chunk-2JWPNR2U.js";import"../chunk-MAFUXCPZ.js";import"../chunk-TWVUQUUD.js";import"../chunk-TZFACUMR.js";import"../chunk-VKMEQKYT.js";import"../chunk-C3QOHMR6.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{isFocusableEntry as e,menuStatusIds as t,renderMenuEntries as r}from"./chunk-53ROHXAV.js";import{PopupMenu as n,PopupMenuDivider as o}from"./chunk-O6JX6RDX.js";import{useTabLayer as i,focusableIn as a}from"./chunk-CDAJKLGL.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as s}from"./chunk-62LW225J.js";import{placeMenu as d,popupBounds as c,followAnchor as u}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as p}from"./chunk-D65T4H6J.js";import{registerModalEscapeInterceptor as f}from"./chunk-TWVUQUUD.js";import{useState as m,useRef as h,useId as g,useCallback as v,useEffect as b}from"react";import{jsxs as y,jsx as x}from"react/jsx-runtime";var k=/(^|[\s:])!?z-/,w={paddingLeft:"var(--menu-padding-x, 1rem)",paddingRight:"var(--menu-padding-x, 1rem)",paddingTop:"0.25rem",paddingBottom:"0.25rem"};function D({trigger:D,items:L,align:j="end",side:A="bottom","aria-label":C,className:E="",triggerClassName:K,menuClassName:S="",minWidth:W=180,linkAs:H,disabled:$,id:N,"aria-describedby":T,"aria-disabled":U=!1,onOpenChange:J,footer:B,footerLabel:I}){const[R,q]=m(!1),[G,M]=m(-1),O=h(null),X=h(null),z=h(null),P=h(null),V=h(null),Q=null!=B&&!1!==B,Y=h({text:"",at:0}),F=g(),Z=g(),_=N??Z,ee=h(J);ee.current=J;const te=h(R);te.current=R;const re=v(e=>{q(!1),te.current&&(te.current=!1,ee.current?.(!1)),e&&X.current?.focus()},[]),ne=(t,r)=>{const n=L.length;for(let o=0;o<n;o+=1){const i=((t+r*o)%n+n)%n;if(e(L[i]))return i}return-1},oe=()=>z.current?.closest("[data-popup-menu-tree]")??null;b(()=>{if(!R)return;const e=e=>{const t=e.target;if(O.current?.contains(t)||oe()?.contains(t))return;const r=oe()?.getAttribute("data-popup-menu-tree"),n=t.closest?.("[data-popup-menu-tree]");r&&n?.getAttribute("data-popup-menu-tree")===r||re(!1)};document.addEventListener("pointerdown",e,!0);const t=l(()=>re(!1));return()=>{document.removeEventListener("pointerdown",e,!0),t()}},[R,re]);const ie=v(()=>{const e=oe(),t=X.current;if(!e||!t)return;const r=e.style;r.left="0px",r.top="0px",r.maxWidth="none",r.maxHeight="none";const n={width:e.offsetWidth,height:e.offsetHeight},o=d({trigger:t.getBoundingClientRect(),menu:n,bounds:c(t),align:j,side:A});r.left=`${o.left}px`,r.top=`${o.top}px`,r.maxWidth=`${o.maxWidth}px`,r.maxHeight=`${o.maxHeight}px`,r.overflowY=n.height>o.maxHeight?"auto":"",e.dataset.side=o.side,e.dataset.align=j},[j,A]);p(()=>{R&&ie()}),b(()=>{if(R)return u(()=>X.current,ie)},[R,ie]),b(()=>{if(!R)return;const t=z.current,r=e(L[G])?t?.querySelector(`[data-dropdown-index="${G}"]`):null;(r??t)?.focus({preventScroll:!0})},[R,G]),b(()=>{if(R)return f(e=>"Escape"===e.key&&(re(!0),!0),()=>P.current)},[R,re]),i(P,R&&Q);const ae=h(null),le=e=>"first"===e?ne(0,1):ne(L.length-1,-1),se=e=>{M(le(e)),q(!0),te.current||(te.current=!0,ae.current=e,J?.(!0))};p(()=>{const e=ae.current;if(!R||!e)return;ae.current=null;const t=le(e);t!==G&&M(t)});const de=t(L,F),ce="function"==typeof B?B({close:()=>re(!0)}):B,ue={...k.test(S)?{}:{zIndex:s.popup},minWidth:W};/* @__PURE__ */
|
|
2
|
+
return y("div",{ref:O,className:`relative inline-flex ${E}`.trim(),children:[
|
|
3
|
+
/* @__PURE__ */x("button",{ref:X,id:_,type:"button","aria-haspopup":"menu","aria-expanded":R,"aria-controls":R?F:void 0,"aria-label":C,"aria-describedby":T,"aria-disabled":U||void 0,disabled:$,onClick:()=>{U||(R?re(!1):se("first"))},onKeyDown:e=>{U||("ArrowDown"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),se("first")):"ArrowUp"===e.key&&(e.preventDefault(),se("last")))},className:K??"inline-flex items-center justify-center rounded-(--radius-control) text-gray-600 transition-colors not-disabled:not-aria-disabled:hover:bg-gray-100 not-disabled:not-aria-disabled:hover:text-gray-900 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] disabled:cursor-not-allowed disabled:opacity-60 "+(C?"h-8 min-w-8 px-0":"h-8 min-w-8 gap-2 px-3"),children:D}),R&&
|
|
4
|
+
/* @__PURE__ */x(n,{portal:!0,className:S,style:ue,children:/* @__PURE__ */y("div",{ref:P,children:[
|
|
5
|
+
/* @__PURE__ */x("div",{ref:z,id:F,role:"menu","aria-orientation":"vertical","aria-label":C,"aria-labelledby":C?void 0:_,"aria-describedby":de,tabIndex:-1,onKeyDown:t=>{if(!t.target.closest?.("[data-popup-submenu-panel]")||"Tab"===t.key)if("ArrowDown"===t.key)t.preventDefault(),M(ne(G+1,1));else if("ArrowUp"===t.key)t.preventDefault(),M(ne(G-1,-1));else if("Home"===t.key)t.preventDefault(),M(ne(0,1));else if("End"===t.key)t.preventDefault(),M(ne(L.length-1,-1));else if("Tab"===t.key){t.preventDefault();const e=!t.shiftKey&&V.current?a(V.current)[0]:void 0;e?e.focus({preventScroll:!0}):re(!0)}else if(" "===t.key){const e=t.target;e.matches?.("a[href]")&&(t.preventDefault(),e.click())}else 1!==t.key.length||t.ctrlKey||t.metaKey||t.altKey||(t=>{const r=Date.now(),n=t.key.toLowerCase(),o=r-Y.current.at<500?Y.current.text+n:n;Y.current={text:o,at:r};const i=[...o].every(e=>e===o[0]),a=i?o[0]:o,l=i?G+1:Math.max(G,0),s=z.current,d=L.length;for(let r=0;r<d;r+=1){const n=((l+r)%d+d)%d;if(e(L[n])&&(s?.querySelector(`[data-dropdown-index="${n}"]`)?.textContent?.trim().toLowerCase()??"").startsWith(a))return t.preventDefault(),void M(n)}})(t)},children:r(L,{menuId:F,choose:e=>{e.disabled||(re(!0),e.onSelect())},toggle:e=>{e.disabled||e.onSelect()},followLink:()=>re(!0),rowProps:(e,t)=>({"data-dropdown-index":e,tabIndex:e===G?0:-1,onMouseEnter:()=>{t.disabled||V.current?.contains(document.activeElement)||M(e)}}),linkAs:H})}),Q&&/* @__PURE__ */y("div",{ref:V,role:"group","aria-label":I,"data-dropdown-footer":"",onKeyDown:e=>{const t=V.current;if("Tab"!==e.key||!t||!t.contains(e.target))return;const r=a(t),n=document.activeElement;if(e.shiftKey){if(r.length>0&&n!==r[0])return;e.preventDefault();const t=z.current?.querySelector(`[data-dropdown-index="${G}"]`);return void(t??z.current)?.focus({preventScroll:!0})}r.length>0&&n!==r[r.length-1]||(e.preventDefault(),re(!0))},children:[
|
|
6
|
+
/* @__PURE__ */x("div",{"aria-hidden":"true",children:/* @__PURE__ */x(o,{})}),
|
|
7
|
+
/* @__PURE__ */x("div",{style:w,children:ce})]})]})})]})}export{D as DropdownMenu};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{MOTION as e,stagger as a}from"./chunk-465RRWBY.js";import{autoHighlightIndex as t}from"./chunk-CNYAHYE6.js";import{seriesColor as s,STATUS_VARS as l,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as r}from"./chunk-
|
|
2
|
-
return o("p",{className:`text-sm text-gray-500 ${k??""}`,children:
|
|
1
|
+
import{MOTION as e,stagger as a}from"./chunk-465RRWBY.js";import{autoHighlightIndex as t}from"./chunk-CNYAHYE6.js";import{seriesColor as s,STATUS_VARS as l,CHART_INK as n}from"./chunk-TZFACUMR.js";import{useShellStrings as i,useShellLocale as r}from"./chunk-VKMEQKYT.js";import{formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsx as o,jsxs as h}from"react/jsx-runtime";function c({rows:c,max:u,formatValue:d,emphasisKey:p,highlight:g="none",emphasisTone:x,barHeight:f=12,rowGap:y=30,animate:b=!0,labelFont:N="sans",className:k,emptyLabel:v}){const $=i().charts,j=r(),w=d??(e=>m(e,j)),M=v??$.nothingToRank;if(0===c.length)/* @__PURE__ */
|
|
2
|
+
return o("p",{className:`text-sm text-gray-500 ${k??""}`,children:M});const F=t(c.map(e=>e.value),g),R=p??(null===F?void 0:c[F]?.key),C=u??Math.max(...c.map(e=>e.value).filter(Number.isFinite),0),T=s(0);/* @__PURE__ */
|
|
3
3
|
return o("ol",{className:`m-0 list-none p-0 ${k??""}`,style:{display:"grid",rowGap:`${Math.max(4,y-f)}px`},children:c.map((t,i)=>{const r=t.key===R,m=r?x?l[x]:s(1):R?n.muted:T,c=Number.isFinite(t.value)?t.value:null,u=null!==c&&C>0?Math.max(0,Math.min(1,c/C)):0;/* @__PURE__ */
|
|
4
4
|
return h("li",{className:"grid gap-1",children:[
|
|
5
5
|
/* @__PURE__ */h("div",{className:"flex items-baseline justify-between gap-3",children:[
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setPdfPreview as e}from"./chunk-ESL5TDNA.js";import{setSpreadsheetPreview as t}from"./chunk-VTVSMRFX.js";import{toast_default as n}from"./chunk-
|
|
1
|
+
import{setPdfPreview as e}from"./chunk-ESL5TDNA.js";import{setSpreadsheetPreview as t}from"./chunk-VTVSMRFX.js";import{toast_default as n}from"./chunk-QUS3C264.js";var i="react-os-shell:preview-opened";async function o(o){const{filePath:a,filename:r,kind:c,onStaged:s}=o;try{const o=await fetch(`${("undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000").replace(/\/$/,"")}/api/file?path=${encodeURIComponent(a)}`,{credentials:"include"});if(!o.ok)return n.error(`Download failed (${o.status})`),!1;const d=await o.blob();if("csv"===c){const e=await d.text();t({csv:e,filename:r}),s?.("/spreadsheet")}else{const t=URL.createObjectURL(d);e({url:t,filename:r,kind:c}),s?.("/preview")}return"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(i,{detail:{filePath:a,filename:r,kind:c}})),!0}catch(e){return n.error(e?.message||"Open failed"),!1}}export{i as PREVIEW_OPENED_EVENT,o as openPreviewFile};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{GROUP_COLORS as e}from"./chunk-D323R2FT.js";import{SpinnerRing as r}from"./chunk-Q5MD3VY6.js";import{Tooltip as n}from"./chunk-22S6LG6D.js";import{useShellStrings as l}from"./chunk-
|
|
1
|
+
import{GROUP_COLORS as e}from"./chunk-D323R2FT.js";import{SpinnerRing as r}from"./chunk-Q5MD3VY6.js";import{Tooltip as n}from"./chunk-22S6LG6D.js";import{useShellStrings as l}from"./chunk-VKMEQKYT.js";import{jsx as t,jsxs as i,Fragment as a}from"react/jsx-runtime";var s="inline-flex items-center gap-1 whitespace-nowrap rounded-md border border-current/20 py-0.5 pl-2 pr-1 text-2xs font-medium";function o({label:e,glyph:r,onClick:l}){/* @__PURE__ */
|
|
2
2
|
return t(n,{content:e,describe:!1,children:/* @__PURE__ */t("button",{type:"button",onClick:l,"aria-label":e,className:"flex h-4 w-4 items-center justify-center rounded-full leading-none hover:bg-current/10 rosh-focus-ring focus-visible:ring-2",children:/* @__PURE__ */t("span",{"aria-hidden":"true",children:r})})})}function c({state:n,label:c,verb:u,subject:m,pct:p,onCancel:d,onRetry:h,onDismiss:f,className:b=""}){const g=l().transfer;if("idle"===n)return null==c?null:/* @__PURE__ */t("span",{className:`${s} ${e.neutral} pr-2 ${b}`.trim(),children:c});if("error"===n)/* @__PURE__ */
|
|
3
3
|
return i("span",{role:"status",className:`${s} ${e.danger} ${b}`.trim(),children:[
|
|
4
4
|
/* @__PURE__ */t("span",{children:g.error}),h&&/* @__PURE__ */t(o,{label:g.retry,glyph:"↻",onClick:h}),f&&/* @__PURE__ */t(o,{label:g.dismiss,glyph:"×",onClick:f})]});const y=u??g.uploading,$=null==p||Number.isNaN(p)?null:Math.max(0,Math.min(100,Math.round(p))),k="string"==typeof y?g.cancelVerb(y.toLowerCase()):g.cancel,N=e=>[e,m,null==$?"":`${$}%`].filter(Boolean).join(" ");/* @__PURE__ */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as r}from"./chunk-TZFNWAED.js";import{Icon as n}from"./chunk-KIBL6M3T.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as l}from"./chunk-
|
|
1
|
+
import{useSidebarSheet as e}from"./chunk-QWK6DRSN.js";import{resolveSeverity as t,severityWord as r}from"./chunk-TZFNWAED.js";import{Icon as n}from"./chunk-KIBL6M3T.js";import{useBrowserState as a}from"./chunk-D65T4H6J.js";import{useShellStrings as l}from"./chunk-VKMEQKYT.js";import{useId as i,useRef as s,useEffect as c,Children as o,isValidElement as u}from"react";import{jsx as d,jsxs as m,Fragment as h}from"react/jsx-runtime";function p(e){return"shrink-0 inline-flex items-center justify-center min-w-[1.25rem] px-2 h-5 rounded-full text-2xs font-medium "+(e?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-600")}function f({children:e,count:t}){return null==t?/* @__PURE__ */d("p",{className:"px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:e}):/* @__PURE__ */m("p",{className:"flex items-center justify-between gap-2 px-3 pb-1 pt-1 text-xs font-semibold uppercase tracking-wide text-gray-500",children:[
|
|
2
2
|
/* @__PURE__ */d("span",{className:"min-w-0 truncate",children:e}),
|
|
3
|
-
/* @__PURE__ */d("span",{className:"shrink-0 normal-case tracking-normal tabular-nums",children:t})]})}function g(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-blue-50 font-medium text-blue-700":"border-gray-200 text-gray-700 hover:bg-gray-100")}function x({label:n,count:a,active:o,onClick:u,icon:f,trailing:x,severity:b,depth:y=0}){const w=t(b,"SidebarNavItem"),k=l().severity,N=w?r(w,k):void 0,v=e(),j=i(),
|
|
3
|
+
/* @__PURE__ */d("span",{className:"shrink-0 normal-case tracking-normal tabular-nums",children:t})]})}function g(e){return"flex min-w-0 flex-1 items-center justify-between gap-2 rounded-r-lg border-l-2 h-8 px-3 text-sm "+(e?"border-blue-500 bg-blue-50 font-medium text-blue-700":"border-gray-200 text-gray-700 hover:bg-gray-100")}function x({label:n,count:a,active:o,onClick:u,icon:f,trailing:x,severity:b,depth:y=0}){const w=t(b,"SidebarNavItem"),k=l().severity,N=w?r(w,k):void 0,v=e(),j=i(),I=s(null),K=s(n);K.current=n,c(()=>{if(v&&o)return v.report(j,()=>K.current,I.current)},[v,o,j]);const S=/* @__PURE__ */m(h,{children:[null!=f&&/* @__PURE__ */d("span",{"aria-hidden":"true",className:"shrink-0 h-4 w-4",children:f}),w&&
|
|
4
4
|
/* @__PURE__ */d("span",{"aria-hidden":"true",title:N,className:`shrink-0 h-1.5 w-1.5 rounded-full ${w.fill}`}),
|
|
5
5
|
/* @__PURE__ */d("span",{className:"min-w-0 truncate mr-auto",title:"string"==typeof n?n:void 0,children:n}),w&&/* @__PURE__ */d("span",{className:"sr-only",children:N}),null!=a&&a>0&&/* @__PURE__ */d("span",{className:p(o),children:a}),null!=x&&/* @__PURE__ */d("span",{className:"shrink-0",children:x})]});/* @__PURE__ */
|
|
6
|
-
return d("button",1===y?{ref:
|
|
6
|
+
return d("button",1===y?{ref:I,type:"button",onClick:u,className:"flex w-full pl-5 text-left",children:/* @__PURE__ */d("span",{className:g(o),children:S})}:{ref:I,type:"button",onClick:u,className:"flex w-full items-center justify-between gap-2 rounded-lg h-8 px-3 text-sm text-left "+(o?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),children:S})}function b({label:e,count:t,children:r,defaultExpanded:l=!0,storageKey:s}){const c=i(),[h,f]=a(()=>{if(s){let e=null;try{e=window.localStorage.getItem(s)}catch{}if("1"===e||"0"===e)return"1"===e}return l},l),g=!h&&o.toArray(r).some(e=>u(e)&&!0===e.props.active);/* @__PURE__ */
|
|
7
7
|
return m("div",{children:[
|
|
8
8
|
/* @__PURE__ */m("button",{type:"button",onClick:()=>{const e=!h;if(f(e),s)try{window.localStorage.setItem(s,e?"1":"0")}catch{}},"aria-expanded":h,"aria-controls":c,className:"flex w-full items-center gap-2 rounded-lg h-8 px-3 text-sm font-medium text-left "+(g?"bg-blue-50 text-blue-700":"text-gray-800 hover:bg-gray-100"),children:[
|
|
9
9
|
/* @__PURE__ */d("span",{className:"min-w-0 truncate",title:e,children:e}),
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import{Dialog as e}from"./chunk-
|
|
2
|
-
return m(r,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function
|
|
3
|
-
return m(r,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function
|
|
4
|
-
return d(b.Provider,{value:
|
|
5
|
-
/* @__PURE__ */m(e,{open:r,onClose:()=>
|
|
6
|
-
/* @__PURE__ */m("button",{ref:
|
|
7
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>
|
|
8
|
-
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(
|
|
1
|
+
import{Dialog as e}from"./chunk-FW2EEIDB.js";import{buttonClasses as t}from"./chunk-K7U4RWXJ.js";import{Icon as r}from"./chunk-KIBL6M3T.js";import{useShellStrings as n,splitAround as o}from"./chunk-VKMEQKYT.js";import{createContext as l,useContext as a,useState as i,useRef as s,useCallback as c,useEffect as u}from"react";import{jsxs as d,jsx as m,Fragment as h}from"react/jsx-runtime";var b=l(()=>Promise.resolve(!1)),f=()=>a(b),g=()=>Promise.resolve(!1),p=e=>g(e),y=()=>Promise.resolve(!1),v=e=>y(e),x=()=>Promise.resolve(null),N=e=>x(e),k={danger:{icon:"text-red-600 bg-red-100",button:t({variant:"danger"})},warning:{icon:"text-yellow-600 bg-yellow-100",button:t({variant:"warning"})},info:{icon:"text-blue-600 bg-blue-100",button:t({variant:"primary"})}},w=t({variant:"secondary"}),C=t({variant:"primary"}),L="w-full rounded-md border border-gray-300 h-8 px-3 text-sm";function E(){/* @__PURE__ */
|
|
2
|
+
return m(r,{name:"warning",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function P(){/* @__PURE__ */
|
|
3
|
+
return m(r,{name:"close",className:"h-5 w-5",strokeWidth:1.5,"aria-hidden":"true"})}function j({children:t}){const[r,l]=i(!1),[a,f]=i({message:""}),[p,v]=i(0),N=s(),j=s(null),F=s(0),K=s([]),T=s(null),W=s(null),$=c(e=>{j.current=e.id,N.current=e.resolve,v(e.id),f(e.options),l(!0)},[]),D=c(e=>{const t="string"==typeof e?{message:e}:e;return new Promise(e=>{const r={id:++F.current,options:t,resolve:e};null===j.current?$(r):K.current.push(r)})},[$]),[B,I]=i(!1),[M,V]=i({message:""}),[J,Q]=i(""),R=s(),U=c(e=>(V(e),Q(""),I(!0),new Promise(e=>{R.current=e})),[]),[X,Y]=i(!1),[q,z]=i({}),[A,G]=i(""),H=s(),O=c(e=>{const t="string"==typeof e?{message:e}:e;return z(t),G(t.defaultValue??""),Y(!0),new Promise(e=>{H.current=e})},[]);u(()=>{g=D,y=U,x=O},[D,U,O]);const S=(e,t)=>{if(j.current!==e)return;const r=N.current,n=K.current.shift();n?$(n):(j.current=null,N.current=void 0,l(!1)),r?.(t)},Z=e=>{I(!1),Q(""),R.current?.(e)},_=e=>{if(e){const e=A.trim();if(!e&&!q.allowEmpty)return Y(!1),void H.current?.(null);Y(!1),H.current?.(e)}else Y(!1),H.current?.(null)},ee=a.variant||(a.confirmLabel?.toLowerCase().includes("delete")||a.message.toLowerCase().includes("delete")?"danger":"info"),te=k[ee],re=k["warning"===M.variant?"warning":"danger"],ne=M.confirmWord,oe=null==ne||J===ne,le=n().dialog,[ae,ie]=o(le.typeToConfirm);/* @__PURE__ */
|
|
4
|
+
return d(b.Provider,{value:D,children:[t,
|
|
5
|
+
/* @__PURE__ */m(e,{open:r,onClose:()=>S(p,!1),initialFocus:T,footer:/* @__PURE__ */d(h,{children:[
|
|
6
|
+
/* @__PURE__ */m("button",{ref:T,type:"button",onClick:()=>S(p,!1),className:w,children:a.cancelLabel||le.cancel}),
|
|
7
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>S(p,!0),className:te.button,children:a.confirmLabel||le.ok})]}),children:/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
8
|
+
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${te.icon}`,children:/* @__PURE__ */m(E,{})}),
|
|
9
9
|
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
10
10
|
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900",children:a.title||le.confirmTitle}),
|
|
11
11
|
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:a.message})]})]})}),
|
|
12
|
-
/* @__PURE__ */d(e,{open:
|
|
13
|
-
/* @__PURE__ */m("button",{ref:W,type:"button",onClick:()=>Z(!1),className:w,children:
|
|
14
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!0),disabled:!oe,className:re.button,children:ne??
|
|
15
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!1),"aria-label":le.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */m(
|
|
12
|
+
/* @__PURE__ */d(e,{open:B,onClose:()=>Z(!1),initialFocus:null!=ne?void 0:W,footer:/* @__PURE__ */d(h,{children:[
|
|
13
|
+
/* @__PURE__ */m("button",{ref:W,type:"button",onClick:()=>Z(!1),className:w,children:M.cancelLabel||le.destructiveCancel}),
|
|
14
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!0),disabled:!oe,className:re.button,children:ne??M.confirmLabel??le.destructiveConfirm})]}),children:[
|
|
15
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>Z(!1),"aria-label":le.close,className:"absolute right-4 top-4 rounded-md p-1 text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:/* @__PURE__ */m(P,{})}),
|
|
16
16
|
/* @__PURE__ */d("div",{className:"flex gap-4",children:[
|
|
17
|
-
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(
|
|
17
|
+
/* @__PURE__ */m("div",{className:`shrink-0 w-10 h-10 rounded-full flex items-center justify-center ${re.icon}`,children:/* @__PURE__ */m(E,{})}),
|
|
18
18
|
/* @__PURE__ */d("div",{className:"flex-1",children:[
|
|
19
|
-
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:
|
|
20
|
-
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:
|
|
19
|
+
/* @__PURE__ */m("h2",{className:"text-base font-semibold text-gray-900 pr-6",children:M.title||le.destructiveTitle}),
|
|
20
|
+
/* @__PURE__ */m("p",{className:"mt-2 text-sm text-gray-600",children:M.message}),null!=ne&&/* @__PURE__ */d(h,{children:[
|
|
21
21
|
/* @__PURE__ */d("p",{className:"mt-3 text-sm text-gray-700",children:[ae,
|
|
22
22
|
/* @__PURE__ */m("kbd",{className:"rounded border border-gray-300 bg-gray-50 px-2 py-0.5 text-xs font-bold text-red-600 font-mono",children:ne}),ie]}),
|
|
23
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:
|
|
24
|
-
/* @__PURE__ */d(e,{open:
|
|
25
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:
|
|
26
|
-
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!
|
|
27
|
-
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:
|
|
23
|
+
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:J,onChange:e=>Q(e.target.value),onKeyDown:e=>{"Enter"===e.key&&J===ne&&Z(!0)},placeholder:ne,className:`mt-2 ${L} focus:border-red-500`})]})]})]})]}),
|
|
24
|
+
/* @__PURE__ */d(e,{open:X,onClose:()=>_(!1),title:q.title||le.promptTitle,footer:/* @__PURE__ */d(h,{children:[
|
|
25
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!1),className:w,children:q.cancelLabel||le.cancel}),
|
|
26
|
+
/* @__PURE__ */m("button",{type:"button",onClick:()=>_(!0),disabled:!q.allowEmpty&&!A.trim(),className:C,children:q.confirmLabel||le.ok})]}),children:[q.message&&/* @__PURE__ */m("p",{className:"text-sm text-gray-600",children:q.message}),
|
|
27
|
+
/* @__PURE__ */m("input",{autoFocus:!0,type:"text",value:A,onChange:e=>G(e.target.value),onKeyDown:e=>{"Enter"===e.key?_(!0):"Escape"===e.key&&_(!1)},onFocus:e=>e.target.select(),placeholder:q.placeholder,className:`mt-3 ${L} focus:border-blue-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-accent)]`})]})]})}export{j as ConfirmProvider,p as confirm,v as confirmDestructive,N as prompt,f as useConfirm};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{inputClasses as e}from"./chunk-JFSYWEHD.js";import{useShellLocale as t}from"./chunk-
|
|
1
|
+
import{inputClasses as e}from"./chunk-JFSYWEHD.js";import{useShellLocale as t}from"./chunk-VKMEQKYT.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";var a=/^\d{2}:\d{2}(:\d{2})?$/,i=e=>String(e).padStart(2,"0");function s(e,t){if(null==e||""===e)return"";if(e instanceof Date){if(Number.isNaN(e.getTime()))return"";const n=`${i(e.getHours())}:${i(e.getMinutes())}`;return t?`${n}:${i(e.getSeconds())}`:n}return a.test(e)?e:""}var u=n(function({value:n,onChange:i,min:u,max:o,invalid:m,size:l,className:c="",step:v,...d},f){const g=null!=v&&Number(v)<60,p=t();/* @__PURE__ */
|
|
2
2
|
return r("input",{ref:f,type:"time",lang:p,step:v,"aria-invalid":m||void 0,value:s(n,g),min:s(u,g)||void 0,max:s(o,g)||void 0,onChange:e=>i?.(a.test(e.target.value)?e.target.value:null),className:e({invalid:m,size:l,className:c}),...d})});export{u as TimePicker_default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{InputNumber_default as a}from"./chunk-
|
|
1
|
+
import{InputNumber_default as a}from"./chunk-MIZO6SQ3.js";import{Icon as e}from"./chunk-KIBL6M3T.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";var n="h-3.5 w-3.5",l={x:/* @__PURE__ */i(e,{name:"nudge-x","aria-hidden":"true",className:n}),y:/* @__PURE__ */i(e,{name:"nudge-y","aria-hidden":"true",className:n})};function s({label:e,value:n,onChange:s,words:m,placeholder:o,min:d=-200,max:c=200,step:t=1,readOnly:p}){const u=e=>/* @__PURE__ */i("div",{"data-axis":e,className:"min-w-0",children:/* @__PURE__ */i(a,{value:n[e],onChange:a=>s({...n,[e]:a}),min:d,max:c,step:t,precision:0,steppers:"compact",readOnly:p,placeholder:o[e],prefix:l[e],suffix:m.unit,"aria-label":m[e]})});/* @__PURE__ */
|
|
2
2
|
return r("div",{role:"group","aria-label":e,className:"grid min-w-0 grid-cols-2 gap-2",children:[u("x"),u("y")]})}export{s as PositionInput};
|