@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.
Files changed (42) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/link/LinkSearch/index.js +1 -0
  3. package/dist/cjs/monitoring/error.js +1 -1
  4. package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +75 -19
  5. package/dist/cjs/react-node-view/onVisibleObserverFactory.js +48 -0
  6. package/dist/cjs/safe-plugin/index.js +1 -2
  7. package/dist/cjs/styles/shared/table.js +1 -1
  8. package/dist/cjs/ui/DropList/index.js +1 -1
  9. package/dist/cjs/ui/WithCreateAnalyticsEvent/index.js +1 -0
  10. package/dist/cjs/utils/compare-props.js +2 -2
  11. package/dist/cjs/utils/compareNodes.js +2 -2
  12. package/dist/cjs/utils/filter/privacy-filter.js +3 -3
  13. package/dist/cjs/utils/index.js +6 -6
  14. package/dist/cjs/utils/performance/measure-tti.js +3 -3
  15. package/dist/cjs/utils/track-unsupported-content.js +2 -2
  16. package/dist/cjs/utils/validator.js +3 -3
  17. package/dist/cjs/with-plugin-state/index.js +1 -0
  18. package/dist/es2019/monitoring/error.js +1 -1
  19. package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +79 -20
  20. package/dist/es2019/react-node-view/onVisibleObserverFactory.js +31 -0
  21. package/dist/es2019/safe-plugin/index.js +1 -2
  22. package/dist/es2019/styles/shared/table.js +2 -2
  23. package/dist/es2019/ui/DropList/index.js +1 -1
  24. package/dist/esm/link/LinkSearch/index.js +1 -0
  25. package/dist/esm/monitoring/error.js +1 -1
  26. package/dist/esm/react-node-view/getInlineNodeViewProducer.js +75 -19
  27. package/dist/esm/react-node-view/onVisibleObserverFactory.js +41 -0
  28. package/dist/esm/safe-plugin/index.js +1 -2
  29. package/dist/esm/styles/shared/table.js +1 -1
  30. package/dist/esm/ui/DropList/index.js +1 -1
  31. package/dist/esm/ui/WithCreateAnalyticsEvent/index.js +1 -0
  32. package/dist/esm/utils/compare-props.js +3 -2
  33. package/dist/esm/utils/compareNodes.js +2 -2
  34. package/dist/esm/utils/filter/privacy-filter.js +3 -3
  35. package/dist/esm/utils/index.js +6 -6
  36. package/dist/esm/utils/performance/measure-tti.js +3 -3
  37. package/dist/esm/utils/track-unsupported-content.js +3 -2
  38. package/dist/esm/utils/validator.js +3 -3
  39. package/dist/esm/with-plugin-state/index.js +1 -0
  40. package/dist/types/react-node-view/onVisibleObserverFactory.d.ts +8 -0
  41. package/dist/types-ts4.5/react-node-view/onVisibleObserverFactory.d.ts +8 -0
  42. 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 checkIdle = function checkIdle() {
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(checkIdle, idleThreshold);
57
+ return setTimeout(_checkIdle, idleThreshold);
58
58
  };
59
- setTimeout(checkIdle, idleThreshold);
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
- export var findAndTrackUnsupportedContentNodes = function findAndTrackUnsupportedContentNodes(node, schema, dispatchAnalyticsEvent) {
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 findAndTrackUnsupportedContentNodes(childNode, schema, dispatchAnalyticsEvent, concatAncestorHierarchy(node, ancestorHierarchy));
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 flattenUnknownBlockTree = function flattenUnknownBlockTree(node) {
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(flattenUnknownBlockTree(childNode, schema, adfStage)));
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: flattenUnknownBlockTree(node)
168
+ content: _flattenUnknownBlockTree(node)
169
169
  };
170
170
  };
171
171
  var getValidMarks = function getValidMarks(marks) {
@@ -1,3 +1,4 @@
1
+ import _readOnlyError from "@babel/runtime/helpers/readOnlyError";
1
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
3
  import _extends from "@babel/runtime/helpers/extends";
3
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
@@ -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.6.0",
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.0",
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
  }