@atlaskit/editor-core 221.3.0 → 221.3.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.
Files changed (24) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/create-editor/ReactEditorView.js +66 -9
  3. package/dist/cjs/ui/Appearance/FullPage/FullPage.js +1 -1
  4. package/dist/cjs/ui/Appearance/FullPage/FullPageToolbarNext.js +21 -2
  5. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-compiled.js +2 -2
  6. package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +2 -2
  7. package/dist/cjs/ui/EditorContentContainer/styles/expandStyles.js +2 -2
  8. package/dist/cjs/version-wrapper.js +1 -1
  9. package/dist/es2019/create-editor/ReactEditorView.js +60 -9
  10. package/dist/es2019/ui/Appearance/FullPage/FullPage.js +1 -1
  11. package/dist/es2019/ui/Appearance/FullPage/FullPageToolbarNext.js +21 -2
  12. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-compiled.js +2 -2
  13. package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +3 -3
  14. package/dist/es2019/ui/EditorContentContainer/styles/expandStyles.js +1 -1
  15. package/dist/es2019/version-wrapper.js +1 -1
  16. package/dist/esm/create-editor/ReactEditorView.js +66 -9
  17. package/dist/esm/ui/Appearance/FullPage/FullPage.js +1 -1
  18. package/dist/esm/ui/Appearance/FullPage/FullPageToolbarNext.js +21 -2
  19. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-compiled.js +2 -2
  20. package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +3 -3
  21. package/dist/esm/ui/EditorContentContainer/styles/expandStyles.js +1 -1
  22. package/dist/esm/version-wrapper.js +1 -1
  23. package/dist/types/ui/EditorContentContainer/styles/expandStyles.d.ts +1 -1
  24. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 221.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`3378314fe2ec1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3378314fe2ec1) -
8
+ Clean up experiment `platform_editor_chromeless_expand_fix`
9
+ - [`9d2c2c1c016bd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9d2c2c1c016bd) -
10
+ [ux] Server-side render the editor toolbar (FullPageToolbarNext) with toolbar items enabled (not
11
+ hidden/disabled), so the toolbar is visible and interactive-looking on first paint — before
12
+ EditorView or collab edit is initialized. Clicks before editor is ready are noops.
13
+ - Updated dependencies
14
+
3
15
  ## 221.3.0
4
16
 
5
17
  ### Minor Changes
@@ -32,6 +32,8 @@ var _model = require("@atlaskit/editor-prosemirror/model");
32
32
  var _state2 = require("@atlaskit/editor-prosemirror/state");
33
33
  var _view = require("@atlaskit/editor-prosemirror/view");
34
34
  var _editorSsrRenderer = require("@atlaskit/editor-ssr-renderer");
35
+ var _createSsrEditorState = require("@atlaskit/editor-ssr-renderer/create-ssr-editor-state");
36
+ var _createSsrPmPlugins = require("@atlaskit/editor-ssr-renderer/create-ssr-pm-plugins");
35
37
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
36
38
  var _interactionIdContext = require("@atlaskit/react-ufo/interaction-id-context");
37
39
  var _interactionMetrics = require("@atlaskit/react-ufo/interaction-metrics");
@@ -114,7 +116,12 @@ function ReactEditorView(props) {
114
116
  __livePage = _props$editorProps.__livePage,
115
117
  onEditorCreated = props.onEditorCreated,
116
118
  onEditorDestroyed = props.onEditorDestroyed;
117
- var ssrEditorStateRef = (0, _react.useRef)(undefined);
119
+
120
+ // Holds the best available EditorState before the ProseMirror EditorView has mounted.
121
+ // On SSR: set to the SSR-rendered state so toolbar plugins can read it via getEditorState().
122
+ // On client first render: set to initialEditorState for the same reason.
123
+ // Cleared to undefined once createEditorView runs and viewRef.current becomes available.
124
+ var preMountEditorStateRef = (0, _react.useRef)(undefined);
118
125
  var editorRef = (0, _react.useRef)(null);
119
126
  var viewRef = (0, _react.useRef)();
120
127
  var focusTimeoutId = (0, _react.useRef)();
@@ -142,8 +149,8 @@ function ReactEditorView(props) {
142
149
  return (0, _featureFlagsFromProps.createFeatureFlagsFromProps)(editorPropFeatureFlags);
143
150
  }, [editorPropFeatureFlags]);
144
151
  var getEditorState = (0, _react.useCallback)(function () {
145
- var _ssrEditorStateRef$cu, _viewRef$current;
146
- return (_ssrEditorStateRef$cu = ssrEditorStateRef.current) !== null && _ssrEditorStateRef$cu !== void 0 ? _ssrEditorStateRef$cu : (_viewRef$current = viewRef.current) === null || _viewRef$current === void 0 ? void 0 : _viewRef$current.state;
152
+ var _preMountEditorStateR, _viewRef$current;
153
+ return (_preMountEditorStateR = preMountEditorStateRef.current) !== null && _preMountEditorStateR !== void 0 ? _preMountEditorStateR : (_viewRef$current = viewRef.current) === null || _viewRef$current === void 0 ? void 0 : _viewRef$current.state;
147
154
  }, []);
