@kerfjs/ui 5.0.0-beta.18 → 5.0.0-beta.22
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.
- package/README.md +114 -3
- package/ai/application-ui-diagnostic-ids-v1.json +92 -0
- package/ai/application-ui-profile-sync.cjs +529 -0
- package/ai/application-ui-profile.d.mts +1 -0
- package/ai/application-ui-profile.d.ts +102 -0
- package/ai/application-ui-profile.defaults.json +41 -0
- package/ai/application-ui-profile.mjs +626 -0
- package/ai/application-ui-profile.schema.json +130 -0
- package/ai/catalog-authoring.json +25 -0
- package/ai/catalog-authoring.schema.json +61 -0
- package/ai/compile-time-contracts-v1.json +101 -0
- package/ai/compile-time-contracts-v1.schema.json +49 -0
- package/ai/component-catalog-extension-v2.d.ts +7 -0
- package/ai/component-catalog-extension-v2.schema.json +7 -0
- package/ai/component-catalog-v2-overrides.json +326 -0
- package/ai/component-catalog-v2.d.ts +67 -0
- package/ai/component-catalog-v2.json +4441 -0
- package/ai/component-catalog-v2.schema.json +246 -0
- package/ai/component-catalog.json +150 -6
- package/ai/public-api-signatures-v1.md +294 -64
- package/ai/skill.md +41 -5
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/analyzer/cli.mjs +46 -0
- package/analyzer/index.d.mts +45 -0
- package/analyzer/index.mjs +743 -0
- package/analyzer/report.schema.json +66 -0
- package/dist/browser/pane.js +3 -0
- package/dist/browser/sunken-panel.js +3 -0
- package/dist/catalog-resources.d.ts +34 -0
- package/dist/catalog-resources.js +22 -0
- package/dist/catalog-resources.js.map +1 -0
- package/dist/catalog.d.ts +21 -3
- package/dist/catalog.js +239 -210
- package/dist/catalog.js.map +1 -1
- package/dist/{chunk-ZK2G3VR5.js → chunk-5VTB2BKP.js} +1 -1
- package/dist/chunk-5VTB2BKP.js.map +1 -0
- package/dist/{chunk-S3HKPI7I.js → chunk-7KEUJIIC.js} +1 -1
- package/dist/chunk-7KEUJIIC.js.map +1 -0
- package/dist/{chunk-NVWXKU37.js → chunk-AASLYRGE.js} +1 -1
- package/dist/chunk-AASLYRGE.js.map +1 -0
- package/dist/{chunk-QIRXYKCE.js → chunk-DSNIYOZ3.js} +3 -2
- package/dist/chunk-DSNIYOZ3.js.map +1 -0
- package/dist/{chunk-ENVTNLYC.js → chunk-GP5DP5DL.js} +55 -15
- package/dist/chunk-GP5DP5DL.js.map +1 -0
- package/dist/chunk-JRKSK2HX.js +79 -0
- package/dist/chunk-JRKSK2HX.js.map +1 -0
- package/dist/{chunk-U5IFGQCD.js → chunk-K57KRAOV.js} +1 -1
- package/dist/chunk-K57KRAOV.js.map +1 -0
- package/dist/{chunk-ZVI5YST2.js → chunk-M7JBER5U.js} +1 -1
- package/dist/chunk-M7JBER5U.js.map +1 -0
- package/dist/{chunk-43FUQH35.js → chunk-OHU6CI22.js} +2 -2
- package/dist/{chunk-43FUQH35.js.map → chunk-OHU6CI22.js.map} +1 -1
- package/dist/{chunk-4TRDV6RL.js → chunk-OZWU5ZPZ.js} +1 -1
- package/dist/chunk-OZWU5ZPZ.js.map +1 -0
- package/dist/{chunk-JTHUXDN2.js → chunk-RYRIFZCT.js} +3 -3
- package/dist/chunk-RYRIFZCT.js.map +1 -0
- package/dist/{chunk-6ETZKKAE.js → chunk-VLYV65LK.js} +1 -1
- package/dist/chunk-VLYV65LK.js.map +1 -0
- package/dist/chunk-W4CXQYSG.js +23 -0
- package/dist/chunk-W4CXQYSG.js.map +1 -0
- package/dist/{chunk-S3PCZ7NV.js → chunk-W7YD6E4N.js} +1 -1
- package/dist/chunk-W7YD6E4N.js.map +1 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.js +14 -12
- package/dist/list-header.d.ts +29 -8
- package/dist/list-header.js +1 -1
- package/dist/nav-stack.js +1 -1
- package/dist/pane.d.ts +49 -0
- package/dist/pane.js +4 -0
- package/dist/pane.js.map +1 -0
- package/dist/panel-header.d.ts +9 -3
- package/dist/panel-header.js +1 -1
- package/dist/segmented-control.d.ts +6 -6
- package/dist/segmented-control.js +1 -1
- package/dist/select.d.ts +10 -4
- package/dist/select.js +1 -1
- package/dist/split-view.js +2 -2
- package/dist/state-banner.d.ts +3 -2
- package/dist/state-banner.js +1 -1
- package/dist/styles/catalog.css +6 -6
- package/dist/styles/layout.css +2 -20
- package/dist/styles/pane.css +62 -0
- package/dist/styles/segmented-control.css +3 -7
- package/dist/styles/sunken-panel.css +18 -0
- package/dist/sunken-panel.d.ts +16 -0
- package/dist/sunken-panel.js +3 -0
- package/dist/sunken-panel.js.map +1 -0
- package/dist/tab-bar.d.ts +3 -2
- package/dist/tab-bar.js +1 -1
- package/dist/tab-scaffold.d.ts +6 -6
- package/dist/tab-scaffold.js.map +1 -1
- package/dist/token-search-field.d.ts +25 -9
- package/dist/token-search-field.js +1 -1
- package/dist/toolbar-control-group.d.ts +9 -5
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar-text.d.ts +10 -11
- package/dist/toolbar-text.js +1 -1
- package/dist/wire-tab-bars.d.ts +5 -2
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-token-search-fields.d.ts +11 -6
- package/dist/wire-token-search-fields.js +1 -1
- package/docs/catalog.md +186 -67
- package/docs/component-contract.md +102 -5
- package/docs/component-selection.md +9 -5
- package/docs/design/templates/panel-header/icon-actions-dark.svg +1 -1
- package/docs/design/templates/panel-header/icon-actions.svg +1 -1
- package/docs/design/templates/panel-header/icon-summary-actions-dark.svg +1 -1
- package/docs/design/templates/panel-header/icon-summary-actions.svg +1 -1
- package/docs/design/templates/panel-header/no-icon-dark.svg +1 -1
- package/docs/design/templates/panel-header/no-icon.svg +1 -1
- package/docs/design/templates/panel-header/page-heading-dark.svg +1 -1
- package/docs/design/templates/panel-header/page-heading.svg +1 -1
- package/docs/design/templates/panel-header/title-only-dark.svg +1 -1
- package/docs/design/templates/panel-header/title-only.svg +1 -1
- package/docs/design/templates/panel-header-dark.svg +5 -5
- package/docs/design/templates/panel-header.svg +5 -5
- package/docs/design/templates/segmented-control/equal-dark.svg +1 -1
- package/docs/design/templates/segmented-control/equal.svg +1 -1
- package/docs/design/templates/segmented-control-dark.svg +1 -1
- package/docs/design/templates/segmented-control.svg +1 -1
- package/docs/design/templates/toolbar/title-and-actions-dark.svg +1 -1
- package/docs/design/templates/toolbar/title-and-actions.svg +1 -1
- package/docs/design/templates/toolbar-control-group/with-text-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group/with-text.svg +1 -1
- package/docs/design/templates/toolbar-control-group-dark.svg +1 -1
- package/docs/design/templates/toolbar-control-group.svg +1 -1
- package/docs/design/templates/toolbar-dark.svg +1 -1
- package/docs/design/templates/toolbar-text/default-dark.svg +1 -1
- package/docs/design/templates/toolbar-text/default.svg +1 -1
- package/docs/design/templates/toolbar-text/large-dark.svg +1 -1
- package/docs/design/templates/toolbar-text/large.svg +1 -1
- package/docs/design/templates/toolbar-text/small-dark.svg +1 -1
- package/docs/design/templates/toolbar-text/small.svg +1 -1
- package/docs/design/templates/toolbar-text-dark.svg +3 -3
- package/docs/design/templates/toolbar-text.svg +3 -3
- package/docs/design/templates/toolbar.svg +1 -1
- package/docs/design/templates.md +11 -6
- package/docs/design-philosophy.md +2 -4
- package/docs/examples/application-ui-profile.json +60 -0
- package/docs/examples/component-catalog-extension-v2.json +81 -0
- package/docs/layout.md +42 -23
- package/docs/sunken-panel.md +43 -0
- package/docs/type-contracts.md +99 -0
- package/docs/ui-analyzer.md +81 -0
- package/docs/ui-doctor.md +77 -0
- package/docs/ui-evaluator.md +122 -0
- package/doctor/cli.mjs +115 -0
- package/doctor/config.schema.json +68 -0
- package/doctor/index.d.mts +116 -0
- package/doctor/index.mjs +1256 -0
- package/doctor/report.schema.json +118 -0
- package/evaluator/cli.mjs +89 -0
- package/evaluator/index.d.mts +90 -0
- package/evaluator/index.mjs +1138 -0
- package/evaluator/report.schema.json +152 -0
- package/llms.txt +40 -3
- package/package.json +66 -8
- package/ux-demo/recipes/compact-toolbar.tsx +2 -2
- package/ux-demo/recipes/composer-form.tsx +1 -1
- package/dist/chunk-4TRDV6RL.js.map +0 -1
- package/dist/chunk-6ETZKKAE.js.map +0 -1
- package/dist/chunk-ENVTNLYC.js.map +0 -1
- package/dist/chunk-JTHUXDN2.js.map +0 -1
- package/dist/chunk-NVWXKU37.js.map +0 -1
- package/dist/chunk-QIRXYKCE.js.map +0 -1
- package/dist/chunk-S3HKPI7I.js.map +0 -1
- package/dist/chunk-S3PCZ7NV.js.map +0 -1
- package/dist/chunk-U5IFGQCD.js.map +0 -1
- package/dist/chunk-ZK2G3VR5.js.map +0 -1
- package/dist/chunk-ZVI5YST2.js.map +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/brianwestphal/kerf/main/ui/analyzer/report.schema.json",
|
|
4
|
+
"title": "Kerf UI static analysis report",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"schemaVersion",
|
|
8
|
+
"tool",
|
|
9
|
+
"root",
|
|
10
|
+
"files",
|
|
11
|
+
"profile",
|
|
12
|
+
"diagnostics",
|
|
13
|
+
"summary"
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"schemaVersion": { "const": 1 },
|
|
17
|
+
"tool": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["name", "version"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"name": { "type": "string" },
|
|
22
|
+
"version": { "type": "integer" }
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
},
|
|
26
|
+
"root": { "type": "string" },
|
|
27
|
+
"files": { "type": "array", "items": { "type": "string" } },
|
|
28
|
+
"profile": { "type": "object" },
|
|
29
|
+
"diagnostics": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"required": ["ruleId", "severity", "message", "location"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"ruleId": { "pattern": "^KUI-L[0-9]{3}$" },
|
|
36
|
+
"severity": { "enum": ["error", "review"] },
|
|
37
|
+
"message": { "type": "string" },
|
|
38
|
+
"location": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"required": ["file", "line", "column"],
|
|
41
|
+
"properties": {
|
|
42
|
+
"file": { "type": "string" },
|
|
43
|
+
"line": { "type": "integer", "minimum": 1 },
|
|
44
|
+
"column": { "type": "integer", "minimum": 1 }
|
|
45
|
+
},
|
|
46
|
+
"additionalProperties": false
|
|
47
|
+
},
|
|
48
|
+
"evidence": {},
|
|
49
|
+
"chain": {}
|
|
50
|
+
},
|
|
51
|
+
"additionalProperties": false
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"summary": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"required": ["errors", "review", "suppressed"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"errors": { "type": "integer", "minimum": 0 },
|
|
59
|
+
"review": { "type": "integer", "minimum": 0 },
|
|
60
|
+
"suppressed": { "type": "integer", "minimum": 0 }
|
|
61
|
+
},
|
|
62
|
+
"additionalProperties": false
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CatalogResource } from './catalog.js';
|
|
2
|
+
import 'kerfjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Standard resource labels for a Kerf catalog detail footer. Keep these labels
|
|
6
|
+
* stable across catalogs so people and AI-generated integrations see the same
|
|
7
|
+
* choices in the same vocabulary.
|
|
8
|
+
*/
|
|
9
|
+
type CatalogResourceKind = 'demoSource' | 'componentSource' | 'designTemplate' | 'guidance' | 'integrationGuidance';
|
|
10
|
+
type CatalogGuidanceKind = 'guidance' | 'integrationGuidance';
|
|
11
|
+
interface CatalogResourceTarget {
|
|
12
|
+
href: string;
|
|
13
|
+
/** Optional monospace detail, normally the repository-relative source path. */
|
|
14
|
+
detail?: string;
|
|
15
|
+
}
|
|
16
|
+
interface CatalogResourcesInput {
|
|
17
|
+
/** Required source for the runnable demonstration. */
|
|
18
|
+
demoSource: CatalogResourceTarget;
|
|
19
|
+
/** Source for the production component; omit for recipes and integrations. */
|
|
20
|
+
componentSource?: CatalogResourceTarget;
|
|
21
|
+
/** Optional design-tool template associated with the component. */
|
|
22
|
+
designTemplate?: CatalogResourceTarget;
|
|
23
|
+
/** Required UI or integration guidance. */
|
|
24
|
+
guidance: CatalogResourceTarget;
|
|
25
|
+
/** Use `integrationGuidance` when the component implementation is upstream. */
|
|
26
|
+
guidanceKind?: CatalogGuidanceKind;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Build the standard catalog resource group in its canonical order: demo,
|
|
30
|
+
* component, optional design template, then guidance.
|
|
31
|
+
*/
|
|
32
|
+
declare function catalogResources(input: CatalogResourcesInput): CatalogResource[];
|
|
33
|
+
|
|
34
|
+
export { type CatalogGuidanceKind, type CatalogResourceKind, type CatalogResourceTarget, type CatalogResourcesInput, catalogResources };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/catalog-resources.ts
|
|
2
|
+
function catalogResources(input) {
|
|
3
|
+
const resources = [
|
|
4
|
+
{ label: "Demo source", ...input.demoSource }
|
|
5
|
+
];
|
|
6
|
+
if (input.componentSource)
|
|
7
|
+
resources.push({
|
|
8
|
+
label: "Component source",
|
|
9
|
+
...input.componentSource
|
|
10
|
+
});
|
|
11
|
+
if (input.designTemplate)
|
|
12
|
+
resources.push({ label: "Design template", ...input.designTemplate });
|
|
13
|
+
resources.push({
|
|
14
|
+
label: input.guidanceKind === "integrationGuidance" ? "Integration guidance" : "Guidance",
|
|
15
|
+
...input.guidance
|
|
16
|
+
});
|
|
17
|
+
return resources;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { catalogResources };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=catalog-resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/catalog-resources.ts"],"names":[],"mappings":";AAuCO,SAAS,iBACd,KAAA,EACmB;AACnB,EAAA,MAAM,SAAA,GAA+B;AAAA,IACnC,EAAE,KAAA,EAAO,aAAA,EAAe,GAAG,MAAM,UAAA;AAAW,GAC9C;AACA,EAAA,IAAI,KAAA,CAAM,eAAA;AACR,IAAA,SAAA,CAAU,IAAA,CAAK;AAAA,MACb,KAAA,EAAO,kBAAA;AAAA,MACP,GAAG,KAAA,CAAM;AAAA,KACV,CAAA;AACH,EAAA,IAAI,KAAA,CAAM,cAAA;AACR,IAAA,SAAA,CAAU,KAAK,EAAE,KAAA,EAAO,mBAAmB,GAAG,KAAA,CAAM,gBAAgB,CAAA;AACtE,EAAA,SAAA,CAAU,IAAA,CAAK;AAAA,IACb,KAAA,EACE,KAAA,CAAM,YAAA,KAAiB,qBAAA,GACnB,sBAAA,GACA,UAAA;AAAA,IACN,GAAG,KAAA,CAAM;AAAA,GACV,CAAA;AACD,EAAA,OAAO,SAAA;AACT","file":"catalog-resources.js","sourcesContent":["import type { CatalogResource } from './catalog.js';\n\n/**\n * Standard resource labels for a Kerf catalog detail footer. Keep these labels\n * stable across catalogs so people and AI-generated integrations see the same\n * choices in the same vocabulary.\n */\nexport type CatalogResourceKind =\n | 'demoSource'\n | 'componentSource'\n | 'designTemplate'\n | 'guidance'\n | 'integrationGuidance';\n\nexport type CatalogGuidanceKind = 'guidance' | 'integrationGuidance';\n\nexport interface CatalogResourceTarget {\n href: string;\n /** Optional monospace detail, normally the repository-relative source path. */\n detail?: string;\n}\n\nexport interface CatalogResourcesInput {\n /** Required source for the runnable demonstration. */\n demoSource: CatalogResourceTarget;\n /** Source for the production component; omit for recipes and integrations. */\n componentSource?: CatalogResourceTarget;\n /** Optional design-tool template associated with the component. */\n designTemplate?: CatalogResourceTarget;\n /** Required UI or integration guidance. */\n guidance: CatalogResourceTarget;\n /** Use `integrationGuidance` when the component implementation is upstream. */\n guidanceKind?: CatalogGuidanceKind;\n}\n\n/**\n * Build the standard catalog resource group in its canonical order: demo,\n * component, optional design template, then guidance.\n */\nexport function catalogResources(\n input: CatalogResourcesInput,\n): CatalogResource[] {\n const resources: CatalogResource[] = [\n { label: 'Demo source', ...input.demoSource },\n ];\n if (input.componentSource)\n resources.push({\n label: 'Component source',\n ...input.componentSource,\n });\n if (input.designTemplate)\n resources.push({ label: 'Design template', ...input.designTemplate });\n resources.push({\n label:\n input.guidanceKind === 'integrationGuidance'\n ? 'Integration guidance'\n : 'Guidance',\n ...input.guidance,\n });\n return resources;\n}\n"]}
|
package/dist/catalog.d.ts
CHANGED
|
@@ -97,6 +97,16 @@ declare function Catalog({ brand, sections, active, content, collapsed, theme, h
|
|
|
97
97
|
* - `'none'` — a content-item / composition that owns its geometry and already aligns; no inset (default).
|
|
98
98
|
*/
|
|
99
99
|
type CatalogExampleAlign = 'glyph' | 'inline-control' | 'none';
|
|
100
|
+
type CatalogExampleRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
101
|
+
'data-catalog-example'?: never;
|
|
102
|
+
'data-catalog-example-stack'?: never;
|
|
103
|
+
'data-align'?: never;
|
|
104
|
+
}>;
|
|
105
|
+
type CatalogExampleStackRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
106
|
+
'data-catalog-example'?: never;
|
|
107
|
+
'data-catalog-example-stack'?: never;
|
|
108
|
+
'data-align'?: never;
|
|
109
|
+
}>;
|
|
100
110
|
interface CatalogExampleProps {
|
|
101
111
|
/** The example's label, shown as a `ListHeader` above the specimen. Omit for a bare specimen. */
|
|
102
112
|
label?: string;
|
|
@@ -104,6 +114,8 @@ interface CatalogExampleProps {
|
|
|
104
114
|
note?: SafeHtml | string;
|
|
105
115
|
/** Alignment inset for the specimen — see {@link CatalogExampleAlign}. Default `'none'`. */
|
|
106
116
|
align?: CatalogExampleAlign;
|
|
117
|
+
/** Safe authoring `data-*` metadata for the rendered section. Helper-owned structural attributes remain protected. */
|
|
118
|
+
rootAttributes?: CatalogExampleRootAttributes;
|
|
107
119
|
className?: string;
|
|
108
120
|
children?: SafeHtml | readonly SafeHtml[];
|
|
109
121
|
}
|
|
@@ -115,14 +127,20 @@ interface CatalogExampleProps {
|
|
|
115
127
|
* `--kui-catalog-example-align` custom property so a debug overlay can exclude it
|
|
116
128
|
* from a specimen's measured margin.
|
|
117
129
|
*/
|
|
118
|
-
declare function CatalogExample({ label, note, align, className, children, }: CatalogExampleProps): SafeHtml;
|
|
130
|
+
declare function CatalogExample({ label, note, align, rootAttributes, className, children, }: CatalogExampleProps): SafeHtml;
|
|
119
131
|
interface CatalogExampleStackProps {
|
|
120
132
|
/** Accessible label for the stack region. */
|
|
121
133
|
label?: string;
|
|
134
|
+
/** Safe authoring `data-*` metadata for the rendered stack. Helper-owned structural attributes remain protected. */
|
|
135
|
+
rootAttributes?: CatalogExampleStackRootAttributes;
|
|
122
136
|
className?: string;
|
|
123
137
|
children?: SafeHtml | readonly SafeHtml[];
|
|
124
138
|
}
|
|
125
|
-
/**
|
|
126
|
-
|
|
139
|
+
/**
|
|
140
|
+
* A vertically-stacked group of {@link CatalogExample}s with the catalog's
|
|
141
|
+
* example rhythm. The semantic `section` becomes a named `region` when `label`
|
|
142
|
+
* is supplied; an unlabeled stack remains an ordinary grouping.
|
|
143
|
+
*/
|
|
144
|
+
declare function CatalogExampleStack({ label, rootAttributes, className, children, }: CatalogExampleStackProps): SafeHtml;
|
|
127
145
|
|
|
128
146
|
export { Catalog, type CatalogBrand, type CatalogEntry, CatalogExample, type CatalogExampleAlign, type CatalogExampleProps, CatalogExampleStack, type CatalogExampleStackProps, type CatalogProps, type CatalogRelated, type CatalogResource, type CatalogSecondaryGroup, type CatalogSection };
|