{"_id":"aphrodisiac","_rev":"6-3e53ef1aceaf6f592223f78f743b5c10","name":"aphrodisiac","description":"Aphrodite-like API on top of JSS.","dist-tags":{"latest":"1.0.0"},"versions":{"0.1.0":{"name":"aphrodisiac","description":"Aphrodite like API on top of JSS.","version":"0.1.0","author":{"name":"Oleg Slobodskoi","email":"oleg008@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/cssinjs/aphrodisiac.git"},"keywords":["jss","cssinjs","css-in-js","aphrodite","react"],"license":"MIT","main":"./lib/index.js","engines":{"node":">=4.0.0 <7.0.0"},"devDependencies":{"babel-cli":"^6.5.1","babel-core":"^6.5.1","babel-eslint":"^6.1.2","babel-loader":"^6.2.2","babel-plugin-transform-inline-environment-variables":"^6.5.0","babel-preset-es2015":"^6.5.0","babel-preset-stage-0":"^6.5.0","es5-shim":"^4.3.1","eslint":"^3.0.1","eslint-config-airbnb":"^9.0.1","eslint-config-jss":"^1.1.0","eslint-plugin-import":"^1.5.0","eslint-plugin-jsx-a11y":"^1.0.2","eslint-plugin-react":"^5.0.1","json-loader":"^0.5.4","webpack":"^1.12.2"},"scripts":{"all":"npm run lint && npm run build","clean":"rm -fr ./lib/*","build":"npm run clean && npm run build:lib && npm run build:max && npm run build:min","build:lib":"VERSION=`npm run version -s` && VERSION=$VERSION babel src --out-dir lib","build:max":"NODE_ENV=development webpack src/index.js dist/aphrodisiac.js","build:min":"NODE_ENV=production webpack src/index.js dist/aphrodisiac.min.js","lint":"eslint ./src ./tests ./benchmark ./*.js","prepublish":"npm run all","version":"node -e \"console.log(require('./package.json').version)\""},"dependencies":{"jss":"^5.4.0","jss-preset-default":"^0.2.0"},"gitHead":"749ce2247d9f2093b8fa4d3d1dc4a8e9d0d17d84","bugs":{"url":"https://github.com/cssinjs/aphrodisiac/issues"},"homepage":"https://github.com/cssinjs/aphrodisiac#readme","_id":"aphrodisiac@0.1.0","_shasum":"2dbedb9ca944b2bb2b1f4dd898b8476c182d52da","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.1","_npmUser":{"name":"kof","email":"oleg008@gmail.com"},"dist":{"shasum":"2dbedb9ca944b2bb2b1f4dd898b8476c182d52da","tarball":"https://registry.npmjs.org/aphrodisiac/-/aphrodisiac-0.1.0.tgz","integrity":"sha512-1skkF509td0bgVajM9UXJiBhmk4iWgjUa9QZwvmN/atrkgOt6iUWZXzeMJxzzu6Weu8XA3RhX3KiKOiyCtBu3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHTxVx4ZZ5CSHIxNC/UrX3IKePNMxSarFjFo1BncvJlUAiEAlu97RWlplWWl4uCJ/HdOwVpJ4cE2o5vyF4keupzGkus="}]},"maintainers":[{"name":"kof","email":"oleg008@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/aphrodisiac-0.1.0.tgz_1473440941399_0.9025240307673812"}},"0.3.0":{"name":"aphrodisiac","description":"Aphrodite-like API on top of JSS.","version":"0.3.0","author":{"name":"Oleg Slobodskoi","email":"oleg008@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/cssinjs/aphrodisiac.git"},"keywords":["jss","cssinjs","css-in-js","aphrodite","react"],"license":"MIT","main":"./lib/index.js","engines":{"node":">=4.0.0 <7.0.0"},"devDependencies":{"babel-cli":"^6.5.1","babel-core":"^6.5.1","babel-eslint":"^6.1.2","babel-loader":"^6.2.2","babel-plugin-transform-inline-environment-variables":"^6.5.0","babel-preset-es2015":"^6.5.0","babel-preset-stage-0":"^6.5.0","es5-shim":"^4.3.1","eslint":"^3.0.1","eslint-config-airbnb":"^9.0.1","eslint-config-jss":"^1.1.0","eslint-plugin-import":"^1.5.0","eslint-plugin-jsx-a11y":"^1.0.2","eslint-plugin-react":"^5.0.1","json-loader":"^0.5.4","webpack":"^1.12.2"},"scripts":{"all":"npm run lint && npm run build","clean":"rm -fr ./lib/*","build":"npm run clean && npm run build:lib && npm run build:max && npm run build:min","build:lib":"VERSION=`npm run version -s` && VERSION=$VERSION babel src --out-dir lib","build:max":"NODE_ENV=development webpack src/index.js dist/aphrodisiac.js","build:min":"NODE_ENV=production webpack src/index.js dist/aphrodisiac.min.js","lint":"eslint ./src ./tests ./benchmark ./*.js","prepublish":"npm run all","version":"node -e \"console.log(require('./package.json').version)\""},"dependencies":{"jss":"^5.5.4","jss-preset-default":"^0.4.0"},"gitHead":"8bdfe2182e5b03e5e819f6170dd09dc51a091dfb","bugs":{"url":"https://github.com/cssinjs/aphrodisiac/issues"},"homepage":"https://github.com/cssinjs/aphrodisiac#readme","_id":"aphrodisiac@0.3.0","_shasum":"819e9ba9c4745137f6792b507013f1f5831e1cf5","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.1","_npmUser":{"name":"kof","email":"oleg008@gmail.com"},"dist":{"shasum":"819e9ba9c4745137f6792b507013f1f5831e1cf5","tarball":"https://registry.npmjs.org/aphrodisiac/-/aphrodisiac-0.3.0.tgz","integrity":"sha512-59sbaeODa4Isyj/tQ2u4/UxEGZdcMc0z30BBsJuiySLWEfQ4nrVUYKV7JPcdRsX5Tf89Fgs/tmcunnK8sZtwMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCSwqcW0B3kyDO0yALx7AJ+uvId5kyVagXXfT03xB7wcAIgcasPaZ2TMWWkyJ1T0kRcZHZDOvzrJZOOo+rpYmLTj80="}]},"maintainers":[{"name":"kof","email":"oleg008@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/aphrodisiac-0.3.0.tgz_1474321027858_0.8057829081080854"}},"0.4.0":{"name":"aphrodisiac","description":"Aphrodite-like API on top of JSS.","version":"0.4.0","author":{"name":"Oleg Slobodskoi","email":"oleg008@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/cssinjs/aphrodisiac.git"},"keywords":["jss","cssinjs","css-in-js","aphrodite","react"],"license":"MIT","main":"./lib/index.js","engines":{"node":">=4.0.0 <7.0.0"},"devDependencies":{"babel-cli":"^6.5.1","babel-core":"^6.5.1","babel-eslint":"^6.1.2","babel-loader":"^6.2.2","babel-plugin-transform-inline-environment-variables":"^6.5.0","babel-preset-es2015":"^6.5.0","babel-preset-stage-0":"^6.5.0","es5-shim":"^4.3.1","eslint":"^3.0.1","eslint-config-airbnb":"^9.0.1","eslint-config-jss":"^1.1.0","eslint-plugin-import":"^1.5.0","eslint-plugin-jsx-a11y":"^1.0.2","eslint-plugin-react":"^5.0.1","json-loader":"^0.5.4","webpack":"^1.12.2"},"scripts":{"all":"npm run lint && npm run build","clean":"rm -fr ./lib/*","build":"npm run clean && npm run build:lib && npm run build:max && npm run build:min","build:lib":"VERSION=`npm run version -s` && VERSION=$VERSION babel src --out-dir lib","build:max":"NODE_ENV=development webpack src/index.js dist/aphrodisiac.js","build:min":"NODE_ENV=production webpack src/index.js dist/aphrodisiac.min.js","lint":"eslint ./src ./tests ./benchmark ./*.js","prepublish":"npm run all","version":"node -e \"console.log(require('./package.json').version)\""},"dependencies":{"jss":"^5.5.4","jss-preset-default":"^0.4.0"},"gitHead":"f37a18f279a187374f2b03532ca1641d7796c314","bugs":{"url":"https://github.com/cssinjs/aphrodisiac/issues"},"homepage":"https://github.com/cssinjs/aphrodisiac#readme","_id":"aphrodisiac@0.4.0","_shasum":"4e4c825ca3c4d07291c0d8f9d95c853d86fcf5c8","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.1","_npmUser":{"name":"kof","email":"oleg008@gmail.com"},"dist":{"shasum":"4e4c825ca3c4d07291c0d8f9d95c853d86fcf5c8","tarball":"https://registry.npmjs.org/aphrodisiac/-/aphrodisiac-0.4.0.tgz","integrity":"sha512-3nA2rlUUgz4FLIonsFaBzVazlCCzdFSlHZphSeUVPnPvzYc/TBwnkayo112KvR4LDNRhsz5UiH+hZDnLVl6ruw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCn2WbxkLvEbE0vXyhlB++3/xQuOPKhC/xfhdJX4rmAugIhANNvhZN4iUQn4nVaHjcciIEPkq3BKT+tkWbwy1J1wDjq"}]},"maintainers":[{"name":"kof","email":"oleg008@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/aphrodisiac-0.4.0.tgz_1479410599370_0.8009059559553862"}},"1.0.0":{"name":"aphrodisiac","description":"Aphrodite-like API on top of JSS.","version":"1.0.0","scripts":{"all":"npm run lint && npm run build","clean":"rm -fr ./lib/*","build":"npm run clean && npm run build:lib && npm run build:max && npm run build:min","build:lib":"cross-env babel src --out-dir lib","build:max":"cross-env NODE_ENV=development webpack src/index.js dist/aphrodisiac.js","build:min":"cross-env NODE_ENV=production webpack src/index.js dist/aphrodisiac.min.js","lint":"eslint ./src ./tests ./benchmark ./*.js","lint:staged":"lint-staged","prepublish":"npm run all"},"author":{"name":"Oleg Slobodskoi","email":"oleg008@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/cssinjs/aphrodisiac.git"},"keywords":["jss","cssinjs","css-in-js","aphrodite","react"],"license":"MIT","main":"./lib/index.js","engines":{"node":">=4.0.0 <7.0.0"},"devDependencies":{"babel-cli":"^6.5.1","babel-core":"^6.5.1","babel-eslint":"^7.1.1","babel-loader":"^6.2.2","babel-plugin-inline-version":"^1.0.2","babel-plugin-transform-es3-member-expression-literals":"^6.8.0","babel-preset-es2015":"^6.5.0","babel-preset-stage-0":"^6.5.0","es5-shim":"^4.3.1","eslint":"^3.0.1","eslint-config-airbnb":"^9.0.1","eslint-config-jss":"^3.0.0","eslint-plugin-import":"^2.2.0","eslint-plugin-jsx-a11y":"^1.0.2","eslint-plugin-react":"^5.0.1","json-loader":"^0.5.4","lint-staged":"^3.2.2","pre-commit":"^1.2.0","webpack":"^1.12.2"},"dependencies":{"jss":"^6.0.1","jss-preset-default":"^1.1.0","murmurhash-js":"^1.0.0"},"lint-staged":{"./src ./tests ./benchmark ./*.js":["eslint","git add"]},"gitHead":"4305751eb58345dee980b343229b95c6154c5854","bugs":{"url":"https://github.com/cssinjs/aphrodisiac/issues"},"homepage":"https://github.com/cssinjs/aphrodisiac#readme","_id":"aphrodisiac@1.0.0","_shasum":"7d42b4cb89c12efc1596f8e2a9573339d43d7e5a","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.2","_npmUser":{"name":"kof","email":"oleg008@gmail.com"},"dist":{"shasum":"7d42b4cb89c12efc1596f8e2a9573339d43d7e5a","tarball":"https://registry.npmjs.org/aphrodisiac/-/aphrodisiac-1.0.0.tgz","integrity":"sha512-aovXQ7201xENUIuXM7Rurcp1kyviyqYHqkFmDBz2KpeJPYZgw2eI5janqqSFGFv9N4BuOZVhw9EgSCaS0DIxgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTYqDreg5fSGtXHC/f3L1AxYaeibeATWZiGV/UTHrYTQIhAPTMd+WOSOrfL8Cc20yY7wkIgayf76a2u2AbBqRM452W"}]},"maintainers":[{"name":"kof","email":"oleg008@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/aphrodisiac-1.0.0.tgz_1481379108837_0.7357448665425181"}}},"readme":"## Aphrodite-like API on top of JSS.\n\nThis project is a merge of good ideas from [aphrodite](https://github.com/Khan/aphrodite) and [JSS](https://github.com/cssinjs/jss). It provides an API of aphrodite but fixes lots of limitations and caveats by using JSS as a rendering engine under the hood.\n\n## Good parts from aphrodite.\n\n- Pretty much like inline styles known from React, except it allows to use the entire CSS.\n- No CSS is generated until `css()` function invocation. Only the passed rules are converted to a CSS string and injected.\n- Theming is possible without any headache or framework integrations.\n\n## Benefits compared to aphrodite.\n\n- More powerfull rendering abstraction through [JSS](https://github.com/cssinjs/jss) under the hood. You are using all it's plugins and [JSON DSL](https://github.com/cssinjs/jss/blob/master/docs/json-api.md). To name a few:\n  - Children, siblings and any other kinds of selectors. ([jss-nested](https://github.com/cssinjs/jss-nested))\n  - Global styles, without auto namespacing ([jss-global](https://github.com/cssinjs/jss-global)).\n- Immediate render upon `css()` call invocation. It gives you an access to computed styles right after render, no need to use `setTimeout()`. It also avoids additional recalcs and repaints, which can cause flickers and general performance overhead.\n- No auto \"!important\" insertion. You can write a plugin for this though.\n\n\n## Example\n\n```javascript\nimport {StyleSheet, css} from 'aphrodisiac'\n\nconst sheet = StyleSheet.create({\n  button: {\n    border: '1px solid',\n    borderRadius: 5,\n    fontSize: 'inherit',\n    lineHeight: '2.3em',\n    padding: '0 1em',\n    boxShadow: 'inset 0 1px 0 rgba(255, 255, 255, 0.1)',\n    textShadow: '0 -1px 0 rgba(0, 0, 0, 0.25)',\n    backgroundRepeat: 'repeat-x',\n    color: '#fff',\n    fontWeight: 400,\n    '& span': {\n      marginRight: 5,\n      color: '#fff'\n    }\n  },\n  primary: {\n    borderColor: '#1177cd #0f6ab6 #0d5c9e',\n    backgroundImage: 'linear-gradient(to bottom, #2591ed 0%, #1177cd 100%)',\n    backgroundColor: '#1385e5',\n    '&:hover': {\n      backgroundImage: 'linear-gradient(to bottom, #3c9def 0%, #1385e5 100%)'\n    }\n  }\n})\n\ndocument.body.innerHTML = `\n  <button class=\"${css(sheet.button, sheet.primary)}\">\n    <span>&#10004;</span>Primary\n  </button>\n`\n```\n\n## API\n\n### Create style sheet.\n\n`StyleSheet.create(styles)`\n\nCreate function doesn't render anything, it just registers your styles.\n\nReturns an object, where key names correspond the original styles obejct.\n\n### Inject rules.\n\n`css(rule1, [rule2], [rule3], ...)`\n\nInjects a previously defined rule to the dom. This is done in sync, so the CSS rule is immediately available.\n\nReturns a class name.\n\n### Styles format.\n\nThe format for styles is defined in [jss](https://github.com/cssinjs/jss/blob/master/docs/json-api.md). Aprodisiac uses [jss-preset-default](https://github.com/cssinjs/jss-preset-default), so all default presets are already in place.\n\n### Customizing JSS.\n\n`aphrodisiac(jss, [options])`\n\nYou can pass your own JSS instance with your custom setup.\n\nReturns aphrodite's interface.\n\n```javascript\nimport aphrodisiac from 'aphrodisiac'\nimport {create} from 'jss'\n\nconst {css, StyleSheet} = aphrodisiac(create())\n```\n\n### Serverside Rendering.\n\nThere are 2 functions you need to know - `toString()` and `reset()`.\nAs aphrodisiac can not know that you are rendering a new response, you need to get the CSS (`toString()`) when you are processing the first request and call `reset()` to clean up the styles your current page has produced.\n\n\n```javascript\nimport {toString, reset} from 'aphrodisiac'\n\nfunction render() {\n  const app = renderApp()\n  const css = toString()\n  reset()\n\n  return `\n    <head>\n      <style>\n        ${css}\n      </style>\n    <head>\n    <body>\n      ${app}\n    </body>\n  `\n}\n```\n\n## License\n\nMIT\n","maintainers":[{"name":"kof","email":"oleg008@gmail.com"}],"time":{"modified":"2022-06-13T03:11:31.792Z","created":"2016-09-09T17:09:03.004Z","0.1.0":"2016-09-09T17:09:03.004Z","0.3.0":"2016-09-19T21:37:10.329Z","0.4.0":"2016-11-17T19:23:19.882Z","1.0.0":"2016-12-10T14:11:49.430Z"},"homepage":"https://github.com/cssinjs/aphrodisiac#readme","keywords":["jss","cssinjs","css-in-js","aphrodite","react"],"repository":{"type":"git","url":"git+ssh://git@github.com/cssinjs/aphrodisiac.git"},"author":{"name":"Oleg Slobodskoi","email":"oleg008@gmail.com"},"bugs":{"url":"https://github.com/cssinjs/aphrodisiac/issues"},"license":"MIT","readmeFilename":"readme.md"}