@atlaskit/editor-common 128.3.2 → 128.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 +31 -0
- package/block-node-badges/package.json +10 -0
- package/dist/cjs/analytics/types/enums.js +0 -12
- package/dist/cjs/block-node-badges.js +98 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +20 -2
- package/dist/cjs/extensibility/Extension/ExtensionCommentBadge.js +110 -0
- package/dist/cjs/media-single/MediaBadges.js +12 -85
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +0 -13
- package/dist/cjs/react-node-view/index.js +0 -14
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/index.js +0 -47
- package/dist/es2019/analytics/types/enums.js +0 -12
- package/dist/es2019/block-node-badges.js +84 -0
- package/dist/es2019/extensibility/Extension/Extension/index.js +17 -3
- package/dist/es2019/extensibility/Extension/ExtensionCommentBadge.js +60 -0
- package/dist/es2019/media-single/MediaBadges.js +12 -79
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +1 -15
- package/dist/es2019/react-node-view/index.js +0 -15
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/index.js +0 -5
- package/dist/esm/analytics/types/enums.js +0 -12
- package/dist/esm/block-node-badges.js +88 -0
- package/dist/esm/extensibility/Extension/Extension/index.js +21 -3
- package/dist/esm/extensibility/Extension/ExtensionCommentBadge.js +101 -0
- package/dist/esm/media-single/MediaBadges.js +12 -82
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +1 -14
- package/dist/esm/react-node-view/index.js +0 -14
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/index.js +0 -5
- package/dist/types/analytics/index.d.ts +1 -2
- package/dist/types/analytics/types/enums.d.ts +0 -12
- package/dist/types/analytics/types/events.d.ts +1 -3
- package/dist/types/analytics/types/general-events.d.ts +2 -15
- package/dist/types/block-node-badges.d.ts +14 -0
- package/dist/types/extensibility/Extension/ExtensionCommentBadge.d.ts +8 -0
- package/dist/types/extensibility/types.d.ts +29 -2
- package/dist/types/media-single/MediaBadges.d.ts +4 -8
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/performance-tracking.d.ts +0 -22
- package/dist/types/utils/index.d.ts +0 -5
- package/package.json +5 -1
- package/analytics/types/performance-report/package.json +0 -10
- package/dist/cjs/analytics/types/performance-report.js +0 -1
- package/dist/cjs/utils/get-performance-options.js +0 -65
- package/dist/cjs/utils/performance/TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS.js +0 -10
- package/dist/cjs/utils/performance/TTI_SEVERITY_THRESHOLD_DEFAULTS.js +0 -10
- package/dist/cjs/utils/performance/measure-tti.js +0 -112
- package/dist/cjs/utils/startMeasureReactNodeViewRendered.js +0 -11
- package/dist/es2019/analytics/types/performance-report.js +0 -0
- package/dist/es2019/utils/get-performance-options.js +0 -54
- package/dist/es2019/utils/performance/TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS.js +0 -4
- package/dist/es2019/utils/performance/TTI_SEVERITY_THRESHOLD_DEFAULTS.js +0 -4
- package/dist/es2019/utils/performance/measure-tti.js +0 -91
- package/dist/es2019/utils/startMeasureReactNodeViewRendered.js +0 -6
- package/dist/esm/analytics/types/performance-report.js +0 -0
- package/dist/esm/utils/get-performance-options.js +0 -53
- package/dist/esm/utils/performance/TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS.js +0 -4
- package/dist/esm/utils/performance/TTI_SEVERITY_THRESHOLD_DEFAULTS.js +0 -4
- package/dist/esm/utils/performance/measure-tti.js +0 -94
- package/dist/esm/utils/startMeasureReactNodeViewRendered.js +0 -5
- package/dist/types/analytics/types/performance-report.d.ts +0 -24
- package/dist/types/utils/get-performance-options.d.ts +0 -14
- package/dist/types/utils/performance/TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS.d.ts +0 -4
- package/dist/types/utils/performance/TTI_SEVERITY_THRESHOLD_DEFAULTS.d.ts +0 -4
- package/dist/types/utils/performance/measure-tti.d.ts +0 -8
- package/dist/types/utils/startMeasureReactNodeViewRendered.d.ts +0 -3
- package/performance/measure-tti/package.json +0 -10
- package/utils/get-performance-options/package.json +0 -10
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
+
import React, { useCallback, useMemo } from 'react';
|
|
4
|
+
import { VIEW_METHOD } from '../../analytics';
|
|
5
|
+
import { BlockNodeBadges } from '../../block-node-badges';
|
|
6
|
+
import { useSharedPluginStateWithSelector } from '../../hooks';
|
|
7
|
+
import { CommentBadgeNext } from '../../media-single/CommentBadgeNext';
|
|
8
|
+
// Owned by the extension node view, like media's badge. Annotation updates only
|
|
9
|
+
// render this sibling of the extension content; they never reparent its iframe.
|
|
10
|
+
export var ExtensionCommentBadge = function ExtensionCommentBadge(_ref) {
|
|
11
|
+
var _api$annotation4;
|
|
12
|
+
var api = _ref.api,
|
|
13
|
+
editorView = _ref.editorView,
|
|
14
|
+
node = _ref.node,
|
|
15
|
+
getPos = _ref.getPos,
|
|
16
|
+
container = _ref.container;
|
|
17
|
+
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['annotation'], function (states) {
|
|
18
|
+
return {
|
|
19
|
+
annotationState: states.annotationState
|
|
20
|
+
};
|
|
21
|
+
}),
|
|
22
|
+
annotationState = _useSharedPluginState.annotationState;
|
|
23
|
+
var drafting = Boolean((annotationState === null || annotationState === void 0 ? void 0 : annotationState.isDrafting) && node.attrs.localId && node.attrs.localId === annotationState.targetNodeId);
|
|
24
|
+
var hasOpenDraft = Boolean(annotationState === null || annotationState === void 0 ? void 0 : annotationState.isDrafting);
|
|
25
|
+
var unresolvedIds = useMemo(function () {
|
|
26
|
+
return node.marks.filter(function (mark) {
|
|
27
|
+
return mark.type.name === 'annotation' && (annotationState === null || annotationState === void 0 ? void 0 : annotationState.annotations[mark.attrs.id]) === false;
|
|
28
|
+
}).map(function (mark) {
|
|
29
|
+
return mark.attrs.id;
|
|
30
|
+
});
|
|
31
|
+
}, [node.marks, annotationState === null || annotationState === void 0 ? void 0 : annotationState.annotations]);
|
|
32
|
+
var onClick = useCallback( /*#__PURE__*/function () {
|
|
33
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(event) {
|
|
34
|
+
var _api$annotation, _api$annotation2;
|
|
35
|
+
var pos, currentNode, _api$annotation3, _t;
|
|
36
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
37
|
+
while (1) switch (_context.prev = _context.next) {
|
|
38
|
+
case 0:
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
event.stopPropagation();
|
|
41
|
+
if (!drafting) {
|
|
42
|
+
_context.next = 1;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
return _context.abrupt("return");
|
|
46
|
+
case 1:
|
|
47
|
+
_t = hasOpenDraft;
|
|
48
|
+
if (!_t) {
|
|
49
|
+
_context.next = 3;
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
_context.next = 2;
|
|
53
|
+
return api === null || api === void 0 || (_api$annotation = api.annotation) === null || _api$annotation === void 0 ? void 0 : _api$annotation.actions.requestCloseInlineComment();
|
|
54
|
+
case 2:
|
|
55
|
+
_t = !_context.sent;
|
|
56
|
+
case 3:
|
|
57
|
+
if (!_t) {
|
|
58
|
+
_context.next = 4;
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
return _context.abrupt("return");
|
|
62
|
+
case 4:
|
|
63
|
+
// Resolve the current position after the asynchronous discard confirmation.
|
|
64
|
+
pos = getPos();
|
|
65
|
+
if (!(typeof pos !== 'number' || !Number.isFinite(pos) || pos < 0 || pos >= editorView.state.doc.content.size)) {
|
|
66
|
+
_context.next = 5;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
return _context.abrupt("return");
|
|
70
|
+
case 5:
|
|
71
|
+
currentNode = editorView.state.doc.nodeAt(pos);
|
|
72
|
+
if ((currentNode === null || currentNode === void 0 ? void 0 : currentNode.type) === node.type && currentNode.attrs.localId === node.attrs.localId && api !== null && api !== void 0 && (_api$annotation2 = api.annotation) !== null && _api$annotation2 !== void 0 && _api$annotation2.actions.isBlockNodeSupported(currentNode)) {
|
|
73
|
+
api === null || api === void 0 || (_api$annotation3 = api.annotation) === null || _api$annotation3 === void 0 || _api$annotation3.actions.showCommentForBlockNode(currentNode, VIEW_METHOD.BADGE)(editorView.state, editorView.dispatch);
|
|
74
|
+
}
|
|
75
|
+
case 6:
|
|
76
|
+
case "end":
|
|
77
|
+
return _context.stop();
|
|
78
|
+
}
|
|
79
|
+
}, _callee);
|
|
80
|
+
}));
|
|
81
|
+
return function (_x) {
|
|
82
|
+
return _ref2.apply(this, arguments);
|
|
83
|
+
};
|
|
84
|
+
}(), [api, editorView, node, getPos, drafting, hasOpenDraft]);
|
|
85
|
+
if (!(annotationState !== null && annotationState !== void 0 && annotationState.isVisible) || node.type.name !== 'extension' || !(api !== null && api !== void 0 && (_api$annotation4 = api.annotation) !== null && _api$annotation4 !== void 0 && _api$annotation4.actions.isBlockNodeSupported(node))) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
if (!drafting && !unresolvedIds.length) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
var active = drafting || !annotationState.isInlineCommentViewClosed && annotationState.selectedAnnotations.some(function (_ref3) {
|
|
92
|
+
var id = _ref3.id;
|
|
93
|
+
return unresolvedIds.includes(id);
|
|
94
|
+
});
|
|
95
|
+
return /*#__PURE__*/React.createElement(BlockNodeBadges, {
|
|
96
|
+
element: container
|
|
97
|
+
}, /*#__PURE__*/React.createElement(CommentBadgeNext, {
|
|
98
|
+
onClick: onClick,
|
|
99
|
+
status: active ? 'active' : 'default'
|
|
100
|
+
}));
|
|
101
|
+
};
|
|
@@ -1,88 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
|
-
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
6
|
-
import { Box, xcss } from '@atlaskit/primitives';
|
|
7
|
-
var MEDIA_BADGE_VISIBILITY_BREAKPOINT = 200;
|
|
8
|
-
var containerStyles = xcss({
|
|
9
|
-
display: 'flex',
|
|
10
|
-
position: 'absolute',
|
|
11
|
-
top: 'space.0',
|
|
12
|
-
right: 'space.0',
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
14
|
-
lineHeight: "var(--ds-space-200, 16px)",
|
|
15
|
-
gap: 'space.025',
|
|
16
|
-
zIndex: 'card',
|
|
17
|
-
height: 'fit-content',
|
|
18
|
-
width: 'fit-content',
|
|
19
|
-
margin: 'space.075'
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
// The above styles are used for both editor and renderer, and in renderer the
|
|
23
|
-
// document body is the main scroll area. This means it overscrolls the primary
|
|
24
|
-
// toolbar, where the z-index is "2". We have to hack in our own z-index less
|
|
25
|
-
// than that to ensure our badge appears under the toolbar when scrolled.
|
|
26
|
-
var hackedZIndexStyles = xcss({
|
|
27
|
-
zIndex: '1'
|
|
28
|
-
});
|
|
29
|
-
var resizeOffsetStyles = xcss({
|
|
30
|
-
right: 'space.150'
|
|
31
|
-
});
|
|
32
|
-
var getBadgeVisible = function getBadgeVisible(width, height) {
|
|
33
|
-
return width && width < MEDIA_BADGE_VISIBILITY_BREAKPOINT || height && height < MEDIA_BADGE_VISIBILITY_BREAKPOINT ? false : true;
|
|
34
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BlockNodeBadges } from '../block-node-badges';
|
|
3
|
+
/** Compatibility wrapper for existing media consumers of BlockNodeBadges. */
|
|
35
4
|
export var MediaBadges = function MediaBadges(_ref) {
|
|
36
|
-
var
|
|
37
|
-
mediaElement = _ref.mediaElement,
|
|
5
|
+
var mediaElement = _ref.mediaElement,
|
|
38
6
|
mediaWidth = _ref.mediaWidth,
|
|
39
7
|
mediaHeight = _ref.mediaHeight,
|
|
8
|
+
children = _ref.children,
|
|
40
9
|
extendedResizeOffset = _ref.extendedResizeOffset,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var observer = new ResizeObserver(debounce(function (entries) {
|
|
49
|
-
var _entries = _slicedToArray(entries, 1),
|
|
50
|
-
entry = _entries[0];
|
|
51
|
-
var _entry$contentRect = entry.contentRect,
|
|
52
|
-
width = _entry$contentRect.width,
|
|
53
|
-
height = _entry$contentRect.height;
|
|
54
|
-
setVisible(getBadgeVisible(width, height));
|
|
55
|
-
}));
|
|
56
|
-
if (mediaElement) {
|
|
57
|
-
// Ignored via go/ees005
|
|
58
|
-
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
59
|
-
observer.observe(mediaElement);
|
|
60
|
-
}
|
|
61
|
-
return function () {
|
|
62
|
-
observer.disconnect();
|
|
63
|
-
};
|
|
64
|
-
}, [mediaElement]);
|
|
65
|
-
if (typeof children === 'function') {
|
|
66
|
-
children = children({
|
|
67
|
-
visible: visible
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// delete this block on cleanup of media-perf-uplift-mutation-fix
|
|
72
|
-
if (!fg('media-perf-uplift-mutation-fix')) {
|
|
73
|
-
// becuase it is wrapped in a fragment, React.Children.count(children) will always be 1.
|
|
74
|
-
// That makes this check a source of late mutations that we don't need.
|
|
75
|
-
if (!mediaElement || React.Children.count(children) === 0) {
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
80
|
-
as: "div",
|
|
81
|
-
testId: "media-badges",
|
|
82
|
-
"data-media-badges": "true",
|
|
83
|
-
contentEditable: false
|
|
84
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
85
|
-
,
|
|
86
|
-
xcss: [containerStyles, useMinimumZIndex && hackedZIndexStyles, extendedResizeOffset && resizeOffsetStyles]
|
|
10
|
+
useMinimumZIndex = _ref.useMinimumZIndex;
|
|
11
|
+
return /*#__PURE__*/React.createElement(BlockNodeBadges, {
|
|
12
|
+
element: mediaElement,
|
|
13
|
+
width: mediaWidth,
|
|
14
|
+
height: mediaHeight,
|
|
15
|
+
extendedResizeOffset: extendedResizeOffset,
|
|
16
|
+
useMinimumZIndex: useMinimumZIndex
|
|
87
17
|
}, children);
|
|
88
18
|
};
|
|
@@ -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 = "128.3.
|
|
22
|
+
var packageVersion = "128.3.2";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -8,7 +8,7 @@ import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
|
8
8
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
|
|
9
9
|
import { isSSR } from '../core-utils/is-ssr';
|
|
10
10
|
import { ErrorBoundary } from '../ui/ErrorBoundary';
|
|
11
|
-
import { analyticsEventKey
|
|
11
|
+
import { analyticsEventKey } from '../utils';
|
|
12
12
|
import { getBrowserInfo } from '../utils/browser';
|
|
13
13
|
import { ZERO_WIDTH_SPACE } from '../whitespace';
|
|
14
14
|
import { generateUniqueNodeKey } from './generateUniqueNodeKey';
|
|
@@ -73,22 +73,9 @@ function createNodeView(_ref) {
|
|
|
73
73
|
extraComponentProps: extraComponentProps
|
|
74
74
|
}), domRef, key);
|
|
75
75
|
}
|
|
76
|
-
var _getPerformanceOption = getPerformanceOptions(nodeViewParams.view),
|
|
77
|
-
samplingRate = _getPerformanceOption.samplingRate,
|
|
78
|
-
slowThreshold = _getPerformanceOption.slowThreshold,
|
|
79
|
-
trackingEnabled = _getPerformanceOption.trackingEnabled;
|
|
80
|
-
trackingEnabled && startMeasureReactNodeViewRendered({
|
|
81
|
-
nodeTypeName: currentNode.type.name
|
|
82
|
-
});
|
|
83
76
|
|
|
84
77
|
// We render the component while creating the node view
|
|
85
78
|
renderComponent();
|
|
86
|
-
trackingEnabled && stopMeasureReactNodeViewRendered({
|
|
87
|
-
nodeTypeName: currentNode.type.name,
|
|
88
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
89
|
-
samplingRate: samplingRate,
|
|
90
|
-
slowThreshold: slowThreshold
|
|
91
|
-
});
|
|
92
79
|
var extraNodeViewPropsWithStopEvent = _objectSpread({}, extraNodeViewProps);
|
|
93
80
|
|
|
94
81
|
// https://prosemirror.net/docs/ref/#view.NodeView
|
|
@@ -10,7 +10,6 @@ import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
|
|
|
10
10
|
import { isSSR } from '../core-utils';
|
|
11
11
|
import { createDispatch } from '../event-dispatcher';
|
|
12
12
|
import { ErrorBoundary } from '../ui/ErrorBoundary';
|
|
13
|
-
import { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
|
|
14
13
|
import { analyticsEventKey } from '../utils/analytics';
|
|
15
14
|
import { generateUniqueNodeKey } from './generateUniqueNodeKey';
|
|
16
15
|
export { getInlineNodeViewProducer, inlineNodeViewClassname } from './getInlineNodeViewProducer';
|
|
@@ -88,13 +87,6 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
88
87
|
// nodeView if DOM structure has nested plain "div"s, it doesn't see the
|
|
89
88
|
// difference between them and it kills the nodeView
|
|
90
89
|
this.domRef.classList.add("".concat(this.node.type.name, "View-content-wrap"));
|
|
91
|
-
var _getPerformanceOption = getPerformanceOptions(this.view),
|
|
92
|
-
samplingRate = _getPerformanceOption.samplingRate,
|
|
93
|
-
slowThreshold = _getPerformanceOption.slowThreshold,
|
|
94
|
-
trackingEnabled = _getPerformanceOption.trackingEnabled;
|
|
95
|
-
trackingEnabled && startMeasureReactNodeViewRendered({
|
|
96
|
-
nodeTypeName: this.node.type.name
|
|
97
|
-
});
|
|
98
90
|
if (!shouldSkipInitRender) {
|
|
99
91
|
this.renderReactComponent(function () {
|
|
100
92
|
return _this2.render(_this2.reactComponentProps, _this2.handleRef);
|
|
@@ -115,12 +107,6 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
115
107
|
}
|
|
116
108
|
}
|
|
117
109
|
}
|
|
118
|
-
trackingEnabled && stopMeasureReactNodeViewRendered({
|
|
119
|
-
nodeTypeName: this.node.type.name,
|
|
120
|
-
dispatchAnalyticsEvent: this.dispatchAnalyticsEvent,
|
|
121
|
-
samplingRate: samplingRate,
|
|
122
|
-
slowThreshold: slowThreshold
|
|
123
|
-
});
|
|
124
110
|
return this;
|
|
125
111
|
}
|
|
126
112
|
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "128.3.
|
|
24
|
+
var packageVersion = "128.3.2";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -86,9 +86,6 @@ getDistortedDurationMonitor,
|
|
|
86
86
|
*/
|
|
87
87
|
measureRender } from './performance/measure-render';
|
|
88
88
|
export { startMeasure, stopMeasure, clearMeasure } from './performance/measure';
|
|
89
|
-
export { TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS } from './performance/TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS';
|
|
90
|
-
export { TTI_SEVERITY_THRESHOLD_DEFAULTS } from './performance/TTI_SEVERITY_THRESHOLD_DEFAULTS';
|
|
91
|
-
export { measureTTI, getTTISeverity } from './performance/measure-tti';
|
|
92
89
|
/**
|
|
93
90
|
* @private
|
|
94
91
|
* @deprecated
|
|
@@ -121,8 +118,6 @@ export { isTextInput } from './is-text-input';
|
|
|
121
118
|
export { ZERO_WIDTH_SPACE, ZERO_WIDTH_JOINER } from '../whitespace';
|
|
122
119
|
export { shouldForceTracking } from './should-force-tracking';
|
|
123
120
|
export { getModeFromTheme } from './getModeFromTheme';
|
|
124
|
-
export { getPerformanceOptions, stopMeasureReactNodeViewRendered } from './get-performance-options';
|
|
125
|
-
export { startMeasureReactNodeViewRendered } from './startMeasureReactNodeViewRendered';
|
|
126
121
|
export { sniffUserBrowserExtensions } from './browser-extensions';
|
|
127
122
|
export { RenderCountProfiler, PROFILER_KEY } from './profiler/render-count';
|
|
128
123
|
export { validateADFEntity, validationErrorHandler } from './validate-using-spec';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, ErrorEventAttributes, ErrorEventPayload, FeatureExposureAEP, FireAnalyticsCallback, FireAnalyticsEvent, FireAnalyticsEventPayload, SimplifiedNode,
|
|
1
|
+
export type { AnalyticsDispatch, AnalyticsEventPayload, AnalyticsEventPayloadCallback, AnalyticsEventPayloadWithChannel, ErrorEventAttributes, ErrorEventPayload, FeatureExposureAEP, FireAnalyticsCallback, FireAnalyticsEvent, FireAnalyticsEventPayload, SimplifiedNode, } from './types/events';
|
|
2
2
|
export type { FormatEventPayload } from './types/format-events';
|
|
3
3
|
export type { SubstituteEventPayload } from './types/substitute-events';
|
|
4
4
|
export type { ColorPickerAEP, GeneralEventPayload } from './types/general-events';
|
|
@@ -34,7 +34,6 @@ export type { ToolbarEventPayload } from './types/toolbar-button';
|
|
|
34
34
|
export type { TypeAheadPayload } from './types/type-ahead';
|
|
35
35
|
export { SELECTION_POSITION, SELECTION_TYPE } from './types/utils';
|
|
36
36
|
export type { OperationalAEP } from './types/utils';
|
|
37
|
-
export type { PluginMethodReport, PluginsReport, NodeCount, PluginPerformanceReportData, } from './types/performance-report';
|
|
38
37
|
export type { InitialiseFragmentMarksAEP, ConnectedNodesAEP, DisconnectedSourceAEP, DisconnectedTargetAEP, GotConnectionsAEP, UpdatedFragmentMarkNameAEP, UpdatedSourceAEP, UpdatedTargetAEP, } from './types/referentiality-events';
|
|
39
38
|
export type { ViewInlineCommentsButtonEventAEP, ViewEventPayload } from './types/view-events';
|
|
40
39
|
export type { ExperienceEventPayload } from './types/experience-events';
|
|
@@ -47,14 +47,12 @@ export declare enum ACTION {
|
|
|
47
47
|
DISPLAYED = "displayed",
|
|
48
48
|
DIVERGED = "diverged",
|
|
49
49
|
DISPATCHED_INVALID_TRANSACTION = "dispatchedInvalidTransaction",
|
|
50
|
-
DISPATCHED_VALID_TRANSACTION = "dispatchedValidTransaction",
|
|
51
50
|
DOUBLE_CLICKED = "doubleClicked",
|
|
52
51
|
DRAGGED = "dragged",
|
|
53
52
|
EDITED = "edited",
|
|
54
53
|
EDITOR_CRASHED = "unhandledErrorCaught",
|
|
55
54
|
EDITOR_CRASHED_ADDITIONAL_INFORMATION = "unhandledErrorCaughtAdditionalInfov2",
|
|
56
55
|
EDITOR_MOUNTED = "mounted",
|
|
57
|
-
EDITOR_CONTENT_RETRIEVAL_PERFORMED = "contentRetrievalPerformed",
|
|
58
56
|
RE_RENDERED = "reRendered",
|
|
59
57
|
ENDED = "ended",
|
|
60
58
|
ENTERED = "entered",
|
|
@@ -113,7 +111,6 @@ export declare enum ACTION {
|
|
|
113
111
|
PRESSED = "pressed",
|
|
114
112
|
QUICK_INSERT_INFORMATION = "quickInsertInformation",
|
|
115
113
|
PROSEMIRROR_RENDERED = "proseMirrorRendered",
|
|
116
|
-
REACT_NODEVIEW_RENDERED = "reactNodeViewRendered",
|
|
117
114
|
REFERENCE_SYNCED_BLOCK_DELETE = "referenceSyncedBlockDelete",
|
|
118
115
|
REFERENCE_SYNCED_BLOCK_UPDATE = "referenceSyncedBlockUpdate",
|
|
119
116
|
REFERENCE_SYNCED_BLOCK_UNSYNC = "referenceSyncedBlockUnsync",
|
|
@@ -169,18 +166,9 @@ export declare enum ACTION {
|
|
|
169
166
|
UPLOAD_EXTERNAL_FAIL = "uploadExternalFailed",
|
|
170
167
|
VIEWED = "viewed",
|
|
171
168
|
VISITED = "visited",
|
|
172
|
-
WITH_PLUGIN_STATE_CALLED = "withPluginStateCalled",
|
|
173
169
|
RENDERED = "rendered",
|
|
174
|
-
RENDERED_SAMPLED = "renderedSampled",
|
|
175
170
|
REASONING_VIEWED = "reasoningViewed",
|
|
176
171
|
ON_EDITOR_READY_CALLBACK = "onEditorReadyCallback",
|
|
177
|
-
/**
|
|
178
|
-
* @private
|
|
179
|
-
* @deprecated
|
|
180
|
-
*
|
|
181
|
-
* This is no longer used and can be removed at a later date
|
|
182
|
-
*/
|
|
183
|
-
ON_CHANGE_CALLBACK = "onChangeCalled",
|
|
184
172
|
NESTED_TABLE_TRANSFORMED = "nestedTableTransformed",
|
|
185
173
|
CONTAINER_NODE_TRANSFORMED = "containerNodeTransformed",
|
|
186
174
|
NATIVE_EMBEDS_TRANSFORMED = "nativeEmbedsTransformed",
|
|
@@ -73,7 +73,7 @@ export type SimplifiedNode = {
|
|
|
73
73
|
pos: number;
|
|
74
74
|
type: string;
|
|
75
75
|
};
|
|
76
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | PasteActionsMenuEventPayload | QuickInsertInformationEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload |
|
|
76
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | PasteActionsMenuEventPayload | QuickInsertInformationEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | PreviewItemClickedAEP | OpenLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | ContainerNodeActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIStreamingEventPayload | AIProactiveEventPayload | AiAutocompleteEventPayload | AiSuggestionsEventPayload | ContextualTypeaheadEventPayload | AIQuickPromptEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | BlockMenuEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | ExperienceEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload | AgentEditShimmerNotShownAEP | FloatingToolbarOverflowEventPayload | SyncBlockEventPayload | FloatingToolbarEventPayload;
|
|
77
77
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
78
78
|
newColor: string;
|
|
79
79
|
previousColor: string;
|
|
@@ -116,11 +116,9 @@ type InvalidTransactionErrorAEP = OperationalAEP<ACTION.DISPATCHED_INVALID_TRANS
|
|
|
116
116
|
invalidNodes: (SimplifiedNode | string)[];
|
|
117
117
|
isRemoteReplaceDocumentTransaction?: boolean;
|
|
118
118
|
}>;
|
|
119
|
-
type DispatchedValidTransactionAEP = OperationalAEP<ACTION.DISPATCHED_VALID_TRANSACTION, ACTION_SUBJECT.EDITOR, undefined, undefined>;
|
|
120
119
|
type InvalidTransactionStepErrorAEP = OperationalAEP<ACTION.DISCARDED_INVALID_STEPS_FROM_TRANSACTION, ACTION_SUBJECT.EDITOR, undefined, {
|
|
121
120
|
analyticsEventPayloads: AnalyticsEventPayloadWithChannel[];
|
|
122
121
|
}>;
|
|
123
|
-
export type TransactionEventPayload = DispatchedValidTransactionAEP;
|
|
124
122
|
type FailedToUnmountErrorAEP = OperationalAEP<ACTION.FAILED_TO_UNMOUNT, ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID.REACT_NODE_VIEW, {
|
|
125
123
|
domNodes: {
|
|
126
124
|
child?: string;
|
|
@@ -36,7 +36,7 @@ type EditorStartAEP = UIAEP<ACTION.STARTED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
|
36
36
|
featureFlags: FeatureFlagKey[];
|
|
37
37
|
platform: PLATFORMS.NATIVE | PLATFORMS.HYBRID | PLATFORMS.WEB;
|
|
38
38
|
}, undefined>;
|
|
39
|
-
type EditorPerfAEP = OperationalAEPWithObjectId<ACTION.EDITOR_MOUNTED | ACTION.PROSEMIRROR_RENDERED | ACTION.ON_EDITOR_READY_CALLBACK
|
|
39
|
+
type EditorPerfAEP = OperationalAEPWithObjectId<ACTION.EDITOR_MOUNTED | ACTION.PROSEMIRROR_RENDERED | ACTION.ON_EDITOR_READY_CALLBACK, ACTION_SUBJECT.EDITOR, undefined, {
|
|
40
40
|
distortedDuration?: boolean;
|
|
41
41
|
duration: number;
|
|
42
42
|
editorDomSize?: number;
|
|
@@ -49,11 +49,6 @@ type EditorPerfAEP = OperationalAEPWithObjectId<ACTION.EDITOR_MOUNTED | ACTION.P
|
|
|
49
49
|
totalNodes?: number;
|
|
50
50
|
ttfb?: number;
|
|
51
51
|
}>;
|
|
52
|
-
type EditorContentRetrievalPerformedAEP = OperationalAEP<ACTION.EDITOR_CONTENT_RETRIEVAL_PERFORMED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
53
|
-
errorInfo?: string;
|
|
54
|
-
errorStack?: string;
|
|
55
|
-
success: boolean;
|
|
56
|
-
}>;
|
|
57
52
|
type EditorRenderedAEP<T> = OperationalAEP<ACTION.RE_RENDERED, ACTION_SUBJECT.EDITOR | ACTION_SUBJECT.REACT_EDITOR_VIEW, undefined, {
|
|
58
53
|
count: number;
|
|
59
54
|
propsDifference: PropsDifference<T> | ShallowPropsDifference<T>;
|
|
@@ -132,14 +127,6 @@ type InputPerfSamplingAvgAEP = OperationalAEPWithObjectId<ACTION.INPUT_PERF_SAMP
|
|
|
132
127
|
type TransactionMutatedAEP = OperationalAEP<ACTION.TRANSACTION_MUTATED_AFTER_DISPATCH, ACTION_SUBJECT.EDITOR, undefined, {
|
|
133
128
|
pluginKey: string;
|
|
134
129
|
}>;
|
|
135
|
-
type WithPluginStateCalledAEP = OperationalAEP<ACTION.WITH_PLUGIN_STATE_CALLED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
136
|
-
duration: number;
|
|
137
|
-
plugin: string;
|
|
138
|
-
}>;
|
|
139
|
-
type ReactNodeViewRenderedAEP = OperationalAEP<ACTION.REACT_NODEVIEW_RENDERED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
140
|
-
duration: number;
|
|
141
|
-
node: string;
|
|
142
|
-
}>;
|
|
143
130
|
type UploadExternalFailedAEP = OperationalAEP<ACTION.UPLOAD_EXTERNAL_FAIL, ACTION_SUBJECT.EDITOR, undefined, undefined>;
|
|
144
131
|
type InvalidProsemirrorDocumentErrorAEP = OperationalAEP<ACTION.INVALID_PROSEMIRROR_DOCUMENT, ACTION_SUBJECT.EDITOR, undefined, undefined>;
|
|
145
132
|
type DocumentProcessingErrorAEP = OperationalAEP<ACTION.DOCUMENT_PROCESSING_ERROR, ACTION_SUBJECT.EDITOR, undefined, {
|
|
@@ -311,5 +298,5 @@ type ChangeToneMenuItemClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR
|
|
|
311
298
|
type TranslateMenuItemClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR_DROPDOWN_MENU_ITEM, ACTION_SUBJECT_ID.AI_TRANSLATE, {
|
|
312
299
|
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
|
|
313
300
|
}>;
|
|
314
|
-
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | AnnotationErrorAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamplingAEP | InputPerfSamplingAvgAEP | LimitedModeLatchedAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertTabViewedAEP | PickerMediaInsertImageGenerationSubmittedAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP |
|
|
301
|
+
export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | AnnotationErrorAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ButtonUploadMediaAEP | ColorPickerAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamplingAEP | InputPerfSamplingAvgAEP | LimitedModeLatchedAEP | PickerEmojiAEP | PickerImageAEP | PickerMediaInsertAEP | PickerMediaInsertTabViewedAEP | PickerMediaInsertImageGenerationSubmittedAEP | PickerMediaInsertClosedAEP | PickerMediaInsertCancelledAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | CodeBlockLanguageAutoDetectedAEP | CodeBlockLanguageSelectedAEP | CodeBlockFormatCodeSuccessAEP | CodeBlockFormatCodeFailedAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP | CollabOrganicChangesTrackerPayloadAEP | BlocksDragInitAEP | CodeBlockFoldingToggleAEP | CodeBlockWordWrapToggleAEP | CodeBlockLineNumbersToggleAEP | RequestToEditAEP | SingleColumLayoutDetectedAEP | CopyLinkToAnchorButtonAEP | DockedPrimaryToolbarRenderedAEP | RovoMoreOptionsClickedAEP | AskRovoButtonClickedAEP | SmartLinkRovoButtonClickedAEP | SmartLinkSummarizeButtonClickedAEP | AIRemixButtonClickedAEP | ChangeToneMenuItemClickedAEP | TranslateMenuItemClickedAEP | MediaSingleWidthTransformedAEP;
|
|
315
302
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
type BlockNodeBadgesProps = {
|
|
4
|
+
children: ReactNode | ((props: {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
}) => ReactNode);
|
|
7
|
+
element?: HTMLElement | null;
|
|
8
|
+
extendedResizeOffset?: boolean;
|
|
9
|
+
height?: number;
|
|
10
|
+
useMinimumZIndex?: boolean;
|
|
11
|
+
width?: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const BlockNodeBadges: ({ children, element, width, height, extendedResizeOffset, useMinimumZIndex, }: BlockNodeBadgesProps) => React.JSX.Element | null;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { OptionalPlugin, PublicPluginAPI } from '../../types';
|
|
3
|
+
import type { ExtensionAnnotationPlugin, ExtensionCommentBadgeProps } from '../types';
|
|
4
|
+
type Props = ExtensionCommentBadgeProps & {
|
|
5
|
+
api: PublicPluginAPI<[OptionalPlugin<ExtensionAnnotationPlugin>]> | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare const ExtensionCommentBadge: ({ api, editorView, node, getPos, container, }: Props) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -1,9 +1,36 @@
|
|
|
1
1
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type {
|
|
2
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
+
import type { VIEW_METHOD } from '../analytics';
|
|
4
|
+
import type { EditorContainerWidth, Command, NextEditorPlugin, OptionalPlugin, PublicPluginAPI } from '../types';
|
|
5
|
+
export type ExtensionCommentBadgeProps = {
|
|
6
|
+
container: HTMLElement;
|
|
7
|
+
editorView: EditorView;
|
|
8
|
+
getPos: () => number | undefined;
|
|
9
|
+
node: Node;
|
|
10
|
+
};
|
|
11
|
+
export type ExtensionAnnotationPlugin = NextEditorPlugin<'annotation', {
|
|
12
|
+
actions: {
|
|
13
|
+
isBlockNodeSupported: (node: Node) => boolean;
|
|
14
|
+
requestCloseInlineComment: () => Promise<boolean>;
|
|
15
|
+
showCommentForBlockNode: (node: Node, viewMethod: VIEW_METHOD) => Command;
|
|
16
|
+
};
|
|
17
|
+
sharedState: {
|
|
18
|
+
annotations: {
|
|
19
|
+
[id: string]: boolean | undefined;
|
|
20
|
+
};
|
|
21
|
+
isDrafting: boolean;
|
|
22
|
+
isInlineCommentViewClosed: boolean;
|
|
23
|
+
isVisible: boolean;
|
|
24
|
+
selectedAnnotations: {
|
|
25
|
+
id: string;
|
|
26
|
+
}[];
|
|
27
|
+
targetNodeId?: string;
|
|
28
|
+
} | undefined;
|
|
29
|
+
}>;
|
|
3
30
|
type WidthPluginType = NextEditorPlugin<'width', {
|
|
4
31
|
sharedState: EditorContainerWidth | undefined;
|
|
5
32
|
}>;
|
|
6
|
-
export type ExtensionsPluginInjectionAPI = PublicPluginAPI<[WidthPluginType]> | undefined;
|
|
33
|
+
export type ExtensionsPluginInjectionAPI = PublicPluginAPI<[WidthPluginType, OptionalPlugin<ExtensionAnnotationPlugin>]> | undefined;
|
|
7
34
|
export type MacroInteractionDesignFeatureFlags = {
|
|
8
35
|
showMacroInteractionDesignUpdates?: boolean;
|
|
9
36
|
};
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
type
|
|
4
|
-
children: ReactNode | ((props: {
|
|
5
|
-
visible: boolean;
|
|
6
|
-
}) => ReactNode);
|
|
7
|
-
extendedResizeOffset?: boolean;
|
|
2
|
+
import { BlockNodeBadges } from '../block-node-badges';
|
|
3
|
+
type Props = Omit<React.ComponentProps<typeof BlockNodeBadges>, 'element' | 'width' | 'height'> & {
|
|
8
4
|
mediaElement?: HTMLElement | null;
|
|
9
5
|
mediaHeight?: number;
|
|
10
6
|
mediaWidth?: number;
|
|
11
|
-
useMinimumZIndex?: boolean;
|
|
12
7
|
};
|
|
13
|
-
|
|
8
|
+
/** Compatibility wrapper for existing media consumers of BlockNodeBadges. */
|
|
9
|
+
export declare const MediaBadges: ({ mediaElement, mediaWidth, mediaHeight, children, extendedResizeOffset, useMinimumZIndex, }: Props) => React.JSX.Element;
|
|
14
10
|
export {};
|
|
@@ -34,7 +34,7 @@ export type { EditorCommand, EditorCommandWithMetadata } from './editor-command'
|
|
|
34
34
|
export type IconProps = {
|
|
35
35
|
label?: string;
|
|
36
36
|
};
|
|
37
|
-
export type { TTITracking, TransactionTracking, UITracking, CatchAllTracking,
|
|
37
|
+
export type { TTITracking, TransactionTracking, UITracking, CatchAllTracking, BrowserFreezetracking, ProseMirrorRenderedTracking, InputTracking, ContentRetrievalTracking, OnChangeCallbackTracking, OnEditorReadyCallbackTracking, PasteTracking, RenderTracking, PerformanceTracking, } from './performance-tracking';
|
|
38
38
|
export type { GridType } from './grid';
|
|
39
39
|
export type { LinkInputType, LinkPickerOptions, LinkingOptions, HyperlinkPluginOptions, } from './hyperlink';
|
|
40
40
|
export type { SnapPointsProps } from './resizable-media-single';
|
|
@@ -96,24 +96,6 @@ export type CatchAllTracking = {
|
|
|
96
96
|
*/
|
|
97
97
|
enabled: boolean;
|
|
98
98
|
};
|
|
99
|
-
export type NodeViewTracking = {
|
|
100
|
-
/**
|
|
101
|
-
* @description Control whether
|
|
102
|
-
NodeView performance is tracked. When this is false no measurements are taken and no events are sent.
|
|
103
|
-
* @default false
|
|
104
|
-
*/
|
|
105
|
-
enabled: boolean;
|
|
106
|
-
/**
|
|
107
|
-
* @description The nth re-render of NodeView after which an analytics event is sent. Depends on enabled being true.
|
|
108
|
-
* @default false
|
|
109
|
-
*/
|
|
110
|
-
samplingRate?: 100;
|
|
111
|
-
/**
|
|
112
|
-
* @description NodeView render that exceeds the threshold generate analytics event. Depends on enabled being true.
|
|
113
|
-
* @default 7
|
|
114
|
-
*/
|
|
115
|
-
slowThreshold?: number;
|
|
116
|
-
};
|
|
117
99
|
export type BrowserFreezetracking = {
|
|
118
100
|
enabled?: boolean;
|
|
119
101
|
/**
|
|
@@ -296,10 +278,6 @@ export type PerformanceTracking = {
|
|
|
296
278
|
* @description Control whether transactions are tracked
|
|
297
279
|
*/
|
|
298
280
|
inputTracking?: InputTracking;
|
|
299
|
-
/**
|
|
300
|
-
* @description Control whether nodeviews are tracked
|
|
301
|
-
*/
|
|
302
|
-
nodeViewTracking?: NodeViewTracking;
|
|
303
281
|
/**
|
|
304
282
|
* @description Control whether browser freezes / long tasks are tracked
|
|
305
283
|
*/
|
|
@@ -91,9 +91,6 @@ getDistortedDurationMonitor,
|
|
|
91
91
|
*/
|
|
92
92
|
measureRender, } from './performance/measure-render';
|
|
93
93
|
export { startMeasure, stopMeasure, clearMeasure } from './performance/measure';
|
|
94
|
-
export { TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS } from './performance/TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS';
|
|
95
|
-
export { TTI_SEVERITY_THRESHOLD_DEFAULTS } from './performance/TTI_SEVERITY_THRESHOLD_DEFAULTS';
|
|
96
|
-
export { measureTTI, getTTISeverity } from './performance/measure-tti';
|
|
97
94
|
/**
|
|
98
95
|
* @private
|
|
99
96
|
* @deprecated
|
|
@@ -126,8 +123,6 @@ export { ZERO_WIDTH_SPACE, ZERO_WIDTH_JOINER } from '../whitespace';
|
|
|
126
123
|
export type { Diff } from './types';
|
|
127
124
|
export { shouldForceTracking } from './should-force-tracking';
|
|
128
125
|
export { getModeFromTheme } from './getModeFromTheme';
|
|
129
|
-
export { getPerformanceOptions, stopMeasureReactNodeViewRendered } from './get-performance-options';
|
|
130
|
-
export { startMeasureReactNodeViewRendered } from './startMeasureReactNodeViewRendered';
|
|
131
126
|
export type { UserBrowserExtensionResults } from './browser-extensions';
|
|
132
127
|
export { sniffUserBrowserExtensions } from './browser-extensions';
|
|
133
128
|
export { RenderCountProfiler, PROFILER_KEY } from './profiler/render-count';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "128.
|
|
3
|
+
"version": "128.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/"
|
|
@@ -146,6 +146,10 @@
|
|
|
146
146
|
"sinon": "^2.2.0"
|
|
147
147
|
},
|
|
148
148
|
"platform-feature-flags": {
|
|
149
|
+
"cc_maui_annotations_on_extensions": {
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"referenceOnly": true
|
|
152
|
+
},
|
|
149
153
|
"platform_editor_mention_avatar_observability": {
|
|
150
154
|
"type": "boolean",
|
|
151
155
|
"referenceOnly": true
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@atlaskit/editor-common/analytics/types/performance-report",
|
|
3
|
-
"main": "../../../dist/cjs/analytics/types/performance-report.js",
|
|
4
|
-
"module": "../../../dist/esm/analytics/types/performance-report.js",
|
|
5
|
-
"module:es2019": "../../../dist/es2019/analytics/types/performance-report.js",
|
|
6
|
-
"sideEffects": [
|
|
7
|
-
"**/*.compiled.css"
|
|
8
|
-
],
|
|
9
|
-
"types": "../../../dist/types/analytics/types/performance-report.d.ts"
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|