@atlaskit/editor-core 187.19.0 → 187.20.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/CHANGELOG.md +20 -0
- package/dist/cjs/plugins/emoji/commands/insert-emoji.js +21 -20
- package/dist/cjs/plugins/emoji/index.js +16 -5
- package/dist/cjs/plugins/index.js +2 -2
- package/dist/cjs/plugins/insert-block/index.js +3 -7
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +4 -3
- package/dist/cjs/plugins/media/index.js +4 -3
- package/dist/cjs/plugins/media/pm-plugins/alt-text/commands.js +10 -7
- package/dist/cjs/plugins/media/pm-plugins/alt-text/keymap.js +2 -2
- package/dist/cjs/plugins/media/pm-plugins/main.js +22 -10
- package/dist/cjs/plugins/media/toolbar/alt-text.js +2 -2
- package/dist/cjs/plugins/media/toolbar/index.js +33 -19
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +15 -3
- package/dist/cjs/plugins/media/utils/media-single.js +13 -13
- package/dist/cjs/plugins/paste/handlers.js +2 -2
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/cjs/plugins/paste/pm-plugins/main.js +4 -4
- package/dist/cjs/plugins/selection/gap-cursor/styles.js +1 -1
- package/dist/cjs/plugins/selection/gap-cursor/utils/place-gap-cursor.js +3 -3
- package/dist/cjs/plugins/selection/gap-cursor/utils.js +6 -3
- package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +3 -3
- package/dist/cjs/plugins/text-color/commands/toggle-color.js +3 -2
- package/dist/cjs/utils/document.js +6 -24
- package/dist/cjs/utils/index.js +33 -105
- package/dist/cjs/utils/prosemirror/position.js +33 -41
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/emoji/commands/insert-emoji.js +24 -20
- package/dist/es2019/plugins/emoji/index.js +14 -4
- package/dist/es2019/plugins/index.js +1 -1
- package/dist/es2019/plugins/insert-block/index.js +3 -7
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +6 -3
- package/dist/es2019/plugins/media/index.js +6 -3
- package/dist/es2019/plugins/media/pm-plugins/alt-text/commands.js +3 -2
- package/dist/es2019/plugins/media/pm-plugins/alt-text/keymap.js +2 -2
- package/dist/es2019/plugins/media/pm-plugins/main.js +16 -7
- package/dist/es2019/plugins/media/toolbar/alt-text.js +2 -2
- package/dist/es2019/plugins/media/toolbar/index.js +34 -21
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +17 -4
- package/dist/es2019/plugins/media/utils/media-single.js +7 -8
- package/dist/es2019/plugins/paste/handlers.js +2 -3
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/es2019/plugins/paste/pm-plugins/main.js +4 -4
- package/dist/es2019/plugins/selection/gap-cursor/styles.js +2 -1
- package/dist/es2019/plugins/selection/gap-cursor/utils/place-gap-cursor.js +4 -4
- package/dist/es2019/plugins/selection/gap-cursor/utils.js +5 -2
- package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +4 -4
- package/dist/es2019/plugins/text-color/commands/toggle-color.js +3 -2
- package/dist/es2019/utils/document.js +1 -20
- package/dist/es2019/utils/index.js +1 -99
- package/dist/es2019/utils/prosemirror/position.js +1 -51
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/emoji/commands/insert-emoji.js +21 -20
- package/dist/esm/plugins/emoji/index.js +14 -4
- package/dist/esm/plugins/index.js +1 -1
- package/dist/esm/plugins/insert-block/index.js +3 -7
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +4 -3
- package/dist/esm/plugins/media/index.js +4 -3
- package/dist/esm/plugins/media/pm-plugins/alt-text/commands.js +10 -7
- package/dist/esm/plugins/media/pm-plugins/alt-text/keymap.js +2 -2
- package/dist/esm/plugins/media/pm-plugins/main.js +18 -7
- package/dist/esm/plugins/media/toolbar/alt-text.js +2 -2
- package/dist/esm/plugins/media/toolbar/index.js +35 -21
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +16 -4
- package/dist/esm/plugins/media/utils/media-single.js +7 -7
- package/dist/esm/plugins/paste/handlers.js +2 -3
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +2 -2
- package/dist/esm/plugins/paste/pm-plugins/main.js +4 -4
- package/dist/esm/plugins/selection/gap-cursor/styles.js +1 -1
- package/dist/esm/plugins/selection/gap-cursor/utils/place-gap-cursor.js +4 -4
- package/dist/esm/plugins/selection/gap-cursor/utils.js +5 -2
- package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +4 -4
- package/dist/esm/plugins/text-color/commands/toggle-color.js +3 -2
- package/dist/esm/utils/document.js +1 -22
- package/dist/esm/utils/index.js +1 -97
- package/dist/esm/utils/prosemirror/position.js +1 -39
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/labs/next/presets/default.d.ts +32 -32
- package/dist/types/plugins/emoji/commands/insert-emoji.d.ts +2 -2
- package/dist/types/plugins/emoji/index.d.ts +9 -4
- package/dist/types/plugins/index.d.ts +1 -1
- package/dist/types/plugins/insert-block/index.d.ts +3 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +0 -1
- package/dist/types/plugins/media/pm-plugins/alt-text/commands.d.ts +2 -1
- package/dist/types/plugins/media/pm-plugins/alt-text/keymap.d.ts +2 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +3 -0
- package/dist/types/plugins/media/pm-plugins/types.d.ts +2 -0
- package/dist/types/plugins/media/toolbar/alt-text.d.ts +2 -1
- package/dist/types/plugins/media/toolbar/index.d.ts +1 -2
- package/dist/types/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +1 -0
- package/dist/types/plugins/media/utils/media-single.d.ts +3 -3
- package/dist/types/plugins/paste/handlers.d.ts +2 -1
- package/dist/types/plugins/paste/index.d.ts +3 -1
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +2 -1
- package/dist/types/plugins/selection/gap-cursor/utils.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/utils/document.d.ts +2 -7
- package/dist/types/utils/index.d.ts +2 -6
- package/dist/types/utils/prosemirror/position.d.ts +1 -8
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +32 -32
- package/dist/types-ts4.5/plugins/emoji/commands/insert-emoji.d.ts +2 -2
- package/dist/types-ts4.5/plugins/emoji/index.d.ts +9 -4
- package/dist/types-ts4.5/plugins/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/alt-text/commands.d.ts +2 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/alt-text/keymap.d.ts +2 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/main.d.ts +3 -0
- package/dist/types-ts4.5/plugins/media/pm-plugins/types.d.ts +2 -0
- package/dist/types-ts4.5/plugins/media/toolbar/alt-text.d.ts +2 -1
- package/dist/types-ts4.5/plugins/media/toolbar/index.d.ts +1 -2
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +1 -0
- package/dist/types-ts4.5/plugins/media/utils/media-single.d.ts +3 -3
- package/dist/types-ts4.5/plugins/paste/handlers.d.ts +2 -1
- package/dist/types-ts4.5/plugins/paste/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/paste/pm-plugins/analytics.d.ts +2 -1
- package/dist/types-ts4.5/plugins/selection/gap-cursor/utils.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/utils/document.d.ts +2 -7
- package/dist/types-ts4.5/utils/index.d.ts +2 -6
- package/dist/types-ts4.5/utils/prosemirror/position.d.ts +1 -8
- package/package.json +4 -4
- package/report.api.md +5 -0
- package/tmp/api-report-tmp.d.ts +5 -1
package/dist/esm/utils/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
|
|
|
2
2
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
3
3
|
import { FakeTextCursorSelection } from '../plugins/fake-text-cursor/cursor';
|
|
4
4
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
-
|
|
5
|
+
export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem } from '@atlaskit/editor-common/utils';
|
|
6
6
|
export { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
7
7
|
export { isNodeEmpty, findFarthestParentNode, isSelectionEndOfParagraph, nodesBetweenChanged, getNodesCount } from './document';
|
|
8
8
|
export { sanitiseMarksInSelection } from './mark';
|
|
@@ -15,11 +15,6 @@ function isMarkTypeCompatibleWithMark(markType, mark) {
|
|
|
15
15
|
function isMarkTypeAllowedInNode(markType, state) {
|
|
16
16
|
return toggleMark(markType)(state);
|
|
17
17
|
}
|
|
18
|
-
export function isSelectionInsideLastNodeInDocument(selection) {
|
|
19
|
-
var docNode = selection.$anchor.node(0);
|
|
20
|
-
var rootNode = selection.$anchor.node(1);
|
|
21
|
-
return docNode.lastChild === rootNode;
|
|
22
|
-
}
|
|
23
18
|
export function getCursor(selection) {
|
|
24
19
|
return selection.$cursor || undefined;
|
|
25
20
|
}
|
|
@@ -67,36 +62,6 @@ export function isMarkTypeAllowedInCurrentSelection(markType, state) {
|
|
|
67
62
|
return allowedInActiveMarks;
|
|
68
63
|
});
|
|
69
64
|
}
|
|
70
|
-
export function checkNodeDown(selection, doc, filter) {
|
|
71
|
-
var ancestorDepth = findAncestorPosition(doc, selection.$to).depth;
|
|
72
|
-
|
|
73
|
-
// Top level node
|
|
74
|
-
if (ancestorDepth === 0) {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
var res = doc.resolve(selection.$to.after(ancestorDepth));
|
|
78
|
-
return res.nodeAfter ? filter(res.nodeAfter) : false;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Traverse the document until an "ancestor" is found. Any nestable block can be an ancestor.
|
|
83
|
-
*/
|
|
84
|
-
function findAncestorPosition(doc, pos) {
|
|
85
|
-
var nestableBlocks = ['blockquote', 'bulletList', 'orderedList'];
|
|
86
|
-
if (pos.depth === 1) {
|
|
87
|
-
return pos;
|
|
88
|
-
}
|
|
89
|
-
var node = pos.node(pos.depth);
|
|
90
|
-
var newPos = pos;
|
|
91
|
-
while (pos.depth >= 1) {
|
|
92
|
-
pos = doc.resolve(pos.before(pos.depth));
|
|
93
|
-
node = pos.node(pos.depth);
|
|
94
|
-
if (node && nestableBlocks.indexOf(node.type.name) !== -1) {
|
|
95
|
-
newPos = pos;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return newPos;
|
|
99
|
-
}
|
|
100
65
|
var transformer = new JSONTransformer();
|
|
101
66
|
export function toJSON(node) {
|
|
102
67
|
return transformer.encode(node);
|
|
@@ -142,67 +107,6 @@ export function whichTransitionEvent() {
|
|
|
142
107
|
export var isTemporary = function isTemporary(id) {
|
|
143
108
|
return id.indexOf('temporary:') === 0;
|
|
144
109
|
};
|
|
145
|
-
export var isEmptyNode = function isEmptyNode(schema) {
|
|
146
|
-
var _schema$nodes = schema.nodes,
|
|
147
|
-
doc = _schema$nodes.doc,
|
|
148
|
-
paragraph = _schema$nodes.paragraph,
|
|
149
|
-
codeBlock = _schema$nodes.codeBlock,
|
|
150
|
-
blockquote = _schema$nodes.blockquote,
|
|
151
|
-
panel = _schema$nodes.panel,
|
|
152
|
-
heading = _schema$nodes.heading,
|
|
153
|
-
listItem = _schema$nodes.listItem,
|
|
154
|
-
bulletList = _schema$nodes.bulletList,
|
|
155
|
-
orderedList = _schema$nodes.orderedList,
|
|
156
|
-
taskList = _schema$nodes.taskList,
|
|
157
|
-
taskItem = _schema$nodes.taskItem,
|
|
158
|
-
decisionList = _schema$nodes.decisionList,
|
|
159
|
-
decisionItem = _schema$nodes.decisionItem,
|
|
160
|
-
media = _schema$nodes.media,
|
|
161
|
-
mediaGroup = _schema$nodes.mediaGroup,
|
|
162
|
-
mediaSingle = _schema$nodes.mediaSingle;
|
|
163
|
-
var innerIsEmptyNode = function innerIsEmptyNode(node) {
|
|
164
|
-
switch (node.type) {
|
|
165
|
-
case media:
|
|
166
|
-
case mediaGroup:
|
|
167
|
-
case mediaSingle:
|
|
168
|
-
return false;
|
|
169
|
-
case paragraph:
|
|
170
|
-
case codeBlock:
|
|
171
|
-
case heading:
|
|
172
|
-
case taskItem:
|
|
173
|
-
case decisionItem:
|
|
174
|
-
return node.content.size === 0;
|
|
175
|
-
case blockquote:
|
|
176
|
-
case panel:
|
|
177
|
-
case listItem:
|
|
178
|
-
return node.content.size === 2 && innerIsEmptyNode(node.content.firstChild);
|
|
179
|
-
case bulletList:
|
|
180
|
-
case orderedList:
|
|
181
|
-
return node.content.size === 4 && innerIsEmptyNode(node.content.firstChild);
|
|
182
|
-
case taskList:
|
|
183
|
-
case decisionList:
|
|
184
|
-
return node.content.size === 2 && innerIsEmptyNode(node.content.firstChild);
|
|
185
|
-
case doc:
|
|
186
|
-
var isEmpty = true;
|
|
187
|
-
node.content.forEach(function (child) {
|
|
188
|
-
isEmpty = isEmpty && innerIsEmptyNode(child);
|
|
189
|
-
});
|
|
190
|
-
return isEmpty;
|
|
191
|
-
default:
|
|
192
|
-
return isNodeEmpty(node);
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
return innerIsEmptyNode;
|
|
196
|
-
};
|
|
197
|
-
export var insideTableCell = function insideTableCell(state) {
|
|
198
|
-
var _state$schema$nodes = state.schema.nodes,
|
|
199
|
-
tableCell = _state$schema$nodes.tableCell,
|
|
200
|
-
tableHeader = _state$schema$nodes.tableHeader;
|
|
201
|
-
return hasParentNodeOfType([tableCell, tableHeader])(state.selection);
|
|
202
|
-
};
|
|
203
|
-
export var isInListItem = function isInListItem(state) {
|
|
204
|
-
return hasParentNodeOfType(state.schema.nodes.listItem)(state.selection);
|
|
205
|
-
};
|
|
206
110
|
export var hasOpenEnd = function hasOpenEnd(slice) {
|
|
207
111
|
return slice.openStart > 0 || slice.openEnd > 0;
|
|
208
112
|
};
|
|
@@ -1,39 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { GapCursorSelection } from '../../plugins/selection/gap-cursor/selection';
|
|
3
|
-
export function atTheEndOfDoc(state) {
|
|
4
|
-
var selection = state.selection,
|
|
5
|
-
doc = state.doc;
|
|
6
|
-
return doc.nodeSize - selection.$to.pos - 2 === selection.$to.depth;
|
|
7
|
-
}
|
|
8
|
-
export function atTheBeginningOfDoc(state) {
|
|
9
|
-
var selection = state.selection;
|
|
10
|
-
return selection.$from.pos === selection.$from.depth;
|
|
11
|
-
}
|
|
12
|
-
export function atTheEndOfBlock(state) {
|
|
13
|
-
var selection = state.selection;
|
|
14
|
-
var $to = selection.$to;
|
|
15
|
-
if (selection instanceof GapCursorSelection) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
if (selection instanceof NodeSelection && selection.node.isBlock) {
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
return endPositionOfParent($to) === $to.pos + 1;
|
|
22
|
-
}
|
|
23
|
-
export function atTheBeginningOfBlock(state) {
|
|
24
|
-
var selection = state.selection;
|
|
25
|
-
var $from = selection.$from;
|
|
26
|
-
if (selection instanceof GapCursorSelection) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
if (selection instanceof NodeSelection && selection.node.isBlock) {
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
return startPositionOfParent($from) === $from.pos;
|
|
33
|
-
}
|
|
34
|
-
export function startPositionOfParent(resolvedPos) {
|
|
35
|
-
return resolvedPos.start(resolvedPos.depth);
|
|
36
|
-
}
|
|
37
|
-
export function endPositionOfParent(resolvedPos) {
|
|
38
|
-
return resolvedPos.end(resolvedPos.depth) + 1;
|
|
39
|
-
}
|
|
1
|
+
export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, endPositionOfParent, startPositionOfParent } from '@atlaskit/editor-common/selection';
|
package/dist/esm/version.json
CHANGED
|
@@ -262,14 +262,14 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
262
262
|
}>];
|
|
263
263
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
264
264
|
}>>];
|
|
265
|
-
|
|
266
|
-
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").
|
|
267
|
-
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").
|
|
268
|
-
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").
|
|
269
|
-
toggleCode: import("@atlaskit/editor-plugin-text-formatting").
|
|
270
|
-
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").
|
|
271
|
-
toggleEm: import("@atlaskit/editor-plugin-text-formatting").
|
|
272
|
-
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").
|
|
265
|
+
commands: {
|
|
266
|
+
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
267
|
+
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
268
|
+
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
269
|
+
toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
270
|
+
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
271
|
+
toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
272
|
+
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
273
273
|
};
|
|
274
274
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
|
|
275
275
|
pluginConfiguration: TextFormattingOptions | undefined;
|
|
@@ -302,14 +302,14 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
302
302
|
}>];
|
|
303
303
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
304
304
|
}>>];
|
|
305
|
-
|
|
306
|
-
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").
|
|
307
|
-
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").
|
|
308
|
-
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").
|
|
309
|
-
toggleCode: import("@atlaskit/editor-plugin-text-formatting").
|
|
310
|
-
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").
|
|
311
|
-
toggleEm: import("@atlaskit/editor-plugin-text-formatting").
|
|
312
|
-
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").
|
|
305
|
+
commands: {
|
|
306
|
+
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
307
|
+
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
308
|
+
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
309
|
+
toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
310
|
+
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
311
|
+
toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
312
|
+
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
313
313
|
};
|
|
314
314
|
}>, (config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
|
|
315
315
|
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
@@ -633,14 +633,14 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
633
633
|
}>];
|
|
634
634
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
635
635
|
}>>];
|
|
636
|
-
|
|
637
|
-
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").
|
|
638
|
-
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").
|
|
639
|
-
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").
|
|
640
|
-
toggleCode: import("@atlaskit/editor-plugin-text-formatting").
|
|
641
|
-
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").
|
|
642
|
-
toggleEm: import("@atlaskit/editor-plugin-text-formatting").
|
|
643
|
-
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").
|
|
636
|
+
commands: {
|
|
637
|
+
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
638
|
+
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
639
|
+
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
640
|
+
toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
641
|
+
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
642
|
+
toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
643
|
+
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
644
644
|
};
|
|
645
645
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
|
|
646
646
|
pluginConfiguration: TextFormattingOptions | undefined;
|
|
@@ -673,14 +673,14 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
673
673
|
}>];
|
|
674
674
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
675
675
|
}>>];
|
|
676
|
-
|
|
677
|
-
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").
|
|
678
|
-
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").
|
|
679
|
-
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").
|
|
680
|
-
toggleCode: import("@atlaskit/editor-plugin-text-formatting").
|
|
681
|
-
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").
|
|
682
|
-
toggleEm: import("@atlaskit/editor-plugin-text-formatting").
|
|
683
|
-
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").
|
|
676
|
+
commands: {
|
|
677
|
+
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
678
|
+
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
679
|
+
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
680
|
+
toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
681
|
+
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
682
|
+
toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
683
|
+
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkPluginCommand;
|
|
684
684
|
};
|
|
685
685
|
}>, (config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
|
|
686
686
|
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { EmojiId } from '@atlaskit/emoji';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PluginCommand } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { INPUT_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
export declare const insertEmoji: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (emojiId: EmojiId, inputMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.ASCII | INPUT_METHOD.TYPEAHEAD) =>
|
|
4
|
+
export declare const insertEmoji: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (emojiId: EmojiId, inputMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.ASCII | INPUT_METHOD.TYPEAHEAD) => PluginCommand;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { EmojiDescription, EmojiProvider } from '@atlaskit/emoji';
|
|
5
|
-
import type { Command, NextEditorPlugin, PMPluginFactoryParams, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
|
+
import type { EmojiDescription, EmojiProvider, EmojiId } from '@atlaskit/emoji';
|
|
5
|
+
import type { Command, NextEditorPlugin, PMPluginFactoryParams, OptionalPlugin, PluginCommand } from '@atlaskit/editor-common/types';
|
|
6
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
6
7
|
import type { TypeAheadItem } from '../type-ahead/types';
|
|
7
8
|
import type { EmojiPluginOptions, EmojiPluginState } from './types';
|
|
8
9
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
@@ -12,11 +13,15 @@ export declare function memoize<ResultFn extends (emoji: EmojiDescription, emoji
|
|
|
12
13
|
clear(): void;
|
|
13
14
|
};
|
|
14
15
|
export declare const defaultListLimit = 50;
|
|
15
|
-
|
|
16
|
+
export type EmojiPlugin = NextEditorPlugin<'emoji', {
|
|
16
17
|
pluginConfiguration: EmojiPluginOptions | undefined;
|
|
17
18
|
dependencies: [OptionalPlugin<typeof analyticsPlugin>];
|
|
19
|
+
sharedState: EmojiPluginState | undefined;
|
|
20
|
+
commands: {
|
|
21
|
+
insertEmoji: (emojiId: EmojiId, inputMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.ASCII | INPUT_METHOD.TYPEAHEAD) => PluginCommand;
|
|
22
|
+
};
|
|
18
23
|
}>;
|
|
19
|
-
export
|
|
24
|
+
export declare const emojiPlugin: EmojiPlugin;
|
|
20
25
|
/**
|
|
21
26
|
* Actions
|
|
22
27
|
*/
|
|
@@ -7,7 +7,7 @@ export { default as clearMarksOnChangeToEmptyDocumentPlugin } from './clear-mark
|
|
|
7
7
|
export { default as codeBlockPlugin } from './code-block';
|
|
8
8
|
export { default as collabEditPlugin } from './collab-edit';
|
|
9
9
|
export { default as datePlugin } from './date';
|
|
10
|
-
export {
|
|
10
|
+
export { emojiPlugin } from './emoji';
|
|
11
11
|
export { default as extensionPlugin } from './extension';
|
|
12
12
|
export { default as fakeTextCursorPlugin } from './fake-text-cursor';
|
|
13
13
|
export { default as helpDialogPlugin } from './help-dialog';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { ImageUploadPlugin } from '@atlaskit/editor-plugin-image-upload';
|
|
3
|
+
import type { EmojiPlugin } from '../emoji';
|
|
3
4
|
import type datePlugin from '../date';
|
|
4
5
|
import type { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
5
6
|
import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
@@ -24,7 +25,8 @@ declare const insertBlockPlugin: NextEditorPlugin<'insertBlock', {
|
|
|
24
25
|
OptionalPlugin<typeof datePlugin>,
|
|
25
26
|
OptionalPlugin<typeof analyticsPlugin>,
|
|
26
27
|
OptionalPlugin<ImageUploadPlugin>,
|
|
27
|
-
OptionalPlugin<typeof mentionsPlugin
|
|
28
|
+
OptionalPlugin<typeof mentionsPlugin>,
|
|
29
|
+
OptionalPlugin<EmojiPlugin>
|
|
28
30
|
];
|
|
29
31
|
}>;
|
|
30
32
|
export default insertBlockPlugin;
|
|
@@ -7,7 +7,6 @@ export declare class ToolbarInsertBlock extends React.PureComponent<Props & Wrap
|
|
|
7
7
|
private dropdownButtonRef?;
|
|
8
8
|
private emojiButtonRef?;
|
|
9
9
|
private plusButtonRef?;
|
|
10
|
-
private editorAnalyticsAPI;
|
|
11
10
|
state: State;
|
|
12
11
|
static getDerivedStateFromProps(props: Props & WrappedComponentProps, state: State): State | null;
|
|
13
12
|
componentDidUpdate(prevProps: Props): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
1
2
|
export declare const closeMediaAltTextMenu: import("@atlaskit/editor-common/types").Command;
|
|
2
|
-
export declare const openMediaAltTextMenu: import("
|
|
3
|
+
export declare const openMediaAltTextMenu: (editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => import("@atlaskit/editor-common/types").Command;
|
|
3
4
|
export declare const updateAltText: (newAltText: string) => import("@atlaskit/editor-common/types").Command;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
|
|
3
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
export default function keymapPlugin(schema: Schema, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined): SafePlugin;
|
|
@@ -19,6 +19,7 @@ export type { MediaState, MediaProvider, MediaStateStatus };
|
|
|
19
19
|
export { stateKey } from './plugin-key';
|
|
20
20
|
export declare const MEDIA_CONTENT_WRAP_CLASS_NAME = "media-content-wrap";
|
|
21
21
|
export declare const MEDIA_PLUGIN_IS_RESIZING_KEY = "mediaSinglePlugin.isResizing";
|
|
22
|
+
export declare const MEDIA_PLUGIN_RESIZING_WIDTH_KEY = "mediaSinglePlugin.resizing-width";
|
|
22
23
|
export declare class MediaPluginStateImplementation implements MediaPluginState {
|
|
23
24
|
allowsUploads: boolean;
|
|
24
25
|
mediaClientConfig?: MediaClientConfig;
|
|
@@ -35,6 +36,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
35
36
|
mediaProvider?: MediaProvider;
|
|
36
37
|
newInsertionBehaviour?: boolean;
|
|
37
38
|
isResizing: boolean;
|
|
39
|
+
resizingWidth: number;
|
|
38
40
|
private view;
|
|
39
41
|
private destroyed;
|
|
40
42
|
private contextIdentifierProvider?;
|
|
@@ -57,6 +59,7 @@ export declare class MediaPluginStateImplementation implements MediaPluginState
|
|
|
57
59
|
setMediaProvider: (mediaProvider?: Promise<MediaProvider>) => Promise<void>;
|
|
58
60
|
getMediaOptions: () => MediaPluginOptions;
|
|
59
61
|
setIsResizing(isResizing: boolean): void;
|
|
62
|
+
setResizingWidth(width: number): void;
|
|
60
63
|
updateElement(): void;
|
|
61
64
|
private isMediaSchemaNode;
|
|
62
65
|
private getDomElement;
|
|
@@ -33,6 +33,7 @@ export interface MediaPluginState {
|
|
|
33
33
|
showEditingDialog?: boolean;
|
|
34
34
|
mediaOptions?: MediaOptions;
|
|
35
35
|
isResizing: boolean;
|
|
36
|
+
resizingWidth: number;
|
|
36
37
|
dispatch?: Dispatch;
|
|
37
38
|
onContextIdentifierProvider: (_name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
|
|
38
39
|
setMediaProvider: (mediaProvider?: Promise<MediaProvider>) => Promise<void>;
|
|
@@ -56,6 +57,7 @@ export interface MediaPluginState {
|
|
|
56
57
|
handleDrag: (dragState: 'enter' | 'leave') => void;
|
|
57
58
|
updateElement(): void;
|
|
58
59
|
setIsResizing(isResizing: boolean): void;
|
|
60
|
+
setResizingWidth(width: number): void;
|
|
59
61
|
setView(view: EditorView): void;
|
|
60
62
|
destroy(): void;
|
|
61
63
|
updateAndDispatch(props: Partial<Pick<this, 'allowsUploads' | 'allUploadsFinished' | 'isFullscreen'>>): void;
|
|
@@ -4,7 +4,8 @@ import type { Command } from '../../../types';
|
|
|
4
4
|
import type { MediaToolbarBaseConfig } from '../types';
|
|
5
5
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import type { ForceFocusSelector } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
7
|
-
|
|
7
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
|
+
export declare const altTextButton: (intl: IntlShape, state: EditorState, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => FloatingToolbarButton<Command>;
|
|
8
9
|
export declare const altTextEditComponent: (options?: AltTextToolbarOptions) => FloatingToolbarCustom<Command>;
|
|
9
10
|
export interface AltTextToolbarOptions {
|
|
10
11
|
altTextValidator?: (value: string) => string[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ExtractInjectionAPI, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
5
4
|
import type { MediaFloatingToolbarOptions } from '../types';
|
|
6
5
|
import type mediaPlugin from '../index';
|
|
7
6
|
export declare const floatingToolbar: (state: EditorState, intl: IntlShape, options: MediaFloatingToolbarOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined) => FloatingToolbarConfig | undefined;
|
|
@@ -52,6 +52,7 @@ declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSin
|
|
|
52
52
|
private saveWrapper;
|
|
53
53
|
private displayGuideline;
|
|
54
54
|
private setIsResizing;
|
|
55
|
+
private updateSizeInPluginState;
|
|
55
56
|
private calcMaxWidth;
|
|
56
57
|
updateActiveGuidelines: (width: number | undefined, guidelines: GuidelineConfig[], guidelineSnapsReference: GuidelineSnapsReference) => void;
|
|
57
58
|
roundPixelValue: (value: number) => number;
|
|
@@ -3,7 +3,7 @@ import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { MediaState } from '../types';
|
|
6
|
-
import type { InputMethodInsertMedia } from '@atlaskit/editor-common/analytics';
|
|
6
|
+
import type { InputMethodInsertMedia, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
|
|
8
8
|
export interface MediaSingleState extends MediaState {
|
|
9
9
|
dimensions: {
|
|
@@ -14,8 +14,8 @@ export interface MediaSingleState extends MediaState {
|
|
|
14
14
|
contextId?: string;
|
|
15
15
|
}
|
|
16
16
|
export declare const isMediaSingle: (schema: Schema, fileMimeType?: string) => boolean;
|
|
17
|
-
export declare const insertMediaAsMediaSingle: (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia) => boolean;
|
|
18
|
-
export declare const insertMediaSingleNode: (view: EditorView, mediaState: MediaState, inputMethod?: InputMethodInsertMedia, collection?: string, alignLeftOnInsert?: boolean, newInsertionBehaviour?: boolean, widthPluginState?: WidthPluginState | undefined) => boolean;
|
|
17
|
+
export declare const insertMediaAsMediaSingle: (view: EditorView, node: PMNode, inputMethod: InputMethodInsertMedia, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => boolean;
|
|
18
|
+
export declare const insertMediaSingleNode: (view: EditorView, mediaState: MediaState, inputMethod?: InputMethodInsertMedia, collection?: string, alignLeftOnInsert?: boolean, newInsertionBehaviour?: boolean, widthPluginState?: WidthPluginState | undefined, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => boolean;
|
|
19
19
|
export declare const createMediaSingleNode: (schema: Schema, collection: string, maxWidth?: number, minWidth?: number, alignLeftOnInsert?: boolean) => (mediaState: MediaSingleState) => PMNode;
|
|
20
20
|
export declare function transformSliceForMedia(slice: Slice, schema: Schema): (selection: Selection) => Slice;
|
|
21
21
|
export declare function isCaptionNode(editorView: EditorView): boolean;
|
|
@@ -5,6 +5,7 @@ import type { ExtensionAutoConvertHandler } from '@atlaskit/editor-common/extens
|
|
|
5
5
|
import type { Command } from '../../types';
|
|
6
6
|
import type { InputMethodInsertMedia } from '../analytics';
|
|
7
7
|
import type { QueueCardsFromTransactionAction, CardOptions } from '@atlaskit/editor-common/card';
|
|
8
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
9
|
export declare function handleMention(slice: Slice, schema: Schema): Slice;
|
|
9
10
|
export declare function handlePasteIntoTaskOrDecisionOrPanel(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
10
11
|
export declare function handlePasteNonNestableBlockNodesIntoList(slice: Slice): Command;
|
|
@@ -14,7 +15,7 @@ export declare function handlePasteAsPlainText(slice: Slice, _event: ClipboardEv
|
|
|
14
15
|
export declare function handlePastePreservingMarks(slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined): Command;
|
|
15
16
|
export declare function handleMacroAutoConvert(text: string, slice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined, cardsOptions?: CardOptions, extensionAutoConverter?: ExtensionAutoConvertHandler): Command;
|
|
16
17
|
export declare function handleCodeBlock(text: string): Command;
|
|
17
|
-
export declare function handleMediaSingle(inputMethod: InputMethodInsertMedia): (slice: Slice) => Command;
|
|
18
|
+
export declare function handleMediaSingle(inputMethod: InputMethodInsertMedia, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined): (slice: Slice) => Command;
|
|
18
19
|
export declare function handleExpandPasteInTable(slice: Slice): Command;
|
|
19
20
|
export declare function handleMarkdown(markdownSlice: Slice, queueCardsFromChangedTr: QueueCardsFromTransactionAction | undefined, from?: number, to?: number): Command;
|
|
20
21
|
export declare function handleParagraphBlockMarks(state: EditorState, slice: Slice): Slice;
|
|
@@ -4,6 +4,7 @@ import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
|
4
4
|
import type { cardPlugin } from '@atlaskit/editor-plugin-card';
|
|
5
5
|
import type betterTypeHistoryPlugin from '../better-type-history';
|
|
6
6
|
import type listPlugin from '../list';
|
|
7
|
+
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
8
|
export type PastePluginOptions = {
|
|
8
9
|
cardOptions?: CardOptions;
|
|
9
10
|
sanitizePrivateContent?: boolean;
|
|
@@ -14,7 +15,8 @@ declare const pastePlugin: NextEditorPlugin<'paste', {
|
|
|
14
15
|
typeof featureFlagsPlugin,
|
|
15
16
|
OptionalPlugin<typeof listPlugin>,
|
|
16
17
|
typeof betterTypeHistoryPlugin,
|
|
17
|
-
OptionalPlugin<typeof cardPlugin
|
|
18
|
+
OptionalPlugin<typeof cardPlugin>,
|
|
19
|
+
OptionalPlugin<typeof analyticsPlugin>
|
|
18
20
|
];
|
|
19
21
|
}>;
|
|
20
22
|
export default pastePlugin;
|
|
@@ -3,6 +3,7 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
3
3
|
import type { Slice, Fragment, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { ExtractInjectionAPI, Command } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type pastePlugin from '../';
|
|
6
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
6
7
|
type PasteContext = {
|
|
7
8
|
type: PasteType;
|
|
8
9
|
asPlain?: boolean;
|
|
@@ -24,7 +25,7 @@ export declare const handlePasteAsPlainTextWithAnalytics: (view: EditorView, eve
|
|
|
24
25
|
export declare const handlePasteIntoTaskAndDecisionWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
25
26
|
export declare const handlePasteIntoCaptionWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
|
|
26
27
|
export declare const handleCodeBlockWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, text: string) => Command;
|
|
27
|
-
export declare const handleMediaSingleWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType) => Command;
|
|
28
|
+
export declare const handleMediaSingleWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, editorAnalyticsAPI?: EditorAnalyticsAPI | undefined) => Command;
|
|
28
29
|
export declare const handlePastePreservingMarksWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, type: PasteType, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
29
30
|
export declare const handleMarkdownWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
30
31
|
export declare const handleRichTextWithAnalytics: (view: EditorView, event: ClipboardEvent, slice: Slice, pluginInjectionApi: ExtractInjectionAPI<typeof pastePlugin> | undefined) => Command;
|
|
@@ -3,5 +3,5 @@ import { Side } from './selection';
|
|
|
3
3
|
export declare const isLeftCursor: (side: Side) => side is Side.LEFT;
|
|
4
4
|
export declare function getMediaNearPos(doc: PMNode, $pos: ResolvedPos, schema: Schema, dir?: number): PMNode | null;
|
|
5
5
|
export declare const isTextBlockNearPos: (doc: PMNode, schema: Schema, $pos: ResolvedPos, dir: number) => boolean;
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function getLayoutModeFromTargetNode(node: PMNode): string;
|
|
7
7
|
export declare const isIgnoredClick: (elem: HTMLElement) => boolean;
|
|
@@ -3,7 +3,7 @@ export declare const fullPageEditorWrapper: import("@emotion/react").SerializedS
|
|
|
3
3
|
export declare const ScrollContainer: import("react").ForwardRefExoticComponent<Pick<{
|
|
4
4
|
theme?: any;
|
|
5
5
|
featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
|
|
6
|
-
} & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "default" | "key" | "dir" | "color" | "content" | "height" | "width" | "
|
|
6
|
+
} & import("react").HTMLProps<HTMLDivElement>, "headers" | "method" | "cite" | "data" | "form" | "label" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "default" | "key" | "dir" | "color" | "content" | "height" | "width" | "type" | "defaultValue" | "onError" | "onChange" | "open" | "onFocus" | "onBlur" | "placeholder" | "value" | "autoFocus" | "name" | "action" | "disabled" | "children" | "media" | "property" | "aria-hidden" | "size" | "aria-expanded" | "aria-label" | "className" | "accept" | "acceptCharset" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "low" | "manifest" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "mediaGroup" | "min" | "minLength" | "multiple" | "muted" | "nonce" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "start" | "step" | "target" | "useMap" | "wmode" | "wrap" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "id" | "lang" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | keyof {
|
|
7
7
|
theme?: any;
|
|
8
8
|
featureFlags?: import("@atlaskit/editor-common/types").FeatureFlags | undefined;
|
|
9
9
|
}> & import("react").RefAttributes<HTMLDivElement>>;
|