@atlaskit/editor-core 205.5.4 → 205.6.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,26 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 205.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#144882](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144882)
8
+ [`a14feb4c5d6c6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a14feb4c5d6c6) -
9
+ ED-27414 update user pref feature gate to unify frontend and ssr changes.
10
+ - Updated dependencies
11
+
12
+ ## 205.6.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [#144699](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/144699)
17
+ [`5fdd28b98ea91`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5fdd28b98ea91) -
18
+ [ux] ED-25977 add underline to links in edit mode to fix a11y violation
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 205.5.4
4
25
 
5
26
  ### Patch Changes
@@ -80,6 +80,14 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
80
80
  interactionState = _useSharedPluginState.interactionState;
81
81
  var viewMode = (0, _getEditorViewModeSync.getEditorViewMode)(editorViewModeState, props.preset);
82
82
  var toolbarDocking = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'selectionToolbar.toolbarDocking');
83
+ if (!toolbarDocking && (0, _platformFeatureFlags.fg)('platform_editor_controls_toolbar_ssr_fix')) {
84
+ var _editorAPI$selectionT, _editorAPI$selectionT2;
85
+ // This is a workaround for the rendering issue with the selection toolbar
86
+ // where using useSharedPluginStateSelector or useSharedPluginState the state are not
87
+ // available when the editor is first loaded. and cause the toolbar to blink.
88
+ var defaultDocking = props.__livePage ? 'none' : 'top';
89
+ toolbarDocking = (_editorAPI$selectionT = editorAPI === null || editorAPI === void 0 || (_editorAPI$selectionT2 = editorAPI.selectionToolbar) === null || _editorAPI$selectionT2 === void 0 || (_editorAPI$selectionT2 = _editorAPI$selectionT2.sharedState.currentState()) === null || _editorAPI$selectionT2 === void 0 ? void 0 : _editorAPI$selectionT2.toolbarDocking) !== null && _editorAPI$selectionT !== void 0 ? _editorAPI$selectionT : defaultDocking;
90
+ }
83
91
  var primaryToolbarComponents = props.primaryToolbarComponents;
84
92
  if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
85
93
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
@@ -106,12 +114,21 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
106
114
  if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
107
115
  exposure: true
108
116
  })) {
109
- var _primaryToolbarCompon;
110
- if (toolbarDocking !== 'top') {
111
- primaryToolbarComponents = [];
112
- }
113
- if (!((_primaryToolbarCompon = primaryToolbarComponents) !== null && _primaryToolbarCompon !== void 0 && _primaryToolbarCompon.length) && !hasCustomComponents(customPrimaryToolbarComponents)) {
114
- isEditorToolbarHidden = true;
117
+ if ((0, _platformFeatureFlags.fg)('platform_editor_controls_toolbar_ssr_fix')) {
118
+ if (toolbarDocking === 'none') {
119
+ primaryToolbarComponents = [];
120
+ if (!hasCustomComponents(customPrimaryToolbarComponents)) {
121
+ isEditorToolbarHidden = true;
122
+ }
123
+ }
124
+ } else {
125
+ var _primaryToolbarCompon;
126
+ if (toolbarDocking !== 'top') {
127
+ primaryToolbarComponents = [];
128
+ }
129
+ if (!((_primaryToolbarCompon = primaryToolbarComponents) !== null && _primaryToolbarCompon !== void 0 && _primaryToolbarCompon.length) && !hasCustomComponents(customPrimaryToolbarComponents)) {
130
+ isEditorToolbarHidden = true;
131
+ }
115
132
  }
116
133
  }
117
134
  var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
@@ -48,7 +48,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
48
48
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
49
49
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
50
50
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
51
- var linkStyles = exports.linkStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t}\n"])), _styles.linkSharedStyle);
51
+ var linkStyles = exports.linkStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t}\n"])), (0, _styles.linkSharedStyle)());
52
52
  var ruleStyles = function ruleStyles() {
53
53
  return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", ";\n\n\t\thr {\n\t\t\tcursor: pointer;\n\t\t\tpadding: ", " 0;\n\t\t\tmargin: ", " 0;\n\t\t\tbackground-clip: content-box;\n\n\t\t\t&.", " {\n\t\t\t\toutline: none;\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n"])), (0, _styles.ruleSharedStyles)(), "var(--ds-space-050, 4px)", "var(--ds-space-300, 24px)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(_editorSharedStyles.akEditorSelectedBorderColor, ")"));
54
54
  };
@@ -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 = "205.5.4";
8
+ var version = exports.version = "205.6.1";
@@ -61,7 +61,15 @@ export const FullPageEditor = props => {
61
61
  interactionState
62
62
  } = useSharedPluginState(editorAPI, ['editorViewMode', 'primaryToolbar', 'interaction']);
63
63
  const viewMode = getEditorViewMode(editorViewModeState, props.preset);
64
- const toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
64
+ let toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
65
+ if (!toolbarDocking && fg('platform_editor_controls_toolbar_ssr_fix')) {
66
+ var _editorAPI$selectionT, _editorAPI$selectionT2, _editorAPI$selectionT3;
67
+ // This is a workaround for the rendering issue with the selection toolbar
68
+ // where using useSharedPluginStateSelector or useSharedPluginState the state are not
69
+ // available when the editor is first loaded. and cause the toolbar to blink.
70
+ const defaultDocking = props.__livePage ? 'none' : 'top';
71
+ toolbarDocking = (_editorAPI$selectionT = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$selectionT2 = editorAPI.selectionToolbar) === null || _editorAPI$selectionT2 === void 0 ? void 0 : (_editorAPI$selectionT3 = _editorAPI$selectionT2.sharedState.currentState()) === null || _editorAPI$selectionT3 === void 0 ? void 0 : _editorAPI$selectionT3.toolbarDocking) !== null && _editorAPI$selectionT !== void 0 ? _editorAPI$selectionT : defaultDocking;
72
+ }
65
73
  let primaryToolbarComponents = props.primaryToolbarComponents;
66
74
  if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
67
75
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
@@ -90,12 +98,21 @@ export const FullPageEditor = props => {
90
98
  if (editorExperiment('platform_editor_controls', 'variant1', {
91
99
  exposure: true
92
100
  })) {
93
- var _primaryToolbarCompon;
94
- if (toolbarDocking !== 'top') {
95
- primaryToolbarComponents = [];
96
- }
97
- if (!((_primaryToolbarCompon = primaryToolbarComponents) !== null && _primaryToolbarCompon !== void 0 && _primaryToolbarCompon.length) && !hasCustomComponents(customPrimaryToolbarComponents)) {
98
- isEditorToolbarHidden = true;
101
+ if (fg('platform_editor_controls_toolbar_ssr_fix')) {
102
+ if (toolbarDocking === 'none') {
103
+ primaryToolbarComponents = [];
104
+ if (!hasCustomComponents(customPrimaryToolbarComponents)) {
105
+ isEditorToolbarHidden = true;
106
+ }
107
+ }
108
+ } else {
109
+ var _primaryToolbarCompon;
110
+ if (toolbarDocking !== 'top') {
111
+ primaryToolbarComponents = [];
112
+ }
113
+ if (!((_primaryToolbarCompon = primaryToolbarComponents) !== null && _primaryToolbarCompon !== void 0 && _primaryToolbarCompon.length) && !hasCustomComponents(customPrimaryToolbarComponents)) {
114
+ isEditorToolbarHidden = true;
115
+ }
99
116
  }
100
117
  }
101
118
  const popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 ? void 0 : (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
@@ -40,7 +40,7 @@ import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vani
40
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
41
41
  export const linkStyles = css`
42
42
  .ProseMirror {
43
- ${linkSharedStyle}
43
+ ${linkSharedStyle()}
44
44
  }
45
45
  `;
46
46
  const ruleStyles = () => css`
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "205.5.4";
2
+ export const version = "205.6.1";
@@ -69,6 +69,14 @@ export var FullPageEditor = function FullPageEditor(props) {
69
69
  interactionState = _useSharedPluginState.interactionState;
70
70
  var viewMode = getEditorViewMode(editorViewModeState, props.preset);
71
71
  var toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
72
+ if (!toolbarDocking && fg('platform_editor_controls_toolbar_ssr_fix')) {
73
+ var _editorAPI$selectionT, _editorAPI$selectionT2;
74
+ // This is a workaround for the rendering issue with the selection toolbar
75
+ // where using useSharedPluginStateSelector or useSharedPluginState the state are not
76
+ // available when the editor is first loaded. and cause the toolbar to blink.
77
+ var defaultDocking = props.__livePage ? 'none' : 'top';
78
+ toolbarDocking = (_editorAPI$selectionT = editorAPI === null || editorAPI === void 0 || (_editorAPI$selectionT2 = editorAPI.selectionToolbar) === null || _editorAPI$selectionT2 === void 0 || (_editorAPI$selectionT2 = _editorAPI$selectionT2.sharedState.currentState()) === null || _editorAPI$selectionT2 === void 0 ? void 0 : _editorAPI$selectionT2.toolbarDocking) !== null && _editorAPI$selectionT !== void 0 ? _editorAPI$selectionT : defaultDocking;
79
+ }
72
80
  var primaryToolbarComponents = props.primaryToolbarComponents;
73
81
  if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
74
82
  primaryToolbarComponents = primaryToolbarState.components.concat(primaryToolbarComponents);
@@ -95,12 +103,21 @@ export var FullPageEditor = function FullPageEditor(props) {
95
103
  if (editorExperiment('platform_editor_controls', 'variant1', {
96
104
  exposure: true
97
105
  })) {
98
- var _primaryToolbarCompon;
99
- if (toolbarDocking !== 'top') {
100
- primaryToolbarComponents = [];
101
- }
102
- if (!((_primaryToolbarCompon = primaryToolbarComponents) !== null && _primaryToolbarCompon !== void 0 && _primaryToolbarCompon.length) && !hasCustomComponents(customPrimaryToolbarComponents)) {
103
- isEditorToolbarHidden = true;
106
+ if (fg('platform_editor_controls_toolbar_ssr_fix')) {
107
+ if (toolbarDocking === 'none') {
108
+ primaryToolbarComponents = [];
109
+ if (!hasCustomComponents(customPrimaryToolbarComponents)) {
110
+ isEditorToolbarHidden = true;
111
+ }
112
+ }
113
+ } else {
114
+ var _primaryToolbarCompon;
115
+ if (toolbarDocking !== 'top') {
116
+ primaryToolbarComponents = [];
117
+ }
118
+ if (!((_primaryToolbarCompon = primaryToolbarComponents) !== null && _primaryToolbarCompon !== void 0 && _primaryToolbarCompon.length) && !hasCustomComponents(customPrimaryToolbarComponents)) {
119
+ isEditorToolbarHidden = true;
120
+ }
104
121
  }
105
122
  }
106
123
  var popupsBoundariesElement = props.popupsBoundariesElement || (scrollContentContainerRef === null || scrollContentContainerRef === void 0 || (_scrollContentContain = scrollContentContainerRef.current) === null || _scrollContentContain === void 0 ? void 0 : _scrollContentContain.containerArea) || undefined;
@@ -40,7 +40,7 @@ import { panelStyles } from './panel';
40
40
  import { statusStyles, vanillaStatusStyles } from './status';
41
41
  import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vanillaDecisionIconWithoutVisualRefresh, vanillaTaskDecisionIconWithVisualRefresh as vanillaDecisionIconWithVisualRefresh, vanillaTaskDecisionStyles as vanillaDecisionStyles, vanillaTaskItemStyles } from './tasks-and-decisions';
42
42
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
43
- export var linkStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t}\n"])), linkSharedStyle);
43
+ export var linkStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t}\n"])), linkSharedStyle());
44
44
  var ruleStyles = function ruleStyles() {
45
45
  return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", ";\n\n\t\thr {\n\t\t\tcursor: pointer;\n\t\t\tpadding: ", " 0;\n\t\t\tmargin: ", " 0;\n\t\t\tbackground-clip: content-box;\n\n\t\t\t&.", " {\n\t\t\t\toutline: none;\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n"])), ruleSharedStyles(), "var(--ds-space-050, 4px)", "var(--ds-space-300, 24px)", akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(akEditorSelectedBorderColor, ")"));
46
46
  };
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "205.5.4";
2
+ export var version = "205.6.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "205.5.4",
3
+ "version": "205.6.1",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -46,14 +46,14 @@
46
46
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
47
47
  "@atlaskit/button": "^23.0.0",
48
48
  "@atlaskit/css": "^0.10.0",
49
- "@atlaskit/editor-common": "^103.12.0",
49
+ "@atlaskit/editor-common": "^103.15.0",
50
50
  "@atlaskit/editor-json-transformer": "^8.24.0",
51
51
  "@atlaskit/editor-performance-metrics": "^2.1.0",
52
52
  "@atlaskit/editor-plugin-quick-insert": "^2.4.0",
53
53
  "@atlaskit/editor-plugins": "^8.2.0",
54
54
  "@atlaskit/editor-prosemirror": "7.0.0",
55
55
  "@atlaskit/editor-shared-styles": "^3.4.0",
56
- "@atlaskit/emoji": "^69.0.0",
56
+ "@atlaskit/emoji": "^69.1.0",
57
57
  "@atlaskit/icon": "^25.6.0",
58
58
  "@atlaskit/media-card": "^79.2.0",
59
59
  "@atlaskit/mention": "^24.1.0",
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/platform-feature-flags-react": "^0.1.0",
62
62
  "@atlaskit/react-ufo": "^3.6.0",
63
63
  "@atlaskit/task-decision": "^19.1.0",
64
- "@atlaskit/tmp-editor-statsig": "^4.12.0",
64
+ "@atlaskit/tmp-editor-statsig": "^4.13.0",
65
65
  "@atlaskit/tokens": "^4.8.0",
66
66
  "@atlaskit/tooltip": "^20.0.0",
67
67
  "@atlaskit/width-detector": "^5.0.0",
@@ -93,7 +93,7 @@
93
93
  "@atlaskit/editor-plugin-annotation": "^2.7.0",
94
94
  "@atlaskit/editor-plugin-card": "^5.4.0",
95
95
  "@atlaskit/editor-plugin-list": "^4.2.0",
96
- "@atlaskit/editor-plugin-paste": "^3.2.0",
96
+ "@atlaskit/editor-plugin-paste": "^3.3.0",
97
97
  "@atlaskit/link-provider": "^2.1.0",
98
98
  "@atlaskit/logo": "^16.0.0",
99
99
  "@atlaskit/media-core": "^35.0.0",
@@ -101,8 +101,8 @@
101
101
  "@atlaskit/media-test-helpers": "^35.0.0",
102
102
  "@atlaskit/modal-dialog": "^14.1.0",
103
103
  "@atlaskit/primitives": "^14.4.0",
104
- "@atlaskit/renderer": "^114.9.0",
105
- "@atlaskit/smart-card": "^36.8.0",
104
+ "@atlaskit/renderer": "^114.10.0",
105
+ "@atlaskit/smart-card": "^36.9.0",
106
106
  "@atlaskit/synchrony-test-helpers": "^3.1.0",
107
107
  "@atlaskit/toggle": "^15.0.0",
108
108
  "@atlaskit/util-data-test": "^18.0.0",
@@ -673,6 +673,10 @@
673
673
  "type": "boolean",
674
674
  "referenceOnly": true
675
675
  },
676
+ "platform_editor_hyperlink_underline": {
677
+ "type": "boolean",
678
+ "referenceOnly": true
679
+ },
676
680
  "platform_editor_controls_table_picker": {
677
681
  "type": "boolean",
678
682
  "referenceOnly": true
@@ -680,6 +684,10 @@
680
684
  "platform_editor_tables_table_selector": {
681
685
  "type": "boolean",
682
686
  "referenceOnly": true
687
+ },
688
+ "platform_editor_controls_toolbar_ssr_fix": {
689
+ "type": "boolean",
690
+ "referenceOnly": true
683
691
  }
684
692
  },
685
693
  "stricter": {