@kerfjs/ui 5.0.0-beta.129 → 5.0.0-beta.130

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 (170) hide show
  1. package/ai/component-catalog.json +14 -9
  2. package/ai/component-composition-rules.json +1 -1
  3. package/ai/component-composition.d.ts +17 -0
  4. package/ai/component-composition.json +4 -3
  5. package/ai/component-composition.schema.json +326 -80
  6. package/ai/component-props-overlay.json +8568 -628
  7. package/ai/component-props-overlay.schema.json +15 -1
  8. package/ai/component-props.json +6221 -2069
  9. package/ai/component-props.schema.json +7 -0
  10. package/ai/components/radio-group.md +5 -1
  11. package/ai/components/state-banner.md +1 -1
  12. package/ai/components/surface-scaffold.md +3 -2
  13. package/ai/components/tab-bar.md +1 -1
  14. package/ai/components/toolbar-control-group.md +1 -1
  15. package/ai/public-api-signatures-v1.md +205 -42
  16. package/ai/skill.md +21 -8
  17. package/ai/view-document.schema.json +140 -86
  18. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  19. package/dist/browser/column-explorer.js +5 -1
  20. package/dist/browser/radio-group.js +1 -0
  21. package/dist/catalog-resources.d.ts +2 -2
  22. package/dist/catalog.d.ts +2 -2
  23. package/dist/catalog.js +5 -5
  24. package/dist/{chunk-E2MTHHLS.js → chunk-2FA3SX57.js} +2 -2
  25. package/dist/{chunk-E2MTHHLS.js.map → chunk-2FA3SX57.js.map} +1 -1
  26. package/dist/{chunk-ZC4KSRAF.js → chunk-4CYCJ3NY.js} +6 -4
  27. package/dist/chunk-4CYCJ3NY.js.map +1 -0
  28. package/dist/{chunk-IMXLOMTF.js → chunk-76BLSFEA.js} +30 -12
  29. package/dist/chunk-76BLSFEA.js.map +1 -0
  30. package/dist/{chunk-IR32NI2O.js → chunk-ALBFHXMZ.js} +3 -3
  31. package/dist/chunk-ALBFHXMZ.js.map +1 -0
  32. package/dist/{chunk-3ZWYGGEC.js → chunk-ASU4ODOH.js} +38 -7
  33. package/dist/chunk-ASU4ODOH.js.map +1 -0
  34. package/dist/chunk-BMUYZKXW.js +155 -0
  35. package/dist/chunk-BMUYZKXW.js.map +1 -0
  36. package/dist/{chunk-GQUDCWOD.js → chunk-D2KHQNJ6.js} +49 -23
  37. package/dist/chunk-D2KHQNJ6.js.map +1 -0
  38. package/dist/{chunk-34FWYJX6.js → chunk-ECJHCPBN.js} +8 -2
  39. package/dist/chunk-ECJHCPBN.js.map +1 -0
  40. package/dist/{chunk-DBCDYBZP.js → chunk-HHEBNP6Z.js} +2 -2
  41. package/dist/{chunk-DBCDYBZP.js.map → chunk-HHEBNP6Z.js.map} +1 -1
  42. package/dist/{chunk-3ZKUXWAV.js → chunk-IPYQYLSX.js} +16 -9
  43. package/dist/chunk-IPYQYLSX.js.map +1 -0
  44. package/dist/{chunk-SJEPM5ZU.js → chunk-LETAE6SX.js} +2 -2
  45. package/dist/{chunk-SJEPM5ZU.js.map → chunk-LETAE6SX.js.map} +1 -1
  46. package/dist/chunk-MVWR5WRX.js +99 -0
  47. package/dist/chunk-MVWR5WRX.js.map +1 -0
  48. package/dist/{chunk-6T7AX365.js → chunk-OSL4LQ7T.js} +52 -23
  49. package/dist/chunk-OSL4LQ7T.js.map +1 -0
  50. package/dist/{chunk-OHT2AXER.js → chunk-QSJAIXLM.js} +19 -3
  51. package/dist/chunk-QSJAIXLM.js.map +1 -0
  52. package/dist/{chunk-UQ4FRQ6M.js → chunk-R4JK2C6D.js} +13 -3
  53. package/dist/chunk-R4JK2C6D.js.map +1 -0
  54. package/dist/{chunk-5A2DN3LR.js → chunk-SGYBIKQA.js} +3 -1
  55. package/dist/chunk-SGYBIKQA.js.map +1 -0
  56. package/dist/{chunk-K3C35KGR.js → chunk-XO5IOPM5.js} +2 -2
  57. package/dist/{chunk-K3C35KGR.js.map → chunk-XO5IOPM5.js.map} +1 -1
  58. package/dist/collapsible-panel.d.ts +2 -2
  59. package/dist/collapsible-panel.js +2 -2
  60. package/dist/column-explorer.d.ts +5 -1
  61. package/dist/column-explorer.js +5 -1
  62. package/dist/column-track.d.ts +3 -1
  63. package/dist/column-track.js +1 -1
  64. package/dist/editor.d.ts +87 -2
  65. package/dist/editor.js +2249 -1320
  66. package/dist/editor.js.map +1 -1
  67. package/dist/index.js +12 -12
  68. package/dist/list-detail-dialog.d.ts +2 -2
  69. package/dist/list-detail-dialog.js +4 -4
  70. package/dist/list-header.d.ts +47 -5
  71. package/dist/list-header.js +1 -1
  72. package/dist/message-composer.js +1 -1
  73. package/dist/{nav-stack-vQ3ieerq.d.ts → nav-stack-DKrvqFjA.d.ts} +1 -1
  74. package/dist/nav-stack.d.ts +2 -2
  75. package/dist/nav-stack.js +1 -1
  76. package/dist/{panel-toolbar-vg6Ir5Dy.d.ts → panel-toolbar-CEcHHDkn.d.ts} +8 -0
  77. package/dist/radio-group.d.ts +19 -2
  78. package/dist/radio-group.js +3 -1
  79. package/dist/split-view.d.ts +2 -2
  80. package/dist/split-view.js +1 -1
  81. package/dist/styles/column-track.css +7 -2
  82. package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +11 -4
  83. package/dist/styles/components/collections/list-header/list-header.css +50 -0
  84. package/dist/styles/components/collections/list-item/list-item.css +6 -1
  85. package/dist/styles/components/collections/tree-list/tree-list.css +3 -2
  86. package/dist/styles/components/forms/radio-group/radio-group.css +107 -0
  87. package/dist/styles/components/layout/column-track/column-track.css +7 -2
  88. package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +30 -1
  89. package/dist/styles/editor/editor.css +0 -23
  90. package/dist/styles/list-header.css +50 -0
  91. package/dist/styles/list-item.css +6 -1
  92. package/dist/styles/radio-group.css +107 -0
  93. package/dist/styles/surface-scaffold.css +30 -1
  94. package/dist/styles/toolbar-control-group.css +11 -4
  95. package/dist/styles/tree-list.css +3 -2
  96. package/dist/surface-scaffold-register.js +1 -1
  97. package/dist/surface-scaffold.d.ts +46 -11
  98. package/dist/surface-scaffold.js +2 -2
  99. package/dist/toolbar-control-group.d.ts +10 -1
  100. package/dist/toolbar-control-group.js +1 -1
  101. package/dist/tree-list.d.ts +7 -1
  102. package/dist/tree-list.js +1 -1
  103. package/dist/view-runtime.d.ts +9 -0
  104. package/dist/view-runtime.js +8 -0
  105. package/dist/view-runtime.js.map +1 -0
  106. package/dist/wire-catalog.d.ts +2 -2
  107. package/dist/wire-catalog.js +1 -1
  108. package/dist/wire-search-fields.js +1 -1
  109. package/dist/wire-tab-bars.d.ts +10 -0
  110. package/dist/wire-tab-bars.js +1 -1
  111. package/dist/wire-tag-fields.js +1 -1
  112. package/dist/wire-workbench.d.ts +17 -1
  113. package/dist/wire-workbench.js +1 -1
  114. package/dist/workbench-dialog.d.ts +2 -2
  115. package/dist/workbench-dialog.js +4 -4
  116. package/dist/workbench.d.ts +10 -2
  117. package/dist/workbench.js +1 -1
  118. package/docs/accessibility.md +1 -1
  119. package/docs/column-explorer.md +4 -0
  120. package/docs/component-contract.md +10 -4
  121. package/docs/component-integration.md +7 -3
  122. package/docs/component-selection.md +2 -1
  123. package/docs/design/sketch/Kerf-UI.sketch +0 -0
  124. package/docs/design/sketch/coverage.md +7 -6
  125. package/docs/design/sketch/forms/README.md +5 -4
  126. package/docs/design/sketch/unified/pages/forms.png +0 -0
  127. package/docs/design/templates/radio-group/tiles-dark.svg +1 -0
  128. package/docs/design/templates/radio-group/tiles.svg +1 -0
  129. package/docs/design/templates/radio-group-dark.svg +1 -1
  130. package/docs/design/templates/radio-group.svg +1 -1
  131. package/docs/editor-host.md +90 -5
  132. package/docs/interaction-conventions.md +2 -0
  133. package/docs/layout.md +1 -1
  134. package/docs/surface-scaffold.md +49 -2
  135. package/docs/tree-list.md +10 -0
  136. package/docs/workbench.md +16 -0
  137. package/evaluator/firefox-app-data.d.mts +4 -0
  138. package/evaluator/firefox-app-data.mjs +35 -0
  139. package/evaluator/index.mjs +19 -5
  140. package/llms.txt +20 -4
  141. package/package.json +8 -1
  142. package/props/component-props.d.mts +3 -0
  143. package/view/cli.mjs +36 -5
  144. package/view/contract.mjs +3 -0
  145. package/view/generate.mjs +8 -7
  146. package/view/index.d.mts +14 -0
  147. package/view/project-types-worker.mjs +55 -0
  148. package/view/project-types.d.mts +43 -0
  149. package/view/project-types.mjs +618 -0
  150. package/view/type-expression.d.mts +15 -0
  151. package/view/type-expression.mjs +162 -0
  152. package/view/types.mjs +4 -0
  153. package/view/validate.mjs +20 -1
  154. package/vite-editor.d.mts +31 -3
  155. package/vite-editor.mjs +168 -4
  156. package/dist/chunk-34FWYJX6.js.map +0 -1
  157. package/dist/chunk-3ZKUXWAV.js.map +0 -1
  158. package/dist/chunk-3ZWYGGEC.js.map +0 -1
  159. package/dist/chunk-5A2DN3LR.js.map +0 -1
  160. package/dist/chunk-6T7AX365.js.map +0 -1
  161. package/dist/chunk-BMOZSNDU.js +0 -133
  162. package/dist/chunk-BMOZSNDU.js.map +0 -1
  163. package/dist/chunk-GQUDCWOD.js.map +0 -1
  164. package/dist/chunk-IMXLOMTF.js.map +0 -1
  165. package/dist/chunk-IR32NI2O.js.map +0 -1
  166. package/dist/chunk-MLDO7WLA.js +0 -82
  167. package/dist/chunk-MLDO7WLA.js.map +0 -1
  168. package/dist/chunk-OHT2AXER.js.map +0 -1
  169. package/dist/chunk-UQ4FRQ6M.js.map +0 -1
  170. package/dist/chunk-ZC4KSRAF.js.map +0 -1
