diff --git a/.babelrc b/.babelrc index 1320b9a..1f7c097 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,11 @@ { - "presets": ["@babel/preset-env"] + "presets": [ + [ + "@babel/preset-env", + { + "targets": "> 0.25%, not dead", + "modules": false + } + ] + ] } diff --git a/.npmignore b/.npmignore index 8daa963..fb45a15 100644 --- a/.npmignore +++ b/.npmignore @@ -17,4 +17,5 @@ package-lock.json webpack.config.js CODE_OF_CONDUCT.md CONTRIBUTING.md -DOCUMENTATION.md \ No newline at end of file +DOCUMENTATION.md +rollup.config.js \ No newline at end of file diff --git a/dist/index.browser.js b/dist/index.browser.js deleted file mode 100644 index 9d9a736..0000000 --- a/dist/index.browser.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(()=>(()=>{var e={470:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,s=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},o=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,s=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!s&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},c=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(s)return s(e,n).value}return e[n]};e.exports=function e(){var t,n,r,s,l,u,h=arguments[0],f=1,p=arguments.length,d=!1;for("boolean"==typeof h&&(d=h,h=arguments[1]||{},f=2),(null==h||"object"!=typeof h&&"function"!=typeof h)&&(h={});f
{!function(){var t;function n(e){for(var t,n,r,s,i=1,o=[].slice.call(arguments),a=0,c=e.length,l="",u=!1,h=!1,f=function(){return o[i++]},p=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null};ai))return;const n=t.events.length;let s,a,c=n;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(s){a=t.events[c][1].end;break}s=!0}for(g(o),e=n;e1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const h=Object.assign({},e[n][1].end),f=Object.assign({},e[u][1].start);Be(h,-a),Be(f,a),i={type:a>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[n][1].end)},o={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:f},s={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:a>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},o.end)},e[n][1].end=Object.assign({},i.start),e[u][1].start=Object.assign({},o.end),c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=A(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=A(c,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",s,t]]),c=A(c,ee(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),c=A(c,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(l=2,c=A(c,[["enter",e[u][1],t],["exit",e[u][1],t]])):l=0,T(e,n-1,u-n+3,c),u=n+c.length-l-2;break}u=-1;for(;++ur)return!0;if(n=t+1,s-n<=r)return!1}return!0}(n,c,l.length));if(!n)return u?"|\n":">\n";let h,f;for(f=n.length;f>0;--f){const e=n[f-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let p=n.substring(f);const d=p.indexOf("\n");-1===d?h="-":n===p||d!==p.length-1?(h="+",i&&i()):h="",p&&(n=n.slice(0,-p.length),"\n"===p[p.length-1]&&(p=p.slice(0,-1)),p=p.replace(Ha,`$&${l}`));let m,E=!1,g=-1;for(m=0;mi))return;const n=t.events.length;let s,a,c=n;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(s){a=t.events[c][1].end;break}s=!0}for(T(o),e=n;e1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const h=Object.assign({},e[n][1].end),p=Object.assign({},e[u][1].start);Be(h,-a),Be(p,a),i={type:a>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[n][1].end)},o={type:a>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[u][1].start),end:p},s={type:a>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[u][1].start)},r={type:a>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},o.end)},e[n][1].end=Object.assign({},i.start),e[u][1].start=Object.assign({},o.end),c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=T(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=T(c,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",s,t]]),c=T(c,Z(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),c=T(c,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(l=2,c=T(c,[["enter",e[u][1],t],["exit",e[u][1],t]])):l=0,g(e,n-1,u-n+3,c),u=n+c.length-l-2;break}u=-1;for(;++ui))return;const n=t.events.length;let s,a,c=n;for(;c--;)if("exit"===t.events[c][0]&&"chunkFlow"===t.events[c][1].type){if(s){a=t.events[c][1].end;break}s=!0}for(T(o),e=n;er)return!0;if(n=t+1,s-n<=r)return!1}return!0}(n,c,l.length));if(!n)return u?"|\n":">\n";let h,p;for(p=n.length;p>0;--p){const e=n[p-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let f=n.substring(p);const d=f.indexOf("\n");-1===d?h="-":n===f||d!==f.length-1?(h="+",i&&i()):h="",f&&(n=n.slice(0,-f.length),"\n"===f[f.length-1]&&(f=f.slice(0,-1)),f=f.replace(za,`$&${l}`));let m,E=!1,g=-1;for(m=0;m