efficient-shell 8.11.0 → 8.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/dist/{Browser-KZE4TTPH.js → Browser-OOJUPENB.js} +14 -14
  2. package/dist/Calculator-PPH3FLQG.js +29 -0
  3. package/dist/CurrencyConverter-GTICX6V3.js +21 -0
  4. package/dist/{Documents-CK7XL5CL.js → Documents-RXNGM2OY.js} +12 -12
  5. package/dist/Files-G2FQ5Z3R.js +87 -0
  6. package/dist/Notepad-7777T6ES.js +25 -0
  7. package/dist/PdfViewer-Q7IS273H.js +1 -0
  8. package/dist/{PomodoroTimer-KUB3JUJO.js → PomodoroTimer-VPRRRXVE.js} +19 -19
  9. package/dist/{Preview-YPS5O4C7.js → Preview-QBWSY7W7.js} +39 -39
  10. package/dist/Sidebar-NONBFVWE.js +43 -0
  11. package/dist/Spreadsheet-JIOTLCIK.js +37 -0
  12. package/dist/{Stock-DCQEYEND.js → Stock-OIDTOA6E.js} +4 -4
  13. package/dist/{Weather-UYCFOHGQ.js → Weather-XT3S2O4X.js} +18 -18
  14. package/dist/{WorldClock-WKMFOBKT.js → WorldClock-QFPWQDD2.js} +6 -6
  15. package/dist/ai/index.js +13 -13
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/media-host-check.js +1 -1
  18. package/dist/bin/ui-check.js +1 -1
  19. package/dist/brand.css +1 -1
  20. package/dist/{chunk-WNJLY7CM.js → chunk-2KOXALIK.js} +11 -11
  21. package/dist/{chunk-VH3IMIS2.js → chunk-2LTB2DSA.js} +6 -6
  22. package/dist/chunk-2MBDZMZM.js +2 -0
  23. package/dist/{chunk-7PCV65OU.js → chunk-37S3WLBL.js} +6 -6
  24. package/dist/chunk-3UHHKER7.js +2 -0
  25. package/dist/chunk-4GEAEYKA.js +99 -0
  26. package/dist/chunk-4LQDWN6L.js +4 -0
  27. package/dist/chunk-4MHTK3LH.js +4 -0
  28. package/dist/{chunk-IQDIWKES.js → chunk-55IY2ZJY.js} +1 -1
  29. package/dist/{chunk-4A2X6KLQ.js → chunk-5GHLKEJQ.js} +1 -1
  30. package/dist/{chunk-HFEYQVKD.js → chunk-6AB42T2W.js} +1 -1
  31. package/dist/chunk-6NLKMHX6.js +2 -0
  32. package/dist/{chunk-2QI3QFX6.js → chunk-76YDO3KA.js} +1 -1
  33. package/dist/chunk-7F65BNHY.js +2 -0
  34. package/dist/{chunk-SFNLRK5J.js → chunk-7HPOALEV.js} +5 -5
  35. package/dist/{chunk-RAHIWTPJ.js → chunk-7IF3RZF3.js} +12 -12
  36. package/dist/{chunk-KXTR2RPB.js → chunk-7IHH5CDD.js} +3 -3
  37. package/dist/{chunk-PPROO6JU.js → chunk-7JKFXRAR.js} +5 -5
  38. package/dist/{chunk-SBHLTCGU.js → chunk-7QLI3HAO.js} +1 -1
  39. package/dist/chunk-AW7TOB6N.js +1 -0
  40. package/dist/{chunk-KFMRV3MK.js → chunk-BKWLFZHI.js} +1 -1
  41. package/dist/chunk-BXDYFSP4.js +2 -0
  42. package/dist/{chunk-UHW2CFLV.js → chunk-C4YTKSXY.js} +1 -1
  43. package/dist/{chunk-EPHQ7UQV.js → chunk-CQXV3SJA.js} +1 -1
  44. package/dist/chunk-D5EXIRJF.js +2 -0
  45. package/dist/{chunk-US5YOYS3.js → chunk-DKY6X24V.js} +1 -1
  46. package/dist/{chunk-3OKD2ZZV.js → chunk-DXQCNU5I.js} +9 -9
  47. package/dist/chunk-EEG3KMP7.js +2 -0
  48. package/dist/{chunk-TAGZV46K.js → chunk-EK3JM3J2.js} +1 -1
  49. package/dist/{chunk-AP67GBSX.js → chunk-EXU3ZXKB.js} +8 -8
  50. package/dist/chunk-F6RM7RLQ.js +1 -0
  51. package/dist/{chunk-332V47ID.js → chunk-FDIJEOGV.js} +2 -2
  52. package/dist/{chunk-MTD66C5F.js → chunk-FEAOJLGA.js} +2 -2
  53. package/dist/{chunk-JK3QY266.js → chunk-G34KXE2L.js} +5 -5
  54. package/dist/{chunk-US5B4QYS.js → chunk-GLVEL6AQ.js} +15 -15
  55. package/dist/{chunk-7RDFRWF3.js → chunk-H3XEO4LR.js} +6 -6
  56. package/dist/{chunk-VUYWYMZZ.js → chunk-H62JMI7C.js} +2 -2
  57. package/dist/{chunk-7FNZUIXO.js → chunk-HHXP34PV.js} +4 -4
  58. package/dist/chunk-HJUK5AAM.js +2 -0
  59. package/dist/chunk-HMMNAJJQ.js +4 -0
  60. package/dist/{chunk-KIQ2OSPG.js → chunk-HTOZWATN.js} +1 -1
  61. package/dist/{chunk-IC2YI7WC.js → chunk-HXXUMKTV.js} +1 -1
  62. package/dist/chunk-I7GWKMYO.js +2 -0
  63. package/dist/{chunk-P25GL5BQ.js → chunk-J6QU5JTZ.js} +1 -1
  64. package/dist/{chunk-6L7V25YL.js → chunk-J77ZVPF5.js} +5 -5
  65. package/dist/{chunk-CJUN2VOD.js → chunk-JF45HC5H.js} +1 -1
  66. package/dist/chunk-JTPBPEYK.js +2 -0
  67. package/dist/chunk-JXOBORLD.js +3 -0
  68. package/dist/{chunk-7MX6CMMN.js → chunk-JZ7NBWGB.js} +1 -1
  69. package/dist/chunk-KIYTUOVN.js +2 -0
  70. package/dist/chunk-KO5PBMCF.js +2 -0
  71. package/dist/chunk-KRWKHI7S.js +2 -0
  72. package/dist/chunk-KV5VLPII.js +1 -0
  73. package/dist/chunk-L3VD25XR.js +8 -0
  74. package/dist/{chunk-3RWLCKSR.js → chunk-L6CG37L3.js} +1 -1
  75. package/dist/{chunk-3XLVARRX.js → chunk-LKSHI57C.js} +6 -6
  76. package/dist/{chunk-BXRWPGAT.js → chunk-LR2X6MKB.js} +1 -1
  77. package/dist/{chunk-S2Q6BOAX.js → chunk-MSCILVJB.js} +6 -6
  78. package/dist/{chunk-EY74CLGD.js → chunk-NRWIULLI.js} +12 -12
  79. package/dist/{chunk-O4NTKMC5.js → chunk-O3WSAR62.js} +2 -2
  80. package/dist/chunk-OJ3RN3BG.js +20 -0
  81. package/dist/{chunk-XFJRD3HE.js → chunk-OS6GGLQQ.js} +2 -2
  82. package/dist/{chunk-3GMHX3WX.js → chunk-OSRLZZDO.js} +4 -4
  83. package/dist/chunk-P5SVBGLG.js +2 -0
  84. package/dist/{chunk-OIVLPNOR.js → chunk-PDPBIDHF.js} +1 -1
  85. package/dist/{chunk-GVTWQBRU.js → chunk-PG665FWX.js} +9 -9
  86. package/dist/chunk-PM2N2ZGV.js +2 -0
  87. package/dist/chunk-PWONLQFF.js +2 -0
  88. package/dist/chunk-Q7OGTJET.js +3 -0
  89. package/dist/chunk-QM5DFN7Z.js +2 -0
  90. package/dist/chunk-R362N2RJ.js +1 -0
  91. package/dist/chunk-RA5GR626.js +2 -0
  92. package/dist/chunk-RNBMWJYM.js +4 -0
  93. package/dist/{chunk-CP6FITHO.js → chunk-RP4ZLTXA.js} +16 -16
  94. package/dist/{chunk-XW7KN6HW.js → chunk-SNDYD76W.js} +12 -12
  95. package/dist/chunk-SXPBOX32.js +1 -0
  96. package/dist/{chunk-C7PQJOGD.js → chunk-TUT6SGH2.js} +1 -1
  97. package/dist/{chunk-MXDW5IFQ.js → chunk-U6FORQTI.js} +1 -1
  98. package/dist/chunk-UAXP4A2A.js +4 -0
  99. package/dist/{chunk-JWMQEWCV.js → chunk-UONWIAII.js} +15 -15
  100. package/dist/{chunk-M3DZDBS6.js → chunk-UOOHE3FX.js} +6 -6
  101. package/dist/chunk-USYTN7PE.js +2 -0
  102. package/dist/{chunk-TTE3GZWH.js → chunk-UWNL4FO2.js} +1 -1
  103. package/dist/{chunk-4OYSTWMQ.js → chunk-VANXHWGP.js} +1 -1
  104. package/dist/chunk-VGX7ODMS.js +4 -0
  105. package/dist/{chunk-C2HHGLLR.js → chunk-VJPJNCB4.js} +24 -4
  106. package/dist/{chunk-5J6IC25E.js → chunk-VX4OBI4U.js} +1 -1
  107. package/dist/{chunk-7A7HRAC6.js → chunk-WAMBQNDN.js} +11 -11
  108. package/dist/{chunk-QKIVMRK5.js → chunk-WCAQWHFD.js} +5 -5
  109. package/dist/{chunk-XYA7NPSZ.js → chunk-XF2NZVXW.js} +5 -5
  110. package/dist/{chunk-BKV6PH3R.js → chunk-XTPDXB4X.js} +1 -1
  111. package/dist/{chunk-BHGMJBJ2.js → chunk-XZLBPVRH.js} +1 -1
  112. package/dist/{chunk-VJ56YZY6.js → chunk-Y5W6POQE.js} +5 -5
  113. package/dist/{chunk-B6FBDJUL.js → chunk-YL44UDNT.js} +6 -6
  114. package/dist/chunk-Z5UVBCEE.js +9 -0
  115. package/dist/{chunk-BJKXFEZN.js → chunk-ZEDYXP2J.js} +1 -1
  116. package/dist/{chunk-N7LV32EQ.js → chunk-ZKRWJILC.js} +1 -1
  117. package/dist/{chunk-2K76HRXS.js → chunk-ZSTBFMQE.js} +1 -1
  118. package/dist/chunk-ZZIJFMZG.js +4 -0
  119. package/dist/data/ListLoadError.js +1 -1
  120. package/dist/forms/BorderInput.js +1 -1
  121. package/dist/forms/BrandAssetEditor.js +1 -1
  122. package/dist/forms/Calendar.js +1 -1
  123. package/dist/forms/ColorPicker.js +1 -1
  124. package/dist/forms/ComposerAttachments.js +1 -1
  125. package/dist/forms/CornersInput.js +1 -1
  126. package/dist/forms/DatePicker.js +1 -1
  127. package/dist/forms/DateRangePicker.js +1 -1
  128. package/dist/forms/DisplayChips.js +1 -1
  129. package/dist/forms/FilePicker.js +1 -1
  130. package/dist/forms/IconPicker.js +1 -1
  131. package/dist/forms/InputNumber.js +1 -1
  132. package/dist/forms/LinkPicker.js +1 -1
  133. package/dist/forms/MediaUploadField.js +1 -1
  134. package/dist/forms/MediaUploadGrid.js +1 -1
  135. package/dist/forms/PositionInput.d.ts +25 -0
  136. package/dist/forms/PositionInput.js +2 -0
  137. package/dist/forms/Select.d.ts +1 -1
  138. package/dist/forms/Select.js +1 -1
  139. package/dist/forms/SidesInput.d.ts +10 -2
  140. package/dist/forms/SidesInput.js +1 -1
  141. package/dist/forms/Slider.js +1 -1
  142. package/dist/forms/Snippet.js +1 -1
  143. package/dist/forms/SplitButton.js +1 -1
  144. package/dist/forms/TagInput.js +1 -1
  145. package/dist/forms/TextToolbar.js +1 -1
  146. package/dist/forms/WidthsBar.js +1 -1
  147. package/dist/hooks/useTheme.d.ts +1 -1
  148. package/dist/icons/efficient-glyphs.d.ts +8 -0
  149. package/dist/icons/efficient-glyphs.js +1 -1
  150. package/dist/icons/efficient-looks.d.ts +16 -0
  151. package/dist/icons/efficient-looks.js +1 -1
  152. package/dist/icons/efficient-meanings.d.ts +9 -1
  153. package/dist/icons/efficient-meanings.js +1 -1
  154. package/dist/icons/efficient.d.ts +8 -0
  155. package/dist/icons/efficient.js +1 -1
  156. package/dist/icons/glyphs/CropBottomIcon.d.ts +8 -0
  157. package/dist/icons/glyphs/CropBottomIcon.js +1 -0
  158. package/dist/icons/glyphs/CropLeftIcon.d.ts +8 -0
  159. package/dist/icons/glyphs/CropLeftIcon.js +1 -0
  160. package/dist/icons/glyphs/CropLeftRightIcon.d.ts +8 -0
  161. package/dist/icons/glyphs/CropLeftRightIcon.js +1 -0
  162. package/dist/icons/glyphs/CropRightIcon.d.ts +8 -0
  163. package/dist/icons/glyphs/CropRightIcon.js +1 -0
  164. package/dist/icons/glyphs/CropTopIcon.d.ts +8 -0
  165. package/dist/icons/glyphs/CropTopIcon.js +1 -0
  166. package/dist/icons/glyphs/CropYIcon.d.ts +8 -0
  167. package/dist/icons/glyphs/CropYIcon.js +1 -0
  168. package/dist/icons/glyphs/NudgeXIcon.d.ts +8 -0
  169. package/dist/icons/glyphs/NudgeXIcon.js +1 -0
  170. package/dist/icons/glyphs/NudgeYIcon.d.ts +8 -0
  171. package/dist/icons/glyphs/NudgeYIcon.js +1 -0
  172. package/dist/icons/index.d.ts +2 -2
  173. package/dist/icons/index.js +1 -1
  174. package/dist/icons/looks/CropBottomMiniIcon.d.ts +8 -0
  175. package/dist/icons/looks/CropBottomMiniIcon.js +1 -0
  176. package/dist/icons/looks/CropBottomSolidIcon.d.ts +8 -0
  177. package/dist/icons/looks/CropBottomSolidIcon.js +1 -0
  178. package/dist/icons/looks/CropLeftMiniIcon.d.ts +8 -0
  179. package/dist/icons/looks/CropLeftMiniIcon.js +1 -0
  180. package/dist/icons/looks/CropLeftRightMiniIcon.d.ts +8 -0
  181. package/dist/icons/looks/CropLeftRightMiniIcon.js +1 -0
  182. package/dist/icons/looks/CropLeftRightSolidIcon.d.ts +8 -0
  183. package/dist/icons/looks/CropLeftRightSolidIcon.js +1 -0
  184. package/dist/icons/looks/CropLeftSolidIcon.d.ts +8 -0
  185. package/dist/icons/looks/CropLeftSolidIcon.js +1 -0
  186. package/dist/icons/looks/CropRightMiniIcon.d.ts +8 -0
  187. package/dist/icons/looks/CropRightMiniIcon.js +1 -0
  188. package/dist/icons/looks/CropRightSolidIcon.d.ts +8 -0
  189. package/dist/icons/looks/CropRightSolidIcon.js +1 -0
  190. package/dist/icons/looks/CropTopMiniIcon.d.ts +8 -0
  191. package/dist/icons/looks/CropTopMiniIcon.js +1 -0
  192. package/dist/icons/looks/CropTopSolidIcon.d.ts +8 -0
  193. package/dist/icons/looks/CropTopSolidIcon.js +1 -0
  194. package/dist/icons/looks/CropYMiniIcon.d.ts +8 -0
  195. package/dist/icons/looks/CropYMiniIcon.js +1 -0
  196. package/dist/icons/looks/CropYSolidIcon.d.ts +8 -0
  197. package/dist/icons/looks/CropYSolidIcon.js +1 -0
  198. package/dist/icons/looks/NudgeXMiniIcon.d.ts +8 -0
  199. package/dist/icons/looks/NudgeXMiniIcon.js +1 -0
  200. package/dist/icons/looks/NudgeXSolidIcon.d.ts +8 -0
  201. package/dist/icons/looks/NudgeXSolidIcon.js +1 -0
  202. package/dist/icons/looks/NudgeYMiniIcon.d.ts +8 -0
  203. package/dist/icons/looks/NudgeYMiniIcon.js +1 -0
  204. package/dist/icons/looks/NudgeYSolidIcon.d.ts +8 -0
  205. package/dist/icons/looks/NudgeYSolidIcon.js +1 -0
  206. package/dist/icons/looks/map.js +1 -1
  207. package/dist/icons/sets.js +1 -1
  208. package/dist/index.d.ts +4 -3
  209. package/dist/index.js +399 -399
  210. package/dist/map/index.js +3 -3
  211. package/dist/markdown/index.js +1 -1
  212. package/dist/names-DcR-HlYV.d.ts +21 -0
  213. package/dist/page-tabs/index.js +5 -5
  214. package/dist/pdf/index.js +1 -1
  215. package/dist/shell/Accordion.js +1 -1
  216. package/dist/shell/AppUpdateBanner.js +1 -1
  217. package/dist/shell/Banner.js +1 -1
  218. package/dist/shell/Breadcrumbs.js +1 -1
  219. package/dist/shell/ColoredBadge.js +1 -1
  220. package/dist/shell/ConfirmDialog.js +1 -1
  221. package/dist/shell/ContextMenu.js +1 -1
  222. package/dist/shell/Dialog.js +1 -1
  223. package/dist/shell/Drawer.js +1 -1
  224. package/dist/shell/DropdownMenu.js +1 -1
  225. package/dist/shell/EmptyState.js +1 -1
  226. package/dist/shell/HelpCenter.js +1 -1
  227. package/dist/shell/LanguageSelect.js +1 -1
  228. package/dist/shell/Markdown.js +1 -1
  229. package/dist/shell/PageHeader.js +1 -1
  230. package/dist/shell/PopupMenu.js +1 -1
  231. package/dist/shell/ProductionTimeline.js +1 -1
  232. package/dist/shell/Result.js +1 -1
  233. package/dist/shell/SearchableSelect.js +1 -1
  234. package/dist/shell/SettingReset.js +1 -1
  235. package/dist/shell/SidebarLayout.js +1 -1
  236. package/dist/shell/SidebarNav.js +1 -1
  237. package/dist/shell/SortableList.js +1 -1
  238. package/dist/shell/StepChain.js +1 -1
  239. package/dist/shell/Stepper.js +1 -1
  240. package/dist/shell/TopNav.js +1 -1
  241. package/dist/shell/Tree.js +1 -1
  242. package/dist/telemetry/index.js +1 -1
  243. package/dist/templates/ChatTemplate.js +1 -1
  244. package/dist/templates/CheckoutTemplate.js +1 -1
  245. package/dist/templates/DataTablePage.js +1 -1
  246. package/dist/templates/EmailTemplate.js +1 -1
  247. package/dist/templates/ErrorBoundary.d.ts +1 -1
  248. package/dist/templates/FormLayoutPage.js +1 -1
  249. package/dist/tokens/spacing.d.ts +5 -5
  250. package/dist/tokens/spacing.js +1 -1
  251. package/dist/ui/index.d.ts +3 -2
  252. package/dist/ui/index.js +1 -1
  253. package/dist/ui.css +5 -4
  254. package/dist/version.js +1 -1
  255. package/package.json +1 -1
  256. package/dist/Calculator-B44SNFGQ.js +0 -29
  257. package/dist/CurrencyConverter-QCXULYMM.js +0 -21
  258. package/dist/Files-PE67UQ33.js +0 -87
  259. package/dist/Notepad-BOSV536Y.js +0 -25
  260. package/dist/PdfViewer-IQQM7DOH.js +0 -1
  261. package/dist/Sidebar-EIGME7VA.js +0 -43
  262. package/dist/Spreadsheet-3EGY4CEN.js +0 -37
  263. package/dist/chunk-2355YEWO.js +0 -1
  264. package/dist/chunk-BEWEQ6BP.js +0 -3
  265. package/dist/chunk-BXCWPHU6.js +0 -1
  266. package/dist/chunk-H7BP5LLG.js +0 -99
  267. package/dist/chunk-MXMBQS75.js +0 -20
  268. package/dist/chunk-OZ2ALRKX.js +0 -3
  269. package/dist/chunk-SQFSBXPR.js +0 -1
  270. package/dist/chunk-SXE6KZBU.js +0 -1
  271. package/dist/chunk-TKLH7V2R.js +0 -9
  272. package/dist/chunk-VIJ5BZ5U.js +0 -1
  273. package/dist/chunk-VLOJ4XJC.js +0 -8
  274. package/dist/chunk-YVOGWINT.js +0 -4
  275. package/dist/names-CwL-QSC9.d.ts +0 -21
  276. /package/dist/{chunk-2CGVDBNO.js → chunk-4MNNVSHD.js} +0 -0
  277. /package/dist/{chunk-WHTINFQU.js → chunk-A6L6FYG4.js} +0 -0
