@abraracs/better-shopify-wc-mcp 1.0.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.
Files changed (51) hide show
  1. package/README.md +110 -0
  2. package/dist/index.d.ts +10 -0
  3. package/dist/index.js +325 -0
  4. package/docs/avatar.md +481 -0
  5. package/docs/badge.md +266 -0
  6. package/docs/banner.md +350 -0
  7. package/docs/box.md +618 -0
  8. package/docs/button.md +604 -0
  9. package/docs/buttongroup.md +251 -0
  10. package/docs/checkbox.md +346 -0
  11. package/docs/chip.md +261 -0
  12. package/docs/choicelist.md +416 -0
  13. package/docs/clickable.md +703 -0
  14. package/docs/clickablechip.md +377 -0
  15. package/docs/colorfield.md +416 -0
  16. package/docs/colorpicker.md +152 -0
  17. package/docs/datefield.md +706 -0
  18. package/docs/datepicker.md +443 -0
  19. package/docs/divider.md +263 -0
  20. package/docs/dropzone.md +331 -0
  21. package/docs/emailfield.md +377 -0
  22. package/docs/grid.md +1246 -0
  23. package/docs/heading.md +201 -0
  24. package/docs/icon.md +295 -0
  25. package/docs/image.md +517 -0
  26. package/docs/link.md +456 -0
  27. package/docs/menu.md +331 -0
  28. package/docs/modal.md +640 -0
  29. package/docs/moneyfield.md +385 -0
  30. package/docs/numberfield.md +393 -0
  31. package/docs/orderedlist.md +224 -0
  32. package/docs/page.md +319 -0
  33. package/docs/paragraph.md +333 -0
  34. package/docs/passwordfield.md +381 -0
  35. package/docs/popover.md +419 -0
  36. package/docs/querycontainer.md +121 -0
  37. package/docs/searchfield.md +319 -0
  38. package/docs/section.md +267 -0
  39. package/docs/select.md +449 -0
  40. package/docs/spinner.md +121 -0
  41. package/docs/stack.md +748 -0
  42. package/docs/switch.md +365 -0
  43. package/docs/table.md +805 -0
  44. package/docs/text.md +339 -0
  45. package/docs/textarea.md +328 -0
  46. package/docs/textfield.md +425 -0
  47. package/docs/thumbnail.md +245 -0
  48. package/docs/tooltip.md +130 -0
  49. package/docs/unorderedlist.md +135 -0
  50. package/docs/urlfield.md +314 -0
  51. package/package.json +43 -0