148
155
  var getEditorView = (0, _react.useCallback)(function () {
149
156
  return viewRef.current;
@@ -266,12 +273,17 @@ function ReactEditorView(props) {
266
273
  // so we can save some CPU time here.
267
274
  return undefined;
268
275
  }
269
- return createEditorState({
276
+ var state = createEditorState({
270
277
  props: props,
271
278
  doc: defaultValue,
272
279
  // ED-4759: Don't set selection at end for full-page editor - should be at start.
273
280
  selectionAtStart: (0, _isFullPage.isFullPage)(nextAppearance)
274
281
  });
282
+ if ((0, _expValEquals.expValEquals)('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true)) {
283
+ // CSR only, synchronously set preMountEditorStateRef so it's ready to be consumed by children including toolbar
284
+ preMountEditorStateRef.current = state;
285
+ }
286
+ return state;
275
287
  },
276
288
  // This is only used for the initial state - afterwards we will have `viewRef` available for use
277
289
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -672,6 +684,10 @@ function ReactEditorView(props) {
672
684
  mount: node
673
685
  }, getDirectEditorProps());
674
686
  viewRef.current = view;
687
+ if ((0, _expValEquals.expValEquals)('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true)) {
688
+ // clears pre-mount state as soon as the final view is mounted
689
+ preMountEditorStateRef.current = undefined;
690
+ }
675
691
  (0, _measureRender.measureRender)(_measureEnum.default.PROSEMIRROR_RENDERED, function (_ref3) {
676
692
  var duration = _ref3.duration,
677
693
  startTime = _ref3.startTime,
@@ -1037,17 +1053,56 @@ function ReactEditorView(props) {
1037
1053
  return buildDoc(schema);
1038
1054
  };
1039
1055
  var doc = (0, _ssrMeasures.profileSSROperation)("".concat(SSR_TRACE_SEGMENT_NAME, "/buildDoc"), doBuildDoc, onSSRMeasure);
1056
+
1057
+ // When the platform_editor_ssr_toolbar_optimistic is on, we create SSR-safe PM plugins and EditorState
1058
+ // HERE in ssrDeps — before any children render — so that FullPageToolbarNext can read correct
1059
+ // plugin state via useSharedPluginStateWithSelector → currentState() → getEditorState().
1060
+ //
1061
+ // We also pass these pre-built pmPlugins and editorState to EditorSSRRenderer so it can
1062
+ // skip redundant creation (avoids double createPluginsList + EditorState.create).
1063
+ if ((0, _expValEquals.expValEquals)('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true)) {
1064
+ var ssrPMPlugins = (0, _ssrMeasures.profileSSROperation)("".concat(SSR_TRACE_SEGMENT_NAME, "/createSSRPMPlugins"), function () {
1065
+ return (0, _createSsrPmPlugins.createSSRPMPlugins)({
1066
+ plugins: plugins,
1067
+ schema: schema,
1068
+ portalProviderAPI: props.portalProviderAPI,
1069
+ getIntl: function getIntl() {
1070
+ return props.intl;
1071
+ }
1072
+ });
1073
+ }, onSSRMeasure);
1074
+ var ssrState = (0, _ssrMeasures.profileSSROperation)("".concat(SSR_TRACE_SEGMENT_NAME, "/createSSREditorState"), function () {
1075
+ return (0, _createSsrEditorState.createSSREditorState)({
1076
+ doc: doc,
1077
+ schema: schema,
1078
+ pmPlugins: ssrPMPlugins
1079
+ });
1080
+ }, onSSRMeasure);
1081
+ return {
1082
+ plugins: plugins,
1083
+ schema: schema,
1084
+ doc: doc,
1085
+ ssrPMPlugins: ssrPMPlugins,
1086
+ ssrEditorState: ssrState
1087
+ };
1088
+ }
1040
1089
  return {
1041
1090
  plugins: plugins,
1042
1091
  schema: schema,
1043
- doc: doc
1092
+ doc: doc,
1093
+ ssrPMPlugins: undefined,
1094
+ ssrEditorState: undefined
1044
1095
  };
1045
- }, [allowBlockType, buildDoc, props.preset, onSSRMeasure]);
1096
+ }, [allowBlockType, buildDoc, props.preset, onSSRMeasure, props.portalProviderAPI, props.intl]);
1097
+ // SSR only, synchronously set preMountEditorStateRef so it's ready to be consumed by children including toolbar
1098
+ if (ssrDeps !== null && ssrDeps !== void 0 && ssrDeps.ssrEditorState) {
1099
+ preMountEditorStateRef.current = ssrDeps.ssrEditorState;
1100
+ }
1046
1101
  var _props$editorProps3 = props.editorProps,
1047
1102
  assistiveLabel = _props$editorProps3.assistiveLabel,
1048
1103
  assistiveDescribedBy = _props$editorProps3.assistiveDescribedBy;
1049
1104
  var handleSsrEditorStateChanged = (0, _react.useCallback)(function (state) {
1050
- ssrEditorStateRef.current = state;
1105
+ preMountEditorStateRef.current = state;
1051
1106
  // Notify listeners about the initial SSR state
1052
1107
  pluginInjectionAPI.current.onEditorViewUpdated({
1053
1108
  newEditorState: state,
@@ -1094,11 +1149,13 @@ function ReactEditorView(props) {
1094
1149
  id: EDIT_AREA_ID,
1095
1150
  "aria-describedby": assistiveDescribedBy,
1096
1151
  "data-editor-id": editorId.current,
1097
- onSSRMeasure: onSSRMeasure
1152
+ onSSRMeasure: onSSRMeasure,
1153
+ prebuiltPMPlugins: ssrDeps.ssrPMPlugins,
1154
+ prebuiltEditorState: ssrDeps.ssrEditorState
1098
1155
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1099
1156
  ,
1100
1157
  onEditorStateChanged: (0, _expValEquals.expValEquals)('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? handleSsrEditorStateChanged : function (state) {
1101
- ssrEditorStateRef.current = state;
1158
+ preMountEditorStateRef.current = state;
1102
1159
  // Notify listeners about the initial SSR state
1103
1160
  pluginInjectionAPI.current.onEditorViewUpdated({
1104
1161
  newEditorState: state,
@@ -170,7 +170,7 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
170
170
  (0, _editorSharedStyles.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT)(isToolbarAIFCEnabled)
171
171
  }
172
172
  }, !isEditorToolbarHidden && (isToolbarAIFCEnabled ? /*#__PURE__*/_react.default.createElement(_FullPageToolbarNext.FullPageToolbarNext, {
173
- disabled: !!props.disabled || !hasHadInteraction && (0, _expValEquals.expValEquals)('platform_editor_default_toolbar_state', 'isEnabled', true),
173
+ disabled: (0, _expValEquals.expValEquals)('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true) ? !hasHadInteraction ? false : !!props.disabled : !!props.disabled || !hasHadInteraction && (0, _expValEquals.expValEquals)('platform_editor_default_toolbar_state', 'isEnabled', true),
174
174
  disabledWithoutInteractionLogic: !!props.disabled,
175
175
  toolbarDockingPosition: toolbarDockingPosition !== null && toolbarDockingPosition !== void 0 ? toolbarDockingPosition : toolbarDocking,
176
176
  beforeIcon: props.primaryToolbarIconBefore,
@@ -126,7 +126,12 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
126
126
  // - primary toolbar isn't registered
127
127
  // - no custom primary toolbar components to render
128
128
  // note: primary toolbar must render if toolbar docking preference is set to "controlled" to avoid SSR conflicts
129
- if (!shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
129
+ // note(platform_editor_ssr_toolbar_optimistic): On the SSR and CSR, the toolbar plugin may be registered in the
130
+ // injection API but its components not yet populated. Bypass the early-return
131
+ // so the toolbar chrome stays mounted for layout stability; ToolbarNext renders
132
+ // null inside it until components arrive.
133
+ var isAwaitingToolbarComponents = (0, _expValEquals.expValEquals)('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true) && !Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
134
+ if (!isAwaitingToolbarComponents && !shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
130
135
  return /*#__PURE__*/_react.default.createElement(ToolbarPortal, null, null);
131
136
  }
132
137
  return /*#__PURE__*/_react.default.createElement(_contextPanel.ContextPanelConsumer, null, function (_ref6) {
@@ -142,7 +147,21 @@ var FullPageToolbarNext = exports.FullPageToolbarNext = function FullPageToolbar
142
147
  showKeyline: showKeyline || ContextPanelWidth > 0
143
148
  }, beforeIcon && /*#__PURE__*/_react.default.createElement("div", {
144
149
  className: (0, _runtime.ax)([styles.mainToolbarIconBefore, styles.mainToolbarIconBeforeNew])
145
- }, beforeIcon), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(FirstChildWrapper, null, (0, _expValEquals.expValEquals)('platform_editor_default_toolbar_state', 'isEnabled', true) ? primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && (0, _toolbar2.isToolbar)(toolbar) && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
150
+ }, beforeIcon), /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(FirstChildWrapper, null, (0, _expValEquals.expValEquals)('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true) ?
151
+ // optimistic toolbar — render immediately on both SSR and CSR with items enabled.
152
+ // Clicks are noops until editorView mounts.
153
+ primaryToolbarDockingConfigEnabled && (components && visibleToolbarComponents && (0, _toolbar2.isToolbar)(toolbar) ? /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
154
+ toolbar: toolbar,
155
+ components: visibleToolbarComponents,
156
+ editorView: editorView,
157
+ editorAPI: editorAPI,
158
+ popupsMountPoint: mountPoint,
159
+ editorAppearance: "full-page",
160
+ isDisabled: disabled,
161
+ disabledWithoutInteractionLogic: false
162
+ }) :
163
+ // toolbar plugin not yet registered — render nothing inside the chrome for layout stability
164
+ null) : (0, _expValEquals.expValEquals)('platform_editor_default_toolbar_state', 'isEnabled', true) ? primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && (0, _toolbar2.isToolbar)(toolbar) && /*#__PURE__*/_react.default.createElement(_Toolbar.ToolbarNext, {
146
165
  toolbar: toolbar,
147
166
  components: visibleToolbarComponents,
148
167
  editorView: editorView,
@@ -185,7 +185,7 @@ var editorContentStyles = {
185
185
  emojiDenseStyles: "_2f9he0wb _gof5e0wb _1kube0wb _1jg61osq _ik5u1osq _7vzk1f51 _1n9bv47k _7pqpv47k",
186
186
  expandStyles: "_1fkbxmi2 _vx27xmi2 _1n9xxmi2 _1oymxmi2",
187
187
  expandStylesBase: "_1dcv12b0 _vir8sm61 _nshtskji _1ffuu2gc _eyk7fyzg _1ia1h2mm _ullp1kdv _1ci8stnw _14zzb3bt _1psiidpf _9apoidpf _t1ygidpf _1dr7idpf _py7e1osq _q9kpglyw _2jyr1ial _1tv57wq0 _63an1j28 _g5xu1j28 _5u1u1j28 _1oif1j28 _age41gly _1ymq1bqt _v5bbe4h9 _1husnqa1 _1xt11j28 _1t5a10yn _o7hy9c8s _1rdsfs2f _1kd91qdr _1x8yidpf _3tz5idpf _1b7utlke _1vuvusvi _372tidpf _g7u3dgkc _8va114w8 _bc4d1r31 _1d0tglyw _4fj21o36 _1fbsglyw _1p5p1j28 _1gxpkb7n _1245kb7n _1fmjf1ug _ig0i4w17 _18mboxwj _1ev778tn _15uri7a9 _caue1rpy _149p1txw _u29r1osq _1icakb7n _hiyf1rpy _oemsidpf _ux5uidpf _im3nidpf _4uf1idpf _8q99glyw _2gbkglyw _wn6j1r31 _m5xjglyw _eu2zidpf _11pmewfl _oi2iewfl _1otu1txw _rrwboxwj _ikp21osq _txkaazsu _1wtktlke _ar4h1h6o _3emmglyw _14wj12b0 _18x1sm61 _qg62idpf _3dscidpf _1xnzidpf _1l2jidpf _1aljidpf _kb94idpf _bqovidpf _1dx5idpf _sma4dfik _1slov77o _wo9i1dpa _bj9o180e _1rrkdgkc _m4h31ul7 _zsbmglyw _upeu1ejb _1hr01ejb _13mr1txw _a0pq1h6o _1gdo1h6o _kinytlke _wyq613gf _hl71sm61 _n4fm1l7x _sv44u2gc _2xjk14w8 _czgd1txw _1i7i15vq _1pnt15vq _wz3i15vq _1g6m15vq _9s8f1osq _10zo1osq _1ish1ule _zkn71ule _19mvidpf _vkxwidpf _ay4r7mnp _1m2q7mnp _1io9glyw _1gwnglyw _vgp2ze3t _svkwu2gc _157n1ejb _1c011b66 _1dwdj4ch _fqkm1osq _9n6nusvi _1xgj1kdv _70nuglyw _11qn1osq _1q2615vq _vffj15vq _o1nxstnw _1j9kt94y _1u1ft94y _1s0y7mnp _17sv1q9c _1a5m1j28 _317nsm61 _1srh1l7x _kh951j28 _19lwdgkc _194h1ul7",
188
- expandStylesMixin_experiment_platform_editor_chromeless_expand_fix: "_mklmidpf _nnniidpf",
188
+ expandStylesMixin_chromeless_expand_fix: "_mklmidpf _nnniidpf",
189
189
  expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes: "_109wc7mi _vx27c7mi _15klc7mi _1oymc7mi _smy6idpf _g8xr1b66",
190
190
  expandStylesMixin_fg_platform_visual_refresh_icons: "_1ev7kb7n _1ocgttxp",
191
191
  expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes: "_1w8qq98m _omzvglyw _bqvk1osq _1h9p16ux _19lestnw _14j01n1a _1pm0idpf _1p3gidpf _1d9kt94y _113e1o8l",
@@ -395,7 +395,7 @@ var EditorContentContainerCompiled = exports.EditorContentContainerCompiled = /*
395
395
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
396
396
  (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp')) && isDense && editorContentStyles.tasksAndDecisionsDenseStyles, editorContentStyles.gridStyles, editorContentStyles.blockMarksStyles, editorContentStyles.dateStyles, editorContentStyles.extensionStyles, (contentMode === 'compact' && (0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) || (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp')) && editorContentStyles.extensionStylesDense, contentMode === 'compact' && (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && !(0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) && !(0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp') && editorContentStyles.extensionStylesLegacyDense, (0, _expValEquals.expValEquals)('platform_editor_bodiedextension_layoutshift_fix', 'isEnabled', true) && editorContentStyles.bodiedExtensionLayoutShiftFix, editorContentStyles.extensionDiffStyles, editorContentStyles.expandStylesBase, !useStandardNodeWidth && editorContentStyles.expandStyles, contentMode === 'compact' && ((0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) ||
397
397
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
398
- (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp')) && isDense && editorContentStyles.expandDenseStyles, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes : editorContentStyles.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, editorContentStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && (0, _expValEquals.expValEquals)('platform_editor_chromeless_expand_fix', 'isEnabled', true) && editorContentStyles.expandStylesMixin_experiment_platform_editor_chromeless_expand_fix, (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.findReplaceStylesNewWithA11Y : editorContentStyles.findReplaceStyles, (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesNewWithCodeblockColorContrastFix, !(0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesWithCodeblockColorContrastFix, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.findReplaceStylesWithRefSyncBlock, editorContentStyles.textHighlightStyle, editorContentStyles.decisionStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_blocktaskitem_node_tenantid', 'isEnabled', true) ? editorContentStyles.taskItemStylesWithBlockTaskItem : editorContentStyles.taskItemStyles, editorContentStyles.taskItemCheckboxStyles, editorContentStyles.decisionIconWithVisualRefresh, editorContentStyles.statusStyles, (0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') ? editorContentStyles.statusStylesTeam26 : (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh : (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh, colorMode === 'dark' && (0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') && editorContentStyles.statusStylesTeam26DarkMode, editorContentStyles.annotationStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? editorContentStyles.smartCardStylesWithSearchMatchAndBlockMenuDangerStyles : editorContentStyles.smartCardStylesWithSearchMatch : editorContentStyles.smartCardStyles, (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true) && editorContentStyles.smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1') || (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true)) && editorContentStyles.editorControlsSmartCardStyles, editorContentStyles.embedCardStyles, editorContentStyles.unsupportedStyles, editorContentStyles.resizerStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc-maui-experiment', 'isEnabled', true) && (0, _expValEquals.expValEquals)('databases-native-embeds-v2', 'isEnabled', true) && editorContentStyles.resizerBottomHandleStyles, editorContentStyles.layoutBaseStyles, (0, _expValEquals.expValEquals)('platform_editor_table_excerpts_fix', 'isEnabled', true) && editorContentStyles.layoutBaseStylesWithTableExcerptsFix, (0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && editorContentStyles.alignMultipleWrappedImageInLayoutStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.syncBlockStylesBase, (0, _experiments.editorExperiment)('platform_synced_block', true) &&
398
+ (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp')) && isDense && editorContentStyles.expandDenseStyles, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes : editorContentStyles.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, editorContentStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && editorContentStyles.expandStylesMixin_chromeless_expand_fix, (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.findReplaceStylesNewWithA11Y : editorContentStyles.findReplaceStyles, (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesNewWithCodeblockColorContrastFix, !(0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesWithCodeblockColorContrastFix, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.findReplaceStylesWithRefSyncBlock, editorContentStyles.textHighlightStyle, editorContentStyles.decisionStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_blocktaskitem_node_tenantid', 'isEnabled', true) ? editorContentStyles.taskItemStylesWithBlockTaskItem : editorContentStyles.taskItemStyles, editorContentStyles.taskItemCheckboxStyles, editorContentStyles.decisionIconWithVisualRefresh, editorContentStyles.statusStyles, (0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') ? editorContentStyles.statusStylesTeam26 : (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh : (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh, colorMode === 'dark' && (0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') && editorContentStyles.statusStylesTeam26DarkMode, editorContentStyles.annotationStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _experiments.editorExperiment)('platform_editor_block_menu', true) ? editorContentStyles.smartCardStylesWithSearchMatchAndBlockMenuDangerStyles : editorContentStyles.smartCardStylesWithSearchMatch : editorContentStyles.smartCardStyles, (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true) && editorContentStyles.smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_controls', 'cohort', 'variant1') || (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true)) && editorContentStyles.editorControlsSmartCardStyles, editorContentStyles.embedCardStyles, editorContentStyles.unsupportedStyles, editorContentStyles.resizerStyles, (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc-maui-experiment', 'isEnabled', true) && (0, _expValEquals.expValEquals)('databases-native-embeds-v2', 'isEnabled', true) && editorContentStyles.resizerBottomHandleStyles, editorContentStyles.layoutBaseStyles, (0, _expValEquals.expValEquals)('platform_editor_table_excerpts_fix', 'isEnabled', true) && editorContentStyles.layoutBaseStylesWithTableExcerptsFix, (0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') && editorContentStyles.alignMultipleWrappedImageInLayoutStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.syncBlockStylesBase, (0, _experiments.editorExperiment)('platform_synced_block', true) &&
399
399
  // Apply sync block delta styles conditionally based on useStandardNodeWidth (negative margins or not)
400
400
  !useStandardNodeWidth && editorContentStyles.syncBlockStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.syncBlockOverflowStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.syncBlockFirstNodeStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_14') && editorContentStyles.syncBlockTextSelectionStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutBaseStylesAdvanced, (0, _experiments.editorExperiment)('advanced_layouts', true) ? editorContentStyles.layoutSectionStylesAdvanced : editorContentStyles.layoutSectionStylesNotAdvanced, (0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnDividerStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutColumnDividerStylesNestedDnD, (0, _experiments.editorExperiment)('advanced_layouts', true) ? editorContentStyles.layoutColumnStylesAdvanced : editorContentStyles.layoutColumnStylesNotAdvanced, (0, _experiments.editorExperiment)('advanced_layouts', true) && (0, _experiments.editorExperiment)('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnResizeStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) ? editorContentStyles.layoutSelectedStylesAdvanced : editorContentStyles.layoutSelectedStylesNotAdvanced, (0, _experiments.editorExperiment)('platform_synced_block', true) && editorContentStyles.layoutSelectedStylesAdvancedFix, (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFGExcludingBodiedSync, !(0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFG, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.layoutColumnMartinTopFixesNew : editorContentStyles.layoutColumnMartinTopFixesOld, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? contentMode === 'compact' && ((0, _expValEquals.expValEquals)('confluence_compact_text_format', 'isEnabled', true) ||
401
401
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -315,9 +315,9 @@ var EditorContentContainerEmotion = exports.EditorContentContainerEmotion = /*#_
315
315
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
316
316
  _expandStyles.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes,
317
317
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
318
- _expandStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && (0, _expValEquals.expValEquals)('platform_editor_chromeless_expand_fix', 'isEnabled', true) &&
318
+ _expandStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless &&
319
319
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
320
- _expandStyles.expandStylesMixin_experiment_platform_editor_chromeless_expand_fix, (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ?
320
+ _expandStyles.expandStylesMixin_chromeless_expand_fix, (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ?
321
321
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
322
322
  _findReplaceStyles.findReplaceStylesNewWithA11Y :
323
323
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.getDenseExpandTitleStyles = exports.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes = exports.expandStylesMixin_fg_platform_visual_refresh_icons = exports.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes = exports.expandStylesMixin_experiment_platform_editor_chromeless_expand_fix = exports.expandStylesBase = exports.expandStyles = void 0;
6
+ exports.getDenseExpandTitleStyles = exports.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes = exports.expandStylesMixin_fg_platform_visual_refresh_icons = exports.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes = exports.expandStylesMixin_chromeless_expand_fix = exports.expandStylesBase = exports.expandStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
9
9
  /* eslint-disable @atlaskit/ui-styling-standard/use-compiled,
@@ -347,7 +347,7 @@ var expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes = exports.exp
347
347
  * See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
348
348
  */
349
349
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
350
- var expandStylesMixin_experiment_platform_editor_chromeless_expand_fix = exports.expandStylesMixin_experiment_platform_editor_chromeless_expand_fix = (0, _react.css)({
350
+ var expandStylesMixin_chromeless_expand_fix = exports.expandStylesMixin_chromeless_expand_fix = (0, _react.css)({
351
351
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
352
352
  '.ProseMirror > .ak-editor-expand': {
353
353
  marginLeft: 0,
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
8
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
9
- var version = exports.version = "221.2.1";
9
+ var version = exports.version = "221.3.0";
@@ -21,6 +21,8 @@ import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
21
21
  import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
22
22
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
23
23
  import { EditorSSRRenderer } from '@atlaskit/editor-ssr-renderer';
24
+ import { createSSREditorState } from '@atlaskit/editor-ssr-renderer/create-ssr-editor-state';
25
+ import { createSSRPMPlugins } from '@atlaskit/editor-ssr-renderer/create-ssr-pm-plugins';
24
26
  import { fg } from '@atlaskit/platform-feature-flags';
25
27
  import { getInteractionId } from '@atlaskit/react-ufo/interaction-id-context';
26
28
  import { abortAll, getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
@@ -87,7 +89,12 @@ export function ReactEditorView(props) {
87
89
  onEditorCreated,
88
90
  onEditorDestroyed
89
91
  } = props;
90
- const ssrEditorStateRef = useRef(undefined);
92
+
93
+ // Holds the best available EditorState before the ProseMirror EditorView has mounted.
94
+ // On SSR: set to the SSR-rendered state so toolbar plugins can read it via getEditorState().
95
+ // On client first render: set to initialEditorState for the same reason.
96
+ // Cleared to undefined once createEditorView runs and viewRef.current becomes available.
97
+ const preMountEditorStateRef = useRef(undefined);
91
98
  const editorRef = useRef(null);
92
99
  const viewRef = useRef();
93
100
  const focusTimeoutId = useRef();
@@ -111,8 +118,8 @@ export function ReactEditorView(props) {
111
118
  const contentTransformer = useRef(undefined);
112
119
  const featureFlags = useMemo(() => createFeatureFlagsFromProps(editorPropFeatureFlags), [editorPropFeatureFlags]);
113
120
  const getEditorState = useCallback(() => {
114
- var _ssrEditorStateRef$cu, _viewRef$current;
115
- return (_ssrEditorStateRef$cu = ssrEditorStateRef.current) !== null && _ssrEditorStateRef$cu !== void 0 ? _ssrEditorStateRef$cu : (_viewRef$current = viewRef.current) === null || _viewRef$current === void 0 ? void 0 : _viewRef$current.state;
121
+ var _preMountEditorStateR, _viewRef$current;
122
+ return (_preMountEditorStateR = preMountEditorStateRef.current) !== null && _preMountEditorStateR !== void 0 ? _preMountEditorStateR : (_viewRef$current = viewRef.current) === null || _viewRef$current === void 0 ? void 0 : _viewRef$current.state;
116
123
  }, []);
117
124
  const getEditorView = useCallback(() => viewRef.current, []);
118
125
  const dispatch = useMemo(() => createDispatch(eventDispatcher), [eventDispatcher]);
@@ -228,12 +235,17 @@ export function ReactEditorView(props) {
228
235
  // so we can save some CPU time here.
229
236
  return undefined;
230
237
  }
231
- return createEditorState({
238
+ const state = createEditorState({
232
239
  props,
233
240
  doc: defaultValue,
234
241
  // ED-4759: Don't set selection at end for full-page editor - should be at start.
235
242
  selectionAtStart: isFullPage(nextAppearance)
236
243
  });
244
+ if (expValEquals('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true)) {
245
+ // CSR only, synchronously set preMountEditorStateRef so it's ready to be consumed by children including toolbar
246
+ preMountEditorStateRef.current = state;
247
+ }
248
+ return state;
237
249
  },
238
250
  // This is only used for the initial state - afterwards we will have `viewRef` available for use
239
251
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -622,6 +634,10 @@ export function ReactEditorView(props) {
622
634
  mount: node
623
635
  }, getDirectEditorProps());
624
636
  viewRef.current = view;
637
+ if (expValEquals('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true)) {
638
+ // clears pre-mount state as soon as the final view is mounted
639
+ preMountEditorStateRef.current = undefined;
640
+ }
625
641
  measureRender(measurements.PROSEMIRROR_RENDERED, ({
626
642
  duration,
627
643
  startTime,
@@ -960,18 +976,51 @@ export function ReactEditorView(props) {
960
976
  const schema = profileSSROperation(`${SSR_TRACE_SEGMENT_NAME}/createSchema`, doCreateSchema, onSSRMeasure);
961
977
  const doBuildDoc = () => buildDoc(schema);
962
978
  const doc = profileSSROperation(`${SSR_TRACE_SEGMENT_NAME}/buildDoc`, doBuildDoc, onSSRMeasure);
979
+
980
+ // When the platform_editor_ssr_toolbar_optimistic is on, we create SSR-safe PM plugins and EditorState
981
+ // HERE in ssrDeps — before any children render — so that FullPageToolbarNext can read correct
982
+ // plugin state via useSharedPluginStateWithSelector → currentState() → getEditorState().
983
+ //
984
+ // We also pass these pre-built pmPlugins and editorState to EditorSSRRenderer so it can
985
+ // skip redundant creation (avoids double createPluginsList + EditorState.create).
986
+ if (expValEquals('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true)) {
987
+ const ssrPMPlugins = profileSSROperation(`${SSR_TRACE_SEGMENT_NAME}/createSSRPMPlugins`, () => createSSRPMPlugins({
988
+ plugins,
989
+ schema,
990
+ portalProviderAPI: props.portalProviderAPI,
991
+ getIntl: () => props.intl
992
+ }), onSSRMeasure);
993
+ const ssrState = profileSSROperation(`${SSR_TRACE_SEGMENT_NAME}/createSSREditorState`, () => createSSREditorState({
994
+ doc,
995
+ schema,
996
+ pmPlugins: ssrPMPlugins
997
+ }), onSSRMeasure);
998
+ return {
999
+ plugins,
1000
+ schema,
1001
+ doc,
1002
+ ssrPMPlugins,
1003
+ ssrEditorState: ssrState
1004
+ };
1005
+ }
963
1006
  return {
964
1007
  plugins,
965
1008
  schema,
966
- doc
1009
+ doc,
1010
+ ssrPMPlugins: undefined,
1011
+ ssrEditorState: undefined
967
1012
  };
968
- }, [allowBlockType, buildDoc, props.preset, onSSRMeasure]);
1013
+ }, [allowBlockType, buildDoc, props.preset, onSSRMeasure, props.portalProviderAPI, props.intl]);
1014
+ // SSR only, synchronously set preMountEditorStateRef so it's ready to be consumed by children including toolbar
1015
+ if (ssrDeps !== null && ssrDeps !== void 0 && ssrDeps.ssrEditorState) {
1016
+ preMountEditorStateRef.current = ssrDeps.ssrEditorState;
1017
+ }
969
1018
  const {
970
1019
  assistiveLabel,
971
1020
  assistiveDescribedBy
972
1021
  } = props.editorProps;
973
1022
  const handleSsrEditorStateChanged = useCallback(state => {
974
- ssrEditorStateRef.current = state;
1023
+ preMountEditorStateRef.current = state;
975
1024
  // Notify listeners about the initial SSR state
976
1025
  pluginInjectionAPI.current.onEditorViewUpdated({
977
1026
  newEditorState: state,
@@ -1016,11 +1065,13 @@ export function ReactEditorView(props) {
1016
1065
  id: EDIT_AREA_ID,
1017
1066
  "aria-describedby": assistiveDescribedBy,
1018
1067
  "data-editor-id": editorId.current,
1019
- onSSRMeasure: onSSRMeasure
1068
+ onSSRMeasure: onSSRMeasure,
1069
+ prebuiltPMPlugins: ssrDeps.ssrPMPlugins,
1070
+ prebuiltEditorState: ssrDeps.ssrEditorState
1020
1071
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1021
1072
  ,
1022
1073
  onEditorStateChanged: expValEquals('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? handleSsrEditorStateChanged : state => {
1023
- ssrEditorStateRef.current = state;
1074
+ preMountEditorStateRef.current = state;
1024
1075
  // Notify listeners about the initial SSR state
1025
1076
  pluginInjectionAPI.current.onEditorViewUpdated({
1026
1077
  newEditorState: state,
@@ -154,7 +154,7 @@ export const FullPageEditor = props => {
154
154
  FULL_PAGE_EDITOR_TOOLBAR_HEIGHT(isToolbarAIFCEnabled)
155
155
  }
156
156
  }, !isEditorToolbarHidden && (isToolbarAIFCEnabled ? /*#__PURE__*/React.createElement(FullPageToolbarNext, {
157
- disabled: !!props.disabled || !hasHadInteraction && expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true),
157
+ disabled: expValEquals('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true) ? !hasHadInteraction ? false : !!props.disabled : !!props.disabled || !hasHadInteraction && expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true),
158
158
  disabledWithoutInteractionLogic: !!props.disabled,
159
159
  toolbarDockingPosition: (_toolbarDockingPositi = toolbarDockingPosition) !== null && _toolbarDockingPositi !== void 0 ? _toolbarDockingPositi : toolbarDocking,
160
160
  beforeIcon: props.primaryToolbarIconBefore,
@@ -116,7 +116,12 @@ export const FullPageToolbarNext = ({
116
116
  // - primary toolbar isn't registered
117
117
  // - no custom primary toolbar components to render
118
118
  // note: primary toolbar must render if toolbar docking preference is set to "controlled" to avoid SSR conflicts
119
- if (!shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
119
+ // note(platform_editor_ssr_toolbar_optimistic): On the SSR and CSR, the toolbar plugin may be registered in the
120
+ // injection API but its components not yet populated. Bypass the early-return
121
+ // so the toolbar chrome stays mounted for layout stability; ToolbarNext renders
122
+ // null inside it until components arrive.
123
+ const isAwaitingToolbarComponents = expValEquals('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true) && !Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
124
+ if (!isAwaitingToolbarComponents && !shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
120
125
  return /*#__PURE__*/React.createElement(ToolbarPortal, null, null);
121
126
  }
122
127
  return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, ({
@@ -132,7 +137,21 @@ export const FullPageToolbarNext = ({
132
137
  showKeyline: showKeyline || ContextPanelWidth > 0
133
138
  }, beforeIcon && /*#__PURE__*/React.createElement("div", {
134
139
  className: ax([styles.mainToolbarIconBefore, styles.mainToolbarIconBeforeNew])
135
- }, beforeIcon), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true) ? primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && isToolbar(toolbar) && /*#__PURE__*/React.createElement(ToolbarNext, {
140
+ }, beforeIcon), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, expValEquals('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true) ?
141
+ // optimistic toolbar — render immediately on both SSR and CSR with items enabled.
142
+ // Clicks are noops until editorView mounts.
143
+ primaryToolbarDockingConfigEnabled && (components && visibleToolbarComponents && isToolbar(toolbar) ? /*#__PURE__*/React.createElement(ToolbarNext, {
144
+ toolbar: toolbar,
145
+ components: visibleToolbarComponents,
146
+ editorView: editorView,
147
+ editorAPI: editorAPI,
148
+ popupsMountPoint: mountPoint,
149
+ editorAppearance: "full-page",
150
+ isDisabled: disabled,
151
+ disabledWithoutInteractionLogic: false
152
+ }) :
153
+ // toolbar plugin not yet registered — render nothing inside the chrome for layout stability
154
+ null) : expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true) ? primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && isToolbar(toolbar) && /*#__PURE__*/React.createElement(ToolbarNext, {
136
155
  toolbar: toolbar,
137
156
  components: visibleToolbarComponents,
138
157
  editorView: editorView,
@@ -236,7 +236,7 @@ const editorContentStyles = {
236
236
  emojiDenseStyles: "_2f9he0wb _gof5e0wb _1kube0wb _1jg61osq _ik5u1osq _7vzk1f51 _1n9bv47k _7pqpv47k",
237
237
  expandStyles: "_1fkbxmi2 _vx27xmi2 _1n9xxmi2 _1oymxmi2",
238
238
  expandStylesBase: "_1dcv12b0 _vir8sm61 _nshtskji _1ffuu2gc _eyk7fyzg _1ia1h2mm _ullp1kdv _1ci8stnw _14zzb3bt _1psiidpf _9apoidpf _t1ygidpf _1dr7idpf _py7e1osq _q9kpglyw _2jyr1ial _1tv57wq0 _63an1j28 _g5xu1j28 _5u1u1j28 _1oif1j28 _age41gly _1ymq1bqt _v5bbe4h9 _1husnqa1 _1xt11j28 _1t5a10yn _o7hy9c8s _1rdsfs2f _1kd91qdr _1x8yidpf _3tz5idpf _1b7utlke _1vuvusvi _372tidpf _g7u3dgkc _8va114w8 _bc4d1r31 _1d0tglyw _4fj21o36 _1fbsglyw _1p5p1j28 _1gxpkb7n _1245kb7n _1fmjf1ug _ig0i4w17 _18mboxwj _1ev778tn _15uri7a9 _caue1rpy _149p1txw _u29r1osq _1icakb7n _hiyf1rpy _oemsidpf _ux5uidpf _im3nidpf _4uf1idpf _8q99glyw _2gbkglyw _wn6j1r31 _m5xjglyw _eu2zidpf _11pmewfl _oi2iewfl _1otu1txw _rrwboxwj _ikp21osq _txkaazsu _1wtktlke _ar4h1h6o _3emmglyw _14wj12b0 _18x1sm61 _qg62idpf _3dscidpf _1xnzidpf _1l2jidpf _1aljidpf _kb94idpf _bqovidpf _1dx5idpf _sma4dfik _1slov77o _wo9i1dpa _bj9o180e _1rrkdgkc _m4h31ul7 _zsbmglyw _upeu1ejb _1hr01ejb _13mr1txw _a0pq1h6o _1gdo1h6o _kinytlke _wyq613gf _hl71sm61 _n4fm1l7x _sv44u2gc _2xjk14w8 _czgd1txw _1i7i15vq _1pnt15vq _wz3i15vq _1g6m15vq _9s8f1osq _10zo1osq _1ish1ule _zkn71ule _19mvidpf _vkxwidpf _ay4r7mnp _1m2q7mnp _1io9glyw _1gwnglyw _vgp2ze3t _svkwu2gc _157n1ejb _1c011b66 _1dwdj4ch _fqkm1osq _9n6nusvi _1xgj1kdv _70nuglyw _11qn1osq _1q2615vq _vffj15vq _o1nxstnw _1j9kt94y _1u1ft94y _1s0y7mnp _17sv1q9c _1a5m1j28 _317nsm61 _1srh1l7x _kh951j28 _19lwdgkc _194h1ul7",
239
- expandStylesMixin_experiment_platform_editor_chromeless_expand_fix: "_mklmidpf _nnniidpf",
239
+ expandStylesMixin_chromeless_expand_fix: "_mklmidpf _nnniidpf",
240
240
  expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes: "_109wc7mi _vx27c7mi _15klc7mi _1oymc7mi _smy6idpf _g8xr1b66",
241
241
  expandStylesMixin_fg_platform_visual_refresh_icons: "_1ev7kb7n _1ocgttxp",
242
242
  expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes: "_1w8qq98m _omzvglyw _bqvk1osq _1h9p16ux _19lestnw _14j01n1a _1pm0idpf _1p3gidpf _1d9kt94y _113e1o8l",
@@ -451,7 +451,7 @@ export const EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef((pro
451
451
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
452
452
  expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && isDense && editorContentStyles.tasksAndDecisionsDenseStyles, editorContentStyles.gridStyles, editorContentStyles.blockMarksStyles, editorContentStyles.dateStyles, editorContentStyles.extensionStyles, (contentMode === 'compact' && expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && editorContentStyles.extensionStylesDense, contentMode === 'compact' && expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && !expValEquals('confluence_compact_text_format', 'isEnabled', true) && !fg('platform_editor_content_mode_button_mvp') && editorContentStyles.extensionStylesLegacyDense, expValEquals('platform_editor_bodiedextension_layoutshift_fix', 'isEnabled', true) && editorContentStyles.bodiedExtensionLayoutShiftFix, editorContentStyles.extensionDiffStyles, editorContentStyles.expandStylesBase, !useStandardNodeWidth && editorContentStyles.expandStyles, contentMode === 'compact' && (expValEquals('confluence_compact_text_format', 'isEnabled', true) ||
453
453
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
454
- expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && isDense && editorContentStyles.expandDenseStyles, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes : editorContentStyles.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, editorContentStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && expValEquals('platform_editor_chromeless_expand_fix', 'isEnabled', true) && editorContentStyles.expandStylesMixin_experiment_platform_editor_chromeless_expand_fix, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.findReplaceStylesNewWithA11Y : editorContentStyles.findReplaceStyles, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesNewWithCodeblockColorContrastFix, !expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesWithCodeblockColorContrastFix, editorExperiment('platform_synced_block', true) && editorContentStyles.findReplaceStylesWithRefSyncBlock, editorContentStyles.textHighlightStyle, editorContentStyles.decisionStyles, expValEqualsNoExposure('platform_editor_blocktaskitem_node_tenantid', 'isEnabled', true) ? editorContentStyles.taskItemStylesWithBlockTaskItem : editorContentStyles.taskItemStyles, editorContentStyles.taskItemCheckboxStyles, editorContentStyles.decisionIconWithVisualRefresh, editorContentStyles.statusStyles, fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? editorContentStyles.statusStylesTeam26 : fg('platform-component-visual-refresh') ? expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh : expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh, colorMode === 'dark' && fg('platform-dst-lozenge-tag-badge-visual-uplifts') && editorContentStyles.statusStylesTeam26DarkMode, editorContentStyles.annotationStyles, expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorExperiment('platform_editor_block_menu', true) ? editorContentStyles.smartCardStylesWithSearchMatchAndBlockMenuDangerStyles : editorContentStyles.smartCardStylesWithSearchMatch : editorContentStyles.smartCardStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorContentStyles.smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') || editorExperiment('platform_editor_preview_panel_linking_exp', true)) && editorContentStyles.editorControlsSmartCardStyles, editorContentStyles.embedCardStyles, editorContentStyles.unsupportedStyles, editorContentStyles.resizerStyles, expValEqualsNoExposure('cc-maui-experiment', 'isEnabled', true) && expValEquals('databases-native-embeds-v2', 'isEnabled', true) && editorContentStyles.resizerBottomHandleStyles, editorContentStyles.layoutBaseStyles, expValEquals('platform_editor_table_excerpts_fix', 'isEnabled', true) && editorContentStyles.layoutBaseStylesWithTableExcerptsFix, fg('platform_editor_fix_media_in_renderer') && editorContentStyles.alignMultipleWrappedImageInLayoutStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockStylesBase, editorExperiment('platform_synced_block', true) &&
454
+ expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && isDense && editorContentStyles.expandDenseStyles, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes : editorContentStyles.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, editorContentStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && editorContentStyles.expandStylesMixin_chromeless_expand_fix, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.findReplaceStylesNewWithA11Y : editorContentStyles.findReplaceStyles, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesNewWithCodeblockColorContrastFix, !expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesWithCodeblockColorContrastFix, editorExperiment('platform_synced_block', true) && editorContentStyles.findReplaceStylesWithRefSyncBlock, editorContentStyles.textHighlightStyle, editorContentStyles.decisionStyles, expValEqualsNoExposure('platform_editor_blocktaskitem_node_tenantid', 'isEnabled', true) ? editorContentStyles.taskItemStylesWithBlockTaskItem : editorContentStyles.taskItemStyles, editorContentStyles.taskItemCheckboxStyles, editorContentStyles.decisionIconWithVisualRefresh, editorContentStyles.statusStyles, fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? editorContentStyles.statusStylesTeam26 : fg('platform-component-visual-refresh') ? expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh : expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh, colorMode === 'dark' && fg('platform-dst-lozenge-tag-badge-visual-uplifts') && editorContentStyles.statusStylesTeam26DarkMode, editorContentStyles.annotationStyles, expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorExperiment('platform_editor_block_menu', true) ? editorContentStyles.smartCardStylesWithSearchMatchAndBlockMenuDangerStyles : editorContentStyles.smartCardStylesWithSearchMatch : editorContentStyles.smartCardStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorContentStyles.smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') || editorExperiment('platform_editor_preview_panel_linking_exp', true)) && editorContentStyles.editorControlsSmartCardStyles, editorContentStyles.embedCardStyles, editorContentStyles.unsupportedStyles, editorContentStyles.resizerStyles, expValEqualsNoExposure('cc-maui-experiment', 'isEnabled', true) && expValEquals('databases-native-embeds-v2', 'isEnabled', true) && editorContentStyles.resizerBottomHandleStyles, editorContentStyles.layoutBaseStyles, expValEquals('platform_editor_table_excerpts_fix', 'isEnabled', true) && editorContentStyles.layoutBaseStylesWithTableExcerptsFix, fg('platform_editor_fix_media_in_renderer') && editorContentStyles.alignMultipleWrappedImageInLayoutStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockStylesBase, editorExperiment('platform_synced_block', true) &&
455
455
  // Apply sync block delta styles conditionally based on useStandardNodeWidth (negative margins or not)
456
456
  !useStandardNodeWidth && editorContentStyles.syncBlockStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockFirstNodeStyles, editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_14') && editorContentStyles.syncBlockTextSelectionStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutBaseStylesAdvanced, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSectionStylesAdvanced : editorContentStyles.layoutSectionStylesNotAdvanced, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnDividerStyles, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutColumnDividerStylesNestedDnD, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutColumnStylesAdvanced : editorContentStyles.layoutColumnStylesNotAdvanced, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnResizeStyles, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSelectedStylesAdvanced : editorContentStyles.layoutSelectedStylesNotAdvanced, editorExperiment('platform_synced_block', true) && editorContentStyles.layoutSelectedStylesAdvancedFix, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, editorExperiment('platform_synced_block', true) && fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFGExcludingBodiedSync, !editorExperiment('platform_synced_block', true) && fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFG, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.layoutColumnMartinTopFixesNew : editorContentStyles.layoutColumnMartinTopFixesOld, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, fg('platform_editor_typography_ugc') ? contentMode === 'compact' && (expValEquals('confluence_compact_text_format', 'isEnabled', true) ||
457
457
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -30,7 +30,7 @@ import { dangerDateStyles, dateStyles, dateVanillaStyles } from './styles/dateSt
30
30
  import { editorUGCSmallText, editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
31
31
  import { embedCardStyles } from './styles/embedCardStyles';
32
32
  import { emojiDangerStyles, emojiStyles, getDenseEmojiStyles, getScaledDenseEmojiStyles, scaledEmojiStyles } from './styles/emoji';
33
- import { expandStyles, expandStylesBase, expandStylesMixin_experiment_platform_editor_chromeless_expand_fix, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, getDenseExpandTitleStyles } from './styles/expandStyles';
33
+ import { expandStyles, expandStylesBase, expandStylesMixin_chromeless_expand_fix, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, getDenseExpandTitleStyles } from './styles/expandStyles';
34
34
  import { extensionDiffStyles, getExtensionStyles } from './styles/extensionStyles';
35
35
  import { findReplaceStyles, findReplaceStylesNewWithA11Y, findReplaceStylesNewWithCodeblockColorContrastFix, findReplaceStylesWithCodeblockColorContrastFix, findReplaceStylesWithRefSyncBlock } from './styles/findReplaceStyles';
36
36
  import { firstBlockNodeStyles } from './styles/firstBlockNodeStyles';
@@ -319,9 +319,9 @@ export const EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef((prop
319
319
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
320
320
  expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes,
321
321
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
322
- expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && expValEquals('platform_editor_chromeless_expand_fix', 'isEnabled', true) &&
322
+ expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless &&
323
323
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
324
- expandStylesMixin_experiment_platform_editor_chromeless_expand_fix, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ?
324
+ expandStylesMixin_chromeless_expand_fix, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ?
325
325
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
326
326
  findReplaceStylesNewWithA11Y :
327
327
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -340,7 +340,7 @@ export const expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes = cs
340
340
  * See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
341
341
  */
342
342
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
343
- export const expandStylesMixin_experiment_platform_editor_chromeless_expand_fix = css({
343
+ export const expandStylesMixin_chromeless_expand_fix = css({
344
344
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
345
345
  '.ProseMirror > .ak-editor-expand': {
346
346
  marginLeft: 0,
@@ -1,3 +1,3 @@
1
1
  export const name = "@atlaskit/editor-core";
2
2
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
3
- export const version = "221.2.1";
3
+ export const version = "221.3.0";
@@ -29,6 +29,8 @@ import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
29
29
  import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
30
30
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
31
31
  import { EditorSSRRenderer } from '@atlaskit/editor-ssr-renderer';
32
+ import { createSSREditorState } from '@atlaskit/editor-ssr-renderer/create-ssr-editor-state';
33
+ import { createSSRPMPlugins } from '@atlaskit/editor-ssr-renderer/create-ssr-pm-plugins';
32
34
  import { fg } from '@atlaskit/platform-feature-flags';
33
35
  import { getInteractionId } from '@atlaskit/react-ufo/interaction-id-context';
34
36
  import { abortAll, getActiveInteraction } from '@atlaskit/react-ufo/interaction-metrics';
@@ -105,7 +107,12 @@ export function ReactEditorView(props) {
105
107
  __livePage = _props$editorProps.__livePage,
106
108
  onEditorCreated = props.onEditorCreated,
107
109
  onEditorDestroyed = props.onEditorDestroyed;
108
- var ssrEditorStateRef = useRef(undefined);
110
+
111
+ // Holds the best available EditorState before the ProseMirror EditorView has mounted.
112
+ // On SSR: set to the SSR-rendered state so toolbar plugins can read it via getEditorState().
113
+ // On client first render: set to initialEditorState for the same reason.
114
+ // Cleared to undefined once createEditorView runs and viewRef.current becomes available.
115
+ var preMountEditorStateRef = useRef(undefined);
109
116
  var editorRef = useRef(null);
110
117
  var viewRef = useRef();
111
118
  var focusTimeoutId = useRef();
@@ -133,8 +140,8 @@ export function ReactEditorView(props) {
133
140
  return createFeatureFlagsFromProps(editorPropFeatureFlags);
134
141
  }, [editorPropFeatureFlags]);
135
142
  var getEditorState = useCallback(function () {
136
- var _ssrEditorStateRef$cu, _viewRef$current;
137
- return (_ssrEditorStateRef$cu = ssrEditorStateRef.current) !== null && _ssrEditorStateRef$cu !== void 0 ? _ssrEditorStateRef$cu : (_viewRef$current = viewRef.current) === null || _viewRef$current === void 0 ? void 0 : _viewRef$current.state;
143
+ var _preMountEditorStateR, _viewRef$current;
144
+ return (_preMountEditorStateR = preMountEditorStateRef.current) !== null && _preMountEditorStateR !== void 0 ? _preMountEditorStateR : (_viewRef$current = viewRef.current) === null || _viewRef$current === void 0 ? void 0 : _viewRef$current.state;
138
145
  }, []);
139
146
  var getEditorView = useCallback(function () {
140
147
  return viewRef.current;
@@ -257,12 +264,17 @@ export function ReactEditorView(props) {
257
264
  // so we can save some CPU time here.
258
265
  return undefined;
259
266
  }
260
- return createEditorState({
267
+ var state = createEditorState({
261
268
  props: props,
262
269
  doc: defaultValue,
263
270
  // ED-4759: Don't set selection at end for full-page editor - should be at start.
264
271
  selectionAtStart: isFullPage(nextAppearance)
265
272
  });
273
+ if (expValEquals('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true)) {
274
+ // CSR only, synchronously set preMountEditorStateRef so it's ready to be consumed by children including toolbar
275
+ preMountEditorStateRef.current = state;
276
+ }
277
+ return state;
266
278
  },
267
279
  // This is only used for the initial state - afterwards we will have `viewRef` available for use
268
280
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -663,6 +675,10 @@ export function ReactEditorView(props) {
663
675
  mount: node
664
676
  }, getDirectEditorProps());
665
677
  viewRef.current = view;
678
+ if (expValEquals('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true)) {
679
+ // clears pre-mount state as soon as the final view is mounted
680
+ preMountEditorStateRef.current = undefined;
681
+ }
666
682
  measureRender(measurements.PROSEMIRROR_RENDERED, function (_ref3) {
667
683
  var duration = _ref3.duration,
668
684
  startTime = _ref3.startTime,
@@ -1028,17 +1044,56 @@ export function ReactEditorView(props) {
1028
1044
  return buildDoc(schema);
1029
1045
  };
1030
1046
  var doc = profileSSROperation("".concat(SSR_TRACE_SEGMENT_NAME, "/buildDoc"), doBuildDoc, onSSRMeasure);
1047
+
1048
+ // When the platform_editor_ssr_toolbar_optimistic is on, we create SSR-safe PM plugins and EditorState
1049
+ // HERE in ssrDeps — before any children render — so that FullPageToolbarNext can read correct
1050
+ // plugin state via useSharedPluginStateWithSelector → currentState() → getEditorState().
1051
+ //
1052
+ // We also pass these pre-built pmPlugins and editorState to EditorSSRRenderer so it can
1053
+ // skip redundant creation (avoids double createPluginsList + EditorState.create).
1054
+ if (expValEquals('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true)) {
1055
+ var ssrPMPlugins = profileSSROperation("".concat(SSR_TRACE_SEGMENT_NAME, "/createSSRPMPlugins"), function () {
1056
+ return createSSRPMPlugins({
1057
+ plugins: plugins,
1058
+ schema: schema,
1059
+ portalProviderAPI: props.portalProviderAPI,
1060
+ getIntl: function getIntl() {
1061
+ return props.intl;
1062
+ }
1063
+ });
1064
+ }, onSSRMeasure);
1065
+ var ssrState = profileSSROperation("".concat(SSR_TRACE_SEGMENT_NAME, "/createSSREditorState"), function () {
1066
+ return createSSREditorState({
1067
+ doc: doc,
1068
+ schema: schema,
1069
+ pmPlugins: ssrPMPlugins
1070
+ });
1071
+ }, onSSRMeasure);
1072
+ return {
1073
+ plugins: plugins,
1074
+ schema: schema,
1075
+ doc: doc,
1076
+ ssrPMPlugins: ssrPMPlugins,
1077
+ ssrEditorState: ssrState
1078
+ };
1079
+ }
1031
1080
  return {
1032
1081
  plugins: plugins,
1033
1082
  schema: schema,
1034
- doc: doc
1083
+ doc: doc,
1084
+ ssrPMPlugins: undefined,
1085
+ ssrEditorState: undefined
1035
1086
  };
1036
- }, [allowBlockType, buildDoc, props.preset, onSSRMeasure]);
1087
+ }, [allowBlockType, buildDoc, props.preset, onSSRMeasure, props.portalProviderAPI, props.intl]);
1088
+ // SSR only, synchronously set preMountEditorStateRef so it's ready to be consumed by children including toolbar
1089
+ if (ssrDeps !== null && ssrDeps !== void 0 && ssrDeps.ssrEditorState) {
1090
+ preMountEditorStateRef.current = ssrDeps.ssrEditorState;
1091
+ }
1037
1092
  var _props$editorProps3 = props.editorProps,
1038
1093
  assistiveLabel = _props$editorProps3.assistiveLabel,
1039
1094
  assistiveDescribedBy = _props$editorProps3.assistiveDescribedBy;
1040
1095
  var handleSsrEditorStateChanged = useCallback(function (state) {
1041
- ssrEditorStateRef.current = state;
1096
+ preMountEditorStateRef.current = state;
1042
1097
  // Notify listeners about the initial SSR state
1043
1098
  pluginInjectionAPI.current.onEditorViewUpdated({
1044
1099
  newEditorState: state,
@@ -1085,11 +1140,13 @@ export function ReactEditorView(props) {
1085
1140
  id: EDIT_AREA_ID,
1086
1141
  "aria-describedby": assistiveDescribedBy,
1087
1142
  "data-editor-id": editorId.current,
1088
- onSSRMeasure: onSSRMeasure
1143
+ onSSRMeasure: onSSRMeasure,
1144
+ prebuiltPMPlugins: ssrDeps.ssrPMPlugins,
1145
+ prebuiltEditorState: ssrDeps.ssrEditorState
1089
1146
  // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
1090
1147
  ,
1091
1148
  onEditorStateChanged: expValEquals('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? handleSsrEditorStateChanged : function (state) {
1092
- ssrEditorStateRef.current = state;
1149
+ preMountEditorStateRef.current = state;
1093
1150
  // Notify listeners about the initial SSR state
1094
1151
  pluginInjectionAPI.current.onEditorViewUpdated({
1095
1152
  newEditorState: state,
@@ -161,7 +161,7 @@ export var FullPageEditor = function FullPageEditor(props) {
161
161
  FULL_PAGE_EDITOR_TOOLBAR_HEIGHT(isToolbarAIFCEnabled)
162
162
  }
163
163
  }, !isEditorToolbarHidden && (isToolbarAIFCEnabled ? /*#__PURE__*/React.createElement(FullPageToolbarNext, {
164
- disabled: !!props.disabled || !hasHadInteraction && expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true),
164
+ disabled: expValEquals('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true) ? !hasHadInteraction ? false : !!props.disabled : !!props.disabled || !hasHadInteraction && expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true),
165
165
  disabledWithoutInteractionLogic: !!props.disabled,
166
166
  toolbarDockingPosition: toolbarDockingPosition !== null && toolbarDockingPosition !== void 0 ? toolbarDockingPosition : toolbarDocking,
167
167
  beforeIcon: props.primaryToolbarIconBefore,
@@ -117,7 +117,12 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
117
117
  // - primary toolbar isn't registered
118
118
  // - no custom primary toolbar components to render
119
119
  // note: primary toolbar must render if toolbar docking preference is set to "controlled" to avoid SSR conflicts
120
- if (!shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
120
+ // note(platform_editor_ssr_toolbar_optimistic): On the SSR and CSR, the toolbar plugin may be registered in the
121
+ // injection API but its components not yet populated. Bypass the early-return
122
+ // so the toolbar chrome stays mounted for layout stability; ToolbarNext renders
123
+ // null inside it until components arrive.
124
+ var isAwaitingToolbarComponents = expValEquals('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true) && !Boolean(editorAPI === null || editorAPI === void 0 ? void 0 : editorAPI.toolbar);
125
+ if (!isAwaitingToolbarComponents && !shouldShowToolbarContainer(toolbar, customPrimaryToolbarComponents)) {
121
126
  return /*#__PURE__*/React.createElement(ToolbarPortal, null, null);
122
127
  }
123
128
  return /*#__PURE__*/React.createElement(ContextPanelConsumer, null, function (_ref6) {
@@ -133,7 +138,21 @@ export var FullPageToolbarNext = function FullPageToolbarNext(_ref4) {
133
138
  showKeyline: showKeyline || ContextPanelWidth > 0
134
139
  }, beforeIcon && /*#__PURE__*/React.createElement("div", {
135
140
  className: ax([styles.mainToolbarIconBefore, styles.mainToolbarIconBeforeNew])
136
- }, beforeIcon), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true) ? primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && isToolbar(toolbar) && /*#__PURE__*/React.createElement(ToolbarNext, {
141
+ }, beforeIcon), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FirstChildWrapper, null, expValEquals('platform_editor_ssr_toolbar_optimistic', 'isEnabled', true) ?
142
+ // optimistic toolbar — render immediately on both SSR and CSR with items enabled.
143
+ // Clicks are noops until editorView mounts.
144
+ primaryToolbarDockingConfigEnabled && (components && visibleToolbarComponents && isToolbar(toolbar) ? /*#__PURE__*/React.createElement(ToolbarNext, {
145
+ toolbar: toolbar,
146
+ components: visibleToolbarComponents,
147
+ editorView: editorView,
148
+ editorAPI: editorAPI,
149
+ popupsMountPoint: mountPoint,
150
+ editorAppearance: "full-page",
151
+ isDisabled: disabled,
152
+ disabledWithoutInteractionLogic: false
153
+ }) :
154
+ // toolbar plugin not yet registered — render nothing inside the chrome for layout stability
155
+ null) : expValEquals('platform_editor_default_toolbar_state', 'isEnabled', true) ? primaryToolbarDockingConfigEnabled && components && visibleToolbarComponents && isToolbar(toolbar) && /*#__PURE__*/React.createElement(ToolbarNext, {
137
156
  toolbar: toolbar,
138
157
  components: visibleToolbarComponents,
139
158
  editorView: editorView,
@@ -183,7 +183,7 @@ var editorContentStyles = {
183
183
  emojiDenseStyles: "_2f9he0wb _gof5e0wb _1kube0wb _1jg61osq _ik5u1osq _7vzk1f51 _1n9bv47k _7pqpv47k",
184
184
  expandStyles: "_1fkbxmi2 _vx27xmi2 _1n9xxmi2 _1oymxmi2",
185
185
  expandStylesBase: "_1dcv12b0 _vir8sm61 _nshtskji _1ffuu2gc _eyk7fyzg _1ia1h2mm _ullp1kdv _1ci8stnw _14zzb3bt _1psiidpf _9apoidpf _t1ygidpf _1dr7idpf _py7e1osq _q9kpglyw _2jyr1ial _1tv57wq0 _63an1j28 _g5xu1j28 _5u1u1j28 _1oif1j28 _age41gly _1ymq1bqt _v5bbe4h9 _1husnqa1 _1xt11j28 _1t5a10yn _o7hy9c8s _1rdsfs2f _1kd91qdr _1x8yidpf _3tz5idpf _1b7utlke _1vuvusvi _372tidpf _g7u3dgkc _8va114w8 _bc4d1r31 _1d0tglyw _4fj21o36 _1fbsglyw _1p5p1j28 _1gxpkb7n _1245kb7n _1fmjf1ug _ig0i4w17 _18mboxwj _1ev778tn _15uri7a9 _caue1rpy _149p1txw _u29r1osq _1icakb7n _hiyf1rpy _oemsidpf _ux5uidpf _im3nidpf _4uf1idpf _8q99glyw _2gbkglyw _wn6j1r31 _m5xjglyw _eu2zidpf _11pmewfl _oi2iewfl _1otu1txw _rrwboxwj _ikp21osq _txkaazsu _1wtktlke _ar4h1h6o _3emmglyw _14wj12b0 _18x1sm61 _qg62idpf _3dscidpf _1xnzidpf _1l2jidpf _1aljidpf _kb94idpf _bqovidpf _1dx5idpf _sma4dfik _1slov77o _wo9i1dpa _bj9o180e _1rrkdgkc _m4h31ul7 _zsbmglyw _upeu1ejb _1hr01ejb _13mr1txw _a0pq1h6o _1gdo1h6o _kinytlke _wyq613gf _hl71sm61 _n4fm1l7x _sv44u2gc _2xjk14w8 _czgd1txw _1i7i15vq _1pnt15vq _wz3i15vq _1g6m15vq _9s8f1osq _10zo1osq _1ish1ule _zkn71ule _19mvidpf _vkxwidpf _ay4r7mnp _1m2q7mnp _1io9glyw _1gwnglyw _vgp2ze3t _svkwu2gc _157n1ejb _1c011b66 _1dwdj4ch _fqkm1osq _9n6nusvi _1xgj1kdv _70nuglyw _11qn1osq _1q2615vq _vffj15vq _o1nxstnw _1j9kt94y _1u1ft94y _1s0y7mnp _17sv1q9c _1a5m1j28 _317nsm61 _1srh1l7x _kh951j28 _19lwdgkc _194h1ul7",
186
- expandStylesMixin_experiment_platform_editor_chromeless_expand_fix: "_mklmidpf _nnniidpf",
186
+ expandStylesMixin_chromeless_expand_fix: "_mklmidpf _nnniidpf",
187
187
  expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes: "_109wc7mi _vx27c7mi _15klc7mi _1oymc7mi _smy6idpf _g8xr1b66",
188
188
  expandStylesMixin_fg_platform_visual_refresh_icons: "_1ev7kb7n _1ocgttxp",
189
189
  expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes: "_1w8qq98m _omzvglyw _bqvk1osq _1h9p16ux _19lestnw _14j01n1a _1pm0idpf _1p3gidpf _1d9kt94y _113e1o8l",
@@ -393,7 +393,7 @@ export var EditorContentContainerCompiled = /*#__PURE__*/React.forwardRef(functi
393
393
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
394
394
  expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && isDense && editorContentStyles.tasksAndDecisionsDenseStyles, editorContentStyles.gridStyles, editorContentStyles.blockMarksStyles, editorContentStyles.dateStyles, editorContentStyles.extensionStyles, (contentMode === 'compact' && expValEquals('confluence_compact_text_format', 'isEnabled', true) || expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && editorContentStyles.extensionStylesDense, contentMode === 'compact' && expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && !expValEquals('confluence_compact_text_format', 'isEnabled', true) && !fg('platform_editor_content_mode_button_mvp') && editorContentStyles.extensionStylesLegacyDense, expValEquals('platform_editor_bodiedextension_layoutshift_fix', 'isEnabled', true) && editorContentStyles.bodiedExtensionLayoutShiftFix, editorContentStyles.extensionDiffStyles, editorContentStyles.expandStylesBase, !useStandardNodeWidth && editorContentStyles.expandStyles, contentMode === 'compact' && (expValEquals('confluence_compact_text_format', 'isEnabled', true) ||
395
395
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
396
- expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && isDense && editorContentStyles.expandDenseStyles, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes : editorContentStyles.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, editorContentStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && expValEquals('platform_editor_chromeless_expand_fix', 'isEnabled', true) && editorContentStyles.expandStylesMixin_experiment_platform_editor_chromeless_expand_fix, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.findReplaceStylesNewWithA11Y : editorContentStyles.findReplaceStyles, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesNewWithCodeblockColorContrastFix, !expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesWithCodeblockColorContrastFix, editorExperiment('platform_synced_block', true) && editorContentStyles.findReplaceStylesWithRefSyncBlock, editorContentStyles.textHighlightStyle, editorContentStyles.decisionStyles, expValEqualsNoExposure('platform_editor_blocktaskitem_node_tenantid', 'isEnabled', true) ? editorContentStyles.taskItemStylesWithBlockTaskItem : editorContentStyles.taskItemStyles, editorContentStyles.taskItemCheckboxStyles, editorContentStyles.decisionIconWithVisualRefresh, editorContentStyles.statusStyles, fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? editorContentStyles.statusStylesTeam26 : fg('platform-component-visual-refresh') ? expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh : expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh, colorMode === 'dark' && fg('platform-dst-lozenge-tag-badge-visual-uplifts') && editorContentStyles.statusStylesTeam26DarkMode, editorContentStyles.annotationStyles, expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorExperiment('platform_editor_block_menu', true) ? editorContentStyles.smartCardStylesWithSearchMatchAndBlockMenuDangerStyles : editorContentStyles.smartCardStylesWithSearchMatch : editorContentStyles.smartCardStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorContentStyles.smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') || editorExperiment('platform_editor_preview_panel_linking_exp', true)) && editorContentStyles.editorControlsSmartCardStyles, editorContentStyles.embedCardStyles, editorContentStyles.unsupportedStyles, editorContentStyles.resizerStyles, expValEqualsNoExposure('cc-maui-experiment', 'isEnabled', true) && expValEquals('databases-native-embeds-v2', 'isEnabled', true) && editorContentStyles.resizerBottomHandleStyles, editorContentStyles.layoutBaseStyles, expValEquals('platform_editor_table_excerpts_fix', 'isEnabled', true) && editorContentStyles.layoutBaseStylesWithTableExcerptsFix, fg('platform_editor_fix_media_in_renderer') && editorContentStyles.alignMultipleWrappedImageInLayoutStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockStylesBase, editorExperiment('platform_synced_block', true) &&
396
+ expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp')) && isDense && editorContentStyles.expandDenseStyles, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes : editorContentStyles.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, editorContentStyles.expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && editorContentStyles.expandStylesMixin_chromeless_expand_fix, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.findReplaceStylesNewWithA11Y : editorContentStyles.findReplaceStyles, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesNewWithCodeblockColorContrastFix, !expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) && editorContentStyles.findReplaceStylesWithCodeblockColorContrastFix, editorExperiment('platform_synced_block', true) && editorContentStyles.findReplaceStylesWithRefSyncBlock, editorContentStyles.textHighlightStyle, editorContentStyles.decisionStyles, expValEqualsNoExposure('platform_editor_blocktaskitem_node_tenantid', 'isEnabled', true) ? editorContentStyles.taskItemStylesWithBlockTaskItem : editorContentStyles.taskItemStyles, editorContentStyles.taskItemCheckboxStyles, editorContentStyles.decisionIconWithVisualRefresh, editorContentStyles.statusStyles, fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? editorContentStyles.statusStylesTeam26 : fg('platform-component-visual-refresh') ? expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_fg_platform_component_visual_refresh : expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match : editorContentStyles.statusStylesMixin_without_fg_platform_component_visual_refresh, colorMode === 'dark' && fg('platform-dst-lozenge-tag-badge-visual-uplifts') && editorContentStyles.statusStylesTeam26DarkMode, editorContentStyles.annotationStyles, expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? editorExperiment('platform_editor_block_menu', true) ? editorContentStyles.smartCardStylesWithSearchMatchAndBlockMenuDangerStyles : editorContentStyles.smartCardStylesWithSearchMatch : editorContentStyles.smartCardStyles, editorExperiment('platform_editor_preview_panel_responsiveness', true) && editorContentStyles.smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, (expValEqualsNoExposure('platform_editor_controls', 'cohort', 'variant1') || editorExperiment('platform_editor_preview_panel_linking_exp', true)) && editorContentStyles.editorControlsSmartCardStyles, editorContentStyles.embedCardStyles, editorContentStyles.unsupportedStyles, editorContentStyles.resizerStyles, expValEqualsNoExposure('cc-maui-experiment', 'isEnabled', true) && expValEquals('databases-native-embeds-v2', 'isEnabled', true) && editorContentStyles.resizerBottomHandleStyles, editorContentStyles.layoutBaseStyles, expValEquals('platform_editor_table_excerpts_fix', 'isEnabled', true) && editorContentStyles.layoutBaseStylesWithTableExcerptsFix, fg('platform_editor_fix_media_in_renderer') && editorContentStyles.alignMultipleWrappedImageInLayoutStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockStylesBase, editorExperiment('platform_synced_block', true) &&
397
397
  // Apply sync block delta styles conditionally based on useStandardNodeWidth (negative margins or not)
398
398
  !useStandardNodeWidth && editorContentStyles.syncBlockStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) && editorContentStyles.syncBlockFirstNodeStyles, editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_14') && editorContentStyles.syncBlockTextSelectionStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutBaseStylesAdvanced, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSectionStylesAdvanced : editorContentStyles.layoutSectionStylesNotAdvanced, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnDividerStyles, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutColumnDividerStylesNestedDnD, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutColumnStylesAdvanced : editorContentStyles.layoutColumnStylesNotAdvanced, editorExperiment('advanced_layouts', true) && editorExperiment('platform_editor_layout_column_resize_handle', true) && editorContentStyles.layoutColumnResizeStyles, editorExperiment('advanced_layouts', true) ? editorContentStyles.layoutSelectedStylesAdvanced : editorContentStyles.layoutSelectedStylesNotAdvanced, editorExperiment('platform_synced_block', true) && editorContentStyles.layoutSelectedStylesAdvancedFix, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutColumnResponsiveStyles, editorExperiment('advanced_layouts', true) && editorContentStyles.layoutResponsiveBaseStyles, editorExperiment('platform_synced_block', true) && fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFGExcludingBodiedSync, !editorExperiment('platform_synced_block', true) && fg('platform_editor_nested_dnd_styles_changes') && editorContentStyles.layoutBaseStylesFixesUnderNestedDnDFG, fg('platform_editor_nested_dnd_styles_changes') ? editorContentStyles.layoutColumnMartinTopFixesNew : editorContentStyles.layoutColumnMartinTopFixesOld, editorContentStyles.smartLinksInLivePagesStyles, editorContentStyles.linkingVisualRefreshV1Styles, editorContentStyles.dateVanillaStyles, fg('platform_editor_typography_ugc') ? contentMode === 'compact' && (expValEquals('confluence_compact_text_format', 'isEnabled', true) ||
399
399
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -33,7 +33,7 @@ import { dangerDateStyles, dateStyles, dateVanillaStyles } from './styles/dateSt
33
33
  import { editorUGCSmallText, editorUGCTokensDefault, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
34
34
  import { embedCardStyles } from './styles/embedCardStyles';
35
35
  import { emojiDangerStyles, emojiStyles, getDenseEmojiStyles, getScaledDenseEmojiStyles, scaledEmojiStyles } from './styles/emoji';
36
- import { expandStyles, expandStylesBase, expandStylesMixin_experiment_platform_editor_chromeless_expand_fix, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, getDenseExpandTitleStyles } from './styles/expandStyles';
36
+ import { expandStyles, expandStylesBase, expandStylesMixin_chromeless_expand_fix, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, getDenseExpandTitleStyles } from './styles/expandStyles';
37
37
  import { extensionDiffStyles, getExtensionStyles } from './styles/extensionStyles';
38
38
  import { findReplaceStyles, findReplaceStylesNewWithA11Y, findReplaceStylesNewWithCodeblockColorContrastFix, findReplaceStylesWithCodeblockColorContrastFix, findReplaceStylesWithRefSyncBlock } from './styles/findReplaceStyles';
39
39
  import { firstBlockNodeStyles } from './styles/firstBlockNodeStyles';
@@ -312,9 +312,9 @@ export var EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef(functio
312
312
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
313
313
  expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes,
314
314
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
315
- expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless && expValEquals('platform_editor_chromeless_expand_fix', 'isEnabled', true) &&
315
+ expandStylesMixin_fg_platform_visual_refresh_icons, isChromeless &&
316
316
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
317
- expandStylesMixin_experiment_platform_editor_chromeless_expand_fix, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ?
317
+ expandStylesMixin_chromeless_expand_fix, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ?
318
318
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
319
319
  findReplaceStylesNewWithA11Y :
320
320
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -340,7 +340,7 @@ export var expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes = css(
340
340
  * See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
341
341
  */
342
342
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
343
- export var expandStylesMixin_experiment_platform_editor_chromeless_expand_fix = css({
343
+ export var expandStylesMixin_chromeless_expand_fix = css({
344
344
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
345
345
  '.ProseMirror > .ak-editor-expand': {
346
346
  marginLeft: 0,
@@ -1,3 +1,3 @@
1
1
  export var name = "@atlaskit/editor-core";
2
2
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
3
- export var version = "221.2.1";
3
+ export var version = "221.3.0";
@@ -49,7 +49,7 @@ export declare const expandStylesMixin_fg_platform_editor_nested_dnd_styles_chan
49
49
  * packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
50
50
  * See EDITOR-7600 for more details: https://hello.jira.atlassian.cloud/jira/browse/EDITOR-7600
51
51
  */
52
- export declare const expandStylesMixin_experiment_platform_editor_chromeless_expand_fix: SerializedStyles;
52
+ export declare const expandStylesMixin_chromeless_expand_fix: SerializedStyles;
53
53
  /**
54
54
  * @deprecated This style has been migrated to Compiled CSS, under experiment platform_editor_core_static_css
55
55
  * If you need to make changes here, also update the corresponding style in
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "221.3.0",
3
+ "version": "221.3.1",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/platform-feature-flags-react": "^1.0.0",
67
67
  "@atlaskit/react-ufo": "^7.1.0",
68
68
  "@atlaskit/task-decision": "^21.2.0",
69
- "@atlaskit/tmp-editor-statsig": "^110.0.0",
69
+ "@atlaskit/tmp-editor-statsig": "^111.0.0",
70
70
  "@atlaskit/tokens": "^15.0.0",
71
71
  "@atlaskit/tooltip": "^23.0.0",
72
72
  "@atlaskit/width-detector": "^6.0.0",
@@ -106,7 +106,7 @@
106
106
  "@atlaskit/editor-plugin-paste": "^13.1.0",
107
107
  "@atlaskit/editor-test-helpers": "workspace:^",
108
108
  "@atlaskit/link-provider": "^5.0.0",
109
- "@atlaskit/linking-common": "^10.0.0",
109
+ "@atlaskit/linking-common": "^11.0.0",
110
110
  "@atlaskit/logo": "^21.1.0",
111
111
  "@atlaskit/media-core": "^38.0.0",
112
112
  "@atlaskit/media-integration-test-helpers": "workspace:^",
@@ -122,9 +122,9 @@
122
122
  "@atlassian/a11y-jest-testing": "^0.12.0",
123
123
  "@atlassian/a11y-playwright-testing": "^0.10.0",
124
124
  "@atlassian/adf-schema-json": "^1.33.0",
125
- "@atlassian/editor-rovo-bridge": "^10.0.0",
125
+ "@atlassian/editor-rovo-bridge": "^10.2.0",
126
126
  "@atlassian/feature-flags-test-utils": "^1.1.0",
127
- "@atlassian/search-client": "^1.16.0",
127
+ "@atlassian/search-client": "^1.17.0",
128
128
  "@atlassian/search-provider": "^13.0.0",
129
129
  "@atlassian/structured-docs-types": "workspace:^",
130
130
  "@atlassian/user-profile-card": "^1.14.0",