@vonaffenfels/slate-editor 1.1.71 → 1.2.0

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 (94) hide show
  1. package/.babelrc +43 -43
  2. package/README.md +5 -5
  3. package/componentLoader.js +93 -93
  4. package/dist/BlockEditor.css +4 -1871
  5. package/dist/BlockEditor.js +336 -3960
  6. package/dist/BlockEditor.js.LICENSE.txt +61 -0
  7. package/dist/Renderer.js +2 -2081
  8. package/dist/Renderer.js.LICENSE.txt +15 -0
  9. package/dist/fromHTML.js +1 -78
  10. package/dist/index.css +4 -1871
  11. package/dist/index.js +336 -4037
  12. package/dist/index.js.LICENSE.txt +69 -0
  13. package/dist/toHTML.js +2 -1689
  14. package/dist/toHTML.js.LICENSE.txt +23 -0
  15. package/dist/toText.js +2 -1689
  16. package/dist/toText.js.LICENSE.txt +23 -0
  17. package/package.json +2 -2
  18. package/postcss.config.js +6 -6
  19. package/scss/demo.scss +148 -148
  20. package/scss/sidebarEditor.scss +181 -181
  21. package/scss/toolbar.scss +161 -161
  22. package/src/Blocks/EmptyBlock.js +11 -11
  23. package/src/Blocks/EmptyWrapper.js +4 -4
  24. package/src/Blocks/ErrorBoundary.js +40 -40
  25. package/src/Blocks/LayoutBlock.js +274 -274
  26. package/src/Blocks/LayoutSlot.js +90 -90
  27. package/src/CollapsableMenu/CollapsableMenu.js +48 -48
  28. package/src/Context/StorybookContext.js +6 -6
  29. package/src/ElementAutocomplete.js +133 -133
  30. package/src/Loader.js +137 -137
  31. package/src/Nodes/Default.js +158 -158
  32. package/src/Nodes/Leaf.js +54 -54
  33. package/src/Nodes/Text.js +97 -97
  34. package/src/ObjectId.js +3 -3
  35. package/src/Renderer.js +73 -73
  36. package/src/Serializer/Html.js +42 -42
  37. package/src/Serializer/Serializer.js +371 -371
  38. package/src/Serializer/Text.js +17 -17
  39. package/src/Serializer/ads.js +174 -174
  40. package/src/Serializer/index.js +3 -3
  41. package/src/SidebarEditor/AssetList.js +181 -181
  42. package/src/SidebarEditor/Fields/CloudinaryContentSelect.js +89 -89
  43. package/src/SidebarEditor/Fields/ColorPicker.js +89 -89
  44. package/src/SidebarEditor/Fields/ContentfulContentSelect.js +62 -62
  45. package/src/SidebarEditor/Fields/DateTime.js +55 -55
  46. package/src/SidebarEditor/Fields/MVP.js +66 -66
  47. package/src/SidebarEditor/Fields/MultiSelect.js +13 -13
  48. package/src/SidebarEditor/Fields/RemoteMultiSelect.js +40 -40
  49. package/src/SidebarEditor/Fields/RemoteSelect.js +39 -39
  50. package/src/SidebarEditor/Fields/Select.js +47 -47
  51. package/src/SidebarEditor/Fields/StreamSelect.js +15 -15
  52. package/src/SidebarEditor/Fields/Switch.js +34 -34
  53. package/src/SidebarEditor/Fields/Textarea.js +21 -21
  54. package/src/SidebarEditor/Resizable.js +85 -85
  55. package/src/Storybook.js +151 -151
  56. package/src/Toolbar/Align.js +64 -64
  57. package/src/Toolbar/Anchor.js +94 -94
  58. package/src/Toolbar/Block.js +135 -135
  59. package/src/Toolbar/Element.js +44 -44
  60. package/src/Toolbar/Formats.js +71 -71
  61. package/src/Toolbar/Insert.js +28 -28
  62. package/src/Toolbar/Layout.js +399 -399
  63. package/src/Toolbar/Link.js +164 -164
  64. package/src/Toolbar/Toolbar.js +235 -235
  65. package/src/Tools/Margin.js +51 -51
  66. package/src/Translation/TranslationToolbarButton.js +115 -115
  67. package/src/dev/draftToSlate.json +3147 -3147
  68. package/src/dev/index.css +2 -2
  69. package/src/dev/index.html +10 -10
  70. package/src/dev/index.js +4 -4
  71. package/src/dev/sampleValue1.json +4294 -4294
  72. package/src/dev/sampleValueValid.json +410 -410
  73. package/src/dev/testComponents/TestStory.js +74 -74
  74. package/src/dev/testComponents/TestStory.stories.js +216 -216
  75. package/src/dev/testComponents/TestStory2.js +74 -74
  76. package/src/dev/testComponents/TestStory2.stories.js +197 -197
  77. package/src/dev/testComponents/TestStory3.js +74 -74
  78. package/src/dev/testComponents/TestStory3.stories.js +197 -197
  79. package/src/dev/testSampleValue.json +746 -746
  80. package/src/fromHTML.js +4 -4
  81. package/src/helper/array.js +8 -8
  82. package/src/index.js +10 -10
  83. package/src/plugins/ListItem.js +48 -48
  84. package/src/plugins/SoftBreak.js +23 -23
  85. package/src/toHTML.js +6 -6
  86. package/src/toText.js +6 -6
  87. package/src/util/reduceContentfulResponse.js +64 -64
  88. package/src/util.js +19 -19
  89. package/storyLoader.js +47 -47
  90. package/tailwind.config.js +4 -4
  91. package/webpack.config.build.js +55 -55
  92. package/webpack.config.dev.js +60 -60
  93. package/webpack.config.js +130 -130
  94. package/webpack.config.watch.js +4 -4
