@imenam/mcp-design 1.0.15 → 1.0.16

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/package.json CHANGED
@@ -1,60 +1,63 @@
1
- {
2
- "name": "@imenam/mcp-design",
3
- "version": "1.0.15",
4
- "main": "dist/src/index.js",
5
- "directories": {
6
- "test": "test"
7
- },
8
- "scripts": {
9
- "build:backend": "tsc",
10
- "build:gui": "cd gui && npm install && npm run build",
11
- "build": "npm run build:backend && npm run build:gui",
12
- "start": "node dist/src/index.js",
13
- "test": "node --test \"dist/test/*.test.js\"",
14
- "prepublishOnly": "npm run build",
15
- "release": "npm version patch && npm publish && git push --follow-tags",
16
- "generate-icons": "node scripts/generate-icons.js",
17
- "build:standalone": "cd gui && npm install && npm run build:standalone"
18
- },
19
- "keywords": [
20
- "mcp",
21
- "model-context-protocol",
22
- "design",
23
- "canvas",
24
- "ui",
25
- "mockup",
26
- "ai",
27
- "agent"
28
- ],
29
- "author": "Imena",
30
- "license": "ISC",
31
- "description": "MCP server providing a simple design canvas: the agent creates shapes and text, the user refines them in a GUI, and the agent picks the edits back up.",
32
- "type": "module",
33
- "bin": {
34
- "mcp-design": "dist/src/index.js"
35
- },
36
- "publishConfig": {
37
- "access": "public"
38
- },
39
- "files": [
40
- "dist/src",
41
- "dist/shared",
42
- "gui/dist",
43
- "README.md",
44
- "scripts"
45
- ],
46
- "dependencies": {
47
- "@hono/node-server": "^2.1.1",
48
- "@imenam/mcp-gui-interface": "^1.0.14",
49
- "@modelcontextprotocol/sdk": "^1.30.0",
50
- "@resvg/resvg-js": "^2.6.2",
51
- "dotenv": "^17.4.2",
52
- "hono": "^4.13.4",
53
- "zod": "^4.4.3"
54
- },
55
- "devDependencies": {
56
- "@types/node": "^26.3.0",
57
- "lucide-static": "^1.38.0",
58
- "typescript": "^7.0.2"
59
- }
60
- }
1
+ {
2
+ "name": "@imenam/mcp-design",
3
+ "version": "1.0.16",
4
+ "main": "dist/src/index.js",
5
+ "directories": {
6
+ "test": "test"
7
+ },
8
+ "scripts": {
9
+ "build:backend": "tsc",
10
+ "build:gui": "cd gui && npm install && npm run build",
11
+ "build": "npm run build:backend && npm run build:gui",
12
+ "start": "node dist/src/index.js",
13
+ "test": "node --test \"dist/test/*.test.js\"",
14
+ "prepublishOnly": "npm run build",
15
+ "generate-icons": "node scripts/generate-icons.js",
16
+ "build:standalone": "cd gui && npm install && npm run build:standalone"
17
+ },
18
+ "keywords": [
19
+ "mcp",
20
+ "model-context-protocol",
21
+ "design",
22
+ "canvas",
23
+ "ui",
24
+ "mockup",
25
+ "ai",
26
+ "agent"
27
+ ],
28
+ "author": "Imena",
29
+ "license": "ISC",
30
+ "description": "MCP server providing a simple design canvas: the agent creates shapes and text, the user refines them in a GUI, and the agent picks the edits back up.",
31
+ "type": "module",
32
+ "bin": {
33
+ "mcp-design": "dist/src/index.js"
34
+ },
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "files": [
39
+ "dist/src",
40
+ "dist/shared",
41
+ "gui/dist",
42
+ "README.md",
43
+ "scripts"
44
+ ],
45
+ "dependencies": {
46
+ "@hono/node-server": "^2.1.1",
47
+ "@imenam/mcp-gui-interface": "^1.0.14",
48
+ "@modelcontextprotocol/sdk": "^1.30.0",
49
+ "@resvg/resvg-js": "^2.6.2",
50
+ "dotenv": "^17.4.2",
51
+ "hono": "^4.13.4",
52
+ "zod": "^4.4.3"
53
+ },
54
+ "devDependencies": {
55
+ "@types/node": "^26.3.0",
56
+ "lucide-static": "^1.38.0",
57
+ "typescript": "^7.0.2"
58
+ },
59
+ "repository": {
60
+ "type": "git",
61
+ "url": "git+https://github.com/Matthieu-Pesnot-Pin/mcp-design.git"
62
+ }
63
+ }
@@ -1,85 +1,85 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Fige la bibliotheque d'icones dans `shared/icons/` a partir de `lucide-static`.
4
- *
5
- * Les fichiers produits sont commites : ni le serveur MCP publie, ni le bundle
6
- * de la GUI ne dependent de lucide a l'execution, et la geometrie d'un design
7
- * ne peut pas changer sous les pieds de l'utilisateur au gre d'un `npm install`.
8
- * Relancer `npm run generate-icons` apres une mise a jour de lucide-static.
9
- */
10
- import fs from 'fs';
11
- import path from 'path';
12
- import { createRequire } from 'module';
13
- import { fileURLToPath } from 'url';
14
-
15
- const require = createRequire(import.meta.url);
16
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
17
- const rootDir = path.join(__dirname, '..');
18
- const outDir = path.join(rootDir, 'shared', 'icons');
19
-
20
- const iconNodes = require('lucide-static/icon-nodes.json');
21
- const tags = require('lucide-static/tags.json');
22
- const { version } = require('lucide-static/package.json');
23
-
24
- /** Attributs de presentation portes par le noeud du design, jamais par l'icone elle-meme. */
25
- const DROPPED_ATTRS = new Set(['stroke', 'stroke-width', 'stroke-linecap', 'stroke-linejoin', 'class', 'key']);
26
-
27
- const names = Object.keys(iconNodes).sort();
28
-
29
- const geometry = {};
30
- for (const name of names) {
31
- geometry[name] = iconNodes[name].map(([tag, attrs]) => {
32
- const kept = {};
33
- for (const [attr, value] of Object.entries(attrs ?? {})) {
34
- if (!DROPPED_ATTRS.has(attr)) kept[attr] = String(value);
35
- }
36
- return [tag, kept];
37
- });
38
- }
39
-
40
- /** Mots-cles de recherche : le nom eclate en segments, plus les synonymes de lucide. */
41
- const keywords = {};
42
- for (const name of names) {
43
- const fromName = name.split('-');
44
- const merged = [...new Set([...fromName, ...(tags[name] ?? [])])].filter((word) => word.length > 1);
45
- if (merged.length > 0) keywords[name] = merged;
46
- }
47
-
48
- /**
49
- * Les donnees sont embarquees comme une chaine JSON parsee au premier acces
50
- * plutot que comme un litteral d'objet : un objet de 1800 entrees coute cher a
51
- * analyser au demarrage, et le module est charge par le serveur stdio comme par
52
- * le navigateur.
53
- */
54
- function moduleSource(header, exports) {
55
- const body = exports
56
- .map(([name, value]) => `export const ${name} = ${JSON.stringify(JSON.stringify(value))};`)
57
- .join('\n\n');
58
- return `${header}\n${body}\n`;
59
- }
60
-
61
- const banner = (what) =>
62
- `// Auto-generated by scripts/generate-icons.js - do not edit manually.\n` +
63
- `// ${what}\n` +
64
- `// Source: lucide-static ${version}, ISC licence (https://lucide.dev).\n`;
65
-
66
- fs.mkdirSync(outDir, { recursive: true });
67
- fs.writeFileSync(
68
- path.join(outDir, 'icon-data.ts'),
69
- moduleSource(banner('Geometry of every icon, in the 24x24 grid.'), [
70
- ['LUCIDE_VERSION', version],
71
- ['ICON_DATA_JSON', geometry],
72
- ]),
73
- 'utf8'
74
- );
75
- fs.writeFileSync(
76
- path.join(outDir, 'icon-keywords.ts'),
77
- moduleSource(banner('Search keywords per icon. Loaded on demand, never by the renderer.'), [
78
- ['ICON_KEYWORDS_JSON', keywords],
79
- ]),
80
- 'utf8'
81
- );
82
-
83
- console.log(`Generated ${names.length} icons from lucide-static ${version}`);
84
- console.log(` ${path.join(outDir, 'icon-data.ts')}`);
85
- console.log(` ${path.join(outDir, 'icon-keywords.ts')}`);
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Fige la bibliotheque d'icones dans `shared/icons/` a partir de `lucide-static`.
4
+ *
5
+ * Les fichiers produits sont commites : ni le serveur MCP publie, ni le bundle
6
+ * de la GUI ne dependent de lucide a l'execution, et la geometrie d'un design
7
+ * ne peut pas changer sous les pieds de l'utilisateur au gre d'un `npm install`.
8
+ * Relancer `npm run generate-icons` apres une mise a jour de lucide-static.
9
+ */
10
+ import fs from 'fs';
11
+ import path from 'path';
12
+ import { createRequire } from 'module';
13
+ import { fileURLToPath } from 'url';
14
+
15
+ const require = createRequire(import.meta.url);
16
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
17
+ const rootDir = path.join(__dirname, '..');
18
+ const outDir = path.join(rootDir, 'shared', 'icons');
19
+
20
+ const iconNodes = require('lucide-static/icon-nodes.json');
21
+ const tags = require('lucide-static/tags.json');
22
+ const { version } = require('lucide-static/package.json');
23
+
24
+ /** Attributs de presentation portes par le noeud du design, jamais par l'icone elle-meme. */
25
+ const DROPPED_ATTRS = new Set(['stroke', 'stroke-width', 'stroke-linecap', 'stroke-linejoin', 'class', 'key']);
26
+
27
+ const names = Object.keys(iconNodes).sort();
28
+
29
+ const geometry = {};
30
+ for (const name of names) {
31
+ geometry[name] = iconNodes[name].map(([tag, attrs]) => {
32
+ const kept = {};
33
+ for (const [attr, value] of Object.entries(attrs ?? {})) {
34
+ if (!DROPPED_ATTRS.has(attr)) kept[attr] = String(value);
35
+ }
36
+ return [tag, kept];
37
+ });
38
+ }
39
+
40
+ /** Mots-cles de recherche : le nom eclate en segments, plus les synonymes de lucide. */
41
+ const keywords = {};
42
+ for (const name of names) {
43
+ const fromName = name.split('-');
44
+ const merged = [...new Set([...fromName, ...(tags[name] ?? [])])].filter((word) => word.length > 1);
45
+ if (merged.length > 0) keywords[name] = merged;
46
+ }
47
+
48
+ /**
49
+ * Les donnees sont embarquees comme une chaine JSON parsee au premier acces
50
+ * plutot que comme un litteral d'objet : un objet de 1800 entrees coute cher a
51
+ * analyser au demarrage, et le module est charge par le serveur stdio comme par
52
+ * le navigateur.
53
+ */
54
+ function moduleSource(header, exports) {
55
+ const body = exports
56
+ .map(([name, value]) => `export const ${name} = ${JSON.stringify(JSON.stringify(value))};`)
57
+ .join('\n\n');
58
+ return `${header}\n${body}\n`;
59
+ }
60
+
61
+ const banner = (what) =>
62
+ `// Auto-generated by scripts/generate-icons.js - do not edit manually.\n` +
63
+ `// ${what}\n` +
64
+ `// Source: lucide-static ${version}, ISC licence (https://lucide.dev).\n`;
65
+
66
+ fs.mkdirSync(outDir, { recursive: true });
67
+ fs.writeFileSync(
68
+ path.join(outDir, 'icon-data.ts'),
69
+ moduleSource(banner('Geometry of every icon, in the 24x24 grid.'), [
70
+ ['LUCIDE_VERSION', version],
71
+ ['ICON_DATA_JSON', geometry],
72
+ ]),
73
+ 'utf8'
74
+ );
75
+ fs.writeFileSync(
76
+ path.join(outDir, 'icon-keywords.ts'),
77
+ moduleSource(banner('Search keywords per icon. Loaded on demand, never by the renderer.'), [
78
+ ['ICON_KEYWORDS_JSON', keywords],
79
+ ]),
80
+ 'utf8'
81
+ );
82
+
83
+ console.log(`Generated ${names.length} icons from lucide-static ${version}`);
84
+ console.log(` ${path.join(outDir, 'icon-data.ts')}`);
85
+ console.log(` ${path.join(outDir, 'icon-keywords.ts')}`);