@kerfjs/ui 5.0.0-beta.125 → 5.0.0-beta.127

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 (306) hide show
  1. package/README.md +5 -0
  2. package/ai/application-ui-diagnostic-ids-v1.json +1 -0
  3. package/ai/component-catalog.json +77 -6
  4. package/ai/component-catalog.schema.json +14 -1
  5. package/ai/component-composition.json +27 -6
  6. package/ai/component-props.json +265 -40
  7. package/ai/components/combobox.md +1 -1
  8. package/ai/components/surface-scaffold.md +19 -5
  9. package/ai/components/tab-bar.md +2 -0
  10. package/ai/components/toolbar.md +1 -0
  11. package/ai/public-api-signatures-v1.md +251 -298
  12. package/ai/skill.md +10 -4
  13. package/ai/view-document.schema.json +55 -2
  14. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  15. package/analyzer/cli.mjs +60 -24
  16. package/analyzer/index.mjs +331 -58
  17. package/catalog-projection-cli.mjs +86 -50
  18. package/dist/anchored-surface.js +2 -1
  19. package/dist/browser/editor.js +12 -7
  20. package/dist/catalog-resources.d.ts +1 -1
  21. package/dist/catalog.d.ts +1 -1
  22. package/dist/catalog.js +6 -6
  23. package/dist/{chunk-VX3YF2UD.js → chunk-3K5V3ZSD.js} +3 -3
  24. package/dist/{chunk-VX3YF2UD.js.map → chunk-3K5V3ZSD.js.map} +1 -1
  25. package/dist/{chunk-NHQOX7T4.js → chunk-3ZKUXWAV.js} +4 -4
  26. package/dist/chunk-3ZKUXWAV.js.map +1 -0
  27. package/dist/{chunk-ADMWT7FX.js → chunk-3ZWYGGEC.js} +136 -8
  28. package/dist/chunk-3ZWYGGEC.js.map +1 -0
  29. package/dist/{chunk-KLR3DCHH.js → chunk-4L5ZIKDZ.js} +1 -1
  30. package/dist/chunk-4L5ZIKDZ.js.map +1 -0
  31. package/dist/{chunk-2E7S5C4D.js → chunk-4UWLHKNU.js} +5 -5
  32. package/dist/chunk-4UWLHKNU.js.map +1 -0
  33. package/dist/{chunk-EXGDKG7B.js → chunk-5A2DN3LR.js} +5 -5
  34. package/dist/chunk-5A2DN3LR.js.map +1 -0
  35. package/dist/{chunk-DJ65XFVN.js → chunk-63TJH2RF.js} +4 -4
  36. package/dist/chunk-63TJH2RF.js.map +1 -0
  37. package/dist/{chunk-Q2CLQ3IJ.js → chunk-6PHG2DMG.js} +1 -1
  38. package/dist/chunk-6PHG2DMG.js.map +1 -0
  39. package/dist/{chunk-SPI6VMIY.js → chunk-6T7AX365.js} +4 -4
  40. package/dist/chunk-6T7AX365.js.map +1 -0
  41. package/dist/{chunk-GVII4JSD.js → chunk-6V6UHPJD.js} +4 -4
  42. package/dist/chunk-6V6UHPJD.js.map +1 -0
  43. package/dist/{chunk-NR3ZO4LK.js → chunk-7U65KLDL.js} +1 -1
  44. package/dist/chunk-7U65KLDL.js.map +1 -0
  45. package/dist/chunk-BMOZSNDU.js +133 -0
  46. package/dist/chunk-BMOZSNDU.js.map +1 -0
  47. package/dist/{chunk-2LM3PYHA.js → chunk-C2TY5DJC.js} +11 -8
  48. package/dist/chunk-C2TY5DJC.js.map +1 -0
  49. package/dist/{chunk-3WYREXW4.js → chunk-COMEWURO.js} +8 -6
  50. package/dist/chunk-COMEWURO.js.map +1 -0
  51. package/dist/{chunk-VPDSPD76.js → chunk-DB64I3DB.js} +4 -3
  52. package/dist/chunk-DB64I3DB.js.map +1 -0
  53. package/dist/{chunk-SBCXWGNP.js → chunk-DBCDYBZP.js} +2 -2
  54. package/dist/{chunk-SBCXWGNP.js.map → chunk-DBCDYBZP.js.map} +1 -1
  55. package/dist/{chunk-CNM6ZWP2.js → chunk-DJWBXEF4.js} +4 -2
  56. package/dist/chunk-DJWBXEF4.js.map +1 -0
  57. package/dist/{chunk-SVUJIVMR.js → chunk-E2MTHHLS.js} +3 -3
  58. package/dist/{chunk-SVUJIVMR.js.map → chunk-E2MTHHLS.js.map} +1 -1
  59. package/dist/{chunk-JG4ONAOI.js → chunk-EI55KWHP.js} +2 -2
  60. package/dist/chunk-EI55KWHP.js.map +1 -0
  61. package/dist/{chunk-MVKHSAKE.js → chunk-GE2BQXB3.js} +41 -4
  62. package/dist/chunk-GE2BQXB3.js.map +1 -0
  63. package/dist/chunk-GHV36C6I.js +94 -0
  64. package/dist/chunk-GHV36C6I.js.map +1 -0
  65. package/dist/{chunk-BCO673YW.js → chunk-GQUDCWOD.js} +10 -4
  66. package/dist/chunk-GQUDCWOD.js.map +1 -0
  67. package/dist/chunk-HD7ZLISK.js +808 -0
  68. package/dist/chunk-HD7ZLISK.js.map +1 -0
  69. package/dist/{chunk-KELWWCMX.js → chunk-I2K4OQKB.js} +4 -4
  70. package/dist/chunk-I2K4OQKB.js.map +1 -0
  71. package/dist/chunk-IFDTSVE6.js +9 -0
  72. package/dist/chunk-IFDTSVE6.js.map +1 -0
  73. package/dist/{chunk-TPLVC5BE.js → chunk-IR32NI2O.js} +336 -247
  74. package/dist/chunk-IR32NI2O.js.map +1 -0
  75. package/dist/{chunk-ZKKO4MHC.js → chunk-JYKP7TBZ.js} +4 -2
  76. package/dist/chunk-JYKP7TBZ.js.map +1 -0
  77. package/dist/{chunk-6OT7FOSA.js → chunk-K3C35KGR.js} +4 -4
  78. package/dist/chunk-K3C35KGR.js.map +1 -0
  79. package/dist/{chunk-4RECPEHI.js → chunk-KBS3GP6S.js} +4 -3
  80. package/dist/chunk-KBS3GP6S.js.map +1 -0
  81. package/dist/{chunk-YHRJNKD5.js → chunk-KS7EXW4P.js} +6 -4
  82. package/dist/chunk-KS7EXW4P.js.map +1 -0
  83. package/dist/{chunk-V6N3YLTM.js → chunk-LTOTL5AS.js} +3 -3
  84. package/dist/chunk-LTOTL5AS.js.map +1 -0
  85. package/dist/chunk-M64TAGZY.js +590 -0
  86. package/dist/chunk-M64TAGZY.js.map +1 -0
  87. package/dist/{chunk-JZZVWTUB.js → chunk-MMOQR426.js} +2 -2
  88. package/dist/chunk-MMOQR426.js.map +1 -0
  89. package/dist/{chunk-SJBMKA4X.js → chunk-OHT2AXER.js} +11 -10
  90. package/dist/chunk-OHT2AXER.js.map +1 -0
  91. package/dist/{chunk-TTFW6E6C.js → chunk-OZKBIPXU.js} +2 -2
  92. package/dist/chunk-OZKBIPXU.js.map +1 -0
  93. package/dist/{chunk-Q2SLOMN6.js → chunk-RHMY45DK.js} +4 -4
  94. package/dist/chunk-RHMY45DK.js.map +1 -0
  95. package/dist/{chunk-BZXA5SSA.js → chunk-S7QB5KMM.js} +2 -2
  96. package/dist/{chunk-BZXA5SSA.js.map → chunk-S7QB5KMM.js.map} +1 -1
  97. package/dist/{chunk-HDXUHLTQ.js → chunk-SHECA2N4.js} +8 -2
  98. package/dist/chunk-SHECA2N4.js.map +1 -0
  99. package/dist/{chunk-R6FIXYAE.js → chunk-SJEPM5ZU.js} +2 -2
  100. package/dist/{chunk-R6FIXYAE.js.map → chunk-SJEPM5ZU.js.map} +1 -1
  101. package/dist/{chunk-FJMABKKV.js → chunk-UQ4FRQ6M.js} +35 -17
  102. package/dist/chunk-UQ4FRQ6M.js.map +1 -0
  103. package/dist/{chunk-S4ZGTDSG.js → chunk-UU37OR3D.js} +2 -2
  104. package/dist/chunk-UU37OR3D.js.map +1 -0
  105. package/dist/{chunk-SWXWLSUD.js → chunk-WEQNPYVA.js} +1 -1
  106. package/dist/{chunk-SWXWLSUD.js.map → chunk-WEQNPYVA.js.map} +1 -1
  107. package/dist/{chunk-5SFHBYEY.js → chunk-WUVHP3UC.js} +97 -24
  108. package/dist/chunk-WUVHP3UC.js.map +1 -0
  109. package/dist/{chunk-3S3WXAZ5.js → chunk-X43QQWVC.js} +3 -2
  110. package/dist/chunk-X43QQWVC.js.map +1 -0
  111. package/dist/{chunk-Z3T24FX3.js → chunk-YE6KCAIN.js} +3 -2
  112. package/dist/chunk-YE6KCAIN.js.map +1 -0
  113. package/dist/{chunk-KQZIC5CA.js → chunk-ZC4KSRAF.js} +7 -7
  114. package/dist/chunk-ZC4KSRAF.js.map +1 -0
  115. package/dist/collapsible-panel.d.ts +2 -2
  116. package/dist/collapsible-panel.js +2 -2
  117. package/dist/collapsible-panel.js.map +1 -1
  118. package/dist/column-explorer.d.ts +3 -3
  119. package/dist/column-explorer.js +16 -138
  120. package/dist/column-explorer.js.map +1 -1
  121. package/dist/dialog-surface-controller-BeKZ3e8Z.d.ts +251 -0
  122. package/dist/editor-frame.d.ts +1 -1
  123. package/dist/editor-frame.js +1 -1
  124. package/dist/editor.d.ts +38 -20
  125. package/dist/editor.js +11651 -7052
  126. package/dist/editor.js.map +1 -1
  127. package/dist/file-picker.js +1 -1
  128. package/dist/help-tags-register.js +2 -1
  129. package/dist/help-tags-register.js.map +1 -1
  130. package/dist/index.d.ts +2 -1
  131. package/dist/index.js +24 -23
  132. package/dist/list-action-row.d.ts +1 -1
  133. package/dist/list-action-row.js +1 -1
  134. package/dist/list-detail-dialog.d.ts +7 -7
  135. package/dist/list-detail-dialog.js +6 -5
  136. package/dist/list-detail-dialog.js.map +1 -1
  137. package/dist/list-header.d.ts +1 -1
  138. package/dist/list-header.js +1 -1
  139. package/dist/list-item.d.ts +1 -1
  140. package/dist/list-item.js +1 -1
  141. package/dist/message-composer.js +1 -1
  142. package/dist/nav-stack.d.ts +6 -6
  143. package/dist/nav-stack.js +1 -1
  144. package/dist/popup-menu-register.js +1 -7
  145. package/dist/popup-menu-register.js.map +1 -1
  146. package/dist/popup-menu.d.ts +2 -2
  147. package/dist/popup-menu.js +1 -1
  148. package/dist/resizable-region.js +1 -1
  149. package/dist/segmented-control.d.ts +1 -1
  150. package/dist/segmented-control.js +1 -1
  151. package/dist/select-register.js +17 -23
  152. package/dist/select-register.js.map +1 -1
  153. package/dist/split-view.d.ts +6 -6
  154. package/dist/split-view.js +1 -1
  155. package/dist/styles/collapsible-panel.css +34 -25
  156. package/dist/styles/components/actions/popup-menu/popup-menu.css +4 -4
  157. package/dist/styles/components/actions/toolbar/toolbar.css +34 -1
  158. package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +1 -1
  159. package/dist/styles/components/forms/segmented-control/segmented-control.css +1 -1
  160. package/dist/styles/components/layout/collapsible-panel/collapsible-panel.css +34 -25
  161. package/dist/styles/components/layout/split-view/split-view.css +19 -33
  162. package/dist/styles/components/navigation/nav-stack/nav-stack.css +15 -19
  163. package/dist/styles/components/navigation/tab-navigator/tab-navigator.css +30 -29
  164. package/dist/styles/components/surfaces/editor-frame/editor-frame.css +10 -3
  165. package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +291 -4
  166. package/dist/styles/editor/editor.css +78 -0
  167. package/dist/styles/editor-frame.css +10 -3
  168. package/dist/styles/nav-stack.css +15 -19
  169. package/dist/styles/popup-menu.css +4 -4
  170. package/dist/styles/segmented-control.css +1 -1
  171. package/dist/styles/split-view.css +19 -33
  172. package/dist/styles/surface-scaffold.css +291 -4
  173. package/dist/styles/tab-navigator.css +30 -29
  174. package/dist/styles/toolbar-control-group.css +1 -1
  175. package/dist/styles/toolbar.css +34 -1
  176. package/dist/styles/webawesome.css +4 -5
  177. package/dist/surface-scaffold-register.js +2 -1
  178. package/dist/surface-scaffold-register.js.map +1 -1
  179. package/dist/surface-scaffold.d.ts +155 -246
  180. package/dist/surface-scaffold.js +3 -2
  181. package/dist/toolbar-control-group.d.ts +2 -2
  182. package/dist/toolbar-control-group.js +1 -1
  183. package/dist/toolbar.d.ts +6 -1
  184. package/dist/toolbar.js +1 -1
  185. package/dist/tree-list.d.ts +4 -4
  186. package/dist/tree-list.js +2 -2
  187. package/dist/{tree-rows-eHnnGLGM.d.ts → tree-rows-Bms5QJvG.d.ts} +3 -0
  188. package/dist/wire-catalog.d.ts +1 -1
  189. package/dist/wire-catalog.js +3 -2
  190. package/dist/wire-catalog.js.map +1 -1
  191. package/dist/wire-checkboxes.js +2 -1
  192. package/dist/wire-choice-chips.js +2 -1
  193. package/dist/wire-color-fields.js +2 -1
  194. package/dist/wire-color-pickers.js +2 -1
  195. package/dist/wire-column-explorer.js +1 -92
  196. package/dist/wire-column-explorer.js.map +1 -1
  197. package/dist/wire-comboboxes.d.ts +2 -0
  198. package/dist/wire-comboboxes.js +2 -1
  199. package/dist/wire-content-items.js +2 -1
  200. package/dist/wire-corner-status.js +2 -1
  201. package/dist/wire-nav-stack.js +2 -1
  202. package/dist/wire-overlay-sheets.js +2 -1
  203. package/dist/wire-paged-views.js +2 -2
  204. package/dist/wire-paged-views.js.map +1 -1
  205. package/dist/wire-resizable-regions.js +2 -1
  206. package/dist/wire-scroll-dividers.js +1 -1
  207. package/dist/wire-search-fields.js +2 -1
  208. package/dist/wire-sidebar.js +2 -1
  209. package/dist/wire-tab-bars.d.ts +41 -2
  210. package/dist/wire-tab-bars.js +1 -1
  211. package/dist/wire-tab-navigator.js +2 -1
  212. package/dist/wire-tag-fields.js +2 -1
  213. package/dist/wire-workbench.js +2 -1
  214. package/dist/workbench-dialog.d.ts +7 -7
  215. package/dist/workbench-dialog.js +5 -4
  216. package/dist/workbench-dialog.js.map +1 -1
  217. package/dist/workbench.d.ts +1 -1
  218. package/dist/workbench.js +1 -1
  219. package/docs/accessibility.md +3 -6
  220. package/docs/component-contract.md +47 -7
  221. package/docs/component-selection.md +90 -80
  222. package/docs/design/templates.md +5 -4
  223. package/docs/editor-frame.md +1 -1
  224. package/docs/editor-host.md +15 -2
  225. package/docs/overlay-tooltip.md +1 -1
  226. package/docs/recipes.md +1 -1
  227. package/docs/surface-scaffold.md +63 -2
  228. package/docs/ui-analyzer.md +42 -0
  229. package/docs/ui-doctor.md +45 -1
  230. package/docs/ui-evaluator.md +35 -0
  231. package/docs/ux-demo.md +1 -1
  232. package/docs/view.md +314 -0
  233. package/docs/webawesome-theme.md +16 -0
  234. package/doctor/cli.mjs +36 -31
  235. package/doctor/index.mjs +349 -162
  236. package/evaluator/cli.mjs +36 -30
  237. package/llms.txt +17 -4
  238. package/package.json +6 -2
  239. package/props/cli.mjs +47 -21
  240. package/scripts/lib/cli-args.mjs +98 -0
  241. package/ux-demo/recipes/app-shell.tsx +48 -141
  242. package/ux-demo/recipes/collapsible-sidebar.tsx +43 -169
  243. package/ux-demo/recipes/compact-toolbar.tsx +22 -114
  244. package/ux-demo/recipes/composer-form.tsx +14 -104
  245. package/ux-demo/recipes/list-detail-dialog.tsx +38 -84
  246. package/ux-demo/recipes/list-workspace-states.tsx +29 -152
  247. package/ux-demo/recipes/loading-inspector.tsx +30 -174
  248. package/ux-demo/recipes/media-detail.tsx +29 -146
  249. package/ux-demo/recipes/navigation-sidebar.tsx +24 -113
  250. package/ux-demo/recipes/navigation-stack.tsx +7 -43
  251. package/ux-demo/recipes/workspace-header.tsx +2 -66
  252. package/view/catalog.mjs +229 -0
  253. package/view/child-kind.mjs +22 -0
  254. package/view/cli.mjs +142 -119
  255. package/view/contract.mjs +84 -11
  256. package/view/css-grammar.mjs +93 -0
  257. package/view/generate.d.mts +16 -0
  258. package/view/generate.mjs +155 -56
  259. package/view/index.d.mts +80 -14
  260. package/view/index.mjs +5 -9
  261. package/view/interpret.mjs +104 -36
  262. package/view/types.mjs +161 -0
  263. package/view/validate-move.mjs +66 -30
  264. package/view/validate.mjs +420 -654
  265. package/vite-editor.d.mts +16 -1
  266. package/vite-editor.mjs +74 -4
  267. package/dist/chunk-2E7S5C4D.js.map +0 -1
  268. package/dist/chunk-2LM3PYHA.js.map +0 -1
  269. package/dist/chunk-3S3WXAZ5.js.map +0 -1
  270. package/dist/chunk-3WYREXW4.js.map +0 -1
  271. package/dist/chunk-4RECPEHI.js.map +0 -1
  272. package/dist/chunk-5SFHBYEY.js.map +0 -1
  273. package/dist/chunk-6OT7FOSA.js.map +0 -1
  274. package/dist/chunk-ADMWT7FX.js.map +0 -1
  275. package/dist/chunk-BCO673YW.js.map +0 -1
  276. package/dist/chunk-CNM6ZWP2.js.map +0 -1
  277. package/dist/chunk-DJ65XFVN.js.map +0 -1
  278. package/dist/chunk-EXGDKG7B.js.map +0 -1
  279. package/dist/chunk-FJMABKKV.js.map +0 -1
  280. package/dist/chunk-GVII4JSD.js.map +0 -1
  281. package/dist/chunk-HDXUHLTQ.js.map +0 -1
  282. package/dist/chunk-JG4ONAOI.js.map +0 -1
  283. package/dist/chunk-JZZVWTUB.js.map +0 -1
  284. package/dist/chunk-KELWWCMX.js.map +0 -1
  285. package/dist/chunk-KLR3DCHH.js.map +0 -1
  286. package/dist/chunk-KQZIC5CA.js.map +0 -1
  287. package/dist/chunk-LD6A6PYB.js +0 -268
  288. package/dist/chunk-LD6A6PYB.js.map +0 -1
  289. package/dist/chunk-MVKHSAKE.js.map +0 -1
  290. package/dist/chunk-NHQOX7T4.js.map +0 -1
  291. package/dist/chunk-NR3ZO4LK.js.map +0 -1
  292. package/dist/chunk-Q2CLQ3IJ.js.map +0 -1
  293. package/dist/chunk-Q2SLOMN6.js.map +0 -1
  294. package/dist/chunk-S4ZGTDSG.js.map +0 -1
  295. package/dist/chunk-SJBMKA4X.js.map +0 -1
  296. package/dist/chunk-SPI6VMIY.js.map +0 -1
  297. package/dist/chunk-TPLVC5BE.js.map +0 -1
  298. package/dist/chunk-TTFW6E6C.js.map +0 -1
  299. package/dist/chunk-V6N3YLTM.js.map +0 -1
  300. package/dist/chunk-VNT4MXR5.js +0 -548
  301. package/dist/chunk-VNT4MXR5.js.map +0 -1
  302. package/dist/chunk-VPDSPD76.js.map +0 -1
  303. package/dist/chunk-YHRJNKD5.js.map +0 -1
  304. package/dist/chunk-Z3T24FX3.js.map +0 -1
  305. package/dist/chunk-ZKKO4MHC.js.map +0 -1
  306. package/dist/{nav-stack-DwxpXxqJ.d.ts → nav-stack-vQ3ieerq.d.ts} +3 -3
