@wizeworks/silicaui-mcp 0.43.1 → 0.44.0
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/data/blocks.json +12861 -1390
- package/dist/data/classes.json +1 -0
- package/dist/data/components.json +8 -1
- package/dist/data/email.json +6 -0
- package/package.json +1 -1
package/dist/data/classes.json
CHANGED
|
@@ -3996,7 +3996,7 @@
|
|
|
3996
3996
|
]
|
|
3997
3997
|
}
|
|
3998
3998
|
],
|
|
3999
|
-
"usageExample": "import { useState } from \"react\";\nimport {\n Button,\n Field,\n FieldControl,\n FieldError,\n FieldLabel,\n Form,\n PasswordInput,\n ToggleGroup,\n ToggleGroupItem,\n} from \"@wizeworks/silicaui-react\";\nimport type { FormFocusOnError } from \"@wizeworks/silicaui-react\";\nimport { Section, Stack } from \"../lib/Section\";\n\ntype Errors = Record<string, string>;\n\n/**\n * `Form` runs each Field's validation on submit and moves focus to the first\n * invalid control. `focusOnError` decides how far that goes — the sign-in shape\n * below is where it matters, because the rejection arrives from a server long\n * after the user has moved on to the next field.\n */\nexport function FormDemo() {\n const [focusOnError, setFocusOnError] = useState<FormFocusOnError>(true);\n const [errors, setErrors] = useState<Errors>({});\n const [pending, setPending] = useState(false);\n\n function onSubmit(event: React.FormEvent<HTMLFormElement>) {\n event.preventDefault();\n setErrors({});\n setPending(true);\n // Stands in for a sign-in round trip. Type into the password field while\n // it runs: the caret has to stay put when the rejection lands.\n window.setTimeout(() => {\n setPending(false);\n setErrors({ email: \"That address isn't registered.\" });\n }, 1500);\n }\n\n return (\n <>\n <Section title=\"focusOnError\">\n <Stack className=\"max-w-sm\">\n <ToggleGroup\n size=\"sm\"\n value={[String(focusOnError)]}\n onValueChange={(v) => {\n const next = v[0];\n if (next == null) return; // clicking the active item can't clear it\n setFocusOnError(\n next === \"false\" ? false : next === \"scroll\" ? \"scroll\" : true,\n );\n }}\n >\n <ToggleGroupItem value=\"true\">true</ToggleGroupItem>\n <ToggleGroupItem value=\"scroll\">scroll</ToggleGroupItem>\n <ToggleGroupItem value=\"false\">false</ToggleGroupItem>\n </ToggleGroup>\n <p className=\"text-sm\">\n Submit with an invalid email to see the client-side path. For the\n async path, submit a <em>valid</em> address and keep typing your\n password during the 1.5s round trip — the rejection must not take\n the caret.\n </p>\n </Stack>\n </Section>\n\n <Section title=\"Sign in\">\n <Form\n errors={errors}\n focusOnError={focusOnError}\n onSubmit={onSubmit}\n className=\"grid max-w-sm gap-4\"\n >\n <Field name=\"email\">\n <FieldLabel required>Email</FieldLabel>\n <FieldControl\n type=\"email\"\n required\n placeholder=\"you@example.com\"\n data-testid=\"demo-email\"\n />\n <FieldError />\n </Field>\n <Field\n name=\"password\"\n validate={(v) =>\n String(v ?? \"\").length >= 8 ? null : \"Use at least 8 characters.\"\n }\n >\n <FieldLabel required>Password</FieldLabel>\n <FieldControl\n required\n render={<PasswordInput data-testid=\"demo-password\" />}\n />\n <FieldError />\n </Field>\n <Button type=\"submit\" color=\"primary\" loading={pending}>\n {pending ? \"Signing in…\" : \"Sign in\"}\n </Button>\n </Form>\n </Section>\n </>\n );\n}"
|
|
3999
|
+
"usageExample": "import { useState } from \"react\";\r\nimport {\r\n Button,\r\n Field,\r\n FieldControl,\r\n FieldError,\r\n FieldLabel,\r\n Form,\r\n PasswordInput,\r\n ToggleGroup,\r\n ToggleGroupItem,\r\n} from \"@wizeworks/silicaui-react\";\r\nimport type { FormFocusOnError } from \"@wizeworks/silicaui-react\";\r\nimport { Section, Stack } from \"../lib/Section\";\r\n\r\ntype Errors = Record<string, string>;\r\n\r\n/**\r\n * `Form` runs each Field's validation on submit and moves focus to the first\r\n * invalid control. `focusOnError` decides how far that goes — the sign-in shape\r\n * below is where it matters, because the rejection arrives from a server long\r\n * after the user has moved on to the next field.\r\n */\r\nexport function FormDemo() {\r\n const [focusOnError, setFocusOnError] = useState<FormFocusOnError>(true);\r\n const [errors, setErrors] = useState<Errors>({});\r\n const [pending, setPending] = useState(false);\r\n\r\n function onSubmit(event: React.FormEvent<HTMLFormElement>) {\r\n event.preventDefault();\r\n setErrors({});\r\n setPending(true);\r\n // Stands in for a sign-in round trip. Type into the password field while\r\n // it runs: the caret has to stay put when the rejection lands.\r\n window.setTimeout(() => {\r\n setPending(false);\r\n setErrors({ email: \"That address isn't registered.\" });\r\n }, 1500);\r\n }\r\n\r\n return (\r\n <>\r\n <Section title=\"focusOnError\">\r\n <Stack className=\"max-w-sm\">\r\n <ToggleGroup\r\n size=\"sm\"\r\n value={[String(focusOnError)]}\r\n onValueChange={(v) => {\r\n const next = v[0];\r\n if (next == null) return; // clicking the active item can't clear it\r\n setFocusOnError(\r\n next === \"false\" ? false : next === \"scroll\" ? \"scroll\" : true,\r\n );\r\n }}\r\n >\r\n <ToggleGroupItem value=\"true\">true</ToggleGroupItem>\r\n <ToggleGroupItem value=\"scroll\">scroll</ToggleGroupItem>\r\n <ToggleGroupItem value=\"false\">false</ToggleGroupItem>\r\n </ToggleGroup>\r\n <p className=\"text-sm\">\r\n Submit with an invalid email to see the client-side path. For the\r\n async path, submit a <em>valid</em> address and keep typing your\r\n password during the 1.5s round trip — the rejection must not take\r\n the caret.\r\n </p>\r\n </Stack>\r\n </Section>\r\n\r\n <Section title=\"Sign in\">\r\n <Form\r\n errors={errors}\r\n focusOnError={focusOnError}\r\n onSubmit={onSubmit}\r\n className=\"grid max-w-sm gap-4\"\r\n >\r\n <Field name=\"email\">\r\n <FieldLabel required>Email</FieldLabel>\r\n <FieldControl\r\n type=\"email\"\r\n required\r\n placeholder=\"you@example.com\"\r\n data-testid=\"demo-email\"\r\n />\r\n <FieldError />\r\n </Field>\r\n <Field\r\n name=\"password\"\r\n validate={(v) =>\r\n String(v ?? \"\").length >= 8 ? null : \"Use at least 8 characters.\"\r\n }\r\n >\r\n <FieldLabel required>Password</FieldLabel>\r\n <FieldControl\r\n required\r\n render={<PasswordInput data-testid=\"demo-password\" />}\r\n />\r\n <FieldError />\r\n </Field>\r\n <Button type=\"submit\" color=\"primary\" loading={pending}>\r\n {pending ? \"Signing in…\" : \"Sign in\"}\r\n </Button>\r\n </Form>\r\n </Section>\r\n </>\r\n );\r\n}"
|
|
4000
4000
|
},
|
|
4001
4001
|
{
|
|
4002
4002
|
"name": "Input",
|
|
@@ -7507,6 +7507,12 @@
|
|
|
7507
7507
|
"optional": true,
|
|
7508
7508
|
"type": "(id: string, targetId: string, edge: TreeDropEdge) => void",
|
|
7509
7509
|
"doc": "Enables row drag-to-reorder/-reparent (rows become `draggable`) and fires once a drag is released over a valid row: `edge` is \"before\"/\"after\" a sibling or \"inside\" (append as a child). TreeView only guards against dropping a node onto itself or its own descendant (which the geometry already knows); it does NOT know which nodes are valid containers, so the consumer's own move logic is the source of truth for the rest — an \"inside\" drop onto something that can't hold children should just no-op."
|
|
7510
|
+
},
|
|
7511
|
+
{
|
|
7512
|
+
"name": "onRename",
|
|
7513
|
+
"optional": true,
|
|
7514
|
+
"type": "(id: string, value: string) => void",
|
|
7515
|
+
"doc": "Enables inline rename on rows marked `renamable` (double-click the row, or F2 on a focused one) and fires ONCE on commit — Enter or blur, never per keystroke, so a consumer with an undo stack gets one entry per rename rather than one per character. Escape cancels without firing. An empty value is passed through: for most trees that means \"clear the name and go back to the derived one\", which only the consumer can decide."
|
|
7510
7516
|
}
|
|
7511
7517
|
]
|
|
7512
7518
|
}
|
|
@@ -13569,6 +13575,7 @@
|
|
|
13569
13575
|
"tree-node",
|
|
13570
13576
|
"tree-node-icon",
|
|
13571
13577
|
"tree-node-label",
|
|
13578
|
+
"tree-rename",
|
|
13572
13579
|
"tree-toggle",
|
|
13573
13580
|
"tree-toggle-spacer"
|
|
13574
13581
|
],
|
package/dist/data/email.json
CHANGED
|
@@ -9,6 +9,12 @@
|
|
|
9
9
|
"type": "string",
|
|
10
10
|
"doc": ""
|
|
11
11
|
},
|
|
12
|
+
{
|
|
13
|
+
"name": "name",
|
|
14
|
+
"optional": true,
|
|
15
|
+
"type": "string",
|
|
16
|
+
"doc": "The author's own name for this layer, shown in the Navigator instead of the derived one (\"Section\", \"Columns\"). Lets someone tell two identical rows apart — \"Order summary\" vs \"Legal footer\" — without opening either. Called `name`, not `label`, because `label` is already a ButtonNode's own TEXT — a content field that ships in the email. These are opposites, and one word cannot mean both. (The site schema, which has no such collision, spells the same idea `Node.label`.) Authoring metadata, exactly like `ord` below: `toEmailHtml` never reads it, so it cannot reach sent markup."
|
|
17
|
+
},
|
|
12
18
|
{
|
|
13
19
|
"name": "ord",
|
|
14
20
|
"optional": true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wizeworks/silicaui-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"description": "A local MCP server that lets AI coding assistants query the Silica UI design system — real class names, component props, blocks, and behaviors — instead of guessing.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|