@synergy-design-system/mcp 1.21.0 → 1.21.1
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/CHANGELOG.md +8 -0
- package/dist/utilities/storybook/scraper.js +37 -1
- package/metadata/checksum.txt +1 -1
- package/metadata/packages/tokens/dark.css +1 -1
- package/metadata/packages/tokens/index.js +1 -1
- package/metadata/packages/tokens/light.css +1 -1
- package/metadata/packages/tokens/sick2018_dark.css +1 -1
- package/metadata/packages/tokens/sick2018_light.css +1 -1
- package/metadata/packages/tokens/sick2025_dark.css +1 -1
- package/metadata/packages/tokens/sick2025_light.css +1 -1
- package/metadata/static/components/syn-combobox/docs.md +0 -41
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.21.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1080](https://github.com/synergy-design-system/synergy-design-system/pull/1080) [`aab4c0e`](https://github.com/synergy-design-system/synergy-design-system/commit/aab4c0e23b075e4b3c98d5d14d754c718fd74546) Thanks [@schilchSICKAG](https://github.com/schilchSICKAG)! - Released on: 2025-11-10
|
|
8
|
+
|
|
9
|
+
fix: 🐛 MCP: Exclude flaky stories from output (#1077)
|
|
10
|
+
|
|
3
11
|
## 1.21.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -3,6 +3,34 @@ import { dirname } from 'node:path';
|
|
|
3
3
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
4
4
|
import { chromium } from 'playwright';
|
|
5
5
|
import prettier from 'prettier';
|
|
6
|
+
import storybookOutput from '@synergy-design-system/docs/dist/index.json' with { type: 'json' };
|
|
7
|
+
/**
|
|
8
|
+
* Check if a story should be skipped based on its tags
|
|
9
|
+
* @param storyId The story ID to check (e.g., "components-syn-combobox--async-options")
|
|
10
|
+
* @returns true if the story should be skipped, false otherwise
|
|
11
|
+
*/
|
|
12
|
+
function shouldSkipStory(storyId) {
|
|
13
|
+
const entries = storybookOutput.entries;
|
|
14
|
+
const storyEntry = entries[storyId];
|
|
15
|
+
return storyEntry?.tags?.includes('skip_mcp') || false;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Check if a story heading should be skipped by finding the corresponding story ID
|
|
19
|
+
* @param docsStoryId The docs story ID (e.g., "components-syn-combobox--docs")
|
|
20
|
+
* @param heading The story heading (e.g., "Async Options")
|
|
21
|
+
* @returns true if the story should be skipped, false otherwise
|
|
22
|
+
*/
|
|
23
|
+
function shouldSkipStoryByHeading(docsStoryId, heading) {
|
|
24
|
+
// Get the component prefix from docs story ID
|
|
25
|
+
// (e.g., "components-syn-combobox" from "components-syn-combobox--docs")
|
|
26
|
+
const componentPrefix = docsStoryId.replace('--docs', '');
|
|
27
|
+
// Find matching story by converting heading to potential story ID format
|
|
28
|
+
// Story names are typically converted from "Async Options" to "async-options"
|
|
29
|
+
const potentialStorySlug = heading.toLowerCase().replace(/\s+/g, '-');
|
|
30
|
+
const potentialStoryId = `${componentPrefix}--${potentialStorySlug}`;
|
|
31
|
+
// Check if this potential story ID exists and should be skipped
|
|
32
|
+
return shouldSkipStory(potentialStoryId);
|
|
33
|
+
}
|
|
6
34
|
export class StorybookScraper {
|
|
7
35
|
config;
|
|
8
36
|
constructor(config) {
|
|
@@ -37,7 +65,7 @@ export class StorybookScraper {
|
|
|
37
65
|
await page.waitForSelector('.sb-anchor');
|
|
38
66
|
// Extract the stories metadata first
|
|
39
67
|
// We get basic info and identify stories that need iframe content
|
|
40
|
-
const
|
|
68
|
+
const rawStoryMetadata = await page.evaluate(() => Array.from(document.querySelectorAll('.sb-anchor'))
|
|
41
69
|
.map((story, index) => {
|
|
42
70
|
const description = story.querySelector(':scope > p')?.textContent || '';
|
|
43
71
|
const exampleSource = story.querySelector('.sb-story #root-inner')?.innerHTML || '';
|
|
@@ -52,6 +80,14 @@ export class StorybookScraper {
|
|
|
52
80
|
};
|
|
53
81
|
})
|
|
54
82
|
.filter(x => x.heading));
|
|
83
|
+
// Filter out stories that should be skipped based on their tags
|
|
84
|
+
const storyMetadata = rawStoryMetadata.filter(story => {
|
|
85
|
+
const shouldSkip = shouldSkipStoryByHeading(storyId, story.heading);
|
|
86
|
+
if (shouldSkip) {
|
|
87
|
+
console.log(`Skipping story "${story.heading}" due to skip_mcp tag`);
|
|
88
|
+
}
|
|
89
|
+
return !shouldSkip;
|
|
90
|
+
});
|
|
55
91
|
// Process each story and handle iframe content if needed
|
|
56
92
|
const results = await Promise.all(storyMetadata.map(async (storyMeta) => {
|
|
57
93
|
let { exampleSource } = storyMeta;
|
package/metadata/checksum.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
dd20adbd42b1195face89f971b318975
|
|
@@ -2241,47 +2241,6 @@ The height of the filtered options list can be customized by setting the max-hei
|
|
|
2241
2241
|
|
|
2242
2242
|
---
|
|
2243
2243
|
|
|
2244
|
-
## Async Options
|
|
2245
|
-
|
|
2246
|
-
It is possible to add options dynamically to the combobox e.g. if the option values need to be fetched asynchronously from a remote server or API.
|
|
2247
|
-
|
|
2248
|
-
```html
|
|
2249
|
-
<syn-combobox
|
|
2250
|
-
label="Async options"
|
|
2251
|
-
class="async-combobox"
|
|
2252
|
-
size="medium"
|
|
2253
|
-
placement="bottom"
|
|
2254
|
-
form=""
|
|
2255
|
-
>
|
|
2256
|
-
<syn-option
|
|
2257
|
-
role="option"
|
|
2258
|
-
aria-selected="false"
|
|
2259
|
-
aria-disabled="false"
|
|
2260
|
-
value=""
|
|
2261
|
-
id="syn-combobox-option-0"
|
|
2262
|
-
>Option 1</syn-option
|
|
2263
|
-
>
|
|
2264
|
-
<syn-option
|
|
2265
|
-
role="option"
|
|
2266
|
-
aria-selected="false"
|
|
2267
|
-
aria-disabled="false"
|
|
2268
|
-
value=""
|
|
2269
|
-
id="syn-combobox-option-1"
|
|
2270
|
-
>Option 2</syn-option
|
|
2271
|
-
>
|
|
2272
|
-
<syn-option
|
|
2273
|
-
role="option"
|
|
2274
|
-
aria-selected="false"
|
|
2275
|
-
aria-disabled="false"
|
|
2276
|
-
value=""
|
|
2277
|
-
id="syn-combobox-option-2"
|
|
2278
|
-
>Option 3</syn-option
|
|
2279
|
-
>
|
|
2280
|
-
</syn-combobox>
|
|
2281
|
-
```
|
|
2282
|
-
|
|
2283
|
-
---
|
|
2284
|
-
|
|
2285
2244
|
## Custom Filter
|
|
2286
2245
|
|
|
2287
2246
|
A custom filter can be applied by passing a filter function to the filter property. This filter() function will be called for each option. The first argument is an <syn-option> element and the second argument is the query string.
|
package/package.json
CHANGED
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"serve-handler": "^6.1.6",
|
|
29
29
|
"ts-jest": "^29.4.0",
|
|
30
30
|
"typescript": "^5.9.3",
|
|
31
|
-
"@synergy-design-system/
|
|
31
|
+
"@synergy-design-system/docs": "0.1.0",
|
|
32
32
|
"@synergy-design-system/eslint-config-syn": "^0.1.0",
|
|
33
|
+
"@synergy-design-system/components": "2.59.0",
|
|
33
34
|
"@synergy-design-system/styles": "1.9.0",
|
|
34
|
-
"@synergy-design-system/tokens": "^2.40.0"
|
|
35
|
-
"@synergy-design-system/docs": "0.1.0"
|
|
35
|
+
"@synergy-design-system/tokens": "^2.40.0"
|
|
36
36
|
},
|
|
37
37
|
"exports": {
|
|
38
38
|
".": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"directory": "packages/mcp"
|
|
67
67
|
},
|
|
68
68
|
"type": "module",
|
|
69
|
-
"version": "1.21.
|
|
69
|
+
"version": "1.21.1",
|
|
70
70
|
"scripts": {
|
|
71
71
|
"build": "pnpm run build:ts && pnpm run build:metadata && pnpm build:hash",
|
|
72
72
|
"build:all": "pnpm run build && pnpm run build:storybook",
|