@@ -87,15 +87,15 @@ type ControlSize = keyof typeof CONTROL_HEIGHTS;
87
87
  * to the control ladder for list and menu rows and for the window bar. A menu
88
88
  * row, a start-menu row, a sidebar row, the sidebar search and a drop-down
89
89
  * list's option row are 36 at the medium menu size. The main window bar (and
90
- * the dialog-style bar, which is the same bar) is 32, the compact app bar's
91
- * height, since Victor Mau made every window's title bar compact
92
- * (2026-10-18; it was 44). Controls (buttons, fields,
93
- * selects) stay on the ladder above. `--row-height-menu`,
90
+ * the dialog-style bar, which is the same bar) is 40, the large control
91
+ * height (Lewis, 2026-10-21; it was 44, then 32 from 2026-10-18). The compact
92
+ * app bar stays 32. Controls (buttons, fields, selects) stay on the ladder
93
+ * above. `--row-height-menu`,
94
94
  * `--row-height-window-bar` and `--row-height-compact-bar` in `ui.css`.
95
95
  */
96
96
  declare const ROW_HEIGHTS: {
97
97
  readonly menu: 36;
98
- readonly windowBar: 32;
98
+ readonly windowBar: 40;
99
99
  readonly compactBar: 32;
100
100
  };
