@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.
- package/ai/component-catalog.json +14 -9
- package/ai/component-composition-rules.json +1 -1
- package/ai/component-composition.d.ts +17 -0
- package/ai/component-composition.json +4 -3
- package/ai/component-composition.schema.json +326 -80
- package/ai/component-props-overlay.json +8568 -628
- package/ai/component-props-overlay.schema.json +15 -1
- package/ai/component-props.json +6221 -2069
- package/ai/component-props.schema.json +7 -0
- package/ai/components/radio-group.md +5 -1
- package/ai/components/state-banner.md +1 -1
- package/ai/components/surface-scaffold.md +3 -2
- package/ai/components/tab-bar.md +1 -1
- package/ai/components/toolbar-control-group.md +1 -1
- package/ai/public-api-signatures-v1.md +205 -42
- package/ai/skill.md +21 -8
- package/ai/view-document.schema.json +140 -86
- package/ai/webawesome-jsx-signatures-v1.md +1 -1
- package/dist/browser/column-explorer.js +5 -1
- package/dist/browser/radio-group.js +1 -0
- package/dist/catalog-resources.d.ts +2 -2
- package/dist/catalog.d.ts +2 -2
- package/dist/catalog.js +5 -5
- package/dist/{chunk-E2MTHHLS.js → chunk-2FA3SX57.js} +2 -2
- package/dist/{chunk-E2MTHHLS.js.map → chunk-2FA3SX57.js.map} +1 -1
- package/dist/{chunk-ZC4KSRAF.js → chunk-4CYCJ3NY.js} +6 -4
- package/dist/chunk-4CYCJ3NY.js.map +1 -0
- package/dist/{chunk-IMXLOMTF.js → chunk-76BLSFEA.js} +30 -12
- package/dist/chunk-76BLSFEA.js.map +1 -0
- package/dist/{chunk-IR32NI2O.js → chunk-ALBFHXMZ.js} +3 -3
- package/dist/chunk-ALBFHXMZ.js.map +1 -0
- package/dist/{chunk-3ZWYGGEC.js → chunk-ASU4ODOH.js} +38 -7
- package/dist/chunk-ASU4ODOH.js.map +1 -0
- package/dist/chunk-BMUYZKXW.js +155 -0
- package/dist/chunk-BMUYZKXW.js.map +1 -0
- package/dist/{chunk-GQUDCWOD.js → chunk-D2KHQNJ6.js} +49 -23
- package/dist/chunk-D2KHQNJ6.js.map +1 -0
- package/dist/{chunk-34FWYJX6.js → chunk-ECJHCPBN.js} +8 -2
- package/dist/chunk-ECJHCPBN.js.map +1 -0
- package/dist/{chunk-DBCDYBZP.js → chunk-HHEBNP6Z.js} +2 -2
- package/dist/{chunk-DBCDYBZP.js.map → chunk-HHEBNP6Z.js.map} +1 -1
- package/dist/{chunk-3ZKUXWAV.js → chunk-IPYQYLSX.js} +16 -9
- package/dist/chunk-IPYQYLSX.js.map +1 -0
- package/dist/{chunk-SJEPM5ZU.js → chunk-LETAE6SX.js} +2 -2
- package/dist/{chunk-SJEPM5ZU.js.map → chunk-LETAE6SX.js.map} +1 -1
- package/dist/chunk-MVWR5WRX.js +99 -0
- package/dist/chunk-MVWR5WRX.js.map +1 -0
- package/dist/{chunk-6T7AX365.js → chunk-OSL4LQ7T.js} +52 -23
- package/dist/chunk-OSL4LQ7T.js.map +1 -0
- package/dist/{chunk-OHT2AXER.js → chunk-QSJAIXLM.js} +19 -3
- package/dist/chunk-QSJAIXLM.js.map +1 -0
- package/dist/{chunk-UQ4FRQ6M.js → chunk-R4JK2C6D.js} +13 -3
- package/dist/chunk-R4JK2C6D.js.map +1 -0
- package/dist/{chunk-5A2DN3LR.js → chunk-SGYBIKQA.js} +3 -1
- package/dist/chunk-SGYBIKQA.js.map +1 -0
- package/dist/{chunk-K3C35KGR.js → chunk-XO5IOPM5.js} +2 -2
- package/dist/{chunk-K3C35KGR.js.map → chunk-XO5IOPM5.js.map} +1 -1
- package/dist/collapsible-panel.d.ts +2 -2
- package/dist/collapsible-panel.js +2 -2
- package/dist/column-explorer.d.ts +5 -1
- package/dist/column-explorer.js +5 -1
- package/dist/column-track.d.ts +3 -1
- package/dist/column-track.js +1 -1
- package/dist/editor.d.ts +87 -2
- package/dist/editor.js +2249 -1320
- package/dist/editor.js.map +1 -1
- package/dist/index.js +12 -12
- package/dist/list-detail-dialog.d.ts +2 -2
- package/dist/list-detail-dialog.js +4 -4
- package/dist/list-header.d.ts +47 -5
- package/dist/list-header.js +1 -1
- package/dist/message-composer.js +1 -1
- package/dist/{nav-stack-vQ3ieerq.d.ts → nav-stack-DKrvqFjA.d.ts} +1 -1
- package/dist/nav-stack.d.ts +2 -2
- package/dist/nav-stack.js +1 -1
- package/dist/{panel-toolbar-vg6Ir5Dy.d.ts → panel-toolbar-CEcHHDkn.d.ts} +8 -0
- package/dist/radio-group.d.ts +19 -2
- package/dist/radio-group.js +3 -1
- package/dist/split-view.d.ts +2 -2
- package/dist/split-view.js +1 -1
- package/dist/styles/column-track.css +7 -2
- package/dist/styles/components/actions/toolbar-control-group/toolbar-control-group.css +11 -4
- package/dist/styles/components/collections/list-header/list-header.css +50 -0
- package/dist/styles/components/collections/list-item/list-item.css +6 -1
- package/dist/styles/components/collections/tree-list/tree-list.css +3 -2
- package/dist/styles/components/forms/radio-group/radio-group.css +107 -0
- package/dist/styles/components/layout/column-track/column-track.css +7 -2
- package/dist/styles/components/surfaces/surface-scaffold/surface-scaffold.css +30 -1
- package/dist/styles/editor/editor.css +0 -23
- package/dist/styles/list-header.css +50 -0
- package/dist/styles/list-item.css +6 -1
- package/dist/styles/radio-group.css +107 -0
- package/dist/styles/surface-scaffold.css +30 -1
- package/dist/styles/toolbar-control-group.css +11 -4
- package/dist/styles/tree-list.css +3 -2
- package/dist/surface-scaffold-register.js +1 -1
- package/dist/surface-scaffold.d.ts +46 -11
- package/dist/surface-scaffold.js +2 -2
- package/dist/toolbar-control-group.d.ts +10 -1
- package/dist/toolbar-control-group.js +1 -1
- package/dist/tree-list.d.ts +7 -1
- package/dist/tree-list.js +1 -1
- package/dist/view-runtime.d.ts +9 -0
- package/dist/view-runtime.js +8 -0
- package/dist/view-runtime.js.map +1 -0
- package/dist/wire-catalog.d.ts +2 -2
- package/dist/wire-catalog.js +1 -1
- package/dist/wire-search-fields.js +1 -1
- package/dist/wire-tab-bars.d.ts +10 -0
- package/dist/wire-tab-bars.js +1 -1
- package/dist/wire-tag-fields.js +1 -1
- package/dist/wire-workbench.d.ts +17 -1
- package/dist/wire-workbench.js +1 -1
- package/dist/workbench-dialog.d.ts +2 -2
- package/dist/workbench-dialog.js +4 -4
- package/dist/workbench.d.ts +10 -2
- package/dist/workbench.js +1 -1
- package/docs/accessibility.md +1 -1
- package/docs/column-explorer.md +4 -0
- package/docs/component-contract.md +10 -4
- package/docs/component-integration.md +7 -3
- package/docs/component-selection.md +2 -1
- package/docs/design/sketch/Kerf-UI.sketch +0 -0
- package/docs/design/sketch/coverage.md +7 -6
- package/docs/design/sketch/forms/README.md +5 -4
- package/docs/design/sketch/unified/pages/forms.png +0 -0
- package/docs/design/templates/radio-group/tiles-dark.svg +1 -0
- package/docs/design/templates/radio-group/tiles.svg +1 -0
- package/docs/design/templates/radio-group-dark.svg +1 -1
- package/docs/design/templates/radio-group.svg +1 -1
- package/docs/editor-host.md +90 -5
- package/docs/interaction-conventions.md +2 -0
- package/docs/layout.md +1 -1
- package/docs/surface-scaffold.md +49 -2
- package/docs/tree-list.md +10 -0
- package/docs/workbench.md +16 -0
- package/evaluator/firefox-app-data.d.mts +4 -0
- package/evaluator/firefox-app-data.mjs +35 -0
- package/evaluator/index.mjs +19 -5
- package/llms.txt +20 -4
- package/package.json +8 -1
- package/props/component-props.d.mts +3 -0
- package/view/cli.mjs +36 -5
- package/view/contract.mjs +3 -0
- package/view/generate.mjs +8 -7
- package/view/index.d.mts +14 -0
- package/view/project-types-worker.mjs +55 -0
- package/view/project-types.d.mts +43 -0
- package/view/project-types.mjs +618 -0
- package/view/type-expression.d.mts +15 -0
- package/view/type-expression.mjs +162 -0
- package/view/types.mjs +4 -0
- package/view/validate.mjs +20 -1
- package/vite-editor.d.mts +31 -3
- package/vite-editor.mjs +168 -4
- package/dist/chunk-34FWYJX6.js.map +0 -1
- package/dist/chunk-3ZKUXWAV.js.map +0 -1
- package/dist/chunk-3ZWYGGEC.js.map +0 -1
- package/dist/chunk-5A2DN3LR.js.map +0 -1
- package/dist/chunk-6T7AX365.js.map +0 -1
- package/dist/chunk-BMOZSNDU.js +0 -133
- package/dist/chunk-BMOZSNDU.js.map +0 -1
- package/dist/chunk-GQUDCWOD.js.map +0 -1
- package/dist/chunk-IMXLOMTF.js.map +0 -1
- package/dist/chunk-IR32NI2O.js.map +0 -1
- package/dist/chunk-MLDO7WLA.js +0 -82
- package/dist/chunk-MLDO7WLA.js.map +0 -1
- package/dist/chunk-OHT2AXER.js.map +0 -1
- package/dist/chunk-UQ4FRQ6M.js.map +0 -1
- package/dist/chunk-ZC4KSRAF.js.map +0 -1
package/dist/column-explorer.js
CHANGED
package/dist/column-track.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ interface ColumnTrackProps {
|
|
|
19
19
|
* in, and scrolling snaps to column starts.
|
|
20
20
|
*/
|
|
21
21
|
layout?: ColumnTrackLayout;
|
|
22
|
+
/** Inline edge clearance: default uses the layout margin; none clips columns at the track edges. */
|
|
23
|
+
inset?: 'default' | 'none';
|
|
22
24
|
/** Narrowest a `scroll` column gets before the track scrolls; default 250px. */
|
|
23
25
|
minColumnWidth?: CssLength;
|
|
24
26
|
/** How much of the next column a `paged` track shows; default 24px. */
|
|
@@ -45,6 +47,6 @@ interface ColumnTrackProps {
|
|
|
45
47
|
* insets and vertical scrolling. Kerf owns the overflow, the paged snapping,
|
|
46
48
|
* and reduced motion.
|
|
47
49
|
*/
|
|
48
|
-
declare function ColumnTrack({ children, layout, minColumnWidth, peek, ariaLabel, id, className, rootAttributes, slot, }: ColumnTrackProps): kerfjs.SafeHtml;
|
|
50
|
+
declare function ColumnTrack({ children, layout, inset, minColumnWidth, peek, ariaLabel, id, className, rootAttributes, slot, }: ColumnTrackProps): kerfjs.SafeHtml;
|
|
49
51
|
|
|
50
52
|
export { ColumnTrack, type ColumnTrackLayout, type ColumnTrackProps };
|
package/dist/column-track.js
CHANGED
package/dist/editor.d.ts
CHANGED
|
@@ -1,9 +1,48 @@
|
|
|
1
1
|
import * as kerfjs from 'kerfjs';
|
|
2
2
|
import { SafeHtml } from 'kerfjs';
|
|
3
|
-
import {
|
|
3
|
+
import { ViewType, ViewDocument, ViewCatalog, ViewValue } from '@kerfjs/ui/view';
|
|
4
|
+
import { IconNode } from 'lucide';
|
|
5
|
+
|
|
6
|
+
interface TypeSuggestion {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly source?: string;
|
|
9
|
+
readonly text: string;
|
|
10
|
+
readonly cursor: number;
|
|
11
|
+
}
|
|
12
|
+
interface TypeExpressionResult {
|
|
13
|
+
readonly type?: ViewType;
|
|
14
|
+
readonly suggestions?: readonly TypeSuggestion[];
|
|
15
|
+
readonly diagnostics: readonly {
|
|
16
|
+
readonly message: string;
|
|
17
|
+
readonly start?: number;
|
|
18
|
+
readonly length?: number;
|
|
19
|
+
}[];
|
|
20
|
+
}
|
|
21
|
+
type ProjectTypeRequest = {
|
|
22
|
+
readonly action: 'analyze';
|
|
23
|
+
readonly source: string;
|
|
24
|
+
readonly text: string;
|
|
25
|
+
readonly cursor?: number;
|
|
26
|
+
/** False skips completion suggestions, the costliest analysis step. */
|
|
27
|
+
readonly suggest?: boolean;
|
|
28
|
+
readonly declared?: ViewType;
|
|
29
|
+
} | {
|
|
30
|
+
readonly action: 'validate';
|
|
31
|
+
readonly source: string;
|
|
32
|
+
readonly document: ViewDocument;
|
|
33
|
+
};
|
|
34
|
+
interface ProjectTypeResult extends TypeExpressionResult {
|
|
35
|
+
readonly document?: ViewDocument;
|
|
36
|
+
}
|
|
37
|
+
/** A host-provided project compiler, normally the editor dev-server endpoint. */
|
|
38
|
+
type ProjectTypeService = (request: ProjectTypeRequest) => Promise<ProjectTypeResult>;
|
|
39
|
+
/** The default dev-server transport; custom editor hosts can supply their own. */
|
|
40
|
+
declare function devServerTypeService(api?: string): ProjectTypeService;
|
|
4
41
|
|
|
5
42
|
/** Reads and writes documents by project-relative path. */
|
|
6
43
|
interface EditorStorage {
|
|
44
|
+
/** Optional project TypeScript compiler for parameter expressions. */
|
|
45
|
+
readonly types?: ProjectTypeService;
|
|
7
46
|
/** The document's text, or undefined when there is none at `path`. */
|
|
8
47
|
read(path: string): Promise<string | undefined>;
|
|
9
48
|
write(path: string, text: string): Promise<void>;
|
|
@@ -21,8 +60,44 @@ declare const EDITOR_LIST_API = "/__kerf-ui-editor/api/files";
|
|
|
21
60
|
/** Storage over the dev server that hosts the editor. */
|
|
22
61
|
declare function devServerStorage(api?: string, listApi?: string): EditorStorage;
|
|
23
62
|
|
|
63
|
+
/** Literal Library sample data; view bindings and expressions are not evaluated. */
|
|
64
|
+
type CatalogLibraryPreviewJson =
|
|
65
|
+
| null
|
|
66
|
+
| string
|
|
67
|
+
| number
|
|
68
|
+
| boolean
|
|
69
|
+
| readonly CatalogLibraryPreviewJson[]
|
|
70
|
+
| { readonly [key: string]: CatalogLibraryPreviewJson };
|
|
71
|
+
interface CatalogLibraryPreview {
|
|
72
|
+
readonly props?: Readonly<Record<string, CatalogLibraryPreviewJson>>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
type ComponentFunctions = Readonly<Record<string, (props: never) => SafeHtml>>;
|
|
76
|
+
interface LibraryPreviewContext<Props> {
|
|
77
|
+
readonly key: string;
|
|
78
|
+
readonly name: string;
|
|
79
|
+
readonly props: Readonly<Props>;
|
|
80
|
+
}
|
|
81
|
+
interface LibraryPreview<Props = unknown> {
|
|
82
|
+
sampleProps?(): Partial<Props>;
|
|
83
|
+
render?(context: LibraryPreviewContext<Props>): SafeHtml | undefined;
|
|
84
|
+
readonly icon?: IconNode;
|
|
85
|
+
readonly fit?: 'contain' | 'fill';
|
|
86
|
+
}
|
|
87
|
+
type LibraryPreviews = Readonly<Record<string, LibraryPreview>>;
|
|
88
|
+
type LibraryPreviewsFor<C extends ComponentFunctions> = {
|
|
89
|
+
readonly [K in keyof C]?: LibraryPreview<Parameters<C[K]>[0]>;
|
|
90
|
+
};
|
|
91
|
+
declare function defineLibraryPreviews<const C extends ComponentFunctions>(components: C, previews: LibraryPreviewsFor<NoInfer<C>>): LibraryPreviewsFor<C>;
|
|
92
|
+
/** Literal JSON samples; no document bindings or executable values are evaluated. */
|
|
93
|
+
type LibraryPreviewJson = CatalogLibraryPreviewJson;
|
|
94
|
+
type SerializableLibraryPreview = CatalogLibraryPreview;
|
|
95
|
+
type SerializableLibraryPreviews = Readonly<Record<string, SerializableLibraryPreview>>;
|
|
96
|
+
|
|
24
97
|
interface InspectorProp {
|
|
25
98
|
readonly name: string;
|
|
99
|
+
/** The task-facing name the Inspector shows (KF-HP1J4Z: Button text). */
|
|
100
|
+
readonly label?: string;
|
|
26
101
|
readonly type: {
|
|
27
102
|
readonly kind: string;
|
|
28
103
|
readonly text?: string;
|
|
@@ -30,6 +105,8 @@ interface InspectorProp {
|
|
|
30
105
|
readonly required: boolean;
|
|
31
106
|
readonly default?: string | number | boolean;
|
|
32
107
|
readonly group?: string;
|
|
108
|
+
/** A component-specific task inside its group (KF-4BPSTB: Link, Popup). */
|
|
109
|
+
readonly subgroup?: string;
|
|
33
110
|
readonly order?: number;
|
|
34
111
|
readonly control?: string;
|
|
35
112
|
readonly zone?: string;
|
|
@@ -101,6 +178,8 @@ interface EditorCatalog {
|
|
|
101
178
|
* (KF-H3CB2P): Kerf UI's, then the host's.
|
|
102
179
|
*/
|
|
103
180
|
readonly placeholders: Placeholders;
|
|
181
|
+
/** Library-only previews; no effect on component insertion or the canvas. */
|
|
182
|
+
readonly libraryPreviews?: LibraryPreviews;
|
|
104
183
|
}
|
|
105
184
|
interface EditorCatalogInputs {
|
|
106
185
|
/** `component-props.json` catalogs: Kerf UI's and any package's. */
|
|
@@ -116,6 +195,8 @@ interface EditorCatalogInputs {
|
|
|
116
195
|
* fresh value. They add to and replace Kerf UI's own.
|
|
117
196
|
*/
|
|
118
197
|
readonly placeholders?: Placeholders;
|
|
198
|
+
/** Later whole entries replace catalog samples and first-party previews. */
|
|
199
|
+
readonly libraryPreviews?: LibraryPreviews;
|
|
119
200
|
}
|
|
120
201
|
declare function createEditorCatalog(inputs: EditorCatalogInputs): EditorCatalog;
|
|
121
202
|
/**
|
|
@@ -321,11 +402,15 @@ interface EditorOptions {
|
|
|
321
402
|
* the last document; `devServerStorage()` uses the host's dev server.
|
|
322
403
|
*/
|
|
323
404
|
readonly storage?: EditorStorage;
|
|
405
|
+
/** Owning-project TypeScript service; devServerStorage provides the default. */
|
|
406
|
+
readonly typeService?: ProjectTypeService;
|
|
324
407
|
/**
|
|
325
408
|
* The components the editor can place and preview: Kerf UI's catalogs and
|
|
326
409
|
* functions, plus an application's (`createEditorCatalog`).
|
|
327
410
|
*/
|
|
328
411
|
readonly catalog: EditorCatalog;
|
|
412
|
+
/** Library-only previews; complete entries override the catalog registrations. */
|
|
413
|
+
readonly libraryPreviews?: LibraryPreviews;
|
|
329
414
|
/**
|
|
330
415
|
* Editors for named types (KF-EXA2WH: field editor API), such as a
|
|
331
416
|
* catalog's `'ListConfig'` or an application's `'InvoiceFilter'`: each
|
|
@@ -359,4 +444,4 @@ declare function createEditor(options: EditorOptions): {
|
|
|
359
444
|
loadError: kerfjs.Signal<string | null>;
|
|
360
445
|
};
|
|
361
446
|
|
|
362
|
-
export { type ActionLogEntry, type ActionOutcome, type CatalogEntry, type ComponentFunction, type DeviceFrame, type DeviceInsets, type DeviceKind, type DevicePreset, type DevicePresetsOption, EDITOR_FILE_API, EDITOR_LIST_API, type EditorCatalog, type EditorCatalogInputs, type EditorOptions, type EditorStorage, type FieldEditor, type FieldEditorAttributes, type FieldEditorContext, type FieldEditorControlKind, type FieldEditors, type PaletteGroup, type PlayActionContext, type PlayHandler, type PlayHandlers, type PlayNavStack, type PlayView, type PropsComponent, SHIPPED_DEVICE_PRESETS, type Selection, WORKBENCH_ID, componentMap, createEditor, createEditorCatalog, devServerStorage, emptyDocument };
|
|
447
|
+
export { type ActionLogEntry, type ActionOutcome, type CatalogEntry, type ComponentFunction, type DeviceFrame, type DeviceInsets, type DeviceKind, type DevicePreset, type DevicePresetsOption, EDITOR_FILE_API, EDITOR_LIST_API, type EditorCatalog, type EditorCatalogInputs, type EditorOptions, type EditorStorage, type FieldEditor, type FieldEditorAttributes, type FieldEditorContext, type FieldEditorControlKind, type FieldEditors, type LibraryPreview, type LibraryPreviewContext, type LibraryPreviewJson, type LibraryPreviews, type LibraryPreviewsFor, type PaletteGroup, type PlayActionContext, type PlayHandler, type PlayHandlers, type PlayNavStack, type PlayView, type ProjectTypeRequest, type ProjectTypeResult, type ProjectTypeService, type PropsComponent, SHIPPED_DEVICE_PRESETS, type Selection, type SerializableLibraryPreview, type SerializableLibraryPreviews, type TypeSuggestion, WORKBENCH_ID, componentMap, createEditor, createEditorCatalog, defineLibraryPreviews, devServerStorage, devServerTypeService, emptyDocument };
|