@atlaskit/editor-common 115.5.1 → 115.7.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/cjs/core-utils/index.js +8 -1
  3. package/dist/cjs/core-utils/is-ssr-streaming.js +22 -0
  4. package/dist/cjs/extensibility/ExtensionSSRReactContextsProvider.js +2 -2
  5. package/dist/cjs/extensibility/MultiBodiedExtension/action-api.js +43 -0
  6. package/dist/cjs/monitoring/error.js +1 -1
  7. package/dist/cjs/portal/common.js +3 -3
  8. package/dist/cjs/react-node-view/NodeViewContentHole.js +2 -2
  9. package/dist/cjs/react-node-view/index.js +1 -2
  10. package/dist/cjs/styles/shared/table.js +16 -0
  11. package/dist/cjs/ui/DropList/index.js +1 -1
  12. package/dist/cjs/ui/Popup/index.js +9 -3
  13. package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +18 -4
  14. package/dist/es2019/core-utils/index.js +2 -1
  15. package/dist/es2019/core-utils/is-ssr-streaming.js +16 -0
  16. package/dist/es2019/extensibility/ExtensionSSRReactContextsProvider.js +2 -2
  17. package/dist/es2019/extensibility/MultiBodiedExtension/action-api.js +42 -0
  18. package/dist/es2019/monitoring/error.js +1 -1
  19. package/dist/es2019/portal/common.js +3 -3
  20. package/dist/es2019/react-node-view/NodeViewContentHole.js +2 -2
  21. package/dist/es2019/react-node-view/index.js +2 -3
  22. package/dist/es2019/styles/shared/table.js +16 -0
  23. package/dist/es2019/ui/DropList/index.js +1 -1
  24. package/dist/es2019/ui/Popup/index.js +9 -3
  25. package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +18 -4
  26. package/dist/esm/core-utils/index.js +2 -1
  27. package/dist/esm/core-utils/is-ssr-streaming.js +16 -0
  28. package/dist/esm/extensibility/ExtensionSSRReactContextsProvider.js +2 -2
  29. package/dist/esm/extensibility/MultiBodiedExtension/action-api.js +43 -0
  30. package/dist/esm/monitoring/error.js +1 -1
  31. package/dist/esm/portal/common.js +3 -3
  32. package/dist/esm/react-node-view/NodeViewContentHole.js +2 -2
  33. package/dist/esm/react-node-view/index.js +2 -3
  34. package/dist/esm/styles/shared/table.js +16 -0
  35. package/dist/esm/ui/DropList/index.js +1 -1
  36. package/dist/esm/ui/Popup/index.js +9 -3
  37. package/dist/esm/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +18 -4
  38. package/dist/types/analytics/types/insert-events.d.ts +1 -1
  39. package/dist/types/analytics/types/node-events.d.ts +1 -1
  40. package/dist/types/core-utils/index.d.ts +1 -0
  41. package/dist/types/core-utils/is-ssr-streaming.d.ts +10 -0
  42. package/dist/types/extensions/types/extension-handler.d.ts +1 -0
  43. package/dist/types/styles/shared/table.d.ts +14 -0
  44. package/dist/types-ts4.5/analytics/types/insert-events.d.ts +1 -1
  45. package/dist/types-ts4.5/analytics/types/node-events.d.ts +1 -1
  46. package/dist/types-ts4.5/core-utils/index.d.ts +1 -0
  47. package/dist/types-ts4.5/core-utils/is-ssr-streaming.d.ts +10 -0
  48. package/dist/types-ts4.5/extensions/types/extension-handler.d.ts +1 -0
  49. package/dist/types-ts4.5/styles/shared/table.d.ts +14 -0
  50. package/package.json +8 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 115.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`5182f0ffac22f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5182f0ffac22f) -
8
+ Add keyboard shortcuts and danger preview to layout column menu actions.
9
+
10
+ Fix keyboard navigation in the layout column menu.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
16
+ ## 115.6.0
17
+
18
+ ### Minor Changes
19
+
20
+ - [`6e3b4e2317b34`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6e3b4e2317b34) -
21
+ [EDITOR-7476](https://hello.jira.atlassian.cloud/browse/EDITOR-7476) - centralize SSR streaming
22
+ checks behind `isSSRStreaming()` so SSR eligibility is checked before emitting exposure for the
23
+ `platform_editor_editor_ssr_streaming` experiment.
24
+ - [`56d817304449f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/56d817304449f) -
25
+ Add `reorderChildren(fromIndex, toIndex)` action to `MultiBodiedExtensionActions` API to support
26
+ drag-and-drop reordering of MBE body frames alongside their corresponding parameters.
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies
31
+
3
32
  ## 115.5.1
4
33
 
5
34
  ### Patch Changes
@@ -21,6 +21,13 @@ Object.defineProperty(exports, "isSSR", {
21
21
  return _isSsr.isSSR;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "isSSRStreaming", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _isSsrStreaming.isSSRStreaming;
28
+ }
29
+ });
24
30
  var _inside = require("./inside");
25
31
  var _documentLogger = require("./document-logger");
26
- var _isSsr = require("./is-ssr");
32
+ var _isSsr = require("./is-ssr");
33
+ var _isSsrStreaming = require("./is-ssr-streaming");
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isSSRStreaming = isSSRStreaming;
7
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
8
+ /** Returns true if React SSR streaming is actually active at runtime. */
9
+ function isSSRStreaming() {
10
+ try {
11
+ var _process$env;
12
+ var isSSRRendered =
13
+ // In most places there is no document when running on server-side
14
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
15
+ typeof document === 'undefined' || typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.REACT_SSR) || typeof window !== 'undefined' && window.__SSR_RENDERED__ || globalThis.__SSR_RENDERED__;
16
+ var isSSRReactStreaming = typeof window !== 'undefined' && window.__SSR_REACT_STREAMING__ || globalThis.__SSR_REACT_STREAMING__;
17
+ return Boolean(isSSRRendered) && (0, _expValEquals.expValEquals)('platform_editor_editor_ssr_streaming', 'isEnabled', true) && Boolean(isSSRReactStreaming);
18
+ } catch (_unused) {
19
+ // Catch possible error that might occur and just return false
20
+ return false;
21
+ }
22
+ }
@@ -7,12 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.ExtensionSSRReactContextsProvider = ExtensionSSRReactContextsProvider;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntl = require("react-intl");
10
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
10
  var _isSsr = require("../core-utils/is-ssr");
