@pie-element/ebsr 6.6.3-next.1085 → 6.6.3-next.1092

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 (491) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/configure/CHANGELOG.md +77 -0
  3. package/configure/package.json +3 -3
  4. package/controller/CHANGELOG.md +8 -0
  5. package/controller/package.json +1 -1
  6. package/package.json +3 -3
  7. package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.json +0 -1972
  8. package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.md +0 -1826
  9. package/configure/node_modules/@pie-element/multiple-choice/LICENSE.md +0 -5
  10. package/configure/node_modules/@pie-element/multiple-choice/PRINT.md +0 -35
  11. package/configure/node_modules/@pie-element/multiple-choice/README.md +0 -56
  12. package/configure/node_modules/@pie-element/multiple-choice/choice.png +0 -0
  13. package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.json +0 -1387
  14. package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.md +0 -1367
  15. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +0 -116
  16. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js.map +0 -1
  17. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js +0 -198
  18. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js.map +0 -1
  19. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js +0 -615
  20. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js.map +0 -1
  21. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js +0 -18
  22. package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js.map +0 -1
  23. package/configure/node_modules/@pie-element/multiple-choice/configure/package.json +0 -20
  24. package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.json +0 -527
  25. package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.md +0 -768
  26. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js +0 -18
  27. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js.map +0 -1
  28. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js +0 -305
  29. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js.map +0 -1
  30. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js +0 -36
  31. package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js.map +0 -1
  32. package/configure/node_modules/@pie-element/multiple-choice/controller/package.json +0 -15
  33. package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json +0 -431
  34. package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +0 -337
  35. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/config.js +0 -8
  36. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/generate.js +0 -52
  37. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/index.html +0 -1
  38. package/configure/node_modules/@pie-element/multiple-choice/docs/demo/session.js +0 -7
  39. package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json +0 -364
  40. package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +0 -294
  41. package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +0 -298
  42. package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js.map +0 -1
  43. package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js +0 -157
  44. package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js.map +0 -1
  45. package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js +0 -174
  46. package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js.map +0 -1
  47. package/configure/node_modules/@pie-element/multiple-choice/lib/index.js +0 -151
  48. package/configure/node_modules/@pie-element/multiple-choice/lib/index.js.map +0 -1
  49. package/configure/node_modules/@pie-element/multiple-choice/lib/main.js +0 -97
  50. package/configure/node_modules/@pie-element/multiple-choice/lib/main.js.map +0 -1
  51. package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js +0 -254
  52. package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js.map +0 -1
  53. package/configure/node_modules/@pie-element/multiple-choice/lib/print.js +0 -129
  54. package/configure/node_modules/@pie-element/multiple-choice/lib/print.js.map +0 -1
  55. package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js +0 -35
  56. package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js.map +0 -1
  57. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.json +0 -1677
  58. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.md +0 -1695
  59. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/LICENSE.md +0 -5
  60. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/README.md +0 -12
  61. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js +0 -44
  62. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js.map +0 -1
  63. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js +0 -86
  64. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +0 -1
  65. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +0 -164
  66. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +0 -1
  67. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +0 -398
  68. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +0 -1
  69. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js +0 -54
  70. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +0 -1
  71. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +0 -185
  72. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +0 -1
  73. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +0 -75
  74. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +0 -1
  75. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +0 -178
  76. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +0 -1
  77. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js +0 -46
  78. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js.map +0 -1
  79. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js +0 -145
  80. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js.map +0 -1
  81. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js +0 -216
  82. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js.map +0 -1
  83. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js +0 -139
  84. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js.map +0 -1
  85. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js +0 -131
  86. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js.map +0 -1
  87. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js +0 -179
  88. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js.map +0 -1
  89. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +0 -101
  90. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +0 -1
  91. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js +0 -24
  92. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +0 -1
  93. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +0 -105
  94. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +0 -1
  95. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +0 -87
  96. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +0 -1
  97. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +0 -79
  98. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +0 -1
  99. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js +0 -364
  100. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js.map +0 -1
  101. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js +0 -265
  102. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +0 -1
  103. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +0 -41
  104. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +0 -1
  105. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +0 -77
  106. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +0 -1
  107. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js +0 -130
  108. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +0 -1
  109. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js +0 -412
  110. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +0 -1
  111. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +0 -43
  112. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +0 -1
  113. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +0 -56
  114. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +0 -1
  115. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js +0 -106
  116. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +0 -1
  117. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +0 -198
  118. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +0 -1
  119. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js +0 -180
  120. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +0 -1
  121. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +0 -84
  122. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +0 -1
  123. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/package.json +0 -30
  124. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/alert-dialog.jsx +0 -43
  125. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/checkbox.jsx +0 -63
  126. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +0 -103
  127. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +0 -319
  128. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-utils.js +0 -30
  129. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +0 -116
  130. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +0 -54
  131. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +0 -98
  132. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/form-section.jsx +0 -23
  133. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/help.jsx +0 -88
  134. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/index.js +0 -58
  135. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/input.jsx +0 -72
  136. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/inputs.jsx +0 -96
  137. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/langs.jsx +0 -122
  138. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +0 -64
  139. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/index.js +0 -4
  140. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +0 -60
  141. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +0 -31
  142. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +0 -64
  143. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field-custom.jsx +0 -276
  144. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +0 -196
  145. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +0 -18
  146. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +0 -52
  147. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/index.js +0 -75
  148. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +0 -297
  149. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +0 -20
  150. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +0 -31
  151. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +0 -51
  152. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +0 -121
  153. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/two-choice.jsx +0 -94
  154. package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +0 -36
  155. package/configure/node_modules/@pie-element/multiple-choice/package.json +0 -34
  156. package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.json +0 -547
  157. package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.md +0 -524
  158. package/configure/node_modules/@pie-lib/correct-answer-toggle/LICENSE.md +0 -5
  159. package/configure/node_modules/@pie-lib/correct-answer-toggle/README.md +0 -64
  160. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js +0 -86
  161. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js.map +0 -1
  162. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js +0 -155
  163. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js.map +0 -1
  164. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js +0 -65
  165. package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js.map +0 -1
  166. package/configure/node_modules/@pie-lib/correct-answer-toggle/package.json +0 -36
  167. package/configure/node_modules/@pie-lib/correct-answer-toggle/preview.png +0 -0
  168. package/configure/node_modules/@pie-lib/correct-answer-toggle/src/expander.jsx +0 -65
  169. package/configure/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx +0 -75
  170. package/configure/node_modules/@pie-lib/correct-answer-toggle/src/styles.js +0 -60
  171. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +0 -3327
  172. package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +0 -1676
  173. package/configure/node_modules/@pie-lib/editable-html/LICENSE.md +0 -5
  174. package/configure/node_modules/@pie-lib/editable-html/README.md +0 -45
  175. package/configure/node_modules/@pie-lib/editable-html/deploy.sh +0 -16
  176. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +0 -837
  177. package/configure/node_modules/@pie-lib/editable-html/lib/editor.js.map +0 -1
  178. package/configure/node_modules/@pie-lib/editable-html/lib/index.js +0 -224
  179. package/configure/node_modules/@pie-lib/editable-html/lib/index.js.map +0 -1
  180. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js +0 -16
  181. package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js.map +0 -1
  182. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popover.js +0 -70
  183. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popover.js.map +0 -1
  184. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js +0 -261
  185. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js.map +0 -1
  186. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js +0 -362
  187. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js.map +0 -1
  188. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js +0 -393
  189. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js.map +0 -1
  190. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js +0 -78
  191. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js.map +0 -1
  192. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js +0 -221
  193. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js.map +0 -1
  194. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js +0 -135
  195. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map +0 -1
  196. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js +0 -141
  197. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js.map +0 -1
  198. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js +0 -204
  199. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js.map +0 -1
  200. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js +0 -347
  201. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js.map +0 -1
  202. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js +0 -339
  203. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js.map +0 -1
  204. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js +0 -434
  205. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js.map +0 -1
  206. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js +0 -99
  207. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js.map +0 -1
  208. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js +0 -93
  209. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js.map +0 -1
  210. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js +0 -251
  211. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js.map +0 -1
  212. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js +0 -97
  213. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js.map +0 -1
  214. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js +0 -54
  215. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js.map +0 -1
  216. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js +0 -93
  217. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js.map +0 -1
  218. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js +0 -288
  219. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js.map +0 -1
  220. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js +0 -70
  221. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js.map +0 -1
  222. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js +0 -110
  223. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js.map +0 -1
  224. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js +0 -69
  225. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js.map +0 -1
  226. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js +0 -497
  227. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js.map +0 -1
  228. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js +0 -158
  229. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js.map +0 -1
  230. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js +0 -132
  231. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js.map +0 -1
  232. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js +0 -50
  233. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js.map +0 -1
  234. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js +0 -263
  235. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js.map +0 -1
  236. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js +0 -32
  237. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js.map +0 -1
  238. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js +0 -161
  239. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js.map +0 -1
  240. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js +0 -346
  241. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js.map +0 -1
  242. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js +0 -62
  243. package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js.map +0 -1
  244. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js +0 -428
  245. package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +0 -1
  246. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js +0 -9
  247. package/configure/node_modules/@pie-lib/editable-html/lib/theme.js.map +0 -1
  248. package/configure/node_modules/@pie-lib/editable-html/package.json +0 -51
  249. package/configure/node_modules/@pie-lib/editable-html/playground/image/data.js +0 -59
  250. package/configure/node_modules/@pie-lib/editable-html/playground/image/index.html +0 -24
  251. package/configure/node_modules/@pie-lib/editable-html/playground/image/index.jsx +0 -83
  252. package/configure/node_modules/@pie-lib/editable-html/playground/index.html +0 -27
  253. package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.html +0 -25
  254. package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.jsx +0 -151
  255. package/configure/node_modules/@pie-lib/editable-html/playground/package.json +0 -15
  256. package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.html +0 -26
  257. package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.jsx +0 -30
  258. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/data.js +0 -29
  259. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/image-plugin.jsx +0 -40
  260. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.html +0 -23
  261. package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.jsx +0 -96
  262. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/data.js +0 -29
  263. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/image-plugin.jsx +0 -40
  264. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.html +0 -24
  265. package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.jsx +0 -12
  266. package/configure/node_modules/@pie-lib/editable-html/playground/static.json +0 -3
  267. package/configure/node_modules/@pie-lib/editable-html/playground/table-examples.html +0 -67
  268. package/configure/node_modules/@pie-lib/editable-html/playground/webpack.config.js +0 -42
  269. package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +0 -724
  270. package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +0 -145
  271. package/configure/node_modules/@pie-lib/editable-html/src/parse-html.js +0 -8
  272. package/configure/node_modules/@pie-lib/editable-html/src/plugins/README.md +0 -27
  273. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/custom-popover.js +0 -45
  274. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/index.jsx +0 -237
  275. package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/utils.js +0 -444
  276. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +0 -318
  277. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +0 -32
  278. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +0 -182
  279. package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +0 -93
  280. package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +0 -115
  281. package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +0 -175
  282. package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +0 -283
  283. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +0 -284
  284. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +0 -372
  285. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +0 -53
  286. package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-wrapper.jsx +0 -43
  287. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/choice.jsx +0 -187
  288. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +0 -78
  289. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +0 -45
  290. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +0 -68
  291. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +0 -259
  292. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +0 -63
  293. package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +0 -77
  294. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +0 -59
  295. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +0 -437
  296. package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +0 -104
  297. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +0 -111
  298. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +0 -36
  299. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +0 -225
  300. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +0 -21
  301. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +0 -97
  302. package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +0 -323
  303. package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +0 -32
  304. package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +0 -385
  305. package/configure/node_modules/@pie-lib/editable-html/src/theme.js +0 -1
  306. package/configure/node_modules/@pie-lib/editable-html/static.json +0 -1
  307. package/configure/node_modules/@pie-lib/math-input/CHANGELOG.json +0 -1547
  308. package/configure/node_modules/@pie-lib/math-input/CHANGELOG.md +0 -765
  309. package/configure/node_modules/@pie-lib/math-input/LICENSE.md +0 -5
  310. package/configure/node_modules/@pie-lib/math-input/README.md +0 -27
  311. package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js +0 -129
  312. package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js.map +0 -1
  313. package/configure/node_modules/@pie-lib/math-input/lib/index.js +0 -80
  314. package/configure/node_modules/@pie-lib/math-input/lib/index.js.map +0 -1
  315. package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js +0 -440
  316. package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js.map +0 -1
  317. package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js +0 -34
  318. package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js.map +0 -1
  319. package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js +0 -41
  320. package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js.map +0 -1
  321. package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js +0 -17
  322. package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js.map +0 -1
  323. package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js +0 -46
  324. package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js.map +0 -1
  325. package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js +0 -43
  326. package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js.map +0 -1
  327. package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js +0 -53
  328. package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js.map +0 -1
  329. package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js +0 -16
  330. package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js.map +0 -1
  331. package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js +0 -35
  332. package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js.map +0 -1
  333. package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js +0 -31
  334. package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js.map +0 -1
  335. package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js +0 -165
  336. package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js.map +0 -1
  337. package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js +0 -295
  338. package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js.map +0 -1
  339. package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js +0 -54
  340. package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js.map +0 -1
  341. package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js +0 -32
  342. package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js.map +0 -1
  343. package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js +0 -23
  344. package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js.map +0 -1
  345. package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js +0 -23
  346. package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js.map +0 -1
  347. package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js +0 -69
  348. package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js.map +0 -1
  349. package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js +0 -23
  350. package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js.map +0 -1
  351. package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js +0 -17
  352. package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js.map +0 -1
  353. package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js +0 -45
  354. package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js.map +0 -1
  355. package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js +0 -23
  356. package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js.map +0 -1
  357. package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js +0 -53
  358. package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js.map +0 -1
  359. package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js +0 -130
  360. package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js.map +0 -1
  361. package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js +0 -29
  362. package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js.map +0 -1
  363. package/configure/node_modules/@pie-lib/math-input/lib/math-input.js +0 -206
  364. package/configure/node_modules/@pie-lib/math-input/lib/math-input.js.map +0 -1
  365. package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js +0 -23
  366. package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js.map +0 -1
  367. package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js +0 -24
  368. package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js.map +0 -1
  369. package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js +0 -257
  370. package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js.map +0 -1
  371. package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js +0 -224
  372. package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js.map +0 -1
  373. package/configure/node_modules/@pie-lib/math-input/package.json +0 -26
  374. package/configure/node_modules/@pie-lib/math-input/src/horizontal-keypad.jsx +0 -56
  375. package/configure/node_modules/@pie-lib/math-input/src/index.jsx +0 -27
  376. package/configure/node_modules/@pie-lib/math-input/src/keypad/index.jsx +0 -367
  377. package/configure/node_modules/@pie-lib/math-input/src/keypad/keys-layout.js +0 -17
  378. package/configure/node_modules/@pie-lib/math-input/src/keys/basic-operators.js +0 -32
  379. package/configure/node_modules/@pie-lib/math-input/src/keys/chars.js +0 -5
  380. package/configure/node_modules/@pie-lib/math-input/src/keys/comparison.js +0 -27
  381. package/configure/node_modules/@pie-lib/math-input/src/keys/constants.js +0 -35
  382. package/configure/node_modules/@pie-lib/math-input/src/keys/digits.js +0 -40
  383. package/configure/node_modules/@pie-lib/math-input/src/keys/edit.js +0 -3
  384. package/configure/node_modules/@pie-lib/math-input/src/keys/exponent.js +0 -27
  385. package/configure/node_modules/@pie-lib/math-input/src/keys/fractions.js +0 -23
  386. package/configure/node_modules/@pie-lib/math-input/src/keys/geometry.js +0 -140
  387. package/configure/node_modules/@pie-lib/math-input/src/keys/grades.js +0 -379
  388. package/configure/node_modules/@pie-lib/math-input/src/keys/index.js +0 -21
  389. package/configure/node_modules/@pie-lib/math-input/src/keys/log.js +0 -22
  390. package/configure/node_modules/@pie-lib/math-input/src/keys/logic.js +0 -15
  391. package/configure/node_modules/@pie-lib/math-input/src/keys/matrices.js +0 -15
  392. package/configure/node_modules/@pie-lib/math-input/src/keys/misc.js +0 -60
  393. package/configure/node_modules/@pie-lib/math-input/src/keys/navigation.js +0 -8
  394. package/configure/node_modules/@pie-lib/math-input/src/keys/operators.js +0 -9
  395. package/configure/node_modules/@pie-lib/math-input/src/keys/statistics.js +0 -36
  396. package/configure/node_modules/@pie-lib/math-input/src/keys/sub-sup.js +0 -15
  397. package/configure/node_modules/@pie-lib/math-input/src/keys/trigonometry.js +0 -15
  398. package/configure/node_modules/@pie-lib/math-input/src/keys/utils.js +0 -71
  399. package/configure/node_modules/@pie-lib/math-input/src/keys/vars.js +0 -19
  400. package/configure/node_modules/@pie-lib/math-input/src/math-input.jsx +0 -128
  401. package/configure/node_modules/@pie-lib/math-input/src/mq/custom-elements.js +0 -11
  402. package/configure/node_modules/@pie-lib/math-input/src/mq/index.js +0 -4
  403. package/configure/node_modules/@pie-lib/math-input/src/mq/input.jsx +0 -163
  404. package/configure/node_modules/@pie-lib/math-input/src/mq/static.jsx +0 -145
  405. package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +0 -672
  406. package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +0 -457
  407. package/configure/node_modules/@pie-lib/math-rendering/LICENSE.md +0 -5
  408. package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +0 -30
  409. package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +0 -1
  410. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +0 -316
  411. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +0 -1
  412. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +0 -23
  413. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +0 -1
  414. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +0 -123
  415. package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +0 -1
  416. package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +0 -103
  417. package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +0 -1
  418. package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +0 -281
  419. package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +0 -1
  420. package/configure/node_modules/@pie-lib/math-rendering/package.json +0 -19
  421. package/configure/node_modules/@pie-lib/math-rendering/playground/demo.html +0 -872
  422. package/configure/node_modules/@pie-lib/math-rendering/playground/demo.js +0 -108
  423. package/configure/node_modules/@pie-lib/math-rendering/playground/main.html +0 -156
  424. package/configure/node_modules/@pie-lib/math-rendering/playground/main.js +0 -16
  425. package/configure/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +0 -29
  426. package/configure/node_modules/@pie-lib/math-rendering/src/index.js +0 -4
  427. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +0 -215
  428. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +0 -13
  429. package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +0 -24
  430. package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +0 -69
  431. package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +0 -235
  432. package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.json +0 -862
  433. package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.md +0 -639
  434. package/configure/node_modules/@pie-lib/math-toolbar/LICENSE.md +0 -5
  435. package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js +0 -53
  436. package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js.map +0 -1
  437. package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js +0 -483
  438. package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js.map +0 -1
  439. package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js +0 -280
  440. package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js.map +0 -1
  441. package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js +0 -173
  442. package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js.map +0 -1
  443. package/configure/node_modules/@pie-lib/math-toolbar/package.json +0 -37
  444. package/configure/node_modules/@pie-lib/math-toolbar/src/done-button.jsx +0 -39
  445. package/configure/node_modules/@pie-lib/math-toolbar/src/editor-and-pad.jsx +0 -388
  446. package/configure/node_modules/@pie-lib/math-toolbar/src/index.jsx +0 -202
  447. package/configure/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx +0 -107
  448. package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +0 -937
  449. package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +0 -626
  450. package/configure/node_modules/@pie-lib/render-ui/LICENSE.md +0 -5
  451. package/configure/node_modules/@pie-lib/render-ui/README.md +0 -33
  452. package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +0 -146
  453. package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +0 -1
  454. package/configure/node_modules/@pie-lib/render-ui/lib/color.js +0 -134
  455. package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +0 -1
  456. package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +0 -160
  457. package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +0 -1
  458. package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +0 -24
  459. package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +0 -1
  460. package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +0 -102
  461. package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +0 -1
  462. package/configure/node_modules/@pie-lib/render-ui/lib/index.js +0 -104
  463. package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +0 -1
  464. package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +0 -60
  465. package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +0 -1
  466. package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +0 -133
  467. package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +0 -1
  468. package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +0 -162
  469. package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +0 -1
  470. package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +0 -28
  471. package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +0 -1
  472. package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +0 -28
  473. package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +0 -1
  474. package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +0 -160
  475. package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +0 -1
  476. package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +0 -206
  477. package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +0 -1
  478. package/configure/node_modules/@pie-lib/render-ui/package.json +0 -30
  479. package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +0 -68
  480. package/configure/node_modules/@pie-lib/render-ui/src/color.js +0 -48
  481. package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +0 -100
  482. package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +0 -14
  483. package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +0 -40
  484. package/configure/node_modules/@pie-lib/render-ui/src/index.js +0 -27
  485. package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +0 -41
  486. package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +0 -77
  487. package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +0 -90
  488. package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +0 -19
  489. package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +0 -19
  490. package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +0 -89
  491. package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +0 -118
