efficient-shell 9.9.0 → 9.10.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.
Files changed (311) hide show
  1. package/dist/{Browser-ZPOVP4Z7.js → Browser-VUQISZ2Z.js} +14 -14
  2. package/dist/Calculator-IZXBE6R7.js +29 -0
  3. package/dist/{CurrencyConverter-SSR2XDIC.js → CurrencyConverter-AW7BB3DD.js} +8 -8
  4. package/dist/{Documents-T7JYO223.js → Documents-WPTBUSKV.js} +7 -7
  5. package/dist/{Files-HBGW3JWI.js → Files-IZ6N6SG6.js} +31 -31
  6. package/dist/{Notepad-GO2QT55C.js → Notepad-VRQH524R.js} +10 -10
  7. package/dist/{PdfViewer-XSISAJZP.js → PdfViewer-FFQOKKFW.js} +1 -1
  8. package/dist/{PomodoroTimer-EV6D4OFU.js → PomodoroTimer-5VCWY4QT.js} +25 -25
  9. package/dist/{Preview-Z2CRCDHA.js → Preview-SP3WIE54.js} +11 -11
  10. package/dist/Sidebar-PUXP2DFI.js +43 -0
  11. package/dist/{Spreadsheet-GEE77GD3.js → Spreadsheet-4U4ABNE2.js} +11 -11
  12. package/dist/{Stock-6ZIQHGPH.js → Stock-2VWS2IQJ.js} +4 -4
  13. package/dist/{Weather-II7NFRMK.js → Weather-4MEYBP4D.js} +18 -18
  14. package/dist/{WorldClock-NBLNO63Q.js → WorldClock-Y4YRJ43F.js} +6 -6
  15. package/dist/ai/index.js +56 -53
  16. package/dist/ai.css +1 -1
  17. package/dist/apps/index.js +1 -1
  18. package/dist/bin/media-host-check.js +1 -1
  19. package/dist/bin/ui-check.js +1 -1
  20. package/dist/brand.css +1 -1
  21. package/dist/charts/BoxPlotChart.js +1 -1
  22. package/dist/charts/CandlestickChart.js +1 -1
  23. package/dist/charts/CartesianPlot.d.ts +24 -1
  24. package/dist/charts/CartesianPlot.js +1 -1
  25. package/dist/charts/ChartBrush.js +1 -1
  26. package/dist/charts/ChartFrame.js +1 -1
  27. package/dist/charts/ChartSkeleton.js +1 -1
  28. package/dist/charts/ChordChart.js +1 -1
  29. package/dist/charts/ColumnChart.d.ts +4 -1
  30. package/dist/charts/ColumnChart.js +1 -1
  31. package/dist/charts/FunnelChart.js +1 -1
  32. package/dist/charts/HeatmapChart.js +1 -1
  33. package/dist/charts/HistogramChart.js +1 -1
  34. package/dist/charts/Meter.js +1 -1
  35. package/dist/charts/PieChart.js +1 -1
  36. package/dist/charts/RadarChart.js +1 -1
  37. package/dist/charts/RadialBarChart.js +1 -1
  38. package/dist/charts/RangeChart.js +1 -1
  39. package/dist/charts/RankedBars.js +1 -1
  40. package/dist/charts/SankeyChart.js +1 -1
  41. package/dist/charts/ScatterChart.js +1 -1
  42. package/dist/charts/SpecChart.js +1 -1
  43. package/dist/charts/StatTile.js +1 -1
  44. package/dist/charts/SunburstChart.js +1 -1
  45. package/dist/charts/TimeSeriesChart.d.ts +1 -1
  46. package/dist/charts/TimeSeriesChart.js +1 -1
  47. package/dist/charts/TreemapChart.js +1 -1
  48. package/dist/charts/WaterfallChart.js +1 -1
  49. package/dist/charts/types.d.ts +35 -1
  50. package/dist/{chunk-7WGOLPGM.js → chunk-2AHLONPR.js} +1 -1
  51. package/dist/{chunk-2MLRK7IO.js → chunk-2GPHHW7C.js} +4 -4
  52. package/dist/{chunk-P3OBE43Q.js → chunk-2LDOLQ7F.js} +6 -6
  53. package/dist/{chunk-EFFF3FCS.js → chunk-2SJDTKQA.js} +19 -19
  54. package/dist/{chunk-DZTAGMNY.js → chunk-2XBJNB7D.js} +34 -34
  55. package/dist/{chunk-HQMN5THW.js → chunk-3FBYM6O5.js} +14 -14
  56. package/dist/{chunk-EXNAAHN4.js → chunk-3MHBALGV.js} +2 -2
  57. package/dist/{chunk-CJB73MHF.js → chunk-3XRBVYTO.js} +2 -2
  58. package/dist/{chunk-BVTNGW5S.js → chunk-46YVA2BF.js} +1 -1
  59. package/dist/chunk-4CPE5NBC.js +8 -0
  60. package/dist/{chunk-CO5RKOVX.js → chunk-4DBPKTVX.js} +16 -16
  61. package/dist/{chunk-DNWV6N4P.js → chunk-4SZ3NNVF.js} +1 -1
  62. package/dist/{chunk-XD34TCRG.js → chunk-4XZXY2AF.js} +1 -1
  63. package/dist/{chunk-5JRL5LXD.js → chunk-5AWV5R6E.js} +6 -6
  64. package/dist/{chunk-PYLNMN6E.js → chunk-5CVQN2BR.js} +8 -8
  65. package/dist/{chunk-RWJCKZEY.js → chunk-5Q3PFKB5.js} +1 -1
  66. package/dist/{chunk-LUWRPPJA.js → chunk-5R6RNUDB.js} +5 -5
  67. package/dist/{chunk-WUKN5WUM.js → chunk-5RAOFJYT.js} +6 -6
  68. package/dist/{chunk-WFHYU66E.js → chunk-5VYBPDZ2.js} +1 -1
  69. package/dist/{chunk-ZAU2HIRH.js → chunk-5XNN2SSR.js} +4 -4
  70. package/dist/{chunk-O5LQBBW2.js → chunk-5Y6LGPZI.js} +7 -7
  71. package/dist/{chunk-ZYDZY6ED.js → chunk-5Y7JITHW.js} +1 -1
  72. package/dist/{chunk-3APSMJPN.js → chunk-64R3IYAM.js} +1 -1
  73. package/dist/{chunk-Z3JW77LH.js → chunk-65DYHG73.js} +1 -1
  74. package/dist/{chunk-5VOVNIOU.js → chunk-6O2W4X2V.js} +1 -1
  75. package/dist/{chunk-VVGL5O4F.js → chunk-6TRE326A.js} +6 -6
  76. package/dist/{chunk-ZTL2RPNY.js → chunk-73W7537K.js} +1 -1
  77. package/dist/{chunk-GS5AISRS.js → chunk-7IC4JMFA.js} +4 -4
  78. package/dist/{chunk-OV2SWQPT.js → chunk-7JJUI52C.js} +1 -1
  79. package/dist/{chunk-IMOPDLMA.js → chunk-7WLFHDWA.js} +1 -1
  80. package/dist/chunk-7YZJLFAK.js +11 -0
  81. package/dist/{chunk-56RAOI7O.js → chunk-AG63JVX7.js} +6 -6
  82. package/dist/{chunk-WH3JHMEA.js → chunk-AGETTWMK.js} +1 -1
  83. package/dist/{chunk-6MVHRNWC.js → chunk-BF7PZFKT.js} +1 -1
  84. package/dist/{chunk-IJWFKUYA.js → chunk-BJONHLET.js} +4 -4
  85. package/dist/{chunk-B4KMHEFZ.js → chunk-BNKULSCG.js} +1 -1
  86. package/dist/{chunk-RULVWW4A.js → chunk-BRHKQMRH.js} +6 -6
  87. package/dist/{chunk-VG2R6PZV.js → chunk-BYHKYYL6.js} +1 -1
  88. package/dist/{chunk-DLNYXXNE.js → chunk-CB6ROWOC.js} +2 -2
  89. package/dist/chunk-CBMXYXBH.js +15 -0
  90. package/dist/{chunk-BZBMZDLD.js → chunk-CFO54C3H.js} +1 -1
  91. package/dist/{chunk-P3Y5RFI4.js → chunk-CJI3POCE.js} +2 -2
  92. package/dist/{chunk-GVC535IA.js → chunk-D4KZOYXQ.js} +1 -1
  93. package/dist/chunk-D7JY2KHG.js +7 -0
  94. package/dist/{chunk-PDXPMHG3.js → chunk-DRNB7KDC.js} +1 -1
  95. package/dist/{chunk-U4OGRIP6.js → chunk-DWSCYYDM.js} +1 -1
  96. package/dist/{chunk-U5N6PSXO.js → chunk-E6EUGQGA.js} +5 -5
  97. package/dist/{chunk-N3JXHNID.js → chunk-E72USUUR.js} +10 -10
  98. package/dist/{chunk-C4UL2UNR.js → chunk-EOWOVR55.js} +1 -1
  99. package/dist/{chunk-CE5BARZI.js → chunk-EWJELWIT.js} +3 -3
  100. package/dist/{chunk-OQ2EDMB2.js → chunk-FEPBXJUR.js} +1 -1
  101. package/dist/{chunk-BWUU565Y.js → chunk-FKA6ZVQO.js} +9 -9
  102. package/dist/{chunk-QZKWIVZW.js → chunk-FNSVXN7B.js} +1 -1
  103. package/dist/{chunk-CRXFSN5K.js → chunk-G6LOKIFC.js} +11 -11
  104. package/dist/chunk-GCB5S2OI.js +8 -0
  105. package/dist/{chunk-LNQVTH5S.js → chunk-GP5UNEKY.js} +1 -1
  106. package/dist/{chunk-EW3L4W2I.js → chunk-GVAWCTJN.js} +8 -8
  107. package/dist/{chunk-X7PM7JOD.js → chunk-H2XCQJRG.js} +1 -1
  108. package/dist/{chunk-FBUUXK5G.js → chunk-H4YFANH5.js} +1 -1
  109. package/dist/chunk-HHOXLECO.js +29 -0
  110. package/dist/{chunk-442FFHQJ.js → chunk-HRAK46H7.js} +12 -12
  111. package/dist/chunk-HSTIEPLI.js +1 -0
  112. package/dist/chunk-I5XVZLDH.js +14 -0
  113. package/dist/{chunk-NWCW22U6.js → chunk-IBIUI2D3.js} +2 -2
  114. package/dist/{chunk-CXMTDYVI.js → chunk-IENPHB5B.js} +1 -1
  115. package/dist/{chunk-FLQZ7GQ3.js → chunk-IEPSBXMU.js} +12 -12
  116. package/dist/{chunk-LAEXWXJA.js → chunk-IUWAMMDN.js} +3 -3
  117. package/dist/{chunk-B6YOP2IX.js → chunk-IVY7CCTS.js} +3 -3
  118. package/dist/{chunk-JKDEE35P.js → chunk-IZQ3XTD2.js} +1 -1
  119. package/dist/chunk-J7OKOVSL.js +11 -0
  120. package/dist/{chunk-IB4333CI.js → chunk-JECMVR4S.js} +7 -7
  121. package/dist/{chunk-6ZHX56NM.js → chunk-JQDRM6UK.js} +1 -1
  122. package/dist/{chunk-QC6OK3ED.js → chunk-JVYSRH6U.js} +1 -1
  123. package/dist/{chunk-5VRMQTKV.js → chunk-KAHYUBXM.js} +7 -7
  124. package/dist/{chunk-YWGC7J6B.js → chunk-KECOZKJU.js} +7 -7
  125. package/dist/{chunk-JIW5CJXC.js → chunk-KOSV4UPK.js} +2 -2
  126. package/dist/{chunk-NHVXVHUR.js → chunk-KQSUSVMF.js} +17 -17
  127. package/dist/{chunk-BBEOFKLY.js → chunk-KTRNAMHY.js} +1 -1
  128. package/dist/chunk-LFPJ263N.js +6 -0
  129. package/dist/{chunk-F4DIVARP.js → chunk-LYX55RI3.js} +1 -1
  130. package/dist/{chunk-XZYAFTW4.js → chunk-M5MAIJQQ.js} +4 -4
  131. package/dist/{chunk-XNWQ72WA.js → chunk-MCMUJDEP.js} +1 -1
  132. package/dist/{chunk-ZOHQVSB3.js → chunk-MUHWI4GK.js} +12 -12
  133. package/dist/chunk-N3CTLEJS.js +9 -0
  134. package/dist/{chunk-HJWTWS5E.js → chunk-N52D37FS.js} +5 -5
  135. package/dist/chunk-NBKQADMY.js +9 -0
  136. package/dist/{chunk-P4XTWAKJ.js → chunk-NCRLKFXD.js} +1 -1
  137. package/dist/{chunk-43ONX6UZ.js → chunk-NGQHXTUK.js} +1 -1
  138. package/dist/{chunk-SOP447EP.js → chunk-NRGBXEBU.js} +1 -1
  139. package/dist/{chunk-JS6ZSEZJ.js → chunk-O426Q7KC.js} +1 -1
  140. package/dist/{chunk-CAG3TSV2.js → chunk-O4NPQ23Q.js} +1 -1
  141. package/dist/{chunk-ZHHEMSOD.js → chunk-ODOEH5QZ.js} +2 -2
  142. package/dist/{chunk-ENL5L6NR.js → chunk-P65C5TUU.js} +1 -1
  143. package/dist/chunk-PEM7UXQ3.js +1 -0
  144. package/dist/chunk-PTA7A7GF.js +22 -0
  145. package/dist/{chunk-FLEG5KP5.js → chunk-PWBLGKQ3.js} +5 -5
  146. package/dist/chunk-QCFN3ET4.js +9 -0
  147. package/dist/{chunk-F7F6Z64G.js → chunk-QLOKT22X.js} +1 -1
  148. package/dist/{chunk-IK2WXW2E.js → chunk-QLYOGT3U.js} +13 -13
  149. package/dist/{chunk-N7T63BVD.js → chunk-QMYQ4B5A.js} +3 -3
  150. package/dist/{chunk-EWVOGTEX.js → chunk-QSUQC4AN.js} +1 -1
  151. package/dist/{chunk-BGRT775Y.js → chunk-QYJQAY6C.js} +2 -2
  152. package/dist/{chunk-M5GMIQ47.js → chunk-R7JTTKG2.js} +3 -3
  153. package/dist/{chunk-Y44ABEW3.js → chunk-REGXKU74.js} +1 -1
  154. package/dist/{chunk-AGUA3O5O.js → chunk-RLLONZJJ.js} +1 -1
  155. package/dist/chunk-RSHNWBW2.js +4 -0
  156. package/dist/chunk-SC6HJBQA.js +8 -0
  157. package/dist/{chunk-OUSKOWNP.js → chunk-SGR4V5YI.js} +3 -3
  158. package/dist/{chunk-CVNJSD2J.js → chunk-T2ITXX7R.js} +6 -6
  159. package/dist/chunk-T76X2SHR.js +4 -0
  160. package/dist/{chunk-ARWMJSQJ.js → chunk-T7O2TNNX.js} +1 -1
  161. package/dist/chunk-TBLN4MDQ.js +6 -0
  162. package/dist/{chunk-ANFLQSGX.js → chunk-TQH6E5V2.js} +1 -1
  163. package/dist/{chunk-KEK47CP3.js → chunk-TRUPMMDJ.js} +9 -9
  164. package/dist/{chunk-L67VXJMF.js → chunk-UL4G6JY2.js} +1 -1
  165. package/dist/chunk-UYDP4DK3.js +9 -0
  166. package/dist/{chunk-E4E7MACR.js → chunk-UZGVIHFI.js} +14 -14
  167. package/dist/{chunk-DWBZ3Z34.js → chunk-V5QEPNPK.js} +2 -2
  168. package/dist/{chunk-MV6WDGB6.js → chunk-VANJPZ3H.js} +1 -1
  169. package/dist/{chunk-VVAJ23SD.js → chunk-VBNA237H.js} +1 -1
  170. package/dist/{chunk-24K6GVNM.js → chunk-VR4GSAFM.js} +17 -17
  171. package/dist/{chunk-2R3BVU75.js → chunk-VZV7Q5V2.js} +1 -1
  172. package/dist/{chunk-IJIESSTX.js → chunk-WIOG2NOJ.js} +5 -5
  173. package/dist/{chunk-BCUQXILM.js → chunk-WZQCRTXF.js} +1 -1
  174. package/dist/chunk-X4BKHXU5.js +9 -0
  175. package/dist/{chunk-UKDJUYIV.js → chunk-XI45TSEK.js} +1 -1
  176. package/dist/{chunk-MWIT4UN2.js → chunk-XREN3AKD.js} +9 -9
  177. package/dist/{chunk-IGNZULKG.js → chunk-YBU7NOD7.js} +1 -1
  178. package/dist/{chunk-QSJR7EI7.js → chunk-YQB5OYDC.js} +1 -1
  179. package/dist/{chunk-TVL3JPMY.js → chunk-YWR2WRDR.js} +1 -1
  180. package/dist/{chunk-2HEJDLPP.js → chunk-ZA6S5XVM.js} +2 -2
  181. package/dist/{chunk-K4D63NP3.js → chunk-ZC3CCRPG.js} +7 -7
  182. package/dist/{chunk-IPTCV6CQ.js → chunk-ZPW3KQ27.js} +30 -30
  183. package/dist/data/DataTable.js +1 -1
  184. package/dist/data/Kanban.js +1 -1
  185. package/dist/data/ListFooter.js +1 -1
  186. package/dist/data/ListLoadError.js +1 -1
  187. package/dist/data/Pagination.js +1 -1
  188. package/dist/file-intake/index.js +1 -1
  189. package/dist/forms/BorderInput.js +1 -1
  190. package/dist/forms/BrandAssetEditor.js +1 -1
  191. package/dist/forms/Calendar.js +1 -1
  192. package/dist/forms/ColorPicker.js +1 -1
  193. package/dist/forms/ComposerAttachments.js +1 -1
  194. package/dist/forms/CornersInput.js +1 -1
  195. package/dist/forms/DatePicker.js +1 -1
  196. package/dist/forms/DateRangePicker.js +1 -1
  197. package/dist/forms/DateTimePicker.js +1 -1
  198. package/dist/forms/DisplayChips.js +1 -1
  199. package/dist/forms/FilePicker.js +1 -1
  200. package/dist/forms/FormErrorSummary.js +1 -1
  201. package/dist/forms/IconPicker.js +1 -1
  202. package/dist/forms/ImageFocusPoint.js +1 -1
  203. package/dist/forms/InputNumber.js +1 -1
  204. package/dist/forms/LinkPicker.js +1 -1
  205. package/dist/forms/MediaLibrary.js +1 -1
  206. package/dist/forms/MediaUploadField.js +1 -1
  207. package/dist/forms/MediaUploadGrid.js +1 -1
  208. package/dist/forms/MediaUsedInList.js +1 -1
  209. package/dist/forms/NumericKeypad.js +1 -1
  210. package/dist/forms/PositionInput.js +1 -1
  211. package/dist/forms/Select.js +1 -1
  212. package/dist/forms/SidesInput.js +1 -1
  213. package/dist/forms/Slider.js +1 -1
  214. package/dist/forms/Snippet.js +1 -1
  215. package/dist/forms/TagInput.js +1 -1
  216. package/dist/forms/TextToolbar.js +1 -1
  217. package/dist/forms/TimePicker.js +1 -1
  218. package/dist/forms/WidthsBar.js +1 -1
  219. package/dist/forms/mediaLibraryMenu.js +1 -1
  220. package/dist/forms/mediaMoveItems.js +1 -1
  221. package/dist/forms/textAlign.js +1 -1
  222. package/dist/forms/useFileIntake.js +1 -1
  223. package/dist/hooks/useTheme.d.ts +1 -1
  224. package/dist/index.d.ts +1 -1
  225. package/dist/index.js +139 -139
  226. package/dist/locales/zh-Hans.js +1 -1
  227. package/dist/map/index.js +7 -7
  228. package/dist/page-tabs/index.js +5 -5
  229. package/dist/pdf/index.js +1 -1
  230. package/dist/shell/Accordion.js +1 -1
  231. package/dist/shell/AppUpdateBanner.js +1 -1
  232. package/dist/shell/Avatar.js +1 -1
  233. package/dist/shell/Banner.js +1 -1
  234. package/dist/shell/Breadcrumbs.js +1 -1
  235. package/dist/shell/BudgetBar.js +1 -1
  236. package/dist/shell/Card.js +1 -1
  237. package/dist/shell/ColoredBadge.js +1 -1
  238. package/dist/shell/ConfirmDialog.js +1 -1
  239. package/dist/shell/ContainerFillChart.js +1 -1
  240. package/dist/shell/CountBadge.js +1 -1
  241. package/dist/shell/Dialog.js +1 -1
  242. package/dist/shell/Drawer.js +1 -1
  243. package/dist/shell/EditableGrid.js +1 -1
  244. package/dist/shell/EmptyState.js +1 -1
  245. package/dist/shell/GlobalSearch.js +1 -1
  246. package/dist/shell/HelpCenter.js +1 -1
  247. package/dist/shell/IconRail.js +1 -1
  248. package/dist/shell/ImageLightbox.js +1 -1
  249. package/dist/shell/ItemCount.js +1 -1
  250. package/dist/shell/LanguageSelect.js +1 -1
  251. package/dist/shell/Markdown.js +1 -1
  252. package/dist/shell/MetricBar.js +1 -1
  253. package/dist/shell/MetricBarLegend.js +1 -1
  254. package/dist/shell/MilestoneTimeline.js +1 -1
  255. package/dist/shell/PageHeader.js +1 -1
  256. package/dist/shell/ProductionTimeline.js +1 -1
  257. package/dist/shell/ResizeHandle.js +1 -1
  258. package/dist/shell/Result.js +1 -1
  259. package/dist/shell/SearchableSelect.js +1 -1
  260. package/dist/shell/SettingReset.js +1 -1
  261. package/dist/shell/SettingRow.js +1 -1
  262. package/dist/shell/SidebarLayout.js +1 -1
  263. package/dist/shell/SidebarNav.js +1 -1
  264. package/dist/shell/SortableList.js +1 -1
  265. package/dist/shell/Statistic.js +1 -1
  266. package/dist/shell/TimeAgo.js +1 -1
  267. package/dist/shell/TimelineTrack.js +1 -1
  268. package/dist/shell/TransferProgress.js +1 -1
  269. package/dist/shell/Tree.js +1 -1
  270. package/dist/shell/language.js +1 -1
  271. package/dist/shell/strings.d.ts +6 -0
  272. package/dist/shell/strings.js +1 -1
  273. package/dist/shell/toast.js +1 -1
  274. package/dist/telemetry/index.js +1 -1
  275. package/dist/templates/AuthScreen.js +1 -1
  276. package/dist/templates/ChatTemplate.js +1 -1
  277. package/dist/templates/CheckoutTemplate.js +1 -1
  278. package/dist/templates/DashboardTemplate.js +1 -1
  279. package/dist/templates/DataTablePage.js +1 -1
  280. package/dist/templates/EmailTemplate.js +1 -1
  281. package/dist/templates/ErrorBoundary.d.ts +1 -1
  282. package/dist/templates/ErrorBoundary.js +1 -1
  283. package/dist/templates/ErrorPage.js +1 -1
  284. package/dist/templates/FormLayoutPage.js +1 -1
  285. package/dist/templates/GalleryTemplate.js +1 -1
  286. package/dist/ui/index.js +1 -1
  287. package/dist/version.js +1 -1
  288. package/package.json +1 -1
  289. package/dist/Calculator-CSYRZAS5.js +0 -29
  290. package/dist/Sidebar-Y4DTQYW2.js +0 -43
  291. package/dist/chunk-6453ISTQ.js +0 -4
  292. package/dist/chunk-6FEL5D56.js +0 -8
  293. package/dist/chunk-AC373WIU.js +0 -8
  294. package/dist/chunk-BZG5E7GF.js +0 -6
  295. package/dist/chunk-D7IXMMZT.js +0 -9
  296. package/dist/chunk-FKNJSD6B.js +0 -14
  297. package/dist/chunk-G6CTTBKE.js +0 -9
  298. package/dist/chunk-HEEY4TVP.js +0 -8
  299. package/dist/chunk-HUF34LSW.js +0 -15
  300. package/dist/chunk-IX6QMUJQ.js +0 -9
  301. package/dist/chunk-KWT6GT4M.js +0 -29
  302. package/dist/chunk-L4TN4EWK.js +0 -1
  303. package/dist/chunk-MG7A3R75.js +0 -1
  304. package/dist/chunk-OX2DOOOI.js +0 -8
  305. package/dist/chunk-PDB5W7VI.js +0 -6
  306. package/dist/chunk-Q7KTTDUS.js +0 -11
  307. package/dist/chunk-QWHQJNKL.js +0 -1
  308. package/dist/chunk-QXWY3CJ2.js +0 -11
  309. package/dist/chunk-RC6UHOAV.js +0 -4
  310. package/dist/chunk-WE7CYRZT.js +0 -7
  311. package/dist/chunk-XI4HKNFI.js +0 -19
