slate-hyperscript
Advanced tools
Comparing version 0.5.14 to 0.5.15
@@ -191,3 +191,5 @@ (function (global, factory) { | ||
var DecoratorPoint = function DecoratorPoint(key, marks) { | ||
var DecoratorPoint = function DecoratorPoint(_ref, marks) { | ||
var key = _ref.key, | ||
data = _ref.data; | ||
classCallCheck(this, DecoratorPoint); | ||
@@ -199,2 +201,5 @@ | ||
this.marks = marks; | ||
this.attribs = data || {}; | ||
this.isAtomic = !!this.attribs.atomic; | ||
delete this.attribs.atomic; | ||
return this; | ||
@@ -229,3 +234,3 @@ }; | ||
if (!(focus instanceof DecoratorPoint)) throw new Error('misaligned decorations'); | ||
return slate.Range.create({ | ||
return slate.Range.create(_extends({ | ||
anchorKey: _this.key, | ||
@@ -235,4 +240,5 @@ focusKey: focus.key, | ||
focusOffset: focus.offset, | ||
marks: _this.marks | ||
}); | ||
marks: _this.marks, | ||
isAtomic: _this.isAtomic | ||
}, _this.attribs)); | ||
}; | ||
@@ -273,3 +279,3 @@ }; | ||
if (attributes.key) { | ||
return new DecoratorPoint(attributes.key, [{ type: tagName }]); | ||
return new DecoratorPoint(attributes, [{ type: tagName }]); | ||
} | ||
@@ -283,3 +289,4 @@ | ||
}, 0), | ||
marks: [{ type: tagName }] | ||
marks: [{ type: tagName }], | ||
isAtomic: !!attributes.data.atomic | ||
}]); | ||
@@ -445,3 +452,3 @@ return nodes; | ||
var key = options.key ? options.key : firstText ? firstText.key : undefined; | ||
var node = slate.Text.create({ key: key }); | ||
var node = slate.Text.create({ key: key, leaves: [{ text: '', marks: options.marks }] }); | ||
@@ -467,5 +474,7 @@ // Create a helper to update the current node while preserving any stored | ||
if (slate.Node.isNode(child) && !slate.Text.isText(child)) { | ||
if (node.text.length || node.__anchor != null || node.__focus != null) array.push(node); | ||
if (node.text.length || node.__anchor != null || node.__focus != null || node.getMarksAtIndex(0).size) { | ||
array.push(node); | ||
} | ||
array.push(child); | ||
node = isLast ? null : slate.Text.create(); | ||
node = isLast ? null : slate.Text.create({ leaves: [{ text: '', marks: options.marks }] }); | ||
length = 0; | ||
@@ -472,0 +481,0 @@ } |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("slate")):"function"==typeof define&&define.amd?define(["exports","slate"],t):t(e.SlateHyperscript={},e.Slate)}(this,function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;var o=function(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return 0===e;if("string"==typeof e)return 0===e.length;if("function"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return""===e.message;if(e.toString==r)switch(e.toString()){case"[object File]":case"[object Map]":case"[object Set]":return 0===e.size;case"[object Object]":for(var t in e)if(n.call(e,t))return!1;return!0}return!1},c=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)};function i(e){return!0===c(e)&&"[object Object]"===Object.prototype.toString.call(e)}var a=function(e){var t,n;return!1!==i(e)&&("function"==typeof(t=e.constructor)&&(!1!==i(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")))},u=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},f=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},s={},l={},y={},h=function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),d.call(this),this._key=t,this.marks=n,this},d=function(){var e=this;this.withPosition=function(t){return e.offset=t,e},this.addOffset=function(t){return e.offset+=t,e},this.withKey=function(t){return e.key=t,e},this.combine=function(n){if(!(n instanceof h))throw new Error("misaligned decorations");return t.Range.create({anchorKey:e.key,focusKey:n.key,anchorOffset:e.offset,focusOffset:n.offset,marks:e.marks})}},p={anchor:function(e,t,n){return s},block:function(e,n,r){return t.Block.create(u({},n,{nodes:k(r)}))},cursor:function(e,t,n){return l},document:function(e,n,r){return t.Document.create(u({},n,{nodes:k(r)}))},focus:function(e,t,n){return y},inline:function(e,n,r){return t.Inline.create(u({},n,{nodes:k(r)}))},mark:function(e,n,r){return k(r,{marks:t.Mark.createSet([n])})},decoration:function(e,t,n){if(t.key)return new h(t.key,[{type:e}]);var r=k(n,{key:t.key});return r[0].__decorations=(r[0].__decorations||[]).concat([{anchorOffset:0,focusOffset:r.reduce(function(e,t){return e+t.text.length},0),marks:[{type:e}]}]),r},selection:function(e,n,r){return t.Range.create(n)},value:function(e,n,r){var c=n.data,i=n.normalize,a=void 0===i||i,f=r.find(t.Document.isDocument),s=r.find(t.Range.isRange)||t.Range.create(),l={},y=[],h={};if(f&&(f.getTexts().forEach(function(e){null!=e.__anchor&&(l.anchorKey=e.key,l.anchorOffset=e.__anchor,l.isFocused=!0),null!=e.__focus&&(l.focusKey=e.key,l.focusOffset=e.__focus,l.isFocused=!0)}),f.getTexts().forEach(function(e){null!=e.__decorations&&(y=y.concat(e.__decorations.filter(function(e){return void 0===e._key}).map(function(n){return t.Range.create(u({},n,{anchorKey:e.key,focusKey:e.key}))})),e.__decorations.filter(function(e){return void 0!==e._key}).forEach(function(t){if(h[t._key])return y.push(h[t._key].combine(t.withKey(e.key))),void delete h[t._key];h[t._key]=t.withKey(e.key)}))})),Object.keys(h).length>0)throw new Error("Slate hyperscript must have both an anchor and focus defined for each keyed decorator.");if(l.anchorKey&&!l.focusKey)throw new Error("Slate hyperscript must have both `<anchor/>` and `<focus/>` defined if one is defined, but you only defined `<anchor/>`. For collapsed selections, use `<cursor/>`.");if(!l.anchorKey&&l.focusKey)throw new Error("Slate hyperscript must have both `<anchor/>` and `<focus/>` defined if one is defined, but you only defined `<focus/>`. For collapsed selections, use `<cursor/>`.");o(l)||(s=s.merge(l).normalize(f));var d=t.Value.fromJSON({data:c,document:f,selection:s},{normalize:a});return y.length>0&&(d=d.change().setValue({decorations:y.map(function(e){return e.normalize(f)})}).value),d},text:function(e,t,n){return k(n,{key:t.key})}};function _(){var e=function(e){var t=e.blocks,n=void 0===t?{}:t,r=e.inlines,o=void 0===r?{}:r,c=e.marks,i=void 0===c?{}:c,f=e.decorators,s=void 0===f?{}:f,l=u({},p,e.creators||{});return Object.keys(n).map(function(e){l[e]=g(e,n[e],"block")}),Object.keys(o).map(function(e){l[e]=g(e,o[e],"inline")}),Object.keys(i).map(function(e){l[e]=function(e,t){if("function"==typeof t)return t;if("string"==typeof t&&(t={type:t}),a(t))return function(e,n,r){var o=u({},t,{data:u({},t.data||{},n)});return p.mark(e,o,r)};throw new Error("Slate hyperscript mark creators can be either functions, objects or strings, but you passed: "+t)}(0,i[e])}),Object.keys(s).map(function(e){l[e]=g(e,s[e],"decoration")}),l}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return function(t,n){for(var r=arguments.length,o=Array(r>2?r-2:0),c=2;c<r;c++)o[c-2]=arguments[c];var i=e[t];if(!i)throw new Error('No hyperscript creator found for tag: "'+t+'"');return null==n&&(n={}),a(n)||(o=[n].concat(o),n={}),i(t,n,o=o.filter(function(e){return Boolean(e)}).reduce(function(e,t){return e.concat(t)},[]))}}function k(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],o=0,c=e.find(function(e){return"string"!=typeof e}),i=t.Text.isText(c)?c:null,a=n.key?n.key:i?i.key:void 0,f=t.Text.create({key:a});function d(e){var t=f,n=t.__anchor,r=t.__focus,o=t.__decorations;null!=n&&(e.__anchor=n),null!=r&&(e.__focus=r),null!=o&&(e.__decorations=o),f=e}return e.forEach(function(c,i){var a=i===e.length-1;if(t.Node.isNode(c)&&!t.Text.isText(c)&&((f.text.length||null!=f.__anchor||null!=f.__focus)&&r.push(f),r.push(c),f=a?null:t.Text.create(),o=0),"string"==typeof c&&(d(f.insertText(f.text.length,c,n.marks)),o+=c.length),t.Text.isText(c)){var p=c.__anchor,_=c.__focus,k=c.__decorations,g=f.text.length;n.key||0!=f.text.length||d(f.set("key",c.key)),c.getLeaves().forEach(function(e){var t=e.marks;n.marks&&(t=t.union(n.marks)),d(f.insertText(g,e.text,t)),g+=e.text.length}),null!=p&&(f.__anchor=p+o),null!=_&&(f.__focus=_+o),null!=k&&(f.__decorations=(f.__decorations||[]).concat(k.map(function(e){return e instanceof h?e.addOffset(o):u({},e,{anchorOffset:e.anchorOffset+o,focusOffset:e.focusOffset+o})}))),o+=c.text.length}c!=s&&c!=l||(f.__anchor=o),c!=y&&c!=l||(f.__focus=o),c instanceof h&&(f.__decorations=(f.__decorations||[]).concat([c.withPosition(o)]))}),null!=f&&r.push(f),r}function g(e,t,n){if("function"==typeof t)return t;if("string"==typeof t&&(t={type:t}),a(t))return function(e,r,o){var c=r.key,i=f(r,["key"]),a=u({},t,{object:n,key:c,data:u({},t.data||{},i)});return p[n](e,a,o)};throw new Error("Slate hyperscript "+n+" creators can be either functions, objects or strings, but you passed: "+t)}var v=_();e.default=v,e.createHyperscript=_,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("slate")):"function"==typeof define&&define.amd?define(["exports","slate"],t):t(e.SlateHyperscript={},e.Slate)}(this,function(e,t){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;var o=function(e){if(null==e)return!0;if("boolean"==typeof e)return!1;if("number"==typeof e)return 0===e;if("string"==typeof e)return 0===e.length;if("function"==typeof e)return 0===e.length;if(Array.isArray(e))return 0===e.length;if(e instanceof Error)return""===e.message;if(e.toString==r)switch(e.toString()){case"[object File]":case"[object Map]":case"[object Set]":return 0===e.size;case"[object Object]":for(var t in e)if(n.call(e,t))return!1;return!0}return!1},c=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)};function i(e){return!0===c(e)&&"[object Object]"===Object.prototype.toString.call(e)}var a=function(e){var t,n;return!1!==i(e)&&("function"==typeof(t=e.constructor)&&(!1!==i(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")))},s=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},u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},f={},l={},y={},h=function e(t,n){var r=t.key,o=t.data;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),d.call(this),this._key=r,this.marks=n,this.attribs=o||{},this.isAtomic=!!this.attribs.atomic,delete this.attribs.atomic,this},d=function(){var e=this;this.withPosition=function(t){return e.offset=t,e},this.addOffset=function(t){return e.offset+=t,e},this.withKey=function(t){return e.key=t,e},this.combine=function(n){if(!(n instanceof h))throw new Error("misaligned decorations");return t.Range.create(s({anchorKey:e.key,focusKey:n.key,anchorOffset:e.offset,focusOffset:n.offset,marks:e.marks,isAtomic:e.isAtomic},e.attribs))}},p={anchor:function(e,t,n){return f},block:function(e,n,r){return t.Block.create(s({},n,{nodes:k(r)}))},cursor:function(e,t,n){return l},document:function(e,n,r){return t.Document.create(s({},n,{nodes:k(r)}))},focus:function(e,t,n){return y},inline:function(e,n,r){return t.Inline.create(s({},n,{nodes:k(r)}))},mark:function(e,n,r){return k(r,{marks:t.Mark.createSet([n])})},decoration:function(e,t,n){if(t.key)return new h(t,[{type:e}]);var r=k(n,{key:t.key});return r[0].__decorations=(r[0].__decorations||[]).concat([{anchorOffset:0,focusOffset:r.reduce(function(e,t){return e+t.text.length},0),marks:[{type:e}],isAtomic:!!t.data.atomic}]),r},selection:function(e,n,r){return t.Range.create(n)},value:function(e,n,r){var c=n.data,i=n.normalize,a=void 0===i||i,u=r.find(t.Document.isDocument),f=r.find(t.Range.isRange)||t.Range.create(),l={},y=[],h={};if(u&&(u.getTexts().forEach(function(e){null!=e.__anchor&&(l.anchorKey=e.key,l.anchorOffset=e.__anchor,l.isFocused=!0),null!=e.__focus&&(l.focusKey=e.key,l.focusOffset=e.__focus,l.isFocused=!0)}),u.getTexts().forEach(function(e){null!=e.__decorations&&(y=y.concat(e.__decorations.filter(function(e){return void 0===e._key}).map(function(n){return t.Range.create(s({},n,{anchorKey:e.key,focusKey:e.key}))})),e.__decorations.filter(function(e){return void 0!==e._key}).forEach(function(t){if(h[t._key])return y.push(h[t._key].combine(t.withKey(e.key))),void delete h[t._key];h[t._key]=t.withKey(e.key)}))})),Object.keys(h).length>0)throw new Error("Slate hyperscript must have both an anchor and focus defined for each keyed decorator.");if(l.anchorKey&&!l.focusKey)throw new Error("Slate hyperscript must have both `<anchor/>` and `<focus/>` defined if one is defined, but you only defined `<anchor/>`. For collapsed selections, use `<cursor/>`.");if(!l.anchorKey&&l.focusKey)throw new Error("Slate hyperscript must have both `<anchor/>` and `<focus/>` defined if one is defined, but you only defined `<focus/>`. For collapsed selections, use `<cursor/>`.");o(l)||(f=f.merge(l).normalize(u));var d=t.Value.fromJSON({data:c,document:u,selection:f},{normalize:a});return y.length>0&&(d=d.change().setValue({decorations:y.map(function(e){return e.normalize(u)})}).value),d},text:function(e,t,n){return k(n,{key:t.key})}};function _(){var e=function(e){var t=e.blocks,n=void 0===t?{}:t,r=e.inlines,o=void 0===r?{}:r,c=e.marks,i=void 0===c?{}:c,u=e.decorators,f=void 0===u?{}:u,l=s({},p,e.creators||{});return Object.keys(n).map(function(e){l[e]=m(e,n[e],"block")}),Object.keys(o).map(function(e){l[e]=m(e,o[e],"inline")}),Object.keys(i).map(function(e){l[e]=function(e,t){if("function"==typeof t)return t;if("string"==typeof t&&(t={type:t}),a(t))return function(e,n,r){var o=s({},t,{data:s({},t.data||{},n)});return p.mark(e,o,r)};throw new Error("Slate hyperscript mark creators can be either functions, objects or strings, but you passed: "+t)}(0,i[e])}),Object.keys(f).map(function(e){l[e]=m(e,f[e],"decoration")}),l}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return function(t,n){for(var r=arguments.length,o=Array(r>2?r-2:0),c=2;c<r;c++)o[c-2]=arguments[c];var i=e[t];if(!i)throw new Error('No hyperscript creator found for tag: "'+t+'"');return null==n&&(n={}),a(n)||(o=[n].concat(o),n={}),i(t,n,o=o.filter(function(e){return Boolean(e)}).reduce(function(e,t){return e.concat(t)},[]))}}function k(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],o=0,c=e.find(function(e){return"string"!=typeof e}),i=t.Text.isText(c)?c:null,a=n.key?n.key:i?i.key:void 0,u=t.Text.create({key:a,leaves:[{text:"",marks:n.marks}]});function d(e){var t=u,n=t.__anchor,r=t.__focus,o=t.__decorations;null!=n&&(e.__anchor=n),null!=r&&(e.__focus=r),null!=o&&(e.__decorations=o),u=e}return e.forEach(function(c,i){var a=i===e.length-1;if(t.Node.isNode(c)&&!t.Text.isText(c)&&((u.text.length||null!=u.__anchor||null!=u.__focus||u.getMarksAtIndex(0).size)&&r.push(u),r.push(c),u=a?null:t.Text.create({leaves:[{text:"",marks:n.marks}]}),o=0),"string"==typeof c&&(d(u.insertText(u.text.length,c,n.marks)),o+=c.length),t.Text.isText(c)){var p=c.__anchor,_=c.__focus,k=c.__decorations,m=u.text.length;n.key||0!=u.text.length||d(u.set("key",c.key)),c.getLeaves().forEach(function(e){var t=e.marks;n.marks&&(t=t.union(n.marks)),d(u.insertText(m,e.text,t)),m+=e.text.length}),null!=p&&(u.__anchor=p+o),null!=_&&(u.__focus=_+o),null!=k&&(u.__decorations=(u.__decorations||[]).concat(k.map(function(e){return e instanceof h?e.addOffset(o):s({},e,{anchorOffset:e.anchorOffset+o,focusOffset:e.focusOffset+o})}))),o+=c.text.length}c!=f&&c!=l||(u.__anchor=o),c!=y&&c!=l||(u.__focus=o),c instanceof h&&(u.__decorations=(u.__decorations||[]).concat([c.withPosition(o)]))}),null!=u&&r.push(u),r}function m(e,t,n){if("function"==typeof t)return t;if("string"==typeof t&&(t={type:t}),a(t))return function(e,r,o){var c=r.key,i=u(r,["key"]),a=s({},t,{object:n,key:c,data:s({},t.data||{},i)});return p[n](e,a,o)};throw new Error("Slate hyperscript "+n+" creators can be either functions, objects or strings, but you passed: "+t)}var v=_();e.default=v,e.createHyperscript=_,Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -72,3 +72,5 @@ import isEmpty from 'is-empty'; | ||
var DecoratorPoint = function DecoratorPoint(key, marks) { | ||
var DecoratorPoint = function DecoratorPoint(_ref, marks) { | ||
var key = _ref.key, | ||
data = _ref.data; | ||
classCallCheck(this, DecoratorPoint); | ||
@@ -80,2 +82,5 @@ | ||
this.marks = marks; | ||
this.attribs = data || {}; | ||
this.isAtomic = !!this.attribs.atomic; | ||
delete this.attribs.atomic; | ||
return this; | ||
@@ -110,3 +115,3 @@ }; | ||
if (!(focus instanceof DecoratorPoint)) throw new Error('misaligned decorations'); | ||
return Range.create({ | ||
return Range.create(_extends({ | ||
anchorKey: _this.key, | ||
@@ -116,4 +121,5 @@ focusKey: focus.key, | ||
focusOffset: focus.offset, | ||
marks: _this.marks | ||
}); | ||
marks: _this.marks, | ||
isAtomic: _this.isAtomic | ||
}, _this.attribs)); | ||
}; | ||
@@ -154,3 +160,3 @@ }; | ||
if (attributes.key) { | ||
return new DecoratorPoint(attributes.key, [{ type: tagName }]); | ||
return new DecoratorPoint(attributes, [{ type: tagName }]); | ||
} | ||
@@ -164,3 +170,4 @@ | ||
}, 0), | ||
marks: [{ type: tagName }] | ||
marks: [{ type: tagName }], | ||
isAtomic: !!attributes.data.atomic | ||
}]); | ||
@@ -326,3 +333,3 @@ return nodes; | ||
var key = options.key ? options.key : firstText ? firstText.key : undefined; | ||
var node = Text.create({ key: key }); | ||
var node = Text.create({ key: key, leaves: [{ text: '', marks: options.marks }] }); | ||
@@ -348,5 +355,7 @@ // Create a helper to update the current node while preserving any stored | ||
if (Node.isNode(child) && !Text.isText(child)) { | ||
if (node.text.length || node.__anchor != null || node.__focus != null) array.push(node); | ||
if (node.text.length || node.__anchor != null || node.__focus != null || node.getMarksAtIndex(0).size) { | ||
array.push(node); | ||
} | ||
array.push(child); | ||
node = isLast ? null : Text.create(); | ||
node = isLast ? null : Text.create({ leaves: [{ text: '', marks: options.marks }] }); | ||
length = 0; | ||
@@ -353,0 +362,0 @@ } |
@@ -78,3 +78,5 @@ 'use strict'; | ||
var DecoratorPoint = function DecoratorPoint(key, marks) { | ||
var DecoratorPoint = function DecoratorPoint(_ref, marks) { | ||
var key = _ref.key, | ||
data = _ref.data; | ||
classCallCheck(this, DecoratorPoint); | ||
@@ -86,2 +88,5 @@ | ||
this.marks = marks; | ||
this.attribs = data || {}; | ||
this.isAtomic = !!this.attribs.atomic; | ||
delete this.attribs.atomic; | ||
return this; | ||
@@ -116,3 +121,3 @@ }; | ||
if (!(focus instanceof DecoratorPoint)) throw new Error('misaligned decorations'); | ||
return slate.Range.create({ | ||
return slate.Range.create(_extends({ | ||
anchorKey: _this.key, | ||
@@ -122,4 +127,5 @@ focusKey: focus.key, | ||
focusOffset: focus.offset, | ||
marks: _this.marks | ||
}); | ||
marks: _this.marks, | ||
isAtomic: _this.isAtomic | ||
}, _this.attribs)); | ||
}; | ||
@@ -160,3 +166,3 @@ }; | ||
if (attributes.key) { | ||
return new DecoratorPoint(attributes.key, [{ type: tagName }]); | ||
return new DecoratorPoint(attributes, [{ type: tagName }]); | ||
} | ||
@@ -170,3 +176,4 @@ | ||
}, 0), | ||
marks: [{ type: tagName }] | ||
marks: [{ type: tagName }], | ||
isAtomic: !!attributes.data.atomic | ||
}]); | ||
@@ -332,3 +339,3 @@ return nodes; | ||
var key = options.key ? options.key : firstText ? firstText.key : undefined; | ||
var node = slate.Text.create({ key: key }); | ||
var node = slate.Text.create({ key: key, leaves: [{ text: '', marks: options.marks }] }); | ||
@@ -354,5 +361,7 @@ // Create a helper to update the current node while preserving any stored | ||
if (slate.Node.isNode(child) && !slate.Text.isText(child)) { | ||
if (node.text.length || node.__anchor != null || node.__focus != null) array.push(node); | ||
if (node.text.length || node.__anchor != null || node.__focus != null || node.getMarksAtIndex(0).size) { | ||
array.push(node); | ||
} | ||
array.push(child); | ||
node = isLast ? null : slate.Text.create(); | ||
node = isLast ? null : slate.Text.create({ leaves: [{ text: '', marks: options.marks }] }); | ||
length = 0; | ||
@@ -359,0 +368,0 @@ } |
{ | ||
"name": "slate-hyperscript", | ||
"description": "A hyperscript helper for creating Slate documents.", | ||
"version": "0.5.14", | ||
"version": "0.5.15", | ||
"license": "MIT", | ||
@@ -25,3 +25,3 @@ "repository": "git://github.com/ianstormtaylor/slate.git", | ||
"mocha": "^2.5.3", | ||
"slate": "^0.33.8" | ||
"slate": "^0.34.0" | ||
}, | ||
@@ -28,0 +28,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
105732
1395