cake-editor 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/index.js +9 -0
  2. package/package.json +1 -1
package/build/index.js ADDED
@@ -0,0 +1,9 @@
1
+ module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";e.exports=n(6)},function(e,t,n){"use strict";n.r(t);n(2);var r=n(0);t.default=function(){var e=4,t=function(t){var n=t.currentTarget.id;if("plus"===n){if(7===e)return;e++,document.execCommand("styleWithCSS",!1,!0),document.execCommand("fontSize",!1,e)}else if("minus"===n){if(1===e)return;e--,document.execCommand("styleWithCSS",!1,!0),document.execCommand("fontSize",!1,e)}else document.execCommand(n,!1,n)};return Object(r.jsxs)("div",{className:"root",children:[Object(r.jsxs)("div",{className:"buttons_list",children:[Object(r.jsx)("button",{className:"btn",id:"bold",onClick:function(e){return t(e)},children:Object(r.jsx)("i",{className:"fa-solid fa-bold"})}),Object(r.jsx)("button",{className:"btn",id:"italic",onClick:function(e){return t(e)},children:Object(r.jsx)("i",{className:"fa-solid fa-italic"})}),Object(r.jsx)("button",{className:"btn",id:"underline",onClick:function(e){return t(e)},children:Object(r.jsx)("i",{className:"fa-solid fa-underline"})}),Object(r.jsx)("button",{className:"btn",id:"justifyLeft",onClick:function(e){return t(e)},children:Object(r.jsx)("i",{className:"fa-solid fa-align-left"})}),Object(r.jsx)("button",{className:"btn",id:"justifyCenter",onClick:function(e){return t(e)},children:Object(r.jsx)("i",{className:"fa-solid fa-align-center"})}),Object(r.jsx)("button",{className:"btn",id:"justifyRight",onClick:function(e){return t(e)},children:Object(r.jsx)("i",{className:"fa-solid fa-align-right"})}),Object(r.jsx)("button",{className:"btn",id:"justifyFull",onClick:function(e){return t(e)},children:Object(r.jsx)("i",{className:"fa-solid fa-align-justify"})}),Object(r.jsx)("button",{className:"btn",id:"insertOrderedList",onClick:function(e){return t(e)},children:Object(r.jsx)("i",{className:"fa-solid fa-list-ol"})}),Object(r.jsx)("button",{className:"btn",id:"insertUnorderedList",onClick:function(e){return t(e)},children:Object(r.jsx)("i",{className:"fa-solid fa-list"})}),Object(r.jsx)("button",{className:"btn",id:"plus",onClick:function(e){return t(e)},children:Object(r.jsx)("i",{className:"fa-solid fa-plus"})}),Object(r.jsx)("button",{className:"btn",id:"minus",onClick:function(e){return t(e)},children:Object(r.jsx)("i",{className:"fa-solid fa-minus"})})]}),Object(r.jsx)("div",{contentEditable:!0,id:"content"})]})}},function(e,t,n){var r=n(3),i=n(4);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var o={insert:"head",singleton:!1};r(i,o);e.exports=i.locals||{}},function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),c=[];function a(e){for(var t=-1,n=0;n<c.length;n++)if(c[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],i=0;i<e.length;i++){var o=e[i],s=t.base?o[0]+t.base:o[0],u=n[s]||0,l="".concat(s," ").concat(u);n[s]=u+1;var f=a(l),d={css:o[1],media:o[2],sourceMap:o[3]};-1!==f?(c[f].references++,c[f].updater(d)):c.push({identifier:l,updater:j(d,t),references:1}),r.push(l)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var c=o(e.insert||"head");if(!c)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");c.appendChild(t)}return t}var l,f=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function d(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=f(t,i);else{var o=document.createTextNode(i),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(o,c[t]):e.appendChild(o)}}function p(e,t,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var b=null,m=0;function j(e,t){var n,r,i;if(t.singleton){var o=m++;n=b||(b=u(t)),r=d.bind(null,n,o,!1),i=d.bind(null,n,o,!0)}else n=u(t),r=p.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=a(n[r]);c[i].references--}for(var o=s(e,t),u=0;u<n.length;u++){var l=a(n[u]);0===c[l].references&&(c[l].updater(),c.splice(l,1))}n=o}}}},function(e,t,n){(t=n(5)(!1)).push([e.i,".buttons_list {\n\tdisplay: flex;\n\talign-items: center;\n\tbackground-color: #fff;\n\tpadding: 8px;\n}\n.btn {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\theight: 30px;\n\twidth: 30px;\n\tmargin-right:8px;\n\tfont-size: 16px;\n\tbackground: #eee;\n\tborder-radius: 6px;\n\tborder: 1px solid transparent;\n\toverflow: hidden;\n\tpadding:2px;\n\tcursor: pointer;\n}\n#content {\n\tpadding: 18px;\n\tbackground-color: #fff;\n\theight: 300px;\n\toverflow-y: scroll;\n}\n#content:focus {\n\toutline: 1px solid #497174 !important;\n}\n\n",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(c=r,a=btoa(unescape(encodeURIComponent(JSON.stringify(c)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(s," */")),o=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(o).concat([i]).join("\n")}var c,a,s;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var c=this[o][0];null!=c&&(i[c]=!0)}for(var a=0;a<e.length;a++){var s=[].concat(e[a]);r&&i[s[0]]||(n&&(s[2]?s[2]="".concat(n," and ").concat(s[2]):s[2]=n),t.push(s))}},t}},function(e,t,n){"use strict";
2
+ /** @license React v16.14.0
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var r=n(7),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var o=Symbol.for;i=o("react.element"),t.Fragment=o("react.fragment")}var c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a=Object.prototype.hasOwnProperty,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,o={},u=null,l=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(l=t.ref),t)a.call(t,r)&&!s.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:u,ref:l,props:o,_owner:c.current}}t.jsx=u,t.jsxs=u},function(e,t){e.exports=require("react")}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cake-editor",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {