@atlaskit/editor-plugin-block-controls 6.0.0 → 6.0.2

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,21 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 6.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5de213b733131`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5de213b733131) -
8
+ [ux] ED-29123 fix paragraph shifting on hover when next to image with wrap-right/left
9
+ - Updated dependencies
10
+
11
+ ## 6.0.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`f0662cd7a143e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f0662cd7a143e) -
16
+ Internal changes to how borders are applied.
17
+ - Updated dependencies
18
+
3
19
  ## 6.0.0
4
20
 
5
21
  ### Patch Changes
@@ -9,6 +9,7 @@ var _react = require("react");
9
9
  var _uuid = _interopRequireDefault(require("uuid"));
10
10
  var _view = require("@atlaskit/editor-prosemirror/view");
11
11
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
13
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
13
14
  var _quickInsertButton = require("../ui/quick-insert-button");
14
15
  var _marks = require("./utils/marks");
@@ -67,6 +68,10 @@ var quickInsertButtonDecoration = exports.quickInsertButtonDecoration = function
67
68
  if ((0, _platformFeatureFlags.fg)('platform_editor_controls_patch_15')) {
68
69
  // inline decoration causes cursor disappear when focusing editor at the first line (e.g. press Tab when title is focused)
69
70
  element.style.display = 'block';
71
+ if ((0, _expValEquals.expValEquals)('platform_editor_quick_insert_image_wrap_right_fix', 'isEnabled', true)) {
72
+ // make sure it does not interfere with elements floating next to each other e.g. paragraph next to image with wrap-right
73
+ element.style.clear = 'unset';
74
+ }
70
75
  }
71
76
  element.contentEditable = 'false';
72
77
  element.setAttribute('data-blocks-quick-insert-container', 'true');
@@ -12,7 +12,7 @@ var previewStyle = {
12
12
  borderColor: "var(--ds-border, ".concat(_colors.N30, ")"),
13
13
  borderStyle: 'solid',
14
14
  borderRadius: "var(--ds-radius-small, 3px)",
15
- borderWidth: "var(--ds-border-width-outline, 2px)",
15
+ borderWidth: "var(--ds-border-width-selected, 2px)",
16
16
  backgroundColor: "var(--ds-skeleton-subtle, ".concat(_colors.N20, ")")
17
17
  };
