@pixpilot/formily-shadcn 1.15.0 → 1.15.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/README.md +26 -0
- package/dist/components/array-common/array-mcp-props.js +1 -0
- package/dist/components/array-tags/mcp.js +19 -0
- package/dist/components/combobox/mcp.js +17 -8
- package/dist/components/schema-field/schema-field-basics.d.ts +255 -255
- package/dist/components/schema-field/schema-field-extended.d.cts +9 -9
- package/dist/components/schema-field/schema-field-extended.d.ts +424 -424
- package/dist/components/schema-field/schema-field.d.ts +358 -358
- package/dist/components/select/mcp.js +6 -2
- package/dist/components/tags-input-inline/mcp.js +6 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -18,6 +18,32 @@ Formily integration for shadcn/ui components. Build powerful, schema-driven form
|
|
|
18
18
|
pnpm add @pixpilot/formily-shadcn @formily/core @formily/react
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
## MCP Server
|
|
22
|
+
|
|
23
|
+
This package ships a local stdio MCP server so coding assistants can discover its
|
|
24
|
+
components and props. Add it to your MCP client configuration:
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"mcpServers": {
|
|
29
|
+
"formily-shadcn": {
|
|
30
|
+
"command": "npx",
|
|
31
|
+
"args": ["-y", "@pixpilot/formily-shadcn"]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This works with Claude Code, Claude Desktop, GitHub Copilot, Cursor, Codex, and
|
|
38
|
+
any MCP-compatible client. The client launches and stops the server
|
|
39
|
+
automatically — you do not need to start it manually.
|
|
40
|
+
|
|
41
|
+
The server exposes generated component metadata through these tools:
|
|
42
|
+
|
|
43
|
+
- `list_components`
|
|
44
|
+
- `search_components`
|
|
45
|
+
- `get_component_details`
|
|
46
|
+
|
|
21
47
|
## Quick Start
|
|
22
48
|
|
|
23
49
|
### Basic Form
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
const commonArrayPropDocs = {
|
|
4
4
|
sortable: "Enables drag-and-drop reordering of items via a drag handle.",
|
|
5
5
|
disabled: "Disables the array field and all of its item operations.",
|
|
6
|
+
autoSave: "When true, array item editors (popover/dialog) commit changes live; when false (default) they only commit on Save.",
|
|
6
7
|
actions: {
|
|
7
8
|
description: "Item action buttons. Accepts built-in operation strings and/or custom/toggle action objects. Set to false to disable all actions, including global defaults.",
|
|
8
9
|
type: `('up' | 'down' | 'copy' | 'edit' | 'remove' | CustomAction | ToggleAction | OperationOverride)[] | false`
|
|
@@ -7,6 +7,25 @@ const meta = {
|
|
|
7
7
|
description: "A Formily array field for simple string/number arrays, rendered as an editable tag input with keyboard and paste support.",
|
|
8
8
|
htmlElement: "div",
|
|
9
9
|
props: defineProps({
|
|
10
|
+
value: "Controlled array value for the tag input. Usually supplied by Formily.",
|
|
11
|
+
onChange: "Called with the new array of values when tags change. Usually supplied by Formily.",
|
|
12
|
+
options: "Optional suggestion list shown while typing, as `{ label, value }[]`.",
|
|
13
|
+
freeSolo: {
|
|
14
|
+
description: "Allow arbitrary tag values not present in `options`.",
|
|
15
|
+
type: "boolean",
|
|
16
|
+
defaultValue: "true"
|
|
17
|
+
},
|
|
18
|
+
label: "Label content or accessible label for the tag input.",
|
|
19
|
+
showLabel: {
|
|
20
|
+
description: "Hides the label element while keeping the `label` value available.",
|
|
21
|
+
type: "boolean",
|
|
22
|
+
defaultValue: "true"
|
|
23
|
+
},
|
|
24
|
+
slots: "Per-part prop overrides for the inline input, e.g. `{ list, label, item, input, addButton, clear }`.",
|
|
25
|
+
addButtonVisibility: {
|
|
26
|
+
description: "When the inline add button is shown.",
|
|
27
|
+
type: `'always' | 'touch' | 'never'`
|
|
28
|
+
},
|
|
10
29
|
placeholder: {
|
|
11
30
|
description: "Placeholder shown in the tag input.",
|
|
12
31
|
defaultValue: `'Add items...'`
|
|
@@ -7,17 +7,26 @@ const meta = {
|
|
|
7
7
|
description: "A Formily-connected searchable select input that maps dataSource to combobox options.",
|
|
8
8
|
htmlElement: "button",
|
|
9
9
|
props: defineProps({
|
|
10
|
-
label: "Label content or accessible label for the component.",
|
|
11
|
-
filter: "Forwarded to the underlying UI component.",
|
|
12
10
|
options: "Options supplied directly or resolved from schema enum/dataSource.",
|
|
13
11
|
placeholder: "Placeholder text shown before a value is selected or entered.",
|
|
14
|
-
asChild: "Renders behavior through the child element instead of the default element.",
|
|
15
|
-
loop: "Forwarded to the underlying UI component.",
|
|
16
12
|
emptyText: "Forwarded to the underlying UI component.",
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
searchPlaceholder: "Forwarded to the underlying UI component.",
|
|
14
|
+
commandProps: "Props forwarded to the underlying cmdk `Command` root, e.g. `filter`, `shouldFilter`, `loop`.",
|
|
15
|
+
variant: {
|
|
16
|
+
description: "Controls the visual treatment of the trigger button.",
|
|
17
|
+
type: "\"default\" | \"destructive\" | \"outline\" | \"secondary\" | \"ghost\" | \"link\"",
|
|
18
|
+
defaultValue: "\"outline\""
|
|
19
|
+
},
|
|
20
|
+
size: {
|
|
21
|
+
description: "Controls the trigger button dimensions and icon-only sizing.",
|
|
22
|
+
type: "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\"",
|
|
23
|
+
defaultValue: "\"default\""
|
|
24
|
+
},
|
|
25
|
+
asChild: {
|
|
26
|
+
description: "Render the trigger button behavior and styles through the child element instead of a native button.",
|
|
27
|
+
type: "boolean",
|
|
28
|
+
defaultValue: "false"
|
|
29
|
+
}
|
|
21
30
|
}),
|
|
22
31
|
examples: [{
|
|
23
32
|
title: "Declarative schema field",
|