efficient-shell 8.41.0 → 9.9.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 (471) hide show
  1. package/README.md +70 -20
  2. package/dist/Browser-ZPOVP4Z7.js +43 -0
  3. package/dist/Calculator-CSYRZAS5.js +29 -0
  4. package/dist/CurrencyConverter-SSR2XDIC.js +21 -0
  5. package/dist/{Documents-VVKKYYJS.js → Documents-T7JYO223.js} +14 -14
  6. package/dist/Files-HBGW3JWI.js +88 -0
  7. package/dist/Notepad-GO2QT55C.js +25 -0
  8. package/dist/PdfViewer-XSISAJZP.js +1 -0
  9. package/dist/{PomodoroTimer-ZVD3D357.js → PomodoroTimer-EV6D4OFU.js} +28 -28
  10. package/dist/{Preview-K5AJQGE7.js → Preview-Z2CRCDHA.js} +58 -58
  11. package/dist/Sidebar-Y4DTQYW2.js +43 -0
  12. package/dist/Spreadsheet-GEE77GD3.js +37 -0
  13. package/dist/Stock-6ZIQHGPH.js +16 -0
  14. package/dist/Weather-II7NFRMK.js +60 -0
  15. package/dist/WorldClock-NBLNO63Q.js +32 -0
  16. package/dist/ai/index.d.ts +35 -4
  17. package/dist/ai/index.js +46 -46
  18. package/dist/ai.css +1 -1
  19. package/dist/apps/index.js +1 -1
  20. package/dist/bin/media-host-check.js +1 -1
  21. package/dist/bin/ui-check.js +1 -1
  22. package/dist/brand.css +1 -1
  23. package/dist/charts/BoxPlotChart.js +1 -1
  24. package/dist/charts/CandlestickChart.js +1 -1
  25. package/dist/charts/CartesianPlot.js +1 -1
  26. package/dist/charts/ChartBrush.js +1 -1
  27. package/dist/charts/ChartFrame.js +1 -1
  28. package/dist/charts/ChartSkeleton.js +1 -1
  29. package/dist/charts/ChartTooltip.js +1 -1
  30. package/dist/charts/ChordChart.js +1 -1
  31. package/dist/charts/ColumnChart.js +1 -1
  32. package/dist/charts/FunnelChart.js +1 -1
  33. package/dist/charts/HeatmapChart.js +1 -1
  34. package/dist/charts/HistogramChart.js +1 -1
  35. package/dist/charts/Meter.js +1 -1
  36. package/dist/charts/PieChart.js +1 -1
  37. package/dist/charts/RadarChart.js +1 -1
  38. package/dist/charts/RadialBarChart.js +1 -1
  39. package/dist/charts/RangeChart.js +1 -1
  40. package/dist/charts/RankedBars.js +1 -1
  41. package/dist/charts/SankeyChart.js +1 -1
  42. package/dist/charts/ScatterChart.js +1 -1
  43. package/dist/charts/SpecChart.js +1 -1
  44. package/dist/charts/StatTile.js +1 -1
  45. package/dist/charts/SunburstChart.js +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/chunk-24K6GVNM.js +28 -0
  50. package/dist/{chunk-M2AIC7IK.js → chunk-2HEJDLPP.js} +2 -2
  51. package/dist/{chunk-BRHIRE4D.js → chunk-2MLRK7IO.js} +2 -2
  52. package/dist/chunk-2R3BVU75.js +26 -0
  53. package/dist/chunk-2YLG32JY.js +2 -0
  54. package/dist/{chunk-TZSPJIP4.js → chunk-32VV2J22.js} +1 -1
  55. package/dist/{chunk-QQCHLRKG.js → chunk-3APSMJPN.js} +1 -1
  56. package/dist/{chunk-6SMQNPWS.js → chunk-43ONX6UZ.js} +1 -1
  57. package/dist/{chunk-L7IKTEOC.js → chunk-442FFHQJ.js} +13 -13
  58. package/dist/chunk-4MVRSCQE.js +1 -0
  59. package/dist/{chunk-BT3XDH3L.js → chunk-56RAOI7O.js} +6 -6
  60. package/dist/chunk-5F7HMNCX.js +5 -0
  61. package/dist/chunk-5GUBNCTP.js +1 -0
  62. package/dist/{chunk-LGLZTJ2W.js → chunk-5JRL5LXD.js} +6 -6
  63. package/dist/{chunk-OFHCDTJM.js → chunk-5VOVNIOU.js} +1 -1
  64. package/dist/{chunk-NID6MGGC.js → chunk-5VRMQTKV.js} +8 -8
  65. package/dist/chunk-6453ISTQ.js +4 -0
  66. package/dist/chunk-6FEL5D56.js +8 -0
  67. package/dist/{chunk-MVQBVPWP.js → chunk-6KBDNYRW.js} +1 -1
  68. package/dist/{chunk-D2AUUIKG.js → chunk-6MVHRNWC.js} +1 -1
  69. package/dist/{chunk-TW7TA2AB.js → chunk-6ZHX56NM.js} +1 -1
  70. package/dist/{chunk-RNBM5JZI.js → chunk-7JGR7WPD.js} +4 -4
  71. package/dist/{chunk-BIJ7ADTZ.js → chunk-7WGOLPGM.js} +1 -1
  72. package/dist/{chunk-SXSMIMFY.js → chunk-A6RB4PIX.js} +4 -4
  73. package/dist/chunk-AC373WIU.js +8 -0
  74. package/dist/{chunk-BMPBVI7P.js → chunk-AGUA3O5O.js} +1 -1
  75. package/dist/{chunk-UVUBZL7K.js → chunk-ANFLQSGX.js} +5 -5
  76. package/dist/chunk-ARWMJSQJ.js +3 -0
  77. package/dist/chunk-AYZY3YNC.js +1 -0
  78. package/dist/{chunk-BSNWVZHW.js → chunk-B4KMHEFZ.js} +1 -1
  79. package/dist/chunk-B6YOP2IX.js +6 -0
  80. package/dist/{chunk-4VLKDANH.js → chunk-BBEOFKLY.js} +1 -1
  81. package/dist/{chunk-22S6LG6D.js → chunk-BCDG4N6L.js} +1 -1
  82. package/dist/{chunk-DFDDRKIJ.js → chunk-BCUQXILM.js} +1 -1
  83. package/dist/chunk-BGRT775Y.js +2 -0
  84. package/dist/{chunk-5TFTSYOD.js → chunk-BVTNGW5S.js} +1 -1
  85. package/dist/{chunk-TVJRENCQ.js → chunk-BWUU565Y.js} +9 -9
  86. package/dist/{chunk-BKZGI76S.js → chunk-BZBMZDLD.js} +1 -1
  87. package/dist/chunk-BZG5E7GF.js +6 -0
  88. package/dist/{chunk-SBHFEWR6.js → chunk-C4UL2UNR.js} +1 -1
  89. package/dist/{chunk-DOCUM3K7.js → chunk-CAG3TSV2.js} +1 -1
  90. package/dist/chunk-CE5BARZI.js +16 -0
  91. package/dist/chunk-CJB73MHF.js +2 -0
  92. package/dist/{chunk-N6DTTOB6.js → chunk-CKPVXDKX.js} +3 -3
  93. package/dist/chunk-CO5RKOVX.js +20 -0
  94. package/dist/chunk-CRXFSN5K.js +20 -0
  95. package/dist/chunk-CVNJSD2J.js +18 -0
  96. package/dist/{chunk-RYBJ6MMM.js → chunk-CXMTDYVI.js} +1 -1
  97. package/dist/chunk-D7IXMMZT.js +9 -0
  98. package/dist/{chunk-JUGPTBMS.js → chunk-DLNYXXNE.js} +2 -2
  99. package/dist/chunk-DNWV6N4P.js +5 -0
  100. package/dist/{chunk-KZHPX4FM.js → chunk-DWBZ3Z34.js} +2 -2
  101. package/dist/chunk-DZTAGMNY.js +100 -0
  102. package/dist/chunk-E4E7MACR.js +20 -0
  103. package/dist/{chunk-DZNG34DC.js → chunk-EFFF3FCS.js} +23 -23
  104. package/dist/{chunk-NL5G26Q7.js → chunk-EGAV5LSX.js} +1 -1
  105. package/dist/{chunk-M5P6A7KS.js → chunk-ENL5L6NR.js} +1 -1
  106. package/dist/chunk-EW3L4W2I.js +14 -0
  107. package/dist/{chunk-6GWZ5UPX.js → chunk-EWVOGTEX.js} +1 -1
  108. package/dist/{chunk-I7HDD4IM.js → chunk-EXNAAHN4.js} +2 -2
  109. package/dist/{chunk-YDYDR72S.js → chunk-F4DIVARP.js} +1 -1
  110. package/dist/{chunk-WYN5KVU4.js → chunk-F7F6Z64G.js} +3 -3
  111. package/dist/{chunk-5PY4H4ZJ.js → chunk-FBUUXK5G.js} +1 -1
  112. package/dist/chunk-FKNJSD6B.js +14 -0
  113. package/dist/{chunk-D7FT2PXG.js → chunk-FLEG5KP5.js} +5 -5
  114. package/dist/{chunk-C4YN2DNM.js → chunk-FLQZ7GQ3.js} +11 -11
  115. package/dist/{chunk-L5ND7FNA.js → chunk-FPGRKHUW.js} +12 -12
  116. package/dist/chunk-G6CTTBKE.js +9 -0
  117. package/dist/{chunk-N2SJNPFY.js → chunk-GS5AISRS.js} +4 -4
  118. package/dist/{chunk-4Y4PWKMM.js → chunk-GVC535IA.js} +3 -3
  119. package/dist/chunk-HEEY4TVP.js +8 -0
  120. package/dist/chunk-HJWTWS5E.js +8 -0
  121. package/dist/{chunk-VH6GB73Q.js → chunk-HL6JSDN3.js} +1 -1
  122. package/dist/chunk-HNQPF5QZ.js +2 -0
  123. package/dist/{chunk-WRORJNS5.js → chunk-HQMN5THW.js} +10 -10
  124. package/dist/chunk-HUF34LSW.js +15 -0
  125. package/dist/chunk-IB4333CI.js +14 -0
  126. package/dist/chunk-IGNZULKG.js +17 -0
  127. package/dist/chunk-IJIESSTX.js +5 -0
  128. package/dist/{chunk-S7VSXUKS.js → chunk-IJWFKUYA.js} +4 -4
  129. package/dist/chunk-IK2WXW2E.js +27 -0
  130. package/dist/{chunk-UZMZ2EDW.js → chunk-IMOPDLMA.js} +1 -1
  131. package/dist/{chunk-2FLYC6I2.js → chunk-IN4KV3SJ.js} +1 -1
  132. package/dist/chunk-IPTCV6CQ.js +69 -0
  133. package/dist/{chunk-FORJ75AU.js → chunk-IQWIYZB5.js} +2 -2
  134. package/dist/chunk-IX6QMUJQ.js +9 -0
  135. package/dist/{chunk-4G5VLI7E.js → chunk-JDQGHQ2C.js} +1 -1
  136. package/dist/chunk-JIW5CJXC.js +4 -0
  137. package/dist/{chunk-P42YNSKI.js → chunk-JKDEE35P.js} +1 -1
  138. package/dist/{chunk-CKZ6ZDU5.js → chunk-JS6ZSEZJ.js} +1 -1
  139. package/dist/chunk-K4D63NP3.js +12 -0
  140. package/dist/chunk-KEK47CP3.js +12 -0
  141. package/dist/chunk-KWT6GT4M.js +29 -0
  142. package/dist/chunk-L4TN4EWK.js +1 -0
  143. package/dist/{chunk-SR4XAYLC.js → chunk-L67VXJMF.js} +1 -1
  144. package/dist/chunk-LAEXWXJA.js +9 -0
  145. package/dist/{chunk-D323R2FT.js → chunk-LNARMEEZ.js} +1 -1
  146. package/dist/{chunk-CZ25A5RS.js → chunk-LNQVTH5S.js} +1 -1
  147. package/dist/chunk-LUWRPPJA.js +7 -0
  148. package/dist/chunk-M554OMPA.js +2 -0
  149. package/dist/{chunk-BVW5U7QQ.js → chunk-M5GMIQ47.js} +3 -3
  150. package/dist/{chunk-GX2GSDJP.js → chunk-MAMWQCJ6.js} +1 -1
  151. package/dist/{chunk-ZTB6EMC7.js → chunk-MV6WDGB6.js} +1 -1
  152. package/dist/chunk-MWIT4UN2.js +14 -0
  153. package/dist/{chunk-BX2IOAD5.js → chunk-N2K6OAFM.js} +1 -1
  154. package/dist/{chunk-JPRJQ6B7.js → chunk-N3JXHNID.js} +10 -10
  155. package/dist/{chunk-EYKUKN32.js → chunk-N7T63BVD.js} +4 -4
  156. package/dist/chunk-NHH2MXFU.js +2 -0
  157. package/dist/chunk-NHVXVHUR.js +23 -0
  158. package/dist/{chunk-37CCKGHU.js → chunk-NWCW22U6.js} +2 -2
  159. package/dist/{chunk-J47HXHSL.js → chunk-O5LQBBW2.js} +7 -7
  160. package/dist/{chunk-IHQX4GYD.js → chunk-OQ2EDMB2.js} +1 -1
  161. package/dist/chunk-OUSKOWNP.js +12 -0
  162. package/dist/chunk-OV2SWQPT.js +22 -0
  163. package/dist/chunk-OX2DOOOI.js +8 -0
  164. package/dist/{chunk-6KO5VTL7.js → chunk-OZAAIE4E.js} +1 -1
  165. package/dist/chunk-P3OBE43Q.js +8 -0
  166. package/dist/{chunk-2C6IG7LG.js → chunk-P3Y5RFI4.js} +2 -2
  167. package/dist/{chunk-2UXAI77F.js → chunk-P4XTWAKJ.js} +1 -1
  168. package/dist/{chunk-7PCI6AUU.js → chunk-PB7G6CJ7.js} +1 -1
  169. package/dist/chunk-PDB5W7VI.js +6 -0
  170. package/dist/chunk-PDXPMHG3.js +4 -0
  171. package/dist/chunk-POCQ7ZL4.js +3 -0
  172. package/dist/{chunk-FORUFXAN.js → chunk-PVR4KU7H.js} +5 -5
  173. package/dist/{chunk-2RBWQVDC.js → chunk-PYLNMN6E.js} +13 -13
  174. package/dist/chunk-Q7KTTDUS.js +11 -0
  175. package/dist/{chunk-3PGK3VFS.js → chunk-QC6OK3ED.js} +1 -1
  176. package/dist/{chunk-MEJK6PBN.js → chunk-QSJR7EI7.js} +3 -3
  177. package/dist/{chunk-5DFKPSJQ.js → chunk-QTV3Y3UT.js} +1 -1
  178. package/dist/chunk-QWHQJNKL.js +1 -0
  179. package/dist/chunk-QXWY3CJ2.js +11 -0
  180. package/dist/{chunk-MG7OPTLQ.js → chunk-QZKWIVZW.js} +1 -1
  181. package/dist/chunk-R2VKEMZH.js +3 -0
  182. package/dist/{chunk-EXWGPXOS.js → chunk-RBD7SB6M.js} +1 -1
  183. package/dist/chunk-RC6UHOAV.js +4 -0
  184. package/dist/{chunk-ZVEOWBXE.js → chunk-RULVWW4A.js} +6 -6
  185. package/dist/chunk-RUTUVS4H.js +1 -0
  186. package/dist/{chunk-MAOJENIB.js → chunk-RWJCKZEY.js} +1 -1
  187. package/dist/chunk-S4Z657L6.js +6 -0
  188. package/dist/{chunk-Q3OCGLW7.js → chunk-SOP447EP.js} +2 -2
  189. package/dist/{chunk-CDRXZBVR.js → chunk-TBPHW42V.js} +1 -1
  190. package/dist/chunk-TLRCTNUF.js +6 -0
  191. package/dist/{chunk-KWX6NAOR.js → chunk-TVL3JPMY.js} +1 -1
  192. package/dist/{chunk-ZX2D25LG.js → chunk-U4OGRIP6.js} +1 -1
  193. package/dist/chunk-U5N6PSXO.js +9 -0
  194. package/dist/{chunk-SZIENHKR.js → chunk-UKDJUYIV.js} +1 -1
  195. package/dist/chunk-UQYNPYF4.js +1 -0
  196. package/dist/chunk-URHGHXDN.js +1 -0
  197. package/dist/{chunk-6WWAQC5V.js → chunk-VG2R6PZV.js} +1 -1
  198. package/dist/{chunk-RWGSMZGS.js → chunk-VVAJ23SD.js} +1 -1
  199. package/dist/chunk-VVGL5O4F.js +8 -0
  200. package/dist/chunk-VVJIKS47.js +1 -0
  201. package/dist/chunk-WE7CYRZT.js +7 -0
  202. package/dist/{chunk-L3G3YHVN.js → chunk-WFHYU66E.js} +1 -1
  203. package/dist/chunk-WH3JHMEA.js +13 -0
  204. package/dist/chunk-WUKN5WUM.js +11 -0
  205. package/dist/{chunk-ET2EF5CI.js → chunk-X7PM7JOD.js} +1 -1
  206. package/dist/{chunk-4NXMMWL6.js → chunk-XD34TCRG.js} +1 -1
  207. package/dist/chunk-XI4HKNFI.js +19 -0
  208. package/dist/{chunk-Y4MI6NRI.js → chunk-XNWQ72WA.js} +1 -1
  209. package/dist/{chunk-3BSPSRK4.js → chunk-XS4HFUTW.js} +3 -3
  210. package/dist/{chunk-Y5T257HX.js → chunk-XZYAFTW4.js} +4 -4
  211. package/dist/{chunk-Z35NWGMT.js → chunk-Y44ABEW3.js} +2 -2
  212. package/dist/chunk-YWGC7J6B.js +11 -0
  213. package/dist/{chunk-MMFJBWJC.js → chunk-Z3JW77LH.js} +1 -1
  214. package/dist/chunk-ZAU2HIRH.js +21 -0
  215. package/dist/{chunk-Y53KNQKL.js → chunk-ZDMZM7HD.js} +2 -2
  216. package/dist/chunk-ZHHEMSOD.js +3 -0
  217. package/dist/chunk-ZOHQVSB3.js +27 -0
  218. package/dist/{chunk-3AKIKASU.js → chunk-ZTL2RPNY.js} +1 -1
  219. package/dist/{chunk-QVR4LBBW.js → chunk-ZYDZY6ED.js} +1 -1
  220. package/dist/data/DataTable.js +1 -1
  221. package/dist/data/Kanban.js +1 -1
  222. package/dist/data/ListFooter.js +1 -1
  223. package/dist/data/ListLoadError.js +1 -1
  224. package/dist/data/Pagination.js +1 -1
  225. package/dist/file-intake/index.js +1 -1
  226. package/dist/format/index.js +1 -1
  227. package/dist/forms/AlignmentGrid.js +1 -1
  228. package/dist/forms/BorderInput.js +1 -1
  229. package/dist/forms/BrandAssetEditor.js +1 -1
  230. package/dist/forms/Button.js +1 -1
  231. package/dist/forms/Calendar.js +1 -1
  232. package/dist/forms/ColorPicker.js +1 -1
  233. package/dist/forms/ComposerAttachments.js +1 -1
  234. package/dist/forms/CornersInput.js +1 -1
  235. package/dist/forms/DatePicker.js +1 -1
  236. package/dist/forms/DateRangePicker.js +1 -1
  237. package/dist/forms/DateTimePicker.js +1 -1
  238. package/dist/forms/DisplayChips.js +1 -1
  239. package/dist/forms/FilePicker.js +1 -1
  240. package/dist/forms/FormErrorSummary.js +1 -1
  241. package/dist/forms/FormField.js +1 -1
  242. package/dist/forms/IconButton.js +1 -1
  243. package/dist/forms/IconPicker.js +1 -1
  244. package/dist/forms/ImageFocusPoint.js +1 -1
  245. package/dist/forms/Input.js +1 -1
  246. package/dist/forms/InputNumber.js +1 -1
  247. package/dist/forms/LinkPicker.js +1 -1
  248. package/dist/forms/MediaLibrary.d.ts +6 -1
  249. package/dist/forms/MediaLibrary.js +1 -1
  250. package/dist/forms/MediaUploadField.js +1 -1
  251. package/dist/forms/MediaUploadGrid.js +1 -1
  252. package/dist/forms/MediaUsedInList.js +1 -1
  253. package/dist/forms/NumericKeypad.js +1 -1
  254. package/dist/forms/PictureTiles.js +1 -1
  255. package/dist/forms/PositionInput.js +1 -1
  256. package/dist/forms/RadioGroup.js +1 -1
  257. package/dist/forms/Segmented.js +1 -1
  258. package/dist/forms/Select.d.ts +7 -1
  259. package/dist/forms/Select.js +1 -1
  260. package/dist/forms/SidesInput.js +1 -1
  261. package/dist/forms/Slider.d.ts +7 -1
  262. package/dist/forms/Slider.js +1 -1
  263. package/dist/forms/Snippet.js +1 -1
  264. package/dist/forms/SplitButton.js +1 -1
  265. package/dist/forms/TagInput.js +1 -1
  266. package/dist/forms/TextToolbar.d.ts +1 -1
  267. package/dist/forms/TextToolbar.js +1 -1
  268. package/dist/forms/Textarea.js +1 -1
  269. package/dist/forms/TimePicker.js +1 -1
  270. package/dist/forms/WidthsBar.d.ts +7 -8
  271. package/dist/forms/WidthsBar.js +1 -1
  272. package/dist/forms/buttonStyles.js +1 -1
  273. package/dist/forms/mediaLibraryMenu.js +1 -1
  274. package/dist/forms/mediaMoveItems.js +1 -1
  275. package/dist/forms/styles.d.ts +2 -2
  276. package/dist/forms/styles.js +1 -1
  277. package/dist/forms/textAlign.d.ts +1 -1
  278. package/dist/forms/textAlign.js +1 -1
  279. package/dist/forms/useFileIntake.js +1 -1
  280. package/dist/hooks/useTheme.d.ts +1 -1
  281. package/dist/icons/efficient-glyphs.d.ts +0 -1
  282. package/dist/icons/efficient-glyphs.js +1 -1
  283. package/dist/icons/efficient-looks.js +1 -1
  284. package/dist/icons/efficient-meanings.d.ts +0 -1
  285. package/dist/icons/efficient-meanings.js +1 -1
  286. package/dist/icons/efficient.d.ts +0 -1
  287. package/dist/icons/efficient.js +1 -1
  288. package/dist/icons/glyphs/SpinnerIcon.js +1 -1
  289. package/dist/icons/index.d.ts +2 -2
  290. package/dist/icons/index.js +1 -1
  291. package/dist/icons/looks/map.js +1 -1
  292. package/dist/icons/sets.js +1 -1
  293. package/dist/index.d.ts +4 -2
  294. package/dist/index.js +695 -695
  295. package/dist/locales/zh-Hans.js +1 -1
  296. package/dist/map/index.js +12 -12
  297. package/dist/markdown/index.js +5 -5
  298. package/dist/{names-mX74Rrmy.d.ts → names-C1TgIb_2.d.ts} +1 -1
  299. package/dist/page-tabs/index.js +5 -5
  300. package/dist/pdf/index.js +1 -1
  301. package/dist/shell/Accordion.js +1 -1
  302. package/dist/shell/AppUpdateBanner.js +1 -1
  303. package/dist/shell/Avatar.js +1 -1
  304. package/dist/shell/Banner.js +1 -1
  305. package/dist/shell/Breadcrumbs.js +1 -1
  306. package/dist/shell/BudgetBar.js +1 -1
  307. package/dist/shell/Card.js +1 -1
  308. package/dist/shell/ColoredBadge.js +1 -1
  309. package/dist/shell/ConfirmDialog.js +1 -1
  310. package/dist/shell/ContainerFillChart.js +1 -1
  311. package/dist/shell/ContextMenu.js +1 -1
  312. package/dist/shell/CountBadge.js +1 -1
  313. package/dist/shell/Dialog.js +1 -1
  314. package/dist/shell/Drawer.js +1 -1
  315. package/dist/shell/DropdownMenu.js +1 -1
  316. package/dist/shell/EditableGrid.js +1 -1
  317. package/dist/shell/EmptyState.js +1 -1
  318. package/dist/shell/EmptyValue.js +1 -1
  319. package/dist/shell/GlobalSearch.js +1 -1
  320. package/dist/shell/HelpCenter.js +1 -1
  321. package/dist/shell/IconRail.js +1 -1
  322. package/dist/shell/ImageLightbox.js +1 -1
  323. package/dist/shell/ItemCount.d.ts +20 -0
  324. package/dist/shell/ItemCount.js +1 -0
  325. package/dist/shell/Kbd.js +1 -1
  326. package/dist/shell/LanguageSelect.js +1 -1
  327. package/dist/shell/Markdown.d.ts +1 -1
  328. package/dist/shell/Markdown.js +1 -1
  329. package/dist/shell/MetricBar.js +1 -1
  330. package/dist/shell/MetricBarLegend.js +1 -1
  331. package/dist/shell/MilestoneTimeline.js +1 -1
  332. package/dist/shell/PageHeader.js +1 -1
  333. package/dist/shell/Popover.js +1 -1
  334. package/dist/shell/PopupMenu.js +1 -1
  335. package/dist/shell/ProductionTimeline.js +1 -1
  336. package/dist/shell/ResizeHandle.js +1 -1
  337. package/dist/shell/Result.js +1 -1
  338. package/dist/shell/SearchableSelect.js +1 -1
  339. package/dist/shell/SettingReset.js +1 -1
  340. package/dist/shell/SettingRow.js +1 -1
  341. package/dist/shell/SidebarLayout.js +1 -1
  342. package/dist/shell/SidebarNav.d.ts +19 -5
  343. package/dist/shell/SidebarNav.js +1 -1
  344. package/dist/shell/SortableList.js +1 -1
  345. package/dist/shell/Spinner.js +1 -1
  346. package/dist/shell/Statistic.js +1 -1
  347. package/dist/shell/StatusBadge.js +1 -1
  348. package/dist/shell/StepChain.js +1 -1
  349. package/dist/shell/Tabs.js +1 -1
  350. package/dist/shell/TimeAgo.js +1 -1
  351. package/dist/shell/TimelineTrack.js +1 -1
  352. package/dist/shell/Tooltip.js +1 -1
  353. package/dist/shell/TopNav.js +1 -1
  354. package/dist/shell/TransferProgress.js +1 -1
  355. package/dist/shell/Tree.d.ts +15 -6
  356. package/dist/shell/Tree.js +1 -1
  357. package/dist/shell/language.js +1 -1
  358. package/dist/shell/strings.d.ts +24 -2
  359. package/dist/shell/strings.js +1 -1
  360. package/dist/shell/toast.js +1 -1
  361. package/dist/telemetry/index.js +1 -1
  362. package/dist/templates/AuthScreen.js +1 -1
  363. package/dist/templates/ChatTemplate.js +1 -1
  364. package/dist/templates/CheckoutTemplate.js +1 -1
  365. package/dist/templates/DashboardTemplate.js +1 -1
  366. package/dist/templates/DataTablePage.js +1 -1
  367. package/dist/templates/EmailTemplate.js +1 -1
  368. package/dist/templates/ErrorBoundary.d.ts +1 -1
  369. package/dist/templates/ErrorBoundary.js +1 -1
  370. package/dist/templates/ErrorPage.js +1 -1
  371. package/dist/templates/FormLayoutPage.js +1 -1
  372. package/dist/templates/GalleryTemplate.js +1 -1
  373. package/dist/themes.css +101 -0
  374. package/dist/tokens/colour.d.ts +42 -0
  375. package/dist/tokens/colour.js +1 -0
  376. package/dist/tokens/elevation.d.ts +3 -1
  377. package/dist/tokens/elevation.js +1 -1
  378. package/dist/ui/index.d.ts +3 -1
  379. package/dist/ui/index.js +1 -1
  380. package/dist/ui.css +266 -24
  381. package/dist/version.js +1 -1
  382. package/package.json +1 -1
  383. package/dist/Browser-4C26ZOKV.js +0 -43
  384. package/dist/Calculator-MNTQSI6M.js +0 -29
  385. package/dist/CurrencyConverter-5XTNXV6T.js +0 -21
  386. package/dist/Files-BK7OAVOI.js +0 -87
  387. package/dist/Notepad-Z5XVWR2N.js +0 -25
  388. package/dist/PdfViewer-KJCJ6EPG.js +0 -1
  389. package/dist/Sidebar-LYTGLTQJ.js +0 -43
  390. package/dist/Spreadsheet-CCTSMXEG.js +0 -37
  391. package/dist/Stock-53UOMBQW.js +0 -16
  392. package/dist/Weather-S2ZIGNSU.js +0 -60
  393. package/dist/WorldClock-A62SDKTE.js +0 -32
  394. package/dist/chunk-26AYPJSK.js +0 -5
  395. package/dist/chunk-2CGZX62Z.js +0 -29
  396. package/dist/chunk-2NMT3Y5H.js +0 -20
  397. package/dist/chunk-3ZHFKOFX.js +0 -14
  398. package/dist/chunk-454DAGYG.js +0 -19
  399. package/dist/chunk-4CANQ3B3.js +0 -1
  400. package/dist/chunk-4CFOKYVR.js +0 -12
  401. package/dist/chunk-4IU5BSVE.js +0 -2
  402. package/dist/chunk-4IVT244O.js +0 -8
  403. package/dist/chunk-4SZDP3JF.js +0 -12
  404. package/dist/chunk-5BZMSSOV.js +0 -14
  405. package/dist/chunk-5E3WCKWB.js +0 -3
  406. package/dist/chunk-63EK6S3W.js +0 -3
  407. package/dist/chunk-64WSMLXG.js +0 -2
  408. package/dist/chunk-6BCFVOG7.js +0 -22
  409. package/dist/chunk-6BLWURSG.js +0 -4
  410. package/dist/chunk-6NMDKOQA.js +0 -7
  411. package/dist/chunk-6NSCK3YX.js +0 -100
  412. package/dist/chunk-7DKPJUGU.js +0 -2
  413. package/dist/chunk-7OCNF4AI.js +0 -5
  414. package/dist/chunk-BI6ZLD4X.js +0 -11
  415. package/dist/chunk-BOBUSE33.js +0 -2
  416. package/dist/chunk-CRLSG5AY.js +0 -9
  417. package/dist/chunk-CWXKRYVY.js +0 -5
  418. package/dist/chunk-DITCVBR7.js +0 -15
  419. package/dist/chunk-DODH46ZQ.js +0 -8
  420. package/dist/chunk-DZ6B5XCG.js +0 -13
  421. package/dist/chunk-E5ALJIXV.js +0 -9
  422. package/dist/chunk-E6UCGCOC.js +0 -1
  423. package/dist/chunk-EGDJEY4K.js +0 -27
  424. package/dist/chunk-EL2RLUT6.js +0 -20
  425. package/dist/chunk-ET32NQHX.js +0 -2
  426. package/dist/chunk-ETF7LAYZ.js +0 -8
  427. package/dist/chunk-EZ3BQ6PK.js +0 -18
  428. package/dist/chunk-GATKJSGL.js +0 -8
  429. package/dist/chunk-GNPTNAZH.js +0 -4
  430. package/dist/chunk-H33Z4ZIY.js +0 -11
  431. package/dist/chunk-HTYRV4WU.js +0 -3
  432. package/dist/chunk-I4VD5D43.js +0 -8
  433. package/dist/chunk-IFDW5QW6.js +0 -2
  434. package/dist/chunk-IUMFKZY7.js +0 -4
  435. package/dist/chunk-JPP7UWQA.js +0 -4
  436. package/dist/chunk-JVIOAZHW.js +0 -14
  437. package/dist/chunk-K7KQDPLW.js +0 -27
  438. package/dist/chunk-K7U4RWXJ.js +0 -1
  439. package/dist/chunk-L73LI7FG.js +0 -8
  440. package/dist/chunk-MEYYQC43.js +0 -8
  441. package/dist/chunk-MVP6Q6KV.js +0 -1
  442. package/dist/chunk-NDO24PK6.js +0 -21
  443. package/dist/chunk-NMKADD77.js +0 -1
  444. package/dist/chunk-P5BOTIJU.js +0 -6
  445. package/dist/chunk-PCQPV6MS.js +0 -6
  446. package/dist/chunk-PF3ANJFI.js +0 -1
  447. package/dist/chunk-Q23EHOXW.js +0 -17
  448. package/dist/chunk-Q5MD3VY6.js +0 -3
  449. package/dist/chunk-QR4RM7PO.js +0 -1
  450. package/dist/chunk-REVC6YPT.js +0 -7
  451. package/dist/chunk-RGOUJFAO.js +0 -9
  452. package/dist/chunk-S2OIRC5H.js +0 -12
  453. package/dist/chunk-SB7OTZI4.js +0 -69
  454. package/dist/chunk-SRKSGUGT.js +0 -23
  455. package/dist/chunk-SURSVJA2.js +0 -6
  456. package/dist/chunk-TIQKDAON.js +0 -11
  457. package/dist/chunk-VFCWCGO3.js +0 -9
  458. package/dist/chunk-VRODVMV3.js +0 -1
  459. package/dist/chunk-VU6VPKM3.js +0 -11
  460. package/dist/chunk-W6TS6WGA.js +0 -28
  461. package/dist/chunk-WSPO4N72.js +0 -19
  462. package/dist/chunk-X6PPP6NX.js +0 -14
  463. package/dist/chunk-XLD53X4P.js +0 -9
  464. package/dist/chunk-XSPDPN5O.js +0 -26
  465. package/dist/chunk-ZK2SULCA.js +0 -16
  466. package/dist/chunk-ZNCU3UIW.js +0 -8
  467. package/dist/chunk-ZNXBKFV7.js +0 -6
  468. package/dist/icons/glyphs/QuietIcon.d.ts +0 -8
  469. package/dist/icons/glyphs/QuietIcon.js +0 -1
  470. /package/dist/{chunk-EHPZIBOL.js → chunk-DSIDJYH7.js} +0 -0
  471. /package/dist/{chunk-KJRYEKQP.js → chunk-KC54JQYK.js} +0 -0
