{"_id":"@afordin/unocss-preset-token","_rev":"1-884c550854ab7f04a8b6da011f7ac27c","name":"@afordin/unocss-preset-token","dist-tags":{"latest":"0.1.0-beta.0"},"versions":{"0.0.6":{"name":"@afordin/unocss-preset-token","type":"module","version":"0.0.6","packageManager":"pnpm@8.9.2","description":"UnoCSS preset to Design Token","license":"MIT","homepage":"https://github.com/afordin/unocss-preset-token#readme","repository":{"type":"git","url":"git+https://github.com/afordin/unocss-preset-token.git"},"bugs":{"url":"https://github.com/afordin/unocss-preset-token/issues"},"keywords":["unocss","unocss-preset","unocss-preset-token"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"build":"unbuild","stub":"unbuild --stub","play":"pnpm --filter ./playground run dev","test":"vitest","lint":"eslint .","lint:fix":"pnpm run lint --fix","typecheck":"tsc --noEmit","release":"bumpp package.json packages/**/package.json"},"peerDependencies":{"@unocss/core":">= 0.52.0"},"dependencies":{"@unocss/core":"^0.57.1"},"devDependencies":{"@antfu/eslint-config":"^1.0.0-beta.29","@types/node":"^20.8.9","@unocss/preset-uno":"^0.57.1","bumpp":"^9.2.0","eslint":"^8.52.0","typescript":"^5.2.2","unbuild":"^2.0.0","vitest":"^0.34.6"},"directories":{"test":"test"},"author":"","gitHead":"5b70175e4a8f961f5194fa551523ac98710a6bcf","_id":"@afordin/unocss-preset-token@0.0.6","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-nCKbBAEBVJoRKyjb+/8h+X0o8p0BipvlQPaPbHytbsTgXJaue4xMb7d1geokDE8pU7QAGEK07faadtO4iXgv0g==","shasum":"ecca73de3e39566c59e85dcd0afcf2ac07653ccd","tarball":"https://registry.npmjs.org/@afordin/unocss-preset-token/-/unocss-preset-token-0.0.6.tgz","fileCount":7,"unpackedSize":8314,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1TvJ+7UnLIJ5kcFp27IZXKL/DpvM6VlaTTmxqKatzgQIhAImWaCS3y/q9S7IOKZ/kNj2Pu3KEG01qWj7l3e8+i8AH"}]},"_npmUser":{"name":"juanpablo.is","email":"juanpablo.is@outlook.com"},"maintainers":[{"name":"juanpablo.is","email":"juanpablo.is@outlook.com"},{"name":"afor_digital","email":"sara.montagud.rodriguez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unocss-preset-token_0.0.6_1699461043209_0.4946144309528753"},"_hasShrinkwrap":false},"0.1.0-beta.0":{"name":"@afordin/unocss-preset-token","type":"module","version":"0.1.0-beta.0","packageManager":"pnpm@8.9.2","description":"UnoCSS preset to Design Token","license":"MIT","homepage":"https://github.com/afordin/unocss-preset-token#readme","repository":{"type":"git","url":"git+https://github.com/afordin/unocss-preset-token.git"},"bugs":{"url":"https://github.com/afordin/unocss-preset-token/issues"},"keywords":["unocss","unocss-preset","unocss-preset-token"],"sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","peerDependencies":{"@unocss/core":">= 0.52.0"},"dependencies":{"@unocss/core":"^0.57.1"},"devDependencies":{"@antfu/eslint-config":"^1.0.0-beta.29","@types/node":"^20.8.9","@unocss/preset-uno":"^0.57.1","bumpp":"^9.2.0","eslint":"^8.52.0","typescript":"^5.2.2","unbuild":"^2.0.0","vitest":"^0.34.6"},"directories":{"test":"test"},"author":{"name":"Juan Pablo","email":"juanpablo.is@outlook.com","url":"https://jotapeis.tech"},"scripts":{"build":"unbuild","stub":"unbuild --stub","play":"pnpm --filter ./playground run dev","test":"vitest","lint":"eslint .","lint:fix":"pnpm run lint --fix","typecheck":"tsc --noEmit","release":"bumpp package.json packages/**/package.json"},"_id":"@afordin/unocss-preset-token@0.1.0-beta.0","_integrity":"sha512-O9bE14e6ebSjWCpWRfQbZTgYPVQ/AFPQtJfcdidwQfCidoJajLPsgbkcbZuNOaWRT676aQ8oNFaVOT+9LqaX2Q==","_resolved":"/tmp/2aa33292fd3f9c55d5856b5b8d381568/afordin-unocss-preset-token-0.1.0-beta.0.tgz","_from":"file:afordin-unocss-preset-token-0.1.0-beta.0.tgz","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-O9bE14e6ebSjWCpWRfQbZTgYPVQ/AFPQtJfcdidwQfCidoJajLPsgbkcbZuNOaWRT676aQ8oNFaVOT+9LqaX2Q==","shasum":"d504b5179e9a7b70d2c1c2c2b7dee31449808a70","tarball":"https://registry.npmjs.org/@afordin/unocss-preset-token/-/unocss-preset-token-0.1.0-beta.0.tgz","fileCount":7,"unpackedSize":10616,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGrelYezkQm/4Vvzjf2PktMtjRxVGfl0Atj/PCreUb1fAiBITZVnQ4C5JA0khY0iKYOeRabtzQENOYc9nsuhmT+Ffg=="}]},"_npmUser":{"name":"juanpablo.is","email":"juanpablo.is@outlook.com"},"maintainers":[{"name":"juanpablo.is","email":"juanpablo.is@outlook.com"},{"name":"afor_digital","email":"sara.montagud.rodriguez@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/unocss-preset-token_0.1.0-beta.0_1699466133636_0.9551533814934332"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-08T16:30:43.073Z","0.0.6":"2023-11-08T16:30:43.380Z","modified":"2023-11-08T17:55:34.003Z","0.1.0-beta.0":"2023-11-08T17:55:33.792Z"},"maintainers":[{"name":"juanpablo.is","email":"juanpablo.is@outlook.com"},{"name":"afor_digital","email":"sara.montagud.rodriguez@gmail.com"}],"description":"UnoCSS preset to Design Token","homepage":"https://github.com/afordin/unocss-preset-token#readme","keywords":["unocss","unocss-preset","unocss-preset-token"],"repository":{"type":"git","url":"git+https://github.com/afordin/unocss-preset-token.git"},"bugs":{"url":"https://github.com/afordin/unocss-preset-token/issues"},"license":"MIT","readme":"# unocss-preset-token [![npm](https://img.shields.io/npm/v/@afordin/unocss-preset-token)](https://npmjs.com/package/@afordin/unocss-preset-token)\n\nPreset to convert data from [Design Token Plugin to Figma](https://www.figma.com/community/plugin/888356646278934516/design-tokens) in theme to UnoCSS\n\n## 🚀 Usage\n\n- **PNPM**\n\n```shell\npnpm i -D @afordin/unocss-preset-token\n```\n\n- **NPM**\n\n```shell\nnpm i -D @afordin/unocss-preset-token\n```\n\n- **Yarn**\n\n```shell\nyarn add -D @afordin/unocss-preset-token\n```\n\n---\n\n```ts\n// unocss.config.js\nimport { defineConfig } from 'unocss';\nimport presetToken from '@afordin/unocss-preset-token';\n\nexport default defineConfig({\n  presets: [\n    presetToken({\n      divider: '-',\n      tokens: {},\n    }),\n  ],\n});\n```\n\n<details>\n<summary>Options</summary><br>\n\n```ts\nexport interface PresetTokenOptions {\n  /**\n   * Separation character for classes\n   */\n  divider?: '-' | '_' | '.';\n\n  /**\n   * Design Tokens Information\n   */\n  tokens: Record<string, any>;\n}\n```\n\n### divider\n\nThe character to separate naming class, default is `-`\n\n```json\n// Tokens information\n{\n  \"color\": {\n    \"primary\": {\n      \"description\": \"Primary color\",\n      \"type\": \"color\",\n      \"value\": \"#ff7a5cff\",\n      \"blendMode\": \"normal\"\n    }\n  }\n}\n```\n\nThe class naming in theme with divider default, `color-primary`\n\n```html\n<div class=\"bg-color-primary\" />\n```\n\n### tokens\n\nThe token structure is based on the Figma [Design Token plugin](https://www.figma.com/community/plugin/888356646278934516/design-tokens).\n\nTheme tokens are based on the [types of tokens](https://github.com/lukasoppermann/design-tokens#token-prefixes) handled by the plugin\n\n```json\n// Tokens information\n{\n  \"color\": {\n    \"primary\": {\n      \"description\": \"Primary color\",\n      \"type\": \"color\",\n      \"value\": \"#ff7a5cff\",\n      \"blendMode\": \"normal\"\n    }\n  },\n  \"secondary\": {\n    \"description\": \"Secondary color\",\n    \"type\": \"color\",\n    \"value\": \"#ffc9d9ff\",\n    \"blendMode\": \"normal\"\n  }\n}\n```\n\nThe classes naming in theme with divider default, `color-primary` and `secondary`\n\n```html\n<div class=\"bg-color-primary\" />\n<div class=\"bg-secondary\" />\n```\n\n<br></details>\n\n## 🤹‍♂️ Playground\n\nYou can validate your token information in the [playground](https://transform-token.vercel.app/)\n\n## License\n\n[MIT](./LICENSE) License © 2023 [jp](https://github.com/juanpablo-is)\n","readmeFilename":"README.md","author":{"name":"Juan Pablo","email":"juanpablo.is@outlook.com","url":"https://jotapeis.tech"}}