@textui/widgets 0.1.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 (423) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +69 -0
  3. package/dist/chart/area-chart.d.ts +4 -0
  4. package/dist/chart/area-chart.d.ts.map +1 -0
  5. package/dist/chart/area-chart.js +3 -0
  6. package/dist/chart/bar-chart.d.ts +32 -0
  7. package/dist/chart/bar-chart.d.ts.map +1 -0
  8. package/dist/chart/bar-chart.js +32 -0
  9. package/dist/chart/gauge.d.ts +26 -0
  10. package/dist/chart/gauge.d.ts.map +1 -0
  11. package/dist/chart/gauge.js +26 -0
  12. package/dist/chart/heatmap.d.ts +13 -0
  13. package/dist/chart/heatmap.d.ts.map +1 -0
  14. package/dist/chart/heatmap.js +27 -0
  15. package/dist/chart/histogram.d.ts +12 -0
  16. package/dist/chart/histogram.d.ts.map +1 -0
  17. package/dist/chart/histogram.js +22 -0
  18. package/dist/chart/index.d.ts +20 -0
  19. package/dist/chart/index.d.ts.map +1 -0
  20. package/dist/chart/index.js +32 -0
  21. package/dist/chart/line-chart.d.ts +7 -0
  22. package/dist/chart/line-chart.d.ts.map +1 -0
  23. package/dist/chart/line-chart.js +75 -0
  24. package/dist/chart/shared.d.ts +34 -0
  25. package/dist/chart/shared.d.ts.map +1 -0
  26. package/dist/chart/shared.js +78 -0
  27. package/dist/chart/sparkline.d.ts +15 -0
  28. package/dist/chart/sparkline.d.ts.map +1 -0
  29. package/dist/chart/sparkline.js +22 -0
  30. package/dist/control/button.d.ts +27 -0
  31. package/dist/control/button.d.ts.map +1 -0
  32. package/dist/control/button.js +130 -0
  33. package/dist/control/checkbox.d.ts +10 -0
  34. package/dist/control/checkbox.d.ts.map +1 -0
  35. package/dist/control/checkbox.js +31 -0
  36. package/dist/control/index.d.ts +20 -0
  37. package/dist/control/index.d.ts.map +1 -0
  38. package/dist/control/index.js +36 -0
  39. package/dist/control/radio-group.d.ts +17 -0
  40. package/dist/control/radio-group.d.ts.map +1 -0
  41. package/dist/control/radio-group.js +32 -0
  42. package/dist/control/search-box.d.ts +7 -0
  43. package/dist/control/search-box.d.ts.map +1 -0
  44. package/dist/control/search-box.js +3 -0
  45. package/dist/control/select.d.ts +42 -0
  46. package/dist/control/select.d.ts.map +1 -0
  47. package/dist/control/select.js +166 -0
  48. package/dist/control/shared.d.ts +41 -0
  49. package/dist/control/shared.d.ts.map +1 -0
  50. package/dist/control/shared.js +1 -0
  51. package/dist/control/slider.d.ts +14 -0
  52. package/dist/control/slider.d.ts.map +1 -0
  53. package/dist/control/slider.js +45 -0
  54. package/dist/control/switch.d.ts +10 -0
  55. package/dist/control/switch.d.ts.map +1 -0
  56. package/dist/control/switch.js +32 -0
  57. package/dist/control/text-area.d.ts +87 -0
  58. package/dist/control/text-area.d.ts.map +1 -0
  59. package/dist/control/text-area.js +299 -0
  60. package/dist/control/text-input.d.ts +10 -0
  61. package/dist/control/text-input.d.ts.map +1 -0
  62. package/dist/control/text-input.js +129 -0
  63. package/dist/data/code-viewer.d.ts +71 -0
  64. package/dist/data/code-viewer.d.ts.map +1 -0
  65. package/dist/data/code-viewer.js +232 -0
  66. package/dist/data/feed.d.ts +43 -0
  67. package/dist/data/feed.d.ts.map +1 -0
  68. package/dist/data/feed.js +178 -0
  69. package/dist/data/index.d.ts +54 -0
  70. package/dist/data/index.d.ts.map +1 -0
  71. package/dist/data/index.js +187 -0
  72. package/dist/data/list.d.ts +31 -0
  73. package/dist/data/list.d.ts.map +1 -0
  74. package/dist/data/list.js +104 -0
  75. package/dist/data/log-viewer.d.ts +26 -0
  76. package/dist/data/log-viewer.d.ts.map +1 -0
  77. package/dist/data/log-viewer.js +69 -0
  78. package/dist/data/markdown-view.d.ts +31 -0
  79. package/dist/data/markdown-view.d.ts.map +1 -0
  80. package/dist/data/markdown-view.js +139 -0
  81. package/dist/data/pagination.d.ts +9 -0
  82. package/dist/data/pagination.d.ts.map +1 -0
  83. package/dist/data/pagination.js +18 -0
  84. package/dist/data/scroll-thumb.d.ts +15 -0
  85. package/dist/data/scroll-thumb.d.ts.map +1 -0
  86. package/dist/data/scroll-thumb.js +32 -0
  87. package/dist/data/shared.d.ts +12 -0
  88. package/dist/data/shared.d.ts.map +1 -0
  89. package/dist/data/shared.js +17 -0
  90. package/dist/data/tree.d.ts +35 -0
  91. package/dist/data/tree.d.ts.map +1 -0
  92. package/dist/data/tree.js +158 -0
  93. package/dist/decorations.d.ts +88 -0
  94. package/dist/decorations.d.ts.map +1 -0
  95. package/dist/decorations.js +135 -0
  96. package/dist/display/alert.d.ts +8 -0
  97. package/dist/display/alert.d.ts.map +1 -0
  98. package/dist/display/alert.js +12 -0
  99. package/dist/display/badge.d.ts +10 -0
  100. package/dist/display/badge.d.ts.map +1 -0
  101. package/dist/display/badge.js +21 -0
  102. package/dist/display/card.d.ts +8 -0
  103. package/dist/display/card.d.ts.map +1 -0
  104. package/dist/display/card.js +12 -0
  105. package/dist/display/empty-state.d.ts +10 -0
  106. package/dist/display/empty-state.d.ts.map +1 -0
  107. package/dist/display/empty-state.js +5 -0
  108. package/dist/display/error-state.d.ts +9 -0
  109. package/dist/display/error-state.d.ts.map +1 -0
  110. package/dist/display/error-state.js +7 -0
  111. package/dist/display/heading.d.ts +6 -0
  112. package/dist/display/heading.d.ts.map +1 -0
  113. package/dist/display/heading.js +8 -0
  114. package/dist/display/index.d.ts +25 -0
  115. package/dist/display/index.d.ts.map +1 -0
  116. package/dist/display/index.js +52 -0
  117. package/dist/display/key-value.d.ts +14 -0
  118. package/dist/display/key-value.d.ts.map +1 -0
  119. package/dist/display/key-value.js +11 -0
  120. package/dist/display/label.d.ts +6 -0
  121. package/dist/display/label.d.ts.map +1 -0
  122. package/dist/display/label.js +3 -0
  123. package/dist/display/marquee.d.ts +36 -0
  124. package/dist/display/marquee.d.ts.map +1 -0
  125. package/dist/display/marquee.js +55 -0
  126. package/dist/display/progress.d.ts +39 -0
  127. package/dist/display/progress.d.ts.map +1 -0
  128. package/dist/display/progress.js +46 -0
  129. package/dist/display/skeleton.d.ts +20 -0
  130. package/dist/display/skeleton.d.ts.map +1 -0
  131. package/dist/display/skeleton.js +20 -0
  132. package/dist/display/spinner.d.ts +7 -0
  133. package/dist/display/spinner.d.ts.map +1 -0
  134. package/dist/display/spinner.js +9 -0
  135. package/dist/display/status-dot.d.ts +8 -0
  136. package/dist/display/status-dot.d.ts.map +1 -0
  137. package/dist/display/status-dot.js +13 -0
  138. package/dist/display/timeline.d.ts +12 -0
  139. package/dist/display/timeline.d.ts.map +1 -0
  140. package/dist/display/timeline.js +22 -0
  141. package/dist/find.d.ts +74 -0
  142. package/dist/find.d.ts.map +1 -0
  143. package/dist/find.js +102 -0
  144. package/dist/form/danger-zone.d.ts +11 -0
  145. package/dist/form/danger-zone.d.ts.map +1 -0
  146. package/dist/form/danger-zone.js +15 -0
  147. package/dist/form/field.d.ts +19 -0
  148. package/dist/form/field.d.ts.map +1 -0
  149. package/dist/form/field.js +35 -0
  150. package/dist/form/form-actions.d.ts +11 -0
  151. package/dist/form/form-actions.d.ts.map +1 -0
  152. package/dist/form/form-actions.js +16 -0
  153. package/dist/form/form-section.d.ts +7 -0
  154. package/dist/form/form-section.d.ts.map +1 -0
  155. package/dist/form/form-section.js +5 -0
  156. package/dist/form/form.d.ts +7 -0
  157. package/dist/form/form.d.ts.map +1 -0
  158. package/dist/form/form.js +3 -0
  159. package/dist/form/index.d.ts +42 -0
  160. package/dist/form/index.d.ts.map +1 -0
  161. package/dist/form/index.js +140 -0
  162. package/dist/form/shared.d.ts +25 -0
  163. package/dist/form/shared.d.ts.map +1 -0
  164. package/dist/form/shared.js +9 -0
  165. package/dist/index.d.ts +26 -0
  166. package/dist/index.d.ts.map +1 -0
  167. package/dist/index.js +62 -0
  168. package/dist/layout/center.d.ts +7 -0
  169. package/dist/layout/center.d.ts.map +1 -0
  170. package/dist/layout/center.js +8 -0
  171. package/dist/layout/column.d.ts +3 -0
  172. package/dist/layout/column.d.ts.map +1 -0
  173. package/dist/layout/column.js +2 -0
  174. package/dist/layout/divider.d.ts +11 -0
  175. package/dist/layout/divider.d.ts.map +1 -0
  176. package/dist/layout/divider.js +13 -0
  177. package/dist/layout/grid.d.ts +10 -0
  178. package/dist/layout/grid.d.ts.map +1 -0
  179. package/dist/layout/grid.js +22 -0
  180. package/dist/layout/index.d.ts +19 -0
  181. package/dist/layout/index.d.ts.map +1 -0
  182. package/dist/layout/index.js +36 -0
  183. package/dist/layout/panel.d.ts +37 -0
  184. package/dist/layout/panel.d.ts.map +1 -0
  185. package/dist/layout/panel.js +71 -0
  186. package/dist/layout/row.d.ts +7 -0
  187. package/dist/layout/row.d.ts.map +1 -0
  188. package/dist/layout/row.js +2 -0
  189. package/dist/layout/scroll-view.d.ts +27 -0
  190. package/dist/layout/scroll-view.d.ts.map +1 -0
  191. package/dist/layout/scroll-view.js +93 -0
  192. package/dist/layout/splitter.d.ts +10 -0
  193. package/dist/layout/splitter.d.ts.map +1 -0
  194. package/dist/layout/splitter.js +9 -0
  195. package/dist/layout/stack.d.ts +7 -0
  196. package/dist/layout/stack.d.ts.map +1 -0
  197. package/dist/layout/stack.js +5 -0
  198. package/dist/navigation/breadcrumb.d.ts +14 -0
  199. package/dist/navigation/breadcrumb.d.ts.map +1 -0
  200. package/dist/navigation/breadcrumb.js +24 -0
  201. package/dist/navigation/index.d.ts +17 -0
  202. package/dist/navigation/index.d.ts.map +1 -0
  203. package/dist/navigation/index.js +30 -0
  204. package/dist/navigation/key-hints.d.ts +11 -0
  205. package/dist/navigation/key-hints.d.ts.map +1 -0
  206. package/dist/navigation/key-hints.js +13 -0
  207. package/dist/navigation/menu.d.ts +35 -0
  208. package/dist/navigation/menu.d.ts.map +1 -0
  209. package/dist/navigation/menu.js +88 -0
  210. package/dist/navigation/status-bar.d.ts +18 -0
  211. package/dist/navigation/status-bar.d.ts.map +1 -0
  212. package/dist/navigation/status-bar.js +12 -0
  213. package/dist/navigation/tabs.d.ts +20 -0
  214. package/dist/navigation/tabs.d.ts.map +1 -0
  215. package/dist/navigation/tabs.js +41 -0
  216. package/dist/navigation/toolbar.d.ts +14 -0
  217. package/dist/navigation/toolbar.d.ts.map +1 -0
  218. package/dist/navigation/toolbar.js +10 -0
  219. package/dist/navigation/wizard.d.ts +15 -0
  220. package/dist/navigation/wizard.d.ts.map +1 -0
  221. package/dist/navigation/wizard.js +17 -0
  222. package/dist/overlay/command-palette.d.ts +63 -0
  223. package/dist/overlay/command-palette.d.ts.map +1 -0
  224. package/dist/overlay/command-palette.js +415 -0
  225. package/dist/overlay/dialog.d.ts +16 -0
  226. package/dist/overlay/dialog.d.ts.map +1 -0
  227. package/dist/overlay/dialog.js +44 -0
  228. package/dist/overlay/index.d.ts +84 -0
  229. package/dist/overlay/index.d.ts.map +1 -0
  230. package/dist/overlay/index.js +157 -0
  231. package/dist/overlay/layer-scope.d.ts +21 -0
  232. package/dist/overlay/layer-scope.d.ts.map +1 -0
  233. package/dist/overlay/layer-scope.js +5 -0
  234. package/dist/overlay/path-picker.d.ts +14 -0
  235. package/dist/overlay/path-picker.d.ts.map +1 -0
  236. package/dist/overlay/path-picker.js +200 -0
  237. package/dist/overlay/prompt-dialog.d.ts +12 -0
  238. package/dist/overlay/prompt-dialog.d.ts.map +1 -0
  239. package/dist/overlay/prompt-dialog.js +29 -0
  240. package/dist/overlay/shared.d.ts +17 -0
  241. package/dist/overlay/shared.d.ts.map +1 -0
  242. package/dist/overlay/shared.js +17 -0
  243. package/dist/overlay/toast-host.d.ts +8 -0
  244. package/dist/overlay/toast-host.d.ts.map +1 -0
  245. package/dist/overlay/toast-host.js +19 -0
  246. package/dist/overlay/toast.d.ts +9 -0
  247. package/dist/overlay/toast.d.ts.map +1 -0
  248. package/dist/overlay/toast.js +20 -0
  249. package/dist/overlay/tooltip.d.ts +6 -0
  250. package/dist/overlay/tooltip.d.ts.map +1 -0
  251. package/dist/overlay/tooltip.js +11 -0
  252. package/dist/panel/index.d.ts +79 -0
  253. package/dist/panel/index.d.ts.map +1 -0
  254. package/dist/panel/index.js +256 -0
  255. package/dist/panel/resource-panel.d.ts +93 -0
  256. package/dist/panel/resource-panel.d.ts.map +1 -0
  257. package/dist/panel/resource-panel.js +213 -0
  258. package/dist/panel/shared.d.ts +6 -0
  259. package/dist/panel/shared.d.ts.map +1 -0
  260. package/dist/panel/shared.js +4 -0
  261. package/dist/shells/console-shell.d.ts +8 -0
  262. package/dist/shells/console-shell.d.ts.map +1 -0
  263. package/dist/shells/console-shell.js +30 -0
  264. package/dist/shells/index.d.ts +20 -0
  265. package/dist/shells/index.d.ts.map +1 -0
  266. package/dist/shells/index.js +61 -0
  267. package/dist/shells/paper-shell.d.ts +9 -0
  268. package/dist/shells/paper-shell.d.ts.map +1 -0
  269. package/dist/shells/paper-shell.js +23 -0
  270. package/dist/shells/plain-shell.d.ts +3 -0
  271. package/dist/shells/plain-shell.d.ts.map +1 -0
  272. package/dist/shells/plain-shell.js +11 -0
  273. package/dist/shells/shared.d.ts +12 -0
  274. package/dist/shells/shared.d.ts.map +1 -0
  275. package/dist/shells/shared.js +21 -0
  276. package/dist/shells/workbench-shell.d.ts +9 -0
  277. package/dist/shells/workbench-shell.d.ts.map +1 -0
  278. package/dist/shells/workbench-shell.js +43 -0
  279. package/dist/surface/bar-layout.d.ts +4 -0
  280. package/dist/surface/bar-layout.d.ts.map +1 -0
  281. package/dist/surface/bar-layout.js +7 -0
  282. package/dist/surface/index.d.ts +58 -0
  283. package/dist/surface/index.d.ts.map +1 -0
  284. package/dist/surface/index.js +48 -0
  285. package/dist/surface/inline-layout.d.ts +4 -0
  286. package/dist/surface/inline-layout.d.ts.map +1 -0
  287. package/dist/surface/inline-layout.js +7 -0
  288. package/dist/surface/mount-view.d.ts +7 -0
  289. package/dist/surface/mount-view.d.ts.map +1 -0
  290. package/dist/surface/mount-view.js +19 -0
  291. package/dist/surface/rail-layout.d.ts +4 -0
  292. package/dist/surface/rail-layout.d.ts.map +1 -0
  293. package/dist/surface/rail-layout.js +19 -0
  294. package/dist/surface/shared.d.ts +7 -0
  295. package/dist/surface/shared.d.ts.map +1 -0
  296. package/dist/surface/shared.js +1 -0
  297. package/dist/surface/single-layout.d.ts +4 -0
  298. package/dist/surface/single-layout.d.ts.map +1 -0
  299. package/dist/surface/single-layout.js +18 -0
  300. package/dist/surface/split-layout.d.ts +4 -0
  301. package/dist/surface/split-layout.d.ts.map +1 -0
  302. package/dist/surface/split-layout.js +7 -0
  303. package/dist/surface/stack-layout.d.ts +4 -0
  304. package/dist/surface/stack-layout.d.ts.map +1 -0
  305. package/dist/surface/stack-layout.js +22 -0
  306. package/dist/surface/surface-area.d.ts +16 -0
  307. package/dist/surface/surface-area.d.ts.map +1 -0
  308. package/dist/surface/surface-area.js +32 -0
  309. package/dist/surface/tabs-layout.d.ts +4 -0
  310. package/dist/surface/tabs-layout.d.ts.map +1 -0
  311. package/dist/surface/tabs-layout.js +24 -0
  312. package/dist/tone.d.ts +16 -0
  313. package/dist/tone.d.ts.map +1 -0
  314. package/dist/tone.js +45 -0
  315. package/dist/viewport.d.ts +30 -0
  316. package/dist/viewport.d.ts.map +1 -0
  317. package/dist/viewport.js +17 -0
  318. package/package.json +54 -0
  319. package/src/chart/area-chart.ts +9 -0
  320. package/src/chart/bar-chart.ts +74 -0
  321. package/src/chart/gauge.ts +60 -0
  322. package/src/chart/heatmap.ts +49 -0
  323. package/src/chart/histogram.ts +36 -0
  324. package/src/chart/index.ts +36 -0
  325. package/src/chart/line-chart.ts +100 -0
  326. package/src/chart/shared.ts +112 -0
  327. package/src/chart/sparkline.ts +46 -0
  328. package/src/control/button.ts +184 -0
  329. package/src/control/checkbox.ts +48 -0
  330. package/src/control/index.ts +40 -0
  331. package/src/control/radio-group.ts +60 -0
  332. package/src/control/search-box.ts +15 -0
  333. package/src/control/select.ts +230 -0
  334. package/src/control/shared.ts +41 -0
  335. package/src/control/slider.ts +63 -0
  336. package/src/control/switch.ts +39 -0
  337. package/src/control/text-area.ts +390 -0
  338. package/src/control/text-input.ts +150 -0
  339. package/src/data/code-viewer.ts +337 -0
  340. package/src/data/feed.ts +204 -0
  341. package/src/data/index.ts +243 -0
  342. package/src/data/list.ts +149 -0
  343. package/src/data/log-viewer.ts +105 -0
  344. package/src/data/markdown-view.ts +182 -0
  345. package/src/data/pagination.ts +31 -0
  346. package/src/data/scroll-thumb.ts +40 -0
  347. package/src/data/shared.ts +23 -0
  348. package/src/data/tree.ts +215 -0
  349. package/src/decorations.ts +176 -0
  350. package/src/display/alert.ts +28 -0
  351. package/src/display/badge.ts +40 -0
  352. package/src/display/card.ts +23 -0
  353. package/src/display/empty-state.ts +21 -0
  354. package/src/display/error-state.ts +23 -0
  355. package/src/display/heading.ts +17 -0
  356. package/src/display/index.ts +55 -0
  357. package/src/display/key-value.ts +32 -0
  358. package/src/display/label.ts +11 -0
  359. package/src/display/marquee.ts +88 -0
  360. package/src/display/progress.ts +92 -0
  361. package/src/display/skeleton.ts +34 -0
  362. package/src/display/spinner.ts +20 -0
  363. package/src/display/status-dot.ts +24 -0
  364. package/src/display/timeline.ts +47 -0
  365. package/src/find.ts +138 -0
  366. package/src/form/danger-zone.ts +34 -0
  367. package/src/form/field.ts +61 -0
  368. package/src/form/form-actions.ts +35 -0
  369. package/src/form/form-section.ts +16 -0
  370. package/src/form/form.ts +13 -0
  371. package/src/form/index.ts +191 -0
  372. package/src/form/shared.ts +36 -0
  373. package/src/index.ts +63 -0
  374. package/src/layout/center.ts +17 -0
  375. package/src/layout/column.ts +6 -0
  376. package/src/layout/divider.ts +31 -0
  377. package/src/layout/grid.ts +34 -0
  378. package/src/layout/index.ts +39 -0
  379. package/src/layout/panel.ts +114 -0
  380. package/src/layout/row.ts +11 -0
  381. package/src/layout/scroll-view.ts +115 -0
  382. package/src/layout/splitter.ts +24 -0
  383. package/src/layout/stack.ts +12 -0
  384. package/src/navigation/breadcrumb.ts +43 -0
  385. package/src/navigation/index.ts +33 -0
  386. package/src/navigation/key-hints.ts +25 -0
  387. package/src/navigation/menu.ts +134 -0
  388. package/src/navigation/status-bar.ts +43 -0
  389. package/src/navigation/tabs.ts +73 -0
  390. package/src/navigation/toolbar.ts +25 -0
  391. package/src/navigation/wizard.ts +43 -0
  392. package/src/overlay/command-palette.ts +485 -0
  393. package/src/overlay/dialog.ts +65 -0
  394. package/src/overlay/index.ts +232 -0
  395. package/src/overlay/layer-scope.ts +26 -0
  396. package/src/overlay/path-picker.ts +215 -0
  397. package/src/overlay/prompt-dialog.ts +45 -0
  398. package/src/overlay/shared.ts +19 -0
  399. package/src/overlay/toast-host.ts +30 -0
  400. package/src/overlay/toast.ts +35 -0
  401. package/src/overlay/tooltip.ts +17 -0
  402. package/src/panel/index.ts +317 -0
  403. package/src/panel/resource-panel.ts +304 -0
  404. package/src/panel/shared.ts +8 -0
  405. package/src/shells/console-shell.ts +47 -0
  406. package/src/shells/index.ts +66 -0
  407. package/src/shells/paper-shell.ts +31 -0
  408. package/src/shells/plain-shell.ts +19 -0
  409. package/src/shells/shared.ts +24 -0
  410. package/src/shells/workbench-shell.ts +62 -0
  411. package/src/surface/bar-layout.ts +11 -0
  412. package/src/surface/index.ts +53 -0
  413. package/src/surface/inline-layout.ts +11 -0
  414. package/src/surface/mount-view.ts +30 -0
  415. package/src/surface/rail-layout.ts +27 -0
  416. package/src/surface/shared.ts +7 -0
  417. package/src/surface/single-layout.ts +25 -0
  418. package/src/surface/split-layout.ts +11 -0
  419. package/src/surface/stack-layout.ts +32 -0
  420. package/src/surface/surface-area.ts +46 -0
  421. package/src/surface/tabs-layout.ts +30 -0
  422. package/src/tone.ts +48 -0
  423. package/src/viewport.ts +45 -0
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Direction A: the dense operator console.
3
+ *
4
+ * Every region is a labelled box, chrome carries counts, nothing is wasted.
5
+ * Sidebar left, panel bottom, one-line status.
6
+ */
7
+ export declare const ConsoleShell: (props: import("@textui/core").BoxProps) => import("@textui/core").RenderOutput;
8
+ //# sourceMappingURL=console-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console-shell.d.ts","sourceRoot":"","sources":["../../src/shells/console-shell.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,eAAO,MAAM,YAAY,iFAkCvB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { defineComponent, h, useSize, useStoreValue, useTheme } from '@textui/core';
2
+ import { ToastHost } from '../overlay/index.js';
3
+ import { SurfaceArea } from '../surface/index.js';
4
+ import { useSurfaceMounted } from './shared.js';
5
+ /**
6
+ * Direction A: the dense operator console.
7
+ *
8
+ * Every region is a labelled box, chrome carries counts, nothing is wasted.
9
+ * Sidebar left, panel bottom, one-line status.
10
+ */
11
+ export const ConsoleShell = defineComponent('ConsoleShell', (props) => {
12
+ const theme = useTheme();
13
+ const size = useSize();
14
+ const sidebarCollapsed = useStoreValue('$/ui/sidebar/collapsed', false);
15
+ const sidebar = useSurfaceMounted('sidebar');
16
+ const narrow = size.width < 80;
17
+ return h('box', {
18
+ direction: 'column', width: '100%', height: '100%',
19
+ // Ink as well as page: a themed background with the terminal's own
20
+ // foreground on top is how a light theme comes out white on white.
21
+ bg: 'canvas', fg: 'text',
22
+ ...props,
23
+ }, h(SurfaceArea, { surface: 'header' }), h('box', { direction: 'row', flex: 1 }, sidebar && !narrow && !sidebarCollapsed
24
+ ? h('box', {
25
+ width: 18,
26
+ border: { style: theme.border, sides: { right: true } },
27
+ direction: 'column',
28
+ }, h(SurfaceArea, { surface: 'sidebar', flex: 1 }))
29
+ : null, h('box', { flex: 1, direction: 'column' }, h(SurfaceArea, { surface: 'main', flex: 1 }), h(SurfaceArea, { surface: 'panel' })), !narrow ? h(SurfaceArea, { surface: 'aside' }) : null), h(SurfaceArea, { surface: 'status' }), h(ToastHost, { anchor: 'bottom-right' }));
30
+ });
@@ -0,0 +1,20 @@
1
+ import type { ComponentDefinition, ShellDefinition } from '@textui/core';
2
+ /**
3
+ * Shells.
4
+ *
5
+ * A shell decides where the surfaces go, and that is the whole of what it
6
+ * decides. The three below are the same application in three house styles -
7
+ * a dense bordered console, an airy report, and a workbench frame - and
8
+ * nothing in the component catalog knows which one is mounted.
9
+ *
10
+ * That is the test the whole architecture exists to pass: if a shell needs a
11
+ * component the others cannot use, the boundary is in the wrong place.
12
+ */
13
+ export * from './console-shell.js';
14
+ export * from './paper-shell.js';
15
+ export * from './plain-shell.js';
16
+ export * from './workbench-shell.js';
17
+ export type { ShellProps } from './shared.js';
18
+ export declare const SHELL_COMPONENTS: ComponentDefinition[];
19
+ export declare const BUILTIN_SHELLS: ShellDefinition[];
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shells/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAMzE;;;;;;;;;;GAUG;AACH,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,eAAO,MAAM,gBAAgB,EAAE,mBAAmB,EAKjD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,eAAe,EAmC3C,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { ConsoleShell } from './console-shell.js';
2
+ import { PaperShell } from './paper-shell.js';
3
+ import { PlainShell } from './plain-shell.js';
4
+ import { WorkbenchShell } from './workbench-shell.js';
5
+ /**
6
+ * Shells.
7
+ *
8
+ * A shell decides where the surfaces go, and that is the whole of what it
9
+ * decides. The three below are the same application in three house styles -
10
+ * a dense bordered console, an airy report, and a workbench frame - and
11
+ * nothing in the component catalog knows which one is mounted.
12
+ *
13
+ * That is the test the whole architecture exists to pass: if a shell needs a
14
+ * component the others cannot use, the boundary is in the wrong place.
15
+ */
16
+ export * from './console-shell.js';
17
+ export * from './paper-shell.js';
18
+ export * from './plain-shell.js';
19
+ export * from './workbench-shell.js';
20
+ export const SHELL_COMPONENTS = [
21
+ { component: 'PlainShell', category: 'chrome', renderer: { kind: 'function', render: PlainShell }, description: 'Main and status, no frame.' },
22
+ { component: 'ConsoleShell', category: 'chrome', renderer: { kind: 'function', render: ConsoleShell }, description: 'Dense bordered operator console.' },
23
+ { component: 'PaperShell', category: 'chrome', renderer: { kind: 'function', render: PaperShell }, description: 'Airy and borderless.' },
24
+ { component: 'WorkbenchShell', category: 'chrome', renderer: { kind: 'function', render: WorkbenchShell }, description: 'Full frame: rail, sidebar, tabs, panel, status.' },
25
+ ];
26
+ export const BUILTIN_SHELLS = [
27
+ {
28
+ id: 'plain',
29
+ title: 'Plain',
30
+ description: 'Main and status only. The default.',
31
+ component: 'PlainShell',
32
+ surfaces: ['main', 'status', 'overlay', 'notify'],
33
+ },
34
+ {
35
+ id: 'console',
36
+ title: 'Console',
37
+ description: 'Dense, bordered, every region labelled.',
38
+ component: 'ConsoleShell',
39
+ theme: 'console',
40
+ surfaces: ['header', 'sidebar', 'main', 'panel', 'aside', 'status', 'overlay', 'notify'],
41
+ minSize: { width: 60, height: 12 },
42
+ },
43
+ {
44
+ id: 'paper',
45
+ title: 'Paper',
46
+ description: 'Borderless. Whitespace and alignment do the separating.',
47
+ component: 'PaperShell',
48
+ theme: 'paper',
49
+ surfaces: ['header', 'main', 'panel', 'status', 'overlay', 'notify'],
50
+ minSize: { width: 50, height: 10 },
51
+ },
52
+ {
53
+ id: 'workbench',
54
+ title: 'Workbench',
55
+ description: 'Persistent frame with a rail, sidebar, tabs and a panel.',
56
+ component: 'WorkbenchShell',
57
+ theme: 'workbench',
58
+ surfaces: ['header', 'rail', 'sidebar', 'main', 'panel', 'aside', 'status', 'overlay', 'notify'],
59
+ minSize: { width: 80, height: 20 },
60
+ },
61
+ ];
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Direction B: airy and borderless.
3
+ *
4
+ * Whitespace does the separating; there is no frame, and the surfaces that
5
+ * would be chrome elsewhere are simply spaced sections. Also the shell that
6
+ * reads best when the output is piped to a file.
7
+ */
8
+ export declare const PaperShell: (props: import("@textui/core").BoxProps) => import("@textui/core").RenderOutput;
9
+ //# sourceMappingURL=paper-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paper-shell.d.ts","sourceRoot":"","sources":["../../src/shells/paper-shell.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,iFAkBrB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { defineComponent, h, useTheme } from '@textui/core';
2
+ import { ToastHost } from '../overlay/index.js';
3
+ import { SurfaceArea } from '../surface/index.js';
4
+ /**
5
+ * Direction B: airy and borderless.
6
+ *
7
+ * Whitespace does the separating; there is no frame, and the surfaces that
8
+ * would be chrome elsewhere are simply spaced sections. Also the shell that
9
+ * reads best when the output is piped to a file.
10
+ */
11
+ export const PaperShell = defineComponent('PaperShell', (props) => {
12
+ const theme = useTheme();
13
+ return h('box', {
14
+ direction: 'column',
15
+ width: '100%',
16
+ height: '100%',
17
+ bg: 'canvas',
18
+ fg: 'text',
19
+ padding: [1, theme.spacing.md],
20
+ gap: 1,
21
+ ...props,
22
+ }, h(SurfaceArea, { surface: 'header' }), h(SurfaceArea, { surface: 'main', flex: 1 }), h(SurfaceArea, { surface: 'panel' }), h(SurfaceArea, { surface: 'status' }), h(ToastHost, { anchor: 'bottom' }));
23
+ });
@@ -0,0 +1,3 @@
1
+ /** No chrome at all: `main` fills the terminal. For a single-screen tool. */
2
+ export declare const PlainShell: (props: import("@textui/core").BoxProps) => import("@textui/core").RenderOutput;
3
+ //# sourceMappingURL=plain-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plain-shell.d.ts","sourceRoot":"","sources":["../../src/shells/plain-shell.ts"],"names":[],"mappings":"AAKA,6EAA6E;AAC7E,eAAO,MAAM,UAAU,iFAYtB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { defineComponent, h } from '@textui/core';
2
+ import { ToastHost } from '../overlay/index.js';
3
+ import { SurfaceArea } from '../surface/index.js';
4
+ /** No chrome at all: `main` fills the terminal. For a single-screen tool. */
5
+ export const PlainShell = defineComponent('PlainShell', (props) => h('box', {
6
+ direction: 'column', width: '100%', height: '100%',
7
+ // Ink as well as page: a themed background with the terminal's own
8
+ // foreground on top is how a light theme comes out white on white.
9
+ bg: 'canvas', fg: 'text',
10
+ ...props,
11
+ }, h(SurfaceArea, { surface: 'main', flex: 1 }), h(SurfaceArea, { surface: 'status' }), h(ToastHost, { anchor: 'bottom-right' })));
@@ -0,0 +1,12 @@
1
+ import type { BoxProps, SurfaceName } from '@textui/core';
2
+ export type ShellProps = BoxProps;
3
+ /**
4
+ * Whether a surface has anything to show.
5
+ *
6
+ * `SurfaceArea` already renders nothing for an empty surface, but a region
7
+ * with a fixed width reserves its column either way - which is how an
8
+ * application that never mounts a sidebar still gets an empty gutter down the
9
+ * left of every screen. A shell has to ask before it spends the space.
10
+ */
11
+ export declare function useSurfaceMounted(surface: SurfaceName): boolean;
12
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/shells/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGvE,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;AAElC;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAU/D"}
@@ -0,0 +1,21 @@
1
+ import { useRuntime, useStoreSubtree } from '@textui/core';
2
+ /**
3
+ * Whether a surface has anything to show.
4
+ *
5
+ * `SurfaceArea` already renders nothing for an empty surface, but a region
6
+ * with a fixed width reserves its column either way - which is how an
7
+ * application that never mounts a sidebar still gets an empty gutter down the
8
+ * left of every screen. A shell has to ask before it spends the space.
9
+ */
10
+ export function useSurfaceMounted(surface) {
11
+ const runtime = useRuntime();
12
+ useStoreSubtree(`$/layout/surfaces/${surface}`);
13
+ useStoreSubtree(`$/layout/mounts/${surface}`);
14
+ const app = runtime.app();
15
+ if (!app)
16
+ return false;
17
+ const state = app.surfaces.state(surface);
18
+ if (!state.visible || state.collapsed)
19
+ return false;
20
+ return app.surfaces.mounts(surface).length > 0;
21
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Direction C: the workbench.
3
+ *
4
+ * A persistent frame - rail, sidebar, tabbed main, panel, status - inside a
5
+ * rounded border. The richest shell, and the one that needs the most room, so
6
+ * it declares a minimum size and the app falls back when the terminal is small.
7
+ */
8
+ export declare const WorkbenchShell: (props: import("@textui/core").BoxProps) => import("@textui/core").RenderOutput;
9
+ //# sourceMappingURL=workbench-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workbench-shell.d.ts","sourceRoot":"","sources":["../../src/shells/workbench-shell.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,iFAgDzB,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { defineComponent, h, useSize, useStoreValue, useTheme } from '@textui/core';
2
+ import { ToastHost } from '../overlay/index.js';
3
+ import { SurfaceArea } from '../surface/index.js';
4
+ import { useSurfaceMounted } from './shared.js';
5
+ /**
6
+ * Direction C: the workbench.
7
+ *
8
+ * A persistent frame - rail, sidebar, tabbed main, panel, status - inside a
9
+ * rounded border. The richest shell, and the one that needs the most room, so
10
+ * it declares a minimum size and the app falls back when the terminal is small.
11
+ */
12
+ export const WorkbenchShell = defineComponent('WorkbenchShell', (props) => {
13
+ const theme = useTheme();
14
+ const size = useSize();
15
+ const sidebarCollapsed = useStoreValue('$/ui/sidebar/collapsed', false);
16
+ const asideVisible = useStoreValue('$/ui/aside/visible', false);
17
+ const sidebar = useSurfaceMounted('sidebar');
18
+ const aside = useSurfaceMounted('aside');
19
+ const narrow = size.width < 90;
20
+ return h('box', {
21
+ direction: 'column',
22
+ width: '100%',
23
+ height: '100%',
24
+ bg: 'canvas',
25
+ fg: 'text',
26
+ border: theme.border,
27
+ ...props,
28
+ }, h(SurfaceArea, { surface: 'header' }), h('box', { direction: 'row', flex: 1 }, h(SurfaceArea, { surface: 'rail' }), sidebar && !sidebarCollapsed && !narrow
29
+ ? h('box', {
30
+ width: 24,
31
+ border: { style: theme.border, sides: { right: true } },
32
+ direction: 'column',
33
+ padding: { left: 1 },
34
+ }, h(SurfaceArea, { surface: 'sidebar', flex: 1 }))
35
+ : null, h('box', { flex: 1, direction: 'column', padding: { left: 1 } }, h(SurfaceArea, { surface: 'main', flex: 1 }), h(SurfaceArea, { surface: 'panel' })), aside && asideVisible && !narrow
36
+ ? h('box', {
37
+ width: 30,
38
+ border: { style: theme.border, sides: { left: true } },
39
+ direction: 'column',
40
+ padding: { left: 1 },
41
+ }, h(SurfaceArea, { surface: 'aside', flex: 1 }))
42
+ : null), h(SurfaceArea, { surface: 'status' }), h(ToastHost, { anchor: 'bottom-right' }));
43
+ });
@@ -0,0 +1,4 @@
1
+ import type { LayoutProps } from './shared.js';
2
+ /** Every mount on one line. Headers and status bars use this. */
3
+ export declare const BarLayout: (props: LayoutProps) => import("@textui/core").RenderOutput;
4
+ //# sourceMappingURL=bar-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bar-layout.d.ts","sourceRoot":"","sources":["../../src/surface/bar-layout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,iEAAiE;AACjE,eAAO,MAAM,SAAS,6DAKpB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { defineComponent, h } from '@textui/core';
2
+ import { MountView } from './mount-view.js';
3
+ /** Every mount on one line. Headers and status bars use this. */
4
+ export const BarLayout = defineComponent('BarLayout', (props) => {
5
+ const { mounts, surface: _surface, state: _state, ...rest } = props;
6
+ return h('box', { direction: 'row', height: 1, gap: 2, ...rest }, ...mounts.map((mount) => h(MountView, { key: mount.key, mount })));
7
+ });
@@ -0,0 +1,58 @@
1
+ import type { ComponentDefinition } from '@textui/core';
2
+ /**
3
+ * Surfaces, mounts and layouts.
4
+ *
5
+ * `SurfaceArea` is the only bridge between the registries and the render tree:
6
+ * it reads a surface's mounts and its state, then hands both to whichever
7
+ * layout that surface is currently using. Because the layout is store state
8
+ * rather than code, a sidebar can be tabs now and a stack a keystroke later.
9
+ */
10
+ export * from './bar-layout.js';
11
+ export * from './inline-layout.js';
12
+ export * from './mount-view.js';
13
+ export * from './rail-layout.js';
14
+ export * from './single-layout.js';
15
+ export * from './split-layout.js';
16
+ export * from './stack-layout.js';
17
+ export * from './surface-area.js';
18
+ export * from './tabs-layout.js';
19
+ export type { LayoutProps } from './shared.js';
20
+ export declare const SURFACE_COMPONENTS: ComponentDefinition[];
21
+ export declare const BUILTIN_LAYOUTS: ({
22
+ name: "single";
23
+ component: string;
24
+ title: string;
25
+ } | {
26
+ name: "tabs";
27
+ component: string;
28
+ title: string;
29
+ } | {
30
+ name: "stack";
31
+ component: string;
32
+ title: string;
33
+ } | {
34
+ name: "split";
35
+ component: string;
36
+ title: string;
37
+ } | {
38
+ name: "bar";
39
+ component: string;
40
+ title: string;
41
+ } | {
42
+ name: "rail";
43
+ component: string;
44
+ title: string;
45
+ } | {
46
+ name: "inline";
47
+ component: string;
48
+ title: string;
49
+ } | {
50
+ name: "floating";
51
+ component: string;
52
+ title: string;
53
+ } | {
54
+ name: "toast";
55
+ component: string;
56
+ title: string;
57
+ })[];
58
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/surface/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAWxD;;;;;;;GAOG;AACH,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,eAAO,MAAM,kBAAkB,EAAE,mBAAmB,EAUnD,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAU3B,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { BarLayout } from './bar-layout.js';
2
+ import { InlineLayout } from './inline-layout.js';
3
+ import { MountView } from './mount-view.js';
4
+ import { RailLayout } from './rail-layout.js';
5
+ import { SingleLayout } from './single-layout.js';
6
+ import { SplitLayout } from './split-layout.js';
7
+ import { StackLayout } from './stack-layout.js';
8
+ import { SurfaceArea } from './surface-area.js';
9
+ import { TabsLayout } from './tabs-layout.js';
10
+ /**
11
+ * Surfaces, mounts and layouts.
12
+ *
13
+ * `SurfaceArea` is the only bridge between the registries and the render tree:
14
+ * it reads a surface's mounts and its state, then hands both to whichever
15
+ * layout that surface is currently using. Because the layout is store state
16
+ * rather than code, a sidebar can be tabs now and a stack a keystroke later.
17
+ */
18
+ export * from './bar-layout.js';
19
+ export * from './inline-layout.js';
20
+ export * from './mount-view.js';
21
+ export * from './rail-layout.js';
22
+ export * from './single-layout.js';
23
+ export * from './split-layout.js';
24
+ export * from './stack-layout.js';
25
+ export * from './surface-area.js';
26
+ export * from './tabs-layout.js';
27
+ export const SURFACE_COMPONENTS = [
28
+ { component: 'SurfaceArea', category: 'chrome', renderer: { kind: 'function', render: SurfaceArea }, description: 'Renders one surface through its active layout.' },
29
+ { component: 'MountView', category: 'chrome', renderer: { kind: 'function', render: MountView }, description: 'Renders one mount target.' },
30
+ { component: 'SingleLayout', category: 'chrome', renderer: { kind: 'function', render: SingleLayout }, description: 'Only the active mount.' },
31
+ { component: 'TabsLayout', category: 'chrome', renderer: { kind: 'function', render: TabsLayout }, description: 'Tab strip plus the active mount.' },
32
+ { component: 'StackLayout', category: 'chrome', renderer: { kind: 'function', render: StackLayout }, description: 'All mounts, stacked with headings.' },
33
+ { component: 'SplitLayout', category: 'chrome', renderer: { kind: 'function', render: SplitLayout }, description: 'All mounts, side by side.' },
34
+ { component: 'BarLayout', category: 'chrome', renderer: { kind: 'function', render: BarLayout }, description: 'All mounts on one line.' },
35
+ { component: 'RailLayout', category: 'chrome', renderer: { kind: 'function', render: RailLayout }, description: 'Icons only.' },
36
+ { component: 'InlineLayout', category: 'chrome', renderer: { kind: 'function', render: InlineLayout }, description: 'All mounts, no chrome.' },
37
+ ];
38
+ export const BUILTIN_LAYOUTS = [
39
+ { name: 'single', component: 'SingleLayout', title: 'Single' },
40
+ { name: 'tabs', component: 'TabsLayout', title: 'Tabs' },
41
+ { name: 'stack', component: 'StackLayout', title: 'Stack' },
42
+ { name: 'split', component: 'SplitLayout', title: 'Split' },
43
+ { name: 'bar', component: 'BarLayout', title: 'Bar' },
44
+ { name: 'rail', component: 'RailLayout', title: 'Rail' },
45
+ { name: 'inline', component: 'InlineLayout', title: 'Inline' },
46
+ { name: 'floating', component: 'InlineLayout', title: 'Floating' },
47
+ { name: 'toast', component: 'StackLayout', title: 'Toast' },
48
+ ];
@@ -0,0 +1,4 @@
1
+ import type { LayoutProps } from './shared.js';
2
+ /** Every mount, no chrome at all. */
3
+ export declare const InlineLayout: (props: LayoutProps) => import("@textui/core").RenderOutput;
4
+ //# sourceMappingURL=inline-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-layout.d.ts","sourceRoot":"","sources":["../../src/surface/inline-layout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,qCAAqC;AACrC,eAAO,MAAM,YAAY,6DAKvB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { defineComponent, h } from '@textui/core';
2
+ import { MountView } from './mount-view.js';
3
+ /** Every mount, no chrome at all. */
4
+ export const InlineLayout = defineComponent('InlineLayout', (props) => {
5
+ const { mounts, surface: _surface, state: _state, ...rest } = props;
6
+ return h('box', { direction: 'column', flex: 1, ...rest }, ...mounts.map((mount) => h(MountView, { key: mount.key, mount })));
7
+ });
@@ -0,0 +1,7 @@
1
+ import type { BoxProps, Mount } from '@textui/core';
2
+ export interface MountViewProps extends BoxProps {
3
+ mount: Mount;
4
+ }
5
+ /** Renders one mount's target - an inline node, or a node read from a path. */
6
+ export declare const MountView: (props: MountViewProps) => import("@textui/core").RenderOutput;
7
+ //# sourceMappingURL=mount-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mount-view.d.ts","sourceRoot":"","sources":["../../src/surface/mount-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,QAAQ,EAAiB,KAAK,EAAE,MAAM,cAAc,CAAC;AAIhF,MAAM,WAAW,cAAe,SAAQ,QAAQ;IAC9C,KAAK,EAAE,KAAK,CAAC;CACd;AAED,+EAA+E;AAC/E,eAAO,MAAM,SAAS,gEAoBpB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { defineComponent, h, useRuntime } from '@textui/core';
2
+ import { EmptyState } from '../display/index.js';
3
+ /** Renders one mount's target - an inline node, or a node read from a path. */
4
+ export const MountView = defineComponent('MountView', ({ mount, ...rest }) => {
5
+ const runtime = useRuntime();
6
+ const target = mount.target;
7
+ const node = 'component' in target
8
+ ? target
9
+ : (runtime.store.get(target.path) ?? null);
10
+ if (!node) {
11
+ return h(EmptyState, { title: 'Nothing mounted', ...rest });
12
+ }
13
+ // A mount's data context makes relative paths inside it resolve against the
14
+ // record it was opened for.
15
+ const withContext = mount.dataContext
16
+ ? { ...node, dataContext: mount.dataContext }
17
+ : node;
18
+ return h('box', { flex: 1, direction: 'column', ...rest }, withContext);
19
+ });
@@ -0,0 +1,4 @@
1
+ import type { LayoutProps } from './shared.js';
2
+ /** Icons only, one per mount. An activity bar. */
3
+ export declare const RailLayout: (props: LayoutProps) => import("@textui/core").RenderOutput;
4
+ //# sourceMappingURL=rail-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rail-layout.d.ts","sourceRoot":"","sources":["../../src/surface/rail-layout.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,kDAAkD;AAClD,eAAO,MAAM,UAAU,6DAsBrB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { defineComponent, h, useRuntime, useTheme } from '@textui/core';
2
+ /** Icons only, one per mount. An activity bar. */
3
+ export const RailLayout = defineComponent('RailLayout', (props) => {
4
+ const runtime = useRuntime();
5
+ const theme = useTheme();
6
+ const { mounts, state, surface, ...rest } = props;
7
+ const app = runtime.app();
8
+ return h('box', { direction: 'column', width: 3, align: 'center', ...rest }, ...mounts.map((mount) => {
9
+ const active = mount.key === state.activeKey;
10
+ return h('box', {
11
+ key: mount.key,
12
+ direction: 'row',
13
+ gap: 0,
14
+ fg: active ? 'accent' : 'muted',
15
+ bold: active,
16
+ onClick: () => app?.surfaces.activate(surface, mount.key),
17
+ }, h('text', { content: active ? theme.glyphs.chevronRight : ' ' }), h('text', { content: mount.display?.icon ?? mount.key.slice(0, 1).toUpperCase() }));
18
+ }));
19
+ });
@@ -0,0 +1,7 @@
1
+ import type { BoxProps, Mount, SurfaceName, SurfaceState } from '@textui/core';
2
+ export interface LayoutProps extends BoxProps {
3
+ surface: SurfaceName;
4
+ mounts: Mount[];
5
+ state: SurfaceState;
6
+ }
7
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/surface/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE/E,MAAM,WAAW,WAAY,SAAQ,QAAQ;IAC3C,OAAO,EAAE,WAAW,CAAC;IACrB,MAAM,EAAE,KAAK,EAAE,CAAC;IAChB,KAAK,EAAE,YAAY,CAAC;CACrB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { LayoutProps } from './shared.js';
2
+ /** Only the active mount. */
3
+ export declare const SingleLayout: (props: LayoutProps) => import("@textui/core").RenderOutput;
4
+ //# sourceMappingURL=single-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"single-layout.d.ts","sourceRoot":"","sources":["../../src/surface/single-layout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,6BAA6B;AAC7B,eAAO,MAAM,YAAY,6DAmBvB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { defineComponent, h } from '@textui/core';
2
+ import { MountView } from './mount-view.js';
3
+ /** Only the active mount. */
4
+ export const SingleLayout = defineComponent('SingleLayout', (props) => {
5
+ const { mounts, state, surface: _surface, ...rest } = props;
6
+ const active = mounts.find((m) => m.key === state.activeKey) ?? mounts[0];
7
+ if (!active)
8
+ return null;
9
+ // A mount that declares a title gets one drawn, the same rule `stack`
10
+ // follows. It matters more here: `stack` shows everything at once, so which
11
+ // panel you are looking at is never a question, and this one shows one of
12
+ // several and answers it no other way.
13
+ if (active.display?.title === undefined)
14
+ return h(MountView, { mount: active, ...rest });
15
+ return h('box', { direction: 'column', flex: 1, ...rest }, h('box', { direction: 'row', gap: 1 }, h('text', { content: active.display.title, bold: true, fg: 'muted' }), active.display.badge !== undefined
16
+ ? h('text', { content: String(active.display.badge), fg: 'subtle' })
17
+ : null, h('spacer', { flex: 1 })), h(MountView, { mount: active, flex: 1 }));
18
+ });
@@ -0,0 +1,4 @@
1
+ import type { LayoutProps } from './shared.js';
2
+ /** Every mount, side by side, sharing the space. */
3
+ export declare const SplitLayout: (props: LayoutProps) => import("@textui/core").RenderOutput;
4
+ //# sourceMappingURL=split-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"split-layout.d.ts","sourceRoot":"","sources":["../../src/surface/split-layout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,oDAAoD;AACpD,eAAO,MAAM,WAAW,6DAKtB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { defineComponent, h } from '@textui/core';
2
+ import { MountView } from './mount-view.js';
3
+ /** Every mount, side by side, sharing the space. */
4
+ export const SplitLayout = defineComponent('SplitLayout', (props) => {
5
+ const { mounts, surface: _surface, state: _state, direction = 'row', ...rest } = props;
6
+ return h('box', { direction, flex: 1, gap: 1, ...rest }, ...mounts.map((mount) => h(MountView, { key: mount.key, mount, flex: 1 })));
7
+ });
@@ -0,0 +1,4 @@
1
+ import type { LayoutProps } from './shared.js';
2
+ /** Every mount, stacked, each under its own heading. */
3
+ export declare const StackLayout: (props: LayoutProps) => import("@textui/core").RenderOutput;
4
+ //# sourceMappingURL=stack-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack-layout.d.ts","sourceRoot":"","sources":["../../src/surface/stack-layout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,wDAAwD;AACxD,eAAO,MAAM,WAAW,6DA0BtB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { defineComponent, h, useTheme } from '@textui/core';
2
+ import { MountView } from './mount-view.js';
3
+ /** Every mount, stacked, each under its own heading. */
4
+ export const StackLayout = defineComponent('StackLayout', (props) => {
5
+ const theme = useTheme();
6
+ const { mounts, surface: _surface, state: _state, ...rest } = props;
7
+ return h('box', { direction: 'column', flex: 1, ...rest }, ...mounts.map((mount, i) =>
8
+ // Each mount fills its share of the surface rather than only what its
9
+ // own content needs. A content-sized wrapper hands a viewport no height
10
+ // to measure, and a tree inside one reports a rect of 3 rows in a
11
+ // twenty-row sidebar - or of 0, once its content overflows.
12
+ h('box', { key: mount.key, direction: 'column', flex: 1 }, mount.display?.title
13
+ ? h('box', { direction: 'row', gap: 1 }, h('text', { content: mount.display.title, bold: true, fg: 'muted' }), mount.display.badge !== undefined
14
+ ? h('text', { content: String(mount.display.badge), fg: 'subtle' })
15
+ : null, h('spacer', { flex: 1 }))
16
+ : null, h(MountView, { mount }),
17
+ // A rule separates two mounts. After the last one it separates a mount
18
+ // from nothing, which is a line under a sidebar with one panel in it.
19
+ i < mounts.length - 1
20
+ ? h('box', { height: 1, fill: theme.borderChars().top, fg: 'borderSubtle' })
21
+ : null)));
22
+ });
@@ -0,0 +1,16 @@
1
+ import type { BoxProps, ComponentNode, SurfaceName } from '@textui/core';
2
+ export interface SurfaceAreaProps extends BoxProps {
3
+ surface: SurfaceName;
4
+ /** Override the surface's stored layout. */
5
+ layout?: string;
6
+ /** Rendered when the surface has no visible mounts. */
7
+ fallback?: ComponentNode;
8
+ }
9
+ /**
10
+ * Render one surface through its active layout.
11
+ *
12
+ * This subscribes to the surface's state and mount list rather than to the
13
+ * whole store, so opening a tab in `main` does not re-render the status bar.
14
+ */
15
+ export declare const SurfaceArea: (props: SurfaceAreaProps) => import("@textui/core").RenderOutput;
16
+ //# sourceMappingURL=surface-area.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface-area.d.ts","sourceRoot":"","sources":["../../src/surface/surface-area.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,QAAQ,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGtF,MAAM,WAAW,gBAAiB,SAAQ,QAAQ;IAChD,OAAO,EAAE,WAAW,CAAC;IACrB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,kEA4BtB,CAAC"}