@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,13 @@
1
+ import { Html, HtmlBuilder } from "foldkit/html";
2
+ /** Configuration for rendering a fieldset with `view`. */
3
+ export type ViewConfig = Readonly<{
4
+ /** Unique in the document: the legend's id is made from it. */
5
+ id: string;
6
+ /** The group's name, in the legend. */
7
+ label: string;
8
+ /** The controls: Choices, a Segmented. */
9
+ body: ReadonlyArray<Html | string>;
10
+ }>;
11
+ /** A group of controls under one name, built on `@foldkit/ui`'s Fieldset: a `<fieldset>`
12
+ * named by its `<legend>`. */
13
+ export declare const view: <Message>(config: ViewConfig, h: HtmlBuilder<Message>) => Html;
@@ -0,0 +1,13 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import { Fieldset } from "@foldkit/ui";
3
+ // src/fieldset/fieldset.ts
4
+ /** A group of controls under one name, built on `@foldkit/ui`'s Fieldset: a `<fieldset>`
5
+ * named by its `<legend>`. */
6
+ const view = (config, h) => {
7
+ const { id, label, body } = config;
8
+ return __foldkitBrandViewResult((Fieldset.view({
9
+ id,
10
+ toView: (groups) => __foldkitBrandViewResult((h.fieldset([...groups.fieldset, h.Class("field")], [h.legend([...groups.legend, h.Class("field-label")], [label]), ...body])), "@gjermundgaraba/pixel-paper/fieldset/fieldset.js#toView")
11
+ }, h)), "@gjermundgaraba/pixel-paper/fieldset/fieldset.js#view");
12
+ };
13
+ export { view };
@@ -0,0 +1,5 @@
1
+ import { ViewConfig, view } from "./fieldset.js";
2
+ declare namespace index_d_exports {
3
+ export { ViewConfig, view };
4
+ }
5
+ export { type ViewConfig, index_d_exports, view };
@@ -0,0 +1,6 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
3
+ import { view } from "./fieldset.js";
4
+ // src/fieldset/index.ts
5
+ var fieldset_exports = /* @__PURE__ */ __exportAll({ view: () => __foldkitBrandViewResult((view), "@gjermundgaraba/pixel-paper/fieldset/index.js#view") });
6
+ export { fieldset_exports, view };
@@ -0,0 +1,21 @@
1
+ import { Html, HtmlBuilder } from "foldkit/html";
2
+ /** Configuration for rendering a filter chip with `view`. */
3
+ export type ViewConfig<Message> = Readonly<{
4
+ /** The value, the chip's words: "open", "this week". */
5
+ label: string;
6
+ /** The chip written out, when its words alone do not say it ("Clear scope: Operations" for
7
+ * "Operations ×"): its name for screen readers and its tip for everyone else. */
8
+ full?: string;
9
+ /** In force: printed inverted. */
10
+ isPressed?: boolean;
11
+ /** Makes the chip a toggle button (`aria-pressed`); without it, a pinned label. */
12
+ onToggle?: Message;
13
+ /** The quiet chip that clears the filters: a plain button, never pressed. */
14
+ isReset?: boolean;
15
+ /** The chip's stable id among its siblings, for chips mapped from a list that changes. */
16
+ key?: string;
17
+ }>;
18
+ /** A filter as a chip. With `onToggle` it is a toggle button built on `@foldkit/ui`'s Button,
19
+ * `aria-pressed` while in force; without, a label, inverted while pinned. With `full`, screen
20
+ * readers hear the full words and the eye gets them as a tip. */
21
+ export declare const view: <Message>(config: ViewConfig<Message>, h: HtmlBuilder<Message>) => Html;
@@ -0,0 +1,28 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import { pressedAttribute } from "../button/button.js";
3
+ import { Button } from "@foldkit/ui";
4
+ // src/filter-chip/filter-chip.ts
5
+ /** A filter as a chip. With `onToggle` it is a toggle button built on `@foldkit/ui`'s Button,
6
+ * `aria-pressed` while in force; without, a label, inverted while pinned. With `full`, screen
7
+ * readers hear the full words and the eye gets them as a tip. */
8
+ const view = (config, h) => {
9
+ const { label, full, isPressed = false, onToggle, isReset = false, key } = config;
10
+ const fullAttributes = full === void 0 ? [] : [h.DataAttribute("tip", full)];
11
+ const keyAttributes = key === void 0 ? [] : [h.Key(key)];
12
+ return __foldkitBrandViewResult((onToggle === void 0 ? h.span([
13
+ ...keyAttributes,
14
+ ...fullAttributes,
15
+ h.Class(isPressed ? "fchip pinned" : "fchip")
16
+ ], full === void 0 ? [label] : [h.span([h.AriaHidden(true)], [label]), h.span([h.Class("sr-only")], [full])]) : Button.view({
17
+ onClick: onToggle,
18
+ toView: (groups) => __foldkitBrandViewResult((h.button([
19
+ ...groups.button,
20
+ ...keyAttributes,
21
+ ...fullAttributes,
22
+ ...full === void 0 ? [] : [h.AriaLabel(full)],
23
+ ...isReset ? [] : [pressedAttribute(isPressed, h)],
24
+ h.Class(isReset ? "fchip reset" : "fchip")
25
+ ], [label])), "@gjermundgaraba/pixel-paper/filter-chip/filter-chip.js#toView")
26
+ }, h)), "@gjermundgaraba/pixel-paper/filter-chip/filter-chip.js#view");
27
+ };
28
+ export { view };
@@ -0,0 +1,5 @@
1
+ import { ViewConfig, view } from "./filter-chip.js";
2
+ declare namespace index_d_exports {
3
+ export { ViewConfig, view };
4
+ }
5
+ export { type ViewConfig, index_d_exports, view };
@@ -0,0 +1,6 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
3
+ import { view } from "./filter-chip.js";
4
+ // src/filter-chip/index.ts
5
+ var filter_chip_exports = /* @__PURE__ */ __exportAll({ view: () => __foldkitBrandViewResult((view), "@gjermundgaraba/pixel-paper/filter-chip/index.js#view") });
6
+ export { filter_chip_exports, view };
@@ -0,0 +1,12 @@
1
+ import { Html, HtmlBuilder } from "foldkit/html";
2
+ /** Configuration for rendering a filter strip with `view`. */
3
+ export type ViewConfig = Readonly<{
4
+ /** FilterChips, a QueryChip, a Segmented; `h.span([h.Class("spacer")])` pushes what
5
+ * follows right. */
6
+ body: ReadonlyArray<Html | string>;
7
+ /** Names the group for screen readers. */
8
+ label?: string;
9
+ }>;
10
+ /** A printed strip of filters above a list, on a 3px shadow: a `role="group"` named by its
11
+ * label. */
12
+ export declare const view: <Message>(config: ViewConfig, h: HtmlBuilder<Message>) => Html;
@@ -0,0 +1,13 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ // src/filter-strip/filter-strip.ts
3
+ /** A printed strip of filters above a list, on a 3px shadow: a `role="group"` named by its
4
+ * label. */
5
+ const view = (config, h) => {
6
+ const { body, label = "Filters" } = config;
7
+ return __foldkitBrandViewResult((h.div([
8
+ h.Role("group"),
9
+ h.AriaLabel(label),
10
+ h.Class("strip")
11
+ ], body)), "@gjermundgaraba/pixel-paper/filter-strip/filter-strip.js#view");
12
+ };
13
+ export { view };
@@ -0,0 +1,5 @@
1
+ import { ViewConfig, view } from "./filter-strip.js";
2
+ declare namespace index_d_exports {
3
+ export { ViewConfig, view };
4
+ }
5
+ export { type ViewConfig, index_d_exports, view };
@@ -0,0 +1,6 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
3
+ import { view } from "./filter-strip.js";
4
+ // src/filter-strip/index.ts
5
+ var filter_strip_exports = /* @__PURE__ */ __exportAll({ view: () => __foldkitBrandViewResult((view), "@gjermundgaraba/pixel-paper/filter-strip/index.js#view") });
6
+ export { filter_strip_exports, view };
@@ -0,0 +1,31 @@
1
+ import { Duration, Option } from "effect";
2
+ import { Html, HtmlBuilder } from "foldkit/html";
3
+ /** How long a flash word stays before the caller takes it back. */
4
+ export declare const HOLD: Duration.Duration;
5
+ /** Configuration for rendering a flash word with `view`. */
6
+ export type ViewConfig = Readonly<{
7
+ /** The word from the caller's Model (`"saved"`), or `None` once it is taken back. */
8
+ maybeWord: Option.Option<string>;
9
+ }>;
10
+ /**
11
+ * Where a word printed beside an action for a moment (`"copied"`, `"saved"`) goes. It is a
12
+ * polite status, always on the page so the word is heard when it arrives; empty, it takes no
13
+ * room. For the outcome of the control the reader just used, beside it: an outcome they may
14
+ * not be looking at is a toast, and a state the whole interface is in is a Banner.
15
+ *
16
+ * The word and its clearing live in the caller's Model: set it to `Option.some(word)`
17
+ * together with a Command that waits `HOLD` and reports back, and clear it when that Message
18
+ * arrives, unless a newer word has replaced it since (keep a count, and drop a stale wait):
19
+ *
20
+ * ```ts
21
+ * const WaitBeforeClearFlashWord = Command.define("WaitBeforeClearFlashWord", {
22
+ * args: { count: Schema.Finite },
23
+ * messages: [Message.CompletedWaitBeforeClearFlashWord],
24
+ * execute: ({ count }) =>
25
+ * Effect.sleep(FlashWord.HOLD).pipe(
26
+ * Effect.as(Message.CompletedWaitBeforeClearFlashWord({ count })),
27
+ * ),
28
+ * });
29
+ * ```
30
+ */
31
+ export declare const view: <Message>(config: ViewConfig, h: HtmlBuilder<Message>) => Html;
@@ -0,0 +1,31 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import { Duration, Option } from "effect";
3
+ // src/flash-word/flash-word.ts
4
+ /** How long a flash word stays before the caller takes it back. */
5
+ const HOLD = Duration.millis(1800);
6
+ /**
7
+ * Where a word printed beside an action for a moment (`"copied"`, `"saved"`) goes. It is a
8
+ * polite status, always on the page so the word is heard when it arrives; empty, it takes no
9
+ * room. For the outcome of the control the reader just used, beside it: an outcome they may
10
+ * not be looking at is a toast, and a state the whole interface is in is a Banner.
11
+ *
12
+ * The word and its clearing live in the caller's Model: set it to `Option.some(word)`
13
+ * together with a Command that waits `HOLD` and reports back, and clear it when that Message
14
+ * arrives, unless a newer word has replaced it since (keep a count, and drop a stale wait):
15
+ *
16
+ * ```ts
17
+ * const WaitBeforeClearFlashWord = Command.define("WaitBeforeClearFlashWord", {
18
+ * args: { count: Schema.Finite },
19
+ * messages: [Message.CompletedWaitBeforeClearFlashWord],
20
+ * execute: ({ count }) =>
21
+ * Effect.sleep(FlashWord.HOLD).pipe(
22
+ * Effect.as(Message.CompletedWaitBeforeClearFlashWord({ count })),
23
+ * ),
24
+ * });
25
+ * ```
26
+ */
27
+ const view = (config, h) => {
28
+ const { maybeWord } = config;
29
+ return __foldkitBrandViewResult((h.span([h.Role("status"), h.Class("flash-word")], Option.toArray(maybeWord))), "@gjermundgaraba/pixel-paper/flash-word/flash-word.js#view");
30
+ };
31
+ export { HOLD, view };
@@ -0,0 +1,5 @@
1
+ import { HOLD, ViewConfig, view } from "./flash-word.js";
2
+ declare namespace index_d_exports {
3
+ export { HOLD, ViewConfig, view };
4
+ }
5
+ export { HOLD, type ViewConfig, index_d_exports, view };
@@ -0,0 +1,9 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
3
+ import { HOLD, view } from "./flash-word.js";
4
+ // src/flash-word/index.ts
5
+ var flash_word_exports = /* @__PURE__ */ __exportAll({
6
+ HOLD: () => __foldkitBrandViewResult((HOLD), "@gjermundgaraba/pixel-paper/flash-word/index.js#HOLD"),
7
+ view: () => __foldkitBrandViewResult((view), "@gjermundgaraba/pixel-paper/flash-word/index.js#view")
8
+ });
9
+ export { HOLD, flash_word_exports, view };
@@ -0,0 +1,15 @@
1
+ import { Effect, Schema } from "effect";
2
+ import * as Command from "foldkit/command";
3
+ /** What `Focus` reports. A component that runs `Focus` puts `CompletedFocus: {}` in its own
4
+ * Message union, which this tag matches; code that returns `Focus` with no union of its own
5
+ * (a helper shared by several forms) types its Commands with this one. */
6
+ export declare const Message: import("foldkit/message").MessageUnion<{
7
+ readonly CompletedFocus: {};
8
+ }>;
9
+ export type Message = typeof Message.Type;
10
+ /** Focuses the element with this id, once it is in the page; nothing when it is not. */
11
+ export declare const Focus: Command.CommandDefinitionWithArgs<"Focus", {
12
+ id: Schema.String;
13
+ }, Effect.Effect<{
14
+ readonly _tag: "CompletedFocus";
15
+ }, never, never>>;
@@ -0,0 +1,17 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import { Effect, Schema } from "effect";
3
+ import * as Command from "foldkit/command";
4
+ import { defineMessageUnion } from "foldkit/message";
5
+ import * as Dom from "foldkit/dom";
6
+ // src/focus/focus.ts
7
+ /** What `Focus` reports. A component that runs `Focus` puts `CompletedFocus: {}` in its own
8
+ * Message union, which this tag matches; code that returns `Focus` with no union of its own
9
+ * (a helper shared by several forms) types its Commands with this one. */
10
+ const Message = defineMessageUnion({ CompletedFocus: {} });
11
+ /** Focuses the element with this id, once it is in the page; nothing when it is not. */
12
+ const Focus = Command.define("Focus", {
13
+ args: { id: Schema.String },
14
+ messages: [Message.CompletedFocus],
15
+ execute: ({ id }) => __foldkitBrandViewResult((Dom.focus(`#${CSS.escape(id)}`).pipe(Effect.ignore, Effect.as(Message.CompletedFocus()))), "@gjermundgaraba/pixel-paper/focus/focus.js#execute")
16
+ });
17
+ export { Focus, Message };
@@ -0,0 +1,5 @@
1
+ import { Focus, Message } from "./focus.js";
2
+ declare namespace index_d_exports {
3
+ export { Focus, Message };
4
+ }
5
+ export { Focus, Message, index_d_exports };
@@ -0,0 +1,9 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
3
+ import { Focus, Message } from "./focus.js";
4
+ // src/focus/index.ts
5
+ var focus_exports = /* @__PURE__ */ __exportAll({
6
+ Focus: () => __foldkitBrandViewResult((Focus), "@gjermundgaraba/pixel-paper/focus/index.js#Focus"),
7
+ Message: () => __foldkitBrandViewResult((Message), "@gjermundgaraba/pixel-paper/focus/index.js#Message")
8
+ });
9
+ export { Focus, Message, focus_exports };
@@ -0,0 +1,52 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import { LOCALE } from "../locale/locale.js";
3
+ import { Duration, Match, Option } from "effect";
4
+ // src/format/format.ts
5
+ const SECOND = Duration.toMillis(Duration.seconds(1));
6
+ const MINUTE = Duration.toMillis(Duration.minutes(1));
7
+ const HOUR = Duration.toMillis(Duration.hours(1));
8
+ const DAY = Duration.toMillis(Duration.days(1));
9
+ const dateFormat = (timeZone) => __foldkitBrandViewResult((new Intl.DateTimeFormat(LOCALE, {
10
+ day: "numeric",
11
+ month: "short",
12
+ year: "numeric",
13
+ timeZone: Option.getOrUndefined(timeZone)
14
+ })), "@gjermundgaraba/pixel-paper/format/format.js#dateFormat");
15
+ const dateTimeFormat = (timeZone) => __foldkitBrandViewResult((new Intl.DateTimeFormat(LOCALE, {
16
+ day: "numeric",
17
+ month: "short",
18
+ year: "numeric",
19
+ hour: "2-digit",
20
+ minute: "2-digit",
21
+ hourCycle: "h23",
22
+ timeZone: Option.getOrUndefined(timeZone)
23
+ })), "@gjermundgaraba/pixel-paper/format/format.js#dateTimeFormat");
24
+ /** A day as `"12 Mar 2026"`, in the reader's zone unless `timeZone` names another. Always
25
+ * English, so the server and every browser write the same words. */
26
+ const formatDate = (at, timeZone = Option.none()) => __foldkitBrandViewResult((dateFormat(timeZone).format(at)), "@gjermundgaraba/pixel-paper/format/format.js#formatDate");
27
+ const formatDateTime = (at, timeZone = Option.none()) => __foldkitBrandViewResult((dateTimeFormat(timeZone).format(at)), "@gjermundgaraba/pixel-paper/format/format.js#formatDateTime");
28
+ const formatSpan = (milliseconds) => {
29
+ const span = Math.abs(milliseconds);
30
+ return __foldkitBrandViewResult((Match.value(span).pipe(Match.when((value) => __foldkitBrandViewResult((value < MINUTE), "@gjermundgaraba/pixel-paper/format/format.js#anonymous"), (value) => __foldkitBrandViewResult((`${Math.floor(value / SECOND)}s`), "@gjermundgaraba/pixel-paper/format/format.js#anonymous~2")), Match.when((value) => __foldkitBrandViewResult((value < HOUR), "@gjermundgaraba/pixel-paper/format/format.js#anonymous~3"), (value) => __foldkitBrandViewResult((`${Math.floor(value / MINUTE)}m`), "@gjermundgaraba/pixel-paper/format/format.js#anonymous~4")), Match.when((value) => __foldkitBrandViewResult((value < 2 * DAY), "@gjermundgaraba/pixel-paper/format/format.js#anonymous~5"), (value) => __foldkitBrandViewResult((`${Math.floor(value / HOUR)}h`), "@gjermundgaraba/pixel-paper/format/format.js#anonymous~6")), Match.orElse((value) => __foldkitBrandViewResult((`${Math.floor(value / DAY)}d`), "@gjermundgaraba/pixel-paper/format/format.js#anonymous~7")))), "@gjermundgaraba/pixel-paper/format/format.js#formatSpan");
31
+ };
32
+ const twoUnits = (milliseconds, [large, small, largeUnit, smallUnit]) => {
33
+ const whole = Math.floor(milliseconds / large);
34
+ const rest = Math.floor(milliseconds % large / small);
35
+ return __foldkitBrandViewResult((rest === 0 ? `${whole}${largeUnit}` : `${whole}${largeUnit} ${rest}${smallUnit}`), "@gjermundgaraba/pixel-paper/format/format.js#twoUnits");
36
+ };
37
+ const formatRemaining = (milliseconds) => {
38
+ if (milliseconds < HOUR) return __foldkitBrandViewResult((formatSpan(milliseconds)), "@gjermundgaraba/pixel-paper/format/format.js#formatRemaining");
39
+ else if (milliseconds < 2 * DAY) return __foldkitBrandViewResult((twoUnits(milliseconds, [
40
+ HOUR,
41
+ MINUTE,
42
+ "h",
43
+ "m"
44
+ ])), "@gjermundgaraba/pixel-paper/format/format.js#formatRemaining");
45
+ return __foldkitBrandViewResult((twoUnits(milliseconds, [
46
+ DAY,
47
+ HOUR,
48
+ "d",
49
+ "h"
50
+ ])), "@gjermundgaraba/pixel-paper/format/format.js#formatRemaining");
51
+ };
52
+ export { formatDate, formatDateTime, formatRemaining, formatSpan };
@@ -0,0 +1,5 @@
1
+ import { LOCALE } from "../locale/locale.js";
2
+ declare namespace index_d_exports {
3
+ export { LOCALE };
4
+ }
5
+ export { LOCALE, index_d_exports };
@@ -0,0 +1,6 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
3
+ import { LOCALE } from "../locale/locale.js";
4
+ // src/format/index.ts
5
+ var format_exports = /* @__PURE__ */ __exportAll({ LOCALE: () => __foldkitBrandViewResult((LOCALE), "@gjermundgaraba/pixel-paper/format/index.js#LOCALE") });
6
+ export { LOCALE, format_exports };
@@ -0,0 +1,9 @@
1
+ import { GlyphName } from "./glyphs.js";
2
+ import { Html, HtmlBuilder } from "foldkit/html";
3
+ /** Configuration for rendering a glyph with `view`. */
4
+ export type ViewConfig = Readonly<{
5
+ name: GlyphName;
6
+ }>;
7
+ /** One glyph from the inventory, in `currentColor`, at the 12px it was drawn for. Decorative:
8
+ * label the control that holds it. */
9
+ export declare const view: <Message>(config: ViewConfig, h: HtmlBuilder<Message>) => Html;
@@ -0,0 +1,25 @@
1
+ import { brandViewResult as __foldkitBrandViewResult } from 'foldkit/brand'
2
+ import { glyphs } from "./glyphs.js";
3
+ import { Array } from "effect";
4
+ // src/glyph/glyph.ts
5
+ const DRAWN_SIZE = 12;
6
+ const cellView = (h) => __foldkitBrandViewResult((([x, y, width, height]) => __foldkitBrandViewResult((h.rect([
7
+ h.X(`${x}`),
8
+ h.Y(`${y}`),
9
+ h.Width(`${width}`),
10
+ h.Height(`${height}`),
11
+ h.Fill("currentColor")
12
+ ])), "@gjermundgaraba/pixel-paper/glyph/glyph.js#anonymous")), "@gjermundgaraba/pixel-paper/glyph/glyph.js#cellView");
13
+ /** One glyph from the inventory, in `currentColor`, at the 12px it was drawn for. Decorative:
14
+ * label the control that holds it. */
15
+ const view = (config, h) => {
16
+ const { name } = config;
17
+ return __foldkitBrandViewResult((h.svg([
18
+ h.ViewBox(`0 0 ${DRAWN_SIZE} ${DRAWN_SIZE}`),
19
+ h.Width(`${DRAWN_SIZE}`),
20
+ h.Height(`${DRAWN_SIZE}`),
21
+ h.AriaHidden(true),
22
+ h.Class("px-icon")
23
+ ], Array.map(glyphs[name], cellView(h)))), "@gjermundgaraba/pixel-paper/glyph/glyph.js#view");
24
+ };
25
+ export { cellView, view };