101
101
  /**
@@ -1 +1 @@
1
- export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-SQFSBXPR.js";
1
+ export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";
@@ -29,7 +29,8 @@ export { MAX_FRACTION_DIGITS, appendKey, backspace } from '../forms/keypadInput.
29
29
  export { default as TileButton, TileButtonProps, TileSize } from '../forms/TileButton.js';
30
30
  export { default as Segmented, SegmentedOption, SegmentedProps, SegmentedSize } from '../forms/Segmented.js';
31
31
  export { default as IconPicker, IconPickerOption, IconPickerProps } from '../forms/IconPicker.js';
32
- export { Side, SidesEachToggle, default as SidesInput, SidesInputProps, SidesValue, sidesStartEach } from '../forms/SidesInput.js';
32
+ export { Side, SidesEachToggle, SidesGlyphs, default as SidesInput, SidesInputProps, SidesValue, sidesStartEach } from '../forms/SidesInput.js';
33
+ export { PositionAxis, default as PositionInput, PositionInputProps, PositionValue } from '../forms/PositionInput.js';
33
34
  export { BORDER_LINE_STYLES, default as BorderInput, BorderInputProps, BorderLineStyle, BorderValue, borderSides, borderStartEach } from '../forms/BorderInput.js';
34
35
  export { default as Switch, SwitchProps, SwitchSize } from '../forms/Switch.js';
35
36
  export { default as InputNumber, InputNumberProps } from '../forms/InputNumber.js';
@@ -140,7 +141,7 @@ export { default as AuthScreen, AuthScreenProps } from '../templates/AuthScreen.
140
141
  export { default as ErrorBoundary, ErrorBoundaryProps } from '../templates/ErrorBoundary.js';
141
142
  export { default as ErrorPage, ErrorPageProps } from '../templates/ErrorPage.js';
142
143
  export { BRAND_MAX_HEIGHT, BRAND_MIN_HEIGHT_PX, BrandBox, ICON_SET_FOR_THEME, Icon, IconProps, IconTone, THEME_ICON_SETS, ThemeIconSet, brandBox, iconSetFor, loadIconSet } from '../icons/index.js';
143
- export { B as BRAND_ICON_NAMES, a as BrandIconName, I as ICON_NAMES, b as IconName, i as isBrandIconName, c as isIconName } from '../names-CwL-QSC9.js';
144
+ export { B as BRAND_ICON_NAMES, a as BrandIconName, I as ICON_NAMES, b as IconName, i as isBrandIconName, c as isIconName } from '../names-DcR-HlYV.js';
144
145
  export { I as IconDrawing, a as IconSet, b as activeIconSet, i as iconSets, c as iconsVersion, r as registerIconSet, d as registerIcons, e as resolveIcon, s as setDefaultIconSet, f as setIconSet, g as subscribeIcons } from '../registry-5Oj4TUjn.js';
145
146
  export { CORNERS, CORNERS_FOR_THEME, Corners, Theme, applyCorners, applyIconSet, applyThemePrefs, cornersFor, resolveCorners, resolveTheme, useTheme } from '../hooks/useTheme.js';
146
147
  export { ShellPrefsAdapter, ShellPrefsProvider, useLocalStoragePrefs, useShellPrefs } from '../shell/ShellPrefs.js';
package/dist/ui/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import"../chunk-2CGVDBNO.js";export{ELEVATION_LEVELS,RADIUS_ROLES}from"../chunk-MVP6Q6KV.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-SQFSBXPR.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";export{CheckoutTemplate}from"../chunk-SBHLTCGU.js";export{DashboardTemplate}from"../chunk-CXDJXNPZ.js";export{DataTablePage}from"../chunk-TAGZV46K.js";export{EmailTemplate}from"../chunk-UHW2CFLV.js";export{ErrorBoundary}from"../chunk-L42Q6GVA.js";export{ErrorPage}from"../chunk-O6TKI4F5.js";export{FormLayoutPage}from"../chunk-US5YOYS3.js";export{GalleryTemplate}from"../chunk-5K3QLWUX.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-53XMYVJO.js";export{ChatTemplate}from"../chunk-N7LV32EQ.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-4AFNDOPF.js";export{TopNav}from"../chunk-3RWLCKSR.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-7PCV65OU.js";export{ListRow,SortableList}from"../chunk-VH3IMIS2.js";import"../chunk-JGZWAEOJ.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{Statistic}from"../chunk-CTB634WT.js";export{Stepper}from"../chunk-IC2YI7WC.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-ELVFPH7Y.js";export{SettingReset}from"../chunk-5J6IC25E.js";export{SettingRow}from"../chunk-BUDBBIKN.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-JK3QY266.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-7FNZUIXO.js";import"../chunk-QWK6DRSN.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{MetricBarLegend}from"../chunk-YT32RSS6.js";export{MilestoneTimeline}from"../chunk-6L7MMUMP.js";export{PageHeader}from"../chunk-4OYSTWMQ.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-WNJLY7CM.js";import"../chunk-SURSVJA2.js";export{TimelineTrack}from"../chunk-4CXQX5AX.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-YDEIXM2A.js";export{ResizeHandle}from"../chunk-XSY22PWH.js";export{FloatingBar}from"../chunk-7OC3L4VZ.js";export{GlobalSearch,openGlobalSearch}from"../chunk-2VLQECPC.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-WGRS6QBT.js";export{HelpCenter}from"../chunk-GVTWQBRU.js";export{IconRail,IconRailButton}from"../chunk-7OLYHD4V.js";import"../chunk-FQEALPZJ.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-MXDW5IFQ.js";export{MetricBar}from"../chunk-MH4EUGAB.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";import"../chunk-URBCGEXG.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Divider}from"../chunk-DFOFEBYX.js";export{Drawer}from"../chunk-XYA7NPSZ.js";export{EditableGrid}from"../chunk-2TPUNCT7.js";import"../chunk-BR22X7E5.js";export{EmptyState}from"../chunk-BHGMJBJ2.js";export{EmptyValue}from"../chunk-64WSMLXG.js";export{Breadcrumbs}from"../chunk-BKV6PH3R.js";export{BudgetBar,budgetState}from"../chunk-7KYFOYC7.js";export{Card,StatCard}from"../chunk-RD5UPROC.js";export{ContainerFillChart}from"../chunk-CP6Q24MP.js";export{ContextMenu,useContextMenu}from"../chunk-MTD66C5F.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-SDIGC5NU.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-KXTR2RPB.js";export{CountBadge}from"../chunk-IJMV4F2Q.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-IQDIWKES.js";export{Avatar,AvatarGroup}from"../chunk-UL4WB3VH.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-VIJ5BZ5U.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-4LXH6DCN.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-EDEQRSJC.js";export{WidthsBar}from"../chunk-SFNLRK5J.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-YVOGWINT.js";export{Slider,SliderGroup}from"../chunk-QKIVMRK5.js";export{Snippet}from"../chunk-PPROO6JU.js";export{SplitButton_default as SplitButton}from"../chunk-BEWEQ6BP.js";export{DropdownMenu}from"../chunk-7RDFRWF3.js";export{Switch_default as Switch}from"../chunk-STA76WXF.js";export{TagInput}from"../chunk-VLOJ4XJC.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-B6FBDJUL.js";export{MediaUploadGrid}from"../chunk-S2Q6BOAX.js";export{NumericKeypad}from"../chunk-5J6Y5TOO.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-3YNRFMIN.js";export{RadioGroup}from"../chunk-TZSPJIP4.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{IconPicker}from"../chunk-KFMRV3MK.js";export{LinkPicker,TextLinkField}from"../chunk-VJ56YZY6.js";export{SearchableSelect}from"../chunk-3OKD2ZZV.js";export{NativeSelect,Select_default as Select}from"../chunk-MXMBQS75.js";import"../chunk-EO5RLFRX.js";import"../chunk-C7PQJOGD.js";export{Input_default as Input}from"../chunk-UNEJ2ABD.js";export{Label,labelClasses}from"../chunk-EQKUFYX6.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-6L7V25YL.js";export{CornersInput}from"../chunk-3GMHX3WX.js";export{DatePicker_default as DatePicker}from"../chunk-AP67GBSX.js";export{DateRangePicker,toISODate}from"../chunk-JWMQEWCV.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-QGU24ERZ.js";export{DisplayChips}from"../chunk-2K76HRXS.js";export{FilePicker_default as FilePicker}from"../chunk-M3DZDBS6.js";export{FormErrorSummary}from"../chunk-4B7ZRWDA.js";export{AlignmentGrid}from"../chunk-HPW6QAAY.js";export{BORDER_LINE_STYLES,BorderInput,borderSides,borderStartEach}from"../chunk-VUYWYMZZ.js";export{BrandAssetEditor}from"../chunk-3XLVARRX.js";export{MediaUploadField}from"../chunk-TKLH7V2R.js";export{ImageFocusPoint}from"../chunk-PMJMPYLQ.js";export{FormField}from"../chunk-MVQBVPWP.js";export{mediaFileName}from"../chunk-EPHQ7UQV.js";export{TransferProgress}from"../chunk-EZQXLIG3.js";export{Segmented}from"../chunk-BF2G42QU.js";import"../chunk-4G5VLI7E.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar,fromKey as fromDateKey,toKey as toDateKey}from"../chunk-XW7KN6HW.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-EY74CLGD.js";export{hexToHsv,hsvToHex,parseHexColor}from"../chunk-H245LLX4.js";export{Popover}from"../chunk-FND3BDOO.js";export{InputNumber_default as InputNumber}from"../chunk-332V47ID.js";export{useInSettingRow,useSettingAuto}from"../chunk-E4Z5OXBI.js";export{DataTable}from"../chunk-B7IHOBK6.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{Kanban}from"../chunk-TYEXEETI.js";export{ListFooter}from"../chunk-ENSA3NAS.js";export{ListLoadError}from"../chunk-7MX6CMMN.js";export{Pagination}from"../chunk-XKCEVZZB.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-VAACOJ2H.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-X2S2XDZI.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";export{SankeyChart}from"../chunk-U5PXB4UW.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-EDYCBXWD.js";export{StatTile}from"../chunk-TLZVEW34.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-EKHT4PDR.js";export{TimeSeriesChart}from"../chunk-LPYFS4RV.js";export{TreemapChart}from"../chunk-DSBLBBES.js";export{squarify}from"../chunk-46BYGPGD.js";export{WaterfallChart}from"../chunk-QQVLFDX6.js";export{HeatmapChart}from"../chunk-7GU3LUMW.js";export{HistogramChart}from"../chunk-YEY6YPTM.js";export{Meter}from"../chunk-CASSD64W.js";export{PieChart}from"../chunk-2DGTGJYJ.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-DYSUTUH3.js";export{RadialBarChart}from"../chunk-7UEFFCQV.js";export{RangeChart}from"../chunk-XMGXVMVS.js";export{RankedBars}from"../chunk-Y3XH4HJQ.js";export{ChartBrush}from"../chunk-TWWJLFTD.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-NIULZZAI.js";export{ChordChart}from"../chunk-7NEIYFM2.js";import"../chunk-C2FBUQJW.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-UWHGJTAL.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-EVKBV6IV.js";export{FunnelChart}from"../chunk-26DGOAPH.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{StepChain,StepChainItem}from"../chunk-BJKXFEZN.js";export{Markdown,Markdown as MarkdownLite}from"../chunk-2QI3QFX6.js";export{Banner}from"../chunk-TTE3GZWH.js";export{Textarea_default as Textarea}from"../chunk-AWY3F6PV.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{IconButton_default as IconButton}from"../chunk-JHDWTYZ4.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-JFSYWEHD.js";import"../chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"../chunk-JDCM2VHG.js";export{Result}from"../chunk-BXRWPGAT.js";import"../chunk-5A7MWTXX.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"../chunk-Y53KNQKL.js";export{ColoredBadge}from"../chunk-CJUN2VOD.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-CP6FITHO.js";export{Dialog}from"../chunk-OZ2ALRKX.js";import"../chunk-VWGWZY7A.js";import"../chunk-PKXQDCNR.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-2LKH6JM5.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-RAHIWTPJ.js";export{leavesContextMenuAlone}from"../chunk-GZCAFWWB.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";import"../chunk-QR4RM7PO.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-BOGBLZKS.js";export{useFocusTrap,useScrollLock}from"../chunk-CDAJKLGL.js";import"../chunk-QMQVOUIV.js";export{VERSION}from"../chunk-BXCWPHU6.js";export{Button_default as Button}from"../chunk-FSP63GKK.js";export{buttonClasses,iconButtonClasses}from"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";export{Icon}from"../chunk-C2HHGLLR.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";export{Tooltip}from"../chunk-Z3WKHMVB.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"../chunk-PGN5ME7B.js";export{Z_LAYERS}from"../chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{BoxPlotChart}from"../chunk-BGVN7HOZ.js";export{CandlestickChart}from"../chunk-B4LK7WL6.js";export{ChartTooltip}from"../chunk-P5BOTIJU.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-DTJRIWFR.js";export{CartesianPlot}from"../chunk-PPSIMRJM.js";import"../chunk-MG7A3R75.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"../chunk-2JWPNR2U.js";export{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"../chunk-TZFACUMR.js";export{registerModalEscapeInterceptor}from"../chunk-TWVUQUUD.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
2
+ import"../chunk-4MNNVSHD.js";export{GalleryTemplate}from"../chunk-5K3QLWUX.js";export{ELEVATION_LEVELS,RADIUS_ROLES}from"../chunk-MVP6Q6KV.js";export{BORDER_WIDTHS,FONT_WEIGHTS,MOTION_DURATIONS,TYPE_SCALE}from"../chunk-LH7IKIGE.js";export{ChatTemplate}from"../chunk-ZKRWJILC.js";export{CheckoutTemplate}from"../chunk-7QLI3HAO.js";export{DashboardTemplate}from"../chunk-CXDJXNPZ.js";export{DataTablePage}from"../chunk-EK3JM3J2.js";export{EmailTemplate}from"../chunk-C4YTKSXY.js";export{ErrorBoundary}from"../chunk-L42Q6GVA.js";export{ErrorPage}from"../chunk-O6TKI4F5.js";export{FormLayoutPage}from"../chunk-DKY6X24V.js";export{useTransferProgress}from"../chunk-QHOEMRR7.js";export{AuthScreen}from"../chunk-53XMYVJO.js";export{Tabs,tabButtonId,tabPanelId}from"../chunk-ELVFPH7Y.js";export{Paragraph,Text,Title}from"../chunk-5KUE6IHF.js";export{TimeAgo}from"../chunk-4AFNDOPF.js";export{TopNav}from"../chunk-L6CG37L3.js";export{Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam}from"../chunk-37S3WLBL.js";export{Skeleton}from"../chunk-4Z62SEA5.js";export{ListRow,SortableList}from"../chunk-2LTB2DSA.js";import"../chunk-JGZWAEOJ.js";export{Grid,Inline,Stack}from"../chunk-3RPER7VH.js";export{Statistic}from"../chunk-CTB634WT.js";export{Stepper}from"../chunk-HXXUMKTV.js";export{SettingReset}from"../chunk-VX4OBI4U.js";export{SettingRow}from"../chunk-BUDBBIKN.js";export{SidebarActionButton}from"../chunk-KMTCYDJH.js";export{SidebarLayout}from"../chunk-G34KXE2L.js";export{SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,SidebarSection}from"../chunk-HHXP34PV.js";import"../chunk-QWK6DRSN.js";export{MetricBar}from"../chunk-MH4EUGAB.js";export{isSeverityTone,severityOf}from"../chunk-TZFNWAED.js";export{MetricBarLegend}from"../chunk-YT32RSS6.js";import"../chunk-URBCGEXG.js";export{MilestoneTimeline}from"../chunk-6L7MMUMP.js";export{PageHeader}from"../chunk-VANXHWGP.js";export{POST_PRODUCTION_STATUSES,ProductionTimeline,STAGES,calcOverall,calcReportOverall,useProductionTimeline}from"../chunk-2KOXALIK.js";import"../chunk-SURSVJA2.js";export{TimelineTrack}from"../chunk-4CXQX5AX.js";export{DAY_MS,fmtSliderDate,toDayMs}from"../chunk-YDEIXM2A.js";export{ResizeHandle}from"../chunk-XSY22PWH.js";export{EmptyValue}from"../chunk-64WSMLXG.js";export{FloatingBar}from"../chunk-7OC3L4VZ.js";export{GlobalSearch,openGlobalSearch}from"../chunk-2VLQECPC.js";export{pushRecent as pushRecentSearch,sanitizeRecent as sanitizeRecentSearches}from"../chunk-WGRS6QBT.js";export{HelpCenter}from"../chunk-PG665FWX.js";export{IconRail,IconRailButton}from"../chunk-7OLYHD4V.js";import"../chunk-FQEALPZJ.js";export{LanguagePanel,LanguageSelect,languageSelectWidth}from"../chunk-U6FORQTI.js";export{DescriptionList}from"../chunk-SACUSHVN.js";export{Divider}from"../chunk-DFOFEBYX.js";export{Drawer}from"../chunk-XF2NZVXW.js";export{EditableGrid}from"../chunk-2TPUNCT7.js";import"../chunk-BR22X7E5.js";export{EmptyState}from"../chunk-XZLBPVRH.js";export{Breadcrumbs}from"../chunk-XTPDXB4X.js";export{BudgetBar,budgetState}from"../chunk-7KYFOYC7.js";export{Card,StatCard}from"../chunk-RD5UPROC.js";export{ContainerFillChart}from"../chunk-CP6Q24MP.js";export{ContextMenu,useContextMenu}from"../chunk-FEAOJLGA.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"../chunk-SDIGC5NU.js";export{Accordion,AccordionBody,AccordionHeading}from"../chunk-7IHH5CDD.js";export{CountBadge}from"../chunk-IJMV4F2Q.js";export{APP_UPDATE_POLL_MS,AppUpdateBanner,useAppUpdate}from"../chunk-55IY2ZJY.js";export{Avatar,AvatarGroup}from"../chunk-UL4WB3VH.js";export{BRAND_ICON_NAMES,ICON_NAMES,isBrandIconName,isIconName}from"../chunk-SXPBOX32.js";export{useClickOutside}from"../chunk-SI26KESU.js";export{useDebouncedValue}from"../chunk-SLGT5WPJ.js";export{CORNERS,CORNERS_FOR_THEME,applyCorners,applyIconSet,applyThemePrefs,cornersFor,resolveCorners,resolveTheme,useTheme}from"../chunk-4LXH6DCN.js";export{ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,loadIconSet}from"../chunk-VQCKMT5F.js";export{BRAND_MAX_HEIGHT,BRAND_MIN_HEIGHT_PX,brandBox}from"../chunk-64ACCUNN.js";export{TextToolbar,textToolbarRows,textToolbarWindowColumns}from"../chunk-YL44UDNT.js";export{TileButton_default as TileButton}from"../chunk-H2R4SNNO.js";export{TimePicker_default as TimePicker}from"../chunk-EDEQRSJC.js";export{WidthsBar}from"../chunk-7HPOALEV.js";export{COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,columnSharesWidths,resolveColumnShares,resolveColumnWidths}from"../chunk-PLGJOHEG.js";export{ShowWhen}from"../chunk-YEM4KYCW.js";export{SidesEachToggle,SidesInput,sidesStartEach}from"../chunk-UAXP4A2A.js";export{Slider,SliderGroup}from"../chunk-WCAQWHFD.js";export{Snippet}from"../chunk-7JKFXRAR.js";export{SplitButton_default as SplitButton}from"../chunk-JXOBORLD.js";export{DropdownMenu}from"../chunk-H3XEO4LR.js";export{Switch_default as Switch}from"../chunk-STA76WXF.js";export{TagInput}from"../chunk-L3VD25XR.js";export{MediaUploadGrid}from"../chunk-MSCILVJB.js";export{NumericKeypad}from"../chunk-5J6Y5TOO.js";export{MAX_FRACTION_DIGITS,appendKey,backspace}from"../chunk-VEPVOHCV.js";export{PictureTiles}from"../chunk-3YNRFMIN.js";export{PositionInput}from"../chunk-I7GWKMYO.js";export{RadioGroup}from"../chunk-TZSPJIP4.js";export{Radio_default as Radio}from"../chunk-NI5FXWK5.js";export{IconPicker}from"../chunk-BKWLFZHI.js";export{LinkPicker,TextLinkField}from"../chunk-Y5W6POQE.js";export{SearchableSelect}from"../chunk-DXQCNU5I.js";export{NativeSelect,Select_default as Select}from"../chunk-OJ3RN3BG.js";import"../chunk-EO5RLFRX.js";import"../chunk-TUT6SGH2.js";export{Input_default as Input}from"../chunk-UNEJ2ABD.js";export{Label,labelClasses}from"../chunk-EQKUFYX6.js";export{AttachButton,AttachmentDropZone,AttachmentList,ComposerAttachments,PaperclipGlyph}from"../chunk-J77ZVPF5.js";export{CornersInput}from"../chunk-OSRLZZDO.js";export{DatePicker_default as DatePicker}from"../chunk-EXU3ZXKB.js";export{DateRangePicker,toISODate}from"../chunk-UONWIAII.js";export{DateTimePicker_default as DateTimePicker}from"../chunk-QGU24ERZ.js";export{DisplayChips}from"../chunk-ZSTBFMQE.js";export{FilePicker_default as FilePicker}from"../chunk-UOOHE3FX.js";export{FormErrorSummary}from"../chunk-4B7ZRWDA.js";export{AlignmentGrid}from"../chunk-HPW6QAAY.js";export{BORDER_LINE_STYLES,BorderInput,borderSides,borderStartEach}from"../chunk-H62JMI7C.js";export{BrandAssetEditor}from"../chunk-LKSHI57C.js";export{MediaUploadField}from"../chunk-Z5UVBCEE.js";export{ImageFocusPoint}from"../chunk-PMJMPYLQ.js";export{FormField}from"../chunk-MVQBVPWP.js";export{mediaFileName}from"../chunk-CQXV3SJA.js";export{TransferProgress}from"../chunk-EZQXLIG3.js";export{Segmented}from"../chunk-BF2G42QU.js";import"../chunk-4G5VLI7E.js";export{BrandMark,resolveBrandMarkTreatment}from"../chunk-MI67DI3H.js";export{Calendar,fromKey as fromDateKey,toKey as toDateKey}from"../chunk-SNDYD76W.js";export{ColorPicker,ColorPickerPanel,ColorSwatch,HexInput,colorFill,colorSwatchClasses}from"../chunk-NRWIULLI.js";export{hexToHsv,hsvToHex,parseHexColor}from"../chunk-H245LLX4.js";export{Popover}from"../chunk-FND3BDOO.js";export{InputNumber_default as InputNumber}from"../chunk-FDIJEOGV.js";export{useInSettingRow,useSettingAuto}from"../chunk-E4Z5OXBI.js";export{DataTable}from"../chunk-B7IHOBK6.js";export{Checkbox_default as Checkbox}from"../chunk-CGZBDI6C.js";export{Kanban}from"../chunk-TYEXEETI.js";export{ListFooter}from"../chunk-ENSA3NAS.js";export{ListLoadError}from"../chunk-JZ7NBWGB.js";export{Pagination}from"../chunk-XKCEVZZB.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-VAACOJ2H.js";export{currencyDecimals,currencySymbol,formatBytes,formatMoney,setCurrencyFormats,timeAgo}from"../chunk-X2S2XDZI.js";export{addShowWhenFacts,isShown,lazyShowWhenContext,showWhenFactReaders,showWhenFactsContext,showWhenOf,shownForOption,truthy,withRowRules,withRowsShownWhen,withShowWhen,withShowWhenFacts}from"../chunk-HCP7WOAL.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"../chunk-25RR3GQW.js";export{DATE_FORMAT_OPTIONS,TZ_AUTO,firstDayOfWeek,formatDate,formatDateTime,formatTime,getUserDateFormat,getUserTimezone,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile}from"../chunk-5OTS2G3M.js";export{EMPTY_VALUE}from"../chunk-36BRD5J3.js";export{SankeyChart}from"../chunk-U5PXB4UW.js";export{SCATTER_SERIES_CAP,ScatterChart}from"../chunk-EDYCBXWD.js";export{StatTile}from"../chunk-TLZVEW34.js";export{Sparkline}from"../chunk-CKCDGSTC.js";export{SunburstChart}from"../chunk-EKHT4PDR.js";export{TimeSeriesChart}from"../chunk-LPYFS4RV.js";export{TreemapChart}from"../chunk-DSBLBBES.js";export{squarify}from"../chunk-46BYGPGD.js";export{WaterfallChart}from"../chunk-QQVLFDX6.js";export{HeatmapChart}from"../chunk-7GU3LUMW.js";export{HistogramChart}from"../chunk-YEY6YPTM.js";export{Meter}from"../chunk-CASSD64W.js";export{PieChart}from"../chunk-2DGTGJYJ.js";export{RADAR_SERIES_CAP,RadarChart}from"../chunk-DYSUTUH3.js";export{RadialBarChart}from"../chunk-7UEFFCQV.js";export{RangeChart}from"../chunk-XMGXVMVS.js";export{RankedBars}from"../chunk-Y3XH4HJQ.js";export{ChartBrush}from"../chunk-TWWJLFTD.js";export{ChartDot}from"../chunk-CK2YOGUS.js";export{ChartFrame}from"../chunk-NIULZZAI.js";export{ChordChart}from"../chunk-7NEIYFM2.js";import"../chunk-C2FBUQJW.js";export{arcPath,areaBetween,areaFrom,bumpPath,curvePath,linearPath,monotonePath,polygonPoints,splinePath,stepPath}from"../chunk-VFC6QUEN.js";export{ColumnChart}from"../chunk-UWHGJTAL.js";export{ChartDefs,MOTION,dashFor,fillFor,fillId,glowId,groundId,maskId,stagger}from"../chunk-465RRWBY.js";export{ChartSkeleton}from"../chunk-EVKBV6IV.js";export{FunnelChart}from"../chunk-26DGOAPH.js";export{ChartHighlightProvider,autoHighlightIndex,highlightOpacity,useHighlight}from"../chunk-CNYAHYE6.js";export{StepChain,StepChainItem}from"../chunk-ZEDYXP2J.js";export{Markdown,Markdown as MarkdownLite}from"../chunk-76YDO3KA.js";export{Banner}from"../chunk-UWNL4FO2.js";export{Textarea_default as Textarea}from"../chunk-AWY3F6PV.js";import"../chunk-UJUTS6LJ.js";export{isSafeLinkHref}from"../chunk-PJPK2ADX.js";export{IconButton_default as IconButton}from"../chunk-JHDWTYZ4.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"../chunk-JFSYWEHD.js";export{CONTROL_HEIGHTS,ROW_HEIGHTS,SPACING_ROLES,SPACING_SCALE,isSpacingStep}from"../chunk-AW7TOB6N.js";import"../chunk-KNUR2UEG.js";export{NEXT_CHUNK_PATH_PREFIX,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isStaleChunkError}from"../chunk-JDCM2VHG.js";export{Result}from"../chunk-LR2X6MKB.js";import"../chunk-5A7MWTXX.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,SHIFT,isMac}from"../chunk-Y53KNQKL.js";export{ColoredBadge}from"../chunk-JF45HC5H.js";export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"../chunk-RP4ZLTXA.js";export{Dialog}from"../chunk-Q7OGTJET.js";import"../chunk-VWGWZY7A.js";import"../chunk-PKXQDCNR.js";export{ShellPrefsProvider,useLocalStoragePrefs,useShellPrefs}from"../chunk-KC3EX26K.js";export{UNDOABLE_MS,toast_default as toast}from"../chunk-2LKH6JM5.js";export{PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu}from"../chunk-7IF3RZF3.js";export{leavesContextMenuAlone}from"../chunk-GZCAFWWB.js";export{useIsMobile}from"../chunk-UGTRSRIW.js";import"../chunk-QR4RM7PO.js";export{GROUP_COLORS,GROUP_COLORS_SOLID,StatusBadge,StatusBadgeProvider,groupColors,useStatusLabel}from"../chunk-BOGBLZKS.js";export{useFocusTrap,useScrollLock}from"../chunk-CDAJKLGL.js";import"../chunk-QMQVOUIV.js";export{VERSION}from"../chunk-KV5VLPII.js";export{Button_default as Button}from"../chunk-FSP63GKK.js";export{buttonClasses,iconButtonClasses}from"../chunk-K7U4RWXJ.js";import"../chunk-ABJ4LWOW.js";export{Icon}from"../chunk-VJPJNCB4.js";export{activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"../chunk-J75ZT2JQ.js";export{LoadingSpinner,SpinnerRing}from"../chunk-Q5MD3VY6.js";import"../chunk-MRJKZWWV.js";export{Tooltip}from"../chunk-Z3WKHMVB.js";export{OVERLAY_OPEN_EVENT,dismissPopups}from"../chunk-PGN5ME7B.js";export{Z_LAYERS}from"../chunk-62LW225J.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,placeMenu,popupBounds,useDropdownPosition}from"../chunk-T53TXXOC.js";import"../chunk-D65T4H6J.js";export{PortalBrandingProvider,resolvePortalBrandAsset,usePortalBranding}from"../chunk-ACYYVK6G.js";export{BoxPlotChart}from"../chunk-BGVN7HOZ.js";export{CandlestickChart}from"../chunk-B4LK7WL6.js";export{ChartTooltip}from"../chunk-P5BOTIJU.js";export{GLASS_DIVIDER,glassStyle,solidSurfaceStyle}from"../chunk-DTJRIWFR.js";export{CartesianPlot}from"../chunk-PPSIMRJM.js";import"../chunk-MG7A3R75.js";export{angleScale,bandScale,binValues,ladderScale,linearScale,logScale,niceAxis,niceMax,radiusScale}from"../chunk-2JWPNR2U.js";export{usePlotWidth}from"../chunk-MAFUXCPZ.js";export{CHART_INK,SERIES_SLOT_COUNT,SERIES_VARS,STATUS_VARS,assignSeriesSlots,resolveSeriesColor,resolveSeriesColorWithin,seriesColor,toggleSeriesSlot}from"../chunk-TZFACUMR.js";export{registerModalEscapeInterceptor}from"../chunk-TWVUQUUD.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"../chunk-OVNRVFWS.js";import"../chunk-C3QOHMR6.js";
package/dist/ui.css CHANGED
@@ -259,11 +259,12 @@
259
259
  --control-height-lg: 2.5rem;
260
260
 
261
261
  /* Row heights (Lewis, 2026-10-13): menu, list and sidebar rows, and the
262
- main window bar. An exception to the control ladder; controls stay on
263
- it. The compact app bar is a different, smaller bar Lewis did not pick:
264
- it stays 32. */
262
+ main window bar. The menu row is an exception to the control ladder;
263
+ controls stay on it. The main window bar is 40, the large control
264
+ height (Lewis, 2026-10-21). The compact app bar is a different, smaller
265
+ bar Lewis did not pick: it stays 32. */
265
266
  --row-height-menu: 2.25rem;
