@pie-element/ebsr 6.6.3-next.264 → 6.6.3-next.280

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 (574) hide show
  1. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.json +1677 -0
  2. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.md +1498 -0
  3. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/LICENSE.md +5 -0
  4. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/README.md +12 -0
  5. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js +86 -0
  6. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +1 -0
  7. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +176 -0
  8. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +1 -0
  9. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +391 -0
  10. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +1 -0
  11. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js +54 -0
  12. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +1 -0
  13. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +194 -0
  14. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +1 -0
  15. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +75 -0
  16. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +1 -0
  17. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +184 -0
  18. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +1 -0
  19. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js +44 -0
  20. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js.map +1 -0
  21. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js +152 -0
  22. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js.map +1 -0
  23. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js +195 -0
  24. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js.map +1 -0
  25. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js +144 -0
  26. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js.map +1 -0
  27. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js +120 -0
  28. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js.map +1 -0
  29. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js +187 -0
  30. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js.map +1 -0
  31. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +109 -0
  32. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +1 -0
  33. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js +24 -0
  34. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +1 -0
  35. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +111 -0
  36. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +1 -0
  37. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +95 -0
  38. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +1 -0
  39. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +79 -0
  40. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +1 -0
  41. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js +274 -0
  42. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +1 -0
  43. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +41 -0
  44. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +1 -0
  45. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +77 -0
  46. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +1 -0
  47. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js +136 -0
  48. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +1 -0
  49. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js +422 -0
  50. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +1 -0
  51. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +43 -0
  52. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +1 -0
  53. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +56 -0
  54. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +1 -0
  55. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js +113 -0
  56. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +1 -0
  57. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +206 -0
  58. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +1 -0
  59. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js +190 -0
  60. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +1 -0
  61. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +91 -0
  62. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +1 -0
  63. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/package.json +30 -0
  64. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/checkbox.jsx +63 -0
  65. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +103 -0
  66. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +301 -0
  67. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-utils.js +30 -0
  68. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +116 -0
  69. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +54 -0
  70. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +98 -0
  71. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/form-section.jsx +23 -0
  72. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/help.jsx +88 -0
  73. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/index.js +54 -0
  74. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/input.jsx +72 -0
  75. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/inputs.jsx +88 -0
  76. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/langs.jsx +122 -0
  77. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +64 -0
  78. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/index.js +4 -0
  79. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +60 -0
  80. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +31 -0
  81. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +64 -0
  82. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +196 -0
  83. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +18 -0
  84. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +52 -0
  85. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/index.js +75 -0
  86. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +297 -0
  87. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +20 -0
  88. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +31 -0
  89. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +51 -0
  90. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +121 -0
  91. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/two-choice.jsx +94 -0
  92. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +36 -0
  93. package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.json +547 -0
  94. package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.md +513 -0
  95. package/configure/node_modules/@pie-lib/correct-answer-toggle/LICENSE.md +5 -0
  96. package/configure/node_modules/@pie-lib/correct-answer-toggle/README.md +64 -0
  97. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js +81 -0
  98. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js.map +1 -0
  99. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js +150 -0
  100. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js.map +1 -0
  101. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js +65 -0
  102. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js.map +1 -0
  103. package/configure/node_modules/@pie-lib/correct-answer-toggle/package.json +36 -0
  104. package/configure/node_modules/@pie-lib/correct-answer-toggle/preview.png +0 -0
  105. package/configure/node_modules/@pie-lib/correct-answer-toggle/src/expander.jsx +60 -0
  106. package/configure/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx +73 -0
  107. package/configure/node_modules/@pie-lib/correct-answer-toggle/src/styles.js +60 -0
  108. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +3162 -0
  109. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +1441 -0
  110. package/configure/node_modules/@pie-lib/editable-html/LICENSE.md +5 -0
  111. package/configure/node_modules/@pie-lib/editable-html/README.md +45 -0
  112. package/configure/node_modules/@pie-lib/editable-html/deploy.sh +16 -0
  113. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +698 -0
  114. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js.map +1 -0
  115. package/configure/node_modules/@pie-lib/editable-html/lib/index.js +213 -0
  116. package/configure/node_modules/@pie-lib/editable-html/lib/index.js.map +1 -0
  117. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js +16 -0
  118. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js.map +1 -0
  119. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js +248 -0
  120. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js.map +1 -0
  121. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js +141 -0
  122. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js.map +1 -0
  123. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js +219 -0
  124. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js.map +1 -0
  125. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js +141 -0
  126. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map +1 -0
  127. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js +133 -0
  128. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js.map +1 -0
  129. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js +136 -0
  130. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js.map +1 -0
  131. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js +352 -0
  132. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js.map +1 -0
  133. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js +338 -0
  134. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js.map +1 -0
  135. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js +445 -0
  136. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js.map +1 -0
  137. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js +105 -0
  138. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js.map +1 -0
  139. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js +100 -0
  140. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js.map +1 -0
  141. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js +229 -0
  142. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js.map +1 -0
  143. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js +97 -0
  144. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js.map +1 -0
  145. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js +53 -0
  146. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js.map +1 -0
  147. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js +93 -0
  148. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js.map +1 -0
  149. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js +277 -0
  150. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js.map +1 -0
  151. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js +70 -0
  152. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js.map +1 -0
  153. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js +110 -0
  154. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js.map +1 -0
  155. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js +69 -0
  156. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js.map +1 -0
  157. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js +443 -0
  158. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js.map +1 -0
  159. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js +167 -0
  160. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js.map +1 -0
  161. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js +129 -0
  162. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js.map +1 -0
  163. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js +50 -0
  164. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js.map +1 -0
  165. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js +263 -0
  166. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js.map +1 -0
  167. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js +32 -0
  168. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js.map +1 -0
  169. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js +164 -0
  170. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js.map +1 -0
  171. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js +350 -0
  172. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js.map +1 -0
  173. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js +62 -0
  174. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js.map +1 -0
  175. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js +405 -0
  176. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +1 -0
  177. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js +9 -0
  178. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js.map +1 -0
  179. package/configure/node_modules/@pie-lib/editable-html/package.json +51 -0
  180. package/configure/node_modules/@pie-lib/editable-html/playground/image/data.js +59 -0
  181. package/configure/node_modules/@pie-lib/editable-html/playground/image/index.html +24 -0
  182. package/configure/node_modules/@pie-lib/editable-html/playground/image/index.jsx +83 -0
  183. package/configure/node_modules/@pie-lib/editable-html/playground/index.html +27 -0
  184. package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.html +25 -0
  185. package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.jsx +151 -0
  186. package/configure/node_modules/@pie-lib/editable-html/playground/package.json +15 -0
  187. package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.html +26 -0
  188. package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.jsx +30 -0
  189. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/data.js +29 -0
  190. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/image-plugin.jsx +40 -0
  191. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.html +23 -0
  192. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.jsx +96 -0
  193. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/data.js +29 -0
  194. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/image-plugin.jsx +40 -0
  195. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.html +24 -0
  196. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.jsx +12 -0
  197. package/configure/node_modules/@pie-lib/editable-html/playground/static.json +3 -0
  198. package/configure/node_modules/@pie-lib/editable-html/playground/table-examples.html +67 -0
  199. package/configure/node_modules/@pie-lib/editable-html/playground/webpack.config.js +42 -0
  200. package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +584 -0
  201. package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +128 -0
  202. package/configure/node_modules/@pie-lib/editable-html/src/parse-html.js +8 -0
  203. package/configure/node_modules/@pie-lib/editable-html/src/plugins/README.md +27 -0
  204. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +166 -0
  205. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +62 -0
  206. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +180 -0
  207. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +93 -0
  208. package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +112 -0
  209. package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +113 -0
  210. package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +289 -0
  211. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +281 -0
  212. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +372 -0
  213. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +53 -0
  214. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-wrapper.jsx +43 -0
  215. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/choice.jsx +160 -0
  216. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +78 -0
  217. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +45 -0
  218. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +68 -0
  219. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +244 -0
  220. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +63 -0
  221. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +77 -0
  222. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +59 -0
  223. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +390 -0
  224. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +104 -0
  225. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +103 -0
  226. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +36 -0
  227. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +217 -0
  228. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +21 -0
  229. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +86 -0
  230. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +313 -0
  231. package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +32 -0
  232. package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +369 -0
  233. package/configure/node_modules/@pie-lib/editable-html/src/theme.js +1 -0
  234. package/configure/node_modules/@pie-lib/editable-html/static.json +1 -0
  235. package/configure/node_modules/@pie-lib/math-input/CHANGELOG.json +1412 -0
  236. package/configure/node_modules/@pie-lib/math-input/CHANGELOG.md +874 -0
  237. package/configure/node_modules/@pie-lib/math-input/LICENSE.md +5 -0
  238. package/configure/node_modules/@pie-lib/math-input/README.md +27 -0
  239. package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js +123 -0
  240. package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js.map +1 -0
  241. package/configure/node_modules/@pie-lib/math-input/lib/index.js +75 -0
  242. package/configure/node_modules/@pie-lib/math-input/lib/index.js.map +1 -0
  243. package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js +367 -0
  244. package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js.map +1 -0
  245. package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js +30 -0
  246. package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js.map +1 -0
  247. package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js +41 -0
  248. package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js.map +1 -0
  249. package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js +17 -0
  250. package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js.map +1 -0
  251. package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js +46 -0
  252. package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js.map +1 -0
  253. package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js +26 -0
  254. package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js.map +1 -0
  255. package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js +53 -0
  256. package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js.map +1 -0
  257. package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js +16 -0
  258. package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js.map +1 -0
  259. package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js +35 -0
  260. package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js.map +1 -0
  261. package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js +31 -0
  262. package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js.map +1 -0
  263. package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js +139 -0
  264. package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js.map +1 -0
  265. package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js +198 -0
  266. package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js.map +1 -0
  267. package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js +50 -0
  268. package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js.map +1 -0
  269. package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js +32 -0
  270. package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js.map +1 -0
  271. package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js +23 -0
  272. package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js.map +1 -0
  273. package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js +23 -0
  274. package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js.map +1 -0
  275. package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js +69 -0
  276. package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js.map +1 -0
  277. package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js +23 -0
  278. package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js.map +1 -0
  279. package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js +17 -0
  280. package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js.map +1 -0
  281. package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js +38 -0
  282. package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js.map +1 -0
  283. package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js +23 -0
  284. package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js.map +1 -0
  285. package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js +53 -0
  286. package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js.map +1 -0
  287. package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js +126 -0
  288. package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js.map +1 -0
  289. package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js +29 -0
  290. package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js.map +1 -0
  291. package/configure/node_modules/@pie-lib/math-input/lib/math-input.js +200 -0
  292. package/configure/node_modules/@pie-lib/math-input/lib/math-input.js.map +1 -0
  293. package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js +23 -0
  294. package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js.map +1 -0
  295. package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js +24 -0
  296. package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js.map +1 -0
  297. package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js +255 -0
  298. package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js.map +1 -0
  299. package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js +216 -0
  300. package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js.map +1 -0
  301. package/configure/node_modules/@pie-lib/math-input/package.json +26 -0
  302. package/configure/node_modules/@pie-lib/math-input/src/horizontal-keypad.jsx +53 -0
  303. package/configure/node_modules/@pie-lib/math-input/src/index.jsx +27 -0
  304. package/configure/node_modules/@pie-lib/math-input/src/keypad/index.jsx +279 -0
  305. package/configure/node_modules/@pie-lib/math-input/src/keypad/keys-layout.js +17 -0
  306. package/configure/node_modules/@pie-lib/math-input/src/keys/basic-operators.js +32 -0
  307. package/configure/node_modules/@pie-lib/math-input/src/keys/chars.js +5 -0
  308. package/configure/node_modules/@pie-lib/math-input/src/keys/comparison.js +27 -0
  309. package/configure/node_modules/@pie-lib/math-input/src/keys/constants.js +18 -0
  310. package/configure/node_modules/@pie-lib/math-input/src/keys/digits.js +40 -0
  311. package/configure/node_modules/@pie-lib/math-input/src/keys/edit.js +3 -0
  312. package/configure/node_modules/@pie-lib/math-input/src/keys/exponent.js +27 -0
  313. package/configure/node_modules/@pie-lib/math-input/src/keys/fractions.js +23 -0
  314. package/configure/node_modules/@pie-lib/math-input/src/keys/geometry.js +116 -0
  315. package/configure/node_modules/@pie-lib/math-input/src/keys/grades.js +265 -0
  316. package/configure/node_modules/@pie-lib/math-input/src/keys/index.js +21 -0
  317. package/configure/node_modules/@pie-lib/math-input/src/keys/log.js +22 -0
  318. package/configure/node_modules/@pie-lib/math-input/src/keys/logic.js +15 -0
  319. package/configure/node_modules/@pie-lib/math-input/src/keys/matrices.js +15 -0
  320. package/configure/node_modules/@pie-lib/math-input/src/keys/misc.js +60 -0
  321. package/configure/node_modules/@pie-lib/math-input/src/keys/navigation.js +8 -0
  322. package/configure/node_modules/@pie-lib/math-input/src/keys/operators.js +9 -0
  323. package/configure/node_modules/@pie-lib/math-input/src/keys/statistics.js +29 -0
  324. package/configure/node_modules/@pie-lib/math-input/src/keys/sub-sup.js +15 -0
  325. package/configure/node_modules/@pie-lib/math-input/src/keys/trigonometry.js +15 -0
  326. package/configure/node_modules/@pie-lib/math-input/src/keys/utils.js +71 -0
  327. package/configure/node_modules/@pie-lib/math-input/src/keys/vars.js +19 -0
  328. package/configure/node_modules/@pie-lib/math-input/src/math-input.jsx +128 -0
  329. package/configure/node_modules/@pie-lib/math-input/src/mq/custom-elements.js +11 -0
  330. package/configure/node_modules/@pie-lib/math-input/src/mq/index.js +4 -0
  331. package/configure/node_modules/@pie-lib/math-input/src/mq/input.jsx +163 -0
  332. package/configure/node_modules/@pie-lib/math-input/src/mq/static.jsx +139 -0
  333. package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +657 -0
  334. package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +412 -0
  335. package/configure/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
  336. package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
  337. package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
  338. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +312 -0
  339. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
  340. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
  341. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
  342. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +119 -0
  343. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
  344. package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +99 -0
  345. package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
  346. package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +239 -0
  347. package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
  348. package/configure/node_modules/@pie-lib/math-rendering/package.json +19 -0
  349. package/configure/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
  350. package/configure/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
  351. package/configure/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
  352. package/configure/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
  353. package/configure/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
  354. package/configure/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
  355. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
  356. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
  357. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
  358. package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
  359. package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +203 -0
  360. package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.json +847 -0
  361. package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.md +742 -0
  362. package/configure/node_modules/@pie-lib/math-toolbar/LICENSE.md +5 -0
  363. package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js +53 -0
  364. package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js.map +1 -0
  365. package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js +386 -0
  366. package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js.map +1 -0
  367. package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js +259 -0
  368. package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js.map +1 -0
  369. package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js +163 -0
  370. package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js.map +1 -0
  371. package/configure/node_modules/@pie-lib/math-toolbar/package.json +36 -0
  372. package/configure/node_modules/@pie-lib/math-toolbar/src/done-button.jsx +39 -0
  373. package/configure/node_modules/@pie-lib/math-toolbar/src/editor-and-pad.jsx +311 -0
  374. package/configure/node_modules/@pie-lib/math-toolbar/src/index.jsx +185 -0
  375. package/configure/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx +101 -0
  376. package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
  377. package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +616 -0
  378. package/configure/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
  379. package/configure/node_modules/@pie-lib/render-ui/README.md +33 -0
  380. package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +144 -0
  381. package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
  382. package/configure/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
  383. package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
  384. package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +154 -0
  385. package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
  386. package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
  387. package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
  388. package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +98 -0
  389. package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
  390. package/configure/node_modules/@pie-lib/render-ui/lib/index.js +99 -0
  391. package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
  392. package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
  393. package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
  394. package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +129 -0
  395. package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
  396. package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +133 -0
  397. package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
  398. package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
  399. package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
  400. package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
  401. package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
  402. package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +154 -0
  403. package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
  404. package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +194 -0
  405. package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
  406. package/configure/node_modules/@pie-lib/render-ui/package.json +30 -0
  407. package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
  408. package/configure/node_modules/@pie-lib/render-ui/src/color.js +48 -0
  409. package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
  410. package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
  411. package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
  412. package/configure/node_modules/@pie-lib/render-ui/src/index.js +27 -0
  413. package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
  414. package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
  415. package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +73 -0
  416. package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
  417. package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
  418. package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
  419. package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
  420. package/configure/node_modules/immutable/LICENSE +21 -0
  421. package/configure/node_modules/immutable/README.md +657 -0
  422. package/configure/node_modules/immutable/dist/immutable-nonambient.d.ts +5607 -0
  423. package/configure/node_modules/immutable/dist/immutable.d.ts +5611 -0
  424. package/configure/node_modules/immutable/dist/immutable.es.js +5893 -0
  425. package/configure/node_modules/immutable/dist/immutable.js +5948 -0
  426. package/configure/node_modules/immutable/dist/immutable.js.flow +2340 -0
  427. package/configure/node_modules/immutable/dist/immutable.min.js +55 -0
  428. package/configure/node_modules/immutable/package.json +41 -0
  429. package/configure/node_modules/slate-dev-environment/Readme.md +1 -0
  430. package/configure/node_modules/slate-dev-environment/dist/slate-dev-environment.js +287 -0
  431. package/configure/node_modules/slate-dev-environment/dist/slate-dev-environment.min.js +1 -0
  432. package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.es.js +264 -0
  433. package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.es.js.map +1 -0
  434. package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.js +282 -0
  435. package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.js.map +1 -0
  436. package/configure/node_modules/slate-dev-environment/package.json +21 -0
  437. package/configure/node_modules/slate-edit-list/CHANGELOG.md +124 -0
  438. package/configure/node_modules/slate-edit-list/LICENSE +201 -0
  439. package/configure/node_modules/slate-edit-list/README.md +159 -0
  440. package/configure/node_modules/slate-edit-list/dist/changes/decreaseItemDepth.js +73 -0
  441. package/configure/node_modules/slate-edit-list/dist/changes/decreaseItemDepth.js.flow +88 -0
  442. package/configure/node_modules/slate-edit-list/dist/changes/increaseItemDepth.js +70 -0
  443. package/configure/node_modules/slate-edit-list/dist/changes/increaseItemDepth.js.flow +77 -0
  444. package/configure/node_modules/slate-edit-list/dist/changes/index.js +34 -0
  445. package/configure/node_modules/slate-edit-list/dist/changes/index.js.flow +13 -0
  446. package/configure/node_modules/slate-edit-list/dist/changes/splitListItem.js +27 -0
  447. package/configure/node_modules/slate-edit-list/dist/changes/splitListItem.js.flow +26 -0
  448. package/configure/node_modules/slate-edit-list/dist/changes/unwrapList.js +52 -0
  449. package/configure/node_modules/slate-edit-list/dist/changes/unwrapList.js.flow +46 -0
  450. package/configure/node_modules/slate-edit-list/dist/changes/wrapInList.js +67 -0
  451. package/configure/node_modules/slate-edit-list/dist/changes/wrapInList.js.flow +67 -0
  452. package/configure/node_modules/slate-edit-list/dist/core.js +80 -0
  453. package/configure/node_modules/slate-edit-list/dist/core.js.flow +76 -0
  454. package/configure/node_modules/slate-edit-list/dist/handlers/index.js +24 -0
  455. package/configure/node_modules/slate-edit-list/dist/handlers/index.js.flow +5 -0
  456. package/configure/node_modules/slate-edit-list/dist/handlers/onBackspace.js +45 -0
  457. package/configure/node_modules/slate-edit-list/dist/handlers/onBackspace.js.flow +44 -0
  458. package/configure/node_modules/slate-edit-list/dist/handlers/onEnter.js +54 -0
  459. package/configure/node_modules/slate-edit-list/dist/handlers/onEnter.js.flow +54 -0
  460. package/configure/node_modules/slate-edit-list/dist/handlers/onTab.js +39 -0
  461. package/configure/node_modules/slate-edit-list/dist/handlers/onTab.js.flow +34 -0
  462. package/configure/node_modules/slate-edit-list/dist/index.js +58 -0
  463. package/configure/node_modules/slate-edit-list/dist/index.js.flow +45 -0
  464. package/configure/node_modules/slate-edit-list/dist/options.js +34 -0
  465. package/configure/node_modules/slate-edit-list/dist/options.js.flow +26 -0
  466. package/configure/node_modules/slate-edit-list/dist/utils/getCurrentItem.js +24 -0
  467. package/configure/node_modules/slate-edit-list/dist/utils/getCurrentItem.js.flow +20 -0
  468. package/configure/node_modules/slate-edit-list/dist/utils/getCurrentList.js +31 -0
  469. package/configure/node_modules/slate-edit-list/dist/utils/getCurrentList.js.flow +21 -0
  470. package/configure/node_modules/slate-edit-list/dist/utils/getItemDepth.js +34 -0
  471. package/configure/node_modules/slate-edit-list/dist/utils/getItemDepth.js.flow +24 -0
  472. package/configure/node_modules/slate-edit-list/dist/utils/getItemsAtRange.js +60 -0
  473. package/configure/node_modules/slate-edit-list/dist/utils/getItemsAtRange.js.flow +51 -0
  474. package/configure/node_modules/slate-edit-list/dist/utils/getListForItem.js +25 -0
  475. package/configure/node_modules/slate-edit-list/dist/utils/getListForItem.js.flow +16 -0
  476. package/configure/node_modules/slate-edit-list/dist/utils/getPreviousItem.js +39 -0
  477. package/configure/node_modules/slate-edit-list/dist/utils/getPreviousItem.js.flow +29 -0
  478. package/configure/node_modules/slate-edit-list/dist/utils/index.js +49 -0
  479. package/configure/node_modules/slate-edit-list/dist/utils/index.js.flow +19 -0
  480. package/configure/node_modules/slate-edit-list/dist/utils/isList.js +15 -0
  481. package/configure/node_modules/slate-edit-list/dist/utils/isList.js.flow +13 -0
  482. package/configure/node_modules/slate-edit-list/dist/utils/isSelectionInList.js +22 -0
  483. package/configure/node_modules/slate-edit-list/dist/utils/isSelectionInList.js.flow +14 -0
  484. package/configure/node_modules/slate-edit-list/dist/validation/index.js +19 -0
  485. package/configure/node_modules/slate-edit-list/dist/validation/index.js.flow +4 -0
  486. package/configure/node_modules/slate-edit-list/dist/validation/schema.js +83 -0
  487. package/configure/node_modules/slate-edit-list/dist/validation/schema.js.flow +81 -0
  488. package/configure/node_modules/slate-edit-list/dist/validation/validateNode.js +61 -0
  489. package/configure/node_modules/slate-edit-list/dist/validation/validateNode.js.flow +61 -0
  490. package/configure/node_modules/slate-edit-list/package.json +67 -0
  491. package/configure/node_modules/slate-edit-table/CHANGELOG.md +192 -0
  492. package/configure/node_modules/slate-edit-table/LICENSE +201 -0
  493. package/configure/node_modules/slate-edit-table/README.md +269 -0
  494. package/configure/node_modules/slate-edit-table/dist/changes/clearCell.js +29 -0
  495. package/configure/node_modules/slate-edit-table/dist/changes/clearCell.js.flow +26 -0
  496. package/configure/node_modules/slate-edit-table/dist/changes/index.js +69 -0
  497. package/configure/node_modules/slate-edit-table/dist/changes/index.js.flow +27 -0
  498. package/configure/node_modules/slate-edit-table/dist/changes/insertColumn.js +43 -0
  499. package/configure/node_modules/slate-edit-table/dist/changes/insertColumn.js.flow +46 -0
  500. package/configure/node_modules/slate-edit-table/dist/changes/insertRow.js +36 -0
  501. package/configure/node_modules/slate-edit-table/dist/changes/insertRow.js.flow +35 -0
  502. package/configure/node_modules/slate-edit-table/dist/changes/insertTable.js +29 -0
  503. package/configure/node_modules/slate-edit-table/dist/changes/insertTable.js.flow +27 -0
  504. package/configure/node_modules/slate-edit-table/dist/changes/moveSelection.js +32 -0
  505. package/configure/node_modules/slate-edit-table/dist/changes/moveSelection.js.flow +31 -0
  506. package/configure/node_modules/slate-edit-table/dist/changes/moveSelectionBy.js +84 -0
  507. package/configure/node_modules/slate-edit-table/dist/changes/moveSelectionBy.js.flow +80 -0
  508. package/configure/node_modules/slate-edit-table/dist/changes/removeColumn.js +36 -0
  509. package/configure/node_modules/slate-edit-table/dist/changes/removeColumn.js.flow +28 -0
  510. package/configure/node_modules/slate-edit-table/dist/changes/removeColumnByKey.js +52 -0
  511. package/configure/node_modules/slate-edit-table/dist/changes/removeColumnByKey.js.flow +40 -0
  512. package/configure/node_modules/slate-edit-table/dist/changes/removeRow.js +36 -0
  513. package/configure/node_modules/slate-edit-table/dist/changes/removeRow.js.flow +27 -0
  514. package/configure/node_modules/slate-edit-table/dist/changes/removeRowByKey.js +41 -0
  515. package/configure/node_modules/slate-edit-table/dist/changes/removeRowByKey.js.flow +30 -0
  516. package/configure/node_modules/slate-edit-table/dist/changes/removeTable.js +26 -0
  517. package/configure/node_modules/slate-edit-table/dist/changes/removeTable.js.flow +17 -0
  518. package/configure/node_modules/slate-edit-table/dist/changes/removeTableByKey.js +56 -0
  519. package/configure/node_modules/slate-edit-table/dist/changes/removeTableByKey.js.flow +54 -0
  520. package/configure/node_modules/slate-edit-table/dist/core.js +88 -0
  521. package/configure/node_modules/slate-edit-table/dist/core.js.flow +94 -0
  522. package/configure/node_modules/slate-edit-table/dist/handlers/index.js +39 -0
  523. package/configure/node_modules/slate-edit-table/dist/handlers/index.js.flow +8 -0
  524. package/configure/node_modules/slate-edit-table/dist/handlers/onBackspace.js +82 -0
  525. package/configure/node_modules/slate-edit-table/dist/handlers/onBackspace.js.flow +87 -0
  526. package/configure/node_modules/slate-edit-table/dist/handlers/onEnter.js +34 -0
  527. package/configure/node_modules/slate-edit-table/dist/handlers/onEnter.js.flow +37 -0
  528. package/configure/node_modules/slate-edit-table/dist/handlers/onKeyDown.js +71 -0
  529. package/configure/node_modules/slate-edit-table/dist/handlers/onKeyDown.js.flow +56 -0
  530. package/configure/node_modules/slate-edit-table/dist/handlers/onModEnter.js +35 -0
  531. package/configure/node_modules/slate-edit-table/dist/handlers/onModEnter.js.flow +38 -0
  532. package/configure/node_modules/slate-edit-table/dist/handlers/onTab.js +56 -0
  533. package/configure/node_modules/slate-edit-table/dist/handlers/onTab.js.flow +51 -0
  534. package/configure/node_modules/slate-edit-table/dist/handlers/onUpDown.js +38 -0
  535. package/configure/node_modules/slate-edit-table/dist/handlers/onUpDown.js.flow +41 -0
  536. package/configure/node_modules/slate-edit-table/dist/index.js +36 -0
  537. package/configure/node_modules/slate-edit-table/dist/index.js.flow +27 -0
  538. package/configure/node_modules/slate-edit-table/dist/options.js +61 -0
  539. package/configure/node_modules/slate-edit-table/dist/options.js.flow +42 -0
  540. package/configure/node_modules/slate-edit-table/dist/utils/TablePosition.js +306 -0
  541. package/configure/node_modules/slate-edit-table/dist/utils/TablePosition.js.flow +211 -0
  542. package/configure/node_modules/slate-edit-table/dist/utils/createCell.js +30 -0
  543. package/configure/node_modules/slate-edit-table/dist/utils/createCell.js.flow +26 -0
  544. package/configure/node_modules/slate-edit-table/dist/utils/createRow.js +30 -0
  545. package/configure/node_modules/slate-edit-table/dist/utils/createRow.js.flow +28 -0
  546. package/configure/node_modules/slate-edit-table/dist/utils/createTable.js +30 -0
  547. package/configure/node_modules/slate-edit-table/dist/utils/createTable.js.flow +33 -0
  548. package/configure/node_modules/slate-edit-table/dist/utils/forEachCells.js +21 -0
  549. package/configure/node_modules/slate-edit-table/dist/utils/forEachCells.js.flow +22 -0
  550. package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtColumn.js +22 -0
  551. package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtColumn.js.flow +19 -0
  552. package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtRow.js +20 -0
  553. package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtRow.js.flow +19 -0
  554. package/configure/node_modules/slate-edit-table/dist/utils/getPosition.js +24 -0
  555. package/configure/node_modules/slate-edit-table/dist/utils/getPosition.js.flow +19 -0
  556. package/configure/node_modules/slate-edit-table/dist/utils/getPositionByKey.js +26 -0
  557. package/configure/node_modules/slate-edit-table/dist/utils/getPositionByKey.js.flow +21 -0
  558. package/configure/node_modules/slate-edit-table/dist/utils/getRow.js +24 -0
  559. package/configure/node_modules/slate-edit-table/dist/utils/getRow.js.flow +19 -0
  560. package/configure/node_modules/slate-edit-table/dist/utils/index.js +64 -0
  561. package/configure/node_modules/slate-edit-table/dist/utils/index.js.flow +25 -0
  562. package/configure/node_modules/slate-edit-table/dist/utils/isSelectionInTable.js +34 -0
  563. package/configure/node_modules/slate-edit-table/dist/utils/isSelectionInTable.js.flow +27 -0
  564. package/configure/node_modules/slate-edit-table/dist/utils/isSelectionOutOfTable.js +30 -0
  565. package/configure/node_modules/slate-edit-table/dist/utils/isSelectionOutOfTable.js.flow +23 -0
  566. package/configure/node_modules/slate-edit-table/dist/validation/index.js +19 -0
  567. package/configure/node_modules/slate-edit-table/dist/validation/index.js.flow +4 -0
  568. package/configure/node_modules/slate-edit-table/dist/validation/schema.js +101 -0
  569. package/configure/node_modules/slate-edit-table/dist/validation/schema.js.flow +98 -0
  570. package/configure/node_modules/slate-edit-table/dist/validation/validateNode.js +56 -0
  571. package/configure/node_modules/slate-edit-table/dist/validation/validateNode.js.flow +49 -0
  572. package/configure/node_modules/slate-edit-table/package.json +69 -0
  573. package/configure/package.json +1 -1
  574. package/package.json +2 -2
