@atlaskit/editor-plugin-synced-block 9.0.3 → 9.1.1
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 +19 -0
- package/dist/cjs/nodeviews/bodiedSyncedBlock.js +1 -2
- package/dist/cjs/ui/SyncBlockSSRReactContextsProvider.js +1 -2
- package/dist/es2019/nodeviews/bodiedSyncedBlock.js +2 -3
- package/dist/es2019/ui/SyncBlockSSRReactContextsProvider.js +2 -3
- package/dist/esm/nodeviews/bodiedSyncedBlock.js +2 -3
- package/dist/esm/ui/SyncBlockSSRReactContextsProvider.js +2 -3
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 9.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 9.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`6e3b4e2317b34`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e3b4e2317b34) -
|
|
14
|
+
[EDITOR-7476](https://hello.jira.atlassian.cloud/browse/EDITOR-7476) - centralize SSR streaming
|
|
15
|
+
checks behind `isSSRStreaming()` so SSR eligibility is checked before emitting exposure for the
|
|
16
|
+
`platform_editor_editor_ssr_streaming` experiment.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 9.0.3
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -18,7 +18,6 @@ var _reactNodeView = _interopRequireDefault(require("@atlaskit/editor-common/rea
|
|
|
18
18
|
var _syncBlock = require("@atlaskit/editor-common/sync-block");
|
|
19
19
|
var _editorPluginConnectivity = require("@atlaskit/editor-plugin-connectivity");
|
|
20
20
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
21
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
22
21
|
var _BodiedSyncBlockWrapper = require("../ui/BodiedSyncBlockWrapper");
|
|
23
22
|
var _SyncBlockLabel = require("../ui/SyncBlockLabel");
|
|
24
23
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -196,7 +195,7 @@ var BodiedSyncBlock = exports.BodiedSyncBlock = /*#__PURE__*/function () {
|
|
|
196
195
|
// contentDOM. Render the label into a separate container to prevent this.
|
|
197
196
|
// On client, render directly into this.dom as before.
|
|
198
197
|
var labelContainer;
|
|
199
|
-
if ((0, _coreUtils.isSSR)() && (0,
|
|
198
|
+
if ((0, _coreUtils.isSSR)() && (0, _coreUtils.isSSRStreaming)()) {
|
|
200
199
|
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- NodeView DOM must be created against active runtime document
|
|
201
200
|
labelContainer = document.createElement('div');
|
|
202
201
|
this.dom.appendChild(labelContainer);
|
|
@@ -8,7 +8,6 @@ exports.SyncBlockSSRReactContextsProvider = SyncBlockSSRReactContextsProvider;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntl = require("react-intl");
|
|
10
10
|
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
11
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
12
11
|
/**
|
|
13
12
|
* Wraps syncBlock nodeview children with the editor's actual IntlProvider during
|
|
14
13
|
* SSR streaming (renderToStaticMarkup). This ensures that components using
|
|
@@ -23,7 +22,7 @@ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
|
23
22
|
function SyncBlockSSRReactContextsProvider(_ref) {
|
|
24
23
|
var children = _ref.children,
|
|
25
24
|
intl = _ref.intl;
|
|
26
|
-
if (!(0,
|
|
25
|
+
if (!(0, _coreUtils.isSSR)() || !(0, _coreUtils.isSSRStreaming)()) {
|
|
27
26
|
return children;
|
|
28
27
|
}
|
|
29
28
|
if (!intl) {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
3
|
+
import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
|
|
4
4
|
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
5
5
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
6
6
|
import { BodiedSyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
7
7
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
8
8
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
9
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
9
|
import { BodiedSyncBlockWrapper } from '../ui/BodiedSyncBlockWrapper';
|
|
11
10
|
import { SyncBlockLabel } from '../ui/SyncBlockLabel';
|
|
12
11
|
const toDOMOld = () => ['div', {
|
|
@@ -161,7 +160,7 @@ export class BodiedSyncBlock {
|
|
|
161
160
|
// contentDOM. Render the label into a separate container to prevent this.
|
|
162
161
|
// On client, render directly into this.dom as before.
|
|
163
162
|
let labelContainer;
|
|
164
|
-
if (isSSR() &&
|
|
163
|
+
if (isSSR() && isSSRStreaming()) {
|
|
165
164
|
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- NodeView DOM must be created against active runtime document
|
|
166
165
|
labelContainer = document.createElement('div');
|
|
167
166
|
this.dom.appendChild(labelContainer);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RawIntlProvider } from 'react-intl';
|
|
3
|
-
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
|
+
import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
|
|
5
4
|
/**
|
|
6
5
|
* Wraps syncBlock nodeview children with the editor's actual IntlProvider during
|
|
7
6
|
* SSR streaming (renderToStaticMarkup). This ensures that components using
|
|
@@ -17,7 +16,7 @@ export function SyncBlockSSRReactContextsProvider({
|
|
|
17
16
|
children,
|
|
18
17
|
intl
|
|
19
18
|
}) {
|
|
20
|
-
if (!
|
|
19
|
+
if (!isSSR() || !isSSRStreaming()) {
|
|
21
20
|
return children;
|
|
22
21
|
}
|
|
23
22
|
if (!intl) {
|
|
@@ -7,13 +7,12 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
10
|
-
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
10
|
+
import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
|
|
11
11
|
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
12
12
|
import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
13
13
|
import { BodiedSyncBlockSharedCssClassName } from '@atlaskit/editor-common/sync-block';
|
|
14
14
|
import { isOfflineMode } from '@atlaskit/editor-plugin-connectivity';
|
|
15
15
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
16
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
16
|
import { BodiedSyncBlockWrapper } from '../ui/BodiedSyncBlockWrapper';
|
|
18
17
|
import { SyncBlockLabel } from '../ui/SyncBlockLabel';
|
|
19
18
|
var toDOMOld = function toDOMOld() {
|
|
@@ -189,7 +188,7 @@ export var BodiedSyncBlock = /*#__PURE__*/function () {
|
|
|
189
188
|
// contentDOM. Render the label into a separate container to prevent this.
|
|
190
189
|
// On client, render directly into this.dom as before.
|
|
191
190
|
var labelContainer;
|
|
192
|
-
if (isSSR() &&
|
|
191
|
+
if (isSSR() && isSSRStreaming()) {
|
|
193
192
|
// eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- NodeView DOM must be created against active runtime document
|
|
194
193
|
labelContainer = document.createElement('div');
|
|
195
194
|
this.dom.appendChild(labelContainer);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RawIntlProvider } from 'react-intl';
|
|
3
|
-
import { isSSR } from '@atlaskit/editor-common/core-utils';
|
|
4
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
|
+
import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
|
|
5
4
|
/**
|
|
6
5
|
* Wraps syncBlock nodeview children with the editor's actual IntlProvider during
|
|
7
6
|
* SSR streaming (renderToStaticMarkup). This ensures that components using
|
|
@@ -16,7 +15,7 @@ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
|
16
15
|
export function SyncBlockSSRReactContextsProvider(_ref) {
|
|
17
16
|
var children = _ref.children,
|
|
18
17
|
intl = _ref.intl;
|
|
19
|
-
if (!
|
|
18
|
+
if (!isSSR() || !isSSRStreaming()) {
|
|
20
19
|
return children;
|
|
21
20
|
}
|
|
22
21
|
if (!intl) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.1",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"@atlaskit/flag": "^17.12.0",
|
|
49
49
|
"@atlaskit/icon": "35.4.0",
|
|
50
50
|
"@atlaskit/icon-lab": "^6.13.0",
|
|
51
|
-
"@atlaskit/logo": "^20.
|
|
51
|
+
"@atlaskit/logo": "^20.2.0",
|
|
52
52
|
"@atlaskit/lozenge": "^13.8.0",
|
|
53
53
|
"@atlaskit/modal-dialog": "^15.2.0",
|
|
54
54
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
55
55
|
"@atlaskit/primitives": "^19.0.0",
|
|
56
56
|
"@atlaskit/spinner": "19.1.2",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^89.
|
|
58
|
-
"@atlaskit/tokens": "13.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^89.1.0",
|
|
58
|
+
"@atlaskit/tokens": "13.2.0",
|
|
59
59
|
"@atlaskit/tooltip": "^22.6.0",
|
|
60
60
|
"@atlaskit/visually-hidden": "^3.1.0",
|
|
61
61
|
"@babel/runtime": "^7.0.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"date-fns": "^2.17.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@atlaskit/editor-common": "^115.
|
|
67
|
+
"@atlaskit/editor-common": "^115.6.0",
|
|
68
68
|
"react": "^18.2.0",
|
|
69
69
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
70
70
|
},
|