266
- --row-height-window-bar: 2rem;
267
+ --row-height-window-bar: var(--control-height-lg);
267
268
  --row-height-compact-bar: var(--control-height-md);
268
269
  }
269
270
 
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export{APP_VERSION,VERSION}from"./chunk-BXCWPHU6.js";
1
+ export{APP_VERSION,VERSION}from"./chunk-KV5VLPII.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-shell",
3
- "version": "8.11.0",
3
+ "version": "8.13.0",
4
4
  "description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",
@@ -1,29 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-HFEYQVKD.js";import{useWidgetSettings as n}from"./chunk-H7BP5LLG.js";import"./chunk-TPDOOCFS.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-BXRWPGAT.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-CJUN2VOD.js";import"./chunk-4A2X6KLQ.js";import"./chunk-CP6FITHO.js";import"./chunk-OZ2ALRKX.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-KC3EX26K.js";import"./chunk-RAHIWTPJ.js";import"./chunk-GZCAFWWB.js";import"./chunk-UGTRSRIW.js";import"./chunk-QR4RM7PO.js";import"./chunk-BOGBLZKS.js";import"./chunk-CDAJKLGL.js";import"./chunk-QMQVOUIV.js";import"./chunk-FSP63GKK.js";import"./chunk-K7U4RWXJ.js";import"./chunk-ABJ4LWOW.js";import{Icon as r}from"./chunk-C2HHGLLR.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-Z3WKHMVB.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-T53TXXOC.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-OVNRVFWS.js";import"./chunk-C3QOHMR6.js";import{useState as c,useRef as i,useCallback as l,useEffect as o}from"react";import{jsxs as s,Fragment as a,jsx as u}from"react/jsx-runtime";var h="calc_appearance";function m(){const[m,k]=c("0"),[p,d]=c(null),[b,g]=c(null),[j,N]=c(!1),[y,x]=c(""),[C,f]=c([]),[v,$]=c(!1),[W,T]=c(()=>e(h)),[R,K]=c(!1),[L,w]=c(W),E=i(null);n(l(()=>{w({...W}),K(!0)},[W]));const O=l(e=>{x(""),k(t=>j||"0"===t?(N(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[j]),A=l(()=>{k("0"),d(null),g(null),N(!1)},[]),J=l((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),S=l(e=>{const t=parseFloat(m);if(null!==p&&b&&!j){const e=J(p,t,b);k(String(e)),d(e),f(n=>[`${p} ${b} ${t} = ${e}`,...n].slice(0,20))}else d(t);g(e),N(!0)},[m,p,b,j,J]),D=l(()=>{if(null===p||!b)return;const e=parseFloat(m),t=J(p,e,b),n=`${p} ${b} ${e} =`;f(e=>[`${n} ${t}`,...e].slice(0,20)),x(n),k(String(t)),d(null),g(null),N(!0)},[m,p,b,J]),F=l(()=>{k(e=>String(parseFloat(e)/100))},[]),G=l(()=>{k(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);o(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?O(e.key):"."===e.key?O("."):"+"===e.key?S("+"):"-"===e.key?S("-"):"*"===e.key?S("×"):"/"===e.key?(e.preventDefault(),S("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&E.current?.contains(e.target)&&e.preventDefault(),D()):"Escape"===e.key?A():"Backspace"===e.key?k(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&F())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[O,S,D,A,F]);const V="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",B=`${V} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,Q=`${V} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,X=`${V} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,H=`${V} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
2
- return s(a,{children:[
3
- /* @__PURE__ */s("div",{ref:E,className:"flex flex-col h-full",style:{opacity:W.activeOpacity/100,backdropFilter:W.activeBlur>0?`blur(${W.activeBlur}px)`:void 0},children:[
4
- /* @__PURE__ */s("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
5
- /* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:C.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(y||b&&null!==p)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:y||`${p} ${b} ${j?"":m}`}),
6
- /* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(m),$(!0),setTimeout(()=>$(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,v?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
8
- /* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(m)})]})]}),
9
- /* @__PURE__ */s("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
10
- /* @__PURE__ */u("button",{onClick:A,className:X,children:"AC"}),
11
- /* @__PURE__ */u("button",{onClick:G,className:X,children:"+/−"}),
12
- /* @__PURE__ */u("button",{onClick:F,className:X,children:"%"}),
13
- /* @__PURE__ */u("button",{onClick:()=>S("÷"),className:`${Q} ${"÷"===b?"ring-2 ring-blue-400":""}`,children:"÷"}),
14
- /* @__PURE__ */u("button",{onClick:()=>O("7"),className:B,children:"7"}),
15
- /* @__PURE__ */u("button",{onClick:()=>O("8"),className:B,children:"8"}),
16
- /* @__PURE__ */u("button",{onClick:()=>O("9"),className:B,children:"9"}),
17
- /* @__PURE__ */u("button",{onClick:()=>S("×"),className:`${Q} ${"×"===b?"ring-2 ring-blue-400":""}`,children:"×"}),
18
- /* @__PURE__ */u("button",{onClick:()=>O("4"),className:B,children:"4"}),
19
- /* @__PURE__ */u("button",{onClick:()=>O("5"),className:B,children:"5"}),
20
- /* @__PURE__ */u("button",{onClick:()=>O("6"),className:B,children:"6"}),
21
- /* @__PURE__ */u("button",{onClick:()=>S("-"),className:`${Q} ${"-"===b?"ring-2 ring-blue-400":""}`,children:"−"}),
22
- /* @__PURE__ */u("button",{onClick:()=>O("1"),className:B,children:"1"}),
23
- /* @__PURE__ */u("button",{onClick:()=>O("2"),className:B,children:"2"}),
24
- /* @__PURE__ */u("button",{onClick:()=>O("3"),className:B,children:"3"}),
25
- /* @__PURE__ */u("button",{onClick:()=>S("+"),className:`${Q} ${"+"===b?"ring-2 ring-blue-400":""}`,children:"+"}),
26
- /* @__PURE__ */u("button",{onClick:()=>O("0"),className:`${B} col-span-2`,children:"0"}),
27
- /* @__PURE__ */u("button",{onClick:()=>O("."),className:B,children:"."}),
28
- /* @__PURE__ */u("button",{onClick:D,className:H,children:"="})]})]}),
29
- /* @__PURE__ */u(t,{open:R,onClose:()=>K(!1),title:"Calculator Settings",appearance:L,onAppearanceChange:w,onSave:()=>{T(L),localStorage.setItem(h,JSON.stringify(L)),K(!1)}})]})}export{m as default};
@@ -1,21 +0,0 @@
1
- import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-HFEYQVKD.js";import{useWidgetSettings as r}from"./chunk-H7BP5LLG.js";import"./chunk-TPDOOCFS.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-BXRWPGAT.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-CJUN2VOD.js";import"./chunk-4A2X6KLQ.js";import"./chunk-CP6FITHO.js";import"./chunk-OZ2ALRKX.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-KC3EX26K.js";import"./chunk-RAHIWTPJ.js";import"./chunk-GZCAFWWB.js";import"./chunk-UGTRSRIW.js";import"./chunk-QR4RM7PO.js";import"./chunk-BOGBLZKS.js";import"./chunk-CDAJKLGL.js";import"./chunk-QMQVOUIV.js";import"./chunk-FSP63GKK.js";import"./chunk-K7U4RWXJ.js";import"./chunk-ABJ4LWOW.js";import"./chunk-C2HHGLLR.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as n}from"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-Z3WKHMVB.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-T53TXXOC.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-OVNRVFWS.js";import"./chunk-C3QOHMR6.js";import{useState as s,useCallback as a,useEffect as o}from"react";import{jsxs as c,Fragment as i,jsx as l}from"react/jsx-runtime";var m=["USD","CNY","AUD","GBP","EUR","JPY","CAD","THB","NZD","SGD","HKD","CHF","KRW","INR","MXN","BRL"],u=[["USD","CNY"],["USD","AUD"],["GBP","USD"],["USD","JPY"]],p="currency_pairs",h="currency_appearance",d="currency_rates_cache";function g(e){try{const t=JSON.parse(localStorage.getItem(d)||"{}")[e];if(t&&Date.now()-t.timestamp<36e5)return t.rates}catch{}return null}function k(e,t){try{const r=JSON.parse(localStorage.getItem(d)||"{}");r[e]={rates:t,timestamp:Date.now()},localStorage.setItem(d,JSON.stringify(r))}catch{}}function f(){try{const e=JSON.parse(localStorage.getItem(p)||"");if(Array.isArray(e)&&e.length)return e.slice(0,4)}catch{}return u}var N={USD:"🇺🇸",CNY:"🇨🇳",AUD:"🇦🇺",GBP:"🇬🇧",JPY:"🇯🇵",CAD:"🇨🇦",EUR:"🇪🇺",THB:"🇹🇭",NZD:"🇳🇿",SGD:"🇸🇬",HKD:"🇭🇰",CHF:"🇨🇭",KRW:"🇰🇷",INR:"🇮🇳",MXN:"🇲🇽",BRL:"🇧🇷"};function j(){const[u,d]=s(f),[j,y]=s(()=>e(h)),[x,b]=s({}),[D,S]=s(!1),[C,v]=s(!1),[R,J]=s([]),[U,W]=s(j),[K,O]=s("USD"),[L,A]=s("CNY");r(a(()=>{J([...u]),W({...j}),v(!0)},[u,j])),o(()=>{const e=[...new Set(u.map(([e])=>e))];let t=!0;return async function(){S(!0);const r={};for(const t of e){const e=g(t);if(e)r[t]=e;else try{const e=await fetch(`https://open.er-api.com/v6/latest/${t}`),n=await e.json();n.rates&&(r[t]=n.rates,k(t,n.rates))}catch{}}t&&(b(r),S(!1))}(),()=>{t=!1}},[u]);/* @__PURE__ */
2
- return c(i,{children:[
3
- /* @__PURE__ */l("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${j.activeOpacity/100})`,backdropFilter:j.activeBlur>0?`blur(${j.activeBlur}px)`:void 0},children:/* @__PURE__ */c("div",{className:"px-4 py-3 space-y-1",children:[D&&/* @__PURE__ */l(n,{size:"sm",padding:"py-4",label:"Loading rates"}),u.map(([e,t],r)=>{const n=x[e]?.[t];/* @__PURE__ */
4
- return c("button",{onClick:()=>{const e=u.map((e,t)=>t===r?[e[1],e[0]]:e);d(e),localStorage.setItem(p,JSON.stringify(e))},className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0 w-full hover:bg-gray-100 rounded transition-colors cursor-pointer",children:[
5
- /* @__PURE__ */c("div",{className:"flex items-center gap-2",children:[
6
- /* @__PURE__ */l("span",{className:"text-base",children:N[e]||""}),
7
- /* @__PURE__ */l("span",{className:"text-sm font-semibold text-gray-700",children:e}),
8
- /* @__PURE__ */l("svg",{className:"h-3 w-3 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */l("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"})}),
9
- /* @__PURE__ */l("span",{className:"text-base",children:N[t]||""}),
10
- /* @__PURE__ */l("span",{className:"text-sm font-semibold text-gray-700",children:t})]}),
11
- /* @__PURE__ */l("div",{className:"text-base font-mono font-semibold text-gray-900 tabular-nums",children:null!=n?n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:4}):"—"})]},`${e}-${t}-${r}`)})]})}),
12
- /* @__PURE__ */l(t,{open:C,onClose:()=>v(!1),title:"Currency Settings",appearance:U,onAppearanceChange:W,onSave:()=>{if(0===R.length)return;const e=R.slice(0,4);d(e),y(U),localStorage.setItem(p,JSON.stringify(e)),localStorage.setItem(h,JSON.stringify(U)),v(!1)},children:/* @__PURE__ */c("div",{children:[
13
- /* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:["Currency Pairs ",
14
- /* @__PURE__ */c("span",{className:"text-2xs font-normal text-gray-400",children:["(",R.length,"/",4,")"]})]}),
15
- /* @__PURE__ */l("div",{className:"space-y-1 mb-2",children:R.map(([e,t],r)=>/* @__PURE__ */c("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
16
- /* @__PURE__ */c("span",{className:"text-sm",children:[N[e]||""," ",e," → ",N[t]||""," ",t]}),
17
- /* @__PURE__ */l("button",{onClick:()=>J(e=>e.filter((e,t)=>t!==r)),className:"text-red-400 hover:text-red-600",children:"×"})]},r))}),R.length<4?/* @__PURE__ */c("div",{className:"flex items-center gap-2",children:[
18
- /* @__PURE__ */l("select",{value:K,onChange:e=>O(e.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(e=>/* @__PURE__ */l("option",{children:e},e))}),
19
- /* @__PURE__ */l("span",{className:"text-gray-400",children:"→"}),
20
- /* @__PURE__ */l("select",{value:L,onChange:e=>A(e.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(e=>/* @__PURE__ */l("option",{children:e},e))}),
21
- /* @__PURE__ */l("button",{onClick:()=>{K!==L&&R.length<4&&J(e=>[...e,[K,L]])},className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */c("p",{className:"text-2xs text-gray-400 italic",children:["Max ",4," pairs — remove one to add another."]})]})})]})}export{j as default};
@@ -1,87 +0,0 @@
1
- import{openPreviewFile as e}from"./chunk-C4D4L2E5.js";import{SidebarLayout as t}from"./chunk-JK3QY266.js";import"./chunk-QWK6DRSN.js";import"./chunk-XSY22PWH.js";import{Breadcrumbs as r}from"./chunk-BKV6PH3R.js";import{formatBytes as a}from"./chunk-X2S2XDZI.js";import"./chunk-5OTS2G3M.js";import"./chunk-36BRD5J3.js";import{getFilesDemoTree as n}from"./chunk-OIVLPNOR.js";import{AboutApp as s}from"./chunk-XFJRD3HE.js";import{peekFilesViewRequest as i,consumeFilesViewRequest as o,FILES_SHOW_TRASH_EVENT as l,FILES_OPEN_DESKTOP_FOLDER_EVENT as c,subscribeDesktopFolders as d,getDesktopFoldersSnapshot as m,FolderGlyph as h,DesktopItemMiniIcon as p,desktopItemTypeLabel as u}from"./chunk-O4NTKMC5.js";import"./chunk-ESL5TDNA.js";import"./chunk-VTVSMRFX.js";import{useWindowManager as f,WindowTitle as x}from"./chunk-H7BP5LLG.js";import"./chunk-TPDOOCFS.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-BXRWPGAT.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-CJUN2VOD.js";import"./chunk-4A2X6KLQ.js";import{confirm as g,prompt as y}from"./chunk-CP6FITHO.js";import"./chunk-OZ2ALRKX.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-KC3EX26K.js";import{toast_default as b}from"./chunk-2LKH6JM5.js";import"./chunk-RAHIWTPJ.js";import"./chunk-GZCAFWWB.js";import"./chunk-UGTRSRIW.js";import"./chunk-QR4RM7PO.js";import"./chunk-BOGBLZKS.js";import"./chunk-CDAJKLGL.js";import{TH_ONE_LINE as k}from"./chunk-QMQVOUIV.js";import"./chunk-BXCWPHU6.js";import"./chunk-FSP63GKK.js";import"./chunk-K7U4RWXJ.js";import"./chunk-ABJ4LWOW.js";import{Icon as N}from"./chunk-C2HHGLLR.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as w}from"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-Z3WKHMVB.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-T53TXXOC.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-OVNRVFWS.js";import"./chunk-C3QOHMR6.js";import{useState as v,useEffect as j,useSyncExternalStore as $,useRef as C,useCallback as L}from"react";import{jsxs as D,jsx as R,Fragment as T}from"react/jsx-runtime";var E="undefined"!=typeof window&&window.__REACT_OS_SHELL_FILE_SERVER__||"http://localhost:4000",W={pdf:"pdf",dxf:"dxf",csv:"csv",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",avif:"image",bmp:"image",stp:"3d",step:"3d",stl:"3d",obj:"3d",gltf:"3d",glb:"3d","3mf":"3d",iges:"3d",igs:"3d",ply:"3d",fbx:"3d"};function P(e,t){return"/"===e||""===e?"/"+t:e.replace(/\/$/,"")+"/"+t}function O(e){if(!e)return"—";try{const t=new Date(e);return isNaN(t.getTime())?"—":t.toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return e}}function S(){const S=E.replace(/\/$/,""),M=null!==n(),[F,I]=v("/"),[A,K]=v([]),[U,V]=v([]),[J,H]=v(null),[B,X]=v(!0),[G,Q]=v(!1),[z,Z]=v(null),[_,Y]=v(!1),[q,ee]=v(()=>{const e=i();return"trash"===e?"trash":e?{desktopFolderId:e.folderId}:"files"});j(()=>{o()},[]);const[te,re]=v([]);j(()=>{const e=()=>{o(),ee("trash")},t=e=>{o();const t=e.detail?.folderId;t&&ee({desktopFolderId:t})};return window.addEventListener(l,e),window.addEventListener(c,t),()=>{window.removeEventListener(l,e),window.removeEventListener(c,t)}},[]);const ae=$(d,m,m),ne="object"==typeof q?q.desktopFolderId:null,se=ne?ae?.folders.find(e=>e.id===ne)??null:null,ie=ne&&ae?.itemsByFolder[ne]||[];j(()=>{ne&&ae&&!ae.folders.some(e=>e.id===ne)&&ee("files")},[ne,ae]);const oe=C(0),le=C(null),{openPage:ce,openEntity:de}=f(),me=t=>{"preview-file"===t.entityType&&t.filePath&&t.fileKind?e({filePath:t.filePath,filename:t.label,kind:t.fileKind,onStaged:e=>ce(e)}):"page"===t.entityType?ce(t.entityId):de(t.entityType,t.entityId,null,t.label)},he=L((e,t={})=>fetch(e,{...t,credentials:"include"}),[]),pe=L(async()=>{try{const e=await he(`${S}/api/quota`);if(e.ok){const t=await e.json();Z({used:t.used,limit:t.limit})}}catch{}},[he,S]),ue=L(async e=>{if(H(null),M){const t=function(e){const t=n();if(!t)return[];let r=t;for(const t of e.split("/").filter(Boolean)){const e=r.find(e=>"folder"===e.kind&&e.name===t);if(!e||!e.children)return[];r=e.children}return r.map(e=>({name:e.name,kind:e.kind,size:e.size??0,modifiedAt:e.modifiedAt??""}))}(e);return K(t),I(e),Q(!1),X(!1),void("/"===e&&V(t.filter(e=>"folder"===e.kind).map(e=>e.name)))}X(!0);try{const t=await he(`${S}/api/files?path=${encodeURIComponent(e)}`);if(!t.ok){const e=await t.json().catch(()=>({}));return void b.error(e.error||`Failed to list (${t.status})`)}const r=await t.json(),a=r.entries||[];K(a),I(r.path||e),Q(!1),"/"===(r.path||e)&&V(a.filter(e=>"folder"===e.kind).map(e=>e.name))}catch(e){Q(!0)}finally{X(!1)}pe()},[he,S,pe,M]),fe=L(async()=>{if(M)return re([]),void X(!1);X(!0),H(null);try{const e=await he(`${S}/api/trash`);if(!e.ok){const t=await e.json().catch(()=>({}));return void b.error(t.error||`Failed to list trash (${e.status})`)}const t=await e.json();re(t.entries||[]),Q(!1)}catch{Q(!0)}finally{X(!1)}pe()},[he,S,pe,M]);j(()=>{"files"===q?ue(F):"trash"===q&&fe()},[F,q]);const xe=async e=>{const t=P(F,e.name);try{const r=await he(`${S}/api/file?path=${encodeURIComponent(t)}`);if(!r.ok)return void b.error(`Download failed (${r.status})`);const a=await r.blob(),n=URL.createObjectURL(a),s=document.createElement("a");s.href=n,s.download=e.name,s.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}catch(e){b.error(e?.message||"Download failed")}},ge=async e=>{const t=Array.from(e);for(const e of t){const t=new FormData;t.append("file",e);try{const r=await he(`${S}/api/upload?path=${encodeURIComponent(F)}`,{method:"POST",body:t});if(!r.ok){const t=await r.json().catch(()=>({}));if(413===r.status){const r=Math.max(0,(t.limit||0)-(t.used||0));b.error(`Quota exceeded — ${a(r)} free, ${e.name} is ${a(t.attempted||e.size)}`)}else b.error(`Upload ${e.name}: ${t.error||r.status}`)}}catch(t){b.error(`Upload ${e.name}: ${t?.message||"failed"}`)}}ue(F)},ye=()=>{oe.current=0,Y(!1)};if(j(()=>{const e=()=>ye();return window.addEventListener("dragend",e),window.addEventListener("drop",e),()=>{window.removeEventListener("dragend",e),window.removeEventListener("drop",e)}},[]),G)/* @__PURE__ */
2
- return D("div",{className:"flex flex-col h-full bg-white",children:[
3
- /* @__PURE__ */R(x,{title:"Files - offline"}),
4
- /* @__PURE__ */R("div",{className:"flex-1 flex items-center justify-center p-8 text-center",children:/* @__PURE__ */D("div",{className:"max-w-md",children:[
5
- /* @__PURE__ */R(N,{name:"close-circle",className:"h-12 w-12 mx-auto text-gray-300 mb-3",strokeWidth:1.4}),
6
- /* @__PURE__ */R("h3",{className:"text-base font-semibold text-gray-800 mb-1",children:"Can't reach the file server"}),
7
- /* @__PURE__ */D("p",{className:"text-sm text-gray-500 mb-3",children:["No response from ",
8
- /* @__PURE__ */R("span",{className:"font-mono",children:S}),". Make sure the server is running — see ",
9
- /* @__PURE__ */R("span",{className:"font-mono",children:"examples/file-server/README.md"}),"."]}),
10
- /* @__PURE__ */R("button",{onClick:()=>ue(F),className:"px-3 h-8 text-sm bg-blue-500 text-white rounded hover:bg-blue-600",children:"Retry"})]})})]});const be="/"===F?[]:F.split("/").filter(Boolean),ke=z&&z.limit>0?Math.min(100,Math.round(z.used/z.limit*100)):0,Ne=ke>90?"bg-red-500":ke>75?"bg-amber-500":"bg-blue-500",we=[{label:"My files",onClick:()=>I("/")},...be.map((e,t)=>({label:e,onClick:()=>I("/"+be.slice(0,t+1).join("/"))}))],ve=e=>"flex w-full items-center gap-2 rounded-md px-3 min-h-(--row-height-menu) py-2 text-left text-sm transition-colors "+(e?"bg-blue-50 font-medium text-blue-700":"text-gray-700 hover:bg-gray-100"),je=e=>/* @__PURE__ */R("svg",{className:"h-4 w-4 shrink-0 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.6,children:/* @__PURE__ */R("path",{strokeLinecap:"round",strokeLinejoin:"round",d:e})}),$e=/* @__PURE__ */D("nav",{className:"p-2",children:[
11
- /* @__PURE__ */R("div",{className:"px-2 py-2 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:"Locations"}),
12
- /* @__PURE__ */D("button",{onClick:()=>{ee("files"),I("/")},className:ve("files"===q&&"/"===F),children:[je("M2.25 12l8.954-8.955a1.5 1.5 0 012.122 0L21.75 12M4.5 9.75v9.75a.75.75 0 00.75.75H9V15a.75.75 0 01.75-.75h4.5A.75.75 0 0115 15v5.25h3.75a.75.75 0 00.75-.75V9.75"),"My files"]}),U.map(e=>/* @__PURE__ */D("button",{onClick:()=>{ee("files"),I("/"+e)},className:ve("files"===q&&F==="/"+e),children:[je("M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"),
13
- /* @__PURE__ */R("span",{className:"truncate",children:e})]},e)),!M&&/* @__PURE__ */D("button",{onClick:()=>ee("trash"),className:ve("trash"===q),children:[je("M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79"),"Trash"]}),ae&&ae.folders.length>0&&/* @__PURE__ */D(T,{children:[
14
- /* @__PURE__ */R("div",{className:"px-2 pt-3 pb-2 text-2xs font-semibold uppercase tracking-wide text-gray-400",children:"Desktop"}),ae.folders.map(e=>/* @__PURE__ */D("button",{onClick:()=>ee({desktopFolderId:e.id}),className:ve(ne===e.id),children:[
15
- /* @__PURE__ */R(h,{className:"h-4 w-4 shrink-0 text-amber-500"}),
16
- /* @__PURE__ */R("span",{className:"truncate",children:e.name}),e.itemCount>0&&/* @__PURE__ */R("span",{className:"ml-auto text-2xs text-gray-400 tabular-nums",children:e.itemCount})]},e.id))]})]});/* @__PURE__ */
17
- return D("div",{className:"relative flex flex-col h-full bg-white",onDragEnter:e=>{M||"object"==typeof q||e.dataTransfer?.types?.includes?.("Files")&&(e.preventDefault(),oe.current++,_||Y(!0))},onDragOver:e=>{e.dataTransfer?.types?.includes?.("Files")&&e.preventDefault()},onDragLeave:()=>{oe.current>0&&oe.current--,0===oe.current&&Y(!1)},onDrop:e=>{e.preventDefault(),ye(),M||"object"==typeof q||e.dataTransfer.files?.length&&ge(e.dataTransfer.files)},children:[
18
- /* @__PURE__ */R(x,{title:se?`Files - ${se.name}`:"Files"+("/"===F?"":" - "+F)}),
19
- /* @__PURE__ */R(s,{app:"files"}),
20
- /* @__PURE__ */R("input",{ref:le,type:"file",multiple:!0,className:"hidden",onChange:e=>{e.target.files?.length&&ge(e.target.files),le.current&&(le.current.value="")}}),
21
- /* @__PURE__ */R("div",{className:"flex-1 min-h-0",children:/* @__PURE__ */R(t,{sidebar:$e,storageKey:"files.sidebarWidth",defaultWidth:200,minWidth:150,maxWidth:320,children:/* @__PURE__ */D("div",{className:"flex h-full min-w-0 flex-col",children:[
22
- /* @__PURE__ */D("div",{className:"flex items-center gap-1 px-2 py-2 border-b border-gray-200 bg-gray-50 shrink-0 text-xs",children:[/* @__PURE__ */D(T,"files"===q?{children:[
23
- /* @__PURE__ */R("button",{onClick:()=>I(function(e){if("/"===e||""===e)return"/";const t=e.replace(/\/$/,""),r=t.lastIndexOf("/");return r<=0?"/":t.slice(0,r)}(F)),disabled:"/"===F,className:"px-2 py-1 rounded hover:bg-gray-200 disabled:opacity-30 text-gray-600",title:"Parent folder",children:/* @__PURE__ */R(N,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
24
- /* @__PURE__ */R("div",{className:"flex-1 min-w-0",children:/* @__PURE__ */R(r,{items:we,maxItems:5})}),
25
- /* @__PURE__ */R("button",{onClick:()=>ue(F),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */R(N,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),!M&&/* @__PURE__ */D(T,{children:[
26
- /* @__PURE__ */D("button",{onClick:()=>ee("trash"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",title:"Open trash",children:[
27
- /* @__PURE__ */R(N,{name:"trash",className:"h-3.5 w-3.5",strokeWidth:1.5}),"Trash"]}),
28
- /* @__PURE__ */D("button",{onClick:async()=>{const e=await y({title:"New folder",placeholder:"Folder name",confirmLabel:"Create"});if(!e)return;if(/[\\/]/.test(e))return void b.error("Folder names cannot contain slashes");const t=P(F,e),r=await he(`${S}/api/folder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:t})});if(!r.ok){const e=await r.json().catch(()=>({}));return void b.error(e.error||`Create folder failed (${r.status})`)}ue(F)},className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600 flex items-center gap-1",children:[
29
- /* @__PURE__ */R(N,{name:"folder-plus",className:"h-3.5 w-3.5",strokeWidth:1.5}),"New Folder"]}),
30
- /* @__PURE__ */D("button",{onClick:()=>le.current?.click(),className:"px-2 py-1 rounded bg-blue-500 text-white hover:bg-blue-600 flex items-center gap-1",children:[
31
- /* @__PURE__ */R(N,{name:"upload",className:"h-3.5 w-3.5",strokeWidth:1.8}),"Upload"]})]})]}:"trash"===q?{children:[
32
- /* @__PURE__ */R("button",{onClick:()=>ee("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */R(N,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
33
- /* @__PURE__ */R("span",{className:"flex-1 text-gray-700 font-medium px-2",children:"Trash"}),
34
- /* @__PURE__ */R("button",{onClick:fe,className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Refresh",children:/* @__PURE__ */R(N,{name:"refresh",className:"h-3.5 w-3.5",strokeWidth:1.8})}),
35
- /* @__PURE__ */R("button",{onClick:async()=>{if(0===te.length)return;if(!await g({title:"Empty trash",message:`${te.length} item${1===te.length?"":"s"} will be permanently removed. This can't be undone.`,confirmLabel:"Empty trash",variant:"danger"}))return;const e=await he(`${S}/api/trash`,{method:"DELETE"});if(!e.ok){const t=await e.json().catch(()=>({}));return void b.error(t.error||`Empty trash failed (${e.status})`)}fe()},disabled:0===te.length,className:"px-2 py-1 rounded text-red-600 hover:bg-red-50 disabled:opacity-30 flex items-center gap-1",children:"Empty trash"})]}:{children:[
36
- /* @__PURE__ */R("button",{onClick:()=>ee("files"),className:"px-2 py-1 rounded hover:bg-gray-200 text-gray-600",title:"Back to files",children:/* @__PURE__ */R(N,{name:"arrow-left",className:"h-3.5 w-3.5",strokeWidth:2})}),
37
- /* @__PURE__ */R(h,{className:"h-4 w-4 text-amber-500 ml-1"}),
38
- /* @__PURE__ */R("span",{className:"flex-1 text-gray-700 font-medium px-1 truncate",children:se?.name??"Desktop folder"}),
39
- /* @__PURE__ */R("span",{className:"text-2xs text-gray-400 px-2",children:"Desktop shortcuts"})]}),z&&/* @__PURE__ */D(T,{children:[
40
- /* @__PURE__ */R("div",{className:"h-4 w-px bg-gray-300 mx-1"}),
41
- /* @__PURE__ */D("div",{className:"flex items-center gap-2",title:`${a(z.used)} of ${a(z.limit)} used`,children:[
42
- /* @__PURE__ */R("div",{className:"w-20 h-1.5 rounded-full bg-gray-200 overflow-hidden",children:/* @__PURE__ */R("div",{className:`h-full ${Ne} transition-all`,style:{width:`${ke}%`}})}),
43
- /* @__PURE__ */D("span",{className:"text-2xs text-gray-500 tabular-nums whitespace-nowrap",children:[a(z.used)," / ",a(z.limit)]})]})]})]}),
44
- /* @__PURE__ */R("div",{className:"flex-1 overflow-auto",children:"object"==typeof q?0===ie.length?/* @__PURE__ */R("div",{className:"p-10 text-center text-sm text-gray-400",children:"This desktop folder is empty. Drag shortcuts onto it on the desktop."}):/* @__PURE__ */D("table",{className:"w-full text-sm",children:[
45
- /* @__PURE__ */R("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */D("tr",{children:[
46
- /* @__PURE__ */R("th",{className:`${k} text-left font-medium px-3 h-8`,children:"Name"}),
47
- /* @__PURE__ */R("th",{className:`${k} text-left font-medium px-3 h-8 w-28`,children:"Type"}),
48
- /* @__PURE__ */R("th",{className:`${k} w-56`})]})}),
49
- /* @__PURE__ */R("tbody",{children:ie.map(e=>{const t=`${e.entityType}|${e.entityId}`;/* @__PURE__ */
50
- return D("tr",{onClick:()=>H(t),onDoubleClick:()=>me(e),className:"cursor-default border-b border-gray-100 "+(J===t?"bg-blue-50":"hover:bg-gray-50"),children:[
51
- /* @__PURE__ */D("td",{className:"px-3 h-8 flex items-center gap-2",children:[
52
- /* @__PURE__ */R(p,{item:e}),
53
- /* @__PURE__ */R("span",{className:"truncate",title:e.label,children:e.label})]}),
54
- /* @__PURE__ */R("td",{className:"px-3 h-8 text-xs text-gray-500",children:u(e)}),
55
- /* @__PURE__ */D("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
56
- /* @__PURE__ */R("button",{onClick:t=>{t.stopPropagation(),me(e)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Open"}),
57
- /* @__PURE__ */R("button",{onClick:t=>{t.stopPropagation(),ae?.moveToDesktop([e])},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs ml-1",children:"Move to desktop"}),
58
- /* @__PURE__ */R("button",{onClick:t=>{t.stopPropagation(),ae?.removeShortcuts([e])},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Remove"})]})]},t)})})]}):"trash"===q?B&&0===te.length?/* @__PURE__ */R(w,{size:"sm",padding:"p-6",label:"Loading"}):0===te.length?/* @__PURE__ */R("div",{className:"p-10 text-center text-sm text-gray-400",children:"Trash is empty."}):/* @__PURE__ */D("table",{className:"w-full text-sm",children:[
59
- /* @__PURE__ */R("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */D("tr",{children:[
60
- /* @__PURE__ */R("th",{className:`${k} text-left font-medium px-3 h-8`,children:"Name"}),
61
- /* @__PURE__ */R("th",{className:`${k} text-left font-medium px-3 h-8`,children:"Original location"}),
62
- /* @__PURE__ */R("th",{className:`${k} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
63
- /* @__PURE__ */R("th",{className:`${k} text-right font-medium px-3 h-8 w-40`,children:"Deleted"}),
64
- /* @__PURE__ */R("th",{className:`${k} w-44`})]})}),
65
- /* @__PURE__ */R("tbody",{children:te.map(e=>/* @__PURE__ */D("tr",{className:"border-b border-gray-100 hover:bg-gray-50",children:[
66
- /* @__PURE__ */D("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===e.kind?/* @__PURE__ */R(N,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */R(N,{name:"page",className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
67
- /* @__PURE__ */R("span",{className:"truncate",title:e.name,children:e.name})]}),
68
- /* @__PURE__ */R("td",{className:"px-3 h-8 text-gray-500 text-xs font-mono truncate",title:e.originalPath,children:e.originalPath||"—"}),
69
- /* @__PURE__ */R("td",{className:"px-3 h-8 text-right tabular-nums text-gray-500",children:a(e.size)}),
70
- /* @__PURE__ */R("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:e.deletedAt?O(e.deletedAt):"—"}),
71
- /* @__PURE__ */D("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:[
72
- /* @__PURE__ */R("button",{onClick:()=>(async e=>{const t=await he(`${S}/api/trash/restore`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})});if(!t.ok){const e=await t.json().catch(()=>({}));return void b.error(e.error||`Restore failed (${t.status})`)}b.success(`Restored "${e.name}"`),fe()})(e),className:"px-2 py-0.5 rounded hover:bg-gray-200 text-blue-600 text-2xs",children:"Restore"}),
73
- /* @__PURE__ */R("button",{onClick:()=>(async e=>{if(!await g({title:"Permanently delete",message:`"${e.name}" will be permanently removed. This can't be undone.`,confirmLabel:"Delete forever",variant:"danger"}))return;const t=await he(`${S}/api/trash/${encodeURIComponent(e.id)}`,{method:"DELETE"});if(!t.ok){const e=await t.json().catch(()=>({}));return void b.error(e.error||`Delete failed (${t.status})`)}fe()})(e),className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete forever"})]})]},e.id))})]}):B&&0===A.length?/* @__PURE__ */R(w,{size:"sm",padding:"p-6",label:"Loading"}):0===A.length?/* @__PURE__ */D("div",{className:"p-10 text-center text-sm text-gray-400",children:["Empty folder.",!M&&/* @__PURE__ */D(T,{children:[" Drop files here or click ",
74
- /* @__PURE__ */R("span",{className:"font-medium",children:"Upload"}),"."]})]}):/* @__PURE__ */D("table",{className:"w-full text-sm",children:[
75
- /* @__PURE__ */R("thead",{className:"bg-gray-50 text-2xs uppercase tracking-wide text-gray-500",children:/* @__PURE__ */D("tr",{children:[
76
- /* @__PURE__ */R("th",{className:`${k} text-left font-medium px-3 h-8`,children:"Name"}),
77
- /* @__PURE__ */R("th",{className:`${k} text-right font-medium px-3 h-8 w-24`,children:"Size"}),
78
- /* @__PURE__ */R("th",{className:`${k} text-right font-medium px-3 h-8 w-40`,children:"Modified"}),
79
- /* @__PURE__ */R("th",{className:`${k} w-32`})]})}),
80
- /* @__PURE__ */R("tbody",{children:A.map(t=>/* @__PURE__ */D("tr",{onClick:()=>H(t.name),onDoubleClick:()=>{"folder"===t.kind?I(P(F,t.name)):(async t=>{if(M)return;const r=P(F,t.name),a=(t.name.split(".").pop()||"").toLowerCase(),n=W[a];n?await e({filePath:r,filename:t.name,kind:n,onStaged:e=>ce(e)}):xe(t)})(t)},className:"cursor-default border-b border-gray-100 "+(J===t.name?"bg-blue-50":"hover:bg-gray-50"),children:[
81
- /* @__PURE__ */D("td",{className:"px-3 h-8 flex items-center gap-2",children:["folder"===t.kind?/* @__PURE__ */R(N,{name:"folder",look:"solid",className:"h-4 w-4 text-amber-500 shrink-0"}):/* @__PURE__ */R(N,{name:"page",className:"h-4 w-4 text-gray-400 shrink-0",strokeWidth:1.5}),
82
- /* @__PURE__ */R("span",{className:"truncate",title:t.name,children:t.name})]}),
83
- /* @__PURE__ */R("td",{className:"px-3 h-8 text-right tabular-nums text-gray-500",children:"folder"===t.kind?"—":a(t.size)}),
84
- /* @__PURE__ */R("td",{className:"px-3 h-8 text-right text-gray-500 tabular-nums",children:O(t.modifiedAt)}),
85
- /* @__PURE__ */R("td",{className:"px-3 h-8 text-right whitespace-nowrap",children:!M&&/* @__PURE__ */D(T,{children:["file"===t.kind&&/* @__PURE__ */R("button",{onClick:e=>{e.stopPropagation(),xe(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs",children:"Download"}),
86
- /* @__PURE__ */R("button",{onClick:e=>{e.stopPropagation(),(async e=>{const t=await y({title:`Rename ${e.kind}`,defaultValue:e.name,confirmLabel:"Rename"});if(!t||t===e.name)return;if(/[\\/]/.test(t))return void b.error("Names cannot contain slashes");const r=P(F,e.name),a=P(F,t),n=await he(`${S}/api/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:r,to:a})});if(!n.ok){const e=await n.json().catch(()=>({}));return void b.error(e.error||`Rename failed (${n.status})`)}ue(F)})(t)},className:"px-2 py-0.5 rounded hover:bg-gray-200 text-gray-500 text-2xs ml-1",children:"Rename"}),
87
- /* @__PURE__ */R("button",{onClick:e=>{e.stopPropagation(),(async e=>{if(!await g({title:`Delete ${e.kind}`,message:`"${e.name}"${"folder"===e.kind?" and everything inside":""} will be permanently removed.`,confirmLabel:"Delete",variant:"danger"}))return;const t=P(F,e.name),r=await he(`${S}/api/files?path=${encodeURIComponent(t)}`,{method:"DELETE"});if(!r.ok){const e=await r.json().catch(()=>({}));return void b.error(e.error||`Delete failed (${r.status})`)}ue(F)})(t)},className:"px-2 py-0.5 rounded hover:bg-red-100 text-red-600 text-2xs ml-1",children:"Delete"})]})})]},t.name))})]})})]})})}),_&&/* @__PURE__ */R("div",{className:"absolute inset-0 bg-blue-500/15 border-4 border-dashed border-blue-500 pointer-events-none flex items-center justify-center z-20",children:/* @__PURE__ */R("div",{className:"px-4 py-2 rounded-md bg-blue-600 text-white text-sm font-medium shadow-lg",children:"Drop to upload"})})]})}export{S as default};
@@ -1,25 +0,0 @@
1
- import{getNumberingConfigs as e}from"./chunk-P25GL5BQ.js";import{SidebarLayout as t}from"./chunk-JK3QY266.js";import"./chunk-QWK6DRSN.js";import"./chunk-XSY22PWH.js";import{timeAgo as r}from"./chunk-X2S2XDZI.js";import"./chunk-5OTS2G3M.js";import"./chunk-36BRD5J3.js";import{AboutApp as n}from"./chunk-XFJRD3HE.js";import{useWindowManager as o,client_default as i}from"./chunk-H7BP5LLG.js";import"./chunk-TPDOOCFS.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-BXRWPGAT.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-CJUN2VOD.js";import"./chunk-4A2X6KLQ.js";import"./chunk-CP6FITHO.js";import"./chunk-OZ2ALRKX.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import{useShellPrefs as s}from"./chunk-KC3EX26K.js";import{toast_default as c}from"./chunk-2LKH6JM5.js";import"./chunk-RAHIWTPJ.js";import"./chunk-GZCAFWWB.js";import"./chunk-UGTRSRIW.js";import"./chunk-QR4RM7PO.js";import"./chunk-BOGBLZKS.js";import"./chunk-CDAJKLGL.js";import"./chunk-QMQVOUIV.js";import"./chunk-BXCWPHU6.js";import"./chunk-FSP63GKK.js";import"./chunk-K7U4RWXJ.js";import"./chunk-ABJ4LWOW.js";import{Icon as a}from"./chunk-C2HHGLLR.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-Z3WKHMVB.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-T53TXXOC.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-OVNRVFWS.js";import"./chunk-C3QOHMR6.js";import{useRef as l,useEffect as p,useState as d,useCallback as m}from"react";import{useQuery as u}from"@tanstack/react-query";import{jsxs as h,Fragment as y,jsx as g}from"react/jsx-runtime";var x=[{key:"yellow",bg:"bg-yellow-100",border:"border-yellow-300",text:"text-yellow-900",dot:"bg-yellow-400"},{key:"blue",bg:"bg-blue-100",border:"border-blue-300",text:"text-blue-900",dot:"bg-blue-400"},{key:"green",bg:"bg-green-100",border:"border-green-300",text:"text-green-900",dot:"bg-green-400"},{key:"pink",bg:"bg-pink-100",border:"border-pink-300",text:"text-pink-900",dot:"bg-pink-400"},{key:"purple",bg:"bg-purple-100",border:"border-purple-300",text:"text-purple-900",dot:"bg-purple-400"},{key:"orange",bg:"bg-orange-100",border:"border-orange-300",text:"text-orange-900",dot:"bg-orange-400"},{key:"white",bg:"bg-white",border:"border-gray-300",text:"text-gray-900",dot:"bg-gray-300"}];var k={sales_order:{entityType:"order",endpoint:"/orders/sales-orders/"},purchase_order:{entityType:"purchase_order",endpoint:"/purchase-orders/"},invoice:{entityType:"invoice",endpoint:"/invoicing/invoices/"},vendor_invoice:{entityType:"vendor_invoice",endpoint:"/invoicing/vendor-invoices/"},shipment:{entityType:"shipment",endpoint:"/shipments/delivery-notes/"},receipt:{entityType:"payment",endpoint:"/invoicing/payments/"},vendor_payment:{entityType:"vendor_payment",endpoint:"/invoicing/vendor-payments/"},vendor_price_sheet:{entityType:"vendor_price_sheet",endpoint:"/pricing/manufacturer-price-sheets/"},client_price_sheet:{entityType:"price_sheet",endpoint:"/pricing/price-sheets/"},qc_report:{entityType:"qc_report",endpoint:"/qc-reports/"},warranty_claim:{entityType:"warranty_claim",endpoint:"/warranty-claims/claims/"},vendor_shipment:{entityType:"vendor_shipment",endpoint:"/shipments/goods-receipts/"}},b=/\[([ xX]?)\]/g;function f(){const{openEntity:f}=o(),{prefs:v,save:j}=s(),{data:N}=u({queryKey:["numbering-configs"],queryFn:()=>e(),retry:!1}),w=l({});p(()=>{if(!N)return;const e={};for(const t of N){const r=k[t.entity_type];if(!r)continue;const n=(t.prefix||"").replace("#","").toUpperCase();if(n&&(e[n]={...r,prefix:t.prefix}),t.alt_prefix){const n=t.alt_prefix.replace("#","").toUpperCase();n&&(e[n]={...r,prefix:t.alt_prefix})}}w.current=e},[N]);const T=v.notepad_notes||[],[W,_]=d(null),[C,X]=d(""),[R,K]=d(""),[S,O]=d("yellow"),[$,D]=d(!1),[J,P]=d(!1),L=l(null),G=l(),H=T.find(e=>e.id===W);p(()=>{if(!W&&T.length>0){const e=T[0];_(e.id),X(e.title),K(e.content),O(e.color)}},[T.length]);const Q=m(e=>{j({notepad_notes:e})},[j]),U=m(()=>{if(!W||!$)return;const e=T.map(e=>e.id===W?{...e,title:C,content:R,color:S,updated_at:/* @__PURE__ */(new Date).toISOString()}:e);Q(e),D(!1)},[W,$,C,R,S,T,Q]);p(()=>{if($)return G.current&&clearTimeout(G.current),G.current=setTimeout(U,800),()=>{G.current&&clearTimeout(G.current)}},[$,U]),p(()=>()=>{$&&U()},[]);const B=e=>{$&&U(),_(e.id),X(e.title),K(e.content),O(e.color),D(!1),P(!1)},M=e=>{const t=R.slice(0,e),r=R.slice(e).match(/^\[([ xX]?)\]/);if(!r)return;const n="x"===r[1]||"X"===r[1]?"[ ]":"[x]",o=R.slice(e+r[0].length);K(t+n+o),D(!0)},V=async(e,t)=>{const r=w.current[e];if(!r)return;const n=`${e}#${t}`;try{const{data:e}=await i.get(r.endpoint,{params:{search:n,page_size:1}}),t=(e?.results??e??[])[0];t?f(r.entityType,t.id,t,n):c.error(`${n} not found`)}catch{c.error(`Failed to look up ${n}`)}},I="Start writing...\n\nTips:\n [] Type [] for a checkbox, click to toggle\n SO#35001 Type XX#NNNNN to link entities (SO, PO, CI, VI, PL, etc.)",A=/* @__PURE__ */h(y,{children:[
2
- /* @__PURE__ */g("div",{className:"p-2 border-b border-gray-200",children:/* @__PURE__ */h("button",{onClick:()=>{$&&U();const e={id:`note-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,title:"",content:"",color:"yellow",sticky:!1,updated_at:/* @__PURE__ */(new Date).toISOString()},t=[e,...T];Q(t),_(e.id),X(""),K(""),O("yellow"),D(!1),P(!0),setTimeout(()=>L.current?.focus(),50)},className:"w-full flex items-center justify-center gap-2 rounded-lg bg-blue-600 text-white px-3 min-h-8 py-1 text-sm font-medium hover:bg-blue-700 transition-colors",children:[
3
- /* @__PURE__ */g(a,{name:"add",className:"h-4 w-4",strokeWidth:2}),"New Note"]})}),
4
- /* @__PURE__ */g("div",{className:"flex-1 overflow-y-auto",children:0===T.length?/* @__PURE__ */g("p",{className:"text-sm text-gray-400 text-center py-8 px-4",children:"No notes yet. Create one to get started."}):T.map(e=>{const t=(n=e.color,x.find(e=>e.key===n)||x[0]);var n;/* @__PURE__ */
5
- return h("button",{onClick:()=>B(e),className:"w-full text-left px-3 py-3 border-b border-gray-100 transition-colors "+(W===e.id?"bg-blue-50":"hover:bg-gray-50"),children:[
6
- /* @__PURE__ */h("div",{className:"flex items-center gap-2",children:[
7
- /* @__PURE__ */g("div",{className:`w-3 h-3 rounded-full shrink-0 ${t.dot}`}),
8
- /* @__PURE__ */g("span",{className:"text-sm font-medium text-gray-900 truncate flex-1",children:e.title||"Untitled"}),e.sticky&&/* @__PURE__ */g(a,{name:"bookmark",look:"solid",className:"h-3 w-3 text-amber-500 shrink-0"})]}),
9
- /* @__PURE__ */g("p",{className:"text-xs text-gray-400 mt-0.5 truncate ml-5",children:e.content.replace(/\[[ xX]?\]/g,"").slice(0,60)||"Empty note"}),
10
- /* @__PURE__ */g("p",{className:"text-2xs text-gray-300 mt-0.5 ml-5",children:r(e.updated_at)})]},e.id)})})]});/* @__PURE__ */
11
- return h("div",{className:"h-full",children:[
12
- /* @__PURE__ */g(n,{app:"notepad"}),
13
- /* @__PURE__ */g(t,{sidebar:A,storageKey:"notepad.sidebarWidth",defaultWidth:224,minWidth:180,maxWidth:360,children:W?/* @__PURE__ */h("div",{className:"flex-1 flex flex-col min-w-0",children:[
14
- /* @__PURE__ */h("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200",children:[
15
- /* @__PURE__ */g("input",{value:C,onChange:e=>{X(e.target.value),D(!0)},placeholder:"Note title...",className:"flex-1 text-lg font-semibold text-gray-900 outline-none bg-transparent placeholder:text-gray-300"}),
16
- /* @__PURE__ */g("div",{className:"flex gap-1",children:x.map(e=>/* @__PURE__ */g("button",{onClick:()=>{O(e.key),D(!0)},className:`w-5 h-5 rounded-full border-2 transition-all ${e.dot} ${S===e.key?"border-gray-600 scale-110":"border-transparent hover:border-gray-400"}`,title:e.key},e.key))}),
17
- /* @__PURE__ */g("button",{onClick:()=>(e=>{const t=T.map(t=>t.id===e?{...t,sticky:!t.sticky}:t);Q(t);const r=t.find(t=>t.id===e);c.success(r?.sticky?"Pinned to desktop":"Removed from desktop")})(W),title:H?.sticky?"Remove from desktop":"Pin to desktop",className:"p-1 rounded transition-colors "+(H?.sticky?"text-amber-500 hover:text-amber-600":"text-gray-300 hover:text-amber-400"),children:/* @__PURE__ */g(a,{name:"bookmark",className:"h-4 w-4",fill:H?.sticky?"currentColor":"none",strokeWidth:1.5})}),
18
- /* @__PURE__ */g("button",{onClick:()=>(e=>{const t=T.filter(t=>t.id!==e);if(Q(t),W===e){const e=t[0];e?B(e):(_(null),X(""),K(""))}})(W),title:"Delete note",className:"p-1 rounded text-gray-300 hover:text-red-500 transition-colors",children:/* @__PURE__ */g(a,{name:"trash",className:"h-4 w-4",strokeWidth:1.5})})]}),J?/* @__PURE__ */g("textarea",{ref:L,value:R,onChange:e=>{K(e.target.value),D(!0)},onBlur:()=>{P(!1),$&&U()},placeholder:I,className:"flex-1 p-4 text-sm text-gray-700 outline-none resize-none bg-transparent leading-relaxed placeholder:text-gray-300 font-mono"}):/* @__PURE__ */g("div",{onClick:()=>{P(!0),setTimeout(()=>L.current?.focus(),50)},className:"flex-1 p-4 text-sm text-gray-700 overflow-y-auto leading-relaxed cursor-text",children:R?(e=>{if(!e)return[];const t=e.split("\n");return t.map((e,r)=>{const n=[];let o=0;const i=[],s=/([A-Z]{2,4})#(\d{4,6})/g;let c;for(;null!==(c=s.exec(e));){const e=c[1],t=c[2];if(w.current[e]){const n=c.index,o=c[0];i.push({idx:n,len:o.length,render:()=>/* @__PURE__ */g("button",{onClick:()=>V(e,t),className:"text-blue-600 hover:text-blue-800 hover:underline font-medium cursor-pointer",children:o},`ref-${r}-${n}`)})}}b.lastIndex=0;let l=0;for(let e=0;e<r;e++)l+=t[e].length+1;for(;null!==(c=b.exec(e));){const e="x"===c[1]||"X"===c[1],t=c.index,n=l+t;i.push({idx:t,len:c[0].length,render:()=>/* @__PURE__ */g("button",{onClick:()=>M(n),className:`inline-flex items-center justify-center w-4 h-4 rounded border ${e?"bg-blue-500 border-blue-500 text-white":"border-gray-400 bg-white hover:border-blue-400"} cursor-pointer align-text-bottom mr-0.5`,children:e&&/* @__PURE__ */g(a,{name:"check",className:"w-3 h-3",strokeWidth:3})},`cb-${r}-${t}`)})}i.sort((e,t)=>e.idx-t.idx);for(const t of i)t.idx>o&&n.push(/* @__PURE__ */g("span",{children:e.slice(o,t.idx)},`t-${r}-${o}`)),n.push(t.render()),o=t.idx+t.len;o<e.length&&n.push(/* @__PURE__ */g("span",{children:e.slice(o)},`t-${r}-${o}`)),0===n.length&&n.push(/* @__PURE__ */g("span",{children:"​"},`empty-${r}`));const p=/^\[x\]/i.test(e.trimStart());/* @__PURE__ */
19
- return g("div",{className:p?"line-through text-gray-400":"",children:n},r)})})(R):/* @__PURE__ */g("p",{className:"text-gray-300 whitespace-pre-line",children:I})}),
20
- /* @__PURE__ */h("div",{className:"px-4 min-h-8 py-1 border-t border-gray-100 flex items-center gap-4 text-2xs text-gray-400",children:[
21
- /* @__PURE__ */g("span",{children:"[] checkbox"}),
22
- /* @__PURE__ */g("span",{children:"SO#35001 entity link"}),
23
- /* @__PURE__ */g("span",{className:"ml-auto",children:J?"Editing":"Click to edit"})]})]}):/* @__PURE__ */g("div",{className:"flex-1 flex items-center justify-center",children:/* @__PURE__ */h("div",{className:"text-center text-gray-400",children:[
24
- /* @__PURE__ */g(a,{name:"page",className:"h-12 w-12 mx-auto mb-3 text-gray-300",strokeWidth:1}),
25
- /* @__PURE__ */g("p",{className:"text-sm",children:"Select a note or create a new one"})]})})})]})}export{f as default};
@@ -1 +0,0 @@
1
- export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-7A7HRAC6.js";import"./chunk-2LKH6JM5.js";import"./chunk-K7U4RWXJ.js";import"./chunk-C2HHGLLR.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-OVNRVFWS.js";import"./chunk-C3QOHMR6.js";
@@ -1,43 +0,0 @@
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-I74FRKHQ.js";import{ResizeHandle as o}from"./chunk-XSY22PWH.js";import{openGlobalSearch as s}from"./chunk-2VLQECPC.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-JHDWTYZ4.js";import{RAIL_MENU_GAP as g,navSections as f,startMenuCategories as y,TAB_STRIP_H as x,RAIL_COLLAPSED_INSET as k,RAIL_W as v,RAIL_MAX_W as N,RAIL_MIN_W as C,navIcons as j,sectionIcons as w}from"./chunk-TPDOOCFS.js";import"./chunk-5A7MWTXX.js";import"./chunk-PKXQDCNR.js";import{PopupMenu as W,PopupMenuItem as S,PopupMenuDivider as L,PopupMenuLabel as z}from"./chunk-RAHIWTPJ.js";import"./chunk-GZCAFWWB.js";import"./chunk-QR4RM7PO.js";import"./chunk-K7U4RWXJ.js";import"./chunk-ABJ4LWOW.js";import{Icon as R}from"./chunk-C2HHGLLR.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-Z3WKHMVB.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-T53TXXOC.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import{useShellStrings as $}from"./chunk-OVNRVFWS.js";import"./chunk-C3QOHMR6.js";import{useMemo as A,useState as H,useRef as I,useEffect as T,isValidElement as M,cloneElement as K}from"react";import{jsx as J,jsxs as D,Fragment as O}from"react/jsx-runtime";var P="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function B(e,t,a){const r=Math.max(8,a-t.bottom);return{left:e+g,bottom:r,maxHeight:a-r-8,overflowY:"auto"}}var Q=(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(" "),V="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function X({open:e}){/* @__PURE__ */
2
- return J(R,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function _({dir:e}){/* @__PURE__ */
3
- return J(R,"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 F({className:e}){/* @__PURE__ */
4
- return J(R,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var U=e=>.75+1.75*e+"rem";function Z({width:Z,collapsed:G,onToggleCollapsed:Y,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=j,sectionIcons:de=w,categories:me=y,productName:he,productIcon:ue,tagline:pe,adaptiveLogo:be=!1,logoHasAlpha:ge=null,logoIsLight:fe=null}){const ye=$().layout,{hasAnyPerm:xe}=e(),ke=A(()=>c(se,me,xe),[se,me,xe]),[ve,Ne]=H(()=>t(a(r))),Ce=e=>Ne(t=>{const a=i(t,e);return l(r,JSON.stringify([...a])),a}),[je,we]=H(null),[We,Se]=H(!1),Le=I(null);T(()=>{G||we(null)},[G]);const ze=(e,t)=>{we(null),e.onSelect?e.onSelect():ee(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Re=(e,t)=>{const a=t[e];/* @__PURE__ */
5
- return J("span",{className:V,"aria-hidden":"true",children:a&&M(a)?K(a,{className:"size-[18px]"}):a})},$e=(e,t)=>{const a=u(e,xe),r=e.menuLabel??e.label;if(a.length>0){const n=`child:${e.to}`,i=ve.has(n),l=!i&&h(a,te,xe);/* @__PURE__ */
6
- return D("div",{children:[
7
- /* @__PURE__ */D("button",{type:"button",onClick:()=>Ce(n),"aria-expanded":i,className:Q(l,!1),style:t>0?{paddingLeft:U(t)}:void 0,children:[0===t&&Re(e.to,ce),
8
- /* @__PURE__ */J("span",{className:"min-w-0 flex-1 truncate",children:r}),
9
- /* @__PURE__ */J(X,{open:i})]}),i&&/* @__PURE__ */J("div",{className:"space-y-0.5 pt-0.5",children:a.map(e=>$e(e,t+1))}),e.dividerAfter&&/* @__PURE__ */J("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:U(t)},"aria-hidden":"true"})]},e.to)}const n=e.to===te;/* @__PURE__ */
10
- return D("div",{children:[
11
- /* @__PURE__ */D("button",{type:"button",onClick:t=>ze(e,t),onAuxClick:t=>{1===t.button&&ze(e,t)},"aria-current":n?"page":void 0,className:Q(n,!1),style:t>0?{paddingLeft:U(t)}:void 0,children:[0===t&&Re(e.to,ce),
12
- /* @__PURE__ */J("span",{className:"min-w-0 flex-1 truncate",children:r})]}),e.dividerAfter&&/* @__PURE__ */J("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:U(t)},"aria-hidden":"true"})]},e.to)},Ae=(e,t)=>{const a=t?e.items:m(e,xe);if(0===a.length)return null;const r="icon"in e&&e.icon?/* @__PURE__ */J("span",{className:V,"aria-hidden":"true",children:e.icon}):Re(e.label,de),n=e.menuLabel??e.label,i=h(a,te,xe),l="dividerAfter"in e&&e.dividerAfter;if(G)/* @__PURE__ */
13
- return D("div",{children:[
14
- /* @__PURE__ */J("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":je?.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:Q(i||je?.label===e.label,!0),children:r}),l&&/* @__PURE__ */J("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label);const o=ve.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
15
- return D("div",{children:[
16
- /* @__PURE__ */D("button",{type:"button",onClick:()=>Ce(e.label),"aria-expanded":o,"aria-controls":s,className:Q(!o&&i,!1),children:[r,
17
- /* @__PURE__ */J("span",{className:"min-w-0 flex-1 truncate",children:n}),
18
- /* @__PURE__ */J(X,{open:o})]}),
19
- /* @__PURE__ */J("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__ */J("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label)},He=ae?.first_name?`${ae.first_name} ${ae.last_name||""}`.trim():re?.email||"",Ie=(ae?.first_name?.charAt(0)||re?.email?.charAt(0)||"?").toUpperCase(),Te=ae?.avatar_url?/* @__PURE__ */J("img",{src:ae.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */J("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Ie}),Me=We?Le.current?.getBoundingClientRect():void 0,Ke=G?"":"px-3",Je=G?{paddingInline:k}:void 0,De=`${G?ye.expandSidebar:ye.collapseSidebar} (${P?"⌘":"Ctrl"} .)`,Oe=q?{run:q,label:ye.goHome,title:ye.goHome}:oe?null:{run:Y,label:G?ye.expandSidebar:ye.collapseSidebar,title:De},Pe=/* @__PURE__ */D(O,{children:[ue&&/* @__PURE__ */J(p,{src:ue,alt:"",slot:"compact",surface:"light",adaptive:be,hasAlpha:ge,isLight:fe,size:28,decorative:!0}),!G&&/* @__PURE__ */D("span",{className:"min-w-0 text-left leading-tight",children:[
20
- /* @__PURE__ */J("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:he??"Apps"}),pe&&/* @__PURE__ */J("span",{className:"block truncate text-2xs font-medium text-gray-500",children:pe})]})]}),Be=ke.erpSections.length>0||ke.systemSections.length>0||ke.virtualSections.length>0;/* @__PURE__ */
21
- return D("aside",{"aria-label":ye.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-gray-200 bg-white text-gray-800",style:{width:Z},children:[
22
- /* @__PURE__ */D("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(G?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:x},children:[Oe?/* @__PURE__ */J("button",{type:"button",onClick:Oe.run,"aria-label":Oe.label,title:Oe.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(G?"justify-center p-0.5":"-ml-1 p-1"),children:Pe}):/* @__PURE__ */J("span",{className:"flex min-w-0 items-center gap-2",children:Pe}),oe?/* @__PURE__ */J(b,{onClick:oe,"aria-label":ye.closeMenu,children:/* @__PURE__ */J(R,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!G&&/* @__PURE__ */J("button",{type:"button",onClick:Y,"aria-label":ye.collapseSidebar,title:`${ye.collapseSidebar} (${P?"⌘":"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__ */J(_,{dir:"left"})})]}),
23
- /* @__PURE__ */J("div",{className:`shrink-0 pt-3 ${Ke}`,style:Je,children:G?/* @__PURE__ */J("button",{type:"button",onClick:s,"aria-label":ye.search,title:`${ye.search} (${P?"⌘K":"Ctrl K"})`,className:Q(!1,!0),children:/* @__PURE__ */J(F,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */D("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-3 text-left transition-colors hover:bg-gray-100",children:[
24
- /* @__PURE__ */J(F,{className:"size-3.5 text-gray-500"}),
25
- /* @__PURE__ */J("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-500",children:ye.search}),
26
- /* @__PURE__ */J("kbd",{className:"rounded border border-gray-200 bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-gray-500",children:P?"⌘K":"Ctrl K"})]})}),
27
- /* @__PURE__ */D("nav",{"aria-label":ye.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Ke} ${G?"space-y-1":"space-y-0.5"}`,style:Je,children:[G&&/* @__PURE__ */J("button",{type:"button",onClick:Y,"aria-label":ye.expandSidebar,title:`${ye.expandSidebar} (${P?"⌘":"Ctrl"} .)`,className:`${Q(!1,!0)} mb-3`,children:/* @__PURE__ */J(_,{dir:"right"})}),ke.topItems.map(e=>{if(!G)return $e(e,0);const t=u(e,xe),a=e.to===te||h(t,te,xe),r=e.menuLabel??e.label;/* @__PURE__ */
28
- return D("div",{children:[
29
- /* @__PURE__ */J("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:Q(a,!0),children:Re(e.to,ce)}),e.dividerAfter&&/* @__PURE__ */J("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}),ke.topItems.length>0&&Be&&!ke.topItems[ke.topItems.length-1].dividerAfter&&/* @__PURE__ */J("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ke.erpSections.map(e=>Ae(e,!1)),ke.systemSections.map(e=>Ae(e,!1)),ke.virtualSections.map(e=>Ae(e,!0)),ke.footerSections.length>0&&/* @__PURE__ */J("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ke.footerSections.map(e=>Ae(e,!1))]}),
30
- /* @__PURE__ */J("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Ke}`,style:Je,children:/* @__PURE__ */D("button",{ref:Le,type:"button",onClick:()=>Se(e=>!e),"aria-haspopup":"menu","aria-expanded":We,"aria-label":G?ye.accountMenu(He):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(G?"justify-center py-2":"px-2 py-2"),children:[Te,!G&&/* @__PURE__ */D("span",{className:"min-w-0 flex-1 text-left",children:[
31
- /* @__PURE__ */J("span",{className:"block truncate text-sm font-semibold text-gray-800",children:He}),re?.email&&He!==re.email&&/* @__PURE__ */J("span",{className:"block truncate text-2xs text-gray-500",children:re.email})]})]})}),E&&!G&&!oe&&/* @__PURE__ */J(o,{side:"left",width:Z,onResize:E,min:C,max:N,defaultWidth:v,storageKey:n,label:ye.resizeSidebar}),We&&Me&&/* @__PURE__ */D(W,{portal:!0,minWidth:224,onClose:()=>Se(!1),style:B(Z,Me,window.innerHeight),children:[G&&/* @__PURE__ */D("div",{className:"border-b border-gray-200 px-3 py-3",children:[
32
- /* @__PURE__ */J("p",{className:"truncate text-sm font-semibold text-gray-800",children:He}),re?.email&&/* @__PURE__ */J("p",{className:"truncate text-xs text-gray-500",children:re.email})]}),
33
- /* @__PURE__ */D(S,{onClick:()=>{Se(!1),ee("/profile",!1)},children:[
34
- /* @__PURE__ */J(R,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.profile]}),ke.footerItems.map(e=>/* @__PURE__ */D(S,{onClick:()=>{Se(!1),ze(e)},children:[
35
- /* @__PURE__ */J("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:ce[e.to]}),e.menuLabel??e.label]},e.to)),le&&/* @__PURE__ */D(S,{onClick:()=>{Se(!1),le()},children:[
36
- /* @__PURE__ */J(R,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.reportIssue]}),
37
- /* @__PURE__ */J(L,{}),ie&&/* @__PURE__ */D(O,{children:[
38
- /* @__PURE__ */D(S,{onClick:()=>{Se(!1),ie()},children:[
39
- /* @__PURE__ */J(R,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.switchToDesktop]}),
40
- /* @__PURE__ */J(L,{})]}),
41
- /* @__PURE__ */D(S,{danger:!0,onClick:()=>{Se(!1),ne()},children:[
42
- /* @__PURE__ */J(R,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ye.signOut]})]}),je&&G&&/* @__PURE__ */J(W,{portal:!0,minWidth:220,onClose:()=>we(null),style:{left:Z+g,top:Math.min(je.top,window.innerHeight-48*Math.min(je.items.length,10)-16)},children:d(je.items,xe).map((e,t)=>/* @__PURE__ */D("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */J(L,{}),e.heading&&/* @__PURE__ */J(z,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */D(S,{onClick:()=>ze(e),children:[Re(e.to,ce),
43
- /* @__PURE__ */J("span",{className:e.to===te?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{B as accountMenuPosition,Z as default};
@@ -1,37 +0,0 @@
1
- import{EditableGrid as e}from"./chunk-2TPUNCT7.js";import"./chunk-BR22X7E5.js";import{AboutApp as t}from"./chunk-XFJRD3HE.js";import{peekSpreadsheetPreviewStage as r,claimSpreadsheetPreviewStage as n,SPREADSHEET_PREVIEW_UPDATE_EVENT as o}from"./chunk-VTVSMRFX.js";import{WindowTitle as a}from"./chunk-H7BP5LLG.js";import"./chunk-TPDOOCFS.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-BXRWPGAT.js";import"./chunk-5A7MWTXX.js";import"./chunk-Y53KNQKL.js";import"./chunk-CJUN2VOD.js";import"./chunk-4A2X6KLQ.js";import"./chunk-CP6FITHO.js";import"./chunk-OZ2ALRKX.js";import"./chunk-VWGWZY7A.js";import"./chunk-PKXQDCNR.js";import"./chunk-KC3EX26K.js";import"./chunk-RAHIWTPJ.js";import"./chunk-GZCAFWWB.js";import"./chunk-UGTRSRIW.js";import"./chunk-QR4RM7PO.js";import"./chunk-BOGBLZKS.js";import"./chunk-CDAJKLGL.js";import"./chunk-QMQVOUIV.js";import"./chunk-BXCWPHU6.js";import"./chunk-FSP63GKK.js";import"./chunk-K7U4RWXJ.js";import"./chunk-ABJ4LWOW.js";import"./chunk-C2HHGLLR.js";import"./chunk-J75ZT2JQ.js";import"./chunk-Q5MD3VY6.js";import"./chunk-MRJKZWWV.js";import"./chunk-Z3WKHMVB.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-T53TXXOC.js";import"./chunk-D65T4H6J.js";import"./chunk-DTJRIWFR.js";import"./chunk-TWVUQUUD.js";import"./chunk-OVNRVFWS.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=v(e);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.csv,"Sheet 1");if(!t)return null;return{sheet:t,title:e.data.filename.replace(/\.(csv|tsv|txt)$/i,"")}})(),[C,N]=s(j?[j.sheet]:[f("Sheet 1")]),[S,U]=s(0),R=l([]),M=l(C),L=l(!1);c(()=>{L.current?L.current=!1:M.current!==C&&(R.current.push(M.current),R.current.length>50&&R.current.shift()),M.current=C},[C]);const A=i(()=>{const e=R.current.pop();e&&(L.current=!0,N(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(),A())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[A]);const[D,K]=s(j?.title??"Untitled"),[E,W]=s(()=>g.current?.data.onEmail),$=i(e=>{const t=k(e.csv,"Sheet 1");t&&(N([t]),U(0),K(e.filename.replace(/\.(csv|tsv|txt)$/i,"")),W(()=>e.onEmail))},[]);c(()=>{const e=g.current;null!=e&&(n(e),e.data!==w.current&&$(e.data))},[]),c(()=>{const e=g.current?.token;if(null==e)return;const t=t=>{const r=t.detail;r&&r.token===e&&$(r.data)};return window.addEventListener(o,t),()=>window.removeEventListener(o,t)},[]);const[B,O]=s(!1),[T,X]=s(null),[F,V]=s(""),J=l(null),[G,H]=s("1"),[P,I]=s("10"),Q=C[S]||C[0],Z=Q.data,z=Q.columns,Y=Q.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&&N(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?Y[`${oe.row}:${oe.col}`]??{}:{},le=!!oe,se=i(e=>{N(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!==z.length?se({data:e,columns:y(t)}):se({data:e})},[se,z.length]),ie=(e,t)=>{N(r=>r.map((r,n)=>n===e?{...r,name:t}:r)),X(null)},ue=()=>Z.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=[];Z.forEach(e=>e.forEach(e=>{const t=parseFloat(e);!isNaN(t)&&e.trim()&&de.push(t)}));const he=Z.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=D||"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:[B?/* @__PURE__ */d("input",{type:"text",value:D,onChange:e=>K(e.target.value),onBlur:()=>O(!1),onKeyDown:e=>{"Enter"===e.key&&O(!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:()=>O(!0),className:"text-sm font-medium text-gray-900 hover:text-blue-600 truncate max-w-[200px]",title:"Click to rename",children:D||"Untitled"}),
6
- /* @__PURE__ */d("div",{className:"h-4 w-px bg-gray-300"}),
7
- /* @__PURE__ */d("input",{ref:J,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}});N(a),U(0),K(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}),K(r)}J.current&&(J.current.value="")},className:"hidden"}),
8
- /* @__PURE__ */d("button",{onClick:()=>J.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=`${D||"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"}),E&&/* @__PURE__ */d("button",{onClick:()=>E(ue(),`${D||"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:G,onChange:e=>H(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=z.length+e;se({columns:y(t),data:Z.map(t=>[...t,...Array(e).fill("")])})})(parseInt(G)||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:P,onChange:e=>I(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(P)||10,void se({data:[...Z,...Array.from({length:e},()=>Array(z.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:z,data:Z,onChange:ce,onColumnsChange:e=>se({columns:e}),cellStyles:Y,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:[C.map((e,t)=>/* @__PURE__ */d("button",{onClick:()=>U(t),onDoubleClick:()=>{X(t),V(e.name)},onContextMenu:e=>{e.preventDefault(),C.length>1&&(e=>{C.length<=1||(N(t=>t.filter((t,r)=>r!==e)),S>=e&&S>0&&U(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:T===t?/* @__PURE__ */d("input",{type:"text",value:F,onChange:e=>V(e.target.value),onBlur:()=>ie(t,F||e.name),onKeyDown:r=>{"Enter"===r.key&&ie(t,F||e.name),"Escape"===r.key&&X(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 ${C.length+1}`;N(t=>[...t,f(e)]),U(C.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:[Z.length," × ",z.length]})]})]})]});var me}export{w as default};