{"name":"create-emotion","version":"10.0.0-really-unsafe-please-do-not-use.2","description":"The Next Generation of CSS-in-JS.","main":"dist/index.cjs.js","module":"dist/index.esm.js","types":"types/index.d.ts","scripts":{"test:typescript":"dtslint types"},"dependencies":{"@emotion/cache":"^10.0.0-really-unsafe-please-do-not-use.2","@emotion/css":"^10.0.0-really-unsafe-please-do-not-use.2","@emotion/hash":"^10.0.0-really-unsafe-please-do-not-use.2","@emotion/memoize":"^10.0.0-really-unsafe-please-do-not-use.2","@emotion/serialize":"^10.0.0-really-unsafe-please-do-not-use.2","@emotion/sheet":"^10.0.0-really-unsafe-please-do-not-use.2","@emotion/stylis":"^10.0.0-really-unsafe-please-do-not-use.2","@emotion/unitless":"^10.0.0-really-unsafe-please-do-not-use.2","@emotion/utils":"^10.0.0-really-unsafe-please-do-not-use.2","csstype":"^2.5.2","stylis":"^3.5.0","stylis-rule-sheet":"^0.0.10"},"devDependencies":{"@types/react":"16.0.16","babel-plugin-transform-define":"^1.3.0","dtslint":"^0.3.0"},"author":{"name":"Kye Hohenberger"},"homepage":"https://emotion.sh","license":"MIT","repository":{"type":"git","url":"https://github.com/emotion-js/emotion/tree/master/packages/create-emotion"},"keywords":["styles","emotion","react","css","css-in-js"],"bugs":{"url":"https://github.com/emotion-js/emotion/issues"},"umd:main":"./dist/emotion.umd.min.js","publishConfig":{"tag":"next"},"browser":{"./dist/index.cjs.js":"./dist/index.browser.cjs.js","./dist/index.esm.js":"./dist/index.browser.esm.js"},"gitHead":"0da0de50f6f2c19e46bca7662d1a954d48db1264","_resolved":"","_integrity":"","_from":"file:create-emotion-10.0.0-really-unsafe-please-do-not-use.2.tgz","readme":"# create-emotion\n\n### Create distinct instances of emotion.\n\nThe main [emotion](https://github.com/emotion-js/emotion/tree/master/packages/emotion) repo can be thought of as a call to `createEmotion` with sensible defaults for most applications.\n\n```javascript\nimport createEmotion from 'create-emotion'\n\nconst context = typeof global !== 'undefined' ? global : {}\n\nexport const {\n  flush,\n  hydrate,\n  cx,\n  merge,\n  getRegisteredStyles,\n  injectGlobal,\n  keyframes,\n  css,\n  sheet,\n  caches\n} = createEmotion(context)\n```\n\n### Upside\n\n* Calling it directly will allow for some low level customization.\n\n* Create custom names for emotion APIs to help with migration from other, similar libraries.\n\n* Could set custom `key` to `👩‍🎤`, `🥞`, `⚛️`, `👩‍🎨`\n\n### Downside\n\n* Introduces some amount of complexity to your application that can vary depending on developer experience.\n\n* Required to keep up with changes in the repo and API at a lower level than if using `emotion` directly\n\n### Primary use cases\n\n* Using emotion in embedded contexts such as an `<iframe/>`\n\n* Setting a [nonce]() on any `<style/>` tag emotion creates for security purposes\n\n* Use emotion with a developer defined `<style/>` tag\n\n* Using emotion with custom stylis plugins\n\n### Advanced use cases\n\n* Using emotion in component libraries to sync up multiple intances of emotion together\n\n```jsx\nimport createEmotion from 'create-emotion'\n\nconst context = typeof global !== 'undefined' ? global : {}\n\nexport const {\n  flush,\n  hydrate,\n  cx,\n  merge,\n  getRegisteredStyles,\n  injectGlobal,\n  keyframes,\n  css,\n  sheet,\n  caches\n} = createEmotion(context)\n```\n\n`create-emotion` accepts a `context` and a set of options.\n\n## Context\n\n`emotion` requires a global object for server-side rendering to ensure that even if a module is calling an emotion instance from two paths(e.g. the same emotion instance in multiple node_modules, this can happen often with linking [#349](https://github.com/emotion-js/emotion/issues/349)) they'll still both work with SSR. If you aren't using SSR, `context` can be an empty object. This isn't required in the browser because your bundler should deduplicate modules.\n\n## Multiple instances in a single app example\n\n```jsx\nimport createEmotion from 'create-emotion'\n\nconst context = typeof global !== 'undefined' ? global : {}\n\nif (context.__MY_EMOTION_INSTANCE__ === undefined) {\n  context.__MY_EMOTION_INSTANCE__ = {}\n}\n\nexport const {\n  flush,\n  hydrate,\n  cx,\n  merge,\n  getRegisteredStyles,\n  injectGlobal,\n  keyframes,\n  css,\n  sheet,\n  caches\n} = createEmotion(context.__MY_EMOTION_INSTANCE__, {\n  // The key option is required when there will be multiple instances in a single app\n  key: 'some-key'\n})\n```\n\n**Note**: calling `createEmotion` twice with the same `context` will use the same instance, so options provided in another call of `createEmotion` with the same context will be ignored.\n\n## Options\n\n### nonce: string\n\nA nonce that will be set on each style tag that emotion inserts for [Content Security Policies](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).\n\n### stylisPlugins: Function | Array<Function>\n\nA Stylis plugin or plugins that will be run by stylis during preprocessing. [Read Stylis' docs to find out more](https://github.com/thysultan/stylis.js#plugins). This can for be used for many purposes such as RTL.\n\n### prefix: boolean | Function\n\nAllows changing Stylis' prefixing settings, this defaults to `true`. It can be a boolean or a function to dynamicly set which properties are prefixed. [More information can be found in Stylis' docs](https://github.com/thysultan/stylis.js#vendor-prefixing)\n\n### key: string\n\nThe prefix before class names, this defaults to `css`. It will also be set as the value of the `data-emotion` attribute on the style tags that emotion inserts and it's used in the attribute name that marks style elements in `renderStylesToString` and `renderStylesToNodeStream`. This is **required if using multiple emotion instances in the same app**.\n\n### container: HTMLElement\n\nA DOM Node that emotion will insert all of it's style tags into, this is useful for inserting styles into iframes.\n","readmeFilename":"README.md","_id":"create-emotion@10.0.0-really-unsafe-please-do-not-use.2","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"mitchellhamilton","email":"mitchell@mitchellhamilton.me"},"dist":{"integrity":"sha512-volT1GEmjN6RQfA8iKYMv0w9OO+mAWdJG4rr515bEiU88TdCamOS06x+yHpEEVOI3Bh5Jjnu/cT14KpbMZo12A==","shasum":"0a22e696eaab3f9746a363ea49b3237b75d53915","tarball":"http://registry-npm.ywwl.com/create-emotion/download/create-emotion-10.0.0-really-unsafe-please-do-not-use.2.tgz","fileCount":17,"unpackedSize":116807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbrbAaCRA9TVsSAnZWagAAersQAILs1CL0PxZQi2f7ei9+\nABRsVq+iaYRDfoGo461W+LOxsT8pOaIUMAbEIbq26wXCj7/kZr9qvMWKiNPo\nC2A/dTVj5J8gKBBBjQylwji5YmXAa4+61ZZ8i66fVR+0QxeFPH6suEsUbhFC\n8HD8buizpQQWuzXYPc56d7vvn6lDohWA1nuPHGNknp3s9pF6J6ESnUjRW/sK\nmgQCVEMgy0i9sLtSGfU22CksB/GCRr5LuDt8blDJLi4c27H4L2Yji0G9VdYd\nrxtygzTQuTIzCbK6MpdcDaB6FTPNkPiw1Qv9NYBedUHde9hvqZHQEcnoBO+I\nLL3fgUmelG3hnzHUZ9fExUeu7lr4hquvFm3fjBR5fJqFy8F+VMa5LuK3NlIm\nwI/dvif11BjRLMjDbZd53cd5wZBW8D3yPHNpC3EccFR19uTWm7wgyp6DLddF\nezAUADOvIsdb5NENTzu7t5OZ6ZFA3PDeatqJ1/UXPamuTG3/Lvsw0RT/ms4B\nIQ4NiUTLE91zH5TA4XMCsEzBj5k8INAZ9F7BTKX5DmNJKABdG37arUVAFNxO\n3TclKQNkneSE7Z6zW1xRwEOENBUvEqL/Dx7bkGlzsUaKyNguqbM+pa7CUhEk\n/p6z/89WYtZq17cXyZXpoqZ4b4wqcCfz5JlifR1RB3u3fVfPZyqIqEsBlILC\nl5Ak\r\n=RktD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClkaumk8R/xghbKGJtMiZbHopaQy69LdIGYDqOukZWdgIhAIRwNq9TB8E3iv5TBXdEJV+MKIjUAecsGf1gIINS4mxa"}],"size":32843,"noattachment":false,"key":"/create-emotion/-/create-emotion-10.0.0-really-unsafe-please-do-not-use.2.tgz"},"maintainers":[{"email":"mitchell@mitchellhamilton.me","name":"mitchellhamilton"},{"email":"kye.hohenberger@gmail.com","name":"tkh44"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/create-emotion_10.0.0-really-unsafe-please-do-not-use.2_1538109464986_0.58597398761927"},"_hasShrinkwrap":false,"publish_time":1538109465168,"_cnpm_publish_time":1538109465168,"dist-tags":{"latest":"11.0.0","next":"11.0.0-next.10","rc":"11.0.0-rc.0"}}