@kerfjs/ui 5.0.0-beta.18 → 5.0.0-beta.21

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 (137) hide show
  1. package/README.md +114 -3
  2. package/ai/application-ui-diagnostic-ids-v1.json +92 -0
  3. package/ai/application-ui-profile-sync.cjs +529 -0
  4. package/ai/application-ui-profile.d.mts +1 -0
  5. package/ai/application-ui-profile.d.ts +102 -0
  6. package/ai/application-ui-profile.defaults.json +41 -0
  7. package/ai/application-ui-profile.mjs +626 -0
  8. package/ai/application-ui-profile.schema.json +130 -0
  9. package/ai/catalog-authoring.json +25 -0
  10. package/ai/catalog-authoring.schema.json +61 -0
  11. package/ai/compile-time-contracts-v1.json +101 -0
  12. package/ai/compile-time-contracts-v1.schema.json +49 -0
  13. package/ai/component-catalog-extension-v2.d.ts +7 -0
  14. package/ai/component-catalog-extension-v2.schema.json +7 -0
  15. package/ai/component-catalog-v2-overrides.json +326 -0
  16. package/ai/component-catalog-v2.d.ts +67 -0
  17. package/ai/component-catalog-v2.json +4441 -0
  18. package/ai/component-catalog-v2.schema.json +246 -0
  19. package/ai/component-catalog.json +150 -6
  20. package/ai/public-api-signatures-v1.md +294 -64
  21. package/ai/skill.md +41 -5
  22. package/ai/webawesome-jsx-signatures-v1.md +1 -1
  23. package/analyzer/cli.mjs +46 -0
  24. package/analyzer/index.d.mts +45 -0
  25. package/analyzer/index.mjs +743 -0
  26. package/analyzer/report.schema.json +66 -0
  27. package/dist/browser/pane.js +3 -0
  28. package/dist/browser/sunken-panel.js +3 -0
  29. package/dist/catalog-resources.d.ts +34 -0
  30. package/dist/catalog-resources.js +22 -0
  31. package/dist/catalog-resources.js.map +1 -0
  32. package/dist/catalog.d.ts +21 -3
  33. package/dist/catalog.js +239 -210
  34. package/dist/catalog.js.map +1 -1
  35. package/dist/{chunk-ZK2G3VR5.js → chunk-5VTB2BKP.js} +1 -1
  36. package/dist/chunk-5VTB2BKP.js.map +1 -0
  37. package/dist/{chunk-S3HKPI7I.js → chunk-7KEUJIIC.js} +1 -1
  38. package/dist/chunk-7KEUJIIC.js.map +1 -0
  39. package/dist/{chunk-NVWXKU37.js → chunk-AASLYRGE.js} +1 -1
  40. package/dist/chunk-AASLYRGE.js.map +1 -0
  41. package/dist/{chunk-ENVTNLYC.js → chunk-CN2XNTAM.js} +6 -6
  42. package/dist/chunk-CN2XNTAM.js.map +1 -0
  43. package/dist/{chunk-QIRXYKCE.js → chunk-DSNIYOZ3.js} +3 -2
  44. package/dist/chunk-DSNIYOZ3.js.map +1 -0
  45. package/dist/chunk-JRKSK2HX.js +79 -0
  46. package/dist/chunk-JRKSK2HX.js.map +1 -0
  47. package/dist/{chunk-U5IFGQCD.js → chunk-K57KRAOV.js} +1 -1
  48. package/dist/chunk-K57KRAOV.js.map +1 -0
  49. package/dist/{chunk-ZVI5YST2.js → chunk-M7JBER5U.js} +1 -1
  50. package/dist/chunk-M7JBER5U.js.map +1 -0
  51. package/dist/{chunk-43FUQH35.js → chunk-OHU6CI22.js} +2 -2
  52. package/dist/{chunk-43FUQH35.js.map → chunk-OHU6CI22.js.map} +1 -1
  53. package/dist/{chunk-4TRDV6RL.js → chunk-OZWU5ZPZ.js} +1 -1
  54. package/dist/chunk-OZWU5ZPZ.js.map +1 -0
  55. package/dist/{chunk-JTHUXDN2.js → chunk-RYRIFZCT.js} +3 -3
  56. package/dist/chunk-RYRIFZCT.js.map +1 -0
  57. package/dist/{chunk-6ETZKKAE.js → chunk-VLYV65LK.js} +1 -1
  58. package/dist/chunk-VLYV65LK.js.map +1 -0
  59. package/dist/chunk-W4CXQYSG.js +23 -0
  60. package/dist/chunk-W4CXQYSG.js.map +1 -0
  61. package/dist/{chunk-S3PCZ7NV.js → chunk-W7YD6E4N.js} +1 -1
  62. package/dist/chunk-W7YD6E4N.js.map +1 -0
  63. package/dist/index.d.ts +6 -4
  64. package/dist/index.js +14 -12
  65. package/dist/list-header.d.ts +29 -8
  66. package/dist/list-header.js +1 -1
  67. package/dist/nav-stack.js +1 -1
  68. package/dist/pane.d.ts +49 -0
  69. package/dist/pane.js +4 -0
  70. package/dist/pane.js.map +1 -0
  71. package/dist/panel-header.d.ts +9 -3
  72. package/dist/panel-header.js +1 -1
  73. package/dist/segmented-control.d.ts +6 -6
  74. package/dist/segmented-control.js +1 -1
  75. package/dist/select.d.ts +10 -4
  76. package/dist/select.js +1 -1
  77. package/dist/split-view.js +2 -2
  78. package/dist/state-banner.d.ts +3 -2
  79. package/dist/state-banner.js +1 -1
  80. package/dist/styles/catalog.css +6 -6
  81. package/dist/styles/layout.css +2 -20
  82. package/dist/styles/pane.css +62 -0
  83. package/dist/styles/segmented-control.css +3 -7
  84. package/dist/styles/sunken-panel.css +18 -0
  85. package/dist/sunken-panel.d.ts +16 -0
  86. package/dist/sunken-panel.js +3 -0
  87. package/dist/sunken-panel.js.map +1 -0
  88. package/dist/tab-bar.d.ts +3 -2
  89. package/dist/tab-bar.js +1 -1
  90. package/dist/tab-scaffold.d.ts +6 -6
  91. package/dist/tab-scaffold.js.map +1 -1
  92. package/dist/token-search-field.d.ts +25 -9
  93. package/dist/token-search-field.js +1 -1
  94. package/dist/toolbar-control-group.d.ts +9 -5
  95. package/dist/toolbar-control-group.js +1 -1
  96. package/dist/toolbar-text.d.ts +10 -11
  97. package/dist/toolbar-text.js +1 -1
  98. package/dist/wire-tab-bars.d.ts +5 -2
  99. package/dist/wire-tab-bars.js +1 -1
  100. package/dist/wire-token-search-fields.d.ts +11 -6
  101. package/dist/wire-token-search-fields.js +1 -1
  102. package/docs/catalog.md +186 -67
  103. package/docs/component-contract.md +102 -5
  104. package/docs/component-selection.md +9 -5
  105. package/docs/design-philosophy.md +2 -4
  106. package/docs/examples/application-ui-profile.json +60 -0
  107. package/docs/examples/component-catalog-extension-v2.json +81 -0
  108. package/docs/layout.md +42 -23
  109. package/docs/sunken-panel.md +43 -0
  110. package/docs/type-contracts.md +99 -0
  111. package/docs/ui-analyzer.md +81 -0
  112. package/docs/ui-doctor.md +77 -0
  113. package/docs/ui-evaluator.md +122 -0
  114. package/doctor/cli.mjs +115 -0
  115. package/doctor/config.schema.json +68 -0
  116. package/doctor/index.d.mts +116 -0
  117. package/doctor/index.mjs +1256 -0
  118. package/doctor/report.schema.json +118 -0
  119. package/evaluator/cli.mjs +89 -0
  120. package/evaluator/index.d.mts +90 -0
  121. package/evaluator/index.mjs +1138 -0
  122. package/evaluator/report.schema.json +152 -0
  123. package/llms.txt +40 -3
  124. package/package.json +66 -8
  125. package/ux-demo/recipes/compact-toolbar.tsx +2 -2
  126. package/ux-demo/recipes/composer-form.tsx +1 -1
  127. package/dist/chunk-4TRDV6RL.js.map +0 -1
  128. package/dist/chunk-6ETZKKAE.js.map +0 -1
  129. package/dist/chunk-ENVTNLYC.js.map +0 -1
  130. package/dist/chunk-JTHUXDN2.js.map +0 -1
  131. package/dist/chunk-NVWXKU37.js.map +0 -1
  132. package/dist/chunk-QIRXYKCE.js.map +0 -1
  133. package/dist/chunk-S3HKPI7I.js.map +0 -1
  134. package/dist/chunk-S3PCZ7NV.js.map +0 -1
  135. package/dist/chunk-U5IFGQCD.js.map +0 -1
  136. package/dist/chunk-ZK2G3VR5.js.map +0 -1
  137. package/dist/chunk-ZVI5YST2.js.map +0 -1
