@atlaskit/editor-core 232.0.10 → 233.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +1 -1
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +1 -5
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +1 -5
- package/dist/cjs/ui/EditorContentContainer/styles/ruleWithAttrs.js +4 -0
- package/dist/cjs/ui/EditorContentContainer/styles/syncBlockInteractiveCursorStyles.js +2 -4
- package/dist/cjs/ui/quick-insert/getExtensionQuickInsertComponents.js +58 -39
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +1 -1
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +1 -5
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +1 -5
- package/dist/es2019/ui/EditorContentContainer/styles/ruleWithAttrs.js +4 -0
- package/dist/es2019/ui/EditorContentContainer/styles/syncBlockInteractiveCursorStyles.js +2 -4
- package/dist/es2019/ui/quick-insert/getExtensionQuickInsertComponents.js +42 -32
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.compiled.css +1 -1
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +1 -5
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +1 -5
- package/dist/esm/ui/EditorContentContainer/styles/ruleWithAttrs.js +4 -0
- package/dist/esm/ui/EditorContentContainer/styles/syncBlockInteractiveCursorStyles.js +2 -4
- package/dist/esm/ui/quick-insert/getExtensionQuickInsertComponents.js +60 -41
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/EditorContentContainer/styles/syncBlockInteractiveCursorStyles.d.ts +2 -4
- package/package.json +43 -43
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
3
3
|
import { getQuickInsertMenuItemParents } from '@atlaskit/editor-common/quick-insert/get-menu-item-parents';
|
|
4
|
-
import { STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
|
-
import { EXTENSION_ITEM_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
6
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
4
|
+
import { DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
|
+
import { CREATE_SECTION_RANK, EXTENSION_ITEM_RANK, MEDIA_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
7
6
|
import { ExtensionQuickInsertMenuItem } from './ExtensionQuickInsertMenuItem';
|
|
8
7
|
const structureExtensionItemKeyRanks = {
|
|
9
8
|
'toc:toc': 600,
|
|
@@ -11,8 +10,6 @@ const structureExtensionItemKeyRanks = {
|
|
|
11
10
|
'cards:quick-insert': 2000,
|
|
12
11
|
'carousel:quick-insert': 2100,
|
|
13
12
|
'spotlight:quick-insert': 2200,
|
|
14
|
-
'com.atlassian.linking-platform.create:linking-platform-create-jira-issue': 2500,
|
|
15
|
-
'com.atlassian.linking-platform.create:linking-platform-create-confluence-page': 2600,
|
|
16
13
|
'create-from-template:create-from-template': 2700,
|
|
17
14
|
'anchor:anchor': 2900,
|
|
18
15
|
'smart-button:quick-insert': 3000
|
|
@@ -20,26 +17,36 @@ const structureExtensionItemKeyRanks = {
|
|
|
20
17
|
const UNRECOGNIZED_STRUCTURE_EXTENSION_ITEM_RANK = 3100;
|
|
21
18
|
const APP_DATA_AND_CHARTS_ITEM_RANK = 2700;
|
|
22
19
|
const APP_EMBED_ITEM_RANK = EXTENSION_ITEM_RANK;
|
|
20
|
+
const APP_MEDIA_ITEM_RANK = Math.max(...Object.values(MEDIA_SECTION_RANK)) + 100;
|
|
21
|
+
const APP_OTHER_ITEM_RANK = EXTENSION_ITEM_RANK;
|
|
23
22
|
const getStructureExtensionItemRank = item => structureExtensionItemKeyRanks[item.key];
|
|
24
|
-
const
|
|
23
|
+
const isExtensionItemInSection = (item, sectionKey) => getQuickInsertMenuItemParents({
|
|
25
24
|
category: item.category,
|
|
26
25
|
legacyCategories: item.categories,
|
|
27
26
|
rank: 0
|
|
28
|
-
}).some(parent => parent.key ===
|
|
27
|
+
}).some(parent => parent.key === sectionKey);
|
|
29
28
|
const compareMenuItemsByTitleAndKey = (firstItem, secondItem) => firstItem.title.localeCompare(secondItem.title) || firstItem.key.localeCompare(secondItem.key);
|
|
30
29
|
const getAlphabeticalItemRanks = (items, isRankedItem, firstRank) => new Map(items.filter(isRankedItem).sort(compareMenuItemsByTitleAndKey).map((item, index) => [item, firstRank + index]));
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
const hasNoNegativePriority = item => item.priority === undefined || item.priority >= 0;
|
|
31
|
+
const getSectionAlphabeticalItemRanks = (items, sectionKey, firstRank, isRankedItem = hasNoNegativePriority) => getAlphabeticalItemRanks(items, item => isExtensionItemInSection(item, sectionKey) && isRankedItem(item), firstRank);
|
|
32
|
+
|
|
33
|
+
// Rank each parent section separately so a macro in multiple categories gets the right order in each.
|
|
34
|
+
const createExtensionItemRanker = items => {
|
|
35
|
+
const sections = [[EMBED_SECTION.key, APP_EMBED_ITEM_RANK], [MEDIA_SECTION.key, APP_MEDIA_ITEM_RANK], [OTHER_SECTION.key, APP_OTHER_ITEM_RANK], [STRUCTURE_SECTION.key, UNRECOGNIZED_STRUCTURE_EXTENSION_ITEM_RANK, item => getStructureExtensionItemRank(item) === undefined], [DATA_AND_CHARTS_SECTION.key, APP_DATA_AND_CHARTS_ITEM_RANK, item => item.priority === undefined]];
|
|
36
|
+
const ranksBySection = new Map(sections.map(([sectionKey, firstRank, isRankedItem]) => [sectionKey, getSectionAlphabeticalItemRanks(items, sectionKey, firstRank, isRankedItem)]));
|
|
37
|
+
return ({
|
|
38
|
+
index,
|
|
39
|
+
knownRank,
|
|
40
|
+
item,
|
|
41
|
+
sectionKey
|
|
42
|
+
}) => {
|
|
43
|
+
var _ranksBySection$get, _item$priority;
|
|
44
|
+
if (knownRank !== undefined) {
|
|
45
|
+
return knownRank;
|
|
46
|
+
}
|
|
47
|
+
const sectionRank = (_ranksBySection$get = ranksBySection.get(sectionKey)) === null || _ranksBySection$get === void 0 ? void 0 : _ranksBySection$get.get(item);
|
|
48
|
+
return sectionRank !== null && sectionRank !== void 0 ? sectionRank : EXTENSION_ITEM_RANK + ((_item$priority = item.priority) !== null && _item$priority !== void 0 ? _item$priority : index);
|
|
49
|
+
};
|
|
43
50
|
};
|
|
44
51
|
export const getExtensionQuickInsertComponents = ({
|
|
45
52
|
apiRef,
|
|
@@ -47,27 +54,30 @@ export const getExtensionQuickInsertComponents = ({
|
|
|
47
54
|
editorActions,
|
|
48
55
|
items
|
|
49
56
|
}) => {
|
|
50
|
-
const
|
|
51
|
-
const unrecognizedStructureItemRanks = getUnrecognizedStructureItemRanks(items);
|
|
52
|
-
const unrecognizedDataAndChartsItemRanks = getUnrecognizedDataAndChartsItemRanks(items);
|
|
57
|
+
const getExtensionItemRank = createExtensionItemRanker(items);
|
|
53
58
|
return items.map((item, index) => {
|
|
54
59
|
const structureRank = getStructureExtensionItemRank(item);
|
|
55
60
|
const isStructureItem = structureRank !== undefined;
|
|
56
61
|
const categories = isStructureItem ? ['structure'] : item.categories;
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
unrecognizedDataAndChartsItemRanks,
|
|
62
|
-
unrecognizedStructureItemRanks
|
|
62
|
+
const parents = getQuickInsertMenuItemParents({
|
|
63
|
+
category: item.category,
|
|
64
|
+
legacyCategories: categories,
|
|
65
|
+
rank: 0
|
|
63
66
|
});
|
|
64
67
|
return {
|
|
65
68
|
type: 'menu-item',
|
|
66
69
|
key: item.key,
|
|
67
|
-
parents:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
parents: parents.map(parent => {
|
|
71
|
+
var _CREATE_SECTION_RANK$;
|
|
72
|
+
return {
|
|
73
|
+
...parent,
|
|
74
|
+
rank: getExtensionItemRank({
|
|
75
|
+
index,
|
|
76
|
+
knownRank: (_CREATE_SECTION_RANK$ = CREATE_SECTION_RANK[item.key]) !== null && _CREATE_SECTION_RANK$ !== void 0 ? _CREATE_SECTION_RANK$ : structureRank,
|
|
77
|
+
item,
|
|
78
|
+
sectionKey: parent.key
|
|
79
|
+
})
|
|
80
|
+
};
|
|
71
81
|
}),
|
|
72
82
|
match: createQuickInsertMatcher(() => ({
|
|
73
83
|
description: item.description,
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
.cc-1wz6obl .ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor){caret-color:transparent}.cc-1wz6obl .ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor{display:none}.cc-1wz6obl .ProseMirror:has(.ProseMirror-hide-cursor){caret-color:transparent}
|
|
27
27
|
.cc-1aoj0mo .dateView-content-wrap.ak-editor-selected-node.danger .date-lozenger-container>span{box-shadow:0 0 0 1px var(--ds-border-danger,#e2483d)}
|
|
28
28
|
.cc-5hyj3q .ProseMirror hr.ak-editor-selected-node.danger{background-color:var(--ds-border-danger,#e2483d)}
|
|
29
|
-
.cc-dgsww3 .ProseMirror hr[data-style=dashed]{-webkit-mask-image:linear-gradient(90deg,#000 0,#000 4px,transparent 0,transparent 10px);mask-image:linear-gradient(90deg,#000 0,#000 4px,transparent 0,transparent 10px);-webkit-mask-repeat:repeat-x;mask-repeat:repeat-x;-webkit-mask-size:10px 100%;mask-size:10px 100%}.cc-dgsww3 .ProseMirror hr[data-style=dotted]{-webkit-mask-image:radial-gradient(circle at center,#000 1px,transparent 1.1px);mask-image:radial-gradient(circle at center,#000 1px,transparent 1.1px);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:repeat-x;mask-repeat:repeat-x;-webkit-mask-size:6px 2px;mask-size:6px 2px}.cc-dgsww3 .ProseMirror hr[data-style=sketch]{height:calc(2px + var(--ds-space-050, 4px) + var(--ds-space-050, 4px));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:repeat-x;mask-repeat:repeat-x;-webkit-mask-size:233px 7px;mask-size:233px 7px;padding-top:0;padding-bottom:0}.cc-dgsww3 .ProseMirror hr[data-style=fade]{-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 27.4%,#000 74%,transparent);mask-image:linear-gradient(90deg,transparent 0,#000 27.4%,#000 74%,transparent);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%}.cc-dgsww3 .ProseMirror hr[data-weight="1"]{height:1px}.cc-dgsww3 .ProseMirror hr[data-weight="3"]{height:3px}.cc-dgsww3 .ProseMirror hr[data-style=dotted][data-weight="1"]{-webkit-mask-image:radial-gradient(circle at center,#000 .5px,transparent .6px);mask-image:radial-gradient(circle at center,#000 .5px,transparent .6px);-webkit-mask-size:6px 1px;mask-size:6px 1px}.cc-dgsww3 .ProseMirror hr[data-style=dotted][data-weight="3"]{-webkit-mask-image:radial-gradient(circle at center,#000 1.5px,transparent .1pc);mask-image:radial-gradient(circle at center,#000 1.5px,transparent .1pc);-webkit-mask-size:6px 3px;mask-size:6px 3px}.cc-dgsww3 .ProseMirror hr[data-style=sketch][data-weight="1"]{height:calc(1px + var(--ds-space-050, 4px) + var(--ds-space-050, 4px));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1' d='M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1' d='M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107'/%3E%3C/svg%3E")}.cc-dgsww3 .ProseMirror hr[data-style=sketch][data-weight="3"]{height:calc(3px + var(--ds-space-050, 4px) + var(--ds-space-050, 4px));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -1 233 8'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' d='M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -1 233 8'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' d='M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107'/%3E%3C/svg%3E");-webkit-mask-size:233px 8px;mask-size:233px 8px}
|
|
29
|
+
.cc-dgsww3 .ProseMirror hr[data-color]{background-color:var(--custom-palette-color)}.cc-dgsww3 .ProseMirror hr[data-style=dashed]{-webkit-mask-image:linear-gradient(90deg,#000 0,#000 4px,transparent 0,transparent 10px);mask-image:linear-gradient(90deg,#000 0,#000 4px,transparent 0,transparent 10px);-webkit-mask-repeat:repeat-x;mask-repeat:repeat-x;-webkit-mask-size:10px 100%;mask-size:10px 100%}.cc-dgsww3 .ProseMirror hr[data-style=dotted]{-webkit-mask-image:radial-gradient(circle at center,#000 1px,transparent 1.1px);mask-image:radial-gradient(circle at center,#000 1px,transparent 1.1px);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:repeat-x;mask-repeat:repeat-x;-webkit-mask-size:6px 2px;mask-size:6px 2px}.cc-dgsww3 .ProseMirror hr[data-style=sketch]{height:calc(2px + var(--ds-space-050, 4px) + var(--ds-space-050, 4px));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' d='M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:repeat-x;mask-repeat:repeat-x;-webkit-mask-size:233px 7px;mask-size:233px 7px;padding-top:0;padding-bottom:0}.cc-dgsww3 .ProseMirror hr[data-style=fade]{-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 27.4%,#000 74%,transparent);mask-image:linear-gradient(90deg,transparent 0,#000 27.4%,#000 74%,transparent);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%}.cc-dgsww3 .ProseMirror hr[data-weight="1"]{height:1px}.cc-dgsww3 .ProseMirror hr[data-weight="3"]{height:3px}.cc-dgsww3 .ProseMirror hr[data-style=dotted][data-weight="1"]{-webkit-mask-image:radial-gradient(circle at center,#000 .5px,transparent .6px);mask-image:radial-gradient(circle at center,#000 .5px,transparent .6px);-webkit-mask-size:6px 1px;mask-size:6px 1px}.cc-dgsww3 .ProseMirror hr[data-style=dotted][data-weight="3"]{-webkit-mask-image:radial-gradient(circle at center,#000 1.5px,transparent .1pc);mask-image:radial-gradient(circle at center,#000 1.5px,transparent .1pc);-webkit-mask-size:6px 3px;mask-size:6px 3px}.cc-dgsww3 .ProseMirror hr[data-style=sketch][data-weight="1"]{height:calc(1px + var(--ds-space-050, 4px) + var(--ds-space-050, 4px));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1' d='M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 233 7'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1' d='M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107'/%3E%3C/svg%3E")}.cc-dgsww3 .ProseMirror hr[data-style=sketch][data-weight="3"]{height:calc(3px + var(--ds-space-050, 4px) + var(--ds-space-050, 4px));-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -1 233 8'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' d='M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -1 233 8'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' d='M0.00161171 1.0107C6.6387 1 9.94061 5.16958 16.6371 5.16958C23.3336 5.16958 26.5761 1.00913 33.2726 1.0107C39.3797 1.01213 42.4198 4.22998 48.5219 4.47643C55.9487 4.77638 59.8075 0.780687 67.2368 1.0107C73.6051 1.20786 76.8081 4.42122 83.1792 4.47643C89.815 4.53393 93.1788 1.06378 99.8147 1.0107C106.716 0.95549 110.244 4.6564 117.143 4.47643C123.248 4.31717 126.289 1.21517 132.393 1.0107C139.555 0.770735 143.25 4.64894 150.414 4.47643C156.784 4.32307 159.986 1.06591 166.357 1.0107C172.993 0.953195 176.356 4.47655 182.992 4.47643C189.628 4.47632 192.992 1.01007 199.628 1.01007C206.264 1.01007 209.627 4.47632 216.263 4.47643C222.899 4.47655 226.263 1.0107 232.899 1.0107'/%3E%3C/svg%3E");-webkit-mask-size:233px 8px;mask-size:233px 8px}
|
|
30
30
|
.cc-1mmt8n5 .show-diff-atomic-inline-changed-date{--show-diff-atomic-inline-changed-border-color:var(--ds-border-accent-purple,#af59e1);outline:2px solid var(--show-diff-atomic-inline-changed-border-color,var(--ds-border-accent-purple,#af59e1));outline-offset:1px;border-radius:var(--ds-radius-medium,6px)}.cc-1mmt8n5 .show-diff-atomic-inline-changed-date.show-diff-atomic-inline-changed-traditional{--show-diff-atomic-inline-changed-border-color:var(--ds-border-accent-green,#22a06b)}.cc-1mmt8n5 .date-lozenger-container span{white-space:unset}.cc-1mmt8n5 .dateView-content-wrap .date-lozenger-container{line-height:normal;cursor:pointer}.cc-1mmt8n5 .dateView-content-wrap.ak-editor-selected-node .date-lozenger-container>span{box-shadow:0 0 0 1px var(--ds-border-selected,#1868db);border-color:transparent}.cc-1mmt8n5 .dateView-content-wrap.ak-editor-selected-node .date-lozenger-container>span ::selection, .cc-1mmt8n5 .dateView-content-wrap.ak-editor-selected-node .date-lozenger-container>span::selection{background-color:transparent}.cc-1mmt8n5 .dateView-content-wrap.ak-editor-selected-node .date-lozenger-container>span ::-moz-selection, .cc-1mmt8n5 .dateView-content-wrap.ak-editor-selected-node .date-lozenger-container>span::-moz-selection{background-color:transparent}.cc-1mmt8n5 .danger .dateView-content-wrap.ak-editor-selected-node .date-lozenger-container>span{box-shadow:0 0 0 1px var(--ds-border-danger,#e2483d)}
|
|
31
31
|
.cc-avdkma [data-prosemirror-node-name=date] .date-lozenger-container span{background-color:var(--ds-background-neutral,#0515240f);color:var(--ds-text,#292a2e);border-radius:var(--ds-radius-small,4px);padding-top:var(--ds-space-025,2px);padding-right:var(--ds-space-050,4px);padding-bottom:var(--ds-space-025,2px);padding-left:var(--ds-space-050,4px);margin-top:0;margin-right:1px;margin-bottom:0;margin-left:1px;position:relative;transition-property:background;transition-duration:.3s;white-space:nowrap;cursor:unset}.cc-avdkma [data-prosemirror-node-name=date] .date-lozenger-container span:hover{background-color:var(--ds-background-neutral-hovered,#0b120e24)}.cc-avdkma [data-prosemirror-node-name=date] .date-lozenger-container span.date-node-color-red{background-color:var(--ds-background-accent-red-subtlest,#ffeceb);color:var(--ds-text-accent-red,#ae2e24)}.cc-avdkma [data-prosemirror-node-name=date] .date-lozenger-container span.date-node-color-red:hover{background-color:var(--ds-background-accent-red-subtler,#ffd5d2)}
|
|
32
32
|
.cc-ak695d .ak-editor-selected-node.danger>[data-decision-wrapper], .cc-ak695d ol[data-node-type=decisionList].ak-editor-selected-node.danger{background-color:var(--ds-background-danger,#ffeceb);box-shadow:0 0 0 1px var(--ds-border-danger,#e2483d)}
|
|
@@ -385,10 +385,6 @@ export var EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef(functi
|
|
|
385
385
|
var isFullPage = appearance === 'full-page' || appearance === 'full-width' || appearance === 'max';
|
|
386
386
|
var isComment = appearance === 'comment';
|
|
387
387
|
var isChromeless = appearance === 'chromeless';
|
|
388
|
-
|
|
389
|
-
// Evaluated unconditionally so the experiment exposure is tracked correctly
|
|
390
|
-
// (must not be preconditioned by other gates in the style expression below).
|
|
391
|
-
var isSyncBlockActivationEnabled = expValEquals('platform_editor_sync_block_activation', 'isEnabled', true);
|
|
392
388
|
var baseFontSize = getBaseFontSize(appearance, contentMode);
|
|
393
389
|
var isDense = !!baseFontSize && baseFontSize !== akEditorFullPageDefaultFontSize;
|
|
394
390
|
var tableOverflowShadow = overflowShadowForCompiled({
|
|
@@ -419,7 +415,7 @@ export var EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef(functi
|
|
|
419
415
|
className: ax([editorContentStyles.baseStyles, editorContentStyles.maxModeReizeFixStyles, editorContentStyles.baseStylesMaxContainerWidthFixes, editorContentStyles.editorGutterPaddingBaseStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true, {
|
|
420
416
|
exposure: true
|
|
421
417
|
}) && editorContentStyles.editorLargeGutterPuddingReducedBaseStyles, editorContentStyles.whitespaceStyles, editorContentStyles.indentationStyles, editorContentStyles.fontSizeStyles, editorContentStyles.shadowStyles, editorContentStyles.InlineNodeViewSharedStyles, editorContentStyles.hideSelectionStyles, editorContentStyles.hideCursorWhenHideSelectionStyles, editorContentStyles.selectedNodeStyles, editorContentStyles.cursorStyles, editorContentStyles.firstFloatingToolbarButtonStyles, editorContentStyles.placeholderTextStyles, editorContentStyles.placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') && editorContentStyles.placeholderOverflowStyles, editorContentStyles.codeBlockStyles, contentMode === 'compact' && editorContentStyles.codeBlockStylesWithEmUnits, editorContentStyles.editorUGCTokensRefreshed, editorContentStyles.editorUGCSmallText, editorContentStyles.blocktypeStyles, editorContentStyles.blocktypeStylesRtlBlockquote, isFloatingTocEnabled && editorContentStyles.headingScrollMarginStyles, editorContentStyles.blockquoteSelectedNodeStyles, editorContentStyles.listSelectedNodeStyles, editorContentStyles.textSelectedNodeStyles, editorContentStyles.blocktypeStyles_fg_platform_editor_typography_ugc, editorContentStyles.blocktypeStylesNestedDnd, editorContentStyles.codeMarkStyles, editorContentStyles.textColorStyles, editorContentStyles.backgroundColorStyles, !expValEquals('platform_editor_lovability_text_bg_color', 'isEnabled', true) && editorContentStyles.highlightLinksUnsetStyles, editorContentStyles.textHighlightPaddingStyles, editorContentStyles.listsStyles, editorContentStyles.listItemHiddenMarkerStyles, editorContentStyles.diffListStyles, contentMode === 'compact' && isDense && editorContentStyles.listsDenseStyles, isFullPage && editorContentStyles.listsStylesMarginLayoutShiftFix, editorContentStyles.ruleStyles, isExperimentEnabled('platform_editor_lovability_dividers_attributes') && editorContentStyles.ruleWithAttrsStyles, editorContentStyles.smartCardDiffStyles, editorContentStyles.showDiffDeletedNodeStyles, editorContentStyles.mediaStyles, isExperimentEnabled('platform_editor_vanilla_node_views_phase1') && editorContentStyles.vanillaCaptionStyles, contentMode === 'compact' && editorContentStyles.mediaCaptionStyles, editorContentStyles.firstWrappedMediaStyles, editorContentStyles.telepointerStyle, /* This needs to be after telepointer styles as some overlapping rules have equal specificity, and so the order is significant */
|
|
422
|
-
editorContentStyles.telepointerColorAndCommonStyle, colorMode === 'dark' && editorContentStyles.telepointerColorAndCommonStyleDarkMode, expValEqualsNoExposure('platform_editor_agent_be_streaming', 'isEnabled', true) && editorContentStyles.agentShimmerStyles, editorContentStyles.gapCursorStyles, editorContentStyles.gapCursorStylesVisibilityFix, editorContentStyles.panelStyles, editorContentStyles.nestedPanelBorderStylesMixin, editorContentStyles.panelStylesMixinNestedDnd, editorContentStyles.panelStylesMixin, editorContentStyles.mentionsStyles, editorContentStyles.tasksAndDecisionsStyles, contentMode === 'compact' && isDense && editorContentStyles.tasksAndDecisionsDenseStyles, editorContentStyles.gridStyles, editorContentStyles.blockMarksStyles, editorContentStyles.dateStyles, editorContentStyles.extensionStyles, fg('platform_editor_lovability_resize_exts_gracefully') && editorContentStyles.extensionWithBreakoutStyles, contentMode === 'compact' && editorContentStyles.extensionStylesDense, editorContentStyles.bodiedExtensionLayoutShiftFix, editorContentStyles.extensionDiffStyles, editorContentStyles.expandStylesBase, !useStandardNodeWidth && editorContentStyles.expandStyles, contentMode === 'compact' && isDense && editorContentStyles.expandDenseStyles, editorContentStyles.expandStylesMixinNestedDnd, editorContentStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && editorContentStyles.expandStylesMixin_chromeless_expand_fix, editorContentStyles.findReplaceStyles, editorContentStyles.findReplaceStylesWithCodeblockColorContrastFix, editorContentStyles.findReplaceStylesWithRefSyncBlock, editorContentStyles.textHighlightStyle, editorContentStyles.decisionStyles, expValEqualsNoExposure('platform_editor_blocktaskitem_node_tenantid', 'isEnabled', true) ? editorContentStyles.taskItemStylesWithBlockTaskItem : editorContentStyles.taskItemStyles, editorContentStyles.taskItemCheckboxStyles, editorContentStyles.decisionIconWithVisualRefresh, editorContentStyles.statusStyles, isStatusStylesTeam26 ? editorContentStyles.statusStylesTeam26 : fg('platform-component-visual-refresh') ? editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match, isStatusStylesTeam26 && isUpdateStatusColorsEnabled && editorContentStyles.statusStylesNamedAccent, isStatusStylesTeam26 && !isUpdateStatusColorsEnabled && editorContentStyles.statusStylesNamedSemantic, (fg('platform_editor_gracefully_render_status_color') || isUpdateStatusColorsEnabled) && editorContentStyles.statusStylesHexAccent, fg('platform_editor_ai_show_diff_patch_2') && editorContentStyles.deletedStatusStrikeStyles, editorContentStyles.annotationStyles, editorContentStyles.smartCardStylesWithSearchMatchAndBlockMenuDangerStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorContentStyles.smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, editorContentStyles.editorControlsSmartCardStyles, editorContentStyles.embedCardStyles, editorContentStyles.unsupportedStyles, editorContentStyles.vanillaTooltipDefaultStyles, fg('confluence_ncs_step_diffing_version_history') && editorContentStyles.contributorTagStyles, isExperimentEnabled('platform_editor_vanilla_node_views_phase1') && editorContentStyles.vanillaUnsupportedStyles, editorContentStyles.resizerStyles, expValEqualsNoExposure('cc-maui-experiment', 'isEnabled', true) && expValEquals('databases-native-embeds-v2', 'isEnabled', true) && editorContentStyles.resizerBottomHandleStyles, editorContentStyles.layoutBaseStyles, editorContentStyles.alignMultipleWrappedImageInLayoutStyles, editorContentStyles.syncBlockStylesBase, fg('platform-dst-tokens-finesse') && editorContentStyles.syncBlockSelectedStyles, !useStandardNodeWidth && editorContentStyles.syncBlockStyles, editorContentStyles.syncBlockOverflowStyles, editorContentStyles.syncBlockFirstNodeStyles, editorContentStyles.syncBlockTextSelectionStyles, isSyncBlockActivationEnabled && editorContentStyles.syncBlockInteractiveCursorStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutBaseStylesAdvanced, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSectionStylesAdvanced : editorContentStyles.layoutSectionStylesNotAdvanced, editorExperiment('advanced_layouts', true) && !fg('platform-dst-top-layer-tooltip') && editorContentStyles.layoutDragHandleWrapperStylesLegacy, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnDividerStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnDividerStylesNestedDnD, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutColumnStylesAdvanced : editorContentStyles.layoutColumnStylesNotAdvanced, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResizeStyles, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSelectedStylesAdvanced : editorContentStyles.layoutSelectedStylesNotAdvanced, editorContentStyles.layoutSelectedStylesAdvancedFix, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, editorContentStyles.layoutBaseStylesNestedDndExcludingBodiedSync, editorContentStyles.layoutColumnMartinTopFixes, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, contentMode === 'compact' ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed, editorContentStyles.linkStyles, browser.safari && editorContentStyles.listsStylesSafariFix, editorContentStyles.pragmaticResizerStylesSyncedBlock, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStyles, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesPanelAndRule, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && isExperimentEnabled('platform_editor_lovability_resize_extensions') && editorContentStyles.pragmaticResizerStylesExtensions, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesCodeBlockSyncedBlockPatch, editorExperiment('advanced_layouts', true) && expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticStylesLayoutFirstNodeResizeHandleFix, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesForTooltip, editorExperiment('platform_editor_preview_panel_responsiveness', true) && (editorExperiment('advanced_layouts', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true)) && editorContentStyles.pragmaticResizerStylesWithReducedEditorGutter, editorContentStyles.aiPanelBaseStyles, isFirefox && editorContentStyles.aiPanelBaseFirefoxStyles, colorMode === 'dark' && editorContentStyles.aiPanelDarkStyles, colorMode === 'dark' && isFirefox && editorContentStyles.aiPanelDarkFirefoxStyles, viewMode === 'view' && editorContentStyles.layoutStylesForView, viewMode === 'view' && editorExperiment('advanced_layouts', true) && editorContentStyles.layoutSelectedStylesForViewAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', false) && editorContentStyles.layoutSelectedStylesForViewNotAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveStylesForView, isComment && editorContentStyles.commentEditorStyles, isComment && editorContentStyles.tableCommentEditorStyles, (isComment || isChromeless) && editorContentStyles.nonFullPageContainerTypeStyles, isFullPage && editorContentStyles.fullPageEditorStyles, isFullPage && editorContentStyles.scrollbarStyles, editorContentStyles.firstCodeBlockWithNoMargin, editorContentStyles.firstBlockNodeStyles, editorContentStyles.firstNodeWidgetFixStyles, editorContentStyles.mentionNodeStyles, colorMode === 'dark' && editorContentStyles.agentMentionShimmerDarkMode, editorContentStyles.mentionsSelectionStyles, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? editorContentStyles.scaledEmojiStyles : editorContentStyles.emojiStyles, isFloatingTocEnabled ? editorContentStyles.directEmojiSelectionStyles : editorContentStyles.emojiSelectionStyles, contentMode === 'compact' && isDense && expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.scaledEmojiDenseStyles, contentMode === 'compact' && isDense && !expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.emojiDenseStyles, editorContentStyles.panelViewStyles, editorContentStyles.mediaGroupStyles, editorContentStyles.mediaAlignmentStyles, editorContentStyles.tableLayoutFixesWithFontSize, editorContentStyles.tableContainerStyles, editorContentStyles.tableSharedStyle, isExperimentEnabled('platform_editor_table_css_overflow_shadow') && editorContentStyles.tableScrollInlineShadowStyles, (browser.gecko || browser.ie || browser.mac && browser.chrome) && editorContentStyles.tableSharedStyleBackgroundClipFix, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? editorContentStyles.tableSharedStyle_with_platform_editor_table_q4_loveability : editorContentStyles.tableSharedStyle_without_platform_editor_table_q4_loveability, expValEquals('platform_editor_table_menu_updates', 'isEnabled', true) && editorContentStyles.tableSharedStyle_with_platform_editor_table_menu_updates, fg('platform_editor_bordered_panel_nested_in_table') && editorContentStyles.tableSharedStyle_with_platform_editor_bordered_panel_nested_in_table, editorContentStyles.tableEmptyRowStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && editorContentStyles.tableRoundedCornerStyles, editorContentStyles.tableContentModeStyles, editorContentStyles.tableContentModeExtensionContainmentStyles, editorContentStyles.tableContentModeNestedTableStyles, editorContentStyles.tableCellBackgroundColorOverrides, editorContentStyles.hyperLinkFloatingToolbarStyles, editorContentStyles.selectionToolbarAnimationStyles, editorContentStyles.blockquoteDangerStyles, editorContentStyles.textDangerStyles, editorContentStyles.listDangerStyles, editorContentStyles.dangerDateStyles, editorContentStyles.emojiDangerStyles, editorContentStyles.mentionDangerStyles, editorContentStyles.decisionDangerStyles, editorContentStyles.statusDangerStyles, editorContentStyles.dangerRuleStyles, editorContentStyles.mediaDangerStyles, editorContentStyles.nestedPanelDangerStyles, isBlockSpacingEnabled && editorContentStyles.blockSpacingVarStyles, isBlockSpacingEnabled && isDense && editorContentStyles.blockSpacingVarScaledStyles, className || undefined]),
|
|
418
|
+
editorContentStyles.telepointerColorAndCommonStyle, colorMode === 'dark' && editorContentStyles.telepointerColorAndCommonStyleDarkMode, expValEqualsNoExposure('platform_editor_agent_be_streaming', 'isEnabled', true) && editorContentStyles.agentShimmerStyles, editorContentStyles.gapCursorStyles, editorContentStyles.gapCursorStylesVisibilityFix, editorContentStyles.panelStyles, editorContentStyles.nestedPanelBorderStylesMixin, editorContentStyles.panelStylesMixinNestedDnd, editorContentStyles.panelStylesMixin, editorContentStyles.mentionsStyles, editorContentStyles.tasksAndDecisionsStyles, contentMode === 'compact' && isDense && editorContentStyles.tasksAndDecisionsDenseStyles, editorContentStyles.gridStyles, editorContentStyles.blockMarksStyles, editorContentStyles.dateStyles, editorContentStyles.extensionStyles, fg('platform_editor_lovability_resize_exts_gracefully') && editorContentStyles.extensionWithBreakoutStyles, contentMode === 'compact' && editorContentStyles.extensionStylesDense, editorContentStyles.bodiedExtensionLayoutShiftFix, editorContentStyles.extensionDiffStyles, editorContentStyles.expandStylesBase, !useStandardNodeWidth && editorContentStyles.expandStyles, contentMode === 'compact' && isDense && editorContentStyles.expandDenseStyles, editorContentStyles.expandStylesMixinNestedDnd, editorContentStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && editorContentStyles.expandStylesMixin_chromeless_expand_fix, editorContentStyles.findReplaceStyles, editorContentStyles.findReplaceStylesWithCodeblockColorContrastFix, editorContentStyles.findReplaceStylesWithRefSyncBlock, editorContentStyles.textHighlightStyle, editorContentStyles.decisionStyles, expValEqualsNoExposure('platform_editor_blocktaskitem_node_tenantid', 'isEnabled', true) ? editorContentStyles.taskItemStylesWithBlockTaskItem : editorContentStyles.taskItemStyles, editorContentStyles.taskItemCheckboxStyles, editorContentStyles.decisionIconWithVisualRefresh, editorContentStyles.statusStyles, isStatusStylesTeam26 ? editorContentStyles.statusStylesTeam26 : fg('platform-component-visual-refresh') ? editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match, isStatusStylesTeam26 && isUpdateStatusColorsEnabled && editorContentStyles.statusStylesNamedAccent, isStatusStylesTeam26 && !isUpdateStatusColorsEnabled && editorContentStyles.statusStylesNamedSemantic, (fg('platform_editor_gracefully_render_status_color') || isUpdateStatusColorsEnabled) && editorContentStyles.statusStylesHexAccent, fg('platform_editor_ai_show_diff_patch_2') && editorContentStyles.deletedStatusStrikeStyles, editorContentStyles.annotationStyles, editorContentStyles.smartCardStylesWithSearchMatchAndBlockMenuDangerStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorContentStyles.smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, editorContentStyles.editorControlsSmartCardStyles, editorContentStyles.embedCardStyles, editorContentStyles.unsupportedStyles, editorContentStyles.vanillaTooltipDefaultStyles, fg('confluence_ncs_step_diffing_version_history') && editorContentStyles.contributorTagStyles, isExperimentEnabled('platform_editor_vanilla_node_views_phase1') && editorContentStyles.vanillaUnsupportedStyles, editorContentStyles.resizerStyles, expValEqualsNoExposure('cc-maui-experiment', 'isEnabled', true) && expValEquals('databases-native-embeds-v2', 'isEnabled', true) && editorContentStyles.resizerBottomHandleStyles, editorContentStyles.layoutBaseStyles, editorContentStyles.alignMultipleWrappedImageInLayoutStyles, editorContentStyles.syncBlockStylesBase, fg('platform-dst-tokens-finesse') && editorContentStyles.syncBlockSelectedStyles, !useStandardNodeWidth && editorContentStyles.syncBlockStyles, editorContentStyles.syncBlockOverflowStyles, editorContentStyles.syncBlockFirstNodeStyles, editorContentStyles.syncBlockTextSelectionStyles, editorContentStyles.syncBlockInteractiveCursorStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutBaseStylesAdvanced, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSectionStylesAdvanced : editorContentStyles.layoutSectionStylesNotAdvanced, editorExperiment('advanced_layouts', true) && !fg('platform-dst-top-layer-tooltip') && editorContentStyles.layoutDragHandleWrapperStylesLegacy, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnDividerStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnDividerStylesNestedDnD, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutColumnStylesAdvanced : editorContentStyles.layoutColumnStylesNotAdvanced, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResizeStyles, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSelectedStylesAdvanced : editorContentStyles.layoutSelectedStylesNotAdvanced, editorContentStyles.layoutSelectedStylesAdvancedFix, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, editorContentStyles.layoutBaseStylesNestedDndExcludingBodiedSync, editorContentStyles.layoutColumnMartinTopFixes, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, contentMode === 'compact' ? editorContentStyles.paragraphStylesWithScaledMargin : editorContentStyles.paragraphStylesUGCRefreshed, editorContentStyles.linkStyles, browser.safari && editorContentStyles.listsStylesSafariFix, editorContentStyles.pragmaticResizerStylesSyncedBlock, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStyles, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && expValEqualsNoExposure('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesPanelAndRule, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && isExperimentEnabled('platform_editor_lovability_resize_extensions') && editorContentStyles.pragmaticResizerStylesExtensions, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesCodeBlockSyncedBlockPatch, editorExperiment('advanced_layouts', true) && expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticStylesLayoutFirstNodeResizeHandleFix, expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true) && editorContentStyles.pragmaticResizerStylesForTooltip, editorExperiment('platform_editor_preview_panel_responsiveness', true) && (editorExperiment('advanced_layouts', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true)) && editorContentStyles.pragmaticResizerStylesWithReducedEditorGutter, editorContentStyles.aiPanelBaseStyles, isFirefox && editorContentStyles.aiPanelBaseFirefoxStyles, colorMode === 'dark' && editorContentStyles.aiPanelDarkStyles, colorMode === 'dark' && isFirefox && editorContentStyles.aiPanelDarkFirefoxStyles, viewMode === 'view' && editorContentStyles.layoutStylesForView, viewMode === 'view' && editorExperiment('advanced_layouts', true) && editorContentStyles.layoutSelectedStylesForViewAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', false) && editorContentStyles.layoutSelectedStylesForViewNotAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveStylesForView, isComment && editorContentStyles.commentEditorStyles, isComment && editorContentStyles.tableCommentEditorStyles, (isComment || isChromeless) && editorContentStyles.nonFullPageContainerTypeStyles, isFullPage && editorContentStyles.fullPageEditorStyles, isFullPage && editorContentStyles.scrollbarStyles, editorContentStyles.firstCodeBlockWithNoMargin, editorContentStyles.firstBlockNodeStyles, editorContentStyles.firstNodeWidgetFixStyles, editorContentStyles.mentionNodeStyles, colorMode === 'dark' && editorContentStyles.agentMentionShimmerDarkMode, editorContentStyles.mentionsSelectionStyles, expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? editorContentStyles.scaledEmojiStyles : editorContentStyles.emojiStyles, isFloatingTocEnabled ? editorContentStyles.directEmojiSelectionStyles : editorContentStyles.emojiSelectionStyles, contentMode === 'compact' && isDense && expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.scaledEmojiDenseStyles, contentMode === 'compact' && isDense && !expValEquals('platform_editor_lovability_emoji_scaling', 'isEnabled', true) && editorContentStyles.emojiDenseStyles, editorContentStyles.panelViewStyles, editorContentStyles.mediaGroupStyles, editorContentStyles.mediaAlignmentStyles, editorContentStyles.tableLayoutFixesWithFontSize, editorContentStyles.tableContainerStyles, editorContentStyles.tableSharedStyle, isExperimentEnabled('platform_editor_table_css_overflow_shadow') && editorContentStyles.tableScrollInlineShadowStyles, (browser.gecko || browser.ie || browser.mac && browser.chrome) && editorContentStyles.tableSharedStyleBackgroundClipFix, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) ? editorContentStyles.tableSharedStyle_with_platform_editor_table_q4_loveability : editorContentStyles.tableSharedStyle_without_platform_editor_table_q4_loveability, expValEquals('platform_editor_table_menu_updates', 'isEnabled', true) && editorContentStyles.tableSharedStyle_with_platform_editor_table_menu_updates, fg('platform_editor_bordered_panel_nested_in_table') && editorContentStyles.tableSharedStyle_with_platform_editor_bordered_panel_nested_in_table, editorContentStyles.tableEmptyRowStyles, expValEquals('platform_editor_table_q4_loveability', 'isEnabled', true) && editorContentStyles.tableRoundedCornerStyles, editorContentStyles.tableContentModeStyles, editorContentStyles.tableContentModeExtensionContainmentStyles, editorContentStyles.tableContentModeNestedTableStyles, editorContentStyles.tableCellBackgroundColorOverrides, editorContentStyles.hyperLinkFloatingToolbarStyles, editorContentStyles.selectionToolbarAnimationStyles, editorContentStyles.blockquoteDangerStyles, editorContentStyles.textDangerStyles, editorContentStyles.listDangerStyles, editorContentStyles.dangerDateStyles, editorContentStyles.emojiDangerStyles, editorContentStyles.mentionDangerStyles, editorContentStyles.decisionDangerStyles, editorContentStyles.statusDangerStyles, editorContentStyles.dangerRuleStyles, editorContentStyles.mediaDangerStyles, editorContentStyles.nestedPanelDangerStyles, isBlockSpacingEnabled && editorContentStyles.blockSpacingVarStyles, isBlockSpacingEnabled && isDense && editorContentStyles.blockSpacingVarScaledStyles, className || undefined]),
|
|
423
419
|
ref: ref,
|
|
424
420
|
"data-editor-scroll-container": isScrollable ? 'true' : undefined,
|
|
425
421
|
"data-testid": "editor-content-container"
|
|
@@ -307,10 +307,6 @@ export var EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef(functio
|
|
|
307
307
|
var isFullPage = appearance === 'full-page' || appearance === 'full-width' || appearance === 'max';
|
|
308
308
|
var isComment = appearance === 'comment';
|
|
309
309
|
var isChromeless = appearance === 'chromeless';
|
|
310
|
-
|
|
311
|
-
// Evaluated unconditionally so the experiment exposure is tracked correctly
|
|
312
|
-
// (must not be preconditioned by other gates in the style expression below).
|
|
313
|
-
var isSyncBlockActivationEnabled = expValEquals('platform_editor_sync_block_activation', 'isEnabled', true);
|
|
314
310
|
var baseFontSize = getBaseFontSize(appearance, contentMode);
|
|
315
311
|
|
|
316
312
|
// Under the static-CSS experiment, --ak-editor-base-font-size is set earlier on the
|
|
@@ -561,7 +557,7 @@ export var EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef(functio
|
|
|
561
557
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
562
558
|
syncBlockOverflowStyles,
|
|
563
559
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
564
|
-
syncBlockTextSelectionStyles,
|
|
560
|
+
syncBlockTextSelectionStyles,
|
|
565
561
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
566
562
|
syncBlockInteractiveCursorStyles,
|
|
567
563
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -20,6 +20,10 @@ var sketchStrokeMaskLarge = "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w
|
|
|
20
20
|
|
|
21
21
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
22
22
|
export var ruleWithAttrsStyles = css({
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
24
|
+
'.ProseMirror hr[data-color]': {
|
|
25
|
+
backgroundColor: 'var(--custom-palette-color)'
|
|
26
|
+
},
|
|
23
27
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
24
28
|
'.ProseMirror hr[data-style="dashed"]': {
|
|
25
29
|
maskImage: dashedStrokeMask,
|
|
@@ -12,10 +12,8 @@ import { SyncBlockLabelSharedCssClassName, SyncBlockSharedCssClassName } from '@
|
|
|
12
12
|
* - Border labels can show substantially more reference-title text without
|
|
13
13
|
* overflowing narrow synced blocks.
|
|
14
14
|
*
|
|
15
|
-
* Kept as the sole export of this file,
|
|
16
|
-
* syncBlockTextSelectionStyles
|
|
17
|
-
* platform_editor_sync_block_activation experiment at the call site. The
|
|
18
|
-
* text-selection styles are now always applied.
|
|
15
|
+
* Kept as the sole export of this file, separate from
|
|
16
|
+
* syncBlockTextSelectionStyles. The text-selection styles are always applied.
|
|
19
17
|
*
|
|
20
18
|
* @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
|
|
21
19
|
* If you need to make changes here, also update the corresponding style in
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
4
|
+
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; }
|
|
5
|
+
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) { _defineProperty(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; }
|
|
1
6
|
import React from 'react';
|
|
2
7
|
import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
|
|
3
8
|
import { getQuickInsertMenuItemParents } from '@atlaskit/editor-common/quick-insert/get-menu-item-parents';
|
|
4
|
-
import { STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
5
|
-
import { EXTENSION_ITEM_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
6
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
9
|
+
import { DATA_AND_CHARTS_SECTION, EMBED_SECTION, MEDIA_SECTION, OTHER_SECTION, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
|
|
10
|
+
import { CREATE_SECTION_RANK, EXTENSION_ITEM_RANK, MEDIA_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
|
|
7
11
|
import { ExtensionQuickInsertMenuItem } from './ExtensionQuickInsertMenuItem';
|
|
8
12
|
var structureExtensionItemKeyRanks = {
|
|
9
13
|
'toc:toc': 600,
|
|
@@ -11,8 +15,6 @@ var structureExtensionItemKeyRanks = {
|
|
|
11
15
|
'cards:quick-insert': 2000,
|
|
12
16
|
'carousel:quick-insert': 2100,
|
|
13
17
|
'spotlight:quick-insert': 2200,
|
|
14
|
-
'com.atlassian.linking-platform.create:linking-platform-create-jira-issue': 2500,
|
|
15
|
-
'com.atlassian.linking-platform.create:linking-platform-create-confluence-page': 2600,
|
|
16
18
|
'create-from-template:create-from-template': 2700,
|
|
17
19
|
'anchor:anchor': 2900,
|
|
18
20
|
'smart-button:quick-insert': 3000
|
|
@@ -20,16 +22,18 @@ var structureExtensionItemKeyRanks = {
|
|
|
20
22
|
var UNRECOGNIZED_STRUCTURE_EXTENSION_ITEM_RANK = 3100;
|
|
21
23
|
var APP_DATA_AND_CHARTS_ITEM_RANK = 2700;
|
|
22
24
|
var APP_EMBED_ITEM_RANK = EXTENSION_ITEM_RANK;
|
|
25
|
+
var APP_MEDIA_ITEM_RANK = Math.max.apply(Math, _toConsumableArray(Object.values(MEDIA_SECTION_RANK))) + 100;
|
|
26
|
+
var APP_OTHER_ITEM_RANK = EXTENSION_ITEM_RANK;
|
|
23
27
|
var getStructureExtensionItemRank = function getStructureExtensionItemRank(item) {
|
|
24
28
|
return structureExtensionItemKeyRanks[item.key];
|
|
25
29
|
};
|
|
26
|
-
var
|
|
30
|
+
var isExtensionItemInSection = function isExtensionItemInSection(item, sectionKey) {
|
|
27
31
|
return getQuickInsertMenuItemParents({
|
|
28
32
|
category: item.category,
|
|
29
33
|
legacyCategories: item.categories,
|
|
30
34
|
rank: 0
|
|
31
35
|
}).some(function (parent) {
|
|
32
|
-
return parent.key ===
|
|
36
|
+
return parent.key === sectionKey;
|
|
33
37
|
});
|
|
34
38
|
};
|
|
35
39
|
var compareMenuItemsByTitleAndKey = function compareMenuItemsByTitleAndKey(firstItem, secondItem) {
|
|
@@ -40,56 +44,71 @@ var getAlphabeticalItemRanks = function getAlphabeticalItemRanks(items, isRanked
|
|
|
40
44
|
return [item, firstRank + index];
|
|
41
45
|
}));
|
|
42
46
|
};
|
|
43
|
-
var
|
|
44
|
-
return
|
|
45
|
-
return isStructureExtensionItem(item) && getStructureExtensionItemRank(item) === undefined;
|
|
46
|
-
}, UNRECOGNIZED_STRUCTURE_EXTENSION_ITEM_RANK) : new Map();
|
|
47
|
+
var hasNoNegativePriority = function hasNoNegativePriority(item) {
|
|
48
|
+
return item.priority === undefined || item.priority >= 0;
|
|
47
49
|
};
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
var getSectionAlphabeticalItemRanks = function getSectionAlphabeticalItemRanks(items, sectionKey, firstRank) {
|
|
51
|
+
var isRankedItem = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : hasNoNegativePriority;
|
|
52
|
+
return getAlphabeticalItemRanks(items, function (item) {
|
|
53
|
+
return isExtensionItemInSection(item, sectionKey) && isRankedItem(item);
|
|
54
|
+
}, firstRank);
|
|
52
55
|
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
|
|
57
|
+
// Rank each parent section separately so a macro in multiple categories gets the right order in each.
|
|
58
|
+
var createExtensionItemRanker = function createExtensionItemRanker(items) {
|
|
59
|
+
var sections = [[EMBED_SECTION.key, APP_EMBED_ITEM_RANK], [MEDIA_SECTION.key, APP_MEDIA_ITEM_RANK], [OTHER_SECTION.key, APP_OTHER_ITEM_RANK], [STRUCTURE_SECTION.key, UNRECOGNIZED_STRUCTURE_EXTENSION_ITEM_RANK, function (item) {
|
|
60
|
+
return getStructureExtensionItemRank(item) === undefined;
|
|
61
|
+
}], [DATA_AND_CHARTS_SECTION.key, APP_DATA_AND_CHARTS_ITEM_RANK, function (item) {
|
|
62
|
+
return item.priority === undefined;
|
|
63
|
+
}]];
|
|
64
|
+
var ranksBySection = new Map(sections.map(function (_ref) {
|
|
65
|
+
var _ref2 = _slicedToArray(_ref, 3),
|
|
66
|
+
sectionKey = _ref2[0],
|
|
67
|
+
firstRank = _ref2[1],
|
|
68
|
+
isRankedItem = _ref2[2];
|
|
69
|
+
return [sectionKey, getSectionAlphabeticalItemRanks(items, sectionKey, firstRank, isRankedItem)];
|
|
70
|
+
}));
|
|
71
|
+
return function (_ref3) {
|
|
72
|
+
var _ranksBySection$get, _item$priority;
|
|
73
|
+
var index = _ref3.index,
|
|
74
|
+
knownRank = _ref3.knownRank,
|
|
75
|
+
item = _ref3.item,
|
|
76
|
+
sectionKey = _ref3.sectionKey;
|
|
77
|
+
if (knownRank !== undefined) {
|
|
78
|
+
return knownRank;
|
|
79
|
+
}
|
|
80
|
+
var sectionRank = (_ranksBySection$get = ranksBySection.get(sectionKey)) === null || _ranksBySection$get === void 0 ? void 0 : _ranksBySection$get.get(item);
|
|
81
|
+
return sectionRank !== null && sectionRank !== void 0 ? sectionRank : EXTENSION_ITEM_RANK + ((_item$priority = item.priority) !== null && _item$priority !== void 0 ? _item$priority : index);
|
|
82
|
+
};
|
|
66
83
|
};
|
|
67
84
|
export var getExtensionQuickInsertComponents = function getExtensionQuickInsertComponents(_ref4) {
|
|
68
85
|
var apiRef = _ref4.apiRef,
|
|
69
86
|
createAnalyticsEvent = _ref4.createAnalyticsEvent,
|
|
70
87
|
editorActions = _ref4.editorActions,
|
|
71
88
|
items = _ref4.items;
|
|
72
|
-
var
|
|
73
|
-
var unrecognizedStructureItemRanks = getUnrecognizedStructureItemRanks(items);
|
|
74
|
-
var unrecognizedDataAndChartsItemRanks = getUnrecognizedDataAndChartsItemRanks(items);
|
|
89
|
+
var getExtensionItemRank = createExtensionItemRanker(items);
|
|
75
90
|
return items.map(function (item, index) {
|
|
76
91
|
var structureRank = getStructureExtensionItemRank(item);
|
|
77
92
|
var isStructureItem = structureRank !== undefined;
|
|
78
93
|
var categories = isStructureItem ? ['structure'] : item.categories;
|
|
79
|
-
var
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
unrecognizedDataAndChartsItemRanks: unrecognizedDataAndChartsItemRanks,
|
|
84
|
-
unrecognizedStructureItemRanks: unrecognizedStructureItemRanks
|
|
94
|
+
var parents = getQuickInsertMenuItemParents({
|
|
95
|
+
category: item.category,
|
|
96
|
+
legacyCategories: categories,
|
|
97
|
+
rank: 0
|
|
85
98
|
});
|
|
86
99
|
return {
|
|
87
100
|
type: 'menu-item',
|
|
88
101
|
key: item.key,
|
|
89
|
-
parents:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
102
|
+
parents: parents.map(function (parent) {
|
|
103
|
+
var _CREATE_SECTION_RANK$;
|
|
104
|
+
return _objectSpread(_objectSpread({}, parent), {}, {
|
|
105
|
+
rank: getExtensionItemRank({
|
|
106
|
+
index: index,
|
|
107
|
+
knownRank: (_CREATE_SECTION_RANK$ = CREATE_SECTION_RANK[item.key]) !== null && _CREATE_SECTION_RANK$ !== void 0 ? _CREATE_SECTION_RANK$ : structureRank,
|
|
108
|
+
item: item,
|
|
109
|
+
sectionKey: parent.key
|
|
110
|
+
})
|
|
111
|
+
});
|
|
93
112
|
}),
|
|
94
113
|
match: createQuickInsertMatcher(function () {
|
|
95
114
|
return {
|
|
@@ -6,10 +6,8 @@ import type { SerializedStyles } from '@emotion/react';
|
|
|
6
6
|
* - Border labels can show substantially more reference-title text without
|
|
7
7
|
* overflowing narrow synced blocks.
|
|
8
8
|
*
|
|
9
|
-
* Kept as the sole export of this file,
|
|
10
|
-
* syncBlockTextSelectionStyles
|
|
11
|
-
* platform_editor_sync_block_activation experiment at the call site. The
|
|
12
|
-
* text-selection styles are now always applied.
|
|
9
|
+
* Kept as the sole export of this file, separate from
|
|
10
|
+
* syncBlockTextSelectionStyles. The text-selection styles are always applied.
|
|
13
11
|
*
|
|
14
12
|
* @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
|
|
15
13
|
* If you need to make changes here, also update the corresponding style in
|