@@ -904,6 +904,20 @@ h2.kui-dialog-surface__title {
904
904
  )
905
905
  );
906
906
  }
907
+ .kui-pinnable-popover-surface[data-min-height],
908
+ .kui-pinnable-popover-surface[data-presentation="overlay"]:is(
909
+ [data-pinned],
910
+ [data-resize-from-bottom]
911
+ ):popover-open {
912
+ min-height: max(
913
+ 0px,
914
+ min(
915
+ var(--_kui-pinnable-popover-surface-min-height, 10rem),
916
+ var(--_kui-pinnable-popover-surface-max-height, 100dvh),
917
+ var(--_kui-pinnable-popover-surface-available-height)
918
+ )
919
+ );
920
+ }
907
921
  .kui-pinnable-popover-surface[data-presentation="overlay"]:popover-open {
908
922
  inset: 0;
909
923
  margin: auto;
@@ -919,7 +933,6 @@ h2.kui-dialog-surface__title {
919
933
  /* A pinned overlay resizes from its corner, within the viewport caps. */
920
934
  .kui-pinnable-popover-surface[data-presentation="overlay"][data-pinned]:popover-open {
921
935
  min-width: min(15rem, 100%);
922
- min-height: min(10rem, 100%);
923
936
  resize: both;
924
937
  }
925
938
  .kui-pinnable-popover-surface__bottom-resize {
@@ -1101,3 +1114,19 @@ h2.kui-dialog-surface__title {
1101
1114
  .kui-popup-surface {
1102
1115
  display: inline-flex;
1103
1116
  }
1117
+
1118
+ /* A PinnablePopoverSurface delegates edge clearance to its content owners
1119
+ when its body contains an edge-to-edge scroller. */
1120
+ .kui-pinnable-popover-surface[data-body-inset="none"]
1121
+ > .kui-pinnable-popover-surface__body {
1122
+ padding: 0;
1123
+ }
1124
+ .kui-pinnable-popover-surface[data-body-inset="comfortable"]
1125
+ > .kui-pinnable-popover-surface__body {
1126
+ padding-inline: var(--kui-container-inset, 1rem);
1127
+ padding-block-end: var(--kui-container-inset, 1rem);
1128
+ }
1129
+ .kui-pinnable-popover-surface[data-body-inset="comfortable"][data-body-layout="fill-last"]
1130
+ > .kui-pinnable-popover-surface__body {
1131
+ padding-block-end: 0;
1132
+ }
@@ -583,26 +583,3 @@
583
583
  pointer-events: none;
584
584
  color: var(--kui-color-text-quiet);
585
585
  }
586
-
587
- /* The explorer owns horizontal scrolling; the Library body owns the vertical
588
- list when the tree presentation is active. */
589
- .kui-editor__document-columns {
590
- display: flex;
591
- flex-direction: column;
592
- block-size: 100%;
593
- min-block-size: 0;
594
- }
595
-
596
- .kui-editor__document-location {
597
- display: flex;
598
- align-items: center;
599
- gap: var(--kui-layout-item-gap, 8px);
600
- min-block-size: 40px;
601
- padding-inline: var(--kui-layout-inline-margin, 8px);
602
- min-inline-size: 0;
603
- }
604
-
605
- .kui-editor__document-explorer {
606
- flex: 1;
607
- min-block-size: 0;
608
- }
@@ -220,3 +220,53 @@
220
220
  height: var(--_kui-list-header-action-icon-size);
221
221
  min-block-size: 0;
222
222
  }
223
+
224
+ /* KF-J8GMA2: a header above summary rows starts its label on their
225
+ leading-content edge (the row's 1px border plus its body's inline
226
+ padding). It spans the full width as a SummaryRow does, so it measures the
227
+ width the rows compact at, and its title's 1px border matches the row's.
228
+ A toggle's label sits directly on its padding; a heading's label sits
229
+ inside the heading text's own item padding, which the title's padding
230
+ gives back. The tokens and the 384px compaction are summary-row.css's (a
231
+ test keeps the two in step). */
232
+ .kui-list-header[data-leading-edge="summary-row"]:not(
233
+ [data-inline="true"],
234
+ [data-width="content"]
235
+ ) {
236
+ --_kui-list-header-leading-edge: var(--kui-space-s);
237
+ width: 100%;
238
+ margin-inline: 0;
239
+ container-type: inline-size;
240
+ }
241
+
242
+ .kui-list-header[data-leading-edge="summary-row"]:not(
243
+ [data-inline="true"],
244
+ [data-width="content"]
245
+ )
246
+ > .kui-list-header__toggle {
247
+ padding-inline: var(--_kui-list-header-leading-edge);
248
+ }
249
+
250
+ .kui-list-header[data-leading-edge="summary-row"]:not(
251
+ [data-inline="true"],
252
+ [data-width="content"]
253
+ )
254
+ > div.kui-list-header__title {
255
+ padding-inline-start: max(
256
+ 0px,
257
+ calc(
258
+ var(--_kui-list-header-leading-edge) -
259
+ var(--kui-layout-item-padding, 0.5rem)
260
+ )
261
+ );
262
+ }
263
+
264
+ @container (max-width: 24rem) {
265
+ .kui-list-header[data-leading-edge="summary-row"]:not(
266
+ [data-inline="true"],
267
+ [data-width="content"]
268
+ )
269
+ > .kui-list-header__title {
270
+ --_kui-list-header-leading-edge: var(--kui-space-xs);
271
+ }
272
+ }
@@ -88,7 +88,12 @@
88
88
  border-start-end-radius: 0;
89
89
  }
90
90
 
91
- .kui-list-item:has(+ :is([data-divider="before"], [data-divider="both"])) {
91
+ /* Internal TreeList rows never carry dividers. Exclude them before :has so
92
+ sibling insertion/removal does not invalidate divider matching across a
93
+ large tree. Public ListItem rows keep their custom-role divider behavior. */
94
+ .kui-list-item:not([data-kui-tree-row]):has(
95
+ + :is([data-divider="before"], [data-divider="both"])
96
+ ) {
92
97
  border-end-start-radius: 0;
93
98
  border-end-end-radius: 0;
94
99
  }
@@ -145,6 +145,102 @@
145
145
  .kui-radio-group__hint + .kui-radio-group__error {
146
146
  margin-block-start: 0;
147
147
  }
148
+ /* Tiles (KF-C29WJ9): each choice is a framed preview above its label, in a
149
+ row that wraps whole tiles.
150
+ The native radio covers the whole tile, so a press anywhere on it selects
151
+ and the browser keeps one Tab stop with arrow-key selection. Selection is
152
+ a brand ring around the frame plus a check badge, never color alone. */
153
+ .kui-radio-group[data-presentation="tiles"] .kui-radio-group__choices {
154
+ display: flex;
155
+ flex-flow: row wrap;
156
+ gap: var(--kui-space-m, 1rem);
157
+ }
158
+ /* A definite tile width keeps the group's intrinsic width a row of whole
159
+ tiles, so it lines them up wherever it is shrink-wrapped and wraps them
160
+ when its container is narrower (three fit a phone-width column); the cap
161
+ keeps one tile inside a container narrower than a tile. */
162
+ .kui-radio-group[data-presentation="tiles"] .kui-radio-group__choice {
163
+ width: 6.5rem;
164
+ max-width: 100%;
165
+ }
166
+ .kui-radio-group__tile {
167
+ position: relative;
168
+ display: flex;
169
+ min-width: 0;
170
+ flex-direction: column;
171
+ gap: var(--kui-space-xs, 0.5rem);
172
+ color: var(--kui-color-text);
173
+ cursor: pointer;
174
+ }
175
+ .kui-radio-group__tile > .kui-radio-group__input {
176
+ z-index: 1;
177
+ }
178
+ .kui-radio-group__preview {
179
+ position: relative;
180
+ display: block;
181
+ overflow: hidden;
182
+ box-sizing: border-box;
183
+ aspect-ratio: 4 / 3;
184
+ border: 1px solid var(--kui-color-neutral-border-normal);
185
+ border-radius: var(--kui-radius-m, 0.5rem);
186
+ background-color: var(--kui-color-neutral-fill-quiet);
187
+ }
188
+ /* The app's decorative artwork fills the frame. */
189
+ .kui-radio-group__preview > :is(svg, img, picture) {
190
+ display: block;
191
+ width: 100%;
192
+ height: 100%;
193
+ object-fit: cover;
194
+ }
195
+ .kui-radio-group__input:checked + .kui-radio-group__preview {
196
+ border-color: var(--kui-color-brand-fill-loud);
197
+ box-shadow: 0 0 0 1px var(--kui-color-brand-fill-loud);
198
+ }
199
+ .kui-radio-group__input:focus-visible + .kui-radio-group__preview {
200
+ outline: var(--kui-focus-ring);
201
+ outline-offset: 2px;
202
+ }
203
+ .kui-radio-group[data-invalid] .kui-radio-group__preview {
204
+ border-color: var(--kui-color-danger-border-loud);
205
+ }
206
+ .kui-radio-group__check {
207
+ position: absolute;
208
+ inset-block-start: 0.375rem;
209
+ inset-inline-end: 0.375rem;
210
+ display: none;
211
+ box-sizing: border-box;
212
+ width: 1.25rem;
213
+ height: 1.25rem;
214
+ align-items: center;
215
+ justify-content: center;
216
+ border-radius: var(--kui-radius-circle, 50%);
217
+ background-color: var(--kui-color-brand-fill-loud);
218
+ color: var(--kui-color-brand-on-loud);
219
+ }
220
+ .kui-radio-group__check > [data-lucide] {
221
+ width: 0.875rem;
222
+ height: 0.875rem;
223
+ stroke-width: 3;
224
+ }
225
+ .kui-radio-group__input:checked
226
+ + .kui-radio-group__preview
227
+ > .kui-radio-group__check {
228
+ display: inline-flex;
229
+ }
230
+ .kui-radio-group__tile > .kui-radio-group__choice-label {
231
+ padding-block-start: 0;
232
+ text-align: center;
233
+ }
234
+ .kui-radio-group__tile > .kui-radio-group__choice-hint {
235
+ margin-block-start: calc(var(--kui-space-2xs) - var(--kui-space-xs));
236
+ padding-inline-start: 0;
237
+ text-align: center;
238
+ }
239
+ .kui-radio-group__choice:has(.kui-radio-group__input:disabled)
240
+ .kui-radio-group__tile {
241
+ cursor: not-allowed;
242
+ opacity: 0.5;
243
+ }
148
244
  @media (forced-colors: active) {
149
245
  .kui-radio-group__circle {
150
246
  border-color: CanvasText;
@@ -155,4 +251,15 @@
155
251
  .kui-radio-group__input:checked + .kui-radio-group__circle::after {
156
252
  background-color: Highlight;
157
253
  }
254
+ .kui-radio-group__preview {
255
+ border-color: CanvasText;
256
+ }
257
+ .kui-radio-group__input:checked + .kui-radio-group__preview {
258
+ border-color: Highlight;
259
+ box-shadow: 0 0 0 1px Highlight;
260
+ }
261
+ .kui-radio-group__check {
262
+ background-color: Highlight;
263
+ color: HighlightText;
264
+ }
158
265
  }
@@ -904,6 +904,20 @@ h2.kui-dialog-surface__title {
904
904
  )
905
905
  );
906
906
  }
907
+ .kui-pinnable-popover-surface[data-min-height],
908
+ .kui-pinnable-popover-surface[data-presentation="overlay"]:is(
909
+ [data-pinned],
910
+ [data-resize-from-bottom]
911
+ ):popover-open {
912
+ min-height: max(
913
+ 0px,
914
+ min(
915
+ var(--_kui-pinnable-popover-surface-min-height, 10rem),
916
+ var(--_kui-pinnable-popover-surface-max-height, 100dvh),
917
+ var(--_kui-pinnable-popover-surface-available-height)
918
+ )
919
+ );
920
+ }
907
921
  .kui-pinnable-popover-surface[data-presentation="overlay"]:popover-open {
908
922
  inset: 0;
909
923
  margin: auto;
@@ -919,7 +933,6 @@ h2.kui-dialog-surface__title {
919
933
  /* A pinned overlay resizes from its corner, within the viewport caps. */
920
934
  .kui-pinnable-popover-surface[data-presentation="overlay"][data-pinned]:popover-open {
921
935
  min-width: min(15rem, 100%);
922
- min-height: min(10rem, 100%);
923
936
  resize: both;
924
937
  }
925
938
  .kui-pinnable-popover-surface__bottom-resize {
@@ -1101,3 +1114,19 @@ h2.kui-dialog-surface__title {
1101
1114
  .kui-popup-surface {
1102
1115
  display: inline-flex;
1103
1116
  }
1117
+
1118
+ /* A PinnablePopoverSurface delegates edge clearance to its content owners
1119
+ when its body contains an edge-to-edge scroller. */
1120
+ .kui-pinnable-popover-surface[data-body-inset="none"]
1121
+ > .kui-pinnable-popover-surface__body {
1122
+ padding: 0;
1123
+ }
1124
+ .kui-pinnable-popover-surface[data-body-inset="comfortable"]
1125
+ > .kui-pinnable-popover-surface__body {
1126
+ padding-inline: var(--kui-container-inset, 1rem);
1127
+ padding-block-end: var(--kui-container-inset, 1rem);
1128
+ }
1129
+ .kui-pinnable-popover-surface[data-body-inset="comfortable"][data-body-layout="fill-last"]
1130
+ > .kui-pinnable-popover-surface__body {
1131
+ padding-block-end: 0;
1132
+ }
@@ -125,11 +125,18 @@
125
125
  }
126
126
  }
127
127
 
128
- /* An expanded trailing control owns the compact row when sibling groups opt
129
- into yielding. Scoping to the trailing zone keeps independent center and
130
- leading controls visible, and the siblings return when it closes. */
128
+ /* An expanded control owns the compact row when groups opt into yielding.
129
+ An opted-in group yields to an expanded group in any zone of the same
130
+ Toolbar, so a group a collapsed Workbench panel relocated into the leading
131
+ zone gives way to the work area's expanded trailing search (KF-ZX9Q0X).
132
+ Groups that do not opt in stay visible, and the yielding groups return when
133
+ it closes. */
131
134
  @container kui-toolbar (max-width: 30rem) {
132
- .kui-toolbar__trailing:has(> .kui-toolbar-control-group[data-expanded="true"])
135
+ .kui-toolbar:has(
136
+ > :is(.kui-toolbar__leading, .kui-toolbar__center, .kui-toolbar__trailing)
137
+ > .kui-toolbar-control-group[data-expanded="true"]
138
+ )
139
+ > :is(.kui-toolbar__leading, .kui-toolbar__center, .kui-toolbar__trailing)
133
140
  > .kui-toolbar-control-group[data-visibility="yield-to-expanded-sibling"]:not(
134
141
  [data-expanded="true"]
135
142
  ) {
@@ -1,7 +1,8 @@
1
1
  /* A TreeList is a column of ListItem treeitem rows; the rows own their
2
2
  geometry, indent, and disclosure arrows. */
3
3
  .kui-tree-list {
4
- display: flex;
4
+ /* Rows already own their widths and natural heights. Normal block flow
5
+ avoids re-running flex layout across every row for a keyed branch change. */
6
+ display: block;
5
7
  min-width: 0;
6
- flex-direction: column;
7
8
  }
@@ -1,4 +1,4 @@
1
- import { installDialogSurfaces } from './chunk-UQ4FRQ6M.js';
1
+ import { installDialogSurfaces } from './chunk-R4JK2C6D.js';
2
2
 
3
3
 
4
4
 
@@ -1,5 +1,5 @@
1
- import { n as DialogSurfaceSize, f as DialogSurfaceHeight, g as DialogSurfaceMaxHeight, c as DialogSurfaceBodyLayout } from './dialog-surface-controller-BeKZ3e8Z.js';
2
- export { D as DialogCloseSource, a as DialogRequestCloseDetail, b as DialogSurface, q as DialogSurfaceCloseEmphasis, d as DialogSurfaceFooterPresentation, e as DialogSurfaceHeaderPresentation, h as DialogSurfaceName, i as DialogSurfaceOptions, j as DialogSurfacePresentation, k as DialogSurfaceProps, l as DialogSurfaceRootAttributes, m as DialogSurfaceSheetMotion, r as DialogSurfaceStack, S as SurfaceInset, o as closeDialog, p as openDialog, s as syncDialogStack, w as wireDialogStack } from './dialog-surface-controller-BeKZ3e8Z.js';
1
+ import { n as DialogSurfaceSize, f as DialogSurfaceHeight, g as DialogSurfaceMaxHeight, c as DialogSurfaceBodyLayout, S as SurfaceInset } from './dialog-surface-controller-BeKZ3e8Z.js';
2
+ export { D as DialogCloseSource, a as DialogRequestCloseDetail, b as DialogSurface, q as DialogSurfaceCloseEmphasis, d as DialogSurfaceFooterPresentation, e as DialogSurfaceHeaderPresentation, h as DialogSurfaceName, i as DialogSurfaceOptions, j as DialogSurfacePresentation, k as DialogSurfaceProps, l as DialogSurfaceRootAttributes, m as DialogSurfaceSheetMotion, r as DialogSurfaceStack, o as closeDialog, p as openDialog, s as syncDialogStack, w as wireDialogStack } from './dialog-surface-controller-BeKZ3e8Z.js';
3
3
  import * as kerfjs from 'kerfjs';
4
4
  import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
5
5
  import { CssLength } from './css-values.js';
@@ -110,7 +110,10 @@ interface PinnablePopoverSurfaceProps {
110
110
  describedBy?: string;
111
111
  /** The body content, below the header. */
112
112
  children: KerfUiContent;
113
- /** Controls before the Pin and Close buttons in the header. */
113
+ /**
114
+ * Controls before the Pin and Close buttons in the header (the only header
115
+ * controls when both are omitted).
116
+ */
114
117
  headerActions?: KerfUiContent;
115
118
  /**
116
119
  * `overlay` (default) is a native `popover="manual"` in the top layer that
@@ -130,6 +133,8 @@ interface PinnablePopoverSurfaceProps {
130
133
  preferredWidth?: CssLength;
131
134
  /** Definite height, bounded by the dynamic viewport minus both gutters. */
132
135
  height?: DialogSurfaceHeight;
136
+ /** Minimum height, capped by maxHeight and the available viewport. Resizable overlays default to 160px. */
137
+ minHeight?: CssLength;
133
138
  /** Height cap, bounded the same way, for a surface that sizes to content. */
134
139
  maxHeight?: DialogSurfaceMaxHeight;
135
140
  /**
@@ -142,9 +147,25 @@ interface PinnablePopoverSurfaceProps {
142
147
  * `fill-last` stacks fixed rows above one filling last child.
143
148
  */
144
149
  bodyLayout?: DialogSurfaceBodyLayout;
150
+ /** Body edge clearance; none lets content owners meet the surface edges. Default default (8px). */
151
+ bodyInset?: SurfaceInset;
145
152
  /** Add a bottom-edge handle that resizes by drag or arrow key without changing pin state. */
146
153
  resizeFromBottom?: boolean;
147
- /** The Pin toggle's accessible name (default `Pin`). */
154
+ /**
155
+ * `false` makes it a persistent floating panel: always pinned, with no Pin
156
+ * toggle, it never re-anchors or closes on a press outside (KF-850ZRF).
157
+ * It still drags by its title, moves with the arrow keys, resizes, and
158
+ * stays inside the viewport gutter. Default `true`.
159
+ */
160
+ pinnable?: boolean;
161
+ /**
162
+ * `false` omits the header Close button, for a surface whose visibility an
163
+ * application control owns (it calls `hidePopover()` or toggles a
164
+ * `popoverTarget`). Escape then closes it only when `wirePinnablePopover`
165
+ * is given `closeOnEscape: true`. Default `true`.
166
+ */
167
+ closable?: boolean;
168
+ /** The Pin toggle's accessible name (default `Pin`); unused when not pinnable. */
148
169
  pinLabel?: string;
149
170
  /** The close button's accessible name (default `Close`). */
150
171
  closeLabel?: string;
@@ -163,10 +184,12 @@ interface PinnablePopoverSurfaceProps {
163
184
  * keys, resizes, and stays inside the viewport gutter. Open it with a
164
185
  * `popoverTarget` control or `showPopover()`, and call `wirePinnablePopover()`
165
186
  * once for its placement, dismissal, and movement; the application stores
166
- * what `onChange` reports. Use `PopoverDialogSurface` for a dialog that only
167
- * ever light-dismisses.
187
+ * what `onChange` reports. `pinnable={false}` makes it a persistent floating
188
+ * panel and `closable={false}` leaves its visibility to an application
189
+ * control. Use `PopoverDialogSurface` for a dialog that only ever
190
+ * light-dismisses.
168
191
  */
169
- declare function PinnablePopoverSurface({ id, label, describedBy, children, headerActions, presentation, pinned, size, preferredWidth, height, maxHeight, viewportGutter, bodyLayout, resizeFromBottom, pinLabel, closeLabel, moveDescription, rootAttributes, className, slot, }: PinnablePopoverSurfaceProps): kerfjs.SafeHtml;
192
+ declare function PinnablePopoverSurface({ id, label, describedBy, children, headerActions, presentation, pinned, size, preferredWidth, height, minHeight, maxHeight, viewportGutter, bodyLayout, bodyInset, resizeFromBottom, pinnable, closable, pinLabel, closeLabel, moveDescription, rootAttributes, className, slot, }: PinnablePopoverSurfaceProps): kerfjs.SafeHtml;
170
193
 
171
194
  type PopupSurfaceInset = 'none' | 'compact' | 'default' | /** @deprecated Use default. */ 'standard' | /** @deprecated Use none. */ 'list-zero';
172
195
  interface PopupSurfaceProps {
@@ -208,7 +231,10 @@ interface PinnablePopoverOptions {
208
231
  * surface. Without one, a transient surface opens centered.
209
232
  */
210
233
  anchor?: Element | (() => Element | null);
211
- /** Start pinned, as the application last stored it. */
234
+ /**
235
+ * Start pinned, as the application last stored it. A persistent surface
236
+ * (`pinnable={false}`) is always pinned and ignores this.
237
+ */
212
238
  pinned?: boolean;
213
239
  /** Placement and size to restore; transient surfaces ignore x and y. */
214
240
  placement?: PinnablePopoverPlacement;
@@ -216,6 +242,12 @@ interface PinnablePopoverOptions {
216
242
  step?: number;
217
243
  /** A Shift+arrow move, in px (default 40). */
218
244
  largeStep?: number;
245
+ /**
246
+ * Whether Escape, with focus inside the pinned surface, closes it. Default:
247
+ * `true` unless the surface was rendered `closable={false}`, whose
248
+ * visibility belongs to an application control.
249
+ */
250
+ closeOnEscape?: boolean;
219
251
  /**
220
252
  * Called when the person (or `pinPopover`) pins, unpins, moves, or resizes
221
253
  * the surface. A clamp after a window resize is not reported: the surface
@@ -229,7 +261,8 @@ declare function isPopoverPinned(surface: HTMLElement): boolean;
229
261
  * Pin (or, with `false`, unpin) a wired PinnablePopoverSurface, as its
230
262
  * header Pin toggle does. Pinned, it no longer closes on a press outside
231
263
  * and keeps where it is; unpinned, it returns below its anchor. Reported
232
- * through `onChange`. Does nothing to a surface that is not wired.
264
+ * through `onChange`. Does nothing to a surface that is not wired, and a
265
+ * persistent (`pinnable={false}`) surface never unpins.
233
266
  */
234
267
  declare function pinPopover(surface: HTMLElement, pinned?: boolean): void;
235
268
  /**
@@ -239,10 +272,12 @@ declare function pinPopover(surface: HTMLElement, pinned?: boolean): void;
239
272
  * (Shift for `largeStep`) moving it, which pins it; resizing without changing
240
273
  * pin state; and a clamp inside the viewport gutter, kept after a window
241
274
  * resize. Pinned, it closes only by Escape (with focus inside it), its Close
242
- * button, or `hidePopover()`. The state survives application re-renders and
275
+ * button, or `hidePopover()`. A persistent surface (`pinnable={false}`) is
276
+ * always pinned; with `closable={false}` only the application closes it,
277
+ * unless `closeOnEscape` is set. The state survives application re-renders and
243
278
  * closing; `onChange` reports it for the application to store. An
244
279
  * `embedded` surface is left alone. Returns a disposer.
245
280
  */
246
281
  declare function wirePinnablePopover(surface: HTMLElement, options?: PinnablePopoverOptions): () => void;
247
282
 
248
- export { DialogSurfaceBodyLayout, DialogSurfaceHeight, DialogSurfaceMaxHeight, DialogSurfaceSize, type PinnablePopoverChange, type PinnablePopoverChangeReason, type PinnablePopoverOptions, type PinnablePopoverPlacement, PinnablePopoverSurface, type PinnablePopoverSurfacePresentation, type PinnablePopoverSurfaceProps, PopoverDialogSurface, type PopoverDialogSurfaceDataAttributes, type PopoverDialogSurfaceDismiss, type PopoverDialogSurfacePresentation, type PopoverDialogSurfaceProps, PopupSurface, type PopupSurfaceInset, type PopupSurfaceProps, type SurfacePresentation, isPopoverPinned, pinPopover, wirePinnablePopover };
283
+ export { DialogSurfaceBodyLayout, DialogSurfaceHeight, DialogSurfaceMaxHeight, DialogSurfaceSize, type PinnablePopoverChange, type PinnablePopoverChangeReason, type PinnablePopoverOptions, type PinnablePopoverPlacement, PinnablePopoverSurface, type PinnablePopoverSurfacePresentation, type PinnablePopoverSurfaceProps, PopoverDialogSurface, type PopoverDialogSurfaceDataAttributes, type PopoverDialogSurfaceDismiss, type PopoverDialogSurfacePresentation, type PopoverDialogSurfaceProps, PopupSurface, type PopupSurfaceInset, type PopupSurfaceProps, SurfaceInset, type SurfacePresentation, isPopoverPinned, pinPopover, wirePinnablePopover };
@@ -1,5 +1,5 @@
1
- export { DialogSurface, PinnablePopoverSurface, PopoverDialogSurface, PopupSurface, isPopoverPinned, pinPopover, wirePinnablePopover } from './chunk-IMXLOMTF.js';
2
- export { closeDialog, openDialog, syncDialogStack, wireDialogStack } from './chunk-UQ4FRQ6M.js';
1
+ export { DialogSurface, PinnablePopoverSurface, PopoverDialogSurface, PopupSurface, isPopoverPinned, pinPopover, wirePinnablePopover } from './chunk-76BLSFEA.js';
2
+ export { closeDialog, openDialog, syncDialogStack, wireDialogStack } from './chunk-R4JK2C6D.js';
3
3
 
4
4
 
5
5
 
@@ -161,6 +161,9 @@ interface ToolbarControlGroupProps {
161
161
  expandedOverflow?: ToolbarControlGroupExpandedOverflow;
162
162
  /**
163
163
  * Responsive visibility owned by the enclosing Toolbar container.
164
+ * `yield-to-expanded-sibling` hides this group in a 480px-or-narrower
165
+ * Toolbar while another group in any of its zones is expanded, including
166
+ * a group relocated there from a collapsed panel.
164
167
  * `yield-to-priority-row` hides this trailing group exactly while its
165
168
  * Toolbar's `responsive="trailing-priority"` row is active (an expanded
166
169
  * trailing sibling at the Toolbar's `responsiveAt` width), so the app never
@@ -177,7 +180,13 @@ interface ToolbarControlGroupProps {
177
180
  placement?: ToolbarControlGroupPlacement;
178
181
  /** CSS length used as the minimum width and flex basis for `sizing="grow"`; defaults to 19rem. */
179
182
  growBasis?: string;
180
- /** Move this group into the work-area toolbar when its panel collapses. */
183
+ /**
184
+ * Move this group into the work-area toolbar when its panel collapses.
185
+ * A labeled relocatable group is keyed by its `label` (a `data-key`
186
+ * `rootAttributes` overrides it), so it keeps its DOM node, and a focused
187
+ * control keeps focus, when the relocated set changes around it. Give
188
+ * relocatable groups in one panel distinct labels.
189
+ */
181
190
  relocateOnCollapse?: boolean;
182
191
  /** Add contrast behind photo-backed avatar content. */
183
192
  scrim?: boolean;
@@ -1,4 +1,4 @@
1
- export { ToolbarActionLink, ToolbarButton, ToolbarControlGroup } from './chunk-5A2DN3LR.js';
1
+ export { ToolbarActionLink, ToolbarButton, ToolbarControlGroup } from './chunk-SGYBIKQA.js';
2
2
 
3
3
 
4
4
 
@@ -13,6 +13,12 @@ interface TreeListProps {
13
13
  nodes: readonly TreeListNode[];
14
14
  /** Ids of the expanded nodes. The application owns this state. */
15
15
  expanded: ReadonlySet<string> | readonly string[];
16
+ /**
17
+ * Reuse unchanged rows through native keyed reconciliation. Keep node objects
18
+ * immutable and stable. Use only outside an enclosing each() row render.
19
+ * Default false preserves ordinary markup composition, including nested lists.
20
+ */
21
+ keyedRows?: boolean;
16
22
  /** The selected node's id. */
17
23
  selected?: string;
18
24
  /** Delegated action for choosing a row; the row's `data-item-id` names it. */
@@ -37,6 +43,6 @@ interface TreeListProps {
37
43
  * which is selected, and handles `action` and `toggleAction`. Wire keyboard
38
44
  * navigation with `wireTreeList`.
39
45
  */
40
- declare function TreeList({ id, label, nodes, expanded, selected, action, toggleAction, density, className, rootAttributes, slot, }: TreeListProps): kerfjs.SafeHtml;
46
+ declare function TreeList({ id, label, nodes, expanded, selected, action, toggleAction, density, keyedRows, className, rootAttributes, slot, }: TreeListProps): kerfjs.SafeHtml;
41
47
 
42
48
  export { TreeList, TreeListNode, type TreeListProps };
package/dist/tree-list.js CHANGED
@@ -1,4 +1,4 @@
1
- export { TreeList } from './chunk-GQUDCWOD.js';
1
+ export { TreeList } from './chunk-D2KHQNJ6.js';
2
2
  export { isExpandable, moveTreeListNode, treeListPath, treeListRows } from './chunk-7U65KLDL.js';
3
3
 
4
4
 
@@ -0,0 +1,9 @@
1
+ import { SafeHtml } from 'kerfjs';
2
+
3
+ /**
4
+ * Preserve component prop inference behind a curried call boundary. Rollup's
5
+ * effect analysis stays linear through large generated component trees.
6
+ */
7
+ declare function kuiComponent<P>(component: (props: P) => SafeHtml): (props: P) => SafeHtml;
8
+
9
+ export { kuiComponent };
@@ -0,0 +1,8 @@
1
+ // src/view-runtime/kui-component.ts
2
+ function kuiComponent(component) {
3
+ return (props) => component(props);
4
+ }
5
+
6
+ export { kuiComponent };
7
+
8
+ //# sourceMappingURL=view-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/view-runtime/kui-component.ts"],"names":[],"mappings":";AAMO,SAAS,aACd,SAAA,EACwB;AACxB,EAAA,OAAO,CAAC,KAAA,KAAU,SAAA,CAAU,KAAK,CAAA;AACnC","file":"view-runtime.js","sourcesContent":["import type { SafeHtml } from 'kerfjs';\n\n/**\n * Preserve component prop inference behind a curried call boundary. Rollup's\n * effect analysis stays linear through large generated component trees.\n */\nexport function kuiComponent<P>(\n component: (props: P) => SafeHtml,\n): (props: P) => SafeHtml {\n return (props) => component(props);\n}\n"]}
@@ -10,10 +10,10 @@ import './anchor-name-BZ1rpxaw.js';
10
10
  import './css-values.js';
11
11
  import './surface-tint-DQgYCaP9.js';
12
12
  import './workbench.js';
13
- import './nav-stack-vQ3ieerq.js';
13
+ import './nav-stack-DKrvqFjA.js';
14
14
  import './list.js';
15
15
  import './flex-alignment-4ms8ZbV8.js';
16
- import './panel-toolbar-vg6Ir5Dy.js';
16
+ import './panel-toolbar-CEcHHDkn.js';
17
17
  import './lucide-icon.js';
18
18
  import 'lucide';
19
19
  import './toolbar-text.js';
@@ -1,4 +1,4 @@
1
- import { wireWorkbench } from './chunk-OHT2AXER.js';
1
+ import { wireWorkbench } from './chunk-QSJAIXLM.js';
2
2
 
3
3
  import { wireScrollDividers } from './chunk-M64TAGZY.js';
4
4
 
@@ -1,4 +1,4 @@
1
- export { wireSearchFields } from './chunk-IR32NI2O.js';
1
+ export { wireSearchFields } from './chunk-ALBFHXMZ.js';
2
2
 
3
3
 
4
4
 
@@ -31,6 +31,16 @@ interface TabBarFit {
31
31
  trailingWidth: number;
32
32
  /** Width of the `end` zone, 0 without one. */
33
33
  endWidth: number;
34
+ /** Inline room inside the bar's padding: what its zones share. */
35
+ barWidth: number;
36
+ /**
37
+ * Room the bar leaves unused between its packed zones (leading, tabs,
38
+ * trailing) and the `end` zone, or the bar's end edge without one. Under
39
+ * `trailingPlacement="adjacent"` the strip is only as wide as its tabs, so
40
+ * this is the room an `end` action can grow into; with the default
41
+ * placement the strip absorbs the room and this stays near 0.
42
+ */
43
+ endFree: number;
34
44
  }
35
45
 
36
46
  type TabReorderSource = 'pointer' | 'keyboard';
@@ -1,3 +1,3 @@
1
- export { reorderTabs, wireTabBars } from './chunk-3ZWYGGEC.js';
1
+ export { reorderTabs, wireTabBars } from './chunk-ASU4ODOH.js';
2
2
 
3
3
  //# sourceMappingURL=wire-tab-bars.js.map
@@ -1,4 +1,4 @@
1
- export { wireTagFields } from './chunk-DBCDYBZP.js';
1
+ export { wireTagFields } from './chunk-HHEBNP6Z.js';
2
2
 
3
3
 
4
4