@atlaskit/editor-plugin-layout 15.0.4 → 15.1.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 CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/editor-plugin-layout
2
2
 
3
+ ## 15.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`da5eaf0bc37da`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/da5eaf0bc37da) -
8
+ Clean up the platform_editor_editor_ssr_streaming experiment. The SSR streaming code paths are now
9
+ permanent and the isSSRStreaming() utility has been removed from
10
+ @atlaskit/editor-common/core-utils.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
16
+ ## 15.0.5
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 15.0.4
4
23
 
5
24
  ### Patch Changes
package/compass.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  configVersion: 1
2
2
  id: ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:component/c5751cc6-3513-4070-9deb-af31e86aed34/62465bbb-a5c8-4a63-b621-06ee9616feb5
3
3
  name: '@atlaskit/editor-plugin-layout'
4
- ownerId: ari:cloud:identity::team/2484e1f6-f62c-4a70-95f1-8e5695c51b6b # Editor Jenga
4
+ ownerId: ari:cloud:identity::team/cf6a670b-5252-4c68-a769-9207de366beb # Editor Developers
5
5
  labels:
6
6
  - platform-code
7
7
  - platform-afm
@@ -16,14 +16,14 @@ links:
16
16
  url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master
17
17
  - name: Slack Channel
18
18
  type: CHAT_CHANNEL
19
- url: https://atlassian.enterprise.slack.com/archives/C061GUMN3NY # #team-cc-editor-exp-cloud-native
19
+ url: https://atlassian.enterprise.slack.com/archives/CFG3PSQ9E # #help-editor
20
20
  - name: Editor Plugin Layout
21
21
  type: REPOSITORY
22
22
  url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/editor/editor-plugin-layout
23
23
  customFields:
24
24
  - name: Department
25
25
  type: text
26
- value: Eng - Editor Autonomy - Jenga
26
+ value: Editor Developers
27
27
  - name: Trusted Reviewer Teams
28
28
  type: text
29
29
  value: ari:cloud:identity::team/cf6a670b-5252-4c68-a769-9207de366beb