@@ -0,0 +1,251 @@
1
+ import * as kerfjs from 'kerfjs';
2
+ import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
3
+ import { CssLength } from './css-values.js';
4
+
5
+ type DialogSurfaceSize = 'small' | 'medium' | 'large';
6
+ /**
7
+ * How the dialog is presented: `modal` (default) centered on the screen,
8
+ * `side-sheet` against the inline end, `fullscreen`, or `bottom-sheet`
9
+ * attached to the bottom edge (square bottom corners, safe-area and
10
+ * virtual-keyboard clearance, optionally user-resizable).
11
+ */
12
+ type DialogSurfacePresentation = 'modal' | 'side-sheet' | 'fullscreen' | 'bottom-sheet'
13
+ /**
14
+ * In flow, always shown: the same panel without the top layer or a
15
+ * backdrop, never wider than its container. For a catalog, a design
16
+ * canvas, or a document; `openDialog` / `closeDialog` leave it alone and
17
+ * `data-dialog-close` does not hide it.
18
+ */
19
+ | 'embedded';
20
+ /**
21
+ * How a bottom sheet appears or leaves: `slide` (default) moves the panel in
22
+ * from, or out to, the bottom edge; `standard` keeps the dialog's
23
+ * scale-and-fade. Both honor `prefers-reduced-motion`.
24
+ */
25
+ type DialogSurfaceSheetMotion = 'slide' | 'standard';
26
+ type SurfaceInset = 'none' | 'default' | 'comfortable' | /** @deprecated Use default; this legacy compact value retains its 8px inset. */ 'compact';
27
+ type DialogSurfaceMaxHeight = CssLength | 'viewport';
28
+ /** A definite modal height: a length or the full viewport, minus both gutters. */
29
+ type DialogSurfaceHeight = CssLength | 'viewport';
30
+ /**
31
+ * How the dialog body lays out its children: `flow` (default) scrolls ordinary
32
+ * content in the body; `fill` gives one child the body's whole height and
33
+ * lets it own scrolling (a SplitView, a Pane, an editor); `fill-last` stacks
34
+ * the leading children at their natural height and gives the last child the
35
+ * remaining height to own its scrolling (a heading and notices above a
36
+ * scrolling transcript).
37
+ */
38
+ type DialogSurfaceBodyLayout = 'flow' | 'fill' | 'fill-last';
39
+ /**
40
+ * Where the dialog footer sits: `docked` (default) below the body, or
41
+ * `floating` over the body's block end, inset from the panel's inline and
42
+ * block-end edges on a transparent background (a chat composer).
43
+ */
44
+ type DialogSurfaceFooterPresentation = 'docked' | 'floating';
45
+ /**
46
+ * Where the dialog header sits: `docked` (default) above the body, or
47
+ * `floating` over the body's block-start edge on the translucent chrome
48
+ * material, so content scrolls visibly beneath the title bar.
49
+ */
50
+ type DialogSurfaceHeaderPresentation = 'docked' | 'floating';
51
+ /** The built-in close control's visual weight; `normal` keeps the default. */
52
+ type DialogSurfaceCloseEmphasis = 'normal' | 'quiet';
53
+ /**
54
+ * Application `data-*` identity on the DialogSurface root, such as
55
+ * `data-key`; the surface's own configuration attributes stay protected.
56
+ */
57
+ type DialogSurfaceRootAttributes = Readonly<Record<`data-${string}`, string | undefined>>;
58
+ /**
59
+ * The dialog's accessible name: its `label` text (also the default title), or
60
+ * the id of an element that names it, such as a `heading` ToolbarText.
61
+ */
62
+ type DialogSurfaceName = {
63
+ label: string;
64
+ labelledBy?: never;
65
+ } | {
66
+ label?: never;
67
+ labelledBy: string;
68
+ };
69
+ type DialogSurfaceProps = DialogSurfaceName & DialogSurfaceOptions;
70
+ /** Controlled state of one native modal layer inside a `wireDialogStack` root. */
71
+ interface DialogSurfaceStack {
72
+ /** Whether this layer belongs in the native top layer. */
73
+ open: boolean;
74
+ /** The one frontmost open layer; it owns modal focus and accessibility. */
75
+ active: boolean;
76
+ /** One-based order from the back to the front. */
77
+ position: number;
78
+ /** Number of layers in the stack, including closed layers still rendered. */
79
+ count: number;
80
+ /** Optional vertical offset for an inactive layer; omitted on phones. */
81
+ offset?: CssLength;
82
+ }
83
+ interface DialogSurfaceOptions {
84
+ /** The dialog's id, for `openDialog(document.getElementById(id))`. */
85
+ id?: string;
86
+ /**
87
+ * Id of the element whose text is the dialog's accessible description,
88
+ * such as the `heading` ToolbarText's `descriptionId` or app-owned summary
89
+ * copy in the body; rendered as `aria-describedby` on the `<dialog>`.
90
+ */
91
+ describedBy?: string;
92
+ /**
93
+ * An alert dialog: a confirmation that interrupts the person to report
94
+ * something urgent or ask before a destructive action ("Delete this
95
+ * topic?"). Renders `role="alertdialog"` on the `<dialog>`; set
96
+ * `describedBy` to the element holding the message, and leave
97
+ * `lightDismiss` off so the person answers it.
98
+ */
99
+ alert?: boolean;
100
+ /** The body content. */
101
+ children: KerfUiContent;
102
+ /** Controlled modal stack state; call `wireDialogStack` on the containing root. */
103
+ stack?: DialogSurfaceStack;
104
+ /**
105
+ * Header title content in place of the `label` text, such as an xl
106
+ * `ToolbarText` with a description. The dialog keeps its `label` (or
107
+ * `labelledBy`) name.
108
+ */
109
+ heading?: KerfUiContent;
110
+ /** Controls before the close button in the header. */
111
+ headerActions?: KerfUiContent;
112
+ /** The footer, below the body (or floating over it); usually its buttons. */
113
+ footer?: KerfUiContent;
114
+ /**
115
+ * Render no header: no title and no close button. The content then owns its
116
+ * heading and a way to close (an element with `data-dialog-close`).
117
+ */
118
+ withoutHeader?: boolean;
119
+ /** Close on a press on the backdrop; otherwise the panel pulses. */
120
+ lightDismiss?: boolean;
121
+ /** The close button's accessible name (default `Close`). */
122
+ closeLabel?: string;
123
+ /** Soften the built-in close control without changing its 40px target. */
124
+ closeEmphasis?: DialogSurfaceCloseEmphasis;
125
+ size?: DialogSurfaceSize;
126
+ presentation?: DialogSurfacePresentation;
127
+ /** Modal preferred width. Takes precedence over size, within the viewport cap. */
128
+ preferredWidth?: CssLength;
129
+ bodyInset?: SurfaceInset;
130
+ footerInset?: SurfaceInset;
131
+ /** Modal edge clearance. Omit to retain Web Awesome's default viewport cap. */
132
+ viewportGutter?: CssLength;
133
+ /**
134
+ * Modal height cap, bounded by the dynamic viewport minus both gutters. On a
135
+ * bottom sheet, the cap (and the resize ceiling), bounded by the dynamic
136
+ * viewport minus the top safe area and one gutter.
137
+ */
138
+ maxHeight?: DialogSurfaceMaxHeight;
139
+ /**
140
+ * Modal definite height, bounded the same way, so a filling child has a
141
+ * height to fill. Takes precedence over `maxHeight`. On a bottom sheet, the
142
+ * height it opens at (the visible height above the safe area or keyboard).
143
+ */
144
+ height?: DialogSurfaceHeight;
145
+ /**
146
+ * A resizable bottom sheet's resize floor (default 160px), the visible
147
+ * height above the safe area or keyboard.
148
+ */
149
+ minHeight?: CssLength;
150
+ /**
151
+ * Let the person resize a bottom sheet by its top grabber (drag, or the
152
+ * arrow, Page Up/Down, Home and End keys) between `minHeight` and the
153
+ * sheet's cap. Needs the `/register` entry; each opening starts at `height`
154
+ * (or the content height). Ignored by other presentations.
155
+ */
156
+ resizable?: boolean;
157
+ /** How a bottom sheet appears (default `slide` up from the bottom edge). */
158
+ enterMotion?: DialogSurfaceSheetMotion;
159
+ /** How a bottom sheet is dismissed (default `slide` down off the bottom edge). */
160
+ exitMotion?: DialogSurfaceSheetMotion;
161
+ /**
162
+ * Body layout (default `flow`); `fill` lets one child own the body and
163
+ * `fill-last` stacks fixed rows above one filling last child.
164
+ */
165
+ bodyLayout?: DialogSurfaceBodyLayout;
166
+ /**
167
+ * Header placement (default `docked`); `floating` lays the dialog's header
168
+ * (its title and close control) over the body's block-start edge on the
169
+ * translucent chrome material (`--kui-chrome-material-raised`, opaque under
170
+ * `prefers-reduced-transparency`, increased contrast, forced colors, or
171
+ * without `backdrop-filter`). The `/register` entry measures the header;
172
+ * the body reserves that height before its own inset, so its first content
173
+ * rests below the title bar. A `fill`/`fill-last` child that is the body's
174
+ * only child and opts into block-start `scrollClearance` (a `List` or
175
+ * `Pane`) takes the clearance inside its own scroll area instead, published
176
+ * as `--kui-scroll-clearance-block-start`, so its content scrolls visibly
177
+ * beneath the header. Unmeasured (without the register), the header stays
178
+ * docked. Keep header text in the normal text color: quiet text can fall
179
+ * below AA over the content passing beneath it.
180
+ */
181
+ headerPresentation?: DialogSurfaceHeaderPresentation;
182
+ /**
183
+ * Footer placement (default `docked`); `floating` lays the footer over the
184
+ * body's block end. The body reserves the footer's measured height so its
185
+ * last content is never hidden beneath it. A `fill`/`fill-last` child that
186
+ * opts into block-end `scrollClearance` (a `List` or `Pane`) takes that
187
+ * clearance inside its own scroll area instead, published as
188
+ * `--kui-scroll-clearance-block-end`, so its content scrolls visibly beneath
189
+ * the transparent footer.
190
+ */
191
+ footerPresentation?: DialogSurfaceFooterPresentation;
192
+ /**
193
+ * A floating footer's clearance from the panel's inline and block-end edges
194
+ * (default the 16px container inset). Choose a phone value such as
195
+ * `remify(8)` from `deviceClass()`; the scaffold adds no breakpoint.
196
+ */
197
+ footerOffset?: CssLength;
198
+ /**
199
+ * Safe `data-*` identity on the root. Give sibling dialogs distinct
200
+ * `data-key`s so a re-render morphs each surface into itself instead of
201
+ * reusing one dialog's element for another (structurally identical roots
202
+ * are otherwise matched by position).
203
+ */
204
+ rootAttributes?: DialogSurfaceRootAttributes;
205
+ className?: string;
206
+ /** Native named-slot assignment when composed inside a web component. */
207
+ slot?: string;
208
+ }
209
+ /**
210
+ * A modal dialog: a native `<dialog>` with Kerf's header, body, and footer
211
+ * chrome, sized and presented by its props. Render it closed, then open it
212
+ * with `openDialog()` and close it with `closeDialog()`, the close button, an
213
+ * element with `data-dialog-close`, Escape, or (with `lightDismiss`) a press
214
+ * on the backdrop. Import `@kerfjs/ui/surface-scaffold/register` for the
215
+ * floating header and footer measurement, the bottom sheet's keyboard
216
+ * clearance and grabber, and re-render resilience while open.
217
+ */
218
+ declare function DialogSurface({ id, label, labelledBy, describedBy, alert, heading, headerActions, footer, withoutHeader, lightDismiss, closeLabel, closeEmphasis, children, stack, size, presentation, preferredWidth, bodyInset, footerInset, viewportGutter, maxHeight, height, minHeight, resizable, enterMotion, exitMotion, bodyLayout, headerPresentation, footerPresentation, footerOffset, rootAttributes, className, slot, }: DialogSurfaceProps): kerfjs.SafeHtml;
219
+
220
+ /** What asked an open DialogSurface to close. */
221
+ type DialogCloseSource = 'close-button' | 'escape' | 'backdrop';
222
+ /** The detail of a DialogSurface's cancelable `kui-request-close` event. */
223
+ interface DialogRequestCloseDetail {
224
+ readonly source: DialogCloseSource;
225
+ }
226
+ /**
227
+ * Open a DialogSurface as a modal dialog: in the top layer, the rest of the
228
+ * page inert, focus on its `autofocus` element or else the panel. It plays
229
+ * its enter motion and, with the controller installed here, keeps its
230
+ * measured chrome, sheet height, and keyboard clearance across application
231
+ * re-renders. Opening an open dialog does nothing, and so does opening an
232
+ * `embedded` one, which is always shown in flow.
233
+ */
234
+ declare function openDialog(dialog: HTMLDialogElement): void;
235
+ /**
236
+ * Close an open DialogSurface after its exit motion. The application's own
237
+ * close is never refused: no `kui-request-close` is dispatched. The native
238
+ * `close` event fires once it has closed. An `embedded` one never closes.
239
+ */
240
+ declare function closeDialog(dialog: HTMLDialogElement): void;
241
+ /**
242
+ * Reconcile one controlled stack after rendering its DialogSurface layers.
243
+ * Opening back-to-front establishes native top-layer order; unchanged layers
244
+ * keep their DOM nodes and focus. The application owns `stack.open` and handles
245
+ * `kui-request-close` to update that state before calling this again.
246
+ */
247
+ declare function syncDialogStack(root: ParentNode): void;
248
+ /** Follow a controlled stack's render updates until the returned stop runs. */
249
+ declare function wireDialogStack(root: ParentNode): () => void;
250
+
251
+ export { type DialogCloseSource as D, type SurfaceInset as S, type DialogRequestCloseDetail as a, DialogSurface as b, type DialogSurfaceBodyLayout as c, type DialogSurfaceFooterPresentation as d, type DialogSurfaceHeaderPresentation as e, type DialogSurfaceHeight as f, type DialogSurfaceMaxHeight as g, type DialogSurfaceName as h, type DialogSurfaceOptions as i, type DialogSurfacePresentation as j, type DialogSurfaceProps as k, type DialogSurfaceRootAttributes as l, type DialogSurfaceSheetMotion as m, type DialogSurfaceSize as n, closeDialog as o, openDialog as p, type DialogSurfaceCloseEmphasis as q, type DialogSurfaceStack as r, syncDialogStack as s, wireDialogStack as w };
@@ -4,7 +4,7 @@ import { CssLength } from './css-values.js';
4
4
 
