{"_id":"@asafarim/shared-tokens","_rev":"5-270e812e4b16939d8f331061195332ef","name":"@asafarim/shared-tokens","dist-tags":{"latest":"0.8.1"},"versions":{"0.5.0":{"name":"@asafarim/shared-tokens","version":"0.5.0","author":{"url":"https://github.com/AliSafari-IT","name":"Ali Safari","email":"ali@asafarim.com"},"_id":"@asafarim/shared-tokens@0.5.0","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"homepage":"https://github.com/AliSafari-IT/shared-tokens#readme","bugs":{"url":"https://github.com/AliSafari-IT/shared-tokens/issues"},"dist":{"shasum":"c3fbfe942c0f77793d7c8b7ee54d2572693de2a4","tarball":"https://registry.npmjs.org/@asafarim/shared-tokens/-/shared-tokens-0.5.0.tgz","fileCount":3,"integrity":"sha512-mt65uG4osqu/TM1Fjlr2GHRC1k5WhthqzC0pGpS29HHXB+76Aky0V7H3SJ6Osw7mB/YRxAfi8BIOixBEibAvdA==","signatures":[{"sig":"MEQCIF/kQQv8zWJQusd4V79q5AxBtNR2Kle+qrnLJ7YYtIp2AiAnMjj2mEw9dtdH0rjx/SE3egz3IF2VsmSU4/2ROItoKA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4719},"main":"index.js","type":"module","_from":"file:asafarim-shared-tokens-0.5.0.tgz","types":"index.d.ts","module":"index.js","exports":{".":{"import":"./index.js","require":"./tailwind-preset.cjs"},"./index.css":"./index.css","./tailwind-preset":"./tailwind-preset.cjs"},"private":false,"scripts":{"build":"echo 'No build needed for shared-tokens'","demo:dev":"cd demo && npm run dev","demo:build":"cd demo && npm run build","demo:preview":"cd demo && npm run preview"},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"_resolved":"C:\\Users\\User\\AppData\\Local\\Temp\\fecc26dfefc21bc7419181f1258d15ab\\asafarim-shared-tokens-0.5.0.tgz","_integrity":"sha512-mt65uG4osqu/TM1Fjlr2GHRC1k5WhthqzC0pGpS29HHXB+76Aky0V7H3SJ6Osw7mB/YRxAfi8BIOixBEibAvdA==","repository":{"url":"git+https://github.com/AliSafari-IT/shared-tokens.git","type":"git"},"_npmVersion":"10.9.3","description":"A shared design tokens package for use across multiple projects.","directories":{},"_nodeVersion":"22.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"~5.8.3","@types/react":"^19.1.9","@types/react-dom":"^19.1.7"},"_npmOperationalInternal":{"tmp":"tmp/shared-tokens_0.5.0_1763847671440_0.4647482717208482","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@asafarim/shared-tokens","version":"0.6.0","author":{"url":"https://github.com/AliSafari-IT","name":"Ali Safari","email":"ali@asafarim.com"},"_id":"@asafarim/shared-tokens@0.6.0","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"homepage":"https://github.com/AliSafari-IT/shared-tokens#readme","bugs":{"url":"https://github.com/AliSafari-IT/shared-tokens/issues"},"dist":{"shasum":"601623add2e88b63f8b98264854f8fc7d1879cbe","tarball":"https://registry.npmjs.org/@asafarim/shared-tokens/-/shared-tokens-0.6.0.tgz","fileCount":3,"integrity":"sha512-auN0yQ0GS+0h+G6gT2zGtO4M+gQ8jEDzVBXwsAuPb6HRNajOhaTL16jHYqTY7ctHFJi0IZKZDKjKywCr8N2L4g==","signatures":[{"sig":"MEUCIQC26MJ+KV9CrGKgMlEyS8AP7Qs4gZ/OAkx1euVcQ1Id0gIgCzehjP4IjjN8U3YbM4HjsfdmGvQ5y63Moj1i4W/3J3o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4719},"main":"index.js","type":"module","_from":"file:asafarim-shared-tokens-0.6.0.tgz","types":"index.d.ts","module":"index.js","exports":{".":{"import":"./index.js","require":"./tailwind-preset.cjs"},"./index.css":"./index.css","./tailwind-preset":"./tailwind-preset.cjs"},"private":false,"scripts":{"build":"echo 'No build needed for shared-tokens'","demo:dev":"cd demo && npm run dev","demo:build":"cd demo && npm run build","demo:preview":"cd demo && npm run preview"},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"_resolved":"C:\\Users\\User\\AppData\\Local\\Temp\\155fd1844f0618aee7f4444f42eca0be\\asafarim-shared-tokens-0.6.0.tgz","_integrity":"sha512-auN0yQ0GS+0h+G6gT2zGtO4M+gQ8jEDzVBXwsAuPb6HRNajOhaTL16jHYqTY7ctHFJi0IZKZDKjKywCr8N2L4g==","repository":{"url":"git+https://github.com/AliSafari-IT/shared-tokens.git","type":"git"},"_npmVersion":"10.9.3","description":"A shared design tokens package for use across multiple projects.","directories":{},"_nodeVersion":"22.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"~5.8.3","@types/react":"^19.1.9","@types/react-dom":"^19.1.7"},"_npmOperationalInternal":{"tmp":"tmp/shared-tokens_0.6.0_1764783095561_0.7680826185784462","host":"s3://npm-registry-packages-npm-production"}},"0.7.0":{"name":"@asafarim/shared-tokens","version":"0.7.0","author":{"url":"https://github.com/AliSafari-IT","name":"Ali Safari","email":"ali@asafarim.com"},"_id":"@asafarim/shared-tokens@0.7.0","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"homepage":"https://github.com/AliSafari-IT/shared-tokens#readme","bugs":{"url":"https://github.com/AliSafari-IT/shared-tokens/issues"},"dist":{"shasum":"af10865ee4d0281bfced2bed551fb7cf92ce66af","tarball":"https://registry.npmjs.org/@asafarim/shared-tokens/-/shared-tokens-0.7.0.tgz","fileCount":3,"integrity":"sha512-czpeSJGh/c9MXLVp1O6RIHquvQ0pmLA4XHslAzmBVDzDfoYK0p3bZpyHISSaAz8lA4GP63OSWSZ+49L3BgVaNQ==","signatures":[{"sig":"MEQCIGyQylozT1QSev03enmsEVe854tdOr9kl21q1+tGc+meAiAf5RemUcCjGE2YDF15FTUV05Q4+mXdNiwzsQ1DsQBBgA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4778},"main":"index.js","type":"module","_from":"file:asafarim-shared-tokens-0.7.0.tgz","style":"index.css","types":"index.d.ts","module":"index.js","exports":{".":{"import":"./index.js","require":"./tailwind-preset.cjs"},"./index.css":"./index.css","./tailwind-preset":"./tailwind-preset.cjs"},"private":false,"scripts":{"demo":"cd demo && pnpm run dev","build":"echo 'No build needed for shared-tokens'","demo:build":"cd demo && pnpm run build","demo:preview":"cd demo && pnpm run preview"},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"_resolved":"C:\\Users\\User\\AppData\\Local\\Temp\\e1642714ba0df792e90c802bccd0aa74\\asafarim-shared-tokens-0.7.0.tgz","_integrity":"sha512-czpeSJGh/c9MXLVp1O6RIHquvQ0pmLA4XHslAzmBVDzDfoYK0p3bZpyHISSaAz8lA4GP63OSWSZ+49L3BgVaNQ==","repository":{"url":"git+https://github.com/AliSafari-IT/shared-tokens.git","type":"git"},"_npmVersion":"10.9.3","description":"A shared design tokens package for use across multiple projects.","directories":{},"sideEffects":["*.css"],"_nodeVersion":"22.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"~5.8.3","@types/react":"^18.3.1","@types/react-dom":"^18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/shared-tokens_0.7.0_1764788206690_0.09883464732767355","host":"s3://npm-registry-packages-npm-production"}},"0.8.0":{"name":"@asafarim/shared-tokens","version":"0.8.0","keywords":["asafarim","CSS tokens","shared tokens","design tokens","CSS variables","pure CSS"],"author":{"url":"https://github.com/AliSafari-IT","name":"Ali Safari","email":"ali@asafarim.com"},"_id":"@asafarim/shared-tokens@0.8.0","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"homepage":"https://github.com/AliSafari-IT/shared-tokens#readme","bugs":{"url":"https://github.com/AliSafari-IT/shared-tokens/issues"},"dist":{"shasum":"9648531c5110e024aee4f67cfa3a4044767a2a59","tarball":"https://registry.npmjs.org/@asafarim/shared-tokens/-/shared-tokens-0.8.0.tgz","fileCount":16,"integrity":"sha512-CnSQbkhhKOPurgxKTqH9DTNT71/HnuEmTjpFNoM5fEYc1MnoNWzVgP9xWo4Q6eMFWsGYXUCIHQbTMwFnkoqokw==","signatures":[{"sig":"MEUCICRlhln+TO49wklkfGajte6Zpn56XhlaNVfmJEfHllTcAiEAnMFQHxuXID69M44Gd4HVRjGVfmO5ObVYG8AcdWXTOG0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37521},"main":"index.js","type":"module","_from":"file:asafarim-shared-tokens-0.8.0.tgz","style":"index.css","types":"index.d.ts","module":"index.js","exports":{".":{"types":"./index.d.ts","import":"./index.js","require":"./index.js"},"./index.css":"./index.css"},"private":false,"scripts":{"demo":"cd demo && pnpm run dev","build":"echo 'No build needed for shared-tokens'","demo:build":"cd demo && pnpm run build","demo:preview":"cd demo && pnpm run preview"},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"_resolved":"C:\\Users\\User\\AppData\\Local\\Temp\\a9699fd71eee1df241da0556219d586d\\asafarim-shared-tokens-0.8.0.tgz","_integrity":"sha512-CnSQbkhhKOPurgxKTqH9DTNT71/HnuEmTjpFNoM5fEYc1MnoNWzVgP9xWo4Q6eMFWsGYXUCIHQbTMwFnkoqokw==","repository":{"url":"git+https://github.com/AliSafari-IT/shared-tokens.git","type":"git"},"_npmVersion":"10.9.3","description":"A shared design tokens package for use across multiple projects.","directories":{},"sideEffects":["*.css","styles/**"],"_nodeVersion":"22.20.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"~5.8.3","@types/react":"^18.3.1","@types/react-dom":"^18.3.1"},"_npmOperationalInternal":{"tmp":"tmp/shared-tokens_0.8.0_1764790640276_0.29101480359047094","host":"s3://npm-registry-packages-npm-production"}},"0.8.1":{"name":"@asafarim/shared-tokens","description":"A shared design tokens package for use across multiple projects.","author":{"name":"Ali Safari","email":"ali@asafarim.com","url":"https://github.com/AliSafari-IT"},"version":"0.8.1","private":false,"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/AliSafari-IT/shared-tokens.git"},"type":"module","main":"index.js","module":"index.js","types":"index.d.ts","style":"index.css","sideEffects":["*.css","styles/**"],"exports":{".":{"types":"./index.d.ts","import":"./index.js","require":"./index.js"},"./index.css":"./index.css"},"devDependencies":{"@types/react":"^18.3.1","@types/react-dom":"^18.3.1","typescript":"~5.8.3"},"keywords":["asafarim","CSS tokens","shared tokens","design tokens","CSS variables","pure CSS"],"scripts":{"build":"echo 'No build needed for shared-tokens'","demo":"cd demo && pnpm run dev","demo:build":"cd demo && pnpm run build","demo:preview":"cd demo && pnpm run preview"},"_id":"@asafarim/shared-tokens@0.8.1","bugs":{"url":"https://github.com/AliSafari-IT/shared-tokens/issues"},"homepage":"https://github.com/AliSafari-IT/shared-tokens#readme","_integrity":"sha512-VZgRqkd1owzrTMrVhkXQ8oUu6EnnV+RALOn81GGWvjH7NCxNdW0f8VPgjDcw/dKeN033FKPS1feA0iPpTkKs6A==","_resolved":"C:\\Users\\User\\AppData\\Local\\Temp\\3180eb87820bb86a8101bebf78bc49bc\\asafarim-shared-tokens-0.8.1.tgz","_from":"file:asafarim-shared-tokens-0.8.1.tgz","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-VZgRqkd1owzrTMrVhkXQ8oUu6EnnV+RALOn81GGWvjH7NCxNdW0f8VPgjDcw/dKeN033FKPS1feA0iPpTkKs6A==","shasum":"4b3f0eb1144bfdbcf07135ee56b448bf903fcec3","tarball":"https://registry.npmjs.org/@asafarim/shared-tokens/-/shared-tokens-0.8.1.tgz","fileCount":16,"unpackedSize":37013,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDu2u2keL/1ij3cF5cmXK9+r6m+ZtMrHqp2Dmwg5ZonAAIhALRQZ0eS/LOsSiAA8oiyV3BBlw2gEL1PhvFN9jbdmeAW"}]},"_npmUser":{"name":"asafarim.be","email":"asafarim.it@gmail.com"},"directories":{},"maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/shared-tokens_0.8.1_1764791191965_0.08322443417062964"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-22T21:41:11.264Z","modified":"2025-12-03T19:46:32.347Z","0.5.0":"2025-11-22T21:41:11.628Z","0.6.0":"2025-12-03T17:31:35.734Z","0.7.0":"2025-12-03T18:56:46.873Z","0.8.0":"2025-12-03T19:37:20.468Z","0.8.1":"2025-12-03T19:46:32.161Z"},"bugs":{"url":"https://github.com/AliSafari-IT/shared-tokens/issues"},"author":{"name":"Ali Safari","email":"ali@asafarim.com","url":"https://github.com/AliSafari-IT"},"homepage":"https://github.com/AliSafari-IT/shared-tokens#readme","keywords":["asafarim","CSS tokens","shared tokens","design tokens","CSS variables","pure CSS"],"repository":{"type":"git","url":"git+https://github.com/AliSafari-IT/shared-tokens.git"},"description":"A shared design tokens package for use across multiple projects.","maintainers":[{"name":"asafarim.be","email":"asafarim.it@gmail.com"}],"readme":"# shared-tokens\r\n\r\nThis repository provides a set of CSS design tokens (colors, spacing, radii, shadows, etc.) and theme definitions you can consume in web projects. A small demo app shows usage with React + TypeScript.\r\n\r\n## Quick demo\r\n\r\nFrom the repository root run:\r\n\r\n```bash\r\ncd demo\r\nnpm install\r\nnpm run dev\r\n```\r\n\r\nThe demo imports the root `index.css` so you can see token usage locally.\r\n\r\n---\r\n\r\n## Beginner: How to use `@asafarim/shared-tokens`\r\n\r\nBelow are simple, copy-paste examples to get started quickly.\r\n\r\n- Install the package (replace with `npm`/`pnpm` if you prefer):\r\n\r\n```bash\r\nnpm install @asafarim/shared-tokens\r\n```\r\n\r\n- Import tokens in plain HTML/CSS\r\n\r\nIn your application's entry HTML or a global CSS file:\r\n\r\n```html\r\n<!-- in index.html -->\r\n<link rel=\"stylesheet\" href=\"node_modules/@asafarim/shared-tokens/index.css\">\r\n```\r\n\r\nNow your app has CSS custom properties available. Use them like:\r\n\r\n```css\r\n.my-button {\r\n\tbackground: var(--color-primary);\r\n\tcolor: var(--color-white);\r\n\tpadding: var(--space-3);\r\n\tborder-radius: var(--radius-md);\r\n\tbox-shadow: var(--shadow-sm);\r\n}\r\n```\r\n\r\n- Use tokens in a React app\r\n\r\nImport the package CSS in your root entry (e.g., `src/main.tsx`):\r\n\r\n```ts\r\nimport 'node_modules/@asafarim/shared-tokens/index.css'\r\nimport '@asafarim/shared-tokens/index.css' // if bundler resolves node_modules automatically\r\n```\r\n\r\nThen reference tokens in your component styles or CSS modules as shown above.\r\n\r\n- Light / Dark themes\r\n\r\nThe package includes theme overrides under `styles/themes/` which toggle tokens using a `data-theme` attribute on the `html` element.\r\n\r\nExample to switch programmatically (JS):\r\n\r\n```js\r\n// set dark theme\r\ndocument.documentElement.setAttribute('data-theme', 'dark')\r\n\r\n// set light theme\r\ndocument.documentElement.setAttribute('data-theme', 'light')\r\n```\r\n---\r\n\r\n## Publishing\r\n\r\nTo publish this package to the public npm registry:\r\n\r\n1. Make sure `package.json` has a proper `name` and `version`.\r\n2. Ensure you are logged in: `npm login`.\r\n3. From the repo root run:\r\n\r\n```bash\r\nnpm publish --access public\r\n```\r\n\r\nIf you prefer to test publishing to a scope or using a different registry, adjust `publishConfig` accordingly.\r\n","readmeFilename":"README.md"}