@kerfjs/ui 5.0.0-beta.17 → 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.
- package/README.md +221 -81
- 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-extension.schema.json +79 -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 +649 -6
- package/ai/component-catalog.schema.json +15 -0
- package/ai/public-api-signatures-v1.md +357 -91
- package/ai/skill.md +95 -50
- 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/app-tab.d.ts +1 -1
- package/dist/app-tab.js +1 -1
- 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 +29 -4
- package/dist/catalog.js +302 -84
- package/dist/catalog.js.map +1 -1
- package/dist/chunk-5VTB2BKP.js +35 -0
- package/dist/chunk-5VTB2BKP.js.map +1 -0
- package/dist/chunk-6WTETUZ6.js +21 -0
- package/dist/chunk-6WTETUZ6.js.map +1 -0
- package/dist/chunk-7KEUJIIC.js +218 -0
- package/dist/chunk-7KEUJIIC.js.map +1 -0
- package/dist/chunk-7L6EHUMV.js +31 -0
- package/dist/chunk-7L6EHUMV.js.map +1 -0
- package/dist/{chunk-XXMOARTH.js → chunk-AASLYRGE.js} +57 -16
- package/dist/chunk-AASLYRGE.js.map +1 -0
- package/dist/chunk-BBRXX6PF.js +108 -0
- package/dist/chunk-BBRXX6PF.js.map +1 -0
- package/dist/{chunk-6NLRBSVX.js → chunk-CN2XNTAM.js} +129 -72
- package/dist/chunk-CN2XNTAM.js.map +1 -0
- package/dist/chunk-DPDBVKNA.js +113 -0
- package/dist/chunk-DPDBVKNA.js.map +1 -0
- package/dist/chunk-DSNIYOZ3.js +114 -0
- package/dist/chunk-DSNIYOZ3.js.map +1 -0
- package/dist/chunk-ELSJX4W7.js +68 -0
- package/dist/chunk-ELSJX4W7.js.map +1 -0
- package/dist/{chunk-AHQI52QO.js → chunk-FEY65TBV.js} +6 -2
- package/dist/chunk-FEY65TBV.js.map +1 -0
- package/dist/chunk-JRKSK2HX.js +79 -0
- package/dist/chunk-JRKSK2HX.js.map +1 -0
- package/dist/chunk-K57KRAOV.js +117 -0
- package/dist/chunk-K57KRAOV.js.map +1 -0
- package/dist/chunk-LPOMRC4C.js +25 -0
- package/dist/chunk-LPOMRC4C.js.map +1 -0
- package/dist/chunk-M7JBER5U.js +41 -0
- package/dist/chunk-M7JBER5U.js.map +1 -0
- package/dist/chunk-NENBUYX5.js +79 -0
- package/dist/chunk-NENBUYX5.js.map +1 -0
- package/dist/chunk-OHU6CI22.js +83 -0
- package/dist/chunk-OHU6CI22.js.map +1 -0
- package/dist/{chunk-YGN7OMLT.js → chunk-OZWU5ZPZ.js} +2 -2
- package/dist/chunk-OZWU5ZPZ.js.map +1 -0
- package/dist/chunk-PIDTEQ3U.js +105 -0
- package/dist/chunk-PIDTEQ3U.js.map +1 -0
- package/dist/chunk-PX3YSS5C.js +32 -0
- package/dist/chunk-PX3YSS5C.js.map +1 -0
- package/dist/chunk-PZQVSDLH.js +61 -0
- package/dist/chunk-PZQVSDLH.js.map +1 -0
- package/dist/chunk-QO55FN2Y.js +20 -0
- package/dist/chunk-QO55FN2Y.js.map +1 -0
- package/dist/chunk-QQFJMRIB.js +45 -0
- package/dist/chunk-QQFJMRIB.js.map +1 -0
- package/dist/chunk-RYRIFZCT.js +58 -0
- package/dist/chunk-RYRIFZCT.js.map +1 -0
- package/dist/{chunk-7BR3DO2A.js → chunk-SRSJO5QE.js} +13 -4
- package/dist/chunk-SRSJO5QE.js.map +1 -0
- package/dist/chunk-VLYV65LK.js +38 -0
- 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-WXMGNX2Y.js → chunk-W7YD6E4N.js} +2 -2
- package/dist/chunk-W7YD6E4N.js.map +1 -0
- package/dist/{chunk-56RJXPHG.js → chunk-Y6LYKFXY.js} +1 -1
- package/dist/{chunk-56RJXPHG.js.map → chunk-Y6LYKFXY.js.map} +1 -1
- package/dist/collapsible-panel.d.ts +2 -2
- package/dist/collapsible-panel.js +47 -6
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/device-class.js +33 -5
- package/dist/device-class.js.map +1 -1
- package/dist/disclosure-arrow.js +1 -1
- package/dist/empty-state.d.ts +1 -1
- package/dist/empty-state.js +1 -1
- package/dist/floating-toolbar.d.ts +1 -1
- package/dist/floating-toolbar.js +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.js +27 -25
- package/dist/list-action-row.d.ts +1 -1
- package/dist/list-action-row.js +1 -1
- package/dist/list-header.d.ts +30 -9
- package/dist/list-header.js +1 -1
- package/dist/list-inset-control.d.ts +1 -1
- package/dist/list-inset-control.js +1 -1
- package/dist/list-inset-text.d.ts +1 -1
- package/dist/list-inset-text.js +1 -1
- package/dist/list-item.d.ts +1 -1
- package/dist/list-item.js +1 -1
- package/dist/loading-spinner.js +1 -1
- package/dist/nav-stack.d.ts +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 +10 -4
- package/dist/panel-header.js +1 -1
- package/dist/resizable-region.d.ts +1 -1
- package/dist/resizable-region.js +1 -1
- package/dist/segmented-control.d.ts +6 -6
- package/dist/segmented-control.js +1 -1
- package/dist/select.d.ts +11 -5
- package/dist/select.js +1 -1
- package/dist/skeleton.d.ts +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/split-view.d.ts +1 -1
- package/dist/split-view.js +70 -10
- package/dist/split-view.js.map +1 -1
- package/dist/state-banner.d.ts +4 -3
- package/dist/state-banner.js +1 -1
- package/dist/styles/catalog.css +32 -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 +4 -3
- package/dist/tab-bar.js +1 -1
- package/dist/tab-scaffold.d.ts +6 -6
- package/dist/tab-scaffold.js +43 -8
- 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 +10 -6
- 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/toolbar.d.ts +1 -1
- package/dist/toolbar.js +1 -1
- package/dist/value-table.d.ts +2 -2
- package/dist/value-table.js +1 -1
- package/dist/wire-catalog.d.ts +31 -2
- package/dist/wire-catalog.js +203 -8
- package/dist/wire-catalog.js.map +1 -1
- package/dist/wire-nav-stack.js +22 -7
- package/dist/wire-nav-stack.js.map +1 -1
- package/dist/wire-resizable-regions.d.ts +1 -1
- package/dist/wire-resizable-regions.js +1 -1
- package/dist/wire-sidebar.js +52 -41
- package/dist/wire-sidebar.js.map +1 -1
- package/dist/wire-tab-bars.d.ts +5 -2
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-tab-scaffold.js +9 -4
- package/dist/wire-tab-scaffold.js.map +1 -1
- package/dist/wire-token-search-fields.d.ts +12 -7
- package/dist/wire-token-search-fields.js +1 -1
- package/dist/workbench.d.ts +1 -1
- package/dist/workbench.js +56 -9
- package/dist/workbench.js.map +1 -1
- package/docs/app-layouts.md +7 -7
- package/docs/catalog.md +249 -46
- package/docs/collapsible-panel.md +38 -11
- package/docs/component-contract.md +132 -7
- package/docs/component-selection.md +79 -67
- package/docs/design/templates.md +1 -1
- package/docs/design-philosophy.md +7 -9
- package/docs/device-class.md +8 -8
- package/docs/examples/application-ui-profile.json +60 -0
- package/docs/examples/command-palette-adapter.tsx +67 -17
- package/docs/examples/component-catalog-extension-v2.json +81 -0
- package/docs/examples/component-catalog-extension.json +45 -0
- package/docs/layout.md +51 -32
- package/docs/nav-stack.md +15 -6
- package/docs/recipes.md +4 -4
- package/docs/split-view.md +3 -3
- package/docs/sunken-panel.md +43 -0
- package/docs/tab-scaffold.md +16 -7
- 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/docs/webawesome-theme.md +8 -8
- package/docs/workbench.md +18 -5
- 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 +58 -15
- package/package.json +70 -10
- package/ux-demo/recipes/app-shell.tsx +206 -10
- package/ux-demo/recipes/collapsible-sidebar.tsx +167 -44
- package/ux-demo/recipes/compact-toolbar.tsx +114 -12
- package/ux-demo/recipes/composer-form.tsx +106 -18
- package/ux-demo/recipes/list-detail-dialog.tsx +144 -8
- package/ux-demo/recipes/list-workspace-states.tsx +165 -8
- package/ux-demo/recipes/loaders.ts +5 -2
- package/ux-demo/recipes/loading-inspector.tsx +124 -41
- package/ux-demo/recipes/mount-recipe.ts +27 -6
- package/ux-demo/recipes/navigation-sidebar.tsx +120 -9
- package/ux-demo/recipes/navigation-stack.tsx +61 -19
- package/ux-demo/recipes/types.ts +3 -1
- package/ux-demo/recipes/workspace-header.tsx +57 -2
- package/dist/chunk-2Z5TWHKQ.js +0 -34
- package/dist/chunk-2Z5TWHKQ.js.map +0 -1
- package/dist/chunk-37T3VNIZ.js +0 -19
- package/dist/chunk-37T3VNIZ.js.map +0 -1
- package/dist/chunk-55DATV3A.js +0 -10
- package/dist/chunk-55DATV3A.js.map +0 -1
- package/dist/chunk-5ATCDSQS.js +0 -42
- package/dist/chunk-5ATCDSQS.js.map +0 -1
- package/dist/chunk-5E2HVJ33.js +0 -10
- package/dist/chunk-5E2HVJ33.js.map +0 -1
- package/dist/chunk-6NLRBSVX.js.map +0 -1
- package/dist/chunk-7BR3DO2A.js.map +0 -1
- package/dist/chunk-7JB7VPRI.js +0 -34
- package/dist/chunk-7JB7VPRI.js.map +0 -1
- package/dist/chunk-7LDCTU7D.js +0 -134
- package/dist/chunk-7LDCTU7D.js.map +0 -1
- package/dist/chunk-AHQI52QO.js.map +0 -1
- package/dist/chunk-AQNKJRFH.js +0 -79
- package/dist/chunk-AQNKJRFH.js.map +0 -1
- package/dist/chunk-AVZHJN6C.js +0 -14
- package/dist/chunk-AVZHJN6C.js.map +0 -1
- package/dist/chunk-B24C4A6T.js +0 -22
- package/dist/chunk-B24C4A6T.js.map +0 -1
- package/dist/chunk-CH4SQ6H5.js +0 -39
- package/dist/chunk-CH4SQ6H5.js.map +0 -1
- package/dist/chunk-DAFFDO33.js +0 -14
- package/dist/chunk-DAFFDO33.js.map +0 -1
- package/dist/chunk-I7INRJO4.js +0 -17
- package/dist/chunk-I7INRJO4.js.map +0 -1
- package/dist/chunk-L4OKFDJY.js +0 -24
- package/dist/chunk-L4OKFDJY.js.map +0 -1
- package/dist/chunk-M5JRI6MN.js +0 -27
- package/dist/chunk-M5JRI6MN.js.map +0 -1
- package/dist/chunk-RNPGFQ33.js +0 -10
- package/dist/chunk-RNPGFQ33.js.map +0 -1
- package/dist/chunk-VPCTCUED.js +0 -10
- package/dist/chunk-VPCTCUED.js.map +0 -1
- package/dist/chunk-WRTAQ7BZ.js +0 -23
- package/dist/chunk-WRTAQ7BZ.js.map +0 -1
- package/dist/chunk-WVPYVDXY.js +0 -15
- package/dist/chunk-WVPYVDXY.js.map +0 -1
- package/dist/chunk-WXMGNX2Y.js.map +0 -1
- package/dist/chunk-XXMOARTH.js.map +0 -1
- package/dist/chunk-YGN7OMLT.js.map +0 -1
- package/dist/chunk-ZQQ6P4SV.js +0 -20
- package/dist/chunk-ZQQ6P4SV.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
|
+
}
|
package/dist/app-tab.d.ts
CHANGED
|
@@ -25,6 +25,6 @@ interface AppTabProps {
|
|
|
25
25
|
placeholder?: boolean;
|
|
26
26
|
rootAttributes?: AppTabRootAttributes;
|
|
27
27
|
}
|
|
28
|
-
declare function AppTab({ id, name, selected, closable, draggable, leading, trailing, closeIcon, selectAction, closeAction, className, placeholder, rootAttributes }: AppTabProps): SafeHtml;
|
|
28
|
+
declare function AppTab({ id, name, selected, closable, draggable, leading, trailing, closeIcon, selectAction, closeAction, className, placeholder, rootAttributes, }: AppTabProps): SafeHtml;
|
|
29
29
|
|
|
30
30
|
export { AppTab, type AppTabProps };
|
package/dist/app-tab.js
CHANGED
|
@@ -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
|
@@ -66,6 +66,13 @@ interface CatalogProps {
|
|
|
66
66
|
sidebarFooter?: SafeHtml;
|
|
67
67
|
/** Status line content shown at the start of the detail footer. */
|
|
68
68
|
status?: SafeHtml;
|
|
69
|
+
/**
|
|
70
|
+
* Whether to highlight transparent specimens' outer bounds and non-zero
|
|
71
|
+
* margins. Pass a boolean (rather than omitting the prop) when the active
|
|
72
|
+
* entry can switch between component and composition previews;
|
|
73
|
+
* `wireCatalogGeometryOverlay` keeps the overlay synchronized.
|
|
74
|
+
*/
|
|
75
|
+
geometryOverlay?: boolean;
|
|
69
76
|
selectAction?: string;
|
|
70
77
|
toggleSidebarAction?: string;
|
|
71
78
|
toggleThemeAction?: string;
|
|
@@ -81,7 +88,7 @@ interface CatalogProps {
|
|
|
81
88
|
* `collapsed`, and `theme` signals and computes `content` from `active` in its own
|
|
82
89
|
* render; wire the sidebar/collapse/theme actions with `wireCatalog`.
|
|
83
90
|
*/
|
|
84
|
-
declare function Catalog({ brand, sections, active, content, collapsed, theme, headerActions, secondarySections, sidebarFooter, status, selectAction, toggleSidebarAction, toggleThemeAction, toggleSecondaryAction, className, }: CatalogProps): SafeHtml;
|
|
91
|
+
declare function Catalog({ brand, sections, active, content, collapsed, theme, headerActions, secondarySections, sidebarFooter, status, geometryOverlay, selectAction, toggleSidebarAction, toggleThemeAction, toggleSecondaryAction, className, }: CatalogProps): SafeHtml;
|
|
85
92
|
/**
|
|
86
93
|
* How a {@link CatalogExample}'s content aligns its visible left edge with the
|
|
87
94
|
* example's `ListHeader` label (which sits 16px in — 8px title + 8px label):
|
|
@@ -90,6 +97,16 @@ declare function Catalog({ brand, sections, active, content, collapsed, theme, h
|
|
|
90
97
|
* - `'none'` — a content-item / composition that owns its geometry and already aligns; no inset (default).
|
|
91
98
|
*/
|
|
92
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
|
+
}>;
|
|
93
110
|
interface CatalogExampleProps {
|
|
94
111
|
/** The example's label, shown as a `ListHeader` above the specimen. Omit for a bare specimen. */
|
|
95
112
|
label?: string;
|
|
@@ -97,6 +114,8 @@ interface CatalogExampleProps {
|
|
|
97
114
|
note?: SafeHtml | string;
|
|
98
115
|
/** Alignment inset for the specimen — see {@link CatalogExampleAlign}. Default `'none'`. */
|
|
99
116
|
align?: CatalogExampleAlign;
|
|
117
|
+
/** Safe authoring `data-*` metadata for the rendered section. Helper-owned structural attributes remain protected. */
|
|
118
|
+
rootAttributes?: CatalogExampleRootAttributes;
|
|
100
119
|
className?: string;
|
|
101
120
|
children?: SafeHtml | readonly SafeHtml[];
|
|
102
121
|
}
|
|
@@ -108,14 +127,20 @@ interface CatalogExampleProps {
|
|
|
108
127
|
* `--kui-catalog-example-align` custom property so a debug overlay can exclude it
|
|
109
128
|
* from a specimen's measured margin.
|
|
110
129
|
*/
|
|
111
|
-
declare function CatalogExample({ label, note, align, className, children }: CatalogExampleProps): SafeHtml;
|
|
130
|
+
declare function CatalogExample({ label, note, align, rootAttributes, className, children, }: CatalogExampleProps): SafeHtml;
|
|
112
131
|
interface CatalogExampleStackProps {
|
|
113
132
|
/** Accessible label for the stack region. */
|
|
114
133
|
label?: string;
|
|
134
|
+
/** Safe authoring `data-*` metadata for the rendered stack. Helper-owned structural attributes remain protected. */
|
|
135
|
+
rootAttributes?: CatalogExampleStackRootAttributes;
|
|
115
136
|
className?: string;
|
|
116
137
|
children?: SafeHtml | readonly SafeHtml[];
|
|
117
138
|
}
|
|
118
|
-
/**
|
|
119
|
-
|
|
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;
|
|
120
145
|
|
|
121
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 };
|