kritzel-stencil 0.0.157 → 0.0.159
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/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
- package/dist/cjs/default-text-tool.config-BySzvIox.js +31267 -0
- package/dist/cjs/default-text-tool.config-BySzvIox.js.map +1 -0
- package/dist/cjs/index-Cj__YTlG.js +1650 -0
- package/dist/cjs/index-Cj__YTlG.js.map +1 -0
- package/dist/cjs/index.cjs.js +1465 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/kritzel-brush-style.cjs.entry.js +32 -0
- package/dist/cjs/kritzel-brush-style.entry.cjs.js.map +1 -0
- package/dist/cjs/kritzel-color_22.cjs.entry.js +20957 -0
- package/dist/cjs/loader.cjs.js +14 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/stencil.cjs.js +26 -0
- package/dist/cjs/stencil.cjs.js.map +1 -0
- package/dist/collection/classes/core/core.class.js +470 -0
- package/dist/collection/classes/core/core.class.js.map +1 -0
- package/dist/collection/classes/core/reviver.class.js +71 -0
- package/dist/collection/classes/core/reviver.class.js.map +1 -0
- package/dist/collection/classes/core/store.class.js +72 -0
- package/dist/collection/classes/core/store.class.js.map +1 -0
- package/dist/collection/classes/core/viewport.class.js +190 -0
- package/dist/collection/classes/core/viewport.class.js.map +1 -0
- package/dist/collection/classes/core/workspace.class.js +41 -0
- package/dist/collection/classes/core/workspace.class.js.map +1 -0
- package/dist/collection/classes/handlers/base.handler.js +8 -0
- package/dist/collection/classes/handlers/base.handler.js.map +1 -0
- package/dist/collection/classes/handlers/context-menu.handler.js +62 -0
- package/dist/collection/classes/handlers/context-menu.handler.js.map +1 -0
- package/dist/collection/classes/handlers/hover.handler.js +19 -0
- package/dist/collection/classes/handlers/hover.handler.js.map +1 -0
- package/dist/collection/classes/handlers/key.handler.js +58 -0
- package/dist/collection/classes/handlers/key.handler.js.map +1 -0
- package/dist/collection/classes/handlers/move.handler.js +149 -0
- package/dist/collection/classes/handlers/move.handler.js.map +1 -0
- package/dist/collection/classes/handlers/resize.handler.js +184 -0
- package/dist/collection/classes/handlers/resize.handler.js.map +1 -0
- package/dist/collection/classes/handlers/rotation.handler.js +116 -0
- package/dist/collection/classes/handlers/rotation.handler.js.map +1 -0
- package/dist/collection/classes/handlers/selection.handler.js +246 -0
- package/dist/collection/classes/handlers/selection.handler.js.map +1 -0
- package/dist/collection/classes/objects/base-object.class.js +232 -0
- package/dist/collection/classes/objects/base-object.class.js.map +1 -0
- package/dist/collection/classes/objects/custom-element.class.js +62 -0
- package/dist/collection/classes/objects/custom-element.class.js.map +1 -0
- package/dist/collection/classes/objects/image.class.js +56 -0
- package/dist/collection/classes/objects/image.class.js.map +1 -0
- package/dist/collection/classes/objects/path.class.js +284 -0
- package/dist/collection/classes/objects/path.class.js.map +1 -0
- package/dist/collection/classes/objects/selection-box.class.js +19 -0
- package/dist/collection/classes/objects/selection-box.class.js.map +1 -0
- package/dist/collection/classes/objects/selection-group.class.js +226 -0
- package/dist/collection/classes/objects/selection-group.class.js.map +1 -0
- package/dist/collection/classes/objects/text.class.js +261 -0
- package/dist/collection/classes/objects/text.class.js.map +1 -0
- package/dist/collection/classes/providers/broadcast-sync-provider.class.js +93 -0
- package/dist/collection/classes/providers/broadcast-sync-provider.class.js.map +1 -0
- package/dist/collection/classes/providers/hocuspocus-sync-provider.class.js +232 -0
- package/dist/collection/classes/providers/hocuspocus-sync-provider.class.js.map +1 -0
- package/dist/collection/classes/providers/indexeddb-sync-provider.class.js +35 -0
- package/dist/collection/classes/providers/indexeddb-sync-provider.class.js.map +1 -0
- package/dist/collection/classes/providers/websocket-sync-provider.class.js +89 -0
- package/dist/collection/classes/providers/websocket-sync-provider.class.js.map +1 -0
- package/dist/{stencil/icon-registry.class-BtT8riKh.js → collection/classes/registries/icon-registry.class.js} +2 -6
- package/dist/collection/classes/registries/icon-registry.class.js.map +1 -0
- package/dist/collection/classes/registries/tool.registry.js +18 -0
- package/dist/collection/classes/registries/tool.registry.js.map +1 -0
- package/dist/collection/classes/structures/app-state-map.structure.js +189 -0
- package/dist/collection/classes/structures/app-state-map.structure.js.map +1 -0
- package/dist/collection/classes/structures/object-map.structure.js +328 -0
- package/dist/collection/classes/structures/object-map.structure.js.map +1 -0
- package/dist/collection/classes/structures/quadtree.structure.js +113 -0
- package/dist/collection/classes/structures/quadtree.structure.js.map +1 -0
- package/dist/collection/classes/tools/base-tool.class.js +38 -0
- package/dist/collection/classes/tools/base-tool.class.js.map +1 -0
- package/dist/collection/classes/tools/brush-tool.class.js +133 -0
- package/dist/collection/classes/tools/brush-tool.class.js.map +1 -0
- package/dist/collection/classes/tools/eraser-tool.class.js +85 -0
- package/dist/collection/classes/tools/eraser-tool.class.js.map +1 -0
- package/dist/collection/classes/tools/image-tool.class.js +83 -0
- package/dist/collection/classes/tools/image-tool.class.js.map +1 -0
- package/dist/collection/classes/tools/selection-tool.class.js +164 -0
- package/dist/collection/classes/tools/selection-tool.class.js.map +1 -0
- package/dist/collection/classes/tools/text-tool.class.js +108 -0
- package/dist/collection/classes/tools/text-tool.class.js.map +1 -0
- package/dist/collection/collection-manifest.json +34 -0
- package/dist/collection/components/core/kritzel-cursor-trail/kritzel-cursor-trail.css +10 -0
- package/dist/collection/components/core/kritzel-cursor-trail/kritzel-cursor-trail.js +153 -0
- package/dist/collection/components/core/kritzel-cursor-trail/kritzel-cursor-trail.js.map +1 -0
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.css +34 -0
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +928 -0
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js.map +1 -0
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.css +73 -0
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +1613 -0
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js.map +1 -0
- package/dist/collection/components/shared/kritzel-brush-style/kritzel-brush-style.css +44 -0
- package/dist/collection/components/shared/kritzel-brush-style/kritzel-brush-style.js +98 -0
- package/dist/collection/components/shared/kritzel-brush-style/kritzel-brush-style.js.map +1 -0
- package/dist/collection/components/shared/kritzel-color/kritzel-color.css +21 -0
- package/dist/collection/components/shared/kritzel-color/kritzel-color.js +107 -0
- package/dist/collection/components/shared/kritzel-color/kritzel-color.js.map +1 -0
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.css +46 -0
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.js +145 -0
- package/dist/collection/components/shared/kritzel-color-palette/kritzel-color-palette.js.map +1 -0
- package/dist/collection/components/shared/kritzel-dropdown/kritzel-dropdown.css +53 -0
- package/dist/collection/components/shared/kritzel-dropdown/kritzel-dropdown.js +218 -0
- package/dist/collection/components/shared/kritzel-dropdown/kritzel-dropdown.js.map +1 -0
- package/dist/collection/components/shared/kritzel-font/kritzel-font.css +10 -0
- package/dist/collection/components/shared/kritzel-font/kritzel-font.js +90 -0
- package/dist/collection/components/shared/kritzel-font/kritzel-font.js.map +1 -0
- package/dist/collection/components/shared/kritzel-font-family/kritzel-font-family.css +48 -0
- package/dist/collection/components/shared/kritzel-font-family/kritzel-font-family.js +114 -0
- package/dist/collection/components/shared/kritzel-font-family/kritzel-font-family.js.map +1 -0
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.css +30 -0
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.js +110 -0
- package/dist/collection/components/shared/kritzel-font-size/kritzel-font-size.js.map +1 -0
- package/dist/collection/components/shared/kritzel-icon/kritzel-icon.css +18 -0
- package/dist/collection/components/shared/kritzel-icon/kritzel-icon.js +94 -0
- package/dist/collection/components/shared/kritzel-icon/kritzel-icon.js.map +1 -0
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.css +27 -0
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.js +291 -0
- package/dist/collection/components/shared/kritzel-menu/kritzel-menu.js.map +1 -0
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.css +145 -0
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.js +280 -0
- package/dist/collection/components/shared/kritzel-menu-item/kritzel-menu-item.js.map +1 -0
- package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js +310 -0
- package/dist/collection/components/shared/kritzel-portal/kritzel-portal.js.map +1 -0
- package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.css +78 -0
- package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.js +406 -0
- package/dist/collection/components/shared/kritzel-split-button/kritzel-split-button.js.map +1 -0
- package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.css +28 -0
- package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.js +89 -0
- package/dist/collection/components/shared/kritzel-stroke-size/kritzel-stroke-size.js.map +1 -0
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.css +17 -0
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js +251 -0
- package/dist/collection/components/shared/kritzel-tooltip/kritzel-tooltip.js.map +1 -0
- package/dist/collection/components/ui/kritzel-context-menu/kritzel-context-menu.css +55 -0
- package/dist/collection/components/ui/kritzel-context-menu/kritzel-context-menu.js +172 -0
- package/dist/collection/components/ui/kritzel-context-menu/kritzel-context-menu.js.map +1 -0
- package/dist/collection/components/ui/kritzel-control-brush-config/kritzel-control-brush-config.css +19 -0
- package/dist/collection/components/ui/kritzel-control-brush-config/kritzel-control-brush-config.js +135 -0
- package/dist/collection/components/ui/kritzel-control-brush-config/kritzel-control-brush-config.js.map +1 -0
- package/dist/collection/components/ui/kritzel-control-text-config/kritzel-control-text-config.css +19 -0
- package/dist/collection/components/ui/kritzel-control-text-config/kritzel-control-text-config.js +115 -0
- package/dist/collection/components/ui/kritzel-control-text-config/kritzel-control-text-config.js.map +1 -0
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.css +127 -0
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js +312 -0
- package/dist/collection/components/ui/kritzel-controls/kritzel-controls.js.map +1 -0
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.css +44 -0
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js +111 -0
- package/dist/collection/components/ui/kritzel-utility-panel/kritzel-utility-panel.js.map +1 -0
- package/dist/collection/components/ui/kritzel-workspace-manager/kritzel-workspace-manager.css +5 -0
- package/dist/collection/components/ui/kritzel-workspace-manager/kritzel-workspace-manager.js +255 -0
- package/dist/collection/components/ui/kritzel-workspace-manager/kritzel-workspace-manager.js.map +1 -0
- package/dist/collection/configs/default-brush-tool.config.js +60 -0
- package/dist/collection/configs/default-brush-tool.config.js.map +1 -0
- package/dist/collection/configs/default-engine-config.js +53 -0
- package/dist/collection/configs/default-engine-config.js.map +1 -0
- package/dist/collection/configs/default-sync.config.js +10 -0
- package/dist/collection/configs/default-sync.config.js.map +1 -0
- package/dist/collection/configs/default-text-tool.config.js +32 -0
- package/dist/collection/configs/default-text-tool.config.js.map +1 -0
- package/dist/collection/constants/core.constants.js +2 -0
- package/dist/collection/constants/core.constants.js.map +1 -0
- package/dist/collection/constants/engine.constants.js +3 -0
- package/dist/collection/constants/engine.constants.js.map +1 -0
- package/dist/collection/enums/event-button.enum.js +7 -0
- package/dist/collection/enums/event-button.enum.js.map +1 -0
- package/dist/collection/enums/handle-type.enum.js +8 -0
- package/dist/collection/enums/handle-type.enum.js.map +1 -0
- package/dist/collection/helpers/class.helper.js +6 -0
- package/dist/collection/helpers/class.helper.js.map +1 -0
- package/dist/collection/helpers/devices.helper.js +26 -0
- package/dist/collection/helpers/devices.helper.js.map +1 -0
- package/dist/collection/helpers/event.helper.js +51 -0
- package/dist/collection/helpers/event.helper.js.map +1 -0
- package/dist/collection/helpers/geometry.helper.js +53 -0
- package/dist/collection/helpers/geometry.helper.js.map +1 -0
- package/dist/collection/helpers/html.helper.js +64 -0
- package/dist/{stencil/html.helper-C6qB08BS.js.map → collection/helpers/html.helper.js.map} +1 -1
- package/dist/collection/helpers/keyboard.helper.js +49 -0
- package/dist/collection/helpers/keyboard.helper.js.map +1 -0
- package/dist/collection/helpers/math.helper.js +6 -0
- package/dist/collection/helpers/math.helper.js.map +1 -0
- package/dist/collection/helpers/object.helper.js +12 -0
- package/dist/collection/helpers/object.helper.js.map +1 -0
- package/dist/collection/index.js +30 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/interfaces/bounding-box.interface.js +2 -0
- package/dist/collection/interfaces/bounding-box.interface.js.map +1 -0
- package/dist/collection/interfaces/clonable.interface.js +2 -0
- package/dist/collection/interfaces/clonable.interface.js.map +1 -0
- package/dist/collection/interfaces/context-menu-item.interface.js +2 -0
- package/dist/collection/interfaces/context-menu-item.interface.js.map +1 -0
- package/dist/collection/interfaces/debug-info.interface.js +2 -0
- package/dist/collection/interfaces/debug-info.interface.js.map +1 -0
- package/dist/collection/interfaces/engine-state.interface.js +2 -0
- package/dist/collection/interfaces/engine-state.interface.js.map +1 -0
- package/dist/collection/interfaces/menu-item.interface.js +2 -0
- package/dist/collection/interfaces/menu-item.interface.js.map +1 -0
- package/dist/collection/interfaces/object.interface.js +2 -0
- package/dist/collection/interfaces/object.interface.js.map +1 -0
- package/dist/collection/interfaces/path-options.interface.js +2 -0
- package/dist/collection/interfaces/path-options.interface.js.map +1 -0
- package/dist/collection/interfaces/point.interface.js +2 -0
- package/dist/collection/interfaces/point.interface.js.map +1 -0
- package/dist/collection/interfaces/polygon.interface.js +2 -0
- package/dist/collection/interfaces/polygon.interface.js.map +1 -0
- package/dist/collection/interfaces/selection-state.interface.js +2 -0
- package/dist/collection/interfaces/selection-state.interface.js.map +1 -0
- package/dist/collection/interfaces/serializable.interface.js +2 -0
- package/dist/collection/interfaces/serializable.interface.js.map +1 -0
- package/dist/collection/interfaces/shortcut.interface.js +2 -0
- package/dist/collection/interfaces/shortcut.interface.js.map +1 -0
- package/dist/collection/interfaces/sync-config.interface.js +2 -0
- package/dist/collection/interfaces/sync-config.interface.js.map +1 -0
- package/dist/collection/interfaces/sync-provider.interface.js +2 -0
- package/dist/collection/interfaces/sync-provider.interface.js.map +1 -0
- package/dist/collection/interfaces/tool.interface.js +2 -0
- package/dist/collection/interfaces/tool.interface.js.map +1 -0
- package/dist/collection/interfaces/toolbar-control.interface.js +2 -0
- package/dist/collection/interfaces/toolbar-control.interface.js.map +1 -0
- package/dist/collection/interfaces/undo-state.interface.js +2 -0
- package/dist/collection/interfaces/undo-state.interface.js.map +1 -0
- package/dist/collection/types/deep-readonly.type.js +2 -0
- package/dist/collection/types/deep-readonly.type.js.map +1 -0
- package/dist/collection/types/state.types.js +2 -0
- package/dist/collection/types/state.types.js.map +1 -0
- package/dist/components/index.js +1477 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/kritzel-brush-style.js +67 -0
- package/dist/components/kritzel-brush-style.js.map +1 -0
- package/dist/components/kritzel-color-palette.js +9 -0
- package/dist/components/kritzel-color-palette.js.map +1 -0
- package/dist/components/kritzel-color.js +9 -0
- package/dist/components/kritzel-color.js.map +1 -0
- package/dist/components/kritzel-context-menu.js +9 -0
- package/dist/components/kritzel-context-menu.js.map +1 -0
- package/dist/components/kritzel-control-brush-config.js +9 -0
- package/dist/components/kritzel-control-brush-config.js.map +1 -0
- package/dist/components/kritzel-control-text-config.js +9 -0
- package/dist/components/kritzel-control-text-config.js.map +1 -0
- package/dist/components/kritzel-controls.js +9 -0
- package/dist/components/kritzel-controls.js.map +1 -0
- package/dist/components/kritzel-cursor-trail.js +9 -0
- package/dist/components/kritzel-cursor-trail.js.map +1 -0
- package/dist/components/kritzel-dropdown.js +9 -0
- package/dist/components/kritzel-dropdown.js.map +1 -0
- package/dist/components/kritzel-editor.js +516 -0
- package/dist/components/kritzel-editor.js.map +1 -0
- package/dist/components/kritzel-engine.js +9 -0
- package/dist/components/kritzel-engine.js.map +1 -0
- package/dist/components/kritzel-font-family.js +9 -0
- package/dist/components/kritzel-font-family.js.map +1 -0
- package/dist/components/kritzel-font-size.js +9 -0
- package/dist/components/kritzel-font-size.js.map +1 -0
- package/dist/components/kritzel-font.js +9 -0
- package/dist/components/kritzel-font.js.map +1 -0
- package/dist/components/kritzel-icon.js +9 -0
- package/dist/components/kritzel-icon.js.map +1 -0
- package/dist/components/kritzel-menu-item.js +9 -0
- package/dist/components/kritzel-menu-item.js.map +1 -0
- package/dist/components/kritzel-menu.js +9 -0
- package/dist/components/kritzel-menu.js.map +1 -0
- package/dist/components/kritzel-portal.js +9 -0
- package/dist/components/kritzel-portal.js.map +1 -0
- package/dist/components/kritzel-split-button.js +9 -0
- package/dist/components/kritzel-split-button.js.map +1 -0
- package/dist/components/kritzel-stroke-size.js +9 -0
- package/dist/components/kritzel-stroke-size.js.map +1 -0
- package/dist/components/kritzel-tooltip.js +9 -0
- package/dist/components/kritzel-tooltip.js.map +1 -0
- package/dist/components/kritzel-utility-panel.js +9 -0
- package/dist/components/kritzel-utility-panel.js.map +1 -0
- package/dist/components/kritzel-workspace-manager.js +9 -0
- package/dist/components/kritzel-workspace-manager.js.map +1 -0
- package/dist/{stencil/kritzel-controls.entry.js → components/p-1lIHoOlH.js} +115 -17
- package/dist/components/p-1lIHoOlH.js.map +1 -0
- package/dist/{stencil/object.helper-B0kd2rUI.js → components/p-B0kd2rUI.js} +2 -2
- package/dist/components/p-B0kd2rUI.js.map +1 -0
- package/dist/components/p-B4kxkVe-.js +55 -0
- package/dist/components/p-B4kxkVe-.js.map +1 -0
- package/dist/components/p-BAplhrRJ.js +35593 -0
- package/dist/components/p-BAplhrRJ.js.map +1 -0
- package/dist/components/p-BQg4YML7.js +106 -0
- package/dist/components/p-BQg4YML7.js.map +1 -0
- package/dist/{stencil/kritzel-font-family.entry.js → components/p-BgznZoBH.js} +37 -9
- package/dist/components/p-BgznZoBH.js.map +1 -0
- package/dist/components/p-Bhtn9qay.js +98 -0
- package/dist/components/p-Bhtn9qay.js.map +1 -0
- package/dist/{stencil/kritzel-context-menu-GdU9xEKC.js → components/p-C2sWlNsJ.js} +41 -12
- package/dist/components/p-C2sWlNsJ.js.map +1 -0
- package/dist/{stencil/html.helper-C6qB08BS.js → components/p-C6qB08BS.js} +2 -2
- package/dist/components/p-C6qB08BS.js.map +1 -0
- package/dist/{stencil/text-tool.class-C0GbC5zQ.js → components/p-CBYBurdY.js} +25 -729
- package/dist/components/p-CBYBurdY.js.map +1 -0
- package/dist/{stencil/kritzel-dropdown.entry.js → components/p-CIXPLjCu.js} +39 -9
- package/dist/components/p-CIXPLjCu.js.map +1 -0
- package/dist/{stencil/kritzel-workspace-manager.entry.js → components/p-CK6no3mi.js} +68 -13
- package/dist/components/p-CK6no3mi.js.map +1 -0
- package/dist/{stencil/kritzel-cursor-trail.entry.js → components/p-CLt3HMl6.js} +33 -10
- package/dist/components/p-CLt3HMl6.js.map +1 -0
- package/dist/{stencil/kritzel-tooltip.entry.js → components/p-CTP479Lf.js} +39 -11
- package/dist/components/p-CTP479Lf.js.map +1 -0
- package/dist/{stencil/kritzel-menu-item.entry.js → components/p-CsA9M6me.js} +174 -16
- package/dist/components/p-CsA9M6me.js.map +1 -0
- package/dist/components/p-CwkUrTy1.js +1367 -0
- package/dist/components/p-CwkUrTy1.js.map +1 -0
- package/dist/{stencil/kritzel-color-palette.entry.js → components/p-D1uj4A4F.js} +39 -9
- package/dist/components/p-D1uj4A4F.js.map +1 -0
- package/dist/{stencil/kritzel-color.entry.js → components/p-D4yvhd1d.js} +30 -8
- package/dist/components/p-D4yvhd1d.js.map +1 -0
- package/dist/{stencil/kritzel-portal.entry.js → components/p-D5Wq4x4r.js} +37 -11
- package/dist/components/p-D5Wq4x4r.js.map +1 -0
- package/dist/{stencil/event-button.enum-D8W6LE-c.js → components/p-D8W6LE-c.js} +2 -2
- package/dist/components/p-D8W6LE-c.js.map +1 -0
- package/dist/{stencil/kritzel-utility-panel.entry.js → components/p-DAfkuR8U.js} +38 -11
- package/dist/components/p-DAfkuR8U.js.map +1 -0
- package/dist/components/p-DDmSxM5f.js +57 -0
- package/dist/{stencil/kritzel-font-size.entry.esm.js.map → components/p-DDmSxM5f.js.map} +1 -1
- package/dist/components/p-Ddh40W3x.js +103 -0
- package/dist/components/p-Ddh40W3x.js.map +1 -0
- package/dist/{stencil/kritzel-split-button.entry.js → components/p-TdCTkEu0.js} +72 -18
- package/dist/components/p-TdCTkEu0.js.map +1 -0
- package/dist/{stencil/devices.helper-l10It7Nm.js → components/p-l10It7Nm.js} +2 -2
- package/dist/components/p-l10It7Nm.js.map +1 -0
- package/dist/{stencil/workspace.class-n789Y3S-.js → components/p-n789Y3S-.js} +2 -2
- package/dist/components/p-n789Y3S-.js.map +1 -0
- package/dist/components/p-uuRJU2R1.js +46 -0
- package/dist/components/p-uuRJU2R1.js.map +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +6 -0
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
- package/dist/esm/default-text-tool.config-2YFQA3SF.js +31208 -0
- package/dist/esm/default-text-tool.config-2YFQA3SF.js.map +1 -0
- package/dist/esm/index-SGde3HXB.js +1623 -0
- package/dist/esm/index-SGde3HXB.js.map +1 -0
- package/dist/esm/index.js +1449 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/{stencil → esm}/kritzel-brush-style.entry.js +3 -3
- package/dist/esm/kritzel-brush-style.entry.js.map +1 -0
- package/dist/{stencil/kritzel-engine.entry.js → esm/kritzel-color_22.entry.js} +1806 -90
- package/dist/esm/loader.js +12 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/stencil.js +22 -0
- package/dist/esm/stencil.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil/index.esm.js +2 -18
- package/dist/stencil/index.esm.js.map +1 -1
- package/dist/stencil/loader.esm.js.map +1 -1
- package/dist/stencil/p-2YFQA3SF.js +2 -0
- package/dist/stencil/p-2YFQA3SF.js.map +1 -0
- package/dist/stencil/p-2e85a4af.entry.js +10 -0
- package/dist/stencil/p-2e85a4af.entry.js.map +1 -0
- package/dist/stencil/p-DQuL1Twl.js +2 -0
- package/dist/stencil/p-DQuL1Twl.js.map +1 -0
- package/dist/stencil/p-SGde3HXB.js +3 -0
- package/dist/stencil/p-SGde3HXB.js.map +1 -0
- package/dist/stencil/p-d702c5af.entry.js +2 -0
- package/dist/stencil/p-d702c5af.entry.js.map +1 -0
- package/dist/stencil/stencil.esm.js +2 -48
- package/dist/stencil/stencil.esm.js.map +1 -1
- package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +0 -1
- package/package.json +1 -1
- package/dist/stencil/default-text-tool.config-DKpRP4XR.js +0 -1441
- package/dist/stencil/default-text-tool.config-DKpRP4XR.js.map +0 -1
- package/dist/stencil/devices.helper-l10It7Nm.js.map +0 -1
- package/dist/stencil/engine.constants-DsjjAmnl.js +0 -7
- package/dist/stencil/engine.constants-DsjjAmnl.js.map +0 -1
- package/dist/stencil/event-button.enum-D8W6LE-c.js.map +0 -1
- package/dist/stencil/icon-registry.class-BtT8riKh.js.map +0 -1
- package/dist/stencil/index-DniO_INI.js +0 -4395
- package/dist/stencil/index-DniO_INI.js.map +0 -1
- package/dist/stencil/kritzel-color-palette.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-color.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-context-menu-BYgOEy-i.js +0 -66
- package/dist/stencil/kritzel-context-menu-BYgOEy-i.js.map +0 -1
- package/dist/stencil/kritzel-context-menu-GdU9xEKC.js.map +0 -1
- package/dist/stencil/kritzel-context-menu.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-context-menu.entry.js +0 -3
- package/dist/stencil/kritzel-control-brush-config.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-control-brush-config.entry.js +0 -54
- package/dist/stencil/kritzel-control-text-config.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-control-text-config.entry.js +0 -42
- package/dist/stencil/kritzel-controls.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-cursor-trail.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-dropdown.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-editor.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-editor.entry.js +0 -248
- package/dist/stencil/kritzel-engine.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-font-family.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-font-size.entry.js +0 -28
- package/dist/stencil/kritzel-font.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-font.entry.js +0 -23
- package/dist/stencil/kritzel-icon.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-icon.entry.js +0 -29
- package/dist/stencil/kritzel-menu-item.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-menu.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-menu.entry.js +0 -72
- package/dist/stencil/kritzel-portal.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-split-button.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-stroke-size.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-stroke-size.entry.js +0 -27
- package/dist/stencil/kritzel-tooltip.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-utility-panel.entry.esm.js.map +0 -1
- package/dist/stencil/kritzel-workspace-manager.entry.esm.js.map +0 -1
- package/dist/stencil/object.helper-B0kd2rUI.js.map +0 -1
- package/dist/stencil/sync-config.interface-lKfyG1EN.js +0 -19839
- package/dist/stencil/sync-config.interface-lKfyG1EN.js.map +0 -1
- package/dist/stencil/text-tool.class-C0GbC5zQ.js.map +0 -1
- package/dist/stencil/workspace.class-n789Y3S-.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as ObjectHelper } from './
|
|
2
|
-
import { K as KritzelDevicesHelper } from './
|
|
3
|
-
import { K as KritzelMouseButton } from './
|
|
1
|
+
import { O as ObjectHelper } from './p-B0kd2rUI.js';
|
|
2
|
+
import { K as KritzelDevicesHelper } from './p-l10It7Nm.js';
|
|
3
|
+
import { K as KritzelMouseButton } from './p-D8W6LE-c.js';
|
|
4
4
|
|
|
5
5
|
class KritzelToolRegistry {
|
|
6
6
|
static registry = {};
|
|
@@ -214,7 +214,6 @@ class KritzelBaseObject {
|
|
|
214
214
|
const viewportBounds = {
|
|
215
215
|
x: -this._core.store.state.translateX / this._core.store.state.scale,
|
|
216
216
|
y: -this._core.store.state.translateY / this._core.store.state.scale,
|
|
217
|
-
z: this._core.store.state.scale,
|
|
218
217
|
width: this._core.store.state.viewportWidth / this._core.store.state.scale,
|
|
219
218
|
height: this._core.store.state.viewportHeight / this._core.store.state.scale,
|
|
220
219
|
};
|
|
@@ -2726,7 +2725,7 @@ let NodeType$1 = class NodeType {
|
|
|
2726
2725
|
@internal
|
|
2727
2726
|
*/
|
|
2728
2727
|
checkAttrs(attrs) {
|
|
2729
|
-
checkAttrs(this.attrs, attrs, "node"
|
|
2728
|
+
checkAttrs(this.attrs, attrs, "node");
|
|
2730
2729
|
}
|
|
2731
2730
|
/**
|
|
2732
2731
|
Check whether the given mark type is allowed in this node.
|
|
@@ -2877,7 +2876,7 @@ class MarkType {
|
|
|
2877
2876
|
@internal
|
|
2878
2877
|
*/
|
|
2879
2878
|
checkAttrs(attrs) {
|
|
2880
|
-
checkAttrs(this.attrs, attrs, "mark"
|
|
2879
|
+
checkAttrs(this.attrs, attrs, "mark");
|
|
2881
2880
|
}
|
|
2882
2881
|
/**
|
|
2883
2882
|
Queries whether a given mark type is
|
|
@@ -3185,7 +3184,7 @@ function wsOptionsFor(type, preserveWhitespace, base) {
|
|
|
3185
3184
|
if (preserveWhitespace != null)
|
|
3186
3185
|
return (preserveWhitespace ? OPT_PRESERVE_WS : 0) |
|
|
3187
3186
|
(preserveWhitespace === "full" ? OPT_PRESERVE_WS_FULL : 0);
|
|
3188
|
-
return type && type.whitespace == "pre" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base &
|
|
3187
|
+
return type && type.whitespace == "pre" ? OPT_PRESERVE_WS | OPT_PRESERVE_WS_FULL : base & -5;
|
|
3189
3188
|
}
|
|
3190
3189
|
class NodeContext {
|
|
3191
3190
|
constructor(type, attrs, marks, solid, match, options) {
|
|
@@ -4945,7 +4944,7 @@ function liftTarget(range) {
|
|
|
4945
4944
|
}
|
|
4946
4945
|
return null;
|
|
4947
4946
|
}
|
|
4948
|
-
function lift
|
|
4947
|
+
function lift(tr, range, target) {
|
|
4949
4948
|
let { $from, $to, depth } = range;
|
|
4950
4949
|
let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
|
|
4951
4950
|
let start = gapStart, end = gapEnd;
|
|
@@ -4971,45 +4970,6 @@ function lift$1(tr, range, target) {
|
|
|
4971
4970
|
}
|
|
4972
4971
|
tr.step(new ReplaceAroundStep(start, end, gapStart, gapEnd, new Slice(before.append(after), openStart, openEnd), before.size - openStart, true));
|
|
4973
4972
|
}
|
|
4974
|
-
/**
|
|
4975
|
-
Try to find a valid way to wrap the content in the given range in a
|
|
4976
|
-
node of the given type. May introduce extra nodes around and inside
|
|
4977
|
-
the wrapper node, if necessary. Returns null if no valid wrapping
|
|
4978
|
-
could be found. When `innerRange` is given, that range's content is
|
|
4979
|
-
used as the content to fit into the wrapping, instead of the
|
|
4980
|
-
content of `range`.
|
|
4981
|
-
*/
|
|
4982
|
-
function findWrapping(range, nodeType, attrs = null, innerRange = range) {
|
|
4983
|
-
let around = findWrappingOutside(range, nodeType);
|
|
4984
|
-
let inner = around && findWrappingInside(innerRange, nodeType);
|
|
4985
|
-
if (!inner)
|
|
4986
|
-
return null;
|
|
4987
|
-
return around.map(withAttrs)
|
|
4988
|
-
.concat({ type: nodeType, attrs }).concat(inner.map(withAttrs));
|
|
4989
|
-
}
|
|
4990
|
-
function withAttrs(type) { return { type, attrs: null }; }
|
|
4991
|
-
function findWrappingOutside(range, type) {
|
|
4992
|
-
let { parent, startIndex, endIndex } = range;
|
|
4993
|
-
let around = parent.contentMatchAt(startIndex).findWrapping(type);
|
|
4994
|
-
if (!around)
|
|
4995
|
-
return null;
|
|
4996
|
-
let outer = around.length ? around[0] : type;
|
|
4997
|
-
return parent.canReplaceWith(startIndex, endIndex, outer) ? around : null;
|
|
4998
|
-
}
|
|
4999
|
-
function findWrappingInside(range, type) {
|
|
5000
|
-
let { parent, startIndex, endIndex } = range;
|
|
5001
|
-
let inner = parent.child(startIndex);
|
|
5002
|
-
let inside = type.contentMatch.findWrapping(inner.type);
|
|
5003
|
-
if (!inside)
|
|
5004
|
-
return null;
|
|
5005
|
-
let lastType = inside.length ? inside[inside.length - 1] : type;
|
|
5006
|
-
let innerMatch = lastType.contentMatch;
|
|
5007
|
-
for (let i = startIndex; innerMatch && i < endIndex; i++)
|
|
5008
|
-
innerMatch = innerMatch.matchType(parent.child(i).type);
|
|
5009
|
-
if (!innerMatch || !innerMatch.validEnd)
|
|
5010
|
-
return null;
|
|
5011
|
-
return inside;
|
|
5012
|
-
}
|
|
5013
4973
|
function wrap(tr, range, wrappers) {
|
|
5014
4974
|
let content = Fragment.empty;
|
|
5015
4975
|
for (let i = wrappers.length - 1; i >= 0; i--) {
|
|
@@ -5023,7 +4983,7 @@ function wrap(tr, range, wrappers) {
|
|
|
5023
4983
|
let start = range.start, end = range.end;
|
|
5024
4984
|
tr.step(new ReplaceAroundStep(start, end, start, end, new Slice(content, 0, 0), wrappers.length, true));
|
|
5025
4985
|
}
|
|
5026
|
-
function setBlockType
|
|
4986
|
+
function setBlockType(tr, from, to, type, attrs) {
|
|
5027
4987
|
if (!type.isTextblock)
|
|
5028
4988
|
throw new RangeError("Type given to setBlockType should be a textblock");
|
|
5029
4989
|
let mapFrom = tr.steps.length;
|
|
@@ -5155,36 +5115,6 @@ function canAppendWithSubstitutedLinebreaks(a, b) {
|
|
|
5155
5115
|
function joinable(a, b) {
|
|
5156
5116
|
return !!(a && b && !a.isLeaf && canAppendWithSubstitutedLinebreaks(a, b));
|
|
5157
5117
|
}
|
|
5158
|
-
/**
|
|
5159
|
-
Find an ancestor of the given position that can be joined to the
|
|
5160
|
-
block before (or after if `dir` is positive). Returns the joinable
|
|
5161
|
-
point, if any.
|
|
5162
|
-
*/
|
|
5163
|
-
function joinPoint(doc, pos, dir = -1) {
|
|
5164
|
-
let $pos = doc.resolve(pos);
|
|
5165
|
-
for (let d = $pos.depth;; d--) {
|
|
5166
|
-
let before, after, index = $pos.index(d);
|
|
5167
|
-
if (d == $pos.depth) {
|
|
5168
|
-
before = $pos.nodeBefore;
|
|
5169
|
-
after = $pos.nodeAfter;
|
|
5170
|
-
}
|
|
5171
|
-
else if (dir > 0) {
|
|
5172
|
-
before = $pos.node(d + 1);
|
|
5173
|
-
index++;
|
|
5174
|
-
after = $pos.node(d).maybeChild(index);
|
|
5175
|
-
}
|
|
5176
|
-
else {
|
|
5177
|
-
before = $pos.node(d).maybeChild(index - 1);
|
|
5178
|
-
after = $pos.node(d + 1);
|
|
5179
|
-
}
|
|
5180
|
-
if (before && !before.isTextblock && joinable(before, after) &&
|
|
5181
|
-
$pos.node(d).canReplace(index, index + 1))
|
|
5182
|
-
return pos;
|
|
5183
|
-
if (d == 0)
|
|
5184
|
-
break;
|
|
5185
|
-
pos = dir < 0 ? $pos.before(d) : $pos.after(d);
|
|
5186
|
-
}
|
|
5187
|
-
}
|
|
5188
5118
|
function join(tr, pos, depth) {
|
|
5189
5119
|
let convertNewlines = null;
|
|
5190
5120
|
let { linebreakReplacement } = tr.doc.type.schema;
|
|
@@ -5984,7 +5914,7 @@ class Transform {
|
|
|
5984
5914
|
sure the lift is valid.
|
|
5985
5915
|
*/
|
|
5986
5916
|
lift(range, target) {
|
|
5987
|
-
lift
|
|
5917
|
+
lift(this, range, target);
|
|
5988
5918
|
return this;
|
|
5989
5919
|
}
|
|
5990
5920
|
/**
|
|
@@ -6009,7 +5939,7 @@ class Transform {
|
|
|
6009
5939
|
the given node type with the given attributes.
|
|
6010
5940
|
*/
|
|
6011
5941
|
setBlockType(from, to = from, type, attrs = null) {
|
|
6012
|
-
setBlockType
|
|
5942
|
+
setBlockType(this, from, to, type, attrs);
|
|
6013
5943
|
return this;
|
|
6014
5944
|
}
|
|
6015
5945
|
/**
|
|
@@ -6638,7 +6568,7 @@ class Transaction extends Transform {
|
|
|
6638
6568
|
throw new RangeError("Selection passed to setSelection must point at the current document");
|
|
6639
6569
|
this.curSelection = selection;
|
|
6640
6570
|
this.curSelectionFor = this.steps.length;
|
|
6641
|
-
this.updated = (this.updated | UPDATED_SEL) &
|
|
6571
|
+
this.updated = (this.updated | UPDATED_SEL) & -3;
|
|
6642
6572
|
this.storedMarks = null;
|
|
6643
6573
|
return this;
|
|
6644
6574
|
}
|
|
@@ -6689,7 +6619,7 @@ class Transaction extends Transform {
|
|
|
6689
6619
|
*/
|
|
6690
6620
|
addStep(step, doc) {
|
|
6691
6621
|
super.addStep(step, doc);
|
|
6692
|
-
this.updated = this.updated &
|
|
6622
|
+
this.updated = this.updated & -3;
|
|
6693
6623
|
this.storedMarks = null;
|
|
6694
6624
|
}
|
|
6695
6625
|
/**
|
|
@@ -7082,27 +7012,6 @@ function createKey(name) {
|
|
|
7082
7012
|
keys[name] = 0;
|
|
7083
7013
|
return name + "$";
|
|
7084
7014
|
}
|
|
7085
|
-
/**
|
|
7086
|
-
A key is used to [tag](https://prosemirror.net/docs/ref/#state.PluginSpec.key) plugins in a way
|
|
7087
|
-
that makes it possible to find them, given an editor state.
|
|
7088
|
-
Assigning a key does mean only one plugin of that type can be
|
|
7089
|
-
active in a state.
|
|
7090
|
-
*/
|
|
7091
|
-
class PluginKey {
|
|
7092
|
-
/**
|
|
7093
|
-
Create a plugin key.
|
|
7094
|
-
*/
|
|
7095
|
-
constructor(name = "key") { this.key = createKey(name); }
|
|
7096
|
-
/**
|
|
7097
|
-
Get the active plugin with this key, if any, from an editor
|
|
7098
|
-
state.
|
|
7099
|
-
*/
|
|
7100
|
-
get(state) { return state.config.pluginsByKey[this.key]; }
|
|
7101
|
-
/**
|
|
7102
|
-
Get the plugin's state from an editor state.
|
|
7103
|
-
*/
|
|
7104
|
-
getState(state) { return state[this.key]; }
|
|
7105
|
-
}
|
|
7106
7015
|
|
|
7107
7016
|
const domIndex = function (node) {
|
|
7108
7017
|
for (var index = 0;; index++) {
|
|
@@ -7273,7 +7182,6 @@ const ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(agent);
|
|
|
7273
7182
|
const ie$1 = !!(ie_upto10 || ie_11up || ie_edge);
|
|
7274
7183
|
const ie_version = ie_upto10 ? document.documentMode : ie_11up ? +ie_11up[1] : ie_edge ? +ie_edge[1] : 0;
|
|
7275
7184
|
const gecko = !ie$1 && /gecko\/(\d+)/i.test(agent);
|
|
7276
|
-
gecko && +(/Firefox\/(\d+)/.exec(agent) || [0, 0])[1];
|
|
7277
7185
|
const _chrome = !ie$1 && /Chrome\/(\d+)/.exec(agent);
|
|
7278
7186
|
const chrome = !!_chrome;
|
|
7279
7187
|
const chrome_version = _chrome ? +_chrome[1] : 0;
|
|
@@ -10316,8 +10224,7 @@ function updateSelection(view, selection, origin) {
|
|
|
10316
10224
|
if (view.state.selection.eq(selection))
|
|
10317
10225
|
return;
|
|
10318
10226
|
let tr = view.state.tr.setSelection(selection);
|
|
10319
|
-
|
|
10320
|
-
tr.setMeta("pointer", true);
|
|
10227
|
+
tr.setMeta("pointer", true);
|
|
10321
10228
|
view.dispatch(tr);
|
|
10322
10229
|
}
|
|
10323
10230
|
function selectClickedLeaf(view, inside) {
|
|
@@ -10325,7 +10232,7 @@ function selectClickedLeaf(view, inside) {
|
|
|
10325
10232
|
return false;
|
|
10326
10233
|
let $pos = view.state.doc.resolve(inside), node = $pos.nodeAfter;
|
|
10327
10234
|
if (node && node.isAtom && NodeSelection.isSelectable(node)) {
|
|
10328
|
-
updateSelection(view, new NodeSelection($pos)
|
|
10235
|
+
updateSelection(view, new NodeSelection($pos));
|
|
10329
10236
|
return true;
|
|
10330
10237
|
}
|
|
10331
10238
|
return false;
|
|
@@ -10349,7 +10256,7 @@ function selectClickedNode(view, inside) {
|
|
|
10349
10256
|
}
|
|
10350
10257
|
}
|
|
10351
10258
|
if (selectAt != null) {
|
|
10352
|
-
updateSelection(view, NodeSelection.create(view.state.doc, selectAt)
|
|
10259
|
+
updateSelection(view, NodeSelection.create(view.state.doc, selectAt));
|
|
10353
10260
|
return true;
|
|
10354
10261
|
}
|
|
10355
10262
|
else {
|
|
@@ -10376,7 +10283,7 @@ function defaultTripleClick(view, inside, event) {
|
|
|
10376
10283
|
let doc = view.state.doc;
|
|
10377
10284
|
if (inside == -1) {
|
|
10378
10285
|
if (doc.inlineContent) {
|
|
10379
|
-
updateSelection(view, TextSelection.create(doc, 0, doc.content.size)
|
|
10286
|
+
updateSelection(view, TextSelection.create(doc, 0, doc.content.size));
|
|
10380
10287
|
return true;
|
|
10381
10288
|
}
|
|
10382
10289
|
return false;
|
|
@@ -10386,9 +10293,9 @@ function defaultTripleClick(view, inside, event) {
|
|
|
10386
10293
|
let node = i > $pos.depth ? $pos.nodeAfter : $pos.node(i);
|
|
10387
10294
|
let nodePos = $pos.before(i);
|
|
10388
10295
|
if (node.inlineContent)
|
|
10389
|
-
updateSelection(view, TextSelection.create(doc, nodePos + 1, nodePos + 1 + node.content.size)
|
|
10296
|
+
updateSelection(view, TextSelection.create(doc, nodePos + 1, nodePos + 1 + node.content.size));
|
|
10390
10297
|
else if (NodeSelection.isSelectable(node))
|
|
10391
|
-
updateSelection(view, NodeSelection.create(doc, nodePos)
|
|
10298
|
+
updateSelection(view, NodeSelection.create(doc, nodePos));
|
|
10392
10299
|
else
|
|
10393
10300
|
continue;
|
|
10394
10301
|
return true;
|
|
@@ -10517,7 +10424,7 @@ class MouseDown {
|
|
|
10517
10424
|
// works around that.
|
|
10518
10425
|
(chrome && !this.view.state.selection.visible &&
|
|
10519
10426
|
Math.min(Math.abs(pos.pos - this.view.state.selection.from), Math.abs(pos.pos - this.view.state.selection.to)) <= 2))) {
|
|
10520
|
-
updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos))
|
|
10427
|
+
updateSelection(this.view, Selection.near(this.view.state.doc.resolve(pos.pos)));
|
|
10521
10428
|
event.preventDefault();
|
|
10522
10429
|
}
|
|
10523
10430
|
else {
|
|
@@ -12337,15 +12244,6 @@ function isSurrogatePair(str) {
|
|
|
12337
12244
|
let a = str.charCodeAt(0), b = str.charCodeAt(1);
|
|
12338
12245
|
return a >= 0xDC00 && a <= 0xDFFF && b >= 0xD800 && b <= 0xDBFF;
|
|
12339
12246
|
}
|
|
12340
|
-
|
|
12341
|
-
/**
|
|
12342
|
-
@internal
|
|
12343
|
-
*/
|
|
12344
|
-
const __parseFromClipboard = parseFromClipboard;
|
|
12345
|
-
/**
|
|
12346
|
-
@internal
|
|
12347
|
-
*/
|
|
12348
|
-
const __endComposition = endComposition;
|
|
12349
12247
|
/**
|
|
12350
12248
|
An editor view manages the DOM structure that represents an
|
|
12351
12249
|
editable document. Its state and behavior are determined by its
|
|
@@ -13162,229 +13060,6 @@ function addListNodes(nodes, itemContent, listGroup) {
|
|
|
13162
13060
|
list_item: add(listItem, { content: itemContent })
|
|
13163
13061
|
});
|
|
13164
13062
|
}
|
|
13165
|
-
/**
|
|
13166
|
-
Returns a command function that wraps the selection in a list with
|
|
13167
|
-
the given type an attributes. If `dispatch` is null, only return a
|
|
13168
|
-
value to indicate whether this is possible, but don't actually
|
|
13169
|
-
perform the change.
|
|
13170
|
-
*/
|
|
13171
|
-
function wrapInList(listType, attrs = null) {
|
|
13172
|
-
return function (state, dispatch) {
|
|
13173
|
-
let { $from, $to } = state.selection;
|
|
13174
|
-
let range = $from.blockRange($to);
|
|
13175
|
-
if (!range)
|
|
13176
|
-
return false;
|
|
13177
|
-
let tr = dispatch ? state.tr : null;
|
|
13178
|
-
if (!wrapRangeInList(tr, range, listType, attrs))
|
|
13179
|
-
return false;
|
|
13180
|
-
if (dispatch)
|
|
13181
|
-
dispatch(tr.scrollIntoView());
|
|
13182
|
-
return true;
|
|
13183
|
-
};
|
|
13184
|
-
}
|
|
13185
|
-
/**
|
|
13186
|
-
Try to wrap the given node range in a list of the given type.
|
|
13187
|
-
Return `true` when this is possible, `false` otherwise. When `tr`
|
|
13188
|
-
is non-null, the wrapping is added to that transaction. When it is
|
|
13189
|
-
`null`, the function only queries whether the wrapping is
|
|
13190
|
-
possible.
|
|
13191
|
-
*/
|
|
13192
|
-
function wrapRangeInList(tr, range, listType, attrs = null) {
|
|
13193
|
-
let doJoin = false, outerRange = range, doc = range.$from.doc;
|
|
13194
|
-
// This is at the top of an existing list item
|
|
13195
|
-
if (range.depth >= 2 && range.$from.node(range.depth - 1).type.compatibleContent(listType) && range.startIndex == 0) {
|
|
13196
|
-
// Don't do anything if this is the top of the list
|
|
13197
|
-
if (range.$from.index(range.depth - 1) == 0)
|
|
13198
|
-
return false;
|
|
13199
|
-
let $insert = doc.resolve(range.start - 2);
|
|
13200
|
-
outerRange = new NodeRange($insert, $insert, range.depth);
|
|
13201
|
-
if (range.endIndex < range.parent.childCount)
|
|
13202
|
-
range = new NodeRange(range.$from, doc.resolve(range.$to.end(range.depth)), range.depth);
|
|
13203
|
-
doJoin = true;
|
|
13204
|
-
}
|
|
13205
|
-
let wrap = findWrapping(outerRange, listType, attrs, range);
|
|
13206
|
-
if (!wrap)
|
|
13207
|
-
return false;
|
|
13208
|
-
if (tr)
|
|
13209
|
-
doWrapInList(tr, range, wrap, doJoin, listType);
|
|
13210
|
-
return true;
|
|
13211
|
-
}
|
|
13212
|
-
function doWrapInList(tr, range, wrappers, joinBefore, listType) {
|
|
13213
|
-
let content = Fragment.empty;
|
|
13214
|
-
for (let i = wrappers.length - 1; i >= 0; i--)
|
|
13215
|
-
content = Fragment.from(wrappers[i].type.create(wrappers[i].attrs, content));
|
|
13216
|
-
tr.step(new ReplaceAroundStep(range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end, new Slice(content, 0, 0), wrappers.length, true));
|
|
13217
|
-
let found = 0;
|
|
13218
|
-
for (let i = 0; i < wrappers.length; i++)
|
|
13219
|
-
if (wrappers[i].type == listType)
|
|
13220
|
-
found = i + 1;
|
|
13221
|
-
let splitDepth = wrappers.length - found;
|
|
13222
|
-
let splitPos = range.start + wrappers.length - (joinBefore ? 2 : 0), parent = range.parent;
|
|
13223
|
-
for (let i = range.startIndex, e = range.endIndex, first = true; i < e; i++, first = false) {
|
|
13224
|
-
if (!first && canSplit(tr.doc, splitPos, splitDepth)) {
|
|
13225
|
-
tr.split(splitPos, splitDepth);
|
|
13226
|
-
splitPos += 2 * splitDepth;
|
|
13227
|
-
}
|
|
13228
|
-
splitPos += parent.child(i).nodeSize;
|
|
13229
|
-
}
|
|
13230
|
-
return tr;
|
|
13231
|
-
}
|
|
13232
|
-
/**
|
|
13233
|
-
Build a command that splits a non-empty textblock at the top level
|
|
13234
|
-
of a list item by also splitting that list item.
|
|
13235
|
-
*/
|
|
13236
|
-
function splitListItem(itemType, itemAttrs) {
|
|
13237
|
-
return function (state, dispatch) {
|
|
13238
|
-
let { $from, $to, node } = state.selection;
|
|
13239
|
-
if ((node && node.isBlock) || $from.depth < 2 || !$from.sameParent($to))
|
|
13240
|
-
return false;
|
|
13241
|
-
let grandParent = $from.node(-1);
|
|
13242
|
-
if (grandParent.type != itemType)
|
|
13243
|
-
return false;
|
|
13244
|
-
if ($from.parent.content.size == 0 && $from.node(-1).childCount == $from.indexAfter(-1)) {
|
|
13245
|
-
// In an empty block. If this is a nested list, the wrapping
|
|
13246
|
-
// list item should be split. Otherwise, bail out and let next
|
|
13247
|
-
// command handle lifting.
|
|
13248
|
-
if ($from.depth == 3 || $from.node(-3).type != itemType ||
|
|
13249
|
-
$from.index(-2) != $from.node(-2).childCount - 1)
|
|
13250
|
-
return false;
|
|
13251
|
-
if (dispatch) {
|
|
13252
|
-
let wrap = Fragment.empty;
|
|
13253
|
-
let depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3;
|
|
13254
|
-
// Build a fragment containing empty versions of the structure
|
|
13255
|
-
// from the outer list item to the parent node of the cursor
|
|
13256
|
-
for (let d = $from.depth - depthBefore; d >= $from.depth - 3; d--)
|
|
13257
|
-
wrap = Fragment.from($from.node(d).copy(wrap));
|
|
13258
|
-
let depthAfter = $from.indexAfter(-1) < $from.node(-2).childCount ? 1
|
|
13259
|
-
: $from.indexAfter(-2) < $from.node(-3).childCount ? 2 : 3;
|
|
13260
|
-
// Add a second list item with an empty default start node
|
|
13261
|
-
wrap = wrap.append(Fragment.from(itemType.createAndFill()));
|
|
13262
|
-
let start = $from.before($from.depth - (depthBefore - 1));
|
|
13263
|
-
let tr = state.tr.replace(start, $from.after(-depthAfter), new Slice(wrap, 4 - depthBefore, 0));
|
|
13264
|
-
let sel = -1;
|
|
13265
|
-
tr.doc.nodesBetween(start, tr.doc.content.size, (node, pos) => {
|
|
13266
|
-
if (sel > -1)
|
|
13267
|
-
return false;
|
|
13268
|
-
if (node.isTextblock && node.content.size == 0)
|
|
13269
|
-
sel = pos + 1;
|
|
13270
|
-
});
|
|
13271
|
-
if (sel > -1)
|
|
13272
|
-
tr.setSelection(Selection.near(tr.doc.resolve(sel)));
|
|
13273
|
-
dispatch(tr.scrollIntoView());
|
|
13274
|
-
}
|
|
13275
|
-
return true;
|
|
13276
|
-
}
|
|
13277
|
-
let nextType = $to.pos == $from.end() ? grandParent.contentMatchAt(0).defaultType : null;
|
|
13278
|
-
let tr = state.tr.delete($from.pos, $to.pos);
|
|
13279
|
-
let types = nextType ? [itemAttrs ? { type: itemType, attrs: itemAttrs } : null, { type: nextType }] : undefined;
|
|
13280
|
-
if (!canSplit(tr.doc, $from.pos, 2, types))
|
|
13281
|
-
return false;
|
|
13282
|
-
if (dispatch)
|
|
13283
|
-
dispatch(tr.split($from.pos, 2, types).scrollIntoView());
|
|
13284
|
-
return true;
|
|
13285
|
-
};
|
|
13286
|
-
}
|
|
13287
|
-
/**
|
|
13288
|
-
Acts like [`splitListItem`](https://prosemirror.net/docs/ref/#schema-list.splitListItem), but
|
|
13289
|
-
without resetting the set of active marks at the cursor.
|
|
13290
|
-
*/
|
|
13291
|
-
function splitListItemKeepMarks(itemType, itemAttrs) {
|
|
13292
|
-
let split = splitListItem(itemType, itemAttrs);
|
|
13293
|
-
return (state, dispatch) => {
|
|
13294
|
-
return split(state, dispatch && (tr => {
|
|
13295
|
-
let marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks());
|
|
13296
|
-
if (marks)
|
|
13297
|
-
tr.ensureMarks(marks);
|
|
13298
|
-
dispatch(tr);
|
|
13299
|
-
}));
|
|
13300
|
-
};
|
|
13301
|
-
}
|
|
13302
|
-
/**
|
|
13303
|
-
Create a command to lift the list item around the selection up into
|
|
13304
|
-
a wrapping list.
|
|
13305
|
-
*/
|
|
13306
|
-
function liftListItem(itemType) {
|
|
13307
|
-
return function (state, dispatch) {
|
|
13308
|
-
let { $from, $to } = state.selection;
|
|
13309
|
-
let range = $from.blockRange($to, node => node.childCount > 0 && node.firstChild.type == itemType);
|
|
13310
|
-
if (!range)
|
|
13311
|
-
return false;
|
|
13312
|
-
if (!dispatch)
|
|
13313
|
-
return true;
|
|
13314
|
-
if ($from.node(range.depth - 1).type == itemType) // Inside a parent list
|
|
13315
|
-
return liftToOuterList(state, dispatch, itemType, range);
|
|
13316
|
-
else // Outer list node
|
|
13317
|
-
return liftOutOfList(state, dispatch, range);
|
|
13318
|
-
};
|
|
13319
|
-
}
|
|
13320
|
-
function liftToOuterList(state, dispatch, itemType, range) {
|
|
13321
|
-
let tr = state.tr, end = range.end, endOfList = range.$to.end(range.depth);
|
|
13322
|
-
if (end < endOfList) {
|
|
13323
|
-
// There are siblings after the lifted items, which must become
|
|
13324
|
-
// children of the last item
|
|
13325
|
-
tr.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice(Fragment.from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));
|
|
13326
|
-
range = new NodeRange(tr.doc.resolve(range.$from.pos), tr.doc.resolve(endOfList), range.depth);
|
|
13327
|
-
}
|
|
13328
|
-
const target = liftTarget(range);
|
|
13329
|
-
if (target == null)
|
|
13330
|
-
return false;
|
|
13331
|
-
tr.lift(range, target);
|
|
13332
|
-
let $after = tr.doc.resolve(tr.mapping.map(end, -1) - 1);
|
|
13333
|
-
if (canJoin(tr.doc, $after.pos) && $after.nodeBefore.type == $after.nodeAfter.type)
|
|
13334
|
-
tr.join($after.pos);
|
|
13335
|
-
dispatch(tr.scrollIntoView());
|
|
13336
|
-
return true;
|
|
13337
|
-
}
|
|
13338
|
-
function liftOutOfList(state, dispatch, range) {
|
|
13339
|
-
let tr = state.tr, list = range.parent;
|
|
13340
|
-
// Merge the list items into a single big item
|
|
13341
|
-
for (let pos = range.end, i = range.endIndex - 1, e = range.startIndex; i > e; i--) {
|
|
13342
|
-
pos -= list.child(i).nodeSize;
|
|
13343
|
-
tr.delete(pos - 1, pos + 1);
|
|
13344
|
-
}
|
|
13345
|
-
let $start = tr.doc.resolve(range.start), item = $start.nodeAfter;
|
|
13346
|
-
if (tr.mapping.map(range.end) != range.start + $start.nodeAfter.nodeSize)
|
|
13347
|
-
return false;
|
|
13348
|
-
let atStart = range.startIndex == 0, atEnd = range.endIndex == list.childCount;
|
|
13349
|
-
let parent = $start.node(-1), indexBefore = $start.index(-1);
|
|
13350
|
-
if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? Fragment.empty : Fragment.from(list))))
|
|
13351
|
-
return false;
|
|
13352
|
-
let start = $start.pos, end = start + item.nodeSize;
|
|
13353
|
-
// Strip off the surrounding list. At the sides where we're not at
|
|
13354
|
-
// the end of the list, the existing list is closed. At sides where
|
|
13355
|
-
// this is the end, it is overwritten to its end.
|
|
13356
|
-
tr.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice((atStart ? Fragment.empty : Fragment.from(list.copy(Fragment.empty)))
|
|
13357
|
-
.append(atEnd ? Fragment.empty : Fragment.from(list.copy(Fragment.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));
|
|
13358
|
-
dispatch(tr.scrollIntoView());
|
|
13359
|
-
return true;
|
|
13360
|
-
}
|
|
13361
|
-
/**
|
|
13362
|
-
Create a command to sink the list item around the selection down
|
|
13363
|
-
into an inner list.
|
|
13364
|
-
*/
|
|
13365
|
-
function sinkListItem(itemType) {
|
|
13366
|
-
return function (state, dispatch) {
|
|
13367
|
-
let { $from, $to } = state.selection;
|
|
13368
|
-
let range = $from.blockRange($to, node => node.childCount > 0 && node.firstChild.type == itemType);
|
|
13369
|
-
if (!range)
|
|
13370
|
-
return false;
|
|
13371
|
-
let startIndex = range.startIndex;
|
|
13372
|
-
if (startIndex == 0)
|
|
13373
|
-
return false;
|
|
13374
|
-
let parent = range.parent, nodeBefore = parent.child(startIndex - 1);
|
|
13375
|
-
if (nodeBefore.type != itemType)
|
|
13376
|
-
return false;
|
|
13377
|
-
if (dispatch) {
|
|
13378
|
-
let nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;
|
|
13379
|
-
let inner = Fragment.from(nestedBefore ? itemType.create() : null);
|
|
13380
|
-
let slice = new Slice(Fragment.from(itemType.create(null, Fragment.from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);
|
|
13381
|
-
let before = range.start, after = range.end;
|
|
13382
|
-
dispatch(state.tr.step(new ReplaceAroundStep(before - (nestedBefore ? 3 : 1), after, before, after, slice, 1, true))
|
|
13383
|
-
.scrollIntoView());
|
|
13384
|
-
}
|
|
13385
|
-
return true;
|
|
13386
|
-
};
|
|
13387
|
-
}
|
|
13388
13063
|
|
|
13389
13064
|
var base = {
|
|
13390
13065
|
8: "Backspace",
|
|
@@ -13702,60 +13377,6 @@ const joinBackward = (state, dispatch, view) => {
|
|
|
13702
13377
|
}
|
|
13703
13378
|
return false;
|
|
13704
13379
|
};
|
|
13705
|
-
/**
|
|
13706
|
-
A more limited form of [`joinBackward`](https://prosemirror.net/docs/ref/#commands.joinBackward)
|
|
13707
|
-
that only tries to join the current textblock to the one before
|
|
13708
|
-
it, if the cursor is at the start of a textblock.
|
|
13709
|
-
*/
|
|
13710
|
-
const joinTextblockBackward = (state, dispatch, view) => {
|
|
13711
|
-
let $cursor = atBlockStart(state, view);
|
|
13712
|
-
if (!$cursor)
|
|
13713
|
-
return false;
|
|
13714
|
-
let $cut = findCutBefore($cursor);
|
|
13715
|
-
return $cut ? joinTextblocksAround(state, $cut, dispatch) : false;
|
|
13716
|
-
};
|
|
13717
|
-
/**
|
|
13718
|
-
A more limited form of [`joinForward`](https://prosemirror.net/docs/ref/#commands.joinForward)
|
|
13719
|
-
that only tries to join the current textblock to the one after
|
|
13720
|
-
it, if the cursor is at the end of a textblock.
|
|
13721
|
-
*/
|
|
13722
|
-
const joinTextblockForward = (state, dispatch, view) => {
|
|
13723
|
-
let $cursor = atBlockEnd(state, view);
|
|
13724
|
-
if (!$cursor)
|
|
13725
|
-
return false;
|
|
13726
|
-
let $cut = findCutAfter($cursor);
|
|
13727
|
-
return $cut ? joinTextblocksAround(state, $cut, dispatch) : false;
|
|
13728
|
-
};
|
|
13729
|
-
function joinTextblocksAround(state, $cut, dispatch) {
|
|
13730
|
-
let before = $cut.nodeBefore, beforeText = before, beforePos = $cut.pos - 1;
|
|
13731
|
-
for (; !beforeText.isTextblock; beforePos--) {
|
|
13732
|
-
if (beforeText.type.spec.isolating)
|
|
13733
|
-
return false;
|
|
13734
|
-
let child = beforeText.lastChild;
|
|
13735
|
-
if (!child)
|
|
13736
|
-
return false;
|
|
13737
|
-
beforeText = child;
|
|
13738
|
-
}
|
|
13739
|
-
let after = $cut.nodeAfter, afterText = after, afterPos = $cut.pos + 1;
|
|
13740
|
-
for (; !afterText.isTextblock; afterPos++) {
|
|
13741
|
-
if (afterText.type.spec.isolating)
|
|
13742
|
-
return false;
|
|
13743
|
-
let child = afterText.firstChild;
|
|
13744
|
-
if (!child)
|
|
13745
|
-
return false;
|
|
13746
|
-
afterText = child;
|
|
13747
|
-
}
|
|
13748
|
-
let step = replaceStep(state.doc, beforePos, afterPos, Slice.empty);
|
|
13749
|
-
if (!step || step.from != beforePos ||
|
|
13750
|
-
step instanceof ReplaceStep && step.slice.size >= afterPos - beforePos)
|
|
13751
|
-
return false;
|
|
13752
|
-
if (dispatch) {
|
|
13753
|
-
let tr = state.tr.step(step);
|
|
13754
|
-
tr.setSelection(TextSelection.create(tr.doc, beforePos));
|
|
13755
|
-
dispatch(tr.scrollIntoView());
|
|
13756
|
-
}
|
|
13757
|
-
return true;
|
|
13758
|
-
}
|
|
13759
13380
|
function textblockAt(node, side, only = false) {
|
|
13760
13381
|
for (let scan = node; scan; scan = (side == "start" ? scan.firstChild : scan.lastChild)) {
|
|
13761
13382
|
if (scan.isTextblock)
|
|
@@ -13884,64 +13505,6 @@ function findCutAfter($pos) {
|
|
|
13884
13505
|
return null;
|
|
13885
13506
|
}
|
|
13886
13507
|
/**
|
|
13887
|
-
Join the selected block or, if there is a text selection, the
|
|
13888
|
-
closest ancestor block of the selection that can be joined, with
|
|
13889
|
-
the sibling above it.
|
|
13890
|
-
*/
|
|
13891
|
-
const joinUp = (state, dispatch) => {
|
|
13892
|
-
let sel = state.selection, nodeSel = sel instanceof NodeSelection, point;
|
|
13893
|
-
if (nodeSel) {
|
|
13894
|
-
if (sel.node.isTextblock || !canJoin(state.doc, sel.from))
|
|
13895
|
-
return false;
|
|
13896
|
-
point = sel.from;
|
|
13897
|
-
}
|
|
13898
|
-
else {
|
|
13899
|
-
point = joinPoint(state.doc, sel.from, -1);
|
|
13900
|
-
if (point == null)
|
|
13901
|
-
return false;
|
|
13902
|
-
}
|
|
13903
|
-
if (dispatch) {
|
|
13904
|
-
let tr = state.tr.join(point);
|
|
13905
|
-
if (nodeSel)
|
|
13906
|
-
tr.setSelection(NodeSelection.create(tr.doc, point - state.doc.resolve(point).nodeBefore.nodeSize));
|
|
13907
|
-
dispatch(tr.scrollIntoView());
|
|
13908
|
-
}
|
|
13909
|
-
return true;
|
|
13910
|
-
};
|
|
13911
|
-
/**
|
|
13912
|
-
Join the selected block, or the closest ancestor of the selection
|
|
13913
|
-
that can be joined, with the sibling after it.
|
|
13914
|
-
*/
|
|
13915
|
-
const joinDown = (state, dispatch) => {
|
|
13916
|
-
let sel = state.selection, point;
|
|
13917
|
-
if (sel instanceof NodeSelection) {
|
|
13918
|
-
if (sel.node.isTextblock || !canJoin(state.doc, sel.to))
|
|
13919
|
-
return false;
|
|
13920
|
-
point = sel.to;
|
|
13921
|
-
}
|
|
13922
|
-
else {
|
|
13923
|
-
point = joinPoint(state.doc, sel.to, 1);
|
|
13924
|
-
if (point == null)
|
|
13925
|
-
return false;
|
|
13926
|
-
}
|
|
13927
|
-
if (dispatch)
|
|
13928
|
-
dispatch(state.tr.join(point).scrollIntoView());
|
|
13929
|
-
return true;
|
|
13930
|
-
};
|
|
13931
|
-
/**
|
|
13932
|
-
Lift the selected block, or the closest ancestor block of the
|
|
13933
|
-
selection that can be lifted, out of its parent node.
|
|
13934
|
-
*/
|
|
13935
|
-
const lift = (state, dispatch) => {
|
|
13936
|
-
let { $from, $to } = state.selection;
|
|
13937
|
-
let range = $from.blockRange($to), target = range && liftTarget(range);
|
|
13938
|
-
if (target == null)
|
|
13939
|
-
return false;
|
|
13940
|
-
if (dispatch)
|
|
13941
|
-
dispatch(state.tr.lift(range, target).scrollIntoView());
|
|
13942
|
-
return true;
|
|
13943
|
-
};
|
|
13944
|
-
/**
|
|
13945
13508
|
If the selection is in a node whose type has a truthy
|
|
13946
13509
|
[`code`](https://prosemirror.net/docs/ref/#model.NodeSpec.code) property in its spec, replace the
|
|
13947
13510
|
selection with a newline character.
|
|
@@ -14029,7 +13592,7 @@ a custom function to determine the type of the newly split off block.
|
|
|
14029
13592
|
*/
|
|
14030
13593
|
function splitBlockAs(splitNode) {
|
|
14031
13594
|
return (state, dispatch) => {
|
|
14032
|
-
let { $from
|
|
13595
|
+
let { $from} = state.selection;
|
|
14033
13596
|
if (state.selection instanceof NodeSelection && state.selection.node.isBlock) {
|
|
14034
13597
|
if (!$from.parentOffset || !canSplit(state.doc, $from.pos))
|
|
14035
13598
|
return false;
|
|
@@ -14047,8 +13610,7 @@ function splitBlockAs(splitNode) {
|
|
|
14047
13610
|
atEnd = $from.end(d) == $from.pos + ($from.depth - d);
|
|
14048
13611
|
atStart = $from.start(d) == $from.pos - ($from.depth - d);
|
|
14049
13612
|
deflt = defaultBlockAt($from.node(d - 1).contentMatchAt($from.indexAfter(d - 1)));
|
|
14050
|
-
|
|
14051
|
-
types.unshift(splitType || (atEnd && deflt ? { type: deflt } : null));
|
|
13613
|
+
types.unshift((atEnd && deflt ? { type: deflt } : null));
|
|
14052
13614
|
splitDepth = d;
|
|
14053
13615
|
break;
|
|
14054
13616
|
}
|
|
@@ -14086,32 +13648,6 @@ selection, also delete its content.
|
|
|
14086
13648
|
*/
|
|
14087
13649
|
const splitBlock = splitBlockAs();
|
|
14088
13650
|
/**
|
|
14089
|
-
Acts like [`splitBlock`](https://prosemirror.net/docs/ref/#commands.splitBlock), but without
|
|
14090
|
-
resetting the set of active marks at the cursor.
|
|
14091
|
-
*/
|
|
14092
|
-
const splitBlockKeepMarks = (state, dispatch) => {
|
|
14093
|
-
return splitBlock(state, dispatch && (tr => {
|
|
14094
|
-
let marks = state.storedMarks || (state.selection.$to.parentOffset && state.selection.$from.marks());
|
|
14095
|
-
if (marks)
|
|
14096
|
-
tr.ensureMarks(marks);
|
|
14097
|
-
dispatch(tr);
|
|
14098
|
-
}));
|
|
14099
|
-
};
|
|
14100
|
-
/**
|
|
14101
|
-
Move the selection to the node wrapping the current selection, if
|
|
14102
|
-
any. (Will not select the document node.)
|
|
14103
|
-
*/
|
|
14104
|
-
const selectParentNode = (state, dispatch) => {
|
|
14105
|
-
let { $from, to } = state.selection, pos;
|
|
14106
|
-
let same = $from.sharedDepth(to);
|
|
14107
|
-
if (same == 0)
|
|
14108
|
-
return false;
|
|
14109
|
-
pos = $from.before(same);
|
|
14110
|
-
if (dispatch)
|
|
14111
|
-
dispatch(state.tr.setSelection(NodeSelection.create(state.doc, pos)));
|
|
14112
|
-
return true;
|
|
14113
|
-
};
|
|
14114
|
-
/**
|
|
14115
13651
|
Select the whole document.
|
|
14116
13652
|
*/
|
|
14117
13653
|
const selectAll = (state, dispatch) => {
|
|
@@ -14212,205 +13748,6 @@ const selectTextblockStart = selectTextblockSide(-1);
|
|
|
14212
13748
|
Moves the cursor to the end of current text block.
|
|
14213
13749
|
*/
|
|
14214
13750
|
const selectTextblockEnd = selectTextblockSide(1);
|
|
14215
|
-
// Parameterized commands
|
|
14216
|
-
/**
|
|
14217
|
-
Wrap the selection in a node of the given type with the given
|
|
14218
|
-
attributes.
|
|
14219
|
-
*/
|
|
14220
|
-
function wrapIn(nodeType, attrs = null) {
|
|
14221
|
-
return function (state, dispatch) {
|
|
14222
|
-
let { $from, $to } = state.selection;
|
|
14223
|
-
let range = $from.blockRange($to), wrapping = range && findWrapping(range, nodeType, attrs);
|
|
14224
|
-
if (!wrapping)
|
|
14225
|
-
return false;
|
|
14226
|
-
if (dispatch)
|
|
14227
|
-
dispatch(state.tr.wrap(range, wrapping).scrollIntoView());
|
|
14228
|
-
return true;
|
|
14229
|
-
};
|
|
14230
|
-
}
|
|
14231
|
-
/**
|
|
14232
|
-
Returns a command that tries to set the selected textblocks to the
|
|
14233
|
-
given node type with the given attributes.
|
|
14234
|
-
*/
|
|
14235
|
-
function setBlockType(nodeType, attrs = null) {
|
|
14236
|
-
return function (state, dispatch) {
|
|
14237
|
-
let applicable = false;
|
|
14238
|
-
for (let i = 0; i < state.selection.ranges.length && !applicable; i++) {
|
|
14239
|
-
let { $from: { pos: from }, $to: { pos: to } } = state.selection.ranges[i];
|
|
14240
|
-
state.doc.nodesBetween(from, to, (node, pos) => {
|
|
14241
|
-
if (applicable)
|
|
14242
|
-
return false;
|
|
14243
|
-
if (!node.isTextblock || node.hasMarkup(nodeType, attrs))
|
|
14244
|
-
return;
|
|
14245
|
-
if (node.type == nodeType) {
|
|
14246
|
-
applicable = true;
|
|
14247
|
-
}
|
|
14248
|
-
else {
|
|
14249
|
-
let $pos = state.doc.resolve(pos), index = $pos.index();
|
|
14250
|
-
applicable = $pos.parent.canReplaceWith(index, index + 1, nodeType);
|
|
14251
|
-
}
|
|
14252
|
-
});
|
|
14253
|
-
}
|
|
14254
|
-
if (!applicable)
|
|
14255
|
-
return false;
|
|
14256
|
-
if (dispatch) {
|
|
14257
|
-
let tr = state.tr;
|
|
14258
|
-
for (let i = 0; i < state.selection.ranges.length; i++) {
|
|
14259
|
-
let { $from: { pos: from }, $to: { pos: to } } = state.selection.ranges[i];
|
|
14260
|
-
tr.setBlockType(from, to, nodeType, attrs);
|
|
14261
|
-
}
|
|
14262
|
-
dispatch(tr.scrollIntoView());
|
|
14263
|
-
}
|
|
14264
|
-
return true;
|
|
14265
|
-
};
|
|
14266
|
-
}
|
|
14267
|
-
function markApplies(doc, ranges, type, enterAtoms) {
|
|
14268
|
-
for (let i = 0; i < ranges.length; i++) {
|
|
14269
|
-
let { $from, $to } = ranges[i];
|
|
14270
|
-
let can = $from.depth == 0 ? doc.inlineContent && doc.type.allowsMarkType(type) : false;
|
|
14271
|
-
doc.nodesBetween($from.pos, $to.pos, (node, pos) => {
|
|
14272
|
-
if (can || !enterAtoms && node.isAtom && node.isInline && pos >= $from.pos && pos + node.nodeSize <= $to.pos)
|
|
14273
|
-
return false;
|
|
14274
|
-
can = node.inlineContent && node.type.allowsMarkType(type);
|
|
14275
|
-
});
|
|
14276
|
-
if (can)
|
|
14277
|
-
return true;
|
|
14278
|
-
}
|
|
14279
|
-
return false;
|
|
14280
|
-
}
|
|
14281
|
-
function removeInlineAtoms(ranges) {
|
|
14282
|
-
let result = [];
|
|
14283
|
-
for (let i = 0; i < ranges.length; i++) {
|
|
14284
|
-
let { $from, $to } = ranges[i];
|
|
14285
|
-
$from.doc.nodesBetween($from.pos, $to.pos, (node, pos) => {
|
|
14286
|
-
if (node.isAtom && node.content.size && node.isInline && pos >= $from.pos && pos + node.nodeSize <= $to.pos) {
|
|
14287
|
-
if (pos + 1 > $from.pos)
|
|
14288
|
-
result.push(new SelectionRange($from, $from.doc.resolve(pos + 1)));
|
|
14289
|
-
$from = $from.doc.resolve(pos + 1 + node.content.size);
|
|
14290
|
-
return false;
|
|
14291
|
-
}
|
|
14292
|
-
});
|
|
14293
|
-
if ($from.pos < $to.pos)
|
|
14294
|
-
result.push(new SelectionRange($from, $to));
|
|
14295
|
-
}
|
|
14296
|
-
return result;
|
|
14297
|
-
}
|
|
14298
|
-
/**
|
|
14299
|
-
Create a command function that toggles the given mark with the
|
|
14300
|
-
given attributes. Will return `false` when the current selection
|
|
14301
|
-
doesn't support that mark. This will remove the mark if any marks
|
|
14302
|
-
of that type exist in the selection, or add it otherwise. If the
|
|
14303
|
-
selection is empty, this applies to the [stored
|
|
14304
|
-
marks](https://prosemirror.net/docs/ref/#state.EditorState.storedMarks) instead of a range of the
|
|
14305
|
-
document.
|
|
14306
|
-
*/
|
|
14307
|
-
function toggleMark(markType, attrs = null, options) {
|
|
14308
|
-
let removeWhenPresent = (options && options.removeWhenPresent) !== false;
|
|
14309
|
-
let enterAtoms = (options && options.enterInlineAtoms) !== false;
|
|
14310
|
-
let dropSpace = !(options && options.includeWhitespace);
|
|
14311
|
-
return function (state, dispatch) {
|
|
14312
|
-
let { empty, $cursor, ranges } = state.selection;
|
|
14313
|
-
if ((empty && !$cursor) || !markApplies(state.doc, ranges, markType, enterAtoms))
|
|
14314
|
-
return false;
|
|
14315
|
-
if (dispatch) {
|
|
14316
|
-
if ($cursor) {
|
|
14317
|
-
if (markType.isInSet(state.storedMarks || $cursor.marks()))
|
|
14318
|
-
dispatch(state.tr.removeStoredMark(markType));
|
|
14319
|
-
else
|
|
14320
|
-
dispatch(state.tr.addStoredMark(markType.create(attrs)));
|
|
14321
|
-
}
|
|
14322
|
-
else {
|
|
14323
|
-
let add, tr = state.tr;
|
|
14324
|
-
if (!enterAtoms)
|
|
14325
|
-
ranges = removeInlineAtoms(ranges);
|
|
14326
|
-
if (removeWhenPresent) {
|
|
14327
|
-
add = !ranges.some(r => state.doc.rangeHasMark(r.$from.pos, r.$to.pos, markType));
|
|
14328
|
-
}
|
|
14329
|
-
else {
|
|
14330
|
-
add = !ranges.every(r => {
|
|
14331
|
-
let missing = false;
|
|
14332
|
-
tr.doc.nodesBetween(r.$from.pos, r.$to.pos, (node, pos, parent) => {
|
|
14333
|
-
if (missing)
|
|
14334
|
-
return false;
|
|
14335
|
-
missing = !markType.isInSet(node.marks) && !!parent && parent.type.allowsMarkType(markType) &&
|
|
14336
|
-
!(node.isText && /^\s*$/.test(node.textBetween(Math.max(0, r.$from.pos - pos), Math.min(node.nodeSize, r.$to.pos - pos))));
|
|
14337
|
-
});
|
|
14338
|
-
return !missing;
|
|
14339
|
-
});
|
|
14340
|
-
}
|
|
14341
|
-
for (let i = 0; i < ranges.length; i++) {
|
|
14342
|
-
let { $from, $to } = ranges[i];
|
|
14343
|
-
if (!add) {
|
|
14344
|
-
tr.removeMark($from.pos, $to.pos, markType);
|
|
14345
|
-
}
|
|
14346
|
-
else {
|
|
14347
|
-
let from = $from.pos, to = $to.pos, start = $from.nodeAfter, end = $to.nodeBefore;
|
|
14348
|
-
let spaceStart = dropSpace && start && start.isText ? /^\s*/.exec(start.text)[0].length : 0;
|
|
14349
|
-
let spaceEnd = dropSpace && end && end.isText ? /\s*$/.exec(end.text)[0].length : 0;
|
|
14350
|
-
if (from + spaceStart < to) {
|
|
14351
|
-
from += spaceStart;
|
|
14352
|
-
to -= spaceEnd;
|
|
14353
|
-
}
|
|
14354
|
-
tr.addMark(from, to, markType.create(attrs));
|
|
14355
|
-
}
|
|
14356
|
-
}
|
|
14357
|
-
dispatch(tr.scrollIntoView());
|
|
14358
|
-
}
|
|
14359
|
-
}
|
|
14360
|
-
return true;
|
|
14361
|
-
};
|
|
14362
|
-
}
|
|
14363
|
-
function wrapDispatchForJoin(dispatch, isJoinable) {
|
|
14364
|
-
return (tr) => {
|
|
14365
|
-
if (!tr.isGeneric)
|
|
14366
|
-
return dispatch(tr);
|
|
14367
|
-
let ranges = [];
|
|
14368
|
-
for (let i = 0; i < tr.mapping.maps.length; i++) {
|
|
14369
|
-
let map = tr.mapping.maps[i];
|
|
14370
|
-
for (let j = 0; j < ranges.length; j++)
|
|
14371
|
-
ranges[j] = map.map(ranges[j]);
|
|
14372
|
-
map.forEach((_s, _e, from, to) => ranges.push(from, to));
|
|
14373
|
-
}
|
|
14374
|
-
// Figure out which joinable points exist inside those ranges,
|
|
14375
|
-
// by checking all node boundaries in their parent nodes.
|
|
14376
|
-
let joinable = [];
|
|
14377
|
-
for (let i = 0; i < ranges.length; i += 2) {
|
|
14378
|
-
let from = ranges[i], to = ranges[i + 1];
|
|
14379
|
-
let $from = tr.doc.resolve(from), depth = $from.sharedDepth(to), parent = $from.node(depth);
|
|
14380
|
-
for (let index = $from.indexAfter(depth), pos = $from.after(depth + 1); pos <= to; ++index) {
|
|
14381
|
-
let after = parent.maybeChild(index);
|
|
14382
|
-
if (!after)
|
|
14383
|
-
break;
|
|
14384
|
-
if (index && joinable.indexOf(pos) == -1) {
|
|
14385
|
-
let before = parent.child(index - 1);
|
|
14386
|
-
if (before.type == after.type && isJoinable(before, after))
|
|
14387
|
-
joinable.push(pos);
|
|
14388
|
-
}
|
|
14389
|
-
pos += after.nodeSize;
|
|
14390
|
-
}
|
|
14391
|
-
}
|
|
14392
|
-
// Join the joinable points
|
|
14393
|
-
joinable.sort((a, b) => a - b);
|
|
14394
|
-
for (let i = joinable.length - 1; i >= 0; i--) {
|
|
14395
|
-
if (canJoin(tr.doc, joinable[i]))
|
|
14396
|
-
tr.join(joinable[i]);
|
|
14397
|
-
}
|
|
14398
|
-
dispatch(tr);
|
|
14399
|
-
};
|
|
14400
|
-
}
|
|
14401
|
-
/**
|
|
14402
|
-
Wrap a command so that, when it produces a transform that causes
|
|
14403
|
-
two joinable nodes to end up next to each other, those are joined.
|
|
14404
|
-
Nodes are considered joinable when they are of the same type and
|
|
14405
|
-
when the `isJoinable` predicate returns true for them or, if an
|
|
14406
|
-
array of strings was passed, if their node type name is in that
|
|
14407
|
-
array.
|
|
14408
|
-
*/
|
|
14409
|
-
function autoJoin(command, isJoinable) {
|
|
14410
|
-
let canJoin = Array.isArray(isJoinable) ? (node) => isJoinable.indexOf(node.type.name) > -1
|
|
14411
|
-
: isJoinable;
|
|
14412
|
-
return (state, dispatch, view) => command(state, dispatch && wrapDispatchForJoin(dispatch, canJoin), view);
|
|
14413
|
-
}
|
|
14414
13751
|
/**
|
|
14415
13752
|
Combine a number of command functions into a single function (which
|
|
14416
13753
|
calls them one by one until one returns true).
|
|
@@ -14725,45 +14062,6 @@ class KritzelText extends KritzelBaseObject {
|
|
|
14725
14062
|
}
|
|
14726
14063
|
}
|
|
14727
14064
|
|
|
14728
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
14729
|
-
|
|
14730
|
-
function getDefaultExportFromCjs (x) {
|
|
14731
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
14732
|
-
}
|
|
14733
|
-
|
|
14734
|
-
function getDefaultExportFromNamespaceIfPresent (n) {
|
|
14735
|
-
return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
|
|
14736
|
-
}
|
|
14737
|
-
|
|
14738
|
-
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
14739
|
-
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
14740
|
-
}
|
|
14741
|
-
|
|
14742
|
-
function getAugmentedNamespace(n) {
|
|
14743
|
-
if (n.__esModule) return n;
|
|
14744
|
-
var f = n.default;
|
|
14745
|
-
if (typeof f == "function") {
|
|
14746
|
-
var a = function a () {
|
|
14747
|
-
if (this instanceof a) {
|
|
14748
|
-
return Reflect.construct(f, arguments, this.constructor);
|
|
14749
|
-
}
|
|
14750
|
-
return f.apply(this, arguments);
|
|
14751
|
-
};
|
|
14752
|
-
a.prototype = f.prototype;
|
|
14753
|
-
} else a = {};
|
|
14754
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
14755
|
-
Object.keys(n).forEach(function (k) {
|
|
14756
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
14757
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
14758
|
-
enumerable: true,
|
|
14759
|
-
get: function () {
|
|
14760
|
-
return n[k];
|
|
14761
|
-
}
|
|
14762
|
-
});
|
|
14763
|
-
});
|
|
14764
|
-
return a;
|
|
14765
|
-
}
|
|
14766
|
-
|
|
14767
14065
|
var cjs = {};
|
|
14768
14066
|
|
|
14769
14067
|
var hasRequiredCjs;
|
|
@@ -14772,13 +14070,12 @@ function requireCjs () {
|
|
|
14772
14070
|
if (hasRequiredCjs) return cjs;
|
|
14773
14071
|
hasRequiredCjs = 1;
|
|
14774
14072
|
(function (exports) {
|
|
14775
|
-
var pe=Object.defineProperty;var ge=e=>pe(e,"__esModule",{value
|
|
14073
|
+
var pe=Object.defineProperty;var ge=e=>pe(e,"__esModule",{value:true});var de=(e,t)=>{ge(e);for(var s in t)pe(e,s,{get:t[s],enumerable:true});};de(exports,{default:()=>ve,getStroke:()=>ne,getStrokeOutlinePoints:()=>te,getStrokePoints:()=>re});function $(e,t,s,x=h=>h){return e*x(.5-t*(.5-s))}function ce(e){return [-e[0],-e[1]]}function l(e,t){return [e[0]+t[0],e[1]+t[1]]}function a(e,t){return [e[0]-t[0],e[1]-t[1]]}function b(e,t){return [e[0]*t,e[1]*t]}function xe(e,t){return [e[0]/t,e[1]/t]}function R(e){return [e[1],-e[0]]}function B(e,t){return e[0]*t[0]+e[1]*t[1]}function me(e,t){return e[0]===t[0]&&e[1]===t[1]}function Se(e){return Math.hypot(e[0],e[1])}function Pe(e){return e[0]*e[0]+e[1]*e[1]}function A(e,t){return Pe(a(e,t))}function G(e){return xe(e,Se(e))}function ae(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function L(e,t,s){let x=Math.sin(s),h=Math.cos(s),y=e[0]-t[0],n=e[1]-t[1],f=y*h-n*x,d=y*x+n*h;return [f+t[0],d+t[1]]}function K(e,t,s){return l(e,b(a(t,e),s))}function ee(e,t,s){return l(e,b(t,s))}var{min:C,PI:ke}=Math,le=.275,V=ke+1e-4;function te(e,t={}){let{size:s=16,smoothing:x=.5,thinning:h=.5,simulatePressure:y=true,easing:n=r=>r,start:f={},end:d={},last:D=false}=t,{cap:S=true,easing:j=r=>r*(2-r)}=f,{cap:q=true,easing:c=r=>--r*r*r+1}=d;if(e.length===0||s<=0)return [];let p=e[e.length-1].runningLength,g=f.taper===false?0:f.taper===true?Math.max(s,p):f.taper,T=d.taper===false?0:d.taper===true?Math.max(s,p):d.taper,oe=Math.pow(s*x,2),_=[],M=[],H=e.slice(0,10).reduce((r,i)=>{let o=i.pressure;if(y){let u=C(1,i.distance/s),W=C(1,1-u);o=C(1,r+(W-r)*(u*le));}return (r+o)/2},e[0].pressure),m=$(s,h,e[e.length-1].pressure,n),U,X=e[0].vector,z=e[0].point,F=z,O=z,E=F,J=false;for(let r=0;r<e.length;r++){let{pressure:i}=e[r],{point:o,vector:u,distance:W,runningLength:I}=e[r];if(r<e.length-1&&p-I<3)continue;if(h){if(y){let v=C(1,W/s),Z=C(1,1-v);i=C(1,H+(Z-H)*(v*le));}m=$(s,h,i,n);}else m=s/2;U===void 0&&(U=m);let fe=I<g?j(I/g):1,be=p-I<T?c((p-I)/T):1;m=Math.max(.01,m*Math.min(fe,be));let se=(r<e.length-1?e[r+1]:e[r]).vector,Y=r<e.length-1?B(u,se):1,he=B(u,X)<0&&!J,ue=Y!==null&&Y<0;if(he||ue){let v=b(R(X),m);for(let Z=1/13,w=0;w<=1;w+=Z)O=L(a(o,v),o,V*w),_.push(O),E=L(l(o,v),o,V*-w),M.push(E);z=O,F=E,ue&&(J=true);continue}if(J=false,r===e.length-1){let v=b(R(u),m);_.push(a(o,v)),M.push(l(o,v));continue}let ie=b(R(K(se,u,Y)),m);O=a(o,ie),(r<=1||A(z,O)>oe)&&(_.push(O),z=O),E=l(o,ie),(r<=1||A(F,E)>oe)&&(M.push(E),F=E),H=i,X=u;}let P=e[0].point.slice(0,2),k=e.length>1?e[e.length-1].point.slice(0,2):l(e[0].point,[1,1]),Q=[],N=[];if(e.length===1){if(!(g||T)||D){let r=ee(P,G(R(a(P,k))),-(U||m)),i=[];for(let o=1/13,u=o;u<=1;u+=o)i.push(L(r,P,V*2*u));return i}}else {if(!(g||T&&e.length===1))if(S)for(let i=1/13,o=i;o<=1;o+=i){let u=L(M[0],P,V*o);Q.push(u);}else {let i=a(_[0],M[0]),o=b(i,.5),u=b(i,.51);Q.push(a(P,o),a(P,u),l(P,u),l(P,o));}let r=R(ce(e[e.length-1].vector));if(T||g&&e.length===1)N.push(k);else if(q){let i=ee(k,r,m);for(let o=1/29,u=o;u<1;u+=o)N.push(L(i,k,V*3*u));}else N.push(l(k,b(r,m)),l(k,b(r,m*.99)),a(k,b(r,m*.99)),a(k,b(r,m)));}return _.concat(N,M.reverse(),Q)}function re(e,t={}){var q;let{streamline:s=.5,size:x=16,last:h=false}=t;if(e.length===0)return [];let y=.15+(1-s)*.85,n=Array.isArray(e[0])?e:e.map(({x:c,y:p,pressure:g=.5})=>[c,p,g]);if(n.length===2){let c=n[1];n=n.slice(0,-1);for(let p=1;p<5;p++)n.push(K(n[0],c,p/4));}n.length===1&&(n=[...n,[...l(n[0],[1,1]),...n[0].slice(2)]]);let f=[{point:[n[0][0],n[0][1]],pressure:n[0][2]>=0?n[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],d=false,D=0,S=f[0],j=n.length-1;for(let c=1;c<n.length;c++){let p=h&&c===j?n[c].slice(0,2):K(S.point,n[c],y);if(me(S.point,p))continue;let g=ae(p,S.point);if(D+=g,c<j&&!d){if(D<x)continue;d=true;}S={point:p,pressure:n[c][2]>=0?n[c][2]:.5,vector:G(a(S.point,p)),distance:g,runningLength:D},f.push(S);}return f[0].vector=((q=f[1])==null?void 0:q.vector)||[0,0],f}function ne(e,t={}){return te(re(e,t),t)}var ve=ne;
|
|
14776
14074
|
} (cjs));
|
|
14777
14075
|
return cjs;
|
|
14778
14076
|
}
|
|
14779
14077
|
|
|
14780
14078
|
var cjsExports = requireCjs();
|
|
14781
|
-
var index = /*@__PURE__*/getDefaultExportFromCjs(cjsExports);
|
|
14782
14079
|
|
|
14783
14080
|
class KritzelMathHelper {
|
|
14784
14081
|
static average(a, b) {
|
|
@@ -15122,7 +14419,6 @@ class KritzelBaseTool {
|
|
|
15122
14419
|
_core;
|
|
15123
14420
|
constructor(core) {
|
|
15124
14421
|
this._core = core;
|
|
15125
|
-
void this._core; // Avoid unused variable warning
|
|
15126
14422
|
}
|
|
15127
14423
|
onActivate() {
|
|
15128
14424
|
// default implementation
|
|
@@ -15388,7 +14684,7 @@ class KritzelTextTool extends KritzelBaseTool {
|
|
|
15388
14684
|
}
|
|
15389
14685
|
}
|
|
15390
14686
|
|
|
15391
|
-
export { KritzelText as K, KritzelPath as a, KritzelBrushTool as b, KritzelTextTool as c, KritzelKeyboardHelper as d,
|
|
15392
|
-
//# sourceMappingURL=
|
|
14687
|
+
export { KritzelText as K, KritzelPath as a, KritzelBrushTool as b, KritzelTextTool as c, KritzelKeyboardHelper as d, KritzelBaseObject as e, KritzelBaseTool as f, KritzelEventHelper as g, KritzelToolRegistry as h };
|
|
14688
|
+
//# sourceMappingURL=p-CBYBurdY.js.map
|
|
15393
14689
|
|
|
15394
|
-
//# sourceMappingURL=
|
|
14690
|
+
//# sourceMappingURL=p-CBYBurdY.js.map
|