@kubuild/components 0.8.1 → 0.8.2
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/dist/blocks/forms.d.cts +6 -0
- package/dist/blocks/forms.d.cts.map +1 -0
- package/dist/blocks/forms.d.ts +1 -1
- package/dist/blocks/forms.d.ts.map +1 -1
- package/dist/blocks/index.cjs.map +1 -1
- package/dist/blocks/index.d.cts +12 -0
- package/dist/blocks/index.d.cts.map +1 -0
- package/dist/blocks/index.d.ts +6 -6
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/blocks/index.js +1 -1
- package/dist/blocks/layout.d.cts +6 -0
- package/dist/blocks/layout.d.cts.map +1 -0
- package/dist/blocks/layout.d.ts +1 -1
- package/dist/blocks/layout.d.ts.map +1 -1
- package/dist/blocks/sales.d.cts +7 -0
- package/dist/blocks/sales.d.cts.map +1 -0
- package/dist/blocks/sales.d.ts +1 -1
- package/dist/blocks/sales.d.ts.map +1 -1
- package/dist/blocks/sections.d.cts +6 -0
- package/dist/blocks/sections.d.cts.map +1 -0
- package/dist/blocks/sections.d.ts +1 -1
- package/dist/blocks/sections.d.ts.map +1 -1
- package/dist/blocks/types.d.cts +13 -0
- package/dist/blocks/types.d.cts.map +1 -0
- package/dist/canonical-props.d.cts +8 -0
- package/dist/canonical-props.d.cts.map +1 -0
- package/dist/canonical-props.d.ts +1 -1
- package/dist/canonical-props.d.ts.map +1 -1
- package/dist/{chunk-OK53DS7G.js → chunk-BCQERSFK.js} +1 -1
- package/dist/chunk-BCQERSFK.js.map +1 -0
- package/dist/{chunk-CJN5OHHX.js → chunk-TTVLQR7L.js} +2 -2
- package/dist/chunk-TTVLQR7L.js.map +1 -0
- package/dist/{chunk-DIZKTXJI.js → chunk-YEN6JQLF.js} +1 -1
- package/dist/chunk-YEN6JQLF.js.map +1 -0
- package/dist/definitions/constants.d.cts +10 -0
- package/dist/definitions/constants.d.cts.map +1 -0
- package/dist/definitions/conversion/accordion.d.cts +8 -0
- package/dist/definitions/conversion/accordion.d.cts.map +1 -0
- package/dist/definitions/conversion/accordion.d.ts +1 -1
- package/dist/definitions/conversion/accordion.d.ts.map +1 -1
- package/dist/definitions/conversion/carousel.d.cts +7 -0
- package/dist/definitions/conversion/carousel.d.cts.map +1 -0
- package/dist/definitions/conversion/carousel.d.ts +1 -1
- package/dist/definitions/conversion/carousel.d.ts.map +1 -1
- package/dist/definitions/conversion/countdown.d.cts +19 -0
- package/dist/definitions/conversion/countdown.d.cts.map +1 -0
- package/dist/definitions/conversion/countdown.d.ts +1 -1
- package/dist/definitions/conversion/countdown.d.ts.map +1 -1
- package/dist/definitions/conversion/divider.d.cts +9 -0
- package/dist/definitions/conversion/divider.d.cts.map +1 -0
- package/dist/definitions/conversion/divider.d.ts +1 -1
- package/dist/definitions/conversion/divider.d.ts.map +1 -1
- package/dist/definitions/conversion/index.d.cts +7 -0
- package/dist/definitions/conversion/index.d.cts.map +1 -0
- package/dist/definitions/conversion/index.d.ts +6 -6
- package/dist/definitions/conversion/index.d.ts.map +1 -1
- package/dist/definitions/conversion/rating.d.cts +7 -0
- package/dist/definitions/conversion/rating.d.cts.map +1 -0
- package/dist/definitions/conversion/rating.d.ts +1 -1
- package/dist/definitions/conversion/rating.d.ts.map +1 -1
- package/dist/definitions/conversion/tabs.d.cts +9 -0
- package/dist/definitions/conversion/tabs.d.cts.map +1 -0
- package/dist/definitions/conversion/tabs.d.ts +1 -1
- package/dist/definitions/conversion/tabs.d.ts.map +1 -1
- package/dist/definitions/data/collection.d.cts +3 -0
- package/dist/definitions/data/collection.d.cts.map +1 -0
- package/dist/definitions/data/collection.d.ts +1 -1
- package/dist/definitions/data/collection.d.ts.map +1 -1
- package/dist/definitions/data/index.d.cts +4 -0
- package/dist/definitions/data/index.d.cts.map +1 -0
- package/dist/definitions/data/index.d.ts +3 -3
- package/dist/definitions/data/index.d.ts.map +1 -1
- package/dist/definitions/data/list.d.cts +4 -0
- package/dist/definitions/data/list.d.cts.map +1 -0
- package/dist/definitions/data/list.d.ts +1 -1
- package/dist/definitions/data/list.d.ts.map +1 -1
- package/dist/definitions/data/table.d.cts +5 -0
- package/dist/definitions/data/table.d.cts.map +1 -0
- package/dist/definitions/data/table.d.ts +1 -1
- package/dist/definitions/data/table.d.ts.map +1 -1
- package/dist/definitions/form/button.d.cts +4 -0
- package/dist/definitions/form/button.d.cts.map +1 -0
- package/dist/definitions/form/button.d.ts +1 -1
- package/dist/definitions/form/button.d.ts.map +1 -1
- package/dist/definitions/form/checkbox.d.cts +3 -0
- package/dist/definitions/form/checkbox.d.cts.map +1 -0
- package/dist/definitions/form/checkbox.d.ts +1 -1
- package/dist/definitions/form/checkbox.d.ts.map +1 -1
- package/dist/definitions/form/file-upload.d.cts +3 -0
- package/dist/definitions/form/file-upload.d.cts.map +1 -0
- package/dist/definitions/form/file-upload.d.ts +1 -1
- package/dist/definitions/form/file-upload.d.ts.map +1 -1
- package/dist/definitions/form/form.d.cts +3 -0
- package/dist/definitions/form/form.d.cts.map +1 -0
- package/dist/definitions/form/form.d.ts +1 -1
- package/dist/definitions/form/form.d.ts.map +1 -1
- package/dist/definitions/form/index.d.cts +10 -0
- package/dist/definitions/form/index.d.cts.map +1 -0
- package/dist/definitions/form/index.d.ts +9 -9
- package/dist/definitions/form/index.d.ts.map +1 -1
- package/dist/definitions/form/input.d.cts +3 -0
- package/dist/definitions/form/input.d.cts.map +1 -0
- package/dist/definitions/form/input.d.ts +1 -1
- package/dist/definitions/form/input.d.ts.map +1 -1
- package/dist/definitions/form/radio.d.cts +5 -0
- package/dist/definitions/form/radio.d.cts.map +1 -0
- package/dist/definitions/form/radio.d.ts +1 -1
- package/dist/definitions/form/radio.d.ts.map +1 -1
- package/dist/definitions/form/select.d.cts +3 -0
- package/dist/definitions/form/select.d.cts.map +1 -0
- package/dist/definitions/form/select.d.ts +1 -1
- package/dist/definitions/form/select.d.ts.map +1 -1
- package/dist/definitions/form/switch.d.cts +3 -0
- package/dist/definitions/form/switch.d.cts.map +1 -0
- package/dist/definitions/form/switch.d.ts +1 -1
- package/dist/definitions/form/switch.d.ts.map +1 -1
- package/dist/definitions/form/textarea.d.cts +3 -0
- package/dist/definitions/form/textarea.d.cts.map +1 -0
- package/dist/definitions/form/textarea.d.ts +1 -1
- package/dist/definitions/form/textarea.d.ts.map +1 -1
- package/dist/definitions/index.cjs.map +1 -1
- package/dist/definitions/index.d.cts +13 -0
- package/dist/definitions/index.d.cts.map +1 -0
- package/dist/definitions/index.d.ts +10 -10
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/index.js +2 -2
- package/dist/definitions/interactive/collapsible.d.cts +3 -0
- package/dist/definitions/interactive/collapsible.d.cts.map +1 -0
- package/dist/definitions/interactive/collapsible.d.ts +1 -1
- package/dist/definitions/interactive/collapsible.d.ts.map +1 -1
- package/dist/definitions/interactive/drawer.d.cts +3 -0
- package/dist/definitions/interactive/drawer.d.cts.map +1 -0
- package/dist/definitions/interactive/drawer.d.ts +1 -1
- package/dist/definitions/interactive/drawer.d.ts.map +1 -1
- package/dist/definitions/interactive/index.d.cts +4 -0
- package/dist/definitions/interactive/index.d.cts.map +1 -0
- package/dist/definitions/interactive/index.d.ts +3 -3
- package/dist/definitions/interactive/index.d.ts.map +1 -1
- package/dist/definitions/interactive/modal.d.cts +3 -0
- package/dist/definitions/interactive/modal.d.cts.map +1 -0
- package/dist/definitions/interactive/modal.d.ts +1 -1
- package/dist/definitions/interactive/modal.d.ts.map +1 -1
- package/dist/definitions/layout/columns.d.cts +3 -0
- package/dist/definitions/layout/columns.d.cts.map +1 -0
- package/dist/definitions/layout/columns.d.ts +1 -1
- package/dist/definitions/layout/columns.d.ts.map +1 -1
- package/dist/definitions/layout/container.d.cts +3 -0
- package/dist/definitions/layout/container.d.cts.map +1 -0
- package/dist/definitions/layout/container.d.ts +1 -1
- package/dist/definitions/layout/container.d.ts.map +1 -1
- package/dist/definitions/layout/flex.d.cts +7 -0
- package/dist/definitions/layout/flex.d.cts.map +1 -0
- package/dist/definitions/layout/flex.d.ts +1 -1
- package/dist/definitions/layout/flex.d.ts.map +1 -1
- package/dist/definitions/layout/grid.d.cts +7 -0
- package/dist/definitions/layout/grid.d.cts.map +1 -0
- package/dist/definitions/layout/grid.d.ts +1 -1
- package/dist/definitions/layout/grid.d.ts.map +1 -1
- package/dist/definitions/layout/index.d.cts +7 -0
- package/dist/definitions/layout/index.d.cts.map +1 -0
- package/dist/definitions/layout/index.d.ts +6 -6
- package/dist/definitions/layout/index.d.ts.map +1 -1
- package/dist/definitions/layout/page.d.cts +3 -0
- package/dist/definitions/layout/page.d.cts.map +1 -0
- package/dist/definitions/layout/page.d.ts +1 -1
- package/dist/definitions/layout/page.d.ts.map +1 -1
- package/dist/definitions/layout/section.d.cts +3 -0
- package/dist/definitions/layout/section.d.cts.map +1 -0
- package/dist/definitions/layout/section.d.ts +1 -1
- package/dist/definitions/layout/section.d.ts.map +1 -1
- package/dist/definitions/media/html-embed.d.cts +3 -0
- package/dist/definitions/media/html-embed.d.cts.map +1 -0
- package/dist/definitions/media/html-embed.d.ts +1 -1
- package/dist/definitions/media/html-embed.d.ts.map +1 -1
- package/dist/definitions/media/icon.d.cts +3 -0
- package/dist/definitions/media/icon.d.cts.map +1 -0
- package/dist/definitions/media/icon.d.ts +1 -1
- package/dist/definitions/media/icon.d.ts.map +1 -1
- package/dist/definitions/media/image.d.cts +3 -0
- package/dist/definitions/media/image.d.cts.map +1 -0
- package/dist/definitions/media/image.d.ts +1 -1
- package/dist/definitions/media/image.d.ts.map +1 -1
- package/dist/definitions/media/index.d.cts +5 -0
- package/dist/definitions/media/index.d.cts.map +1 -0
- package/dist/definitions/media/index.d.ts +4 -4
- package/dist/definitions/media/index.d.ts.map +1 -1
- package/dist/definitions/media/video.d.cts +3 -0
- package/dist/definitions/media/video.d.cts.map +1 -0
- package/dist/definitions/media/video.d.ts +1 -1
- package/dist/definitions/media/video.d.ts.map +1 -1
- package/dist/definitions/types.d.cts +8 -0
- package/dist/definitions/types.d.cts.map +1 -0
- package/dist/definitions/typography/badge.d.cts +3 -0
- package/dist/definitions/typography/badge.d.cts.map +1 -0
- package/dist/definitions/typography/badge.d.ts +1 -1
- package/dist/definitions/typography/badge.d.ts.map +1 -1
- package/dist/definitions/typography/blockquote.d.cts +3 -0
- package/dist/definitions/typography/blockquote.d.cts.map +1 -0
- package/dist/definitions/typography/blockquote.d.ts +1 -1
- package/dist/definitions/typography/blockquote.d.ts.map +1 -1
- package/dist/definitions/typography/code-block.d.cts +3 -0
- package/dist/definitions/typography/code-block.d.cts.map +1 -0
- package/dist/definitions/typography/code-block.d.ts +1 -1
- package/dist/definitions/typography/code-block.d.ts.map +1 -1
- package/dist/definitions/typography/heading.d.cts +3 -0
- package/dist/definitions/typography/heading.d.cts.map +1 -0
- package/dist/definitions/typography/heading.d.ts +1 -1
- package/dist/definitions/typography/heading.d.ts.map +1 -1
- package/dist/definitions/typography/index.d.cts +8 -0
- package/dist/definitions/typography/index.d.cts.map +1 -0
- package/dist/definitions/typography/index.d.ts +7 -7
- package/dist/definitions/typography/index.d.ts.map +1 -1
- package/dist/definitions/typography/link.d.cts +3 -0
- package/dist/definitions/typography/link.d.cts.map +1 -0
- package/dist/definitions/typography/link.d.ts +1 -1
- package/dist/definitions/typography/link.d.ts.map +1 -1
- package/dist/definitions/typography/paragraph.d.cts +3 -0
- package/dist/definitions/typography/paragraph.d.cts.map +1 -0
- package/dist/definitions/typography/paragraph.d.ts +1 -1
- package/dist/definitions/typography/paragraph.d.ts.map +1 -1
- package/dist/definitions/typography/text.d.cts +3 -0
- package/dist/definitions/typography/text.d.cts.map +1 -0
- package/dist/definitions/typography/text.d.ts +1 -1
- package/dist/definitions/typography/text.d.ts.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/prop-types.d.cts +10 -0
- package/dist/prop-types.d.cts.map +1 -0
- package/dist/prop-types.d.ts +1 -1
- package/dist/prop-types.d.ts.map +1 -1
- package/dist/registry.d.cts +108 -0
- package/dist/registry.d.cts.map +1 -0
- package/dist/registry.d.ts +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/requirements.d.cts +18 -0
- package/dist/requirements.d.cts.map +1 -0
- package/dist/requirements.d.ts +1 -1
- package/dist/requirements.d.ts.map +1 -1
- package/dist/traits/common.d.cts +8 -0
- package/dist/traits/common.d.cts.map +1 -0
- package/dist/traits/common.d.ts +1 -1
- package/dist/traits/common.d.ts.map +1 -1
- package/dist/traits/form.d.cts +80 -0
- package/dist/traits/form.d.cts.map +1 -0
- package/dist/traits/form.d.ts +1 -1
- package/dist/traits/form.d.ts.map +1 -1
- package/dist/traits/index.cjs.map +1 -1
- package/dist/traits/index.d.cts +7 -0
- package/dist/traits/index.d.cts.map +1 -0
- package/dist/traits/index.d.ts +6 -6
- package/dist/traits/index.d.ts.map +1 -1
- package/dist/traits/index.js +1 -1
- package/dist/traits/link.d.cts +8 -0
- package/dist/traits/link.d.cts.map +1 -0
- package/dist/traits/link.d.ts +1 -1
- package/dist/traits/link.d.ts.map +1 -1
- package/dist/traits/media.d.cts +18 -0
- package/dist/traits/media.d.cts.map +1 -0
- package/dist/traits/media.d.ts +1 -1
- package/dist/traits/media.d.ts.map +1 -1
- package/dist/traits/structure.d.cts +10 -0
- package/dist/traits/structure.d.cts.map +1 -0
- package/dist/traits/structure.d.ts +1 -1
- package/dist/traits/structure.d.ts.map +1 -1
- package/dist/traits/types.d.cts +69 -0
- package/dist/traits/types.d.cts.map +1 -0
- package/package.json +36 -16
- package/dist/chunk-CJN5OHHX.js.map +0 -1
- package/dist/chunk-DIZKTXJI.js.map +0 -1
- package/dist/chunk-OK53DS7G.js.map +0 -1
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './registry.cjs';
|
|
2
|
+
export * from './definitions/index.cjs';
|
|
3
|
+
export * from './requirements.cjs';
|
|
4
|
+
export * from './prop-types.cjs';
|
|
5
|
+
export * from './traits/index.cjs';
|
|
6
|
+
export * from './blocks/index.cjs';
|
|
7
|
+
export * from './canonical-props.cjs';
|
|
8
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAElC,cAAc,sBAAsB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './registry';
|
|
2
|
-
export * from './definitions';
|
|
3
|
-
export * from './requirements';
|
|
4
|
-
export * from './prop-types';
|
|
5
|
-
export * from './traits';
|
|
6
|
-
export * from './blocks';
|
|
7
|
-
export * from './canonical-props';
|
|
1
|
+
export * from './registry.js';
|
|
2
|
+
export * from './definitions/index.js';
|
|
3
|
+
export * from './requirements.js';
|
|
4
|
+
export * from './prop-types.js';
|
|
5
|
+
export * from './traits/index.js';
|
|
6
|
+
export * from './blocks/index.js';
|
|
7
|
+
export * from './canonical-props.js';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAElC,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
textDefinition,
|
|
57
57
|
textareaDefinition,
|
|
58
58
|
videoDefinition
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-TTVLQR7L.js";
|
|
60
60
|
import {
|
|
61
61
|
TRAIT_GROUP_LABELS,
|
|
62
62
|
TRAIT_GROUP_ORDER,
|
|
@@ -120,7 +120,7 @@ import {
|
|
|
120
120
|
titleTrait,
|
|
121
121
|
valueTrait,
|
|
122
122
|
withOverrides
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-BCQERSFK.js";
|
|
124
124
|
import {
|
|
125
125
|
FORM_STARTER_BLOCKS,
|
|
126
126
|
LAYOUT_STARTER_BLOCKS,
|
|
@@ -128,7 +128,7 @@ import {
|
|
|
128
128
|
STARTER_BLOCKS,
|
|
129
129
|
UI_STARTER_BLOCKS,
|
|
130
130
|
defaultGenId
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-YEN6JQLF.js";
|
|
132
132
|
|
|
133
133
|
// src/requirements.ts
|
|
134
134
|
function extractComponentRequirements(root, registry) {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/requirements.ts","../src/prop-types.ts"],"sourcesContent":["import { Node } from '@kubuild/schema';\nimport { ComponentRegistry } from './registry';\n\nexport interface ComponentRequirements {\n requiredComponents: string[];\n requiredCapabilities: string[];\n}\n\n/**\n * Walks a node tree and extracts the custom component types and runtime\n * capabilities it depends on, in the shape expected by `@kubuild/schema`'s\n * `ManifestSchema` (`requiredComponents`/`requiredCapabilities`).\n *\n * Built-in/core component types are never listed in `requiredComponents` —\n * they ship with `kubuild` and are always available. Only types whose\n * registered definition has `category: 'custom'` are considered a real\n * requirement a host must satisfy before it can render/import the document.\n */\nexport function extractComponentRequirements(\n root: Node,\n registry: ComponentRegistry,\n): ComponentRequirements {\n const requiredComponents = new Set<string>();\n const requiredCapabilities = new Set<string>();\n\n const visit = (node: Node): void => {\n const definition = registry.get(node.type);\n\n if (definition?.category === 'custom') {\n requiredComponents.add(node.type);\n }\n for (const capability of definition?.capabilities ?? []) {\n requiredCapabilities.add(capability);\n }\n\n node.children?.forEach(visit);\n };\n\n visit(root);\n\n return {\n requiredComponents: Array.from(requiredComponents),\n requiredCapabilities: Array.from(requiredCapabilities),\n };\n}\n","import { ComponentFieldDefinition } from './registry';\n\nexport type PropPrimitiveType = 'string' | 'number' | 'boolean';\n\n/**\n * Maps inspector field types to the primitive type a binding must resolve to.\n * 'select' | 'image' | 'action' | 'json' are excluded — they carry structured\n * or choice-constrained values that a plain variable binding can't safely satisfy.\n */\nexport function primitiveTypeForField(field: ComponentFieldDefinition): PropPrimitiveType | undefined {\n switch (field.type) {\n case 'string':\n case 'textarea':\n case 'color':\n return 'string';\n case 'number':\n return 'number';\n case 'boolean':\n return 'boolean';\n default:\n return undefined;\n }\n}\n\nexport function isBindableField(field: ComponentFieldDefinition): boolean {\n return primitiveTypeForField(field) !== undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,SAAS,6BACd,MACA,UACuB;AACvB,QAAM,qBAAqB,oBAAI,IAAY;AAC3C,QAAM,uBAAuB,oBAAI,IAAY;AAE7C,QAAM,QAAQ,CAAC,SAAqB;AAClC,UAAM,aAAa,SAAS,IAAI,KAAK,IAAI;AAEzC,QAAI,YAAY,aAAa,UAAU;AACrC,yBAAmB,IAAI,KAAK,IAAI;AAAA,IAClC;AACA,eAAW,cAAc,YAAY,gBAAgB,CAAC,GAAG;AACvD,2BAAqB,IAAI,UAAU;AAAA,IACrC;AAEA,SAAK,UAAU,QAAQ,KAAK;AAAA,EAC9B;AAEA,QAAM,IAAI;AAEV,SAAO;AAAA,IACL,oBAAoB,MAAM,KAAK,kBAAkB;AAAA,IACjD,sBAAsB,MAAM,KAAK,oBAAoB;AAAA,EACvD;AACF;;;ACnCO,SAAS,sBAAsB,OAAgE;AACpG,UAAQ,MAAM,MAAM;AAAA,IAClB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEO,SAAS,gBAAgB,OAA0C;AACxE,SAAO,sBAAsB,KAAK,MAAM;AAC1C;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/requirements.ts","../src/prop-types.ts"],"sourcesContent":["import { Node } from '@kubuild/schema';\nimport { ComponentRegistry } from './registry.js';\n\nexport interface ComponentRequirements {\n requiredComponents: string[];\n requiredCapabilities: string[];\n}\n\n/**\n * Walks a node tree and extracts the custom component types and runtime\n * capabilities it depends on, in the shape expected by `@kubuild/schema`'s\n * `ManifestSchema` (`requiredComponents`/`requiredCapabilities`).\n *\n * Built-in/core component types are never listed in `requiredComponents` —\n * they ship with `kubuild` and are always available. Only types whose\n * registered definition has `category: 'custom'` are considered a real\n * requirement a host must satisfy before it can render/import the document.\n */\nexport function extractComponentRequirements(\n root: Node,\n registry: ComponentRegistry,\n): ComponentRequirements {\n const requiredComponents = new Set<string>();\n const requiredCapabilities = new Set<string>();\n\n const visit = (node: Node): void => {\n const definition = registry.get(node.type);\n\n if (definition?.category === 'custom') {\n requiredComponents.add(node.type);\n }\n for (const capability of definition?.capabilities ?? []) {\n requiredCapabilities.add(capability);\n }\n\n node.children?.forEach(visit);\n };\n\n visit(root);\n\n return {\n requiredComponents: Array.from(requiredComponents),\n requiredCapabilities: Array.from(requiredCapabilities),\n };\n}\n","import { ComponentFieldDefinition } from './registry.js';\n\nexport type PropPrimitiveType = 'string' | 'number' | 'boolean';\n\n/**\n * Maps inspector field types to the primitive type a binding must resolve to.\n * 'select' | 'image' | 'action' | 'json' are excluded — they carry structured\n * or choice-constrained values that a plain variable binding can't safely satisfy.\n */\nexport function primitiveTypeForField(field: ComponentFieldDefinition): PropPrimitiveType | undefined {\n switch (field.type) {\n case 'string':\n case 'textarea':\n case 'color':\n return 'string';\n case 'number':\n return 'number';\n case 'boolean':\n return 'boolean';\n default:\n return undefined;\n }\n}\n\nexport function isBindableField(field: ComponentFieldDefinition): boolean {\n return primitiveTypeForField(field) !== undefined;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBO,SAAS,6BACd,MACA,UACuB;AACvB,QAAM,qBAAqB,oBAAI,IAAY;AAC3C,QAAM,uBAAuB,oBAAI,IAAY;AAE7C,QAAM,QAAQ,CAAC,SAAqB;AAClC,UAAM,aAAa,SAAS,IAAI,KAAK,IAAI;AAEzC,QAAI,YAAY,aAAa,UAAU;AACrC,yBAAmB,IAAI,KAAK,IAAI;AAAA,IAClC;AACA,eAAW,cAAc,YAAY,gBAAgB,CAAC,GAAG;AACvD,2BAAqB,IAAI,UAAU;AAAA,IACrC;AAEA,SAAK,UAAU,QAAQ,KAAK;AAAA,EAC9B;AAEA,QAAM,IAAI;AAEV,SAAO;AAAA,IACL,oBAAoB,MAAM,KAAK,kBAAkB;AAAA,IACjD,sBAAsB,MAAM,KAAK,oBAAoB;AAAA,EACvD;AACF;;;ACnCO,SAAS,sBAAsB,OAAgE;AACpG,UAAQ,MAAM,MAAM;AAAA,IAClB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEO,SAAS,gBAAgB,OAA0C;AACxE,SAAO,sBAAsB,KAAK,MAAM;AAC1C;","names":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentFieldDefinition } from './registry.cjs';
|
|
2
|
+
export type PropPrimitiveType = 'string' | 'number' | 'boolean';
|
|
3
|
+
/**
|
|
4
|
+
* Maps inspector field types to the primitive type a binding must resolve to.
|
|
5
|
+
* 'select' | 'image' | 'action' | 'json' are excluded — they carry structured
|
|
6
|
+
* or choice-constrained values that a plain variable binding can't safely satisfy.
|
|
7
|
+
*/
|
|
8
|
+
export declare function primitiveTypeForField(field: ComponentFieldDefinition): PropPrimitiveType | undefined;
|
|
9
|
+
export declare function isBindableField(field: ComponentFieldDefinition): boolean;
|
|
10
|
+
//# sourceMappingURL=prop-types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prop-types.d.cts","sourceRoot":"","sources":["../src/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEhE;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,wBAAwB,GAAG,iBAAiB,GAAG,SAAS,CAapG;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAExE"}
|
package/dist/prop-types.d.ts
CHANGED
package/dist/prop-types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../src/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../src/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEhE;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,wBAAwB,GAAG,iBAAiB,GAAG,SAAS,CAapG;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAExE"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { Node, ResponsiveStyles } from '@kubuild/schema';
|
|
2
|
+
export type ComponentCategory = 'layout' | 'typography' | 'media' | 'form' | 'interactive' | 'data' | 'custom';
|
|
3
|
+
export interface ComponentFieldDefinition {
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
type: 'string' | 'textarea' | 'number' | 'boolean' | 'select' | 'color' | 'image' | 'action' | 'json';
|
|
7
|
+
defaultValue?: unknown;
|
|
8
|
+
options?: Array<{
|
|
9
|
+
label: string;
|
|
10
|
+
value: unknown;
|
|
11
|
+
}>;
|
|
12
|
+
description?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ComponentDefaultChildSpec {
|
|
15
|
+
type: string;
|
|
16
|
+
props?: Record<string, unknown>;
|
|
17
|
+
styles?: ResponsiveStyles;
|
|
18
|
+
children?: ComponentDefaultChildSpec[];
|
|
19
|
+
}
|
|
20
|
+
export interface ComponentDefinition<TRenderer = unknown> {
|
|
21
|
+
type: string;
|
|
22
|
+
label: string;
|
|
23
|
+
category: ComponentCategory;
|
|
24
|
+
description?: string;
|
|
25
|
+
icon?: string;
|
|
26
|
+
acceptsChildren?: boolean;
|
|
27
|
+
allowedChildren?: string[];
|
|
28
|
+
disallowedParents?: string[];
|
|
29
|
+
defaultProps?: Record<string, unknown>;
|
|
30
|
+
/** Default responsive style override (base/desktop/tablet/mobile), matching a Node's `styles` field. */
|
|
31
|
+
defaultStyles?: ResponsiveStyles;
|
|
32
|
+
/** Default child node template specs inserted automatically when this component is instantiated. */
|
|
33
|
+
defaultChildren?: ComponentDefaultChildSpec[];
|
|
34
|
+
/**
|
|
35
|
+
* Inspector metadata: describes each editable prop (label, input type, options)
|
|
36
|
+
* so a host editor can render property controls without hardcoding per-type UI.
|
|
37
|
+
*/
|
|
38
|
+
propFields?: ComponentFieldDefinition[];
|
|
39
|
+
/**
|
|
40
|
+
* Trait metadata (STORA-210): functional props separated from styling.
|
|
41
|
+
* Traits carry semantic/behavioral attributes (href, target, alt, placeholder,
|
|
42
|
+
* aria-label, id, etc.) that map to HTML attributes at render time.
|
|
43
|
+
* Distinct from `propFields` which may include visual styling knobs;
|
|
44
|
+
* traits are purely functional.
|
|
45
|
+
*/
|
|
46
|
+
traits?: import('./traits/index.cjs').ComponentTraits;
|
|
47
|
+
/**
|
|
48
|
+
* Prop schema slot: validates a node's props for this component type.
|
|
49
|
+
* Returns `true`/`[]` (valid), `false` (generic failure), or an array of
|
|
50
|
+
* human-readable error messages.
|
|
51
|
+
*/
|
|
52
|
+
validateProps?: (props: Record<string, unknown>) => boolean | string[];
|
|
53
|
+
/**
|
|
54
|
+
* Type-to-renderer mapping slot. Deliberately untyped here (`unknown` by
|
|
55
|
+
* default) so `@kubuild/components` stays framework-agnostic — no React
|
|
56
|
+
* import. A consumer package (e.g. `@kubuild/renderer`) specializes
|
|
57
|
+
* `ComponentDefinition<TRenderer>`/`ComponentRegistry<TRenderer>` with a
|
|
58
|
+
* concrete renderer type (e.g. `React.ComponentType<...>`) and populates
|
|
59
|
+
* or reads this field with that type.
|
|
60
|
+
*/
|
|
61
|
+
renderer?: TRenderer;
|
|
62
|
+
/**
|
|
63
|
+
* Host-provided runtime capabilities this component type needs to fully
|
|
64
|
+
* resolve at render time (e.g. `'assetProvider'`, `'actionRegistry'` — see
|
|
65
|
+
* `@kubuild/core`'s `RuntimeContext`). Names correspond to entries a host
|
|
66
|
+
* would list in a `.stora` manifest's `requiredCapabilities` (see
|
|
67
|
+
* `@kubuild/schema`'s `ManifestSchema`) so an importer can check it has
|
|
68
|
+
* everything a document needs before accepting it.
|
|
69
|
+
*/
|
|
70
|
+
capabilities?: string[];
|
|
71
|
+
/**
|
|
72
|
+
* STORA-550: the single canonical prop holding this component's visible text
|
|
73
|
+
* (e.g. `text` for heading/paragraph, `label` for button). Templates, hosts and the
|
|
74
|
+
* editor's inline editing must write this name.
|
|
75
|
+
*/
|
|
76
|
+
canonicalTextProp?: string;
|
|
77
|
+
/**
|
|
78
|
+
* STORA-550: deprecated alias -> canonical prop name. The renderer still reads an alias
|
|
79
|
+
* for one minor version (emitting a `DEPRECATED_PROP` diagnostic) and `migrateDocument`
|
|
80
|
+
* (`1.1.0 -> 1.2.0`) renames it. Sourced from `CANONICAL_TEXT_PROPS` in `@kubuild/schema`.
|
|
81
|
+
*/
|
|
82
|
+
deprecatedPropAliases?: Record<string, string>;
|
|
83
|
+
}
|
|
84
|
+
export declare class ComponentRegistry<TRenderer = unknown> {
|
|
85
|
+
private components;
|
|
86
|
+
register(definition: ComponentDefinition<TRenderer>, allowOverride?: boolean): void;
|
|
87
|
+
unregister(type: string): boolean;
|
|
88
|
+
get(type: string): ComponentDefinition<TRenderer> | undefined;
|
|
89
|
+
has(type: string): boolean;
|
|
90
|
+
list(): ComponentDefinition<TRenderer>[];
|
|
91
|
+
listByCategory(category: ComponentCategory): ComponentDefinition<TRenderer>[];
|
|
92
|
+
/**
|
|
93
|
+
* Check whether `childType` is a valid insertion target under `parentType`,
|
|
94
|
+
* covering both directions of child policy: the parent's `acceptsChildren`/
|
|
95
|
+
* `allowedChildren` (by type, category, or `'*'`) and the child's own
|
|
96
|
+
* `disallowedParents`. Used by the builder to reject an invalid insertion
|
|
97
|
+
* before a node is constructed, rather than after the fact via `validateNode`.
|
|
98
|
+
*/
|
|
99
|
+
canInsertChild(parentType: string, childType: string): {
|
|
100
|
+
valid: boolean;
|
|
101
|
+
errors: string[];
|
|
102
|
+
};
|
|
103
|
+
validateNode(node: Node, parentType?: string): {
|
|
104
|
+
valid: boolean;
|
|
105
|
+
errors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mB,CAAC,SAAS,CAAC,EAAE;IAI7E;;;;;;OAMG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE;IAkC3F,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE;CAyCpF"}
|
package/dist/registry.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export interface ComponentDefinition<TRenderer = unknown> {
|
|
|
43
43
|
* Distinct from `propFields` which may include visual styling knobs;
|
|
44
44
|
* traits are purely functional.
|
|
45
45
|
*/
|
|
46
|
-
traits?: import('./traits').ComponentTraits;
|
|
46
|
+
traits?: import('./traits/index.js').ComponentTraits;
|
|
47
47
|
/**
|
|
48
48
|
* Prop schema slot: validates a node's props for this component type.
|
|
49
49
|
* Returns `true`/`[]` (valid), `false` (generic failure), or an array of
|
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,aAAa,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE/G,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IACtG,YAAY,CAAC,EAAE,OAAO,CAA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yCpF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Node } from '@kubuild/schema';
|
|
2
|
+
import { ComponentRegistry } from './registry.cjs';
|
|
3
|
+
export interface ComponentRequirements {
|
|
4
|
+
requiredComponents: string[];
|
|
5
|
+
requiredCapabilities: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Walks a node tree and extracts the custom component types and runtime
|
|
9
|
+
* capabilities it depends on, in the shape expected by `@kubuild/schema`'s
|
|
10
|
+
* `ManifestSchema` (`requiredComponents`/`requiredCapabilities`).
|
|
11
|
+
*
|
|
12
|
+
* Built-in/core component types are never listed in `requiredComponents` —
|
|
13
|
+
* they ship with `kubuild` and are always available. Only types whose
|
|
14
|
+
* registered definition has `category: 'custom'` are considered a real
|
|
15
|
+
* requirement a host must satisfy before it can render/import the document.
|
|
16
|
+
*/
|
|
17
|
+
export declare function extractComponentRequirements(root: Node, registry: ComponentRegistry): ComponentRequirements;
|
|
18
|
+
//# sourceMappingURL=requirements.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requirements.d.cts","sourceRoot":"","sources":["../src/requirements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,oBAAoB,EAAE,MAAM,EAAE,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,iBAAiB,GAC1B,qBAAqB,CAuBvB"}
|
package/dist/requirements.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requirements.d.ts","sourceRoot":"","sources":["../src/requirements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"requirements.d.ts","sourceRoot":"","sources":["../src/requirements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,oBAAoB,EAAE,MAAM,EAAE,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,iBAAiB,GAC1B,qBAAqB,CAuBvB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentTraitDefinition } from './types.cjs';
|
|
2
|
+
/** `id` — a custom, document-unique identifier for the element. */
|
|
3
|
+
export declare function idTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
4
|
+
/** `title` — advisory title shown on hover / used as a fallback label. */
|
|
5
|
+
export declare function titleTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
6
|
+
/** `aria-label` — accessible name for elements without visible text. */
|
|
7
|
+
export declare function ariaLabelTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
8
|
+
//# sourceMappingURL=common.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.cts","sourceRoot":"","sources":["../../src/traits/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAiB,MAAM,YAAY,CAAC;AAErE,mEAAmE;AACnE,wBAAgB,OAAO,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAY/F;AAED,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAYlG;AAED,wEAAwE;AACxE,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAYtG"}
|
package/dist/traits/common.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentTraitDefinition } from './types';
|
|
1
|
+
import { ComponentTraitDefinition } from './types.js';
|
|
2
2
|
/** `id` — a custom, document-unique identifier for the element. */
|
|
3
3
|
export declare function idTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
4
4
|
/** `title` — advisory title shown on hover / used as a fallback label. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/traits/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAiB,MAAM,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/traits/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAiB,MAAM,YAAY,CAAC;AAErE,mEAAmE;AACnE,wBAAgB,OAAO,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAY/F;AAED,0EAA0E;AAC1E,wBAAgB,UAAU,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAYlG;AAED,wEAAwE;AACxE,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAYtG"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ComponentTraitDefinition } from './types.cjs';
|
|
2
|
+
/** `placeholder` — hint text shown inside an empty form control. */
|
|
3
|
+
export declare function placeholderTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
4
|
+
/** `name` — the form field name submitted with the form data. */
|
|
5
|
+
export declare function fieldNameTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
6
|
+
/** `required` — whether the form field must be filled before submission. */
|
|
7
|
+
export declare function requiredTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
8
|
+
/** `disabled` — whether the control is non-interactive. */
|
|
9
|
+
export declare function disabledTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
10
|
+
/** `readOnly` — whether the control value can be changed by the user. */
|
|
11
|
+
export declare function readOnlyTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
12
|
+
/** `action` — the URL a form submits to. */
|
|
13
|
+
export declare function actionTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
14
|
+
/** `method` — the HTTP method a form uses to submit. */
|
|
15
|
+
export declare function methodTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
16
|
+
/** `autoComplete` — whether the browser may autofill the form. */
|
|
17
|
+
export declare function autoCompleteTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
18
|
+
/** `value` — the value submitted for a checkbox/radio when checked. */
|
|
19
|
+
export declare function valueTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
20
|
+
/** `defaultChecked` — whether a checkbox/radio starts checked. */
|
|
21
|
+
export declare function defaultCheckedTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
22
|
+
/** `defaultValue` — the initial value of a form control. */
|
|
23
|
+
export declare function defaultValueTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
24
|
+
/** `rows` — the visible number of lines in a textarea. */
|
|
25
|
+
export declare function rowsTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
26
|
+
/** `type` — the input type of a form control (text, email, number, ...). */
|
|
27
|
+
export declare function inputTypeTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
28
|
+
/** `buttonType` — the button's form behavior (`button`, `submit`, `reset`). */
|
|
29
|
+
export declare function buttonTypeTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
30
|
+
/** `preventDefault` — whether the form intercepts the native submit and handles it in JS. */
|
|
31
|
+
export declare function preventDefaultTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
32
|
+
/** `scrollToFirstError` — whether the form auto-scrolls to the first invalid field on submit. */
|
|
33
|
+
export declare function scrollToFirstErrorTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
34
|
+
/** `resetOnSubmit` — whether the form resets all fields to their initial values after a successful submit. */
|
|
35
|
+
export declare function resetOnSubmitTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
36
|
+
/** `pattern` — a regex the field value must match for the input to be valid. */
|
|
37
|
+
export declare function patternTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
38
|
+
/** `minLength` — the minimum number of characters required. */
|
|
39
|
+
export declare function minLengthTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
40
|
+
/** `maxLength` — the maximum number of characters allowed. */
|
|
41
|
+
export declare function maxLengthTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
42
|
+
/** `prefixIcon` — an icon name displayed before the input content (e.g. Lucide icon name). */
|
|
43
|
+
export declare function prefixIconTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
44
|
+
/** `suffixIcon` — an icon name displayed after the input content (e.g. Lucide icon name). */
|
|
45
|
+
export declare function suffixIconTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
46
|
+
/** `helperText` — a short hint displayed below the input describing its expected value. */
|
|
47
|
+
export declare function helperTextTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
48
|
+
/** `resize` — the CSS resize behavior of a textarea. */
|
|
49
|
+
export declare function resizeTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
50
|
+
/** `autoGrow` — whether the textarea automatically grows in height as the user types. */
|
|
51
|
+
export declare function autoGrowTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
52
|
+
/** `maxCharCount` — the maximum character count with a visible counter shown below the textarea. */
|
|
53
|
+
export declare function maxCharCountTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
54
|
+
/** `optionsList` — the list of options for a select dropdown, each with a label and value. */
|
|
55
|
+
export declare function optionsListTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
56
|
+
/** `labelText` — the visible label text displayed next to a boolean control. */
|
|
57
|
+
export declare function labelTextTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
58
|
+
/** `indeterminate` — whether the checkbox renders in the indeterminate (mixed) visual state. */
|
|
59
|
+
export declare function indeterminateTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
60
|
+
/** `switchSize` — the visual size of a switch control. */
|
|
61
|
+
export declare function switchSizeTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
62
|
+
/** `orientation` — the layout direction for a group of controls (horizontal or vertical). */
|
|
63
|
+
export declare function orientationTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
64
|
+
/** `defaultSelected` — the initially selected value in a radio group. */
|
|
65
|
+
export declare function defaultSelectedTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
66
|
+
/** `accept` — the allowed file MIME types or extensions (e.g. "image/*,.pdf"). */
|
|
67
|
+
export declare function acceptTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
68
|
+
/** `maxFileSize` — the maximum permitted file size in megabytes (MB). */
|
|
69
|
+
export declare function maxFileSizeTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
70
|
+
/** `multiple` — whether the user may select multiple files simultaneously. */
|
|
71
|
+
export declare function multipleTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
72
|
+
/** `showPreview` — whether to render a thumbnail or list preview for selected files. */
|
|
73
|
+
export declare function showPreviewTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
74
|
+
/** `loadingText` — alternative label displayed while form is submitting. */
|
|
75
|
+
export declare function loadingTextTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
76
|
+
/** `showSpinner` — whether an animated loading spinner is displayed during submission. */
|
|
77
|
+
export declare function showSpinnerTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
78
|
+
/** `autoDisableOnSubmit` — whether the submit button is automatically disabled during submission. */
|
|
79
|
+
export declare function autoDisableOnSubmitTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
80
|
+
//# sourceMappingURL=form.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.d.cts","sourceRoot":"","sources":["../../src/traits/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAiB,MAAM,YAAY,CAAC;AAErE,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAYxG;AAED,iEAAiE;AACjE,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAatG;AAED,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAarG;AAED,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAarG;AAED,yEAAyE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AAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAYhH"}
|
package/dist/traits/form.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentTraitDefinition } from './types';
|
|
1
|
+
import { ComponentTraitDefinition } from './types.js';
|
|
2
2
|
/** `placeholder` — hint text shown inside an empty form control. */
|
|
3
3
|
export declare function placeholderTrait(overrides?: Partial<ComponentTraitDefinition>): ComponentTraitDefinition;
|
|
4
4
|
/** `name` — the form field name submitted with the form data. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/traits/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAiB,MAAM,
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/traits/form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAiB,MAAM,YAAY,CAAC;AAErE,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAYxG;AAED,iEAAiE;AACjE,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAatG;AAED,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAarG;AAED,2DAA2D;AAC3D,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAarG;AAED,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CAarG;AAED,4CAA4C;AAC5C,wBAAgB,WAAW,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,wBAAwB,CA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