@smwb/ui-mcp-react 2.4.0 → 2.5.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "Icon",
3
- "description": "Material Symbols icon wrapper with size, weight, fill, and semantic color tokens.",
3
+ "description": "Icon renderer with size, weight and semantic color tokens. Draws the bundled smwb SVG set or the Google Material Symbols font under the same name — see the source prop and configureIcons.",
4
4
  "ssr": {
5
5
  "safe": true,
6
6
  "rendering": "universal"
@@ -22,9 +22,9 @@
22
22
  },
23
23
  "props": {
24
24
  "name": {
25
- "type": "string",
25
+ "type": "string | IconDefinition",
26
26
  "required": true,
27
- "description": "Form field name submitted with the value."
27
+ "description": "Icon name — the Google Material Symbols name, e.g. `\"arrow_right_alt\"`.\nLookup is forgiving: `arrowRightAlt` and `arrow-right-alt` resolve too, as\ndo an icon's aliases.\n\nAn IconDefinition may be passed instead, which skips the registry\nentirely and is the most bundle-friendly form:\n\n```tsx\nimport { arrowRightAlt } from \"@smwb/ui-react/icons\";\n<Icon name={arrowRightAlt} />\n```"
28
28
  },
29
29
  "className": {
30
30
  "type": "string",
@@ -34,12 +34,12 @@
34
34
  "weight": {
35
35
  "type": "number",
36
36
  "required": false,
37
- "description": "Weight. Optional. Type: number."
37
+ "description": "Material Symbols weight axis (100-700). For the smwb SVG set it maps to the\nstroke width: 400 → 2px, 700 → 3px, 100 → 1px."
38
38
  },
39
39
  "fill": {
40
40
  "type": "0 | 1",
41
41
  "required": false,
42
- "description": "Fill. Optional. Type: 0 | 1."
42
+ "description": "Material Symbols FILL axis. Not used by the smwb SVG set (it is a contour set)."
43
43
  },
44
44
  "size": {
45
45
  "type": "number | string",
@@ -49,17 +49,22 @@
49
49
  "grade": {
50
50
  "type": "number",
51
51
  "required": false,
52
- "description": "Grade. Optional. Type: number."
52
+ "description": "Material Symbols GRAD axis. Not used by the smwb SVG set."
53
53
  },
54
54
  "color": {
55
55
  "type": "IconColor | (string & {})",
56
56
  "required": false,
57
- "description": "Semantic color token; `inherit` (default) keeps the text color.\nAny string is accepted for backward compatibility, but only known\n{\n/"
57
+ "description": "Semantic color token; `inherit` (default) keeps the text color.\nAny string is accepted for backward compatibility, but only known\nIconColor tokens emit a color class."
58
58
  },
59
59
  "title": {
60
60
  "type": "string",
61
61
  "required": false,
62
- "description": "Accessible name. When provided the icon is exposed as\n`role=\"img\"`; otherwise it is `aria-hidden` (decorative).\n/"
62
+ "description": "Accessible name. When provided the icon is exposed as\n`role=\"img\"`; otherwise it is `aria-hidden` (decorative)."
63
+ },
64
+ "source": {
65
+ "type": "IconSource",
66
+ "required": false,
67
+ "description": "Overrides the icon source for this icon only. See IconSource."
63
68
  }
64
69
  }
65
70
  }
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "IconProvider",
3
+ "description": "Sets the icon source (and optionally registers icons) for a subtree. Icons come from @smwb/ui-react/icons, one module each, so only the ones you register are bundled.",
4
+ "ssr": {
5
+ "safe": true,
6
+ "rendering": "universal"
7
+ },
8
+ "extends": [
9
+ "IconContextValue"
10
+ ],
11
+ "styles": {
12
+ "base": [
13
+ "@smwb/ui-styles/less/foundation.less",
14
+ "@smwb/ui-styles/less/theme.less"
15
+ ],
16
+ "entries": [
17
+ "@smwb/ui-styles/less/components/icon/icon.entry.less"
18
+ ],
19
+ "dependencies": [],
20
+ "importExample": "@import (less) \"node_modules/@smwb/ui-styles/less/foundation.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/theme.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/icon/icon.entry.less\";"
21
+ },
22
+ "props": {
23
+ "icons": {
24
+ "type": "IconInput",
25
+ "required": false,
26
+ "description": "Icons to make available to `<Icon name=\"...\">` inside this subtree.\n\n```tsx\nimport { add, close, search } from \"@smwb/ui-react/icons\";\n\n<IconProvider source=\"smwb\" icons={[add, close, search]}>\n <App />\n</IconProvider>\n```\n\nRegistration is process-wide (the registry is a module singleton), so the\nprop is a convenience for apps that would otherwise call `registerIcons`\nat startup — not a scoping mechanism."
27
+ },
28
+ "children": {
29
+ "type": "ReactNode",
30
+ "required": false,
31
+ "description": "Child nodes rendered inside the component."
32
+ },
33
+ "source": {
34
+ "type": "IconSource",
35
+ "required": false,
36
+ "description": "Icon artwork for this subtree. Falls back to configureIcons."
37
+ }
38
+ }
39
+ }
@@ -64,9 +64,9 @@
64
64
  "description": "Initially selected node ids (uncontrolled)."
65
65
  },
66
66
  "onSelectedChange": {
67
- "type": "(selected: string[]) => void",
67
+ "type": "(selected: string[], changed?: { id: string; selected: boolean }) => void",
68
68
  "required": false,
69
- "description": "Called with the next selected ids."
69
+ "description": "Called with the next selected ids plus, for user toggles, the node that just changed."
70
70
  },
71
71
  "selectable": {
72
72
  "type": "boolean",
@@ -25,7 +25,7 @@
25
25
  "readout": {
26
26
  "type": "boolean | ((value: SliderValue | undefined) => string)",
27
27
  "required": false,
28
- "description": "Read-only value readout beside the label. `true` shows the raw value; pass a\nformatter for units/precision (e.g. `(v) => `${v}%``). Reflects `value`.\n/"
28
+ "description": "Read-only value readout beside the label. `true` shows the raw value; pass a\nformatter for units/precision (e.g. `(v) => `${v}%``). Reflects `value`."
29
29
  },
30
30
  "endAdornment": {
31
31
  "type": "React.ReactNode",
@@ -84,7 +84,7 @@
84
84
  "resizable": {
85
85
  "type": "boolean",
86
86
  "required": false,
87
- "description": "Allow the user to resize the sheet by dragging a grab handle with\ntouch or mouse (mobile bottom-sheet style). Off by default.\n/"
87
+ "description": "Allow the user to resize the sheet by dragging a grab handle with\ntouch or mouse (mobile bottom-sheet style). Off by default."
88
88
  },
89
89
  "minSize": {
90
90
  "type": "number",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smwb/ui-mcp-react",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "Model Context Protocol server exposing the @smwb/ui-react (React) component catalog and customization guide.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -28,8 +28,8 @@
28
28
  "zod": "^4.4.3"
29
29
  },
30
30
  "devDependencies": {
31
- "@smwb/ui-react": "^2.4.0",
32
- "@smwb/ui-styles": "^1.1.0",
31
+ "@smwb/ui-react": "^2.5.0",
32
+ "@smwb/ui-styles": "^1.3.0",
33
33
  "glob": "^13.0.6",
34
34
  "typescript": "^6.0.3",
35
35
  "vitest": "^2.1.9"