@@ -0,0 +1,405 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.valueToHtml = exports.htmlToValue = exports.TEXT_RULE = exports.reactAttributes = exports.parseStyleString = exports.BLOCK_TAGS = void 0;
7
+
8
+ var _slateHtmlSerializer = _interopRequireDefault(require("slate-html-serializer"));
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _debug = _interopRequireDefault(require("debug"));
13
+
14
+ var _toStyle = require("to-style");
15
+
16
+ var _image = require("./plugins/image");
17
+
18
+ var _math = require("./plugins/math");
19
+
20
+ var _media = require("./plugins/media");
21
+
22
+ var _list = require("./plugins/list");
23
+
24
+ var _table = require("./plugins/table");
25
+
26
+ var _respArea = require("./plugins/respArea");
27
+
28
+ var _slate = require("slate");
29
+
30
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
+
32
+ var log = (0, _debug["default"])('@pie-lib:editable-html:serialization');
33
+ /**
34
+ * Tags to blocks.
35
+ *
36
+ * @type {Object}
37
+ */
38
+
39
+ var BLOCK_TAGS = {
40
+ div: 'div',
41
+ span: 'span',
42
+ p: 'paragraph',
43
+ blockquote: 'quote',
44
+ pre: 'code',
45
+ h1: 'heading-one',
46
+ h2: 'heading-two',
47
+ h3: 'heading-three',
48
+ h4: 'heading-four',
49
+ h5: 'heading-five',
50
+ h6: 'heading-six'
51
+ };
52
+ /**
53
+ * Tags to marks.
54
+ *
55
+ * @type {Object}
56
+ */
57
+
58
+ exports.BLOCK_TAGS = BLOCK_TAGS;
59
+ var MARK_TAGS = {
60
+ b: 'bold',
61
+ em: 'italic',
62
+ u: 'underline',
63
+ s: 'strikethrough',
64
+ code: 'code',
65
+ strong: 'bold'
66
+ };
67
+
68
+ var parseStyleString = function parseStyleString(s) {
69
+ var regex = /([\w-]*)\s*:\s*([^;]*)/g;
70
+ var match;
71
+ var result = {};
72
+
73
+ while (match = regex.exec(s)) {
74
+ result[match[1]] = match[2].trim();
75
+ }
76
+
77
+ return result;
78
+ };
79
+
80
+ exports.parseStyleString = parseStyleString;
81
+
82
+ var reactAttributes = function reactAttributes(o) {
83
+ return (0, _toStyle.object)(o, {
84
+ camelize: true
85
+ });
86
+ };
87
+
88
+ exports.reactAttributes = reactAttributes;
89
+
90
+ var attributesToMap = function attributesToMap(el) {
91
+ return function (acc, attribute) {
92
+ var value = el.getAttribute(attribute);
93
+
94
+ if (value) {
95
+ if (attribute === 'style') {
96
+ var styleString = el.getAttribute(attribute);
97
+ var reactStyleObject = reactAttributes(parseStyleString(styleString));
98
+ acc['style'] = reactStyleObject;
99
+ } else {
100
+ acc[attribute] = el.getAttribute(attribute);
101
+ }
102
+ }
103
+
104
+ return acc;
105
+ };
106
+ };
107
+
108
+ var attributes = ['border', 'cellpadding', 'cellspacing', 'class', 'style'];
109
+ /**
110
+ * Serializer rules.
111
+ *
112
+ * @type {Array}
113
+ */
114
+
115
+ var blocks = {
116
+ deserialize: function deserialize(el, next) {
117
+ log('[blocks:deserialize] block: ', el);
118
+ var block = BLOCK_TAGS[el.tagName.toLowerCase()];
119
+ if (!block) return;
120
+ log('[blocks:deserialize] block: ', block);
121
+
122
+ if (el.childNodes.length === 1) {
123
+ var cn = el.childNodes[0];
124
+
125
+ if (cn && cn.tagName && cn.tagName.toLowerCase() === block) {
126
+ log('[we have a child node of the same]...');
127
+ return;
128
+ }
129
+ }
130
+
131
+ return {
132
+ object: 'block',
133
+ type: block,
134
+
135
+ /**
136
+ * Here for rendering styles for all block elements
137
+ */
138
+ data: {
139
+ attributes: attributes.reduce(attributesToMap(el), {})
140
+ },
141
+ nodes: next(el.childNodes)
142
+ };
143
+ },
144
+ serialize: function serialize(object, children) {
145
+ if (object.object !== 'block') return;
146
+ var jsonData = object.data.toJSON();
147
+ log('[blocks:serialize] object: ', object, children);
148
+ var key;
149
+
150
+ for (key in BLOCK_TAGS) {
151
+ if (BLOCK_TAGS[key] === object.type) {
152
+ var Tag = key;
153
+ return _react["default"].createElement(Tag, jsonData.attributes, children);
154
+ }
155
+ }
156
+ }
157
+ };
158
+ var marks = {
159
+ deserialize: function deserialize(el, next) {
160
+ var mark = MARK_TAGS[el.tagName.toLowerCase()];
161
+ if (!mark) return;
162
+ log('[deserialize] mark: ', mark);
163
+ return {
164
+ object: 'mark',
165
+ type: mark,
166
+ nodes: next(el.childNodes)
167
+ };
168
+ },
169
+ serialize: function serialize(object, children) {
170
+ if (_slate.Mark.isMark(object)) {
171
+ for (var key in MARK_TAGS) {
172
+ if (MARK_TAGS[key] === object.type) {
173
+ var Tag = key;
174
+ return _react["default"].createElement(Tag, null, children);
175
+ }
176
+ }
177
+ }
178
+ }
179
+ };
180
+
181
+ var findPreviousText = function findPreviousText(el) {
182
+ if (el.nodeName === '#text') {
183
+ return el;
184
+ }
185
+
186
+ if (el.previousSibling) {
187
+ return findPreviousText(el.previousSibling);
188
+ }
189
+
190
+ return null;
191
+ };
192
+
193
+ var TEXT_RULE = {
194
+ deserialize: function deserialize(el) {
195
+ /**
196
+ * This needs to be called on the dom element in order to merge the adjacent text nodes together
197
+ * */
198
+ el.normalize();
199
+
200
+ if (el.tagName && el.tagName.toLowerCase() === 'br') {
201
+ return {
202
+ object: 'text',
203
+ leaves: [{
204
+ object: 'leaf',
205
+ text: '\n'
206
+ }]
207
+ };
208
+ }
209
+
210
+ if (el.nodeName === '#text') {
211
+ if (el.nodeValue && el.nodeValue.match(/<!--.*?-->/)) return;
212
+ log('[text:deserialize] return text object..');
213
+ return {
214
+ object: 'text',
215
+ leaves: [{
216
+ object: 'leaf',
217
+ text: el.nodeValue
218
+ }]
219
+ };
220
+ }
221
+ },
222
+ serialize: function serialize(obj, children) {
223
+ if (obj.object === 'string') {
224
+ return children.split('\n').reduce(function (array, text, i) {
225
+ if (i !== 0) array.push(_react["default"].createElement("br", null));
226
+ array.push(text);
227
+ return array;
228
+ }, []);
229
+ }
230
+ }
231
+ };
232
+ exports.TEXT_RULE = TEXT_RULE;
233
+ var RULES = [_list.serialization, _math.serialization, _media.serialization, _image.serialization, _table.serialization, _respArea.serialization, TEXT_RULE, blocks, marks];
234
+
235
+ function allWhitespace(node) {
236
+ // Use ECMA-262 Edition 3 String and RegExp features
237
+ return !/[^\t\n\r ]/.test(node.textContent);
238
+ }
239
+
240
+ function defaultParseHtml(html) {
241
+ if (typeof DOMParser === 'undefined') {
242
+ throw new Error('The native `DOMParser` global which the `Html` serializer uses by default is not present in this environment. You must supply the `options.parseHtml` function instead.');
243
+ }
244
+
245
+ var parsed = new DOMParser().parseFromString(html, 'text/html');
246
+ var body = parsed.body;
247
+ var textNodes = document.createTreeWalker(body, NodeFilter.SHOW_TEXT, null, null);
248
+ var n = textNodes.nextNode();
249
+
250
+ while (n) {
251
+ if (allWhitespace(n) || n.nodeValue === "\u200B") {
252
+ n.parentNode.removeChild(n);
253
+ }
254
+
255
+ n = textNodes.nextNode();
256
+ }
257
+
258
+ return body;
259
+ }
260
+ /** If this lib is used on the server side, we need to bypass using the DOMParser - just put in a stub. */
261
+
262
+
263
+ var parseHtml = typeof window === 'undefined' ? function () {
264
+ return {
265
+ childNodes: []
266
+ };
267
+ } : defaultParseHtml;
268
+ var serializer = new _slateHtmlSerializer["default"]({
269
+ defaultBlock: 'div',
270
+ rules: RULES,
271
+ parseHtml: parseHtml
272
+ });
273
+
274
+ var _extends = Object.assign || function (target) {
275
+ for (var i = 1; i < arguments.length; i++) {
276
+ var source = arguments[i];
277
+
278
+ for (var key in source) {
279
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
280
+ target[key] = source[key];
281
+ }
282
+ }
283
+ }
284
+
285
+ return target;
286
+ };
287
+ /**
288
+ * This is needed in order to override the function that eventually leads
289
+ * to the max iteration of 12, which in most cases it's not enough. The newer versions
290
+ * have a different way to calculate this, but updating to a newer version of slate
291
+ * requires a lot of work fixing other issues. So we just increase the rules by 1000,
292
+ * which means a lot of iterations.
293
+ * Below is the code that calculates the max iterations.
294
+ * var max = schema.stack.plugins.length + schema.rules.length + 1;
295
+ */
296
+
297
+
298
+ serializer.deserialize = function deserialize(html) {
299
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
300
+ var _options$toJSON = options.toJSON;
301
+ var toJSON = _options$toJSON === undefined ? false : _options$toJSON;
302
+ var defaultBlock = this.defaultBlock;
303
+ var parseHtml = this.parseHtml;
304
+ var fragment = parseHtml(html);
305
+ var children = Array.from(fragment.childNodes);
306
+ var nodes = this.deserializeElements(children); // COMPAT: ensure that all top-level inline nodes are wrapped into a block.
307
+
308
+ nodes = nodes.reduce(function (memo, node, i, original) {
309
+ if (node.object === 'block') {
310
+ memo.push(node);
311
+ return memo;
312
+ }
313
+
314
+ if (i > 0 && original[i - 1].object !== 'block') {
315
+ var _block = memo[memo.length - 1];
316
+
317
+ _block.nodes.push(node);
318
+
319
+ return memo;
320
+ }
321
+
322
+ var block = _extends({
323
+ object: 'block',
324
+ data: {},
325
+ isVoid: false
326
+ }, defaultBlock, {
327
+ nodes: [node]
328
+ });
329
+
330
+ memo.push(block);
331
+ return memo;
332
+ }, []);
333
+
334
+ if (nodes.length === 0) {
335
+ nodes = [_extends({
336
+ object: 'block',
337
+ data: {},
338
+ isVoid: false
339
+ }, defaultBlock, {
340
+ nodes: [{
341
+ object: 'text',
342
+ leaves: [{
343
+ object: 'leaf',
344
+ text: '',
345
+ marks: []
346
+ }]
347
+ }]
348
+ })];
349
+ }
350
+
351
+ var json = {
352
+ object: 'value',
353
+ document: {
354
+ object: 'document',
355
+ data: {},
356
+ nodes: nodes
357
+ },
358
+ schema: {
359
+ rules: []
360
+ }
361
+ };
362
+ var i;
363
+
364
+ for (i = 0; i < 1000; i++) {
365
+ json.schema.rules.push({
366
+ match: {
367
+ object: 'document'
368
+ },
369
+ nodes: [{
370
+ match: {
371
+ object: 'block'
372
+ }
373
+ }]
374
+ });
375
+ }
376
+
377
+ var ret = toJSON ? json : _slate.Value.fromJSON(json);
378
+
379
+ if (ret) {
380
+ return ret;
381
+ }
382
+
383
+ return null;
384
+ };
385
+
386
+ var htmlToValue = function htmlToValue(html) {
387
+ return serializer.deserialize(html);
388
+ };
389
+
390
+ exports.htmlToValue = htmlToValue;
391
+
392
+ var valueToHtml = function valueToHtml(value) {
393
+ return serializer.serialize(value);
394
+ };
395
+ /**
396
+ *
397
+ * <div><div>a</div></div> -> <div>a</div>
398
+ *
399
+ * <div><div>a</div><div>b</div></div> -> <div>a</div><div>b</div>
400
+ * <div><div>a</div>4444<div>b</div></div> -> <div>a</div>4444<div>b</div>
401
+ */
402
+
403
+
404
+ exports.valueToHtml = valueToHtml;
405
+ //# sourceMappingURL=serialization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/serialization.jsx"],"names":["log","BLOCK_TAGS","div","span","p","blockquote","pre","h1","h2","h3","h4","h5","h6","MARK_TAGS","b","em","u","s","code","strong","parseStyleString","regex","match","result","exec","trim","reactAttributes","o","camelize","attributesToMap","el","acc","attribute","value","getAttribute","styleString","reactStyleObject","attributes","blocks","deserialize","next","block","tagName","toLowerCase","childNodes","length","cn","object","type","data","reduce","nodes","serialize","children","jsonData","toJSON","key","Tag","marks","mark","Mark","isMark","findPreviousText","nodeName","previousSibling","TEXT_RULE","normalize","leaves","text","nodeValue","obj","split","array","i","push","RULES","listSerialization","mathSerialization","mediaSerialization","imgSerialization","tableSerialization","responseAreaSerialization","allWhitespace","node","test","textContent","defaultParseHtml","html","DOMParser","Error","parsed","parseFromString","body","textNodes","document","createTreeWalker","NodeFilter","SHOW_TEXT","n","nextNode","parentNode","removeChild","parseHtml","window","serializer","Html","defaultBlock","rules","_extends","Object","assign","target","arguments","source","prototype","hasOwnProperty","call","options","undefined","_options$toJSON","fragment","Array","from","deserializeElements","memo","original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AAYA,CAAC,GAAG,IAAhB,EAAsBA,CAAC,EAAvB,EAA2B;AACzBuD,IAAAA,IAAI,CAACC,MAAL,CAAYtB,KAAZ,CAAkBjC,IAAlB,CAAuB;AACrBpD,MAAAA,KAAK,EAAE;AAAEyB,QAAAA,MAAM,EAAE;AAAV,OADc;AAErBI,MAAAA,KAAK,EAAE,CAAC;AAAE7B,QAAAA,KAAK,EAAE;AAAEyB,UAAAA,MAAM,EAAE;AAAV;AAAT,OAAD;AAFc,KAAvB;AAID;;AAED,MAAMmF,GAAG,GAAG3E,MAAM,GAAGyE,IAAH,GAAUG,aAAMC,QAAN,CAAeJ,IAAf,CAA5B;;AAEA,MAAIE,GAAJ,EAAS;AACP,WAAOA,GAAP;AACD;;AAED,SAAO,IAAP;AACD,CArED;;AAuEO,IAAMG,WAAW,GAAG,SAAdA,WAAc,CAAA9C,IAAI;AAAA,SAAIiB,UAAU,CAACjE,WAAX,CAAuBgD,IAAvB,CAAJ;AAAA,CAAxB;;;;AAEA,IAAM+C,WAAW,GAAG,SAAdA,WAAc,CAAArG,KAAK;AAAA,SAAIuE,UAAU,CAACpD,SAAX,CAAqBnB,KAArB,CAAJ;AAAA,CAAzB;AAEP","sourcesContent":["import Html from 'slate-html-serializer';\nimport React from 'react';\nimport debug from 'debug';\nimport { object as toStyleObject } from 'to-style';\n\nimport { serialization as imgSerialization } from './plugins/image';\nimport { serialization as mathSerialization } from './plugins/math';\nimport { serialization as mediaSerialization } from './plugins/media';\nimport { serialization as listSerialization } from './plugins/list';\nimport { serialization as tableSerialization } from './plugins/table';\nimport { serialization as responseAreaSerialization } from './plugins/respArea';\nimport { Mark, Value } from 'slate';\n\nconst log = debug('@pie-lib:editable-html:serialization');\n\n/**\n * Tags to blocks.\n *\n * @type {Object}\n */\n\nexport const BLOCK_TAGS = {\n div: 'div',\n span: 'span',\n p: 'paragraph',\n blockquote: 'quote',\n pre: 'code',\n h1: 'heading-one',\n h2: 'heading-two',\n h3: 'heading-three',\n h4: 'heading-four',\n h5: 'heading-five',\n h6: 'heading-six'\n};\n\n/**\n * Tags to marks.\n *\n * @type {Object}\n */\n\nconst MARK_TAGS = {\n b: 'bold',\n em: 'italic',\n u: 'underline',\n s: 'strikethrough',\n code: 'code',\n strong: 'bold'\n};\n\nexport const parseStyleString = s => {\n const regex = /([\\w-]*)\\s*:\\s*([^;]*)/g;\n let match;\n const result = {};\n while ((match = regex.exec(s))) {\n result[match[1]] = match[2].trim();\n }\n return result;\n};\n\nexport const reactAttributes = o => toStyleObject(o, { camelize: true });\n\nconst attributesToMap = el => (acc, attribute) => {\n const value = el.getAttribute(attribute);\n if (value) {\n if (attribute === 'style') {\n const styleString = el.getAttribute(attribute);\n const reactStyleObject = reactAttributes(parseStyleString(styleString));\n acc['style'] = reactStyleObject;\n } else {\n acc[attribute] = el.getAttribute(attribute);\n }\n }\n return acc;\n};\n\nconst attributes = ['border', 'cellpadding', 'cellspacing', 'class', 'style'];\n\n/**\n * Serializer rules.\n *\n * @type {Array}\n */\n\nconst blocks = {\n deserialize(el, next) {\n log('[blocks:deserialize] block: ', el);\n const block = BLOCK_TAGS[el.tagName.toLowerCase()];\n if (!block) return;\n log('[blocks:deserialize] block: ', block);\n\n if (el.childNodes.length === 1) {\n const cn = el.childNodes[0];\n if (cn && cn.tagName && cn.tagName.toLowerCase() === block) {\n log('[we have a child node of the same]...');\n return;\n }\n }\n\n return {\n object: 'block',\n type: block,\n /**\n * Here for rendering styles for all block elements\n */\n data: { attributes: attributes.reduce(attributesToMap(el), {}) },\n nodes: next(el.childNodes)\n };\n },\n serialize: (object, children) => {\n if (object.object !== 'block') return;\n\n const jsonData = object.data.toJSON();\n\n log('[blocks:serialize] object: ', object, children);\n let key;\n\n for (key in BLOCK_TAGS) {\n if (BLOCK_TAGS[key] === object.type) {\n const Tag = key;\n\n return <Tag {...jsonData.attributes}>{children}</Tag>;\n }\n }\n }\n};\n\nconst marks = {\n deserialize(el, next) {\n const mark = MARK_TAGS[el.tagName.toLowerCase()];\n if (!mark) return;\n log('[deserialize] mark: ', mark);\n return {\n object: 'mark',\n type: mark,\n nodes: next(el.childNodes)\n };\n },\n serialize(object, children) {\n if (Mark.isMark(object)) {\n for (var key in MARK_TAGS) {\n if (MARK_TAGS[key] === object.type) {\n const Tag = key;\n return <Tag>{children}</Tag>;\n }\n }\n }\n }\n};\n\nconst findPreviousText = el => {\n if (el.nodeName === '#text') {\n return el;\n }\n\n if (el.previousSibling) {\n return findPreviousText(el.previousSibling);\n }\n\n return null;\n};\n\nexport const TEXT_RULE = {\n deserialize(el) {\n /**\n * This needs to be called on the dom element in order to merge the adjacent text nodes together\n * */\n el.normalize();\n\n if (el.tagName && el.tagName.toLowerCase() === 'br') {\n return {\n object: 'text',\n leaves: [\n {\n object: 'leaf',\n text: '\\n'\n }\n ]\n };\n }\n\n if (el.nodeName === '#text') {\n if (el.nodeValue && el.nodeValue.match(/<!--.*?-->/)) return;\n\n log('[text:deserialize] return text object..');\n return {\n object: 'text',\n leaves: [\n {\n object: 'leaf',\n text: el.nodeValue\n }\n ]\n };\n }\n },\n\n serialize(obj, children) {\n if (obj.object === 'string') {\n return children.split('\\n').reduce((array, text, i) => {\n if (i !== 0) array.push(<br />);\n array.push(text);\n return array;\n }, []);\n }\n }\n};\n\nconst RULES = [\n listSerialization,\n mathSerialization,\n mediaSerialization,\n imgSerialization,\n tableSerialization,\n responseAreaSerialization,\n TEXT_RULE,\n blocks,\n marks\n];\n\nfunction allWhitespace(node) {\n // Use ECMA-262 Edition 3 String and RegExp features\n return !/[^\\t\\n\\r ]/.test(node.textContent);\n}\n\nfunction defaultParseHtml(html) {\n if (typeof DOMParser === 'undefined') {\n throw new Error(\n 'The native `DOMParser` global which the `Html` serializer uses by default is not present in this environment. You must supply the `options.parseHtml` function instead.'\n );\n }\n\n const parsed = new DOMParser().parseFromString(html, 'text/html');\n\n const { body } = parsed;\n var textNodes = document.createTreeWalker(body, NodeFilter.SHOW_TEXT, null, null);\n var n = textNodes.nextNode();\n\n while (n) {\n if (allWhitespace(n) || n.nodeValue === '\\u200B') {\n n.parentNode.removeChild(n);\n }\n n = textNodes.nextNode();\n }\n\n return body;\n}\n\n/** If this lib is used on the server side, we need to bypass using the DOMParser - just put in a stub. */\nconst parseHtml =\n typeof window === 'undefined'\n ? () => ({\n childNodes: []\n })\n : defaultParseHtml;\n\nconst serializer = new Html({\n defaultBlock: 'div',\n rules: RULES,\n parseHtml\n});\n\nconst _extends =\n Object.assign ||\n function(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n/**\n * This is needed in order to override the function that eventually leads\n * to the max iteration of 12, which in most cases it's not enough. The newer versions\n * have a different way to calculate this, but updating to a newer version of slate\n * requires a lot of work fixing other issues. So we just increase the rules by 1000,\n * which means a lot of iterations.\n * Below is the code that calculates the max iterations.\n * var max = schema.stack.plugins.length + schema.rules.length + 1;\n */\nserializer.deserialize = function deserialize(html) {\n const options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const _options$toJSON = options.toJSON;\n const toJSON = _options$toJSON === undefined ? false : _options$toJSON;\n const defaultBlock = this.defaultBlock;\n const parseHtml = this.parseHtml;\n\n const fragment = parseHtml(html);\n const children = Array.from(fragment.childNodes);\n let nodes = this.deserializeElements(children);\n\n // COMPAT: ensure that all top-level inline nodes are wrapped into a block.\n nodes = nodes.reduce(function(memo, node, i, original) {\n if (node.object === 'block') {\n memo.push(node);\n return memo;\n }\n\n if (i > 0 && original[i - 1].object !== 'block') {\n const _block = memo[memo.length - 1];\n\n _block.nodes.push(node);\n return memo;\n }\n\n const block = _extends({ object: 'block', data: {}, isVoid: false }, defaultBlock, {\n nodes: [node]\n });\n\n memo.push(block);\n return memo;\n }, []);\n\n if (nodes.length === 0) {\n nodes = [\n _extends({ object: 'block', data: {}, isVoid: false }, defaultBlock, {\n nodes: [{ object: 'text', leaves: [{ object: 'leaf', text: '', marks: [] }] }]\n })\n ];\n }\n\n const json = {\n object: 'value',\n document: {\n object: 'document',\n data: {},\n nodes: nodes\n },\n schema: {\n rules: []\n }\n };\n\n let i;\n\n for (i = 0; i < 1000; i++) {\n json.schema.rules.push({\n match: { object: 'document' },\n nodes: [{ match: { object: 'block' } }]\n });\n }\n\n const ret = toJSON ? json : Value.fromJSON(json);\n\n if (ret) {\n return ret;\n }\n\n return null;\n};\n\nexport const htmlToValue = html => serializer.deserialize(html);\n\nexport const valueToHtml = value => serializer.serialize(value);\n\n/**\n *\n * <div><div>a</div></div> -> <div>a</div>\n *\n * <div><div>a</div><div>b</div></div> -> <div>a</div><div>b</div>\n * <div><div>a</div>4444<div>b</div></div> -> <div>a</div>4444<div>b</div>\n */\n"],"file":"serialization.js"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.primary = void 0;
7
+ var primary = '#304ffe';
8
+ exports.primary = primary;
9
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/theme.js"],"names":["primary"],"mappings":";;;;;;AAAO,IAAMA,OAAO,GAAG,SAAhB","sourcesContent":["export const primary = '#304ffe';\n"],"file":"theme.js"}
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@pie-lib/editable-html",
3
+ "version": "7.17.3",
4
+ "description": "",
5
+ "license": "ISC",
6
+ "main": "lib/index.js",
7
+ "module": "src/index.jsx",
8
+ "author": "pie-framework developers",
9
+ "dependencies": {
10
+ "@material-ui/core": "^3.8.3",
11
+ "@material-ui/icons": "^3.0.2",
12
+ "@material-ui/styles": "^3.0.0-alpha.10",
13
+ "@pie-lib/drag": "^1.1.52",
14
+ "@pie-lib/math-rendering": "^2.3.9",
15
+ "@pie-lib/math-toolbar": "^1.8.0",
16
+ "@pie-lib/render-ui": "^4.12.0",
17
+ "change-case": "^3.0.2",
18
+ "classnames": "^2.2.6",
19
+ "debug": "^4.1.1",
20
+ "immutable": "^4.0.0-rc.12",
21
+ "keycode": "^2.2.0",
22
+ "lodash": "^4.17.11",
23
+ "prop-types": "^15.6.2",
24
+ "react-attr-converter": "^0.3.1",
25
+ "react-jss": "^8.6.1",
26
+ "react-portal": "^4.2.0",
27
+ "slate": "^0.36.2",
28
+ "slate-dev-environment": "^0.2.0",
29
+ "slate-edit-list": "^0.11.3",
30
+ "slate-edit-table": "^0.17.0",
31
+ "slate-html-serializer": "^0.6.12",
32
+ "slate-prop-types": "^0.4.38",
33
+ "slate-react": "^0.14.3",
34
+ "slate-schema-violations": "^0.1.39",
35
+ "slate-soft-break": "^0.8.1",
36
+ "to-style": "^1.3.3"
37
+ },
38
+ "devDependencies": {
39
+ "@pie-framework/mathquill": "^1.1.2",
40
+ "react": "^16.8.1",
41
+ "react-dom": "^16.9.0"
42
+ },
43
+ "peerDependencies": {
44
+ "react": "^16.8.1"
45
+ },
46
+ "publishConfig": {
47
+ "access": "public"
48
+ },
49
+ "gitHead": "de37d3ba44d3e7934e2f804381fe50d2da16a29a",
50
+ "scripts": {}
51
+ }
@@ -0,0 +1,59 @@
1
+ module.exports = {
2
+ document: {
3
+ nodes: [
4
+ {
5
+ object: 'block',
6
+ type: 'div',
7
+ nodes: [
8
+ {
9
+ object: 'block',
10
+ type: 'paragraph',
11
+ nodes: [
12
+ {
13
+ object: 'text',
14
+ leaves: [
15
+ {
16
+ text: 'foo'
17
+ }
18
+ ]
19
+ },
20
+
21
+ {
22
+ object: 'inline',
23
+ type: 'image',
24
+ isVoid: true,
25
+ data: {
26
+ src:
27
+ 'https://img.washingtonpost.com/wp-apps/imrs.php?src=https://img.washingtonpost.com/news/speaking-of-science/wp-content/uploads/sites/36/2015/10/as12-49-7278-1024x1024.jpg&w=1484'
28
+ }
29
+ },
30
+
31
+ {
32
+ object: 'text',
33
+ leaves: [
34
+ {
35
+ text: 'bar'
36
+ }
37
+ ]
38
+ }
39
+ ]
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ object: 'block',
45
+ type: 'paragraph',
46
+ nodes: [
47
+ {
48
+ object: 'text',
49
+ leaves: [
50
+ {
51
+ text: 'text'
52
+ }
53
+ ]
54
+ }
55
+ ]
56
+ }
57
+ ]
58
+ }
59
+ };
@@ -0,0 +1,24 @@
1
+ <!doctype html>
2
+ <html>
3
+
4
+ <head>
5
+ <script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
6
+ <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
7
+ <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom-server.browser.production.min.js"></script>
8
+ <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
9
+ <style>
10
+ body,
11
+ span,
12
+ div,
13
+ p {
14
+ font-family: 'Roboto', sans-serif;
15
+ }
16
+ </style>
17
+ <script src="bundle.js" type="text/javascript"></script>
18
+ </head>
19
+
20
+ <body>
21
+ <div id="app"></div>
22
+ </body>
23
+
24
+ </html>
@@ -0,0 +1,83 @@
1
+ import imageData from './data';
2
+
3
+ import React from 'react';
4
+ import ReactDOM from 'react-dom';
5
+ import { Editor } from 'slate-react';
6
+ import { Range, Block, Value } from 'slate';
7
+ import EditableEditor from '../../src/backup-editor';
8
+ class Img extends React.Component {
9
+ render() {
10
+ const { data } = this.props.node;
11
+ const src = data.get('src');
12
+ return <img src={src} width={100} />;
13
+ }
14
+ }
15
+
16
+ const ImgPlugin = () => {
17
+ return {
18
+ renderNode: props => {
19
+ if (props.node.type === 'image') {
20
+ return <Img {...props} />;
21
+ }
22
+ },
23
+ onKeyDown(event, change, editor) {
24
+ const { startKey } = change.value.selection;
25
+ const n = change.value.document.getDescendant(startKey);
26
+ const p = change.value.document.getParent(n.key);
27
+
28
+ if (p.type === 'image') {
29
+ const block = Block.fromJSON({ type: 'div' });
30
+ const range = Range.fromJSON({
31
+ anchorKey: block.key,
32
+ anchorOffset: 0,
33
+ focusKey: block.key,
34
+ focusOffset: 0,
35
+ isFocused: true,
36
+ isBackward: false
37
+ });
38
+ change.insertBlockAtRange(change.value.selection, block).select(range);
39
+ }
40
+ }
41
+ };
42
+ };
43
+
44
+ export default ImgPlugin;
45
+
46
+ class ImageDemo extends React.Component {
47
+ constructor(props) {
48
+ super(props);
49
+ this.state = {
50
+ value: Value.fromJSON(imageData)
51
+ };
52
+
53
+ this.plugins = [ImgPlugin()];
54
+ }
55
+
56
+ render() {
57
+ const { value } = this.state;
58
+ return (
59
+ <div>
60
+ ImageDemo
61
+ <hr />
62
+ This demo tests adding text between images. click on the image and type
63
+ some text...
64
+ <hr />
65
+ <Editor
66
+ value={value}
67
+ onChange={change => this.setState({ value: change.value })}
68
+ plugins={this.plugins}
69
+ />
70
+ <EditableEditor
71
+ value={value}
72
+ onChange={change => this.setState({ value: change.value })}
73
+ plugins={this.plugins}
74
+ />
75
+ </div>
76
+ );
77
+ }
78
+ }
79
+
80
+ document.addEventListener('DOMContentLoaded', () => {
81
+ const el = React.createElement(ImageDemo, {});
82
+ ReactDOM.render(el, document.querySelector('#app'));
83
+ });