@aeaton/react-prosemirror
Advanced tools
Comparing version 0.10.0 to 0.10.1
@@ -184,10 +184,22 @@ module.exports = | ||
var getTarget = function (target) { | ||
return document.querySelector(target); | ||
}; | ||
var getElement = (function (fn) { | ||
var memo = {}; | ||
return function(selector) { | ||
if (typeof memo[selector] === "undefined") { | ||
var styleTarget = fn.call(this, selector); | ||
return function(target) { | ||
// If passing function in options, then use it for resolve "head" element. | ||
// Useful for Shadow Root style i.e | ||
// { | ||
// insertInto: function () { return document.querySelector("#foo").shadowRoot } | ||
// } | ||
if (typeof target === 'function') { | ||
return target(); | ||
} | ||
if (typeof memo[target] === "undefined") { | ||
var styleTarget = getTarget.call(this, target); | ||
// Special case to return head of iframe instead of iframe itself | ||
if (styleTarget instanceof window.HTMLIFrameElement) { | ||
if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { | ||
try { | ||
@@ -201,9 +213,7 @@ // This will throw an exception if access to iframe is blocked | ||
} | ||
memo[selector] = styleTarget; | ||
memo[target] = styleTarget; | ||
} | ||
return memo[selector] | ||
return memo[target] | ||
}; | ||
})(function (target) { | ||
return document.querySelector(target) | ||
}); | ||
})(); | ||
@@ -230,3 +240,3 @@ var singleton = null; | ||
// By default, add <style> tags to the <head> element | ||
if (!options.insertInto) options.insertInto = "head"; | ||
if (!options.insertInto) options.insertInto = "head"; | ||
@@ -674,26 +684,45 @@ // By default, add <style> tags to the bottom of the target | ||
// style-loader: Adds some css to the DOM by adding a <style> tag | ||
// load the styles | ||
var content = __webpack_require__(8); | ||
if(typeof content === 'string') content = [[module.i, content, '']]; | ||
// Prepare cssTransformation | ||
var transform; | ||
var insertInto; | ||
var options = {"hmr":true} | ||
options.transform = transform | ||
// add the styles to the DOM | ||
options.insertInto = undefined; | ||
var update = __webpack_require__(2)(content, options); | ||
if(content.locals) module.exports = content.locals; | ||
// Hot Module Replacement | ||
if(false) { | ||
// When the styles change, update the <style> tags | ||
if(!content.locals) { | ||
module.hot.accept("!!../../css-loader/index.js!./prosemirror.css", function() { | ||
var newContent = require("!!../../css-loader/index.js!./prosemirror.css"); | ||
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; | ||
update(newContent); | ||
}); | ||
} | ||
// When the module is disposed, remove the <style> tags | ||
module.hot.accept("!!../../css-loader/index.js!./prosemirror.css", function() { | ||
var newContent = require("!!../../css-loader/index.js!./prosemirror.css"); | ||
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; | ||
var locals = (function(a, b) { | ||
var key, idx = 0; | ||
for(key in a) { | ||
if(!b || a[key] !== b[key]) return false; | ||
idx++; | ||
} | ||
for(key in b) idx--; | ||
return idx === 0; | ||
}(content.locals, newContent.locals)); | ||
if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.'); | ||
update(newContent); | ||
}); | ||
module.hot.dispose(function() { update(); }); | ||
@@ -815,26 +844,45 @@ } | ||
// style-loader: Adds some css to the DOM by adding a <style> tag | ||
// load the styles | ||
var content = __webpack_require__(11); | ||
if(typeof content === 'string') content = [[module.i, content, '']]; | ||
// Prepare cssTransformation | ||
var transform; | ||
var insertInto; | ||
var options = {"hmr":true} | ||
options.transform = transform | ||
// add the styles to the DOM | ||
options.insertInto = undefined; | ||
var update = __webpack_require__(2)(content, options); | ||
if(content.locals) module.exports = content.locals; | ||
// Hot Module Replacement | ||
if(false) { | ||
// When the styles change, update the <style> tags | ||
if(!content.locals) { | ||
module.hot.accept("!!../../node_modules/css-loader/index.js!./Editor.css", function() { | ||
var newContent = require("!!../../node_modules/css-loader/index.js!./Editor.css"); | ||
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; | ||
update(newContent); | ||
}); | ||
} | ||
// When the module is disposed, remove the <style> tags | ||
module.hot.accept("!!../../node_modules/css-loader/index.js!./Editor.css", function() { | ||
var newContent = require("!!../../node_modules/css-loader/index.js!./Editor.css"); | ||
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; | ||
var locals = (function(a, b) { | ||
var key, idx = 0; | ||
for(key in a) { | ||
if(!b || a[key] !== b[key]) return false; | ||
idx++; | ||
} | ||
for(key in b) idx--; | ||
return idx === 0; | ||
}(content.locals, newContent.locals)); | ||
if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.'); | ||
update(newContent); | ||
}); | ||
module.hot.dispose(function() { update(); }); | ||
@@ -1071,26 +1119,45 @@ } | ||
// style-loader: Adds some css to the DOM by adding a <style> tag | ||
// load the styles | ||
var content = __webpack_require__(19); | ||
if(typeof content === 'string') content = [[module.i, content, '']]; | ||
// Prepare cssTransformation | ||
var transform; | ||
var insertInto; | ||
var options = {"hmr":true} | ||
options.transform = transform | ||
// add the styles to the DOM | ||
options.insertInto = undefined; | ||
var update = __webpack_require__(2)(content, options); | ||
if(content.locals) module.exports = content.locals; | ||
// Hot Module Replacement | ||
if(false) { | ||
// When the styles change, update the <style> tags | ||
if(!content.locals) { | ||
module.hot.accept("!!../../node_modules/css-loader/index.js??ref--0-oneOf-1-1!./MenuBar.module.css", function() { | ||
var newContent = require("!!../../node_modules/css-loader/index.js??ref--0-oneOf-1-1!./MenuBar.module.css"); | ||
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; | ||
update(newContent); | ||
}); | ||
} | ||
// When the module is disposed, remove the <style> tags | ||
module.hot.accept("!!../../node_modules/css-loader/index.js??ref--0-oneOf-1-1!./MenuBar.module.css", function() { | ||
var newContent = require("!!../../node_modules/css-loader/index.js??ref--0-oneOf-1-1!./MenuBar.module.css"); | ||
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; | ||
var locals = (function(a, b) { | ||
var key, idx = 0; | ||
for(key in a) { | ||
if(!b || a[key] !== b[key]) return false; | ||
idx++; | ||
} | ||
for(key in b) idx--; | ||
return idx === 0; | ||
}(content.locals, newContent.locals)); | ||
if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.'); | ||
update(newContent); | ||
}); | ||
module.hot.dispose(function() { update(); }); | ||
@@ -1097,0 +1164,0 @@ } |
{ | ||
"name": "@aeaton/react-prosemirror", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "A React component for ProseMirror", | ||
@@ -20,7 +20,7 @@ "main": "dist", | ||
"prosemirror-model": "^1.0.0", | ||
"prosemirror-state": "^1.0.1", | ||
"prosemirror-state": "^1.1.0", | ||
"prosemirror-view": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@aeaton/react-prosemirror-config-default": "^0.8.7", | ||
"@aeaton/react-prosemirror-config-default": "^0.8.8", | ||
"babel-core": "^6.26.0", | ||
@@ -33,3 +33,3 @@ "babel-loader": "^7.1.2", | ||
"css-loader": "^0.28.7", | ||
"style-loader": "^0.19.0", | ||
"style-loader": "^0.20.1", | ||
"webpack": "^3.8.1", | ||
@@ -36,0 +36,0 @@ "webpack-node-externals": "^1.6.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45486
1095
Updatedprosemirror-state@^1.1.0