Security upgrades
This commit is contained in:
2378
node_modules/jss-plugin-global/dist/jss-plugin-global.bundle.js
generated
vendored
Normal file
2378
node_modules/jss-plugin-global/dist/jss-plugin-global.bundle.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
191
node_modules/jss-plugin-global/dist/jss-plugin-global.cjs.js
generated
vendored
Normal file
191
node_modules/jss-plugin-global/dist/jss-plugin-global.cjs.js
generated
vendored
Normal file
@@ -0,0 +1,191 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||
|
||||
var _extends = _interopDefault(require('@babel/runtime/helpers/extends'));
|
||||
var jss = require('jss');
|
||||
|
||||
var at = '@global';
|
||||
var atPrefix = '@global ';
|
||||
|
||||
var GlobalContainerRule =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function GlobalContainerRule(key, styles, options) {
|
||||
this.type = 'global';
|
||||
this.at = at;
|
||||
this.rules = void 0;
|
||||
this.options = void 0;
|
||||
this.key = void 0;
|
||||
this.isProcessed = false;
|
||||
this.key = key;
|
||||
this.options = options;
|
||||
this.rules = new jss.RuleList(_extends({}, options, {
|
||||
parent: this
|
||||
}));
|
||||
|
||||
for (var selector in styles) {
|
||||
this.rules.add(selector, styles[selector]);
|
||||
}
|
||||
|
||||
this.rules.process();
|
||||
}
|
||||
/**
|
||||
* Get a rule.
|
||||
*/
|
||||
|
||||
|
||||
var _proto = GlobalContainerRule.prototype;
|
||||
|
||||
_proto.getRule = function getRule(name) {
|
||||
return this.rules.get(name);
|
||||
}
|
||||
/**
|
||||
* Create and register rule, run plugins.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.addRule = function addRule(name, style, options) {
|
||||
var rule = this.rules.add(name, style, options);
|
||||
this.options.jss.plugins.onProcessRule(rule);
|
||||
return rule;
|
||||
}
|
||||
/**
|
||||
* Get index of a rule.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.indexOf = function indexOf(rule) {
|
||||
return this.rules.indexOf(rule);
|
||||
}
|
||||
/**
|
||||
* Generates a CSS string.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.toString = function toString() {
|
||||
return this.rules.toString();
|
||||
};
|
||||
|
||||
return GlobalContainerRule;
|
||||
}();
|
||||
|
||||
var GlobalPrefixedRule =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function GlobalPrefixedRule(key, style, options) {
|
||||
this.type = 'global';
|
||||
this.at = at;
|
||||
this.options = void 0;
|
||||
this.rule = void 0;
|
||||
this.isProcessed = false;
|
||||
this.key = void 0;
|
||||
this.key = key;
|
||||
this.options = options;
|
||||
var selector = key.substr(atPrefix.length);
|
||||
this.rule = options.jss.createRule(selector, style, _extends({}, options, {
|
||||
parent: this
|
||||
}));
|
||||
}
|
||||
|
||||
var _proto2 = GlobalPrefixedRule.prototype;
|
||||
|
||||
_proto2.toString = function toString(options) {
|
||||
return this.rule ? this.rule.toString(options) : '';
|
||||
};
|
||||
|
||||
return GlobalPrefixedRule;
|
||||
}();
|
||||
|
||||
var separatorRegExp = /\s*,\s*/g;
|
||||
|
||||
function addScope(selector, scope) {
|
||||
var parts = selector.split(separatorRegExp);
|
||||
var scoped = '';
|
||||
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
scoped += scope + " " + parts[i].trim();
|
||||
if (parts[i + 1]) scoped += ', ';
|
||||
}
|
||||
|
||||
return scoped;
|
||||
}
|
||||
|
||||
function handleNestedGlobalContainerRule(rule) {
|
||||
var options = rule.options,
|
||||
style = rule.style;
|
||||
var rules = style ? style[at] : null;
|
||||
if (!rules) return;
|
||||
|
||||
for (var name in rules) {
|
||||
options.sheet.addRule(name, rules[name], _extends({}, options, {
|
||||
selector: addScope(name, rule.selector)
|
||||
}));
|
||||
}
|
||||
|
||||
delete style[at];
|
||||
}
|
||||
|
||||
function handlePrefixedGlobalRule(rule) {
|
||||
var options = rule.options,
|
||||
style = rule.style;
|
||||
|
||||
for (var prop in style) {
|
||||
if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;
|
||||
var selector = addScope(prop.substr(at.length), rule.selector);
|
||||
options.sheet.addRule(selector, style[prop], _extends({}, options, {
|
||||
selector: selector
|
||||
}));
|
||||
delete style[prop];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Convert nested rules to separate, remove them from original styles.
|
||||
*
|
||||
* @param {Rule} rule
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function jssGlobal() {
|
||||
function onCreateRule(name, styles, options) {
|
||||
if (!name) return null;
|
||||
|
||||
if (name === at) {
|
||||
return new GlobalContainerRule(name, styles, options);
|
||||
}
|
||||
|
||||
if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {
|
||||
return new GlobalPrefixedRule(name, styles, options);
|
||||
}
|
||||
|
||||
var parent = options.parent;
|
||||
|
||||
if (parent) {
|
||||
if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {
|
||||
options.scoped = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (options.scoped === false) {
|
||||
options.selector = name;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function onProcessRule(rule) {
|
||||
if (rule.type !== 'style') return;
|
||||
handleNestedGlobalContainerRule(rule);
|
||||
handlePrefixedGlobalRule(rule);
|
||||
}
|
||||
|
||||
return {
|
||||
onCreateRule: onCreateRule,
|
||||
onProcessRule: onProcessRule
|
||||
};
|
||||
}
|
||||
|
||||
exports.default = jssGlobal;
|
||||
3
node_modules/jss-plugin-global/dist/jss-plugin-global.cjs.js.flow
generated
vendored
Normal file
3
node_modules/jss-plugin-global/dist/jss-plugin-global.cjs.js.flow
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
// @flow
|
||||
|
||||
export * from '../src';
|
||||
185
node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js
generated
vendored
Normal file
185
node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js
generated
vendored
Normal file
@@ -0,0 +1,185 @@
|
||||
import _extends from '@babel/runtime/helpers/esm/extends';
|
||||
import { RuleList } from 'jss';
|
||||
|
||||
var at = '@global';
|
||||
var atPrefix = '@global ';
|
||||
|
||||
var GlobalContainerRule =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function GlobalContainerRule(key, styles, options) {
|
||||
this.type = 'global';
|
||||
this.at = at;
|
||||
this.rules = void 0;
|
||||
this.options = void 0;
|
||||
this.key = void 0;
|
||||
this.isProcessed = false;
|
||||
this.key = key;
|
||||
this.options = options;
|
||||
this.rules = new RuleList(_extends({}, options, {
|
||||
parent: this
|
||||
}));
|
||||
|
||||
for (var selector in styles) {
|
||||
this.rules.add(selector, styles[selector]);
|
||||
}
|
||||
|
||||
this.rules.process();
|
||||
}
|
||||
/**
|
||||
* Get a rule.
|
||||
*/
|
||||
|
||||
|
||||
var _proto = GlobalContainerRule.prototype;
|
||||
|
||||
_proto.getRule = function getRule(name) {
|
||||
return this.rules.get(name);
|
||||
}
|
||||
/**
|
||||
* Create and register rule, run plugins.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.addRule = function addRule(name, style, options) {
|
||||
var rule = this.rules.add(name, style, options);
|
||||
this.options.jss.plugins.onProcessRule(rule);
|
||||
return rule;
|
||||
}
|
||||
/**
|
||||
* Get index of a rule.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.indexOf = function indexOf(rule) {
|
||||
return this.rules.indexOf(rule);
|
||||
}
|
||||
/**
|
||||
* Generates a CSS string.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.toString = function toString() {
|
||||
return this.rules.toString();
|
||||
};
|
||||
|
||||
return GlobalContainerRule;
|
||||
}();
|
||||
|
||||
var GlobalPrefixedRule =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function GlobalPrefixedRule(key, style, options) {
|
||||
this.type = 'global';
|
||||
this.at = at;
|
||||
this.options = void 0;
|
||||
this.rule = void 0;
|
||||
this.isProcessed = false;
|
||||
this.key = void 0;
|
||||
this.key = key;
|
||||
this.options = options;
|
||||
var selector = key.substr(atPrefix.length);
|
||||
this.rule = options.jss.createRule(selector, style, _extends({}, options, {
|
||||
parent: this
|
||||
}));
|
||||
}
|
||||
|
||||
var _proto2 = GlobalPrefixedRule.prototype;
|
||||
|
||||
_proto2.toString = function toString(options) {
|
||||
return this.rule ? this.rule.toString(options) : '';
|
||||
};
|
||||
|
||||
return GlobalPrefixedRule;
|
||||
}();
|
||||
|
||||
var separatorRegExp = /\s*,\s*/g;
|
||||
|
||||
function addScope(selector, scope) {
|
||||
var parts = selector.split(separatorRegExp);
|
||||
var scoped = '';
|
||||
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
scoped += scope + " " + parts[i].trim();
|
||||
if (parts[i + 1]) scoped += ', ';
|
||||
}
|
||||
|
||||
return scoped;
|
||||
}
|
||||
|
||||
function handleNestedGlobalContainerRule(rule) {
|
||||
var options = rule.options,
|
||||
style = rule.style;
|
||||
var rules = style ? style[at] : null;
|
||||
if (!rules) return;
|
||||
|
||||
for (var name in rules) {
|
||||
options.sheet.addRule(name, rules[name], _extends({}, options, {
|
||||
selector: addScope(name, rule.selector)
|
||||
}));
|
||||
}
|
||||
|
||||
delete style[at];
|
||||
}
|
||||
|
||||
function handlePrefixedGlobalRule(rule) {
|
||||
var options = rule.options,
|
||||
style = rule.style;
|
||||
|
||||
for (var prop in style) {
|
||||
if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;
|
||||
var selector = addScope(prop.substr(at.length), rule.selector);
|
||||
options.sheet.addRule(selector, style[prop], _extends({}, options, {
|
||||
selector: selector
|
||||
}));
|
||||
delete style[prop];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Convert nested rules to separate, remove them from original styles.
|
||||
*
|
||||
* @param {Rule} rule
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function jssGlobal() {
|
||||
function onCreateRule(name, styles, options) {
|
||||
if (!name) return null;
|
||||
|
||||
if (name === at) {
|
||||
return new GlobalContainerRule(name, styles, options);
|
||||
}
|
||||
|
||||
if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {
|
||||
return new GlobalPrefixedRule(name, styles, options);
|
||||
}
|
||||
|
||||
var parent = options.parent;
|
||||
|
||||
if (parent) {
|
||||
if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {
|
||||
options.scoped = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (options.scoped === false) {
|
||||
options.selector = name;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function onProcessRule(rule) {
|
||||
if (rule.type !== 'style') return;
|
||||
handleNestedGlobalContainerRule(rule);
|
||||
handlePrefixedGlobalRule(rule);
|
||||
}
|
||||
|
||||
return {
|
||||
onCreateRule: onCreateRule,
|
||||
onProcessRule: onProcessRule
|
||||
};
|
||||
}
|
||||
|
||||
export default jssGlobal;
|
||||
211
node_modules/jss-plugin-global/dist/jss-plugin-global.js
generated
vendored
Normal file
211
node_modules/jss-plugin-global/dist/jss-plugin-global.js
generated
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jss')) :
|
||||
typeof define === 'function' && define.amd ? define(['exports', 'jss'], factory) :
|
||||
(global = global || self, factory(global.jssPluginGlobal = {}, global.jss));
|
||||
}(this, (function (exports, jss) { 'use strict';
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
var at = '@global';
|
||||
var atPrefix = '@global ';
|
||||
|
||||
var GlobalContainerRule =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function GlobalContainerRule(key, styles, options) {
|
||||
this.type = 'global';
|
||||
this.at = at;
|
||||
this.rules = void 0;
|
||||
this.options = void 0;
|
||||
this.key = void 0;
|
||||
this.isProcessed = false;
|
||||
this.key = key;
|
||||
this.options = options;
|
||||
this.rules = new jss.RuleList(_extends({}, options, {
|
||||
parent: this
|
||||
}));
|
||||
|
||||
for (var selector in styles) {
|
||||
this.rules.add(selector, styles[selector]);
|
||||
}
|
||||
|
||||
this.rules.process();
|
||||
}
|
||||
/**
|
||||
* Get a rule.
|
||||
*/
|
||||
|
||||
|
||||
var _proto = GlobalContainerRule.prototype;
|
||||
|
||||
_proto.getRule = function getRule(name) {
|
||||
return this.rules.get(name);
|
||||
}
|
||||
/**
|
||||
* Create and register rule, run plugins.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.addRule = function addRule(name, style, options) {
|
||||
var rule = this.rules.add(name, style, options);
|
||||
this.options.jss.plugins.onProcessRule(rule);
|
||||
return rule;
|
||||
}
|
||||
/**
|
||||
* Get index of a rule.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.indexOf = function indexOf(rule) {
|
||||
return this.rules.indexOf(rule);
|
||||
}
|
||||
/**
|
||||
* Generates a CSS string.
|
||||
*/
|
||||
;
|
||||
|
||||
_proto.toString = function toString() {
|
||||
return this.rules.toString();
|
||||
};
|
||||
|
||||
return GlobalContainerRule;
|
||||
}();
|
||||
|
||||
var GlobalPrefixedRule =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function GlobalPrefixedRule(key, style, options) {
|
||||
this.type = 'global';
|
||||
this.at = at;
|
||||
this.options = void 0;
|
||||
this.rule = void 0;
|
||||
this.isProcessed = false;
|
||||
this.key = void 0;
|
||||
this.key = key;
|
||||
this.options = options;
|
||||
var selector = key.substr(atPrefix.length);
|
||||
this.rule = options.jss.createRule(selector, style, _extends({}, options, {
|
||||
parent: this
|
||||
}));
|
||||
}
|
||||
|
||||
var _proto2 = GlobalPrefixedRule.prototype;
|
||||
|
||||
_proto2.toString = function toString(options) {
|
||||
return this.rule ? this.rule.toString(options) : '';
|
||||
};
|
||||
|
||||
return GlobalPrefixedRule;
|
||||
}();
|
||||
|
||||
var separatorRegExp = /\s*,\s*/g;
|
||||
|
||||
function addScope(selector, scope) {
|
||||
var parts = selector.split(separatorRegExp);
|
||||
var scoped = '';
|
||||
|
||||
for (var i = 0; i < parts.length; i++) {
|
||||
scoped += scope + " " + parts[i].trim();
|
||||
if (parts[i + 1]) scoped += ', ';
|
||||
}
|
||||
|
||||
return scoped;
|
||||
}
|
||||
|
||||
function handleNestedGlobalContainerRule(rule) {
|
||||
var options = rule.options,
|
||||
style = rule.style;
|
||||
var rules = style ? style[at] : null;
|
||||
if (!rules) return;
|
||||
|
||||
for (var name in rules) {
|
||||
options.sheet.addRule(name, rules[name], _extends({}, options, {
|
||||
selector: addScope(name, rule.selector)
|
||||
}));
|
||||
}
|
||||
|
||||
delete style[at];
|
||||
}
|
||||
|
||||
function handlePrefixedGlobalRule(rule) {
|
||||
var options = rule.options,
|
||||
style = rule.style;
|
||||
|
||||
for (var prop in style) {
|
||||
if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;
|
||||
var selector = addScope(prop.substr(at.length), rule.selector);
|
||||
options.sheet.addRule(selector, style[prop], _extends({}, options, {
|
||||
selector: selector
|
||||
}));
|
||||
delete style[prop];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Convert nested rules to separate, remove them from original styles.
|
||||
*
|
||||
* @param {Rule} rule
|
||||
* @api public
|
||||
*/
|
||||
|
||||
|
||||
function jssGlobal() {
|
||||
function onCreateRule(name, styles, options) {
|
||||
if (!name) return null;
|
||||
|
||||
if (name === at) {
|
||||
return new GlobalContainerRule(name, styles, options);
|
||||
}
|
||||
|
||||
if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {
|
||||
return new GlobalPrefixedRule(name, styles, options);
|
||||
}
|
||||
|
||||
var parent = options.parent;
|
||||
|
||||
if (parent) {
|
||||
if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {
|
||||
options.scoped = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (options.scoped === false) {
|
||||
options.selector = name;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function onProcessRule(rule) {
|
||||
if (rule.type !== 'style') return;
|
||||
handleNestedGlobalContainerRule(rule);
|
||||
handlePrefixedGlobalRule(rule);
|
||||
}
|
||||
|
||||
return {
|
||||
onCreateRule: onCreateRule,
|
||||
onProcessRule: onProcessRule
|
||||
};
|
||||
}
|
||||
|
||||
exports.default = jssGlobal;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=jss-plugin-global.js.map
|
||||
1
node_modules/jss-plugin-global/dist/jss-plugin-global.js.map
generated
vendored
Normal file
1
node_modules/jss-plugin-global/dist/jss-plugin-global.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/jss-plugin-global/dist/jss-plugin-global.min.js
generated
vendored
Normal file
1
node_modules/jss-plugin-global/dist/jss-plugin-global.min.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jss")):"function"==typeof define&&define.amd?define(["exports","jss"],e):e((t=t||self).jssPluginGlobal={},t.jss)}(this,function(t,e){"use strict";function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var s=arguments[e];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=s[n])}return t}).apply(this,arguments)}var n="@global",r="@global ",i=function(){function t(t,r,i){for(var o in this.type="global",this.at=n,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=t,this.options=i,this.rules=new e.RuleList(s({},i,{parent:this})),r)this.rules.add(o,r[o]);this.rules.process()}var r=t.prototype;return r.getRule=function(t){return this.rules.get(t)},r.addRule=function(t,e,s){var n=this.rules.add(t,e,s);return this.options.jss.plugins.onProcessRule(n),n},r.indexOf=function(t){return this.rules.indexOf(t)},r.toString=function(){return this.rules.toString()},t}(),o=function(){function t(t,e,i){this.type="global",this.at=n,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=t,this.options=i;var o=t.substr(r.length);this.rule=i.jss.createRule(o,e,s({},i,{parent:this}))}return t.prototype.toString=function(t){return this.rule?this.rule.toString(t):""},t}(),u=/\s*,\s*/g;function l(t,e){for(var s=t.split(u),n="",r=0;r<s.length;r++)n+=e+" "+s[r].trim(),s[r+1]&&(n+=", ");return n}t.default=function(){return{onCreateRule:function(t,e,s){if(!t)return null;if(t===n)return new i(t,e,s);if("@"===t[0]&&t.substr(0,r.length)===r)return new o(t,e,s);var u=s.parent;return u&&("global"===u.type||u.options.parent&&"global"===u.options.parent.type)&&(s.scoped=!1),!1===s.scoped&&(s.selector=t),null},onProcessRule:function(t){"style"===t.type&&(function(t){var e=t.options,r=t.style,i=r?r[n]:null;if(i){for(var o in i)e.sheet.addRule(o,i[o],s({},e,{selector:l(o,t.selector)}));delete r[n]}}(t),function(t){var e=t.options,r=t.style;for(var i in r)if("@"===i[0]&&i.substr(0,n.length)===n){var o=l(i.substr(n.length),t.selector);e.sheet.addRule(o,r[i],s({},e,{selector:o})),delete r[i]}}(t))}}},Object.defineProperty(t,"__esModule",{value:!0})});
|
||||
Reference in New Issue
Block a user