@flashdsm/genome 0.1.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.
package/dist/smoke.js ADDED
@@ -0,0 +1,41 @@
1
+ import {
2
+ getDesignTokens
3
+ } from "./chunk-6OCQZNS7.js";
4
+
5
+ // src/smoke.ts
6
+ import { resolve } from "path";
7
+ import { fileURLToPath } from "url";
8
+ var packageRoot = resolve(fileURLToPath(new URL("..", import.meta.url)));
9
+ var fixture = resolve(packageRoot, "fixtures", "design-tokens.json");
10
+ async function main() {
11
+ const all = await getDesignTokens(fixture);
12
+ if (all.count < 1) {
13
+ throw new Error(`Expected tokens in fixture, got count=${all.count}`);
14
+ }
15
+ const colors = await getDesignTokens(fixture, { category: "colors" });
16
+ if (colors.count < 1 || colors.tokens.some((t) => t.category !== "colors")) {
17
+ throw new Error("category=colors filter failed");
18
+ }
19
+ const spacing = await getDesignTokens(fixture, { category: "spacing" });
20
+ if (spacing.count < 1) {
21
+ throw new Error("category=spacing expected tokens");
22
+ }
23
+ console.log(
24
+ JSON.stringify(
25
+ {
26
+ ok: true,
27
+ source: all.source,
28
+ total: all.count,
29
+ colors: colors.count,
30
+ spacing: spacing.count,
31
+ sample: colors.tokens[0]?.name
32
+ },
33
+ null,
34
+ 2
35
+ )
36
+ );
37
+ }
38
+ main().catch((err) => {
39
+ console.error(err);
40
+ process.exit(1);
41
+ });
@@ -0,0 +1,12 @@
1
+ {
2
+ "industry": "design-tools",
3
+ "archetype": "magician",
4
+ "mood": ["precise", "confident", "modern"],
5
+ "energy": "balanced",
6
+ "era": "modern",
7
+ "formality": 0.45,
8
+ "colorTemperature": "cool",
9
+ "density": "balanced",
10
+ "ornamentation": "minimal",
11
+ "audience": "Product designers and frontend engineers"
12
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "Flash Fixture Components",
3
+ "components": [
4
+ {
5
+ "name": "Button",
6
+ "category": "actions",
7
+ "description": "Primary interactive control",
8
+ "variants": ["primary", "secondary", "ghost"],
9
+ "tokensUsed": ["color.primary.500", "radius.md", "spacing.md"]
10
+ },
11
+ {
12
+ "name": "Input",
13
+ "category": "forms",
14
+ "description": "Text field with label and error states",
15
+ "variants": ["default", "error"],
16
+ "tokensUsed": ["color.neutral.100", "border.subtle", "radius.md"]
17
+ },
18
+ {
19
+ "name": "Card",
20
+ "category": "layout",
21
+ "description": "Surface container with optional elevation",
22
+ "variants": ["flat", "elevated"],
23
+ "tokensUsed": ["shadow.sm", "radius.md", "spacing.lg"]
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "Flash Fixture Design System",
3
+ "version": "0.1.0",
4
+ "tokens": [
5
+ {
6
+ "name": "color.primary.500",
7
+ "value": "#4f46e5",
8
+ "type": "color",
9
+ "category": "colors",
10
+ "description": "Primary brand mid"
11
+ },
12
+ {
13
+ "name": "color.neutral.100",
14
+ "value": "#f4f4f5",
15
+ "type": "color",
16
+ "category": "colors"
17
+ },
18
+ {
19
+ "name": "spacing.md",
20
+ "value": "16px",
21
+ "type": "size",
22
+ "category": "spacing"
23
+ },
24
+ {
25
+ "name": "spacing.lg",
26
+ "value": "24px",
27
+ "type": "size",
28
+ "category": "spacing"
29
+ },
30
+ {
31
+ "name": "font.body",
32
+ "value": "Inter, system-ui, sans-serif",
33
+ "type": "font",
34
+ "category": "typography"
35
+ },
36
+ {
37
+ "name": "radius.md",
38
+ "value": "8px",
39
+ "type": "radius",
40
+ "category": "radius"
41
+ },
42
+ {
43
+ "name": "shadow.sm",
44
+ "value": "0 1px 2px rgba(0,0,0,0.08)",
45
+ "type": "shadow",
46
+ "category": "shadow"
47
+ },
48
+ {
49
+ "name": "motion.fast",
50
+ "value": "150ms",
51
+ "type": "motion",
52
+ "category": "motion"
53
+ },
54
+ {
55
+ "name": "border.subtle",
56
+ "value": "1px solid #e4e4e7",
57
+ "type": "border",
58
+ "category": "border"
59
+ }
60
+ ]
61
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 1,
3
+ "name": "Flash Fixture Design System",
4
+ "tokenFile": "./design-tokens.json",
5
+ "componentsFile": "./components.json",
6
+ "outputs": {
7
+ "css": "./tokens/tokens.css",
8
+ "tailwind": "./tailwind.config.js",
9
+ "typescript": "./tokens/tokens.ts"
10
+ },
11
+ "framework": "react"
12
+ }
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@flashdsm/genome",
3
+ "version": "0.1.0",
4
+ "description": "Flash Genome - the local MCP server for a Flash design system: give Cursor, Claude and any MCP client your real tokens, component specs and token linting over stdio, and keep the repo in sync with Flash Web",
5
+ "license": "MIT",
6
+ "homepage": "https://flashdsm.com",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/itay1313/Flash-DSM-Maker.git",
10
+ "directory": "packages/genome"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/itay1313/Flash-DSM-Maker/issues"
14
+ },
15
+ "keywords": [
16
+ "mcp",
17
+ "model-context-protocol",
18
+ "design-tokens",
19
+ "design-system",
20
+ "flash-ds",
21
+ "genome",
22
+ "cursor",
23
+ "claude"
24
+ ],
25
+ "type": "module",
26
+ "bin": {
27
+ "flash-genome": "./dist/index.js"
28
+ },
29
+ "main": "./dist/index.js",
30
+ "types": "./dist/index.d.ts",
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/index.d.ts",
34
+ "import": "./dist/index.js",
35
+ "default": "./dist/index.js"
36
+ }
37
+ },
38
+ "files": [
39
+ "dist",
40
+ "fixtures",
41
+ "README.md"
42
+ ],
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "scripts": {
47
+ "build": "tsup",
48
+ "dev": "tsup --watch",
49
+ "typecheck": "tsc -p tsconfig.json --noEmit",
50
+ "start": "node dist/index.js --tokens ./fixtures/design-tokens.json",
51
+ "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
52
+ "smoke": "node --experimental-vm-modules dist/smoke.js",
53
+ "test": "vitest run",
54
+ "test:watch": "vitest"
55
+ },
56
+ "dependencies": {
57
+ "@modelcontextprotocol/sdk": "^1.29.0",
58
+ "zod": "^3.25.76"
59
+ },
60
+ "devDependencies": {
61
+ "@flash-ds/codegen": "workspace:*",
62
+ "@flash-ds/core": "workspace:*",
63
+ "@types/node": "^20.8.0",
64
+ "tsup": "^8.3.5",
65
+ "typescript": "^5.2.2",
66
+ "vitest": "^3.2.4"
67
+ },
68
+ "engines": {
69
+ "node": ">=20"
70
+ }
71
+ }