@kerfjs/ui 5.0.0-beta.49 → 5.0.0-beta.51
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 +69 -15
- package/ai/catalog-authoring.json +12 -1
- package/ai/catalog-authoring.schema.json +49 -1
- package/ai/compile-time-contracts-v1.json +19 -2
- package/ai/compile-time-contracts-v1.schema.json +1 -0
- package/ai/component-catalog-v2-overrides.json +7 -0
- package/ai/component-catalog-v2.d.ts +19 -1
- package/ai/component-catalog-v2.json +920 -149
- package/ai/component-catalog-v2.schema.json +33 -1
- package/ai/component-catalog.json +689 -153
- package/ai/component-catalog.schema.json +21 -1
- package/ai/public-api-signatures-v1.md +404 -184
- package/ai/skill.md +31 -14
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/analyzer/index.mjs +105 -35
- package/dist/app-tab.d.ts +3 -1
- package/dist/app-tab.js +1 -1
- package/dist/badge.d.ts +24 -0
- package/dist/badge.js +3 -0
- package/dist/badge.js.map +1 -0
- package/dist/browser/badge.js +3 -0
- package/dist/browser/list-header.js +1 -0
- package/dist/browser/state-banner.js +1 -0
- package/dist/catalog-resources.d.ts +2 -2
- package/dist/catalog.d.ts +47 -125
- package/dist/catalog.js +429 -262
- package/dist/catalog.js.map +1 -1
- package/dist/{chunk-W2FK7ZNY.js → chunk-4R777DUZ.js} +10 -2
- package/dist/chunk-4R777DUZ.js.map +1 -0
- package/dist/{chunk-OMSRSL3B.js → chunk-5FZZMIMD.js} +6 -4
- package/dist/chunk-5FZZMIMD.js.map +1 -0
- package/dist/{chunk-AQFWBG23.js → chunk-5PMGQDG7.js} +5 -3
- package/dist/chunk-5PMGQDG7.js.map +1 -0
- package/dist/{chunk-SOK5EUF7.js → chunk-6ZXOQEAN.js} +4 -2
- package/dist/chunk-6ZXOQEAN.js.map +1 -0
- package/dist/{chunk-I4V3UDSA.js → chunk-7GUQYHKA.js} +25 -6
- package/dist/chunk-7GUQYHKA.js.map +1 -0
- package/dist/{chunk-XKFRMGMW.js → chunk-7IUSV4XG.js} +3 -1
- package/dist/chunk-7IUSV4XG.js.map +1 -0
- package/dist/{chunk-IU4QUY5I.js → chunk-AEPXGCNF.js} +20 -3
- package/dist/chunk-AEPXGCNF.js.map +1 -0
- package/dist/{chunk-VDUJZF5G.js → chunk-CMUIXJZM.js} +2 -2
- package/dist/{chunk-VDUJZF5G.js.map → chunk-CMUIXJZM.js.map} +1 -1
- package/dist/{chunk-DAO2VFTT.js → chunk-D547PH4L.js} +7 -5
- package/dist/chunk-D547PH4L.js.map +1 -0
- package/dist/{chunk-2TYUFZUC.js → chunk-D7GWXIAS.js} +4 -2
- package/dist/chunk-D7GWXIAS.js.map +1 -0
- package/dist/{chunk-E34TE2ZI.js → chunk-DVZCMMB3.js} +6 -4
- package/dist/chunk-DVZCMMB3.js.map +1 -0
- package/dist/{chunk-6NDBE2OK.js → chunk-E36EVCKG.js} +5 -3
- package/dist/chunk-E36EVCKG.js.map +1 -0
- package/dist/chunk-EKYZCRCX.js +256 -0
- package/dist/chunk-EKYZCRCX.js.map +1 -0
- package/dist/{chunk-TIGSG6BX.js → chunk-HJKRCKDR.js} +7 -3
- package/dist/chunk-HJKRCKDR.js.map +1 -0
- package/dist/{chunk-Y6LYKFXY.js → chunk-HMQ2ZDGG.js} +5 -3
- package/dist/chunk-HMQ2ZDGG.js.map +1 -0
- package/dist/{chunk-UDHHKZWO.js → chunk-JM53SMVF.js} +9 -5
- package/dist/chunk-JM53SMVF.js.map +1 -0
- package/dist/{chunk-OGTJNHRG.js → chunk-JMGKM7RK.js} +6 -4
- package/dist/chunk-JMGKM7RK.js.map +1 -0
- package/dist/{chunk-GYGM363P.js → chunk-KX7DP2GO.js} +17 -7
- package/dist/chunk-KX7DP2GO.js.map +1 -0
- package/dist/{chunk-OL4TC3U2.js → chunk-MO56ZZLG.js} +6 -2
- package/dist/chunk-MO56ZZLG.js.map +1 -0
- package/dist/{chunk-VXFGMDA7.js → chunk-MTM43SJO.js} +16 -2
- package/dist/chunk-MTM43SJO.js.map +1 -0
- package/dist/{chunk-ZPWZIVI6.js → chunk-N3GKMPDW.js} +7 -3
- package/dist/chunk-N3GKMPDW.js.map +1 -0
- package/dist/{chunk-DYBPI5O2.js → chunk-NDUGJ4TU.js} +4 -2
- package/dist/chunk-NDUGJ4TU.js.map +1 -0
- package/dist/{chunk-I45QO2IZ.js → chunk-NMGTHYW3.js} +7 -5
- package/dist/chunk-NMGTHYW3.js.map +1 -0
- package/dist/{chunk-WSXUPSID.js → chunk-NN6GYOA2.js} +7 -3
- package/dist/chunk-NN6GYOA2.js.map +1 -0
- package/dist/{chunk-OGNE3OFT.js → chunk-NZXWU4R5.js} +24 -3
- package/dist/chunk-NZXWU4R5.js.map +1 -0
- package/dist/{chunk-V6GQKOX2.js → chunk-O3RCCSQJ.js} +6 -4
- package/dist/chunk-O3RCCSQJ.js.map +1 -0
- package/dist/{chunk-WVLMZ5SG.js → chunk-S4QRSBFI.js} +25 -3
- package/dist/chunk-S4QRSBFI.js.map +1 -0
- package/dist/{chunk-CK6P5AUK.js → chunk-UBH743HV.js} +10 -7
- package/dist/chunk-UBH743HV.js.map +1 -0
- package/dist/{chunk-T7DOWS6T.js → chunk-ULCDZTWL.js} +7 -4
- package/dist/chunk-ULCDZTWL.js.map +1 -0
- package/dist/{chunk-V6HCTCVD.js → chunk-UPZ6EEJN.js} +9 -5
- package/dist/chunk-UPZ6EEJN.js.map +1 -0
- package/dist/{chunk-CAB6NQ2T.js → chunk-VOCPXGQN.js} +3 -1
- package/dist/chunk-VOCPXGQN.js.map +1 -0
- package/dist/chunk-XD7DWYXG.js +34 -0
- package/dist/chunk-XD7DWYXG.js.map +1 -0
- package/dist/{chunk-B6JYRX3P.js → chunk-ZIYOJFZD.js} +43 -4
- package/dist/chunk-ZIYOJFZD.js.map +1 -0
- package/dist/{chunk-EYALJQQD.js → chunk-ZK5EGVFP.js} +4 -2
- package/dist/chunk-ZK5EGVFP.js.map +1 -0
- package/dist/{chunk-6WTETUZ6.js → chunk-ZLWQZUGF.js} +8 -2
- package/dist/chunk-ZLWQZUGF.js.map +1 -0
- package/dist/collapsible-panel.d.ts +4 -2
- package/dist/collapsible-panel.js +4 -2
- package/dist/collapsible-panel.js.map +1 -1
- package/dist/css-values.d.ts +39 -3
- package/dist/css-values.js +1 -1
- package/dist/disclosure-arrow.d.ts +3 -1
- package/dist/disclosure-arrow.js +1 -1
- package/dist/empty-state.d.ts +3 -1
- package/dist/empty-state.js +1 -1
- package/dist/floating-toolbar.d.ts +3 -1
- package/dist/floating-toolbar.js +1 -1
- package/dist/grid.d.ts +17 -1
- package/dist/grid.js +2 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +34 -33
- package/dist/list-action-row.d.ts +3 -1
- package/dist/list-action-row.js +1 -1
- package/dist/list-header.d.ts +6 -1
- package/dist/list-header.js +2 -1
- package/dist/list-inset-control.d.ts +3 -1
- package/dist/list-inset-control.js +1 -1
- package/dist/list-inset-text.d.ts +3 -1
- package/dist/list-inset-text.js +1 -1
- package/dist/list-item.d.ts +3 -1
- package/dist/list-item.js +1 -1
- package/dist/list.d.ts +23 -2
- package/dist/list.js +2 -1
- package/dist/loading-spinner.d.ts +3 -1
- package/dist/loading-spinner.js +1 -1
- package/dist/lucide-icon.d.ts +3 -1
- package/dist/lucide-icon.js +1 -1
- package/dist/nav-stack.d.ts +3 -1
- package/dist/nav-stack.js +1 -1
- package/dist/pane.d.ts +19 -2
- package/dist/pane.js +1 -1
- package/dist/resizable-region.d.ts +5 -2
- package/dist/resizable-region.js +1 -1
- package/dist/row.d.ts +21 -1
- package/dist/row.js +2 -1
- package/dist/segmented-control.d.ts +3 -1
- package/dist/segmented-control.js +1 -1
- package/dist/select.d.ts +16 -4
- package/dist/select.js +1 -1
- package/dist/skeleton.d.ts +3 -1
- package/dist/skeleton.js +1 -1
- package/dist/spacer.d.ts +3 -1
- package/dist/spacer.js +1 -1
- package/dist/split-view.d.ts +3 -1
- package/dist/split-view.js +24 -5
- package/dist/split-view.js.map +1 -1
- package/dist/state-banner.d.ts +3 -1
- package/dist/state-banner.js +2 -1
- package/dist/styles/badge.css +86 -0
- package/dist/styles/catalog/components/catalog-detail.css +35 -0
- package/dist/styles/catalog/components/catalog-example-stack.css +9 -0
- package/dist/styles/catalog/components/catalog-example.css +180 -0
- package/dist/styles/catalog/components/catalog-resource-footer.css +37 -0
- package/dist/styles/catalog/components/catalog-secondary-sections.css +38 -0
- package/dist/styles/catalog/components/catalog-section-list.css +22 -0
- package/dist/styles/catalog/components/catalog-sidebar.css +82 -0
- package/dist/styles/catalog/components/catalog-stage.css +60 -0
- package/dist/styles/catalog/components/catalog.css +22 -0
- package/dist/styles/catalog.css +10 -587
- package/dist/styles/collapsible-panel.css +132 -4
- package/dist/styles/document.css +23 -0
- package/dist/styles/foundation.css +21 -7
- package/dist/styles/grid.css +10 -0
- package/dist/styles/list-header.css +49 -60
- package/dist/styles/list-inset-control.css +8 -1
- package/dist/styles/list-item.css +6 -0
- package/dist/styles/list.css +11 -0
- package/dist/styles/nav-stack.css +89 -2
- package/dist/styles/pane.css +86 -1
- package/dist/styles/resizable-region.css +117 -5
- package/dist/styles/row.css +10 -0
- package/dist/styles/select.css +39 -7
- package/dist/styles/split-view.css +108 -2
- package/dist/styles/state-banner.css +0 -27
- package/dist/styles/styles.css +1 -0
- package/dist/styles/tab-bar.css +6 -1
- package/dist/styles/tab-scaffold.css +64 -1
- package/dist/styles/text.css +10 -0
- package/dist/styles/token-search-field.css +5 -40
- package/dist/styles/toolbar-control-group.css +198 -25
- package/dist/styles/toolbar-text.css +8 -1
- package/dist/styles/toolbar.css +169 -5
- package/dist/styles/webawesome.css +70 -9
- package/dist/styles/workbench.css +136 -4
- package/dist/sunken-panel.d.ts +3 -1
- package/dist/sunken-panel.js +1 -1
- package/dist/surface-scaffold.d.ts +6 -2
- package/dist/surface-scaffold.js +1 -1
- package/dist/tab-bar.d.ts +8 -1
- package/dist/tab-bar.js +1 -1
- package/dist/tab-scaffold.d.ts +3 -1
- package/dist/tab-scaffold.js +3 -1
- package/dist/tab-scaffold.js.map +1 -1
- package/dist/text.d.ts +9 -5
- package/dist/text.js +1 -1
- package/dist/token-search-field.d.ts +5 -1
- package/dist/token-search-field.js +1 -1
- package/dist/toolbar-control-group.d.ts +33 -3
- package/dist/toolbar-control-group.js +1 -1
- package/dist/toolbar-text.d.ts +3 -1
- package/dist/toolbar-text.js +1 -1
- package/dist/toolbar.d.ts +30 -1
- package/dist/toolbar.js +1 -1
- package/dist/types-CEsieBZi.d.ts +69 -0
- package/dist/value-table.d.ts +6 -2
- package/dist/value-table.js +1 -1
- package/dist/wire-resizable-regions.js +1 -1
- package/dist/wire-sidebar.d.ts +18 -3
- package/dist/wire-sidebar.js +95 -14
- package/dist/wire-sidebar.js.map +1 -1
- package/dist/wire-token-search-fields.js +1 -1
- package/dist/workbench.d.ts +3 -1
- package/dist/workbench.js +3 -1
- package/dist/workbench.js.map +1 -1
- package/docs/accessibility.md +56 -9
- package/docs/app-layouts.md +73 -0
- package/docs/catalog.md +48 -9
- package/docs/collapsible-panel.md +81 -8
- package/docs/component-contract.md +96 -28
- package/docs/component-integration.md +9 -4
- package/docs/component-selection.md +36 -15
- package/docs/design/templates/list/stack-dark.svg +1 -1
- package/docs/design/templates/list/stack.svg +1 -1
- package/docs/design/templates/list-dark.svg +1 -1
- package/docs/design/templates/list-header/action-dark.svg +1 -1
- package/docs/design/templates/list-header/action.svg +1 -1
- package/docs/design/templates/list-header/count-dark.svg +1 -1
- package/docs/design/templates/list-header/count.svg +1 -1
- package/docs/design/templates/list-header/inline-action-dark.svg +1 -1
- package/docs/design/templates/list-header/inline-action.svg +1 -1
- package/docs/design/templates/list-header/toggle-expanded-dark.svg +1 -1
- package/docs/design/templates/list-header/toggle-expanded.svg +1 -1
- package/docs/design/templates/list-header-dark.svg +1 -1
- package/docs/design/templates/list-header.svg +1 -1
- package/docs/design/templates/list.svg +1 -1
- package/docs/design/templates/state-banner/info-badge-dark.svg +1 -1
- package/docs/design/templates/state-banner/info-badge.svg +1 -1
- package/docs/design/templates/state-banner-dark.svg +1 -1
- package/docs/design/templates/state-banner.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 +1 -1
- package/docs/design/templates/toolbar-text.svg +1 -1
- package/docs/design/templates/toolbar.svg +1 -1
- package/docs/design-philosophy.md +6 -5
- package/docs/document-baseline.md +31 -0
- package/docs/layout.md +86 -21
- package/docs/nav-stack.md +8 -0
- package/docs/recipes.md +78 -43
- package/docs/split-view.md +8 -0
- package/docs/tab-scaffold.md +4 -2
- package/docs/type-contracts.md +21 -16
- package/docs/ui-analyzer.md +19 -0
- package/docs/ui-evaluator.md +17 -0
- package/docs/ux-demo.md +8 -8
- package/docs/webawesome-theme.md +25 -6
- package/docs/workbench.md +20 -1
- package/evaluator/index.mjs +73 -8
- package/llms.txt +61 -23
- package/package.json +12 -3
- package/ux-demo/recipes/app-shell.tsx +244 -184
- package/ux-demo/recipes/collapsible-sidebar.tsx +175 -116
- package/ux-demo/recipes/compact-toolbar.tsx +119 -102
- package/ux-demo/recipes/composer-form.tsx +79 -69
- package/ux-demo/recipes/list-detail-dialog.tsx +120 -136
- package/ux-demo/recipes/list-workspace-states.tsx +85 -79
- package/ux-demo/recipes/loaders.ts +5 -2
- package/ux-demo/recipes/loading-inspector.tsx +151 -134
- package/ux-demo/recipes/navigation-sidebar.tsx +93 -80
- package/ux-demo/recipes/navigation-stack.tsx +33 -22
- package/ux-demo/recipes/types.ts +14 -0
- package/ux-demo/recipes/workspace-header.tsx +73 -57
- package/dist/chunk-2TYUFZUC.js.map +0 -1
- package/dist/chunk-6NDBE2OK.js.map +0 -1
- package/dist/chunk-6WTETUZ6.js.map +0 -1
- package/dist/chunk-AQFWBG23.js.map +0 -1
- package/dist/chunk-B6JYRX3P.js.map +0 -1
- package/dist/chunk-CAB6NQ2T.js.map +0 -1
- package/dist/chunk-CK6P5AUK.js.map +0 -1
- package/dist/chunk-DAO2VFTT.js.map +0 -1
- package/dist/chunk-DYBPI5O2.js.map +0 -1
- package/dist/chunk-E34TE2ZI.js.map +0 -1
- package/dist/chunk-EYALJQQD.js.map +0 -1
- package/dist/chunk-GYGM363P.js.map +0 -1
- package/dist/chunk-I45QO2IZ.js.map +0 -1
- package/dist/chunk-I4V3UDSA.js.map +0 -1
- package/dist/chunk-IU4QUY5I.js.map +0 -1
- package/dist/chunk-OGNE3OFT.js.map +0 -1
- package/dist/chunk-OGTJNHRG.js.map +0 -1
- package/dist/chunk-OL4TC3U2.js.map +0 -1
- package/dist/chunk-OMSRSL3B.js.map +0 -1
- package/dist/chunk-SOK5EUF7.js.map +0 -1
- package/dist/chunk-T7DOWS6T.js.map +0 -1
- package/dist/chunk-TIGSG6BX.js.map +0 -1
- package/dist/chunk-UDHHKZWO.js.map +0 -1
- package/dist/chunk-V6GQKOX2.js.map +0 -1
- package/dist/chunk-V6HCTCVD.js.map +0 -1
- package/dist/chunk-VXFGMDA7.js.map +0 -1
- package/dist/chunk-W2FK7ZNY.js.map +0 -1
- package/dist/chunk-WN52USHV.js +0 -115
- package/dist/chunk-WN52USHV.js.map +0 -1
- package/dist/chunk-WSXUPSID.js.map +0 -1
- package/dist/chunk-WVLMZ5SG.js.map +0 -1
- package/dist/chunk-XKFRMGMW.js.map +0 -1
- package/dist/chunk-Y6LYKFXY.js.map +0 -1
- package/dist/chunk-ZPWZIVI6.js.map +0 -1
- package/ux-demo/recipes/recipes.css +0 -453
package/dist/catalog.d.ts
CHANGED
|
@@ -1,103 +1,33 @@
|
|
|
1
|
+
import * as kerfjs from 'kerfjs';
|
|
1
2
|
import { SafeHtml } from 'kerfjs';
|
|
3
|
+
import { a as CatalogProps } from './types-CEsieBZi.js';
|
|
4
|
+
export { b as CatalogBrand, c as CatalogEntry, d as CatalogRelated, C as CatalogResource, e as CatalogSecondaryGroup, f as CatalogSection, g as CatalogStageRootAttributes } from './types-CEsieBZi.js';
|
|
2
5
|
import { K as KerfUiContent } from './semantic-content-BbzjvSu9.js';
|
|
3
6
|
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/** Optional monospace detail (e.g. a file path) shown after the label. */
|
|
9
|
-
detail?: string;
|
|
10
|
-
}
|
|
11
|
-
/** A related entry offered in the detail footer's "Related entries" popup menu. */
|
|
12
|
-
interface CatalogRelated {
|
|
13
|
-
id: string;
|
|
14
|
-
name: string;
|
|
15
|
-
/** Group heading in the menu, e.g. "Uses" / "Used by". */
|
|
16
|
-
group: string;
|
|
17
|
-
}
|
|
18
|
-
interface CatalogEntry {
|
|
19
|
-
id: string;
|
|
20
|
-
name: string;
|
|
21
|
-
description?: string;
|
|
22
|
-
/** Short metadata tags shown at the trailing edge of the sidebar row. */
|
|
23
|
-
tags?: readonly string[];
|
|
24
|
-
resources?: readonly CatalogResource[];
|
|
25
|
-
related?: readonly CatalogRelated[];
|
|
26
|
-
}
|
|
27
|
-
interface CatalogSection {
|
|
28
|
-
category: string;
|
|
29
|
-
entries: readonly CatalogEntry[];
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* A secondary group of sections shown below the primary sidebar sections with a
|
|
33
|
-
* quieter "ecosystem" treatment (e.g. third-party components). Optionally
|
|
34
|
-
* collapsible — the app owns `expanded` and toggles it from `wireCatalog`'s
|
|
35
|
-
* `onToggleSecondary`.
|
|
36
|
-
*/
|
|
37
|
-
interface CatalogSecondaryGroup {
|
|
38
|
-
label: string;
|
|
39
|
-
sections: readonly CatalogSection[];
|
|
40
|
-
/** When true, the group's label is a disclosure toggle controlling `expanded`. */
|
|
41
|
-
collapsible?: boolean;
|
|
42
|
-
/** Whether the group is expanded (controlled). Ignored unless `collapsible`. */
|
|
43
|
-
expanded?: boolean;
|
|
44
|
-
}
|
|
45
|
-
interface CatalogBrand {
|
|
46
|
-
title: string;
|
|
47
|
-
subtitle?: string;
|
|
48
|
-
/** Logo image URL (rendered decorative). Omit for a text-only brand. */
|
|
49
|
-
logoUrl?: string;
|
|
50
|
-
}
|
|
51
|
-
interface CatalogProps {
|
|
52
|
-
brand: CatalogBrand;
|
|
53
|
-
sections: readonly CatalogSection[];
|
|
54
|
-
/** The controlled active entry id — the app owns this signal. */
|
|
55
|
-
active: string;
|
|
56
|
-
/** The rendered preview for the active entry; the app computes it from `active`. */
|
|
57
|
-
content: KerfUiContent;
|
|
58
|
-
/** Whether the sidebar is collapsed (controlled). */
|
|
59
|
-
collapsed?: boolean;
|
|
60
|
-
/** Current theme; when set, a theme toggle is shown that switches to the opposite. Omit to hide it. */
|
|
61
|
-
theme?: 'light' | 'dark';
|
|
62
|
-
/** Extra header controls placed before the theme toggle (each a `ToolbarControlGroup`). */
|
|
63
|
-
headerActions?: KerfUiContent;
|
|
64
|
-
/** A secondary "ecosystem" group of sections below the primary category groups. */
|
|
65
|
-
secondarySections?: CatalogSecondaryGroup;
|
|
66
|
-
/** Extra sidebar content below the category groups (and the secondary group). */
|
|
67
|
-
sidebarFooter?: KerfUiContent;
|
|
68
|
-
/** Status line content shown at the start of the detail footer. */
|
|
69
|
-
status?: KerfUiContent;
|
|
70
|
-
/**
|
|
71
|
-
* Whether to highlight specimens' computed borders (or transparent outer
|
|
72
|
-
* bounds) and non-zero margins. Pass a boolean (rather than omitting the
|
|
73
|
-
* prop) when the active entry can switch between component and composition
|
|
74
|
-
* previews; `wireCatalogGeometryOverlay` keeps the overlay synchronized.
|
|
75
|
-
*/
|
|
76
|
-
geometryOverlay?: boolean;
|
|
77
|
-
selectAction?: string;
|
|
78
|
-
toggleSidebarAction?: string;
|
|
79
|
-
toggleThemeAction?: string;
|
|
80
|
-
/** Action fired by the secondary group's disclosure toggle (when collapsible). */
|
|
81
|
-
toggleSecondaryAction?: string;
|
|
82
|
-
className?: string;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* A reusable component-catalog shell: a collapsible category sidebar, a titled
|
|
86
|
-
* detail stage that renders the active entry's preview, and a footer with
|
|
87
|
-
* reference links and a related-entry popup menu. Built entirely from public
|
|
88
|
-
* `@kerfjs/ui` primitives. Controlled and stateless — the app owns the `active`,
|
|
89
|
-
* `collapsed`, and `theme` signals and computes `content` from `active` in its own
|
|
90
|
-
* render; wire the sidebar/collapse/theme actions with `wireCatalog`.
|
|
91
|
-
*/
|
|
92
|
-
declare function Catalog({ brand, sections, active, content, collapsed, theme, headerActions, secondarySections, sidebarFooter, status, geometryOverlay, selectAction, toggleSidebarAction, toggleThemeAction, toggleSecondaryAction, className, }: CatalogProps): SafeHtml;
|
|
93
|
-
/**
|
|
94
|
-
* How a {@link CatalogExample}'s content aligns its visible left edge with the
|
|
95
|
-
* example's `ListHeader` label (which sits 16px in — 8px title + 8px label):
|
|
96
|
-
* - `'glyph'` — a bare glyph/text specimen with no inline geometry insets the full 16px.
|
|
97
|
-
* - `'inline-control'` — a control that already carries ~8px of its own inline padding insets 8px so its content lands on the same line.
|
|
98
|
-
* - `'none'` — a content-item / composition that owns its geometry and already aligns; no inset (default).
|
|
99
|
-
*/
|
|
7
|
+
/** Controlled, stateless component-catalog shell. */
|
|
8
|
+
declare function Catalog({ brand, sections, active, content, collapsed, theme, headerActions, secondarySections, sidebarFooter, status, geometryOverlay, stageRootAttributes, selectAction, toggleSidebarAction, toggleThemeAction, toggleSecondaryAction, className, slot, }: CatalogProps): kerfjs.SafeHtml;
|
|
9
|
+
|
|
10
|
+
/** How a specimen aligns its visible edge with its `ListHeader` label. */
|
|
100
11
|
type CatalogExampleAlign = 'glyph' | 'inline-control' | 'none';
|
|
12
|
+
interface CatalogExampleViewport {
|
|
13
|
+
layout?: 'grid' | 'flex' | 'flex-column';
|
|
14
|
+
width?: 'full' | 'compact' | 'medium' | 'wide' | 'text' | 'control';
|
|
15
|
+
/** Fixed specimen height; `app` frames an application-sized recipe or layout.
|
|
16
|
+
* A fixed height is definite, so a child that fills with `height: 100%`
|
|
17
|
+
* (a horizontal `ResizableRegion`, say) spans the whole frame. */
|
|
18
|
+
height?: 'short' | 'reduced' | 'medium' | 'tall' | 'app';
|
|
19
|
+
/** A minimum the frame may grow past. It is not a definite height: a child
|
|
20
|
+
* sized with `height: 100%` falls back to its content height, so use
|
|
21
|
+
* `height` when the specimen must fill the frame. */
|
|
22
|
+
minHeight?: 'short' | 'medium';
|
|
23
|
+
frame?: 'solid' | 'dashed';
|
|
24
|
+
surface?: 'default' | 'lowered';
|
|
25
|
+
overflow?: 'hidden' | 'auto-x';
|
|
26
|
+
responsive?: 'roomy-only';
|
|
27
|
+
shadow?: boolean;
|
|
28
|
+
/** Public component custom properties applied to the specimen viewport. */
|
|
29
|
+
tokens?: Readonly<Record<`--${string}`, string>>;
|
|
30
|
+
}
|
|
101
31
|
type CatalogExampleRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
102
32
|
'data-catalog-example'?: never;
|
|
103
33
|
'data-catalog-example-stack'?: never;
|
|
@@ -105,47 +35,39 @@ type CatalogExampleRootAttributes = Readonly<Record<`data-${string}`, string | u
|
|
|
105
35
|
'data-catalog-example-note'?: never;
|
|
106
36
|
'data-align'?: never;
|
|
107
37
|
}>;
|
|
108
|
-
type CatalogExampleStackRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
109
|
-
'data-catalog-example'?: never;
|
|
110
|
-
'data-catalog-example-stack'?: never;
|
|
111
|
-
'data-catalog-example-label'?: never;
|
|
112
|
-
'data-catalog-example-note'?: never;
|
|
113
|
-
'data-align'?: never;
|
|
114
|
-
}>;
|
|
115
38
|
interface CatalogExampleProps {
|
|
116
|
-
/** The example's label, shown as a `ListHeader` above the specimen. Omit for a bare specimen. */
|
|
117
39
|
label?: string;
|
|
118
|
-
/** Optional explanatory note between the label and the specimen. */
|
|
119
40
|
note?: SafeHtml | string;
|
|
120
|
-
/** Alignment inset for the specimen — see {@link CatalogExampleAlign}. Default `'none'`. */
|
|
121
41
|
align?: CatalogExampleAlign;
|
|
122
|
-
/**
|
|
42
|
+
/** Optional catalog-owned constraints for demonstrating layout components. */
|
|
43
|
+
viewport?: CatalogExampleViewport;
|
|
44
|
+
/** Replacement guidance shown when a roomy-only viewport is hidden. */
|
|
45
|
+
compactFallback?: SafeHtml | string;
|
|
123
46
|
rootAttributes?: CatalogExampleRootAttributes;
|
|
124
47
|
className?: string;
|
|
125
48
|
children?: KerfUiContent;
|
|
49
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
50
|
+
slot?: string;
|
|
126
51
|
}
|
|
127
|
-
/**
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
52
|
+
/** A labeled catalog specimen with optional explanatory text and alignment. */
|
|
53
|
+
declare function CatalogExample({ label, note, align, viewport, compactFallback, rootAttributes, className, children, slot, }: CatalogExampleProps): SafeHtml;
|
|
54
|
+
|
|
55
|
+
type CatalogExampleStackRootAttributes = Readonly<Record<`data-${string}`, string | undefined> & {
|
|
56
|
+
'data-catalog-example'?: never;
|
|
57
|
+
'data-catalog-example-stack'?: never;
|
|
58
|
+
'data-catalog-example-label'?: never;
|
|
59
|
+
'data-catalog-example-note'?: never;
|
|
60
|
+
'data-align'?: never;
|
|
61
|
+
}>;
|
|
136
62
|
interface CatalogExampleStackProps {
|
|
137
|
-
/** Accessible label for the stack region. */
|
|
138
63
|
label?: string;
|
|
139
|
-
/** Safe authoring `data-*` metadata for the rendered stack. Helper-owned structural attributes remain protected. */
|
|
140
64
|
rootAttributes?: CatalogExampleStackRootAttributes;
|
|
141
65
|
className?: string;
|
|
142
66
|
children?: KerfUiContent;
|
|
67
|
+
/** Native named-slot assignment when composed inside a web component. */
|
|
68
|
+
slot?: string;
|
|
143
69
|
}
|
|
144
|
-
/**
|
|
145
|
-
|
|
146
|
-
* example rhythm. The semantic `section` becomes a named `region` when `label`
|
|
147
|
-
* is supplied; an unlabeled stack remains an ordinary grouping.
|
|
148
|
-
*/
|
|
149
|
-
declare function CatalogExampleStack({ label, rootAttributes, className, children, }: CatalogExampleStackProps): SafeHtml;
|
|
70
|
+
/** A vertically stacked group of catalog examples. */
|
|
71
|
+
declare function CatalogExampleStack({ label, rootAttributes, className, children, slot, }: CatalogExampleStackProps): kerfjs.SafeHtml;
|
|
150
72
|
|
|
151
|
-
export { Catalog,
|
|
73
|
+
export { Catalog, CatalogExample, type CatalogExampleAlign, type CatalogExampleProps, CatalogExampleStack, type CatalogExampleStackProps, type CatalogExampleViewport, CatalogProps };
|