@@ -1,4 +1,4 @@
1
- import{TICK_INK as e}from"./chunk-URBCGEXG.js";import{useShellStrings as n}from"./chunk-QWHQJNKL.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";function a({ink:e}){/* @__PURE__ */
1
+ import{TICK_INK as e}from"./chunk-URBCGEXG.js";import{useShellStrings as n}from"./chunk-PEM7UXQ3.js";import{jsxs as r,jsx as i}from"react/jsx-runtime";function a({ink:e}){/* @__PURE__ */
2
2
  return i("span",{"aria-hidden":"true",className:`h-3 w-0.5 shrink-0 rounded-[1px] ${e}`})}function t({link:t,className:l=""}){const c=n().meter;/* @__PURE__ */
3
3
  return r("div",{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-500 ${l}`.trim(),children:[
4
4
  /* @__PURE__ */r("span",{className:"inline-flex items-center gap-1",children:[
@@ -1,16 +1,16 @@
1
- import{Popover as e}from"./chunk-7JGR7WPD.js";import{InputNumber_default as r}from"./chunk-ZHHEMSOD.js";import{InSettingRowContext as a}from"./chunk-L65BESIE.js";import{parseHexColor as n,hexToHsv as o,hsvToHex as t,hexReadout as l,HUE_GRADIENT as i,HEX_MAX_LENGTH as s,svFromPoint as c,hueFromPoint as u}from"./chunk-S6OB6HJB.js";import{inputClasses as d}from"./chunk-AYZY3YNC.js";import{Tooltip as h}from"./chunk-BCDG4N6L.js";import{useShellStrings as g}from"./chunk-QWHQJNKL.js";import{forwardRef as p,useState as b,useRef as m,useEffect as f,useId as v}from"react";import{jsx as w,jsxs as x}from"react/jsx-runtime";var k={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},y={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function C(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function N(e,r){if(!e)return y;const a=C(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`}}function $({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",k[e],a].filter(Boolean).join(" ")}var z=p(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
2
- return w("button",{ref:l,type:o,"aria-pressed":a,className:$({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:N(e)})})}),D=(e,r,a)=>Math.min(a,Math.max(r,e)),I=e=>"string"==typeof e?{value:e}:e;function P(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:D(e.s+o[0],0,1),v:D(e.v+o[1],0,1)}:null}function A(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return D(e-n,0,359);case"ArrowRight":case"ArrowUp":return D(e+n,0,359);case"PageDown":return D(e-10,0,359);case"PageUp":return D(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var M={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function j(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return D(e-n,0,100);case"ArrowRight":case"ArrowUp":return D(e+n,0,100);case"PageDown":return D(e-10,0,100);case"PageUp":return D(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function S({value:e,onChange:r,label:s,presets:d,clearable:p=!1,fallback:v,dragWrites:k="live",disabled:$=!1,opacity:D,onOpacityChange:S,onClose:B,id:K,className:L=""}){const H=g().color,O=C(D),R=e=>{const r=C(e);$||r===O||S?.(r)},U=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:O},W=n(v??""),[Y,q]=b(()=>o(e||W||"")),J=m(e);f(()=>{e!==J.current&&(J.current=e,e?q(o(e)):W&&q(o(W)))},[e]);const X=a=>{$||a===e||(J.current=a,r(a))},G=e=>{const r=n(e);r&&(q(o(r)),X(r))},Q=e=>{q(e),X(t(e))},[Z,F]=b(!1),V=m(Y);V.current=Y;const _=e=>({onPointerDown:r=>{if($||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,V.current);"end"===k?(F(!0),q(a)):Q(a)},onPointerMove:r=>{if($||!(1&r.buttons))return;const a=e(r,V.current);"end"===k?q(a):Q(a)},onPointerUp:r=>{"end"===k&&Z&&(F(!1),Q(e(r,V.current)))}}),ee=_((e,r)=>({...r,...c(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),re=_((e,r)=>({...r,h:u(e.clientX,e.currentTarget.getBoundingClientRect())})),ae=Z?t(Y):e,ne=e=>`${Math.round(100*e)}%`,oe=(d??[]).map(I),te=n(e),le=ae||W||"";
1
+ import{Popover as e}from"./chunk-7JGR7WPD.js";import{InputNumber_default as r}from"./chunk-ODOEH5QZ.js";import{InSettingRowContext as a}from"./chunk-L65BESIE.js";import{parseHexColor as n,hexToHsv as o,hsvToHex as t,hexReadout as l,HUE_GRADIENT as i,HEX_MAX_LENGTH as s,svFromPoint as c,hueFromPoint as u}from"./chunk-S6OB6HJB.js";import{inputClasses as d}from"./chunk-AYZY3YNC.js";import{Tooltip as h}from"./chunk-BCDG4N6L.js";import{useShellStrings as g}from"./chunk-PEM7UXQ3.js";import{forwardRef as p,useState as b,useRef as m,useEffect as f,useId as v}from"react";import{jsx as w,jsxs as x}from"react/jsx-runtime";var k={sm:"h-6 w-6",md:"h-8 w-8",lg:"h-10 w-10"},y={backgroundImage:"conic-gradient(var(--line-strong) 25%, var(--surface) 0 50%, var(--line-strong) 0 75%, var(--surface) 0)",backgroundSize:"8px 8px"};function C(e){return null==e||Number.isNaN(e)?100:Math.round(Math.min(100,Math.max(0,e)))}function N(e,r){if(!e)return y;const a=C(r);if(a>=100)return{background:e};const n=`color-mix(in srgb, ${e} ${a}%, transparent)`;return{backgroundImage:`linear-gradient(${n}, ${n}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`}}function $({size:e="md",selected:r=!1,className:a=""}={}){return["relative inline-flex shrink-0 overflow-hidden rounded-md p-0 transition-shadow","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]","disabled:cursor-not-allowed disabled:opacity-60",r?"border-2 border-blue-500":"border border-gray-300 hover:shadow-sm",k[e],a].filter(Boolean).join(" ")}var z=p(function({color:e,size:r="md",selected:a,className:n,type:o="button",...t},l){/* @__PURE__ */
2
+ return w("button",{ref:l,type:o,"aria-pressed":a,className:$({size:r,selected:a,className:n}),...t,children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:N(e)})})}),D=(e,r,a)=>Math.min(a,Math.max(r,e)),P=e=>"string"==typeof e?{value:e}:e;function I(e,r,a){const n=a?.1:.01,o={ArrowLeft:[-n,0],ArrowRight:[n,0],ArrowDown:[0,-n],ArrowUp:[0,n]}[r];return o?{...e,s:D(e.s+o[0],0,1),v:D(e.v+o[1],0,1)}:null}function A(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return D(e-n,0,359);case"ArrowRight":case"ArrowUp":return D(e+n,0,359);case"PageDown":return D(e-10,0,359);case"PageUp":return D(e+10,0,359);case"Home":return 0;case"End":return 359;default:return null}}var M={boxShadow:"0 0 0 2px white, 0 0 0 3px color-mix(in srgb, black 35%, transparent)"};function j(e,r,a){const n=a?10:1;switch(r){case"ArrowLeft":case"ArrowDown":return D(e-n,0,100);case"ArrowRight":case"ArrowUp":return D(e+n,0,100);case"PageDown":return D(e-10,0,100);case"PageUp":return D(e+10,0,100);case"Home":return 0;case"End":return 100;default:return null}}function S({value:e,onChange:r,label:s,presets:d,clearable:p=!1,fallback:v,dragWrites:k="live",disabled:$=!1,opacity:D,onOpacityChange:S,onClose:B,id:E,className:K=""}){const L=g().color,R=C(D),U=e=>{const r=C(e);$||r===R||S?.(r)},H=e=>{const r=e.currentTarget.getBoundingClientRect();return r.width>0?(e.clientX-r.left)/r.width*100:R},W=n(v??""),[X,Y]=b(()=>o(e||W||"")),q=m(e);f(()=>{e!==q.current&&(q.current=e,e?Y(o(e)):W&&Y(o(W)))},[e]);const G=a=>{$||a===e||(q.current=a,r(a))},J=e=>{const r=n(e);r&&(Y(o(r)),G(r))},Q=e=>{Y(e),G(t(e))},[Z,F]=b(!1),V=m(X);V.current=X;const _=e=>({onPointerDown:r=>{if($||0!==r.button)return;r.currentTarget.setPointerCapture?.(r.pointerId),r.currentTarget.focus({preventScroll:!0});const a=e(r,V.current);"end"===k?(F(!0),Y(a)):Q(a)},onPointerMove:r=>{if($||!(1&r.buttons))return;const a=e(r,V.current);"end"===k?Y(a):Q(a)},onPointerUp:r=>{"end"===k&&Z&&(F(!1),Q(e(r,V.current)))}}),ee=_((e,r)=>({...r,...c(e.clientX,e.clientY,e.currentTarget.getBoundingClientRect())})),re=_((e,r)=>({...r,h:u(e.clientX,e.currentTarget.getBoundingClientRect())})),ae=Z?t(X):e,ne=e=>`${Math.round(100*e)}%`,oe=(d??[]).map(P),te=n(e),le=ae||W||"";
3
3
  /* @__PURE__ */
4
- return w(a.Provider,{value:!1,children:/* @__PURE__ */x("div",{id:K,className:`flex w-56 flex-col gap-3 ${$?"opacity-60":""} ${L}`.trim(),onKeyDown:e=>{"Escape"===e.key&&B&&(e.preventDefault(),e.stopPropagation(),B())},children:[(oe.length>0||p)&&/* @__PURE__ */x("div",{role:"group","aria-label":H.presets,className:"flex flex-wrap gap-2",children:[p&&/* @__PURE__ */w(h,{content:H.clear,children:/* @__PURE__ */w(z,{color:"",size:"sm","aria-label":H.clear,selected:""===e,disabled:$,onClick:()=>{$||""===e||(J.current="",r(""))}})}),oe.map(e=>{const r=n(e.value),a=e.label?`${e.label} · ${l(r??e.value)}`:l(r??e.value);/* @__PURE__ */
5
- return w(h,{content:a,children:/* @__PURE__ */w(z,{color:r??e.value,size:"sm","aria-label":a,selected:null!==r&&r===te,disabled:$,onClick:()=>G(e.value)})},`${e.label??""}:${e.value}`)})]}),
6
- /* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":H.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*Y.v),"aria-valuetext":H.squareValue(Math.round(100*Y.s),Math.round(100*Y.v)),"aria-disabled":$||void 0,"data-color-square":"",onKeyDown:e=>{if($)return;const r=P(Y,e.key,e.shiftKey);r&&(e.preventDefault(),Q(r))},...ee,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:t({h:Y.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ne(Y.s),top:ne(1-Y.v),...M}})}),
7
- /* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":H.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(Y.h),"aria-orientation":"horizontal","aria-disabled":$||void 0,"data-color-hue":"",onKeyDown:e=>{if($)return;const r=A(Y.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),Q({...Y,h:r}))},...re,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:i},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:Y.h/360*100+"%",background:t({h:Y.h,s:1,v:1}),...M}})}),S&&/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":H.opacity(s),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":O,"aria-valuetext":`${O}%`,"aria-orientation":"horizontal","aria-disabled":$||void 0,"data-color-opacity":"",onKeyDown:e=>{if($)return;const r=j(O,e.key,e.shiftKey);null!==r&&(e.preventDefault(),R(r))},onPointerDown:e=>{$||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),R(U(e)))},onPointerMove:e=>{!$&&1&e.buttons&&R(U(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${le||"black"}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${O}%`,...N(le||"black",O),...M}})}),
4
+ return w(a.Provider,{value:!1,children:/* @__PURE__ */x("div",{id:E,className:`flex w-56 flex-col gap-3 ${$?"opacity-60":""} ${K}`.trim(),onKeyDown:e=>{"Escape"===e.key&&B&&(e.preventDefault(),e.stopPropagation(),B())},children:[(oe.length>0||p)&&/* @__PURE__ */x("div",{role:"group","aria-label":L.presets,className:"flex flex-wrap gap-2",children:[p&&/* @__PURE__ */w(h,{content:L.clear,children:/* @__PURE__ */w(z,{color:"",size:"sm","aria-label":L.clear,selected:""===e,disabled:$,onClick:()=>{$||""===e||(q.current="",r(""))}})}),oe.map(e=>{const r=n(e.value),a=e.label?`${e.label} · ${l(r??e.value)}`:l(r??e.value);/* @__PURE__ */
5
+ return w(h,{content:a,children:/* @__PURE__ */w(z,{color:r??e.value,size:"sm","aria-label":a,selected:null!==r&&r===te,disabled:$,onClick:()=>J(e.value)})},`${e.label??""}:${e.value}`)})]}),
6
+ /* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":L.square,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(100*X.v),"aria-valuetext":L.squareValue(Math.round(100*X.s),Math.round(100*X.v)),"aria-disabled":$||void 0,"data-color-square":"",onKeyDown:e=>{if($)return;const r=I(X,e.key,e.shiftKey);r&&(e.preventDefault(),Q(r))},...ee,className:"relative h-36 w-full cursor-crosshair touch-none rounded-md rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundColor:t({h:X.h,s:1,v:1}),backgroundImage:"linear-gradient(to top, black, transparent), linear-gradient(to right, white, transparent)"},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:ne(X.s),top:ne(1-X.v),...M}})}),
7
+ /* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":L.hue,"aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":Math.round(X.h),"aria-orientation":"horizontal","aria-disabled":$||void 0,"data-color-hue":"",onKeyDown:e=>{if($)return;const r=A(X.h,e.key,e.shiftKey);null!==r&&(e.preventDefault(),Q({...X,h:r}))},...re,className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:i},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:X.h/360*100+"%",background:t({h:X.h,s:1,v:1}),...M}})}),S&&/* @__PURE__ */w("div",{role:"slider",tabIndex:$?-1:0,"aria-label":L.opacity(s),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":R,"aria-valuetext":`${R}%`,"aria-orientation":"horizontal","aria-disabled":$||void 0,"data-color-opacity":"",onKeyDown:e=>{if($)return;const r=j(R,e.key,e.shiftKey);null!==r&&(e.preventDefault(),U(r))},onPointerDown:e=>{$||0!==e.button||(e.currentTarget.setPointerCapture?.(e.pointerId),e.currentTarget.focus({preventScroll:!0}),U(H(e)))},onPointerMove:e=>{!$&&1&e.buttons&&U(H(e))},className:"relative h-3 w-full cursor-pointer touch-none rounded-full rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]",style:{backgroundImage:`linear-gradient(to right, transparent, ${le||"black"}), ${y.backgroundImage}`,backgroundSize:`auto, ${y.backgroundSize}`},children:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 h-3.5 w-3.5 -translate-x-1/2 -translate-y-1/2 rounded-full",style:{left:`${R}%`,...N(le||"black",R),...M}})}),
8
8
  /* @__PURE__ */x("div",{className:"flex items-center gap-2",children:[
9
- /* @__PURE__ */w("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-line-strong",style:N(le,S?O:null)}),
10
- /* @__PURE__ */w(T,{value:ae,placeholder:!e&&W?l(W):void 0,onChange:G,label:H.hex(s),disabled:$}),S&&/* @__PURE__ */w(E,{value:O,onChange:R,label:H.opacity(s),disabled:$})]})]})})}var B={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},K={sm:"h-6",md:"h-8",lg:"h-10"},L=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-ink-strong placeholder:text-[color:var(--ink-placeholder)] hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function T({value:e,onChange:r,label:a,placeholder:o,disabled:t,id:i,size:c="md",look:u="box",className:h=""}){const[g,p]=b(null),m="text"===u?`${L} ${K[c]} ${h}`.trim():d({size:c,className:`${B[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
11
- return w("input",{id:i,type:"text",value:g??(e?l(e):""),"aria-label":a,placeholder:o,maxLength:s,spellCheck:!1,autoComplete:"off",disabled:t,onChange:a=>{p(a.target.value);const o=n(a.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),p(null))},onBlur:()=>p(null),"data-hex-look":u,className:m})}function E({value:e,onChange:a,label:n,disabled:o,size:t="md"}){/* @__PURE__ */
12
- return w("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */w(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function H({value:r,onChange:a,label:o,presets:t,clearable:i,fallback:s,dragWrites:c,disabled:u,id:d,showHexInput:h=!1,opacity:p,onOpacityChange:b,size:m="md",align:f="start",open:k,onOpenChange:y,className:z=""}){const D=g().color,I=C(p),P=v(),A=n(s??""),M=r||A||"",j=r?l(r):A?l(A):D.none;
9
+ /* @__PURE__ */w("span",{"aria-hidden":"true",className:"relative h-8 w-8 shrink-0 overflow-hidden rounded-md border border-line-strong",style:N(le,S?R:null)}),
10
+ /* @__PURE__ */w(O,{value:ae,placeholder:!e&&W?l(W):void 0,onChange:J,label:L.hex(s),disabled:$}),S&&/* @__PURE__ */w(T,{value:R,onChange:U,label:L.opacity(s),disabled:$})]})]})})}var B={sm:"w-[calc(7ch+1rem+4px)] min-w-[calc(7ch+1rem+4px)]",md:"w-[calc(7ch+1.5rem+4px)] min-w-[calc(7ch+1.5rem+4px)]",lg:"w-[calc(7ch+2rem+4px)] min-w-[calc(7ch+2rem+4px)]"},E={sm:"h-6",md:"h-8",lg:"h-10"},K=["block w-[calc(7ch+0.5rem+4px)] min-w-[calc(7ch+0.5rem+4px)] flex-none rounded-(--radius-control)","border border-transparent bg-transparent px-1 text-2xs font-mono uppercase","text-ink-strong placeholder:text-[color:var(--ink-placeholder)] hover:border-gray-300","focus:border-blue-400 focus:bg-(--surface) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)]","disabled:cursor-not-allowed disabled:opacity-60"].join(" ");function O({value:e,onChange:r,label:a,placeholder:o,disabled:t,id:i,size:c="md",look:u="box",className:h=""}){const[g,p]=b(null),m="text"===u?`${K} ${E[c]} ${h}`.trim():d({size:c,className:`${B[c]} flex-1 font-mono uppercase ${h}`.trim()}).replace(/(^| )w-full( |$)/," ");/* @__PURE__ */
11
+ return w("input",{id:i,type:"text",value:g??(e?l(e):""),"aria-label":a,placeholder:o,maxLength:s,spellCheck:!1,autoComplete:"off",disabled:t,onChange:a=>{p(a.target.value);const o=n(a.target.value);null!==o&&o!==e&&r(o)},onFocus:e=>e.currentTarget.select(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),p(null))},onBlur:()=>p(null),"data-hex-look":u,className:m})}function T({value:e,onChange:a,label:n,disabled:o,size:t="md"}){/* @__PURE__ */
12
+ return w("div",{"data-color-opacity-box":"",className:"w-20 shrink-0",children:/* @__PURE__ */w(r,{value:e,onChange:e=>{null!==e&&a(e)},min:0,max:100,precision:0,suffix:"%",size:t,"aria-label":n,disabled:o})})}function L({value:r,onChange:a,label:o,presets:t,clearable:i,fallback:s,dragWrites:c,disabled:u,id:d,showHexInput:h=!1,opacity:p,onOpacityChange:b,size:m="md",align:f="start",open:k,onOpenChange:y,className:z=""}){const D=g().color,P=C(p),I=v(),A=n(s??""),M=r||A||"",j=r?l(r):A?l(A):D.none;
13
13
  /* @__PURE__ */
14
14
  return x("div",{className:`inline-flex items-center ${b?"flex-wrap justify-end gap-1":h?"gap-1":"gap-2"} ${z}`.trim(),children:[
15
- /* @__PURE__ */w(e,{id:d,trigger:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:N(M,b?I:null)}),triggerLabel:D.swatch(o,j),triggerClassName:$({size:m}),"aria-label":D.panel(o),align:f,open:k,onOpenChange:y,disabled:u,children:/* @__PURE__ */w(S,{id:P,value:r,onChange:a,label:o,presets:t,clearable:i,fallback:s,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),h&&
16
- /* @__PURE__ */w(T,{value:r,placeholder:!r&&A?l(A):void 0,onChange:e=>{u||e===r||a(e)},label:D.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */w(E,{value:I,onChange:e=>{u||e===I||b(e)},label:D.opacity(o),disabled:u,size:m})]})}export{H as ColorPicker,S as ColorPickerPanel,z as ColorSwatch,T as HexInput,y as NO_COLOR_FILL,C as clampOpacity,N as colorFill,$ as colorSwatchClasses,A as stepHue,j as stepOpacity,P as stepSquare};
15
+ /* @__PURE__ */w(e,{id:d,trigger:/* @__PURE__ */w("span",{"aria-hidden":"true",className:"absolute inset-0",style:N(M,b?P:null)}),triggerLabel:D.swatch(o,j),triggerClassName:$({size:m}),"aria-label":D.panel(o),align:f,open:k,onOpenChange:y,disabled:u,children:/* @__PURE__ */w(S,{id:I,value:r,onChange:a,label:o,presets:t,clearable:i,fallback:s,dragWrites:c,disabled:u,opacity:p,onOpacityChange:b})}),h&&
16
+ /* @__PURE__ */w(O,{value:r,placeholder:!r&&A?l(A):void 0,onChange:e=>{u||e===r||a(e)},label:D.hex(o),disabled:u,size:m,look:"text"}),b&&/* @__PURE__ */w(T,{value:P,onChange:e=>{u||e===P||b(e)},label:D.opacity(o),disabled:u,size:m})]})}export{L as ColorPicker,S as ColorPickerPanel,z as ColorSwatch,O as HexInput,y as NO_COLOR_FILL,C as clampOpacity,N as colorFill,$ as colorSwatchClasses,A as stepHue,j as stepOpacity,I as stepSquare};
@@ -1,9 +1,9 @@
1
- import{useWindowMenuItem as e,Modal as t}from"./chunk-DZTAGMNY.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-L4TN4EWK.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as i,splitAround as a}from"./chunk-QWHQJNKL.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var f=o.aboutApp,u={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:f.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:f.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:f.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:f.preview},files:{name:"Files",version:"1.1.4",route:"/files",description:f.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:f.browser}},x=/* @__PURE__ */p(n,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),N=/* @__PURE__ */p(n,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function v({app:n}){const o=u[n],[f,v]=m(!1),w=c(()=>v(!0),[]),b=i().aboutApp,k=b.title(o.name);if(e(k,w,x),!f)return null;const g=r[o.route],y=l(g)?d(g,{className:"h-9 w-9"}):N,[j,A]=a(b.partOf);/* @__PURE__ */
2
- return p(t,{open:!0,onClose:()=>v(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
1
+ import{useWindowMenuItem as e,Modal as t}from"./chunk-2XBJNB7D.js";import{navIcons as r}from"./chunk-CY5N5OA3.js";import{VERSION as s}from"./chunk-HSTIEPLI.js";import{Icon as n}from"./chunk-FSPFV4MI.js";import{DEFAULT_SHELL_STRINGS as o,useShellStrings as i,splitAround as a}from"./chunk-PEM7UXQ3.js";import{useState as m,useCallback as c,isValidElement as l,cloneElement as d}from"react";import{jsx as p,jsxs as h}from"react/jsx-runtime";var f=o.aboutApp,u={spreadsheet:{name:"Spreadsheets",version:"1.2.0",route:"/spreadsheet",description:f.spreadsheet},notepad:{name:"Notepad",version:"1.0.2",route:"/notepad",description:f.notepad},documents:{name:"Documents",version:"1.1.1",route:"/documents",description:f.documents},preview:{name:"Preview",version:"1.4.3",route:"/preview",description:f.preview},files:{name:"Files",version:"1.1.4",route:"/files",description:f.files},browser:{name:"Browser",version:"1.0.2",route:"/browser",description:f.browser}},x=/* @__PURE__ */p(n,{name:"info",className:"h-4 w-4",strokeWidth:1.5}),v=/* @__PURE__ */p(n,{name:"window",className:"h-9 w-9",strokeWidth:1.5});function w({app:n}){const o=u[n],[f,w]=m(!1),N=c(()=>w(!0),[]),b=i().aboutApp,k=b.title(o.name);if(e(k,N,x),!f)return null;const g=r[o.route],y=l(g)?d(g,{className:"h-9 w-9"}):v,[j,P]=a(b.partOf);/* @__PURE__ */
2
+ return p(t,{open:!0,onClose:()=>w(!1),title:k,size:"sm",compact:!0,bodyScroll:!1,autoHeight:!0,dimensions:[320,320],children:/* @__PURE__ */h("div",{className:"flex flex-col items-center text-center px-5 pt-5 pb-4",children:[
3
3
  /* @__PURE__ */p("div",{className:"flex h-16 w-16 items-center justify-center rounded-2xl bg-gray-100 text-gray-600 shrink-0",children:y}),
4
4
  /* @__PURE__ */p("h2",{className:"mt-3 text-lg font-bold text-gray-900",children:o.name}),
5
5
  /* @__PURE__ */p("p",{className:"text-2xs font-mono text-ink-faintest",children:b.version(o.version)}),
6
6
  /* @__PURE__ */p("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed",children:b[n]}),
7
7
  /* @__PURE__ */h("div",{className:"mt-4 pt-3 border-t border-gray-200 w-full",children:[
8
8
  /* @__PURE__ */h("p",{className:"text-2xs text-ink-faint",children:[j,
9
- /* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),A]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(s)})]})]})})}export{v as AboutApp,u as BUILTIN_APP_INFO};
9
+ /* @__PURE__ */p("span",{className:"font-medium text-gray-700",children:"efficient-shell"}),P]}),s&&/* @__PURE__ */p("p",{className:"mt-0.5 text-2xs font-mono text-ink-faintest",children:b.shellVersion(s)})]})]})})}export{w as AboutApp,u as BUILTIN_APP_INFO};
@@ -1,6 +1,6 @@
1
- import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-ZHHEMSOD.js";import{Tooltip as i}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-QWHQJNKL.js";import{useId as a,useRef as s,useState as c,useEffect as u,Fragment as d}from"react";import{jsxs as h,jsx as f}from"react/jsx-runtime";var m=(e,t,r)=>Math.min(r,Math.max(t,e)),p=e=>e.reduce((e,t)=>e+t,0),v=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var g,b="w-0.5",y=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var w=["text-blue-700","text-gray-600"];function x({count:x,value:$,onChange:k,label:C,"aria-labelledby":N,readOnly:P=!1,disabled:M=!1,className:j=""}){const R=l().widths,z=a(),B=m(Math.round(x)||1,1,n),D=e($,B),S=D??[...t[B]??[]],A=[...S,100-p(S)],H=P||M,K=s(null),O=s({onChange:k,shown:S,locked:H,n:B,stored:D});O.current={onChange:k,shown:S,locked:H,n:B,stored:D};const E=t=>{const{onChange:r,shown:n,locked:o,n:i}=O.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},L=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=m(Math.round(n),r,o-r),i[t+1]=o-i[t],E(i.slice(0,-1))&&(ne.current=null)},T=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=A[e]+A[e+1],i="ArrowRight"===t.key?A[e]+n:"ArrowLeft"===t.key?A[e]-n:"PageUp"===t.key?A[e]+10:"PageDown"===t.key?A[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),L(A,e,i))},G=s(null),[I,W]=c(null),F=()=>{G.current=null,W(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>F,[]);const J=e=>t=>{if(0!==t.button||H)return;t.preventDefault();const r=K.current?.getBoundingClientRect().width??0;r<=0||(G.current={i:e,x:t.clientX,width:r,from:A,moved:!1,pointer:t.pointerId},W(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},Q=e=>{const t=G.current;if(!t)return;if(0===e.buttons)return void F();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}L(t.from,t.i,t.from[t.i]+r/t.width*100)},U=e=>{const t=G.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),F())},X=(e,t)=>{const{shown:n}=O.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=m(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-p(n)],e,t);return E(o.slice(0,-1))?o:null},[q,V]=c(0);u(()=>{const e=K.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>V(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const Z=s(null),[Y,_]=c(null),[ee,te]=c([]),re=(e,t)=>_(r=>t?e:r===e?null:r),ne=s(null),oe=(e,t)=>{const r=ne.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=O.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:v(l,a))||n(r.stored),!0},ie=A.join(",");u(()=>{const e=null===Y?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===g&&(g=document.createElement("canvas").getContext("2d")),!g)return[];const o=g;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(Z.current,Y);te(t=>v(t,e)?t:e)},[Y,ie,q]);const le=R.hint(B,r),ae=A.slice(0,-1).map((e,t)=>p(A.slice(0,t+1)));/* @__PURE__ */
1
+ import{resolveColumnShares as e,COLUMN_SHARES_EQUAL as t,COLUMN_SHARE_MIN as r,COLUMN_COUNT_MAX as n}from"./chunk-PLGJOHEG.js";import{InputNumber_default as o}from"./chunk-ODOEH5QZ.js";import{Tooltip as i}from"./chunk-BCDG4N6L.js";import{useShellStrings as l}from"./chunk-PEM7UXQ3.js";import{useId as a,useRef as s,useState as c,useEffect as u,Fragment as d}from"react";import{jsxs as h,jsx as f}from"react/jsx-runtime";var m=(e,t,r)=>Math.min(r,Math.max(t,e)),p=e=>e.reduce((e,t)=>e+t,0),v=(e,t)=>e.length===t.length&&e.every((e,r)=>e===t[r]);var g,b="w-0.5",y=`${b} group-hover/widths:w-1 group-focus-visible/widths:w-1`;var w=["text-blue-700","text-gray-600"];function x({count:x,value:$,onChange:k,label:C,"aria-labelledby":N,readOnly:P=!1,disabled:M=!1,className:j=""}){const R=l().widths,z=a(),B=m(Math.round(x)||1,1,n),D=e($,B),O=D??[...t[B]??[]],A=[...O,100-p(O)],E=P||M,S=s(null),K=s({onChange:k,shown:O,locked:E,n:B,stored:D});K.current={onChange:k,shown:O,locked:E,n:B,stored:D};const T=t=>{const{onChange:r,shown:n,locked:o,n:i}=K.current;if(o)return!1;const l=e(t,i);return!(!l||v(l,n))&&(r(l),!0)},H=(e,t,n)=>{const o=e[t]+e[t+1],i=[...e];i[t]=m(Math.round(n),r,o-r),i[t+1]=o-i[t],T(i.slice(0,-1))&&(ne.current=null)},L=e=>t=>{if(t.altKey||t.ctrlKey||t.metaKey)return;const n=t.shiftKey?10:1,o=A[e]+A[e+1],i="ArrowRight"===t.key?A[e]+n:"ArrowLeft"===t.key?A[e]-n:"PageUp"===t.key?A[e]+10:"PageDown"===t.key?A[e]-10:"Home"===t.key?r:"End"===t.key?o-r:null;null!==i&&(t.preventDefault(),H(A,e,i))},G=s(null),[I,U]=c(null),X=()=>{G.current=null,U(null),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};u(()=>X,[]);const F=e=>t=>{if(0!==t.button||E)return;t.preventDefault();const r=S.current?.getBoundingClientRect().width??0;r<=0||(G.current={i:e,x:t.clientX,width:r,from:A,moved:!1,pointer:t.pointerId},U(e),t.currentTarget.setPointerCapture?.(t.pointerId),document.body.style.cursor="col-resize",document.body.style.userSelect="none")},Q=e=>{const t=G.current;if(!t)return;if(0===e.buttons)return void X();const r=e.clientX-t.x;if(!t.moved){if(Math.abs(r)<3)return;t.moved=!0}H(t.from,t.i,t.from[t.i]+r/t.width*100)},W=e=>{const t=G.current;t&&(e.currentTarget.hasPointerCapture?.(t.pointer)&&e.currentTarget.releasePointerCapture(t.pointer),X())},q=(e,t)=>{const{shown:n}=K.current,o=function(e,t,n){const o=e.length,i=[...e];if(o<2)return i;const l=m(Math.round(n),r,100-(o-1)*r);let a=l-i[t];i[t]=l;const s=[...Array.from({length:o-1-t},(e,r)=>t+1+r),...Array.from({length:t},(e,r)=>t-1-r)];if(a<0)return i[s[0]]-=a,i;for(const e of s){if(a<=0)break;const t=Math.min(a,i[e]-r);i[e]-=t,a-=t}return i}([...n,100-p(n)],e,t);return T(o.slice(0,-1))?o:null},[J,V]=c(0);u(()=>{const e=S.current;if(!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>V(e.getBoundingClientRect().width));return t.observe(e),()=>t.disconnect()},[]);const Z=s(null),[Y,_]=c(null),[ee,te]=c([]),re=(e,t)=>_(r=>t?e:r===e?null:r),ne=s(null),oe=(e,t)=>{const r=ne.current;if(!r||r.column!==e||r.share!==t)return!1;const{onChange:n,locked:o,stored:i}=K.current;var l,a;return o||(l=i,a=r.stored,void 0===l||void 0===a?l===a:v(l,a))||n(r.stored),!0},ie=A.join(",");u(()=>{const e=null===Y?[]:function(e,t){if(!e)return[];const r=Array.from(e.querySelectorAll("input[data-widths-label]")),n=r[t]?.getBoundingClientRect();if(!n||0===n.width)return[];if(void 0===g&&(g=document.createElement("canvas").getContext("2d")),!g)return[];const o=g;return r.flatMap((e,r)=>{if(r===t)return[];const i=e.getBoundingClientRect(),l=getComputedStyle(e);o.font=`${l.fontWeight} ${l.fontSize} ${l.fontFamily}`;const a=o.measureText(e.value).width/2,s=(i.left+i.right)/2;return s+a>n.left&&s-a<n.right?[r]:[]})}(Z.current,Y);te(t=>v(t,e)?t:e)},[Y,ie,J]);const le=R.hint(B,r),ae=A.slice(0,-1).map((e,t)=>p(A.slice(0,t+1)));/* @__PURE__ */
2
2
  return h("div",{role:"group","aria-label":N?void 0:C,"aria-labelledby":N,"aria-describedby":B>1?z:void 0,className:`flex w-full min-w-0 flex-col gap-2 ${M?"opacity-60":""} ${j}`.trim(),children:[
3
3
  /* @__PURE__ */h("div",{ref:Z,"data-widths-bar":"",className:"relative h-8",children:[
4
- /* @__PURE__ */f("div",{ref:K,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:A.map((e,t)=>/* @__PURE__ */f("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[t%2]} ${t%2==0?"bg-accent-tint":""}`,children:1===B&&/* @__PURE__ */f("span",{"data-widths-label":"",children:`${e}%`})},t))}),
4
+ /* @__PURE__ */f("div",{ref:S,"data-widths-track":"",className:"flex h-full w-full overflow-hidden rounded-(--radius-control) bg-surface",children:A.map((e,t)=>/* @__PURE__ */f("div",{"data-widths-segment":"",style:{flexBasis:`${e}%`},className:`flex min-w-0 shrink-0 grow-0 items-center justify-center overflow-hidden whitespace-nowrap text-xs font-medium tabular-nums ${w[t%2]} ${t%2==0?"bg-accent-tint":""}`,children:1===B&&/* @__PURE__ */f("span",{"data-widths-label":"",children:`${e}%`})},t))}),
5
5
  /* @__PURE__ */f("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 rounded-(--radius-control) border border-line-strong"}),B>1&&A.map((e,t)=>/* @__PURE__ */h(d,{children:[(()=>{const n=Y===t,l=p(A.slice(0,t)),a=n?`max(${e}%, 40px)`:`${e}%`;/* @__PURE__ */
6
- return f("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */f(i,{content:le,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */f(o,{appearance:"bare",value:e,display:()=>(e=>q>0&&q*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(B-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":R.column(t+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||X(t,e)},onRevert:e=>((e,t)=>{O.current.locked||null===t||oe(e,t)||X(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:O.current.stored},re(t,!0)},onBlur:()=>re(t,!1),className:`absolute inset-0 text-xs font-medium ${w[t%2]} ${ee.includes(t)&&!n?"opacity-0":""}`})})})})(),t<B-1&&/* @__PURE__ */f("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${ae[t]}%`},children:/* @__PURE__ */f(i,{content:R.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */f("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":R.divider(t+1,t+2),"aria-valuenow":A[t],"aria-valuemin":r,"aria-valuemax":A[t]+A[t+1]-r,"aria-valuetext":R.dividerValue(t+1,A[t],t+2,A[t+1]),"aria-disabled":H||void 0,onKeyDown:H?void 0:T(t),onPointerDown:J(t),onPointerMove:Q,onPointerUp:U,onPointerCancel:U,onLostPointerCapture:()=>{G.current&&F()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(H?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(H?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${I===t?"w-1":y}`)})})})})]},t))]}),B>1&&/* @__PURE__ */f("span",{id:z,className:"sr-only",children:le})]})}export{x as WidthsBar};
6
+ return f("div",{"data-widths-tip":"",className:"absolute inset-y-0 "+(n?"z-20":""),style:{left:`clamp(0px, calc(${l+e/2}% - ${a} / 2), calc(100% - ${a}))`,width:a},children:/* @__PURE__ */f(i,{content:le,delay:600,describe:!1,className:"absolute inset-0",children:/* @__PURE__ */f(o,{appearance:"bare",value:e,display:()=>(e=>J>0&&J*e/100<36?String(e):`${e}%`)(e),suffix:"%",min:r,max:100-(B-1)*r,step:1,shiftStep:10,precision:0,allowEmpty:!1,reportWhileTyping:!1,readOnly:P,disabled:M,"aria-label":R.column(t+1),"aria-describedby":z,"data-widths-label":"",onChange:e=>{null===e||oe(t,e)||q(t,e)},onRevert:e=>((e,t)=>{K.current.locked||null===t||oe(e,t)||q(e,t)})(t,e),onFocus:()=>{ne.current={column:t,share:e,stored:K.current.stored},re(t,!0)},onBlur:()=>re(t,!1),className:`absolute inset-0 text-xs font-medium ${w[t%2]} ${ee.includes(t)&&!n?"opacity-0":""}`})})})})(),t<B-1&&/* @__PURE__ */f("div",{className:"absolute inset-y-0 z-10 w-3 -translate-x-1/2",style:{left:`${ae[t]}%`},children:/* @__PURE__ */f(i,{content:R.dragHint,delay:600,className:"relative flex h-full w-full",children:/* @__PURE__ */f("div",{role:"separator",tabIndex:M?-1:0,"aria-orientation":"vertical","aria-label":R.divider(t+1,t+2),"aria-valuenow":A[t],"aria-valuemin":r,"aria-valuemax":A[t]+A[t+1]-r,"aria-valuetext":R.dividerValue(t+1,A[t],t+2,A[t+1]),"aria-disabled":E||void 0,onKeyDown:E?void 0:L(t),onPointerDown:F(t),onPointerMove:Q,onPointerUp:W,onPointerCancel:W,onLostPointerCapture:()=>{G.current&&X()},className:"group/widths flex h-full w-full touch-none justify-center rounded-(--radius-control) rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)] "+(E?"cursor-default":"cursor-col-resize"),children:/* @__PURE__ */f("span",{"aria-hidden":"true","data-widths-line":"",className:"h-full rounded-full "+(E?`${b} bg-gray-300`:`bg-accent-fill transition-[width,background-color] duration-(--motion-fast) group-hover/widths:bg-blue-700 ${I===t?"w-1":y}`)})})})})]},t))]}),B>1&&/* @__PURE__ */f("span",{id:z,className:"sr-only",children:le})]})}export{x as WidthsBar};
@@ -1,4 +1,4 @@
1
- import{Card as e}from"./chunk-WUKN5WUM.js";import{FormField as t}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Input_default as l}from"./chunk-MAMWQCJ6.js";import{Button_default as a}from"./chunk-NHH2MXFU.js";import{useState as i}from"react";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";var o={login:{title:"Welcome back",subtitle:"Sign in to your account",cta:"Sign in"},register:{title:"Create your account",subtitle:"Start your 14-day free trial",cta:"Create account"},forgot:{title:"Reset password",subtitle:"We'll email you a reset link",cta:"Send reset link"}};function m({mode:m="login"}){const[u,d]=i(!0),h=o[m];/* @__PURE__ */
1
+ import{Card as e}from"./chunk-5RAOFJYT.js";import{FormField as t}from"./chunk-6KBDNYRW.js";import{Checkbox_default as r}from"./chunk-CGZBDI6C.js";import{Input_default as l}from"./chunk-MAMWQCJ6.js";import{Button_default as a}from"./chunk-NHH2MXFU.js";import{useState as i}from"react";import{jsx as c,jsxs as n,Fragment as s}from"react/jsx-runtime";var o={login:{title:"Welcome back",subtitle:"Sign in to your account",cta:"Sign in"},register:{title:"Create your account",subtitle:"Start your 14-day free trial",cta:"Create account"},forgot:{title:"Reset password",subtitle:"We'll email you a reset link",cta:"Send reset link"}};function m({mode:m="login"}){const[u,d]=i(!0),h=o[m];/* @__PURE__ */
2
2
  return c("div",{className:"flex h-full items-center justify-center overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */n("div",{className:"w-full max-w-sm",children:[
3
3
  /* @__PURE__ */n("div",{className:"mb-6 text-center",children:[
4
4
  /* @__PURE__ */c("div",{className:"mx-auto mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-blue-600 text-sm font-bold text-white",children:"A"}),
@@ -0,0 +1,11 @@
1
+ import{ChartTooltip as e}from"./chunk-TLRCTNUF.js";import{usePlotWidth as t}from"./chunk-MAFUXCPZ.js";import{resolveSeriesColor as l,CHART_INK as r}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as n}from"./chunk-TWVUQUUD.js";import{useShellStrings as i,useShellLocale as a}from"./chunk-PEM7UXQ3.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{useRef as h,useId as c,useState as s,useEffect as m}from"react";import{jsx as f,jsxs as u}from"react/jsx-runtime";function x({rows:x,columns:d,cells:p,height:M,width:g,color:y,max:v,formatValue:$,label:b,className:k,emptyLabel:w,cellGap:A=2,cellRadius:N=2}){const U=i().charts,j=a(),C=$??(e=>o(e,j)),z=b??U.intensity,F=w??U.noActivity,R=h(null),D=t(R),L=g??D,S=c(),[T,E]=s(null);if(m(()=>{if(null!==T)return n(e=>"Escape"===e.key&&(E(null),!0))},[T]),0===x.length||0===d.length)/* @__PURE__ */
2
+ return f("div",{className:k,ref:R,children:/* @__PURE__ */f("p",{className:"py-8 text-center text-sm text-gray-500",children:F})});const Q=y??l(0),V=v??Math.max(1,...p.flat().filter(Number.isFinite)),B=96,G=26*x.length,P=M??G+26+26,X=Math.max(2,(Math.max(97,L)-B)/d.length),Z=e=>{const t=V>0?Math.max(0,Math.min(1,e/V)):0;return`color-mix(in oklab, ${Q} ${(8+92*t).toFixed(1)}%, ${r.surface})`};/* @__PURE__ */
3
+ return u("div",{className:`relative ${k??""}`,ref:R,children:[
4
+ /* @__PURE__ */u("svg",{width:"100%",height:P,viewBox:`0 0 ${L} ${P}`,role:"img","aria-label":U.heatmap(z,x.length,d.length),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>E(null),onBlur:()=>E(null),onKeyDown:e=>{const t="ArrowDown"===e.key?1:"ArrowUp"===e.key?-1:0,l="ArrowRight"===e.key?1:"ArrowLeft"===e.key?-1:0;0===t&&0===l||(e.preventDefault(),E(e=>({r:Math.min(x.length-1,Math.max(0,(e?.r??0)+t)),c:Math.min(d.length-1,Math.max(0,(e?.c??0)+l))})))},children:[
5
+ /* @__PURE__ */f("defs",{children:/* @__PURE__ */u("linearGradient",{id:S,x1:"0",x2:"1",children:[
6
+ /* @__PURE__ */f("stop",{offset:"0",stopColor:Z(0)}),
7
+ /* @__PURE__ */f("stop",{offset:"1",stopColor:Z(V)})]})}),x.map((e,t)=>/* @__PURE__ */f("text",{x:86,y:26*t+13+4,textAnchor:"end",fontSize:11,fill:r.label,children:e},`r${t}`)),x.map((e,t)=>d.map((l,r)=>{const n=p[t]?.[r]??0,i=T&&(T.r!==t||T.c!==r);/* @__PURE__ */
8
+ return f("rect",{x:B+r*X+A/2,y:26*t+A/2,width:Math.max(1,X-A),height:26-A,rx:N,fill:Z(n),opacity:i?.55:1,onMouseEnter:()=>E({r:t,c:r}),children:/* @__PURE__ */f("title",{children:`${e} · ${l}: ${C(n)}`})},`${t}-${r}`)})),d.map((e,t)=>t%Math.max(1,Math.ceil(d.length/Math.max(1,Math.floor((L-B)/56))))===0?/* @__PURE__ */f("text",{x:B+t*X+X/2,y:G+15,textAnchor:"middle",fontSize:11,fill:r.label,children:e},`c${t}`):null),
9
+ /* @__PURE__ */f("rect",{x:B,y:G+26,width:Math.min(180,Math.max(40,L-B)),height:8,rx:4,fill:`url(#${S})`}),
10
+ /* @__PURE__ */f("text",{x:B,y:G+48,fontSize:11,fill:r.label,children:"0"}),
11
+ /* @__PURE__ */f("text",{x:B+Math.min(180,Math.max(40,L-B)),y:G+48,textAnchor:"end",fontSize:11,fill:r.label,style:{fontVariantNumeric:"tabular-nums"},children:C(V)})]}),T&&/* @__PURE__ */f("div",{className:"pointer-events-none absolute top-1 right-1 z-10",children:/* @__PURE__ */f(e,{title:`${x[T.r]} · ${d[T.c]}`,rows:[{key:"v",label:z,color:Q,value:null==p[T.r]?.[T.c]?void 0:C(p[T.r][T.c])}]})})]})}export{x as HeatmapChart};
@@ -1,14 +1,14 @@
1
- import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-GVC535IA.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-F4DIVARP.js";import{ColoredBadge as u}from"./chunk-X7PM7JOD.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{Tooltip as f}from"./chunk-BCDG4N6L.js";import{useShellStrings as h}from"./chunk-QWHQJNKL.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:C,dropType:T,onDropData:A,label:F,hint:I,error:P,required:L,className:O,accept:S="image/*",maxSizeBytes:z,maxFiles:M,fit:$="cover",thumbSize:E=96,placeholder:H,cta:R,acceptHint:B,showCover:Q=!1,coverLabel:W,busy:V=!1,busyLabel:q,progress:G,disabled:J=!1,readOnly:U=!1,selected:X,onItemClick:Y,onItemDoubleClick:Z,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=R??te.cta,ae=W??te.cover,ne=q??te.uploading,le=g(),[ie,oe]=b(null),se=J||V,de=!(!k&&!N||se||U),ce=!!w&&!se&&!U,ue=!!j&&!se&&!U,me=!!K&&!J&&!ue,pe=!(!T||!A||se||U),fe=t(se),he=H??r(S,te),ge=d({accept:S,maxSizeBytes:z,maxFiles:M,acceptHint:B,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(T),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(T);t&&A(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:E,height:E},Ke=null==X?null:new Set(X),Ce=!!Y,Te=E<112,Ae=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,S),a=e.name??o(e.url),n=Q&&(e.cover??0===t);/* @__PURE__ */
2
- return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Ce?t=>{t.target.closest?.("button")||Y(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:Z?()=>Z(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);C?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&C?t=>C("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Ce?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),Y(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:$}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:$}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
1
+ import{FormField as e}from"./chunk-6KBDNYRW.js";import{zoneFocusClass as t,mediaPromptLine as r,UploadGlyph as a,dropzoneClass as n,BusyOverlay as l,isVideoUrl as i,mediaFileName as o,FilenameBadge as s}from"./chunk-D4KZOYXQ.js";import{useFileIntake as d,FileIntakeAlert as c}from"./chunk-LYX55RI3.js";import{ColoredBadge as u}from"./chunk-H2XCQJRG.js";import{MENU_ON_MEDIA_ATTR as m}from"./chunk-5QFPTDQF.js";import{Icon as p}from"./chunk-FSPFV4MI.js";import{Tooltip as f}from"./chunk-BCDG4N6L.js";import{useShellStrings as h}from"./chunk-PEM7UXQ3.js";import{useId as g,useState as b,useRef as y}from"react";import{jsxs as v,jsx as x}from"react/jsx-runtime";var k=112,D=/* @__PURE__ */x(p,{name:"close",strokeWidth:2,strokeLinecap:"round","aria-hidden":"true",className:"h-3 w-3"});function N({items:p,onPick:k,onFiles:N,onRemove:w,onReorder:j,dragType:K,onDragOutChange:C,dropType:T,onDropData:A,label:F,hint:I,error:L,required:O,className:P,accept:S="image/*",maxSizeBytes:z,maxFiles:E,fit:M="cover",thumbSize:$=96,placeholder:R,cta:H,acceptHint:Q,showCover:B=!1,coverLabel:X,busy:W=!1,busyLabel:Y,progress:q,disabled:G=!1,readOnly:U=!1,selected:J,onItemClick:V,onItemDoubleClick:Z,onItemContextMenu:_,menuOnMedia:ee=!1}){const te=h().media,re=H??te.cta,ae=X??te.cover,ne=Y??te.uploading,le=g(),[ie,oe]=b(null),se=G||W,de=!(!k&&!N||se||U),ce=!!w&&!se&&!U,ue=!!j&&!se&&!U,me=!!K&&!G&&!ue,pe=!(!T||!A||se||U),fe=t(se),he=R??r(S,te),ge=d({accept:S,maxSizeBytes:z,maxFiles:E,acceptHint:Q,multiple:!0,disabled:!de,currentCount:p.length,onAccept:e=>{if(N)N(e);else for(const t of e)k(t)}}),[be,ye]=b(!1),ve=y(0),xe=e=>pe&&Array.from(e.dataTransfer?.types??[]).includes(T),ke=ge.zoneProps,De={onDragEnter:e=>{if(!xe(e))return ke.onDragEnter?.(e);e.preventDefault(),ve.current+=1,ye(!0)},onDragOver:e=>{if(!xe(e))return ke.onDragOver?.(e);e.preventDefault(),e.dataTransfer.dropEffect="link",be||ye(!0)},onDragLeave:e=>{if(!xe(e))return ke.onDragLeave?.(e);ve.current=Math.max(0,ve.current-1),0===ve.current&&ye(!1)},onDrop:e=>{if(!xe(e))return ke.onDrop?.(e);e.preventDefault(),ve.current=0,ye(!1);const t=e.dataTransfer.getData(T);t&&A(t)}},Ne=ge.dragOver||be,we=()=>{de&&(k?k():ge.open())},je={width:$,height:$},Ke=null==J?null:new Set(J),Ce=!!V,Te=$<112,Ae=(e,t)=>{const r=e.kind?"video"===e.kind:i(e.url,S),a=e.name??o(e.url),n=B&&(e.cover??0===t);/* @__PURE__ */
2
+ return v("div",{...Ce?{"data-grid-item":"","data-grid-id":e.id,role:"option"}:{},...ee?{[m]:""}:{},"aria-selected":Ke?Ke.has(e.id):void 0,onClick:Ce?t=>{t.target.closest?.("button")||V(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey})}:void 0,onDoubleClick:Z?()=>Z(e.id):void 0,onContextMenu:_?t=>_(e.id,t):void 0,draggable:ue||me&&!!e.dragData||void 0,onDragStart:ue?e=>{e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",String(t)),oe(t)}:me&&e.dragData?t=>{t.dataTransfer.effectAllowed=e.dragAlso?"all":"link",t.dataTransfer.setData(K,e.dragData);for(const[r,a]of Object.entries(e.dragAlso??{}))t.dataTransfer.setData(r,a);C?.("start",e.id)}:void 0,onDragEnd:ue?()=>oe(null):me&&e.dragData&&C?t=>C("none"===t.dataTransfer.dropEffect?"cancelled":"dropped",e.id):void 0,onDragOver:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation())}:void 0,onDrop:ue?e=>{null!=ie&&(e.preventDefault(),e.stopPropagation(),ie!==t&&j(ie,t),oe(null))}:void 0,tabIndex:ue||Ce?0:void 0,"aria-label":ue?te.reorder(a,t+1,p.length):Ce?a:void 0,onKeyDown:Ce&&!ue?t=>{t.target!==t.currentTarget||"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),V(e.id,{ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}))}:ue?e=>{"ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),j(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<p.length-1&&(e.preventDefault(),j(t,t+1))}:void 0,className:["relative shrink-0 overflow-hidden rounded-md border border-line bg-gray-100",fe,ie===t?"opacity-50":"",Ke?.has(e.id)?"ring-2 ring-blue-500 ring-offset-1":"",Ce?"cursor-pointer":""].join(" "),style:{...je,cursor:ue?"move":void 0},children:[r?/* @__PURE__ */x("video",{src:e.url,muted:!0,playsInline:!0,preload:"metadata","aria-label":a,className:"h-full w-full",style:{objectFit:M}}):/* @__PURE__ */x("img",{src:e.url,alt:a,className:"h-full w-full",style:{objectFit:M}}),n&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 rounded bg-accent-fill px-2 py-0.5 text-xs font-medium text-on-accent",children:ae}),!n&&null!=e.mark&&/* @__PURE__ */x("span",{className:"absolute left-1 top-1 inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium text-on-accent",style:{background:"var(--rosh-media-scrim)"},children:e.mark}),!n&&null==e.mark&&!!e.badges?.length&&
3
3
  /* @__PURE__ */x("span",{"data-tile-badges":"",className:"absolute left-1 top-1 flex flex-nowrap items-center gap-1 overflow-hidden rounded-md bg-surface p-0.5 shadow-sm",style:{maxWidth:"calc(100% - 8px)"},children:e.badges.map(e=>/* @__PURE__ */x("span",{"data-tile-badge":"",className:"flex min-w-0",children:Te?
4
4
  /* @__PURE__ */x(f,{content:e.label,children:/* @__PURE__ */x("span",{tabIndex:0,"aria-label":e.label,className:`flex rounded-full ${fe}`,children:/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:/* @__PURE__ */v("span",{"aria-hidden":"true",className:"inline-flex items-center gap-0.5",children:[
5
5
  /* @__PURE__ */x("span",{className:"inline-flex h-3 w-3 shrink-0 items-center justify-center",children:e.icon}),null!=e.count&&/* @__PURE__ */x("span",{children:e.count})]})})})}):/* @__PURE__ */x(u,{tone:e.tone,size:"xs",children:e.label})},e.key))}),null!=e.caption&&/* @__PURE__ */x(s,{children:e.caption}),ce&&/* @__PURE__ */x("button",{type:"button",onClick:()=>w(e.id),"aria-label":e.removeLabel??te.removeItem(a),className:`absolute right-1 top-1 flex h-5 w-5 items-center justify-center rounded-full text-white ${fe}`,style:{background:"var(--rosh-media-scrim-button)"},children:D})]},e.id)},Fe=de&&/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":te.addMedia,className:`flex shrink-0 flex-col items-center justify-center gap-1 rounded-md border-2 border-dashed border-gray-300 bg-gray-50 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-500 ${fe}`,style:je,children:[
6
6
  /* @__PURE__ */x(a,{className:"h-5 w-5"}),
7
- /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Ie=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:E+32},children:[
7
+ /* @__PURE__ */x("span",{className:"text-xs font-medium text-gray-500",children:te.add})]}),Ie=de?/* @__PURE__ */v("button",{type:"button",onClick:()=>we(),"aria-label":"string"==typeof he?he:te.upload,className:n(Ne,!1,fe),style:{minHeight:$+32},children:[
8
8
  /* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(a,{})}),
9
9
  /* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:he}),
10
- /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),B&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:B})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:E+32},children:/* @__PURE__ */x("span",{className:V?"invisible":void 0,children:te.empty})});/* @__PURE__ */
11
- return v(e,{label:F,labelId:F?`${le}-label`:void 0,htmlFor:le,hint:I,error:P,required:L,className:O,children:[
12
- /* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":F?`${le}-label`:void 0,"aria-describedby":P?`${le}-error`:I?`${le}-hint`:void 0,"aria-busy":V||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Ie:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
- /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof F?F:te.files,className:"contents",children:p.map(Ae)}):p.map(Ae),Fe]}),V&&/* @__PURE__ */x(l,{label:ne,progress:G})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
10
+ /* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:re}),Q&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:Q})]}):/* @__PURE__ */x("div",{className:"flex w-full items-center justify-center rounded-lg border border-line bg-surface-sunken px-3 text-xs text-ink-faintest",style:{minHeight:$+32},children:/* @__PURE__ */x("span",{className:W?"invisible":void 0,children:te.empty})});/* @__PURE__ */
11
+ return v(e,{label:F,labelId:F?`${le}-label`:void 0,htmlFor:le,hint:I,error:L,required:O,className:P,children:[
12
+ /* @__PURE__ */v("div",{id:le,role:"group","aria-labelledby":F?`${le}-label`:void 0,"aria-describedby":L?`${le}-error`:I?`${le}-hint`:void 0,"aria-busy":W||void 0,...ge.zoneProps,...pe?De:{},className:"relative rounded-lg transition-colors",style:{...se?{opacity:.6}:{},...Ne?{boxShadow:"0 0 0 2px var(--rosh-drop-ring)"}:{}},children:[0===p.length?Ie:/* @__PURE__ */v("div",{className:"flex flex-wrap gap-2",children:[Ce?
13
+ /* @__PURE__ */x("div",{role:"listbox","aria-multiselectable":!!Ke||void 0,"aria-label":"string"==typeof F?F:te.files,className:"contents",children:p.map(Ae)}):p.map(Ae),Fe]}),W&&/* @__PURE__ */x(l,{label:ne,progress:q})]}),!k&&N&&/* @__PURE__ */x("input",{...ge.inputProps}),
14
14
  /* @__PURE__ */x(c,{rejections:ge.rejections})]})}export{k as FULL_BADGE_TILE_PX,N as MediaUploadGrid};
@@ -1,4 +1,4 @@
1
- import{Tabs as e}from"./chunk-A6RB4PIX.js";import{Card as a}from"./chunk-WUKN5WUM.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-LNARMEEZ.js";import{Button_default as l}from"./chunk-NHH2MXFU.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
1
+ import{Tabs as e}from"./chunk-A6RB4PIX.js";import{Card as a}from"./chunk-5RAOFJYT.js";import{StatusBadgeProvider as r,StatusBadge as t}from"./chunk-LNARMEEZ.js";import{Button_default as l}from"./chunk-NHH2MXFU.js";import{useState as i}from"react";import{jsx as d,jsxs as s}from"react/jsx-runtime";var n={featured:"success",new:"active",draft:"draft"},c=["linear-gradient(135deg,#60a5fa,#a78bfa)","linear-gradient(135deg,#34d399,#10b981)","linear-gradient(135deg,#fbbf24,#f59e0b)","linear-gradient(135deg,#f472b6,#ec4899)","linear-gradient(135deg,#38bdf8,#6366f1)","linear-gradient(135deg,#fb7185,#ef4444)","linear-gradient(135deg,#4ade80,#22c55e)","linear-gradient(135deg,#c084fc,#8b5cf6)"].map((e,a)=>({id:a,title:["Sunrise","Forest","Desert","Bloom","Ocean","Ember","Meadow","Dusk"][a],tag:["featured","new","draft"][a%3],bg:e}));function m(){const[m,g]=i("all"),f="all"===m?c:c.filter(e=>e.tag===m);/* @__PURE__ */
2
2
  return d(r,{groups:n,children:/* @__PURE__ */d("div",{className:"h-full overflow-auto bg-gray-50 p-6",children:/* @__PURE__ */s("div",{className:"mx-auto max-w-5xl space-y-4",children:[
3
3
  /* @__PURE__ */s("div",{className:"flex items-center justify-between gap-4",children:[
4
4
  /* @__PURE__ */d("h1",{className:"text-xl font-semibold text-gray-900",children:"Gallery"}),
@@ -1,4 +1,4 @@
1
- import{Tooltip as r}from"./chunk-BCDG4N6L.js";import{useShellStrings as e}from"./chunk-QWHQJNKL.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";var i="Alt+ArrowUp Alt+ArrowDown";function c(r){return!r.altKey||r.ctrlKey||r.metaKey?null:"ArrowUp"===r.key?"up":"ArrowDown"===r.key?"down":null}var a=/* @__PURE__ */n("svg",{"aria-hidden":"true",viewBox:"0 0 4 14",fill:"currentColor",className:"h-3.5 w-1",children:[
1
+ import{Tooltip as r}from"./chunk-BCDG4N6L.js";import{useShellStrings as e}from"./chunk-PEM7UXQ3.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";var i="Alt+ArrowUp Alt+ArrowDown";function c(r){return!r.altKey||r.ctrlKey||r.metaKey?null:"ArrowUp"===r.key?"up":"ArrowDown"===r.key?"down":null}var a=/* @__PURE__ */n("svg",{"aria-hidden":"true",viewBox:"0 0 4 14",fill:"currentColor",className:"h-3.5 w-1",children:[
2
2
  /* @__PURE__ */t("circle",{cx:"2",cy:"3",r:"1.1"}),
3
3
  /* @__PURE__ */t("circle",{cx:"2",cy:"7",r:"1.1"}),
4
4
  /* @__PURE__ */t("circle",{cx:"2",cy:"11",r:"1.1"})]});function l({hint:n,dragging:i,revealClassName:c,marker:l}){const o=e().tree;/* @__PURE__ */
@@ -1,13 +1,13 @@
1
- import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-TLRCTNUF.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-QWHQJNKL.js";import{formatPercent as m,formatPlain as u}from"./chunk-C3QOHMR6.js";import{useId as d,useState as f,useRef as y}from"react";import{jsx as p,jsxs as g}from"react/jsx-runtime";function x({segments:x,variant:v="pie",size:k=280,innerRadius:M,padAngle:b=.012,maxSegments:N=6,otherLabel:$,formatValue:j,centerLabel:I,animate:F=!0,labels:w="none",labelMinShare:C=.04,className:P,emptyLabel:S}){const A=h().charts,R=c(),T=j??(e=>u(e,R)),W=$??A.other,L=S??A.nothingToBreakDown,z=d(),[E,U]=f(null),{highlighted:_}=a(),Q=y(null),V=o(Q,Number.POSITIVE_INFINITY),Y=x.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===Y.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${P??""}`,children:L});const B=[...Y].sort((e,t)=>t.value-e.value),H=B.slice(0,N),O=B.slice(N),J=O.length>0?[...H,{key:"__other__",label:W,value:O.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:H,Z=e=>i(e.slot,e.color,e.tone),q=J.reduce((e,t)=>e+t.value,0),D=Math.ceil(.62*Math.max(...J.map(e=>String(e.label).length),4)*11)+24,K="outside"===w&&V>=120+2*D,X=K?D:0,G=K?Math.max(120,Math.min(k,V-2*X)):k,ee=G+2*X,te=X+G/2,le=G/2,ae=G/2-12,re=M??("ring"===v?.58*ae:0),ne=n(J.length,b),oe=Math.max(...J.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!K)return[];let e=-Math.PI/2;const t=J.map((t,l)=>{const a="rose"===v?n(J.length,b).step:t.value/q*Math.PI*2,r="rose"===v?n(J.length,b).center(l):e+a/2;e+=a;const o="rose"===v?se(t.value):ae;return{key:t.key,label:t.label,share:t.value/q,right:Math.cos(r)>=0,anchor:[te+o*Math.cos(r),le+o*Math.sin(r)],y:le+(o+14)*Math.sin(r),index:l}}).filter(e=>e.share>=C),l=Math.max(1,Math.floor((G-11-13)/26)+1),a=/* @__PURE__ */new Set;for(const e of[!0,!1]){const r=t.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,l).sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e+=1)r[e].y-r[e-1].y<26&&(r[e].y=r[e-1].y+26);for(let e=r.length-1;e>=0;e-=1){const t=e===r.length-1?G-13:r[e+1].y-26;r[e].y=Math.min(r[e].y,t)}r.forEach((e,t)=>{e.y=Math.max(e.y,0===t?11:r[t-1].y+26),a.add(e.key)})}return t.filter(e=>a.has(e.key))})(),ce=(e,t)=>null!==E?E!==e:null!==_&&_!==t,me=null!==E?J[E]:void 0;/* @__PURE__ */
2
- return g("div",{className:`relative ${P??""}`,ref:Q,children:[
3
- /* @__PURE__ */g("svg",{width:"100%",height:G,viewBox:`0 0 ${ee} ${G}`,role:"img","aria-labelledby":z,onMouseLeave:()=>U(null),children:[
4
- /* @__PURE__ */p("title",{id:z,children:A.breakdown(T(q),J.length)}),J.map((a,r)=>{const n=Z(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/q*Math.PI*2-b;"rose"!==v&&(ie+=a.value/q*Math.PI*2);const h=o+Math.max(.001,i),c="rose"===v?se(a.value):ae;/* @__PURE__ */
5
- return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:F?t.sweep:void 0,style:F?l(r,55):void 0,onMouseEnter:()=>U(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
1
+ import{arcPath as e}from"./chunk-VFC6QUEN.js";import{MOTION as t,stagger as l}from"./chunk-465RRWBY.js";import{useHighlight as a}from"./chunk-CNYAHYE6.js";import{ChartTooltip as r}from"./chunk-TLRCTNUF.js";import{angleScale as n}from"./chunk-2JWPNR2U.js";import{usePlotWidth as o}from"./chunk-MAFUXCPZ.js";import{CHART_INK as s,resolveSeriesColor as i}from"./chunk-TZFACUMR.js";import{useShellStrings as h,useShellLocale as c}from"./chunk-PEM7UXQ3.js";import{formatPercent as m,formatPlain as u}from"./chunk-C3QOHMR6.js";import{useId as d,useState as f,useRef as y}from"react";import{jsx as p,jsxs as g}from"react/jsx-runtime";function x({segments:x,variant:v="pie",size:k=280,innerRadius:M,padAngle:b=.012,maxSegments:N=6,otherLabel:$,formatValue:j,centerLabel:I,animate:F=!0,labels:P="none",labelMinShare:w=.04,className:C,emptyLabel:S}){const A=h().charts,R=c(),T=j??(e=>u(e,R)),E=$??A.other,U=S??A.nothingToBreakDown,W=d(),[z,L]=f(null),{highlighted:_}=a(),V=y(null),Y=o(V,Number.POSITIVE_INFINITY),B=x.map((e,t)=>({...e,slot:t})).filter(e=>e.value>0);if(0===B.length)/* @__PURE__ */return p("p",{className:`text-sm text-gray-500 ${C??""}`,children:U});const O=[...B].sort((e,t)=>t.value-e.value),Q=O.slice(0,N),H=O.slice(N),X=H.length>0?[...Q,{key:"__other__",label:E,value:H.reduce((e,t)=>e+t.value,0),slot:-1,color:s.muted}]:Q,Z=e=>i(e.slot,e.color,e.tone),q=X.reduce((e,t)=>e+t.value,0),D=Math.ceil(.62*Math.max(...X.map(e=>String(e.label).length),4)*11)+24,J="outside"===P&&Y>=120+2*D,G=J?D:0,K=J?Math.max(120,Math.min(k,Y-2*G)):k,ee=K+2*G,te=G+K/2,le=K/2,ae=K/2-12,re=M??("ring"===v?.58*ae:0),ne=n(X.length,b),oe=Math.max(...X.map(e=>e.value)),se=e=>re+(ae-re)*Math.sqrt(Math.max(0,e)/oe);let ie=-Math.PI/2;const he=(()=>{if(!J)return[];let e=-Math.PI/2;const t=X.map((t,l)=>{const a="rose"===v?n(X.length,b).step:t.value/q*Math.PI*2,r="rose"===v?n(X.length,b).center(l):e+a/2;e+=a;const o="rose"===v?se(t.value):ae;return{key:t.key,label:t.label,share:t.value/q,right:Math.cos(r)>=0,anchor:[te+o*Math.cos(r),le+o*Math.sin(r)],y:le+(o+14)*Math.sin(r),index:l}}).filter(e=>e.share>=w),l=Math.max(1,Math.floor((K-11-13)/26)+1),a=/* @__PURE__ */new Set;for(const e of[!0,!1]){const r=t.filter(t=>t.right===e).sort((e,t)=>t.share-e.share).slice(0,l).sort((e,t)=>e.y-t.y);for(let e=1;e<r.length;e+=1)r[e].y-r[e-1].y<26&&(r[e].y=r[e-1].y+26);for(let e=r.length-1;e>=0;e-=1){const t=e===r.length-1?K-13:r[e+1].y-26;r[e].y=Math.min(r[e].y,t)}r.forEach((e,t)=>{e.y=Math.max(e.y,0===t?11:r[t-1].y+26),a.add(e.key)})}return t.filter(e=>a.has(e.key))})(),ce=(e,t)=>null!==z?z!==e:null!==_&&_!==t,me=null!==z?X[z]:void 0;/* @__PURE__ */
2
+ return g("div",{className:`relative ${C??""}`,ref:V,children:[
3
+ /* @__PURE__ */g("svg",{width:"100%",height:K,viewBox:`0 0 ${ee} ${K}`,role:"img","aria-labelledby":W,onMouseLeave:()=>L(null),children:[
4
+ /* @__PURE__ */p("title",{id:W,children:A.breakdown(T(q),X.length)}),X.map((a,r)=>{const n=Z(a),o="rose"===v?ne(r):ie,i="rose"===v?ne.step:a.value/q*Math.PI*2-b;"rose"!==v&&(ie+=a.value/q*Math.PI*2);const h=o+Math.max(.001,i),c="rose"===v?se(a.value):ae;/* @__PURE__ */
5
+ return p("path",{d:e(te,le,re,c,o,h),fill:n,fillOpacity:ce(r,a.key)?.4:1,stroke:s.surface,strokeWidth:1,className:F?t.sweep:void 0,style:F?l(r,55):void 0,onMouseEnter:()=>L(r)},a.key)}),he.map(e=>{const t=e.right?ee-6:6,l=e.right?te+ae+14:te-ae-14;/* @__PURE__ */
6
6
  return g("g",{children:[
7
7
  /* @__PURE__ */p("polyline",{points:`${e.anchor[0].toFixed(1)},${e.anchor[1].toFixed(1)} ${l},${e.y.toFixed(1)} ${t},${e.y.toFixed(1)}`,fill:"none",stroke:s.grid,strokeWidth:1}),
8
8
  /* @__PURE__ */p("text",{x:t,y:e.y-2,fontSize:11,fill:s.label,textAnchor:e.right?"end":"start",children:e.label}),
9
- /* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,R)})]},`lbl-${e.key}`)}),I&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:I})]}),me&&null!==E&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:me.label,rows:[{key:"value",label:A.value,color:Z(me),value:T(me.value)},{key:"share",label:A.share,color:s.muted,value:m(me.value/q*100,1,R)}]})}),
10
- /* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:J.map((e,t)=>/* @__PURE__ */g("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
9
+ /* @__PURE__ */p("text",{x:t,y:e.y+10,fontSize:11,fontWeight:600,fill:s.label,textAnchor:e.right?"end":"start",style:{fontVariantNumeric:"tabular-nums"},children:m(100*e.share,1,R)})]},`lbl-${e.key}`)}),I&&re>0&&/* @__PURE__ */p("text",{x:te,y:le+5,textAnchor:"middle",fontSize:16,fontWeight:600,fill:s.label,children:I})]}),me&&null!==z&&/* @__PURE__ */p("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */p(r,{title:me.label,rows:[{key:"value",label:A.value,color:Z(me),value:T(me.value)},{key:"share",label:A.share,color:s.muted,value:m(me.value/q*100,1,R)}]})}),
10
+ /* @__PURE__ */p("ul",{className:"m-0 mt-3 grid gap-1 p-0",style:{gridTemplateColumns:"repeat(auto-fit,minmax(140px,1fr))"},children:X.map((e,t)=>/* @__PURE__ */g("li",{className:"flex list-none items-center gap-2 text-xs text-gray-600",children:[
11
11
  /* @__PURE__ */p("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:Z(e)}}),
12
12
  /* @__PURE__ */p("span",{className:"flex-1 truncate",children:e.label}),
13
13
  /* @__PURE__ */p("span",{className:"tabular-nums text-gray-800",children:m(e.value/q*100,1,R)})]},e.key))})]})}export{x as PieChart};
@@ -1,11 +1,11 @@
1
- import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-QWHQJNKL.js";import{formatPercent as u,formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsxs as c,jsx as o}from"react/jsx-runtime";function d({at:a,title:e,className:t}){/* @__PURE__ */
2
- return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:$,className:M=""}){const j=r().meter,B=s(),A=w??j.noData,F=null!=p&&Number.isFinite(p)?p:null,L=Number.isFinite(f)&&f>0?f:null;null==L&&a(`MetricBar:max:${String(f)}`,`[efficient-shell] MetricBar: max=${String(f)} is not a positive finite number, so there is no scale to draw a proportional bar against. Printing the value without a bar. Pass the real capacity, or leave the reading out entirely (value={null}) when it is unknown — do not pass 0.`);const Q=e(v,"MetricBar"),C=null!=F?Q??t(l(F,g,b)):null,D=n(g),E=n(b),G=null!=F&&null!=L?x(F/L*100):0,H=null!=F?(y??(a=>100===L?u(a,1,B):m(a,B)))(F):"—",P=null!=F&&null!=L&&(null!=D||null!=E),R="md"===k||"lg"===k,S=R?"h-2":"h-1.5",W=null!=F&&null!=L,z=/* @__PURE__ */c("div",{...W?{role:"meter","aria-label":$??("string"==typeof h?h:void 0),"aria-valuemin":0,"aria-valuemax":L,"aria-valuenow":Math.min(L,Math.max(0,F)),"aria-valuetext":H}:{"aria-hidden":!0},className:W&&C?`relative mt-2 ${S} rounded-full bg-gray-200`:`relative mt-2 ${S} rounded-full border border-dashed border-gray-300 bg-transparent`,children:[W&&
3
- /* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${C?C.fill:"bg-gray-400"}`,style:{width:`${G}%`}}),P&&null!=L&&null!=D&&/* @__PURE__ */o(d,{at:x(D/L*100),title:j.warningAt(D),className:i.warning}),P&&null!=L&&null!=E&&/* @__PURE__ */o(d,{at:x(E/L*100),title:j.criticalAt(E),className:i.critical})]}),J=C?C.ink:null!=F?"text-gray-900":"text-gray-400";if(R){const a="lg"===k;/* @__PURE__ */
1
+ import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-PEM7UXQ3.js";import{formatPercent as u,formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsxs as c,jsx as o}from"react/jsx-runtime";function d({at:a,title:e,className:t}){/* @__PURE__ */
2
+ return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:$,className:M=""}){const j=r().meter,B=s(),A=w??j.noData,E=null!=p&&Number.isFinite(p)?p:null,F=Number.isFinite(f)&&f>0?f:null;null==F&&a(`MetricBar:max:${String(f)}`,`[efficient-shell] MetricBar: max=${String(f)} is not a positive finite number, so there is no scale to draw a proportional bar against. Printing the value without a bar. Pass the real capacity, or leave the reading out entirely (value={null}) when it is unknown — do not pass 0.`);const P=e(v,"MetricBar"),C=null!=E?P??t(l(E,g,b)):null,D=n(g),G=n(b),L=null!=E&&null!=F?x(E/F*100):0,Q=null!=E?(y??(a=>100===F?u(a,1,B):m(a,B)))(E):"—",R=null!=E&&null!=F&&(null!=D||null!=G),S="md"===k||"lg"===k,U=S?"h-2":"h-1.5",X=null!=E&&null!=F,z=/* @__PURE__ */c("div",{...X?{role:"meter","aria-label":$??("string"==typeof h?h:void 0),"aria-valuemin":0,"aria-valuemax":F,"aria-valuenow":Math.min(F,Math.max(0,E)),"aria-valuetext":Q}:{"aria-hidden":!0},className:X&&C?`relative mt-2 ${U} rounded-full bg-gray-200`:`relative mt-2 ${U} rounded-full border border-dashed border-gray-300 bg-transparent`,children:[X&&
3
+ /* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${C?C.fill:"bg-gray-400"}`,style:{width:`${L}%`}}),R&&null!=F&&null!=D&&/* @__PURE__ */o(d,{at:x(D/F*100),title:j.warningAt(D),className:i.warning}),R&&null!=F&&null!=G&&/* @__PURE__ */o(d,{at:x(G/F*100),title:j.criticalAt(G),className:i.critical})]}),H=C?C.ink:null!=E?"text-gray-900":"text-gray-400";if(S){const a="lg"===k;/* @__PURE__ */
4
4
  return c("div",{className:M,children:[null!=h&&/* @__PURE__ */o("div",{className:(a?"text-xs":"text-3xs")+" font-medium uppercase tracking-wide text-gray-500",children:h}),
5
5
  /* @__PURE__ */c("div",{className:"mt-1 flex items-baseline gap-2",children:[
6
- /* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${J}`,children:H}),
7
- /* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=F?N:A})]}),z]})}/* @__PURE__ */
6
+ /* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${H}`,children:Q}),
7
+ /* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=E?N:A})]}),z]})}/* @__PURE__ */
8
8
  return c("div",{className:M,children:[
9
9
  /* @__PURE__ */c("div",{className:"flex items-baseline gap-2",children:[null!=h&&/* @__PURE__ */o("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:h}),
10
- /* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${J}`,children:H}),
11
- /* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=F?N:A})]}),z]})}export{h as MetricBar};
10
+ /* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${H}`,children:Q}),
11
+ /* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=E?N:A})]}),z]})}export{h as MetricBar};
@@ -1,4 +1,4 @@
1
- import{ColorPicker as e}from"./chunk-FLQZ7GQ3.js";import{InputNumber_default as t}from"./chunk-ZHHEMSOD.js";import{Segmented as l}from"./chunk-CKPVXDKX.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{jsxs as a,Fragment as o,jsx as i}from"react/jsx-runtime";var s=["solid","dashed","dotted"],n=["top","right","bottom","left"];function d(e){const t=e??{},l="number"==typeof t.width?t.width:0;return Object.fromEntries(n.map(e=>[e,"number"==typeof t[e]?t[e]:l]))}function m(e,t){const l=e??{},r=d(t),a=n.some(e=>"number"==typeof l[e]),o=n.map(e=>"number"==typeof l[e]?l[e]:"number"==typeof l.width?l.width:a?0:r[e]);return!o.every(e=>e===o[0])}var c="h-3.5 w-3.5",h={all:/* @__PURE__ */i(r,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */i(r,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */i(r,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */i(r,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */i(r,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */i(r,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */i(r,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */i(r,{name:"line-dotted","aria-hidden":"true",className:c})};function u({label:r,value:d,onChange:m,each:c,placeholder:u,presets:f,words:b,widths:w=!0,styles:y=!0,min:g=0,max:v=20,step:N=1,readOnly:x}){const S=e=>"number"==typeof d[e]?d[e]:null,j=(e,t)=>{const l={...d};if("number"==typeof d.width)for(const e of n)null===S(e)&&(l[e]=d.width);l[e]=t,delete l.width,m(l)},k=(e,l,r,a,o,s)=>/* @__PURE__ */i("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */i(t,{value:a,onChange:s,min:g,max:v,step:N,precision:0,steppers:"compact",readOnly:x,placeholder:o,prefix:r,suffix:b.unit,"aria-label":l})}),C=n.map(S),O="number"==typeof d.width?d.width:C.every(e=>null!==e&&e===C[0])?C[0]:null,F=null===O&&C.some(e=>null!==e),H=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",z=e=>S(e)??("number"==typeof d.width?d.width:null),D=d.style??u.style;/* @__PURE__ */
2
- return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[k("left",b.sides.left,h.left,z("left"),String(u.sides.left),e=>j("left",e)),k("top",b.sides.top,h.top,z("top"),String(u.sides.top),e=>j("top",e)),k("right",b.sides.right,h.right,z("right"),String(u.sides.right),e=>j("right",e)),k("bottom",b.sides.bottom,h.bottom,z("bottom"),String(u.sides.bottom),e=>j("bottom",e))]}):k("all",b.width,h.all,O,F?"–":H,e=>{const t={...d,width:e};for(const e of n)delete t[e];m(t)}):null,y&&/* @__PURE__ */i("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */i(l,{block:!0,size:"sm",label:b.style,value:D,onChange:e=>{x||m({...d,style:e})},options:s.map(e=>({value:e,label:/* @__PURE__ */a(o,{children:[p[e],
1
+ import{ColorPicker as e}from"./chunk-IEPSBXMU.js";import{InputNumber_default as t}from"./chunk-ODOEH5QZ.js";import{Segmented as l}from"./chunk-CKPVXDKX.js";import{Icon as r}from"./chunk-FSPFV4MI.js";import{jsxs as a,Fragment as o,jsx as i}from"react/jsx-runtime";var s=["solid","dashed","dotted"],n=["top","right","bottom","left"];function d(e){const t=e??{},l="number"==typeof t.width?t.width:0;return Object.fromEntries(n.map(e=>[e,"number"==typeof t[e]?t[e]:l]))}function m(e,t){const l=e??{},r=d(t),a=n.some(e=>"number"==typeof l[e]),o=n.map(e=>"number"==typeof l[e]?l[e]:"number"==typeof l.width?l.width:a?0:r[e]);return!o.every(e=>e===o[0])}var c="h-3.5 w-3.5",h={all:/* @__PURE__ */i(r,{name:"border-all","aria-hidden":"true",className:c}),top:/* @__PURE__ */i(r,{name:"border-top","aria-hidden":"true",className:c}),right:/* @__PURE__ */i(r,{name:"border-right","aria-hidden":"true",className:c}),bottom:/* @__PURE__ */i(r,{name:"border-bottom","aria-hidden":"true",className:c}),left:/* @__PURE__ */i(r,{name:"border-left","aria-hidden":"true",className:c})},p={solid:/* @__PURE__ */i(r,{name:"line-solid","aria-hidden":"true",className:c}),dashed:/* @__PURE__ */i(r,{name:"line-dashed","aria-hidden":"true",className:c}),dotted:/* @__PURE__ */i(r,{name:"line-dotted","aria-hidden":"true",className:c})};function u({label:r,value:d,onChange:m,each:c,placeholder:u,presets:f,words:b,widths:w=!0,styles:y=!0,min:g=0,max:v=20,step:N=1,readOnly:x}){const S=e=>"number"==typeof d[e]?d[e]:null,j=(e,t)=>{const l={...d};if("number"==typeof d.width)for(const e of n)null===S(e)&&(l[e]=d.width);l[e]=t,delete l.width,m(l)},k=(e,l,r,a,o,s)=>/* @__PURE__ */i("div",{"data-side":e,className:"all"===e?"col-span-2 min-w-0":"min-w-0",children:/* @__PURE__ */i(t,{value:a,onChange:s,min:g,max:v,step:N,precision:0,steppers:"compact",readOnly:x,placeholder:o,prefix:r,suffix:b.unit,"aria-label":l})}),C=n.map(S),O="number"==typeof d.width?d.width:C.every(e=>null!==e&&e===C[0])?C[0]:null,E=null===O&&C.some(e=>null!==e),I=n.every(e=>u.sides[e]===u.sides.top)?String(u.sides.top):"–",P=e=>S(e)??("number"==typeof d.width?d.width:null),X=d.style??u.style;/* @__PURE__ */
2
+ return a("div",{role:"group","aria-label":r,"data-border":c?"each":"all",className:"grid w-full min-w-0 grid-cols-2 gap-2",children:[w?c?/* @__PURE__ */a(o,{children:[k("left",b.sides.left,h.left,P("left"),String(u.sides.left),e=>j("left",e)),k("top",b.sides.top,h.top,P("top"),String(u.sides.top),e=>j("top",e)),k("right",b.sides.right,h.right,P("right"),String(u.sides.right),e=>j("right",e)),k("bottom",b.sides.bottom,h.bottom,P("bottom"),String(u.sides.bottom),e=>j("bottom",e))]}):k("all",b.width,h.all,O,E?"–":I,e=>{const t={...d,width:e};for(const e of n)delete t[e];m(t)}):null,y&&/* @__PURE__ */i("div",{"data-border-style":"",className:"col-span-2 min-w-0",children:/* @__PURE__ */i(l,{block:!0,size:"sm",label:b.style,value:X,onChange:e=>{x||m({...d,style:e})},options:s.map(e=>({value:e,label:/* @__PURE__ */a(o,{children:[p[e],
3
3
  /* @__PURE__ */i("span",{className:"sr-only",children:b.styles[e]})]}),title:b.styles[e]}))})}),
4
4
  /* @__PURE__ */i("div",{"data-border-color":"",className:"col-span-2 flex min-w-0 items-center",children:/* @__PURE__ */i(e,{value:d.color??"",onChange:e=>{x||m({...d,color:e})},label:b.color,presets:f,fallback:u.color,showHexInput:!0,size:"md",disabled:x})})]})}export{s as BORDER_LINE_STYLES,u as BorderInput,d as borderSides,m as borderStartEach};
@@ -1,23 +1,23 @@
1
- import{Calendar as e,fromKey as t}from"./chunk-N3JXHNID.js";import{FILTER_ON as r,FILTER_ON_INK as n,FILTER_OFF as a}from"./chunk-AYZY3YNC.js";import{calendarNames as o}from"./chunk-5OTS2G3M.js";import{buttonClasses as i}from"./chunk-UQYNPYF4.js";import{Icon as l}from"./chunk-FSPFV4MI.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{useDropdownPosition as d}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as m}from"./chunk-D65T4H6J.js";import{glassStyle as u}from"./chunk-DTJRIWFR.js";import{useShellStrings as p,useShellLocale as h}from"./chunk-QWHQJNKL.js";import{useState as f,useRef as g,useId as b,useEffect as x}from"react";import{createPortal as v}from"react-dom";import{jsxs as y,Fragment as w,jsx as N}from"react/jsx-runtime";var k=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],C=e=>`${e.getFullYear()}-${M(e.getMonth()+1)}`,M=e=>String(e).padStart(2,"0");function $(e){return`${e.getFullYear()}-${M(e.getMonth()+1)}-${M(e.getDate())}`}function D(e,t){const r=t.getFullYear(),n=t.getMonth(),a=new Date(r,n,t.getDate()),o=new Date(r,n,0),i=e=>new Date(r,n-e,1);switch(e){case"last2Weeks":return{from:$(new Date(r,n,t.getDate()-14)),to:$(a)};case"lastMonth":return{from:$(i(1)),to:$(o)};case"last3Months":return{from:$(i(3)),to:$(o)};case"last6Months":return{from:$(i(6)),to:$(o)};case"last12Months":return{from:$(i(12)),to:$(o)}}}function W(e,t,r){const n=C(e);return t&&n<t.slice(0,7)?t.slice(0,7):r&&n>r.slice(0,7)?r.slice(0,7):n}function j(e){const[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}function S(e){const[t,r,n]=e.split("-");return t&&r&&n?`${n}/${r}/${t}`:e}var F=/* @__PURE__ */new Map;function Y({from:M,to:$,onChange:Y,formatDisplay:O,clearable:H,required:T=!1,name:J,id:L,"aria-labelledby":R,"aria-label":I,weekStartsOn:B,placeholder:E,fullWidth:G=!1,min:U,max:q,disabled:A=!1,allowOpenEnd:P=!1}){const Q=p().dateRange,V=h(),Z=O??(V?function(e){let t=F.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),F.set(e,t));const r=t;return e=>{const[t,n,a]=e.split("-").map(Number);return t&&n&&a?r.format(new Date(Date.UTC(t,n-1,a))):e}}(V):S),z=E??Q.placeholder,K=H??!T,[X,_]=f(!1),[ee,te]=f(M),[re,ne]=f($),[ae,oe]=f(null),[ie,le]=f("from"),se=g(null),ce=g(null),de=g(null),me=b(),ue=b(),pe=b(),[he,fe]=f(!1),ge=d(se,X,{preferredMaxWidth:520,preferredMaxHeight:he?720:560,popupRef:de}),be=g(null),xe=g(null),[ve,ye]=f(!0);m(()=>{const e=xe.current;if(!X||!he||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ve&&ye(a)});const we=g(null);m(()=>{const e=de.current;if(!X||!ge||!e)return;const t=getComputedStyle(e),r=ge.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(he)null!==we.current&&we.current<=r&&fe(!1);else{const e=be.current?.offsetWidth??0;if(0===e)return;we.current=e,e>r+.5&&fe(!0)}});const[Ne,ke]=f(!1);m(()=>{const e=!!L&&(ce.current?.labels?.length??0)>0;e!==Ne&&ke(e)});const Ce=!!I||!!R||Ne,Me=/* @__PURE__ */new Date,[$e,De]=f(()=>M?C(j(M)):W(Me,U,q)),We=k.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(D(e,Me),U,q)),je=e=>e?Z(e):"";x(()=>{if(!X)return;const e=e=>{const t=e.target;se.current?.contains(t)||de.current?.contains(t)||_(!1)};document.addEventListener("mousedown",e);const t=s(()=>_(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[X]),x(()=>{A&&_(!1)},[A]);const Se=()=>{Y("",""),_(!1)},Fe=M&&$?`${je(M)} — ${je($)}`:M?Q.fromOnly(je(M)):$?Q.toOnly(je($)):"",Ye=o(V),Oe=e=>{const r=t(e);return r?Ye.longDate(r.getFullYear(),r.getMonth(),r.getDate()):e},He=M&&$?Q.range(Oe(M),Oe($)):M?Q.fromOnly(Oe(M)):$?Q.toOnly(Oe($)):z,Te=e=>he?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(ae===e?"border-blue-300 bg-accent-tint text-blue-700 font-medium":"border-line text-ink hover:bg-row-hover"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(ae===e?"bg-accent-tint text-blue-700 font-medium":"text-ink hover:bg-row-hover"),Je=/* @__PURE__ */y(w,{children:[We.map(e=>/* @__PURE__ */N("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=D(e,Me);te(t.from),ne(t.to),oe(e),De(t.from.slice(0,7))})(e),className:Te(e),"aria-label":he?Q[e]:void 0,children:he?ve?Q[e]:Q[`${e}Short`]:Q[e]},e)),
2
- /* @__PURE__ */N("button",{type:"button",onClick:()=>oe("Custom"),className:Te("Custom"),children:Q.custom})]}),Le=(e,t)=>P?/* @__PURE__ */N("button",{type:"button","data-range-end":e,"aria-pressed":ie===e,onClick:()=>le(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */N("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),Re=e=>P&&ie===e?" ring-1 ring-blue-400":"",Ie=
3
- /* @__PURE__ */N(e,{mode:"range",min:U,max:q,value:ee||null,endValue:re||null,month:$e,onMonthChange:De,onSelect:e=>{oe("Custom"),P?"from"===ie?(re&&e>re?(te(re),ne(e)):te(e),le("to")):ee&&e<ee?(ne(ee),te(e)):ne(e):!ee||ee&&re?(te(e),ne("")):e<ee?(ne(ee),te(e)):ne(e)},weekStartsOn:B,"aria-label":Q.dialog});/* @__PURE__ */
4
- return y("div",{className:"relative"+(G?" w-full":""),ref:se,children:[
5
- /* @__PURE__ */y("div",{className:`${G?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${M||$?`${r} ${n}`:a}${A?" cursor-not-allowed opacity-60":""}`,children:[
6
- /* @__PURE__ */y("button",{ref:ce,type:"button",onClick:()=>{A||(te(M),ne($),oe(null),le(M&&!$?"to":"from"),De(M?C(j(M)):W(Me,U,q)),_(!0))},"aria-haspopup":"dialog","aria-expanded":X,id:L,disabled:A||void 0,"aria-label":I,"aria-labelledby":R,"aria-describedby":[Ce?ue:void 0,T?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":X?me:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(G?" min-w-0 flex-1 justify-start":""),children:[
1
+ import{Calendar as e,fromKey as t}from"./chunk-E72USUUR.js";import{FILTER_ON as r,FILTER_ON_INK as n,FILTER_OFF as a}from"./chunk-AYZY3YNC.js";import{calendarNames as o}from"./chunk-5OTS2G3M.js";import{buttonClasses as i}from"./chunk-UQYNPYF4.js";import{Icon as l}from"./chunk-FSPFV4MI.js";import{onOverlayOpen as s}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as c}from"./chunk-62LW225J.js";import{useDropdownPosition as d}from"./chunk-GLUJS42B.js";import{useBrowserLayoutEffect as m}from"./chunk-D65T4H6J.js";import{glassStyle as u}from"./chunk-DTJRIWFR.js";import{useShellStrings as p,useShellLocale as h}from"./chunk-PEM7UXQ3.js";import{useState as f,useRef as g,useId as b,useEffect as x}from"react";import{createPortal as v}from"react-dom";import{jsxs as y,Fragment as w,jsx as N}from"react/jsx-runtime";var k=["last2Weeks","lastMonth","last3Months","last6Months","last12Months"],C=e=>`${e.getFullYear()}-${M(e.getMonth()+1)}`,M=e=>String(e).padStart(2,"0");function $(e){return`${e.getFullYear()}-${M(e.getMonth()+1)}-${M(e.getDate())}`}function D(e,t){const r=t.getFullYear(),n=t.getMonth(),a=new Date(r,n,t.getDate()),o=new Date(r,n,0),i=e=>new Date(r,n-e,1);switch(e){case"last2Weeks":return{from:$(new Date(r,n,t.getDate()-14)),to:$(a)};case"lastMonth":return{from:$(i(1)),to:$(o)};case"last3Months":return{from:$(i(3)),to:$(o)};case"last6Months":return{from:$(i(6)),to:$(o)};case"last12Months":return{from:$(i(12)),to:$(o)}}}function W(e,t,r){const n=C(e);return t&&n<t.slice(0,7)?t.slice(0,7):r&&n>r.slice(0,7)?r.slice(0,7):n}function j(e){const[t,r,n]=e.split("-").map(Number);return new Date(t,r-1,n)}function S(e){const[t,r,n]=e.split("-");return t&&r&&n?`${n}/${r}/${t}`:e}var F=/* @__PURE__ */new Map;function Y({from:M,to:$,onChange:Y,formatDisplay:O,clearable:U,required:R=!1,name:T,id:E,"aria-labelledby":H,"aria-label":L,weekStartsOn:B,placeholder:G,fullWidth:I=!1,min:J,max:P,disabled:q=!1,allowOpenEnd:A=!1}){const Q=p().dateRange,V=h(),Z=O??(V?function(e){let t=F.get(e);t||(t=new Intl.DateTimeFormat(e,{year:"numeric",month:"2-digit",day:"2-digit",timeZone:"UTC",calendar:"gregory"}),F.set(e,t));const r=t;return e=>{const[t,n,a]=e.split("-").map(Number);return t&&n&&a?r.format(new Date(Date.UTC(t,n-1,a))):e}}(V):S),z=G??Q.placeholder,X=U??!R,[K,_]=f(!1),[ee,te]=f(M),[re,ne]=f($),[ae,oe]=f(null),[ie,le]=f("from"),se=g(null),ce=g(null),de=g(null),me=b(),ue=b(),pe=b(),[he,fe]=f(!1),ge=d(se,K,{preferredMaxWidth:520,preferredMaxHeight:he?720:560,popupRef:de}),be=g(null),xe=g(null),[ve,ye]=f(!0);m(()=>{const e=xe.current;if(!K||!he||!e)return;const t=getComputedStyle(e).gridTemplateColumns.split(" ").filter(Boolean).length||1,r=parseFloat(getComputedStyle(e).columnGap)||0,n=(e.clientWidth-r*(t-1))/t,a=Math.max(...Array.from(e.querySelectorAll("[data-preset-measure]"),e=>e.offsetWidth))+24+2<=n+.5;a!==ve&&ye(a)});const we=g(null);m(()=>{const e=de.current;if(!K||!ge||!e)return;const t=getComputedStyle(e),r=ge.maxWidth-(e.offsetWidth-e.clientWidth)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(he)null!==we.current&&we.current<=r&&fe(!1);else{const e=be.current?.offsetWidth??0;if(0===e)return;we.current=e,e>r+.5&&fe(!0)}});const[Ne,ke]=f(!1);m(()=>{const e=!!E&&(ce.current?.labels?.length??0)>0;e!==Ne&&ke(e)});const Ce=!!L||!!H||Ne,Me=/* @__PURE__ */new Date,[$e,De]=f(()=>M?C(j(M)):W(Me,J,P)),We=k.filter(e=>((e,t,r)=>(!t||e.from>=t)&&(!r||e.to<=r))(D(e,Me),J,P)),je=e=>e?Z(e):"";x(()=>{if(!K)return;const e=e=>{const t=e.target;se.current?.contains(t)||de.current?.contains(t)||_(!1)};document.addEventListener("mousedown",e);const t=s(()=>_(!1));return()=>{document.removeEventListener("mousedown",e),t()}},[K]),x(()=>{q&&_(!1)},[q]);const Se=()=>{Y("",""),_(!1)},Fe=M&&$?`${je(M)} — ${je($)}`:M?Q.fromOnly(je(M)):$?Q.toOnly(je($)):"",Ye=o(V),Oe=e=>{const r=t(e);return r?Ye.longDate(r.getFullYear(),r.getMonth(),r.getDate()):e},Ue=M&&$?Q.range(Oe(M),Oe($)):M?Q.fromOnly(Oe(M)):$?Q.toOnly(Oe($)):z,Re=e=>he?"h-8 w-full min-w-0 truncate rounded-(--radius-control) border px-3 text-sm transition-colors "+(ae===e?"border-blue-300 bg-accent-tint text-blue-700 font-medium":"border-line text-ink hover:bg-row-hover"):"h-8 text-left px-3 text-sm rounded-(--radius-control) transition-colors "+(ae===e?"bg-accent-tint text-blue-700 font-medium":"text-ink hover:bg-row-hover"),Te=/* @__PURE__ */y(w,{children:[We.map(e=>/* @__PURE__ */N("button",{type:"button",onClick:()=>(e=>{if("Custom"===e)return;const t=D(e,Me);te(t.from),ne(t.to),oe(e),De(t.from.slice(0,7))})(e),className:Re(e),"aria-label":he?Q[e]:void 0,children:he?ve?Q[e]:Q[`${e}Short`]:Q[e]},e)),
2
+ /* @__PURE__ */N("button",{type:"button",onClick:()=>oe("Custom"),className:Re("Custom"),children:Q.custom})]}),Ee=(e,t)=>A?/* @__PURE__ */N("button",{type:"button","data-range-end":e,"aria-pressed":ie===e,onClick:()=>le(e),className:"flex items-center gap-2 whitespace-nowrap rounded rosh-focus-ring",children:t}):/* @__PURE__ */N("div",{className:"flex items-center gap-2 whitespace-nowrap",children:t}),He=e=>A&&ie===e?" ring-1 ring-blue-400":"",Le=
3
+ /* @__PURE__ */N(e,{mode:"range",min:J,max:P,value:ee||null,endValue:re||null,month:$e,onMonthChange:De,onSelect:e=>{oe("Custom"),A?"from"===ie?(re&&e>re?(te(re),ne(e)):te(e),le("to")):ee&&e<ee?(ne(ee),te(e)):ne(e):!ee||ee&&re?(te(e),ne("")):e<ee?(ne(ee),te(e)):ne(e)},weekStartsOn:B,"aria-label":Q.dialog});/* @__PURE__ */
4
+ return y("div",{className:"relative"+(I?" w-full":""),ref:se,children:[
5
+ /* @__PURE__ */y("div",{className:`${I?"flex w-full":"inline-flex"} h-8 items-center gap-2 border rounded-lg px-3 text-sm focus-within:border-blue-500 has-focus-visible:ring-1 has-focus-visible:ring-[color:var(--rosh-focus-ring-deep)] ${M||$?`${r} ${n}`:a}${q?" cursor-not-allowed opacity-60":""}`,children:[
6
+ /* @__PURE__ */y("button",{ref:ce,type:"button",onClick:()=>{q||(te(M),ne($),oe(null),le(M&&!$?"to":"from"),De(M?C(j(M)):W(Me,J,P)),_(!0))},"aria-haspopup":"dialog","aria-expanded":K,id:E,disabled:q||void 0,"aria-label":L,"aria-labelledby":H,"aria-describedby":[Ce?ue:void 0,R?pe:void 0].filter(Boolean).join(" ")||void 0,"aria-controls":K?me:void 0,className:"inline-flex items-center gap-2 rosh-focus-ring"+(I?" min-w-0 flex-1 justify-start":""),children:[
7
7
  /* @__PURE__ */N(l,{name:"date",className:"w-4 h-4 shrink-0",strokeWidth:"2","aria-hidden":"true"}),
8
- /* @__PURE__ */N("span",{className:"truncate",children:Fe||z})]}),K&&!A&&(M||$)&&/* @__PURE__ */N("button",{type:"button",onClick:Se,"aria-label":Q.clearRange,className:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded",children:"×"})]}),Ce&&/* @__PURE__ */N("span",{id:ue,className:"sr-only",children:He}),T&&/* @__PURE__ */N("span",{id:pe,className:"sr-only",children:Q.required}),J&&/* @__PURE__ */y(w,{children:[
9
- /* @__PURE__ */N("input",{type:"hidden",name:J.from,value:M,disabled:A||void 0}),
10
- /* @__PURE__ */N("input",{type:"hidden",name:J.to,value:$,disabled:A||void 0})]}),X&&v(
8
+ /* @__PURE__ */N("span",{className:"truncate",children:Fe||z})]}),X&&!q&&(M||$)&&/* @__PURE__ */N("button",{type:"button",onClick:Se,"aria-label":Q.clearRange,className:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded",children:"×"})]}),Ce&&/* @__PURE__ */N("span",{id:ue,className:"sr-only",children:Ue}),R&&/* @__PURE__ */N("span",{id:pe,className:"sr-only",children:Q.required}),T&&/* @__PURE__ */y(w,{children:[
9
+ /* @__PURE__ */N("input",{type:"hidden",name:T.from,value:M,disabled:q||void 0}),
10
+ /* @__PURE__ */N("input",{type:"hidden",name:T.to,value:$,disabled:q||void 0})]}),K&&v(
11
11
  /* @__PURE__ */y("div",{ref:de,id:me,role:"dialog","aria-label":Q.dialog,"data-layout":he?"stacked":"side",className:"fixed rounded-(--radius-popup) p-4",style:{zIndex:c.popup,left:ge?.left,right:ge?.right,top:ge?.top,bottom:ge?.bottom,width:he&&ge?ge.maxWidth:"max-content",maxWidth:ge?.maxWidth,maxHeight:ge?.maxHeight,overflowY:"auto",visibility:ge?void 0:"hidden",...u()},children:[
12
- /* @__PURE__ */y("div",{className:he?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[Le("from",/* @__PURE__ */y(w,{children:[
12
+ /* @__PURE__ */y("div",{className:he?"mb-3 flex flex-wrap items-center gap-x-4 gap-y-2":"flex items-center gap-3 mb-3",children:[Ee("from",/* @__PURE__ */y(w,{children:[
13
13
  /* @__PURE__ */N("span",{className:"text-xs font-medium text-gray-500",children:Q.from}),
14
- /* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ee?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Re("from")}`,children:ee?je(ee):Q.start})]})),!he&&/* @__PURE__ */N("span",{className:"text-gray-300",children:"—"}),Le("to",/* @__PURE__ */y(w,{children:[
14
+ /* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${ee?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${He("from")}`,children:ee?je(ee):Q.start})]})),!he&&/* @__PURE__ */N("span",{className:"text-gray-300",children:"—"}),Ee("to",/* @__PURE__ */y(w,{children:[
15
15
  /* @__PURE__ */N("span",{className:"text-xs font-medium text-gray-500",children:Q.to}),
16
- /* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${re?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${Re("to")}`,children:re?je(re):Q.end})]}))]}),he?/* @__PURE__ */y(w,{children:[We.length>0&&/* @__PURE__ */y("div",{className:"mb-3 @container",children:[!ve&&/* @__PURE__ */N("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-ink-faint",children:Q.lastHeading}),
17
- /* @__PURE__ */y("div",{ref:xe,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Je,We.map(e=>/* @__PURE__ */N("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:Q[e]},e))]})]}),
18
- /* @__PURE__ */N("div",{className:"w-full",children:Ie})]}):
16
+ /* @__PURE__ */N("span",{className:`text-sm px-2 py-1 rounded border min-w-[90px] ${re?"border-blue-300 bg-accent-tint text-blue-700":"border-line bg-surface-sunken text-ink-faintest"}${He("to")}`,children:re?je(re):Q.end})]}))]}),he?/* @__PURE__ */y(w,{children:[We.length>0&&/* @__PURE__ */y("div",{className:"mb-3 @container",children:[!ve&&/* @__PURE__ */N("p",{"aria-hidden":"true",className:"mb-1 text-xs font-medium text-ink-faint",children:Q.lastHeading}),
17
+ /* @__PURE__ */y("div",{ref:xe,className:"relative grid grid-cols-2 gap-2 @min-[320px]:grid-cols-3",children:[Te,We.map(e=>/* @__PURE__ */N("span",{"data-preset-measure":"","aria-hidden":"true",className:"invisible absolute left-0 top-0 whitespace-nowrap text-sm",children:Q[e]},e))]})]}),
18
+ /* @__PURE__ */N("div",{className:"w-full",children:Le})]}):
19
19
  /* @__PURE__ */y("div",{ref:be,className:"flex w-max gap-4",children:[
20
- /* @__PURE__ */N("div",{className:"w-64",children:Ie}),We.length>0&&/* @__PURE__ */N("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Je})]}),
21
- /* @__PURE__ */y("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[K&&/* @__PURE__ */N("button",{type:"button",onClick:Se,className:i({variant:"ghost"}),children:Q.clear}),
20
+ /* @__PURE__ */N("div",{className:"w-64",children:Le}),We.length>0&&/* @__PURE__ */N("div",{className:"border-l border-gray-200 pl-4 flex flex-col gap-1 min-w-[130px]",children:Te})]}),
21
+ /* @__PURE__ */y("div",{className:"flex flex-wrap justify-end gap-2 mt-4 pt-3 border-t border-gray-200",children:[X&&/* @__PURE__ */N("button",{type:"button",onClick:Se,className:i({variant:"ghost"}),children:Q.clear}),
22
22
  /* @__PURE__ */N("button",{type:"button",onClick:()=>_(!1),className:i({variant:"secondary"}),children:Q.cancel}),
23
- /* @__PURE__ */N("button",{type:"button",onClick:()=>{Y(ee,re),_(!1)},disabled:P?!ee&&!re:!ee||!re,className:i({variant:"primary"}),children:Q.apply})]})]}),document.body)]})}export{Y as DateRangePicker,D as presetRange,$ as toISODate};
23
+ /* @__PURE__ */N("button",{type:"button",onClick:()=>{Y(ee,re),_(!1)},disabled:A?!ee&&!re:!ee||!re,className:i({variant:"primary"}),children:Q.apply})]})]}),document.body)]})}export{Y as DateRangePicker,D as presetRange,$ as toISODate};
@@ -1,4 +1,4 @@
1
- import{useShellStrings as e}from"./chunk-QWHQJNKL.js";import{useRef as r,useEffect as t}from"react";import{jsxs as n,jsx as l}from"react/jsx-runtime";function o({errors:o,title:s,autoFocus:c=!0,className:i=""}){const d=e(),m=r(null),a=r(!1);if(t(()=>{const e=o.length>0;e&&!a.current&&c&&m.current?.focus(),a.current=e},[o.length>0,c]),0===o.length)return null;/* @__PURE__ */
1
+ import{useShellStrings as e}from"./chunk-PEM7UXQ3.js";import{useRef as r,useEffect as t}from"react";import{jsxs as n,jsx as l}from"react/jsx-runtime";function o({errors:o,title:s,autoFocus:c=!0,className:i=""}){const d=e(),m=r(null),a=r(!1);if(t(()=>{const e=o.length>0;e&&!a.current&&c&&m.current?.focus(),a.current=e},[o.length>0,c]),0===o.length)return null;/* @__PURE__ */
2
2
  return n("div",{ref:m,role:"alert",tabIndex:-1,className:`rounded-md border border-red-300 bg-red-50 px-4 py-3 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-invalid-solid)] ${i}`.trim(),children:[
3
3
  /* @__PURE__ */l("h2",{className:"text-sm font-semibold text-red-800",children:s??d.form.errorSummaryTitle}),
4
4
  /* @__PURE__ */l("ul",{className:"mt-2 space-y-1",children:o.map(({fieldId:e,message:r},t)=>/* @__PURE__ */l("li",{children:e?/* @__PURE__ */l("a",{href:`#${e}`,onClick:r=>{r.preventDefault(),(e=>{const r=document.getElementById(e);r&&(r.scrollIntoView({block:"center"}),r.focus())})(e)},className:"text-sm text-red-700 underline hover:text-red-900",children:r}):
@@ -0,0 +1,6 @@
1
+ import{TEXT_ALIGNS as e,textAlignWords as l,textAlignIcon as r}from"./chunk-46YVA2BF.js";import{IconButton_default as a}from"./chunk-RUTUVS4H.js";import{Icon as o}from"./chunk-FSPFV4MI.js";import{Tooltip as n}from"./chunk-BCDG4N6L.js";import{useShellStrings as s}from"./chunk-PEM7UXQ3.js";import{jsx as i,jsxs as t,Fragment as d}from"react/jsx-runtime";var c=e=>e.preventDefault(),u=e=>null!=e&&!1!==e,h=["bold","italic","underline","strike","link","sup","sub","code"];function p(e,l,r){const a={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1,Home:"first",End:"last"}[e.key];if(void 0===a||0===l.length)return;const o=[...e.currentTarget.querySelectorAll('[role="radio"]')],n=o.findIndex(l=>l===e.target||l.contains(e.target));if(n<0)return;e.preventDefault();const s=o.length,i="first"===a?0:"last"===a?s-1:(n+a+s)%s;o[i].disabled||(r(l[i]),o[i].focus())}function b(e,l){const r=["bold","italic","underline","strike"].filter(l=>e.has(l)).length;return{color:r,link:r+(l?1:0)}}function m({offered:l,color:r,last:a,alignment:o,list:n,letterCase:s}){const i=h.filter(e=>l.has(e)).length+(r?1:0)+(u(a)?1:0),t=(o?e.filter(e=>o.allow.includes(e)).length:0)+(n&&l.has("bullet")?1:0)+(n&&l.has("number")?1:0)+(l.has("quote")?1:0)+(s?3:0);return{words:i>0,paragraph:t>0,oneRow:i>0&&t>0&&i+1+t<=9,flow:i>0&&t>0&&i+1+t>9&&i<=7,cells:{words:i,paragraph:t}}}function w(e,l){/* @__PURE__ */
2
+ return i(n,{content:e,children:l},l.key??void 0)}function g({offered:n,pressed:h,onMark:g,color:f,linkOpen:k=!1,last:v,alignment:N,list:C,letterCase:M,disabled:D=!1,"aria-label":x,windows:y,className:j="",layout:A="grid"}){const B=s().textToolbar,S=m({offered:n,color:f,last:v,alignment:N,list:C,letterCase:M});if(!S.words&&!S.paragraph)return null;const U=(e,l="")=>`rosh-tb-btn${e?" is-on":""}${l?` ${l}`:""}`,q=(e,l,r,o)=>n.has(e)?w(l,/* @__PURE__ */i(a,"link"===e?{pressed:k,className:U(k),"aria-label":l,"aria-haspopup":"dialog","aria-expanded":k,"aria-keyshortcuts":o,disabled:D,onMouseDown:c,onClick:()=>g(e),children:r}:{className:U(Boolean(h[e])),"aria-label":l,"aria-pressed":Boolean(h[e]),"aria-keyshortcuts":o,disabled:D,onMouseDown:c,onClick:()=>g(e),children:r},e)):null,I=l(B),L=e.map(e=>[e,I[e],r(e)]),R=N?e.filter(e=>N.allow.includes(e)):[],$=N&&R.includes(N.value)?N.value:R[0],T=[["none",B.caseNone,/* @__PURE__ */i(o,{name:"case-normal"})],["upper",B.caseUpper,/* @__PURE__ */i(o,{name:"case-upper"})],["lower",B.caseLower,/* @__PURE__ */i(o,{name:"case-lower"})]],F=/* @__PURE__ */t(d,{children:[q("bold",B.bold,/* @__PURE__ */i(o,{name:"bold"}),"Meta+B"),q("italic",B.italic,/* @__PURE__ */i(o,{name:"italic"}),"Meta+I"),q("underline",B.underline,/* @__PURE__ */i(o,{name:"underline"}),"Meta+U"),q("strike",B.strike,/* @__PURE__ */i(o,{name:"strike"})),f?w(B.color,/* @__PURE__ */i(a,{pressed:f.open,className:U(f.open,"rosh-tb-color"),"aria-label":B.color,"aria-haspopup":"dialog","aria-expanded":f.open,disabled:D,style:f.run?{"--rosh-tb-run":f.run}:void 0,onMouseDown:c,onClick:f.onToggle,children:/* @__PURE__ */i(o,{name:"text-color"})},"color")):null,q("link",B.link,/* @__PURE__ */i(o,{name:"link"}),"Meta+K"),q("sup",B.sup,/* @__PURE__ */i(o,{name:"superscript"})),q("sub",B.sub,/* @__PURE__ */i(o,{name:"subscript"})),q("code",B.code,/* @__PURE__ */i(o,{name:"code"})),u(v)?v:null]}),K=/* @__PURE__ */t(d,{children:[N&&R.length>0?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":B.alignment,onKeyDown:e=>p(e,R,e=>N.onChange(e)),children:L.map(([e,l,r])=>N.allow.includes(e)?w(l,/* @__PURE__ */i(a,{role:"radio",pressed:N.value===e,className:U(N.value===e),"aria-checked":N.value===e,"aria-label":l,tabIndex:e===$?0:-1,disabled:D||N.disabled,onMouseDown:c,onClick:()=>N.onChange(e),children:r},e)):null)}):null,C&&n.has("bullet")?w(B.bullet,/* @__PURE__ */i(a,{className:U("bullet"===C.pressed),"aria-label":B.bullet,"aria-pressed":"bullet"===C.pressed,disabled:D,onMouseDown:c,onClick:()=>C.onList("bullet"),children:/* @__PURE__ */i(o,{name:"list"})},"bullet")):null,C&&n.has("number")?w(B.number,/* @__PURE__ */i(a,{className:U("number"===C.pressed),"aria-label":B.number,"aria-pressed":"number"===C.pressed,disabled:D,onMouseDown:c,onClick:()=>C.onList("number"),children:/* @__PURE__ */i(o,{name:"numbered-list"})},"number")):null,q("quote",B.quote,/* @__PURE__ */i(o,{name:"quote"})),M?/* @__PURE__ */i("div",{className:"rosh-tb-group",role:"radiogroup","aria-label":B.letterCase,onKeyDown:e=>p(e,T.map(([e])=>e),e=>M.onChange(e)),children:T.map(([e,l,r])=>w(l,/* @__PURE__ */i(a,{role:"radio",pressed:M.value===e,className:U(M.value===e),"aria-checked":M.value===e,"aria-label":l,tabIndex:e===(M.value||"none")?0:-1,disabled:D||M.disabled,onMouseDown:c,onClick:()=>M.onChange(M.value===e?"":e),children:r},e)))}):null]}),V="row"===A,E=V?" is-row":S.flow?" is-flow":S.oneRow?" is-one-row":S.words&&void 0===v?" is-eight":"",H=b(n,Boolean(f)),P={"--rosh-tb-color-col":String(H.color),"--rosh-tb-link-col":String(H.link),...V?{"--rosh-tb-cells":String(S.cells.words+S.cells.paragraph),"--rosh-tb-groupgap":S.words&&S.paragraph?"var(--space-8, 0.5rem)":"0px"}:{}};let G;return G=V?/* @__PURE__ */t("div",{className:"rosh-tb-row is-row",children:[S.words?/* @__PURE__ */i("div",{className:"rosh-tb-words",children:F}):null,S.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-para",children:K}):null]}):S.flow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-flow",children:[F,
3
+ /* @__PURE__ */i("span",{className:"rosh-tb-flowgap","aria-hidden":"true"}),K]}):S.oneRow?/* @__PURE__ */t("div",{className:"rosh-tb-row is-one-row",children:[
4
+ /* @__PURE__ */i("div",{className:"rosh-tb-words",children:F}),
5
+ /* @__PURE__ */i("div",{className:"rosh-tb-para",children:K})]}):/* @__PURE__ */t(d,{children:[S.words?/* @__PURE__ */i("div",{className:"rosh-tb-row"+(void 0===v?" is-eight":""),children:F}):null,S.paragraph?/* @__PURE__ */i("div",{className:"rosh-tb-row",children:K}):null]}),/* @__PURE__ */t("div",{className:`rosh-tb-wrap${E} ${j}`.trim(),style:P,children:[
6
+ /* @__PURE__ */i("div",{className:"rosh-tb",role:"toolbar","aria-label":x??B.formatting,children:G}),y]})}export{g as TextToolbar,m as textToolbarRows,b as textToolbarWindowColumns};
@@ -1 +1 @@
1
- import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-QWHQJNKL.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}function u({onAccept:e,accept:a,maxSizeBytes:u,maxFiles:f,multiple:p=!0,currentCount:m=0,acceptHint:d,disabled:h=!1}){const g=t().files,y=r(null),[x,v]=n(!1),[D,L]=n([]),b=r(0),A="string"==typeof d?d:"",j=s(t=>{if(h||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of p?r:r.slice(0,1))o(e,a)?null!=u&&e.size>u?s.push({file:e,reason:"size",message:g.tooLarge(e.name,l(e.size,g),l(u,g))}):p&&null!=f&&m+n.length>=f?s.push({file:e,reason:"count",message:g.tooMany(e.name,f)}):n.push(e):s.push({file:e,reason:"type",message:g.notAccepted(e.name,A)});L(s),n.length&&e(n),y.current&&(y.current.value="")},[h,p,a,A,u,f,m,e,g]),k=s(()=>{h||y.current?.click()},[h]),z=s(()=>L([]),[]);return{inputRef:y,inputProps:{ref:y,type:"file",accept:a||void 0,multiple:p,disabled:h,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>j(e.target.files)},zoneProps:h?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),b.current+=1,v(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),x||v(!0))},onDragLeave:e=>{i(e)&&(b.current=Math.max(0,b.current-1),0===b.current&&v(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),b.current=0,v(!1),j(e.dataTransfer.files))}},pasteProps:h?{}:{onPaste:e=>{const t=c(e);0!==t.length&&(e.preventDefault(),j(t))}},open:k,take:j,dragOver:x,rejections:D,clearRejections:z}}function f({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{f as FileIntakeAlert,o as acceptsFile,l as humanSize,i as isFileDrag,c as pastedFiles,u as useFileIntake};
1
+ import{DEFAULT_SHELL_STRINGS as e,useShellStrings as t}from"./chunk-PEM7UXQ3.js";import{useRef as r,useState as n,useCallback as s}from"react";import{jsx as a}from"react/jsx-runtime";function o(e,t){const r=(t??"").split(",").map(e=>e.trim().toLocaleLowerCase()).filter(Boolean);if(0===r.length||r.includes("*")||r.includes("*/*"))return!0;const n=e.name.toLocaleLowerCase(),s=e.type.toLocaleLowerCase();return r.some(e=>e.startsWith(".")?n.endsWith(e):e.endsWith("/*")?s.startsWith(e.slice(0,-1)):s===e)}var l=(t,r=e.files)=>t<1024?r.bytes(t):t<1048576?r.kilobytes(Math.round(t/1024)):r.megabytes(t/1048576),i=e=>Array.from(e.dataTransfer?.types??[]).includes("Files");function c(e){const t=e.clipboardData;if(!t)return[];if(t.files&&t.files.length>0)return Array.from(t.files);const r=[];for(const e of Array.from(t.items??[]))if("file"===e.kind){const t=e.getAsFile();t&&r.push(t)}return r}function u({onAccept:e,accept:a,maxSizeBytes:u,maxFiles:f,multiple:p=!0,currentCount:m=0,acceptHint:d,disabled:h=!1}){const g=t().files,y=r(null),[x,v]=n(!1),[D,L]=n([]),b=r(0),A="string"==typeof d?d:"",j=s(t=>{if(h||!t)return;const r=Array.from(t);if(0===r.length)return;const n=[],s=[];for(const e of p?r:r.slice(0,1))o(e,a)?null!=u&&e.size>u?s.push({file:e,reason:"size",message:g.tooLarge(e.name,l(e.size,g),l(u,g))}):p&&null!=f&&m+n.length>=f?s.push({file:e,reason:"count",message:g.tooMany(e.name,f)}):n.push(e):s.push({file:e,reason:"type",message:g.notAccepted(e.name,A)});L(s),n.length&&e(n),y.current&&(y.current.value="")},[h,p,a,A,u,f,m,e,g]),k=s(()=>{h||y.current?.click()},[h]),z=s(()=>L([]),[]);return{inputRef:y,inputProps:{ref:y,type:"file",accept:a||void 0,multiple:p,disabled:h,tabIndex:-1,"aria-hidden":!0,className:"hidden",onChange:e=>j(e.target.files)},zoneProps:h?{}:{onDragEnter:e=>{i(e)&&(e.preventDefault(),b.current+=1,v(!0))},onDragOver:e=>{i(e)&&(e.preventDefault(),x||v(!0))},onDragLeave:e=>{i(e)&&(b.current=Math.max(0,b.current-1),0===b.current&&v(!1))},onDrop:e=>{i(e)&&(e.preventDefault(),b.current=0,v(!1),j(e.dataTransfer.files))}},pasteProps:h?{}:{onPaste:e=>{const t=c(e);0!==t.length&&(e.preventDefault(),j(t))}},open:k,take:j,dragOver:x,rejections:D,clearRejections:z}}function f({rejections:e,className:t="mt-2"}){return 0===e.length?null:/* @__PURE__ */a("ul",{role:"alert",className:`${t} flex flex-col gap-0.5`,children:e.map(({file:e,message:t},r)=>/* @__PURE__ */a("li",{className:"text-xs text-red-600",children:t},`${e.name}-${r}`))})}export{f as FileIntakeAlert,o as acceptsFile,l as humanSize,i as isFileDrag,c as pastedFiles,u as useFileIntake};
@@ -1,7 +1,7 @@
1
- import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-QWHQJNKL.js";import{formatPlain as l}from"./chunk-C3QOHMR6.js";import{jsxs as s,jsx as o}from"react/jsx-runtime";var d={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function i({label:i,value:m,unit:c,delta:h,deltaTone:p,trend:u,trendTone:g,footnote:x,className:f}){const y=r().charts,N=n(),w=null==h?null:h>0?"up":h<0?"down":"flat",b=p?t[p]:void 0,k=g?t[g]:a(0);/* @__PURE__ */
1
+ import{Sparkline as e}from"./chunk-CKCDGSTC.js";import{STATUS_VARS as t,resolveSeriesColor as a}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as n}from"./chunk-PEM7UXQ3.js";import{formatPlain as l}from"./chunk-C3QOHMR6.js";import{jsxs as s,jsx as o}from"react/jsx-runtime";var d={up:{glyph:"▲",word:"trendUp"},down:{glyph:"▼",word:"trendDown"},flat:{glyph:"■",word:"trendFlat"}};function i({label:i,value:m,unit:c,delta:h,deltaTone:p,trend:u,trendTone:g,footnote:x,className:f}){const y=r().charts,w=n(),N=null==h?null:h>0?"up":h<0?"down":"flat",b=p?t[p]:void 0,k=g?t[g]:a(0);/* @__PURE__ */
2
2
  return s("div",{className:`flex flex-col gap-0.5 rounded-lg border border-gray-200 bg-white p-4 ${f??""}`,children:[
3
3
  /* @__PURE__ */o("span",{className:"text-xs font-medium uppercase tracking-wide text-gray-500",children:i}),
4
4
  /* @__PURE__ */s("span",{className:"flex items-baseline gap-2",children:[
5
- /* @__PURE__ */o("span",{className:"text-2xl font-semibold leading-tight text-gray-900",children:m}),c&&/* @__PURE__ */o("span",{className:"text-sm font-medium text-gray-500",children:c})]}),w&&/* @__PURE__ */s("span",{className:"text-xs font-medium",style:b?{color:b}:void 0,children:[
6
- /* @__PURE__ */o("span",{"aria-hidden":"true",children:d[w].glyph})," ",l(Math.abs(h),N),
7
- /* @__PURE__ */s("span",{className:"sr-only",children:[" ",y[d[w].word]]})]}),u&&u.length>1&&/* @__PURE__ */o(e,{data:u,height:26,stroke:k,strokeWidth:2,className:"mt-2 w-full"}),x&&/* @__PURE__ */o("span",{className:"mt-1 text-xs text-gray-500",children:x})]})}export{i as StatTile};
5
+ /* @__PURE__ */o("span",{className:"text-2xl font-semibold leading-tight text-gray-900",children:m}),c&&/* @__PURE__ */o("span",{className:"text-sm font-medium text-gray-500",children:c})]}),N&&/* @__PURE__ */s("span",{className:"text-xs font-medium",style:b?{color:b}:void 0,children:[
6
+ /* @__PURE__ */o("span",{"aria-hidden":"true",children:d[N].glyph})," ",l(Math.abs(h),w),
7
+ /* @__PURE__ */s("span",{className:"sr-only",children:[" ",y[d[N].word]]})]}),u&&u.length>1&&/* @__PURE__ */o(e,{data:u,height:26,stroke:k,strokeWidth:2,className:"mt-2 w-full"}),x&&/* @__PURE__ */o("span",{className:"mt-1 text-xs text-gray-500",children:x})]})}export{i as StatTile};
@@ -1,4 +1,4 @@
1
- import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-QWHQJNKL.js";import{useId as e}from"react";import{jsx as i,jsxs as s}from"react/jsx-runtime";function o({height:o=220,width:a=720,variant:h="area",bars:l=9,label:c,className:n}){const f=t().charts,p=c??f.loading,d=`${e()}-shimmer`,m=48,g=a-16,y=12,u=o-26;/* @__PURE__ */
1
+ import{CHART_INK as r}from"./chunk-TZFACUMR.js";import{useShellStrings as t}from"./chunk-PEM7UXQ3.js";import{useId as e}from"react";import{jsx as i,jsxs as s}from"react/jsx-runtime";function o({height:o=220,width:a=720,variant:h="area",bars:l=9,label:c,className:n}){const f=t().charts,p=c??f.loading,d=`${e()}-shimmer`,m=48,g=a-16,y=12,u=o-26;/* @__PURE__ */
2
2
  return i("div",{className:n,children:/* @__PURE__ */s("svg",{width:"100%",height:o,viewBox:`0 0 ${a} ${o}`,role:"img","aria-label":p,"aria-busy":"true",children:[
3
3
  /* @__PURE__ */i("defs",{children:/* @__PURE__ */s("linearGradient",{id:d,x1:"0",y1:"0",x2:"1",y2:"0",children:[
4
4
  /* @__PURE__ */i("stop",{offset:"0%",stopColor:r.surface,stopOpacity:"0"}),