@atlaskit/editor-plugin-paste 7.4.15 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-paste
2
2
 
3
+ ## 8.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 7.4.16
10
+
11
+ ### Patch Changes
12
+
13
+ - [`79172823f4e47`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/79172823f4e47) -
14
+ [ux] EDITOR-3961 strip breakout mark from renderer sync block html
15
+ - Updated dependencies
16
+
3
17
  ## 7.4.15
4
18
 
5
19
  ### Patch Changes
@@ -18,6 +18,7 @@ var _nesting = require("@atlaskit/editor-common/nesting");
18
18
  var _paste = require("@atlaskit/editor-common/paste");
19
19
  var _measureRender = require("@atlaskit/editor-common/performance/measure-render");
20
20
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
21
+ var _syncBlock = require("@atlaskit/editor-common/sync-block");
21
22
  var _transforms = require("@atlaskit/editor-common/transforms");
22
23
  var _utils = require("@atlaskit/editor-common/utils");
23
24
  var _editorMarkdownTransformer = require("@atlaskit/editor-markdown-transformer");
@@ -624,6 +625,12 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
624
625
 
625
626
  // Fix for ED-13568: Code blocks being copied/pasted when next to each other get merged
626
627
  pastedFromBitBucket = html.indexOf('data-qa="code-line"') >= 0;
628
+
629
+ // Remove breakout marks HTML around sync block renderer nodes
630
+ // so the breakout mark doesn't get applied to the wrong nodes
631
+ if (html.indexOf(_syncBlock.SyncBlockRendererDataAttributeName) >= 0 && (0, _experiments.editorExperiment)('platform_synced_block', true)) {
632
+ html = (0, _transforms.removeBreakoutFromRendererSyncBlockHTML)(html);
633
+ }
627
634
  mostRecentPasteEvent = null;
628
635
  return html;
629
636
  }
@@ -8,7 +8,8 @@ import { isNestedTablesSupported } from '@atlaskit/editor-common/nesting';
8
8
  import { isPastedFile as isPastedFileFromEvent, md } from '@atlaskit/editor-common/paste';
9
9
  import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
10
10
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
11
- import { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToDecisionList, transformSliceToJoinAdjacentCodeBlocks, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId, transformSyncBlock } from '@atlaskit/editor-common/transforms';
11
+ import { SyncBlockRendererDataAttributeName } from '@atlaskit/editor-common/sync-block';
12
+ import { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToDecisionList, transformSliceToJoinAdjacentCodeBlocks, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId, transformSyncBlock, removeBreakoutFromRendererSyncBlockHTML } from '@atlaskit/editor-common/transforms';
12
13
  import { containsAnyAnnotations, extractSliceFromStep, linkifyContent, mapChildren } from '@atlaskit/editor-common/utils';
13
14
  import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
14
15
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
@@ -586,6 +587,12 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
586
587
 
587
588
  // Fix for ED-13568: Code blocks being copied/pasted when next to each other get merged
588
589
  pastedFromBitBucket = html.indexOf('data-qa="code-line"') >= 0;
590
+
591
+ // Remove breakout marks HTML around sync block renderer nodes
592
+ // so the breakout mark doesn't get applied to the wrong nodes
593
+ if (html.indexOf(SyncBlockRendererDataAttributeName) >= 0 && editorExperiment('platform_synced_block', true)) {
594
+ html = removeBreakoutFromRendererSyncBlockHTML(html);
595
+ }
589
596
  mostRecentPasteEvent = null;
590
597
  return html;
591
598
  }
@@ -13,7 +13,8 @@ import { isNestedTablesSupported } from '@atlaskit/editor-common/nesting';
13
13
  import { isPastedFile as isPastedFileFromEvent, md } from '@atlaskit/editor-common/paste';
14
14
  import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