5
5
  type EditorFrameMode = 'source' | 'preview';
6
6
  type EditorFrameAppearance = 'framed' | 'embedded';
7
- type EditorFrameInset = 'padded' | 'flush';
7
+ type EditorFrameInset = 'none' | 'comfortable' | /** @deprecated Use comfortable. */ 'padded' | /** @deprecated Use none. */ 'flush';
8
8
  interface EditorFrameProps {
9
9
  /** A Toolbar or other fixed controls above the writing surface. */
10
10
  toolbar?: KerfUiContent;
@@ -1,3 +1,3 @@
1
- export { EditorFrame } from './chunk-V6N3YLTM.js';
1
+ export { EditorFrame } from './chunk-LTOTL5AS.js';
2
2
 
3
3
  //# sourceMappingURL=editor-frame.js.map
package/dist/editor.d.ts CHANGED
@@ -7,11 +7,19 @@ interface EditorStorage {
7
7
  /** The document's text, or undefined when there is none at `path`. */
8
8
  read(path: string): Promise<string | undefined>;
9
9
  write(path: string, text: string): Promise<void>;
10
+ /**
11
+ * KF-PX5EVZ: the project's documents, as project-relative POSIX paths of
12
+ * `.kui.json` files. Optional: without it the editor asks for a path where
13
+ * it would offer a picker.
14
+ */
15
+ list?(): Promise<readonly string[]>;
10
16
  }
11
17
  /** Where the dev server's file middleware answers. */
12
18
  declare const EDITOR_FILE_API = "/__kerf-ui-editor/api/file";
19
+ /** Where the dev server lists the project's documents (KF-PX5EVZ). */
20
+ declare const EDITOR_LIST_API = "/__kerf-ui-editor/api/files";
13
21
  /** Storage over the dev server that hosts the editor. */
14
- declare function devServerStorage(api?: string): EditorStorage;
22
+ declare function devServerStorage(api?: string, listApi?: string): EditorStorage;
15
23
 
16
24
  interface InspectorProp {
17
25
  readonly name: string;
@@ -123,6 +131,25 @@ type FieldPath = readonly (string | number)[];
123
131
  /** Where a field editor's form opens: pushed in the Inspector, or a dialog. */
124
132
  type FieldContainer = 'subview' | 'dialog';
125
133
 
134
+ /** Where a `$slot` sits: its parent node, zone, and index in that zone. */
135
+ interface SlotAddress {
136
+ readonly parent: string;
137
+ readonly zone: string;
138
+ readonly index: number;
139
+ }
140
+
141
+ /** What the inspector shows: a document node or a palette component. */
142
+ type Selection = {
143
+ readonly kind: 'node';
144
+ readonly id: string;
145
+ } | {
146
+ readonly kind: 'component';
147
+ readonly key: string;
148
+ } | {
149
+ readonly kind: 'slot';
150
+ readonly address: SlotAddress;
151
+ } | null;
152
+
126
153
  /** `data-*` attributes to spread on an element (or a component's `rootAttributes`). */
127
154
  type FieldEditorAttributes = Readonly<Record<`data-${string}`, string>>;
128
155
  /** The control kinds a field editor's own controls can commit through. */
@@ -179,13 +206,6 @@ interface FieldEditor {
179
206
  */
180
207
  type FieldEditors = Readonly<Record<string, FieldEditor>>;
181
208
 
182
- /** Where a `$slot` sits: its parent node, zone, and index in that zone. */
183
- interface SlotAddress {
184
- readonly parent: string;
185
- readonly zone: string;
186
- readonly index: number;
187
- }
188
-
189
209
  /** What a host's mock handler is given. */
190
210
  interface PlayActionContext {
191
211
  /** The action's name, as the document's `$action` names it. */
@@ -283,17 +303,7 @@ type DevicePresetsOption = readonly DevicePreset[] | ((shipped: readonly DeviceP
283
303
  declare const SHIPPED_DEVICE_PRESETS: readonly DevicePreset[];
284
304
 
285
305
  declare const WORKBENCH_ID = "kerf-ui-editor";
286
- /** What the inspector shows: a document node or a palette component. */
287
- type Selection = {
288
- readonly kind: 'node';
289
- readonly id: string;
290
- } | {
291
- readonly kind: 'component';
292
- readonly key: string;
293
- } | {
294
- readonly kind: 'slot';
295
- readonly address: SlotAddress;
296
- } | null;
306
+
297
307
  /**
298
308
  * A new document (KF-PK3GVY): Kerf UI's catalog and no root yet; the first
299
309
  * component the author chooses becomes the root.
@@ -339,6 +349,14 @@ declare function createEditor(options: EditorOptions): {
339
349
  render: () => SafeHtml;
340
350
  wire: (root: HTMLElement) => () => void;
341
351
  document: kerfjs.Signal<ViewDocument>;
352
+ views: kerfjs.Signal<Readonly<Record<string, ViewDocument>>>;
353
+ copies: kerfjs.Signal<Readonly<Record<string, ViewDocument>>>;
354
+ } | {
355
+ render: () => SafeHtml;
356
+ wire: (root: HTMLElement) => () => void;
357
+ document: kerfjs.Signal<ViewDocument>;
358
+ selection: kerfjs.Signal<Selection>;
359
+ loadError: kerfjs.Signal<string | null>;
342
360
  };
343
361
 
344
- export { type ActionLogEntry, type ActionOutcome, type CatalogEntry, type ComponentFunction, type DeviceFrame, type DeviceInsets, type DeviceKind, type DevicePreset, type DevicePresetsOption, EDITOR_FILE_API, type EditorCatalog, type EditorCatalogInputs, type EditorOptions, type EditorStorage, type FieldEditor, type FieldEditorAttributes, type FieldEditorContext, type FieldEditorControlKind, type FieldEditors, type PaletteGroup, type PlayActionContext, type PlayHandler, type PlayHandlers, type PlayNavStack, type PlayView, type PropsComponent, SHIPPED_DEVICE_PRESETS, type Selection, WORKBENCH_ID, componentMap, createEditor, createEditorCatalog, devServerStorage, emptyDocument };
362
+ export { type ActionLogEntry, type ActionOutcome, type CatalogEntry, type ComponentFunction, type DeviceFrame, type DeviceInsets, type DeviceKind, type DevicePreset, type DevicePresetsOption, EDITOR_FILE_API, EDITOR_LIST_API, type EditorCatalog, type EditorCatalogInputs, type EditorOptions, type EditorStorage, type FieldEditor, type FieldEditorAttributes, type FieldEditorContext, type FieldEditorControlKind, type FieldEditors, type PaletteGroup, type PlayActionContext, type PlayHandler, type PlayHandlers, type PlayNavStack, type PlayView, type PropsComponent, SHIPPED_DEVICE_PRESETS, type Selection, WORKBENCH_ID, componentMap, createEditor, createEditorCatalog, devServerStorage, emptyDocument };