@synergy-design-system/mcp 1.0.0 → 1.2.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.
@@ -28,6 +28,30 @@ The default base path of the icon library is set to **assets/icons/**.
28
28
  To make the <syn-icon> work out of the box, without configuring anything, the used icons can be copied to this path in you application.
29
29
  This can either be done manually or with the help of the bundler.
30
30
 
31
+ ### Differences in icon usage between Synergy 2.0 and Synergy 3.0
32
+
33
+ With the upgrade to Synergy 3.0, new icons will be used.
34
+ Those icons are already available as assets in the \`@synergy-design-system/assets\` package.
35
+ When using the new icons, you have to make sure that the icons are available in the \`assets/icons/\` directory of your project.
36
+ The new SICK 2025 icons will be available as `outline` and `fill` variant. `Outline` is the default icon variant and should be used in most cases. `Fill` icons have a slighty different naming. They have the same name as the `outline` icons, but with a suffix of `_fill`. If the `fill` icons should be used without the `_fill` suffix, the icon names need to be renamed. For some examples see the following subchapters.
37
+
38
+ System icons come bundled with the \`@synergy-design-system/components\` package. You may switch to the new icons with the new \`setSystemIconLibrary\` utility provided.
39
+ Please have a look at the following example to see how to switch the icon library.
40
+ Note that if you do not call this function, it will default to the 2018 icon library, which is used in Synergy 2.0 until Synergy 3.0 is released.
41
+
42
+ ```javascript
43
+ import { setSystemIconLibrary } from "@synergy-design-system/components";
44
+
45
+ // Switch to the 2025 icon library
46
+ setDefaultIconLibrary("sick2025");
47
+
48
+ // Switch back to the 2018 icon library
49
+ setDefaultIconLibrary("sick2018");
50
+
51
+ // Switch to the default icon library (2018 for Synergy 2.0, 2025 for Synergy 3.0)
52
+ setDefaultIconLibrary();
53
+ ```
54
+
31
55
  #### Angular + Webpack
32
56
 
33
57
  Including assets from another library can be achieved in angular via configuring the assets configuration in the angular.json file.
@@ -35,7 +59,10 @@ For more information have a look at the [angular documentation](https://angular.
35
59
 
36
60
  Here's an example that copies the Synergy icons to the path **assets/icons/** of an angular project:
37
61
 
62
+ ##### Synergy icons SICK 2018
63
+
38
64
  ```json
65
+ // angular.json
39
66
  "assets": [
40
67
  {
41
68
  "glob": "**/*",
@@ -45,12 +72,56 @@ Here's an example that copies the Synergy icons to the path **assets/icons/** of
45
72
  ],
46
73
  ```
47
74
 
75
+ ```html
76
+ <!-- Usage -->
77
+ <syn-icon name="wallpaper"> <syn-icon /></syn-icon>
78
+ ```
79
+
80
+ ##### Synergy icons SICK 2025 outline
81
+
82
+ ```json
83
+ // angular.json
84
+ "assets": [
85
+ {
86
+ "glob": "**/*",
87
+ "input": "./node_modules/@synergy-design-system/assets/src/sick2025/outline",
88
+ "output": "/assets/icons"
89
+ }
90
+ ],
91
+ ```
92
+
93
+ ```html
94
+ <!-- Usage -->
95
+ <syn-icon name="wallpaper"> <syn-icon /></syn-icon>
96
+ ```
97
+
98
+ ##### Synergy icons SICK 2025 fill
99
+
100
+ ```json
101
+ // angular.json
102
+ "assets": [
103
+ {
104
+ "glob": "**/*",
105
+ "input": "./node_modules/@synergy-design-system/assets/src/sick2025/fill",
106
+ "output": "/assets/icons"
107
+ }
108
+ ],
109
+ ```
110
+
111
+ ```html
112
+ <!-- Usage -->
113
+ <syn-icon name="wallpaper_fill"> <syn-icon /></syn-icon>
114
+ ```
115
+
48
116
  #### Vite
49
117
 
50
118
  Including assets from another library in vite project can be achieved via using the [vite-plugin-static-copy plugin](https://www.npmjs.com/package/vite-plugin-static-copy).
51
119
  Here's an example with adapted vite.config.ts that copies the Synergy icons to the path **assets/icons/** of a vite project:
52
120
 
121
+ ##### Synergy icons SICK 2018
122
+
53
123
  ```js
124
+ // Vite config
54
125
  import { defineConfig } from "vite";
55
126
  import { viteStaticCopy } from "vite-plugin-static-copy";
56
127
 
@@ -68,6 +139,93 @@ export default defineConfig({
68
139
  });