@@ -1,204 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.serialization = exports["default"] = void 0;
9
-
10
- var _react = _interopRequireDefault(require("react"));
11
-
12
- var _slate = require("slate");
13
-
14
- var _immutable = _interopRequireDefault(require("immutable"));
15
-
16
- var _propTypes = _interopRequireDefault(require("prop-types"));
17
-
18
- var _slateEditList = _interopRequireDefault(require("slate-edit-list"));
19
-
20
- var _debug = _interopRequireDefault(require("debug"));
21
-
22
- var log = (0, _debug["default"])('@pie-lib:editable-html:plugins:list');
23
-
24
- var b = function b(type, next, childNodes) {
25
- return {
26
- object: 'block',
27
- type: type,
28
- nodes: next(childNodes)
29
- };
30
- };
31
-
32
- var serialization = {
33
- deserialize: function deserialize(el, next) {
34
- var name = el.tagName.toLowerCase();
35
-
36
- if (name === 'li') {
37
- return b('list_item', next, el.childNodes);
38
- }
39
-
40
- if (name === 'ul') {
41
- return b('ul_list', next, el.children.length ? Array.from(el.children) : el.childNodes);
42
- }
43
-
44
- if (name === 'ol') {
45
- return b('ol_list', next, el.children.length ? Array.from(el.children) : el.childNodes);
46
- }
47
- },
48
- serialize: function serialize(object, children) {
49
- if (object.object !== 'block') return;
50
-
51
- if (object.type === 'list_item') {
52
- return /*#__PURE__*/_react["default"].createElement("li", null, children);
53
- }
54
-
55
- if (object.type === 'ul_list') {
56
- return /*#__PURE__*/_react["default"].createElement("ul", null, children);
57
- }
58
-
59
- if (object.type === 'ol_list') {
60
- return /*#__PURE__*/_react["default"].createElement("ol", null, children);
61
- }
62
- }
63
- };
64
- exports.serialization = serialization;
65
-
66
- var createEditList = function createEditList() {
67
- var core = (0, _slateEditList["default"])({
68
- typeDefault: 'span'
69
- }); // fix outdated schema
70
-
71
- if (core.schema && core.schema.blocks) {
72
- Object.keys(core.schema.blocks).forEach(function (key) {
73
- var block = core.schema.blocks[key];
74
-
75
- if (block.parent) {
76
- return;
77
- }
78
-
79
- block.nodes[0] = {
80
- type: block.nodes[0].types[0]
81
- };
82
- });
83
- }
84
- /**
85
- * This override of the core.changes.wrapInList is needed because the version
86
- * of immutable that we have does not support getting the element at a specific
87
- * index with a square bracket (list[0]). We have to use the list.get function instead
88
- */
89
-
90
- /**
91
- * Returns the highest list of blocks that cover the current selection
92
- */
93
-
94
-
95
- var getHighestSelectedBlocks = function getHighestSelectedBlocks(value) {
96
- var range = value.selection;
97
- var document = value.document;
98
- var startBlock = document.getClosestBlock(range.startKey);
99
- var endBlock = document.getClosestBlock(range.endKey);
100
-
101
- if (startBlock === endBlock) {
102
- return _immutable["default"].List([startBlock]);
103
- }
104
-
105
- var ancestor = document.getCommonAncestor(startBlock.key, endBlock.key);
106
- var startPath = ancestor.getPath(startBlock.key);
107
- var endPath = ancestor.getPath(endBlock.key);
108
- return ancestor.nodes.slice(startPath.get(0), endPath.get(0) + 1);
109
- };
110
- /**
111
- * Wrap the blocks in the current selection in a new list. Selected
112
- * lists are merged together.
113
- */
114
-
115
-
116
- core.changes.wrapInList = function (change, type, data) {
117
- var selectedBlocks = getHighestSelectedBlocks(change.value); // Wrap in container
118
-
119
- change.wrapBlock({
120
- type: type,
121
- data: _slate.Data.create(data)
122
- }, {
123
- normalize: false
124
- }); // Wrap in list items
125
-
126
- selectedBlocks.forEach(function (node) {
127
- if (core.utils.isList(node)) {
128
- // Merge its items with the created list
129
- node.nodes.forEach(function (_ref) {
130
- var key = _ref.key;
131
- return change.unwrapNodeByKey(key, {
132
- normalize: false
133
- });
134
- });
135
- } else if (node.type !== 'list_item') {
136
- change.wrapBlockByKey(node.key, 'list_item', {
137
- normalize: false
138
- });
139
- }
140
- });
141
- return change.normalize();
142
- };
143
-
144
- return core;
145
- };
146
-
147
- var _default = function _default(options) {
148
- var type = options.type,
149
- icon = options.icon;
150
- var core = createEditList(); // eslint-disable-next-line react/display-name
151
-
152
- core.renderNode = function (props) {
153
- var node = props.node,
154
- attributes = props.attributes,
155
- children = props.children;
156
-
157
- switch (node.type) {
158
- case 'ul_list':
159
- return /*#__PURE__*/_react["default"].createElement("ul", attributes, children);
160
-
161
- case 'ol_list':
162
- return /*#__PURE__*/_react["default"].createElement("ol", attributes, children);
163
-
164
- case 'list_item':
165
- return /*#__PURE__*/_react["default"].createElement("li", attributes, children);
166
- }
167
- };
168
-
169
- core.toolbar = {
170
- isMark: false,
171
- type: type,
172
- icon: icon,
173
- isActive: function isActive(value, type) {
174
- if (!core.utils.isSelectionInList(value)) {
175
- return false;
176
- }
177
-
178
- var current = core.utils.getCurrentList(value);
179
- return current ? current.type === type : false;
180
- },
181
- onClick: function onClick(value, onChange) {
182
- log('[onClick]', value);
183
- var inList = core.utils.isSelectionInList(value);
184
-
185
- if (inList) {
186
- var change = value.change().call(core.changes.unwrapList);
187
- onChange(change);
188
- } else {
189
- var _change = value.change().call(core.changes.wrapInList, type);
190
-
191
- onChange(_change);
192
- }
193
- }
194
- };
195
- core.renderNode.propTypes = {
196
- node: _propTypes["default"].object,
197
- attributes: _propTypes["default"].object,
198
- children: _propTypes["default"].func
199
- };
200
- return core;
201
- };
202
-
203
- exports["default"] = _default;
204
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/plugins/list/index.jsx"],"names":["log","b","type","next","childNodes","object","nodes","serialization","deserialize","el","name","tagName","toLowerCase","children","length","Array","from","serialize","createEditList","core","typeDefault","schema","blocks","Object","keys","forEach","key","block","parent","types","getHighestSelectedBlocks","value","range","selection","document","startBlock","getClosestBlock","startKey","endBlock","endKey","Immutable","List","ancestor","getCommonAncestor","startPath","getPath","endPath","slice","get","changes","wrapInList","change","data","selectedBlocks","wrapBlock","Data","create","normalize","node","utils","isList","_ref","unwrapNodeByKey","wrapBlockByKey","options","icon","renderNode","props","attributes","toolbar","isMark","isActive","isSelectionInList","current","getCurrentList","onClick","onChange","inList","call","unwrapList","propTypes","PropTypes","func"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA,IAAMA,GAAG,GAAG,uBAAM,qCAAN,CAAZ;;AAEA,IAAMC,CAAC,GAAG,SAAJA,CAAI,CAACC,IAAD,EAAOC,IAAP,EAAaC,UAAb;AAAA,SAA6B;AACrCC,IAAAA,MAAM,EAAE,OAD6B;AAErCH,IAAAA,IAAI,EAAJA,IAFqC;AAGrCI,IAAAA,KAAK,EAAEH,IAAI,CAACC,UAAD;AAH0B,GAA7B;AAAA,CAAV;;AAMO,IAAMG,aAAa,GAAG;AAC3BC,EAAAA,WAD2B,uBACfC,EADe,EACXN,IADW,EACL;AACpB,QAAMO,IAAI,GAAGD,EAAE,CAACE,OAAH,CAAWC,WAAX,EAAb;;AAEA,QAAIF,IAAI,KAAK,IAAb,EAAmB;AACjB,aAAOT,CAAC,CAAC,WAAD,EAAcE,IAAd,EAAoBM,EAAE,CAACL,UAAvB,CAAR;AACD;;AAED,QAAIM,IAAI,KAAK,IAAb,EAAmB;AACjB,aAAOT,CAAC,CAAC,SAAD,EAAYE,IAAZ,EAAkBM,EAAE,CAACI,QAAH,CAAYC,MAAZ,GAAqBC,KAAK,CAACC,IAAN,CAAWP,EAAE,CAACI,QAAd,CAArB,GAA+CJ,EAAE,CAACL,UAApE,CAAR;AACD;;AAED,QAAIM,IAAI,KAAK,IAAb,EAAmB;AACjB,aAAOT,CAAC,CAAC,SAAD,EAAYE,IAAZ,EAAkBM,EAAE,CAACI,QAAH,CAAYC,MAAZ,GAAqBC,KAAK,CAACC,IAAN,CAAWP,EAAE,CAACI,QAAd,CAArB,GAA+CJ,EAAE,CAACL,UAApE,CAAR;AACD;AACF,GAf0B;AAgB3Ba,EAAAA,SAhB2B,qBAgBjBZ,MAhBiB,EAgBTQ,QAhBS,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UC;AAHM,GAA5B;AAMA,SAAO/D,IAAP;AACD,C","sourcesContent":["import React from 'react';\nimport { Data } from 'slate';\nimport Immutable from 'immutable';\nimport PropTypes from 'prop-types';\nimport EditList from 'slate-edit-list';\nimport debug from 'debug';\n\nconst log = debug('@pie-lib:editable-html:plugins:list');\n\nconst b = (type, next, childNodes) => ({\n object: 'block',\n type,\n nodes: next(childNodes)\n});\n\nexport const serialization = {\n deserialize(el, next) {\n const name = el.tagName.toLowerCase();\n\n if (name === 'li') {\n return b('list_item', next, el.childNodes);\n }\n\n if (name === 'ul') {\n return b('ul_list', next, el.children.length ? Array.from(el.children) : el.childNodes);\n }\n\n if (name === 'ol') {\n return b('ol_list', next, el.children.length ? Array.from(el.children) : el.childNodes);\n }\n },\n serialize(object, children) {\n if (object.object !== 'block') return;\n\n if (object.type === 'list_item') {\n return <li>{children}</li>;\n }\n\n if (object.type === 'ul_list') {\n return <ul>{children}</ul>;\n }\n\n if (object.type === 'ol_list') {\n return <ol>{children}</ol>;\n }\n }\n};\n\nconst createEditList = () => {\n const core = EditList({\n typeDefault: 'span'\n });\n\n // fix outdated schema\n if (core.schema && core.schema.blocks) {\n Object.keys(core.schema.blocks).forEach(key => {\n const block = core.schema.blocks[key];\n\n if (block.parent) {\n return;\n }\n\n block.nodes[0] = { type: block.nodes[0].types[0] };\n });\n }\n\n /**\n * This override of the core.changes.wrapInList is needed because the version\n * of immutable that we have does not support getting the element at a specific\n * index with a square bracket (list[0]). We have to use the list.get function instead\n */\n\n /**\n * Returns the highest list of blocks that cover the current selection\n */\n const getHighestSelectedBlocks = value => {\n const range = value.selection;\n const document = value.document;\n\n const startBlock = document.getClosestBlock(range.startKey);\n const endBlock = document.getClosestBlock(range.endKey);\n\n if (startBlock === endBlock) {\n return Immutable.List([startBlock]);\n }\n\n const ancestor = document.getCommonAncestor(startBlock.key, endBlock.key);\n const startPath = ancestor.getPath(startBlock.key);\n const endPath = ancestor.getPath(endBlock.key);\n\n return ancestor.nodes.slice(startPath.get(0), endPath.get(0) + 1);\n };\n\n /**\n * Wrap the blocks in the current selection in a new list. Selected\n * lists are merged together.\n */\n core.changes.wrapInList = function(change, type, data) {\n const selectedBlocks = getHighestSelectedBlocks(change.value);\n\n // Wrap in container\n change.wrapBlock({ type: type, data: Data.create(data) }, { normalize: false });\n\n // Wrap in list items\n selectedBlocks.forEach(function(node) {\n if (core.utils.isList(node)) {\n // Merge its items with the created list\n node.nodes.forEach(function(_ref) {\n const key = _ref.key;\n return change.unwrapNodeByKey(key, { normalize: false });\n });\n } else if (node.type !== 'list_item') {\n change.wrapBlockByKey(node.key, 'list_item', {\n normalize: false\n });\n }\n });\n\n return change.normalize();\n };\n\n return core;\n};\n\nexport default options => {\n const { type, icon } = options;\n\n const core = createEditList();\n\n // eslint-disable-next-line react/display-name\n core.renderNode = props => {\n const { node, attributes, children } = props;\n\n switch (node.type) {\n case 'ul_list':\n return <ul {...attributes}>{children}</ul>;\n case 'ol_list':\n return <ol {...attributes}>{children}</ol>;\n case 'list_item':\n return <li {...attributes}>{children}</li>;\n }\n };\n\n core.toolbar = {\n isMark: false,\n type,\n icon,\n isActive: (value, type) => {\n if (!core.utils.isSelectionInList(value)) {\n return false;\n }\n const current = core.utils.getCurrentList(value);\n return current ? current.type === type : false;\n },\n onClick: (value, onChange) => {\n log('[onClick]', value);\n const inList = core.utils.isSelectionInList(value);\n if (inList) {\n const change = value.change().call(core.changes.unwrapList);\n onChange(change);\n } else {\n const change = value.change().call(core.changes.wrapInList, type);\n onChange(change);\n }\n }\n };\n\n core.renderNode.propTypes = {\n node: PropTypes.object,\n attributes: PropTypes.object,\n children: PropTypes.func\n };\n\n return core;\n};\n"],"file":"index.js"}
@@ -1,347 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.CustomToolbarComp = void 0;
9
- exports["default"] = MathPlugin;
10
- exports.serialization = exports.inlineMath = void 0;
11
-
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
-
16
- var _Functions = _interopRequireDefault(require("@material-ui/icons/Functions"));
17
-
18
- var _slate = require("slate");
19
-
20
- var _mathToolbar = require("@pie-lib/math-toolbar");
21
-
22
- var _mathRendering = require("@pie-lib/math-rendering");
23
-
24
- var _react = _interopRequireDefault(require("react"));
25
-
26
- var _debug = _interopRequireDefault(require("debug"));
27
-
28
- var _slatePropTypes = _interopRequireDefault(require("slate-prop-types"));
29
-
30
- var _propTypes = _interopRequireDefault(require("prop-types"));
31
-
32
- var _serialization = require("../../serialization");
33
-
34
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
35
-
36
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
37
-
38
- var log = (0, _debug["default"])('@pie-lib:editable-html:plugins:math');
39
- var TEXT_NODE = 3;
40
-
41
- function generateAdditionalKeys() {
42
- var keyData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
43
- return keyData.map(function (key) {
44
- return {
45
- name: key,
46
- latex: key,
47
- write: key,
48
- label: key
49
- };
50
- });
51
- }
52
-
53
- var CustomToolbarComp = /*#__PURE__*/_react["default"].memo(function (props) {
54
- var node = props.node,
55
- value = props.value,
56
- onFocus = props.onFocus,
57
- onBlur = props.onBlur,
58
- onClick = props.onClick;
59
-
60
- var _ref = props || {},
61
- pluginProps = _ref.pluginProps;
62
-
63
- var _ref2 = pluginProps || {},
64
- math = _ref2.math;
65
-
66
- var _ref3 = math || {},
67
- keypadMode = _ref3.keypadMode,
68
- customKeys = _ref3.customKeys,
69
- _ref3$controlledKeypa = _ref3.controlledKeypadMode,
70
- controlledKeypadMode = _ref3$controlledKeypa === void 0 ? true : _ref3$controlledKeypa;
71
-
72
- var onDone = function onDone(latex) {
73
- var update = _objectSpread(_objectSpread({}, node.data.toObject()), {}, {
74
- latex: latex
75
- });
76
-
77
- var change = value.change().setNodeByKey(node.key, {
78
- data: update
79
- });
80
- var nextText = value.document.getNextText(node.key);
81
- change.moveFocusTo(nextText.key, 0).moveAnchorTo(nextText.key, 0);
82
- props.onToolbarDone(change, false);
83
- };
84
-
85
- var onChange = function onChange(latex) {
86
- var update = _objectSpread(_objectSpread({}, node.data.toObject()), {}, {
87
- latex: latex
88
- });
89
-
90
- var change = value.change().setNodeByKey(node.key, {
91
- data: update
92
- });
93
- log('call onToolbarChange:', change);
94
- props.onDataChange(node.key, update);
95
- };
96
-
97
- var latex = node.data.get('latex');
98
- return /*#__PURE__*/_react["default"].createElement(_mathToolbar.MathToolbar, {
99
- autoFocus: true,
100
- additionalKeys: generateAdditionalKeys(customKeys),
101
- latex: latex,
102
- onChange: onChange,
103
- onDone: onDone,
104
- onBlur: onBlur,
105
- onFocus: onFocus,
106
- onClick: onClick,
107
- keypadMode: keypadMode,
108
- controlledKeypadMode: controlledKeypadMode
109
- });
110
- }, function (prev, next) {
111
- var node = prev.node,
112
- _prev$pluginProps = prev.pluginProps;
113
- _prev$pluginProps = _prev$pluginProps === void 0 ? {} : _prev$pluginProps;
114
- var _prev$pluginProps$mat = _prev$pluginProps.math;
115
- _prev$pluginProps$mat = _prev$pluginProps$mat === void 0 ? {} : _prev$pluginProps$mat;
116
- var keypadMode = _prev$pluginProps$mat.keypadMode,
117
- controlledKeypadMode = _prev$pluginProps$mat.controlledKeypadMode;
118
- var nodeNext = next.node,
119
- _next$pluginProps = next.pluginProps;
120
- _next$pluginProps = _next$pluginProps === void 0 ? {} : _next$pluginProps;
121
- var _next$pluginProps$mat = _next$pluginProps.math;
122
- _next$pluginProps$mat = _next$pluginProps$mat === void 0 ? {} : _next$pluginProps$mat;
123
- var keypadModeNext = _next$pluginProps$mat.keypadMode,
124
- controlledKeypadModeNext = _next$pluginProps$mat.controlledKeypadMode;
125
- var keypadModeChanged = keypadMode !== keypadModeNext;
126
- var controlledKeypadModeChanged = controlledKeypadMode !== controlledKeypadModeNext;
127
- var equal = node.equals(nodeNext);
128
- return equal && !keypadModeChanged && !controlledKeypadModeChanged;
129
- });
130
-
131
- exports.CustomToolbarComp = CustomToolbarComp;
132
- CustomToolbarComp.propTypes = {
133
- node: _slatePropTypes["default"].node.isRequired,
134
- value: _slatePropTypes["default"].value,
135
- onToolbarDone: _propTypes["default"].func,
136
- onDataChange: _propTypes["default"].func,
137
- onFocus: _propTypes["default"].func,
138
- onClick: _propTypes["default"].func,
139
- onBlur: _propTypes["default"].func
140
- };
141
-
142
- function MathPlugin() {
143
- return {
144
- name: 'math',
145
- toolbar: {
146
- icon: /*#__PURE__*/_react["default"].createElement(_Functions["default"], null),
147
- onClick: function onClick(value, onChange) {
148
- log('[insertMath]');
149
- var math = inlineMath();
150
- var change = value.change().insertInline(math);
151
- onChange(change);
152
- },
153
- supports: function supports(node) {
154
- return node && node.object === 'inline' && node.type === 'math';
155
- },
156
-
157
- /**
158
- * Return a react component function
159
- * @param node {Slate.Node}
160
- * @param value {Slate.Value}
161
- * @param onDone {(change?: Slate.Change, finishEditing :boolea) => void} - a function to call once the toolbar
162
- * has made any changes, call with the node.key and a data object.
163
- */
164
- CustomToolbarComp: CustomToolbarComp
165
- },
166
- schema: {
167
- document: {
168
- match: [{
169
- type: 'math'
170
- }]
171
- }
172
- },
173
- pluginStyles: function pluginStyles(node, parentNode, p) {
174
- if (p) {
175
- return {
176
- position: 'absolute',
177
- top: 'initial'
178
- };
179
- }
180
- },
181
- renderNode: function renderNode(props) {
182
- if (props.node.type === 'math') {
183
- log('[renderNode]: data:', props.node.data);
184
- return /*#__PURE__*/_react["default"].createElement(_mathToolbar.MathPreview, props);
185
- }
186
- /**
187
- * Here for rendering mathml content
188
- */
189
-
190
-
191
- if (props.node.type === 'mathml') {
192
- var html = props.node.data.get('html');
193
- return /*#__PURE__*/_react["default"].createElement("span", (0, _extends2["default"])({}, props.attributes, {
194
- dangerouslySetInnerHTML: {
195
- __html: html
196
- }
197
- }));
198
- }
199
- }
200
- };
201
- }
202
-
203
- MathPlugin.ROUND_BRACKETS = 'round_brackets';
204
- MathPlugin.SQUARE_BRACKETS = 'square_brackets';
205
- MathPlugin.DOLLAR = 'dollar';
206
- MathPlugin.DOUBLE_DOLLAR = 'double_dollar';
207
-
208
- var inlineMath = function inlineMath() {
209
- return _slate.Inline.create({
210
- object: 'inline',
211
- type: 'math',
212
- isVoid: true,
213
- data: {
214
- latex: ''
215
- }
216
- });
217
- };
218
-
219
- exports.inlineMath = inlineMath;
220
-
221
- var htmlDecode = function htmlDecode(input) {
222
- var doc = new DOMParser().parseFromString(input, 'text/html');
223
- return doc.documentElement.textContent;
224
- };
225
-
226
- var getTagName = function getTagName(el) {
227
- return (el && el.tagName || '').toLowerCase();
228
- };
229
- /**
230
- * Makes sure that strings that contain stuff like:
231
- * x<y are not transformed into x by the DOMParser because it thinks
232
- * that <y is the start of a dom element tag
233
- * @param input
234
- * @returns {*}
235
- */
236
-
237
-
238
- var lessThanHandling = function lessThanHandling(input) {
239
- var arrowSplit = input.split('<'); // if we don't have at least 2 characters there's no point in checking
240
-
241
- if (input.length > 2) {
242
- return arrowSplit.reduce(function (st, part) {
243
- /*
244
- We check if this element resulted is:
245
- div - continuation of a beginning of a HTML element
246
- /div - closing of a HTML tag
247
- br/> - beginning and closing of a html TAG
248
- */
249
- if (part.match(/<[a-zA-Z/][\s\S]*>/ig)) {
250
- return "".concat(st).concat(st ? '<' : '').concat(part);
251
- }
252
-
253
- return "".concat(st).concat(st ? '&lt;' : '').concat(part);
254
- }, '');
255
- }
256
-
257
- return input;
258
- };
259
-
260
- var serialization = {
261
- deserialize: function deserialize(el) {
262
- var tagName = getTagName(el);
263
- /**
264
- * This is used for when there's a wrapper over the mathml element.
265
- * Because of this slate rule: "Only allow block nodes or inline and text nodes in blocks."
266
- * The element that contains only the mathml is removed (along with the math) because it has
267
- * an inline child and the block is of type block
268
- * This is for legacy content only since our math rendering is valid for the core slate rules
269
- */
270
-
271
- var hasMathChild = _serialization.BLOCK_TAGS[tagName] && el.childNodes.length === 1 && getTagName(el.firstChild) === 'math';
272
- log('[deserialize] name: ', tagName);
273
- /**
274
- * This is here in order to be able to render mathml content
275
- */
276
-
277
- if (tagName === 'math' || el.dataset && el.dataset.type === 'mathml' || hasMathChild) {
278
- var newHtml = hasMathChild ? el.innerHTML : el.outerHTML;
279
- return {
280
- object: 'inline',
281
- isVoid: true,
282
- type: 'mathml',
283
- data: {
284
- html: newHtml
285
- }
286
- };
287
- }
288
-
289
- if (el.nodeType === TEXT_NODE) {
290
- return;
291
- }
292
-
293
- if (tagName !== 'span') {
294
- return;
295
- }
296
-
297
- var hasLatex = el.hasAttribute('data-latex') || el.hasAttribute('latex');
298
-
299
- if (hasLatex) {
300
- var latex = htmlDecode(el.innerHTML);
301
-
302
- var _unWrapMath = (0, _mathRendering.unWrapMath)(latex),
303
- unwrapped = _unWrapMath.unwrapped,
304
- wrapType = _unWrapMath.wrapType;
305
-
306
- log('[deserialize]: noBrackets: ', unwrapped, wrapType);
307
- return {
308
- object: 'inline',
309
- type: 'math',
310
- isVoid: true,
311
- nodes: [],
312
- data: {
313
- latex: unwrapped,
314
- wrapper: wrapType
315
- }
316
- };
317
- }
318
- },
319
- serialize: function serialize(object) {
320
- if (object.type === 'math') {
321
- var l = object.data.get('latex');
322
- var wrapper = object.data.get('wrapper');
323
- log('[serialize] latex: ', l);
324
- var decoded = htmlDecode(lessThanHandling(l));
325
- return /*#__PURE__*/_react["default"].createElement("span", {
326
- "data-latex": "",
327
- "data-raw": decoded
328
- }, (0, _mathRendering.wrapMath)(decoded, wrapper));
329
- }
330
- /**
331
- * Here for rendering mathml content
332
- */
333
-
334
-
335
- if (object.type === 'mathml') {
336
- var html = object.data.get('html');
337
- return /*#__PURE__*/_react["default"].createElement("span", {
338
- "data-type": "mathml",
339
- dangerouslySetInnerHTML: {
340
- __html: html
341
- }
342
- });
343
- }
344
- }
345
- };
346
- exports.serialization = serialization;
347
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/plugins/math/index.jsx"],"names":["log","TEXT_NODE","generateAdditionalKeys","keyData","map","key","name","latex","write","label","CustomToolbarComp","React","memo","props","node","value","onFocus","onBlur","onClick","pluginProps","math","keypadMode","customKeys","controlledKeypadMode","onDone","update","data","toObject","change","setNodeByKey","nextText","document","getNextText","moveFocusTo","moveAnchorTo","onToolbarDone","onChange","onDataChange","get","prev","next","nodeNext","keypadModeNext","controlledKeypadModeNext","keypadModeChanged","controlledKeypadModeChanged","equal","equals","propTypes","SlatePropTypes","isRequired","PropTypes","func","MathPlugin","toolbar","icon","inlineMath","insertInline","supports","object","type","schema","match","pluginStyles","parentNode","p","position","top","renderNode","html","attributes","__html","ROUND_BRACKETS","SQUARE_BRACKETS","DOLLAR","DOUBLE_DOLLAR","Inline","create","isVoid","htmlDecode","input","doc","DOMParser","parseFromString","documentElement","textContent","getTagName","el","tagName","toLowerCase","lessThanHandling","arrowSplit","split","length","reduce","st","part","serialization","deserialize","hasMathChild","BLOCK_TAGS","childNodes","firstChild","dataset","newHtml","innerHTML","outerHTML","nodeType","hasLatex","hasAttribute","unwrapped","wrapType","nodes","wrapper","serialize","l","decoded"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;AACA,IAAMA,GAAG,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M,sBAAW,EAAjB;AAAoB,oBAAUC;AAA9B,SACG,6BAASA,OAAT,EAAkBH,OAAlB,CADH,CADF;AAKD;AAED;AACJ;AACA;;;AACI,QAAItD,MAAM,CAACC,IAAP,KAAgB,QAApB,EAA8B;AAC5B,UAAMS,IAAI,GAAGV,MAAM,CAACjC,IAAP,CAAYY,GAAZ,CAAgB,MAAhB,CAAb;AAEA,0BAAO;AAAM,qBAAU,QAAhB;AAAyB,QAAA,uBAAuB,EAAE;AAAEiC,UAAAA,MAAM,EAAEF;AAAV;AAAlD,QAAP;AACD;AACF;AA7E0B,CAAtB","sourcesContent":["import Functions from '@material-ui/icons/Functions';\nimport { Inline } from 'slate';\nimport { MathPreview, MathToolbar } from '@pie-lib/math-toolbar';\nimport { wrapMath, unWrapMath } from '@pie-lib/math-rendering';\nimport React from 'react';\nimport debug from 'debug';\nimport SlatePropTypes from 'slate-prop-types';\nimport PropTypes from 'prop-types';\n\nimport { BLOCK_TAGS } from '../../serialization';\nconst log = debug('@pie-lib:editable-html:plugins:math');\n\nconst TEXT_NODE = 3;\n\nfunction generateAdditionalKeys(keyData = []) {\n return keyData.map(key => ({\n name: key,\n latex: key,\n write: key,\n label: key\n }));\n}\n\nexport const CustomToolbarComp = React.memo(\n props => {\n const { node, value, onFocus, onBlur, onClick } = props;\n const { pluginProps } = props || {};\n const { math } = pluginProps || {};\n const { keypadMode, customKeys, controlledKeypadMode = true } = math || {};\n\n const onDone = latex => {\n const update = {\n ...node.data.toObject(),\n latex\n };\n const change = value.change().setNodeByKey(node.key, { data: update });\n\n const nextText = value.document.getNextText(node.key);\n\n change.moveFocusTo(nextText.key, 0).moveAnchorTo(nextText.key, 0);\n\n props.onToolbarDone(change, false);\n };\n\n const onChange = latex => {\n const update = {\n ...node.data.toObject(),\n latex\n };\n const change = value.change().setNodeByKey(node.key, { data: update });\n log('call onToolbarChange:', change);\n props.onDataChange(node.key, update);\n };\n\n const latex = node.data.get('latex');\n\n return (\n <MathToolbar\n autoFocus\n additionalKeys={generateAdditionalKeys(customKeys)}\n latex={latex}\n onChange={onChange}\n onDone={onDone}\n onBlur={onBlur}\n onFocus={onFocus}\n onClick={onClick}\n keypadMode={keypadMode}\n controlledKeypadMode={controlledKeypadMode}\n />\n );\n },\n (prev, next) => {\n const { node, pluginProps: { math: { keypadMode, controlledKeypadMode } = {} } = {} } = prev;\n const {\n node: nodeNext,\n pluginProps: {\n math: { keypadMode: keypadModeNext, controlledKeypadMode: controlledKeypadModeNext } = {}\n } = {}\n } = next;\n const keypadModeChanged = keypadMode !== keypadModeNext;\n const controlledKeypadModeChanged = controlledKeypadMode !== controlledKeypadModeNext;\n\n const equal = node.equals(nodeNext);\n return equal && !keypadModeChanged && !controlledKeypadModeChanged;\n }\n);\n\nCustomToolbarComp.propTypes = {\n node: SlatePropTypes.node.isRequired,\n value: SlatePropTypes.value,\n onToolbarDone: PropTypes.func,\n onDataChange: PropTypes.func,\n onFocus: PropTypes.func,\n onClick: PropTypes.func,\n onBlur: PropTypes.func\n};\n\nexport default function MathPlugin() {\n return {\n name: 'math',\n toolbar: {\n icon: <Functions />,\n onClick: (value, onChange) => {\n log('[insertMath]');\n const math = inlineMath();\n const change = value.change().insertInline(math);\n onChange(change);\n },\n supports: node => node && node.object === 'inline' && node.type === 'math',\n /**\n * Return a react component function\n * @param node {Slate.Node}\n * @param value {Slate.Value}\n * @param onDone {(change?: Slate.Change, finishEditing :boolea) => void} - a function to call once the toolbar\n * has made any changes, call with the node.key and a data object.\n */\n CustomToolbarComp\n },\n schema: {\n document: { match: [{ type: 'math' }] }\n },\n\n pluginStyles: (node, parentNode, p) => {\n if (p) {\n return {\n position: 'absolute',\n top: 'initial'\n };\n }\n },\n\n renderNode: props => {\n if (props.node.type === 'math') {\n log('[renderNode]: data:', props.node.data);\n return <MathPreview {...props} />;\n }\n\n /**\n * Here for rendering mathml content\n */\n if (props.node.type === 'mathml') {\n const html = props.node.data.get('html');\n\n return <span {...props.attributes} dangerouslySetInnerHTML={{ __html: html }} />;\n }\n }\n };\n}\n\nMathPlugin.ROUND_BRACKETS = 'round_brackets';\nMathPlugin.SQUARE_BRACKETS = 'square_brackets';\nMathPlugin.DOLLAR = 'dollar';\nMathPlugin.DOUBLE_DOLLAR = 'double_dollar';\n\nexport const inlineMath = () =>\n Inline.create({\n object: 'inline',\n type: 'math',\n isVoid: true,\n data: {\n latex: ''\n }\n });\n\nconst htmlDecode = input => {\n const doc = new DOMParser().parseFromString(input, 'text/html');\n\n return doc.documentElement.textContent;\n};\n\nconst getTagName = el => {\n return ((el && el.tagName) || '').toLowerCase();\n};\n\n/**\n * Makes sure that strings that contain stuff like:\n * x<y are not transformed into x by the DOMParser because it thinks\n * that <y is the start of a dom element tag\n * @param input\n * @returns {*}\n */\nconst lessThanHandling = input => {\n const arrowSplit = input.split('<');\n\n // if we don't have at least 2 characters there's no point in checking\n if (input.length > 2) {\n return arrowSplit.reduce((st, part) => {\n /*\n We check if this element resulted is:\n div - continuation of a beginning of a HTML element\n /div - closing of a HTML tag\n br/> - beginning and closing of a html TAG\n */\n if (part.match(/<[a-zA-Z/][\\s\\S]*>/ig)) {\n return `${st}${st ? '<' : ''}${part}`;\n }\n\n return `${st}${st ? '&lt;' : ''}${part}`;\n }, '');\n }\n\n return input;\n};\n\nexport const serialization = {\n deserialize(el) {\n const tagName = getTagName(el);\n /**\n * This is used for when there's a wrapper over the mathml element.\n * Because of this slate rule: \"Only allow block nodes or inline and text nodes in blocks.\"\n * The element that contains only the mathml is removed (along with the math) because it has\n * an inline child and the block is of type block\n * This is for legacy content only since our math rendering is valid for the core slate rules\n */\n const hasMathChild =\n BLOCK_TAGS[tagName] && el.childNodes.length === 1 && getTagName(el.firstChild) === 'math';\n log('[deserialize] name: ', tagName);\n\n /**\n * This is here in order to be able to render mathml content\n */\n if (tagName === 'math' || (el.dataset && el.dataset.type === 'mathml') || hasMathChild) {\n const newHtml = hasMathChild ? el.innerHTML : el.outerHTML;\n\n return {\n object: 'inline',\n isVoid: true,\n type: 'mathml',\n data: {\n html: newHtml\n }\n };\n }\n\n if (el.nodeType === TEXT_NODE) {\n return;\n }\n\n if (tagName !== 'span') {\n return;\n }\n\n const hasLatex = el.hasAttribute('data-latex') || el.hasAttribute('latex');\n\n if (hasLatex) {\n const latex = htmlDecode(el.innerHTML);\n const { unwrapped, wrapType } = unWrapMath(latex);\n log('[deserialize]: noBrackets: ', unwrapped, wrapType);\n return {\n object: 'inline',\n type: 'math',\n isVoid: true,\n nodes: [],\n data: {\n latex: unwrapped,\n wrapper: wrapType\n }\n };\n }\n },\n serialize(object) {\n if (object.type === 'math') {\n const l = object.data.get('latex');\n const wrapper = object.data.get('wrapper');\n log('[serialize] latex: ', l);\n const decoded = htmlDecode(lessThanHandling(l));\n return (\n <span data-latex=\"\" data-raw={decoded}>\n {wrapMath(decoded, wrapper)}\n </span>\n );\n }\n\n /**\n * Here for rendering mathml content\n */\n if (object.type === 'mathml') {\n const html = object.data.get('html');\n\n return <span data-type=\"mathml\" dangerouslySetInnerHTML={{ __html: html }} />;\n }\n }\n};\n"],"file":"index.js"}