@gjermundgaraba/pixel-paper 0.0.0-stage → 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 (387) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -2
  3. package/dist/_virtual/_rolldown/runtime.js +13 -0
  4. package/dist/announcer/announcer.d.ts +35 -0
  5. package/dist/announcer/announcer.js +121 -0
  6. package/dist/announcer/index.d.ts +5 -0
  7. package/dist/announcer/index.js +11 -0
  8. package/dist/attributes/attributes.d.ts +4 -0
  9. package/dist/banner/banner.d.ts +20 -0
  10. package/dist/banner/banner.js +18 -0
  11. package/dist/banner/index.d.ts +5 -0
  12. package/dist/banner/index.js +6 -0
  13. package/dist/bench/bench.d.ts +16 -0
  14. package/dist/bench/bench.js +12 -0
  15. package/dist/bench/index.d.ts +5 -0
  16. package/dist/bench/index.js +6 -0
  17. package/dist/board/board.d.ts +1151 -0
  18. package/dist/board/board.js +449 -0
  19. package/dist/board/index.d.ts +6 -0
  20. package/dist/board/index.js +21 -0
  21. package/dist/button/button.d.ts +54 -0
  22. package/dist/button/button.js +50 -0
  23. package/dist/button/index.d.ts +5 -0
  24. package/dist/button/index.js +9 -0
  25. package/dist/card/card.d.ts +66 -0
  26. package/dist/card/card.js +70 -0
  27. package/dist/card/index.d.ts +5 -0
  28. package/dist/card/index.js +10 -0
  29. package/dist/chip/chip.d.ts +27 -0
  30. package/dist/chip/chip.js +34 -0
  31. package/dist/chip/index.d.ts +5 -0
  32. package/dist/chip/index.js +9 -0
  33. package/dist/choice/choice.d.ts +16 -0
  34. package/dist/choice/choice.js +17 -0
  35. package/dist/choice/index.d.ts +5 -0
  36. package/dist/choice/index.js +6 -0
  37. package/dist/code-editor/code-editor.d.ts +15 -0
  38. package/dist/code-editor/code-editor.js +22 -0
  39. package/dist/code-editor/index.d.ts +5 -0
  40. package/dist/code-editor/index.js +6 -0
  41. package/dist/code-surface/code-surface.d.ts +12 -0
  42. package/dist/code-surface/code-surface.js +12 -0
  43. package/dist/code-surface/index.d.ts +5 -0
  44. package/dist/code-surface/index.js +6 -0
  45. package/dist/command-palette/command-palette.d.ts +579 -0
  46. package/dist/command-palette/command-palette.js +600 -0
  47. package/dist/command-palette/index.d.ts +9 -0
  48. package/dist/command-palette/index.js +32 -0
  49. package/dist/command-palette/keys.d.ts +13 -0
  50. package/dist/command-palette/keys.js +71 -0
  51. package/dist/command-palette/match.d.ts +43 -0
  52. package/dist/command-palette/match.js +45 -0
  53. package/dist/command-palette/message.d.ts +94 -0
  54. package/dist/command-palette/message.js +46 -0
  55. package/dist/confirm-dialog/confirm-dialog.d.ts +287 -0
  56. package/dist/confirm-dialog/confirm-dialog.js +115 -0
  57. package/dist/confirm-dialog/index.d.ts +5 -0
  58. package/dist/confirm-dialog/index.js +17 -0
  59. package/dist/copy-button/copy-button.d.ts +99 -0
  60. package/dist/copy-button/copy-button.js +96 -0
  61. package/dist/copy-button/index.d.ts +5 -0
  62. package/dist/copy-button/index.js +13 -0
  63. package/dist/crumbs/crumbs.d.ts +15 -0
  64. package/dist/crumbs/crumbs.js +11 -0
  65. package/dist/crumbs/index.d.ts +5 -0
  66. package/dist/crumbs/index.js +6 -0
  67. package/dist/deck/deck.d.ts +9 -0
  68. package/dist/deck/deck.js +9 -0
  69. package/dist/deck/index.d.ts +5 -0
  70. package/dist/deck/index.js +6 -0
  71. package/dist/dialog/dialog.d.ts +278 -0
  72. package/dist/dialog/dialog.js +145 -0
  73. package/dist/dialog/fold.d.ts +58 -0
  74. package/dist/dialog/fold.js +63 -0
  75. package/dist/dialog/index.d.ts +6 -0
  76. package/dist/dialog/index.js +21 -0
  77. package/dist/disclosure/disclosure.d.ts +24 -0
  78. package/dist/disclosure/disclosure.js +25 -0
  79. package/dist/disclosure/index.d.ts +5 -0
  80. package/dist/disclosure/index.js +6 -0
  81. package/dist/dom/html-element.js +8 -0
  82. package/dist/drag/drag.d.ts +15 -0
  83. package/dist/drag/drag.js +123 -0
  84. package/dist/drop-zone/drop-zone.d.ts +119 -0
  85. package/dist/drop-zone/drop-zone.js +64 -0
  86. package/dist/drop-zone/index.d.ts +5 -0
  87. package/dist/drop-zone/index.js +14 -0
  88. package/dist/empty-state/empty-state.d.ts +18 -0
  89. package/dist/empty-state/empty-state.js +16 -0
  90. package/dist/empty-state/index.d.ts +5 -0
  91. package/dist/empty-state/index.js +6 -0
  92. package/dist/error-summary/error-summary.d.ts +34 -0
  93. package/dist/error-summary/error-summary.js +33 -0
  94. package/dist/error-summary/index.d.ts +5 -0
  95. package/dist/error-summary/index.js +6 -0
  96. package/dist/field/field.d.ts +35 -0
  97. package/dist/field/field.js +34 -0
  98. package/dist/field/index.d.ts +5 -0
  99. package/dist/field/index.js +6 -0
  100. package/dist/field-grid/field-grid.d.ts +8 -0
  101. package/dist/field-grid/field-grid.js +8 -0
  102. package/dist/field-grid/index.d.ts +5 -0
  103. package/dist/field-grid/index.js +6 -0
  104. package/dist/fields/fields.js +9 -0
  105. package/dist/fieldset/fieldset.d.ts +13 -0
  106. package/dist/fieldset/fieldset.js +13 -0
  107. package/dist/fieldset/index.d.ts +5 -0
  108. package/dist/fieldset/index.js +6 -0
  109. package/dist/filter-chip/filter-chip.d.ts +21 -0
  110. package/dist/filter-chip/filter-chip.js +28 -0
  111. package/dist/filter-chip/index.d.ts +5 -0
  112. package/dist/filter-chip/index.js +6 -0
  113. package/dist/filter-strip/filter-strip.d.ts +12 -0
  114. package/dist/filter-strip/filter-strip.js +13 -0
  115. package/dist/filter-strip/index.d.ts +5 -0
  116. package/dist/filter-strip/index.js +6 -0
  117. package/dist/flash-word/flash-word.d.ts +31 -0
  118. package/dist/flash-word/flash-word.js +31 -0
  119. package/dist/flash-word/index.d.ts +5 -0
  120. package/dist/flash-word/index.js +9 -0
  121. package/dist/focus/focus.d.ts +15 -0
  122. package/dist/focus/focus.js +17 -0
  123. package/dist/focus/index.d.ts +5 -0
  124. package/dist/focus/index.js +9 -0
  125. package/dist/format/format.js +52 -0
  126. package/dist/format/index.d.ts +5 -0
  127. package/dist/format/index.js +6 -0
  128. package/dist/glyph/glyph.d.ts +9 -0
  129. package/dist/glyph/glyph.js +25 -0
  130. package/dist/glyph/glyphs.d.ts +381 -0
  131. package/dist/glyph/glyphs.js +2603 -0
  132. package/dist/glyph/index.d.ts +5 -0
  133. package/dist/glyph/index.js +6 -0
  134. package/dist/group/group.d.ts +8 -0
  135. package/dist/group/group.js +9 -0
  136. package/dist/group/index.d.ts +5 -0
  137. package/dist/group/index.js +6 -0
  138. package/dist/history/history.d.ts +34 -0
  139. package/dist/history/history.js +15 -0
  140. package/dist/history/index.d.ts +5 -0
  141. package/dist/history/index.js +6 -0
  142. package/dist/icon-button/icon-button.d.ts +23 -0
  143. package/dist/icon-button/icon-button.js +23 -0
  144. package/dist/icon-button/index.d.ts +5 -0
  145. package/dist/icon-button/index.js +6 -0
  146. package/dist/identity/identity.d.ts +15 -0
  147. package/dist/identity/identity.js +15 -0
  148. package/dist/identity/index.d.ts +5 -0
  149. package/dist/identity/index.js +6 -0
  150. package/dist/index.d.ts +85 -0
  151. package/dist/index.js +85 -0
  152. package/dist/inline-input/index.d.ts +5 -0
  153. package/dist/inline-input/index.js +20 -0
  154. package/dist/inline-input/inline-input.d.ts +196 -0
  155. package/dist/inline-input/inline-input.js +212 -0
  156. package/dist/key-help/index.d.ts +5 -0
  157. package/dist/key-help/index.js +18 -0
  158. package/dist/key-help/key-help.d.ts +255 -0
  159. package/dist/key-help/key-help.js +137 -0
  160. package/dist/key-hint/index.d.ts +6 -0
  161. package/dist/key-hint/index.js +12 -0
  162. package/dist/key-hint/key-hint.d.ts +13 -0
  163. package/dist/key-hint/key-hint.js +7 -0
  164. package/dist/key-hint/key-label.d.ts +18 -0
  165. package/dist/key-hint/key-label.js +77 -0
  166. package/dist/keymap/keymap.d.ts +11 -0
  167. package/dist/keymap/keymap.js +9 -0
  168. package/dist/keys/keys.js +4 -0
  169. package/dist/line-diff/diff.d.ts +2 -0
  170. package/dist/line-diff/diff.js +73 -0
  171. package/dist/line-diff/index.d.ts +6 -0
  172. package/dist/line-diff/index.js +10 -0
  173. package/dist/line-diff/line-diff.d.ts +21 -0
  174. package/dist/line-diff/line-diff.js +75 -0
  175. package/dist/line-diff/patch.d.ts +15 -0
  176. package/dist/line-diff/patch.js +120 -0
  177. package/dist/link-button/index.d.ts +5 -0
  178. package/dist/link-button/index.js +6 -0
  179. package/dist/link-button/link-button.d.ts +11 -0
  180. package/dist/link-button/link-button.js +10 -0
  181. package/dist/link-state/index.d.ts +5 -0
  182. package/dist/link-state/index.js +6 -0
  183. package/dist/link-state/link-state.d.ts +15 -0
  184. package/dist/link-state/link-state.js +17 -0
  185. package/dist/live-region/index.d.ts +5 -0
  186. package/dist/live-region/index.js +9 -0
  187. package/dist/live-region/live-region.d.ts +39 -0
  188. package/dist/live-region/live-region.js +33 -0
  189. package/dist/loading/index.d.ts +5 -0
  190. package/dist/loading/index.js +6 -0
  191. package/dist/loading/loading.d.ts +19 -0
  192. package/dist/loading/loading.js +16 -0
  193. package/dist/locale/locale.d.ts +3 -0
  194. package/dist/locale/locale.js +5 -0
  195. package/dist/mark/index.d.ts +5 -0
  196. package/dist/mark/index.js +6 -0
  197. package/dist/mark/mark.d.ts +15 -0
  198. package/dist/mark/mark.js +30 -0
  199. package/dist/menu/index.d.ts +7 -0
  200. package/dist/menu/index.js +25 -0
  201. package/dist/menu/item.d.ts +236 -0
  202. package/dist/menu/item.js +19 -0
  203. package/dist/menu/menu.d.ts +206 -0
  204. package/dist/menu/menu.js +208 -0
  205. package/dist/menu/slip.js +163 -0
  206. package/dist/meter/index.d.ts +5 -0
  207. package/dist/meter/index.js +6 -0
  208. package/dist/meter/meter.d.ts +38 -0
  209. package/dist/meter/meter.js +69 -0
  210. package/dist/monogram/monogram.js +33 -0
  211. package/dist/nav-strip/index.d.ts +5 -0
  212. package/dist/nav-strip/index.js +6 -0
  213. package/dist/nav-strip/nav-strip.d.ts +19 -0
  214. package/dist/nav-strip/nav-strip.js +21 -0
  215. package/dist/notice/index.d.ts +5 -0
  216. package/dist/notice/index.js +6 -0
  217. package/dist/notice/notice.d.ts +23 -0
  218. package/dist/notice/notice.js +35 -0
  219. package/dist/outcome/index.d.ts +5 -0
  220. package/dist/outcome/index.js +6 -0
  221. package/dist/outcome/outcome.d.ts +19 -0
  222. package/dist/outcome/outcome.js +14 -0
  223. package/dist/page-head/index.d.ts +5 -0
  224. package/dist/page-head/index.js +6 -0
  225. package/dist/page-head/page-head.d.ts +13 -0
  226. package/dist/page-head/page-head.js +10 -0
  227. package/dist/panel/index.d.ts +5 -0
  228. package/dist/panel/index.js +6 -0
  229. package/dist/panel/panel.d.ts +35 -0
  230. package/dist/panel/panel.js +25 -0
  231. package/dist/password-field/index.d.ts +5 -0
  232. package/dist/password-field/index.js +6 -0
  233. package/dist/password-field/password-field.d.ts +33 -0
  234. package/dist/password-field/password-field.js +39 -0
  235. package/dist/places/index.d.ts +5 -0
  236. package/dist/places/index.js +6 -0
  237. package/dist/places/places.d.ts +32 -0
  238. package/dist/places/places.js +22 -0
  239. package/dist/props-list/index.d.ts +5 -0
  240. package/dist/props-list/index.js +6 -0
  241. package/dist/props-list/props-list.d.ts +18 -0
  242. package/dist/props-list/props-list.js +12 -0
  243. package/dist/prose/index.d.ts +5 -0
  244. package/dist/prose/index.js +6 -0
  245. package/dist/prose/prose.d.ts +14 -0
  246. package/dist/prose/prose.js +6 -0
  247. package/dist/query-chip/index.d.ts +5 -0
  248. package/dist/query-chip/index.js +6 -0
  249. package/dist/query-chip/query-chip.d.ts +18 -0
  250. package/dist/query-chip/query-chip.js +17 -0
  251. package/dist/radio-choices/index.d.ts +5 -0
  252. package/dist/radio-choices/index.js +12 -0
  253. package/dist/radio-choices/radio-choices.d.ts +105 -0
  254. package/dist/radio-choices/radio-choices.js +56 -0
  255. package/dist/rail/index.d.ts +5 -0
  256. package/dist/rail/index.js +22 -0
  257. package/dist/rail/rail.d.ts +403 -0
  258. package/dist/rail/rail.js +355 -0
  259. package/dist/reel/index.d.ts +6 -0
  260. package/dist/reel/index.js +26 -0
  261. package/dist/reel/layout.d.ts +58 -0
  262. package/dist/reel/layout.js +378 -0
  263. package/dist/reel/reel.d.ts +1070 -0
  264. package/dist/reel/reel.js +1019 -0
  265. package/dist/remote/index.d.ts +5 -0
  266. package/dist/remote/index.js +6 -0
  267. package/dist/remote/remote.d.ts +28 -0
  268. package/dist/remote/remote.js +41 -0
  269. package/dist/rows/index.d.ts +5 -0
  270. package/dist/rows/index.js +12 -0
  271. package/dist/rows/rows.d.ts +116 -0
  272. package/dist/rows/rows.js +67 -0
  273. package/dist/scheme/index.d.ts +6 -0
  274. package/dist/scheme/index.js +10 -0
  275. package/dist/scheme/scheme-switch.d.ts +98 -0
  276. package/dist/scheme/scheme-switch.js +118 -0
  277. package/dist/scheme/scheme.d.ts +5 -0
  278. package/dist/scheme/scheme.js +16 -0
  279. package/dist/scheme/script.d.ts +8 -0
  280. package/dist/scheme/script.js +10 -0
  281. package/dist/secret/index.d.ts +5 -0
  282. package/dist/secret/index.js +6 -0
  283. package/dist/secret/secret.d.ts +13 -0
  284. package/dist/secret/secret.js +9 -0
  285. package/dist/segmented/index.d.ts +5 -0
  286. package/dist/segmented/index.js +6 -0
  287. package/dist/segmented/segmented.d.ts +17 -0
  288. package/dist/segmented/segmented.js +17 -0
  289. package/dist/select-field/index.d.ts +5 -0
  290. package/dist/select-field/index.js +6 -0
  291. package/dist/select-field/select-field.d.ts +38 -0
  292. package/dist/select-field/select-field.js +29 -0
  293. package/dist/sheet/index.d.ts +5 -0
  294. package/dist/sheet/index.js +6 -0
  295. package/dist/sheet/sheet.d.ts +16 -0
  296. package/dist/sheet/sheet.js +15 -0
  297. package/dist/skip-link/index.d.ts +5 -0
  298. package/dist/skip-link/index.js +9 -0
  299. package/dist/skip-link/skip-link.d.ts +23 -0
  300. package/dist/skip-link/skip-link.js +36 -0
  301. package/dist/slot/slot.js +8 -0
  302. package/dist/sortable/index.d.ts +5 -0
  303. package/dist/sortable/index.js +16 -0
  304. package/dist/sortable/sortable.d.ts +1125 -0
  305. package/dist/sortable/sortable.js +431 -0
  306. package/dist/stack/index.d.ts +5 -0
  307. package/dist/stack/index.js +6 -0
  308. package/dist/stack/stack.d.ts +15 -0
  309. package/dist/stack/stack.js +12 -0
  310. package/dist/stage/index.d.ts +5 -0
  311. package/dist/stage/index.js +6 -0
  312. package/dist/stage/stage.d.ts +14 -0
  313. package/dist/stage/stage.js +11 -0
  314. package/dist/stat/index.d.ts +5 -0
  315. package/dist/stat/index.js +6 -0
  316. package/dist/stat/stat.d.ts +18 -0
  317. package/dist/stat/stat.js +13 -0
  318. package/dist/status-bar/index.d.ts +6 -0
  319. package/dist/status-bar/index.js +11 -0
  320. package/dist/status-bar/status-bar.d.ts +28 -0
  321. package/dist/status-bar/status-bar.js +19 -0
  322. package/dist/subscription/prefix-keys.js +12 -0
  323. package/dist/table/index.d.ts +5 -0
  324. package/dist/table/index.js +6 -0
  325. package/dist/table/table.d.ts +26 -0
  326. package/dist/table/table.js +18 -0
  327. package/dist/tabs/index.d.ts +5 -0
  328. package/dist/tabs/index.js +14 -0
  329. package/dist/tabs/tabs.d.ts +125 -0
  330. package/dist/tabs/tabs.js +57 -0
  331. package/dist/tag/index.d.ts +5 -0
  332. package/dist/tag/index.js +6 -0
  333. package/dist/tag/tag.d.ts +16 -0
  334. package/dist/tag/tag.js +25 -0
  335. package/dist/text-button/index.d.ts +5 -0
  336. package/dist/text-button/index.js +6 -0
  337. package/dist/text-button/text-button.d.ts +8 -0
  338. package/dist/text-button/text-button.js +12 -0
  339. package/dist/textarea-field/index.d.ts +5 -0
  340. package/dist/textarea-field/index.js +6 -0
  341. package/dist/textarea-field/textarea-field.d.ts +28 -0
  342. package/dist/textarea-field/textarea-field.js +30 -0
  343. package/dist/time/index.d.ts +5 -0
  344. package/dist/time/index.js +9 -0
  345. package/dist/time/time.d.ts +38 -0
  346. package/dist/time/time.js +63 -0
  347. package/dist/tips/index.d.ts +5 -0
  348. package/dist/tips/index.js +14 -0
  349. package/dist/tips/tips.d.ts +339 -0
  350. package/dist/tips/tips.js +308 -0
  351. package/dist/toast/index.d.ts +5 -0
  352. package/dist/toast/index.js +17 -0
  353. package/dist/toast/stack.d.ts +7 -0
  354. package/dist/toast/stack.js +23 -0
  355. package/dist/toast/toast.d.ts +559 -0
  356. package/dist/toast/toast.js +269 -0
  357. package/dist/toc/index.d.ts +5 -0
  358. package/dist/toc/index.js +9 -0
  359. package/dist/toc/toc.d.ts +42 -0
  360. package/dist/toc/toc.js +35 -0
  361. package/dist/top-bar/bar-height.d.ts +26 -0
  362. package/dist/top-bar/bar-height.js +43 -0
  363. package/dist/top-bar/index.d.ts +6 -0
  364. package/dist/top-bar/index.js +12 -0
  365. package/dist/top-bar/top-bar.d.ts +19 -0
  366. package/dist/top-bar/top-bar.js +18 -0
  367. package/dist/wall/index.d.ts +5 -0
  368. package/dist/wall/index.js +9 -0
  369. package/dist/wall/wall.d.ts +16 -0
  370. package/dist/wall/wall.js +15 -0
  371. package/dist/window/index.d.ts +5 -0
  372. package/dist/window/index.js +6 -0
  373. package/dist/window/window.d.ts +28 -0
  374. package/dist/window/window.js +29 -0
  375. package/dist/wordmark/index.d.ts +5 -0
  376. package/dist/wordmark/index.js +6 -0
  377. package/dist/wordmark/wordmark.d.ts +10 -0
  378. package/dist/wordmark/wordmark.js +10 -0
  379. package/dist/wrap/index.d.ts +5 -0
  380. package/dist/wrap/index.js +6 -0
  381. package/dist/wrap/wrap.d.ts +12 -0
  382. package/dist/wrap/wrap.js +9 -0
  383. package/fonts/DepartureMono-Regular.woff2 +0 -0
  384. package/fonts/LICENSE.txt +2 -0
  385. package/package.json +57 -3
  386. package/src/pixel-paper.css +4611 -0
  387. package/src/tokens.css +151 -0