@@ -0,0 +1,15 @@
1
+ /*!
2
+ Copyright (c) 2018 Jed Watson.
3
+ Licensed under the MIT License (MIT), see
4
+ http://jedwatson.github.io/classnames
5
+ */
6
+
7
+ /*!
8
+ * escape-html
9
+ * Copyright(c) 2012-2013 TJ Holowaychuk
10
+ * Copyright(c) 2015 Andreas Lubbe
11
+ * Copyright(c) 2015 Tiancheng "Timothy" Gu
12
+ * MIT Licensed
13
+ */
14
+
15
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
package/dist/fromHTML.js CHANGED
@@ -1,78 +1 @@
1
- /*
2
- * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3
- * This devtool is neither made for production nor for readable output files.
4
- * It uses "eval()" calls to create a separate source file in the browser devtools.
5
- * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6
- * or disable the default devtool with "devtool: false".
7
- * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8
- */
9
- (function webpackUniversalModuleDefinition(root, factory) {
10
- if(typeof exports === 'object' && typeof module === 'object')
11
- module.exports = factory();
12
- else if(typeof define === 'function' && define.amd)
13
- define([], factory);
14
- else {
15
- var a = factory();
16
- for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
17
- }
18
- })(this, () => {
19
- return /******/ (() => { // webpackBootstrap
20
- /******/ "use strict";
21
- /******/ var __webpack_modules__ = ({
22
-
23
- /***/ "./src/fromHTML.js":
24
- /*!*************************!*\
25
- !*** ./src/fromHTML.js ***!
26
- \*************************/
27
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
28
-
29
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nvar fromHTML = function fromHTML(htmlValue) {};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (fromHTML);\n\n//# sourceURL=webpack://@vonaffenfels/slate-editor/./src/fromHTML.js?");
30
-
31
- /***/ })
32
-
33
- /******/ });
34
- /************************************************************************/
35
- /******/ // The require scope
36
- /******/ var __webpack_require__ = {};
37
- /******/
38
- /************************************************************************/
39
- /******/ /* webpack/runtime/define property getters */
40
- /******/ (() => {
41
- /******/ // define getter functions for harmony exports
42
- /******/ __webpack_require__.d = (exports, definition) => {
43
- /******/ for(var key in definition) {
44
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
45
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
46
- /******/ }
47
- /******/ }
48
- /******/ };
49
- /******/ })();
50
- /******/
51
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
52
- /******/ (() => {
53
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
54
- /******/ })();
55
- /******/
56
- /******/ /* webpack/runtime/make namespace object */
57
- /******/ (() => {
58
- /******/ // define __esModule on exports
59
- /******/ __webpack_require__.r = (exports) => {
60
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
61
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
62
- /******/ }
63
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
64
- /******/ };
65
- /******/ })();
66
- /******/
67
- /************************************************************************/
68
- /******/
69
- /******/ // startup
70
- /******/ // Load entry module and return exports
71
- /******/ // This entry module can't be inlined because the eval devtool is used.
72
- /******/ var __webpack_exports__ = {};
73
- /******/ __webpack_modules__["./src/fromHTML.js"](0, __webpack_exports__, __webpack_require__);
74
- /******/
75
- /******/ return __webpack_exports__;
76
- /******/ })()
77
- ;
78
- });
1
+ !function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o();else if("function"==typeof define&&define.amd)define([],o);else{var t=o();for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(this,(()=>(()=>{"use strict";var e={d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},o={};e.r(o),e.d(o,{default:()=>t});const t=function(e){};return o})()));