@atlaskit/editor-core 187.17.6 → 187.18.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 +11 -0
- package/dist/cjs/labs/next/presets/default.js +2 -2
- package/dist/cjs/plugins/annotation/toolbar.js +31 -8
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/labs/next/presets/default.js +1 -1
- package/dist/es2019/plugins/annotation/toolbar.js +34 -9
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/labs/next/presets/default.js +1 -1
- package/dist/esm/plugins/annotation/toolbar.js +30 -7
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/index.d.ts +0 -5
- package/dist/types/labs/next/presets/default.d.ts +28 -28
- package/dist/types/plugins/annotation/types.d.ts +9 -3
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/list/pm-plugins/input-rules/wrapping-join-rule.d.ts +1 -2
- package/dist/types-ts4.5/index.d.ts +0 -5
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +28 -28
- package/dist/types-ts4.5/plugins/annotation/types.d.ts +9 -3
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/list/pm-plugins/input-rules/wrapping-join-rule.d.ts +1 -2
- package/package.json +2 -1
- package/report.api.md +1 -24
- package/tmp/api-report-tmp.d.ts +1 -21
- package/dist/cjs/plugins/text-formatting/actions.js +0 -188
- package/dist/cjs/plugins/text-formatting/commands/clear-formatting.js +0 -111
- package/dist/cjs/plugins/text-formatting/commands/text-formatting.js +0 -143
- package/dist/cjs/plugins/text-formatting/commands/transform-to-code.js +0 -68
- package/dist/cjs/plugins/text-formatting/index.js +0 -136
- package/dist/cjs/plugins/text-formatting/pm-plugins/clear-formatting-keymap.js +0 -21
- package/dist/cjs/plugins/text-formatting/pm-plugins/clear-formatting.js +0 -36
- package/dist/cjs/plugins/text-formatting/pm-plugins/cursor.js +0 -55
- package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +0 -276
- package/dist/cjs/plugins/text-formatting/pm-plugins/keymap.js +0 -52
- package/dist/cjs/plugins/text-formatting/pm-plugins/main.js +0 -113
- package/dist/cjs/plugins/text-formatting/pm-plugins/plugin-key.js +0 -9
- package/dist/cjs/plugins/text-formatting/pm-plugins/smart-input-rule.js +0 -176
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/constants.js +0 -19
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +0 -86
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +0 -53
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +0 -225
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/menu-state.js +0 -23
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.js +0 -60
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/index.js +0 -201
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/more-button.js +0 -40
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +0 -46
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/types.js +0 -17
- package/dist/cjs/plugins/text-formatting/utils/cell-selection.js +0 -12
- package/dist/cjs/plugins/text-formatting/utils.js +0 -86
- package/dist/es2019/plugins/text-formatting/actions.js +0 -161
- package/dist/es2019/plugins/text-formatting/commands/clear-formatting.js +0 -105
- package/dist/es2019/plugins/text-formatting/commands/text-formatting.js +0 -144
- package/dist/es2019/plugins/text-formatting/commands/transform-to-code.js +0 -71
- package/dist/es2019/plugins/text-formatting/index.js +0 -127
- package/dist/es2019/plugins/text-formatting/pm-plugins/clear-formatting-keymap.js +0 -10
- package/dist/es2019/plugins/text-formatting/pm-plugins/clear-formatting.js +0 -26
- package/dist/es2019/plugins/text-formatting/pm-plugins/cursor.js +0 -52
- package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +0 -244
- package/dist/es2019/plugins/text-formatting/pm-plugins/keymap.js +0 -43
- package/dist/es2019/plugins/text-formatting/pm-plugins/main.js +0 -109
- package/dist/es2019/plugins/text-formatting/pm-plugins/plugin-key.js +0 -2
- package/dist/es2019/plugins/text-formatting/pm-plugins/smart-input-rule.js +0 -155
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/constants.js +0 -20
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +0 -66
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +0 -42
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +0 -210
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/menu-state.js +0 -11
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.js +0 -48
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/index.js +0 -168
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/more-button.js +0 -32
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +0 -36
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/types.js +0 -10
- package/dist/es2019/plugins/text-formatting/utils/cell-selection.js +0 -5
- package/dist/es2019/plugins/text-formatting/utils.js +0 -74
- package/dist/esm/plugins/text-formatting/actions.js +0 -168
- package/dist/esm/plugins/text-formatting/commands/clear-formatting.js +0 -101
- package/dist/esm/plugins/text-formatting/commands/text-formatting.js +0 -134
- package/dist/esm/plugins/text-formatting/commands/transform-to-code.js +0 -61
- package/dist/esm/plugins/text-formatting/index.js +0 -128
- package/dist/esm/plugins/text-formatting/pm-plugins/clear-formatting-keymap.js +0 -10
- package/dist/esm/plugins/text-formatting/pm-plugins/clear-formatting.js +0 -28
- package/dist/esm/plugins/text-formatting/pm-plugins/cursor.js +0 -48
- package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +0 -259
- package/dist/esm/plugins/text-formatting/pm-plugins/keymap.js +0 -43
- package/dist/esm/plugins/text-formatting/pm-plugins/main.js +0 -98
- package/dist/esm/plugins/text-formatting/pm-plugins/plugin-key.js +0 -2
- package/dist/esm/plugins/text-formatting/pm-plugins/smart-input-rule.js +0 -169
- package/dist/esm/plugins/text-formatting/ui/Toolbar/constants.js +0 -8
- package/dist/esm/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +0 -75
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.js +0 -45
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +0 -213
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/menu-state.js +0 -15
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.js +0 -50
- package/dist/esm/plugins/text-formatting/ui/Toolbar/index.js +0 -191
- package/dist/esm/plugins/text-formatting/ui/Toolbar/more-button.js +0 -31
- package/dist/esm/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.js +0 -35
- package/dist/esm/plugins/text-formatting/ui/Toolbar/types.js +0 -10
- package/dist/esm/plugins/text-formatting/utils/cell-selection.js +0 -5
- package/dist/esm/plugins/text-formatting/utils.js +0 -75
- package/dist/types/plugins/text-formatting/actions.d.ts +0 -22
- package/dist/types/plugins/text-formatting/commands/clear-formatting.d.ts +0 -6
- package/dist/types/plugins/text-formatting/commands/text-formatting.d.ts +0 -5
- package/dist/types/plugins/text-formatting/commands/transform-to-code.d.ts +0 -2
- package/dist/types/plugins/text-formatting/index.d.ts +0 -17
- package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting-keymap.d.ts +0 -4
- package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -8
- package/dist/types/plugins/text-formatting/pm-plugins/cursor.d.ts +0 -3
- package/dist/types/plugins/text-formatting/pm-plugins/input-rule.d.ts +0 -24
- package/dist/types/plugins/text-formatting/pm-plugins/keymap.d.ts +0 -4
- package/dist/types/plugins/text-formatting/pm-plugins/main.d.ts +0 -7
- package/dist/types/plugins/text-formatting/pm-plugins/plugin-key.d.ts +0 -3
- package/dist/types/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +0 -3
- package/dist/types/plugins/text-formatting/ui/Toolbar/constants.d.ts +0 -6
- package/dist/types/plugins/text-formatting/ui/Toolbar/dropdown-menu.d.ts +0 -15
- package/dist/types/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.d.ts +0 -7
- package/dist/types/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.d.ts +0 -14
- package/dist/types/plugins/text-formatting/ui/Toolbar/hooks/menu-state.d.ts +0 -1
- package/dist/types/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.d.ts +0 -20
- package/dist/types/plugins/text-formatting/ui/Toolbar/index.d.ts +0 -26
- package/dist/types/plugins/text-formatting/ui/Toolbar/more-button.d.ts +0 -13
- package/dist/types/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.d.ts +0 -9
- package/dist/types/plugins/text-formatting/ui/Toolbar/types.d.ts +0 -32
- package/dist/types/plugins/text-formatting/utils/cell-selection.d.ts +0 -3
- package/dist/types/plugins/text-formatting/utils.d.ts +0 -11
- package/dist/types-ts4.5/plugins/text-formatting/actions.d.ts +0 -22
- package/dist/types-ts4.5/plugins/text-formatting/commands/clear-formatting.d.ts +0 -6
- package/dist/types-ts4.5/plugins/text-formatting/commands/text-formatting.d.ts +0 -5
- package/dist/types-ts4.5/plugins/text-formatting/commands/transform-to-code.d.ts +0 -2
- package/dist/types-ts4.5/plugins/text-formatting/index.d.ts +0 -19
- package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/clear-formatting-keymap.d.ts +0 -4
- package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +0 -8
- package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/cursor.d.ts +0 -3
- package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/input-rule.d.ts +0 -24
- package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/keymap.d.ts +0 -4
- package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/main.d.ts +0 -7
- package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/plugin-key.d.ts +0 -3
- package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +0 -3
- package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/constants.d.ts +0 -6
- package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/dropdown-menu.d.ts +0 -15
- package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/hooks/clear-formatting-icon.d.ts +0 -7
- package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.d.ts +0 -14
- package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/hooks/menu-state.d.ts +0 -5
- package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/hooks/responsive-toolbar-buttons.d.ts +0 -20
- package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/index.d.ts +0 -26
- package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/more-button.d.ts +0 -13
- package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/single-toolbar-buttons.d.ts +0 -9
- package/dist/types-ts4.5/plugins/text-formatting/ui/Toolbar/types.d.ts +0 -32
- package/dist/types-ts4.5/plugins/text-formatting/utils/cell-selection.d.ts +0 -3
- package/dist/types-ts4.5/plugins/text-formatting/utils.d.ts +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`80b964e24a2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/80b964e24a2) - [ED-19205] Extract the text-formatting editor plugin to a separate package
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [`8474692c96d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8474692c96d) - [ux] ED-18785 Place toolbar below selection if not sufficient space above
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 187.17.6
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -10,7 +10,7 @@ var _paste = _interopRequireDefault(require("../../../plugins/paste"));
|
|
|
10
10
|
var _blockType = _interopRequireDefault(require("../../../plugins/block-type"));
|
|
11
11
|
var _clearMarksOnChangeToEmptyDocument = _interopRequireDefault(require("../../../plugins/clear-marks-on-change-to-empty-document"));
|
|
12
12
|
var _editorPluginHyperlink = require("@atlaskit/editor-plugin-hyperlink");
|
|
13
|
-
var
|
|
13
|
+
var _editorPluginTextFormatting = require("@atlaskit/editor-plugin-text-formatting");
|
|
14
14
|
var _editorPluginWidth = require("@atlaskit/editor-plugin-width");
|
|
15
15
|
var _unsupportedContent = _interopRequireDefault(require("../../../plugins/unsupported-content"));
|
|
16
16
|
var _base = _interopRequireDefault(require("../../../plugins/base"));
|
|
@@ -73,7 +73,7 @@ function createDefaultPreset(options) {
|
|
|
73
73
|
return builder.add([p, options.annotationProviders]);
|
|
74
74
|
}
|
|
75
75
|
return builder;
|
|
76
|
-
}).add([_editorPluginHyperlink.hyperlinkPlugin, options.hyperlinkOptions]).add([
|
|
76
|
+
}).add([_editorPluginHyperlink.hyperlinkPlugin, options.hyperlinkOptions]).add([_editorPluginTextFormatting.textFormattingPlugin, options.textFormatting]).add(_editorPluginWidth.widthPlugin).add([_quickInsert.default, options.quickInsert]).add([_typeAhead.default, options.typeAhead || {
|
|
77
77
|
createAnalyticsEvent: options.createAnalyticsEvent
|
|
78
78
|
}]).add(_unsupportedContent.default).add(_editorPluginEditorDisabled.editorDisabledPlugin).add([_submitEditor.default, options.submitEditor]).add(_fakeTextCursor.default).add(_floatingToolbar.default).add([_selection.default, options.selection]).add([_codeBlock.default, options.codeBlock || {
|
|
79
79
|
appearance: 'full-page'
|
|
@@ -32,6 +32,16 @@ var annotationMessages = (0, _reactIntlNext.defineMessages)({
|
|
|
32
32
|
description: 'A label for a toolbar (UI element) that creates annotations/comments in the document'
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
|
+
/**
|
|
36
|
+
* Returns the coordintes at the bottom the selection.
|
|
37
|
+
*/
|
|
38
|
+
exports.annotationMessages = annotationMessages;
|
|
39
|
+
var getCoordsBelowSelection = function getCoordsBelowSelection(bottomCoords, toolbarRect) {
|
|
40
|
+
return {
|
|
41
|
+
top: (bottomCoords.top || 0) + toolbarRect.height / 1.15,
|
|
42
|
+
left: bottomCoords.right - toolbarRect.width / 2
|
|
43
|
+
};
|
|
44
|
+
};
|
|
35
45
|
|
|
36
46
|
/*
|
|
37
47
|
Calculates the position of the floating toolbar relative to the selection.
|
|
@@ -47,7 +57,6 @@ var annotationMessages = (0, _reactIntlNext.defineMessages)({
|
|
|
47
57
|
- use wrapperBounds to clamp values
|
|
48
58
|
- editorView.dom bounds differ to wrapperBounds, convert at the end
|
|
49
59
|
*/
|
|
50
|
-
exports.annotationMessages = annotationMessages;
|
|
51
60
|
var calculateToolbarPositionAboveSelection = function calculateToolbarPositionAboveSelection(toolbarTitle) {
|
|
52
61
|
return function (editorView, nextPos) {
|
|
53
62
|
var toolbar = document.querySelector("div[aria-label=\"".concat(toolbarTitle, "\"]"));
|
|
@@ -83,13 +92,13 @@ var calculateToolbarPositionAboveSelection = function calculateToolbarPositionAb
|
|
|
83
92
|
}
|
|
84
93
|
|
|
85
94
|
/*
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
short selection above a long paragraph
|
|
96
|
+
eg. short {<}heading
|
|
97
|
+
The purpose of this text is to show the selection range{>}.
|
|
98
|
+
The horizontal positioning should center around "heading",
|
|
99
|
+
not where it ends at "range".
|
|
100
|
+
Note: if it was "head<b>ing</b>" then it would only center
|
|
101
|
+
around "head". Undesireable but matches the current renderer.
|
|
93
102
|
*/
|
|
94
103
|
var cliffPosition = range.getClientRects()[0];
|
|
95
104
|
if (cliffPosition.right < left) {
|
|
@@ -101,6 +110,13 @@ var calculateToolbarPositionAboveSelection = function calculateToolbarPositionAb
|
|
|
101
110
|
}
|
|
102
111
|
left -= toolbarRect.width / 2;
|
|
103
112
|
|
|
113
|
+
// Place toolbar below selection if not sufficient space above
|
|
114
|
+
if (top < wrapperBounds.top) {
|
|
115
|
+
var _getCoordsBelowSelect = getCoordsBelowSelection(bottomCoords, toolbarRect);
|
|
116
|
+
top = _getCoordsBelowSelect.top;
|
|
117
|
+
left = _getCoordsBelowSelect.left;
|
|
118
|
+
}
|
|
119
|
+
|
|
104
120
|
// remap positions from browser document to wrapperBounds
|
|
105
121
|
return {
|
|
106
122
|
top: top - wrapperBounds.top + scrollWrapper.scrollTop,
|
|
@@ -156,6 +172,13 @@ var calculateToolbarPositionTrackHead = function calculateToolbarPositionTrackHe
|
|
|
156
172
|
}
|
|
157
173
|
var left = (head > anchor ? bottomCoords.right : topCoords.left) - toolbarRect.width / 2;
|
|
158
174
|
|
|
175
|
+
// Place toolbar below selection if not sufficient space above
|
|
176
|
+
if (top < wrapperBounds.top) {
|
|
177
|
+
var _getCoordsBelowSelect2 = getCoordsBelowSelection(bottomCoords, toolbarRect);
|
|
178
|
+
top = _getCoordsBelowSelect2.top;
|
|
179
|
+
left = _getCoordsBelowSelect2.left;
|
|
180
|
+
}
|
|
181
|
+
|
|
159
182
|
// remap positions from browser document to wrapperBounds
|
|
160
183
|
return {
|
|
161
184
|
top: top - wrapperBounds.top + scrollWrapper.scrollTop,
|
|
@@ -347,12 +347,6 @@ Object.defineProperty(exports, "textColorPlugin", {
|
|
|
347
347
|
return _textColor.default;
|
|
348
348
|
}
|
|
349
349
|
});
|
|
350
|
-
Object.defineProperty(exports, "textFormattingPlugin", {
|
|
351
|
-
enumerable: true,
|
|
352
|
-
get: function get() {
|
|
353
|
-
return _textFormatting.default;
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
350
|
Object.defineProperty(exports, "toolbarListsIndentationPlugin", {
|
|
357
351
|
enumerable: true,
|
|
358
352
|
get: function get() {
|
|
@@ -414,7 +408,6 @@ var _saveOnEnter = _interopRequireDefault(require("./save-on-enter"));
|
|
|
414
408
|
var _submitEditor = _interopRequireDefault(require("./submit-editor"));
|
|
415
409
|
var _tasksAndDecisions = _interopRequireDefault(require("./tasks-and-decisions"));
|
|
416
410
|
var _textColor = _interopRequireDefault(require("./text-color"));
|
|
417
|
-
var _textFormatting = _interopRequireDefault(require("./text-formatting"));
|
|
418
411
|
var _typeAhead = _interopRequireDefault(require("./type-ahead"));
|
|
419
412
|
var _unsupportedContent = _interopRequireDefault(require("./unsupported-content"));
|
|
420
413
|
var _floatingToolbar = _interopRequireDefault(require("./floating-toolbar"));
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.
|
|
9
|
+
var version = "187.18.0";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -4,7 +4,7 @@ import pastePlugin from '../../../plugins/paste';
|
|
|
4
4
|
import blockTypePlugin from '../../../plugins/block-type';
|
|
5
5
|
import clearMarksOnChangeToEmptyDocumentPlugin from '../../../plugins/clear-marks-on-change-to-empty-document';
|
|
6
6
|
import { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
7
|
-
import textFormattingPlugin from '
|
|
7
|
+
import { textFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
|
|
8
8
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
9
|
import unsupportedContentPlugin from '../../../plugins/unsupported-content';
|
|
10
10
|
import basePlugin from '../../../plugins/base';
|
|
@@ -24,6 +24,15 @@ export const annotationMessages = defineMessages({
|
|
|
24
24
|
description: 'A label for a toolbar (UI element) that creates annotations/comments in the document'
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
+
/**
|
|
28
|
+
* Returns the coordintes at the bottom the selection.
|
|
29
|
+
*/
|
|
30
|
+
const getCoordsBelowSelection = (bottomCoords, toolbarRect) => {
|
|
31
|
+
return {
|
|
32
|
+
top: (bottomCoords.top || 0) + toolbarRect.height / 1.15,
|
|
33
|
+
left: bottomCoords.right - toolbarRect.width / 2
|
|
34
|
+
};
|
|
35
|
+
};
|
|
27
36
|
|
|
28
37
|
/*
|
|
29
38
|
Calculates the position of the floating toolbar relative to the selection.
|
|
@@ -61,7 +70,7 @@ const calculateToolbarPositionAboveSelection = toolbarTitle => (editorView, next
|
|
|
61
70
|
} = editorView.state.selection;
|
|
62
71
|
const topCoords = editorView.coordsAtPos(Math.min(head, anchor));
|
|
63
72
|
const bottomCoords = editorView.coordsAtPos(Math.max(head, anchor) - Math.min(range.endOffset, 1));
|
|
64
|
-
|
|
73
|
+
let top = (topCoords.top || 0) - toolbarRect.height * 1.5;
|
|
65
74
|
let left = 0;
|
|
66
75
|
|
|
67
76
|
// If not on the same line
|
|
@@ -74,13 +83,13 @@ const calculateToolbarPositionAboveSelection = toolbarTitle => (editorView, next
|
|
|
74
83
|
}
|
|
75
84
|
|
|
76
85
|
/*
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
short selection above a long paragraph
|
|
87
|
+
eg. short {<}heading
|
|
88
|
+
The purpose of this text is to show the selection range{>}.
|
|
89
|
+
The horizontal positioning should center around "heading",
|
|
90
|
+
not where it ends at "range".
|
|
91
|
+
Note: if it was "head<b>ing</b>" then it would only center
|
|
92
|
+
around "head". Undesireable but matches the current renderer.
|
|
84
93
|
*/
|
|
85
94
|
const cliffPosition = range.getClientRects()[0];
|
|
86
95
|
if (cliffPosition.right < left) {
|
|
@@ -92,6 +101,14 @@ const calculateToolbarPositionAboveSelection = toolbarTitle => (editorView, next
|
|
|
92
101
|
}
|
|
93
102
|
left -= toolbarRect.width / 2;
|
|
94
103
|
|
|
104
|
+
// Place toolbar below selection if not sufficient space above
|
|
105
|
+
if (top < wrapperBounds.top) {
|
|
106
|
+
({
|
|
107
|
+
top,
|
|
108
|
+
left
|
|
109
|
+
} = getCoordsBelowSelection(bottomCoords, toolbarRect));
|
|
110
|
+
}
|
|
111
|
+
|
|
95
112
|
// remap positions from browser document to wrapperBounds
|
|
96
113
|
return {
|
|
97
114
|
top: top - wrapperBounds.top + scrollWrapper.scrollTop,
|
|
@@ -144,7 +161,15 @@ const calculateToolbarPositionTrackHead = toolbarTitle => (editorView, nextPos)
|
|
|
144
161
|
} else {
|
|
145
162
|
top = (topCoords.top || 0) - toolbarRect.height * 1.5;
|
|
146
163
|
}
|
|
147
|
-
|
|
164
|
+
let left = (head > anchor ? bottomCoords.right : topCoords.left) - toolbarRect.width / 2;
|
|
165
|
+
|
|
166
|
+
// Place toolbar below selection if not sufficient space above
|
|
167
|
+
if (top < wrapperBounds.top) {
|
|
168
|
+
({
|
|
169
|
+
top,
|
|
170
|
+
left
|
|
171
|
+
} = getCoordsBelowSelection(bottomCoords, toolbarRect));
|
|
172
|
+
}
|
|
148
173
|
|
|
149
174
|
// remap positions from browser document to wrapperBounds
|
|
150
175
|
return {
|
|
@@ -30,7 +30,6 @@ export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
|
30
30
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
31
31
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
32
32
|
export { default as textColorPlugin } from './text-color';
|
|
33
|
-
export { default as textFormattingPlugin } from './text-formatting';
|
|
34
33
|
export { default as typeAheadPlugin } from './type-ahead';
|
|
35
34
|
export { default as unsupportedContentPlugin } from './unsupported-content';
|
|
36
35
|
export { default as floatingToolbarPlugin } from './floating-toolbar';
|
package/dist/es2019/version.json
CHANGED
|
@@ -4,7 +4,7 @@ import pastePlugin from '../../../plugins/paste';
|
|
|
4
4
|
import blockTypePlugin from '../../../plugins/block-type';
|
|
5
5
|
import clearMarksOnChangeToEmptyDocumentPlugin from '../../../plugins/clear-marks-on-change-to-empty-document';
|
|
6
6
|
import { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
7
|
-
import textFormattingPlugin from '
|
|
7
|
+
import { textFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
|
|
8
8
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
9
9
|
import unsupportedContentPlugin from '../../../plugins/unsupported-content';
|
|
10
10
|
import basePlugin from '../../../plugins/base';
|
|
@@ -24,6 +24,15 @@ export var annotationMessages = defineMessages({
|
|
|
24
24
|
description: 'A label for a toolbar (UI element) that creates annotations/comments in the document'
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
+
/**
|
|
28
|
+
* Returns the coordintes at the bottom the selection.
|
|
29
|
+
*/
|
|
30
|
+
var getCoordsBelowSelection = function getCoordsBelowSelection(bottomCoords, toolbarRect) {
|
|
31
|
+
return {
|
|
32
|
+
top: (bottomCoords.top || 0) + toolbarRect.height / 1.15,
|
|
33
|
+
left: bottomCoords.right - toolbarRect.width / 2
|
|
34
|
+
};
|
|
35
|
+
};
|
|
27
36
|
|
|
28
37
|
/*
|
|
29
38
|
Calculates the position of the floating toolbar relative to the selection.
|
|
@@ -74,13 +83,13 @@ var calculateToolbarPositionAboveSelection = function calculateToolbarPositionAb
|
|
|
74
83
|
}
|
|
75
84
|
|
|
76
85
|
/*
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
86
|
+
short selection above a long paragraph
|
|
87
|
+
eg. short {<}heading
|
|
88
|
+
The purpose of this text is to show the selection range{>}.
|
|
89
|
+
The horizontal positioning should center around "heading",
|
|
90
|
+
not where it ends at "range".
|
|
91
|
+
Note: if it was "head<b>ing</b>" then it would only center
|
|
92
|
+
around "head". Undesireable but matches the current renderer.
|
|
84
93
|
*/
|
|
85
94
|
var cliffPosition = range.getClientRects()[0];
|
|
86
95
|
if (cliffPosition.right < left) {
|
|
@@ -92,6 +101,13 @@ var calculateToolbarPositionAboveSelection = function calculateToolbarPositionAb
|
|
|
92
101
|
}
|
|
93
102
|
left -= toolbarRect.width / 2;
|
|
94
103
|
|
|
104
|
+
// Place toolbar below selection if not sufficient space above
|
|
105
|
+
if (top < wrapperBounds.top) {
|
|
106
|
+
var _getCoordsBelowSelect = getCoordsBelowSelection(bottomCoords, toolbarRect);
|
|
107
|
+
top = _getCoordsBelowSelect.top;
|
|
108
|
+
left = _getCoordsBelowSelect.left;
|
|
109
|
+
}
|
|
110
|
+
|
|
95
111
|
// remap positions from browser document to wrapperBounds
|
|
96
112
|
return {
|
|
97
113
|
top: top - wrapperBounds.top + scrollWrapper.scrollTop,
|
|
@@ -147,6 +163,13 @@ var calculateToolbarPositionTrackHead = function calculateToolbarPositionTrackHe
|
|
|
147
163
|
}
|
|
148
164
|
var left = (head > anchor ? bottomCoords.right : topCoords.left) - toolbarRect.width / 2;
|
|
149
165
|
|
|
166
|
+
// Place toolbar below selection if not sufficient space above
|
|
167
|
+
if (top < wrapperBounds.top) {
|
|
168
|
+
var _getCoordsBelowSelect2 = getCoordsBelowSelection(bottomCoords, toolbarRect);
|
|
169
|
+
top = _getCoordsBelowSelect2.top;
|
|
170
|
+
left = _getCoordsBelowSelect2.left;
|
|
171
|
+
}
|
|
172
|
+
|
|
150
173
|
// remap positions from browser document to wrapperBounds
|
|
151
174
|
return {
|
|
152
175
|
top: top - wrapperBounds.top + scrollWrapper.scrollTop,
|
|
@@ -30,7 +30,6 @@ export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
|
30
30
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
31
31
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
32
32
|
export { default as textColorPlugin } from './text-color';
|
|
33
|
-
export { default as textFormattingPlugin } from './text-formatting';
|
|
34
33
|
export { default as typeAheadPlugin } from './type-ahead';
|
|
35
34
|
export { default as unsupportedContentPlugin } from './unsupported-content';
|
|
36
35
|
export { default as floatingToolbarPlugin } from './floating-toolbar';
|
package/dist/esm/version.json
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -77,8 +77,3 @@ export { DEFAULT_BORDER_COLOR } from './ui/ColorPalette/Palettes/common';
|
|
|
77
77
|
export { default as messages, statusMessages, dateMessages } from './messages';
|
|
78
78
|
export { createTypeAheadTools } from './plugins/type-ahead/api';
|
|
79
79
|
export { createQuickInsertTools } from './plugins/quick-insert/api';
|
|
80
|
-
export type {
|
|
81
|
-
/**
|
|
82
|
-
* Temporary, until we extract the plugin to its own package
|
|
83
|
-
* @deprecated Don't use this
|
|
84
|
-
*/ textFormattingPlugin, } from './plugins';
|
|
@@ -255,13 +255,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
255
255
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
256
256
|
}>>];
|
|
257
257
|
actions: {
|
|
258
|
-
toggleSuperscript: import("
|
|
259
|
-
toggleSubscript: import("
|
|
260
|
-
toggleStrike: import("
|
|
261
|
-
toggleCode: import("
|
|
262
|
-
toggleUnderline: import("
|
|
263
|
-
toggleEm: import("
|
|
264
|
-
toggleStrong: import("
|
|
258
|
+
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
259
|
+
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
260
|
+
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
261
|
+
toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
262
|
+
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
263
|
+
toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
264
|
+
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
265
265
|
};
|
|
266
266
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
|
|
267
267
|
pluginConfiguration: TextFormattingOptions | undefined;
|
|
@@ -295,13 +295,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
295
295
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
296
296
|
}>>];
|
|
297
297
|
actions: {
|
|
298
|
-
toggleSuperscript: import("
|
|
299
|
-
toggleSubscript: import("
|
|
300
|
-
toggleStrike: import("
|
|
301
|
-
toggleCode: import("
|
|
302
|
-
toggleUnderline: import("
|
|
303
|
-
toggleEm: import("
|
|
304
|
-
toggleStrong: import("
|
|
298
|
+
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
299
|
+
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
300
|
+
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
301
|
+
toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
302
|
+
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
303
|
+
toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
304
|
+
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
305
305
|
};
|
|
306
306
|
}>, (config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
|
|
307
307
|
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
@@ -618,13 +618,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
618
618
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
619
619
|
}>>];
|
|
620
620
|
actions: {
|
|
621
|
-
toggleSuperscript: import("
|
|
622
|
-
toggleSubscript: import("
|
|
623
|
-
toggleStrike: import("
|
|
624
|
-
toggleCode: import("
|
|
625
|
-
toggleUnderline: import("
|
|
626
|
-
toggleEm: import("
|
|
627
|
-
toggleStrong: import("
|
|
621
|
+
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
622
|
+
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
623
|
+
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
624
|
+
toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
625
|
+
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
626
|
+
toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
627
|
+
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
628
628
|
};
|
|
629
629
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
|
|
630
630
|
pluginConfiguration: TextFormattingOptions | undefined;
|
|
@@ -658,13 +658,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
658
658
|
actions: import("@atlaskit/editor-common/analytics").EditorAnalyticsAPI;
|
|
659
659
|
}>>];
|
|
660
660
|
actions: {
|
|
661
|
-
toggleSuperscript: import("
|
|
662
|
-
toggleSubscript: import("
|
|
663
|
-
toggleStrike: import("
|
|
664
|
-
toggleCode: import("
|
|
665
|
-
toggleUnderline: import("
|
|
666
|
-
toggleEm: import("
|
|
667
|
-
toggleStrong: import("
|
|
661
|
+
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
662
|
+
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
663
|
+
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
664
|
+
toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
665
|
+
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
666
|
+
toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
667
|
+
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
668
668
|
};
|
|
669
669
|
}>, (config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
|
|
670
670
|
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
|
-
import { AnnotationUpdateEmitter } from './update-provider';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
|
+
import type { AnnotationUpdateEmitter } from './update-provider';
|
|
4
4
|
export type AnnotationInfo = {
|
|
5
5
|
id: string;
|
|
6
6
|
type: AnnotationTypes.INLINE_COMMENT;
|
|
@@ -73,4 +73,10 @@ export declare const AnnotationTestIds: {
|
|
|
73
73
|
componentSave: string;
|
|
74
74
|
componentClose: string;
|
|
75
75
|
};
|
|
76
|
+
export type CoordsAtPos = {
|
|
77
|
+
top: number;
|
|
78
|
+
bottom: number;
|
|
79
|
+
left: number;
|
|
80
|
+
right: number;
|
|
81
|
+
};
|
|
76
82
|
export {};
|
|
@@ -31,7 +31,6 @@ export { default as saveOnEnterPlugin } from './save-on-enter';
|
|
|
31
31
|
export { default as submitEditorPlugin } from './submit-editor';
|
|
32
32
|
export { default as tasksAndDecisionsPlugin } from './tasks-and-decisions';
|
|
33
33
|
export { default as textColorPlugin } from './text-color';
|
|
34
|
-
export { default as textFormattingPlugin } from './text-formatting';
|
|
35
34
|
export { default as typeAheadPlugin } from './type-ahead';
|
|
36
35
|
export { default as unsupportedContentPlugin } from './unsupported-content';
|
|
37
36
|
export { default as floatingToolbarPlugin } from './floating-toolbar';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { Node as PMNode, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { InputRuleWrapper } from '@atlaskit/
|
|
2
|
+
import type { InputRuleWrapper, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
4
|
type WrappingRuleProps = {
|
|
6
5
|
featureFlags: FeatureFlags;
|
|
7
6
|
match: RegExp;
|
|
@@ -77,8 +77,3 @@ export { DEFAULT_BORDER_COLOR } from './ui/ColorPalette/Palettes/common';
|
|
|
77
77
|
export { default as messages, statusMessages, dateMessages } from './messages';
|
|
78
78
|
export { createTypeAheadTools } from './plugins/type-ahead/api';
|
|
79
79
|
export { createQuickInsertTools } from './plugins/quick-insert/api';
|
|
80
|
-
export type {
|
|
81
|
-
/**
|
|
82
|
-
* Temporary, until we extract the plugin to its own package
|
|
83
|
-
* @deprecated Don't use this
|
|
84
|
-
*/ textFormattingPlugin, } from './plugins';
|
|
@@ -310,13 +310,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
310
310
|
}>>
|
|
311
311
|
];
|
|
312
312
|
actions: {
|
|
313
|
-
toggleSuperscript: import("
|
|
314
|
-
toggleSubscript: import("
|
|
315
|
-
toggleStrike: import("
|
|
316
|
-
toggleCode: import("
|
|
317
|
-
toggleUnderline: import("
|
|
318
|
-
toggleEm: import("
|
|
319
|
-
toggleStrong: import("
|
|
313
|
+
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
314
|
+
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
315
|
+
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
316
|
+
toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
317
|
+
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
318
|
+
toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
319
|
+
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
320
320
|
};
|
|
321
321
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
|
|
322
322
|
pluginConfiguration: TextFormattingOptions | undefined;
|
|
@@ -356,13 +356,13 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
356
356
|
}>>
|
|
357
357
|
];
|
|
358
358
|
actions: {
|
|
359
|
-
toggleSuperscript: import("
|
|
360
|
-
toggleSubscript: import("
|
|
361
|
-
toggleStrike: import("
|
|
362
|
-
toggleCode: import("
|
|
363
|
-
toggleUnderline: import("
|
|
364
|
-
toggleEm: import("
|
|
365
|
-
toggleStrong: import("
|
|
359
|
+
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
360
|
+
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
361
|
+
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
362
|
+
toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
363
|
+
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
364
|
+
toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
365
|
+
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
366
366
|
};
|
|
367
367
|
}>,
|
|
368
368
|
(config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
|
|
@@ -751,13 +751,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
751
751
|
}>>
|
|
752
752
|
];
|
|
753
753
|
actions: {
|
|
754
|
-
toggleSuperscript: import("
|
|
755
|
-
toggleSubscript: import("
|
|
756
|
-
toggleStrike: import("
|
|
757
|
-
toggleCode: import("
|
|
758
|
-
toggleUnderline: import("
|
|
759
|
-
toggleEm: import("
|
|
760
|
-
toggleStrong: import("
|
|
754
|
+
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
755
|
+
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
756
|
+
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
757
|
+
toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
758
|
+
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
759
|
+
toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
760
|
+
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
761
761
|
};
|
|
762
762
|
}> | undefined) => import("@atlaskit/editor-common/types").DefaultEditorPlugin<"textFormatting", {
|
|
763
763
|
pluginConfiguration: TextFormattingOptions | undefined;
|
|
@@ -797,13 +797,13 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
797
797
|
}>>
|
|
798
798
|
];
|
|
799
799
|
actions: {
|
|
800
|
-
toggleSuperscript: import("
|
|
801
|
-
toggleSubscript: import("
|
|
802
|
-
toggleStrike: import("
|
|
803
|
-
toggleCode: import("
|
|
804
|
-
toggleUnderline: import("
|
|
805
|
-
toggleEm: import("
|
|
806
|
-
toggleStrong: import("
|
|
800
|
+
toggleSuperscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
801
|
+
toggleSubscript: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
802
|
+
toggleStrike: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
803
|
+
toggleCode: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
804
|
+
toggleUnderline: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
805
|
+
toggleEm: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
806
|
+
toggleStrong: import("@atlaskit/editor-plugin-text-formatting").ToggleMarkWithAnalyticsCommand;
|
|
807
807
|
};
|
|
808
808
|
}>,
|
|
809
809
|
(config?: HyperlinkPluginOptions | undefined, api?: import("@atlaskit/editor-common/types").PluginInjectionAPI<"hyperlink", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
|
-
import { AnnotationUpdateEmitter } from './update-provider';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
|
+
import type { AnnotationUpdateEmitter } from './update-provider';
|
|
4
4
|
export type AnnotationInfo = {
|
|
5
5
|
id: string;
|
|
6
6
|
type: AnnotationTypes.INLINE_COMMENT;
|
|
@@ -73,4 +73,10 @@ export declare const AnnotationTestIds: {
|
|
|
73
73
|
componentSave: string;
|
|
74
74
|
componentClose: string;
|
|
75
75
|
};
|
|
76
|
+
export type CoordsAtPos = {
|
|
77
|
+
top: number;
|
|
78
|
+
bottom: number;
|
|
79
|
+
left: number;
|
|
80
|
+
right: number;
|
|
81
|
+
};
|
|
76
82
|
export {};
|