@smwb/ui-mcp-react 2.4.1 → 2.6.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
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "name": "ConfirmDialog",
3
+ "description": "Alert dialog asking the user to confirm or cancel a destructive action.",
4
+ "ssr": {
5
+ "safe": true,
6
+ "rendering": "client",
7
+ "note": "Modal-based; renders nothing on the server and portals in after hydration."
8
+ },
9
+ "styles": {
10
+ "base": [
11
+ "@smwb/ui-styles/less/foundation.less",
12
+ "@smwb/ui-styles/less/theme.less"
13
+ ],
14
+ "entries": [
15
+ "@smwb/ui-styles/less/components/confirmDialog/confirmDialog.entry.less"
16
+ ],
17
+ "dependencies": [
18
+ "@smwb/ui-styles/less/components/button/button.entry.less",
19
+ "@smwb/ui-styles/less/components/modal/modal.entry.less",
20
+ "@smwb/ui-styles/less/components/typography/typography.entry.less"
21
+ ],
22
+ "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/confirmDialog/confirmDialog.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/button/button.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/modal/modal.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/typography/typography.entry.less\";"
23
+ },
24
+ "props": {
25
+ "open": {
26
+ "type": "boolean",
27
+ "required": true,
28
+ "description": "Controlled open/visible state."
29
+ },
30
+ "title": {
31
+ "type": "string",
32
+ "required": true,
33
+ "description": "Accessible title or tooltip text."
34
+ },
35
+ "subject": {
36
+ "type": "string",
37
+ "required": false,
38
+ "description": "The subject of the action, shown emphasised on its own line (e.g. the asset name)."
39
+ },
40
+ "message": {
41
+ "type": "string",
42
+ "required": false,
43
+ "description": "A secondary explanatory line (e.g. \"can't be undone\")."
44
+ },
45
+ "confirmLabel": {
46
+ "type": "string",
47
+ "required": true,
48
+ "description": "Confirm Label. Required. Type: string."
49
+ },
50
+ "cancelLabel": {
51
+ "type": "string",
52
+ "required": false,
53
+ "description": "Cancel Label. Optional. Type: string."
54
+ },
55
+ "danger": {
56
+ "type": "boolean",
57
+ "required": false,
58
+ "description": "Style the confirm button as destructive (red)."
59
+ },
60
+ "busy": {
61
+ "type": "boolean",
62
+ "required": false,
63
+ "description": "Disable the actions + gate Esc/outside-click while a confirm is in flight."
64
+ },
65
+ "onConfirm": {
66
+ "type": "() => void",
67
+ "required": true,
68
+ "description": "On Confirm. Required. Type: () => void."
69
+ },
70
+ "onCancel": {
71
+ "type": "() => void",
72
+ "required": true,
73
+ "description": "On Cancel. Required. Type: () => void."
74
+ },
75
+ "className": {
76
+ "type": "string",
77
+ "required": false,
78
+ "description": "Additional CSS class name(s) for the root element."
79
+ }
80
+ }
81
+ }
@@ -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",
@@ -0,0 +1,198 @@
1
+ {
2
+ "name": "FloatingWindow",
3
+ "description": "Draggable, resizable non-modal window; several can stay open at once.",
4
+ "ssr": {
5
+ "safe": true,
6
+ "rendering": "client",
7
+ "note": "Renders nothing on the server; the window is portaled into <body> on the client after hydration."
8
+ },
9
+ "extends": [
10
+ "Omit<\n React.HTMLAttributes<HTMLDivElement>,\n \"onResize\" | \"title\" | \"children\"\n>"
11
+ ],
12
+ "inheritedAttributes": "Also accepts standard HTML attributes for the underlying element (see extends clause in TypeScript).",
13
+ "styles": {
14
+ "base": [
15
+ "@smwb/ui-styles/less/foundation.less",
16
+ "@smwb/ui-styles/less/theme.less"
17
+ ],
18
+ "entries": [
19
+ "@smwb/ui-styles/less/components/floatingWindow/floatingWindow.entry.less"
20
+ ],
21
+ "dependencies": [
22
+ "@smwb/ui-styles/less/components/icon/icon.entry.less"
23
+ ],
24
+ "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/floatingWindow/floatingWindow.entry.less\";\n@import (less) \"node_modules/@smwb/ui-styles/less/components/icon/icon.entry.less\";"
25
+ },
26
+ "props": {
27
+ "open": {
28
+ "type": "boolean",
29
+ "required": true,
30
+ "description": "Controlled open state of the window."
31
+ },
32
+ "title": {
33
+ "type": "ReactNode",
34
+ "required": false,
35
+ "description": "Title bar content. When given, the window is labelled by it."
36
+ },
37
+ "headerActions": {
38
+ "type": "ReactNode",
39
+ "required": false,
40
+ "description": "Extra header controls, rendered before the built-in collapse/close buttons."
41
+ },
42
+ "position": {
43
+ "type": "FloatingWindowPosition",
44
+ "required": false,
45
+ "description": "Controlled top-left position in viewport px."
46
+ },
47
+ "defaultPosition": {
48
+ "type": "FloatingWindowPosition",
49
+ "required": false,
50
+ "description": "Initial position when uncontrolled."
51
+ },
52
+ "onPositionChange": {
53
+ "type": "(position: FloatingWindowPosition) => void",
54
+ "required": false,
55
+ "description": "Called on every move frame and on viewport re-clamp, with the clamped position."
56
+ },
57
+ "onMoveEnd": {
58
+ "type": "(position: FloatingWindowPosition) => void",
59
+ "required": false,
60
+ "description": "Called once when a move gesture ends — the point at which to persist."
61
+ },
62
+ "size": {
63
+ "type": "FloatingWindowSize",
64
+ "required": false,
65
+ "description": "Controlled size in px."
66
+ },
67
+ "defaultSize": {
68
+ "type": "FloatingWindowSize",
69
+ "required": false,
70
+ "description": "Initial size when uncontrolled."
71
+ },
72
+ "onResize": {
73
+ "type": "(size: FloatingWindowSize) => void",
74
+ "required": false,
75
+ "description": "Called on every resize frame and on viewport re-clamp, with the clamped size."
76
+ },
77
+ "onResizeEnd": {
78
+ "type": "(size: FloatingWindowSize) => void",
79
+ "required": false,
80
+ "description": "Called once when a resize gesture ends — the point at which to persist."
81
+ },
82
+ "minWidth": {
83
+ "type": "number",
84
+ "required": false,
85
+ "description": "Minimum width in px (default 200)."
86
+ },
87
+ "minHeight": {
88
+ "type": "number",
89
+ "required": false,
90
+ "description": "Minimum height in px (default 120)."
91
+ },
92
+ "maxWidth": {
93
+ "type": "number",
94
+ "required": false,
95
+ "description": "Maximum width in px (default: viewport width)."
96
+ },
97
+ "maxHeight": {
98
+ "type": "number",
99
+ "required": false,
100
+ "description": "Maximum height in px (default: viewport height)."
101
+ },
102
+ "keepVisible": {
103
+ "type": "number",
104
+ "required": false,
105
+ "description": "Px of the window that must stay inside the viewport (default 56)."
106
+ },
107
+ "moveStep": {
108
+ "type": "number",
109
+ "required": false,
110
+ "description": "Step in px for keyboard moving (default 24)."
111
+ },
112
+ "resizeStep": {
113
+ "type": "number",
114
+ "required": false,
115
+ "description": "Step in px for keyboard resizing (default 24)."
116
+ },
117
+ "zIndex": {
118
+ "type": "number",
119
+ "required": false,
120
+ "description": "Inline stacking order. The host owns z-order across several windows."
121
+ },
122
+ "onActivate": {
123
+ "type": "() => void",
124
+ "required": false,
125
+ "description": "Called on pointerdown anywhere in the window, so the host can raise it."
126
+ },
127
+ "collapsed": {
128
+ "type": "boolean",
129
+ "required": false,
130
+ "description": "Shade the window down to its title bar."
131
+ },
132
+ "defaultCollapsed": {
133
+ "type": "boolean",
134
+ "required": false,
135
+ "description": "Initial collapsed state when uncontrolled."
136
+ },
137
+ "onCollapsedChange": {
138
+ "type": "(collapsed: boolean) => void",
139
+ "required": false,
140
+ "description": "Callback fired when collapsed state changes."
141
+ },
142
+ "collapsible": {
143
+ "type": "boolean",
144
+ "required": false,
145
+ "description": "Render the built-in collapse toggle (default true)."
146
+ },
147
+ "movable": {
148
+ "type": "boolean",
149
+ "required": false,
150
+ "description": "Allow drag-to-move by the title bar (default true)."
151
+ },
152
+ "resizable": {
153
+ "type": "boolean",
154
+ "required": false,
155
+ "description": "Allow drag-to-resize from the edges and corners (default true)."
156
+ },
157
+ "closeOnEsc": {
158
+ "type": "boolean",
159
+ "required": false,
160
+ "description": "Close on Escape while focus is inside the window (default false)."
161
+ },
162
+ "onClose": {
163
+ "type": "() => void",
164
+ "required": false,
165
+ "description": "Callback fired when the user dismisses the component."
166
+ },
167
+ "moveHandleAriaLabel": {
168
+ "type": "string",
169
+ "required": false,
170
+ "description": "Accessible label for the move handle."
171
+ },
172
+ "resizeHandleAriaLabel": {
173
+ "type": "string",
174
+ "required": false,
175
+ "description": "Accessible label for the resize handle."
176
+ },
177
+ "closeAriaLabel": {
178
+ "type": "string",
179
+ "required": false,
180
+ "description": "Accessible label for the close button."
181
+ },
182
+ "collapseAriaLabel": {
183
+ "type": "string",
184
+ "required": false,
185
+ "description": "Accessible label for the collapse toggle while expanded."
186
+ },
187
+ "expandAriaLabel": {
188
+ "type": "string",
189
+ "required": false,
190
+ "description": "Accessible label for the collapse toggle while collapsed."
191
+ },
192
+ "aria-label": {
193
+ "type": "string",
194
+ "required": false,
195
+ "description": "Accessible label when no visible title is present."
196
+ }
197
+ }
198
+ }
@@ -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.1",
3
+ "version": "2.6.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.1",
32
- "@smwb/ui-styles": "^1.1.0",
31
+ "@smwb/ui-react": "^2.6.0",
32
+ "@smwb/ui-styles": "^1.4.0",
33
33
  "glob": "^13.0.6",
34
34
  "typescript": "^6.0.3",
35
35
  "vitest": "^2.1.9"