@atlaskit/editor-plugin-synced-block 5.3.3 → 5.3.4

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,15 @@
1
1
  # @atlaskit/editor-plugin-synced-block
2
2
 
3
+ ## 5.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`2d1d47b369e5a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2d1d47b369e5a) -
8
+ [ux] EDITOR-4766 Use correct selection when transforming to synced block
9
+ - [`3d0b3f8b4d802`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3d0b3f8b4d802) -
10
+ Remove platform_editor_toolbar_aifc_responsive experiment
11
+ - Updated dependencies
12
+
3
13
  ## 5.3.3
4
14
 
5
15
  ### Patch Changes
@@ -95,9 +95,6 @@
95
95
  {
96
96
  "path": "../../../design-system/spinner/afm-cc/tsconfig.json"
97
97
  },
98
- {
99
- "path": "../../tmp-editor-statsig/afm-cc/tsconfig.json"
100
- },
101
98
  {
102
99
  "path": "../../../design-system/tokens/afm-cc/tsconfig.json"
103
100
  },
@@ -95,9 +95,6 @@
95
95
  {
96
96
  "path": "../../../design-system/spinner/afm-jira/tsconfig.json"
97
97
  },
98
- {
99
- "path": "../../tmp-editor-statsig/afm-jira/tsconfig.json"
100
- },
101
98
  {
102
99
  "path": "../../../design-system/tokens/afm-jira/tsconfig.json"
103
100
  },
@@ -95,9 +95,6 @@
95
95
  {
96
96
  "path": "../../../design-system/spinner/afm-products/tsconfig.json"
97
97
  },
98
- {
99
- "path": "../../tmp-editor-statsig/afm-products/tsconfig.json"
100
- },
101
98
  {
102
99
  "path": "../../../design-system/tokens/afm-products/tsconfig.json"
103
100
  },