@@ -0,0 +1,43 @@
1
+ import{useAuth as e,parseOpenSections as t,readStored as a,RAIL_OPEN_SECTIONS_KEY as r,RAIL_WIDTH_KEY as n,toggleOpenSection as i,writeStored as l}from"./chunk-Y65MPP3M.js";import{ResizeHandle as o}from"./chunk-DWBZ3Z34.js";import{openGlobalSearch as s}from"./chunk-ZOHQVSB3.js";import{partitionNav as c,flyoutGroups as d,visibleSectionItems as m,rowsContainRoute as h,visibleNavChildren as u}from"./chunk-WGRS6QBT.js";import{BrandMark as p}from"./chunk-MI67DI3H.js";import{IconButton_default as b}from"./chunk-RUTUVS4H.js";import{RAIL_MENU_GAP as g,navSections as f,startMenuCategories as x,TAB_STRIP_H as k,RAIL_COLLAPSED_INSET as y,RAIL_W as N,RAIL_MAX_W as v,RAIL_MIN_W as j,navIcons as C,sectionIcons as w}from"./chunk-CY5N5OA3.js";import"./chunk-5A7MWTXX.js";import"./chunk-PKXQDCNR.js";import{PopupMenu as S,PopupMenuItem as L,PopupMenuDivider as W,PopupMenuLabel as z}from"./chunk-FPGRKHUW.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UQYNPYF4.js";import"./chunk-HL6JSDN3.js";import{Icon as H}from"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-BCDG4N6L.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import{useShellStrings as $}from"./chunk-QWHQJNKL.js";import"./chunk-C3QOHMR6.js";import{useMemo as R,useState as A,useRef as I,useEffect as M,isValidElement as T,cloneElement as D}from"react";import{jsx as K,jsxs as P,Fragment as Q}from"react/jsx-runtime";var B="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function J(e,t,a){const r=Math.max(8,a-t.bottom);return{left:e+g,bottom:r,maxHeight:a-r-8,overflowY:"auto"}}var U=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),F="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function G({open:e}){/* @__PURE__ */
2
+ return K(H,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function O({dir:e}){/* @__PURE__ */
3
+ return K(H,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function V({className:e}){/* @__PURE__ */
4
+ return K(H,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var Z=e=>.75+1.75*e+"rem";function _({width:_,collapsed:Y,onToggleCollapsed:X,onResize:E,onHome:q,onOpen:ee,activeRoute:te,profile:ae,user:re,onLogout:ne,onSwitchToDesktop:ie,onReportBug:le,onClose:oe,navSections:se=f,navIcons:ce=C,sectionIcons:de=w,categories:me=x,productName:he,productIcon:ue,tagline:pe,adaptiveLogo:be=!1,logoHasAlpha:ge=null,logoIsLight:fe=null}){const xe=$().layout,{hasAnyPerm:ke}=e(),ye=R(()=>c(se,me,ke),[se,me,ke]),[Ne,ve]=A(()=>t(a(r))),je=e=>ve(t=>{const a=i(t,e);return l(r,JSON.stringify([...a])),a}),[Ce,we]=A(null),[Se,Le]=A(!1),We=I(null);M(()=>{Y||we(null)},[Y]);const ze=(e,t)=>{we(null),e.onSelect?e.onSelect():ee(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},He=(e,t)=>{const a=t[e];/* @__PURE__ */
5
+ return K("span",{className:F,"aria-hidden":"true",children:a&&T(a)?D(a,{className:"size-[18px]"}):a})},$e=(e,t)=>{const a=u(e,ke),r=e.menuLabel??e.label;if(a.length>0){const n=`child:${e.to}`,i=Ne.has(n),l=!i&&h(a,te,ke);/* @__PURE__ */
6
+ return P("div",{children:[
7
+ /* @__PURE__ */P("button",{type:"button",onClick:()=>je(n),"aria-expanded":i,className:U(l,!1),style:t>0?{paddingLeft:Z(t)}:void 0,children:[0===t&&He(e.to,ce),
8
+ /* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate",children:r}),
9
+ /* @__PURE__ */K(G,{open:i})]}),i&&/* @__PURE__ */K("div",{className:"space-y-0.5 pt-0.5",children:a.map(e=>$e(e,t+1))}),e.dividerAfter&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:Z(t)},"aria-hidden":"true"})]},e.to)}const n=e.to===te;/* @__PURE__ */
10
+ return P("div",{children:[
11
+ /* @__PURE__ */P("button",{type:"button",onClick:t=>ze(e,t),onAuxClick:t=>{1===t.button&&ze(e,t)},"aria-current":n?"page":void 0,className:U(n,!1),style:t>0?{paddingLeft:Z(t)}:void 0,children:[0===t&&He(e.to,ce),
12
+ /* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate",children:r})]}),e.dividerAfter&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:Z(t)},"aria-hidden":"true"})]},e.to)},Re=(e,t)=>{const a=t?e.items:m(e,ke);if(0===a.length)return null;const r="icon"in e&&e.icon?/* @__PURE__ */K("span",{className:F,"aria-hidden":"true",children:e.icon}):He(e.label,de),n=e.menuLabel??e.label,i=h(a,te,ke),l="dividerAfter"in e&&e.dividerAfter;if(Y)/* @__PURE__ */
13
+ return P("div",{children:[
14
+ /* @__PURE__ */K("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":Ce?.label===e.label,onClick:t=>{const r=t.currentTarget.getBoundingClientRect();we(t=>t?.label===e.label?null:{label:e.label,items:a,top:r.top})},className:U(i||Ce?.label===e.label,!0),children:r}),l&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label);const o=Ne.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
15
+ return P("div",{children:[
16
+ /* @__PURE__ */P("button",{type:"button",onClick:()=>je(e.label),"aria-expanded":o,"aria-controls":s,className:U(!o&&i,!1),children:[r,
17
+ /* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate",children:n}),
18
+ /* @__PURE__ */K(G,{open:o})]}),
19
+ /* @__PURE__ */K("div",{id:s,role:"group","aria-label":n,hidden:!o,className:"space-y-0.5 pt-0.5",children:o&&a.map(e=>$e(e,1))}),l&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label)},Ae=ae?.first_name?`${ae.first_name} ${ae.last_name||""}`.trim():re?.email||"",Ie=(ae?.first_name?.charAt(0)||re?.email?.charAt(0)||"?").toUpperCase(),Me=ae?.avatar_url?/* @__PURE__ */K("img",{src:ae.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */K("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Ie}),Te=Se?We.current?.getBoundingClientRect():void 0,De=Y?"":"px-3",Ke=Y?{paddingInline:y}:void 0,Pe=`${Y?xe.expandSidebar:xe.collapseSidebar} (${B?"⌘":"Ctrl"} .)`,Qe=q?{run:q,label:xe.goHome,title:xe.goHome}:oe?null:{run:X,label:Y?xe.expandSidebar:xe.collapseSidebar,title:Pe},Be=/* @__PURE__ */P(Q,{children:[ue&&/* @__PURE__ */K(p,{src:ue,alt:"",slot:"compact",surface:"light",adaptive:be,hasAlpha:ge,isLight:fe,size:28,decorative:!0}),!Y&&/* @__PURE__ */P("span",{className:"min-w-0 text-left leading-tight",children:[
20
+ /* @__PURE__ */K("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:he??"Apps"}),pe&&/* @__PURE__ */K("span",{className:"block truncate text-2xs font-medium text-gray-500",children:pe})]})]}),Je=ye.erpSections.length>0||ye.systemSections.length>0||ye.virtualSections.length>0;/* @__PURE__ */
21
+ return P("aside",{"aria-label":xe.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-line bg-surface text-ink-strong",style:{width:_},children:[
22
+ /* @__PURE__ */P("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(Y?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:k},children:[Qe?/* @__PURE__ */K("button",{type:"button",onClick:Qe.run,"aria-label":Qe.label,title:Qe.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(Y?"justify-center p-0.5":"-ml-1 p-1"),children:Be}):/* @__PURE__ */K("span",{className:"flex min-w-0 items-center gap-2",children:Be}),oe?/* @__PURE__ */K(b,{onClick:oe,"aria-label":xe.closeMenu,children:/* @__PURE__ */K(H,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!Y&&/* @__PURE__ */K("button",{type:"button",onClick:X,"aria-label":xe.collapseSidebar,title:`${xe.collapseSidebar} (${B?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */K(O,{dir:"left"})})]}),
23
+ /* @__PURE__ */K("div",{className:`shrink-0 pt-3 ${De}`,style:Ke,children:Y?/* @__PURE__ */K("button",{type:"button",onClick:s,"aria-label":xe.search,title:`${xe.search} (${B?"⌘K":"Ctrl K"})`,className:U(!1,!0),children:/* @__PURE__ */K(V,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */P("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-line bg-surface px-3 text-left transition-colors hover:bg-gray-100",children:[
24
+ /* @__PURE__ */K(V,{className:"size-3.5 text-gray-500"}),
25
+ /* @__PURE__ */K("span",{className:"min-w-0 flex-1 truncate text-sm text-ink-faint",children:xe.search}),
26
+ /* @__PURE__ */K("kbd",{className:"rounded border border-line bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-ink-faint",children:B?"⌘K":"Ctrl K"})]})}),
27
+ /* @__PURE__ */P("nav",{"aria-label":xe.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${De} ${Y?"space-y-1":"space-y-0.5"}`,style:Ke,children:[Y&&/* @__PURE__ */K("button",{type:"button",onClick:X,"aria-label":xe.expandSidebar,title:`${xe.expandSidebar} (${B?"⌘":"Ctrl"} .)`,className:`${U(!1,!0)} mb-3`,children:/* @__PURE__ */K(O,{dir:"right"})}),ye.topItems.map(e=>{if(!Y)return $e(e,0);const t=u(e,ke),a=e.to===te||h(t,te,ke),r=e.menuLabel??e.label;/* @__PURE__ */
28
+ return P("div",{children:[
29
+ /* @__PURE__ */K("button",{type:"button",title:r,"aria-label":r,onClick:a=>{if(0===t.length)return void ze(e,a);const r=a.currentTarget.getBoundingClientRect();we(a=>a?.label===e.to?null:{label:e.to,items:t,top:r.top})},className:U(a,!0),children:He(e.to,ce)}),e.dividerAfter&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.to)}),ye.topItems.length>0&&Je&&!ye.topItems[ye.topItems.length-1].dividerAfter&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ye.erpSections.map(e=>Re(e,!1)),ye.systemSections.map(e=>Re(e,!1)),ye.virtualSections.map(e=>Re(e,!0)),ye.footerSections.length>0&&/* @__PURE__ */K("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ye.footerSections.map(e=>Re(e,!1))]}),
30
+ /* @__PURE__ */K("div",{className:`shrink-0 border-t border-gray-200 py-2 ${De}`,style:Ke,children:/* @__PURE__ */P("button",{ref:We,type:"button",onClick:()=>Le(e=>!e),"aria-haspopup":"menu","aria-expanded":Se,"aria-label":Y?xe.accountMenu(Ae):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(Y?"justify-center py-2":"px-2 py-2"),children:[Me,!Y&&/* @__PURE__ */P("span",{className:"min-w-0 flex-1 text-left",children:[
31
+ /* @__PURE__ */K("span",{className:"block truncate text-sm font-semibold text-ink-strong",children:Ae}),re?.email&&Ae!==re.email&&/* @__PURE__ */K("span",{className:"block truncate text-2xs text-ink-faint",children:re.email})]})]})}),E&&!Y&&!oe&&/* @__PURE__ */K(o,{side:"left",width:_,onResize:E,min:j,max:v,defaultWidth:N,storageKey:n,label:xe.resizeSidebar}),Se&&Te&&/* @__PURE__ */P(S,{portal:!0,minWidth:224,onClose:()=>Le(!1),style:J(_,Te,window.innerHeight),children:[Y&&/* @__PURE__ */P("div",{className:"border-b border-line px-3 py-3",children:[
32
+ /* @__PURE__ */K("p",{className:"truncate text-sm font-semibold text-gray-800",children:Ae}),re?.email&&/* @__PURE__ */K("p",{className:"truncate text-xs text-gray-500",children:re.email})]}),
33
+ /* @__PURE__ */P(L,{onClick:()=>{Le(!1),ee("/profile",!1)},children:[
34
+ /* @__PURE__ */K(H,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),xe.profile]}),ye.footerItems.map(e=>/* @__PURE__ */P(L,{onClick:()=>{Le(!1),ze(e)},children:[
35
+ /* @__PURE__ */K("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:ce[e.to]}),e.menuLabel??e.label]},e.to)),le&&/* @__PURE__ */P(L,{onClick:()=>{Le(!1),le()},children:[
36
+ /* @__PURE__ */K(H,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),xe.reportIssue]}),
37
+ /* @__PURE__ */K(W,{}),ie&&/* @__PURE__ */P(Q,{children:[
38
+ /* @__PURE__ */P(L,{onClick:()=>{Le(!1),ie()},children:[
39
+ /* @__PURE__ */K(H,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),xe.switchToDesktop]}),
40
+ /* @__PURE__ */K(W,{})]}),
41
+ /* @__PURE__ */P(L,{danger:!0,onClick:()=>{Le(!1),ne()},children:[
42
+ /* @__PURE__ */K(H,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),xe.signOut]})]}),Ce&&Y&&/* @__PURE__ */K(S,{portal:!0,minWidth:220,onClose:()=>we(null),style:{left:_+g,top:Math.min(Ce.top,window.innerHeight-48*Math.min(Ce.items.length,10)-16)},children:d(Ce.items,ke).map((e,t)=>/* @__PURE__ */P("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */K(W,{}),e.heading&&/* @__PURE__ */K(z,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */P(L,{onClick:()=>ze(e),children:[He(e.to,ce),
43
+ /* @__PURE__ */K("span",{className:e.to===te?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{J as accountMenuPosition,_ as default};
@@ -0,0 +1,37 @@
1
+ import{EditableGrid as e}from"./chunk-PYLNMN6E.js";import"./chunk-G6DKCCWH.js";import{AboutApp as t}from"./chunk-LAEXWXJA.js";import{peekSpreadsheetPreviewStage as r,claimSpreadsheetPreviewStage as n,SPREADSHEET_PREVIEW_UPDATE_EVENT as o}from"./chunk-VTVSMRFX.js";import{WindowTitle as a}from"./chunk-DZTAGMNY.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-AGUA3O5O.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-VG2R6PZV.js";import"./chunk-IK2WXW2E.js";import"./chunk-6453ISTQ.js";import"./chunk-KC3EX26K.js";import"./chunk-PDXPMHG3.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-X7PM7JOD.js";import"./chunk-CDAJKLGL.js";import"./chunk-L4TN4EWK.js";import"./chunk-FPGRKHUW.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-LNARMEEZ.js";import"./chunk-NHH2MXFU.js";import"./chunk-UQYNPYF4.js";import"./chunk-HL6JSDN3.js";import"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-OZAAIE4E.js";import"./chunk-BCDG4N6L.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-QWHQJNKL.js";import"./chunk-C3QOHMR6.js";import{useRef as l,useState as s,useEffect as c,useCallback as i}from"react";import{jsxs as u,jsx as d,Fragment as h}from"react/jsx-runtime";var m="ABCDEFGHIJKLMNOPQRSTUVWXYZ",p=10,x=30;function g(e){return e<26?m[e]:m[Math.floor(e/26)-1]+m[e%26]}function y(e){return Array.from({length:e},(e,t)=>({key:`col_${t}`,title:g(t),width:100}))}function b(e,t){return Array.from({length:e},()=>Array(t).fill(""))}function f(e){return{id:crypto.randomUUID(),name:e,columns:y(p),data:b(x,p),cellStyles:{}}}function v(e){return e.split("\n").map(e=>{if(e.includes("\t"))return e.split("\t").map(e=>e.trim());const t=[];let r="",n=!1;for(const o of e)'"'!==o?","!==o||n?r+=o:(t.push(r.trim()),r=""):n=!n;return t.push(r.trim()),t}).filter(e=>e.some(e=>e.trim()))}function k(e,t){const r=e.rows?e.rows.map(e=>e.map(e=>String(e??""))):v(e.csv??"");if(0===r.length)return null;const n=Math.max(p,r.reduce((e,t)=>Math.max(e,t.length),0)),o=r.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));return{id:crypto.randomUUID(),name:t,columns:y(n),data:o,cellStyles:{}}}function w(){const m=l(null),g=l(void 0);void 0===g.current&&(g.current=r());const w=l(g.current?.data??null),j=(()=>{const e=g.current;if(!e)return null;const t=k(e.data,"Sheet 1");if(!t)return null;return{sheet:t,title:e.data.filename.replace(/\.(csv|tsv|txt)$/i,"")}})(),[N,C]=s(j?[j.sheet]:[f("Sheet 1")]),[S,M]=s(0),U=l([]),A=l(N),D=l(!1);c(()=>{D.current?D.current=!1:A.current!==N&&(U.current.push(A.current),U.current.length>50&&U.current.shift()),A.current=N},[N]);const E=i(()=>{const e=U.current.pop();e&&(D.current=!0,C(e))},[]);c(()=>{const e=e=>{if(!m.current?.contains(document.activeElement)&&!m.current?.matches(":focus-within"))return;(e.ctrlKey||e.metaKey)&&!e.shiftKey&&("z"===e.key||"Z"===e.key)&&(e.preventDefault(),E())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[E]);const[L,R]=s(j?.title??"Untitled"),[$,K]=s(()=>g.current?.data.onEmail),W=i(e=>{const t=k(e,"Sheet 1");t&&(C([t]),M(0),R(e.filename.replace(/\.(csv|tsv|txt)$/i,"")),K(()=>e.onEmail))},[]);c(()=>{const e=g.current;null!=e&&(n(e),e.data!==w.current&&W(e.data))},[]),c(()=>{const e=g.current?.token;if(null==e)return;const t=t=>{const r=t.detail;r&&r.token===e&&W(r.data)};return window.addEventListener(o,t),()=>window.removeEventListener(o,t)},[]);const[H,F]=s(!1),[G,J]=s(null),[T,X]=s(""),I=l(null),[P,V]=s("1"),[Z,B]=s("10"),O=N[S]||N[0],Q=O.data,Y=O.columns,z=O.cellStyles??{},[_,q]=s(null),[ee,te]=s(null),re=i(()=>{if(ee){const e=Math.min(ee.anchor.row,ee.end.row),t=Math.max(ee.anchor.row,ee.end.row),r=Math.min(ee.anchor.col,ee.end.col),n=Math.max(ee.anchor.col,ee.end.col),o=[];for(let a=e;a<=t;a++)for(let e=r;e<=n;e++)o.push({row:a,col:e});return o}return _?[_]:[]},[ee,_]),ne=i((e,t)=>{const r=re();0!==r.length&&C(n=>n.map((n,o)=>{if(o!==S)return n;const a={...n.cellStyles??{}},l=`${r[0].row}:${r[0].col}`,s=void 0!==t?t:!(a[l]??{})[e];for(const{row:t,col:n}of r){const r=`${t}:${n}`;a[r]={...a[r]??{},[e]:s}}return{...n,cellStyles:a}}))},[re,S]),oe=ee?{row:ee.anchor.row,col:ee.anchor.col}:_,ae=oe?z[`${oe.row}:${oe.col}`]??{}:{},le=!!oe,se=i(e=>{C(t=>t.map((t,r)=>r===S?{...t,...e}:t))},[S]),ce=i(e=>{const t=e.reduce((e,t)=>Math.max(e,t.length),0);t!==Y.length?se({data:e,columns:y(t)}):se({data:e})},[se,Y.length]),ie=(e,t)=>{C(r=>r.map((r,n)=>n===e?{...r,name:t}:r)),J(null)},ue=()=>Q.filter(e=>e.some(e=>e.trim())).map(e=>e.map(e=>e.includes(",")||e.includes('"')||e.includes("\n")?`"${e.replace(/"/g,'""')}"`:e).join(",")).join("\n"),de=[];Q.forEach(e=>e.forEach(e=>{const t=parseFloat(e);!isNaN(t)&&e.trim()&&de.push(t)}));const he=Q.reduce((e,t)=>e+t.filter(e=>e.trim()).length,0);/* @__PURE__ */
2
+ return u("div",{ref:m,className:"flex flex-col h-full",children:[
3
+ /* @__PURE__ */d(a,{title:`${me=L||"Untitled",me.length>24?`${me.slice(0,23)}…`:me} - Spreadsheets`}),
4
+ /* @__PURE__ */d(t,{app:"spreadsheet"}),
5
+ /* @__PURE__ */u("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200 bg-gray-50 shrink-0",children:[H?/* @__PURE__ */d("input",{type:"text",value:L,onChange:e=>R(e.target.value),onBlur:()=>F(!1),onKeyDown:e=>{"Enter"===e.key&&F(!1)},autoFocus:!0,className:"text-sm font-medium text-gray-900 border border-gray-300 rounded px-2 py-0.5 w-40 focus:border-blue-500 focus:ring-blue-500"}):/* @__PURE__ */d("button",{onClick:()=>F(!0),className:"text-sm font-medium text-gray-900 hover:text-blue-600 truncate max-w-[200px]",title:"Click to rename",children:L||"Untitled"}),
6
+ /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
7
+ /* @__PURE__ */d("input",{ref:I,type:"file",accept:".csv,.tsv,.txt,.xlsx,.xls,.ods",onChange:async e=>{const t=e.target.files?.[0];if(!t)return;const r=t.name.replace(/\.(csv|tsv|txt|xlsx|xls|ods)$/i,"");if(/\.(xlsx|xls|ods)$/i.test(t.name)){const e=new Uint8Array(await t.arrayBuffer()),n=await(import("xlsx")),o=n.read(e,{type:"array"}),a=o.SheetNames.map(e=>{const t=n.utils.sheet_to_json(o.Sheets[e],{header:1,defval:""}),r=Math.max(p,t.reduce((e,t)=>Math.max(e,t.length),0)),a=t.map(e=>{const t=e.map(e=>String(e??""));for(;t.length<r;)t.push("");return t});for(;a.length<x;)a.push(Array(r).fill(""));return{id:crypto.randomUUID(),name:e,columns:y(r),data:a}});C(a),M(0),R(r)}else{const e=v(await t.text());if(0===e.length)return;const n=Math.max(p,e.reduce((e,t)=>Math.max(e,t.length),0)),o=e.map(e=>{for(;e.length<n;)e.push("");return e});for(;o.length<x;)o.push(Array(n).fill(""));se({columns:y(n),data:o}),R(r)}I.current&&(I.current.value="")},className:"hidden"}),
8
+ /* @__PURE__ */d("button",{onClick:()=>I.current?.click(),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Open"}),
9
+ /* @__PURE__ */d("button",{onClick:()=>{const e=new Blob([ue()],{type:"text/csv"}),t=URL.createObjectURL(e),r=document.createElement("a");r.href=t,r.download=`${L||"spreadsheet"}.csv`,r.click(),URL.revokeObjectURL(t)},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Save CSV"}),$&&/* @__PURE__ */d("button",{onClick:()=>$(ue(),`${L||"spreadsheet"}.csv`),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Email"}),
10
+ /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
11
+ /* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
12
+ /* @__PURE__ */d("input",{type:"number",min:"1",max:"50",value:P,onChange:e=>V(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
13
+ /* @__PURE__ */d("button",{onClick:()=>(e=>{const t=Y.length+e;se({columns:y(t),data:Q.map(t=>[...t,...Array(e).fill("")])})})(parseInt(P)||1),className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Col"})]}),
14
+ /* @__PURE__ */u("div",{className:"flex items-center gap-1",children:[
15
+ /* @__PURE__ */d("input",{type:"number",min:"1",max:"500",value:Z,onChange:e=>B(e.target.value),className:"w-10 text-xs text-center border border-gray-300 rounded px-1 py-0.5 focus:border-blue-500 focus:ring-blue-500"}),
16
+ /* @__PURE__ */d("button",{onClick:()=>{return e=parseInt(Z)||10,void se({data:[...Q,...Array.from({length:e},()=>Array(Y.length).fill(""))]});var e},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"+ Row"})]}),
17
+ /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
18
+ /* @__PURE__ */d("button",{onClick:()=>{se({columns:y(p),data:b(x,p)})},className:"text-xs text-gray-600 hover:text-gray-900 px-2 py-1 rounded hover:bg-gray-200 transition-colors",children:"Clear"}),
19
+ /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
20
+ /* @__PURE__ */u("div",{className:"flex items-center gap-0.5",title:le?"":"Click a cell first",children:[
21
+ /* @__PURE__ */d("button",{onClick:()=>ne("bold"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors font-bold ${ae.bold?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"B"}),
22
+ /* @__PURE__ */d("button",{onClick:()=>ne("italic"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors italic ${ae.italic?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"I"}),
23
+ /* @__PURE__ */d("button",{onClick:()=>ne("underline"),disabled:!le,className:`px-2 py-1 text-xs rounded transition-colors underline ${ae.underline?"bg-blue-100 text-blue-700":"text-gray-600 hover:bg-gray-200"} disabled:opacity-40 disabled:cursor-not-allowed`,children:"U"}),
24
+ /* @__PURE__ */u("select",{value:ae.fontSize??"base",onChange:e=>ne("fontSize",e.target.value),disabled:!le,className:"ml-1 text-xs border border-gray-300 rounded px-1 py-0.5 bg-white disabled:opacity-40 disabled:cursor-not-allowed",children:[
25
+ /* @__PURE__ */d("option",{value:"sm",children:"XS"}),
26
+ /* @__PURE__ */d("option",{value:"base",children:"S"}),
27
+ /* @__PURE__ */d("option",{value:"lg",children:"M"}),
28
+ /* @__PURE__ */d("option",{value:"xl",children:"L"})]})]})]}),
29
+ /* @__PURE__ */d("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */d(e,{columns:Y,data:Q,onChange:ce,onColumnsChange:e=>se({columns:e}),cellStyles:z,onFocusChange:q,onSelectionChange:te,minRows:x,maxHeight:"100%"})}),
30
+ /* @__PURE__ */u("div",{className:"flex items-center border-t border-gray-200 bg-gray-50 shrink-0",children:[
31
+ /* @__PURE__ */u("div",{className:"flex items-center gap-0.5 px-1 py-1 overflow-x-auto flex-1 min-w-0",children:[N.map((e,t)=>/* @__PURE__ */d("button",{onClick:()=>M(t),onDoubleClick:()=>{J(t),X(e.name)},onContextMenu:e=>{e.preventDefault(),N.length>1&&(e=>{N.length<=1||(C(t=>t.filter((t,r)=>r!==e)),S>=e&&S>0&&M(S-1))})(t)},className:"px-3 py-1 text-xs font-medium rounded-b whitespace-nowrap transition-colors "+(t===S?"bg-white text-blue-700 border border-t-0 border-gray-300 -mt-px relative z-10":"text-gray-500 hover:text-gray-700 hover:bg-gray-100"),children:G===t?/* @__PURE__ */d("input",{type:"text",value:T,onChange:e=>X(e.target.value),onBlur:()=>ie(t,T||e.name),onKeyDown:r=>{"Enter"===r.key&&ie(t,T||e.name),"Escape"===r.key&&J(null)},onClick:e=>e.stopPropagation(),autoFocus:!0,className:"w-20 text-xs border border-blue-400 rounded px-1 py-0 focus:ring-0 focus:outline-none"}):e.name},e.id)),
32
+ /* @__PURE__ */d("button",{onClick:()=>{const e=`Sheet ${N.length+1}`;C(t=>[...t,f(e)]),M(N.length)},className:"px-2 py-1 text-xs text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded",title:"Add sheet",children:"+"})]}),
33
+ /* @__PURE__ */u("div",{className:"flex items-center gap-4 px-3 py-1 text-xs text-gray-500 shrink-0 border-l border-gray-200",children:[
34
+ /* @__PURE__ */u("span",{children:[he," cells"]}),de.length>0&&/* @__PURE__ */u(h,{children:[
35
+ /* @__PURE__ */u("span",{children:["Sum: ",de.reduce((e,t)=>e+t,0).toLocaleString(void 0,{maximumFractionDigits:2})]}),
36
+ /* @__PURE__ */u("span",{children:["Avg: ",(de.reduce((e,t)=>e+t,0)/de.length).toLocaleString(void 0,{maximumFractionDigits:2})]})]}),
37
+ /* @__PURE__ */u("span",{children:[Q.length," × ",Y.length]})]})]})]});var me}export{w as default};
@@ -0,0 +1,16 @@
1
+ import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-ZYDZY6ED.js";import{useWidgetSettings as n}from"./chunk-DZTAGMNY.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-AGUA3O5O.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-VG2R6PZV.js";import"./chunk-IK2WXW2E.js";import"./chunk-6453ISTQ.js";import"./chunk-KC3EX26K.js";import"./chunk-PDXPMHG3.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-X7PM7JOD.js";import"./chunk-CDAJKLGL.js";import"./chunk-FPGRKHUW.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-LNARMEEZ.js";import"./chunk-NHH2MXFU.js";import"./chunk-UQYNPYF4.js";import"./chunk-HL6JSDN3.js";import"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-OZAAIE4E.js";import"./chunk-BCDG4N6L.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-QWHQJNKL.js";import"./chunk-C3QOHMR6.js";import{useState as r,useCallback as c}from"react";import{jsxs as s,Fragment as a,jsx as i}from"react/jsx-runtime";var o=["AAPL","MSFT","GOOGL","TSLA","NVDA"],m="stock_symbols",l="stock_appearance",h={AAPL:{price:229.87,change:1.42,changePct:.62},MSFT:{price:451.16,change:-2.31,changePct:-.51},GOOGL:{price:178.34,change:.89,changePct:.5},AMZN:{price:201.45,change:-1.08,changePct:-.53},TSLA:{price:248.92,change:6.74,changePct:2.78},NVDA:{price:134.81,change:-3.12,changePct:-2.26},META:{price:563.27,change:4.55,changePct:.81}},p=Object.keys(h);function u(){try{const e=JSON.parse(localStorage.getItem(m)||"");if(Array.isArray(e)&&e.length)return e.slice(0,8)}catch{}return o}var d=e=>`${e>=0?"+":""}${e.toFixed(2)}`;function g(){const[o,g]=r(u),[x,k]=r(()=>e(l)),[j,N]=r(!1),[b,f]=r([]),[y,v]=r(x),[A,D]=r(""),P=c(()=>{f([...o]),v({...x}),D(""),N(!0)},[o,x]);n(P);const S=()=>{const e=A.trim().toUpperCase();!e||b.includes(e)||b.length>=8||(f(t=>[...t,e]),D(""))},M=p.filter(e=>!b.includes(e));/* @__PURE__ */
2
+ return s(a,{children:[
3
+ /* @__PURE__ */i("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${x.activeOpacity/100})`,backdropFilter:x.activeBlur>0?`blur(${x.activeBlur}px)`:void 0},children:/* @__PURE__ */i("div",{className:"px-4 py-3",children:0===o.length?/* @__PURE__ */i("div",{className:"text-xs text-gray-500 text-center py-6",children:"No symbols yet — add some in settings."}):/* @__PURE__ */i("div",{className:"space-y-0.5",children:o.map(e=>{const t=h[e],n=(t?.change??0)>=0,r=t?t.change>0?"text-green-600":t.change<0?"text-red-600":"text-gray-500":"text-gray-400";/* @__PURE__ */
4
+ return s("div",{className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0",children:[
5
+ /* @__PURE__ */i("span",{className:"text-sm font-bold text-gray-800 tracking-tight",children:e}),t?/* @__PURE__ */s("div",{className:"flex flex-col items-end leading-tight",children:[
6
+ /* @__PURE__ */i("span",{className:"text-sm font-mono font-semibold text-gray-900 tabular-nums",children:(c=t.price,`$${c.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`)}),
7
+ /* @__PURE__ */s("span",{className:`text-2xs font-medium tabular-nums ${r}`,children:[n?"▲":"▼"," ",d(t.change)," (",d(t.changePct),"%)"]})]}):/* @__PURE__ */i("span",{className:"text-sm font-mono text-gray-400 tabular-nums",children:"—"})]},e);var c})})})}),
8
+ /* @__PURE__ */i(t,{open:j,onClose:()=>N(!1),title:"Stock Settings",appearance:y,onAppearanceChange:v,onSave:()=>{const e=b.map(e=>e.toUpperCase()).slice(0,8);g(e),k(y),localStorage.setItem(m,JSON.stringify(e)),localStorage.setItem(l,JSON.stringify(y)),N(!1)},children:/* @__PURE__ */s("div",{children:[
9
+ /* @__PURE__ */s("h3",{className:"text-sm font-semibold text-ink mb-2",children:["Symbols ",
10
+ /* @__PURE__ */s("span",{className:"text-2xs font-normal text-ink-faintest",children:["(",b.length,"/",8,")"]})]}),
11
+ /* @__PURE__ */s("div",{className:"space-y-1 mb-2",children:[b.map((e,t)=>/* @__PURE__ */s("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
12
+ /* @__PURE__ */i("span",{className:"text-sm font-semibold text-gray-700",children:e}),
13
+ /* @__PURE__ */i("button",{onClick:()=>f(e=>e.filter((e,n)=>n!==t)),className:"text-red-400 hover:text-red-600",children:"×"})]},t)),0===b.length&&/* @__PURE__ */i("p",{className:"text-2xs text-ink-faintest italic",children:"No symbols — add a ticker below."})]}),b.length<8?/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[
14
+ /* @__PURE__ */i("input",{value:A,onChange:e=>D(e.target.value),onKeyDown:e=>{"Enter"===e.key&&S()},placeholder:"e.g. NVDA",className:"flex-1 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm uppercase focus:outline-none focus:ring-1 focus:ring-blue-500"}),
15
+ /* @__PURE__ */i("button",{onClick:S,className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */s("p",{className:"text-2xs text-ink-faintest italic",children:["Max ",8," symbols — remove one to add another."]}),M.length>0&&b.length<8&&/* @__PURE__ */i("div",{className:"flex flex-wrap gap-2 mt-2",children:M.map(e=>/* @__PURE__ */i("button",{onClick:()=>f(t=>t.length<8?[...t,e]:t),className:"text-2xs font-medium text-gray-600 bg-gray-100 hover:bg-gray-200 rounded px-2 py-0.5 transition-colors",children:e},e))}),
16
+ /* @__PURE__ */i("p",{className:"text-2xs text-ink-faintest mt-2",children:"Demo prices — static sample data, no live feed."})]})})]})}export{g as default};
@@ -0,0 +1,60 @@
1
+ import{fetchCityWeather as e,getCondition as t,AVAILABLE_CITIES as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-ZYDZY6ED.js";import{useWidgetSettings as s}from"./chunk-DZTAGMNY.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-AGUA3O5O.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-VG2R6PZV.js";import"./chunk-IK2WXW2E.js";import"./chunk-6453ISTQ.js";import{useShellPrefs as o}from"./chunk-KC3EX26K.js";import"./chunk-PDXPMHG3.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-X7PM7JOD.js";import"./chunk-CDAJKLGL.js";import"./chunk-FPGRKHUW.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-LNARMEEZ.js";import"./chunk-NHH2MXFU.js";import"./chunk-UQYNPYF4.js";import"./chunk-HL6JSDN3.js";import"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as l}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-OZAAIE4E.js";import"./chunk-BCDG4N6L.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-QWHQJNKL.js";import"./chunk-C3QOHMR6.js";import{useState as c,useEffect as d,useCallback as m}from"react";import{jsx as p,jsxs as h,Fragment as u}from"react/jsx-runtime";var f="weather_city",y="weather_appearance",g={useFahrenheit:!1,showLocalTime:!0,use24Hour:!1};function x(){const e="undefined"!=typeof localStorage?localStorage.getItem(f):null;if(e&&a[e])return e;try{const e=JSON.parse(localStorage.getItem("weather_cities")||"");if(Array.isArray(e)&&e[0]&&a[e[0]])return localStorage.setItem(f,e[0]),e[0]}catch{}return function(){try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;for(const[t,r]of Object.entries(a))if(r.tz===e)return t}catch{}return"London"}()}var b=r;function w(e,t=!1){try{if(t){const t=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!1}).formatToParts(/* @__PURE__ */new Date),a=parseInt(t.find(e=>"hour"===e.type)?.value||"0"),r=parseInt(t.find(e=>"minute"===e.type)?.value||"0");return`${String(a).padStart(2,"0")}:${String(r).padStart(2,"0")}`}const a=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(/* @__PURE__ */new Date),r=parseInt(a.find(e=>"hour"===e.type)?.value||"12"),n=parseInt(a.find(e=>"minute"===e.type)?.value||"0"),i=a.find(e=>"dayPeriod"===e.type)?.value||"";return`${r}:${String(n).padStart(2,"0")} ${i}`}catch{return""}}function v(){/* @__PURE__ */
2
+ return h("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
3
+ /* @__PURE__ */p("div",{className:"absolute -top-5 -right-5 w-24 h-24",style:{animation:"wx-sun-rays 70s linear infinite"},children:/* @__PURE__ */p("svg",{viewBox:"0 0 100 100",className:"w-full h-full",children:Array.from({length:12}).map((e,t)=>/* @__PURE__ */p("rect",{x:49,y:3,width:2,height:14,rx:1,fill:"rgba(255, 232, 130, 0.55)",transform:`rotate(${30*t} 50 50)`},t))})}),
4
+ /* @__PURE__ */p("div",{className:"absolute top-1 right-1 w-10 h-10 rounded-full",style:{background:"radial-gradient(circle at 35% 35%, #fff8cc 0%, #ffd84a 55%, #ff9e2a 100%)",boxShadow:"0 0 18px 5px rgba(255, 200, 80, 0.55)",animation:"wx-sun-pulse 4.5s ease-in-out infinite"}})]})}function k(){const e=Array.from({length:16}).map((e,t)=>({left:(53*t+11)%95+"%",top:(37*t+9)%78+"%",size:1+13*t%3,delay:.41*t%4+"s",duration:2.5+7*t%5*.6+"s"}));/* @__PURE__ */
5
+ return h("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
6
+ /* @__PURE__ */p("div",{className:"absolute top-1 right-1",children:/* @__PURE__ */h("svg",{viewBox:"0 0 40 40",className:"w-9 h-9",style:{filter:"drop-shadow(0 0 6px rgba(255,250,220,0.4))"},children:[
7
+ /* @__PURE__ */p("defs",{children:/* @__PURE__ */h("radialGradient",{id:"wx-moon-grad",cx:"35%",cy:"35%",children:[
8
+ /* @__PURE__ */p("stop",{offset:"0",stopColor:"#fffae0"}),
9
+ /* @__PURE__ */p("stop",{offset:"1",stopColor:"#d4c98a"})]})}),
10
+ /* @__PURE__ */p("circle",{cx:20,cy:20,r:13,fill:"url(#wx-moon-grad)"}),
11
+ /* @__PURE__ */p("circle",{cx:26,cy:16,r:11,fill:"rgba(15,23,42,1)"})]})}),e.map((e,t)=>/* @__PURE__ */p("div",{className:"absolute rounded-full bg-white",style:{left:e.left,top:e.top,width:e.size,height:e.size,animation:`wx-twinkle ${e.duration} ease-in-out ${e.delay} infinite`}},t)),
12
+ /* @__PURE__ */p("div",{className:"absolute",style:{left:"15%",top:"20%",animation:"wx-shooting-star 12s ease-out infinite"},children:/* @__PURE__ */p("div",{className:"w-12 h-px",style:{background:"linear-gradient(to right, transparent, rgba(255,255,255,0.95))",boxShadow:"0 0 4px rgba(255,255,255,0.8)"}})})]})}function N({tone:e="light"}){const t="light"===e?"rgba(255,255,255,0.78)":"rgba(220,228,240,0.45)",a=({scale:e=1})=>/* @__PURE__ */h("svg",{viewBox:"0 0 120 50",className:"w-32 h-12",style:{transform:`scale(${e})`,filter:"blur(0.6px)"},children:[
13
+ /* @__PURE__ */p("ellipse",{cx:28,cy:36,rx:18,ry:11,fill:t}),
14
+ /* @__PURE__ */p("ellipse",{cx:50,cy:28,rx:22,ry:15,fill:t}),
15
+ /* @__PURE__ */p("ellipse",{cx:75,cy:32,rx:20,ry:12,fill:t}),
16
+ /* @__PURE__ */p("ellipse",{cx:95,cy:38,rx:15,ry:9,fill:t})]});/* @__PURE__ */
17
+ return h("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
18
+ /* @__PURE__ */p("div",{className:"absolute",style:{top:"8%",animation:"wx-drift-cloud 42s linear infinite"},children:/* @__PURE__ */p(a,{scale:.9})}),
19
+ /* @__PURE__ */p("div",{className:"absolute",style:{top:"40%",animation:"wx-drift-cloud 60s linear -22s infinite",opacity:.85},children:/* @__PURE__ */p(a,{scale:1.25})}),
20
+ /* @__PURE__ */p("div",{className:"absolute",style:{top:"68%",animation:"wx-drift-cloud 78s linear -45s infinite",opacity:.7},children:/* @__PURE__ */p(a,{scale:.75})})]})}function j({heavy:e=!1}){const t=e?26:16,a=["wx-rain-a","wx-rain-b","wx-rain-c"],r=Array.from({length:t}).map((e,r)=>({left:(100*r/t+11*r%7)%100+"%",delay:.087*r%1.3+"s",height:12+r%4*5+"px",duration:.7+r%3*.18+"s",variant:a[r%a.length]}));/* @__PURE__ */
21
+ return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:r.map((e,t)=>/* @__PURE__ */p("div",{className:"absolute",style:{left:e.left,top:"-20px",width:"1px",height:e.height,background:"linear-gradient(180deg, rgba(180,210,255,0) 0%, rgba(220,235,255,0.85) 90%, rgba(255,255,255,0.95) 100%)",transform:"rotate(8deg)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`,transformOrigin:"top"}},t))})}function S(){const e=["wx-snow-a","wx-snow-b","wx-snow-c"],t=Array.from({length:16}).map((t,a)=>({left:(100*a/16+13*a%5)%100+"%",delay:.43*a%5+"s",duration:4.5+a%5+"s",size:3+a%4*1.4,opacity:.65+7*a%4*.08,variant:e[a%e.length]}));/* @__PURE__ */
22
+ return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:t.map((e,t)=>/* @__PURE__ */p("div",{className:"absolute rounded-full bg-white",style:{left:e.left,top:"-12px",width:e.size,height:e.size,opacity:e.opacity,boxShadow:"0 0 4px rgba(255,255,255,0.65)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`}},t))})}function D(){/* @__PURE__ */
23
+ return h("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
24
+ /* @__PURE__ */p(j,{heavy:!0}),
25
+ /* @__PURE__ */p("div",{className:"absolute inset-0 bg-white",style:{animation:"wx-flash 6s ease-out infinite"}}),
26
+ /* @__PURE__ */p("div",{className:"absolute inset-y-0 right-1/3 flex items-center justify-center pointer-events-none",style:{animation:"wx-bolt 6s ease-out infinite"},children:/* @__PURE__ */p("svg",{viewBox:"0 0 18 60",className:"h-4/5",style:{filter:"drop-shadow(0 0 6px rgba(255, 240, 150, 0.95)) drop-shadow(0 0 14px rgba(255, 220, 90, 0.7))"},children:/* @__PURE__ */p("path",{d:"M11 0 L2 28 L8 30 L4 60 L16 24 L9 22 Z",fill:"rgba(255, 250, 200, 0.98)",stroke:"rgba(255, 255, 255, 0.9)",strokeWidth:.3})})})]})}function T(){/* @__PURE__ */
27
+ return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:Array.from({length:4}).map((e,t)=>/* @__PURE__ */p("div",{className:"absolute left-0 right-0",style:{top:10+22*t+"%",height:"14px",background:"linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100%)",filter:"blur(2px)",animation:`wx-fog-drift ${10+3*t}s ease-in-out ${.7*t}s infinite alternate`}},t))})}function A({code:e,isDay:t}){return 0===e||1===e?/* @__PURE__ */p(t?v:k,{}):2===e?/* @__PURE__ */h(u,{children:[/* @__PURE__ */p(t?v:k,{}),
28
+ /* @__PURE__ */p(N,{tone:t?"light":"dark"})]}):3===e?/* @__PURE__ */p(N,{tone:t?"light":"dark"}):45===e||48===e?/* @__PURE__ */p(T,{}):[51,53,61,80,81].includes(e)?/* @__PURE__ */p(j,{}):[55,63,65,82].includes(e)?/* @__PURE__ */p(j,{heavy:!0}):[71,73,75].includes(e)?/* @__PURE__ */p(S,{}):[95,96,99].includes(e)?/* @__PURE__ */p(D,{}):null}function H(){const[r,v]=c(x),[k,N]=c(()=>n(y)),[j,S]=c(null),[D,T]=c(!0),[,H]=c(0);d(()=>{const e=setInterval(()=>H(e=>e+1),6e4);return()=>clearInterval(e)},[]);const[$,F]=c(!1),[I,L]=c(r),[C,M]=c(k),{prefs:Z,save:G}=o(),W={...g,...Z.weather_prefs??{}},[J,O]=c(W);s(m(()=>{L(r),M({...k}),O({...W}),F(!0)},[r,k,W])),d(()=>{let t=!1;return T(!0),e(r).then(e=>{t||(S(e),T(!1))}),()=>{t=!0}},[r]);const P=e=>W.useFahrenheit?`${b(e)}°F`:`${e}°`;if(D&&!j)/* @__PURE__ */
29
+ return p("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-sky-400 to-blue-500 rounded-lg text-on-accent/80 text-xs",style:{minHeight:110},children:/* @__PURE__ */p(l,{size:"sm",padding:"",label:"Loading"})});if(!j)/* @__PURE__ */
30
+ return p("div",{className:"flex items-center justify-center h-full bg-slate-700 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Couldn't load weather"});const[R,U,X]=t(j.code,j.isDay);/* @__PURE__ */
31
+ return h(u,{children:[
32
+ /* @__PURE__ */p("style",{children:"\n@keyframes wx-rain-a { 0% { transform: translate(0,-20px); opacity: 0; } 10% { opacity: 0.95; } 100% { transform: translate(8px,140px); opacity: 0; } }\n@keyframes wx-rain-b { 0% { transform: translate(0,-20px); opacity: 0; } 12% { opacity: 0.85; } 100% { transform: translate(12px,140px); opacity: 0; } }\n@keyframes wx-rain-c { 0% { transform: translate(0,-20px); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(5px,140px); opacity: 0; } }\n@keyframes wx-snow-a { 0% { transform: translate(0,-12px) rotate(0deg); opacity: 0; } 10% { opacity: 0.9; } 50% { transform: translate(10px,55px) rotate(180deg); } 100% { transform: translate(-4px,140px) rotate(360deg); opacity: 0; } }\n@keyframes wx-snow-b { 0% { transform: translate(0,-12px) rotate(0deg); opacity: 0; } 10% { opacity: 0.85; } 50% { transform: translate(-12px,55px) rotate(-180deg); } 100% { transform: translate(6px,140px) rotate(-360deg); opacity: 0; } }\n@keyframes wx-snow-c { 0% { transform: translate(0,-12px); opacity: 0; } 10% { opacity: 0.7; } 100% { transform: translate(2px,140px); opacity: 0; } }\n@keyframes wx-drift-cloud { 0% { transform: translateX(-40%); } 100% { transform: translateX(140%); } }\n@keyframes wx-twinkle { 0%, 100% { opacity: 0.25; transform: scale(1); } 50% { opacity: 1; transform: scale(1.6); } }\n@keyframes wx-flash { 0%, 86%, 100% { opacity: 0; } 87% { opacity: 0.95; } 88% { opacity: 0.15; } 89% { opacity: 0.85; } 90% { opacity: 0; } }\n@keyframes wx-bolt { 0%, 86%, 90%, 100% { opacity: 0; } 87% { opacity: 1; } 89% { opacity: 0.85; } }\n@keyframes wx-sun-pulse { 0%, 100% { transform: scale(1); opacity: 0.65; } 50% { transform: scale(1.12); opacity: 0.95; } }\n@keyframes wx-sun-rays { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }\n@keyframes wx-fog-drift { 0% { transform: translateX(-25%); opacity: 0.3; } 50% { opacity: 0.65; } 100% { transform: translateX(25%); opacity: 0.3; } }\n@keyframes wx-shooting-star { 0%, 95% { opacity: 0; transform: translate(0,0) scale(0); } 96% { opacity: 1; transform: translate(0,0) scale(1); } 100% { opacity: 0; transform: translate(40px,30px) scale(1); } }\n"}),
33
+ /* @__PURE__ */p("div",{className:"rounded-lg overflow-hidden",style:{backgroundColor:`rgba(15, 23, 42, ${k.activeOpacity/100})`,backdropFilter:k.activeBlur>0?`blur(${k.activeBlur}px)`:void 0},children:/* @__PURE__ */h("div",{className:`relative rounded-lg overflow-hidden text-white bg-gradient-to-br ${X}`,style:{height:110},children:[
34
+ /* @__PURE__ */p(A,{code:j.code,isDay:j.isDay}),
35
+ /* @__PURE__ */h("div",{className:"relative z-10 px-3 py-3 flex flex-col h-full justify-between",children:[
36
+ /* @__PURE__ */h("div",{className:"flex items-start justify-between gap-2",children:[
37
+ /* @__PURE__ */h("div",{className:"min-w-0 flex-1",children:[
38
+ /* @__PURE__ */p("div",{className:"text-base font-semibold leading-tight truncate drop-shadow-sm",children:j.city}),W.showLocalTime&&/* @__PURE__ */p("div",{className:"text-2xs opacity-90 leading-tight tabular-nums drop-shadow-sm",children:w(j.timezone,W.use24Hour)})]}),
39
+ /* @__PURE__ */p("div",{className:"text-3xl font-extralight leading-none tracking-tight tabular-nums shrink-0 drop-shadow-sm",children:P(j.temp)})]}),
40
+ /* @__PURE__ */h("div",{className:"flex items-end justify-between gap-2",children:[
41
+ /* @__PURE__ */h("div",{className:"flex items-center gap-2 min-w-0",children:[
42
+ /* @__PURE__ */p("span",{className:"text-lg leading-none drop-shadow-sm",children:U}),
43
+ /* @__PURE__ */p("span",{className:"text-2xs font-medium drop-shadow-sm truncate",children:R})]}),
44
+ /* @__PURE__ */h("span",{className:"text-2xs opacity-90 tabular-nums drop-shadow-sm shrink-0",children:["H:",P(j.high)," L:",P(j.low)]})]})]})]})}),
45
+ /* @__PURE__ */h(i,{open:$,onClose:()=>F(!1),title:"Weather Settings",appearance:C,onAppearanceChange:M,onSave:()=>{v(I),N(C),G({weather_prefs:J}),localStorage.setItem(f,I),localStorage.setItem(y,JSON.stringify(C)),F(!1)},children:[
46
+ /* @__PURE__ */p("div",{className:"space-y-3",children:/* @__PURE__ */h("div",{children:[
47
+ /* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
48
+ /* @__PURE__ */h("div",{className:"flex items-center gap-3 mb-2",children:[
49
+ /* @__PURE__ */p("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
50
+ /* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>O(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(J.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
51
+ /* @__PURE__ */h("div",{className:"flex items-center gap-3 mb-2",children:[
52
+ /* @__PURE__ */p("span",{className:"text-sm text-gray-600 w-24",children:"Time Format"}),
53
+ /* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"AM/PM"},{key:!0,label:"24H"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>O(t=>({...t,use24Hour:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(J.use24Hour===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
54
+ /* @__PURE__ */h("label",{className:"flex items-center gap-2 cursor-pointer",children:[
55
+ /* @__PURE__ */p("input",{type:"checkbox",checked:J.showLocalTime,onChange:e=>O(t=>({...t,showLocalTime:e.target.checked})),className:"rounded border-gray-300 text-blue-600 h-3.5 w-3.5"}),
56
+ /* @__PURE__ */p("span",{className:"text-sm text-gray-600",children:"Show local time"})]})]})}),
57
+ /* @__PURE__ */h("div",{children:[
58
+ /* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"City"}),
59
+ /* @__PURE__ */p("select",{value:I,onChange:e=>L(e.target.value),className:"w-full bg-surface-sunken border border-line rounded px-2 h-8 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:Object.keys(a).map(e=>/* @__PURE__ */p("option",{value:e,children:e},e))}),
60
+ /* @__PURE__ */p("p",{className:"mt-1 text-2xs text-ink-faintest",children:"Auto-detected from your timezone; change if needed."})]})]})]})}export{H as default};
@@ -0,0 +1,32 @@
1
+ import{AVAILABLE_CITIES as e,fetchCityWeather as t,getCondition as n,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as s,WidgetSettingsModal as i}from"./chunk-ZYDZY6ED.js";import{useWidgetSettings as a}from"./chunk-DZTAGMNY.js";import"./chunk-CY5N5OA3.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-AGUA3O5O.js";import"./chunk-ZDMZM7HD.js";import"./chunk-5A7MWTXX.js";import"./chunk-VG2R6PZV.js";import"./chunk-IK2WXW2E.js";import"./chunk-6453ISTQ.js";import{useShellPrefs as c}from"./chunk-KC3EX26K.js";import"./chunk-PDXPMHG3.js";import"./chunk-4AJRHTTB.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-UGTRSRIW.js";import"./chunk-X7PM7JOD.js";import"./chunk-CDAJKLGL.js";import"./chunk-FPGRKHUW.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-LNARMEEZ.js";import"./chunk-NHH2MXFU.js";import"./chunk-UQYNPYF4.js";import"./chunk-HL6JSDN3.js";import"./chunk-FSPFV4MI.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as o}from"./chunk-R2VKEMZH.js";import"./chunk-MRJKZWWV.js";import"./chunk-OZAAIE4E.js";import"./chunk-BCDG4N6L.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-QWHQJNKL.js";import"./chunk-C3QOHMR6.js";import{useState as l,useEffect as m,useCallback as h}from"react";import{jsxs as p,Fragment as u,jsx as d}from"react/jsx-runtime";var k="world_clock_appearance",g=["London","Shanghai","New York"];function x(){const{prefs:x,save:j}=c(),[b,f]=l(()=>s(k)),[y,N]=l(!1),[v,w]=l([]),[D,F]=l(b),C={useFahrenheit:!!x.weather_prefs?.useFahrenheit},[T,W]=l(C),[A,G]=l(()=>/* @__PURE__ */new Date);m(()=>{const e=setInterval(()=>G(/* @__PURE__ */new Date),3e4);return()=>clearInterval(e)},[]);const H=Object.fromEntries(Object.entries(e).map(([e,t])=>[t.tz,e])),U=x.world_clocks,J=(()=>{if(!Array.isArray(U)||0===U.length)return g;const t=[];for(const n of U){const r=e[n]?n:H[n];r&&!t.includes(r)&&t.push(r)}return t.length?t:g})(),[M,R]=l({}),[Z,O]=l(!0);m(()=>{let e=!1;return O(!0),(async()=>{const n={};await Promise.all(J.map(async e=>{const r=await t(e);r&&(n[e]=r)})),e||(R(n),O(!1))})(),()=>{e=!0}},[J.join(",")]),a(h(()=>{w([...J]),F({...b}),W({...C}),N(!0)},[J.join(","),b,C.useFahrenheit]));const P=e=>C.useFahrenheit?`${r(e)}°`:`${e}°`;/* @__PURE__ */
2
+ return p(u,{children:[
3
+ /* @__PURE__ */d("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${b.activeOpacity/100})`,backdropFilter:b.activeBlur>0?`blur(${b.activeBlur}px)`:void 0},children:/* @__PURE__ */p("div",{className:"divide-y divide-gray-200",children:[Z&&J.every(e=>!M[e])&&/* @__PURE__ */d(o,{size:"sm",padding:"py-6",label:"Loading"}),J.map(t=>{const r=M[t],s=e[t]?.tz??"UTC",{time:i,ampm:a}=function(e,t){try{const n=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(t),r=n.find(e=>"hour"===e.type)?.value||"12";return{time:`${r}:${n.find(e=>"minute"===e.type)?.value||"00"}`,ampm:(n.find(e=>"dayPeriod"===e.type)?.value||"").toUpperCase()}}catch{return{time:"",ampm:""}}}(s,A);if(!r)/* @__PURE__ */
4
+ return p("div",{className:"px-4 py-3",children:[
5
+ /* @__PURE__ */p("div",{className:"flex items-baseline justify-between gap-2",children:[
6
+ /* @__PURE__ */d("span",{className:"text-base font-semibold tracking-tight text-ink-strongest truncate",children:t}),
7
+ /* @__PURE__ */p("span",{className:"tabular-nums text-sm font-medium text-ink-faint",children:[i,
8
+ /* @__PURE__ */d("span",{className:"text-3xs ml-0.5 opacity-70",children:a})]})]}),
9
+ /* @__PURE__ */d(o,{size:"sm",padding:"pt-1",label:"Loading weather"})]},t);const[c,l]=n(r.code,r.isDay);/* @__PURE__ */
10
+ return p("div",{className:"px-4 py-3",children:[
11
+ /* @__PURE__ */p("div",{className:"flex items-baseline justify-between gap-2",children:[
12
+ /* @__PURE__ */d("span",{className:"text-base font-semibold tracking-tight text-ink-strongest truncate",children:t}),
13
+ /* @__PURE__ */d("span",{className:"text-2xl font-extralight leading-none tabular-nums tracking-tight text-ink-strongest shrink-0",children:P(r.temp)})]}),
14
+ /* @__PURE__ */p("div",{className:"flex items-center justify-between gap-2 mt-2 text-2xs",children:[
15
+ /* @__PURE__ */p("div",{className:"flex items-center gap-2 min-w-0 text-ink-faint",children:[
16
+ /* @__PURE__ */d("span",{className:"text-base leading-none shrink-0",children:l}),
17
+ /* @__PURE__ */p("span",{className:"tabular-nums font-semibold text-gray-700 shrink-0",children:[i,
18
+ /* @__PURE__ */d("span",{className:"text-3xs font-medium ml-0.5 opacity-70",children:a})]}),
19
+ /* @__PURE__ */d("span",{className:"text-gray-300 shrink-0",children:"·"}),
20
+ /* @__PURE__ */d("span",{className:"truncate",children:c})]}),
21
+ /* @__PURE__ */p("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:",P(r.high)," L:",P(r.low)]})]})]},t)})]})}),
22
+ /* @__PURE__ */p(i,{open:y,onClose:()=>N(!1),title:"World Clock Settings",appearance:D,onAppearanceChange:F,onSave:()=>{0!==v.length&&(j({world_clocks:v,weather_prefs:{...x.weather_prefs??{},useFahrenheit:T.useFahrenheit}}),f(D),localStorage.setItem(k,JSON.stringify(D)),N(!1))},children:[
23
+ /* @__PURE__ */p("div",{children:[
24
+ /* @__PURE__ */d("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
25
+ /* @__PURE__ */p("div",{className:"flex items-center gap-3 mb-2",children:[
26
+ /* @__PURE__ */d("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
27
+ /* @__PURE__ */d("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */d("button",{onClick:()=>W(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(T.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
28
+ /* @__PURE__ */d("p",{className:"text-2xs text-ink-faintest mt-1",children:"Shared with the Weather widget."})]}),
29
+ /* @__PURE__ */p("div",{children:[
30
+ /* @__PURE__ */d("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Cities"}),
31
+ /* @__PURE__ */d("div",{className:"grid grid-cols-2 gap-1 max-h-56 overflow-y-auto",children:Object.keys(e).map(e=>/* @__PURE__ */p("label",{className:"flex items-center gap-2 text-sm py-1 cursor-pointer hover:bg-gray-50 rounded px-2",children:[
32
+ /* @__PURE__ */d("input",{type:"checkbox",checked:v.includes(e),onChange:()=>w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 h-3.5 w-3.5"}),e]},e))})]})]})]})}export{x as default};
@@ -1,8 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
2
3
  import { UIMessage, FileUIPart } from 'ai';
3
- import { b as IconName } from '../names-mX74Rrmy.js';
4
+ import { b as IconName } from '../names-C1TgIb_2.js';
4
5
  import { MarkdownTableAction } from '../shell/Markdown.js';
5
- import 'react';
6
6
 
7
7
  /** The conversation the server keeps for this chat. `guestToken` is set for an
8
8
  * anonymous (storefront) visitor and is sent back by the host's `getHeaders`. */
@@ -152,6 +152,15 @@ interface FileDataPart {
152
152
  /** The tool call that made it; absent on a restored thread. */
153
153
  tool_call_id?: string;
154
154
  }
155
+ /** A `data-*` part the chat neither handles nor draws itself, as a host sees
156
+ * it (`onDataPart`, `renderDataPart`): a page edit for the admin portal's
157
+ * website editor (`data-page-edits`), or whatever a server sends next. */
158
+ interface AssistantDataPart {
159
+ /** The part's type, with its `data-` prefix (`data-page-edits`). */
160
+ type: string;
161
+ id?: string;
162
+ data: unknown;
163
+ }
155
164
  type AssistantUIMessage = UIMessage<AssistantMessageMetadata, {
156
165
  conversation: ConversationDataPart;
157
166
  plan: PlanDataPart;
@@ -364,6 +373,19 @@ interface AssistantChatProps {
364
373
  * Preview window, a CSV or workbook in its Spreadsheet app. Without it the
365
374
  * card is shown but cannot be opened. */
366
375
  onOpenFile?: (file: FileDataPart) => void;
376
+ /** Told of each `data-*` part as it streams in, when the chat does not
377
+ * handle it itself (it handles the conversation, plan, follow-ups, error,
378
+ * summary and file parts). Not called for a restored thread: a host acts
379
+ * on what this turn sent, never twice on what an earlier one did. */
380
+ onDataPart?: (part: AssistantDataPart) => void;
381
+ /** Draws such a part in the thread, where it stands in its message (the
382
+ * admin portal's "changed in the draft" card with Undo), live and on a
383
+ * restored thread. Return null to draw nothing. Without it, those parts
384
+ * are not drawn, as before. */
385
+ renderDataPart?: (part: AssistantDataPart, message: AssistantUIMessage) => ReactNode;
386
+ /** Drawn just above the composer, inside the chat (the admin portal's chip
387
+ * naming what is selected in the editor beside it). Nothing by default. */
388
+ composerTop?: ReactNode;
367
389
  /** A Copy button under every finished reply, putting it on the clipboard
368
390
  * as HTML (tables stay tables) with its Markdown as the plain text.
369
391
  * Default: on in `window`, off in `panel` and `bubble`. */
@@ -412,6 +434,7 @@ interface MessageProps {
412
434
  onOpenAttachment?: (attachment: AssistantAttachment) => void;
413
435
  /** Opens a file card's file (see AssistantChatProps). */
414
436
  onOpenFile?: (file: FileDataPart) => void;
437
+ renderDataPart?: AssistantChatProps['renderDataPart'];
415
438
  /** A Copy button under the reply, once it has finished. */
416
439
  showCopy?: boolean;
417
440
  /** The host's buttons beside Copy. */
@@ -420,7 +443,7 @@ interface MessageProps {
420
443
  * server named a run for shows thumbs. */
421
444
  onRate?: (runId: string, rating: AssistantAnswerRating | null) => Promise<void> | void;
422
445
  }
423
- declare function Message({ message, toolLabels, labels, showReasoning, showToolOutput, showUsage, live, onApprove, plans, userActions, tableActions, onLinkClick, onOpenAttachment, onOpenFile, showCopy, answerActions, onRate }: MessageProps): react_jsx_runtime.JSX.Element | null;
446
+ declare function Message({ message, toolLabels, labels, showReasoning, showToolOutput, showUsage, live, onApprove, plans, userActions, tableActions, onLinkClick, onOpenAttachment, onOpenFile, renderDataPart, showCopy, answerActions, onRate }: MessageProps): react_jsx_runtime.JSX.Element | null;
424
447
 
425
448
  interface ApprovalDecision {
426
449
  approval_id: string;
@@ -457,6 +480,14 @@ declare function attachmentPart(attachment: AssistantAttachment): FileUIPart;
457
480
  declare function attachmentsOf(message: AssistantUIMessage): AssistantAttachment[];
458
481
  /** The request body for the next turn. Throws when there is nothing to send,
459
482
  * so a bug cannot become an empty request the server has to reject. */
483
+ /**
484
+ * The `data-*` parts that belong to the chat's own protocol, which a host is
485
+ * never handed (`onDataPart`, `renderDataPart`): the conversation, a plan,
486
+ * follow-ups, a read's summary, a failure's code, a file card, a destructive
487
+ * approval's mark and a busy AI service's wait. Every other data part is the
488
+ * host's to act on or draw.
489
+ */
490
+ declare const OWN_DATA_PARTS: ReadonlySet<string>;
460
491
  declare function buildRequestBody(messages: AssistantUIMessage[], conversationId: string | null): AssistantChatRequestBody;
461
492
  interface HistoryMessage {
462
493
  id: string;
@@ -580,4 +611,4 @@ declare function finishedStats(usage: AssistantTurnUsage, labels: StatsLabels):
580
611
  /** The line under a reply being written: `elapsedMs` since the reply began. */
581
612
  declare function liveStats(text: string, elapsedMs: number, labels: StatsLabels): string;
582
613
 
583
- export { ApprovalCard, type ApprovalDecision, type AssistantAnswerAction, type AssistantAnswerRating, type AssistantAnswerVerdict, type AssistantAttachment, type AssistantAttachmentsConfig, AssistantChat, type AssistantChatLabels, type AssistantChatProps, type AssistantChatRequestBody, type AssistantChatVariant, type AssistantConversation, type AssistantErrorCode, Message as AssistantMessage, type AssistantMessageMetadata, type AssistantRateRequest, type AssistantTextAction, type AssistantTurnUsage, type AssistantUIMessage, type ConversationHistory, DEFAULT_ASSISTANT_CHAT_LABELS, type ErrorDataPart, type FailureView, type FileDataPart, type MessageSource, PlanApprovalCard, PlanChecklist, type PlanDataPart, type PlanStatus, type PlanStepData, type ToolLabel, type ToolLabelSpec, type ToolLabels, ToolStep, type ToolSummaryDataPart, type ToolSummaryRow, attachmentPart, attachmentsOf, buildRequestBody, estimateTokens, failureView, filesOf, finishedStats, isDroppedConnection, liveStats, messagesFromHistory, pinnedPlan, plansOf, tokensPerSecond, toolSummariesOf };
614
+ export { ApprovalCard, type ApprovalDecision, type AssistantAnswerAction, type AssistantAnswerRating, type AssistantAnswerVerdict, type AssistantAttachment, type AssistantAttachmentsConfig, AssistantChat, type AssistantChatLabels, type AssistantChatProps, type AssistantChatRequestBody, type AssistantChatVariant, type AssistantConversation, type AssistantDataPart, type AssistantErrorCode, Message as AssistantMessage, type AssistantMessageMetadata, type AssistantRateRequest, type AssistantTextAction, type AssistantTurnUsage, type AssistantUIMessage, type ConversationHistory, DEFAULT_ASSISTANT_CHAT_LABELS, type ErrorDataPart, type FailureView, type FileDataPart, type MessageSource, OWN_DATA_PARTS, PlanApprovalCard, PlanChecklist, type PlanDataPart, type PlanStatus, type PlanStepData, type ToolLabel, type ToolLabelSpec, type ToolLabels, ToolStep, type ToolSummaryDataPart, type ToolSummaryRow, attachmentPart, attachmentsOf, buildRequestBody, estimateTokens, failureView, filesOf, finishedStats, isDroppedConnection, liveStats, messagesFromHistory, pinnedPlan, plansOf, tokensPerSecond, toolSummariesOf };