@atlaskit/editor-common 120.14.0 → 120.16.1
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 +49 -0
- package/dist/cjs/ai-messages/ai-suggestions.js +10 -0
- package/dist/cjs/block-menu/key.js +7 -1
- package/dist/cjs/block-menu/rank.js +4 -3
- package/dist/cjs/messages/block-menu.js +10 -0
- package/dist/cjs/messages/index.js +7 -0
- package/dist/cjs/messages/snippets.js +34 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/vanilla-tooltip/index.js +55 -13
- package/dist/es2019/ai-messages/ai-suggestions.js +10 -0
- package/dist/es2019/block-menu/key.js +6 -0
- package/dist/es2019/block-menu/rank.js +15 -1
- package/dist/es2019/messages/block-menu.js +10 -0
- package/dist/es2019/messages/index.js +1 -0
- package/dist/es2019/messages/snippets.js +28 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/vanilla-tooltip/index.js +52 -12
- package/dist/esm/ai-messages/ai-suggestions.js +10 -0
- package/dist/esm/block-menu/key.js +6 -0
- package/dist/esm/block-menu/rank.js +4 -3
- package/dist/esm/messages/block-menu.js +10 -0
- package/dist/esm/messages/index.js +1 -0
- package/dist/esm/messages/snippets.js +28 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/vanilla-tooltip/index.js +54 -12
- package/dist/types/ai-messages/ai-suggestions.d.ts +10 -0
- package/dist/types/block-menu/key.d.ts +6 -0
- package/dist/types/block-menu/rank.d.ts +3 -1
- package/dist/types/messages/block-menu.d.ts +12 -2
- package/dist/types/messages/index.d.ts +1 -0
- package/dist/types/messages/snippets.d.ts +2 -0
- package/dist/types/vanilla-tooltip/index.d.ts +14 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 120.16.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 120.16.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`7271896e1f276`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7271896e1f276) -
|
|
14
|
+
Add a restricted-source lozenge to AI suggestion cards.
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
20
|
+
## 120.15.1
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
26
|
+
## 120.15.0
|
|
27
|
+
|
|
28
|
+
### Minor Changes
|
|
29
|
+
|
|
30
|
+
- [`c7130b14cc4b2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c7130b14cc4b2) -
|
|
31
|
+
[ux] Add Status to the block menu Turn into list behind platform_editor_turn_into_status.
|
|
32
|
+
- [`68342e8a23fec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/68342e8a23fec) -
|
|
33
|
+
Group text transforms under the renamed Text formatting section in the block menu behind the
|
|
34
|
+
`platform_editor_block_menu_small_text` experiment.
|
|
35
|
+
- [`27143ffe51a5a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/27143ffe51a5a) -
|
|
36
|
+
`@atlaskit/editor-common/vanilla-tooltip` now exports `VANILLA_TOOLTIP_DEFAULT_CLASS`. Compose
|
|
37
|
+
tooltip class names from it rather than repeating the `ak-editor-vanilla-tooltip-default` literal.
|
|
38
|
+
|
|
39
|
+
Behind the `platform_editor_use_vanilla_components` experiment, `VanillaTooltip`:
|
|
40
|
+
- no longer throws `InvalidStateError` when shown again before its open delay has elapsed
|
|
41
|
+
- is `pointer-events: none`, so it cannot swallow pointer events meant for the content beneath —
|
|
42
|
+
pass `pointerEvents` in `styles` to opt out
|
|
43
|
+
- closes its popover before `destroy()` removes it from the document
|
|
44
|
+
|
|
45
|
+
Remaining changes are internal: tooltip consumers adopt the new constant, and the emoji tooltip
|
|
46
|
+
uses the shared class in place of an equivalent inline style object.
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- Updated dependencies
|
|
51
|
+
|
|
3
52
|
## 120.14.0
|
|
4
53
|
|
|
5
54
|
### Minor Changes
|
|
@@ -151,6 +151,16 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
|
|
|
151
151
|
defaultMessage: 'Visible only to you',
|
|
152
152
|
description: 'Tooltip shown on the private indicator icon in the AI suggestions card'
|
|
153
153
|
},
|
|
154
|
+
cardRestrictedLabel: {
|
|
155
|
+
id: 'fabric.editor.ai.suggestions.card.restrictedLabel.non-final',
|
|
156
|
+
defaultMessage: 'Restricted',
|
|
157
|
+
description: 'Label for the restricted suggestion lozenge'
|
|
158
|
+
},
|
|
159
|
+
cardRestrictedTooltipLabel: {
|
|
160
|
+
id: 'fabric.editor.ai.suggestions.card.restrictedTooltip.non-final',
|
|
161
|
+
defaultMessage: 'Only editors with access to the source can see this suggestion',
|
|
162
|
+
description: 'Tooltip for the restricted suggestion lozenge'
|
|
163
|
+
},
|
|
154
164
|
cardDetailsButtonLabel: {
|
|
155
165
|
id: 'fabric.editor.ai.suggestions.card.detailsButtonLabel.non-final',
|
|
156
166
|
defaultMessage: 'Details',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TRANSFORM_SUGGESTED_MENU_SECTION = exports.TRANSFORM_SUGGESTED_MENU_ITEM = exports.TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM = exports.TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM = exports.TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM = exports.TRANSFORM_STRUCTURE_PANEL_MENU_ITEM = exports.TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM = exports.TRANSFORM_STRUCTURE_MENU_SECTION = exports.TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM = exports.TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM = exports.TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM = exports.TRANSFORM_STRUCTURE_DECISION_MENU_ITEM = exports.TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM = exports.TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM = exports.TRANSFORM_MENU_SECTION = exports.TRANSFORM_MENU_ITEM = exports.TRANSFORM_HEADINGS_MENU_SECTION = exports.TRANSFORM_HEADINGS_H6_MENU_ITEM = exports.TRANSFORM_HEADINGS_H5_MENU_ITEM = exports.TRANSFORM_HEADINGS_H4_MENU_ITEM = exports.TRANSFORM_HEADINGS_H3_MENU_ITEM = exports.TRANSFORM_HEADINGS_H2_MENU_ITEM = exports.TRANSFORM_HEADINGS_H1_MENU_ITEM = exports.TRANSFORM_DEFAULT_EXTENSION_SLOT_MENU_ITEM = exports.TRANSFORM_CREATE_MENU_SECTION = exports.TRANSFORM_CLEAR_MENU_SECTION = exports.TRANSFORM_CLEAR_MENU_ITEM = exports.POSITION_MOVE_UP_MENU_ITEM = exports.POSITION_MOVE_DOWN_MENU_ITEM = exports.POSITION_MENU_SECTION = exports.EXTENSION_MENU_ITEM_TEST_ID = exports.DELETE_MENU_SECTION = exports.DELETE_MENU_ITEM = exports.BLOCK_MENU_TEST_ID = exports.BLOCK_MENU_ACTION_TEST_ID = exports.BLOCK_ACTIONS_TEMPLATE_SECTION = exports.BLOCK_ACTIONS_MENU_SECTION = exports.BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM = exports.BLOCK_ACTIONS_FEATURED_EXTENSION_SECTION_KEYS = exports.BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM = exports.BLOCK_ACTIONS_COPY_MENU_SECTION = exports.BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM = exports.AI_REMIX_MENU_ITEM = exports.AI_POLISH_MENU_ITEM = exports.AI_MENU_SECTION = exports.AI_IMPROVE_WRITING_MENU_ITEM = exports.AI_BLOCK_MENU_LARGE_TEXT_THRESHOLD = exports.AI_ASK_ROVO_MENU_ITEM = void 0;
|
|
6
|
+
exports.TRANSFORM_TEXT_FORMATTING_SMALL_TEXT_MENU_ITEM = exports.TRANSFORM_SUGGESTED_MENU_SECTION = exports.TRANSFORM_SUGGESTED_MENU_ITEM = exports.TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM = exports.TRANSFORM_STRUCTURE_STATUS_MENU_ITEM = exports.TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM = exports.TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM = exports.TRANSFORM_STRUCTURE_PANEL_MENU_ITEM = exports.TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM = exports.TRANSFORM_STRUCTURE_MENU_SECTION = exports.TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM = exports.TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM = exports.TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM = exports.TRANSFORM_STRUCTURE_DECISION_MENU_ITEM = exports.TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM = exports.TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM = exports.TRANSFORM_MENU_SECTION = exports.TRANSFORM_MENU_ITEM = exports.TRANSFORM_HEADINGS_MENU_SECTION = exports.TRANSFORM_HEADINGS_H6_MENU_ITEM = exports.TRANSFORM_HEADINGS_H5_MENU_ITEM = exports.TRANSFORM_HEADINGS_H4_MENU_ITEM = exports.TRANSFORM_HEADINGS_H3_MENU_ITEM = exports.TRANSFORM_HEADINGS_H2_MENU_ITEM = exports.TRANSFORM_HEADINGS_H1_MENU_ITEM = exports.TRANSFORM_DEFAULT_EXTENSION_SLOT_MENU_ITEM = exports.TRANSFORM_CREATE_MENU_SECTION = exports.TRANSFORM_CLEAR_MENU_SECTION = exports.TRANSFORM_CLEAR_MENU_ITEM = exports.POSITION_MOVE_UP_MENU_ITEM = exports.POSITION_MOVE_DOWN_MENU_ITEM = exports.POSITION_MENU_SECTION = exports.EXTENSION_MENU_ITEM_TEST_ID = exports.DELETE_MENU_SECTION = exports.DELETE_MENU_ITEM = exports.BLOCK_MENU_TEST_ID = exports.BLOCK_MENU_ACTION_TEST_ID = exports.BLOCK_ACTIONS_TEMPLATE_SECTION = exports.BLOCK_ACTIONS_MENU_SECTION = exports.BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM = exports.BLOCK_ACTIONS_FEATURED_EXTENSION_SECTION_KEYS = exports.BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM = exports.BLOCK_ACTIONS_COPY_MENU_SECTION = exports.BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM = exports.AI_REMIX_MENU_ITEM = exports.AI_POLISH_MENU_ITEM = exports.AI_MENU_SECTION = exports.AI_IMPROVE_WRITING_MENU_ITEM = exports.AI_BLOCK_MENU_LARGE_TEXT_THRESHOLD = exports.AI_ASK_ROVO_MENU_ITEM = void 0;
|
|
7
7
|
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
|
|
8
8
|
// Transformation
|
|
9
9
|
|
|
@@ -76,9 +76,15 @@ var TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM = exports.TRANSFORM_STRUCTURE_E
|
|
|
76
76
|
var TRANSFORM_STRUCTURE_DECISION_MENU_ITEM = exports.TRANSFORM_STRUCTURE_DECISION_MENU_ITEM = {
|
|
77
77
|
key: 'transform-structure-decision-menu-item'
|
|
78
78
|
};
|
|
79
|
+
var TRANSFORM_STRUCTURE_STATUS_MENU_ITEM = exports.TRANSFORM_STRUCTURE_STATUS_MENU_ITEM = {
|
|
80
|
+
key: 'transform-structure-status-menu-item'
|
|
81
|
+
};
|
|
79
82
|
var TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM = exports.TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM = {
|
|
80
83
|
key: 'transform-structure-paragraph-menu-item'
|
|
81
84
|
};
|
|
85
|
+
var TRANSFORM_TEXT_FORMATTING_SMALL_TEXT_MENU_ITEM = exports.TRANSFORM_TEXT_FORMATTING_SMALL_TEXT_MENU_ITEM = {
|
|
86
|
+
key: 'transform-text-formatting-small-text-menu-item'
|
|
87
|
+
};
|
|
82
88
|
var TRANSFORM_CLEAR_MENU_SECTION = exports.TRANSFORM_CLEAR_MENU_SECTION = {
|
|
83
89
|
key: 'transform-clear-menu-section'
|
|
84
90
|
};
|
|
@@ -4,10 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.TRANSFORM_SUGGESTED_MENU_SECTION_RANK = exports.TRANSFORM_STRUCTURE_MENU_SECTION_RANK = exports.TRANSFORM_MENU_SECTION_RANK = exports.TRANSFORM_MENU_ITEM_RANK = exports.TRANSFORM_HEADINGS_MENU_SECTION_RANK = exports.TRANSFORM_CREATE_MENU_SECTION_RANK = exports.TRANSFORM_CLEAR_MENU_SECTION_RANK = exports.POSITION_MENU_SECTION_RANK = exports.MAIN_BLOCK_MENU_SECTION_RANK = exports.DELETE_MENU_SECTION_RANK = exports.BLOCK_ACTIONS_MENU_SECTION_RANK = exports.BLOCK_ACTIONS_FEATURED_EXTENSION_ITEM_RANK = exports.BLOCK_ACTIONS_COPY_MENU_SECTION_RANK = exports.AI_MENU_SECTION_RANK = void 0;
|
|
7
|
+
exports.TRANSFORM_TEXT_FORMATTING_MENU_SECTION_RANK = exports.TRANSFORM_SUGGESTED_MENU_SECTION_RANK = exports.TRANSFORM_STRUCTURE_MENU_SECTION_RANK = exports.TRANSFORM_MENU_SECTION_RANK = exports.TRANSFORM_MENU_ITEM_RANK = exports.TRANSFORM_HEADINGS_MENU_SECTION_RANK = exports.TRANSFORM_CREATE_MENU_SECTION_RANK = exports.TRANSFORM_CLEAR_MENU_SECTION_RANK = exports.POSITION_MENU_SECTION_RANK = exports.MAIN_BLOCK_MENU_SECTION_RANK = exports.DELETE_MENU_SECTION_RANK = exports.BLOCK_ACTIONS_MENU_SECTION_RANK = exports.BLOCK_ACTIONS_FEATURED_EXTENSION_ITEM_RANK = exports.BLOCK_ACTIONS_COPY_MENU_SECTION_RANK = exports.AI_MENU_SECTION_RANK = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _key = require("./key");
|
|
10
|
-
var _TRANSFORM_STRUCTURE_;
|
|
10
|
+
var _TRANSFORM_TEXT_FORMA, _TRANSFORM_STRUCTURE_;
|
|
11
11
|
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
|
|
12
12
|
var MAIN_BLOCK_MENU_SECTION_RANK = exports.MAIN_BLOCK_MENU_SECTION_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _key.AI_MENU_SECTION.key, 100), _key.TRANSFORM_MENU_SECTION.key, 200), _key.BLOCK_ACTIONS_TEMPLATE_SECTION.key, 250), _key.BLOCK_ACTIONS_MENU_SECTION.key, 300), _key.BLOCK_ACTIONS_COPY_MENU_SECTION.key, 350), _key.POSITION_MENU_SECTION.key, 400), _key.DELETE_MENU_SECTION.key, 500);
|
|
13
13
|
var AI_MENU_SECTION_RANK = exports.AI_MENU_SECTION_RANK = (0, _defineProperty2.default)({}, _key.AI_ASK_ROVO_MENU_ITEM.key, 100);
|
|
@@ -17,7 +17,8 @@ var TRANSFORM_SUGGESTED_MENU_SECTION_RANK = exports.TRANSFORM_SUGGESTED_MENU_SEC
|
|
|
17
17
|
var TRANSFORM_MENU_ITEM_RANK = exports.TRANSFORM_MENU_ITEM_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _key.TRANSFORM_SUGGESTED_MENU_SECTION.key, 100), _key.TRANSFORM_CREATE_MENU_SECTION.key, 200), _key.TRANSFORM_STRUCTURE_MENU_SECTION.key, 300), _key.TRANSFORM_HEADINGS_MENU_SECTION.key, 400), _key.TRANSFORM_CLEAR_MENU_SECTION.key, 500);
|
|
18
18
|
var TRANSFORM_CREATE_MENU_SECTION_RANK = exports.TRANSFORM_CREATE_MENU_SECTION_RANK = (0, _defineProperty2.default)({}, _key.TRANSFORM_DEFAULT_EXTENSION_SLOT_MENU_ITEM.key, 1000);
|
|
19
19
|
var TRANSFORM_HEADINGS_MENU_SECTION_RANK = exports.TRANSFORM_HEADINGS_MENU_SECTION_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _key.TRANSFORM_HEADINGS_H1_MENU_ITEM.key, 100), _key.TRANSFORM_HEADINGS_H2_MENU_ITEM.key, 200), _key.TRANSFORM_HEADINGS_H3_MENU_ITEM.key, 300), _key.TRANSFORM_HEADINGS_H4_MENU_ITEM.key, 400), _key.TRANSFORM_HEADINGS_H5_MENU_ITEM.key, 500), _key.TRANSFORM_HEADINGS_H6_MENU_ITEM.key, 600);
|
|
20
|
-
var
|
|
20
|
+
var TRANSFORM_TEXT_FORMATTING_MENU_SECTION_RANK = exports.TRANSFORM_TEXT_FORMATTING_MENU_SECTION_RANK = (_TRANSFORM_TEXT_FORMA = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_TRANSFORM_TEXT_FORMA, _key.TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM.key, 100), _key.TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM.key, 200), _key.TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM.key, 300), _key.TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 400), _key.TRANSFORM_TEXT_FORMATTING_SMALL_TEXT_MENU_ITEM.key, 500), _key.TRANSFORM_HEADINGS_H1_MENU_ITEM.key, 600), _key.TRANSFORM_HEADINGS_H2_MENU_ITEM.key, 700), _key.TRANSFORM_HEADINGS_H3_MENU_ITEM.key, 800), _key.TRANSFORM_HEADINGS_H4_MENU_ITEM.key, 900), _key.TRANSFORM_HEADINGS_H5_MENU_ITEM.key, 1000), (0, _defineProperty2.default)(_TRANSFORM_TEXT_FORMA, _key.TRANSFORM_HEADINGS_H6_MENU_ITEM.key, 1100));
|
|
21
|
+
var TRANSFORM_STRUCTURE_MENU_SECTION_RANK = exports.TRANSFORM_STRUCTURE_MENU_SECTION_RANK = (_TRANSFORM_STRUCTURE_ = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_TRANSFORM_STRUCTURE_, _key.TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM.key, 100), _key.TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key, 200), _key.TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM.key, 300), _key.TRANSFORM_STRUCTURE_STATUS_MENU_ITEM.key, 350), _key.TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM.key, 400), _key.TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 500), _key.TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key, 600), _key.TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM.key, 700), _key.TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM.key, 800), _key.TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM.key, 850), (0, _defineProperty2.default)((0, _defineProperty2.default)(_TRANSFORM_STRUCTURE_, _key.TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key, 900), _key.TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 1000));
|
|
21
22
|
var TRANSFORM_CLEAR_MENU_SECTION_RANK = exports.TRANSFORM_CLEAR_MENU_SECTION_RANK = (0, _defineProperty2.default)({}, _key.TRANSFORM_CLEAR_MENU_ITEM.key, 100);
|
|
22
23
|
var BLOCK_ACTIONS_MENU_SECTION_RANK = exports.BLOCK_ACTIONS_MENU_SECTION_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _key.BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM.key, 100), _key.BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM.key, 200), _key.BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM.key, 300);
|
|
23
24
|
var BLOCK_ACTIONS_COPY_MENU_SECTION_RANK = exports.BLOCK_ACTIONS_COPY_MENU_SECTION_RANK = (0, _defineProperty2.default)({}, _key.BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM.key, 100);
|
|
@@ -41,6 +41,11 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
41
41
|
defaultMessage: 'Paragraph',
|
|
42
42
|
description: 'Change the selected block to a paragraph'
|
|
43
43
|
},
|
|
44
|
+
normalText: {
|
|
45
|
+
id: 'fabric.editor.block.menu.normal.text',
|
|
46
|
+
defaultMessage: 'Normal text',
|
|
47
|
+
description: 'Change the selected block to normal text'
|
|
48
|
+
},
|
|
44
49
|
codeBlock: {
|
|
45
50
|
id: 'fabric.editor.block.menu.codeblock',
|
|
46
51
|
defaultMessage: 'Code block',
|
|
@@ -101,6 +106,11 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
101
106
|
defaultMessage: 'Headings',
|
|
102
107
|
description: 'Menu section title for heading block types'
|
|
103
108
|
},
|
|
109
|
+
textFormatting: {
|
|
110
|
+
id: 'fabric.editor.block.menu.text.formatting',
|
|
111
|
+
defaultMessage: 'Text formatting',
|
|
112
|
+
description: 'Menu section title for text formatting block types'
|
|
113
|
+
},
|
|
104
114
|
suggested: {
|
|
105
115
|
id: 'fabric.editor.block.menu.suggested',
|
|
106
116
|
defaultMessage: 'Suggested',
|
|
@@ -262,6 +262,12 @@ Object.defineProperty(exports, "tasksAndDecisionsMessages", {
|
|
|
262
262
|
return _tasksAndDecsisions.tasksAndDecisionsMessages;
|
|
263
263
|
}
|
|
264
264
|
});
|
|
265
|
+
Object.defineProperty(exports, "templateGalleryMessages", {
|
|
266
|
+
enumerable: true,
|
|
267
|
+
get: function get() {
|
|
268
|
+
return _snippets.templateGalleryMessages;
|
|
269
|
+
}
|
|
270
|
+
});
|
|
265
271
|
Object.defineProperty(exports, "textColorMessages", {
|
|
266
272
|
enumerable: true,
|
|
267
273
|
get: function get() {
|
|
@@ -304,6 +310,7 @@ var _annotation = require("./annotation");
|
|
|
304
310
|
var _breakout = require("./breakout");
|
|
305
311
|
var _blockMenu = require("./block-menu");
|
|
306
312
|
var _blockType = require("./block-type");
|
|
313
|
+
var _snippets = require("./snippets");
|
|
307
314
|
var _codeBidiWarning = require("./codeBidiWarning");
|
|
308
315
|
var _colorAccessibility = require("./color-accessibility");
|
|
309
316
|
var _colorPickerButton = require("./color-picker-button");
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.templateGalleryMessages = void 0;
|
|
7
|
+
var _reactIntl = require("react-intl");
|
|
8
|
+
var templateGalleryMessages = exports.templateGalleryMessages = (0, _reactIntl.defineMessages)({
|
|
9
|
+
blockTemplates: {
|
|
10
|
+
id: 'editor-plugin-snippets.snippetsPlugin.blockTemplates',
|
|
11
|
+
defaultMessage: 'Block templates',
|
|
12
|
+
description: 'Label for the block templates submenu in the block menu'
|
|
13
|
+
},
|
|
14
|
+
browseTemplates: {
|
|
15
|
+
id: 'editor-plugin-snippets.snippetsPlugin.browseTemplates',
|
|
16
|
+
defaultMessage: 'Browse all templates',
|
|
17
|
+
description: 'Label for the action that opens the block template gallery'
|
|
18
|
+
},
|
|
19
|
+
newLozenge: {
|
|
20
|
+
id: 'editor-plugin-snippets.snippetsPlugin.newLozenge',
|
|
21
|
+
defaultMessage: 'New',
|
|
22
|
+
description: 'Lozenge label for the block templates menu item'
|
|
23
|
+
},
|
|
24
|
+
templateGalleryDescription: {
|
|
25
|
+
id: 'editor-plugin-snippets.snippetsPlugin.templateGalleryDescription',
|
|
26
|
+
defaultMessage: 'Create, discover, & insert block templates',
|
|
27
|
+
description: 'Description for the block template gallery quick insert item'
|
|
28
|
+
},
|
|
29
|
+
templateGalleryTitle: {
|
|
30
|
+
id: 'editor-plugin-snippets.snippetsPlugin.templateGalleryTitle',
|
|
31
|
+
defaultMessage: 'Block Template Gallery',
|
|
32
|
+
description: 'Title for the block template gallery quick insert item'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
27
27
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
28
28
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
29
29
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
30
|
-
var packageVersion = "120.
|
|
30
|
+
var packageVersion = "120.16.0";
|
|
31
31
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
32
32
|
// Remove URL as it has UGC
|
|
33
33
|
// Ignored via go/ees007
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "120.
|
|
27
|
+
var packageVersion = "120.16.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.VanillaTooltip = void 0;
|
|
7
|
+
exports.VanillaTooltip = exports.VANILLA_TOOLTIP_DEFAULT_CLASS = void 0;
|
|
8
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -13,6 +13,7 @@ var _bindEventListener = require("bind-event-listener");
|
|
|
13
13
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
14
14
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
15
15
|
var _unsafeImperative = require("@atlaskit/popper/unsafe-imperative");
|
|
16
|
+
var _error = require("../monitoring/error");
|
|
16
17
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
17
18
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
18
19
|
var startingOffset = {
|
|
@@ -28,6 +29,12 @@ var endingOffset = {
|
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Opt-in class for the default tooltip look, defined as `vanillaTooltipDefaultStyles` in
|
|
34
|
+
* EditorContentContainer. Pass it alongside your own class name.
|
|
35
|
+
*/
|
|
36
|
+
var VANILLA_TOOLTIP_DEFAULT_CLASS = exports.VANILLA_TOOLTIP_DEFAULT_CLASS = 'ak-editor-vanilla-tooltip-default';
|
|
37
|
+
|
|
31
38
|
/**
|
|
32
39
|
* Namespaced to keep generated ids from colliding with ids the host page owns, since they share
|
|
33
40
|
* the document's single id space.
|
|
@@ -127,6 +134,11 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
127
134
|
tooltip.className = className;
|
|
128
135
|
tooltip.id = id !== null && id !== void 0 ? id : generateTooltipId();
|
|
129
136
|
tooltip.textContent = content;
|
|
137
|
+
|
|
138
|
+
// A tooltip is never a hit target. Set before the caller's styles so it can be overridden.
|
|
139
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_use_vanilla_components')) {
|
|
140
|
+
tooltip.style.pointerEvents = 'none';
|
|
141
|
+
}
|
|
130
142
|
if (styles) {
|
|
131
143
|
Object.assign(tooltip.style, styles);
|
|
132
144
|
}
|
|
@@ -182,18 +194,44 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
182
194
|
/**
|
|
183
195
|
* Closes the popover, tolerating it already being closed.
|
|
184
196
|
*
|
|
185
|
-
* `
|
|
186
|
-
*
|
|
187
|
-
* light-dismisses this one without notifying us, so the caller cannot know whether it is
|
|
188
|
-
* still open.
|
|
197
|
+
* A `hint` popover is light-dismissed by the browser whenever another `hint` or `auto` popover
|
|
198
|
+
* opens, so the caller can never be sure this one is still showing.
|
|
189
199
|
*/
|
|
190
200
|
return (0, _createClass2.default)(VanillaTooltip, [{
|
|
191
201
|
key: "closePopover",
|
|
192
202
|
value: function closePopover() {
|
|
193
203
|
try {
|
|
194
204
|
this.tooltip.hidePopover();
|
|
195
|
-
} catch (
|
|
196
|
-
//
|
|
205
|
+
} catch (error) {
|
|
206
|
+
// `hidePopover()` raises `InvalidStateError` both when the popover is not showing
|
|
207
|
+
// when the tooltip is disconnected or has lost its `popover` attribute.
|
|
208
|
+
if (!this.tooltip.isConnected || !this.tooltip.hasAttribute('popover')) {
|
|
209
|
+
(0, _error.logException)(error, {
|
|
210
|
+
location: 'editor-common/vanilla-tooltip'
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Opens the popover, tolerating it already being open.
|
|
218
|
+
*
|
|
219
|
+
* A hover returning during a pending hide re-enters `show()` before `isDisplayed` is set, so
|
|
220
|
+
* this runs against an already-open popover on that path.
|
|
221
|
+
*/
|
|
222
|
+
}, {
|
|
223
|
+
key: "openPopover",
|
|
224
|
+
value: function openPopover() {
|
|
225
|
+
try {
|
|
226
|
+
this.tooltip.showPopover();
|
|
227
|
+
} catch (error) {
|
|
228
|
+
// `showPopover()` raises `InvalidStateError` both when the tooltip is already in the
|
|
229
|
+
// top layer and when it is disconnected or has lost its `popover` attribute.
|
|
230
|
+
if (!this.tooltip.isConnected || !this.tooltip.hasAttribute('popover')) {
|
|
231
|
+
(0, _error.logException)(error, {
|
|
232
|
+
location: 'editor-common/vanilla-tooltip'
|
|
233
|
+
});
|
|
234
|
+
}
|
|
197
235
|
}
|
|
198
236
|
}
|
|
199
237
|
}, {
|
|
@@ -221,6 +259,9 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
221
259
|
// Undoes what the constructor added to the trigger, matching the React `@atlaskit/tooltip`
|
|
222
260
|
// callers are moving off, whose unmount took its DOM with it.
|
|
223
261
|
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_use_vanilla_components')) {
|
|
262
|
+
// A popover removed while still showing is never light-dismissed, so the top layer
|
|
263
|
+
// keeps treating it as open.
|
|
264
|
+
this.closePopover();
|
|
224
265
|
this.tooltip.remove();
|
|
225
266
|
if (this.trigger.getAttribute('aria-describedby') === this.tooltip.id) {
|
|
226
267
|
this.trigger.removeAttribute('aria-describedby');
|
|
@@ -297,11 +338,8 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
297
338
|
_this3.isDisplayed = false;
|
|
298
339
|
|
|
299
340
|
// Closed here rather than from `ontransitionend`. No consumer declares a
|
|
300
|
-
// transition on the tooltip
|
|
301
|
-
//
|
|
302
|
-
// hit target over the content, and — because `showPopover()` throws
|
|
303
|
-
// `InvalidStateError` on an already-showing popover — an uncaught error out of
|
|
304
|
-
// the next `mouseenter`, after which the tooltip never appeared again.
|
|
341
|
+
// transition on the tooltip, so that event never fires and the popover would
|
|
342
|
+
// otherwise stay open in the top layer for good.
|
|
305
343
|
_this3.closePopover();
|
|
306
344
|
// Paired with the `visibility` that `show()` sets, so a popover left open by
|
|
307
345
|
// a failed close cannot intercept pointer events over the content.
|
|
@@ -352,7 +390,11 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
352
390
|
|
|
353
391
|
// Make the tooltip visible - but hide until
|
|
354
392
|
this.tooltip.style.visibility = 'hidden';
|
|
355
|
-
|
|
393
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_use_vanilla_components')) {
|
|
394
|
+
this.openPopover();
|
|
395
|
+
} else {
|
|
396
|
+
this.tooltip.showPopover();
|
|
397
|
+
}
|
|
356
398
|
|
|
357
399
|
// Update its position
|
|
358
400
|
if (!this.popperInstance) {
|
|
@@ -145,6 +145,16 @@ export const aiSuggestionsMessages = defineMessages({
|
|
|
145
145
|
defaultMessage: 'Visible only to you',
|
|
146
146
|
description: 'Tooltip shown on the private indicator icon in the AI suggestions card'
|
|
147
147
|
},
|
|
148
|
+
cardRestrictedLabel: {
|
|
149
|
+
id: 'fabric.editor.ai.suggestions.card.restrictedLabel.non-final',
|
|
150
|
+
defaultMessage: 'Restricted',
|
|
151
|
+
description: 'Label for the restricted suggestion lozenge'
|
|
152
|
+
},
|
|
153
|
+
cardRestrictedTooltipLabel: {
|
|
154
|
+
id: 'fabric.editor.ai.suggestions.card.restrictedTooltip.non-final',
|
|
155
|
+
defaultMessage: 'Only editors with access to the source can see this suggestion',
|
|
156
|
+
description: 'Tooltip for the restricted suggestion lozenge'
|
|
157
|
+
},
|
|
148
158
|
cardDetailsButtonLabel: {
|
|
149
159
|
id: 'fabric.editor.ai.suggestions.card.detailsButtonLabel.non-final',
|
|
150
160
|
defaultMessage: 'Details',
|
|
@@ -70,9 +70,15 @@ export const TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM = {
|
|
|
70
70
|
export const TRANSFORM_STRUCTURE_DECISION_MENU_ITEM = {
|
|
71
71
|
key: 'transform-structure-decision-menu-item'
|
|
72
72
|
};
|
|
73
|
+
export const TRANSFORM_STRUCTURE_STATUS_MENU_ITEM = {
|
|
74
|
+
key: 'transform-structure-status-menu-item'
|
|
75
|
+
};
|
|
73
76
|
export const TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM = {
|
|
74
77
|
key: 'transform-structure-paragraph-menu-item'
|
|
75
78
|
};
|
|
79
|
+
export const TRANSFORM_TEXT_FORMATTING_SMALL_TEXT_MENU_ITEM = {
|
|
80
|
+
key: 'transform-text-formatting-small-text-menu-item'
|
|
81
|
+
};
|
|
76
82
|
export const TRANSFORM_CLEAR_MENU_SECTION = {
|
|
77
83
|
key: 'transform-clear-menu-section'
|
|
78
84
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
|
|
2
|
-
import { BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM, BLOCK_ACTIONS_TEMPLATE_SECTION, BLOCK_ACTIONS_MENU_SECTION, BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM, BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM, BLOCK_ACTIONS_COPY_MENU_SECTION, DELETE_MENU_SECTION, DELETE_MENU_ITEM, POSITION_MENU_SECTION, POSITION_MOVE_UP_MENU_ITEM, POSITION_MOVE_DOWN_MENU_ITEM, TRANSFORM_MENU_SECTION, TRANSFORM_MENU_ITEM, TRANSFORM_CLEAR_MENU_SECTION, TRANSFORM_CLEAR_MENU_ITEM, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_HEADINGS_MENU_SECTION, TRANSFORM_HEADINGS_H1_MENU_ITEM, TRANSFORM_HEADINGS_H2_MENU_ITEM, TRANSFORM_HEADINGS_H3_MENU_ITEM, TRANSFORM_HEADINGS_H4_MENU_ITEM, TRANSFORM_HEADINGS_H5_MENU_ITEM, TRANSFORM_HEADINGS_H6_MENU_ITEM, TRANSFORM_SUGGESTED_MENU_SECTION, TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM, TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM, TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM, TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM, TRANSFORM_STRUCTURE_DECISION_MENU_ITEM, TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM, TRANSFORM_SUGGESTED_MENU_ITEM, TRANSFORM_DEFAULT_EXTENSION_SLOT_MENU_ITEM, AI_MENU_SECTION, AI_ASK_ROVO_MENU_ITEM } from './key';
|
|
2
|
+
import { BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM, BLOCK_ACTIONS_TEMPLATE_SECTION, BLOCK_ACTIONS_MENU_SECTION, BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM, BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM, BLOCK_ACTIONS_COPY_MENU_SECTION, DELETE_MENU_SECTION, DELETE_MENU_ITEM, POSITION_MENU_SECTION, POSITION_MOVE_UP_MENU_ITEM, POSITION_MOVE_DOWN_MENU_ITEM, TRANSFORM_MENU_SECTION, TRANSFORM_MENU_ITEM, TRANSFORM_CLEAR_MENU_SECTION, TRANSFORM_CLEAR_MENU_ITEM, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_HEADINGS_MENU_SECTION, TRANSFORM_HEADINGS_H1_MENU_ITEM, TRANSFORM_HEADINGS_H2_MENU_ITEM, TRANSFORM_HEADINGS_H3_MENU_ITEM, TRANSFORM_HEADINGS_H4_MENU_ITEM, TRANSFORM_HEADINGS_H5_MENU_ITEM, TRANSFORM_HEADINGS_H6_MENU_ITEM, TRANSFORM_SUGGESTED_MENU_SECTION, TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM, TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM, TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM, TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM, TRANSFORM_STRUCTURE_DECISION_MENU_ITEM, TRANSFORM_STRUCTURE_STATUS_MENU_ITEM, TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM, TRANSFORM_TEXT_FORMATTING_SMALL_TEXT_MENU_ITEM, TRANSFORM_SUGGESTED_MENU_ITEM, TRANSFORM_DEFAULT_EXTENSION_SLOT_MENU_ITEM, AI_MENU_SECTION, AI_ASK_ROVO_MENU_ITEM } from './key';
|
|
3
3
|
export const MAIN_BLOCK_MENU_SECTION_RANK = {
|
|
4
4
|
[AI_MENU_SECTION.key]: 100,
|
|
5
5
|
[TRANSFORM_MENU_SECTION.key]: 200,
|
|
@@ -41,10 +41,24 @@ export const TRANSFORM_HEADINGS_MENU_SECTION_RANK = {
|
|
|
41
41
|
[TRANSFORM_HEADINGS_H5_MENU_ITEM.key]: 500,
|
|
42
42
|
[TRANSFORM_HEADINGS_H6_MENU_ITEM.key]: 600
|
|
43
43
|
};
|
|
44
|
+
export const TRANSFORM_TEXT_FORMATTING_MENU_SECTION_RANK = {
|
|
45
|
+
[TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM.key]: 100,
|
|
46
|
+
[TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM.key]: 200,
|
|
47
|
+
[TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM.key]: 300,
|
|
48
|
+
[TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key]: 400,
|
|
49
|
+
[TRANSFORM_TEXT_FORMATTING_SMALL_TEXT_MENU_ITEM.key]: 500,
|
|
50
|
+
[TRANSFORM_HEADINGS_H1_MENU_ITEM.key]: 600,
|
|
51
|
+
[TRANSFORM_HEADINGS_H2_MENU_ITEM.key]: 700,
|
|
52
|
+
[TRANSFORM_HEADINGS_H3_MENU_ITEM.key]: 800,
|
|
53
|
+
[TRANSFORM_HEADINGS_H4_MENU_ITEM.key]: 900,
|
|
54
|
+
[TRANSFORM_HEADINGS_H5_MENU_ITEM.key]: 1000,
|
|
55
|
+
[TRANSFORM_HEADINGS_H6_MENU_ITEM.key]: 1100
|
|
56
|
+
};
|
|
44
57
|
export const TRANSFORM_STRUCTURE_MENU_SECTION_RANK = {
|
|
45
58
|
[TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM.key]: 100,
|
|
46
59
|
[TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key]: 200,
|
|
47
60
|
[TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM.key]: 300,
|
|
61
|
+
[TRANSFORM_STRUCTURE_STATUS_MENU_ITEM.key]: 350,
|
|
48
62
|
[TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM.key]: 400,
|
|
49
63
|
[TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key]: 500,
|
|
50
64
|
[TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key]: 600,
|
|
@@ -35,6 +35,11 @@ export const messages = defineMessages({
|
|
|
35
35
|
defaultMessage: 'Paragraph',
|
|
36
36
|
description: 'Change the selected block to a paragraph'
|
|
37
37
|
},
|
|
38
|
+
normalText: {
|
|
39
|
+
id: 'fabric.editor.block.menu.normal.text',
|
|
40
|
+
defaultMessage: 'Normal text',
|
|
41
|
+
description: 'Change the selected block to normal text'
|
|
42
|
+
},
|
|
38
43
|
codeBlock: {
|
|
39
44
|
id: 'fabric.editor.block.menu.codeblock',
|
|
40
45
|
defaultMessage: 'Code block',
|
|
@@ -95,6 +100,11 @@ export const messages = defineMessages({
|
|
|
95
100
|
defaultMessage: 'Headings',
|
|
96
101
|
description: 'Menu section title for heading block types'
|
|
97
102
|
},
|
|
103
|
+
textFormatting: {
|
|
104
|
+
id: 'fabric.editor.block.menu.text.formatting',
|
|
105
|
+
defaultMessage: 'Text formatting',
|
|
106
|
+
description: 'Menu section title for text formatting block types'
|
|
107
|
+
},
|
|
98
108
|
suggested: {
|
|
99
109
|
id: 'fabric.editor.block.menu.suggested',
|
|
100
110
|
defaultMessage: 'Suggested',
|
|
@@ -7,6 +7,7 @@ export { annotationMessages } from './annotation';
|
|
|
7
7
|
export { messages as breakoutMessages } from './breakout';
|
|
8
8
|
export { messages as blockMenuMessages } from './block-menu';
|
|
9
9
|
export { messages as blockTypeMessages } from './block-type';
|
|
10
|
+
export { templateGalleryMessages } from './snippets';
|
|
10
11
|
export { codeBidiWarningMessages } from './codeBidiWarning';
|
|
11
12
|
export { colorAccessibilityMessages } from './color-accessibility';
|
|
12
13
|
export { colorPickerButtonMessages } from './color-picker-button';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
export const templateGalleryMessages = defineMessages({
|
|
3
|
+
blockTemplates: {
|
|
4
|
+
id: 'editor-plugin-snippets.snippetsPlugin.blockTemplates',
|
|
5
|
+
defaultMessage: 'Block templates',
|
|
6
|
+
description: 'Label for the block templates submenu in the block menu'
|
|
7
|
+
},
|
|
8
|
+
browseTemplates: {
|
|
9
|
+
id: 'editor-plugin-snippets.snippetsPlugin.browseTemplates',
|
|
10
|
+
defaultMessage: 'Browse all templates',
|
|
11
|
+
description: 'Label for the action that opens the block template gallery'
|
|
12
|
+
},
|
|
13
|
+
newLozenge: {
|
|
14
|
+
id: 'editor-plugin-snippets.snippetsPlugin.newLozenge',
|
|
15
|
+
defaultMessage: 'New',
|
|
16
|
+
description: 'Lozenge label for the block templates menu item'
|
|
17
|
+
},
|
|
18
|
+
templateGalleryDescription: {
|
|
19
|
+
id: 'editor-plugin-snippets.snippetsPlugin.templateGalleryDescription',
|
|
20
|
+
defaultMessage: 'Create, discover, & insert block templates',
|
|
21
|
+
description: 'Description for the block template gallery quick insert item'
|
|
22
|
+
},
|
|
23
|
+
templateGalleryTitle: {
|
|
24
|
+
id: 'editor-plugin-snippets.snippetsPlugin.templateGalleryTitle',
|
|
25
|
+
defaultMessage: 'Block Template Gallery',
|
|
26
|
+
description: 'Title for the block template gallery quick insert item'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
13
13
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
14
14
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
15
15
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
16
|
-
const packageVersion = "120.
|
|
16
|
+
const packageVersion = "120.16.0";
|
|
17
17
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
18
18
|
// Remove URL as it has UGC
|
|
19
19
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "120.
|
|
17
|
+
const packageVersion = "120.16.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -4,6 +4,7 @@ import { bind } from 'bind-event-listener';
|
|
|
4
4
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
5
5
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
6
|
import { createPopper as createWrappedPopper } from '@atlaskit/popper/unsafe-imperative';
|
|
7
|
+
import { logException } from '../monitoring/error';
|
|
7
8
|
const startingOffset = {
|
|
8
9
|
name: 'offset',
|
|
9
10
|
options: {
|
|
@@ -17,6 +18,12 @@ const endingOffset = {
|
|
|
17
18
|
}
|
|
18
19
|
};
|
|
19
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Opt-in class for the default tooltip look, defined as `vanillaTooltipDefaultStyles` in
|
|
23
|
+
* EditorContentContainer. Pass it alongside your own class name.
|
|
24
|
+
*/
|
|
25
|
+
export const VANILLA_TOOLTIP_DEFAULT_CLASS = 'ak-editor-vanilla-tooltip-default';
|
|
26
|
+
|
|
20
27
|
/**
|
|
21
28
|
* Namespaced to keep generated ids from colliding with ids the host page owns, since they share
|
|
22
29
|
* the document's single id space.
|
|
@@ -115,6 +122,11 @@ export class VanillaTooltip {
|
|
|
115
122
|
tooltip.className = className;
|
|
116
123
|
tooltip.id = id !== null && id !== void 0 ? id : generateTooltipId();
|
|
117
124
|
tooltip.textContent = content;
|
|
125
|
+
|
|
126
|
+
// A tooltip is never a hit target. Set before the caller's styles so it can be overridden.
|
|
127
|
+
if (isExperimentEnabled('platform_editor_use_vanilla_components')) {
|
|
128
|
+
tooltip.style.pointerEvents = 'none';
|
|
129
|
+
}
|
|
118
130
|
if (styles) {
|
|
119
131
|
Object.assign(tooltip.style, styles);
|
|
120
132
|
}
|
|
@@ -166,16 +178,40 @@ export class VanillaTooltip {
|
|
|
166
178
|
/**
|
|
167
179
|
* Closes the popover, tolerating it already being closed.
|
|
168
180
|
*
|
|
169
|
-
* `
|
|
170
|
-
*
|
|
171
|
-
* light-dismisses this one without notifying us, so the caller cannot know whether it is
|
|
172
|
-
* still open.
|
|
181
|
+
* A `hint` popover is light-dismissed by the browser whenever another `hint` or `auto` popover
|
|
182
|
+
* opens, so the caller can never be sure this one is still showing.
|
|
173
183
|
*/
|
|
174
184
|
closePopover() {
|
|
175
185
|
try {
|
|
176
186
|
this.tooltip.hidePopover();
|
|
177
|
-
} catch (
|
|
178
|
-
//
|
|
187
|
+
} catch (error) {
|
|
188
|
+
// `hidePopover()` raises `InvalidStateError` both when the popover is not showing
|
|
189
|
+
// when the tooltip is disconnected or has lost its `popover` attribute.
|
|
190
|
+
if (!this.tooltip.isConnected || !this.tooltip.hasAttribute('popover')) {
|
|
191
|
+
logException(error, {
|
|
192
|
+
location: 'editor-common/vanilla-tooltip'
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Opens the popover, tolerating it already being open.
|
|
200
|
+
*
|
|
201
|
+
* A hover returning during a pending hide re-enters `show()` before `isDisplayed` is set, so
|
|
202
|
+
* this runs against an already-open popover on that path.
|
|
203
|
+
*/
|
|
204
|
+
openPopover() {
|
|
205
|
+
try {
|
|
206
|
+
this.tooltip.showPopover();
|
|
207
|
+
} catch (error) {
|
|
208
|
+
// `showPopover()` raises `InvalidStateError` both when the tooltip is already in the
|
|
209
|
+
// top layer and when it is disconnected or has lost its `popover` attribute.
|
|
210
|
+
if (!this.tooltip.isConnected || !this.tooltip.hasAttribute('popover')) {
|
|
211
|
+
logException(error, {
|
|
212
|
+
location: 'editor-common/vanilla-tooltip'
|
|
213
|
+
});
|
|
214
|
+
}
|
|
179
215
|
}
|
|
180
216
|
}
|
|
181
217
|
createPopperInstance() {
|
|
@@ -199,6 +235,9 @@ export class VanillaTooltip {
|
|
|
199
235
|
// Undoes what the constructor added to the trigger, matching the React `@atlaskit/tooltip`
|
|
200
236
|
// callers are moving off, whose unmount took its DOM with it.
|
|
201
237
|
if (isExperimentEnabled('platform_editor_use_vanilla_components')) {
|
|
238
|
+
// A popover removed while still showing is never light-dismissed, so the top layer
|
|
239
|
+
// keeps treating it as open.
|
|
240
|
+
this.closePopover();
|
|
202
241
|
this.tooltip.remove();
|
|
203
242
|
if (this.trigger.getAttribute('aria-describedby') === this.tooltip.id) {
|
|
204
243
|
this.trigger.removeAttribute('aria-describedby');
|
|
@@ -266,11 +305,8 @@ export class VanillaTooltip {
|
|
|
266
305
|
this.isDisplayed = false;
|
|
267
306
|
|
|
268
307
|
// Closed here rather than from `ontransitionend`. No consumer declares a
|
|
269
|
-
// transition on the tooltip
|
|
270
|
-
//
|
|
271
|
-
// hit target over the content, and — because `showPopover()` throws
|
|
272
|
-
// `InvalidStateError` on an already-showing popover — an uncaught error out of
|
|
273
|
-
// the next `mouseenter`, after which the tooltip never appeared again.
|
|
308
|
+
// transition on the tooltip, so that event never fires and the popover would
|
|
309
|
+
// otherwise stay open in the top layer for good.
|
|
274
310
|
this.closePopover();
|
|
275
311
|
// Paired with the `visibility` that `show()` sets, so a popover left open by
|
|
276
312
|
// a failed close cannot intercept pointer events over the content.
|
|
@@ -317,7 +353,11 @@ export class VanillaTooltip {
|
|
|
317
353
|
|
|
318
354
|
// Make the tooltip visible - but hide until
|
|
319
355
|
this.tooltip.style.visibility = 'hidden';
|
|
320
|
-
|
|
356
|
+
if (isExperimentEnabled('platform_editor_use_vanilla_components')) {
|
|
357
|
+
this.openPopover();
|
|
358
|
+
} else {
|
|
359
|
+
this.tooltip.showPopover();
|
|
360
|
+
}
|
|
321
361
|
|
|
322
362
|
// Update its position
|
|
323
363
|
if (!this.popperInstance) {
|
|
@@ -145,6 +145,16 @@ export var aiSuggestionsMessages = defineMessages({
|
|
|
145
145
|
defaultMessage: 'Visible only to you',
|
|
146
146
|
description: 'Tooltip shown on the private indicator icon in the AI suggestions card'
|
|
147
147
|
},
|
|
148
|
+
cardRestrictedLabel: {
|
|
149
|
+
id: 'fabric.editor.ai.suggestions.card.restrictedLabel.non-final',
|
|
150
|
+
defaultMessage: 'Restricted',
|
|
151
|
+
description: 'Label for the restricted suggestion lozenge'
|
|
152
|
+
},
|
|
153
|
+
cardRestrictedTooltipLabel: {
|
|
154
|
+
id: 'fabric.editor.ai.suggestions.card.restrictedTooltip.non-final',
|
|
155
|
+
defaultMessage: 'Only editors with access to the source can see this suggestion',
|
|
156
|
+
description: 'Tooltip for the restricted suggestion lozenge'
|
|
157
|
+
},
|
|
148
158
|
cardDetailsButtonLabel: {
|
|
149
159
|
id: 'fabric.editor.ai.suggestions.card.detailsButtonLabel.non-final',
|
|
150
160
|
defaultMessage: 'Details',
|
|
@@ -70,9 +70,15 @@ export var TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM = {
|
|
|
70
70
|
export var TRANSFORM_STRUCTURE_DECISION_MENU_ITEM = {
|
|
71
71
|
key: 'transform-structure-decision-menu-item'
|
|
72
72
|
};
|
|
73
|
+
export var TRANSFORM_STRUCTURE_STATUS_MENU_ITEM = {
|
|
74
|
+
key: 'transform-structure-status-menu-item'
|
|
75
|
+
};
|
|
73
76
|
export var TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM = {
|
|
74
77
|
key: 'transform-structure-paragraph-menu-item'
|
|
75
78
|
};
|
|
79
|
+
export var TRANSFORM_TEXT_FORMATTING_SMALL_TEXT_MENU_ITEM = {
|
|
80
|
+
key: 'transform-text-formatting-small-text-menu-item'
|
|
81
|
+
};
|
|
76
82
|
export var TRANSFORM_CLEAR_MENU_SECTION = {
|
|
77
83
|
key: 'transform-clear-menu-section'
|
|
78
84
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _TRANSFORM_STRUCTURE_;
|
|
2
|
+
var _TRANSFORM_TEXT_FORMA, _TRANSFORM_STRUCTURE_;
|
|
3
3
|
/* eslint-disable @atlaskit/volt-strict-mode/no-multiple-exports */
|
|
4
|
-
import { BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM, BLOCK_ACTIONS_TEMPLATE_SECTION, BLOCK_ACTIONS_MENU_SECTION, BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM, BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM, BLOCK_ACTIONS_COPY_MENU_SECTION, DELETE_MENU_SECTION, DELETE_MENU_ITEM, POSITION_MENU_SECTION, POSITION_MOVE_UP_MENU_ITEM, POSITION_MOVE_DOWN_MENU_ITEM, TRANSFORM_MENU_SECTION, TRANSFORM_MENU_ITEM, TRANSFORM_CLEAR_MENU_SECTION, TRANSFORM_CLEAR_MENU_ITEM, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_HEADINGS_MENU_SECTION, TRANSFORM_HEADINGS_H1_MENU_ITEM, TRANSFORM_HEADINGS_H2_MENU_ITEM, TRANSFORM_HEADINGS_H3_MENU_ITEM, TRANSFORM_HEADINGS_H4_MENU_ITEM, TRANSFORM_HEADINGS_H5_MENU_ITEM, TRANSFORM_HEADINGS_H6_MENU_ITEM, TRANSFORM_SUGGESTED_MENU_SECTION, TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM, TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM, TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM, TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM, TRANSFORM_STRUCTURE_DECISION_MENU_ITEM, TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM, TRANSFORM_SUGGESTED_MENU_ITEM, TRANSFORM_DEFAULT_EXTENSION_SLOT_MENU_ITEM, AI_MENU_SECTION, AI_ASK_ROVO_MENU_ITEM } from './key';
|
|
4
|
+
import { BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM, BLOCK_ACTIONS_TEMPLATE_SECTION, BLOCK_ACTIONS_MENU_SECTION, BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM, BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM, BLOCK_ACTIONS_COPY_MENU_SECTION, DELETE_MENU_SECTION, DELETE_MENU_ITEM, POSITION_MENU_SECTION, POSITION_MOVE_UP_MENU_ITEM, POSITION_MOVE_DOWN_MENU_ITEM, TRANSFORM_MENU_SECTION, TRANSFORM_MENU_ITEM, TRANSFORM_CLEAR_MENU_SECTION, TRANSFORM_CLEAR_MENU_ITEM, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_HEADINGS_MENU_SECTION, TRANSFORM_HEADINGS_H1_MENU_ITEM, TRANSFORM_HEADINGS_H2_MENU_ITEM, TRANSFORM_HEADINGS_H3_MENU_ITEM, TRANSFORM_HEADINGS_H4_MENU_ITEM, TRANSFORM_HEADINGS_H5_MENU_ITEM, TRANSFORM_HEADINGS_H6_MENU_ITEM, TRANSFORM_SUGGESTED_MENU_SECTION, TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM, TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM, TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM, TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM, TRANSFORM_STRUCTURE_DECISION_MENU_ITEM, TRANSFORM_STRUCTURE_STATUS_MENU_ITEM, TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM, TRANSFORM_TEXT_FORMATTING_SMALL_TEXT_MENU_ITEM, TRANSFORM_SUGGESTED_MENU_ITEM, TRANSFORM_DEFAULT_EXTENSION_SLOT_MENU_ITEM, AI_MENU_SECTION, AI_ASK_ROVO_MENU_ITEM } from './key';
|
|
5
5
|
export var MAIN_BLOCK_MENU_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, AI_MENU_SECTION.key, 100), TRANSFORM_MENU_SECTION.key, 200), BLOCK_ACTIONS_TEMPLATE_SECTION.key, 250), BLOCK_ACTIONS_MENU_SECTION.key, 300), BLOCK_ACTIONS_COPY_MENU_SECTION.key, 350), POSITION_MENU_SECTION.key, 400), DELETE_MENU_SECTION.key, 500);
|
|
6
6
|
export var AI_MENU_SECTION_RANK = _defineProperty({}, AI_ASK_ROVO_MENU_ITEM.key, 100);
|
|
7
7
|
export var TRANSFORM_MENU_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_MENU_ITEM.key, 100), BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM.key, 200), BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM.key, 300);
|
|
@@ -10,7 +10,8 @@ export var TRANSFORM_SUGGESTED_MENU_SECTION_RANK = _defineProperty({}, TRANSFORM
|
|
|
10
10
|
export var TRANSFORM_MENU_ITEM_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_SUGGESTED_MENU_SECTION.key, 100), TRANSFORM_CREATE_MENU_SECTION.key, 200), TRANSFORM_STRUCTURE_MENU_SECTION.key, 300), TRANSFORM_HEADINGS_MENU_SECTION.key, 400), TRANSFORM_CLEAR_MENU_SECTION.key, 500);
|
|
11
11
|
export var TRANSFORM_CREATE_MENU_SECTION_RANK = _defineProperty({}, TRANSFORM_DEFAULT_EXTENSION_SLOT_MENU_ITEM.key, 1000);
|
|
12
12
|
export var TRANSFORM_HEADINGS_MENU_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_HEADINGS_H1_MENU_ITEM.key, 100), TRANSFORM_HEADINGS_H2_MENU_ITEM.key, 200), TRANSFORM_HEADINGS_H3_MENU_ITEM.key, 300), TRANSFORM_HEADINGS_H4_MENU_ITEM.key, 400), TRANSFORM_HEADINGS_H5_MENU_ITEM.key, 500), TRANSFORM_HEADINGS_H6_MENU_ITEM.key, 600);
|
|
13
|
-
export var
|
|
13
|
+
export var TRANSFORM_TEXT_FORMATTING_MENU_SECTION_RANK = (_TRANSFORM_TEXT_FORMA = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_TRANSFORM_TEXT_FORMA, TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM.key, 300), TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 400), TRANSFORM_TEXT_FORMATTING_SMALL_TEXT_MENU_ITEM.key, 500), TRANSFORM_HEADINGS_H1_MENU_ITEM.key, 600), TRANSFORM_HEADINGS_H2_MENU_ITEM.key, 700), TRANSFORM_HEADINGS_H3_MENU_ITEM.key, 800), TRANSFORM_HEADINGS_H4_MENU_ITEM.key, 900), TRANSFORM_HEADINGS_H5_MENU_ITEM.key, 1000), _defineProperty(_TRANSFORM_TEXT_FORMA, TRANSFORM_HEADINGS_H6_MENU_ITEM.key, 1100));
|
|
14
|
+
export var TRANSFORM_STRUCTURE_MENU_SECTION_RANK = (_TRANSFORM_STRUCTURE_ = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_TRANSFORM_STRUCTURE_, TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM.key, 300), TRANSFORM_STRUCTURE_STATUS_MENU_ITEM.key, 350), TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM.key, 400), TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 500), TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key, 600), TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM.key, 700), TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM.key, 800), TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM.key, 850), _defineProperty(_defineProperty(_TRANSFORM_STRUCTURE_, TRANSFORM_STRUCTURE_DECISION_MENU_ITEM.key, 900), TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 1000));
|
|
14
15
|
export var TRANSFORM_CLEAR_MENU_SECTION_RANK = _defineProperty({}, TRANSFORM_CLEAR_MENU_ITEM.key, 100);
|
|
15
16
|
export var BLOCK_ACTIONS_MENU_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty({}, BLOCK_ACTIONS_CREATE_SYNCED_BLOCK_MENU_ITEM.key, 100), BLOCK_ACTIONS_FEATURED_EXTENSION_SLOT_MENU_ITEM.key, 200), BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM.key, 300);
|
|
16
17
|
export var BLOCK_ACTIONS_COPY_MENU_SECTION_RANK = _defineProperty({}, BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM.key, 100);
|
|
@@ -35,6 +35,11 @@ export var messages = defineMessages({
|
|
|
35
35
|
defaultMessage: 'Paragraph',
|
|
36
36
|
description: 'Change the selected block to a paragraph'
|
|
37
37
|
},
|
|
38
|
+
normalText: {
|
|
39
|
+
id: 'fabric.editor.block.menu.normal.text',
|
|
40
|
+
defaultMessage: 'Normal text',
|
|
41
|
+
description: 'Change the selected block to normal text'
|
|
42
|
+
},
|
|
38
43
|
codeBlock: {
|
|
39
44
|
id: 'fabric.editor.block.menu.codeblock',
|
|
40
45
|
defaultMessage: 'Code block',
|
|
@@ -95,6 +100,11 @@ export var messages = defineMessages({
|
|
|
95
100
|
defaultMessage: 'Headings',
|
|
96
101
|
description: 'Menu section title for heading block types'
|
|
97
102
|
},
|
|
103
|
+
textFormatting: {
|
|
104
|
+
id: 'fabric.editor.block.menu.text.formatting',
|
|
105
|
+
defaultMessage: 'Text formatting',
|
|
106
|
+
description: 'Menu section title for text formatting block types'
|
|
107
|
+
},
|
|
98
108
|
suggested: {
|
|
99
109
|
id: 'fabric.editor.block.menu.suggested',
|
|
100
110
|
defaultMessage: 'Suggested',
|
|
@@ -7,6 +7,7 @@ export { annotationMessages } from './annotation';
|
|
|
7
7
|
export { messages as breakoutMessages } from './breakout';
|
|
8
8
|
export { messages as blockMenuMessages } from './block-menu';
|
|
9
9
|
export { messages as blockTypeMessages } from './block-type';
|
|
10
|
+
export { templateGalleryMessages } from './snippets';
|
|
10
11
|
export { codeBidiWarningMessages } from './codeBidiWarning';
|
|
11
12
|
export { colorAccessibilityMessages } from './color-accessibility';
|
|
12
13
|
export { colorPickerButtonMessages } from './color-picker-button';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineMessages } from 'react-intl';
|
|
2
|
+
export var templateGalleryMessages = defineMessages({
|
|
3
|
+
blockTemplates: {
|
|
4
|
+
id: 'editor-plugin-snippets.snippetsPlugin.blockTemplates',
|
|
5
|
+
defaultMessage: 'Block templates',
|
|
6
|
+
description: 'Label for the block templates submenu in the block menu'
|
|
7
|
+
},
|
|
8
|
+
browseTemplates: {
|
|
9
|
+
id: 'editor-plugin-snippets.snippetsPlugin.browseTemplates',
|
|
10
|
+
defaultMessage: 'Browse all templates',
|
|
11
|
+
description: 'Label for the action that opens the block template gallery'
|
|
12
|
+
},
|
|
13
|
+
newLozenge: {
|
|
14
|
+
id: 'editor-plugin-snippets.snippetsPlugin.newLozenge',
|
|
15
|
+
defaultMessage: 'New',
|
|
16
|
+
description: 'Lozenge label for the block templates menu item'
|
|
17
|
+
},
|
|
18
|
+
templateGalleryDescription: {
|
|
19
|
+
id: 'editor-plugin-snippets.snippetsPlugin.templateGalleryDescription',
|
|
20
|
+
defaultMessage: 'Create, discover, & insert block templates',
|
|
21
|
+
description: 'Description for the block template gallery quick insert item'
|
|
22
|
+
},
|
|
23
|
+
templateGalleryTitle: {
|
|
24
|
+
id: 'editor-plugin-snippets.snippetsPlugin.templateGalleryTitle',
|
|
25
|
+
defaultMessage: 'Block Template Gallery',
|
|
26
|
+
description: 'Title for the block template gallery quick insert item'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
19
19
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "120.
|
|
22
|
+
var packageVersion = "120.16.0";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "120.
|
|
24
|
+
var packageVersion = "120.16.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -8,6 +8,7 @@ import { bind } from 'bind-event-listener';
|
|
|
8
8
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
10
10
|
import { createPopper as createWrappedPopper } from '@atlaskit/popper/unsafe-imperative';
|
|
11
|
+
import { logException } from '../monitoring/error';
|
|
11
12
|
var startingOffset = {
|
|
12
13
|
name: 'offset',
|
|
13
14
|
options: {
|
|
@@ -21,6 +22,12 @@ var endingOffset = {
|
|
|
21
22
|
}
|
|
22
23
|
};
|
|
23
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Opt-in class for the default tooltip look, defined as `vanillaTooltipDefaultStyles` in
|
|
27
|
+
* EditorContentContainer. Pass it alongside your own class name.
|
|
28
|
+
*/
|
|
29
|
+
export var VANILLA_TOOLTIP_DEFAULT_CLASS = 'ak-editor-vanilla-tooltip-default';
|
|
30
|
+
|
|
24
31
|
/**
|
|
25
32
|
* Namespaced to keep generated ids from colliding with ids the host page owns, since they share
|
|
26
33
|
* the document's single id space.
|
|
@@ -120,6 +127,11 @@ export var VanillaTooltip = /*#__PURE__*/function () {
|
|
|
120
127
|
tooltip.className = className;
|
|
121
128
|
tooltip.id = id !== null && id !== void 0 ? id : generateTooltipId();
|
|
122
129
|
tooltip.textContent = content;
|
|
130
|
+
|
|
131
|
+
// A tooltip is never a hit target. Set before the caller's styles so it can be overridden.
|
|
132
|
+
if (isExperimentEnabled('platform_editor_use_vanilla_components')) {
|
|
133
|
+
tooltip.style.pointerEvents = 'none';
|
|
134
|
+
}
|
|
123
135
|
if (styles) {
|
|
124
136
|
Object.assign(tooltip.style, styles);
|
|
125
137
|
}
|
|
@@ -175,18 +187,44 @@ export var VanillaTooltip = /*#__PURE__*/function () {
|
|
|
175
187
|
/**
|
|
176
188
|
* Closes the popover, tolerating it already being closed.
|
|
177
189
|
*
|
|
178
|
-
* `
|
|
179
|
-
*
|
|
180
|
-
* light-dismisses this one without notifying us, so the caller cannot know whether it is
|
|
181
|
-
* still open.
|
|
190
|
+
* A `hint` popover is light-dismissed by the browser whenever another `hint` or `auto` popover
|
|
191
|
+
* opens, so the caller can never be sure this one is still showing.
|
|
182
192
|
*/
|
|
183
193
|
return _createClass(VanillaTooltip, [{
|
|
184
194
|
key: "closePopover",
|
|
185
195
|
value: function closePopover() {
|
|
186
196
|
try {
|
|
187
197
|
this.tooltip.hidePopover();
|
|
188
|
-
} catch (
|
|
189
|
-
//
|
|
198
|
+
} catch (error) {
|
|
199
|
+
// `hidePopover()` raises `InvalidStateError` both when the popover is not showing
|
|
200
|
+
// when the tooltip is disconnected or has lost its `popover` attribute.
|
|
201
|
+
if (!this.tooltip.isConnected || !this.tooltip.hasAttribute('popover')) {
|
|
202
|
+
logException(error, {
|
|
203
|
+
location: 'editor-common/vanilla-tooltip'
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Opens the popover, tolerating it already being open.
|
|
211
|
+
*
|
|
212
|
+
* A hover returning during a pending hide re-enters `show()` before `isDisplayed` is set, so
|
|
213
|
+
* this runs against an already-open popover on that path.
|
|
214
|
+
*/
|
|
215
|
+
}, {
|
|
216
|
+
key: "openPopover",
|
|
217
|
+
value: function openPopover() {
|
|
218
|
+
try {
|
|
219
|
+
this.tooltip.showPopover();
|
|
220
|
+
} catch (error) {
|
|
221
|
+
// `showPopover()` raises `InvalidStateError` both when the tooltip is already in the
|
|
222
|
+
// top layer and when it is disconnected or has lost its `popover` attribute.
|
|
223
|
+
if (!this.tooltip.isConnected || !this.tooltip.hasAttribute('popover')) {
|
|
224
|
+
logException(error, {
|
|
225
|
+
location: 'editor-common/vanilla-tooltip'
|
|
226
|
+
});
|
|
227
|
+
}
|
|
190
228
|
}
|
|
191
229
|
}
|
|
192
230
|
}, {
|
|
@@ -214,6 +252,9 @@ export var VanillaTooltip = /*#__PURE__*/function () {
|
|
|
214
252
|
// Undoes what the constructor added to the trigger, matching the React `@atlaskit/tooltip`
|
|
215
253
|
// callers are moving off, whose unmount took its DOM with it.
|
|
216
254
|
if (isExperimentEnabled('platform_editor_use_vanilla_components')) {
|
|
255
|
+
// A popover removed while still showing is never light-dismissed, so the top layer
|
|
256
|
+
// keeps treating it as open.
|
|
257
|
+
this.closePopover();
|
|
217
258
|
this.tooltip.remove();
|
|
218
259
|
if (this.trigger.getAttribute('aria-describedby') === this.tooltip.id) {
|
|
219
260
|
this.trigger.removeAttribute('aria-describedby');
|
|
@@ -290,11 +331,8 @@ export var VanillaTooltip = /*#__PURE__*/function () {
|
|
|
290
331
|
_this3.isDisplayed = false;
|
|
291
332
|
|
|
292
333
|
// Closed here rather than from `ontransitionend`. No consumer declares a
|
|
293
|
-
// transition on the tooltip
|
|
294
|
-
//
|
|
295
|
-
// hit target over the content, and — because `showPopover()` throws
|
|
296
|
-
// `InvalidStateError` on an already-showing popover — an uncaught error out of
|
|
297
|
-
// the next `mouseenter`, after which the tooltip never appeared again.
|
|
334
|
+
// transition on the tooltip, so that event never fires and the popover would
|
|
335
|
+
// otherwise stay open in the top layer for good.
|
|
298
336
|
_this3.closePopover();
|
|
299
337
|
// Paired with the `visibility` that `show()` sets, so a popover left open by
|
|
300
338
|
// a failed close cannot intercept pointer events over the content.
|
|
@@ -345,7 +383,11 @@ export var VanillaTooltip = /*#__PURE__*/function () {
|
|
|
345
383
|
|
|
346
384
|
// Make the tooltip visible - but hide until
|
|
347
385
|
this.tooltip.style.visibility = 'hidden';
|
|
348
|
-
|
|
386
|
+
if (isExperimentEnabled('platform_editor_use_vanilla_components')) {
|
|
387
|
+
this.openPopover();
|
|
388
|
+
} else {
|
|
389
|
+
this.tooltip.showPopover();
|
|
390
|
+
}
|
|
349
391
|
|
|
350
392
|
// Update its position
|
|
351
393
|
if (!this.popperInstance) {
|
|
@@ -89,6 +89,16 @@ export declare const aiSuggestionsMessages: {
|
|
|
89
89
|
description: string;
|
|
90
90
|
id: string;
|
|
91
91
|
};
|
|
92
|
+
cardRestrictedLabel: {
|
|
93
|
+
defaultMessage: string;
|
|
94
|
+
description: string;
|
|
95
|
+
id: string;
|
|
96
|
+
};
|
|
97
|
+
cardRestrictedTooltipLabel: {
|
|
98
|
+
defaultMessage: string;
|
|
99
|
+
description: string;
|
|
100
|
+
id: string;
|
|
101
|
+
};
|
|
92
102
|
/**
|
|
93
103
|
* @private
|
|
94
104
|
* @deprecated The suggestion card no longer displays a Rovo text label.
|
|
@@ -67,9 +67,15 @@ export declare const TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM: {
|
|
|
67
67
|
export declare const TRANSFORM_STRUCTURE_DECISION_MENU_ITEM: {
|
|
68
68
|
key: string;
|
|
69
69
|
};
|
|
70
|
+
export declare const TRANSFORM_STRUCTURE_STATUS_MENU_ITEM: {
|
|
71
|
+
key: string;
|
|
72
|
+
};
|
|
70
73
|
export declare const TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM: {
|
|
71
74
|
key: string;
|
|
72
75
|
};
|
|
76
|
+
export declare const TRANSFORM_TEXT_FORMATTING_SMALL_TEXT_MENU_ITEM: {
|
|
77
|
+
key: string;
|
|
78
|
+
};
|
|
73
79
|
export declare const TRANSFORM_CLEAR_MENU_SECTION: {
|
|
74
80
|
key: string;
|
|
75
81
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BLOCK_ACTIONS_TEMPLATE_SECTION, BLOCK_ACTIONS_MENU_SECTION, BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM, BLOCK_ACTIONS_COPY_MENU_SECTION, DELETE_MENU_SECTION, DELETE_MENU_ITEM, POSITION_MENU_SECTION, POSITION_MOVE_UP_MENU_ITEM, POSITION_MOVE_DOWN_MENU_ITEM, TRANSFORM_MENU_SECTION, TRANSFORM_CLEAR_MENU_SECTION, TRANSFORM_CLEAR_MENU_ITEM, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_HEADINGS_MENU_SECTION, TRANSFORM_HEADINGS_H1_MENU_ITEM, TRANSFORM_HEADINGS_H2_MENU_ITEM, TRANSFORM_HEADINGS_H3_MENU_ITEM, TRANSFORM_HEADINGS_H4_MENU_ITEM, TRANSFORM_HEADINGS_H5_MENU_ITEM, TRANSFORM_HEADINGS_H6_MENU_ITEM, TRANSFORM_SUGGESTED_MENU_SECTION, TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM, TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM, TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM, TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM, TRANSFORM_STRUCTURE_DECISION_MENU_ITEM, TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM, TRANSFORM_SUGGESTED_MENU_ITEM, TRANSFORM_DEFAULT_EXTENSION_SLOT_MENU_ITEM, AI_MENU_SECTION, AI_ASK_ROVO_MENU_ITEM } from './key';
|
|
1
|
+
import { BLOCK_ACTIONS_TEMPLATE_SECTION, BLOCK_ACTIONS_MENU_SECTION, BLOCK_ACTIONS_COPY_LINK_TO_BLOCK_MENU_ITEM, BLOCK_ACTIONS_COPY_MENU_SECTION, DELETE_MENU_SECTION, DELETE_MENU_ITEM, POSITION_MENU_SECTION, POSITION_MOVE_UP_MENU_ITEM, POSITION_MOVE_DOWN_MENU_ITEM, TRANSFORM_MENU_SECTION, TRANSFORM_CLEAR_MENU_SECTION, TRANSFORM_CLEAR_MENU_ITEM, TRANSFORM_CREATE_MENU_SECTION, TRANSFORM_HEADINGS_MENU_SECTION, TRANSFORM_HEADINGS_H1_MENU_ITEM, TRANSFORM_HEADINGS_H2_MENU_ITEM, TRANSFORM_HEADINGS_H3_MENU_ITEM, TRANSFORM_HEADINGS_H4_MENU_ITEM, TRANSFORM_HEADINGS_H5_MENU_ITEM, TRANSFORM_HEADINGS_H6_MENU_ITEM, TRANSFORM_SUGGESTED_MENU_SECTION, TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM, TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM, TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM, TRANSFORM_STRUCTURE_EXTENSION_SLOT_MENU_ITEM, TRANSFORM_STRUCTURE_DECISION_MENU_ITEM, TRANSFORM_STRUCTURE_STATUS_MENU_ITEM, TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM, TRANSFORM_SUGGESTED_MENU_ITEM, TRANSFORM_DEFAULT_EXTENSION_SLOT_MENU_ITEM, AI_MENU_SECTION, AI_ASK_ROVO_MENU_ITEM } from './key';
|
|
2
2
|
export declare const MAIN_BLOCK_MENU_SECTION_RANK: {
|
|
3
3
|
[AI_MENU_SECTION.key]: number;
|
|
4
4
|
[BLOCK_ACTIONS_COPY_MENU_SECTION.key]: number;
|
|
@@ -34,6 +34,7 @@ export declare const TRANSFORM_HEADINGS_MENU_SECTION_RANK: {
|
|
|
34
34
|
[TRANSFORM_HEADINGS_H5_MENU_ITEM.key]: number;
|
|
35
35
|
[TRANSFORM_HEADINGS_H6_MENU_ITEM.key]: number;
|
|
36
36
|
};
|
|
37
|
+
export declare const TRANSFORM_TEXT_FORMATTING_MENU_SECTION_RANK: Record<string, number>;
|
|
37
38
|
export declare const TRANSFORM_STRUCTURE_MENU_SECTION_RANK: {
|
|
38
39
|
[TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM.key]: number;
|
|
39
40
|
[TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM.key]: number;
|
|
@@ -45,6 +46,7 @@ export declare const TRANSFORM_STRUCTURE_MENU_SECTION_RANK: {
|
|
|
45
46
|
[TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key]: number;
|
|
46
47
|
[TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key]: number;
|
|
47
48
|
[TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM.key]: number;
|
|
49
|
+
[TRANSFORM_STRUCTURE_STATUS_MENU_ITEM.key]: number;
|
|
48
50
|
[TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key]: number;
|
|
49
51
|
};
|
|
50
52
|
export declare const TRANSFORM_CLEAR_MENU_SECTION_RANK: {
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export declare const messages: {
|
|
2
|
+
changeFormat: {
|
|
3
|
+
defaultMessage: string;
|
|
4
|
+
description: string;
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
2
7
|
codeBlock: {
|
|
3
8
|
defaultMessage: string;
|
|
4
9
|
description: string;
|
|
@@ -79,6 +84,11 @@ export declare const messages: {
|
|
|
79
84
|
description: string;
|
|
80
85
|
id: string;
|
|
81
86
|
};
|
|
87
|
+
normalText: {
|
|
88
|
+
defaultMessage: string;
|
|
89
|
+
description: string;
|
|
90
|
+
id: string;
|
|
91
|
+
};
|
|
82
92
|
paragraph: {
|
|
83
93
|
defaultMessage: string;
|
|
84
94
|
description: string;
|
|
@@ -99,12 +109,12 @@ export declare const messages: {
|
|
|
99
109
|
description: string;
|
|
100
110
|
id: string;
|
|
101
111
|
};
|
|
102
|
-
|
|
112
|
+
textFormatting: {
|
|
103
113
|
defaultMessage: string;
|
|
104
114
|
description: string;
|
|
105
115
|
id: string;
|
|
106
116
|
};
|
|
107
|
-
|
|
117
|
+
turnInto: {
|
|
108
118
|
defaultMessage: string;
|
|
109
119
|
description: string;
|
|
110
120
|
id: string;
|
|
@@ -3,6 +3,7 @@ export { annotationMessages } from './annotation';
|
|
|
3
3
|
export { messages as breakoutMessages } from './breakout';
|
|
4
4
|
export { messages as blockMenuMessages } from './block-menu';
|
|
5
5
|
export { messages as blockTypeMessages } from './block-type';
|
|
6
|
+
export { templateGalleryMessages } from './snippets';
|
|
6
7
|
export { codeBidiWarningMessages } from './codeBidiWarning';
|
|
7
8
|
export { colorAccessibilityMessages } from './color-accessibility';
|
|
8
9
|
export { colorPickerButtonMessages } from './color-picker-button';
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type Placement } from '@popperjs/core';
|
|
2
|
+
/**
|
|
3
|
+
* Opt-in class for the default tooltip look, defined as `vanillaTooltipDefaultStyles` in
|
|
4
|
+
* EditorContentContainer. Pass it alongside your own class name.
|
|
5
|
+
*/
|
|
6
|
+
export declare const VANILLA_TOOLTIP_DEFAULT_CLASS = "ak-editor-vanilla-tooltip-default";
|
|
2
7
|
/**
|
|
3
8
|
* A tooltip component similar to "@atlaskit/tooltip" but built for vanilla scenarios
|
|
4
9
|
*
|
|
@@ -94,12 +99,17 @@ export declare class VanillaTooltip {
|
|
|
94
99
|
/**
|
|
95
100
|
* Closes the popover, tolerating it already being closed.
|
|
96
101
|
*
|
|
97
|
-
* `
|
|
98
|
-
*
|
|
99
|
-
* light-dismisses this one without notifying us, so the caller cannot know whether it is
|
|
100
|
-
* still open.
|
|
102
|
+
* A `hint` popover is light-dismissed by the browser whenever another `hint` or `auto` popover
|
|
103
|
+
* opens, so the caller can never be sure this one is still showing.
|
|
101
104
|
*/
|
|
102
105
|
private closePopover;
|
|
106
|
+
/**
|
|
107
|
+
* Opens the popover, tolerating it already being open.
|
|
108
|
+
*
|
|
109
|
+
* A hover returning during a pending hide re-enters `show()` before `isDisplayed` is set, so
|
|
110
|
+
* this runs against an already-open popover on that path.
|
|
111
|
+
*/
|
|
112
|
+
private openPopover;
|
|
103
113
|
private createPopperInstance;
|
|
104
114
|
destroy(): void;
|
|
105
115
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "120.
|
|
3
|
+
"version": "120.16.1",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@atlaskit/editor-toolbar": "^2.6.0",
|
|
51
51
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
52
52
|
"@atlaskit/editor-ui-control-model": "^2.9.0",
|
|
53
|
-
"@atlaskit/emoji": "^72.
|
|
53
|
+
"@atlaskit/emoji": "^72.3.0",
|
|
54
54
|
"@atlaskit/feature-gate-js-client": "^6.0.0",
|
|
55
55
|
"@atlaskit/icon": "^37.6.0",
|
|
56
56
|
"@atlaskit/link": "^5.1.0",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@atlaskit/task-decision": "^21.9.0",
|
|
85
85
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
86
86
|
"@atlaskit/textfield": "^10.2.0",
|
|
87
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
87
|
+
"@atlaskit/tmp-editor-statsig": "^176.0.0",
|
|
88
88
|
"@atlaskit/tokens": "^16.11.0",
|
|
89
89
|
"@atlaskit/tooltip": "^24.3.0",
|
|
90
90
|
"@atlaskit/width-detector": "^7.2.0",
|