@atlaskit/editor-plugin-block-controls 17.3.10 → 17.4.1

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,66 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 17.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 17.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`6d830aac99d6d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6d830aac99d6d) -
14
+ Add deprecation tag to blockControlsPlugin quickInsertButtonEnabled property - this has been
15
+ replaced with a new `blockControlButtonEnabled` plugin config in the quickInsertPlugin, which is
16
+ currently gated under `platform_editor_block_control_migration` and will be removed in future
17
+ update.
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
23
+ ## 17.3.12
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
29
+ ## 17.3.11
30
+
31
+ ### Patch Changes
32
+
33
+ - [`0927c3666c010`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0927c3666c010) -
34
+ Upgrade `uuid` from `3.x` to `11.1.1` to remediate GHSA-w5hq-g745-h8pq / SNYK-JS-UUID-16133035.
35
+
36
+ `uuid@11` removed the deep subpath exports (`uuid/v4`, `uuid/v1`, `uuid/v5`) and the default
37
+ export, so all internal call sites were migrated to named imports:
38
+
39
+ ```diff
40
+ -import uuid from 'uuid/v4';
41
+ +import { v4 as uuid } from 'uuid';
42
+
43
+ -import uuid from 'uuid';
44
+ +import { v4 as uuid } from 'uuid';
45
+ ```
46
+
47
+ With the exception of `@atlassian/integrations` (below), this is an internal implementation change
48
+ only - no public API, export, or entrypoint changed. UUID generation behaviour is unchanged
49
+ (`uuid@3`'s default export was already `v4`).
50
+
51
+ `@atlassian/integrations` declares `uuid` as a peer dependency, so its declared range moved from
52
+ `^3.1.0` to `^11.1.1`. That is a peer dependency declaration change, hence `minor` rather than
53
+ `patch` for that package.
54
+
55
+ The following `platform/packages/ai-mate` packages were also touched, but are all `private: true`
56
+ and so are intentionally not listed in the frontmatter above:
57
+ - `@atlassian/csm-assistance-service` - bumped its explicit `uuid` dependency from `npm:^9.0.0` to
58
+ `npm:^11.1.1` (`9.0.1` is also within the advisory's affected range).
59
+ - `@atlassian/csm-guidance-config` - example helper only, migrated to the named `uuid` import.
60
+ - `@atlassian/csm-ui-components` - example helper only, migrated to the named `uuid` import.
61
+
62
+ - Updated dependencies
63
+
3
64
  ## 17.3.10
4
65
 
5
66
  ### Patch Changes
@@ -8,7 +8,7 @@ exports.unmountDecorations = exports.getNodeTypeWithLevel = exports.getNodeAncho
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
- var _uuid = _interopRequireDefault(require("uuid"));
11
+ var _uuid = require("uuid");
12
12
  var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
13
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
14
  var _reactRootRegistry = require("./react-root-registry");
@@ -48,7 +48,7 @@ var ObjHash = /*#__PURE__*/function () {
48
48
  return this.caching.get(node);
49
49
  }
50
50
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
51
- var uniqueId = (0, _uuid.default)();
51
+ var uniqueId = (0, _uuid.v4)();
52
52
  this.caching.set(node, uniqueId);
53
53
  return uniqueId;
54
54
  }
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.findHandleDec = exports.findActiveDragHandleNodeDec = exports.emptyParagraphNodeDecorations = exports.dragHandleDecoration = exports.createActiveDragHandleNodeDecoration = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("react");
10
- var _uuid = _interopRequireDefault(require("uuid"));
10
+ var _uuid = require("uuid");
11
11
  var _view = require("@atlaskit/editor-prosemirror/view");
12
12
  var _fg = require("@atlaskit/platform-feature-flags/fg");
13
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
@@ -62,12 +62,12 @@ var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDec
62
62
  editorState = _ref.editorState;
63
63
  (0, _decorationsCommon.unmountDecorations)(nodeViewPortalProviderAPI, 'data-blocks-drag-handle-container', 'data-blocks-drag-handle-key');
64
64
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
65
- var key = (0, _uuid.default)();
65
+ var key = (0, _uuid.v4)();
66
66
  var widgetSpec = (0, _editorExperiment.editorExperiment)('platform_editor_breakout_resizing', true) ? {
67
67
  side: -1,
68
68
  type: _decorationsCommon.TYPE_HANDLE_DEC,
69
69
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
70
- testid: "".concat(_decorationsCommon.TYPE_HANDLE_DEC, "-").concat((0, _uuid.default)()),
70
+ testid: "".concat(_decorationsCommon.TYPE_HANDLE_DEC, "-").concat((0, _uuid.v4)()),
71
71
  /**
72
72
  * sigh - `marks` influences the position that the widget is drawn (as described on the `side` property).
73
73
  * Exclude 'breakout' on purpose, so the widgets render at the top of the document to avoid z-index issues
@@ -78,7 +78,7 @@ var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDec
78
78
  side: -1,
79
79
  type: _decorationsCommon.TYPE_HANDLE_DEC,
80
80
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
81
- testid: "".concat(_decorationsCommon.TYPE_HANDLE_DEC, "-").concat((0, _uuid.default)()),
81
+ testid: "".concat(_decorationsCommon.TYPE_HANDLE_DEC, "-").concat((0, _uuid.v4)()),
82
82
  marks: (0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true) ? (0, _marks.getMatchingBlockMarks)(editorState, pos, [editorState.schema.marks.alignment, editorState.schema.marks.fontSize]) : []
83
83
  };
84
84
  return _view.Decoration.widget(pos, function (view, getPosUnsafe) {
@@ -9,7 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
10
  var _react = require("react");
11
11
  var _memoizeOne = _interopRequireDefault(require("memoize-one"));
12
- var _uuid = _interopRequireDefault(require("uuid"));
12
+ var _uuid = require("uuid");
13
13
  var _selection = require("@atlaskit/editor-common/selection");
14
14
  var _utils = require("@atlaskit/editor-common/utils");
15
15
  var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
@@ -100,7 +100,7 @@ var findDropTargetDecs = exports.findDropTargetDecs = function findDropTargetDec
100
100
  };
101
101
  var createDropTargetDecoration = exports.createDropTargetDecoration = function createDropTargetDecoration(pos, props, nodeViewPortalProviderAPI, side, anchorRectCache, isSameLayout) {
102
102
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
103
- var key = (0, _uuid.default)();
103
+ var key = (0, _uuid.v4)();
104
104
  return _view.Decoration.widget(pos, function (_, getPosUnsafe) {
105
105
  var getPos = function getPos() {
106
106
  try {
@@ -139,7 +139,7 @@ var createDropTargetDecoration = exports.createDropTargetDecoration = function c
139
139
  };
140
140
  var createLayoutDropTargetDecoration = exports.createLayoutDropTargetDecoration = function createLayoutDropTargetDecoration(pos, props, nodeViewPortalProviderAPI, anchorRectCache) {
141
141
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
142
- var key = (0, _uuid.default)();
142
+ var key = (0, _uuid.v4)();
143
143
  return _view.Decoration.widget(pos, function (_, getPosUnsafe) {
144
144
  var getPos = function getPos() {
145
145
  try {
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.quickInsertButtonDecoration = exports.findQuickInsertInsertButtonDecoration = exports.findActiveQuickInsertNodeDec = exports.createActiveQuickInsertNodeDecoration = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("react");
10
- var _uuid = _interopRequireDefault(require("uuid"));
10
+ var _uuid = require("uuid");
11
11
  var _view = require("@atlaskit/editor-prosemirror/view");
12
12
  var _fg = require("@atlaskit/platform-feature-flags/fg");
13
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
@@ -51,7 +51,7 @@ var quickInsertButtonDecoration = exports.quickInsertButtonDecoration = function
51
51
  anchorRectCache = _ref.anchorRectCache,
52
52
  editorState = _ref.editorState;
53
53
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
54
- var key = (0, _uuid.default)();
54
+ var key = (0, _uuid.v4)();
55
55
  var cleanupCallbacks = [];
56
56
  var widgetSpec = (0, _editorExperiment.editorExperiment)('platform_editor_breakout_resizing', true) ? {
57
57
  side: -2,
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
- import uuid from 'uuid';
3
+ import { v4 as uuid } from 'uuid';
4
4
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
5
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
6
  import { unmountFromMountPoint } from './react-root-registry';
@@ -1,6 +1,6 @@
1
1
  import { createElement } from 'react';
2
2
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
- import uuid from 'uuid';
3
+ import { v4 as uuid } from 'uuid';
4
4
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
5
5
  import { fg } from '@atlaskit/platform-feature-flags/fg';
6
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -1,7 +1,7 @@
1
1
  import { createElement } from 'react';
2
2
  import memoizeOne from 'memoize-one';
3
3
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
4
- import uuid from 'uuid';
4
+ import { v4 as uuid } from 'uuid';
5
5
  import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
6
6
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
7
7
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
@@ -1,6 +1,6 @@
1
1
  import { createElement } from 'react';
2
2
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
- import uuid from 'uuid';
3
+ import { v4 as uuid } from 'uuid';
4
4
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
5
5
  import { fg } from '@atlaskit/platform-feature-flags/fg';
6
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -2,7 +2,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
5
- import uuid from 'uuid';
5
+ import { v4 as uuid } from 'uuid';
6
6
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
7
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
8
  import { unmountFromMountPoint } from './react-root-registry';
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { createElement } from 'react';
3
3
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
4
- import uuid from 'uuid';
4
+ import { v4 as uuid } from 'uuid';
5
5
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
6
6
  import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import { createElement } from 'react';
6
6
  import memoizeOne from 'memoize-one';
7
7
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
8
- import uuid from 'uuid';
8
+ import { v4 as uuid } from 'uuid';
9
9
  import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
10
10
  import { isEmptyParagraph } from '@atlaskit/editor-common/utils';
11
11
  import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
@@ -1,7 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import { createElement } from 'react';
3
3
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
4
- import uuid from 'uuid';
4
+ import { v4 as uuid } from 'uuid';
5
5
  import { Decoration } from '@atlaskit/editor-prosemirror/view';
6
6
  import { fg } from '@atlaskit/platform-feature-flags/fg';
7
7
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -82,7 +82,11 @@ export interface PluginState {
82
82
  }
83
83
  export type ReleaseHiddenDecoration = () => boolean | undefined;
84
84
  export type BlockControlsPluginConfig = {
85
- /** Enable the quick insert plus button icon on the left of the drag handle */
85
+ /**
86
+ * Enable the quick insert plus button icon on the left of the drag handle.
87
+ *
88
+ * @deprecated Use `QuickInsertPluginOptions.blockControlButtonEnabled` instead.
89
+ */
86
90
  quickInsertButtonEnabled?: boolean;
87
91
  /** Enable left/right hover split: show left controls when hovering left, right controls when hovering right */
88
92
  rightSideControlsEnabled?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "17.3.10",
3
+ "version": "17.4.1",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/editor-plugin-interaction": "^27.0.0",
33
33
  "@atlaskit/editor-plugin-limited-mode": "^13.0.0",
34
34
  "@atlaskit/editor-plugin-metrics": "^17.0.0",
35
- "@atlaskit/editor-plugin-quick-insert": "^16.2.0",
35
+ "@atlaskit/editor-plugin-quick-insert": "^16.3.0",
36
36
  "@atlaskit/editor-plugin-selection": "^16.1.0",
37
37
  "@atlaskit/editor-plugin-show-diff": "^14.4.0",
38
38
  "@atlaskit/editor-plugin-toolbar": "^13.0.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/primitives": "^22.5.0",
56
56
  "@atlaskit/section-message": "^10.2.0",
57
57
  "@atlaskit/theme": "^28.2.0",
58
- "@atlaskit/tmp-editor-statsig": "^174.0.0",
58
+ "@atlaskit/tmp-editor-statsig": "^176.0.0",
59
59
  "@atlaskit/tokens": "^16.11.0",
60
60
  "@atlaskit/tooltip": "^24.3.0",
61
61
  "@babel/runtime": "^7.0.0",
@@ -64,10 +64,10 @@
64
64
  "bind-event-listener": "^3.0.0",
65
65
  "memoize-one": "^6.0.0",
66
66
  "raf-schd": "^4.0.3",
67
- "uuid": "^3.1.0"
67
+ "uuid": "^11.1.1"
68
68
  },
69
69
  "peerDependencies": {
70
- "@atlaskit/editor-common": "^120.13.0",
70
+ "@atlaskit/editor-common": "^120.16.0",
71
71
  "react": "^18.2.0 || ^19.2.0",
72
72
  "react-dom": "^18.2.0 || ^19.2.0",
73
73
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"