@atlaskit/editor-common 88.8.2 → 88.9.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 +17 -0
- package/dist/cjs/lazy-node-view/index.js +3 -3
- package/dist/cjs/lazy-node-view/node-view.js +24 -10
- package/dist/cjs/messages/block-controls.js +5 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/lazy-node-view/index.js +3 -3
- package/dist/es2019/lazy-node-view/node-view.js +24 -10
- package/dist/es2019/messages/block-controls.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/lazy-node-view/index.js +3 -3
- package/dist/esm/lazy-node-view/node-view.js +24 -10
- package/dist/esm/messages/block-controls.js +5 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/type-ahead.d.ts +24 -4
- package/dist/types/lazy-node-view/index.d.ts +1 -1
- package/dist/types/lazy-node-view/node-view.d.ts +4 -4
- package/dist/types/messages/block-controls.d.ts +5 -0
- package/dist/types-ts4.5/analytics/types/type-ahead.d.ts +24 -4
- package/dist/types-ts4.5/lazy-node-view/index.d.ts +1 -1
- package/dist/types-ts4.5/lazy-node-view/node-view.d.ts +4 -4
- package/dist/types-ts4.5/messages/block-controls.d.ts +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 88.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#137234](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137234)
|
|
8
|
+
[`e80c81de138e9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e80c81de138e9) -
|
|
9
|
+
[ux] [ED-24803] Experiment for editor block controls which adds a button to insert quickInsert
|
|
10
|
+
elements
|
|
11
|
+
|
|
12
|
+
## 88.8.3
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#136760](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/136760)
|
|
17
|
+
[`39e4b9c90b284`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/39e4b9c90b284) -
|
|
18
|
+
LazyNodeView update method to compare decorations
|
|
19
|
+
|
|
3
20
|
## 88.8.2
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -70,7 +70,7 @@ var testOnlyIgnoreLazyNodeViewSet = new WeakSet();
|
|
|
70
70
|
*
|
|
71
71
|
* This needs to be replaced with proper implementation once LazyNodeView is converted to a plugin.
|
|
72
72
|
*
|
|
73
|
-
* @deprecated DO NOT USE THIS
|
|
73
|
+
* @deprecated DO NOT USE THIS OUTSIDE TESTS.
|
|
74
74
|
*/
|
|
75
75
|
function testOnlyIgnoreLazyNodeView(view) {
|
|
76
76
|
testOnlyIgnoreLazyNodeViewSet.add(view);
|
|
@@ -137,7 +137,7 @@ var withLazyLoading = exports.withLazyLoading = function withLazyLoading(_ref) {
|
|
|
137
137
|
if (resolvedNodeView && !testOnlyIgnoreLazyNodeViewSet.has(view)) {
|
|
138
138
|
return resolvedNodeView(node, view, getPos, decorations);
|
|
139
139
|
}
|
|
140
|
-
return new _nodeView.LazyNodeView(node, view, getPos,
|
|
140
|
+
return new _nodeView.LazyNodeView(node, view, getPos, decorations);
|
|
141
141
|
}
|
|
142
142
|
var loaderPromise = loader().then(function (nodeViewFuncModule) {
|
|
143
143
|
var _resolvedNodesPerEdit;
|
|
@@ -187,7 +187,7 @@ var withLazyLoading = exports.withLazyLoading = function withLazyLoading(_ref) {
|
|
|
187
187
|
// },
|
|
188
188
|
// });
|
|
189
189
|
}
|
|
190
|
-
return new _nodeView.LazyNodeView(node, view, getPos,
|
|
190
|
+
return new _nodeView.LazyNodeView(node, view, getPos, decorations);
|
|
191
191
|
};
|
|
192
192
|
return createLazyNodeView;
|
|
193
193
|
};
|
|
@@ -15,23 +15,40 @@ var getEditorLineWidth = (0, _memoize.default)(function (view) {
|
|
|
15
15
|
return (_view$dom = view.dom) === null || _view$dom === void 0 ? void 0 : _view$dom.clientWidth;
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
+
// Copied from ProseMirror NodeView
|
|
19
|
+
// https://github.com/ProseMirror/prosemirror-view/blob/cfa73eb969777f63bcb39972594fd4a9110f5a93/src/viewdesc.ts#L1095-L1099
|
|
20
|
+
function sameOuterDeco(a, b) {
|
|
21
|
+
if (a.length !== b.length) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
for (var i = 0; i < a.length; i++) {
|
|
25
|
+
// @ts-expect-error type actually exist on decoration at runtime
|
|
26
|
+
if (!a[i].type) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// @ts-expect-error type actually exist on decoration at runtime
|
|
31
|
+
if (!a[i].type.eq(b[i].type)) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
18
38
|
/**
|
|
19
39
|
* 🧱 Internal: Editor FE Platform
|
|
20
40
|
*
|
|
21
41
|
* A NodeView that serves as a placeholder until the actual NodeView is loaded.
|
|
22
42
|
*/
|
|
23
43
|
var LazyNodeView = exports.LazyNodeView = /*#__PURE__*/function () {
|
|
24
|
-
function LazyNodeView(_node, view, _getPos,
|
|
44
|
+
function LazyNodeView(_node, view, _getPos, _outerDeco) {
|
|
25
45
|
var _this = this,
|
|
26
46
|
_node$type;
|
|
27
47
|
(0, _classCallCheck2.default)(this, LazyNodeView);
|
|
28
|
-
(0, _defineProperty2.default)(this, "update", function (node) {
|
|
48
|
+
(0, _defineProperty2.default)(this, "update", function (node, outerDeco) {
|
|
29
49
|
var prevNode = _this.node;
|
|
30
50
|
_this.node = node;
|
|
31
|
-
|
|
32
|
-
// Forcing NodeView to be re-created
|
|
33
|
-
// so that ProseMirror can replace LazyNodeView with the real one.
|
|
34
|
-
if (_this.isNodeViewLoaded) {
|
|
51
|
+
if (!sameOuterDeco(outerDeco, _this.outerDeco)) {
|
|
35
52
|
return false;
|
|
36
53
|
}
|
|
37
54
|
|
|
@@ -40,7 +57,7 @@ var LazyNodeView = exports.LazyNodeView = /*#__PURE__*/function () {
|
|
|
40
57
|
return !_this.node.sameMarkup(prevNode);
|
|
41
58
|
});
|
|
42
59
|
this.node = _node;
|
|
43
|
-
this.
|
|
60
|
+
this.outerDeco = _outerDeco;
|
|
44
61
|
if (typeof ((_node$type = _node.type) === null || _node$type === void 0 || (_node$type = _node$type.spec) === null || _node$type === void 0 ? void 0 : _node$type.toDOM) !== 'function') {
|
|
45
62
|
this.dom = document.createElement('div');
|
|
46
63
|
return;
|
|
@@ -63,9 +80,6 @@ var LazyNodeView = exports.LazyNodeView = /*#__PURE__*/function () {
|
|
|
63
80
|
// before the test started
|
|
64
81
|
this.dom.setAttribute('data-lazy-node-view-fallback', 'true');
|
|
65
82
|
}
|
|
66
|
-
nodeViewLoader.then(function () {
|
|
67
|
-
_this.isNodeViewLoaded = true;
|
|
68
|
-
});
|
|
69
83
|
}
|
|
70
84
|
(0, _createClass2.default)(LazyNodeView, [{
|
|
71
85
|
key: "ignoreMutation",
|
|
@@ -11,6 +11,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
11
11
|
defaultMessage: 'Drag to move',
|
|
12
12
|
description: 'Use drag handle to move content'
|
|
13
13
|
},
|
|
14
|
+
insert: {
|
|
15
|
+
id: 'fabric.editor.blockControlInsert',
|
|
16
|
+
defaultMessage: 'Insert',
|
|
17
|
+
description: 'Label on button to insert content at the current cursor position'
|
|
18
|
+
},
|
|
14
19
|
moveUp: {
|
|
15
20
|
id: 'fabric.editor.blockControlMoveUp',
|
|
16
21
|
defaultMessage: 'Move up',
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "88.
|
|
20
|
+
var packageVersion = "88.9.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -25,7 +25,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
25
25
|
* @jsx jsx
|
|
26
26
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
27
27
|
var packageName = "@atlaskit/editor-common";
|
|
28
|
-
var packageVersion = "88.
|
|
28
|
+
var packageVersion = "88.9.0";
|
|
29
29
|
var halfFocusRing = 1;
|
|
30
30
|
var dropOffset = '0, 8';
|
|
31
31
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -54,7 +54,7 @@ const testOnlyIgnoreLazyNodeViewSet = new WeakSet();
|
|
|
54
54
|
*
|
|
55
55
|
* This needs to be replaced with proper implementation once LazyNodeView is converted to a plugin.
|
|
56
56
|
*
|
|
57
|
-
* @deprecated DO NOT USE THIS
|
|
57
|
+
* @deprecated DO NOT USE THIS OUTSIDE TESTS.
|
|
58
58
|
*/
|
|
59
59
|
export function testOnlyIgnoreLazyNodeView(view) {
|
|
60
60
|
testOnlyIgnoreLazyNodeViewSet.add(view);
|
|
@@ -122,7 +122,7 @@ export const withLazyLoading = ({
|
|
|
122
122
|
if (resolvedNodeView && !testOnlyIgnoreLazyNodeViewSet.has(view)) {
|
|
123
123
|
return resolvedNodeView(node, view, getPos, decorations);
|
|
124
124
|
}
|
|
125
|
-
return new LazyNodeView(node, view, getPos,
|
|
125
|
+
return new LazyNodeView(node, view, getPos, decorations);
|
|
126
126
|
}
|
|
127
127
|
const loaderPromise = loader().then(nodeViewFuncModule => {
|
|
128
128
|
var _resolvedNodesPerEdit;
|
|
@@ -169,7 +169,7 @@ export const withLazyLoading = ({
|
|
|
169
169
|
// },
|
|
170
170
|
// });
|
|
171
171
|
}
|
|
172
|
-
return new LazyNodeView(node, view, getPos,
|
|
172
|
+
return new LazyNodeView(node, view, getPos, decorations);
|
|
173
173
|
};
|
|
174
174
|
return createLazyNodeView;
|
|
175
175
|
};
|
|
@@ -6,21 +6,38 @@ const getEditorLineWidth = memoize(view => {
|
|
|
6
6
|
return (_view$dom = view.dom) === null || _view$dom === void 0 ? void 0 : _view$dom.clientWidth;
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
+
// Copied from ProseMirror NodeView
|
|
10
|
+
// https://github.com/ProseMirror/prosemirror-view/blob/cfa73eb969777f63bcb39972594fd4a9110f5a93/src/viewdesc.ts#L1095-L1099
|
|
11
|
+
function sameOuterDeco(a, b) {
|
|
12
|
+
if (a.length !== b.length) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
for (let i = 0; i < a.length; i++) {
|
|
16
|
+
// @ts-expect-error type actually exist on decoration at runtime
|
|
17
|
+
if (!a[i].type) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// @ts-expect-error type actually exist on decoration at runtime
|
|
22
|
+
if (!a[i].type.eq(b[i].type)) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
|
|
9
29
|
/**
|
|
10
30
|
* 🧱 Internal: Editor FE Platform
|
|
11
31
|
*
|
|
12
32
|
* A NodeView that serves as a placeholder until the actual NodeView is loaded.
|
|
13
33
|
*/
|
|
14
34
|
export class LazyNodeView {
|
|
15
|
-
constructor(_node, view, _getPos,
|
|
35
|
+
constructor(_node, view, _getPos, _outerDeco) {
|
|
16
36
|
var _node$type, _node$type$spec;
|
|
17
|
-
_defineProperty(this, "update", node => {
|
|
37
|
+
_defineProperty(this, "update", (node, outerDeco) => {
|
|
18
38
|
const prevNode = this.node;
|
|
19
39
|
this.node = node;
|
|
20
|
-
|
|
21
|
-
// Forcing NodeView to be re-created
|
|
22
|
-
// so that ProseMirror can replace LazyNodeView with the real one.
|
|
23
|
-
if (this.isNodeViewLoaded) {
|
|
40
|
+
if (!sameOuterDeco(outerDeco, this.outerDeco)) {
|
|
24
41
|
return false;
|
|
25
42
|
}
|
|
26
43
|
|
|
@@ -29,7 +46,7 @@ export class LazyNodeView {
|
|
|
29
46
|
return !this.node.sameMarkup(prevNode);
|
|
30
47
|
});
|
|
31
48
|
this.node = _node;
|
|
32
|
-
this.
|
|
49
|
+
this.outerDeco = _outerDeco;
|
|
33
50
|
if (typeof ((_node$type = _node.type) === null || _node$type === void 0 ? void 0 : (_node$type$spec = _node$type.spec) === null || _node$type$spec === void 0 ? void 0 : _node$type$spec.toDOM) !== 'function') {
|
|
34
51
|
this.dom = document.createElement('div');
|
|
35
52
|
return;
|
|
@@ -52,9 +69,6 @@ export class LazyNodeView {
|
|
|
52
69
|
// before the test started
|
|
53
70
|
this.dom.setAttribute('data-lazy-node-view-fallback', 'true');
|
|
54
71
|
}
|
|
55
|
-
nodeViewLoader.then(() => {
|
|
56
|
-
this.isNodeViewLoaded = true;
|
|
57
|
-
});
|
|
58
72
|
}
|
|
59
73
|
ignoreMutation() {
|
|
60
74
|
if (this.node.type.isTextblock) {
|
|
@@ -5,6 +5,11 @@ export const messages = defineMessages({
|
|
|
5
5
|
defaultMessage: 'Drag to move',
|
|
6
6
|
description: 'Use drag handle to move content'
|
|
7
7
|
},
|
|
8
|
+
insert: {
|
|
9
|
+
id: 'fabric.editor.blockControlInsert',
|
|
10
|
+
defaultMessage: 'Insert',
|
|
11
|
+
description: 'Label on button to insert content at the current cursor position'
|
|
12
|
+
},
|
|
8
13
|
moveUp: {
|
|
9
14
|
id: 'fabric.editor.blockControlMoveUp',
|
|
10
15
|
defaultMessage: 'Move up',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "88.
|
|
4
|
+
const packageVersion = "88.9.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "88.
|
|
17
|
+
const packageVersion = "88.9.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
class DropList extends Component {
|
|
@@ -55,7 +55,7 @@ var testOnlyIgnoreLazyNodeViewSet = new WeakSet();
|
|
|
55
55
|
*
|
|
56
56
|
* This needs to be replaced with proper implementation once LazyNodeView is converted to a plugin.
|
|
57
57
|
*
|
|
58
|
-
* @deprecated DO NOT USE THIS
|
|
58
|
+
* @deprecated DO NOT USE THIS OUTSIDE TESTS.
|
|
59
59
|
*/
|
|
60
60
|
export function testOnlyIgnoreLazyNodeView(view) {
|
|
61
61
|
testOnlyIgnoreLazyNodeViewSet.add(view);
|
|
@@ -122,7 +122,7 @@ export var withLazyLoading = function withLazyLoading(_ref) {
|
|
|
122
122
|
if (resolvedNodeView && !testOnlyIgnoreLazyNodeViewSet.has(view)) {
|
|
123
123
|
return resolvedNodeView(node, view, getPos, decorations);
|
|
124
124
|
}
|
|
125
|
-
return new LazyNodeView(node, view, getPos,
|
|
125
|
+
return new LazyNodeView(node, view, getPos, decorations);
|
|
126
126
|
}
|
|
127
127
|
var loaderPromise = loader().then(function (nodeViewFuncModule) {
|
|
128
128
|
var _resolvedNodesPerEdit;
|
|
@@ -172,7 +172,7 @@ export var withLazyLoading = function withLazyLoading(_ref) {
|
|
|
172
172
|
// },
|
|
173
173
|
// });
|
|
174
174
|
}
|
|
175
|
-
return new LazyNodeView(node, view, getPos,
|
|
175
|
+
return new LazyNodeView(node, view, getPos, decorations);
|
|
176
176
|
};
|
|
177
177
|
return createLazyNodeView;
|
|
178
178
|
};
|
|
@@ -8,23 +8,40 @@ var getEditorLineWidth = memoize(function (view) {
|
|
|
8
8
|
return (_view$dom = view.dom) === null || _view$dom === void 0 ? void 0 : _view$dom.clientWidth;
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
+
// Copied from ProseMirror NodeView
|
|
12
|
+
// https://github.com/ProseMirror/prosemirror-view/blob/cfa73eb969777f63bcb39972594fd4a9110f5a93/src/viewdesc.ts#L1095-L1099
|
|
13
|
+
function sameOuterDeco(a, b) {
|
|
14
|
+
if (a.length !== b.length) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
for (var i = 0; i < a.length; i++) {
|
|
18
|
+
// @ts-expect-error type actually exist on decoration at runtime
|
|
19
|
+
if (!a[i].type) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// @ts-expect-error type actually exist on decoration at runtime
|
|
24
|
+
if (!a[i].type.eq(b[i].type)) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
|
|
11
31
|
/**
|
|
12
32
|
* 🧱 Internal: Editor FE Platform
|
|
13
33
|
*
|
|
14
34
|
* A NodeView that serves as a placeholder until the actual NodeView is loaded.
|
|
15
35
|
*/
|
|
16
36
|
export var LazyNodeView = /*#__PURE__*/function () {
|
|
17
|
-
function LazyNodeView(_node, view, _getPos,
|
|
37
|
+
function LazyNodeView(_node, view, _getPos, _outerDeco) {
|
|
18
38
|
var _this = this,
|
|
19
39
|
_node$type;
|
|
20
40
|
_classCallCheck(this, LazyNodeView);
|
|
21
|
-
_defineProperty(this, "update", function (node) {
|
|
41
|
+
_defineProperty(this, "update", function (node, outerDeco) {
|
|
22
42
|
var prevNode = _this.node;
|
|
23
43
|
_this.node = node;
|
|
24
|
-
|
|
25
|
-
// Forcing NodeView to be re-created
|
|
26
|
-
// so that ProseMirror can replace LazyNodeView with the real one.
|
|
27
|
-
if (_this.isNodeViewLoaded) {
|
|
44
|
+
if (!sameOuterDeco(outerDeco, _this.outerDeco)) {
|
|
28
45
|
return false;
|
|
29
46
|
}
|
|
30
47
|
|
|
@@ -33,7 +50,7 @@ export var LazyNodeView = /*#__PURE__*/function () {
|
|
|
33
50
|
return !_this.node.sameMarkup(prevNode);
|
|
34
51
|
});
|
|
35
52
|
this.node = _node;
|
|
36
|
-
this.
|
|
53
|
+
this.outerDeco = _outerDeco;
|
|
37
54
|
if (typeof ((_node$type = _node.type) === null || _node$type === void 0 || (_node$type = _node$type.spec) === null || _node$type === void 0 ? void 0 : _node$type.toDOM) !== 'function') {
|
|
38
55
|
this.dom = document.createElement('div');
|
|
39
56
|
return;
|
|
@@ -56,9 +73,6 @@ export var LazyNodeView = /*#__PURE__*/function () {
|
|
|
56
73
|
// before the test started
|
|
57
74
|
this.dom.setAttribute('data-lazy-node-view-fallback', 'true');
|
|
58
75
|
}
|
|
59
|
-
nodeViewLoader.then(function () {
|
|
60
|
-
_this.isNodeViewLoaded = true;
|
|
61
|
-
});
|
|
62
76
|
}
|
|
63
77
|
_createClass(LazyNodeView, [{
|
|
64
78
|
key: "ignoreMutation",
|
|
@@ -5,6 +5,11 @@ export var messages = defineMessages({
|
|
|
5
5
|
defaultMessage: 'Drag to move',
|
|
6
6
|
description: 'Use drag handle to move content'
|
|
7
7
|
},
|
|
8
|
+
insert: {
|
|
9
|
+
id: 'fabric.editor.blockControlInsert',
|
|
10
|
+
defaultMessage: 'Insert',
|
|
11
|
+
description: 'Label on button to insert content at the current cursor position'
|
|
12
|
+
},
|
|
8
13
|
moveUp: {
|
|
9
14
|
id: 'fabric.editor.blockControlMoveUp',
|
|
10
15
|
defaultMessage: 'Move up',
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "88.
|
|
10
|
+
var packageVersion = "88.9.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -22,7 +22,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
22
22
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
23
23
|
import Layer from '../Layer';
|
|
24
24
|
var packageName = "@atlaskit/editor-common";
|
|
25
|
-
var packageVersion = "88.
|
|
25
|
+
var packageVersion = "88.9.0";
|
|
26
26
|
var halfFocusRing = 1;
|
|
27
27
|
var dropOffset = '0, 8';
|
|
28
28
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -12,16 +12,36 @@ type TypeAheadItemViewedAEP = OperationalAEP<ACTION.VIEWED, ACTION_SUBJECT.TYPEA
|
|
|
12
12
|
}>;
|
|
13
13
|
type TypeAheadAEP<ActionSubjectID, Attributes> = UIAEP<ACTION.INVOKED, ACTION_SUBJECT.TYPEAHEAD, ActionSubjectID, Attributes, undefined>;
|
|
14
14
|
type TypeAheadEmojiAEP = TypeAheadAEP<ACTION_SUBJECT_ID.TYPEAHEAD_EMOJI | TypeAheadAvailableNodes.EMOJI, {
|
|
15
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
15
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
16
|
+
/**
|
|
17
|
+
* For Typeahead - Empty line prompt experiment
|
|
18
|
+
* Clean up ticket ED-24824
|
|
19
|
+
*/
|
|
20
|
+
| 'blockControl';
|
|
16
21
|
}>;
|
|
17
22
|
type TypeAheadLinkAEP = TypeAheadAEP<ACTION_SUBJECT_ID.TYPEAHEAD_LINK, {
|
|
18
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.SHORTCUT
|
|
23
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.SHORTCUT
|
|
24
|
+
/**
|
|
25
|
+
* For Typeahead - Empty line prompt experiment
|
|
26
|
+
* Clean up ticket ED-24824
|
|
27
|
+
*/
|
|
28
|
+
| 'blockControl';
|
|
19
29
|
}>;
|
|
20
30
|
type TypeAheadMentionAEP = TypeAheadAEP<ACTION_SUBJECT_ID.TYPEAHEAD_MENTION | TypeAheadAvailableNodes.MENTION, {
|
|
21
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
31
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
32
|
+
/**
|
|
33
|
+
* For Typeahead - Empty line prompt experiment
|
|
34
|
+
* Clean up ticket ED-24824
|
|
35
|
+
*/
|
|
36
|
+
| 'blockControl';
|
|
22
37
|
}>;
|
|
23
38
|
type TypeAheadQuickInsertAEP = TypeAheadAEP<ACTION_SUBJECT_ID.TYPEAHEAD_QUICK_INSERT | TypeAheadAvailableNodes.QUICK_INSERT, {
|
|
24
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
39
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
40
|
+
/**
|
|
41
|
+
* For Typeahead - Empty line prompt experiment
|
|
42
|
+
* Clean up ticket ED-24824
|
|
43
|
+
*/
|
|
44
|
+
| 'blockControl';
|
|
25
45
|
}>;
|
|
26
46
|
export type TypeAheadPayload = TypeAheadEmojiAEP | TypeAheadLinkAEP | TypeAheadMentionAEP | TypeAheadQuickInsertAEP | TypeAheadRenderedAEP | TypeAheadItemViewedAEP;
|
|
27
47
|
export type EventInput = 'keyboard' | 'mouse' | 'floatingToolBar';
|
|
@@ -35,7 +35,7 @@ export type LazyLoadingProps<NodeViewOptions> = {
|
|
|
35
35
|
*
|
|
36
36
|
* This needs to be replaced with proper implementation once LazyNodeView is converted to a plugin.
|
|
37
37
|
*
|
|
38
|
-
* @deprecated DO NOT USE THIS
|
|
38
|
+
* @deprecated DO NOT USE THIS OUTSIDE TESTS.
|
|
39
39
|
*/
|
|
40
40
|
export declare function testOnlyIgnoreLazyNodeView(view: EditorView): void;
|
|
41
41
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
+
import type { Decoration, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
/**
|
|
4
4
|
* 🧱 Internal: Editor FE Platform
|
|
5
5
|
*
|
|
@@ -9,8 +9,8 @@ export declare class LazyNodeView implements NodeView {
|
|
|
9
9
|
dom: Node;
|
|
10
10
|
contentDOM?: HTMLElement;
|
|
11
11
|
private node;
|
|
12
|
-
private
|
|
13
|
-
constructor(node: PMNode, view: EditorView, _getPos: () => number | undefined,
|
|
14
|
-
update: (node: PMNode) => boolean;
|
|
12
|
+
private outerDeco;
|
|
13
|
+
constructor(node: PMNode, view: EditorView, _getPos: () => number | undefined, outerDeco: readonly Decoration[]);
|
|
14
|
+
update: (node: PMNode, outerDeco: readonly Decoration[]) => boolean;
|
|
15
15
|
ignoreMutation(): boolean;
|
|
16
16
|
}
|
|
@@ -12,16 +12,36 @@ type TypeAheadItemViewedAEP = OperationalAEP<ACTION.VIEWED, ACTION_SUBJECT.TYPEA
|
|
|
12
12
|
}>;
|
|
13
13
|
type TypeAheadAEP<ActionSubjectID, Attributes> = UIAEP<ACTION.INVOKED, ACTION_SUBJECT.TYPEAHEAD, ActionSubjectID, Attributes, undefined>;
|
|
14
14
|
type TypeAheadEmojiAEP = TypeAheadAEP<ACTION_SUBJECT_ID.TYPEAHEAD_EMOJI | TypeAheadAvailableNodes.EMOJI, {
|
|
15
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
15
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
16
|
+
/**
|
|
17
|
+
* For Typeahead - Empty line prompt experiment
|
|
18
|
+
* Clean up ticket ED-24824
|
|
19
|
+
*/
|
|
20
|
+
| 'blockControl';
|
|
16
21
|
}>;
|
|
17
22
|
type TypeAheadLinkAEP = TypeAheadAEP<ACTION_SUBJECT_ID.TYPEAHEAD_LINK, {
|
|
18
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.SHORTCUT
|
|
23
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.SHORTCUT
|
|
24
|
+
/**
|
|
25
|
+
* For Typeahead - Empty line prompt experiment
|
|
26
|
+
* Clean up ticket ED-24824
|
|
27
|
+
*/
|
|
28
|
+
| 'blockControl';
|
|
19
29
|
}>;
|
|
20
30
|
type TypeAheadMentionAEP = TypeAheadAEP<ACTION_SUBJECT_ID.TYPEAHEAD_MENTION | TypeAheadAvailableNodes.MENTION, {
|
|
21
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
31
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
32
|
+
/**
|
|
33
|
+
* For Typeahead - Empty line prompt experiment
|
|
34
|
+
* Clean up ticket ED-24824
|
|
35
|
+
*/
|
|
36
|
+
| 'blockControl';
|
|
22
37
|
}>;
|
|
23
38
|
type TypeAheadQuickInsertAEP = TypeAheadAEP<ACTION_SUBJECT_ID.TYPEAHEAD_QUICK_INSERT | TypeAheadAvailableNodes.QUICK_INSERT, {
|
|
24
|
-
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
39
|
+
inputMethod: INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.KEYBOARD
|
|
40
|
+
/**
|
|
41
|
+
* For Typeahead - Empty line prompt experiment
|
|
42
|
+
* Clean up ticket ED-24824
|
|
43
|
+
*/
|
|
44
|
+
| 'blockControl';
|
|
25
45
|
}>;
|
|
26
46
|
export type TypeAheadPayload = TypeAheadEmojiAEP | TypeAheadLinkAEP | TypeAheadMentionAEP | TypeAheadQuickInsertAEP | TypeAheadRenderedAEP | TypeAheadItemViewedAEP;
|
|
27
47
|
export type EventInput = 'keyboard' | 'mouse' | 'floatingToolBar';
|
|
@@ -35,7 +35,7 @@ export type LazyLoadingProps<NodeViewOptions> = {
|
|
|
35
35
|
*
|
|
36
36
|
* This needs to be replaced with proper implementation once LazyNodeView is converted to a plugin.
|
|
37
37
|
*
|
|
38
|
-
* @deprecated DO NOT USE THIS
|
|
38
|
+
* @deprecated DO NOT USE THIS OUTSIDE TESTS.
|
|
39
39
|
*/
|
|
40
40
|
export declare function testOnlyIgnoreLazyNodeView(view: EditorView): void;
|
|
41
41
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
+
import type { Decoration, EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
3
3
|
/**
|
|
4
4
|
* 🧱 Internal: Editor FE Platform
|
|
5
5
|
*
|
|
@@ -9,8 +9,8 @@ export declare class LazyNodeView implements NodeView {
|
|
|
9
9
|
dom: Node;
|
|
10
10
|
contentDOM?: HTMLElement;
|
|
11
11
|
private node;
|
|
12
|
-
private
|
|
13
|
-
constructor(node: PMNode, view: EditorView, _getPos: () => number | undefined,
|
|
14
|
-
update: (node: PMNode) => boolean;
|
|
12
|
+
private outerDeco;
|
|
13
|
+
constructor(node: PMNode, view: EditorView, _getPos: () => number | undefined, outerDeco: readonly Decoration[]);
|
|
14
|
+
update: (node: PMNode, outerDeco: readonly Decoration[]) => boolean;
|
|
15
15
|
ignoreMutation(): boolean;
|
|
16
16
|
}
|
package/package.json
CHANGED