@atlaskit/editor-core 216.1.7 → 216.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 216.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`60a80e1f0e1ab`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/60a80e1f0e1ab) -
8
+ [EDITOR-4213] Fix SSR renderer toolbar initial state
9
+ - Updated dependencies
10
+
11
+ ## 216.2.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`0ef55acfa69f4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0ef55acfa69f4) -
16
+ Skip validation for SSR Renderer
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 216.1.7
4
23
 
5
24
  ### Patch Changes
@@ -135,7 +135,7 @@ function ReactEditorView(props) {
135
135
 
136
136
  // if the collabEdit API is set, skip this validation due to potential pm validation errors
137
137
  // from docs that end up with invalid marks after processing (See #hot-111702 for more details)
138
- if ((api === null || api === void 0 ? void 0 : api.collabEdit) !== undefined || options.props.editorProps.skipValidation) {
138
+ if ((0, _coreUtils.isSSR)() && (0, _expValEquals.expValEquals)('platform_editor_ssr_renderer', 'isEnabled', true) || (api === null || api === void 0 ? void 0 : api.collabEdit) !== undefined || options.props.editorProps.skipValidation) {
139
139
  return (0, _processRawValue.processRawValueWithoutValidation)(schema, options.doc, dispatchAnalyticsEvent);
140
140
  } else {
141
141
  return (0, _processRawValue.processRawValue)(schema, options.doc, options.props.providerFactory, options.props.editorProps.sanitizePrivateContent, contentTransformer.current, dispatchAnalyticsEvent);
@@ -809,6 +809,11 @@ function ReactEditorView(props) {
809
809
  "data-editor-id": editorId.current,
810
810
  onEditorStateChanged: function onEditorStateChanged(state) {
811
811
  ssrEditorStateRef.current = state;
812
+ // Notify listeners about the initial SSR state
813
+ pluginInjectionAPI.current.onEditorViewUpdated({
814
+ newEditorState: state,
815
+ oldEditorState: undefined
816
+ });
812
817
  }
813
818
  });
814
819
  }, [ssrDeps, props.intl, props.portalProviderAPI, assistiveLabel, assistiveDescribedBy]);
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "0.0.0-development";
8
+ var version = exports.version = "216.2.0";
@@ -108,7 +108,7 @@ export function ReactEditorView(props) {
108
108
 
109
109
  // if the collabEdit API is set, skip this validation due to potential pm validation errors
110
110
  // from docs that end up with invalid marks after processing (See #hot-111702 for more details)
111
- if ((api === null || api === void 0 ? void 0 : api.collabEdit) !== undefined || options.props.editorProps.skipValidation) {
111
+ if (isSSR() && expValEquals('platform_editor_ssr_renderer', 'isEnabled', true) || (api === null || api === void 0 ? void 0 : api.collabEdit) !== undefined || options.props.editorProps.skipValidation) {
112
112
  return processRawValueWithoutValidation(schema, options.doc, dispatchAnalyticsEvent);
113
113
  } else {
114
114
  return processRawValue(schema, options.doc, options.props.providerFactory, options.props.editorProps.sanitizePrivateContent, contentTransformer.current, dispatchAnalyticsEvent);
@@ -760,6 +760,11 @@ export function ReactEditorView(props) {
760
760
  "data-editor-id": editorId.current,
761
761
  onEditorStateChanged: state => {
762
762
  ssrEditorStateRef.current = state;
763
+ // Notify listeners about the initial SSR state
764
+ pluginInjectionAPI.current.onEditorViewUpdated({
765
+ newEditorState: state,
766
+ oldEditorState: undefined
767
+ });
763
768
  }
764
769
  });
765
770
  }, [ssrDeps, props.intl, props.portalProviderAPI, assistiveLabel, assistiveDescribedBy]);
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "0.0.0-development";
2
+ export const version = "216.2.0";
@@ -126,7 +126,7 @@ export function ReactEditorView(props) {
126
126
 
127
127
  // if the collabEdit API is set, skip this validation due to potential pm validation errors
128
128
  // from docs that end up with invalid marks after processing (See #hot-111702 for more details)
129
- if ((api === null || api === void 0 ? void 0 : api.collabEdit) !== undefined || options.props.editorProps.skipValidation) {
129
+ if (isSSR() && expValEquals('platform_editor_ssr_renderer', 'isEnabled', true) || (api === null || api === void 0 ? void 0 : api.collabEdit) !== undefined || options.props.editorProps.skipValidation) {
130
130
  return processRawValueWithoutValidation(schema, options.doc, dispatchAnalyticsEvent);
131
131
  } else {
132
132
  return processRawValue(schema, options.doc, options.props.providerFactory, options.props.editorProps.sanitizePrivateContent, contentTransformer.current, dispatchAnalyticsEvent);
@@ -800,6 +800,11 @@ export function ReactEditorView(props) {
800
800
  "data-editor-id": editorId.current,
801
801
  onEditorStateChanged: function onEditorStateChanged(state) {
802
802
  ssrEditorStateRef.current = state;
803
+ // Notify listeners about the initial SSR state
804
+ pluginInjectionAPI.current.onEditorViewUpdated({
805
+ newEditorState: state,
806
+ oldEditorState: undefined
807
+ });
803
808
  }
804
809
  });
805
810
  }, [ssrDeps, props.intl, props.portalProviderAPI, assistiveLabel, assistiveDescribedBy]);
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "0.0.0-development";
2
+ export var version = "216.2.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "216.1.7",
3
+ "version": "216.2.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": "^0.4.0",
67
67
  "@atlaskit/react-ufo": "^4.16.0",
68
68
  "@atlaskit/task-decision": "^19.2.0",
69
- "@atlaskit/tmp-editor-statsig": "^16.8.0",
69
+ "@atlaskit/tmp-editor-statsig": "^16.10.0",
70
70
  "@atlaskit/tokens": "^9.1.0",
71
71
  "@atlaskit/tooltip": "^20.12.0",
72
72
  "@atlaskit/width-detector": "^5.0.0",