edytor 1.0.0 → 3.0.0
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/README.md +26 -69
- package/dist/block/block.svelte.d.ts +6 -4
- package/dist/block/block.svelte.js +12 -8
- package/dist/block/inlineBlock.svelte.d.ts +6 -2
- package/dist/block/inlineBlock.svelte.js +7 -2
- package/dist/clipboard/htmlFlow.d.ts +20 -7
- package/dist/clipboard/htmlFlow.js +23 -15
- package/dist/clipboard/serializeClipboardFragment.d.ts +37 -4
- package/dist/clipboard/serializeClipboardFragment.js +6 -4
- package/dist/clipboard/textBlocks.d.ts +8 -0
- package/dist/clipboard/textBlocks.js +6 -2
- package/dist/cloudflare/room/admission.js +3 -3
- package/dist/cloudflare/room/context.d.ts +7 -1
- package/dist/cloudflare/routeDocumentSocket.d.ts +17 -0
- package/dist/cloudflare/routeDocumentSocket.js +53 -0
- package/dist/collaboration/awarenessSelection.d.ts +22 -1
- package/dist/collaboration/awarenessSelection.js +42 -0
- package/dist/collaboration/comments/client.d.ts +1 -1
- package/dist/collaboration/comments/client.js +1 -1
- package/dist/collaboration/remoteSelection.js +3 -3
- package/dist/components/Block.svelte +3 -1
- package/dist/components/Edytor.svelte +38 -20
- package/dist/components/Edytor.svelte.d.ts +9 -4
- package/dist/components/InlineBlock.svelte +1 -1
- package/dist/crdt/admission.d.ts +5 -10
- package/dist/crdt/admission.js +5 -11
- package/dist/crdt/data.d.ts +10 -0
- package/dist/crdt/data.js +20 -2
- package/dist/crdt/doc/funnel.d.ts +7 -6
- package/dist/crdt/doc/funnel.js +10 -9
- package/dist/crdt/doc/gate.d.ts +0 -17
- package/dist/crdt/doc/gate.js +2 -41
- package/dist/crdt/doc/history.js +2 -2
- package/dist/crdt/doc/reads.d.ts +7 -0
- package/dist/crdt/doc/reads.js +11 -1
- package/dist/crdt/document.d.ts +13 -14
- package/dist/crdt/document.js +17 -19
- package/dist/crdt/edytor-doc.d.ts +22 -4
- package/dist/crdt/edytor-doc.js +5 -8
- package/dist/crdt/index.d.ts +9 -3
- package/dist/crdt/index.js +2 -2
- package/dist/crdt/operations.d.ts +1 -1
- package/dist/crdt/operations.js +1 -0
- package/dist/crdt/props.d.ts +32 -0
- package/dist/crdt/props.js +172 -0
- package/dist/crdt/protocol.d.ts +2 -2
- package/dist/crdt/protocol.js +2 -2
- package/dist/crdt/providers/index.d.ts +1 -1
- package/dist/crdt/providers/room.d.ts +10 -9
- package/dist/crdt/providers/room.js +13 -10
- package/dist/crdt/providers/websocket.d.ts +1 -1
- package/dist/crdt/providers/websocket.js +28 -29
- package/dist/crdt/semantics.js +3 -1
- package/dist/dnd/autoScroll.d.ts +15 -7
- package/dist/dnd/autoScroll.js +10 -15
- package/dist/{plugins/blockHandles → dnd}/dropIndicator.d.ts +2 -2
- package/dist/{plugins/blockHandles → dnd}/dropIndicator.js +2 -5
- package/dist/dnd/external.d.ts +6 -0
- package/dist/dnd/external.js +17 -0
- package/dist/{plugins/blockHandles → dnd}/geometry.d.ts +4 -2
- package/dist/{plugins/blockHandles → dnd}/geometry.js +3 -4
- package/dist/dnd/placement.d.ts +200 -0
- package/dist/dnd/placement.js +426 -0
- package/dist/dnd/pragmatic.d.ts +3 -1
- package/dist/dnd/pragmatic.js +12 -2
- package/dist/dnd/vendor/pragmatic/UPSTREAM.md +51 -18
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/drop-target-for-external.d.ts +4 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/drop-target-for-external.js +6 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/element-adapter.d.ts +0 -2
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/element-adapter.js +4 -22
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/external-adapter-types.d.ts +26 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/external-adapter.d.ts +30 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/external-adapter.js +203 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/get-available-items.js +13 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/get-available-types.js +9 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/is-an-available-type.js +19 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/monitor-for-external.d.ts +4 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/adapter/monitor-for-external.js +6 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/honey-pot-fix/make-honey-pot-fix.js +4 -16
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/internal-types.d.ts +1 -8
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/make-adapter/make-drop-target.js +5 -6
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/make-adapter/make-monitor.js +2 -3
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/element/custom-native-drag-preview/set-custom-native-drag-preview.d.ts +1 -1
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/element/custom-native-drag-preview/set-custom-native-drag-preview.js +6 -24
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/external/contains-files.d.ts +2 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/external/contains-files.js +5 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/external/get-files.d.ts +3 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/external/get-files.js +12 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/external/native-types.d.ts +12 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/util/changing-window/is-entering-window-in-safari.js +10 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/util/changing-window/is-entering-window.js +55 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/entry-point/external.d.ts +4 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/entry-point/external.js +8 -0
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/internal-types.d.ts +0 -4
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/over-element/get-scroll-by.js +16 -72
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/over-element/try-scroll.js +1 -9
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/shared/configuration.js +4 -29
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/shared/get-scroll-change.js +2 -3
- package/dist/edytor.svelte.d.ts +19 -9
- package/dist/edytor.svelte.js +28 -33
- package/dist/events/beforeInputCommands.d.ts +2 -2
- package/dist/events/beforeInputCommands.js +8 -4
- package/dist/events/onBeforeInput.js +1 -1
- package/dist/events/onDrop.js +25 -10
- package/dist/events/onInput.d.ts +0 -12
- package/dist/events/onInput.js +1 -67
- package/dist/events/onPaste.d.ts +2 -1
- package/dist/events/onPaste.js +8 -3
- package/dist/export/forms.d.ts +627 -0
- package/dist/export/forms.js +749 -0
- package/dist/export/index.d.ts +170 -0
- package/dist/export/index.js +161 -0
- package/dist/export/markdown.d.ts +41 -0
- package/dist/export/markdown.js +585 -0
- package/dist/export/markdownWriter.d.ts +9 -0
- package/dist/export/markdownWriter.js +133 -0
- package/dist/export/mdx.d.ts +15 -0
- package/dist/export/mdx.js +33 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -2
- package/dist/kinds.js +1 -1
- package/dist/labels.d.ts +2 -0
- package/dist/labels.js +2 -1
- package/dist/plugins/anchored.svelte.d.ts +21 -25
- package/dist/plugins/anchored.svelte.js +23 -39
- package/dist/plugins/arrowMove/arrowMove.d.ts +1 -1
- package/dist/plugins/arrowMove/arrowMove.js +1 -1
- package/dist/plugins/blockHandles/BlockHandleController.svelte.d.ts +2 -122
- package/dist/plugins/blockHandles/BlockHandleController.svelte.js +48 -414
- package/dist/plugins/blockHandles/BlockHandles.svelte +14 -32
- package/dist/plugins/blockHandles/blockHandlesPlugin.js +2 -1
- package/dist/plugins/blockHandles/dragPreview.d.ts +26 -7
- package/dist/plugins/blockHandles/dragPreview.js +33 -0
- package/dist/plugins/blockMenu/BlockMenuController.svelte.d.ts +5 -0
- package/dist/plugins/blockMenu/BlockMenuController.svelte.js +7 -2
- package/dist/plugins/blockMenu/blockMenuPlugin.js +5 -50
- package/dist/plugins/chrome.d.ts +27 -5
- package/dist/plugins/chrome.js +24 -9
- package/dist/plugins/code/CodeHeader.svelte +5 -3
- package/dist/plugins/code/CodePlugin.svelte +15 -12
- package/dist/plugins/code/header.svelte.js +7 -11
- package/dist/plugins/code/languageMenu.svelte.d.ts +5 -2
- package/dist/plugins/code/languageMenu.svelte.js +13 -20
- package/dist/plugins/code/languages.d.ts +0 -3
- package/dist/plugins/code/languages.js +0 -2
- package/dist/plugins/columns/ColumnResize.svelte +3 -2
- package/dist/plugins/columns/ColumnsPlugin.svelte +8 -21
- package/dist/plugins/columns/gaps.d.ts +7 -5
- package/dist/plugins/columns/gaps.js +11 -6
- package/dist/plugins/columns/resize.svelte.d.ts +5 -6
- package/dist/plugins/columns/resize.svelte.js +12 -14
- package/dist/plugins/comments/CommentsController.svelte.d.ts +6 -0
- package/dist/plugins/comments/CommentsController.svelte.js +20 -0
- package/dist/plugins/equation/EquationPlugin.svelte +13 -30
- package/dist/plugins/equation/EquationPlugin.svelte.d.ts +1 -0
- package/dist/plugins/equation/equation.css +7 -0
- package/dist/plugins/equation/equation.svelte.d.ts +7 -15
- package/dist/plugins/equation/equation.svelte.js +13 -50
- package/dist/plugins/equation/tex.d.ts +17 -0
- package/dist/plugins/equation/tex.js +42 -0
- package/dist/plugins/fileDrop.d.ts +43 -0
- package/dist/plugins/fileDrop.js +122 -0
- package/dist/plugins/find/FindController.svelte.d.ts +5 -0
- package/dist/plugins/find/FindController.svelte.js +14 -14
- package/dist/plugins/find/findPlugin.js +1 -15
- package/dist/plugins/image/ImageChrome.svelte +8 -2
- package/dist/plugins/image/ImagePlugin.svelte +56 -84
- package/dist/plugins/image/ImagePlugin.svelte.d.ts +13 -1
- package/dist/plugins/image/controls.svelte.js +16 -2
- package/dist/plugins/image/image.css +17 -0
- package/dist/plugins/image/toolbar.svelte.d.ts +5 -4
- package/dist/plugins/image/toolbar.svelte.js +21 -31
- package/dist/plugins/index.d.ts +4 -5
- package/dist/plugins/index.js +0 -1
- package/dist/plugins/list.svelte.d.ts +9 -0
- package/dist/plugins/list.svelte.js +18 -0
- package/dist/plugins/markdownShortcuts.js +5 -5
- package/dist/plugins/marquee/marqueePlugin.js +0 -4
- package/dist/plugins/media/AudioPlugin.svelte +13 -1
- package/dist/plugins/media/AudioPlugin.svelte.d.ts +11 -1
- package/dist/plugins/media/BookmarkPlugin.svelte +6 -97
- package/dist/plugins/media/EmbedPlugin.svelte +5 -90
- package/dist/plugins/media/EmptySlot.svelte +36 -20
- package/dist/plugins/media/EmptySlot.svelte.d.ts +6 -15
- package/dist/plugins/media/FilePlugin.svelte +12 -20
- package/dist/plugins/media/FilePlugin.svelte.d.ts +9 -0
- package/dist/plugins/media/MediaEmpty.svelte +2 -55
- package/dist/plugins/media/MediaEmpty.svelte.d.ts +18 -14
- package/dist/plugins/media/SourceBlock.svelte +178 -52
- package/dist/plugins/media/SourceBlock.svelte.d.ts +13 -6
- package/dist/plugins/media/UploadPreview.svelte +32 -0
- package/dist/plugins/media/UploadPreview.svelte.d.ts +11 -0
- package/dist/plugins/media/VideoPlugin.svelte +13 -1
- package/dist/plugins/media/VideoPlugin.svelte.d.ts +11 -1
- package/dist/plugins/media/empty.svelte.d.ts +13 -4
- package/dist/plugins/media/empty.svelte.js +32 -26
- package/dist/plugins/media/media.d.ts +9 -63
- package/dist/plugins/media/media.js +1 -194
- package/dist/plugins/media/sources.d.ts +60 -0
- package/dist/plugins/media/sources.js +165 -0
- package/dist/plugins/media/upload.css +23 -0
- package/dist/plugins/media/urlPaste.svelte.d.ts +2 -1
- package/dist/plugins/media/urlPaste.svelte.js +12 -21
- package/dist/plugins/mention/MentionPlugin.svelte +50 -38
- package/dist/plugins/mention/MentionPlugin.svelte.d.ts +11 -2
- package/dist/plugins/mention/mention.css +6 -0
- package/dist/plugins/page/PagePlugin.svelte +2 -9
- package/dist/plugins/page/page.js +1 -1
- package/dist/plugins/pageLink/PageLinkPlugin.svelte +126 -28
- package/dist/plugins/pageLink/PageLinkPlugin.svelte.d.ts +13 -1
- package/dist/plugins/pageLink/pageLink.css +6 -0
- package/dist/plugins/richtext/RichTextPlugin.svelte +99 -204
- package/dist/plugins/richtext/RichTextPlugin.svelte.d.ts +1 -0
- package/dist/plugins/richtext/body.js +1 -1
- package/dist/plugins/richtext/calloutIcons.svelte.d.ts +2 -2
- package/dist/plugins/richtext/calloutIcons.svelte.js +5 -7
- package/dist/plugins/richtext/richTextOperations.d.ts +1 -19
- package/dist/plugins/richtext/richTextOperations.js +3 -49
- package/dist/plugins/richtext/richtext.css +6 -0
- package/dist/plugins/slashMenu/SlashMenuController.svelte.d.ts +2 -0
- package/dist/plugins/slashMenu/SlashMenuController.svelte.js +7 -0
- package/dist/plugins/slashMenu/slashMenuPlugin.js +5 -14
- package/dist/plugins/table/TableChrome.svelte +2 -3
- package/dist/plugins/table/TablePlugin.svelte +20 -54
- package/dist/plugins/table/chrome.svelte.d.ts +5 -2
- package/dist/plugins/table/chrome.svelte.js +33 -56
- package/dist/plugins/table/table.js +3 -3
- package/dist/plugins/toc/TocPlugin.svelte +2 -4
- package/dist/plugins/toolbar/ToolbarController.svelte.d.ts +7 -0
- package/dist/plugins/toolbar/ToolbarController.svelte.js +20 -13
- package/dist/plugins/toolbar/toolbarPlugin.js +19 -53
- package/dist/plugins/triggers/TriggerController.svelte.d.ts +7 -2
- package/dist/plugins/triggers/TriggerController.svelte.js +11 -4
- package/dist/plugins/triggers/place.js +1 -2
- package/dist/plugins/triggers/triggers.d.ts +6 -1
- package/dist/plugins/triggers/triggers.js +12 -13
- package/dist/plugins/uploads.svelte.d.ts +48 -32
- package/dist/plugins/uploads.svelte.js +119 -43
- package/dist/plugins.d.ts +66 -14
- package/dist/plugins.js +0 -24
- package/dist/selection/replaceSelection.js +2 -2
- package/dist/selection/selection.svelte.d.ts +4 -10
- package/dist/selection/selection.svelte.js +7 -11
- package/dist/session/attempt.d.ts +16 -6
- package/dist/session/attempt.js +1 -0
- package/dist/session/bindings.js +35 -32
- package/dist/session/commands.d.ts +7 -11
- package/dist/session/commands.js +15 -19
- package/dist/session/history.js +1 -0
- package/dist/session/inputRules.d.ts +6 -3
- package/dist/session/inputRules.js +10 -6
- package/dist/session/moves.d.ts +33 -0
- package/dist/session/moves.js +71 -1
- package/dist/session/navigation.d.ts +7 -0
- package/dist/session/navigation.js +20 -11
- package/dist/session/props.d.ts +28 -0
- package/dist/session/props.js +65 -0
- package/dist/session/suggestions.svelte.d.ts +0 -11
- package/dist/session/suggestions.svelte.js +15 -3
- package/dist/session/uploads.d.ts +29 -0
- package/dist/session/uploads.js +10 -0
- package/dist/surface/lines.js +1 -3
- package/dist/surface/observer.svelte.d.ts +17 -1
- package/dist/surface/observer.svelte.js +72 -17
- package/dist/surface/overlay.d.ts +0 -14
- package/dist/surface/overlay.js +0 -25
- package/dist/surface/projector.svelte.js +1 -1
- package/dist/text/text.svelte.js +3 -13
- package/dist/themes/notion.css +9 -0
- package/dist/utils/sanitize.d.ts +38 -0
- package/dist/utils/sanitize.js +82 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +5 -0
- package/package.json +18 -1
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/util/max-z-index.js +0 -3
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/util/supports-popover.js +0 -16
- package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/shared/is-axis-allowed.js +0 -3
- package/dist/plugins/code/LanguageMenu.svelte +0 -25
- package/dist/plugins/code/LanguageMenu.svelte.d.ts +0 -9
- package/dist/plugins/equation/EquationEditor.svelte +0 -27
- package/dist/plugins/equation/EquationEditor.svelte.d.ts +0 -9
- package/dist/plugins/image/ImageToolbarHost.svelte +0 -37
- package/dist/plugins/image/ImageToolbarHost.svelte.d.ts +0 -9
- package/dist/plugins/richtext/CalloutIconPicker.svelte +0 -26
- package/dist/plugins/richtext/CalloutIconPicker.svelte.d.ts +0 -9
- /package/dist/{plugins/columns → dnd}/stacking.d.ts +0 -0
- /package/dist/{plugins/columns → dnd}/stacking.js +0 -0
|
@@ -9,9 +9,8 @@ export function makeMonitor() {
|
|
|
9
9
|
// Monitor is allowed to monitor events if:
|
|
10
10
|
// 1. It has no `canMonitor` function (default is that a monitor can listen to everything)
|
|
11
11
|
// 2. `canMonitor` returns true
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
12
|
+
// edytor: no monitor sets `canMonitor`.
|
|
13
|
+
dragging.active.add(monitor);
|
|
15
14
|
}
|
|
16
15
|
function monitorForConsumers(args) {
|
|
17
16
|
// We are giving each `args` a new reference so that you
|
|
@@ -29,7 +29,7 @@ type RenderFn = ({ container, }: {
|
|
|
29
29
|
* });
|
|
30
30
|
*/
|
|
31
31
|
export declare function setCustomNativeDragPreview({ render, nativeSetDragImage, getOffset, }: {
|
|
32
|
-
getOffset
|
|
32
|
+
getOffset: GetOffsetFn;
|
|
33
33
|
render: RenderFn;
|
|
34
34
|
nativeSetDragImage: ElementEventPayloadMap['onGenerateDragPreview']['nativeSetDragImage'];
|
|
35
35
|
}): void;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { monitorForElements } from '../../../adapter/element-adapter.js';
|
|
2
2
|
import { isSafari } from '../../../util/is-safari.js';
|
|
3
|
-
import { maxZIndex } from '../../../util/max-z-index.js';
|
|
4
3
|
import { popoverResetUserAgentStyles } from '../../../util/popover-reset-styles.js';
|
|
5
|
-
import { supportsPopover } from '../../../util/supports-popover.js';
|
|
6
4
|
|
|
7
5
|
/** A function to remove the element that has been added to the `container`.
|
|
8
6
|
* @example () => root.unmount()
|
|
@@ -10,13 +8,6 @@ import { supportsPopover } from '../../../util/supports-popover.js';
|
|
|
10
8
|
|
|
11
9
|
/** A function that will render a preview element into a `container` `HTMLElement` */
|
|
12
10
|
|
|
13
|
-
/** By default we use the build in values for the native drag preview: {x: 0, y: 0} */
|
|
14
|
-
function defaultOffset() {
|
|
15
|
-
return {
|
|
16
|
-
x: 0,
|
|
17
|
-
y: 0
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
11
|
|
|
21
12
|
/** This function provides the ability to mount an element for it to be used as the native drag preview
|
|
22
13
|
*
|
|
@@ -37,7 +28,8 @@ function defaultOffset() {
|
|
|
37
28
|
export function setCustomNativeDragPreview({
|
|
38
29
|
render,
|
|
39
30
|
nativeSetDragImage,
|
|
40
|
-
|
|
31
|
+
// edytor: every caller gives its `getOffset`.
|
|
32
|
+
getOffset
|
|
41
33
|
}) {
|
|
42
34
|
const container = document.createElement('div');
|
|
43
35
|
|
|
@@ -50,23 +42,15 @@ export function setCustomNativeDragPreview({
|
|
|
50
42
|
// Falls back to position:fixed + maxZIndex when the popover API is not available.
|
|
51
43
|
// Note: the popover attribute must be set before the element is in the DOM.
|
|
52
44
|
// `.showPopover()` is called further below after the element is appended to the body.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
45
|
+
// edytor: every supported engine has the Popover API (no fallback).
|
|
46
|
+
container.setAttribute('popover', 'manual');
|
|
56
47
|
Object.assign(container.style, {
|
|
57
48
|
// Ensuring we don't cause reflow when adding the element to the page
|
|
58
49
|
// Using `position:fixed` rather than `position:absolute` so we are
|
|
59
50
|
// positioned on the current viewport.
|
|
60
51
|
// `position:fixed` also creates a new stacking context, so we don't need to do that here
|
|
61
52
|
position: 'fixed',
|
|
62
|
-
...
|
|
63
|
-
// needs to come first as it has 'inset: unset' which
|
|
64
|
-
// needs to be overridden by our top / left values
|
|
65
|
-
popoverResetUserAgentStyles : {
|
|
66
|
-
// Fallback: using maximum possible z-index so that this element
|
|
67
|
-
// will always be on top of other positioned content.
|
|
68
|
-
zIndex: maxZIndex
|
|
69
|
-
}),
|
|
53
|
+
...popoverResetUserAgentStyles,
|
|
70
54
|
// According to `mdn`, the element can be offscreen:
|
|
71
55
|
// https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setDragImage#imgelement
|
|
72
56
|
//
|
|
@@ -82,9 +66,7 @@ export function setCustomNativeDragPreview({
|
|
|
82
66
|
document.body.append(container);
|
|
83
67
|
|
|
84
68
|
// `.showPopover()` must be called after the element is in the DOM.
|
|
85
|
-
|
|
86
|
-
container.showPopover();
|
|
87
|
-
}
|
|
69
|
+
container.showPopover();
|
|
88
70
|
const unmount = render({
|
|
89
71
|
container
|
|
90
72
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Obtain an array of the dragged `File`s */
|
|
2
|
+
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
3
|
+
export function getFiles({
|
|
4
|
+
source
|
|
5
|
+
}) {
|
|
6
|
+
return source.items
|
|
7
|
+
// unlike other media types, for files:
|
|
8
|
+
// item.kind is 'file'
|
|
9
|
+
// item.type is the type of file eg 'image/jpg'
|
|
10
|
+
// for other media types, item.type is the mime format
|
|
11
|
+
.filter(item => item.kind === 'file').map(item => item.getAsFile()).filter(file => file != null);
|
|
12
|
+
}
|
package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/public-utils/external/native-types.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ExternalDragPayload } from '../../internal-types.js';
|
|
2
|
+
/** `ContainsSource` works for
|
|
3
|
+
* 1. `monitorForNative` > `canMonitor()`
|
|
4
|
+
* 2. `dropTargetForNative` > `canDrop()`
|
|
5
|
+
*
|
|
6
|
+
* We are also using `SourcePayload` as the parameter type for all native getters.
|
|
7
|
+
* For example, `getFiles({source}: SourcePayload)`
|
|
8
|
+
*/
|
|
9
|
+
export type ContainsSource = {
|
|
10
|
+
source: ExternalDragPayload;
|
|
11
|
+
};
|
|
12
|
+
export type PredicateFn = (args: ContainsSource) => boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isSafari } from '../is-safari.js';
|
|
2
|
+
import { symbols } from './count-events-for-safari.js';
|
|
3
|
+
export function isEnteringWindowInSafari({
|
|
4
|
+
dragEnter
|
|
5
|
+
}) {
|
|
6
|
+
if (!isSafari()) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
return dragEnter.hasOwnProperty(symbols.isEnteringWindow);
|
|
10
|
+
}
|
package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop/util/changing-window/is-entering-window.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { isFirefox } from '../is-firefox.js';
|
|
2
|
+
import { isSafari } from '../is-safari.js';
|
|
3
|
+
import { isEnteringWindowInSafari } from './is-entering-window-in-safari.js';
|
|
4
|
+
import { isFromAnotherWindow } from './is-from-another-window.js';
|
|
5
|
+
export function isEnteringWindow({
|
|
6
|
+
dragEnter
|
|
7
|
+
}) {
|
|
8
|
+
const {
|
|
9
|
+
type,
|
|
10
|
+
relatedTarget
|
|
11
|
+
} = dragEnter;
|
|
12
|
+
if (type !== 'dragenter') {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
if (isSafari()) {
|
|
16
|
+
return isEnteringWindowInSafari({
|
|
17
|
+
dragEnter
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// standard check
|
|
22
|
+
if (relatedTarget == null) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* 🦊 Exception: `iframe` in Firefox (`125.0`)
|
|
28
|
+
*
|
|
29
|
+
* Case 1: parent `window` → child `iframe`
|
|
30
|
+
* `relatedTarget` is the `iframe` element in the parent `window`
|
|
31
|
+
* (foreign element)
|
|
32
|
+
*
|
|
33
|
+
* Case 2: child `iframe` → parent `window`
|
|
34
|
+
* `relatedTarget` is an element inside the child `iframe`
|
|
35
|
+
* (foreign element)
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
if (isFirefox()) {
|
|
39
|
+
return isFromAnotherWindow(relatedTarget);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 🌏 Exception: `iframe` in Chrome (`124.0`)
|
|
44
|
+
*
|
|
45
|
+
* Case 1: parent `window` → child `iframe`
|
|
46
|
+
* `relatedTarget` is `null` *(standard check)*
|
|
47
|
+
*
|
|
48
|
+
* Case 2: child `iframe` → parent `window`
|
|
49
|
+
* `relatedTarget` is the `iframe` element in the parent `window`
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
// Case 2
|
|
53
|
+
// Using `instanceof` check as the element will be in the same `window`
|
|
54
|
+
return relatedTarget instanceof HTMLIFrameElement;
|
|
55
|
+
}
|
package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/entry-point/external.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ExternalDragType, CleanupFn } from '../../pragmatic-drag-and-drop/entry-point/types.js';
|
|
2
|
+
import type { ElementAutoScrollArgs, WindowAutoScrollArgs } from '../internal-types.js';
|
|
3
|
+
export declare const autoScrollForExternal: (args: ElementAutoScrollArgs<ExternalDragType>) => CleanupFn;
|
|
4
|
+
export declare const autoScrollWindowForExternal: (args?: WindowAutoScrollArgs<ExternalDragType>) => CleanupFn;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { monitorForExternal } from '../../pragmatic-drag-and-drop/adapter/monitor-for-external.js';
|
|
2
|
+
import { makeApi } from '../over-element/make-api.js';
|
|
3
|
+
const api = makeApi({
|
|
4
|
+
monitor: monitorForExternal
|
|
5
|
+
});
|
|
6
|
+
export const autoScrollForExternal = api.autoScroll;
|
|
7
|
+
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
8
|
+
export const autoScrollWindowForExternal = api.autoScrollWindow;
|
|
@@ -37,13 +37,9 @@ export type PublicConfig = Partial<{
|
|
|
37
37
|
export type ElementAutoScrollArgs<DragType extends AllDragTypes> = {
|
|
38
38
|
element: Element;
|
|
39
39
|
canScroll?: (args: ElementGetFeedbackArgs<DragType>) => boolean;
|
|
40
|
-
getAllowedAxis?: (args: ElementGetFeedbackArgs<DragType>) => AllowedAxis;
|
|
41
|
-
getConfiguration?: (args: ElementGetFeedbackArgs<DragType>) => PublicConfig;
|
|
42
40
|
};
|
|
43
41
|
export type WindowAutoScrollArgs<DragType extends AllDragTypes> = {
|
|
44
42
|
canScroll?: (args: WindowGetFeedbackArgs<DragType>) => boolean;
|
|
45
|
-
getAllowedAxis?: (args: WindowGetFeedbackArgs<DragType>) => AllowedAxis;
|
|
46
|
-
getConfiguration?: (args: WindowGetFeedbackArgs<DragType>) => PublicConfig;
|
|
47
43
|
};
|
|
48
44
|
export type Side = 'start' | 'end';
|
|
49
45
|
export type Axis = 'vertical' | 'horizontal';
|
package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/over-element/get-scroll-by.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { canScrollOnEdge } from '../shared/can-scroll-on-edge.js';
|
|
2
|
-
import {
|
|
2
|
+
import { edges } from '../shared/edges.js';
|
|
3
3
|
import { getOverElementHitbox } from '../shared/get-over-element-hitbox.js';
|
|
4
4
|
import { getScrollChange } from '../shared/get-scroll-change.js';
|
|
5
|
-
import { isAxisAllowed } from '../shared/is-axis-allowed.js';
|
|
6
5
|
import { isWithin } from '../shared/is-within.js';
|
|
7
6
|
function getRectDefault(element) {
|
|
8
7
|
return element.getBoundingClientRect();
|
|
@@ -13,7 +12,6 @@ export function getScrollBy({
|
|
|
13
12
|
timeSinceLastFrame,
|
|
14
13
|
engagement,
|
|
15
14
|
config,
|
|
16
|
-
allowedAxis,
|
|
17
15
|
getRect = getRectDefault
|
|
18
16
|
}) {
|
|
19
17
|
const client = {
|
|
@@ -26,15 +24,6 @@ export function getScrollBy({
|
|
|
26
24
|
clientRect,
|
|
27
25
|
config
|
|
28
26
|
});
|
|
29
|
-
const axis = edgeAxisLookup[edge];
|
|
30
|
-
|
|
31
|
-
// Note: changing the allowed axis during a drag will not
|
|
32
|
-
// reset time dampening. It was decided it would be too
|
|
33
|
-
// complex to implement initially, and we can add it
|
|
34
|
-
// later if needed.
|
|
35
|
-
if (!isAxisAllowed(axis, allowedAxis)) {
|
|
36
|
-
return map;
|
|
37
|
-
}
|
|
38
27
|
if (!isWithin({
|
|
39
28
|
client,
|
|
40
29
|
clientRect: hitbox
|
|
@@ -50,66 +39,21 @@ export function getScrollBy({
|
|
|
50
39
|
});
|
|
51
40
|
return map;
|
|
52
41
|
}, new Map());
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
const rightEdge = scrollableEdges.get('right');
|
|
69
|
-
if (rightEdge) {
|
|
70
|
-
return getScrollChange({
|
|
71
|
-
client,
|
|
72
|
-
edge: rightEdge.edge,
|
|
73
|
-
hitbox: rightEdge.hitbox,
|
|
74
|
-
axis,
|
|
75
|
-
timeSinceLastFrame,
|
|
76
|
-
engagement,
|
|
77
|
-
isDistanceDampeningEnabled: true,
|
|
78
|
-
config
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
return 0;
|
|
82
|
-
})();
|
|
83
|
-
const top = (() => {
|
|
84
|
-
const axis = 'vertical';
|
|
85
|
-
const bottomEdge = scrollableEdges.get('bottom');
|
|
86
|
-
if (bottomEdge) {
|
|
87
|
-
return getScrollChange({
|
|
88
|
-
client,
|
|
89
|
-
edge: bottomEdge.edge,
|
|
90
|
-
hitbox: bottomEdge.hitbox,
|
|
91
|
-
axis,
|
|
92
|
-
timeSinceLastFrame,
|
|
93
|
-
engagement,
|
|
94
|
-
isDistanceDampeningEnabled: true,
|
|
95
|
-
config
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
const topEdge = scrollableEdges.get('top');
|
|
99
|
-
if (topEdge) {
|
|
100
|
-
return getScrollChange({
|
|
101
|
-
client,
|
|
102
|
-
edge: topEdge.edge,
|
|
103
|
-
hitbox: topEdge.hitbox,
|
|
104
|
-
axis,
|
|
105
|
-
timeSinceLastFrame,
|
|
106
|
-
engagement,
|
|
107
|
-
isDistanceDampeningEnabled: true,
|
|
108
|
-
config
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
return 0;
|
|
112
|
-
})();
|
|
42
|
+
// edytor: one change per axis, the first of its edges the pointer is over.
|
|
43
|
+
const change = (axis, first, second) => {
|
|
44
|
+
const entry = scrollableEdges.get(first) ?? scrollableEdges.get(second);
|
|
45
|
+
return entry ? getScrollChange({
|
|
46
|
+
client,
|
|
47
|
+
edge: entry.edge,
|
|
48
|
+
hitbox: entry.hitbox,
|
|
49
|
+
axis,
|
|
50
|
+
timeSinceLastFrame,
|
|
51
|
+
engagement,
|
|
52
|
+
config
|
|
53
|
+
}) : 0;
|
|
54
|
+
};
|
|
55
|
+
const left = change('horizontal', 'left', 'right');
|
|
56
|
+
const top = change('vertical', 'bottom', 'top');
|
|
113
57
|
return {
|
|
114
58
|
left,
|
|
115
59
|
top
|
package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/over-element/try-scroll.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { internalConfig as config } from '../shared/configuration.js';
|
|
2
2
|
import { markAndGetEngagement } from '../shared/engagement-history.js';
|
|
3
3
|
import { selector } from './data-attributes.js';
|
|
4
4
|
import { getScrollBy } from './get-scroll-by.js';
|
|
@@ -16,7 +16,6 @@ function tryScrollElements({
|
|
|
16
16
|
left: true
|
|
17
17
|
}
|
|
18
18
|
}) {
|
|
19
|
-
var _container$getConfigu, _container$getAllowed, _container$getAllowed2;
|
|
20
19
|
// we cannot do any more scrolling
|
|
21
20
|
if (!isScrollingAvailable(available)) {
|
|
22
21
|
return available;
|
|
@@ -64,14 +63,11 @@ function tryScrollElements({
|
|
|
64
63
|
// Marking engagement even if no edges are scrollable.
|
|
65
64
|
// We are marking engagement as soon as the element is scrolled over
|
|
66
65
|
const engagement = markAndGetEngagement(element);
|
|
67
|
-
const config = getInternalConfig((_container$getConfigu = container.getConfiguration) === null || _container$getConfigu === void 0 ? void 0 : _container$getConfigu.call(container, feedback));
|
|
68
|
-
const allowedAxis = (_container$getAllowed = (_container$getAllowed2 = container.getAllowedAxis) === null || _container$getAllowed2 === void 0 ? void 0 : _container$getAllowed2.call(container, feedback)) !== null && _container$getAllowed !== void 0 ? _container$getAllowed : 'all';
|
|
69
66
|
const scrollBy = getScrollBy({
|
|
70
67
|
element,
|
|
71
68
|
engagement,
|
|
72
69
|
input,
|
|
73
70
|
timeSinceLastFrame,
|
|
74
|
-
allowedAxis,
|
|
75
71
|
config
|
|
76
72
|
});
|
|
77
73
|
|
|
@@ -111,7 +107,6 @@ function tryScrollWindow({
|
|
|
111
107
|
element
|
|
112
108
|
};
|
|
113
109
|
for (const entry of entries) {
|
|
114
|
-
var _entry$getConfigurati, _entry$getAllowedAxis, _entry$getAllowedAxis2;
|
|
115
110
|
// this entry is not allowing scrolling, we need to look for another
|
|
116
111
|
if (entry.canScroll && !entry.canScroll(feedback)) {
|
|
117
112
|
continue;
|
|
@@ -120,14 +115,11 @@ function tryScrollWindow({
|
|
|
120
115
|
// Note: if we had an event for when the user is leaving a tab
|
|
121
116
|
// we _could_ conceptually reset the engagement
|
|
122
117
|
const engagement = markAndGetEngagement(element);
|
|
123
|
-
const config = getInternalConfig((_entry$getConfigurati = entry.getConfiguration) === null || _entry$getConfigurati === void 0 ? void 0 : _entry$getConfigurati.call(entry, feedback));
|
|
124
|
-
const allowedAxis = (_entry$getAllowedAxis = (_entry$getAllowedAxis2 = entry.getAllowedAxis) === null || _entry$getAllowedAxis2 === void 0 ? void 0 : _entry$getAllowedAxis2.call(entry, feedback)) !== null && _entry$getAllowedAxis !== void 0 ? _entry$getAllowedAxis : 'all';
|
|
125
118
|
const scrollBy = getScrollBy({
|
|
126
119
|
element,
|
|
127
120
|
engagement,
|
|
128
121
|
input,
|
|
129
122
|
config,
|
|
130
|
-
allowedAxis,
|
|
131
123
|
getRect: element => DOMRect.fromRect({
|
|
132
124
|
y: 0,
|
|
133
125
|
x: 0,
|
package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/shared/configuration.js
CHANGED
|
@@ -17,33 +17,8 @@ const baseConfig = {
|
|
|
17
17
|
maxMainAxisHitboxSize: 180
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*
|
|
24
|
-
* I explored trying to make the max scroll speed dynamic based on particular factors.
|
|
25
|
-
* However, it ended up being difficult to find a _perfect_ formula.
|
|
26
|
-
*
|
|
27
|
-
* Likely the perfect answer would involve:
|
|
28
|
-
* - the size of the scrollable element
|
|
29
|
-
* - the size of the scrollable element relative to the screen size
|
|
30
|
-
* - the size of the drag preview
|
|
31
|
-
* - the size of elements being scrolled in scrollable elements (expensive and difficult to compute)
|
|
32
|
-
*/
|
|
33
|
-
const maxPixelScrollPerSecond = {
|
|
34
|
-
// What the value would be if we were scrolling at 15px per frame at 60fps.
|
|
35
|
-
// This is the default as it works well for most experiences.
|
|
36
|
-
// In certain scenarios though it can feel a bit slow.
|
|
37
|
-
standard: 15 * 60,
|
|
38
|
-
// What the value would be if we were scrolling at 25px per frame at 60fps.
|
|
39
|
-
// This is not the default as it feels too fast for a lot of experiences.
|
|
40
|
-
fast: 25 * 60
|
|
20
|
+
// edytor: no element sets `getConfiguration`: the standard speed only.
|
|
21
|
+
export const internalConfig = {
|
|
22
|
+
...baseConfig,
|
|
23
|
+
maxPixelScrollPerSecond: 15 * 60
|
|
41
24
|
};
|
|
42
|
-
export function getInternalConfig(provided) {
|
|
43
|
-
var _provided$maxScrollSp;
|
|
44
|
-
return {
|
|
45
|
-
...baseConfig,
|
|
46
|
-
// only allowing limited control over the config at this stage
|
|
47
|
-
maxPixelScrollPerSecond: maxPixelScrollPerSecond[(_provided$maxScrollSp = provided === null || provided === void 0 ? void 0 : provided.maxScrollSpeed) !== null && _provided$maxScrollSp !== void 0 ? _provided$maxScrollSp : 'standard']
|
|
48
|
-
};
|
|
49
|
-
}
|
package/dist/dnd/vendor/pragmatic/pragmatic-drag-and-drop-auto-scroll/shared/get-scroll-change.js
CHANGED
|
@@ -62,7 +62,6 @@ export function getScrollChange({
|
|
|
62
62
|
axis,
|
|
63
63
|
hitbox,
|
|
64
64
|
edge,
|
|
65
|
-
isDistanceDampeningEnabled,
|
|
66
65
|
config
|
|
67
66
|
}) {
|
|
68
67
|
// We have two forms of speed dampening:
|
|
@@ -77,13 +76,13 @@ export function getScrollChange({
|
|
|
77
76
|
timeSinceLastFrame,
|
|
78
77
|
config
|
|
79
78
|
});
|
|
80
|
-
const percentageDistanceDampening =
|
|
79
|
+
const percentageDistanceDampening = getDistanceDampening({
|
|
81
80
|
client,
|
|
82
81
|
edge,
|
|
83
82
|
hitbox,
|
|
84
83
|
axis,
|
|
85
84
|
config
|
|
86
|
-
})
|
|
85
|
+
});
|
|
87
86
|
|
|
88
87
|
// Dampen speed by time
|
|
89
88
|
const percentageThroughTimeDampening = getPercentageInRange({
|
package/dist/edytor.svelte.d.ts
CHANGED
|
@@ -18,6 +18,15 @@ import { Dispatcher } from './session/commands.js';
|
|
|
18
18
|
import { type KindRow } from './kinds.js';
|
|
19
19
|
export type EdytorOptions = {
|
|
20
20
|
readonly?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Let users nest blocks under other blocks (default `false`): Tab and
|
|
23
|
+
* Shift+Tab nest and unnest, a drop or a handle's Alt+→ may place a block
|
|
24
|
+
* inside another. Off, those gestures nest nothing and Tab is left to the
|
|
25
|
+
* browser (the focus moves on); containers (lists, toggles, callouts,
|
|
26
|
+
* columns) keep their bodies, and nested blocks already in the document
|
|
27
|
+
* still render and edit.
|
|
28
|
+
*/
|
|
29
|
+
allowNesting?: boolean;
|
|
21
30
|
/** Chords (`mod+s`, `shift+alt+enter`) the view binds before plugins and built-ins. */
|
|
22
31
|
hotkeys?: Partial<Record<HotKeyCombination, HotKey>>;
|
|
23
32
|
plugins?: Plugin[];
|
|
@@ -25,12 +34,9 @@ export type EdytorOptions = {
|
|
|
25
34
|
* The assembled document this view renders — shared facade, history,
|
|
26
35
|
* awareness and semantics live on it (see `crdt/document.ts`). When
|
|
27
36
|
* injected the view borrows it: `destroy()` releases only view-owned
|
|
28
|
-
* resources. When absent the view
|
|
29
|
-
* around `doc`/`awareness` (the legacy path — same behavior as before).
|
|
37
|
+
* resources. When absent the view owns a fresh one.
|
|
30
38
|
*/
|
|
31
39
|
document?: EdytorDocument;
|
|
32
|
-
doc?: YDoc;
|
|
33
|
-
awareness?: Awareness;
|
|
34
40
|
/** The local author of a view-owned document (with `document`, set it there). */
|
|
35
41
|
actor?: DocumentActor;
|
|
36
42
|
/** A view-owned document's `requireHydration` (with `document`, set it there). */
|
|
@@ -100,11 +106,13 @@ export declare class Edytor {
|
|
|
100
106
|
/** What the components render: one cell per visible block, patched from change reports. */
|
|
101
107
|
cells: Cells | undefined;
|
|
102
108
|
/**
|
|
103
|
-
* The document's properties,
|
|
104
|
-
*
|
|
105
|
-
*
|
|
109
|
+
* The document's properties, as plain state: reactive at any depth, and
|
|
110
|
+
* writable (`edytor.data.title = 'Notes'`, `edytor.data.tags.push('x')`,
|
|
111
|
+
* `delete edytor.data.draft`). Each write is the `patchData` operation,
|
|
112
|
+
* dispatched; the writes of one task are one undo step. Type them by
|
|
113
|
+
* augmenting {@link EdytorDocData}.
|
|
106
114
|
*/
|
|
107
|
-
get data():
|
|
115
|
+
get data(): EdytorDocData;
|
|
108
116
|
/** The chrome layer outside the host: handles, menus, remote carets. */
|
|
109
117
|
readonly overlay: Overlay;
|
|
110
118
|
/** The chrome popups open on this view (`surface/popups`): what the root's ARIA names. */
|
|
@@ -113,6 +121,8 @@ export declare class Edytor {
|
|
|
113
121
|
readonly announcer: AnnouncerState;
|
|
114
122
|
/** The words the view was given (`<Edytor labels>`); its plugins read their section through `labelsOf`. */
|
|
115
123
|
readonly labels: PartialLabels;
|
|
124
|
+
/** Whether users may nest blocks (`allowNesting`, read once; the rule is `session/moves.ts` `nestsInto`). */
|
|
125
|
+
readonly allowNesting: boolean;
|
|
116
126
|
private off;
|
|
117
127
|
private onChange?;
|
|
118
128
|
private onDocChange?;
|
|
@@ -208,7 +218,7 @@ export declare class Edytor {
|
|
|
208
218
|
* discarded.
|
|
209
219
|
*
|
|
210
220
|
* Releases every listener the editor holds on potentially-SHARED objects
|
|
211
|
-
* — an injected
|
|
221
|
+
* — an injected document outlives a single editor, so an
|
|
212
222
|
* undestroyed mount leaks a facade `update` listener and the undo
|
|
213
223
|
* manager's doc observers forever.
|
|
214
224
|
*
|