{"_id":"@backto/theme-json-to-tailwind-config","_rev":"2-458a0dd38fb1458ff1cde855dfa954ba","name":"@backto/theme-json-to-tailwind-config","dist-tags":{"latest":"0.1.1"},"versions":{"1.0.0":{"name":"@backto/theme-json-to-tailwind-config","version":"1.0.0","keywords":["tailwindcss","wordpress","theme.json"],"author":{"name":"BackTo"},"license":"MIT","_id":"@backto/theme-json-to-tailwind-config@1.0.0","maintainers":[{"name":"suriteka","email":"suriteka@gmail.com"},{"name":"truchot","email":"florian@truchot.co"}],"dist":{"shasum":"b2bb2c7cf62e984ac2b1adc16f45556b9bc96bfc","tarball":"https://registry.npmjs.org/@backto/theme-json-to-tailwind-config/-/theme-json-to-tailwind-config-1.0.0.tgz","fileCount":3,"integrity":"sha512-gKR3m/rFmF8dQlBwEFkSXENNJXe4Fmlsi0vmP50rldqBaIytQXAVDyZgKonl03mDAPi3ZSN77FCZvbSdqMaa9Q==","signatures":[{"sig":"MEYCIQCjEfnV3GVE54ijhl+jqDLPUTgNbMWWfeiIaZHKh2yujwIhAJSIUh9k0h2WoH0pbqCmhdBmncuiHFjM06Cquj27uAPb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3948},"main":"index.js","gitHead":"25290cedddb9c420661f939f1469b8b3c11626e6","_npmUser":{"name":"suriteka","email":"suriteka@gmail.com"},"_npmVersion":"10.9.0","description":"A Tailwind plugin that automatically syncs WordPress theme.json spacing values with your Tailwind configuration","directories":{},"_nodeVersion":"22.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"tailwindcss":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/theme-json-to-tailwind-config_1.0.0_1736770603766_0.5819630385646004","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@backto/theme-json-to-tailwind-config","version":"0.1.0","keywords":["tailwindcss","wordpress","theme.json"],"author":{"name":"BackTo"},"license":"MIT","_id":"@backto/theme-json-to-tailwind-config@0.1.0","maintainers":[{"name":"suriteka","email":"suriteka@gmail.com"},{"name":"truchot","email":"florian@truchot.co"}],"dist":{"shasum":"e23a9396ed5385cab60848b5248bda52f7728620","tarball":"https://registry.npmjs.org/@backto/theme-json-to-tailwind-config/-/theme-json-to-tailwind-config-0.1.0.tgz","fileCount":3,"integrity":"sha512-/e6qgzhjbtHcxJm6B4jqJMyFTHyrWf7E0kNv8EejmIEGckOUVanPaU200T0F4x7i4T8YrJK6j8ZhSyZeJOBVHQ==","signatures":[{"sig":"MEYCIQDvM2dcAZ1Ocp4PJz8sVBPz0rHG0WjBmJR3qCfo4+6hqAIhAKoq97VNh27+Rpn96irBOuZtiji3/bMThPK9FLZpSkA5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4012},"main":"index.js","gitHead":"d582b700175c05cafa7cf5c97ff2362b4fdc8bba","_npmUser":{"name":"suriteka","email":"suriteka@gmail.com"},"_npmVersion":"10.9.0","description":"A Tailwind plugin that automatically syncs WordPress theme.json spacing values with your Tailwind configuration","directories":{},"_nodeVersion":"22.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"tailwindcss":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/theme-json-to-tailwind-config_0.1.0_1736773536014_0.06056806360803657","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@backto/theme-json-to-tailwind-config","version":"0.1.1","publishConfig":{"access":"public"},"description":"A Tailwind plugin that automatically syncs WordPress theme.json spacing values with your Tailwind configuration","main":"index.js","keywords":["tailwindcss","wordpress","theme.json"],"author":{"name":"BackTo"},"license":"MIT","peerDependencies":{"tailwindcss":"^3.0.0"},"_id":"@backto/theme-json-to-tailwind-config@0.1.1","gitHead":"9b9bb3668a42cb5f5806ebc96412fc4d1a5d4235","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-vImd8DPurpYpjvqBp5sV6gpGCbjV8CNAe/LEgq5R7d6YuvLYjIAhrwoxsWTAbKODoVo4mhw6xdJbgfwj7YXtpA==","shasum":"cadd9afe364b0bc010603ab6011df504e659a98f","tarball":"https://registry.npmjs.org/@backto/theme-json-to-tailwind-config/-/theme-json-to-tailwind-config-0.1.1.tgz","fileCount":3,"unpackedSize":3972,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBr+Z7+FLsfNEs6xxZ/N5olnZKGohSk2Ks9DRHjWIcZOAiAcCuFyNLQwIXBxUHxHt3t35OKd6QNZCIcD05r66z0chQ=="}]},"_npmUser":{"name":"suriteka","email":"suriteka@gmail.com"},"directories":{},"maintainers":[{"name":"suriteka","email":"suriteka@gmail.com"},{"name":"truchot","email":"florian@truchot.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/theme-json-to-tailwind-config_0.1.1_1736773882426_0.37909242258997566"},"_hasShrinkwrap":false}},"time":{"created":"2025-01-13T12:16:43.640Z","modified":"2025-01-13T13:11:22.829Z","1.0.0":"2025-01-13T12:16:43.933Z","0.1.0":"2025-01-13T13:05:36.173Z","0.1.1":"2025-01-13T13:11:22.602Z"},"author":{"name":"BackTo"},"license":"MIT","keywords":["tailwindcss","wordpress","theme.json"],"description":"A Tailwind plugin that automatically syncs WordPress theme.json spacing values with your Tailwind configuration","maintainers":[{"name":"suriteka","email":"suriteka@gmail.com"},{"name":"truchot","email":"florian@truchot.co"}],"readme":"# @backto/theme-json-to-tailwind-config\n\nA Tailwind CSS plugin that automatically synchronizes spacing values from your WordPress `theme.json` file with your Tailwind configuration.\n\n[![npm version](https://img.shields.io/npm/v/@backto/theme-json-to-tailwind-config.svg)](https://www.npmjs.com/package/@backto/theme-json-to-tailwind-config)\n\n## Features\n\n- 🔄 Automatic synchronization between `theme.json` and Tailwind config\n- 🎯 Zero configuration needed\n- 🚀 Seamless integration with WordPress block editor\n- ⚡️ Lightweight with no dependencies\n\n## Installation\n\n```bash\nnpm install @backto/theme-json-to-tailwind-config\n```\n\n## Setup\n\nIn your `tailwind.config.js`:\n\n```js\njs\nconst themeJson = require('./PATH_TO_YOUR_THEME/theme.json');\nimport themeJsonToTailwind from '@backto/theme-json-to-tailwind-config';\n\nmodule.exports = {\n    content: [\n    // your content configuration\n    ],\n    plugins: [\n        themeJsonToTailwind({\n            themeJson: themeJson,\n        })\n    ]\n}\n```\n\n\n## Usage\n\n### WordPress Theme.json Configuration\n\nDefine your spacing values in your `theme.json`:\n\n```json\n{\n    \"settings\": {\n        \"spacing\": {\n            \"spacingSizes\": [\n                {\n                    \"name\": \"Extra small\",\n                    \"slug\": \"xs\",\n                    \"size\": \"1.25rem\"\n                },\n                {\n                    \"name\": \"Small\",\n                    \"slug\": \"sm\",\n                    \"size\": \"2rem\"\n                }\n            ]\n        }\n    }\n}\n```\n\n\n### Using in Your Templates\n\nThe plugin automatically generates Tailwind utility classes based on your `theme.json` spacing values:\n\n```html\n<div class=\"mt-xs\">...</div>\n<div class=\"mb-sm\">...</div>\n```\n\nThis will generate the following CSS:\n\n```css\n.mt-xs {\n    margin-top: 1.25rem;\n}\n.mb-sm {\n    margin-bottom: 2rem;\n}\n```\n\n## How It Works\n\nThe plugin:\n1. Reads the `spacingSizes` array from your `theme.json`\n2. Converts the values into Tailwind-compatible spacing units\n3. Extends Tailwind's spacing configuration with your custom values\n\n## Requirements\n\n- Tailwind CSS v3.0.0 or higher (peer dependency)\n- WordPress 5.8+ (for theme.json support)\n- Node.js 18 or higher\n\n## API Reference\n\n### Plugin Options\n\n| Option | Type | Required | Description |\n|--------|------|----------|-------------|\n| `themeJson` | `Object` | Yes | Your WordPress theme.json configuration object |\n","readmeFilename":"README.md"}