18
18
  var getPreviewContainerDimensionsForSingle = function getPreviewContainerDimensionsForSingle(dom, nodeType) {
@@ -167,7 +167,7 @@ var quickInsertStyles = function quickInsertStyles() {
167
167
  height: "var(--ds-space-300, 24px)",
168
168
  width: "var(--ds-space-300, 24px)",
169
169
  border: 'none',
170
- borderRadius: '50%',
170
+ borderRadius: "var(--ds-radius-full, 9999px)",
171
171
  zIndex: _constants.layers.card(),
172
172
  outline: 'none',
173
173
  cursor: 'pointer',
@@ -2,6 +2,7 @@ import { createElement } from 'react';
2
2
  import uuid from 'uuid';
3
3
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
4
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
7
  import { QuickInsertWithVisibility } from '../ui/quick-insert-button';
7
8
  import { getActiveBlockMarks } from './utils/marks';
@@ -59,6 +60,10 @@ export const quickInsertButtonDecoration = ({
59
60
  if (fg('platform_editor_controls_patch_15')) {
60
61
  // inline decoration causes cursor disappear when focusing editor at the first line (e.g. press Tab when title is focused)
61
62
  element.style.display = 'block';
63
+ if (expValEquals('platform_editor_quick_insert_image_wrap_right_fix', 'isEnabled', true)) {
64
+ // make sure it does not interfere with elements floating next to each other e.g. paragraph next to image with wrap-right
65
+ element.style.clear = 'unset';
66
+ }
62
67
  }
63
68
  element.contentEditable = 'false';
64
69
  element.setAttribute('data-blocks-quick-insert-container', 'true');
@@ -4,7 +4,7 @@ const previewStyle = {
4
4
  borderColor: `var(--ds-border, ${N30})`,
5
5
  borderStyle: 'solid',
6
6
  borderRadius: "var(--ds-radius-small, 3px)",
7
- borderWidth: "var(--ds-border-width-outline, 2px)",
7
+ borderWidth: "var(--ds-border-width-selected, 2px)",
8
8
  backgroundColor: `var(--ds-skeleton-subtle, ${N20})`
9
9
  };
10
10
  const getPreviewContainerDimensionsForSingle = (dom, nodeType) => {
@@ -183,7 +183,7 @@ const quickInsertStyles = () => css({
183
183
  height: "var(--ds-space-300, 24px)",
184
184
  width: "var(--ds-space-300, 24px)",
185
185
  border: 'none',
186
- borderRadius: '50%',
186
+ borderRadius: "var(--ds-radius-full, 9999px)",
187
187
  zIndex: layers.card(),
188
188
  outline: 'none',
189
189
  cursor: 'pointer',
@@ -2,6 +2,7 @@ import { createElement } from 'react';
2
2
  import uuid from 'uuid';
3
3
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
4
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
7
  import { QuickInsertWithVisibility } from '../ui/quick-insert-button';
7
8
  import { getActiveBlockMarks } from './utils/marks';
@@ -60,6 +61,10 @@ export var quickInsertButtonDecoration = function quickInsertButtonDecoration(_r
60
61
  if (fg('platform_editor_controls_patch_15')) {
61
62
  // inline decoration causes cursor disappear when focusing editor at the first line (e.g. press Tab when title is focused)
62
63
  element.style.display = 'block';
64
+ if (expValEquals('platform_editor_quick_insert_image_wrap_right_fix', 'isEnabled', true)) {
65
+ // make sure it does not interfere with elements floating next to each other e.g. paragraph next to image with wrap-right
66
+ element.style.clear = 'unset';
67
+ }
63
68
  }
64
69
  element.contentEditable = 'false';
65
70
  element.setAttribute('data-blocks-quick-insert-container', 'true');
@@ -5,7 +5,7 @@ var previewStyle = {
5
5
  borderColor: "var(--ds-border, ".concat(N30, ")"),
6
6
  borderStyle: 'solid',
7
7
  borderRadius: "var(--ds-radius-small, 3px)",
8
- borderWidth: "var(--ds-border-width-outline, 2px)",
8
+ borderWidth: "var(--ds-border-width-selected, 2px)",
9
9
  backgroundColor: "var(--ds-skeleton-subtle, ".concat(N20, ")")
10
10
  };
11
11
  var getPreviewContainerDimensionsForSingle = function getPreviewContainerDimensionsForSingle(dom, nodeType) {
@@ -160,7 +160,7 @@ var quickInsertStyles = function quickInsertStyles() {
160
160
  height: "var(--ds-space-300, 24px)",
161
161
  width: "var(--ds-space-300, 24px)",
162
162
  border: 'none',
163
- borderRadius: '50%',
163
+ borderRadius: "var(--ds-radius-full, 9999px)",
164
164
  zIndex: layers.card(),
165
165
  outline: 'none',
166
166
  cursor: 'pointer',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -51,8 +51,8 @@
51
51
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.0",
52
52
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
53
53
  "@atlaskit/primitives": "^14.14.0",
54
- "@atlaskit/theme": "^20.0.0",
55
- "@atlaskit/tmp-editor-statsig": "^12.9.0",
54
+ "@atlaskit/theme": "^21.0.0",
55
+ "@atlaskit/tmp-editor-statsig": "^12.12.0",
56
56
  "@atlaskit/tokens": "^6.3.0",
57
57
  "@atlaskit/tooltip": "^20.4.0",
58
58
  "@babel/runtime": "^7.0.0",
@@ -64,7 +64,7 @@
64
64
  "uuid": "^3.1.0"
65
65
  },
66
66
  "peerDependencies": {
67
- "@atlaskit/editor-common": "^109.0.0",
67
+ "@atlaskit/editor-common": "^109.1.0",
68
68
  "react": "^18.2.0",
69
69
  "react-dom": "^18.2.0",
70
70
  "react-intl-next": "npm:react-intl@^5.18.1"