11
+ var _isSsrStreaming = require("../core-utils/is-ssr-streaming");
12
12
  function ExtensionSSRReactContextsProvider(_ref) {
13
13
  var children = _ref.children,
14
14
  intl = _ref.intl;
15
- if (!(0, _expValEquals.expValEquals)('platform_editor_editor_ssr_streaming', 'isEnabled', true) || !(0, _isSsr.isSSR)()) {
15
+ if (!(0, _isSsr.isSSR)() || !(0, _isSsrStreaming.isSSRStreaming)()) {
16
16
  return children;
17
17
  }
18
18
  if (!intl) {
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.useMultiBodiedExtensionActions = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
10
  var _react = _interopRequireDefault(require("react"));
10
11
  var _state = require("@atlaskit/editor-prosemirror/state");
11
12
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
@@ -121,6 +122,48 @@ var useMultiBodiedExtensionActions = exports.useMultiBodiedExtensionActions = fu
121
122
  }
122
123
  return true;
123
124
  },
125
+ reorderChildren: function reorderChildren(fromIndex, toIndex) {
126
+ var pos = getPos();
127
+ if (typeof pos !== 'number' || typeof fromIndex !== 'number' || typeof toIndex !== 'number') {
128
+ throw new Error('Position or index not valid');
129
+ }
130
+ if (fromIndex === toIndex) {
131
+ return true;
132
+ }
133
+ var state = editorView.state,
134
+ dispatch = editorView.dispatch;
135
+
136
+ // Use current node from state (not stale closure)
137
+ var currentNode = state.doc.nodeAt(pos);
138
+ if (!currentNode) {
139
+ throw new Error('Could not find extension node');
140
+ }
141
+ var $pos = state.doc.resolve(pos);
142
+ var $startNodePos = state.doc.resolve($pos.start($pos.depth + 1));
143
+
144
+ // Collect all current frame nodes
145
+ var frames = [];
146
+ currentNode.content.forEach(function (child) {
147
+ frames.push(child);
148
+ });
149
+ if (fromIndex >= frames.length || toIndex >= frames.length) {
150
+ throw new Error('Index out of bounds');
151
+ }
152
+
153
+ // Reorder the frames array in memory
154
+ var _frames$splice = frames.splice(fromIndex, 1),
155
+ _frames$splice2 = (0, _slicedToArray2.default)(_frames$splice, 1),
156
+ removed = _frames$splice2[0];
157
+ frames.splice(toIndex, 0, removed);
158
+
159
+ // Atomically replace the entire MBE content with reordered frames
160
+ var tr = state.tr;
161
+ var containerStart = $startNodePos.pos;
162
+ var containerEnd = containerStart + currentNode.content.size;
163
+ tr.replaceWith(containerStart, containerEnd, frames);
164
+ dispatch(tr);
165
+ return true;
166
+ },
124
167
  updateParameters: function updateParameters(parameters) {
125
168
  var state = editorView.state,
126
169
  dispatch = editorView.dispatch;
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
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 = "115.5.0";
22
+ var packageVersion = "115.6.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -19,8 +19,8 @@ Object.defineProperty(exports, "createPortalRendererComponent", {
19
19
  exports.getPortalProviderAPI = void 0;
20
20
  var _react = _interopRequireWildcard(require("react"));
21
21
  var _reactDom = require("react-dom");
22
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
23
22
  var _isSsr = require("../core-utils/is-ssr");
23
+ var _isSsrStreaming = require("../core-utils/is-ssr-streaming");
24
24
  var _PortalRenderWrapperInner = require("./PortalRenderWrapperInner");
25
25
  var _createPortalRendererComponent = require("./createPortalRendererComponent");
26
26
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
@@ -60,7 +60,7 @@ var getPortalProviderAPI = exports.getPortalProviderAPI = function getPortalProv
60
60
  return {
61
61
  render: function render(children, container, key, onBeforeReactDomRender) {
62
62
  var immediate = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
63
- if ((0, _isSsr.isSSR)() && (0, _expValEquals.expValEquals)('platform_editor_editor_ssr_streaming', 'isEnabled', true)) {
63
+ if ((0, _isSsr.isSSR)() && (0, _isSsrStreaming.isSSRStreaming)()) {
64
64
  var html = '';
65
65
  try {
66
66
  var renderToStaticMarkup = getRenderToStaticMarkup();
@@ -93,7 +93,7 @@ var getPortalProviderAPI = exports.getPortalProviderAPI = function getPortalProv
93
93
  },
94
94
  remove: function remove(key) {
95
95
  var _portalsMap$get;
96
- if ((0, _isSsr.isSSR)() && (0, _expValEquals.expValEquals)('platform_editor_editor_ssr_streaming', 'isEnabled', true)) {
96
+ if ((0, _isSsr.isSSR)() && (0, _isSsrStreaming.isSSRStreaming)()) {
97
97
  return;
98
98
  }
99
99
  (_portalsMap$get = portalsMap.get(key)) === null || _portalsMap$get === void 0 || _portalsMap$get();
@@ -8,8 +8,8 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.NodeViewContentHole = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
11
  var _isSsr = require("../core-utils/is-ssr");
12
+ var _isSsrStreaming = require("../core-utils/is-ssr-streaming");
13
13
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
14
14
  /**
15
15
  * A component that serves as a placeholder for the content DOM of a ProseMirror NodeView.
@@ -18,6 +18,6 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
18
18
  var NodeViewContentHole = exports.NodeViewContentHole = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
19
19
  return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, props, {
20
20
  ref: ref,
21
- "data-ssr-content-dom-ref": (0, _isSsr.isSSR)() && (0, _expValEquals.expValEquals)('platform_editor_editor_ssr_streaming', 'isEnabled', true) ? '' : undefined
21
+ "data-ssr-content-dom-ref": (0, _isSsr.isSSR)() && (0, _isSsrStreaming.isSSRStreaming)() ? '' : undefined
22
22
  }));
23
23
  });
@@ -28,7 +28,6 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
28
28
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
29
29
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
30
30
  var _react = _interopRequireDefault(require("react"));
31
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
32
31
  var _analytics = require("../analytics");
33
32
  var _coreUtils = require("../core-utils");
34
33
  var _eventDispatcher = require("../event-dispatcher");
@@ -124,7 +123,7 @@ var ReactNodeView = exports.default = /*#__PURE__*/function () {
124
123
  // contentDOMWrapper that was appended above. The React ref callback
125
124
  // (forwardRef) never fires in renderToStaticMarkup, so contentDOM is
126
125
  // left detached. Re-attach it by finding the marked SSR ref target.
127
- if ((0, _coreUtils.isSSR)() && this.domRef && (0, _expValEquals.expValEquals)('platform_editor_editor_ssr_streaming', 'isEnabled', true)) {
126
+ if ((0, _coreUtils.isSSR)() && (0, _coreUtils.isSSRStreaming)() && this.domRef) {
128
127
  var refTarget = this.domRef.querySelector('[data-ssr-content-dom-ref]');
129
128
  if (refTarget) {
130
129
  this.handleRef(refTarget);
@@ -49,6 +49,22 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
49
49
  (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"]))) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
50
50
  (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :first-child:not(style),\n\t\t\t\t> style:first-child + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"])));
51
51
  };
52
+
53
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
54
+ /**
55
+ * The style is mirrored in:
56
+ * - packages/editor/renderer/src/ui/Renderer/RendererStyleContainer.tsx ( seems outdated )
57
+ * - packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
58
+ *
59
+ * If you are updating this, please also update the above files.
60
+ *
61
+ * @deprecated This Emotion-based style function is being phased out as part of the
62
+ * `platform_editor_core_static_css` experiment migration to Compiled CSS. While the experiment
63
+ * is running, any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
64
+ * (look for `tableSharedStyle`, `tableSharedStyle_with_*`, `tableSharedStyle_without_*` entries
65
+ * in the `editorContentStyles` cssMap). Failure to do so will cause visual regressions when the
66
+ * compiled version is active.
67
+ */
52
68
  var tableSharedStyle = exports.tableSharedStyle = function tableSharedStyle() {
53
69
  var browser = (0, _browser.getBrowserInfo)();
54
70
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
@@ -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 = "115.5.0";
27
+ var packageVersion = "115.6.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -19,6 +19,7 @@ var _reactDom = require("react-dom");
19
19
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
20
20
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
21
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
22
+ var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
22
23
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
23
24
  var _utils = require("./utils");
24
25
  var _validatePosition = require("./validatePosition");
@@ -74,7 +75,7 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
74
75
  returnFocusOnDeactivate: false
75
76
  };
76
77
  var trapConfig = typeof _this.props.focusTrap === 'boolean' ? defaultTrapConfig : _objectSpread(_objectSpread({}, defaultTrapConfig), _this.props.focusTrap);
77
- _this.focusTrap = (0, _focusTrap.default)(popup, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? trapConfig : defaultTrapConfig);
78
+ _this.focusTrap = (0, _focusTrap.default)(popup, (0, _experiments.editorExperiment)('platform_editor_block_menu', true) || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_layout_column_menu', 'isEnabled', true) ? trapConfig : defaultTrapConfig);
78
79
  _this.focusTrap.activate();
79
80
  }));
80
81
  return _this;
@@ -106,7 +107,9 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
106
107
  if (!target || !popup) {
107
108
  return {};
108
109
  }
109
- var placement = (0, _utils.calculatePlacement)(target, boundariesElement || document.body, fitWidth, fitHeight, alignX, alignY, forcePlacement, preventOverflow);
110
+ var placement = (0, _utils.calculatePlacement)(target,
111
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- Existing Popup positioning fallback; keep unchanged for safety.
112
+ boundariesElement || document.body, fitWidth, fitHeight, alignX, alignY, forcePlacement, preventOverflow);
110
113
  if (onPlacementChanged && this.placement.join('') !== placement.join('')) {
111
114
  onPlacementChanged(placement);
112
115
  this.placement = placement;
@@ -121,6 +124,7 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
121
124
  offset: offset,
122
125
  allowOutOfBounds: allowOutOfBounds,
123
126
  rect: rect,
127
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- Existing Popup positioning fallback; keep unchanged for safety.
124
128
  boundariesElement: boundariesElement || document.body,
125
129
  minPopupMargin: minPopupMargin,
126
130
  scrollableElement: stick && ((0, _expValEquals.expValEquals)('platform_editor_fix_scrolling_popup_position', 'isEnabled', true) || (0, _expValEquals.expValEquals)('create_work_item_modernization_exp', 'isEnabled', true)) ? this.scrollElement : undefined
@@ -173,7 +177,9 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
173
177
  * Currently Popup isn't capable of position itself correctly in case 2,
174
178
  * Add "position: relative" to "overflow: scroll" container or to some other FloatingPanel wrapper inside it.
175
179
  */
176
- return !target || document.body.contains(target) && popup.offsetParent &&
180
+ return !target ||
181
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- Existing Popup containment check; keep unchanged for safety.
182
+ document.body.contains(target) && popup.offsetParent &&
177
183
  // Ignored via go/ees005
178
184
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
179
185
  !popup.offsetParent.contains(target) || overflowScrollParent && !overflowScrollParent.contains(popup.offsetParent);
@@ -8,6 +8,8 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.MenuArrowKeyNavigationProvider = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
+ var _browserApis = require("@atlaskit/browser-apis");
12
+ var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
11
13
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
12
14
  var hasEnabledItems = function hasEnabledItems(list) {
13
15
  return list.some(function (item) {
@@ -38,8 +40,20 @@ var MenuArrowKeyNavigationProvider = exports.MenuArrowKeyNavigationProvider = fu
38
40
  var _useState3 = (0, _react.useState)(element),
39
41
  _useState4 = (0, _slicedToArray2.default)(_useState3, 1),
40
42
  listenerTargetElement = _useState4[0];
43
+ var getCurrentIndex = (0, _react.useCallback)(function (list) {
44
+ var _getDocument;
45
+ if (!(0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_layout_column_menu', 'isEnabled', true)) {
46
+ return currentSelectedItemIndex;
47
+ }
48
+ var activeElement = (_getDocument = (0, _browserApis.getDocument)()) === null || _getDocument === void 0 ? void 0 : _getDocument.activeElement;
49
+ if (!(activeElement instanceof HTMLElement)) {
50
+ return currentSelectedItemIndex;
51
+ }
52
+ var activeElementIndex = list.indexOf(activeElement);
53
+ return activeElementIndex >= 0 ? activeElementIndex : currentSelectedItemIndex;
54
+ }, [currentSelectedItemIndex]);
41
55
  var incrementIndex = (0, _react.useCallback)(function (list) {
42
- var currentIndex = currentSelectedItemIndex;
56
+ var currentIndex = getCurrentIndex(list);
43
57
  var nextIndex = (currentIndex + 1) % list.length;
44
58
  // Skips disabled items. Previously this function relied on a list of enabled elements which caused a
45
59
  // difference between currentIndex and the item index in the menu.
@@ -48,16 +62,16 @@ var MenuArrowKeyNavigationProvider = exports.MenuArrowKeyNavigationProvider = fu
48
62
  }
49
63
  setCurrentSelectedItemIndex(nextIndex);
50
64
  return nextIndex;
51
- }, [currentSelectedItemIndex]);
65
+ }, [getCurrentIndex]);
52
66
  var decrementIndex = (0, _react.useCallback)(function (list) {
53
- var currentIndex = currentSelectedItemIndex;
67
+ var currentIndex = getCurrentIndex(list);
54
68
  var nextIndex = (list.length + currentIndex - 1) % list.length;
55
69
  while (nextIndex !== currentIndex && list[nextIndex].getAttribute('aria-disabled') === 'true') {
56
70
  nextIndex = (list.length + nextIndex - 1) % list.length;
57
71
  }
58
72
  setCurrentSelectedItemIndex(nextIndex);
59
73
  return nextIndex;
60
- }, [currentSelectedItemIndex]);
74
+ }, [getCurrentIndex]);
61
75
 
62
76
  // this useEffect uses onSelection in it's dependency list which gets
63
77
  // changed as a result of the dropdown menu getting re-rendered in it's
@@ -3,4 +3,5 @@
3
3
 
4
4
  export { insideTable } from './inside';
5
5
  export { getDocStructure } from './document-logger';
6
- export { isSSR } from './is-ssr';
6
+ export { isSSR } from './is-ssr';
7
+ export { isSSRStreaming } from './is-ssr-streaming';
@@ -0,0 +1,16 @@
1
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
+ /** Returns true if React SSR streaming is actually active at runtime. */
3
+ export function isSSRStreaming() {
4
+ try {
5
+ var _process$env;
6
+ const isSSRRendered =
7
+ // In most places there is no document when running on server-side
8
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
9
+ typeof document === 'undefined' || typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.REACT_SSR) || typeof window !== 'undefined' && window.__SSR_RENDERED__ || globalThis.__SSR_RENDERED__;
10
+ const isSSRReactStreaming = typeof window !== 'undefined' && window.__SSR_REACT_STREAMING__ || globalThis.__SSR_REACT_STREAMING__;
11
+ return Boolean(isSSRRendered) && expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true) && Boolean(isSSRReactStreaming);
12
+ } catch {
13
+ // Catch possible error that might occur and just return false
14
+ return false;
15
+ }
16
+ }
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  import { RawIntlProvider } from 'react-intl';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  import { isSSR } from '../core-utils/is-ssr';
4
+ import { isSSRStreaming } from '../core-utils/is-ssr-streaming';
5
5
  export function ExtensionSSRReactContextsProvider({
6
6
  children,
7
7
  intl
8
8
  }) {
9
- if (!expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true) || !isSSR()) {
9
+ if (!isSSR() || !isSSRStreaming()) {
10
10
  return children;
11
11
  }
12
12
  if (!intl) {
@@ -118,6 +118,48 @@ export const useMultiBodiedExtensionActions = ({
118
118
  }
119
119
  return true;
120
120
  },
121
+ reorderChildren(fromIndex, toIndex) {
122
+ const pos = getPos();
123
+ if (typeof pos !== 'number' || typeof fromIndex !== 'number' || typeof toIndex !== 'number') {
124
+ throw new Error('Position or index not valid');
125
+ }
126
+ if (fromIndex === toIndex) {
127
+ return true;
128
+ }
129
+ const {
130
+ state,
131
+ dispatch
132
+ } = editorView;
133
+
134
+ // Use current node from state (not stale closure)
135
+ const currentNode = state.doc.nodeAt(pos);
136
+ if (!currentNode) {
137
+ throw new Error('Could not find extension node');
138
+ }
139
+ const $pos = state.doc.resolve(pos);
140
+ const $startNodePos = state.doc.resolve($pos.start($pos.depth + 1));
141
+
142
+ // Collect all current frame nodes
143
+ const frames = [];
144
+ currentNode.content.forEach(child => {
145
+ frames.push(child);
146
+ });
147
+ if (fromIndex >= frames.length || toIndex >= frames.length) {
148
+ throw new Error('Index out of bounds');
149
+ }
150
+
151
+ // Reorder the frames array in memory
152
+ const [removed] = frames.splice(fromIndex, 1);
153
+ frames.splice(toIndex, 0, removed);
154
+
155
+ // Atomically replace the entire MBE content with reordered frames
156
+ const tr = state.tr;
157
+ const containerStart = $startNodePos.pos;
158
+ const containerEnd = containerStart + currentNode.content.size;
159
+ tr.replaceWith(containerStart, containerEnd, frames);
160
+ dispatch(tr);
161
+ return true;
162
+ },
121
163
  updateParameters(parameters) {
122
164
  const {
123
165
  state,
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "115.5.0";
7
+ const packageVersion = "115.6.0";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -1,7 +1,7 @@
1
1
  import React, { memo } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  import { isSSR } from '../core-utils/is-ssr';
4
+ import { isSSRStreaming } from '../core-utils/is-ssr-streaming';
5
5
  import { PortalRenderWrapperInner } from './PortalRenderWrapperInner';
6
6
  const PortalRenderWrapper = /*#__PURE__*/memo(PortalRenderWrapperInner);
7
7
  PortalRenderWrapper.displayName = 'PortalRenderWrapper';
@@ -36,7 +36,7 @@ export const getPortalProviderAPI = portalManager => {
36
36
  const portalsMap = new Map();
37
37
  return {
38
38
  render: (children, container, key, onBeforeReactDomRender, immediate = false) => {
39
- if (isSSR() && expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true)) {
39
+ if (isSSR() && isSSRStreaming()) {
40
40
  let html = '';
41
41
  try {
42
42
  const renderToStaticMarkup = getRenderToStaticMarkup();
@@ -67,7 +67,7 @@ export const getPortalProviderAPI = portalManager => {
67
67
  },
68
68
  remove: key => {
69
69
  var _portalsMap$get;
70
- if (isSSR() && expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true)) {
70
+ if (isSSR() && isSSRStreaming()) {
71
71
  return;
72
72
  }
73
73
  (_portalsMap$get = portalsMap.get(key)) === null || _portalsMap$get === void 0 ? void 0 : _portalsMap$get();
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef } from 'react';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  import { isSSR } from '../core-utils/is-ssr';
4
+ import { isSSRStreaming } from '../core-utils/is-ssr-streaming';
5
5
 
6
6
  /**
7
7
  * A component that serves as a placeholder for the content DOM of a ProseMirror NodeView.
@@ -9,5 +9,5 @@ import { isSSR } from '../core-utils/is-ssr';
9
9
  */
10
10
  export const NodeViewContentHole = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement("div", _extends({}, props, {
11
11
  ref: ref,
12
- "data-ssr-content-dom-ref": isSSR() && expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true) ? '' : undefined
12
+ "data-ssr-content-dom-ref": isSSR() && isSSRStreaming() ? '' : undefined
13
13
  })));
@@ -4,9 +4,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  /* eslint-disable @atlaskit/editor/no-re-export */
5
5
 
6
6
  import React from 'react';
7
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
7
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
9
- import { isSSR } from '../core-utils';
8
+ import { isSSR, isSSRStreaming } from '../core-utils';
10
9
  import { createDispatch } from '../event-dispatcher';
11
10
  import { ErrorBoundary } from '../ui/ErrorBoundary';
12
11
  import { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
@@ -90,7 +89,7 @@ export default class ReactNodeView {
90
89
  // contentDOMWrapper that was appended above. The React ref callback
91
90
  // (forwardRef) never fires in renderToStaticMarkup, so contentDOM is
92
91
  // left detached. Re-attach it by finding the marked SSR ref target.
93
- if (isSSR() && this.domRef && expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true)) {
92
+ if (isSSR() && isSSRStreaming() && this.domRef) {
94
93
  const refTarget = this.domRef.querySelector('[data-ssr-content-dom-ref]');
95
94
  if (refTarget) {
96
95
  this.handleRef(refTarget);
@@ -46,6 +46,22 @@ css`
46
46
  margin-top: 0;
47
47
  }
48
48
  `;
49
+
50
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
51
+ /**
52
+ * The style is mirrored in:
53
+ * - packages/editor/renderer/src/ui/Renderer/RendererStyleContainer.tsx ( seems outdated )
54
+ * - packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
55
+ *
56
+ * If you are updating this, please also update the above files.
57
+ *
58
+ * @deprecated This Emotion-based style function is being phased out as part of the
59
+ * `platform_editor_core_static_css` experiment migration to Compiled CSS. While the experiment
60
+ * is running, any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
61
+ * (look for `tableSharedStyle`, `tableSharedStyle_with_*`, `tableSharedStyle_without_*` entries
62
+ * in the `editorContentStyles` cssMap). Failure to do so will cause visual regressions when the
63
+ * compiled version is active.
64
+ */
49
65
  const tableSharedStyle = () => {
50
66
  const browser = getBrowserInfo();
51
67
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "115.5.0";
17
+ const packageVersion = "115.6.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -7,6 +7,7 @@ import { createPortal, flushSync } from 'react-dom';
7
7
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
10
11
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
11
12
  import { calculatePlacement, calculatePosition, findOverflowScrollParent } from './utils';
12
13
  import { validatePosition } from './validatePosition';
@@ -54,7 +55,7 @@ export default class Popup extends React.Component {
54
55
  ...defaultTrapConfig,
55
56
  ...this.props.focusTrap
56
57
  };
57
- this.focusTrap = createFocusTrap(popup, editorExperiment('platform_editor_block_menu', true) ? trapConfig : defaultTrapConfig);
58
+ this.focusTrap = createFocusTrap(popup, editorExperiment('platform_editor_block_menu', true) || expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true) ? trapConfig : defaultTrapConfig);
58
59
  this.focusTrap.activate();
59
60
  }));
60
61
  }
@@ -83,7 +84,9 @@ export default class Popup extends React.Component {
83
84
  if (!target || !popup) {
84
85
  return {};
85
86
  }
86
- const placement = calculatePlacement(target, boundariesElement || document.body, fitWidth, fitHeight, alignX, alignY, forcePlacement, preventOverflow);
87
+ const placement = calculatePlacement(target,
88
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- Existing Popup positioning fallback; keep unchanged for safety.
89
+ boundariesElement || document.body, fitWidth, fitHeight, alignX, alignY, forcePlacement, preventOverflow);
87
90
  if (onPlacementChanged && this.placement.join('') !== placement.join('')) {
88
91
  onPlacementChanged(placement);
89
92
  this.placement = placement;
@@ -98,6 +101,7 @@ export default class Popup extends React.Component {
98
101
  offset: offset,
99
102
  allowOutOfBounds,
100
103
  rect,
104
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- Existing Popup positioning fallback; keep unchanged for safety.
101
105
  boundariesElement: boundariesElement || document.body,
102
106
  minPopupMargin,
103
107
  scrollableElement: stick && (expValEquals('platform_editor_fix_scrolling_popup_position', 'isEnabled', true) || expValEquals('create_work_item_modernization_exp', 'isEnabled', true)) ? this.scrollElement : undefined
@@ -146,7 +150,9 @@ export default class Popup extends React.Component {
146
150
  * Currently Popup isn't capable of position itself correctly in case 2,
147
151
  * Add "position: relative" to "overflow: scroll" container or to some other FloatingPanel wrapper inside it.
148
152
  */
149
- return !target || document.body.contains(target) && popup.offsetParent &&
153
+ return !target ||
154
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- Existing Popup containment check; keep unchanged for safety.
155
+ document.body.contains(target) && popup.offsetParent &&
150
156
  // Ignored via go/ees005
151
157
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
152
158
  !popup.offsetParent.contains(target) || overflowScrollParent && !overflowScrollParent.contains(popup.offsetParent);
@@ -1,4 +1,6 @@
1
1
  import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
2
+ import { getDocument } from '@atlaskit/browser-apis';
3
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
2
4
  const hasEnabledItems = list => list.some(item => item.getAttribute('aria-disabled') !== 'true');
3
5
 
4
6
  /**
@@ -20,8 +22,20 @@ export const MenuArrowKeyNavigationProvider = ({
20
22
  const [currentSelectedItemIndex, setCurrentSelectedItemIndex] = useState(-1);
21
23
  const element = popupsMountPoint ? [popupsMountPoint, editorRef.current] : [editorRef.current];
22
24
  const [listenerTargetElement] = useState(element);
25
+ const getCurrentIndex = useCallback(list => {
26
+ var _getDocument;
27
+ if (!expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true)) {
28
+ return currentSelectedItemIndex;
29
+ }
30
+ const activeElement = (_getDocument = getDocument()) === null || _getDocument === void 0 ? void 0 : _getDocument.activeElement;
31
+ if (!(activeElement instanceof HTMLElement)) {
32
+ return currentSelectedItemIndex;
33
+ }
34
+ const activeElementIndex = list.indexOf(activeElement);
35
+ return activeElementIndex >= 0 ? activeElementIndex : currentSelectedItemIndex;
36
+ }, [currentSelectedItemIndex]);
23
37
  const incrementIndex = useCallback(list => {
24
- const currentIndex = currentSelectedItemIndex;
38
+ const currentIndex = getCurrentIndex(list);
25
39
  let nextIndex = (currentIndex + 1) % list.length;
26
40
  // Skips disabled items. Previously this function relied on a list of enabled elements which caused a
27
41
  // difference between currentIndex and the item index in the menu.
@@ -30,16 +44,16 @@ export const MenuArrowKeyNavigationProvider = ({
30
44
  }
31
45
  setCurrentSelectedItemIndex(nextIndex);
32
46
  return nextIndex;
33
- }, [currentSelectedItemIndex]);
47
+ }, [getCurrentIndex]);
34
48
  const decrementIndex = useCallback(list => {
35
- const currentIndex = currentSelectedItemIndex;
49
+ const currentIndex = getCurrentIndex(list);
36
50
  let nextIndex = (list.length + currentIndex - 1) % list.length;
37
51
  while (nextIndex !== currentIndex && list[nextIndex].getAttribute('aria-disabled') === 'true') {
38
52
  nextIndex = (list.length + nextIndex - 1) % list.length;
39
53
  }
40
54
  setCurrentSelectedItemIndex(nextIndex);
41
55
  return nextIndex;
42
- }, [currentSelectedItemIndex]);
56
+ }, [getCurrentIndex]);
43
57
 
44
58
  // this useEffect uses onSelection in it's dependency list which gets
45
59
  // changed as a result of the dropdown menu getting re-rendered in it's
@@ -3,4 +3,5 @@
3
3
 
4
4
  export { insideTable } from './inside';
5
5
  export { getDocStructure } from './document-logger';
6
- export { isSSR } from './is-ssr';
6
+ export { isSSR } from './is-ssr';
7
+ export { isSSRStreaming } from './is-ssr-streaming';
@@ -0,0 +1,16 @@
1
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
+ /** Returns true if React SSR streaming is actually active at runtime. */
3
+ export function isSSRStreaming() {
4
+ try {
5
+ var _process$env;
6
+ var isSSRRendered =
7
+ // In most places there is no document when running on server-side
8
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
9
+ typeof document === 'undefined' || typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.REACT_SSR) || typeof window !== 'undefined' && window.__SSR_RENDERED__ || globalThis.__SSR_RENDERED__;
10
+ var isSSRReactStreaming = typeof window !== 'undefined' && window.__SSR_REACT_STREAMING__ || globalThis.__SSR_REACT_STREAMING__;
11
+ return Boolean(isSSRRendered) && expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true) && Boolean(isSSRReactStreaming);
12
+ } catch (_unused) {
13
+ // Catch possible error that might occur and just return false
14
+ return false;
15
+ }
16
+ }
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { RawIntlProvider } from 'react-intl';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  import { isSSR } from '../core-utils/is-ssr';
4
+ import { isSSRStreaming } from '../core-utils/is-ssr-streaming';
5
5
  export function ExtensionSSRReactContextsProvider(_ref) {
6
6
  var children = _ref.children,
7
7
  intl = _ref.intl;
8
- if (!expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true) || !isSSR()) {
8
+ if (!isSSR() || !isSSRStreaming()) {
9
9
  return children;
10
10
  }
11
11
  if (!intl) {
@@ -1,4 +1,5 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  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; }
3
4
  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; }
4
5
  import React from 'react';
@@ -114,6 +115,48 @@ export var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActi
114
115
  }
115
116
  return true;
116
117
  },
118
+ reorderChildren: function reorderChildren(fromIndex, toIndex) {
119
+ var pos = getPos();
120
+ if (typeof pos !== 'number' || typeof fromIndex !== 'number' || typeof toIndex !== 'number') {
121
+ throw new Error('Position or index not valid');
122
+ }
123
+ if (fromIndex === toIndex) {
124
+ return true;
125
+ }
126
+ var state = editorView.state,
127
+ dispatch = editorView.dispatch;
128
+
129
+ // Use current node from state (not stale closure)
130
+ var currentNode = state.doc.nodeAt(pos);
131
+ if (!currentNode) {
132
+ throw new Error('Could not find extension node');
133
+ }
134
+ var $pos = state.doc.resolve(pos);
135
+ var $startNodePos = state.doc.resolve($pos.start($pos.depth + 1));
136
+
137
+ // Collect all current frame nodes
138
+ var frames = [];
139
+ currentNode.content.forEach(function (child) {
140
+ frames.push(child);
141
+ });
142
+ if (fromIndex >= frames.length || toIndex >= frames.length) {
143
+ throw new Error('Index out of bounds');
144
+ }
145
+
146
+ // Reorder the frames array in memory
147
+ var _frames$splice = frames.splice(fromIndex, 1),
148
+ _frames$splice2 = _slicedToArray(_frames$splice, 1),
149
+ removed = _frames$splice2[0];
150
+ frames.splice(toIndex, 0, removed);
151
+
152
+ // Atomically replace the entire MBE content with reordered frames
153
+ var tr = state.tr;
154
+ var containerStart = $startNodePos.pos;
155
+ var containerEnd = containerStart + currentNode.content.size;
156
+ tr.replaceWith(containerStart, containerEnd, frames);
157
+ dispatch(tr);
158
+ return true;
159
+ },
117
160
  updateParameters: function updateParameters(parameters) {
118
161
  var state = editorView.state,
119
162
  dispatch = editorView.dispatch;
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "115.5.0";
13
+ var packageVersion = "115.6.0";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -1,7 +1,7 @@
1
1
  import React, { memo } from 'react';
2
2
  import { createPortal } from 'react-dom';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  import { isSSR } from '../core-utils/is-ssr';
4
+ import { isSSRStreaming } from '../core-utils/is-ssr-streaming';
5
5
  import { PortalRenderWrapperInner } from './PortalRenderWrapperInner';
6
6
  var PortalRenderWrapper = /*#__PURE__*/memo(PortalRenderWrapperInner);
7
7
  PortalRenderWrapper.displayName = 'PortalRenderWrapper';
@@ -39,7 +39,7 @@ export var getPortalProviderAPI = function getPortalProviderAPI(portalManager) {
39
39
  return {
40
40
  render: function render(children, container, key, onBeforeReactDomRender) {
41
41
  var immediate = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
42
- if (isSSR() && expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true)) {
42
+ if (isSSR() && isSSRStreaming()) {
43
43
  var html = '';
44
44
  try {
45
45
  var renderToStaticMarkup = getRenderToStaticMarkup();
@@ -72,7 +72,7 @@ export var getPortalProviderAPI = function getPortalProviderAPI(portalManager) {
72
72
  },
73
73
  remove: function remove(key) {
74
74
  var _portalsMap$get;
75
- if (isSSR() && expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true)) {
75
+ if (isSSR() && isSSRStreaming()) {
76
76
  return;
77
77
  }
78
78
  (_portalsMap$get = portalsMap.get(key)) === null || _portalsMap$get === void 0 || _portalsMap$get();
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef } from 'react';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
3
  import { isSSR } from '../core-utils/is-ssr';
4
+ import { isSSRStreaming } from '../core-utils/is-ssr-streaming';
5
5
 
6
6
  /**
7
7
  * A component that serves as a placeholder for the content DOM of a ProseMirror NodeView.
@@ -10,6 +10,6 @@ import { isSSR } from '../core-utils/is-ssr';
10
10
  export var NodeViewContentHole = /*#__PURE__*/forwardRef(function (props, ref) {
11
11
  return /*#__PURE__*/React.createElement("div", _extends({}, props, {
12
12
  ref: ref,
13
- "data-ssr-content-dom-ref": isSSR() && expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true) ? '' : undefined
13
+ "data-ssr-content-dom-ref": isSSR() && isSSRStreaming() ? '' : undefined
14
14
  }));
15
15
  });
@@ -6,9 +6,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
6
6
  /* eslint-disable @atlaskit/editor/no-re-export */
7
7
 
8
8
  import React from 'react';
9
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
10
9
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
11
- import { isSSR } from '../core-utils';
10
+ import { isSSR, isSSRStreaming } from '../core-utils';
12
11
  import { createDispatch } from '../event-dispatcher';
13
12
  import { ErrorBoundary } from '../ui/ErrorBoundary';
14
13
  import { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
@@ -100,7 +99,7 @@ var ReactNodeView = /*#__PURE__*/function () {
100
99
  // contentDOMWrapper that was appended above. The React ref callback
101
100
  // (forwardRef) never fires in renderToStaticMarkup, so contentDOM is
102
101
  // left detached. Re-attach it by finding the marked SSR ref target.
103
- if (isSSR() && this.domRef && expValEquals('platform_editor_editor_ssr_streaming', 'isEnabled', true)) {
102
+ if (isSSR() && isSSRStreaming() && this.domRef) {
104
103
  var refTarget = this.domRef.querySelector('[data-ssr-content-dom-ref]');
105
104
  if (refTarget) {
106
105
  this.handleRef(refTarget);
@@ -29,6 +29,22 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
29
29
  css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\t> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"]))) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
30
30
  css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t\t> :first-child:not(style),\n\t\t\t\t> style:first-child + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"])));
31
31
  };
32
+
33
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
34
+ /**
35
+ * The style is mirrored in:
36
+ * - packages/editor/renderer/src/ui/Renderer/RendererStyleContainer.tsx ( seems outdated )
37
+ * - packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
38
+ *
39
+ * If you are updating this, please also update the above files.
40
+ *
41
+ * @deprecated This Emotion-based style function is being phased out as part of the
42
+ * `platform_editor_core_static_css` experiment migration to Compiled CSS. While the experiment
43
+ * is running, any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
44
+ * (look for `tableSharedStyle`, `tableSharedStyle_with_*`, `tableSharedStyle_without_*` entries
45
+ * in the `editorContentStyles` cssMap). Failure to do so will cause visual regressions when the
46
+ * compiled version is active.
47
+ */
32
48
  var tableSharedStyle = function tableSharedStyle() {
33
49
  var browser = getBrowserInfo();
34
50
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "115.5.0";
24
+ var packageVersion = "115.6.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -16,6 +16,7 @@ import { createPortal, flushSync } from 'react-dom';
16
16
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
17
17
  import { fg } from '@atlaskit/platform-feature-flags';
18
18
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
19
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
19
20
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
20
21
  import { calculatePlacement, calculatePosition as _calculatePosition, findOverflowScrollParent } from './utils';
21
22
  import { validatePosition } from './validatePosition';
@@ -67,7 +68,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
67
68
  returnFocusOnDeactivate: false
68
69
  };
69
70
  var trapConfig = typeof _this.props.focusTrap === 'boolean' ? defaultTrapConfig : _objectSpread(_objectSpread({}, defaultTrapConfig), _this.props.focusTrap);
70
- _this.focusTrap = createFocusTrap(popup, editorExperiment('platform_editor_block_menu', true) ? trapConfig : defaultTrapConfig);
71
+ _this.focusTrap = createFocusTrap(popup, editorExperiment('platform_editor_block_menu', true) || expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true) ? trapConfig : defaultTrapConfig);
71
72
  _this.focusTrap.activate();
72
73
  }));
73
74
  return _this;
@@ -99,7 +100,9 @@ var Popup = /*#__PURE__*/function (_React$Component) {
99
100
  if (!target || !popup) {
100
101
  return {};
101
102
  }
102
- var placement = calculatePlacement(target, boundariesElement || document.body, fitWidth, fitHeight, alignX, alignY, forcePlacement, preventOverflow);
103
+ var placement = calculatePlacement(target,
104
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- Existing Popup positioning fallback; keep unchanged for safety.
105
+ boundariesElement || document.body, fitWidth, fitHeight, alignX, alignY, forcePlacement, preventOverflow);
103
106
  if (onPlacementChanged && this.placement.join('') !== placement.join('')) {
104
107
  onPlacementChanged(placement);
105
108
  this.placement = placement;
@@ -114,6 +117,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
114
117
  offset: offset,
115
118
  allowOutOfBounds: allowOutOfBounds,
116
119
  rect: rect,
120
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- Existing Popup positioning fallback; keep unchanged for safety.
117
121
  boundariesElement: boundariesElement || document.body,
118
122
  minPopupMargin: minPopupMargin,
119
123
  scrollableElement: stick && (expValEquals('platform_editor_fix_scrolling_popup_position', 'isEnabled', true) || expValEquals('create_work_item_modernization_exp', 'isEnabled', true)) ? this.scrollElement : undefined
@@ -166,7 +170,9 @@ var Popup = /*#__PURE__*/function (_React$Component) {
166
170
  * Currently Popup isn't capable of position itself correctly in case 2,
167
171
  * Add "position: relative" to "overflow: scroll" container or to some other FloatingPanel wrapper inside it.
168
172
  */
169
- return !target || document.body.contains(target) && popup.offsetParent &&
173
+ return !target ||
174
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- Existing Popup containment check; keep unchanged for safety.
175
+ document.body.contains(target) && popup.offsetParent &&
170
176
  // Ignored via go/ees005
171
177
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
172
178
  !popup.offsetParent.contains(target) || overflowScrollParent && !overflowScrollParent.contains(popup.offsetParent);
@@ -1,5 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
3
+ import { getDocument } from '@atlaskit/browser-apis';
4
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
3
5
  var hasEnabledItems = function hasEnabledItems(list) {
4
6
  return list.some(function (item) {
5
7
  return item.getAttribute('aria-disabled') !== 'true';
@@ -29,8 +31,20 @@ export var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvi
29
31
  var _useState3 = useState(element),
30
32
  _useState4 = _slicedToArray(_useState3, 1),
31
33
  listenerTargetElement = _useState4[0];
34
+ var getCurrentIndex = useCallback(function (list) {
35
+ var _getDocument;
36
+ if (!expValEqualsNoExposure('platform_editor_layout_column_menu', 'isEnabled', true)) {
37
+ return currentSelectedItemIndex;
38
+ }
39
+ var activeElement = (_getDocument = getDocument()) === null || _getDocument === void 0 ? void 0 : _getDocument.activeElement;
40
+ if (!(activeElement instanceof HTMLElement)) {
41
+ return currentSelectedItemIndex;
42
+ }
43
+ var activeElementIndex = list.indexOf(activeElement);
44
+ return activeElementIndex >= 0 ? activeElementIndex : currentSelectedItemIndex;
45
+ }, [currentSelectedItemIndex]);
32
46
  var incrementIndex = useCallback(function (list) {
33
- var currentIndex = currentSelectedItemIndex;
47
+ var currentIndex = getCurrentIndex(list);
34
48
  var nextIndex = (currentIndex + 1) % list.length;
35
49
  // Skips disabled items. Previously this function relied on a list of enabled elements which caused a
36
50
  // difference between currentIndex and the item index in the menu.
@@ -39,16 +53,16 @@ export var MenuArrowKeyNavigationProvider = function MenuArrowKeyNavigationProvi
39
53
  }
40
54
  setCurrentSelectedItemIndex(nextIndex);
41
55
  return nextIndex;
42
- }, [currentSelectedItemIndex]);
56
+ }, [getCurrentIndex]);
43
57
  var decrementIndex = useCallback(function (list) {
44
- var currentIndex = currentSelectedItemIndex;
58
+ var currentIndex = getCurrentIndex(list);
45
59
  var nextIndex = (list.length + currentIndex - 1) % list.length;
46
60
  while (nextIndex !== currentIndex && list[nextIndex].getAttribute('aria-disabled') === 'true') {
47
61
  nextIndex = (list.length + nextIndex - 1) % list.length;
48
62
  }
49
63
  setCurrentSelectedItemIndex(nextIndex);
50
64
  return nextIndex;
51
- }, [currentSelectedItemIndex]);
65
+ }, [getCurrentIndex]);
52
66
 
53
67
  // this useEffect uses onSelection in it's dependency list which gets
54
68
  // changed as a result of the dropdown menu getting re-rendered in it's
@@ -114,7 +114,7 @@ type InsertLayoutAEP = InsertAEP<ACTION_SUBJECT_ID.LAYOUT, {
114
114
  type InsertLayoutColumnAEP = InsertAEP<ACTION_SUBJECT_ID.LAYOUT_COLUMN, {
115
115
  columnCount: number;
116
116
  endIndex: number;
117
- inputMethod: INPUT_METHOD.LAYOUT_COLUMN_MENU;
117
+ inputMethod: INPUT_METHOD.LAYOUT_COLUMN_MENU | INPUT_METHOD.KEYBOARD;
118
118
  selectedCount: number;
119
119
  side: 'left' | 'right';
120
120
  startIndex: number;
@@ -57,7 +57,7 @@ type DeletedLayoutAEP = TrackAEP<ACTION.DELETED, ACTION_SUBJECT.LAYOUT, undefine
57
57
  type DeletedLayoutColumnAEP = TrackAEP<ACTION.DELETED, ACTION_SUBJECT.DOCUMENT, ACTION_SUBJECT_ID.LAYOUT_COLUMN, {
58
58
  columnCount: number;
59
59
  endIndex: number;
60
- inputMethod: INPUT_METHOD.LAYOUT_COLUMN_MENU;
60
+ inputMethod: INPUT_METHOD.LAYOUT_COLUMN_MENU | INPUT_METHOD.KEYBOARD;
61
61
  selectedCount: number;
62
62
  startIndex: number;
63
63
  }, undefined>;
@@ -1,3 +1,4 @@
1
1
  export { insideTable } from './inside';
2
2
  export { getDocStructure } from './document-logger';
3
3
  export { isSSR } from './is-ssr';
4
+ export { isSSRStreaming } from './is-ssr-streaming';
@@ -0,0 +1,10 @@
1
+ declare global {
2
+ var __SSR_RENDERED__: boolean | undefined;
3
+ var __SSR_REACT_STREAMING__: boolean | undefined;
4
+ interface Window {
5
+ __SSR_REACT_STREAMING__?: boolean;
6
+ __SSR_RENDERED__?: boolean;
7
+ }
8
+ }
9
+ /** Returns true if React SSR streaming is actually active at runtime. */
10
+ export declare function isSSRStreaming(): boolean;
@@ -54,6 +54,7 @@ export type MultiBodiedExtensionActions = {
54
54
  getChildrenContainer: () => React.ReactNode;
55
55
  getChildrenCount: () => number;
56
56
  removeChild: (index: number) => boolean;
57
+ reorderChildren: (fromIndex: number, toIndex: number) => boolean;
57
58
  updateParameters: (parameters: Parameters) => boolean;
58
59
  };
59
60
  export type ParametersGetter<T extends Parameters = Parameters> = TransformBefore<T>;
@@ -10,6 +10,20 @@ export declare const tableCellPadding = 8;
10
10
  export declare const tableResizeHandleWidth = 6;
11
11
  export declare const tablePadding = 8;
12
12
  export declare const tableControlsSpacing: number;
13
+ /**
14
+ * The style is mirrored in:
15
+ * - packages/editor/renderer/src/ui/Renderer/RendererStyleContainer.tsx ( seems outdated )
16
+ * - packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
17
+ *
18
+ * If you are updating this, please also update the above files.
19
+ *
20
+ * @deprecated This Emotion-based style function is being phased out as part of the
21
+ * `platform_editor_core_static_css` experiment migration to Compiled CSS. While the experiment
22
+ * is running, any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
23
+ * (look for `tableSharedStyle`, `tableSharedStyle_with_*`, `tableSharedStyle_without_*` entries
24
+ * in the `editorContentStyles` cssMap). Failure to do so will cause visual regressions when the
25
+ * compiled version is active.
26
+ */
13
27
  declare const tableSharedStyle: () => SerializedStyles;
14
28
  export { tableSharedStyle };
15
29
  export { TableSharedCssClassName } from './TableSharedCssClassName';
@@ -114,7 +114,7 @@ type InsertLayoutAEP = InsertAEP<ACTION_SUBJECT_ID.LAYOUT, {
114
114
  type InsertLayoutColumnAEP = InsertAEP<ACTION_SUBJECT_ID.LAYOUT_COLUMN, {
115
115
  columnCount: number;
116
116
  endIndex: number;
117
- inputMethod: INPUT_METHOD.LAYOUT_COLUMN_MENU;
117
+ inputMethod: INPUT_METHOD.LAYOUT_COLUMN_MENU | INPUT_METHOD.KEYBOARD;
118
118
  selectedCount: number;
119
119
  side: 'left' | 'right';
120
120
  startIndex: number;
@@ -57,7 +57,7 @@ type DeletedLayoutAEP = TrackAEP<ACTION.DELETED, ACTION_SUBJECT.LAYOUT, undefine
57
57
  type DeletedLayoutColumnAEP = TrackAEP<ACTION.DELETED, ACTION_SUBJECT.DOCUMENT, ACTION_SUBJECT_ID.LAYOUT_COLUMN, {
58
58
  columnCount: number;
59
59
  endIndex: number;
60
- inputMethod: INPUT_METHOD.LAYOUT_COLUMN_MENU;
60
+ inputMethod: INPUT_METHOD.LAYOUT_COLUMN_MENU | INPUT_METHOD.KEYBOARD;
61
61
  selectedCount: number;
62
62
  startIndex: number;
63
63
  }, undefined>;
@@ -1,3 +1,4 @@
1
1
  export { insideTable } from './inside';
2
2
  export { getDocStructure } from './document-logger';
3
3
  export { isSSR } from './is-ssr';
4
+ export { isSSRStreaming } from './is-ssr-streaming';
@@ -0,0 +1,10 @@
1
+ declare global {
2
+ var __SSR_RENDERED__: boolean | undefined;
3
+ var __SSR_REACT_STREAMING__: boolean | undefined;
4
+ interface Window {
5
+ __SSR_REACT_STREAMING__?: boolean;
6
+ __SSR_RENDERED__?: boolean;
7
+ }
8
+ }
9
+ /** Returns true if React SSR streaming is actually active at runtime. */
10
+ export declare function isSSRStreaming(): boolean;
@@ -54,6 +54,7 @@ export type MultiBodiedExtensionActions = {
54
54
  getChildrenContainer: () => React.ReactNode;
55
55
  getChildrenCount: () => number;
56
56
  removeChild: (index: number) => boolean;
57
+ reorderChildren: (fromIndex: number, toIndex: number) => boolean;
57
58
  updateParameters: (parameters: Parameters) => boolean;
58
59
  };
59
60
  export type ParametersGetter<T extends Parameters = Parameters> = TransformBefore<T>;
@@ -10,6 +10,20 @@ export declare const tableCellPadding = 8;
10
10
  export declare const tableResizeHandleWidth = 6;
11
11
  export declare const tablePadding = 8;
12
12
  export declare const tableControlsSpacing: number;
13
+ /**
14
+ * The style is mirrored in:
15
+ * - packages/editor/renderer/src/ui/Renderer/RendererStyleContainer.tsx ( seems outdated )
16
+ * - packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
17
+ *
18
+ * If you are updating this, please also update the above files.
19
+ *
20
+ * @deprecated This Emotion-based style function is being phased out as part of the
21
+ * `platform_editor_core_static_css` experiment migration to Compiled CSS. While the experiment
22
+ * is running, any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
23
+ * (look for `tableSharedStyle`, `tableSharedStyle_with_*`, `tableSharedStyle_without_*` entries
24
+ * in the `editorContentStyles` cssMap). Failure to do so will cause visual regressions when the
25
+ * compiled version is active.
26
+ */
13
27
  declare const tableSharedStyle: () => SerializedStyles;
14
28
  export { tableSharedStyle };
15
29
  export { TableSharedCssClassName } from './TableSharedCssClassName';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "115.5.1",
3
+ "version": "115.7.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/"
@@ -57,12 +57,12 @@
57
57
  "@atlaskit/editor-tables": "^2.10.0",
58
58
  "@atlaskit/editor-toolbar": "^1.10.0",
59
59
  "@atlaskit/editor-toolbar-model": "^0.5.0",
60
- "@atlaskit/emoji": "^70.15.0",
60
+ "@atlaskit/emoji": "^70.16.0",
61
61
  "@atlaskit/icon": "^35.4.0",
62
62
  "@atlaskit/link": "^3.4.0",
63
63
  "@atlaskit/link-datasource": "^5.6.0",
64
64
  "@atlaskit/link-picker": "^5.3.0",
65
- "@atlaskit/media-card": "^80.7.0",
65
+ "@atlaskit/media-card": "^80.8.0",
66
66
  "@atlaskit/media-client": "^36.3.0",
67
67
  "@atlaskit/media-client-react": "^5.2.0",
68
68
  "@atlaskit/media-common": "^13.3.0",
@@ -70,7 +70,7 @@
70
70
  "@atlaskit/media-picker": "^71.4.0",
71
71
  "@atlaskit/media-ui": "^29.3.0",
72
72
  "@atlaskit/media-viewer": "^53.2.0",
73
- "@atlaskit/mention": "^26.1.0",
73
+ "@atlaskit/mention": "^26.2.0",
74
74
  "@atlaskit/menu": "^8.5.0",
75
75
  "@atlaskit/object": "^1.0.0",
76
76
  "@atlaskit/onboarding": "^14.6.0",
@@ -79,7 +79,7 @@
79
79
  "@atlaskit/primitives": "^19.0.0",
80
80
  "@atlaskit/profilecard": "^25.8.0",
81
81
  "@atlaskit/prosemirror-history": "^0.2.0",
82
- "@atlaskit/react-ufo": "^6.6.0",
82
+ "@atlaskit/react-ufo": "^6.7.0",
83
83
  "@atlaskit/section-message": "^8.13.0",
84
84
  "@atlaskit/smart-card": "^44.23.0",
85
85
  "@atlaskit/smart-user-picker": "^10.2.0",
@@ -87,12 +87,12 @@
87
87
  "@atlaskit/task-decision": "^20.1.0",
88
88
  "@atlaskit/teams-app-config": "^1.12.0",
89
89
  "@atlaskit/textfield": "^8.3.0",
90
- "@atlaskit/tmp-editor-statsig": "^89.0.0",
91
- "@atlaskit/tokens": "^13.1.0",
90
+ "@atlaskit/tmp-editor-statsig": "^89.4.0",
91
+ "@atlaskit/tokens": "^13.3.0",
92
92
  "@atlaskit/tooltip": "^22.6.0",
93
93
  "@atlaskit/width-detector": "^5.1.0",
94
94
  "@babel/runtime": "^7.0.0",
95
- "@compiled/react": "^0.20.0",
95
+ "@compiled/react": "patch:@compiled/react@npm%3A0.20.0#~/.yarn/patches/@compiled-react-npm-0.20.0-a771aa67a6.patch",
96
96
  "@emotion/react": "^11.7.1",
97
97
  "@popperjs/core": "^2.11.8",
98
98
  "@sentry/browser": "^6.18.2",