{"_id":"@bernierllc/design-token-parser","_rev":"7-4fe5ad48829e33fe6b361ede49bc95ec","name":"@bernierllc/design-token-parser","dist-tags":{"latest":"0.6.0"},"versions":{"0.1.2":{"name":"@bernierllc/design-token-parser","version":"0.1.2","keywords":["design-tokens","style-dictionary","tokens","css","scss","json","parser","normalization","transformation","typescript"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/design-token-parser@0.1.2","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"20b1e63fb8f41e587bf40bc83b171d65c28f1c1f","tarball":"https://registry.npmjs.org/@bernierllc/design-token-parser/-/design-token-parser-0.1.2.tgz","fileCount":19,"integrity":"sha512-6uy9HDVt5U7XxU9aMZ06vSlRT7sCqDkVl0MJH+cQdr7++5WEOQsoybAXr0FfFE2n4SQnlgpK5VvRyi9fQz5FFw==","signatures":[{"sig":"MEUCIQCoKB3um4bQ+YyrdsEflAjvlSokP1k3JqkcXYbrmMJmqQIgGRKWGkNXGO/H2brdj9Ir1/gFUXJESPsW55JeVfhikU8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73621},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"fb263261e67b3b2a5c26c6c4c8da733aa6df28c6","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"tsc","clean":"rm -rf dist","lint:fix":"eslint src --ext .ts --fix","prebuild":"npm run clean","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.4.2","description":"A core utility for design token processing and format normalization with style-dictionary integration","directories":{},"_nodeVersion":"24.4.1","dependencies":{"style-dictionary":"^4.4.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/design-token-parser_0.1.2_1755803022797_0.7867123092554027","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@bernierllc/design-token-parser","version":"0.3.0","keywords":["design-tokens","style-dictionary","tokens","css","scss","json","parser","normalization","transformation","typescript"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/design-token-parser@0.3.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"39625bedd412ce797a5223b87e8c2c4a3443f04e","tarball":"https://registry.npmjs.org/@bernierllc/design-token-parser/-/design-token-parser-0.3.0.tgz","fileCount":19,"integrity":"sha512-GE1SMBcAQdNRx3Ab8cOLrnxI6IyCd8vOKBLvhJYl3Yx7rv9iwKwemppjc8pJQwcHMCKxNu/r8seQFu13a43oRQ==","signatures":[{"sig":"MEUCIQDrs3T9vbsFQyfoLP7MznyydYcyKDKjjOD5oEL3gPTLrAIgVJSUnKDNwMwLarqsXhGLm3Vp7M5iJ2rLbnTz/HptYVw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73774},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"af7e74b3715d56d3a193e1bb6743b337c2b0df6d","scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"tsc","clean":"rm -rf dist","lint:fix":"eslint src --ext .ts --fix","prebuild":"npm run clean","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a0f5451d-8bf1-472a-87b3-6d2de6faae72"}},"repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"lerna/9.0.3/node@v20.19.6+x64 (linux)","description":"A core utility for design token processing and format normalization with style-dictionary integration","directories":{},"_nodeVersion":"20.19.6","dependencies":{"style-dictionary":"^4.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/design-token-parser_0.3.0_1767642300047_0.7840869715611831","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@bernierllc/design-token-parser","version":"0.3.1","keywords":["design-tokens","style-dictionary","tokens","css","scss","json","parser","normalization","transformation","typescript"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/design-token-parser@0.3.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"ebb9791f71f762f72c9e898015617728f9d1cb18","tarball":"https://registry.npmjs.org/@bernierllc/design-token-parser/-/design-token-parser-0.3.1.tgz","fileCount":19,"integrity":"sha512-bMENipr5p2B/P6J5VBaoJDA2iaIIMoEx3kbss25hKAVqZ5lBsnMY5cTDZF+YA/C5bC/HH6xAMzZgCE/7rQ46hQ==","signatures":[{"sig":"MEQCIHYC0gW9ON4UMBsF4fhVGRpH+5NCyBg+NIqt4QcFPjtNAiBrT6o26bW09zX+5eacnkinuxlOseiVN9L6br/kzEqkCA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73716},"main":"dist/index.js","_from":"file:bernierllc-design-token-parser-0.3.1.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"tsc","clean":"rm -rf dist","lint:fix":"eslint src --ext .ts --fix","prebuild":"npm run clean","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a0f5451d-8bf1-472a-87b3-6d2de6faae72"}},"_resolved":"/tmp/b7bdd43ce907a6630e7b3fdd874f8a33/bernierllc-design-token-parser-0.3.1.tgz","_integrity":"sha512-bMENipr5p2B/P6J5VBaoJDA2iaIIMoEx3kbss25hKAVqZ5lBsnMY5cTDZF+YA/C5bC/HH6xAMzZgCE/7rQ46hQ==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.11.0","description":"A core utility for design token processing and format normalization with style-dictionary integration","directories":{},"_nodeVersion":"20.20.0","dependencies":{"style-dictionary":"^4.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/design-token-parser_0.3.1_1773078001339_0.15551441987834824","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@bernierllc/design-token-parser","version":"0.3.2","keywords":["design-tokens","style-dictionary","tokens","css","scss","json","parser","normalization","transformation","typescript"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/design-token-parser@0.3.2","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"660883f1343371946adcba78bce003748993c03e","tarball":"https://registry.npmjs.org/@bernierllc/design-token-parser/-/design-token-parser-0.3.2.tgz","fileCount":19,"integrity":"sha512-jB4+onsQcOE+WUvoFR5pZNFf9J/tqs1QFkgVTiwlSNNpJ8eCzzheVwOq7DZnALN2QMd4vN4Aaw42CQvfwStGEw==","signatures":[{"sig":"MEUCIQC3e+4MwL/35lUi565DfkkW1xuFLbdLvAPn8yEWWQT91wIgcBa55MEbJAR4luHib6GqP9vaBb/gsjj5Uz23/+X0Lz8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73716},"main":"dist/index.js","_from":"file:bernierllc-design-token-parser-0.3.2.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"tsc","clean":"rm -rf dist","lint:fix":"eslint src --ext .ts --fix","prebuild":"npm run clean","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a0f5451d-8bf1-472a-87b3-6d2de6faae72"}},"_resolved":"/tmp/2b29ec23008f7e596e0728027202edb3/bernierllc-design-token-parser-0.3.2.tgz","_integrity":"sha512-jB4+onsQcOE+WUvoFR5pZNFf9J/tqs1QFkgVTiwlSNNpJ8eCzzheVwOq7DZnALN2QMd4vN4Aaw42CQvfwStGEw==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.11.0","description":"A core utility for design token processing and format normalization with style-dictionary integration","directories":{},"_nodeVersion":"20.20.0","dependencies":{"style-dictionary":"^4.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/design-token-parser_0.3.2_1773081168214_0.4291597994917715","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@bernierllc/design-token-parser","version":"0.5.0","keywords":["design-tokens","style-dictionary","tokens","css","scss","json","parser","normalization","transformation","typescript"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/design-token-parser@0.5.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"1d2f02d5c71c35223c6a691c22c1cc3d5a86063d","tarball":"https://registry.npmjs.org/@bernierllc/design-token-parser/-/design-token-parser-0.5.0.tgz","fileCount":23,"integrity":"sha512-0Uq2TZgy+mc2ur33fFkm76w4/Ilaqwlh/TBIEm8lK9ezYDG0GZS8X4Lxlumd7fGTP42qmZb2AucxeqdigL9pcg==","signatures":[{"sig":"MEYCIQDkJNqSJgoeBtxTflvOLP0+Dgi1IpkgyBjllyiWvWLLfgIhAPwbOSkyMuXAeBXFzVLic1ZMJq4o2NrHDsd/Lk5a0EWD","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76841},"main":"dist/index.js","_from":"file:bernierllc-design-token-parser-0.5.0.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"lint":"eslint src --ext .ts","test":"jest","build":"tsc","clean":"rm -rf dist","lint:fix":"eslint src --ext .ts --fix","prebuild":"npm run clean","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a0f5451d-8bf1-472a-87b3-6d2de6faae72"}},"_resolved":"/home/runner/work/tools/tools/packages/core/design-token-parser/bernierllc-design-token-parser-0.5.0.tgz","_integrity":"sha512-0Uq2TZgy+mc2ur33fFkm76w4/Ilaqwlh/TBIEm8lK9ezYDG0GZS8X4Lxlumd7fGTP42qmZb2AucxeqdigL9pcg==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.14.1","description":"A core utility for design token processing and format normalization with style-dictionary integration","directories":{},"_nodeVersion":"20.20.2","dependencies":{"style-dictionary":"^4.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","ts-jest":"^29.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/design-token-parser_0.5.0_1779241110714_0.16015464534278445","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@bernierllc/design-token-parser","version":"0.6.0","description":"A core utility for design token processing and format normalization with style-dictionary integration","main":"dist/index.js","types":"dist/index.d.ts","keywords":["design-tokens","style-dictionary","tokens","css","scss","json","parser","normalization","transformation","typescript"],"author":{"name":"Bernier LLC"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/bernier-llc/tools.git"},"dependencies":{"style-dictionary":"^4.4.0"},"devDependencies":{"@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.0.0","jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.0.0"},"engines":{"node":">=18.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"tsc","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","lint":"eslint src --ext .ts","lint:fix":"eslint src --ext .ts --fix","clean":"rm -rf dist","prebuild":"npm run clean"},"_id":"@bernierllc/design-token-parser@0.6.0","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"homepage":"https://github.com/bernier-llc/tools#readme","_integrity":"sha512-ypkmXWzxYadIJI04EE2Xtx3/dpQGkBrb6DnwnlXFjwbsMpndhuJLyDDuc0cpcINnkIEw4YgUlMHcuhaiYd580A==","_resolved":"/home/runner/work/tools/tools/packages/core/design-token-parser/bernierllc-design-token-parser-0.6.0.tgz","_from":"file:bernierllc-design-token-parser-0.6.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.14.1","dist":{"integrity":"sha512-ypkmXWzxYadIJI04EE2Xtx3/dpQGkBrb6DnwnlXFjwbsMpndhuJLyDDuc0cpcINnkIEw4YgUlMHcuhaiYd580A==","shasum":"b410d6307a42e07dd8f2661a119d58066aea020d","tarball":"https://registry.npmjs.org/@bernierllc/design-token-parser/-/design-token-parser-0.6.0.tgz","fileCount":23,"unpackedSize":76841,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCIpdE3VSBp0D0/Non/golnnrkv9M1hfCbsv5RsZsoDQwIgcBbeCwEKTzmAIgAKcbeFNLuWx4AZhR4hwc62tpf8XGs="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a0f5451d-8bf1-472a-87b3-6d2de6faae72"}},"directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/design-token-parser_0.6.0_1779249854639_0.7060259799470221"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-21T19:03:42.796Z","modified":"2026-05-20T04:04:14.964Z","0.1.2":"2025-08-21T19:03:43.033Z","0.3.0":"2026-01-05T19:45:00.185Z","0.3.1":"2026-03-09T17:40:01.486Z","0.3.2":"2026-03-09T18:32:48.361Z","0.5.0":"2026-05-20T01:38:30.879Z","0.6.0":"2026-05-20T04:04:14.834Z"},"bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"author":{"name":"Bernier LLC"},"license":"MIT","homepage":"https://github.com/bernier-llc/tools#readme","keywords":["design-tokens","style-dictionary","tokens","css","scss","json","parser","normalization","transformation","typescript"],"repository":{"type":"git","url":"git+https://github.com/bernier-llc/tools.git"},"description":"A core utility for design token processing and format normalization with style-dictionary integration","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/design-token-parser\n\nA core utility for design token processing and format normalization with style-dictionary integration.\n\n## Installation\n\n```bash\nnpm install @bernierllc/design-token-parser\n```\n\n## Usage\n\n### Basic Token Parsing\n\n```typescript\nimport { DesignTokenParser } from '@bernierllc/design-token-parser';\n\nconst parser = new DesignTokenParser();\n\nconst tokens = {\n  color: {\n    primary: { value: '#007bff', type: 'color' },\n    secondary: { value: '#6c757d', type: 'color' }\n  },\n  spacing: {\n    small: { value: '8px', type: 'spacing' },\n    medium: { value: '16px', type: 'spacing' }\n  },\n  typography: {\n    heading: { \n      value: { fontSize: '24px', fontWeight: 'bold' }, \n      type: 'typography' \n    }\n  }\n};\n\nconst parsedTokens = await parser.parseTokens({ tokens });\nconsole.log(parsedTokens.tokens);\n```\n\n### File-Based Parsing\n\n```typescript\n// Parse from JSON file\nconst tokens = await parser.parseFromFile('./tokens.json');\n\n// Parse from CSS string\nconst cssString = `\n  :root {\n    --color-primary: #007bff;\n    --spacing-small: 8px;\n  }\n`;\nconst cssTokens = await parser.parseFromString(cssString, { type: 'css' });\n```\n\n### Generate Multiple Output Formats\n\n```typescript\nconst parsedTokens = await parser.parseTokens({ tokens });\n\n// Generate CSS custom properties\nconst css = parser.generateOutput(parsedTokens, { type: 'css' });\n\n// Generate SCSS variables\nconst scss = parser.generateOutput(parsedTokens, { type: 'scss' });\n\n// Generate JSON\nconst json = parser.generateOutput(parsedTokens, { type: 'json' });\n\n// Generate JavaScript module\nconst js = parser.generateOutput(parsedTokens, { type: 'javascript' });\n\n// Generate TypeScript module\nconst ts = parser.generateOutput(parsedTokens, { type: 'typescript' });\n```\n\n### Token Transformations\n\n```typescript\nconst transforms = [\n  { name: 'scale', options: { factor: 1.5 } },\n  { name: 'darkMode', options: { mode: 'invert' } }\n];\n\nconst transformedTokens = parser.transformTokens(parsedTokens, transforms);\nconst css = parser.generateOutput(transformedTokens, { type: 'css' });\n```\n\n### CSS Output with Utility Classes\n\n```typescript\nconst css = parser.generateOutput(transformedTokens, { \n  type: 'css',\n  options: { \n    utilities: true,\n    selector: '.theme'\n  }\n});\n```\n\n### Token Validation\n\n```typescript\nconst validation = parser.validateTokens(parsedTokens);\n\nif (!validation.isValid) {\n  console.error('Validation errors:', validation.errors);\n}\n\nif (validation.warnings.length > 0) {\n  console.warn('Warnings:', validation.warnings);\n}\n```\n\n### Reference Resolution\n\n```typescript\nconst tokens = {\n  color: {\n    primary: { value: '#007bff', type: 'color' },\n    secondary: { value: '{color.primary}', type: 'color' }\n  }\n};\n\nconst parsed = await parser.parseTokens({ tokens });\nconst resolved = parser.resolveReferences(parsed);\nconsole.log(resolved.tokens);\n```\n\n## API Reference\n\n### DesignTokenParser\n\n#### Constructor\n\n```typescript\nnew DesignTokenParser(config?: ParserConfig)\n```\n\n#### Methods\n\n- `parseTokens(input: TokenInput): Promise<ParsedTokens>` - Parse design tokens from object\n- `parseFromFile(filePath: string): Promise<ParsedTokens>` - Parse tokens from JSON file\n- `parseFromString(content: string, format: TokenFormat): Promise<ParsedTokens>` - Parse tokens from string\n- `transformTokens(tokens: ParsedTokens, transforms: Transform[]): TransformedTokens` - Apply transformations\n- `generateOutput(tokens: TransformedTokens, format: OutputFormat): string` - Generate output format\n- `validateTokens(tokens: ParsedTokens): ValidationResult` - Validate token structure\n- `resolveReferences(tokens: ParsedTokens): ResolvedTokens` - Resolve token references\n- `flattenTokens(tokens: ParsedTokens): FlattenedTokens` - Flatten token structure\n- `categorizeTokens(tokens: Record<string, DesignToken>): Record<string, DesignToken>` - Categorize tokens\n\n### Configuration\n\n```typescript\ninterface ParserConfig {\n  defaultFormat?: TokenFormat;\n  platforms?: string[];\n  transforms?: string[];\n  cacheSize?: number;\n  strictMode?: boolean;\n  validateReferences?: boolean;\n}\n```\n\n### Token Types\n\nThe parser supports the following token types:\n- `color` - Color values (#hex, rgb(), hsl())\n- `typography` - Font and text properties\n- `spacing` - Margin, padding, gaps\n- `sizing` - Width, height, dimensions\n- `border` - Border properties\n- `shadow` - Box shadow values\n- `animation` - Animation and transition properties\n- `layout` - General layout properties\n- `component` - Component-specific tokens\n\n### Output Formats\n\n- `css` - CSS custom properties with optional utility classes\n- `scss` - SCSS variables\n- `json` - Structured JSON object\n- `javascript` - ES6 module export\n- `typescript` - TypeScript module with type definitions\n\n## Features\n\n- **Multi-format Support** - Parse from JSON, CSS, and other formats\n- **Token Categorization** - Automatic categorization by type and usage\n- **Reference Resolution** - Handle token references and aliases\n- **Multiple Output Formats** - Generate CSS, SCSS, JSON, JavaScript, TypeScript\n- **Transformations** - Apply scaling, theming, and custom transformations\n- **Validation** - Comprehensive token validation with warnings and suggestions\n- **Type Safety** - Full TypeScript support with strict typing\n- **Style Dictionary Integration** - Built on proven design token tooling\n\n## Supported Input Formats\n\n### JSON Tokens\n```json\n{\n  \"color\": {\n    \"primary\": {\n      \"value\": \"#007bff\",\n      \"type\": \"color\",\n      \"description\": \"Primary brand color\"\n    }\n  }\n}\n```\n\n### CSS Custom Properties\n```css\n:root {\n  --color-primary: #007bff;\n  --spacing-small: 8px;\n  --font-size-large: 18px;\n}\n```\n\n## Advanced Usage\n\n### Custom Parser Configuration\n\n```typescript\nconst parser = new DesignTokenParser({\n  strictMode: true,\n  validateReferences: true,\n  platforms: ['web', 'ios', 'android'],\n  cacheSize: 200\n});\n```\n\n### Complex Token Structure\n\n```typescript\nconst tokens = {\n  theme: {\n    light: {\n      color: {\n        primary: { value: '#007bff', type: 'color' },\n        text: { value: '#333333', type: 'color' }\n      }\n    },\n    dark: {\n      color: {\n        primary: { value: '#0056b3', type: 'color' },\n        text: { value: '#ffffff', type: 'color' }\n      }\n    }\n  }\n};\n```\n\n### Metadata Preservation\n\n```typescript\nconst parsed = await parser.parseTokens({\n  tokens,\n  metadata: {\n    version: '2.0.0',\n    author: 'Design Team',\n    description: 'Primary design tokens'\n  }\n});\n\nconsole.log(parsed.metadata);\n```\n\n## Error Handling\n\n```typescript\ntry {\n  const result = await parser.parseTokens({ tokens });\n  \n  if (result.errors.length > 0) {\n    console.error('Token errors:', result.errors);\n  }\n  \n} catch (error) {\n  console.error('Parser error:', error.message);\n}\n```\n\n## See Also\n\n- [@bernierllc/template-engine](../template-engine) - Template rendering for design systems\n- [@bernierllc/markdown-renderer](../markdown-renderer) - Markdown processing utilities\n\n## License\n\nCopyright (c) 2025 Bernier LLC. All rights reserved.","readmeFilename":"README.md"}