Socket
Socket
Sign inDemoInstall

jss

Package Overview
Dependencies
Maintainers
1
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jss - npm Package Compare versions

Comparing version 9.8.3 to 9.8.5

477

changelog.md

@@ -0,606 +1,615 @@

## 9.8.5 / 2018-06-19
* Fix version un the dist version (#730)
## 9.8.4 / 2018-06-12
* Add link to the egghead course
* Upgrade prettier and format code (#726)
## 9.8.3 / 2018-06-10
* Fix CSSOM local typings (flow stopped looking into node_modules if types are not imported directly since v0.57.0)
- Fix CSSOM local typings (flow stopped looking into node_modules if types are not imported directly since v0.57.0)
## 9.8.2 / 2018-06-01
* Fixed typings for RuleList.update method.
* Migrated from webpack to rollup.
* Upgraded to flow 0.72
- Fixed typings for RuleList.update method.
- Migrated from webpack to rollup.
- Upgraded to flow 0.72
## 9.8.1 / 2018-03-19
* Upgrade to flow 0.68.0
- Upgrade to flow 0.68.0
## 9.8.0 / 2018-02-08
* Remove hyphenation from the core, moved it to jss-camel-case. Now any function values and `rule.prop()` will get hyphenation automatically.
- Remove hyphenation from the core, moved it to jss-camel-case. Now any function values and `rule.prop()` will get hyphenation automatically.
## 9.7.0 / 2018-01-06
* Allow function values return falsy values in order to remove a property.
- Allow function values return falsy values in order to remove a property.
## 9.6.0 / 2018-01-28
* Added prettier
* Added a new, correct way of handling CSP
- Added prettier
- Added a new, correct way of handling CSP
## 9.5.1 / 2018-01-08
* Added postinstall script with donation log.
- Added postinstall script with donation log.
## 9.5.0 / 2018-01-02
* Export `toCssValue` utility function for css-vendor package.
- Export `toCssValue` utility function for css-vendor package.
## 9.4.0 / 2017-12-16
* Added array values support when used with function values. It now also supports priority option "!important" (#629)
* Use classNamePrefix option in production mode (#638)
* Added onUpdate to docs and types, now officially supported
* Fixed class names collisions with multiple jss instances (#644)
- Added array values support when used with function values. It now also supports priority option "!important" (#629)
- Use classNamePrefix option in production mode (#638)
- Added onUpdate to docs and types, now officially supported
- Fixed class names collisions with multiple jss instances (#644)
## 9.3.3 / 2017-11-15
* Added CSS.escape fallback, so that polyfill is not required.
- Added CSS.escape fallback, so that polyfill is not required.
## 9.3.2 / 2017-11-14
* Don't put escaped class names into classes hash
- Don't put escaped class names into classes hash
## 9.3.1 / 2017-11-13
* Never use window object directly
- Never use window object directly
## 9.3.0 / 2017-11-13
* Add CSS class name escaping for dev mode also we support emoji now! (#624)
* Added CSP over webpack (#559)
- Add CSS class name escaping for dev mode also we support emoji now! (#624)
- Added CSP over webpack (#559)
## 9.2.0 / 2017-11-06
* Allow empty rules when option {link: true} is used.
* Simplify internal logic for function values.
* Introduce function rules - similar to function values, now function can return the entire style object.
- Allow empty rules when option {link: true} is used.
- Simplify internal logic for function values.
- Introduce function rules - similar to function values, now function can return the entire style object.
## 9.1.0 / 2017-10-31
* Added Observable rules. Now not only values can be an observable, but also the entire style object.
- Added Observable rules. Now not only values can be an observable, but also the entire style object.
## 9.0.0 / 2017-09-30
* Added `SheetsManager.size` getter to get amount of items in `SheetsManager`.
* Refactored `StyleRule.selector` for better performance. Breaking change - it doesn't reregister rule in the classes map any more. It was used mainly in jss-isolate (#419).
* Method `jss.setup()` can now be called multiple times and will merge properly the options. Also it will avoid applying same plugins more than once by comparing the reference (#576).
* Fixed linker, which didn't work if selectors were escaped (#557).
* In production `createGenerateClassName()` option will now produce short selectors and warn about memory leaks. (#546)
* Update flow to v0.54.1.
* Support observable values (#442).
* Warn when dynamic properties update but link: true option is not set (#581)
- Added `SheetsManager.size` getter to get amount of items in `SheetsManager`.
- Refactored `StyleRule.selector` for better performance. Breaking change - it doesn't reregister rule in the classes map any more. It was used mainly in jss-isolate (#419).
- Method `jss.setup()` can now be called multiple times and will merge properly the options. Also it will avoid applying same plugins more than once by comparing the reference (#576).
- Fixed linker, which didn't work if selectors were escaped (#557).
- In production `createGenerateClassName()` option will now produce short selectors and warn about memory leaks. (#546)
- Update flow to v0.54.1.
- Support observable values (#442).
- Warn when dynamic properties update but link: true option is not set (#581)
## 8.1.0 / 2017-07-12
* Added webpackbin examples
* Added size-limit tool
* Added SheetsManager
- Added webpackbin examples
- Added size-limit tool
- Added SheetsManager
## 8.0.0 / 2017-06-20
* Option `insertionPoint` can now accept a DOM node
* DOM node provided in `insertionPoint` can be inside of an iframe.
* Warn when an `insertionPoint` was specified but not found in the DOM.
- Option `insertionPoint` can now accept a DOM node
- DOM node provided in `insertionPoint` can be inside of an iframe.
- Warn when an `insertionPoint` was specified but not found in the DOM.
### Breaking changes for users
* Option `generateClassName` which was used in Jss constructor and `Jss.setup` has been removed. A new option is called `createGenerateClassName` which is a factory that returns the old `generateClassName`. We need this to reset counters on SSR for each request.
* Removed default `insertionPoint` value ("jss") in order to have warnings when insertionPoint is not found in the DOM. With the default one we simply don't know when to warn.
- Option `generateClassName` which was used in Jss constructor and `Jss.setup` has been removed. A new option is called `createGenerateClassName` which is a factory that returns the old `generateClassName`. We need this to reset counters on SSR for each request.
- Removed default `insertionPoint` value ("jss") in order to have warnings when insertionPoint is not found in the DOM. With the default one we simply don't know when to warn.
### Potentially breaking changes for plugins
* KeyframeRule has been renamed to KeyframesRule.
* KeyframeRule.type === 'keyframe' => KeyFrames.type === 'keyframes'.
* RegularRule has been renamed to StyleRule
* RegularRule.type === 'regular' => StyleRule.type === 'style'.
* RegularRule.name => RegularRule.key
* ConditionalRule.selector => ConditionalRule.key
* FontFaceRule.selector => FontFaceRule.key
* SimpleRule.name => SimpleRule.key
* ViewportRule.name => ViewportRule.key
* RulesContainer => RuleList
- KeyframeRule has been renamed to KeyframesRule.
- KeyframeRule.type === 'keyframe' => KeyFrames.type === 'keyframes'.
- RegularRule has been renamed to StyleRule
- RegularRule.type === 'regular' => StyleRule.type === 'style'.
- RegularRule.name => RegularRule.key
- ConditionalRule.selector => ConditionalRule.key
- FontFaceRule.selector => FontFaceRule.key
- SimpleRule.name => SimpleRule.key
- ViewportRule.name => ViewportRule.key
- RulesContainer => RuleList
## 7.1.7 / 2017-06-15
* Fix CSS flow types
- Fix CSS flow types
## 7.1.6 / 2017-06-14
* Fix dynamic values for conditional and keyframe rules
- Fix dynamic values for conditional and keyframe rules
## 7.1.5 / 2017-05-28
* Prevent duplicates in the sheets registry (#504)
* Optimize `sheets.add` for a big registry
- Prevent duplicates in the sheets registry (#504)
- Optimize `sheets.add` for a big registry
## 7.1.4 / 2017-05-27
* Fixed undefined rule support (#489)
- Fixed undefined rule support (#489)
## 7.1.3 / 2017-05-26
* Fixes flow error when updating to the latest version (#507)
* Fixes createStyleSheet type definitions error (#495)
* Fixes function values for for nested rules (#500)
- Fixes flow error when updating to the latest version (#507)
- Fixes createStyleSheet type definitions error (#495)
- Fixes function values for for nested rules (#500)
## 7.1.2 / 2017-05-12
* Fixes function values within keyframes (#471)
- Fixes function values within keyframes (#471)
## 7.1.1 / 2017-04-26
* Fixes rendering rules with function values only (#475)
- Fixes rendering rules with function values only (#475)
## 7.1.0 / 2017-04-21
* Support updating specific rule in `sheet.update(name, data)`
- Support updating specific rule in `sheet.update(name, data)`
## 7.0.3 / 2017-04-14
* Fix a bug when dynamically inserted rules disapeared after reattaching the sheet (#438)
- Fix a bug when dynamically inserted rules disapeared after reattaching the sheet (#438)
## 7.0.2 / 2017-04-14
* Remove temporarily jss-isolate from the tests
- Remove temporarily jss-isolate from the tests
## 7.0.1 / 2017-04-14
* Fix `getDynamicStyles` when nested object is in the same styles object (#467)
- Fix `getDynamicStyles` when nested object is in the same styles object (#467)
## 7.0.0 / 2017-04-10
* Perf improvement through removing of JSON.parse(JSON.stringify(style))
* New hook `onProcessStyle`
* New hook `onChangeValue`
- Perf improvement through removing of JSON.parse(JSON.stringify(style))
- New hook `onProcessStyle`
- New hook `onChangeValue`
### Bugfixes
* Run plugins over property names with function values (#441)
* Function values inside of nested rules (#445)
- Run plugins over property names with function values (#441)
- Function values inside of nested rules (#445)
### Breaking changes
* New signature of `generateClassName(rule, sheet)` option.
* Property `rule.originalStyle` is now available through `rule.options.parent.rules.raw[rule.name]`. It is longer but its a better place and is used in plugins only.
* Plugin signature for the hook `onProcessRule` shortcut `jss.use((rule) => {})` is not supported any more. Instead this hook is supported using its full name: `jss.use({onProcessRule: () => {}})`
- New signature of `generateClassName(rule, sheet)` option.
- Property `rule.originalStyle` is now available through `rule.options.parent.rules.raw[rule.name]`. It is longer but its a better place and is used in plugins only.
- Plugin signature for the hook `onProcessRule` shortcut `jss.use((rule) => {})` is not supported any more. Instead this hook is supported using its full name: `jss.use({onProcessRule: () => {}})`
## 6.5.0 / 2017-03-14
* Dynamic Sheets for theming and animations. #356
- Dynamic Sheets for theming and animations. #356
## 6.4.0 / 2017-03-10
* Reintroduced counter based class generation algorithm. #432
- Reintroduced counter based class generation algorithm. #432
## 6.3.0 / 2017-02-16
* Introduced new option `insertionPoint`.
* Reduced amount of files in the package, dropped .npmignore file.
* Removed babel-runtime from the build.
* Added a new hook `onProcessSheet`.
* Started a list of companies/products using JSS, see docs/users.md
- Introduced new option `insertionPoint`.
- Reduced amount of files in the package, dropped .npmignore file.
- Removed babel-runtime from the build.
- Added a new hook `onProcessSheet`.
- Started a list of companies/products using JSS, see docs/users.md
## 6.2.0 / 2017-01-15
* Added @viewport and @-ms-viewport support (used in bootstrap).
- Added @viewport and @-ms-viewport support (used in bootstrap).
## 6.1.1 / 2017-01-04
* Allow sheet.link() call when VirtualRenderer is used.
- Allow sheet.link() call when VirtualRenderer is used.
## 6.1.0 / 2016-12-26
* Add jss-cache to the tests suit.
* Don't run processors on a rule which has been processed already.
* Add test for onCreateRule arguments.
* Add sheet as a second argument to the onProcessRule hook.
- Add jss-cache to the tests suit.
- Don't run processors on a rule which has been processed already.
- Add test for onCreateRule arguments.
- Add sheet as a second argument to the onProcessRule hook.
## 6.0.2 / 2016-12-23
* Call `onCreateRule` for every rule type.
* RulesContainer is now exported for the plugins.
* Using babel-runtime for the lib build now.
* Using webpack 2 now.
* Preparation for the bugfix - nesting within @global (#380)
* Preparation for the bugfix - nested @media inside of a rule inside of @global (#387).
- Call `onCreateRule` for every rule type.
- RulesContainer is now exported for the plugins.
- Using babel-runtime for the lib build now.
- Using webpack 2 now.
- Preparation for the bugfix - nesting within @global (#380)
- Preparation for the bugfix - nested @media inside of a rule inside of @global (#387).
## 6.0.1 / 2016-12-10
* Don't insert empty rules #363.
- Don't insert empty rules #363.
## 6.0.0 / 2016-12-09
* Added flow types.
* Added a new plugins API. It is backwards compatible. See plugins section.
* Perf improvements.
- Added flow types.
- Added a new plugins API. It is backwards compatible. See plugins section.
- Perf improvements.
### Breaking changes
* Option "named" has been removed from JSS core and replaced by a jss-global plugin. From now on global styles are only possible using that plugin.
* Sheets are not added to the sheets registry automatically server-side any more. In order to prevent leaking styles between requests, you now need to create your own SheetsRegistry instance and add sheets to it manually. Make sure to create a new instance for each request. On the client, sheets are still automatically added to the registry.
- Option "named" has been removed from JSS core and replaced by a jss-global plugin. From now on global styles are only possible using that plugin.
- Sheets are not added to the sheets registry automatically server-side any more. In order to prevent leaking styles between requests, you now need to create your own SheetsRegistry instance and add sheets to it manually. Make sure to create a new instance for each request. On the client, sheets are still automatically added to the registry.
## 5.5.6 / 2016-11-03
* test suite
* new is-in-browser detection #305
* warning when using an unknown at-rule
* start using flow #296
- test suite
- new is-in-browser detection #305
- warning when using an unknown at-rule
- start using flow #296
## 5.5.5 / 2016-09-23
* remove rewire from build
* update roadmap
- remove rewire from build
- update roadmap
## 5.5.4 / 2016-09-19
* always use `cssRules.insertRule` when using addRule on attached sheet, mixing them results in weird overwrite of a rule added by insertRule by a media query rendered using text node.
* catch errors from `cssRules.insertRule` and use a warning in development
- always use `cssRules.insertRule` when using addRule on attached sheet, mixing them results in weird overwrite of a rule added by insertRule by a media query rendered using text node.
- catch errors from `cssRules.insertRule` and use a warning in development
## 5.5.3 / 2016-09-19
* add edge browser for browserstack
* fix addRule insertion order from plugins when sheet is attached
* fix @media insertion in IE
- add edge browser for browserstack
- fix addRule insertion order from plugins when sheet is attached
- fix @media insertion in IE
## 5.5.2 / 2016-09-9
* Skip empty values #307
- Skip empty values #307
## 5.5.1 / 2016-09-6
* Fix adding rules during the plugins loop
- Fix adding rules during the plugins loop
## 5.5.0 / 2016-09-6
* Fix wrong order of nested rules #285
* Add `index` option to `sheet.addRule` which allows to specify the order or added rules
* Add `<style>` node position control option `index` and insertion point comment
* Better browser detection by using `is-browser` package
- Fix wrong order of nested rules #285
- Add `index` option to `sheet.addRule` which allows to specify the order or added rules
- Add `<style>` node position control option `index` and insertion point comment
- Better browser detection by using `is-browser` package
## 5.4.0 / 2016-08-15
* More docs
* More benchmarks
* Make sheet.addRule accept options
- More docs
- More benchmarks
- Make sheet.addRule accept options
## 5.3.0 / 2016-08-06
* Added `jss.setup` method which accepts options like the contructor and can be used for presets
* Docs
* Create Rodamap
* Cleanup DomRenderer from IE8 code.
* Fix benchmark, use a new jss instance, because there is sheets registry
- Added `jss.setup` method which accepts options like the contructor and can be used for presets
- Docs
- Create Rodamap
- Cleanup DomRenderer from IE8 code.
- Fix benchmark, use a new jss instance, because there is sheets registry
## 5.2.0 / 2016-07-27
* Added `sheet.deleteRule` #266
- Added `sheet.deleteRule` #266
## 5.1.0 / 2016-07-13
* alternative syntax for space and comma separated values #264
- alternative syntax for space and comma separated values #264
## 5.0.0 / 2016-07-10
* new fallbacks api #256
* rule.applyTo doesn't support fallbacks any more
* support conditionals overwrite upfront #259, #180
* remove compatibility fix for babel 5, now you need to use `var jss = require('jss').default` in ES5
- new fallbacks api #256
- rule.applyTo doesn't support fallbacks any more
- support conditionals overwrite upfront #259, #180
- remove compatibility fix for babel 5, now you need to use `var jss = require('jss').default` in ES5
## 4.0.3 / 2016-07-05
* fixed bug when plugins called twice on createStyleSheet #258
* enable node 7 #248
- fixed bug when plugins called twice on createStyleSheet #258
- enable node 7 #248
## 4.0.2 / 2016-06-28
* allow adding rules to a detached sheet #253
- allow adding rules to a detached sheet #253
## 4.0.1 / 2016-06-23
* fix jss.version in lib
- fix jss.version in lib
## 4.0.0 / 2016-06-23
* user defined classname generation function
* deterministic class names generation
* run plugins separately when creating rules in a batch
- user defined classname generation function
- deterministic class names generation
- run plugins separately when creating rules in a batch
## 3.11.1 / 2016-05-11
* register children of a conditional in sheet.classes #81
- register children of a conditional in sheet.classes #81
## 3.11.0 / 2016-05-06
* added option element to .createStyleSheet #231
- added option element to .createStyleSheet #231
## 3.10.0 / 2016-05-02
* fix multiple @imports
* added benchmarks
* rewrote all tests with mocha
- fix multiple @imports
- added benchmarks
- rewrote all tests with mocha
## 3.9.1 / 2016-04-26
* fix multiple @media in one sheet
- fix multiple @media in one sheet
## 3.9.0 / 2016-04-24
* update linter eslint-config-jss@1.0.0
- update linter eslint-config-jss@1.0.0
## 3.8.0 / 2016-04-24
* added jss.version to the build (Daijiro Wachi)
- added jss.version to the build (Daijiro Wachi)
## 3.7.0 / 2016-04-21
* docs
* font-face rule can now handle array of font-faces (Ken Carpenter)
- docs
- font-face rule can now handle array of font-faces (Ken Carpenter)
## 3.6.3 / 2016-03-12
* fix rule registration in style sheet, previous commits resulted in a selector instead of class nem within sheet.classes map.
- fix rule registration in style sheet, previous commits resulted in a selector instead of class nem within sheet.classes map.
## 3.6.2 / 2016-04-12
* register rule when changed worked by setting selector
- register rule when changed worked by setting selector
## 3.6.1 / 2016-03-11
* Update StyleSheet#rules when modifying selector
- Update StyleSheet#rules when modifying selector
## 3.6.0 / 2016-04-08
* implement selector setter, now Rule#selector can be set, due to the fact not every browser implements selectorText setter, the entire sheet will be rerendered in such browsers. Should be used with caution.
- implement selector setter, now Rule#selector can be set, due to the fact not every browser implements selectorText setter, the entire sheet will be rerendered in such browsers. Should be used with caution.
## 3.5.0 / 2016-04-04
* fixed breaking change, which made exports of 3.4.0 incompatible with 3.3.0
* fix font-face rule type
- fixed breaking change, which made exports of 3.4.0 incompatible with 3.3.0
- fix font-face rule type
## 3.4.0 / 2016-04-03
* added style sheets registry accesible via jss.sheets
* updated babel to version 6
- added style sheets registry accesible via jss.sheets
- updated babel to version 6
## 3.3.0 / 2016-01-31
* fixed bug: nested rule inside of a @media conditional
* new docs
* trim empty rules (@wldcordeiro)
* support node 5 (@nikgraf)
- fixed bug: nested rule inside of a @media conditional
- new docs
- trim empty rules (@wldcordeiro)
- support node 5 (@nikgraf)
## 3.2.0 / 2015-11-27
* jss-debug is deprecated, rule name is inside of generated class name now
* no more "type" option for style sheet, its always set to text/css
* no more "title" option for style sheet, its not a part of the spec http://www.w3.org/TR/html-markup/style.html
* added meta option, now you can for e.g. set the name of your component and find it on style element.
* fixed bug when multiple conditionals used in one sheet
- jss-debug is deprecated, rule name is inside of generated class name now
- no more "type" option for style sheet, its always set to text/css
- no more "title" option for style sheet, its not a part of the spec http://www.w3.org/TR/html-markup/style.html
- added meta option, now you can for e.g. set the name of your component and find it on style element.
- fixed bug when multiple conditionals used in one sheet
## 3.1.1 / 2015-11-14
* added Rule#originalStyle property to access original style object from a plugin
- added Rule#originalStyle property to access original style object from a plugin
## 3.1.0 / 2015-11-12
* new testing infrastructure with browserstack and codeship
- new testing infrastructure with browserstack and codeship
## 3.0.0 / 2015-10-19
* internal rewrite for cleaner code (ConditionalRule, KeyframeRule, SimpleRule)
* moved all DOM related methods to dom.js module
* now child rules exist only in ConditionalRule, simplified Rule and StyleSheet logic
* fixed Named rules not generating when using @media only #81
* added support for @charset, @import, @namespace, @supports
* removed jss.Rule from public access, use jss.createRule() instead
* removed jss.Jss from public access, use jss.create() instead
* removed jss.StyleSheet from public access, use jss.createStyleSheet() instead
- internal rewrite for cleaner code (ConditionalRule, KeyframeRule, SimpleRule)
- moved all DOM related methods to dom.js module
- now child rules exist only in ConditionalRule, simplified Rule and StyleSheet logic
- fixed Named rules not generating when using @media only #81
- added support for @charset, @import, @namespace, @supports
- removed jss.Rule from public access, use jss.createRule() instead
- removed jss.Jss from public access, use jss.create() instead
- removed jss.StyleSheet from public access, use jss.createStyleSheet() instead
## 2.3.4 / 2015-09-21
* remove bower.json
* remove dist from repository
* add dist to npm package
* add cdnjs support
- remove bower.json
- remove dist from repository
- add dist to npm package
- add cdnjs support
## 2.3.3 / 2015-09-20
* remove xpkg, update npmignore and ingore list for bower
- remove xpkg, update npmignore and ingore list for bower
## 2.3.2 / 2015-09-19
* reference rule name on the rule instance to fix jss-debug
- reference rule name on the rule instance to fix jss-debug
## 2.3.1 / 2015-09-15
* use eslint-config-jss
- use eslint-config-jss
## 2.3.0 / 2015-09-10
* migrate to es6
* move examples to jss-examples repository
- migrate to es6
- move examples to jss-examples repository
## 2.2.1 / 2015-09-6
* remove @media from classes hash
- remove @media from classes hash
## 2.2.0 / 2015-09-6
* added support for named at-rules e.g. @media
- added support for named at-rules e.g. @media
## 2.1.6 / 2015-09-2
* removed invalid characters
- removed invalid characters
## 2.1.5 / 2015-08-20
* stop mutating original rules passed by user. expecting style to be a plaing object.
- stop mutating original rules passed by user. expecting style to be a plaing object.
## 2.1.4 / 2015-07-31
* add internal method uid.reset() for testing
- add internal method uid.reset() for testing
## 2.1.3 / 2015-07-31
* rename global reference to globalReference
- rename global reference to globalReference
## 2.1.2 / 2015-07-28
* avoid conflicts of jss ids when multiple jss versions are used on the same page
- avoid conflicts of jss ids when multiple jss versions are used on the same page
## 2.1.1 / 2015-07-20
* remove browser field from package.json, it makes webpack use dist version instead of src.
- remove browser field from package.json, it makes webpack use dist version instead of src.
## 2.1.0 / 2015-07-18
* create Jss constructor so that we can have multiple jss instances with different plugins, needed when you want to reuse jss lib from different standalone components which have own jss configuration and should not clash.
- create Jss constructor so that we can have multiple jss instances with different plugins, needed when you want to reuse jss lib from different standalone components which have own jss configuration and should not clash.
## 2.0.0 / 2015-06-17
* create jss-cli package, remove bin script from jss
- create jss-cli package, remove bin script from jss
## 1.0.8 / 2015-03-16
* fix bower package name
* make change condition to include any non-null value in Rule#prop (Stephen Saunders)
- fix bower package name
- make change condition to include any non-null value in Rule#prop (Stephen Saunders)
## 1.0.7 / 2015-02-26
* remove NO-BREAK SPACE chars
- remove NO-BREAK SPACE chars
## 1.0.6 / 2015-02-24
* add rule.toJSON()
- add rule.toJSON()
## 1.0.5 / 2015-02-17
* support any node version above 0.8
- support any node version above 0.8
## 1.0.4 / 2015-02-6
* allow rule options to be passed in internal rule#addRule method to allow nested rules to have different options than parent one (for now just "named")
- allow rule options to be passed in internal rule#addRule method to allow nested rules to have different options than parent one (for now just "named")
## 1.0.3 / 2015-01-31
* pass rule name to make debug plugin possible
- pass rule name to make debug plugin possible
## 1.0.2 / 2015-01-31
* fix duplicated rule rendering
- fix duplicated rule rendering
## 1.0.1 / 2015-01-31
* run plugins on inner rules of at-rules
- run plugins on inner rules of at-rules
## 1.0.0 / 2015-01-31
* styles have named: true option by default, this is backwards incompatible
* at-rules like @media can now also have named rules
- styles have named: true option by default, this is backwards incompatible
- at-rules like @media can now also have named rules
## 0.10.2 / 2015-01-31
* fixed #40 there is no colons in all at-rules with nested declarations
- fixed #40 there is no colons in all at-rules with nested declarations
## 0.10.1 / 2014-12-21
* fixed firefox issues
- fixed firefox issues
## 0.10.0 / 2014-12-21
* added rule.prop() for dynamic rule properties #15
- added rule.prop() for dynamic rule properties #15
## 0.9.0 / 2014-12-21
* added Rule#prop() for setting and getting rule props dynamically
* added `link` option in order to make .prop() work but still without to add perf overhead by default.
* added example for .prop()
- added Rule#prop() for setting and getting rule props dynamically
- added `link` option in order to make .prop() work but still without to add perf overhead by default.
- added example for .prop()
## 0.8.2 / 2014-12-17
* added build for "support non browser env #12"
* added calendar example
- added build for "support non browser env #12"
- added calendar example
## 0.8.1 / 2014-11-29
* supported non browser env #12
- supported non browser env #12
## 0.8.0 / 2014-11-29
* renamed Stylesheet to StyleSheet because its wrong.
- renamed Stylesheet to StyleSheet because its wrong.
## 0.7.0 / 2014-11-29
* moved jss to separate github organization
* moved all plugins to separate repositories (don't force people use plugins they don't need)
- moved jss to separate github organization
- moved all plugins to separate repositories (don't force people use plugins they don't need)
## 0.6.0 / 2014-11-28
* renamed processors to plugins
* added public .use function for registering plugins
- renamed processors to plugins
- added public .use function for registering plugins
## 0.5.0 / 2014-11-27
* supported multiple declarations with identical property names #22
- supported multiple declarations with identical property names #22
## 0.4.0 / 2014-11-23
* supported nested rules when using .addRule method #20
- supported nested rules when using .addRule method #20
## 0.3.2 / 2014-11-19
* rewrittn prefixer for feature testing using camel cased version because of firefox
- rewrittn prefixer for feature testing using camel cased version because of firefox
## 0.3.0 / 2014-11-19
* added vendor prefixes plugin for properties #21
- added vendor prefixes plugin for properties #21
## 0.2.10 / 2014-11-10
* supported nested extend
* added more complex topcoat example
- supported nested extend
- added more complex topcoat example
## 0.2.9 / 2014-11-03
* added @keyframes and @media support #16
- added @keyframes and @media support #16
## 0.2.8 / 2014-11-02
* added possibility write multi nested selector in one line #18
- added possibility write multi nested selector in one line #18
## 0.2.7 / 2014-11-02
* added @font-face to cli converter
* added @keyframes to cli converter
- added @font-face to cli converter
- added @keyframes to cli converter
## 0.2.6 / 2014-11-02
* createed perf comparence for bootstrap #13
- createed perf comparence for bootstrap #13
## 0.2.5 / 2014-11-02
* createed css->jss converter #11
- createed css->jss converter #11
## 0.2.4 / 2014-11-01
* made tests runnable from githubs gh-pages http://jsstyles.github.io/jss/test/
- made tests runnable from githubs gh-pages http://jsstyles.github.io/jss/test/
## 0.2.3 / 2014-11-01
* fixed test failing in firefox #14
- fixed test failing in firefox #14
## 0.2.2 / 2014-11-01
* Renamed param "generateClasses" to "named" in createStyleSheet
* If `named` is true, ss.rules[name] is accessible using the name.
* ss.addRules will render new rules after style element has been rendered too.
* document ss.addRules
- Renamed param "generateClasses" to "named" in createStyleSheet
- If `named` is true, ss.rules[name] is accessible using the name.
- ss.addRules will render new rules after style element has been rendered too.
- document ss.addRules

@@ -607,0 +616,0 @@ ## 0.2.1 / 2014-10-29

@@ -2035,3 +2035,3 @@ (function (global, factory) {

this.id = instanceCounter++;
this.version = __VERSION__;
this.version = "9.8.5";
this.plugins = new PluginsRegistry();

@@ -2038,0 +2038,0 @@ this.options = {

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.jss={})}(this,function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n="object"===("undefined"==typeof window?"undefined":t(window))&&"object"===("undefined"==typeof document?"undefined":t(document))&&9===document.nodeType;function r(e,t){e.renderable=t,e.rules&&t.cssRules&&e.rules.link(t.cssRules)}var s=function(){};var i=s,o=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function u(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=o(e[r]," ");else n=o(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function a(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="";if(!t)return r;var s=n.indent,i=void 0===s?0:s,o=t.fallbacks;if(i++,o)if(Array.isArray(o))for(var l=0;l<o.length;l++){var h=o[l];for(var f in h){var c=h[f];null!=c&&(r+="\n"+a(f+": "+u(c)+";",i))}}else for(var d in o){var y=o[d];null!=y&&(r+="\n"+a(d+": "+u(y)+";",i))}for(var v in t){var p=t[v];null!=p&&"fallbacks"!==v&&(r+="\n"+a(v+": "+u(p)+";",i))}return r||n.allowEmpty?r=a(e+" {"+r+"\n",--i)+a("}",i):r}var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(){function e(t,n,r){f(this,e),this.type="style",this.isProcessed=!1;var s=r.sheet,i=r.Renderer,o=r.selector;this.key=t,this.options=r,this.style=n,o&&(this.selectorText=o),this.renderer=s?s.renderer:new i}return c(e,[{key:"prop",value:function(e,t){if(void 0===t)return this.style[e];if(this.style[e]===t)return this;var n=null==(t=this.options.jss.plugins.onChangeValue(t,e,this))||!1===t,r=e in this.style;if(n&&!r)return this;var s=n&&r;if(s?delete this.style[e]:this.style[e]=t,this.renderable)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,t),this;var o=this.options.sheet;return o&&o.attached&&i(!1,'Rule is not linked. Missing sheet option "link: true".'),this}},{key:"applyTo",value:function(e){var t=this.toJSON();for(var n in t)this.renderer.setProperty(e,n,t[n]);return this}},{key:"toJSON",value:function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==(void 0===n?"undefined":h(n))?e[t]=n:Array.isArray(n)&&(e[t]=u(n))}return e}},{key:"toString",value:function(e){var t=this.options.sheet,n=!!t&&t.options.link?d({},e,{allowEmpty:!0}):e;return l(this.selector,this.style,n)}},{key:"selector",set:function(e){if(e!==this.selectorText&&(this.selectorText=e,this.renderable&&!this.renderer.setSelector(this.renderable,e)&&this.renderable)){var t=this.renderer.replaceRule(this.renderable,this);t&&(this.renderable=t)}},get:function(){return this.selectorText}}]),e}(),v="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g(e,t){return e(t={exports:{}},t.exports),t.exports}var k=g(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.Symbol;"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable";return t}});p(k);var m=g(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n,r,s=(n=k)&&n.__esModule?n:{default:n};r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==v?v:e;var i=(0,s.default)(r);t.default=i});p(m);var b=m,S=function(e){return e&&e[b]&&e===e[b]()},R=Array.isArray;function x(e){if(null==e)return e;var t=void 0===e?"undefined":h(e);if("string"===t||"number"===t||"function"===t)return e;if(R(e))return e.map(x);if(S(e))return e;var n={};for(var r in e){var s=e[r];"object"!==(void 0===s?"undefined":h(s))?n[r]=s:n[r]=x(s)}return n}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"unnamed",t=arguments[1],n=arguments[2],r=n.jss,s=x(t),o=r.plugins.onCreateRule(e,s,n);return o||("@"===e[0]&&i(!1,"[JSS] Unknown at-rule %s",e),new y(e,s,n))}global.CSS;var w=function(e){return e},C=function(){function e(t){var n=this;f(this,e),this.map={},this.raw={},this.index=[],this.update=function(e,t){var r=n.options,s=r.jss.plugins,i=r.sheet;if("string"==typeof e)s.onUpdate(t,n.get(e),i);else for(var o=0;o<n.index.length;o++)s.onUpdate(e,n.index[o],i)},this.options=t,this.classes=t.classes}return c(e,[{key:"add",value:function(e,t,n){var r=this.options,s=r.parent,i=r.sheet,o=r.jss,u=r.Renderer,a=r.generateClassName;!(n=d({classes:this.classes,parent:s,sheet:i,jss:o,Renderer:u,generateClassName:a},n)).selector&&this.classes[e]&&(n.selector="."+w(this.classes[e])),this.raw[e]=t;var l=P(e,t,n),h=void 0;!n.selector&&l instanceof y&&(h=a(l,i),l.selector="."+w(h)),this.register(l,h);var f=void 0===n.index?this.index.length:n.index;return this.index.splice(f,0,l),l}},{key:"get",value:function(e){return this.map[e]}},{key:"remove",value:function(e){this.unregister(e),this.index.splice(this.indexOf(e),1)}},{key:"indexOf",value:function(e){return this.index.indexOf(e)}},{key:"process",value:function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)}},{key:"register",value:function(e,t){this.map[e.key]=e,e instanceof y&&(this.map[e.selector]=e,t&&(this.classes[e.key]=t))}},{key:"unregister",value:function(e){delete this.map[e.key],e instanceof y&&(delete this.map[e.selector],delete this.classes[e.key])}},{key:"link",value:function(e){for(var t=this.options.sheet.renderer.getUnescapedKeysMap(this.index),n=0;n<e.length;n++){var s=e[n],i=this.options.sheet.renderer.getKey(s);t[i]&&(i=t[i]);var o=this.map[i];o&&r(o,s)}}},{key:"toString",value:function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,s=0;s<this.index.length;s++){var i=this.index[s].toString(e);(i||r)&&(t&&(t+="\n"),t+=i)}return t}}]),e}(),O=function(){function e(t,n){var r=this;for(var s in f(this,e),this.update=function(e,t){return"string"==typeof e?r.rules.update(e,t):r.rules.update(e),r},this.attached=!1,this.deployed=!1,this.linked=!1,this.classes={},this.options=d({},n,{sheet:this,parent:this,classes:this.classes}),this.renderer=new n.Renderer(this),this.rules=new C(this.options),t)this.rules.add(s,t[s]);this.rules.process()}return c(e,[{key:"attach",value:function(){return this.attached?this:(this.deployed||this.deploy(),this.renderer.attach(),!this.linked&&this.options.link&&this.link(),this.attached=!0,this)}},{key:"detach",value:function(){return this.attached?(this.renderer.detach(),this.attached=!1,this):this}},{key:"addRule",value:function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var s=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(s),this.attached?this.deployed?(r?r.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),s):s:(this.deployed=!1,s)}},{key:"insertRule",value:function(e){var t=this.renderer.insertRule(e);t&&this.options.link&&r(e,t)}},{key:"addRules",value:function(e,t){var n=[];for(var r in e)n.push(this.addRule(r,e[r],t));return n}},{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"deleteRule",value:function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!this.attached||!t.renderable||this.renderer.deleteRule(t.renderable))}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"deploy",value:function(){return this.renderer.deploy(),this.deployed=!0,this}},{key:"link",value:function(){var e=this.renderer.getRules();return e&&this.rules.link(e),this.linked=!0,this}},{key:"toString",value:function(e){return this.rules.toString(e)}}]),e}(),j=function(){function e(){f(this,e),this.hooks={onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}}return c(e,[{key:"onCreateRule",value:function(e,t,n){for(var r=0;r<this.hooks.onCreateRule.length;r++){var s=this.hooks.onCreateRule[r](e,t,n);if(s)return s}return null}},{key:"onProcessRule",value:function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.hooks.onProcessRule.length;n++)this.hooks.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}}},{key:"onProcessStyle",value:function(e,t,n){for(var r=e,s=0;s<this.hooks.onProcessStyle.length;s++)r=this.hooks.onProcessStyle[s](r,t,n),t.style=r}},{key:"onProcessSheet",value:function(e){for(var t=0;t<this.hooks.onProcessSheet.length;t++)this.hooks.onProcessSheet[t](e)}},{key:"onUpdate",value:function(e,t,n){for(var r=0;r<this.hooks.onUpdate.length;r++)this.hooks.onUpdate[r](e,t,n)}},{key:"onChangeValue",value:function(e,t,n){for(var r=e,s=0;s<this.hooks.onChangeValue.length;s++)r=this.hooks.onChangeValue[s](r,t,n);return r}},{key:"use",value:function(e){for(var t in e)this.hooks[t]?this.hooks[t].push(e[t]):i(!1,'[JSS] Unknown hook "%s".',t)}}]),e}(),N=function(){function e(t,n,r){f(this,e),this.type="simple",this.isProcessed=!1,this.key=t,this.value=n,this.options=r}return c(e,[{key:"toString",value:function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"}}]),e}(),A=function(){function e(t,n,r){for(var s in f(this,e),this.type="keyframes",this.isProcessed=!1,this.key=t,this.options=r,this.rules=new C(d({},r,{parent:this})),n)this.rules.add(s,n[s],d({},this.options,{parent:this,selector:s}));this.rules.process()}return c(e,[{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t&&(t+="\n"),this.key+" {\n"+t+"}"}}]),e}(),T=function(){function e(t,n,r){for(var s in f(this,e),this.type="conditional",this.isProcessed=!1,this.key=t,this.options=r,this.rules=new C(d({},r,{parent:this})),n)this.rules.add(s,n[s]);this.rules.process()}return c(e,[{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"addRule",value:function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""}}]),e}(),_=function(){function e(t,n,r){f(this,e),this.type="font-face",this.isProcessed=!1,this.key=t,this.style=n,this.options=r}return c(e,[{key:"toString",value:function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=l(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return l(this.key,this.style,e)}}]),e}(),E=function(){function e(t,n,r){f(this,e),this.type="viewport",this.isProcessed=!1,this.key=t,this.style=n,this.options=r}return c(e,[{key:"toString",value:function(e){return l(this.key,this.style,e)}}]),e}(),M={"@charset":N,"@import":N,"@namespace":N,"@keyframes":A,"@media":T,"@supports":T,"@font-face":_,"@viewport":E,"@-ms-viewport":E},V=Object.keys(M).map(function(e){var t=new RegExp("^"+e),n=M[e];return{onCreateRule:function(e,r,s){return t.test(e)?new n(e,r,s):null}}}),U={onCreateRule:function(e,t,n){if(!S(t))return null;var r=t,s=P(e,{},n);return r.subscribe(function(e){for(var t in e)s.prop(t,e[t])}),s},onProcessRule:function(e){if(e instanceof y){var t=e,n=t.style,r=function(e){var r=n[e];if(!S(r))return"continue";delete n[e],r.subscribe({next:function(n){t.prop(e,n)}})};for(var s in n)r(s)}}},J=Date.now(),I="fnValues"+J,q="fnStyle"+ ++J,G={onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=P(e,{},n);return r[q]=t,r},onProcessStyle:function(e,t){var n={};for(var r in e){var s=e[r];"function"==typeof s&&(delete e[r],n[r]=s)}return(t=t)[I]=n,e},onUpdate:function(e,t){if(t.rules instanceof C)t.rules.update(e);else if(t instanceof y){if((t=t)[I])for(var n in t[I])t.prop(n,t[I][n](e));var r=(t=t)[q];if(r){var s=r(e);for(var i in s)t.prop(i,s[i])}}}},K=function(){function e(){f(this,e),this.registry=[]}return c(e,[{key:"add",value:function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)}},{key:"reset",value:function(){this.registry=[]}},{key:"remove",value:function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)}},{key:"toString",value:function(e){return this.registry.filter(function(e){return e.attached}).map(function(t){return t.toString(e)}).join("\n")}},{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),B=new K,D="2f1acc6c3a606b082e5eef5e54414ffb";null==global[D]&&(global[D]=0);var z=global[D]++,L=function(){var e=0;return function(t,n){(e+=1)>1e10&&i(!1,"[JSS] You might have a memory leak. Rule counter is at %s.",e);var r="c",s="";return n&&(r=n.options.classNamePrefix||"c",null!=n.options.jss.id&&(s+=n.options.jss.id)),""+r+z+s+e}},Y=function(e){var t=void 0;return function(){return t||(t=e()),t}};function F(e,t){try{return e.style.getPropertyValue(t)}catch(e){return""}}function H(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=u(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.style.setProperty(t,r)}catch(e){return!1}return!0}function Q(e,t){try{e.style.removeProperty(t)}catch(e){i(!1,'[JSS] DOMException "%s" was thrown. Tried to remove property "%s".',e.message,t)}}var W,X=1,Z=7,$=(W=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.substr(t,e.indexOf("{")-1)},function(e){if(e.type===X)return e.selectorText;if(e.type===Z){var t=e.name;if(t)return"@keyframes "+t;var n=e.cssText;return"@"+W(n,n.indexOf("keyframes"))}return W(e.cssText)});function ee(e,t){return e.selectorText=t,e.selectorText===t}var te,ne,re=Y(function(){return document.head||document.getElementsByTagName("head")[0]}),se=(te=void 0,ne=!1,function(e){var t={};te||(te=document.createElement("style"));for(var n=0;n<e.length;n++){var r=e[n];if(r instanceof y){var s=r.selector;if(s&&-1!==s.indexOf("\\")){ne||(re().appendChild(te),ne=!0),te.textContent=s+" {}";var i=te.sheet;if(i){var o=i.cssRules;o&&(t[o[0].selectorText]=r.key)}}}}return ne&&(re().removeChild(te),ne=!1),t});function ie(e){var t=B.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n)return n.renderer.element;if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))return n.renderer.element.nextElementSibling}var r=e.insertionPoint;if(r&&"string"==typeof r){var s=function(e){for(var t=re(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(s)return s.nextSibling;i("jss"===r,'[JSS] Insertion point "%s" not found.',r)}return null}var oe=Y(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),ue=function(){function e(t){f(this,e),this.getPropertyValue=F,this.setProperty=H,this.removeProperty=Q,this.setSelector=ee,this.getKey=$,this.getUnescapedKeysMap=se,this.hasInsertedRules=!1,t&&B.add(t),this.sheet=t;var n=this.sheet?this.sheet.options:{},r=n.media,s=n.meta,i=n.element;this.element=i||document.createElement("style"),this.element.type="text/css",this.element.setAttribute("data-jss",""),r&&this.element.setAttribute("media",r),s&&this.element.setAttribute("data-meta",s);var o=oe();o&&this.element.setAttribute("nonce",o)}return c(e,[{key:"attach",value:function(){!this.element.parentNode&&this.sheet&&(this.hasInsertedRules&&(this.deploy(),this.hasInsertedRules=!1),function(e,t){var n=t.insertionPoint,r=ie(t);if(r){var s=r.parentNode;s&&s.insertBefore(e,r)}else if(n&&"number"==typeof n.nodeType){var o=n,u=o.parentNode;u?u.insertBefore(e,o.nextSibling):i(!1,"[JSS] Insertion point is not in the DOM.")}else re().insertBefore(e,r)}(this.element,this.sheet.options))}},{key:"detach",value:function(){this.element.parentNode.removeChild(this.element)}},{key:"deploy",value:function(){this.sheet&&(this.element.textContent="\n"+this.sheet.toString()+"\n")}},{key:"insertRule",value:function(e,t){var n=this.element.sheet,r=n.cssRules,s=e.toString();if(t||(t=r.length),!s)return!1;try{n.insertRule(s,t)}catch(t){return i(!1,"[JSS] Can not insert an unsupported rule \n\r%s",e),!1}return this.hasInsertedRules=!0,r[t]}},{key:"deleteRule",value:function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)}},{key:"indexOf",value:function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1}},{key:"replaceRule",value:function(e,t){var n=this.indexOf(e),r=this.insertRule(t,n);return this.element.sheet.deleteRule(n),r}},{key:"getRules",value:function(){return this.element.sheet.cssRules}}]),e}(),ae=function(){function e(){f(this,e)}return c(e,[{key:"setProperty",value:function(){return!0}},{key:"getPropertyValue",value:function(){return""}},{key:"removeProperty",value:function(){}},{key:"setSelector",value:function(){return!0}},{key:"getKey",value:function(){return""}},{key:"attach",value:function(){}},{key:"detach",value:function(){}},{key:"deploy",value:function(){}},{key:"insertRule",value:function(){return!1}},{key:"deleteRule",value:function(){return!0}},{key:"replaceRule",value:function(){return!1}},{key:"getRules",value:function(){}},{key:"indexOf",value:function(){return-1}}]),e}(),le=V.concat([U,G]),he=0,fe=function(){function e(t){f(this,e),this.id=he++,this.version=__VERSION__,this.plugins=new j,this.options={createGenerateClassName:L,Renderer:n?ue:ae,plugins:[]},this.generateClassName=L(),this.use.apply(this,le),this.setup(t)}return c(e,[{key:"setup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.createGenerateClassName&&(this.options.createGenerateClassName=e.createGenerateClassName,this.generateClassName=e.createGenerateClassName()),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),(e.virtual||e.Renderer)&&(this.options.Renderer=e.Renderer||(e.virtual?ae:ue)),e.plugins&&this.use.apply(this,e.plugins),this}},{key:"createStyleSheet",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.index;"number"!=typeof n&&(n=0===B.index?0:B.index+1);var r=new O(e,d({},t,{jss:this,generateClassName:t.generateClassName||this.generateClassName,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r}},{key:"removeStyleSheet",value:function(e){return e.detach(),B.remove(e),this}},{key:"createRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"===(void 0===e?"undefined":h(e))&&(n=t,t=e,e=void 0);var r=n;r.jss=this,r.Renderer=this.options.Renderer,r.generateClassName||(r.generateClassName=this.generateClassName),r.classes||(r.classes={});var s=P(e,t,r);return!r.selector&&s instanceof y&&(s.selector="."+r.generateClassName(s)),this.plugins.onProcessRule(s),s}},{key:"use",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){-1===e.options.plugins.indexOf(t)&&(e.options.plugins.push(t),e.plugins.use(t))}),this}}]),e}();var ce=function(){function e(){f(this,e),this.sheets=[],this.refs=[],this.keys=[]}return c(e,[{key:"get",value:function(e){var t=this.keys.indexOf(e);return this.sheets[t]}},{key:"add",value:function(e,t){var n=this.sheets,r=this.refs,s=this.keys,i=n.indexOf(t);return-1!==i?i:(n.push(t),r.push(0),s.push(e),n.length-1)}},{key:"manage",value:function(e){var t=this.keys.indexOf(e),n=this.sheets[t];return 0===this.refs[t]&&n.attach(),this.refs[t]++,this.keys[t]||this.keys.splice(t,0,e),n}},{key:"unmanage",value:function(e){var t=this.keys.indexOf(e);-1!==t?this.refs[t]>0&&(this.refs[t]--,0===this.refs[t]&&this.sheets[t].detach()):i(!1,"SheetsManager: can't find sheet to unmanage")}},{key:"size",get:function(){return this.keys.length}}]),e}(),de=function(e){return new fe(e)},ye=de();e.create=de,e.default=ye,e.getDynamicStyles=function e(t){var n=null;for(var r in t){var s=t[r],i=void 0===s?"undefined":h(s);if("function"===i)n||(n={}),n[r]=s;else if("object"===i&&null!==s&&!Array.isArray(s)){var o=e(s);o&&(n||(n={}),n[r]=o)}}return n},e.toCssValue=u,e.SheetsRegistry=K,e.SheetsManager=ce,e.RuleList=C,e.sheets=B,e.createGenerateClassName=L,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.jss={})}(this,function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n="object"===("undefined"==typeof window?"undefined":t(window))&&"object"===("undefined"==typeof document?"undefined":t(document))&&9===document.nodeType;function r(e,t){e.renderable=t,e.rules&&t.cssRules&&e.rules.link(t.cssRules)}var s=function(){};var i=s,o=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function u(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=o(e[r]," ");else n=o(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function a(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="";if(!t)return r;var s=n.indent,i=void 0===s?0:s,o=t.fallbacks;if(i++,o)if(Array.isArray(o))for(var l=0;l<o.length;l++){var h=o[l];for(var f in h){var c=h[f];null!=c&&(r+="\n"+a(f+": "+u(c)+";",i))}}else for(var d in o){var y=o[d];null!=y&&(r+="\n"+a(d+": "+u(y)+";",i))}for(var v in t){var p=t[v];null!=p&&"fallbacks"!==v&&(r+="\n"+a(v+": "+u(p)+";",i))}return r||n.allowEmpty?r=a(e+" {"+r+"\n",--i)+a("}",i):r}var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(){function e(t,n,r){f(this,e),this.type="style",this.isProcessed=!1;var s=r.sheet,i=r.Renderer,o=r.selector;this.key=t,this.options=r,this.style=n,o&&(this.selectorText=o),this.renderer=s?s.renderer:new i}return c(e,[{key:"prop",value:function(e,t){if(void 0===t)return this.style[e];if(this.style[e]===t)return this;var n=null==(t=this.options.jss.plugins.onChangeValue(t,e,this))||!1===t,r=e in this.style;if(n&&!r)return this;var s=n&&r;if(s?delete this.style[e]:this.style[e]=t,this.renderable)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,t),this;var o=this.options.sheet;return o&&o.attached&&i(!1,'Rule is not linked. Missing sheet option "link: true".'),this}},{key:"applyTo",value:function(e){var t=this.toJSON();for(var n in t)this.renderer.setProperty(e,n,t[n]);return this}},{key:"toJSON",value:function(){var e={};for(var t in this.style){var n=this.style[t];"object"!==(void 0===n?"undefined":h(n))?e[t]=n:Array.isArray(n)&&(e[t]=u(n))}return e}},{key:"toString",value:function(e){var t=this.options.sheet,n=!!t&&t.options.link?d({},e,{allowEmpty:!0}):e;return l(this.selector,this.style,n)}},{key:"selector",set:function(e){if(e!==this.selectorText&&(this.selectorText=e,this.renderable&&!this.renderer.setSelector(this.renderable,e)&&this.renderable)){var t=this.renderer.replaceRule(this.renderable,this);t&&(this.renderable=t)}},get:function(){return this.selectorText}}]),e}(),v="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function g(e,t){return e(t={exports:{}},t.exports),t.exports}var k=g(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.Symbol;"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable";return t}});p(k);var m=g(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n,r,s=(n=k)&&n.__esModule?n:{default:n};r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==v?v:e;var i=(0,s.default)(r);t.default=i});p(m);var b=m,S=function(e){return e&&e[b]&&e===e[b]()},x=Array.isArray;function R(e){if(null==e)return e;var t=void 0===e?"undefined":h(e);if("string"===t||"number"===t||"function"===t)return e;if(x(e))return e.map(R);if(S(e))return e;var n={};for(var r in e){var s=e[r];"object"!==(void 0===s?"undefined":h(s))?n[r]=s:n[r]=R(s)}return n}function P(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"unnamed",t=arguments[1],n=arguments[2],r=n.jss,s=R(t),o=r.plugins.onCreateRule(e,s,n);return o||("@"===e[0]&&i(!1,"[JSS] Unknown at-rule %s",e),new y(e,s,n))}global.CSS;var w=function(e){return e},C=function(){function e(t){var n=this;f(this,e),this.map={},this.raw={},this.index=[],this.update=function(e,t){var r=n.options,s=r.jss.plugins,i=r.sheet;if("string"==typeof e)s.onUpdate(t,n.get(e),i);else for(var o=0;o<n.index.length;o++)s.onUpdate(e,n.index[o],i)},this.options=t,this.classes=t.classes}return c(e,[{key:"add",value:function(e,t,n){var r=this.options,s=r.parent,i=r.sheet,o=r.jss,u=r.Renderer,a=r.generateClassName;!(n=d({classes:this.classes,parent:s,sheet:i,jss:o,Renderer:u,generateClassName:a},n)).selector&&this.classes[e]&&(n.selector="."+w(this.classes[e])),this.raw[e]=t;var l=P(e,t,n),h=void 0;!n.selector&&l instanceof y&&(h=a(l,i),l.selector="."+w(h)),this.register(l,h);var f=void 0===n.index?this.index.length:n.index;return this.index.splice(f,0,l),l}},{key:"get",value:function(e){return this.map[e]}},{key:"remove",value:function(e){this.unregister(e),this.index.splice(this.indexOf(e),1)}},{key:"indexOf",value:function(e){return this.index.indexOf(e)}},{key:"process",value:function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)}},{key:"register",value:function(e,t){this.map[e.key]=e,e instanceof y&&(this.map[e.selector]=e,t&&(this.classes[e.key]=t))}},{key:"unregister",value:function(e){delete this.map[e.key],e instanceof y&&(delete this.map[e.selector],delete this.classes[e.key])}},{key:"link",value:function(e){for(var t=this.options.sheet.renderer.getUnescapedKeysMap(this.index),n=0;n<e.length;n++){var s=e[n],i=this.options.sheet.renderer.getKey(s);t[i]&&(i=t[i]);var o=this.map[i];o&&r(o,s)}}},{key:"toString",value:function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,s=0;s<this.index.length;s++){var i=this.index[s].toString(e);(i||r)&&(t&&(t+="\n"),t+=i)}return t}}]),e}(),O=function(){function e(t,n){var r=this;for(var s in f(this,e),this.update=function(e,t){return"string"==typeof e?r.rules.update(e,t):r.rules.update(e),r},this.attached=!1,this.deployed=!1,this.linked=!1,this.classes={},this.options=d({},n,{sheet:this,parent:this,classes:this.classes}),this.renderer=new n.Renderer(this),this.rules=new C(this.options),t)this.rules.add(s,t[s]);this.rules.process()}return c(e,[{key:"attach",value:function(){return this.attached?this:(this.deployed||this.deploy(),this.renderer.attach(),!this.linked&&this.options.link&&this.link(),this.attached=!0,this)}},{key:"detach",value:function(){return this.attached?(this.renderer.detach(),this.attached=!1,this):this}},{key:"addRule",value:function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var s=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(s),this.attached?this.deployed?(r?r.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),s):s:(this.deployed=!1,s)}},{key:"insertRule",value:function(e){var t=this.renderer.insertRule(e);t&&this.options.link&&r(e,t)}},{key:"addRules",value:function(e,t){var n=[];for(var r in e)n.push(this.addRule(r,e[r],t));return n}},{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"deleteRule",value:function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!this.attached||!t.renderable||this.renderer.deleteRule(t.renderable))}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"deploy",value:function(){return this.renderer.deploy(),this.deployed=!0,this}},{key:"link",value:function(){var e=this.renderer.getRules();return e&&this.rules.link(e),this.linked=!0,this}},{key:"toString",value:function(e){return this.rules.toString(e)}}]),e}(),j=function(){function e(){f(this,e),this.hooks={onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}}return c(e,[{key:"onCreateRule",value:function(e,t,n){for(var r=0;r<this.hooks.onCreateRule.length;r++){var s=this.hooks.onCreateRule[r](e,t,n);if(s)return s}return null}},{key:"onProcessRule",value:function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.hooks.onProcessRule.length;n++)this.hooks.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}}},{key:"onProcessStyle",value:function(e,t,n){for(var r=e,s=0;s<this.hooks.onProcessStyle.length;s++)r=this.hooks.onProcessStyle[s](r,t,n),t.style=r}},{key:"onProcessSheet",value:function(e){for(var t=0;t<this.hooks.onProcessSheet.length;t++)this.hooks.onProcessSheet[t](e)}},{key:"onUpdate",value:function(e,t,n){for(var r=0;r<this.hooks.onUpdate.length;r++)this.hooks.onUpdate[r](e,t,n)}},{key:"onChangeValue",value:function(e,t,n){for(var r=e,s=0;s<this.hooks.onChangeValue.length;s++)r=this.hooks.onChangeValue[s](r,t,n);return r}},{key:"use",value:function(e){for(var t in e)this.hooks[t]?this.hooks[t].push(e[t]):i(!1,'[JSS] Unknown hook "%s".',t)}}]),e}(),N=function(){function e(t,n,r){f(this,e),this.type="simple",this.isProcessed=!1,this.key=t,this.value=n,this.options=r}return c(e,[{key:"toString",value:function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"}}]),e}(),A=function(){function e(t,n,r){for(var s in f(this,e),this.type="keyframes",this.isProcessed=!1,this.key=t,this.options=r,this.rules=new C(d({},r,{parent:this})),n)this.rules.add(s,n[s],d({},this.options,{parent:this,selector:s}));this.rules.process()}return c(e,[{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t&&(t+="\n"),this.key+" {\n"+t+"}"}}]),e}(),T=function(){function e(t,n,r){for(var s in f(this,e),this.type="conditional",this.isProcessed=!1,this.key=t,this.options=r,this.rules=new C(d({},r,{parent:this})),n)this.rules.add(s,n[s]);this.rules.process()}return c(e,[{key:"getRule",value:function(e){return this.rules.get(e)}},{key:"indexOf",value:function(e){return this.rules.indexOf(e)}},{key:"addRule",value:function(e,t,n){var r=this.rules.add(e,t,n);return this.options.jss.plugins.onProcessRule(r),r}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{indent:1},t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""}}]),e}(),E=function(){function e(t,n,r){f(this,e),this.type="font-face",this.isProcessed=!1,this.key=t,this.style=n,this.options=r}return c(e,[{key:"toString",value:function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=l(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return l(this.key,this.style,e)}}]),e}(),M=function(){function e(t,n,r){f(this,e),this.type="viewport",this.isProcessed=!1,this.key=t,this.style=n,this.options=r}return c(e,[{key:"toString",value:function(e){return l(this.key,this.style,e)}}]),e}(),U={"@charset":N,"@import":N,"@namespace":N,"@keyframes":A,"@media":T,"@supports":T,"@font-face":E,"@viewport":M,"@-ms-viewport":M},V=Object.keys(U).map(function(e){var t=new RegExp("^"+e),n=U[e];return{onCreateRule:function(e,r,s){return t.test(e)?new n(e,r,s):null}}}),_={onCreateRule:function(e,t,n){if(!S(t))return null;var r=t,s=P(e,{},n);return r.subscribe(function(e){for(var t in e)s.prop(t,e[t])}),s},onProcessRule:function(e){if(e instanceof y){var t=e,n=t.style,r=function(e){var r=n[e];if(!S(r))return"continue";delete n[e],r.subscribe({next:function(n){t.prop(e,n)}})};for(var s in n)r(s)}}},J=Date.now(),q="fnValues"+J,G="fnStyle"+ ++J,I={onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=P(e,{},n);return r[G]=t,r},onProcessStyle:function(e,t){var n={};for(var r in e){var s=e[r];"function"==typeof s&&(delete e[r],n[r]=s)}return(t=t)[q]=n,e},onUpdate:function(e,t){if(t.rules instanceof C)t.rules.update(e);else if(t instanceof y){if((t=t)[q])for(var n in t[q])t.prop(n,t[q][n](e));var r=(t=t)[G];if(r){var s=r(e);for(var i in s)t.prop(i,s[i])}}}},K=function(){function e(){f(this,e),this.registry=[]}return c(e,[{key:"add",value:function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)}},{key:"reset",value:function(){this.registry=[]}},{key:"remove",value:function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)}},{key:"toString",value:function(e){return this.registry.filter(function(e){return e.attached}).map(function(t){return t.toString(e)}).join("\n")}},{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),B=new K,D="2f1acc6c3a606b082e5eef5e54414ffb";null==global[D]&&(global[D]=0);var z=global[D]++,L=function(){var e=0;return function(t,n){(e+=1)>1e10&&i(!1,"[JSS] You might have a memory leak. Rule counter is at %s.",e);var r="c",s="";return n&&(r=n.options.classNamePrefix||"c",null!=n.options.jss.id&&(s+=n.options.jss.id)),""+r+z+s+e}},Y=function(e){var t=void 0;return function(){return t||(t=e()),t}};function F(e,t){try{return e.style.getPropertyValue(t)}catch(e){return""}}function H(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=u(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.style.setProperty(t,r)}catch(e){return!1}return!0}function Q(e,t){try{e.style.removeProperty(t)}catch(e){i(!1,'[JSS] DOMException "%s" was thrown. Tried to remove property "%s".',e.message,t)}}var W,X=1,Z=7,$=(W=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.substr(t,e.indexOf("{")-1)},function(e){if(e.type===X)return e.selectorText;if(e.type===Z){var t=e.name;if(t)return"@keyframes "+t;var n=e.cssText;return"@"+W(n,n.indexOf("keyframes"))}return W(e.cssText)});function ee(e,t){return e.selectorText=t,e.selectorText===t}var te,ne,re=Y(function(){return document.head||document.getElementsByTagName("head")[0]}),se=(te=void 0,ne=!1,function(e){var t={};te||(te=document.createElement("style"));for(var n=0;n<e.length;n++){var r=e[n];if(r instanceof y){var s=r.selector;if(s&&-1!==s.indexOf("\\")){ne||(re().appendChild(te),ne=!0),te.textContent=s+" {}";var i=te.sheet;if(i){var o=i.cssRules;o&&(t[o[0].selectorText]=r.key)}}}}return ne&&(re().removeChild(te),ne=!1),t});function ie(e){var t=B.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n)return n.renderer.element;if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))return n.renderer.element.nextElementSibling}var r=e.insertionPoint;if(r&&"string"==typeof r){var s=function(e){for(var t=re(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(s)return s.nextSibling;i("jss"===r,'[JSS] Insertion point "%s" not found.',r)}return null}var oe=Y(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),ue=function(){function e(t){f(this,e),this.getPropertyValue=F,this.setProperty=H,this.removeProperty=Q,this.setSelector=ee,this.getKey=$,this.getUnescapedKeysMap=se,this.hasInsertedRules=!1,t&&B.add(t),this.sheet=t;var n=this.sheet?this.sheet.options:{},r=n.media,s=n.meta,i=n.element;this.element=i||document.createElement("style"),this.element.type="text/css",this.element.setAttribute("data-jss",""),r&&this.element.setAttribute("media",r),s&&this.element.setAttribute("data-meta",s);var o=oe();o&&this.element.setAttribute("nonce",o)}return c(e,[{key:"attach",value:function(){!this.element.parentNode&&this.sheet&&(this.hasInsertedRules&&(this.deploy(),this.hasInsertedRules=!1),function(e,t){var n=t.insertionPoint,r=ie(t);if(r){var s=r.parentNode;s&&s.insertBefore(e,r)}else if(n&&"number"==typeof n.nodeType){var o=n,u=o.parentNode;u?u.insertBefore(e,o.nextSibling):i(!1,"[JSS] Insertion point is not in the DOM.")}else re().insertBefore(e,r)}(this.element,this.sheet.options))}},{key:"detach",value:function(){this.element.parentNode.removeChild(this.element)}},{key:"deploy",value:function(){this.sheet&&(this.element.textContent="\n"+this.sheet.toString()+"\n")}},{key:"insertRule",value:function(e,t){var n=this.element.sheet,r=n.cssRules,s=e.toString();if(t||(t=r.length),!s)return!1;try{n.insertRule(s,t)}catch(t){return i(!1,"[JSS] Can not insert an unsupported rule \n\r%s",e),!1}return this.hasInsertedRules=!0,r[t]}},{key:"deleteRule",value:function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)}},{key:"indexOf",value:function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1}},{key:"replaceRule",value:function(e,t){var n=this.indexOf(e),r=this.insertRule(t,n);return this.element.sheet.deleteRule(n),r}},{key:"getRules",value:function(){return this.element.sheet.cssRules}}]),e}(),ae=function(){function e(){f(this,e)}return c(e,[{key:"setProperty",value:function(){return!0}},{key:"getPropertyValue",value:function(){return""}},{key:"removeProperty",value:function(){}},{key:"setSelector",value:function(){return!0}},{key:"getKey",value:function(){return""}},{key:"attach",value:function(){}},{key:"detach",value:function(){}},{key:"deploy",value:function(){}},{key:"insertRule",value:function(){return!1}},{key:"deleteRule",value:function(){return!0}},{key:"replaceRule",value:function(){return!1}},{key:"getRules",value:function(){}},{key:"indexOf",value:function(){return-1}}]),e}(),le=V.concat([_,I]),he=0,fe=function(){function e(t){f(this,e),this.id=he++,this.version="9.8.5",this.plugins=new j,this.options={createGenerateClassName:L,Renderer:n?ue:ae,plugins:[]},this.generateClassName=L(),this.use.apply(this,le),this.setup(t)}return c(e,[{key:"setup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.createGenerateClassName&&(this.options.createGenerateClassName=e.createGenerateClassName,this.generateClassName=e.createGenerateClassName()),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),(e.virtual||e.Renderer)&&(this.options.Renderer=e.Renderer||(e.virtual?ae:ue)),e.plugins&&this.use.apply(this,e.plugins),this}},{key:"createStyleSheet",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.index;"number"!=typeof n&&(n=0===B.index?0:B.index+1);var r=new O(e,d({},t,{jss:this,generateClassName:t.generateClassName||this.generateClassName,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r}},{key:"removeStyleSheet",value:function(e){return e.detach(),B.remove(e),this}},{key:"createRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"===(void 0===e?"undefined":h(e))&&(n=t,t=e,e=void 0);var r=n;r.jss=this,r.Renderer=this.options.Renderer,r.generateClassName||(r.generateClassName=this.generateClassName),r.classes||(r.classes={});var s=P(e,t,r);return!r.selector&&s instanceof y&&(s.selector="."+r.generateClassName(s)),this.plugins.onProcessRule(s),s}},{key:"use",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){-1===e.options.plugins.indexOf(t)&&(e.options.plugins.push(t),e.plugins.use(t))}),this}}]),e}();var ce=function(){function e(){f(this,e),this.sheets=[],this.refs=[],this.keys=[]}return c(e,[{key:"get",value:function(e){var t=this.keys.indexOf(e);return this.sheets[t]}},{key:"add",value:function(e,t){var n=this.sheets,r=this.refs,s=this.keys,i=n.indexOf(t);return-1!==i?i:(n.push(t),r.push(0),s.push(e),n.length-1)}},{key:"manage",value:function(e){var t=this.keys.indexOf(e),n=this.sheets[t];return 0===this.refs[t]&&n.attach(),this.refs[t]++,this.keys[t]||this.keys.splice(t,0,e),n}},{key:"unmanage",value:function(e){var t=this.keys.indexOf(e);-1!==t?this.refs[t]>0&&(this.refs[t]--,0===this.refs[t]&&this.sheets[t].detach()):i(!1,"SheetsManager: can't find sheet to unmanage")}},{key:"size",get:function(){return this.keys.length}}]),e}(),de=function(e){return new fe(e)},ye=de();e.create=de,e.default=ye,e.getDynamicStyles=function e(t){var n=null;for(var r in t){var s=t[r],i=void 0===s?"undefined":h(s);if("function"===i)n||(n={}),n[r]=s;else if("object"===i&&null!==s&&!Array.isArray(s)){var o=e(s);o&&(n||(n={}),n[r]=o)}}return n},e.toCssValue=u,e.SheetsRegistry=K,e.SheetsManager=ce,e.RuleList=C,e.sheets=B,e.createGenerateClassName=L,Object.defineProperty(e,"__esModule",{value:!0})});

@@ -74,3 +74,3 @@ 'use strict';

this.id = instanceCounter++;
this.version = "9.8.3";
this.version = "9.8.5";
this.plugins = new _PluginsRegistry2['default']();

@@ -77,0 +77,0 @@ this.options = {

{
"name": "jss",
"description": "A lib for generating Style Sheets with JavaScript.",
"version": "9.8.3",
"version": "9.8.5",
"author": {

@@ -87,3 +87,3 @@ "name": "Oleg Slobodskoi",

"pre-commit": "^1.1.3",
"prettier": "^1.10.2",
"prettier": "^1.13.5",
"rimraf": "^2.5.4",

@@ -111,3 +111,3 @@ "rollup": "^0.58.2",

"lint:staged": "lint-staged && npm run typecheck",
"format": "prettier --write */**/*",
"format": "prettier --write **/*.{js,md,json}",
"test": "cross-env NODE_ENV=test karma start --single-run",

@@ -114,0 +114,0 @@ "test:watch": "cross-env NODE_ENV=test karma start",

@@ -14,36 +14,38 @@ # JSS

If you are a Sass (SCSS) user, this course will show how to express popular Sass language features using latest JavaScript features: [Convert SCSS (Sass) to CSS-in-JS](https://egghead.io/courses/convert-scss-sass-to-css-in-js).
## Key features
* Framework agnostic
* [Scoped selectors by default](./docs/json-api.md#regular-rule-without-plugins)
* [Function values and rules](./docs/json-api.md#function-values)
* [Observables](./docs/json-api.md#observable-values)
* [SSR](./docs/ssr.md)
* [Plugins support](./docs/plugins.md)
* [Global CSS](https://github.com/cssinjs/jss-global)
* [Expanded syntax](https://github.com/cssinjs/jss-expand)
* [Composition syntax](https://github.com/cssinjs/jss-compose)
* [Template strings syntax](https://github.com/cssinjs/jss-template)
* [Isolation](https://github.com/cssinjs/jss-isolate)
- Framework agnostic
- [Scoped selectors by default](./docs/json-api.md#regular-rule-without-plugins)
- [Function values and rules](./docs/json-api.md#function-values)
- [Observables](./docs/json-api.md#observable-values)
- [SSR](./docs/ssr.md)
- [Plugins support](./docs/plugins.md)
- [Global CSS](https://github.com/cssinjs/jss-global)
- [Expanded syntax](https://github.com/cssinjs/jss-expand)
- [Composition syntax](https://github.com/cssinjs/jss-compose)
- [Template strings syntax](https://github.com/cssinjs/jss-template)
- [Isolation](https://github.com/cssinjs/jss-isolate)
## Integrations
* [React-JSS](https://github.com/cssinjs/react-jss) - HOC interface for React with theming, try it on [playground](https://codesandbox.io/s/j3l06yyqpw).
* [Styled-JSS](https://github.com/cssinjs/styled-jss) - styled components interface for React, try it on [playground](https://codesandbox.io/s/xl89zx8zz4).
* [Aphrodite-JSS](https://github.com/cssinjs/aphrodite-jss) - aphrodite like API.
- [React-JSS](https://github.com/cssinjs/react-jss) - HOC interface for React with theming, try it on [playground](https://codesandbox.io/s/j3l06yyqpw).
- [Styled-JSS](https://github.com/cssinjs/styled-jss) - styled components interface for React, try it on [playground](https://codesandbox.io/s/xl89zx8zz4).
- [Aphrodite-JSS](https://github.com/cssinjs/aphrodite-jss) - aphrodite like API.
## TOC
1. [Live examples](https://github.com/cssinjs/examples)
1. [Benefits](./docs/benefits.md)
1. [Setup](./docs/setup.md)
1. [JSON API (JSS Syntax)](./docs/json-api.md)
1. [JavaScript API](./docs/js-api.md)
1. [Server-side rendering](./docs/ssr.md)
1. [Performance](./docs/performance.md)
1. [Plugins API](./docs/plugins.md)
1. [Official plugins](https://github.com/cssinjs?q=plugin)
1. [All related projects](./docs/projects.md)
1. [CLI Converter](https://github.com/cssinjs/cli)
1. [Contributing](./contributing.md)
1. [Live examples](https://github.com/cssinjs/examples)
1. [Benefits](./docs/benefits.md)
1. [Setup](./docs/setup.md)
1. [JSON API (JSS Syntax)](./docs/json-api.md)
1. [JavaScript API](./docs/js-api.md)
1. [Server-side rendering](./docs/ssr.md)
1. [Performance](./docs/performance.md)
1. [Plugins API](./docs/plugins.md)
1. [Official plugins](https://github.com/cssinjs?q=plugin)
1. [All related projects](./docs/projects.md)
1. [CLI Converter](https://github.com/cssinjs/cli)
1. [Contributing](./contributing.md)

@@ -126,11 +128,11 @@ ## Example

* You build a JavaScript heavy application.
* You use components based architecture.
* You build a reusable UI library.
* You need a collision free CSS (external content, third-party UI components ...).
* You need code sharing between js and css.
* Minimal download size is important to you.
* Robustness and code reuse is important to you.
* Ease of maintenance is important to you.
* You just want to use any of its [benefits](./docs/benefits.md)
- You build a JavaScript heavy application.
- You use components based architecture.
- You build a reusable UI library.
- You need a collision free CSS (external content, third-party UI components ...).
- You need code sharing between js and css.
- Minimal download size is important to you.
- Robustness and code reuse is important to you.
- Ease of maintenance is important to you.
- You just want to use any of its [benefits](./docs/benefits.md)

@@ -137,0 +139,0 @@ ## Roadmap

@@ -45,5 +45,3 @@ /* @flow */

*/
export {
default as createGenerateClassName
} from './utils/createGenerateClassName'
export {default as createGenerateClassName} from './utils/createGenerateClassName'

@@ -50,0 +48,0 @@ /**

@@ -60,7 +60,5 @@ /* @flow */

if (options.insertionPoint != null)
this.options.insertionPoint = options.insertionPoint
if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint
if (options.virtual || options.Renderer) {
this.options.Renderer =
options.Renderer || (options.virtual ? VirtualRenderer : DomRenderer)
this.options.Renderer = options.Renderer || (options.virtual ? VirtualRenderer : DomRenderer)
}

@@ -77,6 +75,3 @@

*/
createStyleSheet(
styles: Object,
options: StyleSheetFactoryOptions = {}
): StyleSheet {
createStyleSheet(styles: Object, options: StyleSheetFactoryOptions = {}): StyleSheet {
let index = options.index

@@ -111,7 +106,3 @@ if (typeof index !== 'number') {

*/
createRule(
name?: string,
style?: JssStyle = {},
options?: RuleFactoryOptions = {}
): Rule {
createRule(name?: string, style?: JssStyle = {}, options?: RuleFactoryOptions = {}): Rule {
// Enable rule without name for inline styles.

@@ -130,4 +121,3 @@ if (typeof name === 'object') {

ruleOptions.Renderer = this.options.Renderer
if (!ruleOptions.generateClassName)
ruleOptions.generateClassName = this.generateClassName
if (!ruleOptions.generateClassName) ruleOptions.generateClassName = this.generateClassName
if (!ruleOptions.classes) ruleOptions.classes = {}

@@ -134,0 +124,0 @@ const rule = createRule(name, style, ruleOptions)

@@ -19,7 +19,3 @@ /* @flow */

*/
onCreateRule(
name?: string,
decl: JssStyle,
options: RuleOptions
): Rule | null {
onCreateRule(name?: string, decl: JssStyle, options: RuleOptions): Rule | null {
for (let i = 0; i < this.hooks.onCreateRule.length; i++) {

@@ -26,0 +22,0 @@ const rule = this.hooks.onCreateRule[i](name, decl, options)

@@ -277,6 +277,8 @@ /* @flow */

*/
const getNonce = memoize((): ?string => {
const node = document.querySelector('meta[property="csp-nonce"]')
return node ? node.getAttribute('content') : null
})
const getNonce = memoize(
(): ?string => {
const node = document.querySelector('meta[property="csp-nonce"]')
return node ? node.getAttribute('content') : null
}
)

@@ -283,0 +285,0 @@ export default class DomRenderer {

@@ -15,5 +15,3 @@ /* @flow */

get index(): number {
return this.registry.length === 0
? 0
: this.registry[this.registry.length - 1].options.index
return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index
}

@@ -20,0 +18,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc