{"bugs":{"url":"https://github.com/tw-in-js/twind/issues"},"dist":{"shasum":"36447fbceeb129974ddc830b41caad8e701082a4","tarball":"https://registry.npmjs.org/@twind/core/-/core-1.0.0-next.13.tgz","fileCount":15,"integrity":"sha512-I7s168nloLtWo0Of+1molruyKpBtmLYCCJAOvYFjizXnxvXTLkHgdU2q/dQRvAVwrA3PkXBlvYmTcpT2U0f5Ew==","signatures":[{"sig":"MEQCICiON1MoFZjXOvXnJnDhMAgqMlhxTPY7T7E0B1swbnmxAiBwR2GaFi3HRQOPCh0QEVzBQfAyjMsY7NnAT5XrnYvYXQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":410098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5ys7CRA9TVsSAnZWagAA6BIP/35K44H0fwj+qF4UKLoa\n1SUeVtqiBMjFyA6CpxZ1ulOZmV5xRdqDZJB9lOaZyoojEpk40EjwFIRgzCMY\n2zmM7ea0zWOcfRzRgWOr+GGp6/xf7RQkEiZLrvDNpJ9+Dwx08+ttWOjoXsPX\nGU9s7t1ZI7d8AdGdV7f82psm3LaYiz/2/y87pKSifhRF3dmmuqp1a1wUiahA\nAuvrkzsKf4C/DtHMRsIrIEaO9qGCqHANRnyUjWyeFXnkl/wgM0Q0wNDse+eH\nMzIMNm9PuAU3lBA82xpOejQIrhEjdMSVEBcnE69q6Kk0uE7UeNZn4TGg+wq0\nvjZIwMmdSASITMfrUYxr4h6+tBKTR1lgdWiLuLeQrNktiUv5HqnoWv5slQWt\nfou8FQXTXB1YZton35TIJ1hSTG4ulNA8Pn2MoZyZegKai/gkFUMHBfqu2ZJG\nNMzd8uIxewxSr/z2lR7pMCGj8ME5tdD/5lltsyY2i3BJoF6CmztGxXozdZY6\nz46TEXX0a3OysvD6497qZYtFrl9L4aq6n3cRukcf30PNrheC14JyEGjuWjeB\nAG4CfFl3Wfiu85Xh3ULmQx8yMcM+sp1SeqlGxF5mMQ5NntijqeK/VzWanj3d\nANhGfDXLadcPE7yuawk053GtFnyp1WbOJ/B7dO8kmELBw4fq1rhuGa6wEPBA\nqx/P\r\n=wdx6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./core.cjs","name":"@twind/core","type":"module","_from":"file:twind-core-1.0.0-next.13.tgz","types":"./core.d.ts","unpkg":"./core.global.js","author":{"url":"https://github.com/sastan","name":"Sascha Tandel"},"esnext":"./core.esnext.js","module":"./core.js","readme":"# @twind/core\n\nMinimal implementation of a tailwind-compatible CSS-in-JS framework.\n\n**This package does not contain any Tailwindcss rules. These are defined in [@twind/preset-tailwind](../preset-tailwind).**\n\n---\n\n## READ THIS FIRST!\n\n**Twind v1 is still in beta. Expect bugs!**\n\n---\n\n## Installation\n\nInstall from npm:\n\n```sh\n# Using npm\nnpm install @twind/core@next\n\n# Using Yarn\nyarn add @twind/core@next\n```\n\n## Usage\n\n```js\nimport { twind, cssom, observe } from '@twind/core'\n\nconst tw = observe(\n  twind(\n    {\n      theme: {\n        /* .. */\n      },\n      rules: [\n        /* ... */\n      ],\n    },\n    cssom(),\n  ),\n)\n```\n\n## API\n\n### `twind`\n\nTDB\n\n### `cx`\n\n```js\nimport { cx } from '@twind/core'\n\n// Set a className\nelement.className = cx`\n  underline\n  /* multi\n    line\n    comment\n  */\n  hover:focus:!{\n    sm:{italic why}\n    lg:-{px}\n    -mx-1\n  }\n  // Position\n  !top-1 !-bottom-2\n  text-{xl black}\n`\n```\n\n### `shortcut`\n\nTDB\n\n### `style`\n\nTDB\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)](#consume-html-tw)\n\n```js\nimport { twind, virtual, extract } from '@twind/core'\n\n// can be re-used\nconst tw = twind({ /* config */, virtual()}\n\nfunction render() {\n  const { html, css } = extract(app(), tw)\n\n  // inject as last element into the head\n  return html.replace('</head>', `<style id=\"tw\">${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 { twind, virtual, consume } from '@twind/core'\n\n// can be re-used\nconst tw = twind({ /* config */, virtual()}\n\nfunction render() {\n  const html = app()\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 = tw.target.join('')\n\n  // inject as last element into the head\n  return markup.replace('</head>', `<style id=\"tw\">${css}</style></head>`)\n}\n```\n","engines":{"node":">=12.4"},"exports":{".":{"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"},"license":"MIT","_npmUser":{"name":"sastan","email":"s.tandel@me.com"},"homepage":"https://twind.dev","jsdelivr":"./core.global.js","keywords":["twind","tw-in-js","tailwind","tailwindcss","tailwind-in-js"],"_resolved":"/home/runner/work/twind/twind/packages/core/dist/twind-core-1.0.0-next.13.tgz","_integrity":"sha512-I7s168nloLtWo0Of+1molruyKpBtmLYCCJAOvYFjizXnxvXTLkHgdU2q/dQRvAVwrA3PkXBlvYmTcpT2U0f5Ew==","repository":{"url":"git+https://github.com/tw-in-js/twind.git","type":"git","directory":"packages/core"},"_npmVersion":"8.1.2","description":"compiles tailwind like shorthand syntax into CSS","directories":{},"maintainers":[{"name":"sastan","email":"s.tandel@me.com"}],"sideEffects":false,"_nodeVersion":"16.13.2","contributors":[{"url":"lukejacksonn.github.io","name":"Luke Jackson"},{"url":"https://github.com/sastan","name":"Sascha Tandel"}],"dependencies":{"csstype":"^3.0.10","@swc/helpers":"^0.3.2"},"publishConfig":{"tag":"next","access":"public","directory":"dist"},"_hasShrinkwrap":false,"peerDependencies":{"typescript":"^4.4.0"},"peerDependenciesMeta":{"typescript":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/core_1.0.0-next.13_1642539835042_0.6668956701242426","host":"s3://npm-registry-packages"},"_id":"@twind/core@1.0.0-next.13","version":"1.0.0-next.13"}