@@ -0,0 +1,130 @@
1
+ ---
2
+ title: Tooltip
3
+ description: >-
4
+ Displays helpful information in a small overlay when users hover or focus on
5
+ an element. Use to provide additional context without cluttering the
6
+ interface.
7
+ api_name: app-home
8
+ source_url:
9
+ html: >-
10
+ https://shopify.dev/docs/api/app-home/polaris-web-components/overlays/tooltip
11
+ md: >-
12
+ https://shopify.dev/docs/api/app-home/polaris-web-components/overlays/tooltip.md
13
+ ---
14
+
15
+ # Tooltip
16
+
17
+ Displays helpful information in a small overlay when users hover or focus on an element. Use to provide additional context without cluttering the interface.
18
+
19
+ ## Slots
20
+
21
+ * children
22
+
23
+ HTMLElement
24
+
25
+ The content of the Tooltip.
26
+
27
+ Only accepts `Text`, `Paragraph` components, and raw `textContent`.
28
+
29
+ ## Slots
30
+
31
+ * children
32
+
33
+ HTMLElement
34
+
35
+ The content of the Tooltip.
36
+
37
+ Only accepts `Text`, `Paragraph` components, and raw `textContent`.
38
+
39
+ Examples
40
+
41
+ ### Examples
42
+
43
+ * #### Code
44
+
45
+ ##### jsx
46
+
47
+ ```jsx
48
+ <>
49
+ <s-tooltip id="bold-tooltip">Bold</s-tooltip>
50
+ <s-button interestFor="bold-tooltip" accessibilityLabel="Bold">
51
+ B
52
+ </s-button>
53
+ </>
54
+ ```
55
+
56
+ ##### html
57
+
58
+ ```html
59
+ <s-tooltip id="bold-tooltip">Bold</s-tooltip>
60
+ <s-button interestFor="bold-tooltip" accessibilityLabel="Bold">B</s-button>
61
+ ```
62
+
63
+ * #### Basic Usage
64
+
65
+ ##### Description
66
+
67
+ Demonstrates a simple tooltip that provides additional context for a text element when hovered or focused.
68
+
69
+ ##### jsx
70
+
71
+ ```jsx
72
+ <>
73
+ <s-tooltip id="shipping-status-tooltip">
74
+ <s-text>This order has shipping labels.</s-text>
75
+ </s-tooltip>
76
+ <s-text interestFor="shipping-status-tooltip">Shipping status</s-text>
77
+ </>
78
+ ```
79
+
80
+ ##### html
81
+
82
+ ```html
83
+ <s-tooltip id="shipping-status-tooltip">
84
+ <s-text>This order has shipping labels.</s-text>
85
+ </s-tooltip>
86
+ <s-text interestFor="shipping-status-tooltip">Shipping status</s-text>
87
+ ```
88
+
89
+ * #### With Icon Button
90
+
91
+ ##### Description
92
+
93
+ Shows how to add a tooltip to an icon button, providing a clear explanation of the button's action when hovered.
94
+
95
+ ##### jsx
96
+
97
+ ```jsx
98
+ <>
99
+ <s-tooltip id="delete-button-tooltip">
100
+ <s-text>Delete item permanently</s-text>
101
+ </s-tooltip>
102
+ <s-button interestFor="delete-button-tooltip">
103
+ <s-icon tone="neutral" type="info" />
104
+ </s-button>
105
+ </>
106
+ ```
107
+
108
+ ##### html
109
+
110
+ ```html
111
+ <s-tooltip id="delete-button-tooltip">
112
+ <s-text>Delete item permanently</s-text>
113
+ </s-tooltip>
114
+ <s-button interestFor="delete-button-tooltip">
115
+ <s-icon tone="neutral" type="info"></s-icon>
116
+ </s-button>
117
+ ```
118
+
119
+ ## Usage
120
+
121
+ Tooltips only render on devices with a pointer and do not display on mobile devices.
122
+
123
+ ## Best practices
124
+
125
+ * Use for additional, non-essential context only
126
+ * Provide for icon-only buttons or buttons with keyboard shortcuts
127
+ * Keep content concise and in sentence case
128
+ * Don't use for critical information, errors, or blocking messages
129
+ * Don't contain any links or buttons
130
+ * Use sparingly. If you need many tooltips, clarify the design and language instead
@@ -0,0 +1,135 @@
1
+ ---
2
+ title: UnorderedList
3
+ description: >-
4
+ Displays a bulleted list of related items. Use to present collections of items
5
+ or options where the sequence isn’t critical.
6
+ api_name: app-home
7
+ source_url:
8
+ html: >-
9
+ https://shopify.dev/docs/api/app-home/polaris-web-components/structure/unorderedlist
10
+ md: >-
11
+ https://shopify.dev/docs/api/app-home/polaris-web-components/structure/unorderedlist.md
12
+ ---
13
+
14
+ # Unordered​List
15
+
16
+ Displays a bulleted list of related items. Use to present collections of items or options where the sequence isn’t critical.
17
+
18
+ ## Slots
19
+
20
+ * children
21
+
22
+ HTMLElement
23
+
24
+ The items of the UnorderedList.
25
+
26
+ Only ListItems are accepted.
27
+
28
+ ## ListItem
29
+
30
+ Represents a single item within an unordered or ordered list. Use only as a child of `s-unordered-list` or `s-ordered-list` components.
31
+
32
+ ## Slots
33
+
34
+ * children
35
+
36
+ HTMLElement
37
+
38
+ The content of the ListItem.
39
+
40
+ Examples
41
+
42
+ ### Examples
43
+
44
+ * #### Code
45
+
46
+ ##### jsx
47
+
48
+ ```jsx
49
+ <s-unordered-list>
50
+ <s-list-item>Red shirt</s-list-item>
51
+ <s-list-item>Green shirt</s-list-item>
52
+ <s-list-item>Blue shirt</s-list-item>
53
+ </s-unordered-list>
54
+ ```
55
+
56
+ ##### html
57
+
58
+ ```html
59
+ <s-unordered-list>
60
+ <s-list-item>Red shirt</s-list-item>
61
+ <s-list-item>Green shirt</s-list-item>
62
+ <s-list-item>Blue shirt</s-list-item>
63
+ </s-unordered-list>
64
+ ```
65
+
66
+ * #### Unordered list with nested items
67
+
68
+ ##### Description
69
+
70
+ A standard unordered list with nested items demonstrating hierarchical content structure.
71
+
72
+ ##### jsx
73
+
74
+ ```jsx
75
+ <s-stack gap="base">
76
+ <s-box borderWidth="small-100" borderRadius="base" padding="base">
77
+ <s-unordered-list>
78
+ <s-list-item>Configure payment settings</s-list-item>
79
+ <s-list-item>
80
+ Set up shipping options
81
+ <s-unordered-list>
82
+ <s-list-item>Domestic shipping rates</s-list-item>
83
+ <s-list-item>International shipping zones</s-list-item>
84
+ </s-unordered-list>
85
+ </s-list-item>
86
+ <s-list-item>Add product descriptions</s-list-item>
87
+ </s-unordered-list>
88
+ </s-box>
89
+
90
+ <s-box borderWidth="small-100" borderRadius="base" padding="base">
91
+ <s-unordered-list>
92
+ <s-list-item>Enable online payments</s-list-item>
93
+ <s-list-item>Set up shipping rates</s-list-item>
94
+ <s-list-item>Configure tax settings</s-list-item>
95
+ <s-list-item>Add product descriptions</s-list-item>
96
+ </s-unordered-list>
97
+ </s-box>
98
+ </s-stack>
99
+ ```
100
+
101
+ ##### html
102
+
103
+ ```html
104
+ <s-stack gap="base">
105
+ <s-box borderWidth="small-100" borderRadius="base" padding="base">
106
+ <s-unordered-list>
107
+ <s-list-item>Configure payment settings</s-list-item>
108
+ <s-list-item>
109
+ Set up shipping options
110
+ <s-unordered-list>
111
+ <s-list-item>Domestic shipping rates</s-list-item>
112
+ <s-list-item>International shipping zones</s-list-item>
113
+ </s-unordered-list>
114
+ </s-list-item>
115
+ <s-list-item>Add product descriptions</s-list-item>
116
+ </s-unordered-list>
117
+ </s-box>
118
+
119
+ <s-box borderWidth="small-100" borderRadius="base" padding="base">
120
+ <s-unordered-list>
121
+ <s-list-item>Enable online payments</s-list-item>
122
+ <s-list-item>Set up shipping rates</s-list-item>
123
+ <s-list-item>Configure tax settings</s-list-item>
124
+ <s-list-item>Add product descriptions</s-list-item>
125
+ </s-unordered-list>
126
+ </s-box>
127
+ </s-stack>
128
+ ```
129
+
130
+ ## Best practices
131
+
132
+ * Use to break up related content and improve scannability
133
+ * Phrase items consistently (start each with a noun or verb)
134
+ * Start each item with a capital letter
135
+ * Don't use commas or semicolons at the end of lines
@@ -0,0 +1,314 @@
1
+ ---
2
+ title: URLField
3
+ description: Collect URLs from users with built-in formatting and validation.
4
+ api_name: app-home
5
+ source_url:
6
+ html: 'https://shopify.dev/docs/api/app-home/polaris-web-components/forms/urlfield'
7
+ md: >-
8
+ https://shopify.dev/docs/api/app-home/polaris-web-components/forms/urlfield.md
9
+ ---
10
+
11
+ # URLField
12
+
13
+ Collect URLs from users with built-in formatting and validation.
14
+
15
+ ## URLField
16
+
17
+ * autocomplete
18
+
19
+ "on" | "off" | \`section-${string} url\` | \`section-${string} photo\` | \`section-${string} impp\` | \`section-${string} home impp\` | \`section-${string} mobile impp\` | \`section-${string} fax impp\` | \`section-${string} pager impp\` | "shipping url" | "shipping photo" | "shipping impp" | "shipping home impp" | "shipping mobile impp" | "shipping fax impp" | "shipping pager impp" | "billing url" | "billing photo" | "billing impp" | "billing home impp" | "billing mobile impp" | "billing fax impp" | "billing pager impp" | \`section-${string} shipping url\` | \`section-${string} shipping photo\` | \`section-${string} shipping impp\` | \`section-${string} shipping home impp\` | \`section-${string} shipping mobile impp\` | \`section-${string} shipping fax impp\` | \`section-${string} shipping pager impp\` | \`section-${string} billing url\` | \`section-${string} billing photo\` | \`section-${string} billing impp\` | \`section-${string} billing home impp\` | \`section-${string} billing mobile impp\` | \`section-${string} billing fax impp\` | \`section-${string} billing pager impp\` | URLAutocompleteField
20
+
21
+ Default: 'on' for everything else
22
+
23
+ A hint as to the intended content of the field.
24
+
25
+ When set to `on` (the default), this property indicates that the field should support autofill, but you do not have any more semantic information on the intended contents.
26
+
27
+ When set to `off`, you are indicating that this field contains sensitive information, or contents that are never saved, like one-time codes.
28
+
29
+ Alternatively, you can provide value which describes the specific data you would like to be entered into this field during autofill.
30
+
31
+ * defaultValue
32
+
33
+ string
34
+
35
+ The default value for the field.
36
+
37
+ * details
38
+
39
+ string
40
+
41
+ Additional text to provide context or guidance for the field. This text is displayed along with the field and its label to offer more information or instructions to the user.
42
+
43
+ This will also be exposed to screen reader users.
44
+
45
+ * disabled
46
+
47
+ boolean
48
+
49
+ Default: false
50
+
51
+ Disables the field, disallowing any interaction.
52
+
53
+ * error
54
+
55
+ string
56
+
57
+ Indicate an error to the user. The field will be given a specific stylistic treatment to communicate problems that have to be resolved immediately.
58
+
59
+ * id
60
+
61
+ string
62
+
63
+ A unique identifier for the element.
64
+
65
+ * label
66
+
67
+ string
68
+
69
+ Content to use as the field label.
70
+
71
+ * labelAccessibilityVisibility
72
+
73
+ "visible" | "exclusive"
74
+
75
+ Default: 'visible'
76
+
77
+ Changes the visibility of the component's label.
78
+
79
+ * `visible`: the label is visible to all users.
80
+ * `exclusive`: the label is visually hidden but remains in the accessibility tree.
81
+
82
+ * maxLength
83
+
84
+ number
85
+
86
+ Default: Infinity
87
+
88
+ Specifies the maximum number of characters allowed.
89
+
90
+ * minLength
91
+
92
+ number
93
+
94
+ Default: 0
95
+
96
+ Specifies the min number of characters allowed.
97
+
98
+ * name
99
+
100
+ string
101
+
102
+ An identifier for the field that is unique within the nearest containing form.
103
+
104
+ * placeholder
105
+
106
+ string
107
+
108
+ A short hint that describes the expected value of the field.
109
+
110
+ * readOnly
111
+
112
+ boolean
113
+
114
+ Default: false
115
+
116
+ The field cannot be edited by the user. It is focusable will be announced by screen readers.
117
+
118
+ * required
119
+
120
+ boolean
121
+
122
+ Default: false
123
+
124
+ Whether the field needs a value. This requirement adds semantic value to the field, but it will not cause an error to appear automatically. If you want to present an error when this field is empty, you can do so with the `error` property.
125
+
126
+ * value
127
+
128
+ string
129
+
130
+ The current value for the field. If omitted, the field will be empty.
131
+
132
+ ### URLAutocompleteField
133
+
134
+ ```ts
135
+ 'url' | 'photo' | 'impp' | 'home impp' | 'mobile impp' | 'fax impp' | 'pager impp'
136
+ ```
137
+
138
+ ## Events
139
+
140
+ Learn more about [registering events](https://shopify.dev/docs/api/app-home/using-polaris-components#event-handling).
141
+
142
+ * blur
143
+
144
+ CallbackEventListener<'input'>
145
+
146
+ * change
147
+
148
+ CallbackEventListener<'input'>
149
+
150
+ * focus
151
+
152
+ CallbackEventListener<'input'>
153
+
154
+ * input
155
+
156
+ CallbackEventListener<'input'>
157
+
158
+ ### CallbackEventListener
159
+
160
+ ```ts
161
+ (EventListener & {
162
+ (event: CallbackEvent<T>): void;
163
+ }) | null
164
+ ```
165
+
166
+ ### CallbackEvent
167
+
168
+ ```ts
169
+ Event & {
170
+ currentTarget: HTMLElementTagNameMap[T];
171
+ }
172
+ ```
173
+
174
+ Examples
175
+
176
+ ### Examples
177
+
178
+ * #### Code
179
+
180
+ ##### jsx
181
+
182
+ ```jsx
183
+ <s-url-field
184
+ label="Your website"
185
+ details="Join the partner ecosystem"
186
+ placeholder="https://shopify.com/partner"
187
+ />
188
+ ```
189
+
190
+ ##### html
191
+
192
+ ```html
193
+ <s-url-field
194
+ label="Your website"
195
+ details="Join the partner ecosystem"
196
+ placeholder="https://shopify.com/partner"
197
+ ></s-url-field>
198
+ ```
199
+
200
+ * #### Basic usage
201
+
202
+ ##### Description
203
+
204
+ Demonstrates a simple URL input field with a label and placeholder, showing the minimal configuration needed for collecting a URL.
205
+
206
+ ##### jsx
207
+
208
+ ```jsx
209
+ <s-stack gap="base">
210
+ {/* Simple URL input */}
211
+ <s-url-field
212
+ label="Website URL"
213
+ placeholder="https://example.com"
214
+ />
215
+ </s-stack>
216
+ ```
217
+
218
+ ##### html
219
+
220
+ ```html
221
+ <s-stack gap="base">
222
+ <!-- Simple URL input -->
223
+ <s-url-field
224
+ label="Website URL"
225
+ placeholder="https://example.com"
226
+ ></s-url-field>
227
+ </s-stack>
228
+ ```
229
+
230
+ * #### With validation
231
+
232
+ ##### Description
233
+
234
+ Shows a URL input field with built-in validation, including required status, minimum and maximum length constraints, and a custom error message for invalid inputs.
235
+
236
+ ##### jsx
237
+
238
+ ```jsx
239
+ <s-url-field
240
+ label="Company website"
241
+ required
242
+ minLength={10}
243
+ maxLength={200}
244
+ error="Please enter a valid website URL"
245
+ />
246
+ ```
247
+
248
+ ##### html
249
+
250
+ ```html
251
+ <s-url-field
252
+ label="Company website"
253
+ required
254
+ minLength="10"
255
+ maxLength="200"
256
+ error="Please enter a valid website URL"
257
+ ></s-url-field>
258
+ ```
259
+
260
+ * #### With default value
261
+
262
+ ##### Description
263
+
264
+ Illustrates a URL field pre-populated with a default value, set to read-only mode to prevent user modifications.
265
+
266
+ ##### jsx
267
+
268
+ ```jsx
269
+ <s-stack gap="base">
270
+ <s-url-field
271
+ label="Profile URL"
272
+ defaultValue="https://shop.myshopify.com"
273
+ readOnly
274
+ />
275
+ </s-stack>
276
+ ```
277
+
278
+ ##### html
279
+
280
+ ```html
281
+ <s-stack gap="base">
282
+ <s-url-field
283
+ label="Profile URL"
284
+ value="https://shop.myshopify.com"
285
+ readOnly
286
+ ></s-url-field>
287
+ </s-stack>
288
+ ```
289
+
290
+ * #### Disabled state
291
+
292
+ ##### Description
293
+
294
+ Shows a URL field in a disabled state, displaying a pre-filled URL that cannot be edited by the user.
295
+
296
+ ##### jsx
297
+
298
+ ```jsx
299
+ <s-url-field
300
+ label="Store URL"
301
+ value="https://your-store.myshopify.com"
302
+ disabled
303
+ />
304
+ ```
305
+
306
+ ##### html
307
+
308
+ ```html
309
+ <s-url-field
310
+ label="Store URL"
311
+ value="https://your-store.myshopify.com"
312
+ disabled
313
+ ></s-url-field>
314
+ ```
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@abraracs/better-shopify-wc-mcp",
3
+ "version": "1.0.0",
4
+ "description": "MCP server for Shopify Polaris web components - accurate attributes, no hallucinations, with workaround patterns",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "better-shopify-wc-mcp": "dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "start": "node dist/index.js",
13
+ "dev": "tsx src/index.ts",
14
+ "prepublishOnly": "npm run build"
15
+ },
16
+ "keywords": [
17
+ "mcp",
18
+ "shopify",
19
+ "polaris",
20
+ "web-components",
21
+ "cursor",
22
+ "github-copilot",
23
+ "claude",
24
+ "ai"
25
+ ],
26
+ "author": "abraracs",
27
+ "license": "MIT",
28
+ "dependencies": {
29
+ "@modelcontextprotocol/sdk": "^1.0.0"
30
+ },
31
+ "devDependencies": {
32
+ "@types/node": "^20.0.0",
33
+ "tsx": "^4.0.0",
34
+ "typescript": "^5.0.0"
35
+ },
36
+ "files": [
37
+ "dist",
38
+ "docs"
39
+ ],
40
+ "engines": {
41
+ "node": ">=18"
42
+ }
43
+ }