@@ -247,7 +247,7 @@ var LayoutSectionView = exports.LayoutSectionView = /*#__PURE__*/function (_Reac
247
247
  // LayoutSSRReactContextsProvider wraps the placeholder to inject the
248
248
  // editor's IntlShape, defending against any descendants that call
249
249
  // `useIntl()` during renderToStaticMarkup.
250
- if ((0, _coreUtils.isSSR)() && (0, _coreUtils.isSSRStreaming)()) {
250
+ if ((0, _coreUtils.isSSR)()) {
251
251
  return /*#__PURE__*/_react.default.createElement(_LayoutSSRReactContextsProvider.LayoutSSRReactContextsProvider, {
252
252
  intl: this.intl
253
253
  }, /*#__PURE__*/_react.default.createElement(_reactNodeView.NodeViewContentHole, {
@@ -29,7 +29,7 @@ var pluginKey = exports.pluginKey = new _state.PluginKey('layoutResizingPlugin')
29
29
  * PM transactions) are not "corrected" back by ProseMirror's DOM reconciliation.
30
30
  */
31
31
  var isLayoutElementLike = function isLayoutElementLike(element) {
32
- if ((0, _coreUtils.isSSR)() && (0, _coreUtils.isSSRStreaming)()) {
32
+ if ((0, _coreUtils.isSSR)()) {
33
33
  // In SSR environments, `HTMLElement` is undefined globally so a plain
34
34
  // `instanceof HTMLElement` check is always `false`. That makes the
35
35
  // `DOMSerializer.renderSpec(...)` result get rejected by the guard below and
@@ -38,9 +38,8 @@ var isLayoutElementLike = function isLayoutElementLike(element) {
38
38
  // `data-column-width`, plus the inner `<div data-layout-content="true">`
39
39
  // wrapper) and breaking the layout's flex sizing in SSR output.
40
40
  //
41
- // To unblock SSR streaming without changing CSR semantics, we gate the check:
42
- // - In SSR (and only when `platform_editor_editor_ssr_streaming` is enabled),
43
- // use a duck-typed check that mirrors `safe-plugin`'s `isHTMLElement`.
41
+ // To unblock SSR without changing CSR semantics, we gate the check:
42
+ // - In SSR, use a duck-typed check that mirrors `safe-plugin`'s `isHTMLElement`.
44
43
  // - Everywhere else, keep the original `instanceof HTMLElement` check exactly
45
44
  // as it was so we don't accidentally widen acceptance in CSR.
46
45
  if (element === null || element === undefined) {
@@ -112,7 +111,7 @@ var _default = exports.default = function _default(options, pluginInjectionApi,
112
111
  intl: intl
113
112
  }).init();
114
113
  }
115
- }, (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true) || (0, _coreUtils.isSSR)() && (0, _coreUtils.isSSRStreaming)() ? {
114
+ }, (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true) || (0, _coreUtils.isSSR)() ? {
116
115
  layoutColumn: function layoutColumn(node, view, getPos) {
117
116
  return new LayoutColumnView(node, view, getPos);
118
117
  }
@@ -22,7 +22,7 @@ var _coreUtils = require("@atlaskit/editor-common/core-utils");
22
22
  function LayoutSSRReactContextsProvider(_ref) {
23
23
  var children = _ref.children,
24
24
  intl = _ref.intl;
25
- if (!(0, _coreUtils.isSSRStreaming)() || !(0, _coreUtils.isSSR)()) {
25
+ if (!(0, _coreUtils.isSSR)()) {
26
26
  return children;
27
27
  }
28
28
  if (!intl) {
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback } from 'react';
2
- import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
2
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
3
3
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
4
  import ReactNodeView, { NodeViewContentHole } from '@atlaskit/editor-common/react-node-view';
5
5
  import { BreakoutResizer, ignoreResizerMutations } from '@atlaskit/editor-common/resizer';
@@ -220,7 +220,7 @@ export class LayoutSectionView extends ReactNodeView {
220
220
  // LayoutSSRReactContextsProvider wraps the placeholder to inject the
221
221
  // editor's IntlShape, defending against any descendants that call
222
222
  // `useIntl()` during renderToStaticMarkup.
223
- if (isSSR() && isSSRStreaming()) {
223
+ if (isSSR()) {
224
224
  return /*#__PURE__*/React.createElement(LayoutSSRReactContextsProvider, {
225
225
  intl: this.intl
226
226
  }, /*#__PURE__*/React.createElement(NodeViewContentHole, {
@@ -1,4 +1,4 @@
1
- import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
1
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
2
2
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
3
3
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
4
4
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -16,7 +16,7 @@ export const pluginKey = new PluginKey('layoutResizingPlugin');
16
16
  * PM transactions) are not "corrected" back by ProseMirror's DOM reconciliation.
17
17
  */
18
18
  const isLayoutElementLike = element => {
19
- if (isSSR() && isSSRStreaming()) {
19
+ if (isSSR()) {
20
20
  // In SSR environments, `HTMLElement` is undefined globally so a plain
21
21
  // `instanceof HTMLElement` check is always `false`. That makes the
22
22
  // `DOMSerializer.renderSpec(...)` result get rejected by the guard below and
@@ -25,9 +25,8 @@ const isLayoutElementLike = element => {
25
25
  // `data-column-width`, plus the inner `<div data-layout-content="true">`
26
26
  // wrapper) and breaking the layout's flex sizing in SSR output.
27
27
  //
28
- // To unblock SSR streaming without changing CSR semantics, we gate the check:
29
- // - In SSR (and only when `platform_editor_editor_ssr_streaming` is enabled),
30
- // use a duck-typed check that mirrors `safe-plugin`'s `isHTMLElement`.
28
+ // To unblock SSR without changing CSR semantics, we gate the check:
29
+ // - In SSR, use a duck-typed check that mirrors `safe-plugin`'s `isHTMLElement`.
31
30
  // - Everywhere else, keep the original `instanceof HTMLElement` check exactly
32
31
  // as it was so we don't accidentally widen acceptance in CSR.
33
32
  if (element === null || element === undefined) {
@@ -100,11 +99,11 @@ export default ((options, pluginInjectionApi, portalProviderAPI, eventDispatcher
100
99
  // suppress style-attribute MutationObserver callbacks during
101
100
  // drag, allowing direct flex-basis writes without PM
102
101
  // interference).
103
- // 2. SSR streaming is enabled — the column node view stamps
102
+ // 2. Rendering on the server — the column node view stamps
104
103
  // `container-type: inline-size` inline on each column dom so
105
104
  // that the SSR-rendered table inside the column constrains
106
105
  // its width to the column (see comment in the constructor).
107
- ...(editorExperiment('platform_editor_layout_column_resize_handle', true) || isSSR() && isSSRStreaming() ? {
106
+ ...(editorExperiment('platform_editor_layout_column_resize_handle', true) || isSSR() ? {
108
107
  layoutColumn: (node, view, getPos) => new LayoutColumnView(node, view, getPos)
109
108
  } : {})
110
109
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { RawIntlProvider } from 'react-intl';
3
- import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
3
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
4
4
  /**
5
5
  * Wraps the layout section nodeview children with the editor's actual
6
6
  * IntlProvider during SSR streaming (renderToStaticMarkup). This ensures any
@@ -16,7 +16,7 @@ export function LayoutSSRReactContextsProvider({
16
16
  children,
17
17
  intl
18
18
  }) {
19
- if (!isSSRStreaming() || !isSSR()) {
19
+ if (!isSSR()) {
20
20
  return children;
21
21
  }
22
22
  if (!intl) {
@@ -9,7 +9,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
9
9
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
10
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
11
  import React, { useCallback } from 'react';
12
- import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
12
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
13
13
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
14
14
  import ReactNodeView, { NodeViewContentHole } from '@atlaskit/editor-common/react-node-view';
15
15
  import { BreakoutResizer, ignoreResizerMutations } from '@atlaskit/editor-common/resizer';
@@ -238,7 +238,7 @@ export var LayoutSectionView = /*#__PURE__*/function (_ReactNodeView) {
238
238
  // LayoutSSRReactContextsProvider wraps the placeholder to inject the
239
239
  // editor's IntlShape, defending against any descendants that call
240
240
  // `useIntl()` during renderToStaticMarkup.
241
- if (isSSR() && isSSRStreaming()) {
241
+ if (isSSR()) {
242
242
  return /*#__PURE__*/React.createElement(LayoutSSRReactContextsProvider, {
243
243
  intl: this.intl
244
244
  }, /*#__PURE__*/React.createElement(NodeViewContentHole, {
@@ -4,7 +4,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
4
4
  import _typeof from "@babel/runtime/helpers/typeof";
5
5
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
- import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
7
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
8
8
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
9
9
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
10
10
  import { PluginKey } from '@atlaskit/editor-prosemirror/state';
@@ -22,7 +22,7 @@ export var pluginKey = new PluginKey('layoutResizingPlugin');
22
22
  * PM transactions) are not "corrected" back by ProseMirror's DOM reconciliation.
23
23
  */
24
24
  var isLayoutElementLike = function isLayoutElementLike(element) {
25
- if (isSSR() && isSSRStreaming()) {
25
+ if (isSSR()) {
26
26
  // In SSR environments, `HTMLElement` is undefined globally so a plain
27
27
  // `instanceof HTMLElement` check is always `false`. That makes the
28
28
  // `DOMSerializer.renderSpec(...)` result get rejected by the guard below and
@@ -31,9 +31,8 @@ var isLayoutElementLike = function isLayoutElementLike(element) {
31
31
  // `data-column-width`, plus the inner `<div data-layout-content="true">`
32
32
  // wrapper) and breaking the layout's flex sizing in SSR output.
33
33
  //
34
- // To unblock SSR streaming without changing CSR semantics, we gate the check:
35
- // - In SSR (and only when `platform_editor_editor_ssr_streaming` is enabled),
36
- // use a duck-typed check that mirrors `safe-plugin`'s `isHTMLElement`.
34
+ // To unblock SSR without changing CSR semantics, we gate the check:
35
+ // - In SSR, use a duck-typed check that mirrors `safe-plugin`'s `isHTMLElement`.
37
36
  // - Everywhere else, keep the original `instanceof HTMLElement` check exactly
38
37
  // as it was so we don't accidentally widen acceptance in CSR.
39
38
  if (element === null || element === undefined) {
@@ -105,7 +104,7 @@ export default (function (options, pluginInjectionApi, portalProviderAPI, eventD
105
104
  intl: intl
106
105
  }).init();
107
106
  }
108
- }, editorExperiment('platform_editor_layout_column_resize_handle', true) || isSSR() && isSSRStreaming() ? {
107
+ }, editorExperiment('platform_editor_layout_column_resize_handle', true) || isSSR() ? {
109
108
  layoutColumn: function layoutColumn(node, view, getPos) {
110
109
  return new LayoutColumnView(node, view, getPos);
111
110
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { RawIntlProvider } from 'react-intl';
3
- import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
3
+ import { isSSR } from '@atlaskit/editor-common/core-utils';
4
4
  /**
5
5
  * Wraps the layout section nodeview children with the editor's actual
6
6
  * IntlProvider during SSR streaming (renderToStaticMarkup). This ensures any
@@ -15,7 +15,7 @@ import { isSSR, isSSRStreaming } from '@atlaskit/editor-common/core-utils';
15
15
  export function LayoutSSRReactContextsProvider(_ref) {
16
16
  var children = _ref.children,
17
17
  intl = _ref.intl;
18
- if (!isSSRStreaming() || !isSSR()) {
18
+ if (!isSSR()) {
19
19
  return children;
20
20
  }
21
21
  if (!intl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-layout",
3
- "version": "15.0.4",
3
+ "version": "15.1.0",
4
4
  "description": "Layout plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,24 +32,24 @@
32
32
  "@atlaskit/editor-plugin-interaction": "^25.0.0",
33
33
  "@atlaskit/editor-plugin-selection": "^14.0.0",
34
34
  "@atlaskit/editor-plugin-toolbar": "^11.0.0",
35
- "@atlaskit/editor-plugin-ui-control-registry": "^8.0.0",
35
+ "@atlaskit/editor-plugin-ui-control-registry": "^8.1.0",
36
36
  "@atlaskit/editor-plugin-user-intent": "^12.0.0",
37
37
  "@atlaskit/editor-plugin-width": "^15.0.0",
38
38
  "@atlaskit/editor-prosemirror": "^8.0.0",
39
39
  "@atlaskit/editor-shared-styles": "^4.0.0",
40
40
  "@atlaskit/editor-toolbar": "^2.4.0",
41
- "@atlaskit/editor-ui-control-model": "^2.4.0",
41
+ "@atlaskit/editor-ui-control-model": "^2.6.0",
42
42
  "@atlaskit/icon": "^37.3.0",
43
43
  "@atlaskit/icon-lab": "^7.5.0",
44
44
  "@atlaskit/platform-feature-flags": "^2.1.0",
45
- "@atlaskit/tmp-editor-statsig": "^146.0.0",
46
- "@atlaskit/tokens": "^16.6.0",
45
+ "@atlaskit/tmp-editor-statsig": "^147.1.0",
46
+ "@atlaskit/tokens": "^16.7.0",
47
47
  "@babel/runtime": "^7.0.0",
48
48
  "@emotion/react": "^11.7.1",
49
49
  "bind-event-listener": "^3.0.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@atlaskit/editor-common": "^118.4.0",
52
+ "@atlaskit/editor-common": "^118.12.0",
53
53
  "react": "^18.2.0 || ^19.2.0",
54
54
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
55
55
  },
@@ -89,11 +89,6 @@
89
89
  ]
90
90
  }
91
91
  },
92
- "stricter": {
93
- "no-unused-dependencies": {
94
- "checkDevDependencies": true
95
- }
96
- },
97
92
  "platform-feature-flags": {
98
93
  "platform_editor_element_browser_analytic": {
99
94
  "type": "boolean"