@atlaskit/editor-common 99.6.0 → 99.7.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/link/LinkSearch/index.js +1 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +75 -19
- package/dist/cjs/react-node-view/onVisibleObserverFactory.js +48 -0
- package/dist/cjs/safe-plugin/index.js +1 -2
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/WithCreateAnalyticsEvent/index.js +1 -0
- package/dist/cjs/utils/compare-props.js +2 -2
- package/dist/cjs/utils/compareNodes.js +2 -2
- package/dist/cjs/utils/filter/privacy-filter.js +3 -3
- package/dist/cjs/utils/index.js +6 -6
- package/dist/cjs/utils/performance/measure-tti.js +3 -3
- package/dist/cjs/utils/track-unsupported-content.js +2 -2
- package/dist/cjs/utils/validator.js +3 -3
- package/dist/cjs/with-plugin-state/index.js +1 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +79 -20
- package/dist/es2019/react-node-view/onVisibleObserverFactory.js +31 -0
- package/dist/es2019/safe-plugin/index.js +1 -2
- package/dist/es2019/styles/shared/table.js +2 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/link/LinkSearch/index.js +1 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +75 -19
- package/dist/esm/react-node-view/onVisibleObserverFactory.js +41 -0
- package/dist/esm/safe-plugin/index.js +1 -2
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/WithCreateAnalyticsEvent/index.js +1 -0
- package/dist/esm/utils/compare-props.js +3 -2
- package/dist/esm/utils/compareNodes.js +2 -2
- package/dist/esm/utils/filter/privacy-filter.js +3 -3
- package/dist/esm/utils/index.js +6 -6
- package/dist/esm/utils/performance/measure-tti.js +3 -3
- package/dist/esm/utils/track-unsupported-content.js +3 -2
- package/dist/esm/utils/validator.js +3 -3
- package/dist/esm/with-plugin-state/index.js +1 -0
- package/dist/types/react-node-view/onVisibleObserverFactory.d.ts +8 -0
- package/dist/types-ts4.5/react-node-view/onVisibleObserverFactory.d.ts +8 -0
- package/package.json +8 -5
|
@@ -29,7 +29,7 @@ export function measureTTI(onMeasureComplete) {
|
|
|
29
29
|
observer.observe({
|
|
30
30
|
entryTypes: ['longtask']
|
|
31
31
|
});
|
|
32
|
-
var
|
|
32
|
+
var _checkIdle = function checkIdle() {
|
|
33
33
|
// 1. There hasn't been any long task in `idleThreshold` time: Interactive from the start.
|
|
34
34
|
// 2. Only 1 long task: Interactive from the end of the only long task.
|
|
35
35
|
// 3. Several long tasks:
|
|
@@ -54,9 +54,9 @@ export function measureTTI(onMeasureComplete) {
|
|
|
54
54
|
distortedDurationMonitor.cleanup();
|
|
55
55
|
return onMeasureComplete(lastEnd, lastEnd - start, canceled, distortedDurationMonitor.distortedDuration);
|
|
56
56
|
}
|
|
57
|
-
return setTimeout(
|
|
57
|
+
return setTimeout(_checkIdle, idleThreshold);
|
|
58
58
|
};
|
|
59
|
-
setTimeout(
|
|
59
|
+
setTimeout(_checkIdle, idleThreshold);
|
|
60
60
|
}
|
|
61
61
|
export var TTI_SEVERITY_THRESHOLD_DEFAULTS = {
|
|
62
62
|
NORMAL: 40000,
|
|
@@ -51,7 +51,7 @@ var trackUnsupportedContentTooltipActionFor = function trackUnsupportedContentTo
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
var _findAndTrackUnsupportedContentNodes = function findAndTrackUnsupportedContentNodes(node, schema, dispatchAnalyticsEvent) {
|
|
55
55
|
var ancestorHierarchy = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
|
56
56
|
var nodeType = node.type,
|
|
57
57
|
nodeMarks = node.marks;
|
|
@@ -112,10 +112,11 @@ export var findAndTrackUnsupportedContentNodes = function findAndTrackUnsupporte
|
|
|
112
112
|
} else {
|
|
113
113
|
// Recursive check for nested content
|
|
114
114
|
node.content.forEach(function (childNode) {
|
|
115
|
-
return
|
|
115
|
+
return _findAndTrackUnsupportedContentNodes(childNode, schema, dispatchAnalyticsEvent, concatAncestorHierarchy(node, ancestorHierarchy));
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
+
export { _findAndTrackUnsupportedContentNodes as findAndTrackUnsupportedContentNodes };
|
|
119
120
|
export var fireUnsupportedEvent = function fireUnsupportedEvent(dispatchAnalyticsEvent, actionSubjectId, unsupportedNode, errorCode) {
|
|
120
121
|
var sanitizedAttrs = sanitizeAttributes(unsupportedNode.attrs);
|
|
121
122
|
var sanitizedMarks = sanitizeMarks(unsupportedNode.marks);
|
|
@@ -95,7 +95,7 @@ var RELATIVE_LINK = /^\//;
|
|
|
95
95
|
// Ignored via go/ees005
|
|
96
96
|
// eslint-disable-next-line require-unicode-regexp
|
|
97
97
|
var ANCHOR_LINK = /^#/;
|
|
98
|
-
var
|
|
98
|
+
var _flattenUnknownBlockTree = function flattenUnknownBlockTree(node) {
|
|
99
99
|
var schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultSchema;
|
|
100
100
|
var adfStage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'final';
|
|
101
101
|
var output = [];
|
|
@@ -123,7 +123,7 @@ var flattenUnknownBlockTree = function flattenUnknownBlockTree(node) {
|
|
|
123
123
|
if (isLeafNode) {
|
|
124
124
|
output.push(getValidNode(childNode, schema, adfStage));
|
|
125
125
|
} else {
|
|
126
|
-
output.push.apply(output, _toConsumableArray(
|
|
126
|
+
output.push.apply(output, _toConsumableArray(_flattenUnknownBlockTree(childNode, schema, adfStage)));
|
|
127
127
|
}
|
|
128
128
|
isPrevLeafNode = isLeafNode;
|
|
129
129
|
}
|
|
@@ -165,7 +165,7 @@ export var getValidUnknownNode = function getValidUnknownNode(node) {
|
|
|
165
165
|
*/
|
|
166
166
|
return {
|
|
167
167
|
type: 'unknownBlock',
|
|
168
|
-
content:
|
|
168
|
+
content: _flattenUnknownBlockTree(node)
|
|
169
169
|
};
|
|
170
170
|
};
|
|
171
171
|
var getValidMarks = function getValidMarks(marks) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
+
type RemoveObserver = () => unknown;
|
|
3
|
+
type OnVisibleCallback = () => unknown;
|
|
4
|
+
type OnVisibleObserver = {
|
|
5
|
+
observe: (el: HTMLElement, callback: OnVisibleCallback) => RemoveObserver;
|
|
6
|
+
};
|
|
7
|
+
export declare const getOrCreateOnVisibleObserver: ((view: EditorView) => OnVisibleObserver) & import("lodash").MemoizedFunction;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
+
type RemoveObserver = () => unknown;
|
|
3
|
+
type OnVisibleCallback = () => unknown;
|
|
4
|
+
type OnVisibleObserver = {
|
|
5
|
+
observe: (el: HTMLElement, callback: OnVisibleCallback) => RemoveObserver;
|
|
6
|
+
};
|
|
7
|
+
export declare const getOrCreateOnVisibleObserver: ((view: EditorView) => OnVisibleObserver) & import("lodash").MemoizedFunction;
|
|
8
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "99.
|
|
3
|
+
"version": "99.7.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/"
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"@atlaskit/media-file-preview": "^0.10.0",
|
|
142
142
|
"@atlaskit/media-picker": "^67.1.0",
|
|
143
143
|
"@atlaskit/media-ui": "^27.4.0",
|
|
144
|
-
"@atlaskit/media-viewer": "50.1.
|
|
144
|
+
"@atlaskit/media-viewer": "50.1.1",
|
|
145
145
|
"@atlaskit/mention": "^23.11.0",
|
|
146
146
|
"@atlaskit/menu": "^2.14.0",
|
|
147
147
|
"@atlaskit/onboarding": "^12.3.0",
|
|
@@ -234,9 +234,6 @@
|
|
|
234
234
|
"platform_editor_media_extended_resize_experience": {
|
|
235
235
|
"type": "boolean"
|
|
236
236
|
},
|
|
237
|
-
"platform_editor_breakout_use_css": {
|
|
238
|
-
"type": "boolean"
|
|
239
|
-
},
|
|
240
237
|
"linking_platform_datasource_assets_objects": {
|
|
241
238
|
"type": "boolean"
|
|
242
239
|
},
|
|
@@ -267,6 +264,9 @@
|
|
|
267
264
|
"platform_editor_typography_ugc": {
|
|
268
265
|
"type": "boolean"
|
|
269
266
|
},
|
|
267
|
+
"platform_editor_lego__inline_node_virtualization": {
|
|
268
|
+
"type": "boolean"
|
|
269
|
+
},
|
|
270
270
|
"platform_editor_heading_margin_fix": {
|
|
271
271
|
"type": "boolean"
|
|
272
272
|
},
|
|
@@ -314,6 +314,9 @@
|
|
|
314
314
|
},
|
|
315
315
|
"platform_renderer_table_sort_btn_aria_hidden": {
|
|
316
316
|
"type": "boolean"
|
|
317
|
+
},
|
|
318
|
+
"platform_editor_renderer_table_header_styles": {
|
|
319
|
+
"type": "boolean"
|
|
317
320
|
}
|
|
318
321
|
}
|
|
319
322
|
}
|