@pie-element/ebsr 6.6.2 → 6.6.3-next.1016
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 +169 -0
- package/configure/CHANGELOG.md +169 -0
- package/configure/lib/defaults.js +29 -12
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js +30 -23
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/main.js +70 -43
- package/configure/lib/main.js.map +1 -1
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.json +1972 -0
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.md +1793 -0
- package/configure/node_modules/@pie-element/multiple-choice/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/multiple-choice/PRINT.md +35 -0
- package/configure/node_modules/@pie-element/multiple-choice/README.md +56 -0
- package/configure/node_modules/@pie-element/multiple-choice/choice.png +0 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.json +1387 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.md +1334 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +104 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js +198 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js +599 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js +18 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/package.json +20 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.json +527 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.md +768 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js +18 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js +305 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js +36 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/package.json +15 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json +353 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +277 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/config.js +8 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/generate.js +52 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/index.html +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/session.js +7 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json +338 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +274 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +298 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js +157 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js +174 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js +151 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js +97 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js +254 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js +129 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js +35 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/configure.js +843 -0
- package/{module → configure/node_modules/@pie-element/multiple-choice/module}/controller.js +17399 -17113
- package/configure/node_modules/@pie-element/multiple-choice/module/demo.js +77 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/element.js +2019 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/index.html +21 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/manifest.json +14 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/print-demo.js +115 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/print.html +18 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/print.js +1983 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.json +1677 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/CHANGELOG.md +1645 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/README.md +12 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js +44 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/alert-dialog.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js +86 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/checkbox.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js +180 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/feedback-menu.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js +409 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-configuration/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js +54 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/choice-utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js +196 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/feedback-selector.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js +75 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/group.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js +189 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/feedback-config/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js +46 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/form-section.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js +156 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/help.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js +216 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js +152 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/input.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js +131 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/inputs.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js +191 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/langs.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js +113 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/config-layout.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js +24 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js +115 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/layout-contents.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js +99 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/layout/settings-box.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js +79 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/mui-box/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js +370 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field-custom.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js +278 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/number-text-field.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js +41 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/radio-with-label.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js +77 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/display-size.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js +140 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js +426 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/panel.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js +43 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/settings-radio-label.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js +56 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/settings/toggle.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js +117 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tabs/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js +210 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/tags-input/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js +192 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/two-choice.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js +95 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/lib/with-stateful-model.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/CHANGELOG.md +449 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/render-math.js +276 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/package.json +19 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/math-rendering/src/render-math.js +230 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/CHANGELOG.md +618 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/README.md +33 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/package.json +30 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/color.js +48 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/index.js +27 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/package.json +30 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/alert-dialog.jsx +43 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/checkbox.jsx +63 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/feedback-menu.jsx +103 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-configuration/index.jsx +315 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/choice-utils.js +30 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/feedback-selector.jsx +116 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/group.jsx +54 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/feedback-config/index.jsx +98 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/form-section.jsx +23 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/help.jsx +88 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/index.js +58 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/input.jsx +72 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/inputs.jsx +96 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/langs.jsx +122 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/config-layout.jsx +64 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/index.js +4 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/layout-contents.jsx +60 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/layout/settings-box.jsx +31 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/mui-box/index.jsx +64 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field-custom.jsx +279 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/number-text-field.jsx +196 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/radio-with-label.jsx +18 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/display-size.jsx +52 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/index.js +75 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/panel.jsx +297 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/settings-radio-label.jsx +20 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/settings/toggle.jsx +31 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tabs/index.jsx +51 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/tags-input/index.jsx +121 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/two-choice.jsx +94 -0
- package/configure/node_modules/@pie-element/multiple-choice/node_modules/@pie-lib/config-ui/src/with-stateful-model.jsx +36 -0
- package/configure/node_modules/@pie-element/multiple-choice/package.json +34 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.json +547 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.md +516 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/README.md +64 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js +86 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js +155 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js +65 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/CHANGELOG.md +449 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/render-math.js +276 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/package.json +19 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/math-rendering/src/render-math.js +230 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/CHANGELOG.md +618 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/README.md +33 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/package.json +30 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/color.js +48 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/index.js +27 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/package.json +36 -0
- 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 +65 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx +75 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/styles.js +60 -0
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.json +3327 -0
- package/configure/node_modules/@pie-lib/editable-html/CHANGELOG.md +1616 -0
- package/configure/node_modules/@pie-lib/editable-html/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/editable-html/README.md +45 -0
- package/configure/node_modules/@pie-lib/editable-html/deploy.sh +16 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/editor.js +752 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/editor.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/index.js +236 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js +16 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/parse-html.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js +250 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/component.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js +143 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/image-toolbar.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js +219 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js +139 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/image/insert-image-handler.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js +135 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js +204 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/list/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js +347 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/math/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js +344 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js +449 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-dialog.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js +109 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-toolbar.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js +106 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/media/media-wrapper.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js +264 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/choice.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js +97 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/drag-in-the-blank/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js +54 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/explicit-constructed-response/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js +93 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/icons/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js +288 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js +70 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/inline-dropdown/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js +110 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/respArea/utils.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js +69 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/icons/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js +497 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js +169 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/table/table-toolbar.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js +132 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/default-toolbar.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js +50 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/done-button.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js +275 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/editor-and-toolbar.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js +32 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js +179 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar-buttons.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js +358 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/toolbar/toolbar.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js +62 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/plugins/utils.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js +411 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/serialization.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/theme.js +9 -0
- package/configure/node_modules/@pie-lib/editable-html/lib/theme.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/CHANGELOG.md +449 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/render-math.js +276 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/package.json +19 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/math-rendering/src/render-math.js +230 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/CHANGELOG.md +618 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/README.md +33 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/package.json +30 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/color.js +48 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/index.js +27 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
- package/configure/node_modules/@pie-lib/editable-html/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
- package/configure/node_modules/@pie-lib/editable-html/package.json +51 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/image/data.js +59 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/image/index.html +24 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/image/index.jsx +83 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/index.html +27 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.html +25 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/mathquill/index.jsx +151 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/package.json +15 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.html +26 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/prod-test/index.jsx +30 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/data.js +29 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/image-plugin.jsx +40 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.html +23 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/schema-override/index.jsx +96 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/data.js +29 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/image-plugin.jsx +40 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.html +24 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/serialization/index.jsx +12 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/static.json +3 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/table-examples.html +67 -0
- package/configure/node_modules/@pie-lib/editable-html/playground/webpack.config.js +42 -0
- package/configure/node_modules/@pie-lib/editable-html/src/editor.jsx +641 -0
- package/configure/node_modules/@pie-lib/editable-html/src/index.jsx +145 -0
- package/configure/node_modules/@pie-lib/editable-html/src/parse-html.js +8 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/README.md +27 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/component.jsx +166 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/image-toolbar.jsx +62 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/index.jsx +180 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/image/insert-image-handler.js +93 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/index.jsx +112 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/list/index.jsx +175 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/math/index.jsx +283 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/index.jsx +284 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-dialog.js +372 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-toolbar.jsx +53 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/media/media-wrapper.jsx +43 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/choice.jsx +187 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/drag-in-the-blank/index.jsx +78 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/explicit-constructed-response/index.jsx +45 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/icons/index.jsx +68 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/index.jsx +259 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/inline-dropdown/index.jsx +63 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/respArea/utils.jsx +77 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/icons/index.jsx +59 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/index.jsx +437 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/table/table-toolbar.jsx +104 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/default-toolbar.jsx +111 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/done-button.jsx +36 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/editor-and-toolbar.jsx +225 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/index.jsx +21 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar-buttons.jsx +97 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/toolbar/toolbar.jsx +316 -0
- package/configure/node_modules/@pie-lib/editable-html/src/plugins/utils.js +32 -0
- package/configure/node_modules/@pie-lib/editable-html/src/serialization.jsx +376 -0
- package/configure/node_modules/@pie-lib/editable-html/src/theme.js +1 -0
- package/configure/node_modules/@pie-lib/editable-html/static.json +1 -0
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.json +1547 -0
- package/configure/node_modules/@pie-lib/math-input/CHANGELOG.md +757 -0
- package/configure/node_modules/@pie-lib/math-input/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/math-input/README.md +27 -0
- package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js +126 -0
- package/configure/node_modules/@pie-lib/math-input/lib/horizontal-keypad.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/index.js +80 -0
- package/configure/node_modules/@pie-lib/math-input/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js +417 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js +34 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keypad/keys-layout.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js +41 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/basic-operators.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js +17 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/chars.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js +46 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/comparison.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js +43 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/constants.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js +53 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/digits.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js +16 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/edit.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js +35 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/exponent.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js +31 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/fractions.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js +165 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/geometry.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js +295 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/grades.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js +54 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js +32 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/log.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js +23 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/logic.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js +23 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/matrices.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js +69 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/misc.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js +23 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/navigation.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js +17 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/operators.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js +45 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/statistics.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js +23 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/sub-sup.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js +53 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/trigonometry.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js +130 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/utils.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js +29 -0
- package/configure/node_modules/@pie-lib/math-input/lib/keys/vars.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/math-input.js +206 -0
- package/configure/node_modules/@pie-lib/math-input/lib/math-input.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js +23 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/custom-elements.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js +24 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js +257 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/input.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js +224 -0
- package/configure/node_modules/@pie-lib/math-input/lib/mq/static.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-input/package.json +26 -0
- package/configure/node_modules/@pie-lib/math-input/src/horizontal-keypad.jsx +54 -0
- package/configure/node_modules/@pie-lib/math-input/src/index.jsx +27 -0
- package/configure/node_modules/@pie-lib/math-input/src/keypad/index.jsx +335 -0
- package/configure/node_modules/@pie-lib/math-input/src/keypad/keys-layout.js +17 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/basic-operators.js +32 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/chars.js +5 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/comparison.js +27 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/constants.js +35 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/digits.js +40 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/edit.js +3 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/exponent.js +27 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/fractions.js +23 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/geometry.js +140 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/grades.js +379 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/index.js +21 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/log.js +22 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/logic.js +15 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/matrices.js +15 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/misc.js +60 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/navigation.js +8 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/operators.js +9 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/statistics.js +36 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/sub-sup.js +15 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/trigonometry.js +15 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/utils.js +71 -0
- package/configure/node_modules/@pie-lib/math-input/src/keys/vars.js +19 -0
- package/configure/node_modules/@pie-lib/math-input/src/math-input.jsx +128 -0
- package/configure/node_modules/@pie-lib/math-input/src/mq/custom-elements.js +11 -0
- package/configure/node_modules/@pie-lib/math-input/src/mq/index.js +4 -0
- package/configure/node_modules/@pie-lib/math-input/src/mq/input.jsx +163 -0
- package/configure/node_modules/@pie-lib/math-input/src/mq/static.jsx +145 -0
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +672 -0
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +427 -0
- package/configure/node_modules/@pie-lib/math-rendering/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +30 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +316 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +123 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +103 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +275 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/package.json +19 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.html +872 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.js +108 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.html +156 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.js +16 -0
- package/configure/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +29 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/index.js +4 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +215 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +234 -0
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.json +862 -0
- package/configure/node_modules/@pie-lib/math-toolbar/CHANGELOG.md +631 -0
- package/configure/node_modules/@pie-lib/math-toolbar/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js +53 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/done-button.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js +463 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/editor-and-pad.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js +271 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js +173 -0
- package/configure/node_modules/@pie-lib/math-toolbar/lib/math-preview.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-toolbar/package.json +37 -0
- package/configure/node_modules/@pie-lib/math-toolbar/src/done-button.jsx +39 -0
- package/configure/node_modules/@pie-lib/math-toolbar/src/editor-and-pad.jsx +373 -0
- package/configure/node_modules/@pie-lib/math-toolbar/src/index.jsx +193 -0
- package/configure/node_modules/@pie-lib/math-toolbar/src/math-preview.jsx +107 -0
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +937 -0
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +602 -0
- package/configure/node_modules/@pie-lib/render-ui/LICENSE.md +5 -0
- package/configure/node_modules/@pie-lib/render-ui/README.md +33 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +146 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js +134 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +160 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +24 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +102 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js +104 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +133 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +162 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +160 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +206 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/package.json +30 -0
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +68 -0
- package/configure/node_modules/@pie-lib/render-ui/src/color.js +48 -0
- package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +100 -0
- package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +14 -0
- package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +40 -0
- package/configure/node_modules/@pie-lib/render-ui/src/index.js +27 -0
- package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
- package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +77 -0
- package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +90 -0
- package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +19 -0
- package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
- package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
- package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +118 -0
- package/configure/package.json +3 -3
- package/configure/src/__tests__/__snapshots__/index.test.js.snap +12 -4
- package/configure/src/__tests__/index.test.js +4 -2
- package/configure/src/defaults.js +27 -11
- package/configure/src/index.js +14 -35
- package/configure/src/main.jsx +69 -35
- package/controller/CHANGELOG.md +25 -0
- package/controller/lib/index.js +113 -23
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/controller/src/index.js +62 -5
- package/docs/config-schema.json +311 -3
- package/docs/config-schema.json.md +243 -7
- package/docs/demo/config.js +1 -1
- package/docs/pie-schema.json +139 -1
- package/docs/pie-schema.json.md +106 -2
- package/lib/index.js +10 -7
- package/lib/index.js.map +1 -1
- package/lib/print.js +243 -0
- package/lib/print.js.map +1 -0
- package/package.json +8 -4
- package/src/index.js +4 -0
- package/src/print.js +181 -0
- package/docs/demo/pie.manifest.json +0 -11
- package/module/configure.js +0 -1546
- package/module/demo.js +0 -79
- package/module/element.js +0 -1326
- package/module/index.html +0 -16
- package/module/manifest.json +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/plugins/toolbar/toolbar.jsx"],"names":["log","getCustomToolbar","plugin","node","value","handleDone","onDataChange","toolbar","CustomToolbarComp","customToolbar","Toolbar","props","type","marks","some","mark","blocks","onChange","onToggle","change","e","preventDefault","fn","finishEditing","onDone","deleteNode","persist","onDeleteClick","state","classes","plugins","pluginProps","toolbarOpts","autoWidth","isFocused","toolbarRef","parentNode","find","p","supports","parentPlugin","done","handler","onToolbarDone","handleDataChange","key","data","CustomToolbar","filteredPlugins","filterPlugins","parentExtraStyles","pluginStyles","pluginExtraStyles","extraStyles","deletable","customToolbarShowDone","showDone","alwaysVisible","defaultToolbarShowDone","hasDoneButton","names","toolbarWithNoDone","toolbarTop","position","toolbarRight","alignment","focused","fullWidth","onClick","shared","iconRoot","onDeleteMouseDown","root","React","Component","zIndex","PropTypes","number","SlatePropTypes","isRequired","array","object","onImageClick","func","bool","shape","oneOf","ref","style","cursor","justifyContent","background","minWidth","margin","padding","boxShadow","boxSizing","display","top","right","width","height","verticalAlign","label","color","index"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,wCAAN,CAAZ;;AAEA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,MAAD,EAASC,IAAT,EAAeC,KAAf,EAAsBC,UAAtB,EAAkCC,YAAlC,EAAmD;AAC1E,MAAI,CAACJ,MAAL,EAAa;AACX;AACD;;AACD,MAAI,CAACA,MAAM,CAACK,OAAZ,EAAqB;AACnB;AACD;;AACD,MAAIL,MAAM,CAACK,OAAP,CAAeC,iBAAnB,EAAsC;AACpC;AACJ;AACA;AACA;AACA;AACA;AACI,WAAON,MAAM,CAACK,OAAP,CAAeC,iBAAtB;AACD,GARD,MAQO,IAAI,OAAON,MAAM,CAACK,OAAP,CAAeE,aAAtB,KAAwC,UAA5C,EAAwD;AAC7DT,IAAAA,GAAG,CAAC,oCAAD,CAAH;AACA,WAAOE,MAAM,CAACK,OAAP,CAAeE,aAAf,CAA6BN,IAA7B,EAAmCC,KAAnC,EAA0CC,UAA1C,EAAsDC,YAAtD,CAAP;AACD;AACF,CAnBD;;IAqBaI,O;;;;;AAwBX,mBAAYC,KAAZ,EAAmB;AAAA;;AAAA;;AACjB,8BAAMA,KAAN;;AADiB,8DAOT,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AFA;AAGRP,IAAAA,OAAO,EAAE,KAHD;AAIRQ,IAAAA,aAAa,EAAE;AAJP,GAjCE;AAuCZC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE;AADF,GAvCK;AA0CZnC,EAAAA,MAAM,EAAE;AACN4B,IAAAA,OAAO,EAAE;AADH;AA1CI,CAAd;;eA8Ce,wBAAWT,KAAX,EAAkB;AAAEiB,EAAAA,KAAK,EAAE;AAAT,CAAlB,EAAmC/F,OAAnC,C","sourcesContent":["import { DoneButton } from './done-button';\nimport Delete from '@material-ui/icons/Delete';\nimport IconButton from '@material-ui/core/IconButton';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport classNames from 'classnames';\nimport debug from 'debug';\nimport SlatePropTypes from 'slate-prop-types';\nimport debounce from 'lodash/debounce';\n\nimport { findSingleNode, findParentNode } from '../utils';\nimport { withStyles } from '@material-ui/core/styles';\nimport DefaultToolbar from './default-toolbar';\n\nconst log = debug('@pie-lib:editable-html:plugins:toolbar');\n\nconst getCustomToolbar = (plugin, node, value, handleDone, onDataChange) => {\n if (!plugin) {\n return;\n }\n if (!plugin.toolbar) {\n return;\n }\n if (plugin.toolbar.CustomToolbarComp) {\n /**\n * Using a pre-defined Component should be preferred\n * as the rendering of it (and it's children) can be optimized by React.\n * If you keep re-defining the comp with an inline function\n * then react will have to re-render.\n */\n return plugin.toolbar.CustomToolbarComp;\n } else if (typeof plugin.toolbar.customToolbar === 'function') {\n log('deprecated - use CustomToolbarComp');\n return plugin.toolbar.customToolbar(node, value, handleDone, onDataChange);\n }\n};\n\nexport class Toolbar extends React.Component {\n static propTypes = {\n zIndex: PropTypes.number,\n value: SlatePropTypes.value.isRequired,\n plugins: PropTypes.array,\n plugin: PropTypes.object,\n onImageClick: PropTypes.func,\n onDone: PropTypes.func.isRequired,\n toolbarRef: PropTypes.func.isRequired,\n classes: PropTypes.object.isRequired,\n isFocused: PropTypes.bool,\n autoWidth: PropTypes.bool,\n onChange: PropTypes.func.isRequired,\n pluginProps: PropTypes.object,\n toolbarOpts: PropTypes.shape({\n position: PropTypes.oneOf(['bottom', 'top']),\n alignment: PropTypes.oneOf(['left', 'right']),\n alwaysVisible: PropTypes.bool,\n ref: PropTypes.func,\n showDone: PropTypes.bool\n }),\n onDataChange: PropTypes.func\n };\n\n constructor(props) {\n super(props);\n this.state = {\n change: null\n };\n }\n\n hasMark = type => {\n const { value } = this.props;\n return value.marks.some(mark => mark.type == type);\n };\n\n hasBlock = type => {\n const { value } = this.props;\n return value.blocks.some(node => node.type == type);\n };\n\n onToggle = plugin => {\n const { value, onChange } = this.props;\n\n if (!plugin.onToggle) return;\n\n const change = plugin.onToggle(value.change());\n onChange(change);\n };\n\n onClick = e => {\n log('[onClick]');\n e.preventDefault();\n };\n\n onButtonClick = fn => {\n return e => {\n e.preventDefault();\n fn();\n };\n };\n\n onToolbarDone = (change, finishEditing) => {\n log('[onToolbarDone] change: ', change, 'finishEditing: ', finishEditing);\n const { onChange, onDone } = this.props;\n\n if (change) {\n onChange(change, () => {\n if (finishEditing) {\n onDone();\n }\n });\n } else {\n if (finishEditing) {\n log('[onToolbarChange] call onDone');\n onDone();\n }\n }\n };\n\n onDeleteClick = debounce(\n (e, plugin, node, value, onChange) => plugin.deleteNode(e, node, value, onChange),\n 500\n );\n\n onDeleteMouseDown = (e, plugin, node, value, onChange) => {\n e.persist();\n this.onDeleteClick(e, plugin, node, value, onChange);\n };\n\n render() {\n const {\n classes,\n plugins,\n pluginProps,\n toolbarOpts,\n value,\n autoWidth,\n onChange,\n isFocused,\n onDone,\n toolbarRef\n } = this.props;\n\n const node = findSingleNode(value);\n const parentNode = findParentNode(value, node);\n\n log(' --------------> [render] node: ', node);\n log('[render] node: ', node);\n\n const plugin = plugins.find(p => {\n if (!node) {\n return;\n }\n\n if (p.toolbar) {\n return p.toolbar.supports && p.toolbar.supports(node, value);\n }\n });\n const parentPlugin = plugins.find(p => {\n if (!parentNode) {\n return;\n }\n\n if (p.toolbar) {\n return p.toolbar.supports && p.toolbar.supports(parentNode, value);\n }\n });\n\n log('[render] plugin: ', plugin);\n\n const handleDone = (change, done) => {\n let handler = onDone;\n\n if (plugin && plugin.toolbar && plugin.toolbar.customToolbar) {\n handler = this.onToolbarDone;\n }\n\n handler(change, done);\n\n if (parentPlugin && parentPlugin.handleDone) {\n parentPlugin.handleDone(value, node, plugin, onChange);\n }\n };\n\n const handleDataChange = (key, data) => {\n this.props.onDataChange(key, data);\n };\n\n const CustomToolbar = getCustomToolbar(\n plugin,\n node,\n value,\n handleDone,\n this.props.onDataChange\n );\n\n const filteredPlugins =\n plugin && plugin.filterPlugins ? plugin.filterPlugins(node, plugins) : plugins;\n\n log('[render] CustomToolbar: ', CustomToolbar);\n const parentExtraStyles =\n parentPlugin && parentPlugin.pluginStyles\n ? parentPlugin.pluginStyles(node, parentNode, plugin)\n : {};\n const pluginExtraStyles =\n plugin && plugin.pluginStyles ? plugin.pluginStyles(node, parentNode, plugin) : {};\n const extraStyles = {\n ...pluginExtraStyles,\n ...parentExtraStyles\n };\n\n const deletable = node && plugin && plugin.deleteNode;\n const customToolbarShowDone =\n node && plugin && plugin.toolbar && plugin.toolbar.showDone && !toolbarOpts.alwaysVisible;\n\n // If there is a toolbarOpts we check if the showDone is not equal to false\n const defaultToolbarShowDone = !toolbarOpts || toolbarOpts.showDone !== false;\n\n const hasDoneButton = defaultToolbarShowDone || customToolbarShowDone;\n\n const names = classNames(classes.toolbar, {\n [classes.toolbarWithNoDone]: !hasDoneButton,\n [classes.toolbarTop]: toolbarOpts.position === 'top',\n [classes.toolbarRight]: toolbarOpts.alignment === 'right',\n [classes.focused]: toolbarOpts.alwaysVisible || isFocused,\n [classes.autoWidth]: autoWidth,\n [classes.fullWidth]: !autoWidth\n });\n\n return (\n <div className={names} style={extraStyles} onClick={this.onClick} ref={toolbarRef}>\n {CustomToolbar ? (\n <CustomToolbar\n node={node}\n value={value}\n onToolbarDone={this.onToolbarDone}\n onDataChange={handleDataChange}\n pluginProps={pluginProps}\n />\n ) : (\n <DefaultToolbar\n plugins={filteredPlugins}\n pluginProps={pluginProps}\n value={value}\n onChange={onChange}\n showDone={defaultToolbarShowDone}\n onDone={handleDone}\n deletable={deletable}\n />\n )}\n\n <div className={classes.shared}>\n {deletable && (\n <IconButton\n aria-label=\"Delete\"\n className={classes.iconRoot}\n onMouseDown={e => this.onDeleteMouseDown(e, plugin, node, value, onChange)}\n classes={{\n root: classes.iconRoot\n }}\n >\n <Delete />\n </IconButton>\n )}\n {customToolbarShowDone && <DoneButton onClick={handleDone} />}\n </div>\n </div>\n );\n }\n}\n\nconst style = {\n toolbar: {\n position: 'absolute',\n zIndex: 10,\n cursor: 'pointer',\n justifyContent: 'space-between',\n background: 'var(--editable-html-toolbar-bg, #efefef)',\n minWidth: '280px',\n margin: '5px 0 0 0',\n padding: '2px',\n boxShadow:\n '0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)',\n boxSizing: 'border-box',\n display: 'none'\n },\n toolbarWithNoDone: {\n minWidth: '265px'\n },\n toolbarTop: {\n top: '-45px'\n },\n toolbarRight: {\n right: 0\n },\n fullWidth: {\n width: '100%'\n },\n autoWidth: {\n width: 'auto'\n },\n focused: {\n display: 'flex'\n },\n iconRoot: {\n width: '28px',\n height: '28px',\n padding: '4px',\n verticalAlign: 'top'\n },\n label: {\n color: 'var(--editable-html-toolbar-check, #00bb00)'\n },\n shared: {\n display: 'flex'\n }\n};\nexport default withStyles(style, { index: 1000 })(Toolbar);\n"],"file":"toolbar.js"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.hasNode = exports.hasMark = exports.hasBlock = exports.findSingleNode = exports.findParentNode = void 0;
|
|
7
|
+
|
|
8
|
+
var findSingleNode = function findSingleNode(value) {
|
|
9
|
+
if (!value || !value.isCollapsed || !value.startKey) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
var inline = value.document.getClosestInline(value.startKey);
|
|
14
|
+
|
|
15
|
+
if (inline) {
|
|
16
|
+
return inline;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
var block = value.document.getClosestBlock(value.startKey);
|
|
20
|
+
|
|
21
|
+
if (block) {
|
|
22
|
+
return block;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
exports.findSingleNode = findSingleNode;
|
|
27
|
+
|
|
28
|
+
var findParentNode = function findParentNode(value, node) {
|
|
29
|
+
if (!value || !node) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return value.document.getParent(node.key);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.findParentNode = findParentNode;
|
|
37
|
+
|
|
38
|
+
var hasMark = function hasMark(value, type) {
|
|
39
|
+
return value && value.marks.some(function (mark) {
|
|
40
|
+
return mark.type == type;
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
exports.hasMark = hasMark;
|
|
45
|
+
|
|
46
|
+
var hasBlock = function hasBlock(value, type) {
|
|
47
|
+
return value && value.blocks.some(function (node) {
|
|
48
|
+
return node.type == type;
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.hasBlock = hasBlock;
|
|
53
|
+
|
|
54
|
+
var hasNode = function hasNode(_ref, type) {
|
|
55
|
+
var document = _ref.document;
|
|
56
|
+
return document && document.nodes.some(function (node) {
|
|
57
|
+
return node.type == type;
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
exports.hasNode = hasNode;
|
|
62
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/plugins/utils.js"],"names":["findSingleNode","value","isCollapsed","startKey","inline","document","getClosestInline","block","getClosestBlock","findParentNode","node","getParent","key","hasMark","type","marks","some","mark","hasBlock","blocks","hasNode","nodes"],"mappings":";;;;;;;AAAO,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CAAAC,KAAK,EAAI;AACrC,MAAI,CAACA,KAAD,IAAU,CAACA,KAAK,CAACC,WAAjB,IAAgC,CAACD,KAAK,CAACE,QAA3C,EAAqD;AACnD;AACD;;AAED,MAAMC,MAAM,GAAGH,KAAK,CAACI,QAAN,CAAeC,gBAAf,CAAgCL,KAAK,CAACE,QAAtC,CAAf;;AAEA,MAAIC,MAAJ,EAAY;AACV,WAAOA,MAAP;AACD;;AAED,MAAMG,KAAK,GAAGN,KAAK,CAACI,QAAN,CAAeG,eAAf,CAA+BP,KAAK,CAACE,QAArC,CAAd;;AAEA,MAAII,KAAJ,EAAW;AACT,WAAOA,KAAP;AACD;AACF,CAhBM;;;;AAkBA,IAAME,cAAc,GAAG,SAAjBA,cAAiB,CAACR,KAAD,EAAQS,IAAR,EAAiB;AAC7C,MAAI,CAACT,KAAD,IAAU,CAACS,IAAf,EAAqB;AACnB;AACD;;AAED,SAAOT,KAAK,CAACI,QAAN,CAAeM,SAAf,CAAyBD,IAAI,CAACE,GAA9B,CAAP;AACD,CANM;;;;AAQA,IAAMC,OAAO,GAAG,SAAVA,OAAU,CAACZ,KAAD,EAAQa,IAAR;AAAA,SAAiBb,KAAK,IAAIA,KAAK,CAACc,KAAN,CAAYC,IAAZ,CAAiB,UAAAC,IAAI;AAAA,WAAIA,IAAI,CAACH,IAAL,IAAaA,IAAjB;AAAA,GAArB,CAA1B;AAAA,CAAhB;;;;AAEA,IAAMI,QAAQ,GAAG,SAAXA,QAAW,CAACjB,KAAD,EAAQa,IAAR;AAAA,SAAiBb,KAAK,IAAIA,KAAK,CAACkB,MAAN,CAAaH,IAAb,CAAkB,UAAAN,IAAI;AAAA,WAAIA,IAAI,CAACI,IAAL,IAAaA,IAAjB;AAAA,GAAtB,CAA1B;AAAA,CAAjB;;;;AAEA,IAAMM,OAAO,GAAG,SAAVA,OAAU,OAAeN,IAAf;AAAA,MAAGT,QAAH,QAAGA,QAAH;AAAA,SACrBA,QAAQ,IAAIA,QAAQ,CAACgB,KAAT,CAAeL,IAAf,CAAoB,UAAAN,IAAI;AAAA,WAAIA,IAAI,CAACI,IAAL,IAAaA,IAAjB;AAAA,GAAxB,CADS;AAAA,CAAhB","sourcesContent":["export const findSingleNode = value => {\n if (!value || !value.isCollapsed || !value.startKey) {\n return;\n }\n\n const inline = value.document.getClosestInline(value.startKey);\n\n if (inline) {\n return inline;\n }\n\n const block = value.document.getClosestBlock(value.startKey);\n\n if (block) {\n return block;\n }\n};\n\nexport const findParentNode = (value, node) => {\n if (!value || !node) {\n return;\n }\n\n return value.document.getParent(node.key);\n};\n\nexport const hasMark = (value, type) => value && value.marks.some(mark => mark.type == type);\n\nexport const hasBlock = (value, type) => value && value.blocks.some(node => node.type == type);\n\nexport const hasNode = ({ document }, type) =>\n document && document.nodes.some(node => node.type == type);\n"],"file":"utils.js"}
|
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.valueToHtml = exports.reactAttributes = exports.parseStyleString = exports.htmlToValue = exports.TEXT_RULE = 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
|
+
addUnits: false
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
exports.reactAttributes = reactAttributes;
|
|
90
|
+
|
|
91
|
+
var attributesToMap = function attributesToMap(el) {
|
|
92
|
+
return function (acc, attribute) {
|
|
93
|
+
var value = el.getAttribute(attribute);
|
|
94
|
+
|
|
95
|
+
if (value) {
|
|
96
|
+
if (attribute === 'style') {
|
|
97
|
+
var styleString = el.getAttribute(attribute);
|
|
98
|
+
var reactStyleObject = reactAttributes(parseStyleString(styleString));
|
|
99
|
+
acc['style'] = reactStyleObject;
|
|
100
|
+
} else {
|
|
101
|
+
acc[attribute] = el.getAttribute(attribute);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return acc;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
var attributes = ['border', 'cellpadding', 'cellspacing', 'class', 'style'];
|
|
110
|
+
/**
|
|
111
|
+
* Serializer rules.
|
|
112
|
+
*
|
|
113
|
+
* @type {Array}
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
var blocks = {
|
|
117
|
+
deserialize: function deserialize(el, next) {
|
|
118
|
+
log('[blocks:deserialize] block: ', el);
|
|
119
|
+
var block = BLOCK_TAGS[el.tagName.toLowerCase()];
|
|
120
|
+
if (!block) return;
|
|
121
|
+
log('[blocks:deserialize] block: ', block);
|
|
122
|
+
|
|
123
|
+
if (el.childNodes.length === 1) {
|
|
124
|
+
var cn = el.childNodes[0];
|
|
125
|
+
|
|
126
|
+
if (cn && cn.tagName && cn.tagName.toLowerCase() === block) {
|
|
127
|
+
log('[we have a child node of the same]...');
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return {
|
|
133
|
+
object: 'block',
|
|
134
|
+
type: block,
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Here for rendering styles for all block elements
|
|
138
|
+
*/
|
|
139
|
+
data: {
|
|
140
|
+
attributes: attributes.reduce(attributesToMap(el), {})
|
|
141
|
+
},
|
|
142
|
+
nodes: next(el.childNodes)
|
|
143
|
+
};
|
|
144
|
+
},
|
|
145
|
+
serialize: function serialize(object, children) {
|
|
146
|
+
if (object.object !== 'block') return;
|
|
147
|
+
var jsonData = object.data.toJSON();
|
|
148
|
+
log('[blocks:serialize] object: ', object, children);
|
|
149
|
+
var key;
|
|
150
|
+
|
|
151
|
+
for (key in BLOCK_TAGS) {
|
|
152
|
+
if (BLOCK_TAGS[key] === object.type) {
|
|
153
|
+
var Tag = key;
|
|
154
|
+
return /*#__PURE__*/_react["default"].createElement(Tag, jsonData.attributes, children);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
var marks = {
|
|
160
|
+
deserialize: function deserialize(el, next) {
|
|
161
|
+
var mark = MARK_TAGS[el.tagName.toLowerCase()];
|
|
162
|
+
if (!mark) return;
|
|
163
|
+
log('[deserialize] mark: ', mark);
|
|
164
|
+
return {
|
|
165
|
+
object: 'mark',
|
|
166
|
+
type: mark,
|
|
167
|
+
nodes: next(el.childNodes)
|
|
168
|
+
};
|
|
169
|
+
},
|
|
170
|
+
serialize: function serialize(object, children) {
|
|
171
|
+
if (_slate.Mark.isMark(object)) {
|
|
172
|
+
for (var key in MARK_TAGS) {
|
|
173
|
+
if (MARK_TAGS[key] === object.type) {
|
|
174
|
+
var Tag = key;
|
|
175
|
+
return /*#__PURE__*/_react["default"].createElement(Tag, null, children);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
var findPreviousText = function findPreviousText(el) {
|
|
183
|
+
if (el.nodeName === '#text') {
|
|
184
|
+
return el;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (el.previousSibling) {
|
|
188
|
+
return findPreviousText(el.previousSibling);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return null;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
var TEXT_RULE = {
|
|
195
|
+
deserialize: function deserialize(el) {
|
|
196
|
+
/**
|
|
197
|
+
* This needs to be called on the dom element in order to merge the adjacent text nodes together
|
|
198
|
+
* */
|
|
199
|
+
el.normalize();
|
|
200
|
+
|
|
201
|
+
if (el.tagName && el.tagName.toLowerCase() === 'br') {
|
|
202
|
+
return {
|
|
203
|
+
object: 'text',
|
|
204
|
+
leaves: [{
|
|
205
|
+
object: 'leaf',
|
|
206
|
+
text: '\n'
|
|
207
|
+
}]
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (el.nodeName === '#text') {
|
|
212
|
+
if (el.nodeValue && el.nodeValue.match(/<!--.*?-->/)) return;
|
|
213
|
+
log('[text:deserialize] return text object..');
|
|
214
|
+
return {
|
|
215
|
+
object: 'text',
|
|
216
|
+
leaves: [{
|
|
217
|
+
object: 'leaf',
|
|
218
|
+
text: el.nodeValue
|
|
219
|
+
}]
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
serialize: function serialize(obj, children) {
|
|
224
|
+
if (obj.object === 'string') {
|
|
225
|
+
return children.split('\n').reduce(function (array, text, i) {
|
|
226
|
+
if (i !== 0) array.push( /*#__PURE__*/_react["default"].createElement("br", null));
|
|
227
|
+
array.push(text);
|
|
228
|
+
return array;
|
|
229
|
+
}, []);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
exports.TEXT_RULE = TEXT_RULE;
|
|
234
|
+
var RULES = [_list.serialization, _math.serialization, _media.serialization, _image.serialization, _table.serialization, _respArea.serialization, TEXT_RULE, blocks, marks];
|
|
235
|
+
|
|
236
|
+
function allWhitespace(node) {
|
|
237
|
+
// Use ECMA-262 Edition 3 String and RegExp features
|
|
238
|
+
return !/[^\t\n\r ]/.test(node.textContent);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function defaultParseHtml(html) {
|
|
242
|
+
if (typeof DOMParser === 'undefined') {
|
|
243
|
+
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.');
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
var parsed = new DOMParser().parseFromString(html, 'text/html');
|
|
247
|
+
var body = parsed.body;
|
|
248
|
+
var textNodes = document.createTreeWalker(body, NodeFilter.SHOW_TEXT, null, null);
|
|
249
|
+
var n = textNodes.nextNode();
|
|
250
|
+
|
|
251
|
+
while (n) {
|
|
252
|
+
if (allWhitespace(n) || n.nodeValue === "\u200B") {
|
|
253
|
+
n.parentNode.removeChild(n);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
n = textNodes.nextNode();
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
return body;
|
|
260
|
+
}
|
|
261
|
+
/** If this lib is used on the server side, we need to bypass using the DOMParser - just put in a stub. */
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
var parseHtml = typeof window === 'undefined' ? function () {
|
|
265
|
+
return {
|
|
266
|
+
childNodes: []
|
|
267
|
+
};
|
|
268
|
+
} : defaultParseHtml;
|
|
269
|
+
var serializer = new _slateHtmlSerializer["default"]({
|
|
270
|
+
defaultBlock: 'div',
|
|
271
|
+
rules: RULES,
|
|
272
|
+
parseHtml: parseHtml
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
var _extends = Object.assign || function (target) {
|
|
276
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
277
|
+
var source = arguments[i];
|
|
278
|
+
|
|
279
|
+
for (var key in source) {
|
|
280
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
281
|
+
target[key] = source[key];
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return target;
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* This is needed in order to override the function that eventually leads
|
|
290
|
+
* to the max iteration of 12, which in most cases it's not enough. The newer versions
|
|
291
|
+
* have a different way to calculate this, but updating to a newer version of slate
|
|
292
|
+
* requires a lot of work fixing other issues. So we just increase the rules by 1000,
|
|
293
|
+
* which means a lot of iterations.
|
|
294
|
+
* Below is the code that calculates the max iterations.
|
|
295
|
+
* var max = schema.stack.plugins.length + schema.rules.length + 1;
|
|
296
|
+
*/
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
serializer.deserialize = function deserialize(html) {
|
|
300
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
301
|
+
var _options$toJSON = options.toJSON;
|
|
302
|
+
var toJSON = _options$toJSON === undefined ? false : _options$toJSON;
|
|
303
|
+
var defaultBlock = this.defaultBlock;
|
|
304
|
+
var parseHtml = this.parseHtml;
|
|
305
|
+
var fragment = parseHtml(html);
|
|
306
|
+
var children = Array.from(fragment.childNodes);
|
|
307
|
+
var nodes = this.deserializeElements(children); // COMPAT: ensure that all top-level inline nodes are wrapped into a block.
|
|
308
|
+
|
|
309
|
+
nodes = nodes.reduce(function (memo, node, i, original) {
|
|
310
|
+
if (node.object === 'block') {
|
|
311
|
+
memo.push(node);
|
|
312
|
+
return memo;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
if (i > 0 && original[i - 1].object !== 'block') {
|
|
316
|
+
var _block = memo[memo.length - 1];
|
|
317
|
+
|
|
318
|
+
_block.nodes.push(node);
|
|
319
|
+
|
|
320
|
+
return memo;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
var block = _extends({
|
|
324
|
+
object: 'block',
|
|
325
|
+
data: {},
|
|
326
|
+
isVoid: false
|
|
327
|
+
}, defaultBlock, {
|
|
328
|
+
nodes: [node]
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
memo.push(block);
|
|
332
|
+
return memo;
|
|
333
|
+
}, []);
|
|
334
|
+
|
|
335
|
+
if (nodes.length === 0) {
|
|
336
|
+
nodes = [_extends({
|
|
337
|
+
object: 'block',
|
|
338
|
+
data: {},
|
|
339
|
+
isVoid: false
|
|
340
|
+
}, defaultBlock, {
|
|
341
|
+
nodes: [{
|
|
342
|
+
object: 'text',
|
|
343
|
+
leaves: [{
|
|
344
|
+
object: 'leaf',
|
|
345
|
+
text: '',
|
|
346
|
+
marks: []
|
|
347
|
+
}]
|
|
348
|
+
}]
|
|
349
|
+
})];
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
var json = {
|
|
353
|
+
object: 'value',
|
|
354
|
+
document: {
|
|
355
|
+
object: 'document',
|
|
356
|
+
data: {},
|
|
357
|
+
nodes: nodes
|
|
358
|
+
},
|
|
359
|
+
schema: {
|
|
360
|
+
rules: []
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
var i;
|
|
364
|
+
|
|
365
|
+
for (i = 0; i < 3000; i++) {
|
|
366
|
+
json.schema.rules.push({
|
|
367
|
+
match: {
|
|
368
|
+
object: 'document'
|
|
369
|
+
},
|
|
370
|
+
nodes: [{
|
|
371
|
+
match: {
|
|
372
|
+
object: 'block'
|
|
373
|
+
}
|
|
374
|
+
}]
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
var ret = toJSON ? json : _slate.Value.fromJSON(json);
|
|
379
|
+
|
|
380
|
+
if (ret) {
|
|
381
|
+
return ret;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
return null;
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
var htmlToValue = function htmlToValue(html) {
|
|
388
|
+
try {
|
|
389
|
+
return serializer.deserialize(html);
|
|
390
|
+
} catch (e) {
|
|
391
|
+
console.log("Couldn't parse html: ", e);
|
|
392
|
+
return {};
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
exports.htmlToValue = htmlToValue;
|
|
397
|
+
|
|
398
|
+
var valueToHtml = function valueToHtml(value) {
|
|
399
|
+
return serializer.serialize(value);
|
|
400
|
+
};
|
|
401
|
+
/**
|
|
402
|
+
*
|
|
403
|
+
* <div><div>a</div></div> -> <div>a</div>
|
|
404
|
+
*
|
|
405
|
+
* <div><div>a</div><div>b</div></div> -> <div>a</div><div>b</div>
|
|
406
|
+
* <div><div>a</div>4444<div>b</div></div> -> <div>a</div>4444<div>b</div>
|
|
407
|
+
*/
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
exports.valueToHtml = valueToHtml;
|
|
411
|
+
//# sourceMappingURL=serialization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/serialization.jsx"],"names":["log","BLOCK_TAGS","div","span","p","blockquote","pre","h1","h2","h3","h4","h5","h6","MARK_TAGS","b","em","u","s","code","strong","parseStyleString","regex","match","result","exec","trim","reactAttributes","o","camelize","addUnits","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","e","console","valueToHtml"],"mappings":";;;;;;;AAAA;;AACA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,MAAIlC,CAAJ;;AAEA,OAAKA,CAAC,GAAG,CAAT,EAAYA,CAAC,GAAG,IAAhB,EAAsBA,CAAC,EAAvB,EAA2B;AACzBuD,IAAAA,IAAI,CAACC,MAAL,CAAYtB,KAAZ,CAAkBjC,IAAlB,CAAuB;AACrBrD,MAAAA,KAAK,EAAE;AAAE0B,QAAAA,MAAM,EAAE;AAAV,OADc;AAErBI,MAAAA,KAAK,EAAE,CAAC;AAAE9B,QAAAA,KAAK,EAAE;AAAE0B,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,EAAI;AACjC,MAAI;AACF,WAAOiB,UAAU,CAACjE,WAAX,CAAuBgD,IAAvB,CAAP;AACD,GAFD,CAEE,OAAO+C,CAAP,EAAU;AACVC,IAAAA,OAAO,CAACxI,GAAR,CAAY,uBAAZ,EAAqCuI,CAArC;AACA,WAAO,EAAP;AACD;AACF,CAPM;;;;AASA,IAAME,WAAW,GAAG,SAAdA,WAAc,CAAAvG,KAAK;AAAA,SAAIuE,UAAU,CAACpD,SAAX,CAAqBnB,KAArB,CAAJ;AAAA,CAAzB;AAEP;AACA;AACA;AACA;AACA;AACA;AACA","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, addUnits: false });\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 < 3000; 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 => {\n try {\n return serializer.deserialize(html);\n } catch (e) {\n console.log(\"Couldn't parse html: \", e);\n return {};\n }\n};\n\nexport const valueToHtml = value => serializer.serialize(value);\n\n/**\n *\n * <div><div>a</div></div> -> <div>a</div>\n *\n * <div><div>a</div><div>b</div></div> -> <div>a</div><div>b</div>\n * <div><div>a</div>4444<div>b</div></div> -> <div>a</div>4444<div>b</div>\n */\n"],"file":"serialization.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/theme.js"],"names":["primary"],"mappings":";;;;;;AAAO,IAAMA,OAAO,GAAG,SAAhB","sourcesContent":["export const primary = '#304ffe';\n"],"file":"theme.js"}
|