@atlaskit/editor-common 126.3.2 → 126.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 +13 -0
- package/dist/cjs/extensibility/Extension.js +2 -0
- package/dist/cjs/extensibility/extensionNodeView.js +8 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/extensibility/Extension.js +2 -0
- package/dist/es2019/extensibility/extensionNodeView.js +7 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/extensibility/Extension.js +2 -0
- package/dist/esm/extensibility/extensionNodeView.js +8 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/extensibility/Extension.d.ts +5 -2
- package/dist/types/extensibility/ExtensionComponent.d.ts +3 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 126.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`bcdb07236fe50`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bcdb07236fe50) -
|
|
8
|
+
Add an optional selection prop to invalidate memoized extension renders under
|
|
9
|
+
confluence_enable_react-compiler-runtime-platform while reading current state from editorView.
|
|
10
|
+
Preserve MAUI selection updates without resetting content readiness.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 126.3.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -31,6 +31,7 @@ var Extension = exports.Extension = /*#__PURE__*/function (_Component) {
|
|
|
31
31
|
var _this$props = _this.props,
|
|
32
32
|
node = _this$props.node,
|
|
33
33
|
getPos = _this$props.getPos,
|
|
34
|
+
selection = _this$props.selection,
|
|
34
35
|
editorView = _this$props.editorView,
|
|
35
36
|
handleContentDOMRef = _this$props.handleContentDOMRef,
|
|
36
37
|
extensionHandlers = _this$props.extensionHandlers,
|
|
@@ -54,6 +55,7 @@ var Extension = exports.Extension = /*#__PURE__*/function (_Component) {
|
|
|
54
55
|
mode = _ref2.mode;
|
|
55
56
|
var isLivePageViewMode = contentMode === 'live-view' || mode === 'view';
|
|
56
57
|
return /*#__PURE__*/_react.default.createElement(_ExtensionComponent.ExtensionComponent, {
|
|
58
|
+
selection: selection,
|
|
57
59
|
editorView: editorView,
|
|
58
60
|
node: node,
|
|
59
61
|
getPos: getPos,
|
|
@@ -17,6 +17,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
18
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
19
19
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
20
|
+
var _reactCompilerGating = require("@atlaskit/react-compiler-gating");
|
|
20
21
|
var _coreUtils = require("../core-utils");
|
|
21
22
|
var _reactNodeView = _interopRequireDefault(require("../react-node-view"));
|
|
22
23
|
var _Extension = require("./Extension");
|
|
@@ -312,7 +313,10 @@ var ExtensionNode = exports.ExtensionNode = /*#__PURE__*/function (_ReactNodeVie
|
|
|
312
313
|
if (this.didReuseSsrDom) {
|
|
313
314
|
return null;
|
|
314
315
|
}
|
|
315
|
-
return /*#__PURE__*/_react.default.createElement(ExtensionNodeRender
|
|
316
|
+
return /*#__PURE__*/_react.default.createElement(ExtensionNodeRender
|
|
317
|
+
// EditorView is mutable; expose selection changes to invalidate compiled renders.
|
|
318
|
+
, {
|
|
319
|
+
selection: (0, _reactCompilerGating.isReactCompilerActivePlatform)() ? this.view.state.selection : undefined,
|
|
316
320
|
editorView: this.view,
|
|
317
321
|
eventDispatcher: this.eventDispatcher,
|
|
318
322
|
forwardRef: forwardRef
|
|
@@ -337,7 +341,8 @@ var ExtensionNode = exports.ExtensionNode = /*#__PURE__*/function (_ReactNodeVie
|
|
|
337
341
|
*/
|
|
338
342
|
function ExtensionNodeRender(_ref2) {
|
|
339
343
|
var _renderProps$extensio, _renderProps$extensio2;
|
|
340
|
-
var
|
|
344
|
+
var selection = _ref2.selection,
|
|
345
|
+
editorView = _ref2.editorView,
|
|
341
346
|
eventDispatcher = _ref2.eventDispatcher,
|
|
342
347
|
forwardRef = _ref2.forwardRef,
|
|
343
348
|
getPos = _ref2.getPos,
|
|
@@ -361,6 +366,7 @@ function ExtensionNodeRender(_ref2) {
|
|
|
361
366
|
generatedContentMotion: generatedContentMotion,
|
|
362
367
|
contentReady: contentReady
|
|
363
368
|
}, /*#__PURE__*/_react.default.createElement(_Extension.Extension, {
|
|
369
|
+
selection: selection,
|
|
364
370
|
editorView: editorView,
|
|
365
371
|
node: node,
|
|
366
372
|
eventDispatcher: eventDispatcher,
|
|
@@ -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 = "126.3.
|
|
30
|
+
var packageVersion = "126.3.2";
|
|
31
31
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
32
32
|
// Remove URL as it has UGC
|
|
33
33
|
// Ignored via go/ees007
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "126.3.
|
|
27
|
+
var packageVersion = "126.3.2";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -14,6 +14,7 @@ export class Extension extends Component {
|
|
|
14
14
|
const {
|
|
15
15
|
node,
|
|
16
16
|
getPos,
|
|
17
|
+
selection,
|
|
17
18
|
editorView,
|
|
18
19
|
handleContentDOMRef,
|
|
19
20
|
extensionHandlers,
|
|
@@ -39,6 +40,7 @@ export class Extension extends Component {
|
|
|
39
40
|
} = currentState || {};
|
|
40
41
|
const isLivePageViewMode = contentMode === 'live-view' || mode === 'view';
|
|
41
42
|
return /*#__PURE__*/React.createElement(ExtensionComponent, {
|
|
43
|
+
selection: selection,
|
|
42
44
|
editorView: editorView,
|
|
43
45
|
node: node,
|
|
44
46
|
getPos: getPos,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { useCallback, useState } from 'react';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
|
+
import { isReactCompilerActivePlatform } from '@atlaskit/react-compiler-gating';
|
|
4
5
|
import { isSSR } from '../core-utils';
|
|
5
6
|
import ReactNodeView from '../react-node-view';
|
|
6
7
|
import { Extension } from './Extension';
|
|
@@ -263,7 +264,10 @@ export class ExtensionNode extends ReactNodeView {
|
|
|
263
264
|
if (this.didReuseSsrDom) {
|
|
264
265
|
return null;
|
|
265
266
|
}
|
|
266
|
-
return /*#__PURE__*/React.createElement(ExtensionNodeRender
|
|
267
|
+
return /*#__PURE__*/React.createElement(ExtensionNodeRender
|
|
268
|
+
// EditorView is mutable; expose selection changes to invalidate compiled renders.
|
|
269
|
+
, {
|
|
270
|
+
selection: isReactCompilerActivePlatform() ? this.view.state.selection : undefined,
|
|
267
271
|
editorView: this.view,
|
|
268
272
|
eventDispatcher: this.eventDispatcher,
|
|
269
273
|
forwardRef: forwardRef
|
|
@@ -286,6 +290,7 @@ export class ExtensionNode extends ReactNodeView {
|
|
|
286
290
|
* wrapper, and the wrapper animates the node in once it has.
|
|
287
291
|
*/
|
|
288
292
|
function ExtensionNodeRender({
|
|
293
|
+
selection,
|
|
289
294
|
editorView,
|
|
290
295
|
eventDispatcher,
|
|
291
296
|
forwardRef,
|
|
@@ -307,6 +312,7 @@ function ExtensionNodeRender({
|
|
|
307
312
|
generatedContentMotion: generatedContentMotion,
|
|
308
313
|
contentReady: contentReady
|
|
309
314
|
}, /*#__PURE__*/React.createElement(Extension, {
|
|
315
|
+
selection: selection,
|
|
310
316
|
editorView: editorView,
|
|
311
317
|
node: node,
|
|
312
318
|
eventDispatcher: eventDispatcher,
|
|
@@ -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 = "126.3.
|
|
16
|
+
const packageVersion = "126.3.2";
|
|
17
17
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
18
18
|
// Remove URL as it has UGC
|
|
19
19
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "126.3.
|
|
17
|
+
const packageVersion = "126.3.2";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -22,6 +22,7 @@ export var Extension = /*#__PURE__*/function (_Component) {
|
|
|
22
22
|
var _this$props = _this.props,
|
|
23
23
|
node = _this$props.node,
|
|
24
24
|
getPos = _this$props.getPos,
|
|
25
|
+
selection = _this$props.selection,
|
|
25
26
|
editorView = _this$props.editorView,
|
|
26
27
|
handleContentDOMRef = _this$props.handleContentDOMRef,
|
|
27
28
|
extensionHandlers = _this$props.extensionHandlers,
|
|
@@ -45,6 +46,7 @@ export var Extension = /*#__PURE__*/function (_Component) {
|
|
|
45
46
|
mode = _ref2.mode;
|
|
46
47
|
var isLivePageViewMode = contentMode === 'live-view' || mode === 'view';
|
|
47
48
|
return /*#__PURE__*/React.createElement(ExtensionComponent, {
|
|
49
|
+
selection: selection,
|
|
48
50
|
editorView: editorView,
|
|
49
51
|
node: node,
|
|
50
52
|
getPos: getPos,
|
|
@@ -11,6 +11,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
11
11
|
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
12
12
|
import React, { useCallback, useState } from 'react';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
14
|
+
import { isReactCompilerActivePlatform } from '@atlaskit/react-compiler-gating';
|
|
14
15
|
import { isSSR } from '../core-utils';
|
|
15
16
|
import ReactNodeView from '../react-node-view';
|
|
16
17
|
import { Extension } from './Extension';
|
|
@@ -302,7 +303,10 @@ export var ExtensionNode = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
302
303
|
if (this.didReuseSsrDom) {
|
|
303
304
|
return null;
|
|
304
305
|
}
|
|
305
|
-
return /*#__PURE__*/React.createElement(ExtensionNodeRender
|
|
306
|
+
return /*#__PURE__*/React.createElement(ExtensionNodeRender
|
|
307
|
+
// EditorView is mutable; expose selection changes to invalidate compiled renders.
|
|
308
|
+
, {
|
|
309
|
+
selection: isReactCompilerActivePlatform() ? this.view.state.selection : undefined,
|
|
306
310
|
editorView: this.view,
|
|
307
311
|
eventDispatcher: this.eventDispatcher,
|
|
308
312
|
forwardRef: forwardRef
|
|
@@ -327,7 +331,8 @@ export var ExtensionNode = /*#__PURE__*/function (_ReactNodeView) {
|
|
|
327
331
|
*/
|
|
328
332
|
function ExtensionNodeRender(_ref2) {
|
|
329
333
|
var _renderProps$extensio, _renderProps$extensio2;
|
|
330
|
-
var
|
|
334
|
+
var selection = _ref2.selection,
|
|
335
|
+
editorView = _ref2.editorView,
|
|
331
336
|
eventDispatcher = _ref2.eventDispatcher,
|
|
332
337
|
forwardRef = _ref2.forwardRef,
|
|
333
338
|
getPos = _ref2.getPos,
|
|
@@ -351,6 +356,7 @@ function ExtensionNodeRender(_ref2) {
|
|
|
351
356
|
generatedContentMotion: generatedContentMotion,
|
|
352
357
|
contentReady: contentReady
|
|
353
358
|
}, /*#__PURE__*/React.createElement(Extension, {
|
|
359
|
+
selection: selection,
|
|
354
360
|
editorView: editorView,
|
|
355
361
|
node: node,
|
|
356
362
|
eventDispatcher: eventDispatcher,
|
|
@@ -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 = "126.3.
|
|
22
|
+
var packageVersion = "126.3.2";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -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 = "126.3.
|
|
24
|
+
var packageVersion = "126.3.2";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
+
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
6
|
import type { EventDispatcher } from '../event-dispatcher';
|
|
6
7
|
import type { ExtensionHandlers, ReferenceEntity } from '../extensions';
|
|
@@ -18,12 +19,14 @@ export interface Props {
|
|
|
18
19
|
handleContentDOMRef: (node: HTMLElement | null) => void;
|
|
19
20
|
macroInteractionDesignFeatureFlags?: MacroInteractionDesignFeatureFlags;
|
|
20
21
|
node: PMNode;
|
|
22
|
+
/** Called by the extension once its content is ready to be shown. */
|
|
23
|
+
onContentReady?: () => void;
|
|
21
24
|
pluginInjectionApi: ExtensionsPluginInjectionAPI;
|
|
22
25
|
providerFactory?: ProviderFactory;
|
|
23
26
|
references?: ReferenceEntity[];
|
|
24
|
-
/** Called by the extension once its content is ready to be shown. */
|
|
25
|
-
onContentReady?: () => void;
|
|
26
27
|
rendererExtensionHandlers?: ExtensionHandlers;
|
|
28
|
+
/** Invalidates memoized renders on selection changes; read current state from editorView. */
|
|
29
|
+
selection?: Selection;
|
|
27
30
|
showLivePagesBodiedMacrosRendererView?: (node: ADFEntity) => boolean;
|
|
28
31
|
showUpdatedLivePages1PBodiedExtensionUI?: (node: ADFEntity) => boolean;
|
|
29
32
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
+
import { type Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
6
|
import type { EventDispatcher } from '../event-dispatcher';
|
|
6
7
|
import type { ExtensionHandlers, ExtensionProvider, ReferenceEntity } from '../extensions';
|
|
@@ -24,6 +25,8 @@ export interface Props {
|
|
|
24
25
|
pluginInjectionApi: ExtensionsPluginInjectionAPI;
|
|
25
26
|
references?: ReferenceEntity[];
|
|
26
27
|
rendererExtensionHandlers?: ExtensionHandlers;
|
|
28
|
+
/** Invalidates memoized renders on selection changes; read current state from editorView. */
|
|
29
|
+
selection?: Selection;
|
|
27
30
|
setShowBodiedExtensionRendererView?: (showBodiedExtensionRendererView: boolean) => void;
|
|
28
31
|
showBodiedExtensionRendererView?: boolean;
|
|
29
32
|
showLivePagesBodiedMacrosRendererView?: (node: ADFEntity) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "126.
|
|
3
|
+
"version": "126.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/"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@atlaskit/media-file-preview": "^2.0.0",
|
|
65
65
|
"@atlaskit/media-picker": "^73.0.0",
|
|
66
66
|
"@atlaskit/media-ui": "^31.0.0",
|
|
67
|
-
"@atlaskit/media-viewer": "^54.
|
|
67
|
+
"@atlaskit/media-viewer": "^54.10.0",
|
|
68
68
|
"@atlaskit/mention": "^30.0.0",
|
|
69
69
|
"@atlaskit/menu": "^11.0.0",
|
|
70
70
|
"@atlaskit/object": "^2.3.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@atlaskit/task-decision": "^21.11.0",
|
|
86
86
|
"@atlaskit/teams-app-config": "^3.1.0",
|
|
87
87
|
"@atlaskit/textfield": "^10.2.0",
|
|
88
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
88
|
+
"@atlaskit/tmp-editor-statsig": "^216.0.0",
|
|
89
89
|
"@atlaskit/tokens": "^20.1.0",
|
|
90
90
|
"@atlaskit/tooltip": "^24.3.0",
|
|
91
91
|
"@atlaskit/width-detector": "^7.2.0",
|