@pie-element/ebsr 6.6.3-next.414 → 6.6.3-next.430
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 +25 -0
- package/configure/CHANGELOG.md +25 -0
- package/configure/package.json +2 -2
- package/controller/CHANGELOG.md +17 -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 -1563
- package/configure/node_modules/@pie-element/multiple-choice/LICENSE.md +0 -5
- 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 -1140
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +0 -103
- 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 -193
- 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 -471
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.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 -714
- 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 -242
- 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 -311
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +0 -245
- 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 -326
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +0 -266
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +0 -284
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.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 -341
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.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 -1498
- 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/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 -176
- 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 -391
- 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 -194
- 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 -184
- 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 -44
- 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 -152
- 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 -195
- 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 -144
- 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 -120
- 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 -187
- 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 -109
- 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 -111
- 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 -95
- 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.js +0 -274
- 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 -136
- 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 -422
- 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 -113
- 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 -206
- 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 -190
- 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 -91
- 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/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 -301
- 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 -54
- 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 -88
- 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.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 -30
- 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 -513
- 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 -81
- 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 -150
- 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 -60
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx +0 -73
- 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 -3162
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +0 -1441
- 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 -698
- 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 -213
- 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/image/component.js +0 -248
- 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 -141
- 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 -219
- 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 -141
- 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 -133
- 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 -136
- 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 -352
- 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 -338
- 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 -445
- 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 -105
- 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 -100
- 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 -229
- 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 -53
- 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 -277
- 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 -443
- 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 -167
- 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 -129
- 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 -164
- 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 -350
- 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 -405
- 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 -584
- package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +0 -128
- 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/image/component.jsx +0 -166
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +0 -62
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +0 -180
- 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 -112
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +0 -113
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +0 -289
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +0 -281
- 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 -160
- 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 -244
- 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 -390
- 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 -103
- 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 -217
- 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 -86
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +0 -313
- 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 -369
- 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 -1412
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.md +0 -874
- 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 -123
- 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 -75
- 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 -367
- 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 -30
- 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 -26
- 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 -139
- 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 -198
- 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 -50
- 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 -38
- 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 -126
- 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 -200
- 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 -255
- 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 -216
- 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 -53
- 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 -279
- 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 -18
- 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 -116
- package/configure/node_modules/@pie-lib/math-input/src/keys/grades.js +0 -265
- 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 -29
- 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 -139
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +0 -657
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +0 -412
- 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 -312
- 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 -119
- 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 -99
- 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 -239
- 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 -203
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.json +0 -847
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.md +0 -742
- 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 -386
- 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 -259
- 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 -163
- 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 -36
- 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 -311
- package/configure/node_modules/@pie-lib/math-toolbar/src/index.jsx +0 -185
- package/configure/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx +0 -101
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +0 -937
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +0 -616
- 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 -144
- 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 -154
- 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 -98
- 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 -99
- 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 -129
- 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 -133
- 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 -154
- 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 -194
- 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 -73
- 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
- package/configure/node_modules/immutable/LICENSE +0 -21
- package/configure/node_modules/immutable/README.md +0 -657
- package/configure/node_modules/immutable/dist/immutable-nonambient.d.ts +0 -5607
- package/configure/node_modules/immutable/dist/immutable.d.ts +0 -5611
- package/configure/node_modules/immutable/dist/immutable.es.js +0 -5893
- package/configure/node_modules/immutable/dist/immutable.js +0 -5948
- package/configure/node_modules/immutable/dist/immutable.js.flow +0 -2340
- package/configure/node_modules/immutable/dist/immutable.min.js +0 -55
- package/configure/node_modules/immutable/package.json +0 -41
- package/configure/node_modules/slate-dev-environment/Readme.md +0 -1
- package/configure/node_modules/slate-dev-environment/dist/slate-dev-environment.js +0 -287
- package/configure/node_modules/slate-dev-environment/dist/slate-dev-environment.min.js +0 -1
- package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.es.js +0 -264
- package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.es.js.map +0 -1
- package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.js +0 -282
- package/configure/node_modules/slate-dev-environment/lib/slate-dev-environment.js.map +0 -1
- package/configure/node_modules/slate-dev-environment/package.json +0 -21
- package/configure/node_modules/slate-edit-list/CHANGELOG.md +0 -124
- package/configure/node_modules/slate-edit-list/LICENSE +0 -201
- package/configure/node_modules/slate-edit-list/README.md +0 -159
- package/configure/node_modules/slate-edit-list/dist/changes/decreaseItemDepth.js +0 -73
- package/configure/node_modules/slate-edit-list/dist/changes/decreaseItemDepth.js.flow +0 -88
- package/configure/node_modules/slate-edit-list/dist/changes/increaseItemDepth.js +0 -70
- package/configure/node_modules/slate-edit-list/dist/changes/increaseItemDepth.js.flow +0 -77
- package/configure/node_modules/slate-edit-list/dist/changes/index.js +0 -34
- package/configure/node_modules/slate-edit-list/dist/changes/index.js.flow +0 -13
- package/configure/node_modules/slate-edit-list/dist/changes/splitListItem.js +0 -27
- package/configure/node_modules/slate-edit-list/dist/changes/splitListItem.js.flow +0 -26
- package/configure/node_modules/slate-edit-list/dist/changes/unwrapList.js +0 -52
- package/configure/node_modules/slate-edit-list/dist/changes/unwrapList.js.flow +0 -46
- package/configure/node_modules/slate-edit-list/dist/changes/wrapInList.js +0 -67
- package/configure/node_modules/slate-edit-list/dist/changes/wrapInList.js.flow +0 -67
- package/configure/node_modules/slate-edit-list/dist/core.js +0 -80
- package/configure/node_modules/slate-edit-list/dist/core.js.flow +0 -76
- package/configure/node_modules/slate-edit-list/dist/handlers/index.js +0 -24
- package/configure/node_modules/slate-edit-list/dist/handlers/index.js.flow +0 -5
- package/configure/node_modules/slate-edit-list/dist/handlers/onBackspace.js +0 -45
- package/configure/node_modules/slate-edit-list/dist/handlers/onBackspace.js.flow +0 -44
- package/configure/node_modules/slate-edit-list/dist/handlers/onEnter.js +0 -54
- package/configure/node_modules/slate-edit-list/dist/handlers/onEnter.js.flow +0 -54
- package/configure/node_modules/slate-edit-list/dist/handlers/onTab.js +0 -39
- package/configure/node_modules/slate-edit-list/dist/handlers/onTab.js.flow +0 -34
- package/configure/node_modules/slate-edit-list/dist/index.js +0 -58
- package/configure/node_modules/slate-edit-list/dist/index.js.flow +0 -45
- package/configure/node_modules/slate-edit-list/dist/options.js +0 -34
- package/configure/node_modules/slate-edit-list/dist/options.js.flow +0 -26
- package/configure/node_modules/slate-edit-list/dist/utils/getCurrentItem.js +0 -24
- package/configure/node_modules/slate-edit-list/dist/utils/getCurrentItem.js.flow +0 -20
- package/configure/node_modules/slate-edit-list/dist/utils/getCurrentList.js +0 -31
- package/configure/node_modules/slate-edit-list/dist/utils/getCurrentList.js.flow +0 -21
- package/configure/node_modules/slate-edit-list/dist/utils/getItemDepth.js +0 -34
- package/configure/node_modules/slate-edit-list/dist/utils/getItemDepth.js.flow +0 -24
- package/configure/node_modules/slate-edit-list/dist/utils/getItemsAtRange.js +0 -60
- package/configure/node_modules/slate-edit-list/dist/utils/getItemsAtRange.js.flow +0 -51
- package/configure/node_modules/slate-edit-list/dist/utils/getListForItem.js +0 -25
- package/configure/node_modules/slate-edit-list/dist/utils/getListForItem.js.flow +0 -16
- package/configure/node_modules/slate-edit-list/dist/utils/getPreviousItem.js +0 -39
- package/configure/node_modules/slate-edit-list/dist/utils/getPreviousItem.js.flow +0 -29
- package/configure/node_modules/slate-edit-list/dist/utils/index.js +0 -49
- package/configure/node_modules/slate-edit-list/dist/utils/index.js.flow +0 -19
- package/configure/node_modules/slate-edit-list/dist/utils/isList.js +0 -15
- package/configure/node_modules/slate-edit-list/dist/utils/isList.js.flow +0 -13
- package/configure/node_modules/slate-edit-list/dist/utils/isSelectionInList.js +0 -22
- package/configure/node_modules/slate-edit-list/dist/utils/isSelectionInList.js.flow +0 -14
- package/configure/node_modules/slate-edit-list/dist/validation/index.js +0 -19
- package/configure/node_modules/slate-edit-list/dist/validation/index.js.flow +0 -4
- package/configure/node_modules/slate-edit-list/dist/validation/schema.js +0 -83
- package/configure/node_modules/slate-edit-list/dist/validation/schema.js.flow +0 -81
- package/configure/node_modules/slate-edit-list/dist/validation/validateNode.js +0 -61
- package/configure/node_modules/slate-edit-list/dist/validation/validateNode.js.flow +0 -61
- package/configure/node_modules/slate-edit-list/package.json +0 -67
- package/configure/node_modules/slate-edit-table/CHANGELOG.md +0 -192
- package/configure/node_modules/slate-edit-table/LICENSE +0 -201
- package/configure/node_modules/slate-edit-table/README.md +0 -269
- package/configure/node_modules/slate-edit-table/dist/changes/clearCell.js +0 -29
- package/configure/node_modules/slate-edit-table/dist/changes/clearCell.js.flow +0 -26
- package/configure/node_modules/slate-edit-table/dist/changes/index.js +0 -69
- package/configure/node_modules/slate-edit-table/dist/changes/index.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/changes/insertColumn.js +0 -43
- package/configure/node_modules/slate-edit-table/dist/changes/insertColumn.js.flow +0 -46
- package/configure/node_modules/slate-edit-table/dist/changes/insertRow.js +0 -36
- package/configure/node_modules/slate-edit-table/dist/changes/insertRow.js.flow +0 -35
- package/configure/node_modules/slate-edit-table/dist/changes/insertTable.js +0 -29
- package/configure/node_modules/slate-edit-table/dist/changes/insertTable.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/changes/moveSelection.js +0 -32
- package/configure/node_modules/slate-edit-table/dist/changes/moveSelection.js.flow +0 -31
- package/configure/node_modules/slate-edit-table/dist/changes/moveSelectionBy.js +0 -84
- package/configure/node_modules/slate-edit-table/dist/changes/moveSelectionBy.js.flow +0 -80
- package/configure/node_modules/slate-edit-table/dist/changes/removeColumn.js +0 -36
- package/configure/node_modules/slate-edit-table/dist/changes/removeColumn.js.flow +0 -28
- package/configure/node_modules/slate-edit-table/dist/changes/removeColumnByKey.js +0 -52
- package/configure/node_modules/slate-edit-table/dist/changes/removeColumnByKey.js.flow +0 -40
- package/configure/node_modules/slate-edit-table/dist/changes/removeRow.js +0 -36
- package/configure/node_modules/slate-edit-table/dist/changes/removeRow.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/changes/removeRowByKey.js +0 -41
- package/configure/node_modules/slate-edit-table/dist/changes/removeRowByKey.js.flow +0 -30
- package/configure/node_modules/slate-edit-table/dist/changes/removeTable.js +0 -26
- package/configure/node_modules/slate-edit-table/dist/changes/removeTable.js.flow +0 -17
- package/configure/node_modules/slate-edit-table/dist/changes/removeTableByKey.js +0 -56
- package/configure/node_modules/slate-edit-table/dist/changes/removeTableByKey.js.flow +0 -54
- package/configure/node_modules/slate-edit-table/dist/core.js +0 -88
- package/configure/node_modules/slate-edit-table/dist/core.js.flow +0 -94
- package/configure/node_modules/slate-edit-table/dist/handlers/index.js +0 -39
- package/configure/node_modules/slate-edit-table/dist/handlers/index.js.flow +0 -8
- package/configure/node_modules/slate-edit-table/dist/handlers/onBackspace.js +0 -82
- package/configure/node_modules/slate-edit-table/dist/handlers/onBackspace.js.flow +0 -87
- package/configure/node_modules/slate-edit-table/dist/handlers/onEnter.js +0 -34
- package/configure/node_modules/slate-edit-table/dist/handlers/onEnter.js.flow +0 -37
- package/configure/node_modules/slate-edit-table/dist/handlers/onKeyDown.js +0 -71
- package/configure/node_modules/slate-edit-table/dist/handlers/onKeyDown.js.flow +0 -56
- package/configure/node_modules/slate-edit-table/dist/handlers/onModEnter.js +0 -35
- package/configure/node_modules/slate-edit-table/dist/handlers/onModEnter.js.flow +0 -38
- package/configure/node_modules/slate-edit-table/dist/handlers/onTab.js +0 -56
- package/configure/node_modules/slate-edit-table/dist/handlers/onTab.js.flow +0 -51
- package/configure/node_modules/slate-edit-table/dist/handlers/onUpDown.js +0 -38
- package/configure/node_modules/slate-edit-table/dist/handlers/onUpDown.js.flow +0 -41
- package/configure/node_modules/slate-edit-table/dist/index.js +0 -36
- package/configure/node_modules/slate-edit-table/dist/index.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/options.js +0 -61
- package/configure/node_modules/slate-edit-table/dist/options.js.flow +0 -42
- package/configure/node_modules/slate-edit-table/dist/utils/TablePosition.js +0 -306
- package/configure/node_modules/slate-edit-table/dist/utils/TablePosition.js.flow +0 -211
- package/configure/node_modules/slate-edit-table/dist/utils/createCell.js +0 -30
- package/configure/node_modules/slate-edit-table/dist/utils/createCell.js.flow +0 -26
- package/configure/node_modules/slate-edit-table/dist/utils/createRow.js +0 -30
- package/configure/node_modules/slate-edit-table/dist/utils/createRow.js.flow +0 -28
- package/configure/node_modules/slate-edit-table/dist/utils/createTable.js +0 -30
- package/configure/node_modules/slate-edit-table/dist/utils/createTable.js.flow +0 -33
- package/configure/node_modules/slate-edit-table/dist/utils/forEachCells.js +0 -21
- package/configure/node_modules/slate-edit-table/dist/utils/forEachCells.js.flow +0 -22
- package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtColumn.js +0 -22
- package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtColumn.js.flow +0 -19
- package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtRow.js +0 -20
- package/configure/node_modules/slate-edit-table/dist/utils/getCellsAtRow.js.flow +0 -19
- package/configure/node_modules/slate-edit-table/dist/utils/getPosition.js +0 -24
- package/configure/node_modules/slate-edit-table/dist/utils/getPosition.js.flow +0 -19
- package/configure/node_modules/slate-edit-table/dist/utils/getPositionByKey.js +0 -26
- package/configure/node_modules/slate-edit-table/dist/utils/getPositionByKey.js.flow +0 -21
- package/configure/node_modules/slate-edit-table/dist/utils/getRow.js +0 -24
- package/configure/node_modules/slate-edit-table/dist/utils/getRow.js.flow +0 -19
- package/configure/node_modules/slate-edit-table/dist/utils/index.js +0 -64
- package/configure/node_modules/slate-edit-table/dist/utils/index.js.flow +0 -25
- package/configure/node_modules/slate-edit-table/dist/utils/isSelectionInTable.js +0 -34
- package/configure/node_modules/slate-edit-table/dist/utils/isSelectionInTable.js.flow +0 -27
- package/configure/node_modules/slate-edit-table/dist/utils/isSelectionOutOfTable.js +0 -30
- package/configure/node_modules/slate-edit-table/dist/utils/isSelectionOutOfTable.js.flow +0 -23
- package/configure/node_modules/slate-edit-table/dist/validation/index.js +0 -19
- package/configure/node_modules/slate-edit-table/dist/validation/index.js.flow +0 -4
- package/configure/node_modules/slate-edit-table/dist/validation/schema.js +0 -101
- package/configure/node_modules/slate-edit-table/dist/validation/schema.js.flow +0 -98
- package/configure/node_modules/slate-edit-table/dist/validation/validateNode.js +0 -56
- package/configure/node_modules/slate-edit-table/dist/validation/validateNode.js.flow +0 -49
- package/configure/node_modules/slate-edit-table/package.json +0 -69
|
@@ -1,405 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.valueToHtml = exports.htmlToValue = exports.TEXT_RULE = exports.reactAttributes = exports.parseStyleString = exports.BLOCK_TAGS = void 0;
|
|
7
|
-
|
|
8
|
-
var _slateHtmlSerializer = _interopRequireDefault(require("slate-html-serializer"));
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _debug = _interopRequireDefault(require("debug"));
|
|
13
|
-
|
|
14
|
-
var _toStyle = require("to-style");
|
|
15
|
-
|
|
16
|
-
var _image = require("./plugins/image");
|
|
17
|
-
|
|
18
|
-
var _math = require("./plugins/math");
|
|
19
|
-
|
|
20
|
-
var _media = require("./plugins/media");
|
|
21
|
-
|
|
22
|
-
var _list = require("./plugins/list");
|
|
23
|
-
|
|
24
|
-
var _table = require("./plugins/table");
|
|
25
|
-
|
|
26
|
-
var _respArea = require("./plugins/respArea");
|
|
27
|
-
|
|
28
|
-
var _slate = require("slate");
|
|
29
|
-
|
|
30
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
|
-
|
|
32
|
-
var log = (0, _debug["default"])('@pie-lib:editable-html:serialization');
|
|
33
|
-
/**
|
|
34
|
-
* Tags to blocks.
|
|
35
|
-
*
|
|
36
|
-
* @type {Object}
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
var BLOCK_TAGS = {
|
|
40
|
-
div: 'div',
|
|
41
|
-
span: 'span',
|
|
42
|
-
p: 'paragraph',
|
|
43
|
-
blockquote: 'quote',
|
|
44
|
-
pre: 'code',
|
|
45
|
-
h1: 'heading-one',
|
|
46
|
-
h2: 'heading-two',
|
|
47
|
-
h3: 'heading-three',
|
|
48
|
-
h4: 'heading-four',
|
|
49
|
-
h5: 'heading-five',
|
|
50
|
-
h6: 'heading-six'
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Tags to marks.
|
|
54
|
-
*
|
|
55
|
-
* @type {Object}
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
exports.BLOCK_TAGS = BLOCK_TAGS;
|
|
59
|
-
var MARK_TAGS = {
|
|
60
|
-
b: 'bold',
|
|
61
|
-
em: 'italic',
|
|
62
|
-
u: 'underline',
|
|
63
|
-
s: 'strikethrough',
|
|
64
|
-
code: 'code',
|
|
65
|
-
strong: 'bold'
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
var parseStyleString = function parseStyleString(s) {
|
|
69
|
-
var regex = /([\w-]*)\s*:\s*([^;]*)/g;
|
|
70
|
-
var match;
|
|
71
|
-
var result = {};
|
|
72
|
-
|
|
73
|
-
while (match = regex.exec(s)) {
|
|
74
|
-
result[match[1]] = match[2].trim();
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return result;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
exports.parseStyleString = parseStyleString;
|
|
81
|
-
|
|
82
|
-
var reactAttributes = function reactAttributes(o) {
|
|
83
|
-
return (0, _toStyle.object)(o, {
|
|
84
|
-
camelize: true
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
exports.reactAttributes = reactAttributes;
|
|
89
|
-
|
|
90
|
-
var attributesToMap = function attributesToMap(el) {
|
|
91
|
-
return function (acc, attribute) {
|
|
92
|
-
var value = el.getAttribute(attribute);
|
|
93
|
-
|
|
94
|
-
if (value) {
|
|
95
|
-
if (attribute === 'style') {
|
|
96
|
-
var styleString = el.getAttribute(attribute);
|
|
97
|
-
var reactStyleObject = reactAttributes(parseStyleString(styleString));
|
|
98
|
-
acc['style'] = reactStyleObject;
|
|
99
|
-
} else {
|
|
100
|
-
acc[attribute] = el.getAttribute(attribute);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return acc;
|
|
105
|
-
};
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
var attributes = ['border', 'cellpadding', 'cellspacing', 'class', 'style'];
|
|
109
|
-
/**
|
|
110
|
-
* Serializer rules.
|
|
111
|
-
*
|
|
112
|
-
* @type {Array}
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
var blocks = {
|
|
116
|
-
deserialize: function deserialize(el, next) {
|
|
117
|
-
log('[blocks:deserialize] block: ', el);
|
|
118
|
-
var block = BLOCK_TAGS[el.tagName.toLowerCase()];
|
|
119
|
-
if (!block) return;
|
|
120
|
-
log('[blocks:deserialize] block: ', block);
|
|
121
|
-
|
|
122
|
-
if (el.childNodes.length === 1) {
|
|
123
|
-
var cn = el.childNodes[0];
|
|
124
|
-
|
|
125
|
-
if (cn && cn.tagName && cn.tagName.toLowerCase() === block) {
|
|
126
|
-
log('[we have a child node of the same]...');
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return {
|
|
132
|
-
object: 'block',
|
|
133
|
-
type: block,
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Here for rendering styles for all block elements
|
|
137
|
-
*/
|
|
138
|
-
data: {
|
|
139
|
-
attributes: attributes.reduce(attributesToMap(el), {})
|
|
140
|
-
},
|
|
141
|
-
nodes: next(el.childNodes)
|
|
142
|
-
};
|
|
143
|
-
},
|
|
144
|
-
serialize: function serialize(object, children) {
|
|
145
|
-
if (object.object !== 'block') return;
|
|
146
|
-
var jsonData = object.data.toJSON();
|
|
147
|
-
log('[blocks:serialize] object: ', object, children);
|
|
148
|
-
var key;
|
|
149
|
-
|
|
150
|
-
for (key in BLOCK_TAGS) {
|
|
151
|
-
if (BLOCK_TAGS[key] === object.type) {
|
|
152
|
-
var Tag = key;
|
|
153
|
-
return _react["default"].createElement(Tag, jsonData.attributes, children);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
var marks = {
|
|
159
|
-
deserialize: function deserialize(el, next) {
|
|
160
|
-
var mark = MARK_TAGS[el.tagName.toLowerCase()];
|
|
161
|
-
if (!mark) return;
|
|
162
|
-
log('[deserialize] mark: ', mark);
|
|
163
|
-
return {
|
|
164
|
-
object: 'mark',
|
|
165
|
-
type: mark,
|
|
166
|
-
nodes: next(el.childNodes)
|
|
167
|
-
};
|
|
168
|
-
},
|
|
169
|
-
serialize: function serialize(object, children) {
|
|
170
|
-
if (_slate.Mark.isMark(object)) {
|
|
171
|
-
for (var key in MARK_TAGS) {
|
|
172
|
-
if (MARK_TAGS[key] === object.type) {
|
|
173
|
-
var Tag = key;
|
|
174
|
-
return _react["default"].createElement(Tag, null, children);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
var findPreviousText = function findPreviousText(el) {
|
|
182
|
-
if (el.nodeName === '#text') {
|
|
183
|
-
return el;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
if (el.previousSibling) {
|
|
187
|
-
return findPreviousText(el.previousSibling);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
return null;
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
var TEXT_RULE = {
|
|
194
|
-
deserialize: function deserialize(el) {
|
|
195
|
-
/**
|
|
196
|
-
* This needs to be called on the dom element in order to merge the adjacent text nodes together
|
|
197
|
-
* */
|
|
198
|
-
el.normalize();
|
|
199
|
-
|
|
200
|
-
if (el.tagName && el.tagName.toLowerCase() === 'br') {
|
|
201
|
-
return {
|
|
202
|
-
object: 'text',
|
|
203
|
-
leaves: [{
|
|
204
|
-
object: 'leaf',
|
|
205
|
-
text: '\n'
|
|
206
|
-
}]
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (el.nodeName === '#text') {
|
|
211
|
-
if (el.nodeValue && el.nodeValue.match(/<!--.*?-->/)) return;
|
|
212
|
-
log('[text:deserialize] return text object..');
|
|
213
|
-
return {
|
|
214
|
-
object: 'text',
|
|
215
|
-
leaves: [{
|
|
216
|
-
object: 'leaf',
|
|
217
|
-
text: el.nodeValue
|
|
218
|
-
}]
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
serialize: function serialize(obj, children) {
|
|
223
|
-
if (obj.object === 'string') {
|
|
224
|
-
return children.split('\n').reduce(function (array, text, i) {
|
|
225
|
-
if (i !== 0) array.push(_react["default"].createElement("br", null));
|
|
226
|
-
array.push(text);
|
|
227
|
-
return array;
|
|
228
|
-
}, []);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
exports.TEXT_RULE = TEXT_RULE;
|
|
233
|
-
var RULES = [_list.serialization, _math.serialization, _media.serialization, _image.serialization, _table.serialization, _respArea.serialization, TEXT_RULE, blocks, marks];
|
|
234
|
-
|
|
235
|
-
function allWhitespace(node) {
|
|
236
|
-
// Use ECMA-262 Edition 3 String and RegExp features
|
|
237
|
-
return !/[^\t\n\r ]/.test(node.textContent);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
function defaultParseHtml(html) {
|
|
241
|
-
if (typeof DOMParser === 'undefined') {
|
|
242
|
-
throw new Error('The native `DOMParser` global which the `Html` serializer uses by default is not present in this environment. You must supply the `options.parseHtml` function instead.');
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
var parsed = new DOMParser().parseFromString(html, 'text/html');
|
|
246
|
-
var body = parsed.body;
|
|
247
|
-
var textNodes = document.createTreeWalker(body, NodeFilter.SHOW_TEXT, null, null);
|
|
248
|
-
var n = textNodes.nextNode();
|
|
249
|
-
|
|
250
|
-
while (n) {
|
|
251
|
-
if (allWhitespace(n) || n.nodeValue === "\u200B") {
|
|
252
|
-
n.parentNode.removeChild(n);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
n = textNodes.nextNode();
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
return body;
|
|
259
|
-
}
|
|
260
|
-
/** If this lib is used on the server side, we need to bypass using the DOMParser - just put in a stub. */
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
var parseHtml = typeof window === 'undefined' ? function () {
|
|
264
|
-
return {
|
|
265
|
-
childNodes: []
|
|
266
|
-
};
|
|
267
|
-
} : defaultParseHtml;
|
|
268
|
-
var serializer = new _slateHtmlSerializer["default"]({
|
|
269
|
-
defaultBlock: 'div',
|
|
270
|
-
rules: RULES,
|
|
271
|
-
parseHtml: parseHtml
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
var _extends = Object.assign || function (target) {
|
|
275
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
276
|
-
var source = arguments[i];
|
|
277
|
-
|
|
278
|
-
for (var key in source) {
|
|
279
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
280
|
-
target[key] = source[key];
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
return target;
|
|
286
|
-
};
|
|
287
|
-
/**
|
|
288
|
-
* This is needed in order to override the function that eventually leads
|
|
289
|
-
* to the max iteration of 12, which in most cases it's not enough. The newer versions
|
|
290
|
-
* have a different way to calculate this, but updating to a newer version of slate
|
|
291
|
-
* requires a lot of work fixing other issues. So we just increase the rules by 1000,
|
|
292
|
-
* which means a lot of iterations.
|
|
293
|
-
* Below is the code that calculates the max iterations.
|
|
294
|
-
* var max = schema.stack.plugins.length + schema.rules.length + 1;
|
|
295
|
-
*/
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
serializer.deserialize = function deserialize(html) {
|
|
299
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
300
|
-
var _options$toJSON = options.toJSON;
|
|
301
|
-
var toJSON = _options$toJSON === undefined ? false : _options$toJSON;
|
|
302
|
-
var defaultBlock = this.defaultBlock;
|
|
303
|
-
var parseHtml = this.parseHtml;
|
|
304
|
-
var fragment = parseHtml(html);
|
|
305
|
-
var children = Array.from(fragment.childNodes);
|
|
306
|
-
var nodes = this.deserializeElements(children); // COMPAT: ensure that all top-level inline nodes are wrapped into a block.
|
|
307
|
-
|
|
308
|
-
nodes = nodes.reduce(function (memo, node, i, original) {
|
|
309
|
-
if (node.object === 'block') {
|
|
310
|
-
memo.push(node);
|
|
311
|
-
return memo;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
if (i > 0 && original[i - 1].object !== 'block') {
|
|
315
|
-
var _block = memo[memo.length - 1];
|
|
316
|
-
|
|
317
|
-
_block.nodes.push(node);
|
|
318
|
-
|
|
319
|
-
return memo;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
var block = _extends({
|
|
323
|
-
object: 'block',
|
|
324
|
-
data: {},
|
|
325
|
-
isVoid: false
|
|
326
|
-
}, defaultBlock, {
|
|
327
|
-
nodes: [node]
|
|
328
|
-
});
|
|
329
|
-
|
|
330
|
-
memo.push(block);
|
|
331
|
-
return memo;
|
|
332
|
-
}, []);
|
|
333
|
-
|
|
334
|
-
if (nodes.length === 0) {
|
|
335
|
-
nodes = [_extends({
|
|
336
|
-
object: 'block',
|
|
337
|
-
data: {},
|
|
338
|
-
isVoid: false
|
|
339
|
-
}, defaultBlock, {
|
|
340
|
-
nodes: [{
|
|
341
|
-
object: 'text',
|
|
342
|
-
leaves: [{
|
|
343
|
-
object: 'leaf',
|
|
344
|
-
text: '',
|
|
345
|
-
marks: []
|
|
346
|
-
}]
|
|
347
|
-
}]
|
|
348
|
-
})];
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
var json = {
|
|
352
|
-
object: 'value',
|
|
353
|
-
document: {
|
|
354
|
-
object: 'document',
|
|
355
|
-
data: {},
|
|
356
|
-
nodes: nodes
|
|
357
|
-
},
|
|
358
|
-
schema: {
|
|
359
|
-
rules: []
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
var i;
|
|
363
|
-
|
|
364
|
-
for (i = 0; i < 1000; i++) {
|
|
365
|
-
json.schema.rules.push({
|
|
366
|
-
match: {
|
|
367
|
-
object: 'document'
|
|
368
|
-
},
|
|
369
|
-
nodes: [{
|
|
370
|
-
match: {
|
|
371
|
-
object: 'block'
|
|
372
|
-
}
|
|
373
|
-
}]
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
var ret = toJSON ? json : _slate.Value.fromJSON(json);
|
|
378
|
-
|
|
379
|
-
if (ret) {
|
|
380
|
-
return ret;
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
return null;
|
|
384
|
-
};
|
|
385
|
-
|
|
386
|
-
var htmlToValue = function htmlToValue(html) {
|
|
387
|
-
return serializer.deserialize(html);
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
exports.htmlToValue = htmlToValue;
|
|
391
|
-
|
|
392
|
-
var valueToHtml = function valueToHtml(value) {
|
|
393
|
-
return serializer.serialize(value);
|
|
394
|
-
};
|
|
395
|
-
/**
|
|
396
|
-
*
|
|
397
|
-
* <div><div>a</div></div> -> <div>a</div>
|
|
398
|
-
*
|
|
399
|
-
* <div><div>a</div><div>b</div></div> -> <div>a</div><div>b</div>
|
|
400
|
-
* <div><div>a</div>4444<div>b</div></div> -> <div>a</div>4444<div>b</div>
|
|
401
|
-
*/
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
exports.valueToHtml = valueToHtml;
|
|
405
|
-
//# sourceMappingURL=serialization.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/serialization.jsx"],"names":["log","BLOCK_TAGS","div","span","p","blockquote","pre","h1","h2","h3","h4","h5","h6","MARK_TAGS","b","em","u","s","code","strong","parseStyleString","regex","match","result","exec","trim","reactAttributes","o","camelize","attributesToMap","el","acc","attribute","value","getAttribute","styleString","reactStyleObject","attributes","blocks","deserialize","next","block","tagName","toLowerCase","childNodes","length","cn","object","type","data","reduce","nodes","serialize","children","jsonData","toJSON","key","Tag","marks","mark","Mark","isMark","findPreviousText","nodeName","previousSibling","TEXT_RULE","normalize","leaves","text","nodeValue","obj","split","array","i","push","RULES","listSerialization","mathSerialization","mediaSerialization","imgSerialization","tableSerialization","responseAreaSerialization","allWhitespace","node","test","textContent","defaultParseHtml","html","DOMParser","Error","parsed","parseFromString","body","textNodes","document","createTreeWalker","NodeFilter","SHOW_TEXT","n","nextNode","parentNode","removeChild","parseHtml","window","serializer","Html","defaultBlock","rules","_extends","Object","assign","target","arguments","source","prototype","hasOwnProperty","call","options","undefined","_options$toJSON","fragment","Array","from","deserializeElements","memo","original","_block","isVoid","json","schema","ret","Value","fromJSON","htmlToValue","valueToHtml"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,sCAAN,CAAZ;AAEA;;;;;;AAMO,IAAMC,UAAU,GAAG;AACxBC,EAAAA,GAAG,EAAE,KADmB;AAExBC,EAAAA,IAAI,EAAE,MAFkB;AAGxBC,EAAAA,CAAC,EAAE,WAHqB;AAIxBC,EAAAA,UAAU,EAAE,OAJY;AAKxBC,EAAAA,GAAG,EAAE,MALmB;AAMxBC,EAAAA,EAAE,EAAE,aANoB;AAOxBC,EAAAA,EAAE,EAAE,aAPoB;AAQxBC,EAAAA,EAAE,EAAE,eARoB;AASxBC,EAAAA,EAAE,EAAE,cAToB;AAUxBC,EAAAA,EAAE,EAAE,cAVoB;AAWxBC,EAAAA,EAAE,EAAE;AAXoB,CAAnB;AAcP;;;;;;;AAMA,IAAMC,SAAS,GAAG;AAChBC,EAAAA,CAAC,EAAE,MADa;AAEhBC,EAAAA,EAAE,EAAE,QAFY;AAGhBC,EAAAA,CAAC,EAAE,WAHa;AAIhBC,EAAAA,CAAC,EAAE,eAJa;AAKhBC,EAAAA,IAAI,EAAE,MALU;AAMhBC,EAAAA,MAAM,EAAE;AANQ,CAAlB;;AASO,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB,CAAAH,CAAC,EAAI;AACnC,MAAMI,KAAK,GAAG,yBAAd;AACA,MAAIC,KAAJ;AACA,MAAMC,MAAM,GAAG,EAAf;;AACA,SAAQD,KAAK,GAAGD,KAAK,CAACG,IAAN,CAAWP,CAAX,CAAhB,EAAgC;AAC9BM,IAAAA,MAAM,CAACD,KAAK,CAAC,CAAD,CAAN,CAAN,GAAmBA,KAAK,CAAC,CAAD,CAAL,CAASG,IAAT,EAAnB;AACD;;AACD,SA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AAIlC,CAAJ;;AAEA,OAAKA,CAAC,GAAG,CAAT,EAAYA,CAAC,GAAG,IAAhB,EAAsBA,CAAC,EAAvB,EAA2B;AACzBuD,IAAAA,IAAI,CAACC,MAAL,CAAYtB,KAAZ,CAAkBjC,IAAlB,CAAuB;AACrBpD,MAAAA,KAAK,EAAE;AAAEyB,QAAAA,MAAM,EAAE;AAAV,OADc;AAErBI,MAAAA,KAAK,EAAE,CAAC;AAAE7B,QAAAA,KAAK,EAAE;AAAEyB,UAAAA,MAAM,EAAE;AAAV;AAAT,OAAD;AAFc,KAAvB;AAID;;AAED,MAAMmF,GAAG,GAAG3E,MAAM,GAAGyE,IAAH,GAAUG,aAAMC,QAAN,CAAeJ,IAAf,CAA5B;;AAEA,MAAIE,GAAJ,EAAS;AACP,WAAOA,GAAP;AACD;;AAED,SAAO,IAAP;AACD,CArED;;AAuEO,IAAMG,WAAW,GAAG,SAAdA,WAAc,CAAA9C,IAAI;AAAA,SAAIiB,UAAU,CAACjE,WAAX,CAAuBgD,IAAvB,CAAJ;AAAA,CAAxB;;;;AAEA,IAAM+C,WAAW,GAAG,SAAdA,WAAc,CAAArG,KAAK;AAAA,SAAIuE,UAAU,CAACpD,SAAX,CAAqBnB,KAArB,CAAJ;AAAA,CAAzB;AAEP","sourcesContent":["import Html from 'slate-html-serializer';\nimport React from 'react';\nimport debug from 'debug';\nimport { object as toStyleObject } from 'to-style';\n\nimport { serialization as imgSerialization } from './plugins/image';\nimport { serialization as mathSerialization } from './plugins/math';\nimport { serialization as mediaSerialization } from './plugins/media';\nimport { serialization as listSerialization } from './plugins/list';\nimport { serialization as tableSerialization } from './plugins/table';\nimport { serialization as responseAreaSerialization } from './plugins/respArea';\nimport { Mark, Value } from 'slate';\n\nconst log = debug('@pie-lib:editable-html:serialization');\n\n/**\n * Tags to blocks.\n *\n * @type {Object}\n */\n\nexport const BLOCK_TAGS = {\n div: 'div',\n span: 'span',\n p: 'paragraph',\n blockquote: 'quote',\n pre: 'code',\n h1: 'heading-one',\n h2: 'heading-two',\n h3: 'heading-three',\n h4: 'heading-four',\n h5: 'heading-five',\n h6: 'heading-six'\n};\n\n/**\n * Tags to marks.\n *\n * @type {Object}\n */\n\nconst MARK_TAGS = {\n b: 'bold',\n em: 'italic',\n u: 'underline',\n s: 'strikethrough',\n code: 'code',\n strong: 'bold'\n};\n\nexport const parseStyleString = s => {\n const regex = /([\\w-]*)\\s*:\\s*([^;]*)/g;\n let match;\n const result = {};\n while ((match = regex.exec(s))) {\n result[match[1]] = match[2].trim();\n }\n return result;\n};\n\nexport const reactAttributes = o => toStyleObject(o, { camelize: true });\n\nconst attributesToMap = el => (acc, attribute) => {\n const value = el.getAttribute(attribute);\n if (value) {\n if (attribute === 'style') {\n const styleString = el.getAttribute(attribute);\n const reactStyleObject = reactAttributes(parseStyleString(styleString));\n acc['style'] = reactStyleObject;\n } else {\n acc[attribute] = el.getAttribute(attribute);\n }\n }\n return acc;\n};\n\nconst attributes = ['border', 'cellpadding', 'cellspacing', 'class', 'style'];\n\n/**\n * Serializer rules.\n *\n * @type {Array}\n */\n\nconst blocks = {\n deserialize(el, next) {\n log('[blocks:deserialize] block: ', el);\n const block = BLOCK_TAGS[el.tagName.toLowerCase()];\n if (!block) return;\n log('[blocks:deserialize] block: ', block);\n\n if (el.childNodes.length === 1) {\n const cn = el.childNodes[0];\n if (cn && cn.tagName && cn.tagName.toLowerCase() === block) {\n log('[we have a child node of the same]...');\n return;\n }\n }\n\n return {\n object: 'block',\n type: block,\n /**\n * Here for rendering styles for all block elements\n */\n data: { attributes: attributes.reduce(attributesToMap(el), {}) },\n nodes: next(el.childNodes)\n };\n },\n serialize: (object, children) => {\n if (object.object !== 'block') return;\n\n const jsonData = object.data.toJSON();\n\n log('[blocks:serialize] object: ', object, children);\n let key;\n\n for (key in BLOCK_TAGS) {\n if (BLOCK_TAGS[key] === object.type) {\n const Tag = key;\n\n return <Tag {...jsonData.attributes}>{children}</Tag>;\n }\n }\n }\n};\n\nconst marks = {\n deserialize(el, next) {\n const mark = MARK_TAGS[el.tagName.toLowerCase()];\n if (!mark) return;\n log('[deserialize] mark: ', mark);\n return {\n object: 'mark',\n type: mark,\n nodes: next(el.childNodes)\n };\n },\n serialize(object, children) {\n if (Mark.isMark(object)) {\n for (var key in MARK_TAGS) {\n if (MARK_TAGS[key] === object.type) {\n const Tag = key;\n return <Tag>{children}</Tag>;\n }\n }\n }\n }\n};\n\nconst findPreviousText = el => {\n if (el.nodeName === '#text') {\n return el;\n }\n\n if (el.previousSibling) {\n return findPreviousText(el.previousSibling);\n }\n\n return null;\n};\n\nexport const TEXT_RULE = {\n deserialize(el) {\n /**\n * This needs to be called on the dom element in order to merge the adjacent text nodes together\n * */\n el.normalize();\n\n if (el.tagName && el.tagName.toLowerCase() === 'br') {\n return {\n object: 'text',\n leaves: [\n {\n object: 'leaf',\n text: '\\n'\n }\n ]\n };\n }\n\n if (el.nodeName === '#text') {\n if (el.nodeValue && el.nodeValue.match(/<!--.*?-->/)) return;\n\n log('[text:deserialize] return text object..');\n return {\n object: 'text',\n leaves: [\n {\n object: 'leaf',\n text: el.nodeValue\n }\n ]\n };\n }\n },\n\n serialize(obj, children) {\n if (obj.object === 'string') {\n return children.split('\\n').reduce((array, text, i) => {\n if (i !== 0) array.push(<br />);\n array.push(text);\n return array;\n }, []);\n }\n }\n};\n\nconst RULES = [\n listSerialization,\n mathSerialization,\n mediaSerialization,\n imgSerialization,\n tableSerialization,\n responseAreaSerialization,\n TEXT_RULE,\n blocks,\n marks\n];\n\nfunction allWhitespace(node) {\n // Use ECMA-262 Edition 3 String and RegExp features\n return !/[^\\t\\n\\r ]/.test(node.textContent);\n}\n\nfunction defaultParseHtml(html) {\n if (typeof DOMParser === 'undefined') {\n throw new Error(\n 'The native `DOMParser` global which the `Html` serializer uses by default is not present in this environment. You must supply the `options.parseHtml` function instead.'\n );\n }\n\n const parsed = new DOMParser().parseFromString(html, 'text/html');\n\n const { body } = parsed;\n var textNodes = document.createTreeWalker(body, NodeFilter.SHOW_TEXT, null, null);\n var n = textNodes.nextNode();\n\n while (n) {\n if (allWhitespace(n) || n.nodeValue === '\\u200B') {\n n.parentNode.removeChild(n);\n }\n n = textNodes.nextNode();\n }\n\n return body;\n}\n\n/** If this lib is used on the server side, we need to bypass using the DOMParser - just put in a stub. */\nconst parseHtml =\n typeof window === 'undefined'\n ? () => ({\n childNodes: []\n })\n : defaultParseHtml;\n\nconst serializer = new Html({\n defaultBlock: 'div',\n rules: RULES,\n parseHtml\n});\n\nconst _extends =\n Object.assign ||\n function(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n/**\n * This is needed in order to override the function that eventually leads\n * to the max iteration of 12, which in most cases it's not enough. The newer versions\n * have a different way to calculate this, but updating to a newer version of slate\n * requires a lot of work fixing other issues. So we just increase the rules by 1000,\n * which means a lot of iterations.\n * Below is the code that calculates the max iterations.\n * var max = schema.stack.plugins.length + schema.rules.length + 1;\n */\nserializer.deserialize = function deserialize(html) {\n const options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const _options$toJSON = options.toJSON;\n const toJSON = _options$toJSON === undefined ? false : _options$toJSON;\n const defaultBlock = this.defaultBlock;\n const parseHtml = this.parseHtml;\n\n const fragment = parseHtml(html);\n const children = Array.from(fragment.childNodes);\n let nodes = this.deserializeElements(children);\n\n // COMPAT: ensure that all top-level inline nodes are wrapped into a block.\n nodes = nodes.reduce(function(memo, node, i, original) {\n if (node.object === 'block') {\n memo.push(node);\n return memo;\n }\n\n if (i > 0 && original[i - 1].object !== 'block') {\n const _block = memo[memo.length - 1];\n\n _block.nodes.push(node);\n return memo;\n }\n\n const block = _extends({ object: 'block', data: {}, isVoid: false }, defaultBlock, {\n nodes: [node]\n });\n\n memo.push(block);\n return memo;\n }, []);\n\n if (nodes.length === 0) {\n nodes = [\n _extends({ object: 'block', data: {}, isVoid: false }, defaultBlock, {\n nodes: [{ object: 'text', leaves: [{ object: 'leaf', text: '', marks: [] }] }]\n })\n ];\n }\n\n const json = {\n object: 'value',\n document: {\n object: 'document',\n data: {},\n nodes: nodes\n },\n schema: {\n rules: []\n }\n };\n\n let i;\n\n for (i = 0; i < 1000; i++) {\n json.schema.rules.push({\n match: { object: 'document' },\n nodes: [{ match: { object: 'block' } }]\n });\n }\n\n const ret = toJSON ? json : Value.fromJSON(json);\n\n if (ret) {\n return ret;\n }\n\n return null;\n};\n\nexport const htmlToValue = html => serializer.deserialize(html);\n\nexport const valueToHtml = value => serializer.serialize(value);\n\n/**\n *\n * <div><div>a</div></div> -> <div>a</div>\n *\n * <div><div>a</div><div>b</div></div> -> <div>a</div><div>b</div>\n * <div><div>a</div>4444<div>b</div></div> -> <div>a</div>4444<div>b</div>\n */\n"],"file":"serialization.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/theme.js"],"names":["primary"],"mappings":";;;;;;AAAO,IAAMA,OAAO,GAAG,SAAhB","sourcesContent":["export const primary = '#304ffe';\n"],"file":"theme.js"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pie-lib/editable-html",
|
|
3
|
-
"version": "7.17.3",
|
|
4
|
-
"description": "",
|
|
5
|
-
"license": "ISC",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"module": "src/index.jsx",
|
|
8
|
-
"author": "pie-framework developers",
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"@material-ui/core": "^3.8.3",
|
|
11
|
-
"@material-ui/icons": "^3.0.2",
|
|
12
|
-
"@material-ui/styles": "^3.0.0-alpha.10",
|
|
13
|
-
"@pie-lib/drag": "^1.1.52",
|
|
14
|
-
"@pie-lib/math-rendering": "^2.3.9",
|
|
15
|
-
"@pie-lib/math-toolbar": "^1.8.0",
|
|
16
|
-
"@pie-lib/render-ui": "^4.12.0",
|
|
17
|
-
"change-case": "^3.0.2",
|
|
18
|
-
"classnames": "^2.2.6",
|
|
19
|
-
"debug": "^4.1.1",
|
|
20
|
-
"immutable": "^4.0.0-rc.12",
|
|
21
|
-
"keycode": "^2.2.0",
|
|
22
|
-
"lodash": "^4.17.11",
|
|
23
|
-
"prop-types": "^15.6.2",
|
|
24
|
-
"react-attr-converter": "^0.3.1",
|
|
25
|
-
"react-jss": "^8.6.1",
|
|
26
|
-
"react-portal": "^4.2.0",
|
|
27
|
-
"slate": "^0.36.2",
|
|
28
|
-
"slate-dev-environment": "^0.2.0",
|
|
29
|
-
"slate-edit-list": "^0.11.3",
|
|
30
|
-
"slate-edit-table": "^0.17.0",
|
|
31
|
-
"slate-html-serializer": "^0.6.12",
|
|
32
|
-
"slate-prop-types": "^0.4.38",
|
|
33
|
-
"slate-react": "^0.14.3",
|
|
34
|
-
"slate-schema-violations": "^0.1.39",
|
|
35
|
-
"slate-soft-break": "^0.8.1",
|
|
36
|
-
"to-style": "^1.3.3"
|
|
37
|
-
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"@pie-framework/mathquill": "^1.1.2",
|
|
40
|
-
"react": "^16.8.1",
|
|
41
|
-
"react-dom": "^16.9.0"
|
|
42
|
-
},
|
|
43
|
-
"peerDependencies": {
|
|
44
|
-
"react": "^16.8.1"
|
|
45
|
-
},
|
|
46
|
-
"publishConfig": {
|
|
47
|
-
"access": "public"
|
|
48
|
-
},
|
|
49
|
-
"gitHead": "de37d3ba44d3e7934e2f804381fe50d2da16a29a",
|
|
50
|
-
"scripts": {}
|
|
51
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
document: {
|
|
3
|
-
nodes: [
|
|
4
|
-
{
|
|
5
|
-
object: 'block',
|
|
6
|
-
type: 'div',
|
|
7
|
-
nodes: [
|
|
8
|
-
{
|
|
9
|
-
object: 'block',
|
|
10
|
-
type: 'paragraph',
|
|
11
|
-
nodes: [
|
|
12
|
-
{
|
|
13
|
-
object: 'text',
|
|
14
|
-
leaves: [
|
|
15
|
-
{
|
|
16
|
-
text: 'foo'
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
{
|
|
22
|
-
object: 'inline',
|
|
23
|
-
type: 'image',
|
|
24
|
-
isVoid: true,
|
|
25
|
-
data: {
|
|
26
|
-
src:
|
|
27
|
-
'https://img.washingtonpost.com/wp-apps/imrs.php?src=https://img.washingtonpost.com/news/speaking-of-science/wp-content/uploads/sites/36/2015/10/as12-49-7278-1024x1024.jpg&w=1484'
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
object: 'text',
|
|
33
|
-
leaves: [
|
|
34
|
-
{
|
|
35
|
-
text: 'bar'
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
]
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
object: 'block',
|
|
45
|
-
type: 'paragraph',
|
|
46
|
-
nodes: [
|
|
47
|
-
{
|
|
48
|
-
object: 'text',
|
|
49
|
-
leaves: [
|
|
50
|
-
{
|
|
51
|
-
text: 'text'
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
|
|
6
|
-
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
|
|
7
|
-
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom-server.browser.production.min.js"></script>
|
|
8
|
-
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
|
|
9
|
-
<style>
|
|
10
|
-
body,
|
|
11
|
-
span,
|
|
12
|
-
div,
|
|
13
|
-
p {
|
|
14
|
-
font-family: 'Roboto', sans-serif;
|
|
15
|
-
}
|
|
16
|
-
</style>
|
|
17
|
-
<script src="bundle.js" type="text/javascript"></script>
|
|
18
|
-
</head>
|
|
19
|
-
|
|
20
|
-
<body>
|
|
21
|
-
<div id="app"></div>
|
|
22
|
-
</body>
|
|
23
|
-
|
|
24
|
-
</html>
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import imageData from './data';
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import ReactDOM from 'react-dom';
|
|
5
|
-
import { Editor } from 'slate-react';
|
|
6
|
-
import { Range, Block, Value } from 'slate';
|
|
7
|
-
import EditableEditor from '../../src/backup-editor';
|
|
8
|
-
class Img extends React.Component {
|
|
9
|
-
render() {
|
|
10
|
-
const { data } = this.props.node;
|
|
11
|
-
const src = data.get('src');
|
|
12
|
-
return <img src={src} width={100} />;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const ImgPlugin = () => {
|
|
17
|
-
return {
|
|
18
|
-
renderNode: props => {
|
|
19
|
-
if (props.node.type === 'image') {
|
|
20
|
-
return <Img {...props} />;
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
onKeyDown(event, change, editor) {
|
|
24
|
-
const { startKey } = change.value.selection;
|
|
25
|
-
const n = change.value.document.getDescendant(startKey);
|
|
26
|
-
const p = change.value.document.getParent(n.key);
|
|
27
|
-
|
|
28
|
-
if (p.type === 'image') {
|
|
29
|
-
const block = Block.fromJSON({ type: 'div' });
|
|
30
|
-
const range = Range.fromJSON({
|
|
31
|
-
anchorKey: block.key,
|
|
32
|
-
anchorOffset: 0,
|
|
33
|
-
focusKey: block.key,
|
|
34
|
-
focusOffset: 0,
|
|
35
|
-
isFocused: true,
|
|
36
|
-
isBackward: false
|
|
37
|
-
});
|
|
38
|
-
change.insertBlockAtRange(change.value.selection, block).select(range);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export default ImgPlugin;
|
|
45
|
-
|
|
46
|
-
class ImageDemo extends React.Component {
|
|
47
|
-
constructor(props) {
|
|
48
|
-
super(props);
|
|
49
|
-
this.state = {
|
|
50
|
-
value: Value.fromJSON(imageData)
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
this.plugins = [ImgPlugin()];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
render() {
|
|
57
|
-
const { value } = this.state;
|
|
58
|
-
return (
|
|
59
|
-
<div>
|
|
60
|
-
ImageDemo
|
|
61
|
-
<hr />
|
|
62
|
-
This demo tests adding text between images. click on the image and type
|
|
63
|
-
some text...
|
|
64
|
-
<hr />
|
|
65
|
-
<Editor
|
|
66
|
-
value={value}
|
|
67
|
-
onChange={change => this.setState({ value: change.value })}
|
|
68
|
-
plugins={this.plugins}
|
|
69
|
-
/>
|
|
70
|
-
<EditableEditor
|
|
71
|
-
value={value}
|
|
72
|
-
onChange={change => this.setState({ value: change.value })}
|
|
73
|
-
plugins={this.plugins}
|
|
74
|
-
/>
|
|
75
|
-
</div>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
81
|
-
const el = React.createElement(ImageDemo, {});
|
|
82
|
-
ReactDOM.render(el, document.querySelector('#app'));
|
|
83
|
-
});
|