@atlaskit/editor-plugin-paste-options-toolbar 11.0.17 → 11.0.18

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,14 @@
1
1
  # @atlaskit/editor-plugin-paste-options-toolbar
2
2
 
3
+ ## 11.0.18
4
+
5
+ ### Patch Changes
6
+
7
+ - [`ded95ac7efcc4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ded95ac7efcc4) -
8
+ Persist code block wrap state in ADF, default code blocks created across editor runtime paths to
9
+ wrapped, and update the wrap toolbar tooltip behind platform_editor_code_block_q4_lovability.
10
+ - Updated dependencies
11
+
3
12
  ## 11.0.17
4
13
 
5
14
  ### Patch Changes
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.formatRichText = exports.formatPlainText = exports.formatMarkdown = void 0;
7
7
  exports.getMarkdownSlice = getMarkdownSlice;
8
+ var _codeBlock = require("@atlaskit/editor-common/code-block");
8
9
  var _monitoring = require("@atlaskit/editor-common/monitoring");
9
10
  var _paste = require("@atlaskit/editor-common/paste");
10
11
  var _editorMarkdownTransformer = require("@atlaskit/editor-markdown-transformer");
@@ -173,7 +174,7 @@ function getMarkdownSlice(text, schema, selection) {
173
174
  var $end = _state.Selection.atEnd(doc).$from;
174
175
  var openStart = canMergeOpenStart ? $start.depth : 0;
175
176
  var openEnd = canMergeOpenEnd ? $end.depth : 0;
176
- return new _model.Slice(doc.content, openStart, openEnd);
177
+ return (0, _codeBlock.defaultWrapForMarkdownCodeBlocksInSlice)(new _model.Slice(doc.content, openStart, openEnd), schema);
177
178
  } catch (error) {
178
179
  (0, _monitoring.logException)(error, {
179
180
  location: 'editor-plugin-paste-options-toolbar/util'
@@ -1,3 +1,4 @@
1
+ import { defaultWrapForMarkdownCodeBlocksInSlice } from '@atlaskit/editor-common/code-block';
1
2
  import { logException } from '@atlaskit/editor-common/monitoring';
2
3
  import { md } from '@atlaskit/editor-common/paste';
3
4
  import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
@@ -168,7 +169,7 @@ export function getMarkdownSlice(text, schema, selection) {
168
169
  const $end = Selection.atEnd(doc).$from;
169
170
  const openStart = canMergeOpenStart ? $start.depth : 0;
170
171
  const openEnd = canMergeOpenEnd ? $end.depth : 0;
171
- return new Slice(doc.content, openStart, openEnd);
172
+ return defaultWrapForMarkdownCodeBlocksInSlice(new Slice(doc.content, openStart, openEnd), schema);
172
173
  } catch (error) {
173
174
  logException(error, {
174
175
  location: 'editor-plugin-paste-options-toolbar/util'
@@ -1,3 +1,4 @@
1
+ import { defaultWrapForMarkdownCodeBlocksInSlice } from '@atlaskit/editor-common/code-block';
1
2
  import { logException } from '@atlaskit/editor-common/monitoring';
2
3
  import { md } from '@atlaskit/editor-common/paste';
3
4
  import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
@@ -166,7 +167,7 @@ export function getMarkdownSlice(text, schema, selection) {
166
167
  var $end = Selection.atEnd(doc).$from;
167
168
  var openStart = canMergeOpenStart ? $start.depth : 0;
168
169
  var openEnd = canMergeOpenEnd ? $end.depth : 0;
169
- return new Slice(doc.content, openStart, openEnd);
170
+ return defaultWrapForMarkdownCodeBlocksInSlice(new Slice(doc.content, openStart, openEnd), schema);
170
171
  } catch (error) {
171
172
  logException(error, {
172
173
  location: 'editor-plugin-paste-options-toolbar/util'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-paste-options-toolbar",
3
- "version": "11.0.17",
3
+ "version": "11.0.18",
4
4
  "description": "Paste options toolbar for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -49,7 +49,7 @@
49
49
  "@emotion/react": "^11.7.1"
50
50
  },
51
51
  "peerDependencies": {
52
- "@atlaskit/editor-common": "^114.22.0",
52
+ "@atlaskit/editor-common": "^114.25.0",
53
53
  "react": "^18.2.0",
54
54
  "react-dom": "^18.2.0",
55
55
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"