@atlaskit/editor-core 220.0.1 → 220.0.3

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,19 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 220.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 220.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`ed89ab85318b9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ed89ab85318b9) -
14
+ [ux] Allow text selection and copying within reference synced blocks in the editor
15
+ - Updated dependencies
16
+
3
17
  ## 220.0.1
4
18
 
5
19
  ### Patch Changes
@@ -390,7 +390,9 @@ var EditorContentContainerEmotion = exports.EditorContentContainerEmotion = /*#_
390
390
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
391
391
  _syncBlockStyles.syncBlockStyles,
392
392
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
393
- (0, _experiments.editorExperiment)('platform_synced_block', true) && _syncBlockStyles.syncBlockOverflowStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) &&
393
+ (0, _experiments.editorExperiment)('platform_synced_block', true) && _syncBlockStyles.syncBlockOverflowStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) && (0, _platformFeatureFlags.fg)('platform_synced_block_patch_14') &&
394
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
395
+ _syncBlockStyles.syncBlockTextSelectionStyles, (0, _experiments.editorExperiment)('platform_synced_block', true) &&
394
396
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
395
397
  _syncBlockStyles.syncBlockFirstNodeStyles,
396
398
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.syncBlockStylesBase = exports.syncBlockStyles = exports.syncBlockOverflowStyles = exports.syncBlockFirstNodeStyles = void 0;
7
+ exports.syncBlockTextSelectionStyles = exports.syncBlockStylesBase = exports.syncBlockStyles = exports.syncBlockOverflowStyles = exports.syncBlockFirstNodeStyles = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("@emotion/react");
10
10
  var _syncBlock = require("@atlaskit/editor-common/sync-block");
@@ -187,6 +187,38 @@ var syncBlockOverflowStyles = exports.syncBlockOverflowStyles = (0, _react.css)(
187
187
  })
188
188
  });
189
189
 
190
+ // Styles for text selection in reference sync blocks.
191
+ // Gated behind platform_synced_block_patch_14.
192
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
193
+ var syncBlockTextSelectionStyles = exports.syncBlockTextSelectionStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_syncBlock.SyncBlockSharedCssClassName.renderer), {
194
+ // Show text cursor to indicate content is selectable
195
+ cursor: 'text',
196
+ // Remove browser focus outline on the contentEditable renderer wrapper
197
+ outline: 'none',
198
+ // Hide the blinking insertion caret. contentEditable="true" is set on
199
+ // the renderer to enable text selection, but the content is read-only.
200
+ caretColor: 'transparent',
201
+ // Override cursor: pointer set by the editor's layout styles on
202
+ // [data-layout-section] elements rendered inside the sync block content.
203
+ // Without this, layout nodes inside reference sync blocks show a pointer
204
+ // cursor instead of a text cursor.
205
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
206
+ '[data-layout-section]': {
207
+ cursor: 'text'
208
+ }
209
+ }), ".ProseMirror .ak-editor-selected-node .".concat(_syncBlock.SyncBlockSharedCssClassName.renderer), {
210
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
211
+ 'span[data-emoji-id], span[data-emoji-id] span': {
212
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
213
+ boxShadow: 'none !important',
214
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
215
+ '&::before': {
216
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
217
+ backgroundColor: 'transparent !important'
218
+ }
219
+ }
220
+ }));
221
+
190
222
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
191
223
  var syncBlockFirstNodeStyles = exports.syncBlockFirstNodeStyles = (0, _react.css)((0, _defineProperty2.default)({}, ".ProseMirror > .fabric-editor-breakout-mark:first-child", (0, _defineProperty2.default)({}, ".".concat(_syncBlock.SyncBlockSharedCssClassName.prefix, ", .").concat(_syncBlock.BodiedSyncBlockSharedCssClassName.prefix), {
192
224
  marginTop: 0
@@ -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 = "220.0.0";
8
+ var version = exports.version = "220.0.2";
@@ -57,7 +57,7 @@ import { selectionToolbarAnimationStyles } from './styles/selectionToolbarStyles
57
57
  import { shadowStyles } from './styles/shadowStyles';
58
58
  import { editorControlsSmartCardStyles, linkingVisualRefreshV1Styles, showDiffDeletedNodeStyles, showDiffDeletedNodeStylesNew, smartCardDiffStyles, smartCardStyles, smartCardStylesWithSearchMatch, smartCardStylesWithSearchMatchAndBlockMenuDangerStyles, smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, smartLinksInLivePagesStyles } from './styles/smartCardStyles';
59
59
  import { statusDangerStyles, statusStyles, statusStylesMixin_fg_platform_component_visual_refresh, statusStylesMixin_fg_platform_component_visual_refresh_with_search_match, statusStylesMixin_without_fg_platform_component_visual_refresh, statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match, statusStylesTeam26 } from './styles/statusStyles';
60
- import { syncBlockStyles, syncBlockStylesBase, syncBlockFirstNodeStyles, syncBlockOverflowStyles } from './styles/syncBlockStyles';
60
+ import { syncBlockStyles, syncBlockStylesBase, syncBlockFirstNodeStyles, syncBlockOverflowStyles, syncBlockTextSelectionStyles } from './styles/syncBlockStyles';
61
61
  import { tableCommentEditorStyles, tableContainerStyles, tableEmptyRowStyles, tableLayoutFixes, tableLayoutFixesWithFontSize, tableContentModeStyles } from './styles/tableStyles';
62
62
  import { decisionDangerStyles, decisionIconWithVisualRefresh, decisionStyles, getDenseTasksAndDecisionsStyles, taskItemCheckboxStyles, taskItemStyles, taskItemStylesWithBlockTaskItem, tasksAndDecisionsStyles } from './styles/tasksAndDecisionsStyles';
63
63
  import { telepointerColorAndCommonStyle, telepointerStyle } from './styles/telepointerStyles';
@@ -386,7 +386,9 @@ export const EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef((prop
386
386
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
387
387
  syncBlockStyles,
388
388
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
389
- editorExperiment('platform_synced_block', true) && syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) &&
389
+ editorExperiment('platform_synced_block', true) && syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_14') &&
390
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
391
+ syncBlockTextSelectionStyles, editorExperiment('platform_synced_block', true) &&
390
392
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
391
393
  syncBlockFirstNodeStyles,
392
394
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -244,6 +244,46 @@ export const syncBlockOverflowStyles = css({
244
244
  }
245
245
  });
246
246
 
247
+ // Styles for text selection in reference sync blocks.
248
+ // Gated behind platform_synced_block_patch_14.
249
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
250
+ export const syncBlockTextSelectionStyles = css({
251
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
252
+ [`.${SyncBlockSharedCssClassName.renderer}`]: {
253
+ // Show text cursor to indicate content is selectable
254
+ cursor: 'text',
255
+ // Remove browser focus outline on the contentEditable renderer wrapper
256
+ outline: 'none',
257
+ // Hide the blinking insertion caret. contentEditable="true" is set on
258
+ // the renderer to enable text selection, but the content is read-only.
259
+ caretColor: 'transparent',
260
+ // Override cursor: pointer set by the editor's layout styles on
261
+ // [data-layout-section] elements rendered inside the sync block content.
262
+ // Without this, layout nodes inside reference sync blocks show a pointer
263
+ // cursor instead of a text cursor.
264
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
265
+ '[data-layout-section]': {
266
+ cursor: 'text'
267
+ }
268
+ },
269
+ // Suppress ProseMirror's selected-node box-shadow and backgroundColor on emojis inside
270
+ // the contentEditable renderer wrapper. PM applies .ak-editor-selected-node
271
+ // to inline nodes within contentEditable regions.
272
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
273
+ [`.ProseMirror .ak-editor-selected-node .${SyncBlockSharedCssClassName.renderer}`]: {
274
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
275
+ 'span[data-emoji-id], span[data-emoji-id] span': {
276
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
277
+ boxShadow: 'none !important',
278
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
279
+ '&::before': {
280
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
281
+ backgroundColor: 'transparent !important'
282
+ }
283
+ }
284
+ }
285
+ });
286
+
247
287
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
248
288
  export const syncBlockFirstNodeStyles = css({
249
289
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "220.0.0";
2
+ export const version = "220.0.2";
@@ -58,7 +58,7 @@ import { selectionToolbarAnimationStyles } from './styles/selectionToolbarStyles
58
58
  import { shadowStyles } from './styles/shadowStyles';
59
59
  import { editorControlsSmartCardStyles, linkingVisualRefreshV1Styles, showDiffDeletedNodeStyles, showDiffDeletedNodeStylesNew, smartCardDiffStyles, smartCardStyles, smartCardStylesWithSearchMatch, smartCardStylesWithSearchMatchAndBlockMenuDangerStyles, smartCardStylesWithSearchMatchAndPreviewPanelResponsiveness, smartLinksInLivePagesStyles } from './styles/smartCardStyles';
60
60
  import { statusDangerStyles, statusStyles, statusStylesMixin_fg_platform_component_visual_refresh, statusStylesMixin_fg_platform_component_visual_refresh_with_search_match, statusStylesMixin_without_fg_platform_component_visual_refresh, statusStylesMixin_without_fg_platform_component_visual_refresh_with_search_match, statusStylesTeam26 } from './styles/statusStyles';
61
- import { syncBlockStyles, syncBlockStylesBase, syncBlockFirstNodeStyles, syncBlockOverflowStyles } from './styles/syncBlockStyles';
61
+ import { syncBlockStyles, syncBlockStylesBase, syncBlockFirstNodeStyles, syncBlockOverflowStyles, syncBlockTextSelectionStyles } from './styles/syncBlockStyles';
62
62
  import { tableCommentEditorStyles, tableContainerStyles, tableEmptyRowStyles, tableLayoutFixes, tableLayoutFixesWithFontSize, tableContentModeStyles } from './styles/tableStyles';
63
63
  import { decisionDangerStyles, decisionIconWithVisualRefresh, decisionStyles, getDenseTasksAndDecisionsStyles, taskItemCheckboxStyles, taskItemStyles, taskItemStylesWithBlockTaskItem, tasksAndDecisionsStyles } from './styles/tasksAndDecisionsStyles';
64
64
  import { telepointerColorAndCommonStyle, telepointerStyle } from './styles/telepointerStyles';
@@ -382,7 +382,9 @@ export var EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef(functio
382
382
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
383
383
  syncBlockStyles,
384
384
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
385
- editorExperiment('platform_synced_block', true) && syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) &&
385
+ editorExperiment('platform_synced_block', true) && syncBlockOverflowStyles, editorExperiment('platform_synced_block', true) && fg('platform_synced_block_patch_14') &&
386
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
387
+ syncBlockTextSelectionStyles, editorExperiment('platform_synced_block', true) &&
386
388
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
387
389
  syncBlockFirstNodeStyles,
388
390
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
@@ -180,6 +180,38 @@ export var syncBlockOverflowStyles = css({
180
180
  })
181
181
  });
182
182
 
183
+ // Styles for text selection in reference sync blocks.
184
+ // Gated behind platform_synced_block_patch_14.
185
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
186
+ export var syncBlockTextSelectionStyles = css(_defineProperty(_defineProperty({}, ".".concat(SyncBlockSharedCssClassName.renderer), {
187
+ // Show text cursor to indicate content is selectable
188
+ cursor: 'text',
189
+ // Remove browser focus outline on the contentEditable renderer wrapper
190
+ outline: 'none',
191
+ // Hide the blinking insertion caret. contentEditable="true" is set on
192
+ // the renderer to enable text selection, but the content is read-only.
193
+ caretColor: 'transparent',
194
+ // Override cursor: pointer set by the editor's layout styles on
195
+ // [data-layout-section] elements rendered inside the sync block content.
196
+ // Without this, layout nodes inside reference sync blocks show a pointer
197
+ // cursor instead of a text cursor.
198
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
199
+ '[data-layout-section]': {
200
+ cursor: 'text'
201
+ }
202
+ }), ".ProseMirror .ak-editor-selected-node .".concat(SyncBlockSharedCssClassName.renderer), {
203
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
204
+ 'span[data-emoji-id], span[data-emoji-id] span': {
205
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
206
+ boxShadow: 'none !important',
207
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
208
+ '&::before': {
209
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
210
+ backgroundColor: 'transparent !important'
211
+ }
212
+ }
213
+ }));
214
+
183
215
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
184
216
  export var syncBlockFirstNodeStyles = css(_defineProperty({}, ".ProseMirror > .fabric-editor-breakout-mark:first-child", _defineProperty({}, ".".concat(SyncBlockSharedCssClassName.prefix, ", .").concat(BodiedSyncBlockSharedCssClassName.prefix), {
185
217
  marginTop: 0
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "220.0.0";
2
+ export var version = "220.0.2";
@@ -2,4 +2,5 @@ import type { SerializedStyles } from '@emotion/react';
2
2
  export declare const syncBlockStylesBase: SerializedStyles;
3
3
  export declare const syncBlockStyles: SerializedStyles;
4
4
  export declare const syncBlockOverflowStyles: SerializedStyles;
5
+ export declare const syncBlockTextSelectionStyles: SerializedStyles;
5
6
  export declare const syncBlockFirstNodeStyles: SerializedStyles;
@@ -2,4 +2,5 @@ import type { SerializedStyles } from '@emotion/react';
2
2
  export declare const syncBlockStylesBase: SerializedStyles;
3
3
  export declare const syncBlockStyles: SerializedStyles;
4
4
  export declare const syncBlockOverflowStyles: SerializedStyles;
5
+ export declare const syncBlockTextSelectionStyles: SerializedStyles;
5
6
  export declare const syncBlockFirstNodeStyles: SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "220.0.1",
3
+ "version": "220.0.3",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -62,19 +62,19 @@
62
62
  "@atlaskit/editor-prosemirror": "^7.3.0",
63
63
  "@atlaskit/editor-shared-styles": "^3.11.0",
64
64
  "@atlaskit/editor-ssr-renderer": "^6.0.0",
65
- "@atlaskit/editor-toolbar": "^1.9.0",
65
+ "@atlaskit/editor-toolbar": "^1.10.0",
66
66
  "@atlaskit/editor-toolbar-model": "^0.5.0",
67
67
  "@atlaskit/emoji": "^70.15.0",
68
68
  "@atlaskit/feature-gate-js-client": "^5.7.0",
69
69
  "@atlaskit/icon": "^35.4.0",
70
70
  "@atlaskit/link": "^3.4.0",
71
71
  "@atlaskit/media-card": "^80.7.0",
72
- "@atlaskit/mention": "^26.0.0",
72
+ "@atlaskit/mention": "^26.1.0",
73
73
  "@atlaskit/platform-feature-flags": "^1.1.0",
74
74
  "@atlaskit/platform-feature-flags-react": "^0.5.0",
75
75
  "@atlaskit/react-ufo": "^6.6.0",
76
76
  "@atlaskit/task-decision": "^20.1.0",
77
- "@atlaskit/tmp-editor-statsig": "^88.3.0",
77
+ "@atlaskit/tmp-editor-statsig": "^89.0.0",
78
78
  "@atlaskit/tokens": "^13.1.0",
79
79
  "@atlaskit/tooltip": "^22.6.0",
80
80
  "@atlaskit/width-detector": "^5.1.0",
@@ -92,8 +92,8 @@
92
92
  "uuid": "^3.1.0"
93
93
  },
94
94
  "peerDependencies": {
95
- "@atlaskit/editor-common": "^115.0.0",
96
- "@atlaskit/link-provider": "^4.4.0",
95
+ "@atlaskit/editor-common": "^115.2.0",
96
+ "@atlaskit/link-provider": "^4.5.0",
97
97
  "@atlaskit/media-core": "^37.1.0",
98
98
  "react": "^18.2.0",
99
99
  "react-dom": "^18.2.0",
@@ -108,11 +108,11 @@
108
108
  "@atlaskit/code": "^17.5.0",
109
109
  "@atlaskit/collab-provider": "^20.0.0",
110
110
  "@atlaskit/editor-plugin-annotation": "^11.0.0",
111
- "@atlaskit/editor-plugin-card": "^17.0.0",
111
+ "@atlaskit/editor-plugin-card": "^17.1.0",
112
112
  "@atlaskit/editor-plugin-list": "^13.0.0",
113
113
  "@atlaskit/editor-plugin-paste": "^12.1.0",
114
114
  "@atlaskit/editor-test-helpers": "workspace:^",
115
- "@atlaskit/link-provider": "^4.4.0",
115
+ "@atlaskit/link-provider": "^4.5.0",
116
116
  "@atlaskit/linking-common": "^9.13.0",
117
117
  "@atlaskit/logo": "^20.1.0",
118
118
  "@atlaskit/media-core": "^37.1.0",
@@ -129,7 +129,7 @@
129
129
  "@atlassian/a11y-jest-testing": "^0.11.0",
130
130
  "@atlassian/a11y-playwright-testing": "^0.10.0",
131
131
  "@atlassian/adf-schema-json": "^1.33.0",
132
- "@atlassian/editor-rovo-bridge": "^9.0.0",
132
+ "@atlassian/editor-rovo-bridge": "^9.1.0",
133
133
  "@atlassian/feature-flags-test-utils": "^1.1.0",
134
134
  "@atlassian/react-compiler-gating": "workspace:^",
135
135
  "@atlassian/search-client": "^1.11.0",
@@ -336,6 +336,9 @@
336
336
  },
337
337
  "platform_editor_chromeless_akeditor_class": {
338
338
  "type": "boolean"
339
+ },
340
+ "platform_synced_block_patch_14": {
341
+ "type": "boolean"
339
342
  }
340
343
  },
341
344
  "stricter": {