Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

slate-hyperscript

Package Overview
Dependencies
Maintainers
5
Versions
393
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slate-hyperscript - npm Package Compare versions

Comparing version 0.81.3-202211443629 to 0.81.3-202333182430

2

dist/slate-hyperscript.min.js

@@ -8,2 +8,2 @@ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("slate")):"function"==typeof define&&define.amd?define(["exports","slate"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).SlateHyperscript={},t.Slate)}(this,(function(t,e){"use strict";function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t,e){return t(e={exports:{}},e.exports),e.exports}var o=n((function(t){function e(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=e=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),e(r)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0})),u=r(o),i=r(n((function(t){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0})));

*/
function s(t){return"[object Object]"===Object.prototype.toString.call(t)}function f(t){var e,r;return!1!==s(t)&&(void 0===(e=t.constructor)||!1!==s(r=e.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}var a=n((function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0}));r(a);var c=n((function(t){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,u=[],i=!0,s=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(u.push(n.value),!e||u.length!==e);i=!0);}catch(t){s=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return u}},t.exports.default=t.exports,t.exports.__esModule=!0}));r(c);var l=n((function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0}));r(l);var p=n((function(t){t.exports=function(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0}));r(p);var d=n((function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0}));r(d);var h=r(n((function(t){t.exports=function(t,e){return a(t)||c(t,e)||p(t,e)||d()},t.exports.default=t.exports,t.exports.__esModule=!0}))),y=n((function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,e(r,n)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0}));r(y);var x=r(n((function(t){t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0}))),v=n((function(t){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0}));r(v);var b=r(n((function(t){var e=o.default;t.exports=function(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return v(t)},t.exports.default=t.exports,t.exports.__esModule=!0}))),g=r(n((function(t){function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,e(r)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0}))),w=r(n((function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0})));function O(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=g(t);if(e){var o=g(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return b(this,r)}}var m=new WeakMap,j=new WeakMap,_=function t(){w(this,t)},P=function(t){x(r,t);var e=O(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w(this,r),t=e.call(this);var o=n.offset,u=n.path;return t.offset=o,t.path=u,t}return r}(_),S=function(t){x(r,t);var e=O(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};w(this,r),t=e.call(this);var o=n.offset,u=n.path;return t.offset=o,t.path=u,t}return r}(_),M=function(t){return j.get(t)};function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function T(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function A(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return R(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return R(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,i=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){s=!0,u=t},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw u}}}}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var D=new WeakSet,I=function(t){var r,n=[],o=function t(r){if(null!=r){var o=n[n.length-1];if("string"==typeof r){var u={text:r};D.add(u),r=u}if(e.Text.isText(r)){var i=r;e.Text.isText(o)&&D.has(o)&&D.has(i)&&e.Text.equals(o,i,{loose:!0})?o.text+=i.text:n.push(i)}else if(e.Element.isElement(r))n.push(r);else{if(!(r instanceof _))throw new Error("Unexpected hyperscript child object: ".concat(r));var s=n[n.length-1];e.Text.isText(s)||(t(""),s=n[n.length-1]),r instanceof P?function(t,e){var r=t.text.length;m.set(t,[r,e])}(s,r):r instanceof S&&function(t,e){var r=t.text.length;j.set(t,[r,e])}(s,r)}}},u=A(t.flat(1/0));try{for(u.s();!(r=u.n()).done;){o(r.value)}}catch(t){u.e(t)}finally{u.f()}return n};function k(t,e,r){return T(T({},e),{},{children:I(r)})}function B(t,r,n){var o=I(n);if(o.length>1)throw new Error("The <text> hyperscript tag must only contain a single node's worth of children.");var u=h(o,1)[0];if(null==u&&(u={text:""}),!e.Text.isText(u))throw new Error("\n The <text> hyperscript tag can only contain text content as children.");return D.delete(u),Object.assign(u,r),u}var C=function(t){return function(r,n,o){var u,i,s=[],f=A(o);try{for(f.s();!(i=f.n()).done;){var a=i.value;e.Range.isRange(a)?u=a:s.push(a)}}catch(t){f.e(t)}finally{f.f()}var c=I(s),l={},p=t();Object.assign(p,n),p.children=c;var d,y,x=A(e.Node.texts(p));try{for(x.s();!(d=x.n()).done;){var v=h(d.value,2),b=v[0],g=v[1],w=(y=b,m.get(y)),O=M(b);if(null!=w){var j=h(w,1)[0];l.anchor={path:g,offset:j}}if(null!=O){var _=h(O,1)[0];l.focus={path:g,offset:_}}}}catch(t){x.e(t)}finally{x.f()}if(l.anchor&&!l.focus)throw new Error("Slate hyperscript ranges must have both `<anchor />` and `<focus />` defined if one is defined, but you only defined `<anchor />`. For collapsed selections, use `<cursor />` instead.");if(!l.anchor&&l.focus)throw new Error("Slate hyperscript ranges must have both `<anchor />` and `<focus />` defined if one is defined, but you only defined `<focus />`. For collapsed selections, use `<cursor />` instead.");return null!=u?p.selection=u:e.Range.isRange(l)&&(p.selection=l),p}};function U(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function W(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?U(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var q={anchor:function(t,e,r){return new P(e)},cursor:function(t,e,r){return[new P(e),new S(e)]},editor:C(e.createEditor),element:k,focus:function(t,e,r){return new S(e)},fragment:function(t,e,r){return I(r)},selection:function(t,e,r){var n=r.find((function(t){return t instanceof P})),o=r.find((function(t){return t instanceof S}));if(!n||null==n.offset||null==n.path)throw new Error("The <selection> hyperscript tag must have an <anchor> tag as a child with `path` and `offset` attributes defined.");if(!o||null==o.offset||null==o.path)throw new Error("The <selection> hyperscript tag must have a <focus> tag as a child with `path` and `offset` attributes defined.");return T({anchor:{offset:n.offset,path:n.path},focus:{offset:o.offset,path:o.path}},e)},text:B},F=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.elements,r=void 0===e?{}:e,n=N(r),o=W(W(W({},q),n),t.creators),u=H(o);return u},H=function(t){return function(e,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),u=2;u<n;u++)o[u-2]=arguments[u];var i=t[e];if(!i)throw new Error("No hyperscript creator found for tag: <".concat(e,">"));null==r&&(r={}),f(r)||(o=[r].concat(o),r={});var s=i(e,r,o=o.filter((function(t){return Boolean(t)})).flat());return s}},N=function(t){var e={},r=function(r){var n=t[r];if("object"!==u(n))throw new Error("Properties specified for a hyperscript shorthand should be an object, but for the custom element <".concat(r,"> tag you passed: ").concat(n));e[r]=function(t,e,r){return k(0,W(W({},n),e),r)}};for(var n in t)r(n);return e},$=F();t.createEditor=C,t.createHyperscript=F,t.createText=B,t.jsx=$,Object.defineProperty(t,"__esModule",{value:!0})}));
function s(t){return"[object Object]"===Object.prototype.toString.call(t)}function f(t){var e,r;return!1!==s(t)&&(void 0===(e=t.constructor)||!1!==s(r=e.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}var a=n((function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0}));r(a);var c=n((function(t){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,u=[],i=!0,s=!1;try{for(r=r.call(t);!(i=(n=r.next()).done)&&(u.push(n.value),!e||u.length!==e);i=!0);}catch(t){s=!0,o=t}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return u}},t.exports.default=t.exports,t.exports.__esModule=!0}));r(c);var l=n((function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.default=t.exports,t.exports.__esModule=!0}));r(l);var p=n((function(t){t.exports=function(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0}));r(p);var d=n((function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0}));r(d);var h=r(n((function(t){t.exports=function(t,e){return a(t)||c(t,e)||p(t,e)||d()},t.exports.default=t.exports,t.exports.__esModule=!0}))),y=n((function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,e(r,n)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0}));r(y);var x=r(n((function(t){t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)},t.exports.default=t.exports,t.exports.__esModule=!0}))),v=n((function(t){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.default=t.exports,t.exports.__esModule=!0}));r(v);var b=n((function(t){var e=o.default;t.exports=function(t,r){if(r&&("object"===e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return v(t)},t.exports.default=t.exports,t.exports.__esModule=!0})),g=r(b),w=n((function(t){function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,e(r)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0})),O=r(w),m=r(n((function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0})));function j(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=O(t);if(e){var o=O(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return g(this,r)}}var _=new WeakMap,P=new WeakMap,S=function t(){m(this,t)},M=function(t){x(r,t);var e=j(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(this,r),t=e.call(this);var o=n.offset,u=n.path;return t.offset=o,t.path=u,t}return r}(S),E=function(t){x(r,t);var e=j(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(this,r),t=e.call(this);var o=n.offset,u=n.path;return t.offset=o,t.path=u,t}return r}(S),T=function(t){return P.get(t)};function A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function R(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?A(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function D(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return I(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return I(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,i=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){s=!0,u=t},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw u}}}}function I(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var k=new WeakSet,B=function(t){var r,n=[],o=function t(r){if(null!=r){var o=n[n.length-1];if("string"==typeof r){var u={text:r};k.add(u),r=u}if(e.Text.isText(r)){var i=r;e.Text.isText(o)&&k.has(o)&&k.has(i)&&e.Text.equals(o,i,{loose:!0})?o.text+=i.text:n.push(i)}else if(e.Element.isElement(r))n.push(r);else{if(!(r instanceof S))throw new Error("Unexpected hyperscript child object: ".concat(r));var s=n[n.length-1];e.Text.isText(s)||(t(""),s=n[n.length-1]),r instanceof M?function(t,e){var r=t.text.length;_.set(t,[r,e])}(s,r):r instanceof E&&function(t,e){var r=t.text.length;P.set(t,[r,e])}(s,r)}}},u=D(t.flat(1/0));try{for(u.s();!(r=u.n()).done;){o(r.value)}}catch(t){u.e(t)}finally{u.f()}return n};function C(t,e,r){return R(R({},e),{},{children:B(r)})}function U(t,r,n){var o=B(n);if(o.length>1)throw new Error("The <text> hyperscript tag must only contain a single node's worth of children.");var u=h(o,1)[0];if(null==u&&(u={text:""}),!e.Text.isText(u))throw new Error("\n The <text> hyperscript tag can only contain text content as children.");return k.delete(u),Object.assign(u,r),u}var W=function(t){return function(r,n,o){var u,i,s=[],f=D(o);try{for(f.s();!(i=f.n()).done;){var a=i.value;e.Range.isRange(a)?u=a:s.push(a)}}catch(t){f.e(t)}finally{f.f()}var c=B(s),l={},p=t();Object.assign(p,n),p.children=c;var d,y,x=D(e.Node.texts(p));try{for(x.s();!(d=x.n()).done;){var v=h(d.value,2),b=v[0],g=v[1],w=(y=b,_.get(y)),O=T(b);if(null!=w){var m=h(w,1)[0];l.anchor={path:g,offset:m}}if(null!=O){var j=h(O,1)[0];l.focus={path:g,offset:j}}}}catch(t){x.e(t)}finally{x.f()}if(l.anchor&&!l.focus)throw new Error("Slate hyperscript ranges must have both `<anchor />` and `<focus />` defined if one is defined, but you only defined `<anchor />`. For collapsed selections, use `<cursor />` instead.");if(!l.anchor&&l.focus)throw new Error("Slate hyperscript ranges must have both `<anchor />` and `<focus />` defined if one is defined, but you only defined `<focus />`. For collapsed selections, use `<cursor />` instead.");return null!=u?p.selection=u:e.Range.isRange(l)&&(p.selection=l),p}};function q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function F(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?q(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var H={anchor:function(t,e,r){return new M(e)},cursor:function(t,e,r){return[new M(e),new E(e)]},editor:W(e.createEditor),element:C,focus:function(t,e,r){return new E(e)},fragment:function(t,e,r){return B(r)},selection:function(t,e,r){var n=r.find((function(t){return t instanceof M})),o=r.find((function(t){return t instanceof E}));if(!n||null==n.offset||null==n.path)throw new Error("The <selection> hyperscript tag must have an <anchor> tag as a child with `path` and `offset` attributes defined.");if(!o||null==o.offset||null==o.path)throw new Error("The <selection> hyperscript tag must have a <focus> tag as a child with `path` and `offset` attributes defined.");return R({anchor:{offset:n.offset,path:n.path},focus:{offset:o.offset,path:o.path}},e)},text:U},N=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.elements,r=void 0===e?{}:e,n=z(r),o=F(F(F({},H),n),t.creators),u=$(o);return u},$=function(t){return function(e,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),u=2;u<n;u++)o[u-2]=arguments[u];var i=t[e];if(!i)throw new Error("No hyperscript creator found for tag: <".concat(e,">"));null==r&&(r={}),f(r)||(o=[r].concat(o),r={});var s=i(e,r,o=o.filter((function(t){return Boolean(t)})).flat());return s}},z=function(t){var e={},r=function(r){var n=t[r];if("object"!==u(n))throw new Error("Properties specified for a hyperscript shorthand should be an object, but for the custom element <".concat(r,"> tag you passed: ").concat(n));e[r]=function(t,e,r){return C(0,F(F({},n),e),r)}};for(var n in t)r(n);return e},G=N();t.createEditor=W,t.createHyperscript=N,t.createText=U,t.jsx=G,Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "slate-hyperscript",
"description": "A hyperscript helper for creating Slate documents.",
"version": "0.81.3-202211443629",
"version": "0.81.3-202333182430",
"license": "MIT",

@@ -21,7 +21,7 @@ "repository": "git://github.com/ianstormtaylor/slate.git",

"@babel/runtime": "^7.7.4",
"slate": "^0.87.0-202211443629",
"slate": "^0.93.0-202333182430",
"source-map-loader": "^4.0.0"
},
"peerDependencies": {
"slate": ">=0.87.0-202211443629"
"slate": ">=0.93.0-202333182430"
},

@@ -28,0 +28,0 @@ "umdGlobals": {

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