@@ -0,0 +1,1070 @@
1
+ import { Layout, OutMessage, Pane } from "./layout.js";
2
+ import { Effect, Option, Schema } from "effect";
3
+ import * as Command from "foldkit/command";
4
+ import { Html } from "foldkit/html";
5
+ import "foldkit/mount";
6
+ import * as Subscription from "foldkit/subscription";
7
+ import * as Update from "foldkit/update";
8
+ /** Schema for a reel: its id, the focused pane, what is held and a splitter being dragged. All
9
+ * of it is this client's; the layout is the application's. */
10
+ export declare const Model: Schema.Struct<{
11
+ readonly id: Schema.String;
12
+ readonly maybeFocus: Schema.Option<Schema.Struct<{
13
+ readonly paneId: Schema.String;
14
+ readonly column: Schema.Finite;
15
+ readonly row: Schema.Finite;
16
+ }>>;
17
+ readonly maybeHeld: Schema.Option<Schema.Struct<{
18
+ readonly paneId: Schema.String;
19
+ readonly by: import("foldkit/schema").TaggedUnion<{
20
+ readonly Pointer: {
21
+ pointerId: Schema.Finite;
22
+ pressX: Schema.Finite;
23
+ pressY: Schema.Finite;
24
+ x: Schema.Finite;
25
+ y: Schema.Finite;
26
+ isCarrying: Schema.Boolean;
27
+ };
28
+ readonly Keyboard: {};
29
+ }>;
30
+ readonly maybeTarget: Schema.Option<import("foldkit/schema").TaggedUnion<{
31
+ readonly Into: {
32
+ columnId: Schema.String;
33
+ index: Schema.Finite;
34
+ };
35
+ readonly Gap: {
36
+ maybeBeforeColumnId: Schema.Option<Schema.String>;
37
+ };
38
+ }>>;
39
+ }>>;
40
+ readonly maybeResizing: Schema.Option<Schema.Struct<{
41
+ readonly splitter: import("foldkit/schema").TaggedUnion<{
42
+ readonly Width: {
43
+ columnId: Schema.String;
44
+ };
45
+ readonly Split: {
46
+ abovePaneId: Schema.String;
47
+ };
48
+ }>;
49
+ readonly pointerId: Schema.Finite;
50
+ readonly pressX: Schema.Finite;
51
+ readonly pressY: Schema.Finite;
52
+ readonly maybeResize: Schema.Option<Schema.Union<readonly [import("foldkit/schema").CallableTaggedStruct<"ResizedColumn", {
53
+ readonly columnId: Schema.String;
54
+ readonly width: Schema.Finite;
55
+ }>, import("foldkit/schema").CallableTaggedStruct<"ResizedPanes", {
56
+ readonly columnId: Schema.String;
57
+ readonly weights: Schema.$Record<Schema.String, Schema.Finite>;
58
+ }>]>>;
59
+ }>>;
60
+ }>;
61
+ export type Model = typeof Model.Type;
62
+ /** How a reel shows its panes: side by side in their columns (`Strip`), or one at a time at
63
+ * the reel's full size under a tab per pane (`Tabs`). The application holds it and passes it
64
+ * in; the layout is the same in both. */
65
+ export declare const Arrangement: Schema.Literals<readonly ["Strip", "Tabs"]>;
66
+ export type Arrangement = typeof Arrangement.Type;
67
+ /** Union of all Messages a reel can produce. */
68
+ export declare const Message: import("foldkit/message").MessageUnion<{
69
+ readonly PressedGrip: {
70
+ paneId: Schema.String;
71
+ pointerId: Schema.Finite;
72
+ clientX: Schema.Finite;
73
+ clientY: Schema.Finite;
74
+ };
75
+ readonly PressedGripKey: {
76
+ paneId: Schema.String;
77
+ };
78
+ readonly MovedPointer: {
79
+ readonly clientX: Schema.Finite;
80
+ readonly clientY: Schema.Finite;
81
+ readonly maybeTarget: Schema.Option<import("foldkit/schema").TaggedUnion<{
82
+ readonly Into: {
83
+ columnId: Schema.String;
84
+ index: Schema.Finite;
85
+ };
86
+ readonly Gap: {
87
+ maybeBeforeColumnId: Schema.Option<Schema.String>;
88
+ };
89
+ }>>;
90
+ };
91
+ readonly ReleasedPointer: {
92
+ readonly clientX: Schema.Finite;
93
+ readonly clientY: Schema.Finite;
94
+ readonly maybeTarget: Schema.Option<import("foldkit/schema").TaggedUnion<{
95
+ readonly Into: {
96
+ columnId: Schema.String;
97
+ index: Schema.Finite;
98
+ };
99
+ readonly Gap: {
100
+ maybeBeforeColumnId: Schema.Option<Schema.String>;
101
+ };
102
+ }>>;
103
+ };
104
+ readonly CancelledPointer: {};
105
+ readonly SteppedHeld: {
106
+ step: Schema.Literals<readonly ["Up", "Down", "Left", "Right"]>;
107
+ };
108
+ readonly DroppedHeld: {};
109
+ readonly LeftGrip: {};
110
+ readonly PressedEscape: {};
111
+ readonly FocusedPane: {
112
+ paneId: Schema.String;
113
+ };
114
+ readonly PressedTab: {
115
+ paneId: Schema.String;
116
+ };
117
+ readonly SteppedTab: {
118
+ paneId: Schema.String;
119
+ };
120
+ readonly PressedSplitter: {
121
+ splitter: import("foldkit/schema").TaggedUnion<{
122
+ readonly Width: {
123
+ columnId: Schema.String;
124
+ };
125
+ readonly Split: {
126
+ abovePaneId: Schema.String;
127
+ };
128
+ }>;
129
+ pointerId: Schema.Finite;
130
+ clientX: Schema.Finite;
131
+ clientY: Schema.Finite;
132
+ };
133
+ readonly MovedSplitter: {
134
+ share: Schema.Finite;
135
+ };
136
+ readonly ReleasedSplitter: {
137
+ share: Schema.Finite;
138
+ };
139
+ readonly CancelledSplitter: {};
140
+ readonly PressedSplitterKey: {
141
+ splitter: import("foldkit/schema").TaggedUnion<{
142
+ readonly Width: {
143
+ columnId: Schema.String;
144
+ };
145
+ readonly Split: {
146
+ abovePaneId: Schema.String;
147
+ };
148
+ }>;
149
+ share: Schema.Finite;
150
+ };
151
+ readonly CompletedAnnounceReel: {};
152
+ readonly CompletedFocusPane: {};
153
+ readonly CompletedFocusTab: {};
154
+ readonly CompletedRestoreFocus: {};
155
+ readonly CompletedScrollIntoView: {};
156
+ readonly CompletedSizeLiftedPane: {};
157
+ }>;
158
+ export type Message = typeof Message.Type;
159
+ /** Configuration for creating a reel with `init`. The `id` must be unique in the document;
160
+ * the reel's DOM hooks are scoped by it. */
161
+ export type InitConfig = Readonly<{
162
+ id: string;
163
+ }>;
164
+ /** Creates a reel focused on its first pane, holding nothing, at rest. */
165
+ export declare const init: (config: InitConfig) => Model;
166
+ /** The pane focus is on: the one last focused, or, when it has gone from `layout`, the pane
167
+ * now nearest its place; the first pane before any is focused. None for an empty layout. */
168
+ export declare const focusedPaneId: (model: Model, layout: Layout) => Option.Option<string>;
169
+ /** Says a focus move, a move or a step of a drag through the page's live region (as
170
+ * `Announcer.Announce` does). */
171
+ export declare const AnnounceReel: Command.CommandDefinitionWithArgs<"AnnounceReel", {
172
+ text: Schema.String;
173
+ }, Effect.Effect<{
174
+ readonly _tag: "CompletedAnnounceReel";
175
+ }, never, never>>;
176
+ /** Focuses the pane `paneHook` names, unless focus is already inside it: the control in it
177
+ * marked `data-reel-focus` (a terminal's input), or the pane itself. It does not scroll;
178
+ * ScrollIntoView does. */
179
+ export declare const FocusPane: Command.CommandDefinitionWithArgs<"FocusPane", {
180
+ paneHook: Schema.String;
181
+ }, Effect.Effect<{
182
+ readonly _tag: "CompletedFocusPane";
183
+ }, never, never>>;
184
+ /** Scrolls the pane or column `hook` names into view, by the least distance either way, its
185
+ * gutter kept by the stylesheet's `scroll-margin`, once the render that placed it is in the
186
+ * page. It jumps: motion is stepped or instant, and a follow is instant. */
187
+ export declare const ScrollIntoView: Command.CommandDefinitionWithArgs<"ScrollIntoView", {
188
+ hook: Schema.String;
189
+ }, Effect.Effect<{
190
+ readonly _tag: "CompletedScrollIntoView";
191
+ }, never, never>>;
192
+ /** What the reel reads from its parent as each Message arrives: the layout as the
193
+ * application holds it now, and how the view shows it (`Strip` when not given), which
194
+ * `perform` reads. */
195
+ export type UpdateContext = Readonly<{
196
+ layout: Layout;
197
+ arrangement?: Arrangement;
198
+ }>;
199
+ type UpdateReturn = Update.ReturnWithOutMessage<Model, Message, OutMessage>;
200
+ /** Processes a reel Message against the layout as the application holds it now, and returns
201
+ * the next Model, Commands and OutMessage. */
202
+ export declare const update: (model: Model, message: Message, context: UpdateContext) => UpdateReturn;
203
+ /**
204
+ * Brings the reel in line with a layout that changed: call it whenever the application changes
205
+ * the layout, by a request it applied, another client's or one of its own (a pane closed). The
206
+ * focused pane's place is read again; when it has gone, focus moves to the pane now nearest
207
+ * where it was, and the keyboard follows where it went with the pane. A drag whose pane has
208
+ * gone is cancelled, and one whose target's column has gone aims where it started;
209
+ * a splitter whose column or pane has gone lets go.
210
+ */
211
+ export declare const reconcile: (model: Model, context: UpdateContext) => UpdateReturn;
212
+ /** What the application's keys ask of the reel. `Focus*`: focus the pane beside the focused
213
+ * one. `MovePane*`: move the focused pane up or down its column, or into the column beside it
214
+ * (past the first or last column, into a column of its own). `MoveColumn*`: move its column.
215
+ * `CycleWidth`: its column's width to the next preset. `PullOut`: the pane into a column of
216
+ * its own, right of its column. */
217
+ export declare const Action: Schema.Literals<readonly ["FocusLeft", "FocusRight", "FocusUp", "FocusDown", "MovePaneLeft", "MovePaneRight", "MovePaneUp", "MovePaneDown", "MoveColumnLeft", "MoveColumnRight", "CycleWidth", "PullOut"]>;
218
+ export type Action = typeof Action.Type;
219
+ /**
220
+ * Does what the application's key for `action` asks, from the focused pane, against the
221
+ * layout as the application holds it: focus moves focus the pane and scroll the reel to it;
222
+ * moves report their request as the OutMessage, which the application applies, with focus
223
+ * kept on the pane. Each is said through the live region. Nothing happens while something is
224
+ * held, or where there is nowhere to go. Under tabs, only the focus keys act, stepping from tab
225
+ * to tab.
226
+ */
227
+ export declare const perform: (model: Model, action: Action, context: UpdateContext) => UpdateReturn;
228
+ /** A held pane follows the pointer (the reel scrolling near its edges), a dragged
229
+ * splitter resizes, and Escape puts either back, before a dialog or the page sees it, from
230
+ * listeners that run only while something is held. Lift them into the application's
231
+ * Subscriptions, once per reel, behind a key prefix of the parent's: `subscriptions("tiles")`
232
+ * is keyed `tilesPointer`, `tilesEdge`, `tilesResize` and `tilesEscape`. */
233
+ export declare const subscriptions: <Prefix extends string>(keyPrefix: Prefix) => {
234
+ readonly pointer: Subscription.EntryWithoutKeepAlive<{
235
+ readonly id: string;
236
+ readonly maybeFocus: Option.Option<{
237
+ readonly paneId: string;
238
+ readonly column: number;
239
+ readonly row: number;
240
+ }>;
241
+ readonly maybeHeld: Option.Option<{
242
+ readonly paneId: string;
243
+ readonly by: {
244
+ readonly _tag: "Keyboard";
245
+ } | {
246
+ readonly _tag: "Pointer";
247
+ readonly pointerId: number;
248
+ readonly pressX: number;
249
+ readonly pressY: number;
250
+ readonly x: number;
251
+ readonly y: number;
252
+ readonly isCarrying: boolean;
253
+ };
254
+ readonly maybeTarget: Option.Option<{
255
+ readonly _tag: "Gap";
256
+ readonly maybeBeforeColumnId: Option.Option<string>;
257
+ } | {
258
+ readonly _tag: "Into";
259
+ readonly columnId: string;
260
+ readonly index: number;
261
+ }>;
262
+ }>;
263
+ readonly maybeResizing: Option.Option<{
264
+ readonly splitter: {
265
+ readonly _tag: "Split";
266
+ readonly abovePaneId: string;
267
+ } | {
268
+ readonly _tag: "Width";
269
+ readonly columnId: string;
270
+ };
271
+ readonly pointerId: number;
272
+ readonly pressX: number;
273
+ readonly pressY: number;
274
+ readonly maybeResize: Option.Option<{
275
+ readonly _tag: "ResizedColumn";
276
+ readonly columnId: string;
277
+ readonly width: number;
278
+ } | {
279
+ readonly _tag: "ResizedPanes";
280
+ readonly columnId: string;
281
+ readonly weights: {
282
+ readonly [x: string]: number;
283
+ };
284
+ }>;
285
+ }>;
286
+ }, {
287
+ readonly _tag: "CompletedAnnounceReel";
288
+ } | {
289
+ readonly _tag: "CompletedFocusPane";
290
+ } | {
291
+ readonly _tag: "CompletedFocusTab";
292
+ } | {
293
+ readonly _tag: "CompletedRestoreFocus";
294
+ } | {
295
+ readonly _tag: "CancelledPointer";
296
+ } | {
297
+ readonly _tag: "PressedEscape";
298
+ } | {
299
+ readonly _tag: "CompletedScrollIntoView";
300
+ } | {
301
+ readonly _tag: "CancelledSplitter";
302
+ } | {
303
+ readonly _tag: "CompletedSizeLiftedPane";
304
+ } | {
305
+ readonly _tag: "DroppedHeld";
306
+ } | {
307
+ readonly _tag: "FocusedPane";
308
+ readonly paneId: string;
309
+ } | {
310
+ readonly _tag: "LeftGrip";
311
+ } | {
312
+ readonly _tag: "MovedPointer";
313
+ readonly clientX: number;
314
+ readonly clientY: number;
315
+ readonly maybeTarget: Option.Option<{
316
+ readonly _tag: "Gap";
317
+ readonly maybeBeforeColumnId: Option.Option<string>;
318
+ } | {
319
+ readonly _tag: "Into";
320
+ readonly columnId: string;
321
+ readonly index: number;
322
+ }>;
323
+ } | {
324
+ readonly _tag: "MovedSplitter";
325
+ readonly share: number;
326
+ } | {
327
+ readonly _tag: "PressedGrip";
328
+ readonly paneId: string;
329
+ readonly pointerId: number;
330
+ readonly clientX: number;
331
+ readonly clientY: number;
332
+ } | {
333
+ readonly _tag: "PressedGripKey";
334
+ readonly paneId: string;
335
+ } | {
336
+ readonly _tag: "PressedSplitter";
337
+ readonly splitter: {
338
+ readonly _tag: "Split";
339
+ readonly abovePaneId: string;
340
+ } | {
341
+ readonly _tag: "Width";
342
+ readonly columnId: string;
343
+ };
344
+ readonly pointerId: number;
345
+ readonly clientX: number;
346
+ readonly clientY: number;
347
+ } | {
348
+ readonly _tag: "PressedSplitterKey";
349
+ readonly splitter: {
350
+ readonly _tag: "Split";
351
+ readonly abovePaneId: string;
352
+ } | {
353
+ readonly _tag: "Width";
354
+ readonly columnId: string;
355
+ };
356
+ readonly share: number;
357
+ } | {
358
+ readonly _tag: "PressedTab";
359
+ readonly paneId: string;
360
+ } | {
361
+ readonly _tag: "ReleasedPointer";
362
+ readonly clientX: number;
363
+ readonly clientY: number;
364
+ readonly maybeTarget: Option.Option<{
365
+ readonly _tag: "Gap";
366
+ readonly maybeBeforeColumnId: Option.Option<string>;
367
+ } | {
368
+ readonly _tag: "Into";
369
+ readonly columnId: string;
370
+ readonly index: number;
371
+ }>;
372
+ } | {
373
+ readonly _tag: "ReleasedSplitter";
374
+ readonly share: number;
375
+ } | {
376
+ readonly _tag: "SteppedHeld";
377
+ readonly step: "Down" | "Left" | "Right" | "Up";
378
+ } | {
379
+ readonly _tag: "SteppedTab";
380
+ readonly paneId: string;
381
+ }, {
382
+ readonly maybeHold: Option.Option<{
383
+ readonly reelHook: string;
384
+ readonly paneId: string;
385
+ readonly pointerId: number;
386
+ }>;
387
+ }, never> & {
388
+ readonly __subscription: never;
389
+ };
390
+ readonly edge: Subscription.EntryWithoutKeepAlive<{
391
+ readonly id: string;
392
+ readonly maybeFocus: Option.Option<{
393
+ readonly paneId: string;
394
+ readonly column: number;
395
+ readonly row: number;
396
+ }>;
397
+ readonly maybeHeld: Option.Option<{
398
+ readonly paneId: string;
399
+ readonly by: {
400
+ readonly _tag: "Keyboard";
401
+ } | {
402
+ readonly _tag: "Pointer";
403
+ readonly pointerId: number;
404
+ readonly pressX: number;
405
+ readonly pressY: number;
406
+ readonly x: number;
407
+ readonly y: number;
408
+ readonly isCarrying: boolean;
409
+ };
410
+ readonly maybeTarget: Option.Option<{
411
+ readonly _tag: "Gap";
412
+ readonly maybeBeforeColumnId: Option.Option<string>;
413
+ } | {
414
+ readonly _tag: "Into";
415
+ readonly columnId: string;
416
+ readonly index: number;
417
+ }>;
418
+ }>;
419
+ readonly maybeResizing: Option.Option<{
420
+ readonly splitter: {
421
+ readonly _tag: "Split";
422
+ readonly abovePaneId: string;
423
+ } | {
424
+ readonly _tag: "Width";
425
+ readonly columnId: string;
426
+ };
427
+ readonly pointerId: number;
428
+ readonly pressX: number;
429
+ readonly pressY: number;
430
+ readonly maybeResize: Option.Option<{
431
+ readonly _tag: "ResizedColumn";
432
+ readonly columnId: string;
433
+ readonly width: number;
434
+ } | {
435
+ readonly _tag: "ResizedPanes";
436
+ readonly columnId: string;
437
+ readonly weights: {
438
+ readonly [x: string]: number;
439
+ };
440
+ }>;
441
+ }>;
442
+ }, {
443
+ readonly _tag: "CompletedAnnounceReel";
444
+ } | {
445
+ readonly _tag: "CompletedFocusPane";
446
+ } | {
447
+ readonly _tag: "CompletedFocusTab";
448
+ } | {
449
+ readonly _tag: "CompletedRestoreFocus";
450
+ } | {
451
+ readonly _tag: "CancelledPointer";
452
+ } | {
453
+ readonly _tag: "PressedEscape";
454
+ } | {
455
+ readonly _tag: "CompletedScrollIntoView";
456
+ } | {
457
+ readonly _tag: "CancelledSplitter";
458
+ } | {
459
+ readonly _tag: "CompletedSizeLiftedPane";
460
+ } | {
461
+ readonly _tag: "DroppedHeld";
462
+ } | {
463
+ readonly _tag: "FocusedPane";
464
+ readonly paneId: string;
465
+ } | {
466
+ readonly _tag: "LeftGrip";
467
+ } | {
468
+ readonly _tag: "MovedPointer";
469
+ readonly clientX: number;
470
+ readonly clientY: number;
471
+ readonly maybeTarget: Option.Option<{
472
+ readonly _tag: "Gap";
473
+ readonly maybeBeforeColumnId: Option.Option<string>;
474
+ } | {
475
+ readonly _tag: "Into";
476
+ readonly columnId: string;
477
+ readonly index: number;
478
+ }>;
479
+ } | {
480
+ readonly _tag: "MovedSplitter";
481
+ readonly share: number;
482
+ } | {
483
+ readonly _tag: "PressedGrip";
484
+ readonly paneId: string;
485
+ readonly pointerId: number;
486
+ readonly clientX: number;
487
+ readonly clientY: number;
488
+ } | {
489
+ readonly _tag: "PressedGripKey";
490
+ readonly paneId: string;
491
+ } | {
492
+ readonly _tag: "PressedSplitter";
493
+ readonly splitter: {
494
+ readonly _tag: "Split";
495
+ readonly abovePaneId: string;
496
+ } | {
497
+ readonly _tag: "Width";
498
+ readonly columnId: string;
499
+ };
500
+ readonly pointerId: number;
501
+ readonly clientX: number;
502
+ readonly clientY: number;
503
+ } | {
504
+ readonly _tag: "PressedSplitterKey";
505
+ readonly splitter: {
506
+ readonly _tag: "Split";
507
+ readonly abovePaneId: string;
508
+ } | {
509
+ readonly _tag: "Width";
510
+ readonly columnId: string;
511
+ };
512
+ readonly share: number;
513
+ } | {
514
+ readonly _tag: "PressedTab";
515
+ readonly paneId: string;
516
+ } | {
517
+ readonly _tag: "ReleasedPointer";
518
+ readonly clientX: number;
519
+ readonly clientY: number;
520
+ readonly maybeTarget: Option.Option<{
521
+ readonly _tag: "Gap";
522
+ readonly maybeBeforeColumnId: Option.Option<string>;
523
+ } | {
524
+ readonly _tag: "Into";
525
+ readonly columnId: string;
526
+ readonly index: number;
527
+ }>;
528
+ } | {
529
+ readonly _tag: "ReleasedSplitter";
530
+ readonly share: number;
531
+ } | {
532
+ readonly _tag: "SteppedHeld";
533
+ readonly step: "Down" | "Left" | "Right" | "Up";
534
+ } | {
535
+ readonly _tag: "SteppedTab";
536
+ readonly paneId: string;
537
+ }, {
538
+ readonly maybeHold: Option.Option<{
539
+ readonly reelHook: string;
540
+ readonly paneId: string;
541
+ readonly pointerId: number;
542
+ }>;
543
+ }, never> & {
544
+ readonly __subscription: never;
545
+ };
546
+ readonly resize: Subscription.EntryWithoutKeepAlive<{
547
+ readonly id: string;
548
+ readonly maybeFocus: Option.Option<{
549
+ readonly paneId: string;
550
+ readonly column: number;
551
+ readonly row: number;
552
+ }>;
553
+ readonly maybeHeld: Option.Option<{
554
+ readonly paneId: string;
555
+ readonly by: {
556
+ readonly _tag: "Keyboard";
557
+ } | {
558
+ readonly _tag: "Pointer";
559
+ readonly pointerId: number;
560
+ readonly pressX: number;
561
+ readonly pressY: number;
562
+ readonly x: number;
563
+ readonly y: number;
564
+ readonly isCarrying: boolean;
565
+ };
566
+ readonly maybeTarget: Option.Option<{
567
+ readonly _tag: "Gap";
568
+ readonly maybeBeforeColumnId: Option.Option<string>;
569
+ } | {
570
+ readonly _tag: "Into";
571
+ readonly columnId: string;
572
+ readonly index: number;
573
+ }>;
574
+ }>;
575
+ readonly maybeResizing: Option.Option<{
576
+ readonly splitter: {
577
+ readonly _tag: "Split";
578
+ readonly abovePaneId: string;
579
+ } | {
580
+ readonly _tag: "Width";
581
+ readonly columnId: string;
582
+ };
583
+ readonly pointerId: number;
584
+ readonly pressX: number;
585
+ readonly pressY: number;
586
+ readonly maybeResize: Option.Option<{
587
+ readonly _tag: "ResizedColumn";
588
+ readonly columnId: string;
589
+ readonly width: number;
590
+ } | {
591
+ readonly _tag: "ResizedPanes";
592
+ readonly columnId: string;
593
+ readonly weights: {
594
+ readonly [x: string]: number;
595
+ };
596
+ }>;
597
+ }>;
598
+ }, {
599
+ readonly _tag: "CompletedAnnounceReel";
600
+ } | {
601
+ readonly _tag: "CompletedFocusPane";
602
+ } | {
603
+ readonly _tag: "CompletedFocusTab";
604
+ } | {
605
+ readonly _tag: "CompletedRestoreFocus";
606
+ } | {
607
+ readonly _tag: "CancelledPointer";
608
+ } | {
609
+ readonly _tag: "PressedEscape";
610
+ } | {
611
+ readonly _tag: "CompletedScrollIntoView";
612
+ } | {
613
+ readonly _tag: "CancelledSplitter";
614
+ } | {
615
+ readonly _tag: "CompletedSizeLiftedPane";
616
+ } | {
617
+ readonly _tag: "DroppedHeld";
618
+ } | {
619
+ readonly _tag: "FocusedPane";
620
+ readonly paneId: string;
621
+ } | {
622
+ readonly _tag: "LeftGrip";
623
+ } | {
624
+ readonly _tag: "MovedPointer";
625
+ readonly clientX: number;
626
+ readonly clientY: number;
627
+ readonly maybeTarget: Option.Option<{
628
+ readonly _tag: "Gap";
629
+ readonly maybeBeforeColumnId: Option.Option<string>;
630
+ } | {
631
+ readonly _tag: "Into";
632
+ readonly columnId: string;
633
+ readonly index: number;
634
+ }>;
635
+ } | {
636
+ readonly _tag: "MovedSplitter";
637
+ readonly share: number;
638
+ } | {
639
+ readonly _tag: "PressedGrip";
640
+ readonly paneId: string;
641
+ readonly pointerId: number;
642
+ readonly clientX: number;
643
+ readonly clientY: number;
644
+ } | {
645
+ readonly _tag: "PressedGripKey";
646
+ readonly paneId: string;
647
+ } | {
648
+ readonly _tag: "PressedSplitter";
649
+ readonly splitter: {
650
+ readonly _tag: "Split";
651
+ readonly abovePaneId: string;
652
+ } | {
653
+ readonly _tag: "Width";
654
+ readonly columnId: string;
655
+ };
656
+ readonly pointerId: number;
657
+ readonly clientX: number;
658
+ readonly clientY: number;
659
+ } | {
660
+ readonly _tag: "PressedSplitterKey";
661
+ readonly splitter: {
662
+ readonly _tag: "Split";
663
+ readonly abovePaneId: string;
664
+ } | {
665
+ readonly _tag: "Width";
666
+ readonly columnId: string;
667
+ };
668
+ readonly share: number;
669
+ } | {
670
+ readonly _tag: "PressedTab";
671
+ readonly paneId: string;
672
+ } | {
673
+ readonly _tag: "ReleasedPointer";
674
+ readonly clientX: number;
675
+ readonly clientY: number;
676
+ readonly maybeTarget: Option.Option<{
677
+ readonly _tag: "Gap";
678
+ readonly maybeBeforeColumnId: Option.Option<string>;
679
+ } | {
680
+ readonly _tag: "Into";
681
+ readonly columnId: string;
682
+ readonly index: number;
683
+ }>;
684
+ } | {
685
+ readonly _tag: "ReleasedSplitter";
686
+ readonly share: number;
687
+ } | {
688
+ readonly _tag: "SteppedHeld";
689
+ readonly step: "Down" | "Left" | "Right" | "Up";
690
+ } | {
691
+ readonly _tag: "SteppedTab";
692
+ readonly paneId: string;
693
+ }, {
694
+ readonly maybeHold: Option.Option<{
695
+ readonly reelHook: string;
696
+ readonly splitter: {
697
+ readonly _tag: "Split";
698
+ readonly abovePaneId: string;
699
+ } | {
700
+ readonly _tag: "Width";
701
+ readonly columnId: string;
702
+ };
703
+ readonly pointerId: number;
704
+ readonly pressX: number;
705
+ readonly pressY: number;
706
+ }>;
707
+ }, never> & {
708
+ readonly __subscription: never;
709
+ };
710
+ readonly escape: Subscription.EntryWithoutKeepAlive<{
711
+ readonly id: string;
712
+ readonly maybeFocus: Option.Option<{
713
+ readonly paneId: string;
714
+ readonly column: number;
715
+ readonly row: number;
716
+ }>;
717
+ readonly maybeHeld: Option.Option<{
718
+ readonly paneId: string;
719
+ readonly by: {
720
+ readonly _tag: "Keyboard";
721
+ } | {
722
+ readonly _tag: "Pointer";
723
+ readonly pointerId: number;
724
+ readonly pressX: number;
725
+ readonly pressY: number;
726
+ readonly x: number;
727
+ readonly y: number;
728
+ readonly isCarrying: boolean;
729
+ };
730
+ readonly maybeTarget: Option.Option<{
731
+ readonly _tag: "Gap";
732
+ readonly maybeBeforeColumnId: Option.Option<string>;
733
+ } | {
734
+ readonly _tag: "Into";
735
+ readonly columnId: string;
736
+ readonly index: number;
737
+ }>;
738
+ }>;
739
+ readonly maybeResizing: Option.Option<{
740
+ readonly splitter: {
741
+ readonly _tag: "Split";
742
+ readonly abovePaneId: string;
743
+ } | {
744
+ readonly _tag: "Width";
745
+ readonly columnId: string;
746
+ };
747
+ readonly pointerId: number;
748
+ readonly pressX: number;
749
+ readonly pressY: number;
750
+ readonly maybeResize: Option.Option<{
751
+ readonly _tag: "ResizedColumn";
752
+ readonly columnId: string;
753
+ readonly width: number;
754
+ } | {
755
+ readonly _tag: "ResizedPanes";
756
+ readonly columnId: string;
757
+ readonly weights: {
758
+ readonly [x: string]: number;
759
+ };
760
+ }>;
761
+ }>;
762
+ }, {
763
+ readonly _tag: "CompletedAnnounceReel";
764
+ } | {
765
+ readonly _tag: "CompletedFocusPane";
766
+ } | {
767
+ readonly _tag: "CompletedFocusTab";
768
+ } | {
769
+ readonly _tag: "CompletedRestoreFocus";
770
+ } | {
771
+ readonly _tag: "CancelledPointer";
772
+ } | {
773
+ readonly _tag: "PressedEscape";
774
+ } | {
775
+ readonly _tag: "CompletedScrollIntoView";
776
+ } | {
777
+ readonly _tag: "CancelledSplitter";
778
+ } | {
779
+ readonly _tag: "CompletedSizeLiftedPane";
780
+ } | {
781
+ readonly _tag: "DroppedHeld";
782
+ } | {
783
+ readonly _tag: "FocusedPane";
784
+ readonly paneId: string;
785
+ } | {
786
+ readonly _tag: "LeftGrip";
787
+ } | {
788
+ readonly _tag: "MovedPointer";
789
+ readonly clientX: number;
790
+ readonly clientY: number;
791
+ readonly maybeTarget: Option.Option<{
792
+ readonly _tag: "Gap";
793
+ readonly maybeBeforeColumnId: Option.Option<string>;
794
+ } | {
795
+ readonly _tag: "Into";
796
+ readonly columnId: string;
797
+ readonly index: number;
798
+ }>;
799
+ } | {
800
+ readonly _tag: "MovedSplitter";
801
+ readonly share: number;
802
+ } | {
803
+ readonly _tag: "PressedGrip";
804
+ readonly paneId: string;
805
+ readonly pointerId: number;
806
+ readonly clientX: number;
807
+ readonly clientY: number;
808
+ } | {
809
+ readonly _tag: "PressedGripKey";
810
+ readonly paneId: string;
811
+ } | {
812
+ readonly _tag: "PressedSplitter";
813
+ readonly splitter: {
814
+ readonly _tag: "Split";
815
+ readonly abovePaneId: string;
816
+ } | {
817
+ readonly _tag: "Width";
818
+ readonly columnId: string;
819
+ };
820
+ readonly pointerId: number;
821
+ readonly clientX: number;
822
+ readonly clientY: number;
823
+ } | {
824
+ readonly _tag: "PressedSplitterKey";
825
+ readonly splitter: {
826
+ readonly _tag: "Split";
827
+ readonly abovePaneId: string;
828
+ } | {
829
+ readonly _tag: "Width";
830
+ readonly columnId: string;
831
+ };
832
+ readonly share: number;
833
+ } | {
834
+ readonly _tag: "PressedTab";
835
+ readonly paneId: string;
836
+ } | {
837
+ readonly _tag: "ReleasedPointer";
838
+ readonly clientX: number;
839
+ readonly clientY: number;
840
+ readonly maybeTarget: Option.Option<{
841
+ readonly _tag: "Gap";
842
+ readonly maybeBeforeColumnId: Option.Option<string>;
843
+ } | {
844
+ readonly _tag: "Into";
845
+ readonly columnId: string;
846
+ readonly index: number;
847
+ }>;
848
+ } | {
849
+ readonly _tag: "ReleasedSplitter";
850
+ readonly share: number;
851
+ } | {
852
+ readonly _tag: "SteppedHeld";
853
+ readonly step: "Down" | "Left" | "Right" | "Up";
854
+ } | {
855
+ readonly _tag: "SteppedTab";
856
+ readonly paneId: string;
857
+ }, {
858
+ readonly isHolding: boolean;
859
+ }, never> & {
860
+ readonly __subscription: never;
861
+ };
862
+ } extends (infer T) ? { readonly [Key in keyof T as `${Prefix}${Capitalize<Key>}`]: T[Key]; } : never;
863
+ /** What the reel hands `toPaneView` for each pane: put `lead` in the Window's `lead` and give
864
+ * it `id`. */
865
+ export type PaneRender = Readonly<{
866
+ /** The title bar's `lead`: the pane's grip, a quiet glyph button named "Move <label>", or
867
+ * nothing under tabs, where a pane does not move. */
868
+ lead: readonly Html[];
869
+ /** The window's id, unique in the document. */
870
+ id: string;
871
+ }>;
872
+ /** Per-render inputs passed to `view` through `h.submodel`'s `viewInputs`. `toPaneView` is a
873
+ * function because it may carry the parent's handlers. */
874
+ export type ViewInputs = Readonly<{
875
+ /** The columns and their panes, as the application holds them. */
876
+ layout: Layout;
877
+ /** Names the reel for screen readers. */
878
+ label: string;
879
+ /** Renders one pane, a `Window.view` with `render.lead` as its `lead` and `render.id` as its
880
+ * `id`. Mark the control focus should land on in it (a terminal's input) with
881
+ * `data-reel-focus`. */
882
+ toPaneView: (pane: Pane, render: PaneRender) => Html;
883
+ /** How the panes print: in their columns (`Strip`, when not given), or one at a time under
884
+ * their tabs (`Tabs`). Pass the same to `perform`. */
885
+ arrangement?: Arrangement;
886
+ /** What a pane's tab prints before its label: a kind glyph. Nothing when not given. */
887
+ toTabLeadView?: (pane: Pane) => readonly Html[];
888
+ }>;
889
+ /**
890
+ * A row of columns wider than the view when it must be, each a stack of panes, scrolled
891
+ * sideways, and down where a column is taller than the view: `div.reel` holding the scroller
892
+ * `div.reel-view`, whose `div.reel-track` lays out the columns (`div.reel-column`, a slot per
893
+ * pane with a splitter between) with a splitter after each, and the panes themselves in
894
+ * `div.reel-panes`, each pinned to its slot by anchor positioning. The reel takes its height
895
+ * from whatever holds it. The layout is the parent's; each pane renders through `toPaneView`.
896
+ *
897
+ * A pane's grip lifts it under a pointer or the keyboard: Space or Enter picks it up, the
898
+ * arrows move it (left and right through the gaps and columns, up and down among a column's
899
+ * panes), Space drops it, and Escape or Tab puts it back. A drop reports what it asks
900
+ * of the layout as the OutMessage. Lift `subscriptions(keyPrefix)` into the application's, or
901
+ * nothing follows the pointer, and call `reconcile` whenever the layout changes.
902
+ *
903
+ * Under tabs (`arrangement: "Tabs"`) the reel is `div.reel.tabbed`: a `div.nav.tabs.reel-tabs`
904
+ * tab list over the scroller, whose track holds one `div.reel-slot.reel-stage` at the reel's
905
+ * full size where the columns were. Every pane is pinned to it, the focused one shown and the
906
+ * others `.behind`, hidden and inert; there are no grips and no splitters.
907
+ */
908
+ export declare const view: import("foldkit/submodel").View<{
909
+ readonly id: string;
910
+ readonly maybeFocus: Option.Option<{
911
+ readonly paneId: string;
912
+ readonly column: number;
913
+ readonly row: number;
914
+ }>;
915
+ readonly maybeHeld: Option.Option<{
916
+ readonly paneId: string;
917
+ readonly by: {
918
+ readonly _tag: "Keyboard";
919
+ } | {
920
+ readonly _tag: "Pointer";
921
+ readonly pointerId: number;
922
+ readonly pressX: number;
923
+ readonly pressY: number;
924
+ readonly x: number;
925
+ readonly y: number;
926
+ readonly isCarrying: boolean;
927
+ };
928
+ readonly maybeTarget: Option.Option<{
929
+ readonly _tag: "Gap";
930
+ readonly maybeBeforeColumnId: Option.Option<string>;
931
+ } | {
932
+ readonly _tag: "Into";
933
+ readonly columnId: string;
934
+ readonly index: number;
935
+ }>;
936
+ }>;
937
+ readonly maybeResizing: Option.Option<{
938
+ readonly splitter: {
939
+ readonly _tag: "Split";
940
+ readonly abovePaneId: string;
941
+ } | {
942
+ readonly _tag: "Width";
943
+ readonly columnId: string;
944
+ };
945
+ readonly pointerId: number;
946
+ readonly pressX: number;
947
+ readonly pressY: number;
948
+ readonly maybeResize: Option.Option<{
949
+ readonly _tag: "ResizedColumn";
950
+ readonly columnId: string;
951
+ readonly width: number;
952
+ } | {
953
+ readonly _tag: "ResizedPanes";
954
+ readonly columnId: string;
955
+ readonly weights: {
956
+ readonly [x: string]: number;
957
+ };
958
+ }>;
959
+ }>;
960
+ }, {
961
+ readonly _tag: "CompletedAnnounceReel";
962
+ } | {
963
+ readonly _tag: "CompletedFocusPane";
964
+ } | {
965
+ readonly _tag: "CompletedFocusTab";
966
+ } | {
967
+ readonly _tag: "CompletedRestoreFocus";
968
+ } | {
969
+ readonly _tag: "CancelledPointer";
970
+ } | {
971
+ readonly _tag: "PressedEscape";
972
+ } | {
973
+ readonly _tag: "CompletedScrollIntoView";
974
+ } | {
975
+ readonly _tag: "CancelledSplitter";
976
+ } | {
977
+ readonly _tag: "CompletedSizeLiftedPane";
978
+ } | {
979
+ readonly _tag: "DroppedHeld";
980
+ } | {
981
+ readonly _tag: "FocusedPane";
982
+ readonly paneId: string;
983
+ } | {
984
+ readonly _tag: "LeftGrip";
985
+ } | {
986
+ readonly _tag: "MovedPointer";
987
+ readonly clientX: number;
988
+ readonly clientY: number;
989
+ readonly maybeTarget: Option.Option<{
990
+ readonly _tag: "Gap";
991
+ readonly maybeBeforeColumnId: Option.Option<string>;
992
+ } | {
993
+ readonly _tag: "Into";
994
+ readonly columnId: string;
995
+ readonly index: number;
996
+ }>;
997
+ } | {
998
+ readonly _tag: "MovedSplitter";
999
+ readonly share: number;
1000
+ } | {
1001
+ readonly _tag: "PressedGrip";
1002
+ readonly paneId: string;
1003
+ readonly pointerId: number;
1004
+ readonly clientX: number;
1005
+ readonly clientY: number;
1006
+ } | {
1007
+ readonly _tag: "PressedGripKey";
1008
+ readonly paneId: string;
1009
+ } | {
1010
+ readonly _tag: "PressedSplitter";
1011
+ readonly splitter: {
1012
+ readonly _tag: "Split";
1013
+ readonly abovePaneId: string;
1014
+ } | {
1015
+ readonly _tag: "Width";
1016
+ readonly columnId: string;
1017
+ };
1018
+ readonly pointerId: number;
1019
+ readonly clientX: number;
1020
+ readonly clientY: number;
1021
+ } | {
1022
+ readonly _tag: "PressedSplitterKey";
1023
+ readonly splitter: {
1024
+ readonly _tag: "Split";
1025
+ readonly abovePaneId: string;
1026
+ } | {
1027
+ readonly _tag: "Width";
1028
+ readonly columnId: string;
1029
+ };
1030
+ readonly share: number;
1031
+ } | {
1032
+ readonly _tag: "PressedTab";
1033
+ readonly paneId: string;
1034
+ } | {
1035
+ readonly _tag: "ReleasedPointer";
1036
+ readonly clientX: number;
1037
+ readonly clientY: number;
1038
+ readonly maybeTarget: Option.Option<{
1039
+ readonly _tag: "Gap";
1040
+ readonly maybeBeforeColumnId: Option.Option<string>;
1041
+ } | {
1042
+ readonly _tag: "Into";
1043
+ readonly columnId: string;
1044
+ readonly index: number;
1045
+ }>;
1046
+ } | {
1047
+ readonly _tag: "ReleasedSplitter";
1048
+ readonly share: number;
1049
+ } | {
1050
+ readonly _tag: "SteppedHeld";
1051
+ readonly step: "Down" | "Left" | "Right" | "Up";
1052
+ } | {
1053
+ readonly _tag: "SteppedTab";
1054
+ readonly paneId: string;
1055
+ }, Readonly<{
1056
+ /** The columns and their panes, as the application holds them. */
1057
+ layout: Layout;
1058
+ /** Names the reel for screen readers. */
1059
+ label: string;
1060
+ /** Renders one pane, a `Window.view` with `render.lead` as its `lead` and `render.id` as its
1061
+ * `id`. Mark the control focus should land on in it (a terminal's input) with
1062
+ * `data-reel-focus`. */
1063
+ toPaneView: (pane: Pane, render: PaneRender) => Html;
1064
+ /** How the panes print: in their columns (`Strip`, when not given), or one at a time under
1065
+ * their tabs (`Tabs`). Pass the same to `perform`. */
1066
+ arrangement?: Arrangement;
1067
+ /** What a pane's tab prints before its label: a kind glyph. Nothing when not given. */
1068
+ toTabLeadView?: (pane: Pane) => readonly Html[];
1069
+ }>>;
1070
+ export {};