@pie-element/ebsr 6.6.3-next.1089 → 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.
- package/CHANGELOG.md +77 -0
- package/configure/CHANGELOG.md +77 -0
- package/configure/package.json +2 -2
- package/controller/CHANGELOG.md +8 -0
- package/controller/package.json +1 -1
- package/package.json +3 -3
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.json +0 -1972
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.md +0 -1826
- package/configure/node_modules/@pie-element/multiple-choice/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/multiple-choice/PRINT.md +0 -35
- package/configure/node_modules/@pie-element/multiple-choice/README.md +0 -56
- package/configure/node_modules/@pie-element/multiple-choice/choice.png +0 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.json +0 -1387
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.md +0 -1367
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +0 -116
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js +0 -198
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js +0 -615
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/package.json +0 -20
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.json +0 -527
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.md +0 -768
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js +0 -305
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js +0 -36
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/package.json +0 -15
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json +0 -431
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +0 -337
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/config.js +0 -8
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/generate.js +0 -52
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/index.html +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/session.js +0 -7
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json +0 -364
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +0 -294
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +0 -298
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js +0 -157
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js +0 -174
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js +0 -151
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js +0 -97
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js +0 -254
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js +0 -129
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js +0 -35
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.json +0 -1677
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.md +0 -1695
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/LICENSE.md +0 -5
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/README.md +0 -12
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js +0 -44
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js +0 -86
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +0 -164
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +0 -398
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js +0 -54
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +0 -185
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +0 -75
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +0 -178
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js +0 -46
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js +0 -145
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js +0 -216
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js +0 -139
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js +0 -131
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js +0 -179
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +0 -101
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js +0 -24
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +0 -105
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +0 -87
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +0 -79
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js +0 -364
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js +0 -265
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +0 -41
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +0 -77
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js +0 -130
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js +0 -412
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +0 -43
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +0 -56
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js +0 -106
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +0 -198
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js +0 -180
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +0 -84
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/package.json +0 -30
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/alert-dialog.jsx +0 -43
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/checkbox.jsx +0 -63
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +0 -103
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +0 -319
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-utils.js +0 -30
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +0 -116
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +0 -54
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +0 -98
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/form-section.jsx +0 -23
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/help.jsx +0 -88
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/index.js +0 -58
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/input.jsx +0 -72
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/inputs.jsx +0 -96
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/langs.jsx +0 -122
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +0 -64
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/index.js +0 -4
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +0 -60
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +0 -31
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +0 -64
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field-custom.jsx +0 -276
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +0 -196
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +0 -52
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/index.js +0 -75
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +0 -297
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +0 -20
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +0 -31
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +0 -51
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +0 -121
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/two-choice.jsx +0 -94
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +0 -36
- package/configure/node_modules/@pie-element/multiple-choice/package.json +0 -34
- package/configure/node_modules/@pie-framework/mathquill/CHANGELOG.md +0 -218
- package/configure/node_modules/@pie-framework/mathquill/README.md +0 -43
- package/configure/node_modules/@pie-framework/mathquill/build/fonts/Symbola.eot +0 -0
- package/configure/node_modules/@pie-framework/mathquill/build/fonts/Symbola.svg +0 -2025
- package/configure/node_modules/@pie-framework/mathquill/build/fonts/Symbola.ttf +0 -0
- package/configure/node_modules/@pie-framework/mathquill/build/fonts/Symbola.woff +0 -0
- package/configure/node_modules/@pie-framework/mathquill/build/fonts/Symbola.woff2 +0 -0
- package/configure/node_modules/@pie-framework/mathquill/build/index-dev.js +0 -5
- package/configure/node_modules/@pie-framework/mathquill/build/index.js +0 -5
- package/configure/node_modules/@pie-framework/mathquill/build/jquery.global.js +0 -5
- package/configure/node_modules/@pie-framework/mathquill/build/mathquill.css +0 -847
- package/configure/node_modules/@pie-framework/mathquill/build/mathquill.js +0 -6396
- package/configure/node_modules/@pie-framework/mathquill/build/mathquill.min.js +0 -13
- package/configure/node_modules/@pie-framework/mathquill/package.json +0 -34
- package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.json +0 -547
- package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.md +0 -524
- package/configure/node_modules/@pie-lib/correct-answer-toggle/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/correct-answer-toggle/README.md +0 -64
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js +0 -86
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js.map +0 -1
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js +0 -155
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js +0 -65
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js.map +0 -1
- package/configure/node_modules/@pie-lib/correct-answer-toggle/package.json +0 -36
- package/configure/node_modules/@pie-lib/correct-answer-toggle/preview.png +0 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/expander.jsx +0 -65
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx +0 -75
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/styles.js +0 -60
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +0 -3327
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +0 -1676
- package/configure/node_modules/@pie-lib/editable-html/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/editable-html/README.md +0 -45
- package/configure/node_modules/@pie-lib/editable-html/deploy.sh +0 -16
- package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +0 -837
- package/configure/node_modules/@pie-lib/editable-html/lib/editor.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/index.js +0 -224
- package/configure/node_modules/@pie-lib/editable-html/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js +0 -16
- package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popover.js +0 -70
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/custom-popover.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js +0 -261
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js +0 -362
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/characters/utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js +0 -393
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js +0 -78
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js +0 -221
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js +0 -135
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js +0 -141
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js +0 -204
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js +0 -347
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js +0 -339
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js +0 -434
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js +0 -99
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js +0 -93
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js +0 -251
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js +0 -97
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js +0 -54
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js +0 -93
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js +0 -288
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js +0 -70
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js +0 -110
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js +0 -69
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js +0 -497
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js +0 -158
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js +0 -132
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js +0 -50
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js +0 -263
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js +0 -32
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js +0 -161
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js +0 -346
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js +0 -62
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js +0 -428
- package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/lib/theme.js +0 -9
- package/configure/node_modules/@pie-lib/editable-html/lib/theme.js.map +0 -1
- package/configure/node_modules/@pie-lib/editable-html/package.json +0 -51
- package/configure/node_modules/@pie-lib/editable-html/playground/image/data.js +0 -59
- package/configure/node_modules/@pie-lib/editable-html/playground/image/index.html +0 -24
- package/configure/node_modules/@pie-lib/editable-html/playground/image/index.jsx +0 -83
- package/configure/node_modules/@pie-lib/editable-html/playground/index.html +0 -27
- package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.html +0 -25
- package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.jsx +0 -151
- package/configure/node_modules/@pie-lib/editable-html/playground/package.json +0 -15
- package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.html +0 -26
- package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.jsx +0 -30
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/data.js +0 -29
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/image-plugin.jsx +0 -40
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.html +0 -23
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.jsx +0 -96
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/data.js +0 -29
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/image-plugin.jsx +0 -40
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.html +0 -24
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.jsx +0 -12
- package/configure/node_modules/@pie-lib/editable-html/playground/static.json +0 -3
- package/configure/node_modules/@pie-lib/editable-html/playground/table-examples.html +0 -67
- package/configure/node_modules/@pie-lib/editable-html/playground/webpack.config.js +0 -42
- package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +0 -724
- package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +0 -145
- package/configure/node_modules/@pie-lib/editable-html/src/parse-html.js +0 -8
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/README.md +0 -27
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/custom-popover.js +0 -45
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/index.jsx +0 -237
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/characters/utils.js +0 -444
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +0 -318
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +0 -32
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +0 -182
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +0 -93
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +0 -115
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +0 -175
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +0 -283
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +0 -284
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +0 -372
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +0 -53
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-wrapper.jsx +0 -43
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/choice.jsx +0 -187
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +0 -78
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +0 -45
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +0 -68
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +0 -259
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +0 -63
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +0 -77
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +0 -59
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +0 -437
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +0 -104
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +0 -111
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +0 -36
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +0 -225
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +0 -21
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +0 -97
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +0 -323
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +0 -32
- package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +0 -385
- package/configure/node_modules/@pie-lib/editable-html/src/theme.js +0 -1
- package/configure/node_modules/@pie-lib/editable-html/static.json +0 -1
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.json +0 -1547
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.md +0 -765
- package/configure/node_modules/@pie-lib/math-input/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/math-input/README.md +0 -27
- package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js +0 -129
- package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/index.js +0 -80
- package/configure/node_modules/@pie-lib/math-input/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js +0 -440
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js +0 -34
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js +0 -41
- package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js +0 -17
- package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js +0 -46
- package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js +0 -43
- package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js +0 -53
- package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js +0 -16
- package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js +0 -35
- package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js +0 -31
- package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js +0 -165
- package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js +0 -295
- package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js +0 -54
- package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js +0 -32
- package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js +0 -69
- package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js +0 -17
- package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js +0 -45
- package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js +0 -53
- package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js +0 -130
- package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js +0 -29
- package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/math-input.js +0 -206
- package/configure/node_modules/@pie-lib/math-input/lib/math-input.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js +0 -24
- package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js +0 -257
- package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js +0 -224
- package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-input/package.json +0 -26
- package/configure/node_modules/@pie-lib/math-input/src/horizontal-keypad.jsx +0 -56
- package/configure/node_modules/@pie-lib/math-input/src/index.jsx +0 -27
- package/configure/node_modules/@pie-lib/math-input/src/keypad/index.jsx +0 -367
- package/configure/node_modules/@pie-lib/math-input/src/keypad/keys-layout.js +0 -17
- package/configure/node_modules/@pie-lib/math-input/src/keys/basic-operators.js +0 -32
- package/configure/node_modules/@pie-lib/math-input/src/keys/chars.js +0 -5
- package/configure/node_modules/@pie-lib/math-input/src/keys/comparison.js +0 -27
- package/configure/node_modules/@pie-lib/math-input/src/keys/constants.js +0 -35
- package/configure/node_modules/@pie-lib/math-input/src/keys/digits.js +0 -40
- package/configure/node_modules/@pie-lib/math-input/src/keys/edit.js +0 -3
- package/configure/node_modules/@pie-lib/math-input/src/keys/exponent.js +0 -27
- package/configure/node_modules/@pie-lib/math-input/src/keys/fractions.js +0 -23
- package/configure/node_modules/@pie-lib/math-input/src/keys/geometry.js +0 -140
- package/configure/node_modules/@pie-lib/math-input/src/keys/grades.js +0 -379
- package/configure/node_modules/@pie-lib/math-input/src/keys/index.js +0 -21
- package/configure/node_modules/@pie-lib/math-input/src/keys/log.js +0 -22
- package/configure/node_modules/@pie-lib/math-input/src/keys/logic.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keys/matrices.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keys/misc.js +0 -60
- package/configure/node_modules/@pie-lib/math-input/src/keys/navigation.js +0 -8
- package/configure/node_modules/@pie-lib/math-input/src/keys/operators.js +0 -9
- package/configure/node_modules/@pie-lib/math-input/src/keys/statistics.js +0 -36
- package/configure/node_modules/@pie-lib/math-input/src/keys/sub-sup.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keys/trigonometry.js +0 -15
- package/configure/node_modules/@pie-lib/math-input/src/keys/utils.js +0 -71
- package/configure/node_modules/@pie-lib/math-input/src/keys/vars.js +0 -19
- package/configure/node_modules/@pie-lib/math-input/src/math-input.jsx +0 -128
- package/configure/node_modules/@pie-lib/math-input/src/mq/custom-elements.js +0 -11
- package/configure/node_modules/@pie-lib/math-input/src/mq/index.js +0 -4
- package/configure/node_modules/@pie-lib/math-input/src/mq/input.jsx +0 -163
- package/configure/node_modules/@pie-lib/math-input/src/mq/static.jsx +0 -145
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +0 -672
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +0 -457
- package/configure/node_modules/@pie-lib/math-rendering/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +0 -30
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +0 -316
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +0 -23
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +0 -123
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +0 -103
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +0 -281
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/package.json +0 -19
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.html +0 -872
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.js +0 -108
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.html +0 -156
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.js +0 -16
- package/configure/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +0 -29
- package/configure/node_modules/@pie-lib/math-rendering/src/index.js +0 -4
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +0 -215
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +0 -13
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +0 -24
- package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +0 -69
- package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +0 -235
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.json +0 -862
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.md +0 -639
- package/configure/node_modules/@pie-lib/math-toolbar/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js +0 -53
- package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js +0 -483
- package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js +0 -280
- package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js +0 -173
- package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-toolbar/package.json +0 -37
- package/configure/node_modules/@pie-lib/math-toolbar/src/done-button.jsx +0 -39
- package/configure/node_modules/@pie-lib/math-toolbar/src/editor-and-pad.jsx +0 -388
- package/configure/node_modules/@pie-lib/math-toolbar/src/index.jsx +0 -202
- package/configure/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx +0 -107
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +0 -937
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +0 -626
- package/configure/node_modules/@pie-lib/render-ui/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/render-ui/README.md +0 -33
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +0 -146
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js +0 -134
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +0 -160
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +0 -24
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +0 -102
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js +0 -104
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +0 -60
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +0 -133
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +0 -162
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +0 -28
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +0 -28
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +0 -160
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +0 -206
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/package.json +0 -30
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +0 -68
- package/configure/node_modules/@pie-lib/render-ui/src/color.js +0 -48
- package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +0 -100
- package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +0 -14
- package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +0 -40
- package/configure/node_modules/@pie-lib/render-ui/src/index.js +0 -27
- package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +0 -41
- package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +0 -77
- package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +0 -90
- package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +0 -19
- package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +0 -19
- package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +0 -89
- package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +0 -118
|
@@ -1,221 +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["default"] = ImagePlugin;
|
|
9
|
-
exports.serialization = void 0;
|
|
10
|
-
|
|
11
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
|
|
13
|
-
var _slate = require("slate");
|
|
14
|
-
|
|
15
|
-
var _Image = _interopRequireDefault(require("@material-ui/icons/Image"));
|
|
16
|
-
|
|
17
|
-
var _component = _interopRequireDefault(require("./component"));
|
|
18
|
-
|
|
19
|
-
var _imageToolbar = _interopRequireDefault(require("./image-toolbar"));
|
|
20
|
-
|
|
21
|
-
var _insertImageHandler = _interopRequireDefault(require("./insert-image-handler"));
|
|
22
|
-
|
|
23
|
-
var _react = _interopRequireDefault(require("react"));
|
|
24
|
-
|
|
25
|
-
var _debug = _interopRequireDefault(require("debug"));
|
|
26
|
-
|
|
27
|
-
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; }
|
|
28
|
-
|
|
29
|
-
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; }
|
|
30
|
-
|
|
31
|
-
var log = (0, _debug["default"])('@pie-lib:editable-html:plugins:image');
|
|
32
|
-
|
|
33
|
-
function ImagePlugin(opts) {
|
|
34
|
-
var toolbar = opts.insertImageRequested && {
|
|
35
|
-
icon: /*#__PURE__*/_react["default"].createElement(_Image["default"], null),
|
|
36
|
-
onClick: function onClick(value, onChange) {
|
|
37
|
-
log('[toolbar] onClick');
|
|
38
|
-
|
|
39
|
-
var inline = _slate.Inline.create({
|
|
40
|
-
type: 'image',
|
|
41
|
-
isVoid: true,
|
|
42
|
-
data: {
|
|
43
|
-
loaded: false,
|
|
44
|
-
src: undefined
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
var change = value.change().insertInline(inline);
|
|
49
|
-
onChange(change);
|
|
50
|
-
opts.insertImageRequested(function (getValue) {
|
|
51
|
-
return new _insertImageHandler["default"](inline, getValue, onChange);
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
supports: function supports(node) {
|
|
55
|
-
return node.object === 'inline' && node.type === 'image';
|
|
56
|
-
},
|
|
57
|
-
customToolbar: function customToolbar(node, value, onToolbarDone) {
|
|
58
|
-
var percent = node.data.get('resizePercent');
|
|
59
|
-
|
|
60
|
-
var onChange = function onChange(resizePercent) {
|
|
61
|
-
var update = _objectSpread(_objectSpread({}, node.data.toObject()), {}, {
|
|
62
|
-
resizePercent: resizePercent
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
var change = value.change().setNodeByKey(node.key, {
|
|
66
|
-
data: update
|
|
67
|
-
});
|
|
68
|
-
onToolbarDone(change, false);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
var Tb = function Tb() {
|
|
72
|
-
return /*#__PURE__*/_react["default"].createElement(_imageToolbar["default"], {
|
|
73
|
-
percent: percent || 100,
|
|
74
|
-
onChange: onChange
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
return Tb;
|
|
79
|
-
},
|
|
80
|
-
showDone: true
|
|
81
|
-
};
|
|
82
|
-
return {
|
|
83
|
-
name: 'image',
|
|
84
|
-
toolbar: toolbar,
|
|
85
|
-
deleteNode: function deleteNode(e, node, value, onChange) {
|
|
86
|
-
e.preventDefault();
|
|
87
|
-
|
|
88
|
-
if (opts.onDelete) {
|
|
89
|
-
var update = node.data.merge(_slate.Data.create({
|
|
90
|
-
deleteStatus: 'pending'
|
|
91
|
-
}));
|
|
92
|
-
var change = value.change().setNodeByKey(node.key, {
|
|
93
|
-
data: update
|
|
94
|
-
});
|
|
95
|
-
onChange(change);
|
|
96
|
-
opts.onDelete(node.data.get('src'), function (err, v) {
|
|
97
|
-
if (!err) {
|
|
98
|
-
change = v.change().removeNodeByKey(node.key);
|
|
99
|
-
} else {
|
|
100
|
-
log('[error]: ', err);
|
|
101
|
-
change = v.change().setNodeByKey(node.key, node.data.merge(_slate.Data.create({
|
|
102
|
-
deleteStatus: 'failed'
|
|
103
|
-
})));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
onChange(change);
|
|
107
|
-
});
|
|
108
|
-
} else {
|
|
109
|
-
var _change = value.change().removeNodeByKey(node.key);
|
|
110
|
-
|
|
111
|
-
onChange(_change);
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
stopReset: function stopReset(value) {
|
|
115
|
-
var imgPendingInsertion = value.document.findDescendant(function (n) {
|
|
116
|
-
if (n.type !== 'image') {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
return n.data.get('loaded') === false;
|
|
121
|
-
});
|
|
122
|
-
/** don't reset if there is an image pending insertion */
|
|
123
|
-
|
|
124
|
-
return imgPendingInsertion !== undefined && imgPendingInsertion !== null;
|
|
125
|
-
},
|
|
126
|
-
renderNode: function renderNode(props) {
|
|
127
|
-
if (props.node.type === 'image') {
|
|
128
|
-
var all = Object.assign({
|
|
129
|
-
onDelete: opts.onDelete,
|
|
130
|
-
onFocus: opts.onFocus,
|
|
131
|
-
onBlur: opts.onBlur,
|
|
132
|
-
maxImageWidth: opts.maxImageWidth,
|
|
133
|
-
maxImageHeight: opts.maxImageHeight
|
|
134
|
-
}, props);
|
|
135
|
-
return /*#__PURE__*/_react["default"].createElement(_component["default"], all);
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
normalizeNode: function normalizeNode(node) {
|
|
139
|
-
var textNodeMap = {};
|
|
140
|
-
var updateNodesArray = [];
|
|
141
|
-
var index = 0;
|
|
142
|
-
if (node.object !== 'document') return;
|
|
143
|
-
node.findDescendant(function (d) {
|
|
144
|
-
if (d.object === 'text') {
|
|
145
|
-
textNodeMap[index] = d;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (d.type === 'image') {
|
|
149
|
-
if (index > 0 && textNodeMap[index - 1] && textNodeMap[index - 1].text === '') {
|
|
150
|
-
updateNodesArray.push(textNodeMap[index - 1]);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
index++;
|
|
155
|
-
});
|
|
156
|
-
if (!updateNodesArray.length) return;
|
|
157
|
-
return function (change) {
|
|
158
|
-
change.withoutNormalization(function () {
|
|
159
|
-
updateNodesArray.forEach(function (n) {
|
|
160
|
-
return change.insertTextByKey(n.key, 0, ' ');
|
|
161
|
-
});
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
var serialization = {
|
|
169
|
-
deserialize: function deserialize(el
|
|
170
|
-
/*, next*/
|
|
171
|
-
) {
|
|
172
|
-
var name = el.tagName.toLowerCase();
|
|
173
|
-
if (name !== 'img') return;
|
|
174
|
-
log('deserialize: ', name);
|
|
175
|
-
var style = el.style || {
|
|
176
|
-
width: '',
|
|
177
|
-
height: ''
|
|
178
|
-
};
|
|
179
|
-
var width = parseInt(style.width.replace('px', ''), 10) || null;
|
|
180
|
-
var height = parseInt(style.height.replace('px', ''), 10) || null;
|
|
181
|
-
var out = {
|
|
182
|
-
object: 'inline',
|
|
183
|
-
type: 'image',
|
|
184
|
-
isVoid: true,
|
|
185
|
-
data: {
|
|
186
|
-
src: el.getAttribute('src'),
|
|
187
|
-
width: width,
|
|
188
|
-
height: height
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
log('return object: ', out);
|
|
192
|
-
return out;
|
|
193
|
-
},
|
|
194
|
-
serialize: function serialize(object
|
|
195
|
-
/*, children*/
|
|
196
|
-
) {
|
|
197
|
-
if (object.type !== 'image') return;
|
|
198
|
-
var data = object.data;
|
|
199
|
-
var src = data.get('src');
|
|
200
|
-
var width = data.get('width');
|
|
201
|
-
var height = data.get('height');
|
|
202
|
-
var style = {};
|
|
203
|
-
|
|
204
|
-
if (width) {
|
|
205
|
-
style.width = "".concat(width, "px");
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
if (height) {
|
|
209
|
-
style.height = "".concat(height, "px");
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
style.objectFit = 'contain';
|
|
213
|
-
var props = {
|
|
214
|
-
src: src,
|
|
215
|
-
style: style
|
|
216
|
-
};
|
|
217
|
-
return /*#__PURE__*/_react["default"].createElement("img", props);
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
exports.serialization = serialization;
|
|
221
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/plugins/image/index.jsx"],"names":["log","ImagePlugin","opts","toolbar","insertImageRequested","icon","onClick","value","onChange","inline","Inline","create","type","isVoid","data","loaded","src","undefined","change","insertInline","getValue","InsertImageHandler","supports","node","object","customToolbar","onToolbarDone","percent","get","resizePercent","update","toObject","setNodeByKey","key","Tb","showDone","name","deleteNode","e","preventDefault","onDelete","merge","Data","deleteStatus","err","v","removeNodeByKey","stopReset","imgPendingInsertion","document","findDescendant","n","renderNode","props","all","Object","assign","onFocus","onBlur","maxImageWidth","maxImageHeight","normalizeNode","textNodeMap","updateNodesArray","index","d","text","push","length","withoutNormalization","forEach","insertTextByKey","serialization","deserialize","el","tagName","toLowerCase","style","width","height","parseInt","replace","out","getAttribute","serialize","objectFit"],"mappings":";;;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,sCAAN,CAAZ;;AAEe,SAASC,WAAT,CAAqBC,IAArB,EAA2B;AACxC,MAAMC,OAAO,GAAGD,IAAI,CAACE,oBAAL,IAA6B;AAC3CC,IAAAA,IAAI,eAAE,gCAAC,iBAAD,OADqC;AAE3CC,IAAAA,OAAO,EAAE,iBAACC,KAAD,EAAQC,QAAR,EAAqB;AAC5BR,MAAAA,GAAG,CAAC,mBAAD,CAAH;;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,CAACC,KAAN,aAAiBA,KAAjB;AACD;;AAED,QAAIC,MAAJ,EAAY;AACVF,MAAAA,KAAK,CAACE,MAAN,aAAkBA,MAAlB;AACD;;AAEDF,IAAAA,KAAK,CAACQ,SAAN,GAAkB,SAAlB;AAEA,QAAMhC,KAAK,GAAG;AACZrC,MAAAA,GAAG,EAAHA,GADY;AAEZ6D,MAAAA,KAAK,EAALA;AAFY,KAAd;AAKA,wBAAO,uCAASxB,KAAT,CAAP;AACD;AA/C0B,CAAtB","sourcesContent":["import { Data, Inline } from 'slate';\n\nimport Image from '@material-ui/icons/Image';\nimport ImageComponent from './component';\nimport ImageToolbar from './image-toolbar';\nimport InsertImageHandler from './insert-image-handler';\nimport React from 'react';\nimport debug from 'debug';\n\nconst log = debug('@pie-lib:editable-html:plugins:image');\n\nexport default function ImagePlugin(opts) {\n const toolbar = opts.insertImageRequested && {\n icon: <Image />,\n onClick: (value, onChange) => {\n log('[toolbar] onClick');\n const inline = Inline.create({\n type: 'image',\n isVoid: true,\n data: {\n loaded: false,\n src: undefined\n }\n });\n\n const change = value.change().insertInline(inline);\n onChange(change);\n opts.insertImageRequested(getValue => new InsertImageHandler(inline, getValue, onChange));\n },\n supports: node => node.object === 'inline' && node.type === 'image',\n customToolbar: (node, value, onToolbarDone) => {\n const percent = node.data.get('resizePercent');\n\n const onChange = resizePercent => {\n const update = {\n ...node.data.toObject(),\n resizePercent\n };\n\n const change = value.change().setNodeByKey(node.key, { data: update });\n onToolbarDone(change, false);\n };\n\n const Tb = () => <ImageToolbar percent={percent || 100} onChange={onChange} />;\n return Tb;\n },\n showDone: true\n };\n\n return {\n name: 'image',\n toolbar,\n deleteNode: (e, node, value, onChange) => {\n e.preventDefault();\n if (opts.onDelete) {\n const update = node.data.merge(Data.create({ deleteStatus: 'pending' }));\n\n let change = value.change().setNodeByKey(node.key, { data: update });\n\n onChange(change);\n opts.onDelete(node.data.get('src'), (err, v) => {\n if (!err) {\n change = v.change().removeNodeByKey(node.key);\n } else {\n log('[error]: ', err);\n change = v\n .change()\n .setNodeByKey(node.key, node.data.merge(Data.create({ deleteStatus: 'failed' })));\n }\n onChange(change);\n });\n } else {\n let change = value.change().removeNodeByKey(node.key);\n onChange(change);\n }\n },\n stopReset: value => {\n const imgPendingInsertion = value.document.findDescendant(n => {\n if (n.type !== 'image') {\n return;\n }\n return n.data.get('loaded') === false;\n });\n /** don't reset if there is an image pending insertion */\n return imgPendingInsertion !== undefined && imgPendingInsertion !== null;\n },\n renderNode(props) {\n if (props.node.type === 'image') {\n const all = Object.assign(\n {\n onDelete: opts.onDelete,\n onFocus: opts.onFocus,\n onBlur: opts.onBlur,\n maxImageWidth: opts.maxImageWidth,\n maxImageHeight: opts.maxImageHeight,\n },\n props\n );\n return <ImageComponent {...all} />;\n }\n },\n normalizeNode: node => {\n const textNodeMap = {};\n const updateNodesArray = [];\n let index = 0;\n\n if (node.object !== 'document') return;\n\n node.findDescendant(d => {\n if (d.object === 'text') {\n textNodeMap[index] = d;\n }\n\n if (d.type === 'image') {\n if (index > 0 && textNodeMap[index - 1] && textNodeMap[index - 1].text === '') {\n updateNodesArray.push(textNodeMap[index - 1]);\n }\n }\n\n index++;\n });\n\n if (!updateNodesArray.length) return;\n\n return change => {\n change.withoutNormalization(() => {\n updateNodesArray.forEach(n => change.insertTextByKey(n.key, 0, ' '));\n });\n };\n }\n };\n}\n\nexport const serialization = {\n deserialize(el /*, next*/) {\n const name = el.tagName.toLowerCase();\n if (name !== 'img') return;\n\n log('deserialize: ', name);\n const style = el.style || { width: '', height: '' };\n const width = parseInt(style.width.replace('px', ''), 10) || null;\n const height = parseInt(style.height.replace('px', ''), 10) || null;\n\n const out = {\n object: 'inline',\n type: 'image',\n isVoid: true,\n data: {\n src: el.getAttribute('src'),\n width,\n height\n }\n };\n log('return object: ', out);\n return out;\n },\n serialize(object /*, children*/) {\n if (object.type !== 'image') return;\n\n const { data } = object;\n const src = data.get('src');\n const width = data.get('width');\n const height = data.get('height');\n const style = {};\n if (width) {\n style.width = `${width}px`;\n }\n\n if (height) {\n style.height = `${height}px`;\n }\n\n style.objectFit = 'contain';\n\n const props = {\n src,\n style\n };\n\n return <img {...props} />;\n }\n};\n"],"file":"index.js"}
|
package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js
DELETED
|
@@ -1,135 +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["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _slate = require("slate");
|
|
15
|
-
|
|
16
|
-
var _debug = _interopRequireDefault(require("debug"));
|
|
17
|
-
|
|
18
|
-
var log = (0, _debug["default"])('@pie-lib:editable-html:image:insert-image-handler');
|
|
19
|
-
/**
|
|
20
|
-
* Handles user selection, insertion (or cancellation) of an image into the editor.
|
|
21
|
-
* @param {Block} placeholderBlock - a block that has been added to the editor as a place holder for the image
|
|
22
|
-
* @param {Function} getValue - a function to return the value of the editor
|
|
23
|
-
* @param {Function} onChange - callback to notify changes applied by the handler
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
var InsertImageHandler = /*#__PURE__*/function () {
|
|
27
|
-
function InsertImageHandler(placeholderBlock, getValue, onChange) {
|
|
28
|
-
(0, _classCallCheck2["default"])(this, InsertImageHandler);
|
|
29
|
-
this.placeholderBlock = placeholderBlock;
|
|
30
|
-
this.getValue = getValue;
|
|
31
|
-
this.onChange = onChange;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
(0, _createClass2["default"])(InsertImageHandler, [{
|
|
35
|
-
key: "getPlaceholderInDocument",
|
|
36
|
-
value: function getPlaceholderInDocument(value) {
|
|
37
|
-
var document = value.document;
|
|
38
|
-
var directChild = document.getChild(this.placeholderBlock.key);
|
|
39
|
-
|
|
40
|
-
if (directChild) {
|
|
41
|
-
return directChild;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
var child = document.getDescendant(this.placeholderBlock.key);
|
|
45
|
-
|
|
46
|
-
if (child) {
|
|
47
|
-
return child;
|
|
48
|
-
} else {
|
|
49
|
-
//eslint-disable-next-line
|
|
50
|
-
throw new Error("insert-image: Can't find placeholder!");
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}, {
|
|
54
|
-
key: "cancel",
|
|
55
|
-
value: function cancel() {
|
|
56
|
-
log('insert cancelled');
|
|
57
|
-
var c = this.getValue().change().removeNodeByKey(this.placeholderBlock.key);
|
|
58
|
-
this.onChange(c);
|
|
59
|
-
}
|
|
60
|
-
}, {
|
|
61
|
-
key: "done",
|
|
62
|
-
value: function done(err, src) {
|
|
63
|
-
log('done: err:', err);
|
|
64
|
-
|
|
65
|
-
if (err) {
|
|
66
|
-
//eslint-disable-next-line
|
|
67
|
-
console.log(err);
|
|
68
|
-
} else {
|
|
69
|
-
var value = this.getValue();
|
|
70
|
-
var child = this.getPlaceholderInDocument(value);
|
|
71
|
-
var data = child.data.merge(_slate.Data.create({
|
|
72
|
-
loaded: true,
|
|
73
|
-
src: src,
|
|
74
|
-
percent: 100
|
|
75
|
-
}));
|
|
76
|
-
var change = value.change().setNodeByKey(this.placeholderBlock.key, {
|
|
77
|
-
data: data
|
|
78
|
-
});
|
|
79
|
-
this.onChange(change);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Notify handler that the user chose a file - will create a change with a preview in the editor.
|
|
84
|
-
*
|
|
85
|
-
* @param {File} file - the file that the user chose using a file input.
|
|
86
|
-
*/
|
|
87
|
-
|
|
88
|
-
}, {
|
|
89
|
-
key: "fileChosen",
|
|
90
|
-
value: function fileChosen(file) {
|
|
91
|
-
var _this = this;
|
|
92
|
-
|
|
93
|
-
if (!file) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
log('[fileChosen] file: ', file);
|
|
98
|
-
var reader = new FileReader();
|
|
99
|
-
|
|
100
|
-
reader.onload = function () {
|
|
101
|
-
var value = _this.getValue();
|
|
102
|
-
|
|
103
|
-
var dataURL = reader.result;
|
|
104
|
-
|
|
105
|
-
var child = _this.getPlaceholderInDocument(value);
|
|
106
|
-
|
|
107
|
-
var data = child.data.set('src', dataURL);
|
|
108
|
-
var change = value.change().setNodeByKey(_this.placeholderBlock.key, {
|
|
109
|
-
data: data
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
_this.onChange(change);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
reader.readAsDataURL(file);
|
|
116
|
-
}
|
|
117
|
-
}, {
|
|
118
|
-
key: "progress",
|
|
119
|
-
value: function progress(percent, bytes, total) {
|
|
120
|
-
log('progress: ', percent, bytes, total);
|
|
121
|
-
var value = this.getValue();
|
|
122
|
-
var child = this.getPlaceholderInDocument(value);
|
|
123
|
-
var data = child.data.set('percent', percent);
|
|
124
|
-
var change = value.change().setNodeByKey(this.placeholderBlock.key, {
|
|
125
|
-
data: data
|
|
126
|
-
});
|
|
127
|
-
this.onChange(change);
|
|
128
|
-
}
|
|
129
|
-
}]);
|
|
130
|
-
return InsertImageHandler;
|
|
131
|
-
}();
|
|
132
|
-
|
|
133
|
-
var _default = InsertImageHandler;
|
|
134
|
-
exports["default"] = _default;
|
|
135
|
-
//# sourceMappingURL=insert-image-handler.js.map
|
package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/plugins/image/insert-image-handler.js"],"names":["log","InsertImageHandler","placeholderBlock","getValue","onChange","value","document","directChild","getChild","key","child","getDescendant","Error","c","change","removeNodeByKey","err","src","console","getPlaceholderInDocument","data","merge","Data","create","loaded","percent","setNodeByKey","file","reader","FileReader","onload","dataURL","result","set","readAsDataURL","bytes","total"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA,IAAMA,GAAG,GAAG,uBAAM,mDAAN,CAAZ;AAEA;AACA;AACA;AACA;AACA;AACA;;IACMC,kB;AACJ,8BAAYC,gBAAZ,EAA8BC,QAA9B,EAAwCC,QAAxC,EAAkD;AAAA;AAChD,SAAKF,gBAAL,GAAwBA,gBAAxB;AACA,SAAKC,QAAL,GAAgBA,QAAhB;AACA,SAAKC,QAAL,GAAgBA,QAAhB;AACD;;;;WAED,kCAAyBC,KAAzB,EAAgC;AAC9B,UAAQC,QAAR,GAAqBD,KAArB,CAAQC,QAAR;AACA,UAAMC,WAAW,GAAGD,QAAQ,CAACE,QAAT,CAAkB,KAAKN,gBAAL,CAAsBO,GAAxC,CAApB;;AAEA,UAAIF,WAAJ,EAAiB;AACf,eAAOA,WAAP;AACD;;AAED,UAAMG,KAAK,GAAGJ,QAAQ,CAACK,aAAT,CAAuB,KAAKT,gBAAL,CAAsBO,GAA7C,CAAd;;AAEA,UAAIC,KAAJ,EAAW;AACT,eAAOA,KAAP;AACD,OAFD,MAEO;AACL;AACA,cAAM,IAAIE,KAAJ,CAAU,uCAAV,CAAN;AACD;AACF;;;WAED,kBAAS;AACPZ,MAAAA,GAAG,CAAC,kBAAD,CAAH;AACA,UAAMa,CAAC,GAAG,KAAKV,QAAL,GACPW,MADO,GAEPC,eAFO,CAES,KAAKb,gBAAL,CAAsBO,GAF/B,CAAV;AAGA,WAAKL,QAAL,CAAcS,CAAd;AACD;;;WAED,cAAKG,GAAL,EAAUC,GAAV,EAAe;AACbjB,MAAAA,GAAG,CAAC,YAAD,EAAegB,GAAf,CAAH;;AACA,UAAIA,GAAJ,EAAS;AACP;AACAE,QAAAA,OAAO,CAAClB,GAAR,CAAYgB,GAAZ;AACD,OAHD,MAGO;AACL,YAAMX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,CAACM,aAAP,CAAqBP,IAArB;AACD;;;WAED,kBAASF,OAAT,EAAkBU,KAAlB,EAAyBC,KAAzB,EAAgC;AAC9BpC,MAAAA,GAAG,CAAC,YAAD,EAAeyB,OAAf,EAAwBU,KAAxB,EAA+BC,KAA/B,CAAH;AACA,UAAM/B,KAAK,GAAG,KAAKF,QAAL,EAAd;AACA,UAAMO,KAAK,GAAG,KAAKS,wBAAL,CAA8Bd,KAA9B,CAAd;AACA,UAAMe,IAAI,GAAGV,KAAK,CAACU,IAAN,CAAWa,GAAX,CAAe,SAAf,EAA0BR,OAA1B,CAAb;AACA,UAAMX,MAAM,GAAGT,KAAK,CAACS,MAAN,GAAeY,YAAf,CAA4B,KAAKxB,gBAAL,CAAsBO,GAAlD,EAAuD;AAAEW,QAAAA,IAAI,EAAJA;AAAF,OAAvD,CAAf;AACA,WAAKhB,QAAL,CAAcU,MAAd;AACD;;;;;eAGYb,kB","sourcesContent":["import { Data } from 'slate';\nimport debug from 'debug';\n\nconst log = debug('@pie-lib:editable-html:image:insert-image-handler');\n\n/**\n * Handles user selection, insertion (or cancellation) of an image into the editor.\n * @param {Block} placeholderBlock - a block that has been added to the editor as a place holder for the image\n * @param {Function} getValue - a function to return the value of the editor\n * @param {Function} onChange - callback to notify changes applied by the handler\n */\nclass InsertImageHandler {\n constructor(placeholderBlock, getValue, onChange) {\n this.placeholderBlock = placeholderBlock;\n this.getValue = getValue;\n this.onChange = onChange;\n }\n\n getPlaceholderInDocument(value) {\n const { document } = value;\n const directChild = document.getChild(this.placeholderBlock.key);\n\n if (directChild) {\n return directChild;\n }\n\n const child = document.getDescendant(this.placeholderBlock.key);\n\n if (child) {\n return child;\n } else {\n //eslint-disable-next-line\n throw new Error(\"insert-image: Can't find placeholder!\");\n }\n }\n\n cancel() {\n log('insert cancelled');\n const c = this.getValue()\n .change()\n .removeNodeByKey(this.placeholderBlock.key);\n this.onChange(c);\n }\n\n done(err, src) {\n log('done: err:', err);\n if (err) {\n //eslint-disable-next-line\n console.log(err);\n } else {\n const value = this.getValue();\n const child = this.getPlaceholderInDocument(value);\n const data = child.data.merge(Data.create({ loaded: true, src, percent: 100 }));\n\n const change = value.change().setNodeByKey(this.placeholderBlock.key, { data });\n this.onChange(change);\n }\n }\n\n /**\n * Notify handler that the user chose a file - will create a change with a preview in the editor.\n *\n * @param {File} file - the file that the user chose using a file input.\n */\n fileChosen(file) {\n if (!file) {\n return;\n }\n\n log('[fileChosen] file: ', file);\n const reader = new FileReader();\n reader.onload = () => {\n const value = this.getValue();\n const dataURL = reader.result;\n const child = this.getPlaceholderInDocument(value);\n const data = child.data.set('src', dataURL);\n const change = value.change().setNodeByKey(this.placeholderBlock.key, { data });\n this.onChange(change);\n };\n reader.readAsDataURL(file);\n }\n\n progress(percent, bytes, total) {\n log('progress: ', percent, bytes, total);\n const value = this.getValue();\n const child = this.getPlaceholderInDocument(value);\n const data = child.data.set('percent', percent);\n const change = value.change().setNodeByKey(this.placeholderBlock.key, { data });\n this.onChange(change);\n }\n}\n\nexport default InsertImageHandler;\n"],"file":"insert-image-handler.js"}
|
|
@@ -1,141 +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.buildPlugins = exports.DEFAULT_PLUGINS = exports.ALL_PLUGINS = void 0;
|
|
9
|
-
|
|
10
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
|
-
|
|
12
|
-
var _FormatBold = _interopRequireDefault(require("@material-ui/icons/FormatBold"));
|
|
13
|
-
|
|
14
|
-
var _FormatListBulleted = _interopRequireDefault(require("@material-ui/icons/FormatListBulleted"));
|
|
15
|
-
|
|
16
|
-
var _FormatListNumbered = _interopRequireDefault(require("@material-ui/icons/FormatListNumbered"));
|
|
17
|
-
|
|
18
|
-
var _image = _interopRequireDefault(require("./image"));
|
|
19
|
-
|
|
20
|
-
var _media = _interopRequireDefault(require("./media"));
|
|
21
|
-
|
|
22
|
-
var _characters = _interopRequireDefault(require("./characters"));
|
|
23
|
-
|
|
24
|
-
var _FormatItalic = _interopRequireDefault(require("@material-ui/icons/FormatItalic"));
|
|
25
|
-
|
|
26
|
-
var _math = _interopRequireDefault(require("./math"));
|
|
27
|
-
|
|
28
|
-
var _react = _interopRequireDefault(require("react"));
|
|
29
|
-
|
|
30
|
-
var _FormatStrikethrough = _interopRequireDefault(require("@material-ui/icons/FormatStrikethrough"));
|
|
31
|
-
|
|
32
|
-
var _toolbar = _interopRequireDefault(require("./toolbar"));
|
|
33
|
-
|
|
34
|
-
var _FormatUnderlined = _interopRequireDefault(require("@material-ui/icons/FormatUnderlined"));
|
|
35
|
-
|
|
36
|
-
var _compact = _interopRequireDefault(require("lodash/compact"));
|
|
37
|
-
|
|
38
|
-
var _slateSoftBreak = _interopRequireDefault(require("slate-soft-break"));
|
|
39
|
-
|
|
40
|
-
var _debug = _interopRequireDefault(require("debug"));
|
|
41
|
-
|
|
42
|
-
var _list = _interopRequireDefault(require("./list"));
|
|
43
|
-
|
|
44
|
-
var _table = _interopRequireDefault(require("./table"));
|
|
45
|
-
|
|
46
|
-
var _respArea = _interopRequireDefault(require("./respArea"));
|
|
47
|
-
|
|
48
|
-
// import Code from '@material-ui/icons/Code';
|
|
49
|
-
var log = (0, _debug["default"])('@pie-lib:editable-html:plugins');
|
|
50
|
-
|
|
51
|
-
function MarkHotkey(options) {
|
|
52
|
-
var type = options.type,
|
|
53
|
-
key = options.key,
|
|
54
|
-
icon = options.icon,
|
|
55
|
-
tag = options.tag; // Return our "plugin" object, containing the `onKeyDown` handler.
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
toolbar: {
|
|
59
|
-
isMark: true,
|
|
60
|
-
type: type,
|
|
61
|
-
icon: icon,
|
|
62
|
-
onToggle: function onToggle(change) {
|
|
63
|
-
log('[onToggleMark] type: ', type);
|
|
64
|
-
return change.toggleMark(type);
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
renderMark: function renderMark(props) {
|
|
68
|
-
if (props.mark.type === type) {
|
|
69
|
-
var K = tag || type;
|
|
70
|
-
return /*#__PURE__*/_react["default"].createElement(K, null, props.children);
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
onKeyDown: function onKeyDown(event, change) {
|
|
74
|
-
// Check that the key pressed matches our `key` option.
|
|
75
|
-
if (!event.metaKey || event.key != key) return; // Prevent the default characters from being inserted.
|
|
76
|
-
|
|
77
|
-
event.preventDefault(); // Toggle the mark `type`.
|
|
78
|
-
|
|
79
|
-
change.toggleMark(type);
|
|
80
|
-
return true;
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
var ALL_PLUGINS = ['bold', // 'code',
|
|
86
|
-
'italic', 'underline', 'strikethrough', 'bulleted-list', 'numbered-list', 'image', 'math', 'languageCharacters', 'table', 'video', 'audio', 'responseArea'];
|
|
87
|
-
exports.ALL_PLUGINS = ALL_PLUGINS;
|
|
88
|
-
var DEFAULT_PLUGINS = ALL_PLUGINS.filter(function (plug) {
|
|
89
|
-
return plug !== 'responseArea';
|
|
90
|
-
});
|
|
91
|
-
exports.DEFAULT_PLUGINS = DEFAULT_PLUGINS;
|
|
92
|
-
|
|
93
|
-
var buildPlugins = function buildPlugins(activePlugins, opts) {
|
|
94
|
-
log('[buildPlugins] opts: ', opts);
|
|
95
|
-
activePlugins = activePlugins || DEFAULT_PLUGINS;
|
|
96
|
-
|
|
97
|
-
var addIf = function addIf(key, p) {
|
|
98
|
-
return activePlugins.includes(key) && p;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
var imagePlugin = opts.image && opts.image.onDelete && (0, _image["default"])(opts.image);
|
|
102
|
-
var mathPlugin = (0, _math["default"])(opts.math);
|
|
103
|
-
var respAreaPlugin = opts.responseArea && opts.responseArea.type && (0, _respArea["default"])(opts.responseArea, (0, _compact["default"])([mathPlugin]));
|
|
104
|
-
return (0, _compact["default"])([addIf('table', (0, _table["default"])(opts.table, (0, _compact["default"])([imagePlugin, mathPlugin, respAreaPlugin]))), addIf('bold', MarkHotkey({
|
|
105
|
-
key: 'b',
|
|
106
|
-
type: 'bold',
|
|
107
|
-
icon: /*#__PURE__*/_react["default"].createElement(_FormatBold["default"], null),
|
|
108
|
-
tag: 'strong'
|
|
109
|
-
})), // addIf('code', MarkHotkey({ key: '`', type: 'code', icon: <Code /> })),
|
|
110
|
-
addIf('italic', MarkHotkey({
|
|
111
|
-
key: 'i',
|
|
112
|
-
type: 'italic',
|
|
113
|
-
icon: /*#__PURE__*/_react["default"].createElement(_FormatItalic["default"], null),
|
|
114
|
-
tag: 'em'
|
|
115
|
-
})), addIf('strikethrough', MarkHotkey({
|
|
116
|
-
key: '~',
|
|
117
|
-
type: 'strikethrough',
|
|
118
|
-
icon: /*#__PURE__*/_react["default"].createElement(_FormatStrikethrough["default"], null),
|
|
119
|
-
tag: 'del'
|
|
120
|
-
})), addIf('underline', MarkHotkey({
|
|
121
|
-
key: 'u',
|
|
122
|
-
type: 'underline',
|
|
123
|
-
icon: /*#__PURE__*/_react["default"].createElement(_FormatUnderlined["default"], null),
|
|
124
|
-
tag: 'u'
|
|
125
|
-
})), addIf('image', imagePlugin), addIf('video', (0, _media["default"])('video', opts.media)), addIf('audio', (0, _media["default"])('audio', opts.media)), addIf('math', mathPlugin)].concat((0, _toConsumableArray2["default"])(opts.languageCharacters.map(function (config) {
|
|
126
|
-
return addIf('languageCharacters', (0, _characters["default"])(config));
|
|
127
|
-
})), [addIf('bulleted-list', (0, _list["default"])({
|
|
128
|
-
key: 'l',
|
|
129
|
-
type: 'ul_list',
|
|
130
|
-
icon: /*#__PURE__*/_react["default"].createElement(_FormatListBulleted["default"], null)
|
|
131
|
-
})), addIf('numbered-list', (0, _list["default"])({
|
|
132
|
-
key: 'n',
|
|
133
|
-
type: 'ol_list',
|
|
134
|
-
icon: /*#__PURE__*/_react["default"].createElement(_FormatListNumbered["default"], null)
|
|
135
|
-
})), (0, _toolbar["default"])(opts.toolbar), (0, _slateSoftBreak["default"])({
|
|
136
|
-
shift: true
|
|
137
|
-
}), addIf('responseArea', respAreaPlugin)]));
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
exports.buildPlugins = buildPlugins;
|
|
141
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/plugins/index.jsx"],"names":["log","MarkHotkey","options","type","key","icon","tag","toolbar","isMark","onToggle","change","toggleMark","renderMark","props","mark","K","children","onKeyDown","event","metaKey","preventDefault","ALL_PLUGINS","DEFAULT_PLUGINS","filter","plug","buildPlugins","activePlugins","opts","addIf","p","includes","imagePlugin","image","onDelete","mathPlugin","math","respAreaPlugin","responseArea","table","media","languageCharacters","map","config","shift"],"mappings":";;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAjBA;AAmBA,IAAMA,GAAG,GAAG,uBAAM,gCAAN,CAAZ;;AAEA,SAASC,UAAT,CAAoBC,OAApB,EAA6B;AAC3B,MAAQC,IAAR,GAAiCD,OAAjC,CAAQC,IAAR;AAAA,MAAcC,GAAd,GAAiCF,OAAjC,CAAcE,GAAd;AAAA,MAAmBC,IAAnB,GAAiCH,OAAjC,CAAmBG,IAAnB;AAAA,MAAyBC,GAAzB,GAAiCJ,OAAjC,CAAyBI,GAAzB,CAD2B,CAG3B;;AACA,SAAO;AACLC,IAAAA,OAAO,EAAE;AACPC,MAAAA,MAAM,EAAE,IADD;AAEPL,MAAAA,IAAI,EAAJA,IAFO;AAGPE,MAAAA,IAAI,EAAJA,IAHO;AAIPI,MAAAA,QAAQ,EAAE,kBAAAC,MAAM,EAAI;AAClBV,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on from '@material-ui/icons/FormatListBulleted';\nimport NumberedListIcon from '@material-ui/icons/FormatListNumbered';\nimport ImagePlugin from './image';\nimport MediaPlugin from './media';\nimport CharactersPlugin from './characters';\nimport Italic from '@material-ui/icons/FormatItalic';\nimport MathPlugin from './math';\nimport React from 'react';\nimport Strikethrough from '@material-ui/icons/FormatStrikethrough';\nimport ToolbarPlugin from './toolbar';\nimport Underline from '@material-ui/icons/FormatUnderlined';\nimport compact from 'lodash/compact';\nimport SoftBreakPlugin from 'slate-soft-break';\nimport debug from 'debug';\nimport List from './list';\nimport TablePlugin from './table';\nimport RespAreaPlugin from './respArea';\n\nconst log = debug('@pie-lib:editable-html:plugins');\n\nfunction MarkHotkey(options) {\n const { type, key, icon, tag } = options;\n\n // Return our \"plugin\" object, containing the `onKeyDown` handler.\n return {\n toolbar: {\n isMark: true,\n type,\n icon,\n onToggle: change => {\n log('[onToggleMark] type: ', type);\n return change.toggleMark(type);\n }\n },\n renderMark(props) {\n if (props.mark.type === type) {\n const K = tag || type;\n return <K>{props.children}</K>;\n }\n },\n onKeyDown(event, change) {\n // Check that the key pressed matches our `key` option.\n if (!event.metaKey || event.key != key) return;\n\n // Prevent the default characters from being inserted.\n event.preventDefault();\n\n // Toggle the mark `type`.\n change.toggleMark(type);\n return true;\n }\n };\n}\n\nexport const ALL_PLUGINS = [\n 'bold',\n // 'code',\n 'italic',\n 'underline',\n 'strikethrough',\n 'bulleted-list',\n 'numbered-list',\n 'image',\n 'math',\n 'languageCharacters',\n 'table',\n 'video',\n 'audio',\n 'responseArea'\n];\n\nexport const DEFAULT_PLUGINS = ALL_PLUGINS.filter(plug => plug !== 'responseArea');\n\nexport const buildPlugins = (activePlugins, opts) => {\n log('[buildPlugins] opts: ', opts);\n\n activePlugins = activePlugins || DEFAULT_PLUGINS;\n\n const addIf = (key, p) => activePlugins.includes(key) && p;\n const imagePlugin = opts.image && opts.image.onDelete && ImagePlugin(opts.image);\n const mathPlugin = MathPlugin(opts.math);\n const respAreaPlugin =\n opts.responseArea &&\n opts.responseArea.type &&\n RespAreaPlugin(opts.responseArea, compact([mathPlugin]));\n\n return compact([\n addIf('table', TablePlugin(opts.table, compact([imagePlugin, mathPlugin, respAreaPlugin]))),\n addIf('bold', MarkHotkey({ key: 'b', type: 'bold', icon: <Bold />, tag: 'strong' })),\n // addIf('code', MarkHotkey({ key: '`', type: 'code', icon: <Code /> })),\n addIf('italic', MarkHotkey({ key: 'i', type: 'italic', icon: <Italic />, tag: 'em' })),\n addIf(\n 'strikethrough',\n MarkHotkey({\n key: '~',\n type: 'strikethrough',\n icon: <Strikethrough />,\n tag: 'del'\n })\n ),\n addIf('underline', MarkHotkey({ key: 'u', type: 'underline', icon: <Underline />, tag: 'u' })),\n addIf('image', imagePlugin),\n addIf('video', MediaPlugin('video', opts.media)),\n addIf('audio', MediaPlugin('audio', opts.media)),\n addIf('math', mathPlugin),\n ...opts.languageCharacters.map(config => addIf('languageCharacters', CharactersPlugin(config))),\n addIf('bulleted-list', List({ key: 'l', type: 'ul_list', icon: <BulletedListIcon /> })),\n addIf('numbered-list', List({ key: 'n', type: 'ol_list', icon: <NumberedListIcon /> })),\n ToolbarPlugin(opts.toolbar),\n SoftBreakPlugin({ shift: true }),\n addIf('responseArea', respAreaPlugin)\n ]);\n};\n"],"file":"index.js"}
|