{"bugs":{"url":"https://github.com/tw-in-js/twind/issues"},"dist":{"shasum":"f2e3d18152acc5132047e04359b1bdafddd1c4ff","tarball":"https://registry.npmjs.org/twind/-/twind-1.0.0-next.16.tgz","fileCount":37,"integrity":"sha512-MeQzr+UWIeseSuUIK27PXVmCicbjkHOIr9k92j7Tm0l9ffR+AGLyifAy+yeAXedacjA9hRhaEEI8z6q0DTYwLg==","signatures":[{"sig":"MEQCIHKS8uQrNa9HvpM0Fc/Dt2Z0nYZ8+b8CGYAH6Tish+NXAiBHyTLl59qaD5EiArl9qIa1lyhZtnDWNBYIXUIyUn5Tug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":351813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6C47CRA9TVsSAnZWagAAKTgQAKMnAT7cdlB6h/K1mm6L\nbPcntWY/2bfJPRFGxgbCbxAIKwq8/TccwaD710CmTAUC2pLjCbrPZ519M8oc\nqIMI4tXie+p0DHz897034WCKYVDIcCknklOnovGUf2icPEBWUwrEpbEQ5A7s\nN3v1xbFeTgCVdqBp3ilNW1JzMFY9Pq9QNIGh7u8+7qUmVTppXTIY0FUClEyM\nkJ9NgzMJkO/vAvUrrejjplE6K+z13MMdfZVipbPwRNcQufcLZXyQC/qInSvk\nXvZCM4MgzNzLMnWyW3bIOyvtQc9yj7hq/OYMk3wLQ0dKltTI3xGSn9ZqSbpF\noWZ4wgHstZwoeoQ9M0dYjiZrCVS76ZhvnmGo0tf8hoUaEVHAt24TGEsmGiz6\ngqX7vAn9Du7fRVr1nsrD4XhGt2q72jG+DKwPqT8KQ+/qYxD7WqKNzMZpHO0Y\nU7XmyZ+11grjjKD+lFyH3wnL+BXCB0WXYXK3krgLIhwMQ9A4ksqOxtzLr+s6\nvNbvy8zA4Jgw34QUcuTNmGc49uW15nYbIJqR3PJPbliL2GIFkRGnrTFKe42v\nsvFn5GWL8PZWqxFmYVzjMmqEkx9bFpXgB/EIlVPX9aRWrg5+5j0U/bZwAtSO\njf7Mg8vjn1kGJAq/lmqE5eQyOv9WmOIlUpvcZSmig1reP1Ta5L6VanPy2/LO\nf53v\r\n=r/11\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./twind.cjs","name":"twind","type":"module","_from":"file:twind-1.0.0-next.16.tgz","types":"./twind.d.ts","unpkg":"./twind.global.js","author":{"url":"https://github.com/sastan","name":"Sascha Tandel"},"esnext":"./twind.esnext.js","module":"./twind.js","readme":"# twind\n\n---\n\n## READ THIS FIRST!\n\n**Twind v1 is still in beta. Expect bugs!**\n\nTwind v1 is a complete rewrite aiming to be compatible with Tailwind v3 classes\n\n---\n\nTailwind right in the browser without any build step.\n\n## Usage\n\n```sh\nnpm i twind@next\n```\n\n```js\nimport { setup } from 'twind'\n\n// You must call setup atleast once, but can call it multiple times\nsetup({\n  /* options */\n})\n```\n\nIncase you are not using SSR to inject the pre-computed styles apply the following pattern to prevent [FOUC](https://en.wikipedia.org/wiki/Flash_of_unstyled_content):\n\n```html\n<body class=\"!block\" style=\"display: none\">\n  <!-- ... -->\n</body>\n```\n\n**Script tag without a build step**\n\nAdd this line to your `index.html`:\n\n```html\n<head>\n  <!-- ... -->\n  <script src=\"https://cdn.jsdelivr.net/npm/twind@next\" crossorigin></script>\n  <!-- ... -->\n</head>\n```\n\nTo configure Twind add a script block _after_ the previous one (optional):\n\n```html\n<script>\n  twind.setup({\n    presets: [\n      // custom presets...\n    ],\n    theme: {\n      extend: {\n        colors: {\n          clifford: '#da373d',\n        },\n      },\n    },\n    rules: [\n      // custom rules...\n    ],\n    // ...\n  })\n</script>\n```\n\n**Presets**\n\n- [@twind/preset-autoprefix](https://www.npmjs.com/package/@twind/preset-autoprefix)\n- [@twind/preset-tailwind](https://www.npmjs.com/package/@twind/preset-tailwind)\n\nTo add another preset add its script after the current one:\n\n```html\n<head>\n  <!-- ... -->\n  <script src=\"https://cdn.jsdelivr.net/npm/twind@next\" crossorigin></script>\n  <script src=\"https://cdn.jsdelivr.net/npm/@twind/preset-ext@next\" crossorigin></script>\n  <script>\n    twind.setup({\n      presets: [twind_presetExt()],\n      // ...\n    })\n  </script>\n  <!-- ... -->\n</head>\n```\n\n**API**: accessible through the global `twind` variable\n\n- [`twind.setup`](#setupconfig--sheet--target)\n- `twind.tw` — from [@twind/runtime](https://www.npmjs.com/package/@twind/runtime#tw)\n- `twind.*` — everything from [@twind/core](https://www.npmjs.com/package/@twind/core#api)\n\n### `twind/cdn`\n\nA drop-in replacement for Tailwind CSS Play CDN that is almost 6 times smaller (96.4kb vs 16.9kB).\n\n```js\nimport { setup } from 'twind/play-cdn'\n```\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/twind@next/cdn.global.js\" crossorigin></script>\n```\n\n**Presets**\n\n- [@twind/preset-autoprefix](https://www.npmjs.com/package/@twind/preset-autoprefix)\n- [@twind/preset-tailwind](https://www.npmjs.com/package/@twind/preset-tailwind)\n\n**API** — accessible through the global `twind` variable\n\n- [`twind.setup`](#setupconfig--sheet--target)\n- `twind.tw` — from [@twind/runtime](https://www.npmjs.com/package/@twind/runtime#tw)\n\n### `twind/core`\n\n```js\nimport { setup } from 'twind/core'\n```\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/twind@next/core.global.js\" crossorigin></script>\n```\n\n**Presets**\n\nNone\n\n**API** — accessible through the global `twind` variable\n\n- [`twind.setup`](#setupconfig--sheet--target)\n- `twind.tw` — from [@twind/runtime](https://www.npmjs.com/package/@twind/runtime#tw)\n- `twind.*` — everything from [@twind/core](https://www.npmjs.com/package/@twind/core#api)\n\n## API\n\n### `setup(config [, sheet [, target]])`\n\nCan be called as many times as you want.\n\n```js\nimport { setup } from 'twind'\n\n// can be called as many times as you want.\nconst tw = setup({\n  /* config */\n})\n```\n\n### `tw(...tokens)` — the current Twind instance\n\n```js\nimport { tw } from 'twind'\n\ntw`underline`\ntw({ underline: true })\n\ntw.theme('colors.blue.500', 'blue')\n```\n\n### `extract(html, tw)`\n\nUsed for static HTML processing (usually to provide SSR support for your javascript-powered web apps) — powered by [consume(html, tw)](#consumehtml-tw)\n\n**Note**: This clears the Twind instance before processing the HTML.\n\n```js\nimport { setup, extract, tw } from 'twind'\n\n// can be in a different file — but should be called at least once\nsetup({\n  /* config */\n})\n\nfunction render() {\n  const { html, css } = extract(renderApp(), tw)\n\n  // inject as last element into the head\n  return html.replace('</head>', `<style data-twind>${css}</style></head>`)\n}\n```\n\n### `consume(html, tw)`\n\nUsed for static HTML processing (usually to provide SSR support for your javascript-powered web apps)\n\n1. parse the markup and process element classes with the provided Twind instance\n2. update the class attributes _if_ necessary\n3. return the HTML string with the final element classes\n\n```js\nimport { setup, tw, consume, stringify } from 'twind'\n\n// can be in a different file — but should be called at least once\nsetup({\n  /* config */\n})\n\nfunction render() {\n  const html = renderApp()\n\n  // clear all styles\n  tw.clear()\n\n  // generated markup\n  const markup = comsume(html, tw)\n\n  // create CSS\n  const css = stringify(tw.target)\n\n  // inject as last element into the head\n  return markup.replace('</head>', `<style data-twind>${css}</style></head>`)\n}\n```\n","engines":{"node":">=12.4"},"exports":{".":{"node":{"import":"./twind.mjs","require":"./twind.cjs"},"types":"./twind.d.ts","esnext":"./twind.esnext.js","module":"./twind.js","script":"./twind.global.js","default":"./twind.js"},"./cdn":{"node":{"import":"./cdn.mjs","require":"./cdn.cjs"},"types":"./cdn.d.ts","esnext":"./cdn.esnext.js","module":"./cdn.js","script":"./cdn.global.js","default":"./cdn.js"},"./core":{"node":{"import":"./core.mjs","require":"./core.cjs"},"types":"./core.d.ts","esnext":"./core.esnext.js","module":"./core.js","script":"./core.global.js","default":"./core.js"},"./package.json":"./package.json"},"funding":{"url":"https://opencollective.com/twind","type":"opencollective"},"license":"MIT","_npmUser":{"name":"sastan","email":"s.tandel@me.com"},"homepage":"https://twind.dev","jsdelivr":"./twind.global.js","keywords":["twind","tw-in-js","tailwind","tailwindcss","tailwind-in-js"],"_resolved":"/home/runner/work/twind/twind/packages/twind/dist/twind-1.0.0-next.16.tgz","_integrity":"sha512-MeQzr+UWIeseSuUIK27PXVmCicbjkHOIr9k92j7Tm0l9ffR+AGLyifAy+yeAXedacjA9hRhaEEI8z6q0DTYwLg==","deprecated":"use @twind/core instead","repository":{"url":"git+https://github.com/tw-in-js/twind.git","type":"git","directory":"packages/twind"},"_npmVersion":"8.1.2","description":"tailwindcss compat based on twind","directories":{},"maintainers":[{"name":"sastan","email":"s.tandel@me.com"},{"name":"lukejacksonn","email":"lukejacksonn@gmail.com"}],"sideEffects":false,"_nodeVersion":"16.13.2","contributors":[{"url":"lukejacksonn.github.io","name":"Luke Jackson"},{"url":"https://github.com/sastan","name":"Sascha Tandel"}],"dependencies":{"@twind/core":"1.0.0-next.14","@swc/helpers":"^0.3.2","@twind/runtime":"1.0.0-next.14","@twind/preset-tailwind":"1.0.0-next.15","@twind/preset-autoprefix":"1.0.0-next.14"},"publishConfig":{"tag":"next","access":"public","directory":"dist"},"_hasShrinkwrap":false,"peerDependencies":{"typescript":"^4.4.0"},"peerDependenciesMeta":{"typescript":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/twind_1.0.0-next.16_1642606139511_0.3901299285454838","host":"s3://npm-registry-packages"},"_id":"twind@1.0.0-next.16","version":"1.0.0-next.16"}