@atlaskit/editor-common 102.5.1 → 102.5.2
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 +9 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +13 -8
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +12 -7
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +13 -8
- package/dist/esm/ui/DropList/index.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 102.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#123036](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/123036)
|
|
8
|
+
[`08a3386cf1088`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/08a3386cf1088) -
|
|
9
|
+
Editor virtualization experiment adjustment, fixes
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 102.5.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -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 && {}.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 = "102.5.
|
|
20
|
+
var packageVersion = "102.5.2";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// Ignored via go/ees007
|
|
@@ -23,6 +23,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
23
23
|
* @jsxRuntime classic
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
|
+
var isSSR = Boolean(process.env.REACT_SSR);
|
|
26
27
|
var inlineNodeViewClassname = exports.inlineNodeViewClassname = 'inlineNodeView';
|
|
27
28
|
|
|
28
29
|
// number of initial nodes to allow React to render before switching to fallback
|
|
@@ -30,23 +31,27 @@ var initialReactRenderedNodeCount = 0;
|
|
|
30
31
|
var canRenderFallback = function canRenderFallback(node) {
|
|
31
32
|
return node.type.isInline && node.type.isAtom && node.type.isLeaf;
|
|
32
33
|
};
|
|
34
|
+
|
|
35
|
+
// list of inline nodes with toDOM fallback implementations that can be virtualized. As
|
|
36
|
+
// additional nodes are converted they should be added here
|
|
37
|
+
var virtualizedNodeWhitelist = ['status', 'mention', 'emoji', 'date', 'inlineCard'];
|
|
33
38
|
var virtualisationConfiguration = function virtualisationConfiguration() {
|
|
34
39
|
var enableVirtualization = false;
|
|
35
40
|
var reactRenderedDocumentPositionThreshold = 0;
|
|
36
41
|
if ((0, _experiments.editorExperiment)('platform_editor_inline_node_virtualization', 'off')) {
|
|
37
42
|
enableVirtualization = false;
|
|
38
|
-
} else if ((0, _experiments.editorExperiment)('platform_editor_inline_node_virtualization', '
|
|
39
|
-
enableVirtualization = true;
|
|
40
|
-
reactRenderedDocumentPositionThreshold = 0;
|
|
41
|
-
} else if ((0, _experiments.editorExperiment)('platform_editor_inline_node_virtualization', 'fallbackoffscreen')) {
|
|
42
|
-
enableVirtualization = true;
|
|
43
|
+
} else if ((0, _experiments.editorExperiment)('platform_editor_inline_node_virtualization', 'fallback-small')) {
|
|
44
|
+
enableVirtualization = true && !isSSR;
|
|
43
45
|
reactRenderedDocumentPositionThreshold = 100;
|
|
46
|
+
} else if ((0, _experiments.editorExperiment)('platform_editor_inline_node_virtualization', 'fallback-large')) {
|
|
47
|
+
enableVirtualization = true && !isSSR;
|
|
48
|
+
reactRenderedDocumentPositionThreshold = 400;
|
|
44
49
|
}
|
|
45
50
|
return {
|
|
46
51
|
enableVirtualization: enableVirtualization,
|
|
47
52
|
reactRenderedDocumentPositionThreshold: reactRenderedDocumentPositionThreshold,
|
|
48
|
-
virtualizeCurrentNode: function virtualizeCurrentNode() {
|
|
49
|
-
return enableVirtualization && !(initialReactRenderedNodeCount < reactRenderedDocumentPositionThreshold);
|
|
53
|
+
virtualizeCurrentNode: function virtualizeCurrentNode(nodeType) {
|
|
54
|
+
return enableVirtualization && virtualizedNodeWhitelist.includes(nodeType) && !(initialReactRenderedNodeCount < reactRenderedDocumentPositionThreshold);
|
|
50
55
|
}
|
|
51
56
|
};
|
|
52
57
|
};
|
|
@@ -59,7 +64,7 @@ function createNodeView(_ref) {
|
|
|
59
64
|
var _virtualisationConfig = virtualisationConfiguration(),
|
|
60
65
|
enableVirtualization = _virtualisationConfig.enableVirtualization,
|
|
61
66
|
virtualizeCurrentNode = _virtualisationConfig.virtualizeCurrentNode;
|
|
62
|
-
var virtualizeNode = virtualizeCurrentNode();
|
|
67
|
+
var virtualizeNode = virtualizeCurrentNode(nodeViewParams.node.type.name);
|
|
63
68
|
// We set a variable for the current node which is
|
|
64
69
|
// used for comparisions when doing updates, before being
|
|
65
70
|
// overwritten to the updated node.
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "102.5.
|
|
26
|
+
var packageVersion = "102.5.2";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -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 = "102.5.
|
|
4
|
+
const packageVersion = "102.5.2";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -15,6 +15,7 @@ import { analyticsEventKey, browser, getPerformanceOptions, startMeasureReactNod
|
|
|
15
15
|
import { ZERO_WIDTH_SPACE } from '../whitespace';
|
|
16
16
|
import { generateUniqueNodeKey } from './generateUniqueNodeKey';
|
|
17
17
|
import { getOrCreateOnVisibleObserver } from './onVisibleObserverFactory';
|
|
18
|
+
const isSSR = Boolean(process.env.REACT_SSR);
|
|
18
19
|
export const inlineNodeViewClassname = 'inlineNodeView';
|
|
19
20
|
|
|
20
21
|
// number of initial nodes to allow React to render before switching to fallback
|
|
@@ -22,22 +23,26 @@ let initialReactRenderedNodeCount = 0;
|
|
|
22
23
|
const canRenderFallback = node => {
|
|
23
24
|
return node.type.isInline && node.type.isAtom && node.type.isLeaf;
|
|
24
25
|
};
|
|
26
|
+
|
|
27
|
+
// list of inline nodes with toDOM fallback implementations that can be virtualized. As
|
|
28
|
+
// additional nodes are converted they should be added here
|
|
29
|
+
const virtualizedNodeWhitelist = ['status', 'mention', 'emoji', 'date', 'inlineCard'];
|
|
25
30
|
const virtualisationConfiguration = () => {
|
|
26
31
|
let enableVirtualization = false;
|
|
27
32
|
let reactRenderedDocumentPositionThreshold = 0;
|
|
28
33
|
if (editorExperiment('platform_editor_inline_node_virtualization', 'off')) {
|
|
29
34
|
enableVirtualization = false;
|
|
30
|
-
} else if (editorExperiment('platform_editor_inline_node_virtualization', '
|
|
31
|
-
enableVirtualization = true;
|
|
32
|
-
reactRenderedDocumentPositionThreshold = 0;
|
|
33
|
-
} else if (editorExperiment('platform_editor_inline_node_virtualization', 'fallbackoffscreen')) {
|
|
34
|
-
enableVirtualization = true;
|
|
35
|
+
} else if (editorExperiment('platform_editor_inline_node_virtualization', 'fallback-small')) {
|
|
36
|
+
enableVirtualization = true && !isSSR;
|
|
35
37
|
reactRenderedDocumentPositionThreshold = 100;
|
|
38
|
+
} else if (editorExperiment('platform_editor_inline_node_virtualization', 'fallback-large')) {
|
|
39
|
+
enableVirtualization = true && !isSSR;
|
|
40
|
+
reactRenderedDocumentPositionThreshold = 400;
|
|
36
41
|
}
|
|
37
42
|
return {
|
|
38
43
|
enableVirtualization,
|
|
39
44
|
reactRenderedDocumentPositionThreshold,
|
|
40
|
-
virtualizeCurrentNode:
|
|
45
|
+
virtualizeCurrentNode: nodeType => enableVirtualization && virtualizedNodeWhitelist.includes(nodeType) && !(initialReactRenderedNodeCount < reactRenderedDocumentPositionThreshold)
|
|
41
46
|
};
|
|
42
47
|
};
|
|
43
48
|
function createNodeView({
|
|
@@ -51,7 +56,7 @@ function createNodeView({
|
|
|
51
56
|
enableVirtualization,
|
|
52
57
|
virtualizeCurrentNode
|
|
53
58
|
} = virtualisationConfiguration();
|
|
54
|
-
const virtualizeNode = virtualizeCurrentNode();
|
|
59
|
+
const virtualizeNode = virtualizeCurrentNode(nodeViewParams.node.type.name);
|
|
55
60
|
// We set a variable for the current node which is
|
|
56
61
|
// used for comparisions when doing updates, before being
|
|
57
62
|
// overwritten to the updated node.
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "102.5.
|
|
16
|
+
const packageVersion = "102.5.2";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -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 = "102.5.
|
|
10
|
+
var packageVersion = "102.5.2";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -18,6 +18,7 @@ import { analyticsEventKey, browser, getPerformanceOptions, startMeasureReactNod
|
|
|
18
18
|
import { ZERO_WIDTH_SPACE } from '../whitespace';
|
|
19
19
|
import { generateUniqueNodeKey } from './generateUniqueNodeKey';
|
|
20
20
|
import { getOrCreateOnVisibleObserver } from './onVisibleObserverFactory';
|
|
21
|
+
var isSSR = Boolean(process.env.REACT_SSR);
|
|
21
22
|
export var inlineNodeViewClassname = 'inlineNodeView';
|
|
22
23
|
|
|
23
24
|
// number of initial nodes to allow React to render before switching to fallback
|
|
@@ -25,23 +26,27 @@ var initialReactRenderedNodeCount = 0;
|
|
|
25
26
|
var canRenderFallback = function canRenderFallback(node) {
|
|
26
27
|
return node.type.isInline && node.type.isAtom && node.type.isLeaf;
|
|
27
28
|
};
|
|
29
|
+
|
|
30
|
+
// list of inline nodes with toDOM fallback implementations that can be virtualized. As
|
|
31
|
+
// additional nodes are converted they should be added here
|
|
32
|
+
var virtualizedNodeWhitelist = ['status', 'mention', 'emoji', 'date', 'inlineCard'];
|
|
28
33
|
var virtualisationConfiguration = function virtualisationConfiguration() {
|
|
29
34
|
var enableVirtualization = false;
|
|
30
35
|
var reactRenderedDocumentPositionThreshold = 0;
|
|
31
36
|
if (editorExperiment('platform_editor_inline_node_virtualization', 'off')) {
|
|
32
37
|
enableVirtualization = false;
|
|
33
|
-
} else if (editorExperiment('platform_editor_inline_node_virtualization', '
|
|
34
|
-
enableVirtualization = true;
|
|
35
|
-
reactRenderedDocumentPositionThreshold = 0;
|
|
36
|
-
} else if (editorExperiment('platform_editor_inline_node_virtualization', 'fallbackoffscreen')) {
|
|
37
|
-
enableVirtualization = true;
|
|
38
|
+
} else if (editorExperiment('platform_editor_inline_node_virtualization', 'fallback-small')) {
|
|
39
|
+
enableVirtualization = true && !isSSR;
|
|
38
40
|
reactRenderedDocumentPositionThreshold = 100;
|
|
41
|
+
} else if (editorExperiment('platform_editor_inline_node_virtualization', 'fallback-large')) {
|
|
42
|
+
enableVirtualization = true && !isSSR;
|
|
43
|
+
reactRenderedDocumentPositionThreshold = 400;
|
|
39
44
|
}
|
|
40
45
|
return {
|
|
41
46
|
enableVirtualization: enableVirtualization,
|
|
42
47
|
reactRenderedDocumentPositionThreshold: reactRenderedDocumentPositionThreshold,
|
|
43
|
-
virtualizeCurrentNode: function virtualizeCurrentNode() {
|
|
44
|
-
return enableVirtualization && !(initialReactRenderedNodeCount < reactRenderedDocumentPositionThreshold);
|
|
48
|
+
virtualizeCurrentNode: function virtualizeCurrentNode(nodeType) {
|
|
49
|
+
return enableVirtualization && virtualizedNodeWhitelist.includes(nodeType) && !(initialReactRenderedNodeCount < reactRenderedDocumentPositionThreshold);
|
|
45
50
|
}
|
|
46
51
|
};
|
|
47
52
|
};
|
|
@@ -54,7 +59,7 @@ function createNodeView(_ref) {
|
|
|
54
59
|
var _virtualisationConfig = virtualisationConfiguration(),
|
|
55
60
|
enableVirtualization = _virtualisationConfig.enableVirtualization,
|
|
56
61
|
virtualizeCurrentNode = _virtualisationConfig.virtualizeCurrentNode;
|
|
57
|
-
var virtualizeNode = virtualizeCurrentNode();
|
|
62
|
+
var virtualizeNode = virtualizeCurrentNode(nodeViewParams.node.type.name);
|
|
58
63
|
// We set a variable for the current node which is
|
|
59
64
|
// used for comparisions when doing updates, before being
|
|
60
65
|
// overwritten to the updated node.
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "102.5.
|
|
23
|
+
var packageVersion = "102.5.2";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "102.5.
|
|
3
|
+
"version": "102.5.2",
|
|
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/"
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"@atlaskit/task-decision": "^19.1.0",
|
|
162
162
|
"@atlaskit/textfield": "^8.0.0",
|
|
163
163
|
"@atlaskit/tmp-editor-statsig": "^3.6.0",
|
|
164
|
-
"@atlaskit/tokens": "^4.
|
|
164
|
+
"@atlaskit/tokens": "^4.5.0",
|
|
165
165
|
"@atlaskit/tooltip": "^20.0.0",
|
|
166
166
|
"@atlaskit/width-detector": "^5.0.0",
|
|
167
167
|
"@babel/runtime": "^7.0.0",
|