69
140
  ```
70
141
 
142
+ ```html
143
+ <!-- Usage -->
144
+ <syn-icon name="wallpaper"> <syn-icon /></syn-icon>
145
+ ```
146
+
147
+ ##### Synergy icons SICK 2025 outline
148
+
149
+ ```js
150
+ // Vite config
151
+ import { defineConfig } from "vite";
152
+ import { viteStaticCopy } from "vite-plugin-static-copy";
153
+
154
+ export default defineConfig({
155
+ plugins: [
156
+ viteStaticCopy({
157
+ targets: [
158
+ {
159
+ src: "node_modules/@synergy-design-system/assets/src/sick2025/outline/*",
160
+ dest: "./assets/icons/",
161
+ },
162
+ ],
163
+ }),
164
+ ],
165
+ });
166
+ ```
167
+
168
+ ```html
169
+ <!-- Usage -->
170
+ <syn-icon name="wallpaper"> <syn-icon /></syn-icon>
171
+ ```
172
+
173
+ ##### Synergy icons SICK 2025 fill
174
+
175
+ Usage with `_fill` suffix:
176
+
177
+ ```js
178
+ // Vite config
179
+ import { defineConfig } from "vite";
180
+ import { viteStaticCopy } from "vite-plugin-static-copy";
181
+
182
+ export default defineConfig({
183
+ plugins: [
184
+ viteStaticCopy({
185
+ targets: [
186
+ {
187
+ src: "node_modules/@synergy-design-system/assets/src/sick2025/fill/*",
188
+ dest: "./assets/icons/",
189
+ },
190
+ ],
191
+ }),
192
+ ],
193
+ });
194
+ ```
195
+
196
+ ```html
197
+ <!-- Usage -->
198
+ <syn-icon name="wallpaper_fill"> <syn-icon /></syn-icon>
199
+ ```
200
+
201
+ Usage without `_fill` suffix by renaming files:
202
+
203
+ ```js
204
+ // Vite config
205
+ import { defineConfig } from "vite";
206
+ import { viteStaticCopy } from "vite-plugin-static-copy";
207
+
208
+ export default defineConfig({
209
+ plugins: [
210
+ viteStaticCopy({
211
+ targets: [
212
+ {
213
+ src: "node_modules/@synergy-design-system/assets/src/sick2025/fill/*",
214
+ dest: "./assets/icons/",
215
+ rename: (name, extension) =>
216
+ `${name.replace(/_fill$/, "")}.${extension}`,
217
+ },
218
+ ],
219
+ }),
220
+ ],
221
+ });
222
+ ```
223
+
224
+ ```html
225
+ <!-- Usage -->
226
+ <syn-icon name="wallpaper"> <syn-icon /></syn-icon>
227
+ ```
228
+
71
229
  ### How to use a custom icon library
72
230
 
73
231
  To register an additional icon library, use the `registerIconLibrary()` function that's exported from `utilities/icon-library.js`.
@@ -130,6 +288,7 @@ This can be done in multiple ways:
130
288
 
131
289
  The `createSpriteSheet` function is provided by the `@synergy-design-system/assets` package.
132
290
  It takes an array of icon keys and returns a string representation of the SVG sprite sheet, intended to be saved into the file system.
291
+ You may also provide an optional second argument to specify the icon set to use, either `sick2018` or `sick2025`. If not provided, it will default to `sick2018` for Synergy V2 and `sick2025` for Synergy V3.
133
292
  As we do not know how exactly you want to use the spritesheet, we will just print it to the console in the following example.
134
293
 
135
294
  ```typescript
@@ -141,6 +300,14 @@ const icons = [
141
300
  "battery_charging_full",
142
301
  "notifications",
143
302
  ];
303
+
304
+ // V2 iconsheet
305
+ const sheet = createSpriteSheet(icons, "sick2018");
306
+
307
+ // V3 iconsheet
308
+ const sheet = createSpriteSheet(icons, "sick2025");
309
+
310
+ // Automatically chooses the default, depending on the version of Synergy you are using
144
311
  const sheet = createSpriteSheet(icons);
145
312
 
146
313
  console.log(sheet);
@@ -154,7 +321,12 @@ cd my-project
154
321
 
155
322
  # Create the spritesheet on the command line.
156
323
  # You will need to provide a list of icons to include in the spritesheet.
324
+ # Provide the wanted iconset with the --iconset flag.
157
325
  # The following command will make sure to save the spritesheet to the file icons.svg
326
+
327
+ # Generates the icons from the 2025 iconset
328
+ npx syn-create-spritesheet --icons=warning,inventory,battery_charging_full,notifications --iconset=sick2025 > public/icons.svg
329
+
158
330
  npx syn-create-spritesheet --icons=warning,inventory,battery_charging_full,notifications > public/icons.svg
159
331
  ```
160
332
 
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "globby": "^14.1.0",
12
12
  "serve-handler": "^6.1.6",
13
13
  "zod": "^3.25.67",
14
- "@synergy-design-system/assets": "1.17.0"
14
+ "@synergy-design-system/assets": "1.18.0"
15
15
  },
16
16
  "description": "MCP Server for the Synergy Design System",
17
17
  "devDependencies": {
@@ -31,10 +31,10 @@
31
31
  "ts-jest": "^29.4.0",
32
32
  "typescript": "^5.8.3",
33
33
  "@synergy-design-system/docs": "0.1.0",
34
+ "@synergy-design-system/components": "2.40.0",
34
35
  "@synergy-design-system/styles": "1.7.2",
35
36
  "@synergy-design-system/eslint-config-syn": "^0.1.0",
36
- "@synergy-design-system/components": "2.39.2",
37
- "@synergy-design-system/tokens": "^2.22.0"
37
+ "@synergy-design-system/tokens": "^2.23.0"
38
38
  },
39
39
  "exports": {
40
40
  ".": {
@@ -119,7 +119,7 @@
119
119
  "directory": "packages/mcp"
120
120
  },
121
121
  "type": "module",
122
- "version": "1.0.0",
122
+ "version": "1.2.0",
123
123
  "scripts": {
124
124
  "build": "pnpm run build:ts && pnpm run build:metadata && pnpm build:hash",
125
125
  "build:all": "pnpm run build && pnpm run build:storybook",