@@ -66,7 +66,7 @@ var createSyncedBlock = exports.createSyncedBlock = function createSyncedBlock(_
66
66
  // Save the new node with empty content to backend
67
67
  // This is so that the node can be copied and referenced without the source being saved/published
68
68
  syncBlockStore.sourceManager.createBodiedSyncBlockNode(_attrs);
69
- tr.replaceWith(conversionInfo.from > 0 ? conversionInfo.from - 1 : 0, conversionInfo.to, _newBodiedSyncBlockNode).scrollIntoView();
69
+ tr.replaceWith(conversionInfo.from, conversionInfo.to, _newBodiedSyncBlockNode).scrollIntoView();
70
70
 
71
71
  // set selection to the start of the previous selection for the position taken up by the start of the new synced block
72
72
  tr.setSelection(_state.TextSelection.create(tr.doc, conversionInfo.from));
@@ -8,17 +8,16 @@ exports.getToolbarComponents = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _toolbar = require("@atlaskit/editor-common/toolbar");
10
10
  var _editorToolbar = require("@atlaskit/editor-toolbar");
11
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
11
  var _CreateSyncedBlockButton = require("./CreateSyncedBlockButton");
13
12
  var SYNCED_BLOCK_PRIMARY_TOOLBAR_GROUP = {
14
13
  type: _toolbar.SYNCED_BLOCK_GROUP.type,
15
14
  key: _toolbar.SYNCED_BLOCK_GROUP.key,
16
- component: (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref) {
15
+ component: function component(_ref) {
17
16
  var children = _ref.children;
18
17
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
19
18
  above: "md"
20
19
  }, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButtonGroup, null, children));
21
- } : undefined,
20
+ },
22
21
  parents: [{
23
22
  type: _toolbar.INSERT_BLOCK_SECTION.type,
24
23
  key: _toolbar.INSERT_BLOCK_SECTION.key,
@@ -66,7 +66,7 @@ export const createSyncedBlock = ({
66
66
  // Save the new node with empty content to backend
67
67
  // This is so that the node can be copied and referenced without the source being saved/published
68
68
  syncBlockStore.sourceManager.createBodiedSyncBlockNode(attrs);
69
- tr.replaceWith(conversionInfo.from > 0 ? conversionInfo.from - 1 : 0, conversionInfo.to, newBodiedSyncBlockNode).scrollIntoView();
69
+ tr.replaceWith(conversionInfo.from, conversionInfo.to, newBodiedSyncBlockNode).scrollIntoView();
70
70
 
71
71
  // set selection to the start of the previous selection for the position taken up by the start of the new synced block
72
72
  tr.setSelection(TextSelection.create(tr.doc, conversionInfo.from));
@@ -1,16 +1,15 @@
1
1
  import React from 'react';
2
2
  import { INSERT_BLOCK_SECTION, INSERT_BLOCK_SECTION_RANK, SYNCED_BLOCK_BUTTON, SYNCED_BLOCK_GROUP, SYNCED_BLOCK_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
3
3
  import { Show, ToolbarButtonGroup } from '@atlaskit/editor-toolbar';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { CreateSyncedBlockButton } from './CreateSyncedBlockButton';
6
5
  const SYNCED_BLOCK_PRIMARY_TOOLBAR_GROUP = {
7
6
  type: SYNCED_BLOCK_GROUP.type,
8
7
  key: SYNCED_BLOCK_GROUP.key,
9
- component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? ({
8
+ component: ({
10
9
  children
11
10
  }) => /*#__PURE__*/React.createElement(Show, {
12
11
  above: "md"
13
- }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children)) : undefined,
12
+ }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children)),
14
13
  parents: [{
15
14
  type: INSERT_BLOCK_SECTION.type,
16
15
  key: INSERT_BLOCK_SECTION.key,
@@ -60,7 +60,7 @@ export var createSyncedBlock = function createSyncedBlock(_ref) {
60
60
  // Save the new node with empty content to backend
61
61
  // This is so that the node can be copied and referenced without the source being saved/published
62
62
  syncBlockStore.sourceManager.createBodiedSyncBlockNode(_attrs);
63
- tr.replaceWith(conversionInfo.from > 0 ? conversionInfo.from - 1 : 0, conversionInfo.to, _newBodiedSyncBlockNode).scrollIntoView();
63
+ tr.replaceWith(conversionInfo.from, conversionInfo.to, _newBodiedSyncBlockNode).scrollIntoView();
64
64
 
65
65
  // set selection to the start of the previous selection for the position taken up by the start of the new synced block
66
66
  tr.setSelection(TextSelection.create(tr.doc, conversionInfo.from));
@@ -1,17 +1,16 @@
1
1
  import React from 'react';
2
2
  import { INSERT_BLOCK_SECTION, INSERT_BLOCK_SECTION_RANK, SYNCED_BLOCK_BUTTON, SYNCED_BLOCK_GROUP, SYNCED_BLOCK_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
3
3
  import { Show, ToolbarButtonGroup } from '@atlaskit/editor-toolbar';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { CreateSyncedBlockButton } from './CreateSyncedBlockButton';
6
5
  var SYNCED_BLOCK_PRIMARY_TOOLBAR_GROUP = {
7
6
  type: SYNCED_BLOCK_GROUP.type,
8
7
  key: SYNCED_BLOCK_GROUP.key,
9
- component: expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true) ? function (_ref) {
8
+ component: function component(_ref) {
10
9
  var children = _ref.children;
11
10
  return /*#__PURE__*/React.createElement(Show, {
12
11
  above: "md"
13
12
  }, /*#__PURE__*/React.createElement(ToolbarButtonGroup, null, children));
14
- } : undefined,
13
+ },
15
14
  parents: [{
16
15
  type: INSERT_BLOCK_SECTION.type,
17
16
  key: INSERT_BLOCK_SECTION.key,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-synced-block",
3
- "version": "5.3.3",
3
+ "version": "5.3.4",
4
4
  "description": "SyncedBlock plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -52,7 +52,6 @@
52
52
  "@atlaskit/platform-feature-flags": "^1.1.0",
53
53
  "@atlaskit/primitives": "^17.1.0",
54
54
  "@atlaskit/spinner": "19.0.9",
55
- "@atlaskit/tmp-editor-statsig": "^16.32.0",
56
55
  "@atlaskit/tokens": "10.1.0",
57
56
  "@atlaskit/tooltip": "^20.14.0",
58
57
  "@atlaskit/visually-hidden": "^3.0.0",
@@ -63,7 +62,7 @@
63
62
  "react-intl-next": "npm:react-intl@^5.18.1"
64
63
  },
65
64
  "peerDependencies": {
66
- "@atlaskit/editor-common": "^111.8.0",
65
+ "@atlaskit/editor-common": "^111.9.0",
67
66
  "react": "^18.2.0"
68
67
  },
69
68
  "devDependencies": {