@atlaskit/editor-common 134.3.0 → 134.4.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 +38 -0
- package/dist/cjs/messages/card.js +6 -0
- package/dist/cjs/messages/insert-block.js +6 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/rank.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/vanilla-tooltip/index.js +1 -0
- package/dist/es2019/messages/card.js +6 -0
- package/dist/es2019/messages/insert-block.js +6 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/rank.js +3 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/vanilla-tooltip/index.js +1 -0
- package/dist/esm/messages/card.js +6 -0
- package/dist/esm/messages/insert-block.js +6 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/rank.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/vanilla-tooltip/index.js +1 -0
- package/dist/types/collab/index.d.ts +8 -2
- package/dist/types/messages/card.d.ts +75 -70
- package/dist/types/messages/insert-block.d.ts +5 -0
- package/package.json +7 -7
- package/dist/cjs/element-browser/components/ElementList/cellSizeAndPositionGetter.js +0 -42
- package/dist/cjs/prosemirror-node-view.js +0 -1
- package/dist/cjs/sync-block/types.js +0 -1
- package/dist/cjs/utils/isNodeTypeValidChildOf.js +0 -23
- package/dist/es2019/element-browser/components/ElementList/cellSizeAndPositionGetter.js +0 -39
- package/dist/es2019/prosemirror-node-view.js +0 -0
- package/dist/es2019/sync-block/types.js +0 -0
- package/dist/es2019/utils/isNodeTypeValidChildOf.js +0 -17
- package/dist/esm/element-browser/components/ElementList/cellSizeAndPositionGetter.js +0 -37
- package/dist/esm/prosemirror-node-view.js +0 -0
- package/dist/esm/sync-block/types.js +0 -0
- package/dist/esm/utils/isNodeTypeValidChildOf.js +0 -17
- package/dist/types/element-browser/components/ElementList/cellSizeAndPositionGetter.d.ts +0 -7
- package/dist/types/prosemirror-node-view.d.ts +0 -0
- package/dist/types/sync-block/types.d.ts +0 -4
- package/dist/types/utils/isNodeTypeValidChildOf.d.ts +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 134.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`88f6eda39f497`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/88f6eda39f497) -
|
|
8
|
+
Resolve agent telepointer colours from supplied display names and stable named IDs instead of
|
|
9
|
+
machine types. Under `confluence_ncs_step_diffing_version_history`, collab-provider carries
|
|
10
|
+
`agentId`, `agentName` and `agentNamedId` from received steps into local agent presence, retaining
|
|
11
|
+
known metadata when later steps omit it. This path uses no profile lookups. Missing presentation
|
|
12
|
+
metadata uses the generic agent palette; human participants keep their existing colours.
|
|
13
|
+
|
|
14
|
+
Telepointers identify agent participants from these explicit identity fields rather than
|
|
15
|
+
`agentType` or a human participant's display name.
|
|
16
|
+
|
|
17
|
+
`getParticipantColor(id, agentName?, agentNamedId?)` and
|
|
18
|
+
`collabEdit.actions.getAvatarColor(id, agentName?, agentNamedId?)` now accept a resolved display
|
|
19
|
+
name in the second argument. Callers previously passing a machine type should supply the agent's
|
|
20
|
+
name instead, and pass stable named IDs in the third argument. With
|
|
21
|
+
`confluence_ncs_step_diffing_version_history` enabled, named brand metadata takes precedence over
|
|
22
|
+
the display name. With the gate off, brand lookup is disabled. Human callers should continue to
|
|
23
|
+
omit agent metadata.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
29
|
+
## 134.3.1
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- [`ce5f97ab62e45`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ce5f97ab62e45) -
|
|
34
|
+
[EDITOR-9779] Apply Hello slash menu naming and ranking behind platform_editor_slash_command:
|
|
35
|
+
rename the Loom record item to "Loom" and Insert Confluence list to "Confluence list", rank Assets
|
|
36
|
+
after the Spaces items in Data and charts, and stop forcing Smart button into Structure
|
|
37
|
+
- [`8f9c12c0398d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8f9c12c0398d2) -
|
|
38
|
+
Delete unreachable internal source files
|
|
39
|
+
- Updated dependencies
|
|
40
|
+
|
|
3
41
|
## 134.3.0
|
|
4
42
|
|
|
5
43
|
### Minor Changes
|
|
@@ -171,11 +171,17 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
171
171
|
defaultMessage: 'Go to link',
|
|
172
172
|
description: 'An option in the configure link dropdown that informs the user they can click the option to open the link'
|
|
173
173
|
},
|
|
174
|
+
// Remove when cleaning up platform_editor_slash_command
|
|
174
175
|
datasourceConfluenceSearch: {
|
|
175
176
|
id: 'fabric.editor.datasource.confluenceSearch',
|
|
176
177
|
defaultMessage: 'Insert Confluence list',
|
|
177
178
|
description: 'Title shown for Confluence Search datasource on QuickInsert options'
|
|
178
179
|
},
|
|
180
|
+
datasourceConfluenceList: {
|
|
181
|
+
id: 'fabric.editor.datasource.confluenceList',
|
|
182
|
+
defaultMessage: 'Confluence list',
|
|
183
|
+
description: 'Title shown for Confluence Search datasource in the Data and charts section of the editor slash command menu'
|
|
184
|
+
},
|
|
179
185
|
datasourceConfluenceSearchDescription: {
|
|
180
186
|
id: 'fabric.editor.datasource.confluenceSearch.description',
|
|
181
187
|
defaultMessage: 'Display filtered Confluence search results',
|
|
@@ -236,11 +236,17 @@ var toolbarInsertBlockMessages = exports.toolbarInsertBlockMessages = (0, _react
|
|
|
236
236
|
defaultMessage: 'Browse all the keyboard shortcuts and markdown options',
|
|
237
237
|
description: 'Displayed as a description text for the help option in the editor insert menu, explaining that it opens a dialog where users can view all available keyboard shortcuts and markdown formatting options.'
|
|
238
238
|
},
|
|
239
|
+
// Remove when cleaning up platform_editor_slash_command
|
|
239
240
|
recordVideo: {
|
|
240
241
|
id: 'fabric.editor.recordVideo',
|
|
241
242
|
defaultMessage: 'Record a Loom video',
|
|
242
243
|
description: 'Shown as a menu item label in the editor insert menu, used to trigger recording a Loom video to embed in the document.'
|
|
243
244
|
},
|
|
245
|
+
loomTitle: {
|
|
246
|
+
id: 'fabric.editor.loomTitle',
|
|
247
|
+
defaultMessage: 'Loom',
|
|
248
|
+
description: 'Shown as a menu item label in the Create section of the editor slash command menu, used to trigger recording a Loom video to embed in the document.'
|
|
249
|
+
},
|
|
244
250
|
addLoomVideo: {
|
|
245
251
|
id: 'fabric.editor.addLoomVideo',
|
|
246
252
|
defaultMessage: 'Record a Loom video',
|
|
@@ -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 = "134.
|
|
30
|
+
var packageVersion = "134.3.1";
|
|
31
31
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
32
32
|
// Remove URL as it has UGC
|
|
33
33
|
// Ignored via go/ees007
|
|
@@ -15,7 +15,7 @@ var MEDIA_SECTION_RANK = exports.MEDIA_SECTION_RANK = (0, _defineProperty2.defau
|
|
|
15
15
|
var CREATE_SECTION_RANK = exports.CREATE_SECTION_RANK = (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)({}, _keys.JIRA_ISSUE_MENU_ITEM.key, 100), _keys.LOOM_MENU_ITEM.key, 200), _keys.CONFLUENCE_PAGE_MENU_ITEM.key, 300), _keys.DATABASE_MENU_ITEM.key, 400), _keys.WHITEBOARD_MENU_ITEM.key, 500), _keys.DIAGRAM_MENU_ITEM.key, 600), _keys.FLOWCHART_MENU_ITEM.key, 700), _keys.BRAINSTORMING_MENU_ITEM.key, 800), _keys.RETROSPECTIVE_MENU_ITEM.key, 900), _keys.ROADMAP_MENU_ITEM.key, 1000);
|
|
16
16
|
var TEXT_FORMATTING_SECTION_RANK = exports.TEXT_FORMATTING_SECTION_RANK = (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)({}, _keys.UNORDERED_LIST_MENU_ITEM.key, 100), _keys.ORDERED_LIST_MENU_ITEM.key, 200), _keys.HEADING_1_MENU_ITEM.key, 300), _keys.HEADING_2_MENU_ITEM.key, 400), _keys.HEADING_3_MENU_ITEM.key, 500), _keys.HEADING_4_MENU_ITEM.key, 600), _keys.HEADING_5_MENU_ITEM.key, 700), _keys.HEADING_6_MENU_ITEM.key, 800), _keys.BLOCKQUOTE_MENU_ITEM.key, 900), _keys.PLACEHOLDER_TEXT_MENU_ITEM.key, 1000);
|
|
17
17
|
var ROVO_SECTION_RANK = exports.ROVO_SECTION_RANK = (0, _defineProperty2.default)({}, _keys.ASK_ROVO_MENU_ITEM.key, 100);
|
|
18
|
-
var DATA_AND_CHARTS_SECTION_RANK = exports.DATA_AND_CHARTS_SECTION_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.JIRA_WORK_ITEMS_MENU_ITEM.key, 300), _keys.CONFLUENCE_LIST_MENU_ITEM.key, 400), _keys.ASSETS_MENU_ITEM.key,
|
|
18
|
+
var DATA_AND_CHARTS_SECTION_RANK = exports.DATA_AND_CHARTS_SECTION_RANK = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _keys.JIRA_WORK_ITEMS_MENU_ITEM.key, 300), _keys.CONFLUENCE_LIST_MENU_ITEM.key, 400), _keys.ASSETS_MENU_ITEM.key, 2450);
|
|
19
19
|
var OTHER_SECTION_RANK = exports.OTHER_SECTION_RANK = (0, _defineProperty2.default)({}, _keys.HELP_DIALOG_MENU_ITEM.key, 100);
|
|
20
20
|
var EXTENSION_ITEM_RANK = exports.EXTENSION_ITEM_RANK = 1500;
|
|
21
21
|
var CATEGORY_VIEW_MORE_RANK = exports.CATEGORY_VIEW_MORE_RANK = Number.MAX_SAFE_INTEGER;
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "134.
|
|
26
|
+
var packageVersion = "134.3.1";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -147,6 +147,7 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
|
|
|
147
147
|
var ownerDocument = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_use_vanilla_components') ? trigger.ownerDocument : document;
|
|
148
148
|
var tooltip = ownerDocument.createElement('span');
|
|
149
149
|
tooltip.role = 'tooltip';
|
|
150
|
+
// eslint-disable-next-line @atlaskit/design-system/no-native-popover-or-dialog -- a plain DOM tooltip for ProseMirror that hides on Escape with its own window listener, outside the shared Escape stack; TODO move to a top-layer primitive
|
|
150
151
|
tooltip.popover = 'hint';
|
|
151
152
|
tooltip.className = className;
|
|
152
153
|
tooltip.id = id !== null && id !== void 0 ? id : generateTooltipId();
|
|
@@ -165,11 +165,17 @@ export const messages = defineMessages({
|
|
|
165
165
|
defaultMessage: 'Go to link',
|
|
166
166
|
description: 'An option in the configure link dropdown that informs the user they can click the option to open the link'
|
|
167
167
|
},
|
|
168
|
+
// Remove when cleaning up platform_editor_slash_command
|
|
168
169
|
datasourceConfluenceSearch: {
|
|
169
170
|
id: 'fabric.editor.datasource.confluenceSearch',
|
|
170
171
|
defaultMessage: 'Insert Confluence list',
|
|
171
172
|
description: 'Title shown for Confluence Search datasource on QuickInsert options'
|
|
172
173
|
},
|
|
174
|
+
datasourceConfluenceList: {
|
|
175
|
+
id: 'fabric.editor.datasource.confluenceList',
|
|
176
|
+
defaultMessage: 'Confluence list',
|
|
177
|
+
description: 'Title shown for Confluence Search datasource in the Data and charts section of the editor slash command menu'
|
|
178
|
+
},
|
|
173
179
|
datasourceConfluenceSearchDescription: {
|
|
174
180
|
id: 'fabric.editor.datasource.confluenceSearch.description',
|
|
175
181
|
defaultMessage: 'Display filtered Confluence search results',
|
|
@@ -230,11 +230,17 @@ export const toolbarInsertBlockMessages = defineMessages({
|
|
|
230
230
|
defaultMessage: 'Browse all the keyboard shortcuts and markdown options',
|
|
231
231
|
description: 'Displayed as a description text for the help option in the editor insert menu, explaining that it opens a dialog where users can view all available keyboard shortcuts and markdown formatting options.'
|
|
232
232
|
},
|
|
233
|
+
// Remove when cleaning up platform_editor_slash_command
|
|
233
234
|
recordVideo: {
|
|
234
235
|
id: 'fabric.editor.recordVideo',
|
|
235
236
|
defaultMessage: 'Record a Loom video',
|
|
236
237
|
description: 'Shown as a menu item label in the editor insert menu, used to trigger recording a Loom video to embed in the document.'
|
|
237
238
|
},
|
|
239
|
+
loomTitle: {
|
|
240
|
+
id: 'fabric.editor.loomTitle',
|
|
241
|
+
defaultMessage: 'Loom',
|
|
242
|
+
description: 'Shown as a menu item label in the Create section of the editor slash command menu, used to trigger recording a Loom video to embed in the document.'
|
|
243
|
+
},
|
|
238
244
|
addLoomVideo: {
|
|
239
245
|
id: 'fabric.editor.addLoomVideo',
|
|
240
246
|
defaultMessage: 'Record a Loom video',
|
|
@@ -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 = "134.
|
|
16
|
+
const packageVersion = "134.3.1";
|
|
17
17
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
18
18
|
// Remove URL as it has UGC
|
|
19
19
|
// Ignored via go/ees007
|
|
@@ -71,7 +71,9 @@ export const ROVO_SECTION_RANK = {
|
|
|
71
71
|
export const DATA_AND_CHARTS_SECTION_RANK = {
|
|
72
72
|
[JIRA_WORK_ITEMS_MENU_ITEM.key]: 300,
|
|
73
73
|
[CONFLUENCE_LIST_MENU_ITEM.key]: 400,
|
|
74
|
-
|
|
74
|
+
// Extension items in this section rank at EXTENSION_ITEM_RANK (1500) + priority, so Assets sits
|
|
75
|
+
// after the Spaces items (priority 900) and before Calendar (2500).
|
|
76
|
+
[ASSETS_MENU_ITEM.key]: 2450
|
|
75
77
|
};
|
|
76
78
|
export const OTHER_SECTION_RANK = {
|
|
77
79
|
[HELP_DIALOG_MENU_ITEM.key]: 100
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "134.
|
|
16
|
+
const packageVersion = "134.3.1";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -134,6 +134,7 @@ export class VanillaTooltip {
|
|
|
134
134
|
const ownerDocument = isExperimentEnabled('platform_editor_use_vanilla_components') ? trigger.ownerDocument : document;
|
|
135
135
|
const tooltip = ownerDocument.createElement('span');
|
|
136
136
|
tooltip.role = 'tooltip';
|
|
137
|
+
// eslint-disable-next-line @atlaskit/design-system/no-native-popover-or-dialog -- a plain DOM tooltip for ProseMirror that hides on Escape with its own window listener, outside the shared Escape stack; TODO move to a top-layer primitive
|
|
137
138
|
tooltip.popover = 'hint';
|
|
138
139
|
tooltip.className = className;
|
|
139
140
|
tooltip.id = id !== null && id !== void 0 ? id : generateTooltipId();
|
|
@@ -165,11 +165,17 @@ export var messages = defineMessages({
|
|
|
165
165
|
defaultMessage: 'Go to link',
|
|
166
166
|
description: 'An option in the configure link dropdown that informs the user they can click the option to open the link'
|
|
167
167
|
},
|
|
168
|
+
// Remove when cleaning up platform_editor_slash_command
|
|
168
169
|
datasourceConfluenceSearch: {
|
|
169
170
|
id: 'fabric.editor.datasource.confluenceSearch',
|
|
170
171
|
defaultMessage: 'Insert Confluence list',
|
|
171
172
|
description: 'Title shown for Confluence Search datasource on QuickInsert options'
|
|
172
173
|
},
|
|
174
|
+
datasourceConfluenceList: {
|
|
175
|
+
id: 'fabric.editor.datasource.confluenceList',
|
|
176
|
+
defaultMessage: 'Confluence list',
|
|
177
|
+
description: 'Title shown for Confluence Search datasource in the Data and charts section of the editor slash command menu'
|
|
178
|
+
},
|
|
173
179
|
datasourceConfluenceSearchDescription: {
|
|
174
180
|
id: 'fabric.editor.datasource.confluenceSearch.description',
|
|
175
181
|
defaultMessage: 'Display filtered Confluence search results',
|
|
@@ -230,11 +230,17 @@ export var toolbarInsertBlockMessages = defineMessages({
|
|
|
230
230
|
defaultMessage: 'Browse all the keyboard shortcuts and markdown options',
|
|
231
231
|
description: 'Displayed as a description text for the help option in the editor insert menu, explaining that it opens a dialog where users can view all available keyboard shortcuts and markdown formatting options.'
|
|
232
232
|
},
|
|
233
|
+
// Remove when cleaning up platform_editor_slash_command
|
|
233
234
|
recordVideo: {
|
|
234
235
|
id: 'fabric.editor.recordVideo',
|
|
235
236
|
defaultMessage: 'Record a Loom video',
|
|
236
237
|
description: 'Shown as a menu item label in the editor insert menu, used to trigger recording a Loom video to embed in the document.'
|
|
237
238
|
},
|
|
239
|
+
loomTitle: {
|
|
240
|
+
id: 'fabric.editor.loomTitle',
|
|
241
|
+
defaultMessage: 'Loom',
|
|
242
|
+
description: 'Shown as a menu item label in the Create section of the editor slash command menu, used to trigger recording a Loom video to embed in the document.'
|
|
243
|
+
},
|
|
238
244
|
addLoomVideo: {
|
|
239
245
|
id: 'fabric.editor.addLoomVideo',
|
|
240
246
|
defaultMessage: 'Record a Loom video',
|
|
@@ -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 = "134.
|
|
22
|
+
var packageVersion = "134.3.1";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -9,7 +9,7 @@ export var MEDIA_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty(
|
|
|
9
9
|
export var CREATE_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, JIRA_ISSUE_MENU_ITEM.key, 100), LOOM_MENU_ITEM.key, 200), CONFLUENCE_PAGE_MENU_ITEM.key, 300), DATABASE_MENU_ITEM.key, 400), WHITEBOARD_MENU_ITEM.key, 500), DIAGRAM_MENU_ITEM.key, 600), FLOWCHART_MENU_ITEM.key, 700), BRAINSTORMING_MENU_ITEM.key, 800), RETROSPECTIVE_MENU_ITEM.key, 900), ROADMAP_MENU_ITEM.key, 1000);
|
|
10
10
|
export var TEXT_FORMATTING_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, UNORDERED_LIST_MENU_ITEM.key, 100), ORDERED_LIST_MENU_ITEM.key, 200), HEADING_1_MENU_ITEM.key, 300), HEADING_2_MENU_ITEM.key, 400), HEADING_3_MENU_ITEM.key, 500), HEADING_4_MENU_ITEM.key, 600), HEADING_5_MENU_ITEM.key, 700), HEADING_6_MENU_ITEM.key, 800), BLOCKQUOTE_MENU_ITEM.key, 900), PLACEHOLDER_TEXT_MENU_ITEM.key, 1000);
|
|
11
11
|
export var ROVO_SECTION_RANK = _defineProperty({}, ASK_ROVO_MENU_ITEM.key, 100);
|
|
12
|
-
export var DATA_AND_CHARTS_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty({}, JIRA_WORK_ITEMS_MENU_ITEM.key, 300), CONFLUENCE_LIST_MENU_ITEM.key, 400), ASSETS_MENU_ITEM.key,
|
|
12
|
+
export var DATA_AND_CHARTS_SECTION_RANK = _defineProperty(_defineProperty(_defineProperty({}, JIRA_WORK_ITEMS_MENU_ITEM.key, 300), CONFLUENCE_LIST_MENU_ITEM.key, 400), ASSETS_MENU_ITEM.key, 2450);
|
|
13
13
|
export var OTHER_SECTION_RANK = _defineProperty({}, HELP_DIALOG_MENU_ITEM.key, 100);
|
|
14
14
|
export var EXTENSION_ITEM_RANK = 1500;
|
|
15
15
|
export var CATEGORY_VIEW_MORE_RANK = Number.MAX_SAFE_INTEGER;
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "134.
|
|
23
|
+
var packageVersion = "134.3.1";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -140,6 +140,7 @@ export var VanillaTooltip = /*#__PURE__*/function () {
|
|
|
140
140
|
var ownerDocument = isExperimentEnabled('platform_editor_use_vanilla_components') ? trigger.ownerDocument : document;
|
|
141
141
|
var tooltip = ownerDocument.createElement('span');
|
|
142
142
|
tooltip.role = 'tooltip';
|
|
143
|
+
// eslint-disable-next-line @atlaskit/design-system/no-native-popover-or-dialog -- a plain DOM tooltip for ProseMirror that hides on Escape with its own window listener, outside the shared Escape stack; TODO move to a top-layer primitive
|
|
143
144
|
tooltip.popover = 'hint';
|
|
144
145
|
tooltip.className = className;
|
|
145
146
|
tooltip.id = id !== null && id !== void 0 ? id : generateTooltipId();
|
|
@@ -312,8 +312,6 @@ export interface BaseStepPM extends StepMetadata {
|
|
|
312
312
|
/** The agent's own id, as opposed to `agentId`, which carries its Atlassian account id. */
|
|
313
313
|
agentSourceId?: string;
|
|
314
314
|
agentType?: string;
|
|
315
|
-
/** True for a Forge / third-party / remote agent, so collaborators match its presentation. */
|
|
316
|
-
isThirdPartyAgent?: boolean;
|
|
317
315
|
clientId: number | string;
|
|
318
316
|
from?: number;
|
|
319
317
|
/**
|
|
@@ -326,6 +324,8 @@ export interface BaseStepPM extends StepMetadata {
|
|
|
326
324
|
* that do not send it, and never validated for format by the frontend.
|
|
327
325
|
*/
|
|
328
326
|
invocationId?: string;
|
|
327
|
+
/** True for a Forge / third-party / remote agent, so collaborators match its presentation. */
|
|
328
|
+
isThirdPartyAgent?: boolean;
|
|
329
329
|
slice?: SliceJson;
|
|
330
330
|
stepType: string;
|
|
331
331
|
to?: number;
|
|
@@ -411,6 +411,12 @@ type ProviderParticipantPermitLevel = {
|
|
|
411
411
|
};
|
|
412
412
|
export interface CollabParticipant {
|
|
413
413
|
actingUserId?: string;
|
|
414
|
+
/** Agent identity supplied by an agent-authored step, distinct from a human participant ID. */
|
|
415
|
+
agentId?: string;
|
|
416
|
+
/** Agent display name supplied by a step, distinct from the shared participant name. */
|
|
417
|
+
agentName?: string;
|
|
418
|
+
/** Stable external configuration reference supplied by an agent-authored step. */
|
|
419
|
+
agentNamedId?: string;
|
|
414
420
|
agentType?: string;
|
|
415
421
|
avatar: string;
|
|
416
422
|
cursorPos?: number;
|
|
@@ -1,187 +1,192 @@
|
|
|
1
1
|
export declare const messages: {
|
|
2
|
-
url: {
|
|
3
|
-
id: string;
|
|
4
|
-
defaultMessage: string;
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
2
|
block: {
|
|
8
|
-
id: string;
|
|
9
3
|
defaultMessage: string;
|
|
10
4
|
description: string;
|
|
11
|
-
};
|
|
12
|
-
inline: {
|
|
13
5
|
id: string;
|
|
6
|
+
};
|
|
7
|
+
blockCardUnavailable: {
|
|
14
8
|
defaultMessage: string;
|
|
15
9
|
description: string;
|
|
16
|
-
};
|
|
17
|
-
embed: {
|
|
18
10
|
id: string;
|
|
11
|
+
};
|
|
12
|
+
blockDescription: {
|
|
19
13
|
defaultMessage: string;
|
|
20
14
|
description: string;
|
|
21
|
-
};
|
|
22
|
-
link: {
|
|
23
15
|
id: string;
|
|
16
|
+
};
|
|
17
|
+
blockTitle: {
|
|
24
18
|
defaultMessage: string;
|
|
25
19
|
description: string;
|
|
20
|
+
id: string;
|
|
26
21
|
};
|
|
27
22
|
card: {
|
|
28
|
-
id: string;
|
|
29
23
|
defaultMessage: string;
|
|
30
24
|
description: string;
|
|
31
|
-
};
|
|
32
|
-
blockCardUnavailable: {
|
|
33
25
|
id: string;
|
|
26
|
+
};
|
|
27
|
+
datasourceAppearanceTitle: {
|
|
34
28
|
defaultMessage: string;
|
|
35
29
|
description: string;
|
|
36
|
-
};
|
|
37
|
-
displayOptionUnavailableInParentNode: {
|
|
38
30
|
id: string;
|
|
31
|
+
};
|
|
32
|
+
datasourceAssetsObjectsDescription: {
|
|
39
33
|
defaultMessage: string;
|
|
40
34
|
description: string;
|
|
41
|
-
};
|
|
42
|
-
urlTitle: {
|
|
43
35
|
id: string;
|
|
36
|
+
};
|
|
37
|
+
datasourceAssetsObjectsGeneralAvailability: {
|
|
44
38
|
defaultMessage: string;
|
|
45
39
|
description: string;
|
|
46
|
-
};
|
|
47
|
-
blockTitle: {
|
|
48
40
|
id: string;
|
|
41
|
+
};
|
|
42
|
+
datasourceConfluenceList: {
|
|
49
43
|
defaultMessage: string;
|
|
50
44
|
description: string;
|
|
51
|
-
};
|
|
52
|
-
inlineTitle: {
|
|
53
45
|
id: string;
|
|
46
|
+
};
|
|
47
|
+
datasourceConfluenceSearch: {
|
|
54
48
|
defaultMessage: string;
|
|
55
49
|
description: string;
|
|
56
|
-
};
|
|
57
|
-
openButtonTitle: {
|
|
58
50
|
id: string;
|
|
51
|
+
};
|
|
52
|
+
datasourceConfluenceSearchDescription: {
|
|
59
53
|
defaultMessage: string;
|
|
60
54
|
description: string;
|
|
61
|
-
};
|
|
62
|
-
panelButtonTitle: {
|
|
63
55
|
id: string;
|
|
56
|
+
};
|
|
57
|
+
datasourceJiraIssue: {
|
|
64
58
|
defaultMessage: string;
|
|
65
59
|
description: string;
|
|
66
|
-
};
|
|
67
|
-
previewButtonTitle: {
|
|
68
60
|
id: string;
|
|
61
|
+
};
|
|
62
|
+
datasourceJiraIssueDescription: {
|
|
69
63
|
defaultMessage: string;
|
|
70
64
|
description: string;
|
|
71
|
-
};
|
|
72
|
-
embedTitle: {
|
|
73
65
|
id: string;
|
|
66
|
+
};
|
|
67
|
+
datasourceJiraIssueDescriptionIssueTermRefresh: {
|
|
74
68
|
defaultMessage: string;
|
|
75
69
|
description: string;
|
|
76
|
-
};
|
|
77
|
-
urlDescription: {
|
|
78
70
|
id: string;
|
|
71
|
+
};
|
|
72
|
+
datasourceJiraIssueIssueTermRefresh: {
|
|
79
73
|
defaultMessage: string;
|
|
80
74
|
description: string;
|
|
81
|
-
};
|
|
82
|
-
blockDescription: {
|
|
83
75
|
id: string;
|
|
76
|
+
};
|
|
77
|
+
datasourceTitle: {
|
|
84
78
|
defaultMessage: string;
|
|
85
79
|
description: string;
|
|
86
|
-
};
|
|
87
|
-
inlineDescription: {
|
|
88
80
|
id: string;
|
|
81
|
+
};
|
|
82
|
+
displayOptionUnavailableInParentNode: {
|
|
89
83
|
defaultMessage: string;
|
|
90
84
|
description: string;
|
|
91
|
-
};
|
|
92
|
-
embedDescription: {
|
|
93
85
|
id: string;
|
|
86
|
+
};
|
|
87
|
+
editDropdownEditDatasourceTitle: {
|
|
94
88
|
defaultMessage: string;
|
|
95
89
|
description: string;
|
|
96
|
-
};
|
|
97
|
-
embedToBlockCardWarning: {
|
|
98
90
|
id: string;
|
|
91
|
+
};
|
|
92
|
+
editDropdownEditLinkTitle: {
|
|
99
93
|
defaultMessage: string;
|
|
100
94
|
description: string;
|
|
95
|
+
id: string;
|
|
101
96
|
};
|
|
102
97
|
editDropdownExpandIconLabel: {
|
|
103
|
-
id: string;
|
|
104
98
|
defaultMessage: string;
|
|
105
99
|
description: string;
|
|
100
|
+
id: string;
|
|
106
101
|
};
|
|
107
102
|
editDropdownTriggerTitle: {
|
|
108
|
-
id: string;
|
|
109
103
|
defaultMessage: string;
|
|
110
104
|
description: string;
|
|
111
|
-
};
|
|
112
|
-
editDropdownEditLinkTitle: {
|
|
113
105
|
id: string;
|
|
106
|
+
};
|
|
107
|
+
embed: {
|
|
114
108
|
defaultMessage: string;
|
|
115
109
|
description: string;
|
|
116
|
-
};
|
|
117
|
-
editDropdownEditDatasourceTitle: {
|
|
118
110
|
id: string;
|
|
111
|
+
};
|
|
112
|
+
embedDescription: {
|
|
119
113
|
defaultMessage: string;
|
|
120
114
|
description: string;
|
|
121
|
-
};
|
|
122
|
-
datasourceTitle: {
|
|
123
115
|
id: string;
|
|
116
|
+
};
|
|
117
|
+
embedTitle: {
|
|
124
118
|
defaultMessage: string;
|
|
125
119
|
description: string;
|
|
126
|
-
};
|
|
127
|
-
datasourceAppearanceTitle: {
|
|
128
120
|
id: string;
|
|
121
|
+
};
|
|
122
|
+
embedToBlockCardWarning: {
|
|
129
123
|
defaultMessage: string;
|
|
130
124
|
description: string;
|
|
131
|
-
};
|
|
132
|
-
datasourceJiraIssue: {
|
|
133
125
|
id: string;
|
|
126
|
+
};
|
|
127
|
+
inline: {
|
|
134
128
|
defaultMessage: string;
|
|
135
129
|
description: string;
|
|
136
|
-
};
|
|
137
|
-
datasourceJiraIssueDescription: {
|
|
138
130
|
id: string;
|
|
131
|
+
};
|
|
132
|
+
inlineConfigureLink: {
|
|
139
133
|
defaultMessage: string;
|
|
140
134
|
description: string;
|
|
141
|
-
};
|
|
142
|
-
datasourceAssetsObjectsGeneralAvailability: {
|
|
143
135
|
id: string;
|
|
136
|
+
};
|
|
137
|
+
inlineDescription: {
|
|
144
138
|
defaultMessage: string;
|
|
145
139
|
description: string;
|
|
146
|
-
};
|
|
147
|
-
datasourceAssetsObjectsDescription: {
|
|
148
140
|
id: string;
|
|
141
|
+
};
|
|
142
|
+
inlineGoToLink: {
|
|
149
143
|
defaultMessage: string;
|
|
150
144
|
description: string;
|
|
145
|
+
id: string;
|
|
151
146
|
};
|
|
152
147
|
inlineOverlay: {
|
|
153
|
-
id: string;
|
|
154
148
|
defaultMessage: string;
|
|
155
149
|
description: string;
|
|
156
|
-
};
|
|
157
|
-
inlineConfigureLink: {
|
|
158
150
|
id: string;
|
|
151
|
+
};
|
|
152
|
+
inlineTitle: {
|
|
159
153
|
defaultMessage: string;
|
|
160
154
|
description: string;
|
|
161
|
-
};
|
|
162
|
-
inlineGoToLink: {
|
|
163
155
|
id: string;
|
|
156
|
+
};
|
|
157
|
+
link: {
|
|
164
158
|
defaultMessage: string;
|
|
165
159
|
description: string;
|
|
166
|
-
};
|
|
167
|
-
datasourceConfluenceSearch: {
|
|
168
160
|
id: string;
|
|
161
|
+
};
|
|
162
|
+
openButtonTitle: {
|
|
169
163
|
defaultMessage: string;
|
|
170
164
|
description: string;
|
|
171
|
-
};
|
|
172
|
-
datasourceConfluenceSearchDescription: {
|
|
173
165
|
id: string;
|
|
166
|
+
};
|
|
167
|
+
panelButtonTitle: {
|
|
174
168
|
defaultMessage: string;
|
|
175
169
|
description: string;
|
|
170
|
+
id: string;
|
|
176
171
|
};
|
|
177
|
-
|
|
172
|
+
previewButtonTitle: {
|
|
173
|
+
defaultMessage: string;
|
|
174
|
+
description: string;
|
|
178
175
|
id: string;
|
|
176
|
+
};
|
|
177
|
+
url: {
|
|
179
178
|
defaultMessage: string;
|
|
180
179
|
description: string;
|
|
180
|
+
id: string;
|
|
181
181
|
};
|
|
182
|
-
|
|
182
|
+
urlDescription: {
|
|
183
|
+
defaultMessage: string;
|
|
184
|
+
description: string;
|
|
183
185
|
id: string;
|
|
186
|
+
};
|
|
187
|
+
urlTitle: {
|
|
184
188
|
defaultMessage: string;
|
|
185
189
|
description: string;
|
|
190
|
+
id: string;
|
|
186
191
|
};
|
|
187
192
|
};
|
|
@@ -154,6 +154,11 @@ export declare const toolbarInsertBlockMessages: {
|
|
|
154
154
|
description: string;
|
|
155
155
|
id: string;
|
|
156
156
|
};
|
|
157
|
+
loomTitle: {
|
|
158
|
+
defaultMessage: string;
|
|
159
|
+
description: string;
|
|
160
|
+
id: string;
|
|
161
|
+
};
|
|
157
162
|
mediaFiles: {
|
|
158
163
|
defaultMessage: string;
|
|
159
164
|
description: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "134.
|
|
3
|
+
"version": "134.4.0",
|
|
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/"
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"@atlaskit/editor-json-transformer": "^10.0.0",
|
|
46
46
|
"@atlaskit/editor-palette": "^3.5.0",
|
|
47
47
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
48
|
-
"@atlaskit/editor-shared-styles": "^
|
|
48
|
+
"@atlaskit/editor-shared-styles": "^5.0.0",
|
|
49
49
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
50
50
|
"@atlaskit/editor-toolbar": "^2.8.0",
|
|
51
51
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
52
52
|
"@atlaskit/editor-ui-control-model": "^3.0.0",
|
|
53
53
|
"@atlaskit/emoji": "^73.3.0",
|
|
54
|
-
"@atlaskit/feature-gate-js-client": "^
|
|
54
|
+
"@atlaskit/feature-gate-js-client": "^8.0.0",
|
|
55
55
|
"@atlaskit/icon": "^38.0.0",
|
|
56
56
|
"@atlaskit/link": "^5.1.0",
|
|
57
|
-
"@atlaskit/link-datasource": "^7.
|
|
58
|
-
"@atlaskit/link-picker": "^6.
|
|
57
|
+
"@atlaskit/link-datasource": "^7.11.0",
|
|
58
|
+
"@atlaskit/link-picker": "^6.19.0",
|
|
59
59
|
"@atlaskit/logo": "^23.3.0",
|
|
60
60
|
"@atlaskit/media-card": "^82.2.0",
|
|
61
61
|
"@atlaskit/media-client": "^39.3.0",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
80
80
|
"@atlaskit/react-ufo": "^8.3.0",
|
|
81
81
|
"@atlaskit/section-message": "^10.2.0",
|
|
82
|
-
"@atlaskit/smart-card": "^46.
|
|
83
|
-
"@atlaskit/smart-user-picker": "^12.
|
|
82
|
+
"@atlaskit/smart-card": "^46.12.0",
|
|
83
|
+
"@atlaskit/smart-user-picker": "^12.10.0",
|
|
84
84
|
"@atlaskit/spinner": "^20.4.0",
|
|
85
85
|
"@atlaskit/task-decision": "^21.14.0",
|
|
86
86
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = cellSizeAndPositionGetter;
|
|
7
|
-
var _constants = require("../../constants");
|
|
8
|
-
var _utils = require("./utils");
|
|
9
|
-
/**
|
|
10
|
-
* Callback responsible for returning size and offset/position information
|
|
11
|
-
* for a given cell.
|
|
12
|
-
* https://github.com/bvaughn/react-virtualized/blob/master/docs/Collection.md
|
|
13
|
-
**/
|
|
14
|
-
function cellSizeAndPositionGetter(containerWidth, scrollbarWidth) {
|
|
15
|
-
var GUTTER_SIZE = 4;
|
|
16
|
-
/**
|
|
17
|
-
* Save the currently rendered columnY positions.
|
|
18
|
-
* Have to be within the current render scope.
|
|
19
|
-
*/
|
|
20
|
-
var columnYMap = [];
|
|
21
|
-
return function (_ref) {
|
|
22
|
-
var index = _ref.index;
|
|
23
|
-
var _generateVirtualizedC = (0, _utils.generateVirtualizedContainerDatum)(containerWidth, {
|
|
24
|
-
gutterSize: GUTTER_SIZE,
|
|
25
|
-
scrollbarWidth: scrollbarWidth
|
|
26
|
-
}),
|
|
27
|
-
columnCount = _generateVirtualizedC.columnCount,
|
|
28
|
-
availableWidth = _generateVirtualizedC.availableWidth;
|
|
29
|
-
var width = Math.floor(availableWidth / columnCount);
|
|
30
|
-
var height = _constants.ELEMENT_ITEM_HEIGHT;
|
|
31
|
-
var columnPosition = index % (columnCount || 1);
|
|
32
|
-
var x = columnPosition * width;
|
|
33
|
-
var y = columnYMap[columnPosition] || 0;
|
|
34
|
-
columnYMap[columnPosition] = y + height;
|
|
35
|
-
return {
|
|
36
|
-
height: height,
|
|
37
|
-
width: width,
|
|
38
|
-
x: x,
|
|
39
|
-
y: y
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.isNodeTypeValidChildOf = isNodeTypeValidChildOf;
|
|
7
|
-
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
8
|
-
/**
|
|
9
|
-
* Checks if a node type is a valid child of a parent node by creating a minimal valid
|
|
10
|
-
* instance and validating it against the parent's content expression. Unlike ProseMirror's
|
|
11
|
-
* canReplaceWith, this checks general type compatibility without requiring a specific insertion index.
|
|
12
|
-
*/
|
|
13
|
-
function isNodeTypeValidChildOf(childTypeName, parentNode, schema) {
|
|
14
|
-
var childType = schema.nodes[childTypeName];
|
|
15
|
-
if (!childType) {
|
|
16
|
-
return false;
|
|
17
|
-
}
|
|
18
|
-
var candidate = childType.createAndFill();
|
|
19
|
-
if (!candidate) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
return parentNode.type.validContent(_model.Fragment.from(candidate));
|
|
23
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ELEMENT_ITEM_HEIGHT } from '../../constants';
|
|
2
|
-
import { generateVirtualizedContainerDatum } from './utils';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Callback responsible for returning size and offset/position information
|
|
6
|
-
* for a given cell.
|
|
7
|
-
* https://github.com/bvaughn/react-virtualized/blob/master/docs/Collection.md
|
|
8
|
-
**/
|
|
9
|
-
export default function cellSizeAndPositionGetter(containerWidth, scrollbarWidth) {
|
|
10
|
-
const GUTTER_SIZE = 4;
|
|
11
|
-
/**
|
|
12
|
-
* Save the currently rendered columnY positions.
|
|
13
|
-
* Have to be within the current render scope.
|
|
14
|
-
*/
|
|
15
|
-
const columnYMap = [];
|
|
16
|
-
return ({
|
|
17
|
-
index
|
|
18
|
-
}) => {
|
|
19
|
-
const {
|
|
20
|
-
columnCount,
|
|
21
|
-
availableWidth
|
|
22
|
-
} = generateVirtualizedContainerDatum(containerWidth, {
|
|
23
|
-
gutterSize: GUTTER_SIZE,
|
|
24
|
-
scrollbarWidth
|
|
25
|
-
});
|
|
26
|
-
const width = Math.floor(availableWidth / columnCount);
|
|
27
|
-
const height = ELEMENT_ITEM_HEIGHT;
|
|
28
|
-
const columnPosition = index % (columnCount || 1);
|
|
29
|
-
const x = columnPosition * width;
|
|
30
|
-
const y = columnYMap[columnPosition] || 0;
|
|
31
|
-
columnYMap[columnPosition] = y + height;
|
|
32
|
-
return {
|
|
33
|
-
height,
|
|
34
|
-
width,
|
|
35
|
-
x,
|
|
36
|
-
y
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
/**
|
|
3
|
-
* Checks if a node type is a valid child of a parent node by creating a minimal valid
|
|
4
|
-
* instance and validating it against the parent's content expression. Unlike ProseMirror's
|
|
5
|
-
* canReplaceWith, this checks general type compatibility without requiring a specific insertion index.
|
|
6
|
-
*/
|
|
7
|
-
export function isNodeTypeValidChildOf(childTypeName, parentNode, schema) {
|
|
8
|
-
const childType = schema.nodes[childTypeName];
|
|
9
|
-
if (!childType) {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
const candidate = childType.createAndFill();
|
|
13
|
-
if (!candidate) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
return parentNode.type.validContent(Fragment.from(candidate));
|
|
17
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ELEMENT_ITEM_HEIGHT } from '../../constants';
|
|
2
|
-
import { generateVirtualizedContainerDatum } from './utils';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Callback responsible for returning size and offset/position information
|
|
6
|
-
* for a given cell.
|
|
7
|
-
* https://github.com/bvaughn/react-virtualized/blob/master/docs/Collection.md
|
|
8
|
-
**/
|
|
9
|
-
export default function cellSizeAndPositionGetter(containerWidth, scrollbarWidth) {
|
|
10
|
-
var GUTTER_SIZE = 4;
|
|
11
|
-
/**
|
|
12
|
-
* Save the currently rendered columnY positions.
|
|
13
|
-
* Have to be within the current render scope.
|
|
14
|
-
*/
|
|
15
|
-
var columnYMap = [];
|
|
16
|
-
return function (_ref) {
|
|
17
|
-
var index = _ref.index;
|
|
18
|
-
var _generateVirtualizedC = generateVirtualizedContainerDatum(containerWidth, {
|
|
19
|
-
gutterSize: GUTTER_SIZE,
|
|
20
|
-
scrollbarWidth: scrollbarWidth
|
|
21
|
-
}),
|
|
22
|
-
columnCount = _generateVirtualizedC.columnCount,
|
|
23
|
-
availableWidth = _generateVirtualizedC.availableWidth;
|
|
24
|
-
var width = Math.floor(availableWidth / columnCount);
|
|
25
|
-
var height = ELEMENT_ITEM_HEIGHT;
|
|
26
|
-
var columnPosition = index % (columnCount || 1);
|
|
27
|
-
var x = columnPosition * width;
|
|
28
|
-
var y = columnYMap[columnPosition] || 0;
|
|
29
|
-
columnYMap[columnPosition] = y + height;
|
|
30
|
-
return {
|
|
31
|
-
height: height,
|
|
32
|
-
width: width,
|
|
33
|
-
x: x,
|
|
34
|
-
y: y
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
/**
|
|
3
|
-
* Checks if a node type is a valid child of a parent node by creating a minimal valid
|
|
4
|
-
* instance and validating it against the parent's content expression. Unlike ProseMirror's
|
|
5
|
-
* canReplaceWith, this checks general type compatibility without requiring a specific insertion index.
|
|
6
|
-
*/
|
|
7
|
-
export function isNodeTypeValidChildOf(childTypeName, parentNode, schema) {
|
|
8
|
-
var childType = schema.nodes[childTypeName];
|
|
9
|
-
if (!childType) {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
var candidate = childType.createAndFill();
|
|
13
|
-
if (!candidate) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
return parentNode.type.validContent(Fragment.from(candidate));
|
|
17
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { CollectionCellSizeAndPositionGetter } from 'react-virtualized/dist/commonjs/Collection';
|
|
2
|
-
/**
|
|
3
|
-
* Callback responsible for returning size and offset/position information
|
|
4
|
-
* for a given cell.
|
|
5
|
-
* https://github.com/bvaughn/react-virtualized/blob/master/docs/Collection.md
|
|
6
|
-
**/
|
|
7
|
-
export default function cellSizeAndPositionGetter(containerWidth: number, scrollbarWidth: number): CollectionCellSizeAndPositionGetter;
|
|
File without changes
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
/**
|
|
3
|
-
* Checks if a node type is a valid child of a parent node by creating a minimal valid
|
|
4
|
-
* instance and validating it against the parent's content expression. Unlike ProseMirror's
|
|
5
|
-
* canReplaceWith, this checks general type compatibility without requiring a specific insertion index.
|
|
6
|
-
*/
|
|
7
|
-
export declare function isNodeTypeValidChildOf(childTypeName: string, parentNode: PMNode, schema: Schema): boolean;
|