slate/dist/index.js

10 lines
336 KiB
JavaScript
Raw Normal View History

2020-07-29 02:43:00 +03:00
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),n=e(t),r=require("@emotion/react"),o=e(require("react-dom")),i={navigation:1,sidebar:2,modal:3,tooltip:4,header:5},a={text:"'inter-regular', -apple-system, BlinkMacSystemFont, arial, sans-serif",semiBold:"'inter-semi-bold', -apple-system, BlinkMacSystemFont, arial, sans-serif",medium:"'inter-medium', -apple-system, BlinkMacSystemFont, arial, sans-serif",mono:"'mono', monaco, monospace",monoBold:"'mono-bold', monaco, monospace",monoCode:"'fira-code-regular', mono, monospace",monoCodeBold:"'fira-code-bold', mono-bold, monospace",code:"'jet-brains-regular', mono, monospace",codeBold:"'jet-brains-bold', mono, monospace"},s={lvl1:"1rem",lvl2:"1.25rem",lvl3:"1.563rem",lvl4:"1.953rem"},l={white:"#ffffff",foreground:"#f7f7f7",gray:"#e5e5e5",border:"#d8d8d8",darkGray:"#b2b2b2",black:"#1b1f23",pitchBlack:"#0c0c0c",brand:"#0047FF",link:"#2935ff",green:"#28a745",yellow:" #FFC940",red:"#ff0000"},u={foreground:l.white,ctaBackground:l.brand,pageBackground:l.foreground,pageText:l.black},c=Object.freeze({__proto__:null,values:{version:"0.0.6",sds:"0.0.6"},sizes:{navigation:288,sidebar:416,header:72},zindex:i,font:a,typescale:s,system:l,code:{},theme:u});var d=function(e){if(Array.isArray(e))return e};var f=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}};var p=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r};var h=function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}};var m=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.")};var v=function(e,t){return d(e)||f(e,t)||h(e,t)||m()};var g=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function y(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function w(e,t){return e(t={exports:{}},t.exports),t.exports}var x=w((function(e){function t(){return e.exports=t=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},t.apply(this,arguments)}e.exports=t}));var _=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t};var k=function(){function e(e){this.isSpeedy=void 0===e.speedy?"production"===process.env.NODE_ENV:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.before=null}var t=e.prototype;return t.insert=function(e){if(this.ctr%(this.isSpeedy?65e3:1)==0){var t,n=function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(r);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule
//! moment.js
2020-07-29 02:43:00 +03:00
r.version="2.27.0",t=Ct,r.fn=gn,r.min=function(){var e=[].slice.call(arguments,0);return Et("isBefore",e)},r.max=function(){var e=[].slice.call(arguments,0);return Et("isAfter",e)},r.now=function(){return Date.now?Date.now():+new Date},r.utc=p,r.unix=function(e){return Ct(1e3*e)},r.months=function(e,t){return xn(e,t,"months")},r.isDate=c,r.locale=at,r.invalid=v,r.duration=Wt,r.isMoment=_,r.weekdays=function(e,t,n){return _n(e,t,n,"weekdays")},r.parseZone=function(){return Ct.apply(null,arguments).parseZone()},r.localeData=lt,r.isDuration=Rt,r.monthsShort=function(e,t){return xn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return _n(e,t,n,"weekdaysMin")},r.defineLocale=st,r.updateLocale=function(e,t){if(null!=t){var n,r,o=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(E(tt[e]._config,t)):(null!=(r=it(e))&&(o=r._config),t=E(o,t),null==r&&(t.abbr=e),(n=new P(t)).parentLocale=tt[e],tt[e]=n),at(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===at()&&at(e)):null!=tt[e]&&delete tt[e]);return tt[e]},r.locales=function(){return O(tt)},r.weekdaysShort=function(e,t,n){return _n(e,t,n,"weekdaysShort")},r.normalizeUnits=B,r.relativeTimeRounding=function(e){return void 0===e?Vn:"function"==typeof e&&(Vn=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==$n[e]&&(void 0===t?$n[e]:($n[e]=t,"s"===e&&($n.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=gn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}));function Ks(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qt(e);if(t){var o=Qt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Jt(this,n)}}function Xs(){var e=g(["\n box-sizing: border-box;\n cursor: pointer;\n margin: 0 10px;\n\n :hover {\n color: ",";\n }\n"]);return Xs=function(){return e},e}function Js(){var e=g(["\n box-sizing: border-box;\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n grid-template-rows: repeat(6, 40px);\n align-items: center;\n text-align: center;\n width: 100%;\n color: ",";\n margin: 5px 0;\n"]);return Js=function(){return e},e}function Qs(){var e=g(["\n box-sizing: border-box;\n font-size: 0.9em;\n cursor: not-allowed;\n color: "," !important;\n"]);return Qs=function(){return e},e}function el(){var e=g(["\n box-sizing: border-box;\n font-size: 0.9em;\n position: relative;\n cursor: pointer;\n\n :hover {\n color: ",' !important;\n }\n\n &:after {\n position: absolute;\n top: calc(50% - 15px);\n left: calc(50% - 15px);\n content: "";\n width: 30px;\n height: 30px;\n border-radius: 50%;\n border: 1px solid ',";\n }\n"]);return el=function(){return e},e}function tl(){var e=g(["\n box-sizing: border-box;\n font-size: 0.9em;\n cursor: pointer;\n\n :hover {\n color: "," !important;\n }\n"]);return tl=function(){return e},e}function nl(){var e=g(["\n box-sizing: border-box;\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n text-align: center;\n width: 100%;\n color: ",";\n margin: 10px 0;\n font-size: 0.9em;\n border-bottom: 1px solid ",";\n padding-bottom: 10px;\n"]);return nl=function(){return e},e}function rl(){var e=g(["\n box-sizing: border-box;\n text-align: center;\n font-size: ",";\n margin: 10px 0;\n"]);return rl=function(){return e},e}function ol(){var e=g(["\n box-sizing: border-box;\n display: grid;\n grid-template-columns: 30px 1fr 30px;\n align-items: center;\n"]);return ol=function(){return e},e}function il(){var e=g(["\n box-sizing: bo
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
2020-07-29 02:43:00 +03:00
!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)&&o.length){var a=n.apply(null,o);a&&e.push(a)}else if("object"===i)for(var s in o)t.call(o,s)&&o[s]&&e.push(s)}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()})),pu=w((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.findInArray=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},t.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},t.isNum=function(e){return"number"==typeof e&&!isNaN(e)},t.int=function(e){return parseInt(e,10)},t.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))}}));b(pu);pu.findInArray,pu.isFunction,pu.isNum,pu.dontSetMe;var hu=w((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getPrefix=r,t.browserPrefixToKey=o,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0;var n=["Moz","Webkit","O","ms"];function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var t=window.document.documentElement.style;if(e in t)return"";for(var r=0;r<n.length;r++)if(o(e,n[r])in t)return n[r];return""}function o(e,t){return t?"".concat(t).concat(function(e){for(var t="",n=!0,r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}var i=r();t.default=i}));b(hu);hu.getPrefix,hu.browserPrefixToKey,hu.browserPrefixToStyle;var mu=w((function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.matchesSelector=u,t.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(u(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.addEvent=function(e,t,n,r){if(!e)return;var o=a({capture:!0},r);e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.removeEvent=function(e,t,n,r){if(!e)return;var o=a({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,pu.int)(n.borderTopWidth),t+=(0,pu.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,pu.int)(n.borderLeftWidth),t+=(0,pu.int)(n.borderRightWidth)},t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,pu.int)(n.paddingTop),t-=(0,pu.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,pu.int)(n.paddingLeft),t-=(0,pu.int)(n.paddingRight)},t.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},t.createCSSTransform=function(e,t){var n=c(e,t,"px");return s({},(0,r.browserPrefixToKey)("transform",r.default),n)},t.createSVGTransform=function(e,t){return c(e,t,"")},t.getTranslation=c,t.getTouch=function(e,t){return e.targetTouches&&(0,pu.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,pu.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-