{"_id":"@domglyph/tokens","_rev":"2-4376740dcaa5c743acd96ffadb120efa","name":"@domglyph/tokens","dist-tags":{"latest":"2.1.0"},"versions":{"2.0.0":{"name":"@domglyph/tokens","version":"2.0.0","_id":"@domglyph/tokens@2.0.0","maintainers":[{"name":"nishchya7pixels","email":"llcortex.ai@gmail.com"}],"dist":{"shasum":"853d34eafecbd60b12d2f1af3eea58a1501e8c04","tarball":"https://registry.npmjs.org/@domglyph/tokens/-/tokens-2.0.0.tgz","fileCount":5,"integrity":"sha512-GCrNQKXFef6MttXaTi7OG5UZlm6YViMh+JzLkHdjRDwpoYTIi7pF8ClTv3aGxykKp5ISKTKOjlOJnJ6KsrBNDg==","signatures":[{"sig":"MEUCIQC2O59fv+hHUH2huEe5duJda7BPKkfNmPmbNwv3RjHcugIgQiUOnnxO1cgdVoL/sL869GRTl5G4qBj+4EmoDvYHlQY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5134},"main":"./dist/index.js","type":"module","_from":"file:domglyph-tokens-2.0.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsup src/index.ts --format esm --dts --watch","lint":"eslint src --ext .ts","test":"vitest run --passWithNoTests","build":"tsup src/index.ts --format esm --dts --clean","typecheck":"tsc -b"},"_npmUser":{"name":"nishchya7pixels","email":"llcortex.ai@gmail.com"},"_resolved":"/private/var/folders/bb/st1qyn7d7ydd8__0z4mfw0480000gn/T/9662ac8782ebdd5cccdaa2797d04fea8/domglyph-tokens-2.0.0.tgz","_integrity":"sha512-GCrNQKXFef6MttXaTi7OG5UZlm6YViMh+JzLkHdjRDwpoYTIi7pF8ClTv3aGxykKp5ISKTKOjlOJnJ6KsrBNDg==","_npmVersion":"11.8.0","description":"[![npm version](https://img.shields.io/npm/v/@domglyph/tokens?color=0ea5e9)](https://www.npmjs.com/package/@domglyph/tokens) [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](../../LICENSE)","directories":{},"_nodeVersion":"24.13.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1"},"_npmOperationalInternal":{"tmp":"tmp/tokens_2.0.0_1775415710913_0.565521305945835","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@domglyph/tokens","version":"2.1.0","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"devDependencies":{"tsup":"^8.5.1"},"scripts":{"build":"tsup src/index.ts --format esm --dts --clean","dev":"tsup src/index.ts --format esm --dts --watch","lint":"eslint src --ext .ts","test":"vitest run --passWithNoTests","typecheck":"tsc -b"},"_id":"@domglyph/tokens@2.1.0","description":"[![npm version](https://img.shields.io/npm/v/@domglyph/tokens?color=0ea5e9)](https://www.npmjs.com/package/@domglyph/tokens) [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](../../LICENSE)","_integrity":"sha512-EeAZXqfRVffgEP5LRTKssjTEkSAejv33bIpa3Wf2iHyUXnUFeqQhkmW02Q5YZWthQch1ffqyStW1T68UExVLDA==","_resolved":"/private/var/folders/bb/st1qyn7d7ydd8__0z4mfw0480000gn/T/0916c5f38b6a5d9729dddf7f1e3c3692/domglyph-tokens-2.1.0.tgz","_from":"file:domglyph-tokens-2.1.0.tgz","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-EeAZXqfRVffgEP5LRTKssjTEkSAejv33bIpa3Wf2iHyUXnUFeqQhkmW02Q5YZWthQch1ffqyStW1T68UExVLDA==","shasum":"3773aff01788860c71d3b142cfe2099edc14a98b","tarball":"https://registry.npmjs.org/@domglyph/tokens/-/tokens-2.1.0.tgz","fileCount":5,"unpackedSize":5134,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEUh3uuOx6aGiusCDrXE4zcD5gzOfyjcn27ggKv+GoDbAiArcaJM8i/3D7PGzaeyKPrzmIFSrp7SG81D4MK5i6QTGw=="}]},"_npmUser":{"name":"nishchya7pixels","email":"llcortex.ai@gmail.com"},"directories":{},"maintainers":[{"name":"nishchya7pixels","email":"llcortex.ai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tokens_2.1.0_1775416539545_0.5087268885979186"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-05T19:01:50.762Z","modified":"2026-04-05T19:15:39.824Z","2.0.0":"2026-04-05T19:01:51.047Z","2.1.0":"2026-04-05T19:15:39.673Z"},"description":"[![npm version](https://img.shields.io/npm/v/@domglyph/tokens?color=0ea5e9)](https://www.npmjs.com/package/@domglyph/tokens) [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](../../LICENSE)","maintainers":[{"name":"nishchya7pixels","email":"llcortex.ai@gmail.com"}],"readme":"# @domglyph/tokens (formerly [@cortexui/tokens](https://www.npmjs.com/package/@cortexui/tokens))\n\n[![npm version](https://img.shields.io/npm/v/@domglyph/tokens?color=0ea5e9)](https://www.npmjs.com/package/@domglyph/tokens)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](../../LICENSE)\n\nDesign tokens for DOMglyph — colors, spacing, typography, and more.\n\n---\n\n## Overview\n\n`@domglyph/tokens` is the single source of truth for DOMglyph's visual design. All components and primitives consume these tokens. By centralising design values here, visual changes propagate automatically across the entire system.\n\nThe package exports tokens as typed JavaScript objects, which means they are usable in TypeScript without a build step and tree-shakeable in modern bundlers.\n\n---\n\n## Installation\n\n```bash\nnpm install @domglyph/tokens\n```\n\n---\n\n## Usage\n\n### Color tokens\n\n```ts\nimport { colorTokens } from '@domglyph/tokens';\n\n// colorTokens.name === \"color\"\n// colorTokens.values is a record of color names to hex values\n\nconsole.log(colorTokens.values.surface);  // \"#ffffff\"\nconsole.log(colorTokens.values.accent);   // \"#111827\"\n```\n\nUse color tokens in component styles to stay consistent with the design system:\n\n```ts\nimport { colorTokens } from '@domglyph/tokens';\n\nconst styles = {\n  background: colorTokens.values.surface,\n  color: colorTokens.values.accent,\n};\n```\n\n### TypeScript type\n\nAll token scales share the `DesignTokenScale` type:\n\n```ts\nimport type { DesignTokenScale } from '@domglyph/tokens';\n\n// DesignTokenScale = {\n//   readonly name: string;\n//   readonly values: Readonly<Record<string, string>>;\n// }\n```\n\nThis type is consistent across all token categories, so utilities can accept any token scale generically:\n\n```ts\nimport type { DesignTokenScale } from '@domglyph/tokens';\n\nfunction listTokenValues(scale: DesignTokenScale): string[] {\n  return Object.entries(scale.values).map(([name, value]) => `${name}: ${value}`);\n}\n```\n\n---\n\n## Available Tokens\n\n| Export | Token Scale | Description |\n|---|---|---|\n| `colorTokens` | `\"color\"` | Surface and accent colors |\n| `DesignTokenScale` | — | TypeScript type for all token scales |\n\n---\n\n## CSS Custom Properties\n\nIf you are using `@domglyph/primitives`, the `primitiveTheme` object exposes tokens as CSS custom property definitions, letting you inject them into your app's `:root` with a single call:\n\n```ts\nimport { primitiveTheme } from '@domglyph/primitives';\n\n// primitiveTheme contains CSS custom property maps derived from @domglyph/tokens\n// Inject via your preferred CSS-in-JS solution or a <style> tag\n```\n\nThis approach lets you consume tokens in plain CSS or any styling system that supports CSS custom properties.\n\n---\n\n## Part of DOMglyph\n\n`@domglyph/tokens` is part of the [DOMglyph](../../README.md) design system.\n\n- [Main repository](../../README.md)\n- [Documentation](http://localhost:3001/docs/tokens)\n- [Contributing](../../CONTRIBUTING.md)\n\n---\n\n## ☕ Support\n\nIf you find DOMglyph useful, you can support the project:\n\n👉 https://buymeacoffee.com/nishchya\n\nIt helps keep the project alive and growing.\n","readmeFilename":"README.md"}