@@ -0,0 +1,326 @@
1
+ {
2
+ "@kerfjs/ui:toolbar": {
3
+ "_source": "docs/component-selection.md#toolbar-composition",
4
+ "contexts": ["application-chrome", "panel-header"],
5
+ "zones": [
6
+ {
7
+ "id": "leading",
8
+ "accepts": ["toolbar-text", "toolbar-control-group"],
9
+ "cardinality": { "min": 0, "max": "unbounded" },
10
+ "exclusiveWith": []
11
+ },
12
+ {
13
+ "id": "center",
14
+ "accepts": ["toolbar-text", "toolbar-control-group"],
15
+ "cardinality": { "min": 0, "max": "unbounded" },
16
+ "exclusiveWith": []
17
+ },
18
+ {
19
+ "id": "trailing",
20
+ "accepts": ["toolbar-text", "toolbar-control-group"],
21
+ "cardinality": { "min": 0, "max": "unbounded" },
22
+ "exclusiveWith": []
23
+ }
24
+ ],
25
+ "children": {
26
+ "mode": "listed",
27
+ "concepts": ["toolbar-text", "toolbar-control-group"],
28
+ "requiredConcepts": []
29
+ },
30
+ "diagnostics": [
31
+ {
32
+ "id": "KUI-C101",
33
+ "severity": "error",
34
+ "when": "a direct zone child is neither ToolbarText nor ToolbarControlGroup",
35
+ "message": "Wrap toolbar controls in ToolbarControlGroup; only ToolbarText and ToolbarControlGroup are direct zone children."
36
+ }
37
+ ]
38
+ },
39
+ "@kerfjs/ui:toolbar-control-group": {
40
+ "_source": "docs/component-selection.md#toolbar-composition",
41
+ "parents": {
42
+ "mode": "listed",
43
+ "entries": ["@kerfjs/ui:toolbar", "@kerfjs/ui:panel-header"]
44
+ },
45
+ "contexts": ["toolbar-zone"],
46
+ "zones": [
47
+ {
48
+ "id": "controls",
49
+ "accepts": ["control"],
50
+ "cardinality": { "min": 1, "max": "unbounded" },
51
+ "exclusiveWith": []
52
+ }
53
+ ],
54
+ "children": {
55
+ "mode": "listed",
56
+ "concepts": ["control"],
57
+ "requiredConcepts": ["control"]
58
+ }
59
+ },
60
+ "@kerfjs/ui:panel-header": {
61
+ "_source": "docs/component-selection.md#problem-to-component-matrix",
62
+ "contexts": ["page-header", "panel-header", "dialog-header"],
63
+ "zones": [
64
+ {
65
+ "id": "title",
66
+ "accepts": ["text"],
67
+ "cardinality": { "min": 1, "max": 1 },
68
+ "exclusiveWith": []
69
+ },
70
+ {
71
+ "id": "subtitle",
72
+ "accepts": ["text"],
73
+ "cardinality": { "min": 0, "max": 1 },
74
+ "exclusiveWith": []
75
+ },
76
+ {
77
+ "id": "controls",
78
+ "accepts": ["control"],
79
+ "cardinality": { "min": 0, "max": "unbounded" },
80
+ "exclusiveWith": []
81
+ }
82
+ ],
83
+ "state": [
84
+ { "id": "placeholder", "owner": "controlled", "required": false }
85
+ ],
86
+ "diagnostics": [
87
+ {
88
+ "id": "KUI-C102",
89
+ "severity": "error",
90
+ "when": "the title is absent",
91
+ "message": "PanelHeader requires a title that names its page, panel, or dialog."
92
+ }
93
+ ]
94
+ },
95
+ "@kerfjs/ui:list": {
96
+ "_source": "docs/component-selection.md#correct-composition-and-duplicated-markup-trap",
97
+ "contexts": ["navigation-list"],
98
+ "children": {
99
+ "mode": "listed",
100
+ "concepts": ["list-header", "list-item", "list-action-row"],
101
+ "requiredConcepts": []
102
+ },
103
+ "zones": [
104
+ {
105
+ "id": "rows",
106
+ "accepts": ["list-header", "list-item", "list-action-row"],
107
+ "cardinality": { "min": 1, "max": "unbounded" },
108
+ "exclusiveWith": []
109
+ }
110
+ ]
111
+ },
112
+ "@kerfjs/ui:list-header": {
113
+ "_source": "docs/accessibility.md#shared-rules",
114
+ "contexts": ["navigation-list"],
115
+ "state": [{ "id": "expanded", "owner": "controlled", "required": false }],
116
+ "accessibility": {
117
+ "obligations": [
118
+ "When toggle mode is used, the application reveals matching content and keeps expanded state synchronized.",
119
+ "The owning control retains a stable accessible name."
120
+ ]
121
+ },
122
+ "diagnostics": [
123
+ {
124
+ "id": "KUI-C103",
125
+ "severity": "error",
126
+ "when": "toggle mode does not reveal matching controlled content",
127
+ "message": "ListHeader expanded state must match real revealed content."
128
+ }
129
+ ]
130
+ },
131
+ "@kerfjs/ui:tab-bar": {
132
+ "_source": "docs/accessibility.md#tabs",
133
+ "contexts": ["tabpanel-navigation"],
134
+ "children": {
135
+ "mode": "listed",
136
+ "concepts": ["app-tab"],
137
+ "requiredConcepts": ["app-tab"]
138
+ },
139
+ "zones": [
140
+ {
141
+ "id": "tabs",
142
+ "accepts": ["app-tab"],
143
+ "cardinality": { "min": 1, "max": "unbounded" },
144
+ "exclusiveWith": []
145
+ }
146
+ ],
147
+ "state": [
148
+ { "id": "selected-tab", "owner": "controlled", "required": true }
149
+ ],
150
+ "wiring": {
151
+ "required": true,
152
+ "helpers": ["wireTabBars"],
153
+ "obligations": [
154
+ "Retain and invoke the disposer.",
155
+ "Apply onReorder to application-owned order."
156
+ ]
157
+ },
158
+ "accessibility": {
159
+ "obligations": [
160
+ "Each tab controls a matching tabpanel.",
161
+ "Selection and focus behavior follow the configured activation mode."
162
+ ]
163
+ },
164
+ "diagnostics": [
165
+ {
166
+ "id": "KUI-C104",
167
+ "severity": "error",
168
+ "when": "wireTabBars is absent",
169
+ "message": "TabBar requires wireTabBars for keyboard and reorder behavior."
170
+ }
171
+ ]
172
+ },
173
+ "@kerfjs/ui:segmented-control": {
174
+ "_source": "docs/accessibility.md#segmentedcontrol",
175
+ "contexts": ["compact-exclusive-choice"],
176
+ "state": [{ "id": "value", "owner": "controlled", "required": true }],
177
+ "accessibility": {
178
+ "obligations": [
179
+ "Every enabled choice remains in sequential tab order.",
180
+ "Every choice has a meaningful label."
181
+ ]
182
+ }
183
+ },
184
+ "@kerfjs/ui:token-search-field": {
185
+ "_source": "docs/accessibility.md#tokensearchfield",
186
+ "contexts": ["structured-search-editor"],
187
+ "state": [
188
+ { "id": "tokens", "owner": "controlled", "required": true },
189
+ { "id": "text", "owner": "component", "required": true },
190
+ { "id": "expanded", "owner": "controlled", "required": false }
191
+ ],
192
+ "wiring": {
193
+ "required": true,
194
+ "helpers": ["wireTokenSearchFields"],
195
+ "obligations": [
196
+ "Retain and invoke the disposer.",
197
+ "Use readTokenSearchField for DOM-owned text."
198
+ ]
199
+ },
200
+ "diagnostics": [
201
+ {
202
+ "id": "KUI-C105",
203
+ "severity": "error",
204
+ "when": "wireTokenSearchFields is absent",
205
+ "message": "TokenSearchField requires its public wiring helper for keyboard and collapsible behavior."
206
+ }
207
+ ]
208
+ },
209
+ "@kerfjs/ui:resize": {
210
+ "_source": "docs/accessibility.md#resizableregion",
211
+ "contexts": ["adjustable-pane-boundary"],
212
+ "state": [{ "id": "size", "owner": "controlled", "required": true }],
213
+ "wiring": {
214
+ "required": true,
215
+ "helpers": ["wireResizableRegions"],
216
+ "obligations": [
217
+ "Retain and invoke the disposer.",
218
+ "Persist committed size in the application when persistence is required."
219
+ ]
220
+ },
221
+ "diagnostics": [
222
+ {
223
+ "id": "KUI-C106",
224
+ "severity": "error",
225
+ "when": "wireResizableRegions is absent",
226
+ "message": "ResizableRegion requires wireResizableRegions for pointer and keyboard operation."
227
+ }
228
+ ]
229
+ },
230
+ "@kerfjs/ui:select": {
231
+ "_source": "README.md#web-awesome-theme",
232
+ "contexts": ["controlled-value-selection"],
233
+ "state": [{ "id": "value", "owner": "controlled", "required": true }],
234
+ "wiring": {
235
+ "required": true,
236
+ "helpers": ["@kerfjs/ui/select/register"],
237
+ "obligations": ["Import the registration module once in the application."]
238
+ },
239
+ "diagnostics": [
240
+ {
241
+ "id": "KUI-C107",
242
+ "severity": "error",
243
+ "when": "the registration import is absent",
244
+ "message": "Select requires @kerfjs/ui/select/register once per application."
245
+ }
246
+ ]
247
+ },
248
+ "@kerfjs/ui:wa-accordion": {
249
+ "_source": "docs/webawesome-theme.md#coverage",
250
+ "children": {
251
+ "mode": "listed",
252
+ "concepts": ["wa-accordion-item"],
253
+ "requiredConcepts": ["wa-accordion-item"]
254
+ },
255
+ "zones": [
256
+ {
257
+ "id": "items",
258
+ "accepts": ["wa-accordion-item"],
259
+ "cardinality": { "min": 1, "max": "unbounded" },
260
+ "exclusiveWith": []
261
+ }
262
+ ]
263
+ },
264
+ "@kerfjs/ui:wa-radio-group": {
265
+ "_source": "docs/webawesome-theme.md#coverage",
266
+ "children": {
267
+ "mode": "listed",
268
+ "concepts": ["wa-radio"],
269
+ "requiredConcepts": ["wa-radio"]
270
+ },
271
+ "zones": [
272
+ {
273
+ "id": "options",
274
+ "accepts": ["wa-radio"],
275
+ "cardinality": { "min": 1, "max": "unbounded" },
276
+ "exclusiveWith": []
277
+ }
278
+ ]
279
+ },
280
+ "@kerfjs/ui:wa-select": {
281
+ "_source": "docs/webawesome-theme.md#coverage",
282
+ "children": {
283
+ "mode": "listed",
284
+ "concepts": ["wa-option"],
285
+ "requiredConcepts": ["wa-option"]
286
+ },
287
+ "zones": [
288
+ {
289
+ "id": "options",
290
+ "accepts": ["wa-option"],
291
+ "cardinality": { "min": 1, "max": "unbounded" },
292
+ "exclusiveWith": []
293
+ }
294
+ ]
295
+ },
296
+ "@kerfjs/ui:wa-tab-group": {
297
+ "_source": "docs/webawesome-theme.md#coverage",
298
+ "children": {
299
+ "mode": "listed",
300
+ "concepts": ["wa-tab", "wa-tab-panel"],
301
+ "requiredConcepts": ["wa-tab", "wa-tab-panel"]
302
+ },
303
+ "zones": [
304
+ {
305
+ "id": "tabs",
306
+ "accepts": ["wa-tab"],
307
+ "cardinality": { "min": 1, "max": "unbounded" },
308
+ "exclusiveWith": []
309
+ },
310
+ {
311
+ "id": "panels",
312
+ "accepts": ["wa-tab-panel"],
313
+ "cardinality": { "min": 1, "max": "unbounded" },
314
+ "exclusiveWith": []
315
+ }
316
+ ],
317
+ "diagnostics": [
318
+ {
319
+ "id": "KUI-C108",
320
+ "severity": "error",
321
+ "when": "tab and panel name sets differ",
322
+ "message": "Every wa-tab must identify a matching wa-tab-panel and vice versa."
323
+ }
324
+ ]
325
+ }
326
+ }
@@ -0,0 +1,67 @@
1
+ export type CatalogQualifiedKey = `${string}:${string}`;
2
+ export type CatalogCardinality = {
3
+ min: number;
4
+ max: number | 'unbounded';
5
+ };
6
+ export type CatalogDiagnostic = {
7
+ id: `KUI-C${number}`;
8
+ severity: 'error' | 'warning';
9
+ when: string;
10
+ message: string;
11
+ };
12
+ export interface CatalogCompositionEntryV2 {
13
+ key: CatalogQualifiedKey;
14
+ package: string;
15
+ id: string;
16
+ name: string;
17
+ kind: 'component' | 'composition' | 'recipe';
18
+ purpose?: string;
19
+ publicExports?: Array<{ name: string; subpath: string }>;
20
+ sourceLinks?: string[];
21
+ source: string;
22
+ parents: { mode: 'any' | 'root' | 'listed'; entries: CatalogQualifiedKey[] };
23
+ contexts: string[];
24
+ zones: Array<{
25
+ id: string;
26
+ accepts: string[];
27
+ cardinality: CatalogCardinality;
28
+ exclusiveWith: string[];
29
+ }>;
30
+ children: {
31
+ mode: 'any' | 'none' | 'listed';
32
+ concepts: string[];
33
+ requiredConcepts: string[];
34
+ };
35
+ state: Array<{
36
+ id: string;
37
+ owner: 'application' | 'controlled' | 'component';
38
+ required: boolean;
39
+ }>;
40
+ wiring: { required: boolean; helpers: string[]; obligations: string[] };
41
+ responsive: {
42
+ owner: 'application' | 'component' | 'shared' | 'not-applicable';
43
+ behaviors: string[];
44
+ };
45
+ layout: {
46
+ roles: string[];
47
+ geometry: Record<
48
+ 'margin' | 'border' | 'padding',
49
+ 'self' | 'parent' | 'child' | 'none' | 'conditional' | 'composed'
50
+ > & { notes?: string[] };
51
+ };
52
+ accessibility: { obligations: string[] };
53
+ boundaries: {
54
+ rootClass: string | null;
55
+ publicClasses: string[];
56
+ publicTokens: string[];
57
+ };
58
+ diagnostics: CatalogDiagnostic[];
59
+ provenance: { selection: string; composition: string };
60
+ }
61
+ export interface ComponentCatalogV2 {
62
+ $schema?: string;
63
+ schemaVersion: 2;
64
+ package: string;
65
+ compatibility: { v1Catalog: string; identity: 'package:id' };
66
+ entries: CatalogCompositionEntryV2[];
67
+ }