15
15
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
16
- import { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToDecisionList, transformSliceToJoinAdjacentCodeBlocks, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId, transformSyncBlock } from '@atlaskit/editor-common/transforms';
16
+ import { SyncBlockRendererDataAttributeName } from '@atlaskit/editor-common/sync-block';
17
+ import { transformSingleColumnLayout, transformSingleLineCodeBlockToCodeMark, transformSliceNestedExpandToExpand, transformSliceToDecisionList, transformSliceToJoinAdjacentCodeBlocks, transformSliceToRemoveLegacyContentMacro, transformSliceToRemoveMacroId, transformSyncBlock, removeBreakoutFromRendererSyncBlockHTML } from '@atlaskit/editor-common/transforms';
17
18
  import { containsAnyAnnotations, extractSliceFromStep, linkifyContent, mapChildren } from '@atlaskit/editor-common/utils';
18
19
  import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
19
20
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
@@ -616,6 +617,12 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
616
617
 
617
618
  // Fix for ED-13568: Code blocks being copied/pasted when next to each other get merged
618
619
  pastedFromBitBucket = html.indexOf('data-qa="code-line"') >= 0;
620
+
621
+ // Remove breakout marks HTML around sync block renderer nodes
622
+ // so the breakout mark doesn't get applied to the wrong nodes
623
+ if (html.indexOf(SyncBlockRendererDataAttributeName) >= 0 && editorExperiment('platform_synced_block', true)) {
624
+ html = removeBreakoutFromRendererSyncBlockHTML(html);
625
+ }
619
626
  mostRecentPasteEvent = null;
620
627
  return html;
621
628
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste",
3
- "version": "7.4.15",
3
+ "version": "8.0.0",
4
4
  "description": "Paste plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -27,32 +27,32 @@
27
27
  "sideEffects": false,
28
28
  "atlaskit:src": "src/index.ts",
29
29
  "dependencies": {
30
- "@atlaskit/adf-schema": "^51.5.1",
30
+ "@atlaskit/adf-schema": "^51.5.0",
31
31
  "@atlaskit/code": "^17.4.0",
32
32
  "@atlaskit/editor-markdown-transformer": "^5.20.0",
33
- "@atlaskit/editor-plugin-analytics": "^6.2.0",
34
- "@atlaskit/editor-plugin-annotation": "^6.3.0",
35
- "@atlaskit/editor-plugin-better-type-history": "^6.1.0",
36
- "@atlaskit/editor-plugin-card": "^11.5.0",
37
- "@atlaskit/editor-plugin-feature-flags": "^5.0.0",
38
- "@atlaskit/editor-plugin-list": "^8.2.0",
39
- "@atlaskit/editor-plugin-media": "^8.5.0",
40
- "@atlaskit/editor-plugin-mentions": "^8.2.0",
41
- "@atlaskit/editor-prosemirror": "7.0.0",
33
+ "@atlaskit/editor-plugin-analytics": "^7.0.0",
34
+ "@atlaskit/editor-plugin-annotation": "^7.0.0",
35
+ "@atlaskit/editor-plugin-better-type-history": "^7.0.0",
36
+ "@atlaskit/editor-plugin-card": "^12.0.0",
37
+ "@atlaskit/editor-plugin-feature-flags": "^6.0.0",
38
+ "@atlaskit/editor-plugin-list": "^9.0.0",
39
+ "@atlaskit/editor-plugin-media": "^9.0.0",
40
+ "@atlaskit/editor-plugin-mentions": "^9.0.0",
41
+ "@atlaskit/editor-prosemirror": "^7.2.0",
42
42
  "@atlaskit/editor-tables": "^2.9.0",
43
43
  "@atlaskit/insm": "^0.2.0",
44
44
  "@atlaskit/media-client": "^35.7.0",
45
45
  "@atlaskit/media-common": "^12.3.0",
46
46
  "@atlaskit/platform-feature-flags": "^1.1.0",
47
47
  "@atlaskit/prosemirror-history": "^0.2.0",
48
- "@atlaskit/tmp-editor-statsig": "^15.7.0",
48
+ "@atlaskit/tmp-editor-statsig": "^16.3.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "lodash": "^4.17.21",
51
51
  "react-intl-next": "npm:react-intl@^5.18.1",
52
52
  "uuid": "^3.1.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@atlaskit/editor-common": "^110.41.0",
55
+ "@atlaskit/editor-common": "^111.0.0",
56
56
  "react": "^18.2.0",
57
57
  "react-dom": "^18.2.0"
58
58
  },