jss-plugin-rule-value-observable
Advanced tools
Comparing version 10.0.0-alpha.3 to 10.0.0-alpha.4
@@ -37,51 +37,20 @@ var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}; | ||
/** | ||
* Copyright 2014-2015, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
var warning = function warning() {}; | ||
{ | ||
warning = function warning(condition, format, args) { | ||
var len = arguments.length; | ||
args = new Array(len > 2 ? len - 2 : 0); | ||
for (var key = 2; key < len; key++) { | ||
args[key - 2] = arguments[key]; | ||
function warning(condition, message) { | ||
{ | ||
if (condition) { | ||
return; | ||
} | ||
if (format === undefined) { | ||
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); | ||
} | ||
var text = "Warning: " + message; | ||
if (format.length < 10 || /^[s\W]*$/.test(format)) { | ||
throw new Error('The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format); | ||
if (typeof console !== 'undefined') { | ||
console.warn(text); | ||
} | ||
if (!condition) { | ||
var argIndex = 0; | ||
var message = 'Warning: ' + format.replace(/%s/g, function () { | ||
return args[argIndex++]; | ||
}); | ||
if (typeof console !== 'undefined') { | ||
console.error(message); | ||
} | ||
try { | ||
// This error was thrown as a convenience so that you can use this stack | ||
// to find the callsite that caused this warning to fire. | ||
throw new Error(message); | ||
} catch (x) {} | ||
} | ||
}; | ||
try { | ||
throw Error(text); | ||
} catch (x) {} | ||
} | ||
} | ||
var warning_1 = warning; | ||
function _extends() { | ||
@@ -143,2 +112,57 @@ _extends = Object.assign || function (target) { | ||
/** | ||
* Copyright (c) 2014-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
var warning$1 = function warning() {}; | ||
{ | ||
var printWarning = function printWarning(format, args) { | ||
var len = arguments.length; | ||
args = new Array(len > 2 ? len - 2 : 0); | ||
for (var key = 2; key < len; key++) { | ||
args[key - 2] = arguments[key]; | ||
} | ||
var argIndex = 0; | ||
var message = 'Warning: ' + format.replace(/%s/g, function () { | ||
return args[argIndex++]; | ||
}); | ||
if (typeof console !== 'undefined') { | ||
console.error(message); | ||
} | ||
try { | ||
// --- Welcome to debugging React --- | ||
// This error was thrown as a convenience so that you can use this stack | ||
// to find the callsite that caused this warning to fire. | ||
throw new Error(message); | ||
} catch (x) {} | ||
}; | ||
warning$1 = function warning(condition, format, args) { | ||
var len = arguments.length; | ||
args = new Array(len > 2 ? len - 2 : 0); | ||
for (var key = 2; key < len; key++) { | ||
args[key - 2] = arguments[key]; | ||
} | ||
if (format === undefined) { | ||
throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); | ||
} | ||
if (!condition) { | ||
printWarning.apply(null, [format].concat(args)); | ||
} | ||
}; | ||
} | ||
var warning_1 = warning$1; | ||
var global$1$1 = typeof global$1 !== "undefined" ? global$1 : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}; | ||
@@ -203,3 +227,3 @@ var isArray = Array.isArray; // TODO: This should propably not be here, need to find a better place | ||
if (name[0] === '@') { | ||
warning_1(false, '[JSS] Unknown rule %s', name); | ||
warning(false, "[JSS] Unknown rule " + name); | ||
} | ||
@@ -333,2 +357,3 @@ | ||
} | ||
var escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g; | ||
@@ -394,3 +419,3 @@ | ||
if (sheet && sheet.attached) { | ||
warning_1(false, '[JSS] Rule is not linked. Missing sheet option "link: true".'); | ||
warning(false, '[JSS] Rule is not linked. Missing sheet option "link: true".'); | ||
} | ||
@@ -633,3 +658,3 @@ | ||
this.name = 'noname'; | ||
warning_1(false, '[JSS] Bad keyframes name %s', key); | ||
warning(false, "[JSS] Bad keyframes name " + key); | ||
} | ||
@@ -695,3 +720,3 @@ | ||
} else { | ||
warning_1(false, '[JSS] Referenced keyframes rule "%s" is not defined.', ref[1]); | ||
warning(false, "[JSS] Referenced keyframes rule \"" + ref[1] + "\" is not defined."); | ||
} | ||
@@ -1421,3 +1446,5 @@ } | ||
registry[name].push(plugin[name]); | ||
} else warning_1(false, '[JSS] Unknown hook "%s".', name); | ||
} else { | ||
warning(false, "[JSS] Unknown hook \"" + name + "\"."); | ||
} | ||
} | ||
@@ -1546,3 +1573,3 @@ | ||
if (ruleCounter > maxRules) { | ||
warning_1(false, '[JSS] You might have a memory leak. Rule counter is at %s.', ruleCounter); | ||
warning(false, "[JSS] You might have a memory leak. Rule counter is at " + ruleCounter + "."); | ||
} | ||
@@ -1639,3 +1666,3 @@ | ||
} catch (err) { | ||
warning_1(false, '[JSS] DOMException "%s" was thrown. Tried to remove property "%s".', err.message, prop); | ||
warning(false, "[JSS] DOMException \"" + err.message + "\" was thrown. Tried to remove property \"" + prop + "\"."); | ||
} | ||
@@ -1757,3 +1784,3 @@ } | ||
warning_1(insertionPoint === 'jss', '[JSS] Insertion point "%s" not found.', insertionPoint); | ||
warning(false, "[JSS] Insertion point \"" + insertionPoint + "\" not found."); | ||
} | ||
@@ -1782,3 +1809,3 @@ | ||
var parentNode = insertionPointElement.parentNode; | ||
if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else warning_1(false, '[JSS] Insertion point is not in the DOM.'); | ||
if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else warning(false, '[JSS] Insertion point is not in the DOM.'); | ||
return; | ||
@@ -1815,3 +1842,3 @@ } | ||
} catch (err) { | ||
warning_1(false, '[JSS] Can not insert an unsupported rule \n\r%s', rule); | ||
warning(false, "[JSS] Can not insert an unsupported rule \n" + rule); | ||
return false; | ||
@@ -2047,3 +2074,3 @@ } | ||
this.id = instanceCounter++; | ||
this.version = "10.0.0-alpha.2"; | ||
this.version = "10.0.0-alpha.4"; | ||
this.plugins = new PluginsRegistry(); | ||
@@ -2050,0 +2077,0 @@ this.options = { |
{ | ||
"name": "jss-plugin-rule-value-observable", | ||
"description": "JSS plugin for TC39 Observables support", | ||
"version": "10.0.0-alpha.3", | ||
"version": "10.0.0-alpha.4", | ||
"license": "MIT", | ||
@@ -42,10 +42,10 @@ "homepage": "https://cssinjs.org/", | ||
"scripts": { | ||
"build": "node ../../scripts/build.js", | ||
"prepare": "node ../../scripts/build.js", | ||
"check-snapshot": "node ../../scripts/match-snapshot.js" | ||
}, | ||
"peerDependencies": { | ||
"jss": "^9.7.0" | ||
"jss": "^10.0.0-alpha.3" | ||
}, | ||
"devDependencies": { | ||
"jss": "^10.0.0-alpha.3" | ||
"jss": "^10.0.0-alpha.4" | ||
}, | ||
@@ -55,3 +55,4 @@ "dependencies": { | ||
"symbol-observable": "^1.2.0" | ||
} | ||
}, | ||
"gitHead": "4efd47a4af45de9c8784d68f3a239f9a1d29c942" | ||
} |
82946
2383