@atlaskit/editor-plugin-block-controls 9.0.0 → 9.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +15 -1
  3. package/dist/cjs/pm-plugins/interaction-tracking/pm-plugin.js +5 -5
  4. package/dist/cjs/pm-plugins/main.js +1 -2
  5. package/dist/cjs/pm-plugins/utils/update-selection.js +2 -0
  6. package/dist/cjs/ui/drag-handle-nested-icon.js +1 -1
  7. package/dist/cjs/ui/drag-handle.js +1 -1
  8. package/dist/cjs/ui/drop-target-layout.js +1 -1
  9. package/dist/cjs/ui/drop-target.js +1 -1
  10. package/dist/cjs/ui/global-styles.js +1 -1
  11. package/dist/cjs/ui/inline-drop-target.js +1 -1
  12. package/dist/cjs/ui/quick-insert-button.js +1 -1
  13. package/dist/cjs/ui/visibility-container.js +1 -1
  14. package/dist/es2019/pm-plugins/interaction-tracking/pm-plugin.js +5 -5
  15. package/dist/es2019/pm-plugins/main.js +1 -2
  16. package/dist/es2019/pm-plugins/utils/update-selection.js +1 -0
  17. package/dist/es2019/ui/drag-handle-nested-icon.js +1 -1
  18. package/dist/es2019/ui/drag-handle.js +1 -1
  19. package/dist/es2019/ui/drop-target-layout.js +1 -1
  20. package/dist/es2019/ui/drop-target.js +1 -1
  21. package/dist/es2019/ui/global-styles.js +1 -1
  22. package/dist/es2019/ui/inline-drop-target.js +1 -1
  23. package/dist/es2019/ui/quick-insert-button.js +1 -1
  24. package/dist/es2019/ui/visibility-container.js +1 -1
  25. package/dist/esm/pm-plugins/interaction-tracking/pm-plugin.js +5 -5
  26. package/dist/esm/pm-plugins/main.js +1 -2
  27. package/dist/esm/pm-plugins/utils/update-selection.js +1 -0
  28. package/dist/esm/ui/drag-handle-nested-icon.js +1 -1
  29. package/dist/esm/ui/drag-handle.js +1 -1
  30. package/dist/esm/ui/drop-target-layout.js +1 -1
  31. package/dist/esm/ui/drop-target.js +1 -1
  32. package/dist/esm/ui/global-styles.js +1 -1
  33. package/dist/esm/ui/inline-drop-target.js +1 -1
  34. package/dist/esm/ui/quick-insert-button.js +1 -1
  35. package/dist/esm/ui/visibility-container.js +1 -1
  36. package/dist/types/pm-plugins/utils/anchor-utils.d.ts +2 -1
  37. package/dist/types/pm-plugins/utils/getSelection.d.ts +2 -2
  38. package/dist/types/pm-plugins/utils/marks.d.ts +2 -1
  39. package/dist/types/pm-plugins/utils/selection.d.ts +2 -1
  40. package/dist/types/pm-plugins/utils/update-selection.d.ts +2 -1
  41. package/dist/types/pm-plugins/utils/validation.d.ts +2 -1
  42. package/dist/types/ui/consts.d.ts +1 -1
  43. package/dist/types/ui/utils/dom-attr-name.d.ts +2 -2
  44. package/dist/types/ui/visibility-container.d.ts +1 -1
  45. package/dist/types-ts4.5/pm-plugins/utils/anchor-utils.d.ts +2 -1
  46. package/dist/types-ts4.5/pm-plugins/utils/getSelection.d.ts +2 -2
  47. package/dist/types-ts4.5/pm-plugins/utils/marks.d.ts +2 -1
  48. package/dist/types-ts4.5/pm-plugins/utils/selection.d.ts +2 -1
  49. package/dist/types-ts4.5/pm-plugins/utils/update-selection.d.ts +2 -1
  50. package/dist/types-ts4.5/pm-plugins/utils/validation.d.ts +2 -1
  51. package/dist/types-ts4.5/ui/consts.d.ts +1 -1
  52. package/dist/types-ts4.5/ui/utils/dom-attr-name.d.ts +2 -2
  53. package/dist/types-ts4.5/ui/visibility-container.d.ts +1 -1
  54. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 9.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`da18116d80cad`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/da18116d80cad) -
8
+ Refactor to inline experiment checks
9
+ - [`d84e100ff2136`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d84e100ff2136) -
10
+ Update README.md and 0-intro.tsx
11
+ - Updated dependencies
12
+
13
+ ## 9.0.1
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 9.0.0
4
20
 
5
21
  ### Patch Changes
package/README.md CHANGED
@@ -1,10 +1,24 @@
1
- # Editor plugin block controls
1
+ # Editor Plugin Block Controls
2
2
 
3
3
  Block controls plugin for @atlaskit/editor-core
4
4
 
5
5
  **Note:** This component is designed for internal Atlassian development.
6
6
  External contributors will be able to use this component but will not be able to submit issues.
7
7
 
8
+ ## Overview
9
+
10
+ The Block Controls plugin provides comprehensive UI controls for managing blocks in the Atlassian Editor. It enables drag-and-drop functionality, block selection, quick insert capabilities, and visual decorations for interactive block management. This plugin integrates with the editor's core system to provide an intuitive interface for manipulating content blocks.
11
+
12
+ ## Key features
13
+
14
+ - **Drag and drop** - Move blocks around the editor with intuitive drag-and-drop gestures
15
+ - **Block selection** - Select and manage individual or multiple blocks
16
+ - **Quick insert** - Quick access to insert new content blocks
17
+ - **Visual decorations** - Hover states, drag handles, and drop target indicators
18
+ - **Block menu** - Context menu for block-level operations
19
+ - **Selection preservation** - Preserve text selection during block operations
20
+ - **Right-side controls** - Configurable right-edge button controls for block actions
21
+
8
22
  ## Install
9
23
 
10
24
  ---
@@ -73,7 +73,7 @@ var createInteractionTrackingPlugin = exports.createInteractionTrackingPlugin =
73
73
  view: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? function (view) {
74
74
  var editorContentArea = view.dom.closest('.ak-editor-content-area');
75
75
  // rightSideControlsEnabled is the single source of truth (confluence_remix_icon_right_side from preset)
76
- var remixRightSideEnabled = rightSideControlsEnabled;
76
+
77
77
  var unbindMouseEnter;
78
78
  var unbindMouseLeave;
79
79
  var unbindDocumentMouseMove;
@@ -111,7 +111,7 @@ var createInteractionTrackingPlugin = exports.createInteractionTrackingPlugin =
111
111
  }
112
112
  };
113
113
  if (editorContentArea) {
114
- if (remixRightSideEnabled && typeof document !== 'undefined') {
114
+ if (rightSideControlsEnabled && typeof document !== 'undefined') {
115
115
  unbindDocumentMouseMove = (0, _bindEventListener.bind)(document, {
116
116
  type: 'mousemove',
117
117
  listener: function listener(event) {
@@ -134,7 +134,7 @@ var createInteractionTrackingPlugin = exports.createInteractionTrackingPlugin =
134
134
  unbindMouseEnter = (0, _bindEventListener.bind)(editorContentArea, {
135
135
  type: 'mouseenter',
136
136
  listener: function listener() {
137
- if (remixRightSideEnabled) {
137
+ if (rightSideControlsEnabled) {
138
138
  cancelScheduledMouseLeave();
139
139
  }
140
140
  (0, _handleMouseMove.handleMouseEnter)(view);
@@ -148,7 +148,7 @@ var createInteractionTrackingPlugin = exports.createInteractionTrackingPlugin =
148
148
  x: e.clientX,
149
149
  y: e.clientY
150
150
  };
151
- if (remixRightSideEnabled) {
151
+ if (rightSideControlsEnabled) {
152
152
  scheduleMouseLeave(e);
153
153
  } else {
154
154
  (0, _handleMouseMove.handleMouseLeave)(view, false);
@@ -159,7 +159,7 @@ var createInteractionTrackingPlugin = exports.createInteractionTrackingPlugin =
159
159
  return {
160
160
  destroy: function destroy() {
161
161
  var _unbindMouseEnter, _unbindMouseLeave;
162
- if (remixRightSideEnabled) {
162
+ if (rightSideControlsEnabled) {
163
163
  var _unbindDocumentMouseM;
164
164
  cancelScheduledMouseLeave();
165
165
  (_unbindDocumentMouseM = unbindDocumentMouseMove) === null || _unbindDocumentMouseM === void 0 || _unbindDocumentMouseM();
@@ -811,9 +811,8 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
811
811
  var isDisabled = api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 || (_api$editorDisabled = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.editorDisabled;
812
812
  if (isDisabled) {
813
813
  var _api$editorViewMode2;
814
- var remixRightSideEnabled = rightSideControlsEnabled && (0, _expValEquals.expValEquals)('confluence_remix_icon_right_side', 'isEnabled', true);
815
814
  // Hide decorations when disabled, except in view mode when right-side controls are enabled
816
- if (!remixRightSideEnabled || (api === null || api === void 0 || (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 || (_api$editorViewMode2 = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2 === void 0 ? void 0 : _api$editorViewMode2.mode) !== 'view') {
815
+ if (!(rightSideControlsEnabled && (0, _expValEquals.expValEquals)('confluence_remix_icon_right_side', 'isEnabled', true)) || (api === null || api === void 0 || (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 || (_api$editorViewMode2 = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2 === void 0 ? void 0 : _api$editorViewMode2.mode) !== 'view') {
817
816
  return;
818
817
  }
819
818
  }
@@ -7,6 +7,8 @@ exports.updateSelection = exports.getInsertLayoutStep = void 0;
7
7
  var _selection = require("@atlaskit/editor-common/selection");
8
8
  var _state = require("@atlaskit/editor-prosemirror/state");
9
9
  var _transform = require("@atlaskit/editor-prosemirror/transform");
10
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports
11
+
10
12
  var getInsertLayoutStep = exports.getInsertLayoutStep = function getInsertLayoutStep(tr) {
11
13
  return tr.steps.find(function (step) {
12
14
  var _step$slice$content$f;
@@ -10,7 +10,7 @@ var _react = require("@emotion/react");
10
10
  * @jsxRuntime classic
11
11
  * @jsx jsx
12
12
  */
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
14
14
 
15
15
  var spanStyles = (0, _react.css)({
16
16
  display: 'inline-block',
@@ -49,7 +49,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
49
49
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
50
50
  * @jsxRuntime classic
51
51
  * @jsx jsx
52
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
52
+ */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
53
53
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
54
54
  var iconWrapperStyles = (0, _primitives.xcss)({
55
55
  display: 'flex',
@@ -24,7 +24,7 @@ var _domAttrName = require("./utils/dom-attr-name");
24
24
  * @jsx jsx
25
25
  */
26
26
 
27
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
27
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
28
28
 
29
29
  // 8px gap + 16px on left and right
30
30
  var DROP_TARGET_LAYOUT_DROP_ZONE_WIDTH = 40;
@@ -27,7 +27,7 @@ var _inlineDropTarget2 = require("./inline-drop-target");
27
27
  * @jsx jsx
28
28
  */
29
29
 
30
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
31
31
 
32
32
  var DEFAULT_DROP_INDICATOR_WIDTH = 760;
33
33
  var EDITOR_BLOCK_CONTROLS_DROP_INDICATOR_WIDTH = '--editor-block-controls-drop-indicator-width';
@@ -21,7 +21,7 @@ var _domAttrName = require("./utils/dom-attr-name");
21
21
  * @jsxRuntime classic
22
22
  * @jsx jsx
23
23
  */
24
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
25
25
 
26
26
  /**
27
27
  * This anchor element selector disregards anchors that are solely utilized for size measurements,
@@ -25,7 +25,7 @@ var _updateSelection = require("../pm-plugins/utils/update-selection");
25
25
  * @jsx jsx
26
26
  */
27
27
 
28
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
29
29
 
30
30
  var HOVER_ZONE_WIDTH = '--editor-blocks-inline-hover-zone-width';
31
31
  var HOVER_ZONE_HEIGHT = '--editor-blocks-inline-hover-zone-height';
@@ -37,7 +37,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
37
37
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
38
38
  * @jsxRuntime classic
39
39
  * @jsx jsx
40
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
40
+ */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
41
41
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
42
42
  var TEXT_PARENT_TYPES = ['paragraph', 'heading', 'blockquote', 'taskItem', 'decisionItem'];
43
43
  var stickyButtonStyles = (0, _primitives.xcss)({
@@ -20,7 +20,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
20
20
  * @jsx jsx
21
21
  */
22
22
 
23
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
24
24
 
25
25
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
26
26
 
@@ -62,7 +62,7 @@ export const createInteractionTrackingPlugin = (rightSideControlsEnabled = false
62
62
  view: editorExperiment('platform_editor_controls', 'variant1') ? view => {
63
63
  const editorContentArea = view.dom.closest('.ak-editor-content-area');
64
64
  // rightSideControlsEnabled is the single source of truth (confluence_remix_icon_right_side from preset)
65
- const remixRightSideEnabled = rightSideControlsEnabled;
65
+
66
66
  let unbindMouseEnter;
67
67
  let unbindMouseLeave;
68
68
  let unbindDocumentMouseMove;
@@ -100,7 +100,7 @@ export const createInteractionTrackingPlugin = (rightSideControlsEnabled = false
100
100
  }
101
101
  };
102
102
  if (editorContentArea) {
103
- if (remixRightSideEnabled && typeof document !== 'undefined') {
103
+ if (rightSideControlsEnabled && typeof document !== 'undefined') {
104
104
  unbindDocumentMouseMove = bind(document, {
105
105
  type: 'mousemove',
106
106
  listener: event => {
@@ -123,7 +123,7 @@ export const createInteractionTrackingPlugin = (rightSideControlsEnabled = false
123
123
  unbindMouseEnter = bind(editorContentArea, {
124
124
  type: 'mouseenter',
125
125
  listener: () => {
126
- if (remixRightSideEnabled) {
126
+ if (rightSideControlsEnabled) {
127
127
  cancelScheduledMouseLeave();
128
128
  }
129
129
  handleMouseEnter(view);
@@ -137,7 +137,7 @@ export const createInteractionTrackingPlugin = (rightSideControlsEnabled = false
137
137
  x: e.clientX,
138
138
  y: e.clientY
139
139
  };
140
- if (remixRightSideEnabled) {
140
+ if (rightSideControlsEnabled) {
141
141
  scheduleMouseLeave(e);
142
142
  } else {
143
143
  handleMouseLeave(view, false);
@@ -148,7 +148,7 @@ export const createInteractionTrackingPlugin = (rightSideControlsEnabled = false
148
148
  return {
149
149
  destroy: () => {
150
150
  var _unbindMouseEnter, _unbindMouseLeave;
151
- if (remixRightSideEnabled) {
151
+ if (rightSideControlsEnabled) {
152
152
  var _unbindDocumentMouseM;
153
153
  cancelScheduledMouseLeave();
154
154
  (_unbindDocumentMouseM = unbindDocumentMouseMove) === null || _unbindDocumentMouseM === void 0 ? void 0 : _unbindDocumentMouseM();
@@ -710,9 +710,8 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI, nodeDecora
710
710
  const isDisabled = api === null || api === void 0 ? void 0 : (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 ? void 0 : (_api$editorDisabled$s = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled$s === void 0 ? void 0 : _api$editorDisabled$s.editorDisabled;
711
711
  if (isDisabled) {
712
712
  var _api$editorViewMode2, _api$editorViewMode2$;
713
- const remixRightSideEnabled = rightSideControlsEnabled && expValEquals('confluence_remix_icon_right_side', 'isEnabled', true);
714
713
  // Hide decorations when disabled, except in view mode when right-side controls are enabled
715
- if (!remixRightSideEnabled || (api === null || api === void 0 ? void 0 : (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 ? void 0 : (_api$editorViewMode2$ = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2$ === void 0 ? void 0 : _api$editorViewMode2$.mode) !== 'view') {
714
+ if (!(rightSideControlsEnabled && expValEquals('confluence_remix_icon_right_side', 'isEnabled', true)) || (api === null || api === void 0 ? void 0 : (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 ? void 0 : (_api$editorViewMode2$ = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2$ === void 0 ? void 0 : _api$editorViewMode2$.mode) !== 'view') {
716
715
  return;
717
716
  }
718
717
  }
@@ -1,5 +1,6 @@
1
1
  import { GapCursorSelection, Side } from '@atlaskit/editor-common/selection';
2
2
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports
3
4
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
4
5
  export const getInsertLayoutStep = tr => tr.steps.find(step => {
5
6
  var _step$slice$content$f;
@@ -3,7 +3,7 @@
3
3
  * @jsxRuntime classic
4
4
  * @jsx jsx
5
5
  */
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
7
7
  import { css, jsx } from '@emotion/react';
8
8
  const spanStyles = css({
9
9
  display: 'inline-block',
@@ -5,7 +5,7 @@
5
5
 
6
6
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { bind } from 'bind-event-listener';
11
11
  import { getDocument } from '@atlaskit/browser-apis';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
6
6
 
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { layoutBreakpointWidth } from '@atlaskit/editor-shared-styles';
10
10
  import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  import { Fragment, useEffect, useMemo, useRef, useState } from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
11
11
  import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
@@ -2,7 +2,7 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
6
6
  import { css, Global, jsx } from '@emotion/react';
7
7
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
8
8
  import { ANCHOR_VARIABLE_NAME, DRAG_HANDLE_WIDTH, isCSSAnchorSupported, tableControlsSpacing } from '@atlaskit/editor-common/styles';
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
8
8
 
9
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { akEditorBreakoutPadding } from '@atlaskit/editor-shared-styles';
12
12
  import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
@@ -5,7 +5,7 @@
5
5
 
6
6
  import React, { useCallback, useEffect, useState } from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { bind } from 'bind-event-listener';
11
11
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import React, { useEffect, useRef, useState } from 'react';
6
6
 
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
10
10
  import { akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
@@ -67,7 +67,7 @@ export var createInteractionTrackingPlugin = function createInteractionTrackingP
67
67
  view: editorExperiment('platform_editor_controls', 'variant1') ? function (view) {
68
68
  var editorContentArea = view.dom.closest('.ak-editor-content-area');
69
69
  // rightSideControlsEnabled is the single source of truth (confluence_remix_icon_right_side from preset)
70
- var remixRightSideEnabled = rightSideControlsEnabled;
70
+
71
71
  var unbindMouseEnter;
72
72
  var unbindMouseLeave;
73
73
  var unbindDocumentMouseMove;
@@ -105,7 +105,7 @@ export var createInteractionTrackingPlugin = function createInteractionTrackingP
105
105
  }
106
106
  };
107
107
  if (editorContentArea) {
108
- if (remixRightSideEnabled && typeof document !== 'undefined') {
108
+ if (rightSideControlsEnabled && typeof document !== 'undefined') {
109
109
  unbindDocumentMouseMove = bind(document, {
110
110
  type: 'mousemove',
111
111
  listener: function listener(event) {
@@ -128,7 +128,7 @@ export var createInteractionTrackingPlugin = function createInteractionTrackingP
128
128
  unbindMouseEnter = bind(editorContentArea, {
129
129
  type: 'mouseenter',
130
130
  listener: function listener() {
131
- if (remixRightSideEnabled) {
131
+ if (rightSideControlsEnabled) {
132
132
  cancelScheduledMouseLeave();
133
133
  }
134
134
  handleMouseEnter(view);
@@ -142,7 +142,7 @@ export var createInteractionTrackingPlugin = function createInteractionTrackingP
142
142
  x: e.clientX,
143
143
  y: e.clientY
144
144
  };
145
- if (remixRightSideEnabled) {
145
+ if (rightSideControlsEnabled) {
146
146
  scheduleMouseLeave(e);
147
147
  } else {
148
148
  handleMouseLeave(view, false);
@@ -153,7 +153,7 @@ export var createInteractionTrackingPlugin = function createInteractionTrackingP
153
153
  return {
154
154
  destroy: function destroy() {
155
155
  var _unbindMouseEnter, _unbindMouseLeave;
156
- if (remixRightSideEnabled) {
156
+ if (rightSideControlsEnabled) {
157
157
  var _unbindDocumentMouseM;
158
158
  cancelScheduledMouseLeave();
159
159
  (_unbindDocumentMouseM = unbindDocumentMouseMove) === null || _unbindDocumentMouseM === void 0 || _unbindDocumentMouseM();
@@ -805,9 +805,8 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
805
805
  var isDisabled = api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 || (_api$editorDisabled = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.editorDisabled;
806
806
  if (isDisabled) {
807
807
  var _api$editorViewMode2;
808
- var remixRightSideEnabled = rightSideControlsEnabled && expValEquals('confluence_remix_icon_right_side', 'isEnabled', true);
809
808
  // Hide decorations when disabled, except in view mode when right-side controls are enabled
810
- if (!remixRightSideEnabled || (api === null || api === void 0 || (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 || (_api$editorViewMode2 = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2 === void 0 ? void 0 : _api$editorViewMode2.mode) !== 'view') {
809
+ if (!(rightSideControlsEnabled && expValEquals('confluence_remix_icon_right_side', 'isEnabled', true)) || (api === null || api === void 0 || (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 || (_api$editorViewMode2 = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2 === void 0 ? void 0 : _api$editorViewMode2.mode) !== 'view') {
811
810
  return;
812
811
  }
813
812
  }
@@ -1,5 +1,6 @@
1
1
  import { GapCursorSelection, Side } from '@atlaskit/editor-common/selection';
2
2
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports
3
4
  import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
4
5
  export var getInsertLayoutStep = function getInsertLayoutStep(tr) {
5
6
  return tr.steps.find(function (step) {
@@ -3,7 +3,7 @@
3
3
  * @jsxRuntime classic
4
4
  * @jsx jsx
5
5
  */
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
7
7
  import { css, jsx } from '@emotion/react';
8
8
  var spanStyles = css({
9
9
  display: 'inline-block',
@@ -10,7 +10,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
 
11
11
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
12
12
 
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
14
14
  import { css, jsx } from '@emotion/react';
15
15
  import { bind } from 'bind-event-listener';
16
16
  import { getDocument } from '@atlaskit/browser-apis';
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
6
6
  */
7
7
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
8
8
 
9
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { layoutBreakpointWidth } from '@atlaskit/editor-shared-styles';
12
12
  import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
@@ -7,7 +7,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
7
7
  */
8
8
  import { Fragment, useEffect, useMemo, useRef, useState } from 'react';
9
9
 
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
11
11
  import { css, jsx } from '@emotion/react';
12
12
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
13
13
  import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  * @jsxRuntime classic
4
4
  * @jsx jsx
5
5
  */
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
7
7
  import { css, Global, jsx } from '@emotion/react';
8
8
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
9
9
  import { ANCHOR_VARIABLE_NAME, DRAG_HANDLE_WIDTH, isCSSAnchorSupported, tableControlsSpacing } from '@atlaskit/editor-common/styles';
@@ -8,7 +8,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
8
8
  */
9
9
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
10
10
 
11
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
11
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
12
12
  import { css, jsx } from '@emotion/react';
13
13
  import { akEditorBreakoutPadding } from '@atlaskit/editor-shared-styles';
14
14
  import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
@@ -9,7 +9,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
9
9
 
10
10
  import React, { useCallback, useEffect, useState } from 'react';
11
11
 
12
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
13
13
  import { css, jsx } from '@emotion/react';
14
14
  import { bind } from 'bind-event-listener';
15
15
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
@@ -6,7 +6,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
6
6
  */
7
7
  import React, { useEffect, useRef, useState } from 'react';
8
8
 
9
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
12
12
  import { akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
@@ -1,5 +1,6 @@
1
+ import { type MemoizedFn } from 'memoize-one';
1
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
- export declare const isAnchorSupported: import("memoize-one").MemoizedFn<() => boolean>;
3
+ export declare const isAnchorSupported: MemoizedFn<() => boolean>;
3
4
  type RectInfo = {
4
5
  bottom: number;
5
6
  height: number;
@@ -15,8 +15,8 @@ export declare const isNodeWithCodeBlock: (tr: Transaction, start: number, nodeS
15
15
  * @param start The start position of the node.
16
16
  * @returns The appropriate selection for the node.
17
17
  */
18
- export declare const newGetSelection: (doc: PMNode, selectionEmpty: boolean, start: number) => false | NodeSelection | TextSelection;
19
- export declare const getSelection: (tr: Transaction, start: number, api?: ExtractInjectionAPI<BlockControlsPlugin>) => false | NodeSelection | TextSelection;
18
+ export declare const newGetSelection: (doc: PMNode, selectionEmpty: boolean, start: number) => false | TextSelection | NodeSelection;
19
+ export declare const getSelection: (tr: Transaction, start: number, api?: ExtractInjectionAPI<BlockControlsPlugin>) => false | TextSelection | NodeSelection;
20
20
  export declare const selectNode: (tr: Transaction, start: number, nodeType: string, api?: ExtractInjectionAPI<BlockControlsPlugin>) => Transaction;
21
21
  export declare const setCursorPositionAtMovedNode: (tr: Transaction, start: number, api?: ExtractInjectionAPI<BlockControlsPlugin>) => Transaction;
22
22
  /**
@@ -1,3 +1,4 @@
1
+ import type { Mark } from '@atlaskit/editor-prosemirror/model';
1
2
  import { type EditorState } from '@atlaskit/editor-prosemirror/state';
2
3
  /**
3
4
  * Returns list of block marks on schema that widgets are allowed to render inside
@@ -13,4 +14,4 @@ import { type EditorState } from '@atlaskit/editor-prosemirror/state';
13
14
  * // [indent, alignment]
14
15
  * ```
15
16
  */
16
- export declare const getActiveBlockMarks: (state: EditorState, pos: number) => import("prosemirror-model").Mark[];
17
+ export declare const getActiveBlockMarks: (state: EditorState, pos: number) => Mark[];
@@ -1,6 +1,7 @@
1
1
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
2
  import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
3
  import { NodeSelection, TextSelection, type ReadonlyTransaction, type Selection, type Transaction } from '@atlaskit/editor-prosemirror/state';
4
+ import type { CellSelection } from '@atlaskit/editor-tables';
4
5
  import type { BlockControlsPlugin } from '../../blockControlsPluginType';
5
6
  export declare const getMultiSelectionIfPosInside: (api: ExtractInjectionAPI<BlockControlsPlugin>, pos: number, tr?: Transaction) => {
6
7
  anchor?: number;
@@ -66,4 +67,4 @@ export declare const adjustSelectionBoundsForEdgePositions: ($from: ResolvedPos,
66
67
  * @param $to The resolved position of the end of the selection
67
68
  * @returns A Selection or undefined if selection is invalid
68
69
  */
69
- export declare const createPreservedSelection: ($from: ResolvedPos, $to: ResolvedPos) => NodeSelection | TextSelection | import("@atlaskit/editor-tables").CellSelection | undefined;
70
+ export declare const createPreservedSelection: ($from: ResolvedPos, $to: ResolvedPos) => TextSelection | CellSelection | NodeSelection | undefined;
@@ -1,3 +1,4 @@
1
1
  import { type Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export declare const getInsertLayoutStep: (tr: Transaction) => import("prosemirror-transform").Step | undefined;
2
+ import { Step } from '@atlaskit/editor-prosemirror/transform';
3
+ export declare const getInsertLayoutStep: (tr: Transaction) => Step | undefined;
3
4
  export declare const updateSelection: (tr: Transaction, to: number, insertAtRight?: boolean) => Transaction;
@@ -1,3 +1,4 @@
1
+ import { type MemoizedFn } from 'memoize-one';
1
2
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
2
3
  import type { NodeType, Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
4
  export declare const isInsideTable: (nodeType: NodeType) => Boolean;
@@ -16,7 +17,7 @@ export declare const isInSameLayout: ($from: ResolvedPos, $to: ResolvedPos) => b
16
17
  export declare const transformExpandToNestedExpand: (expandNode: PMNode) => PMNode | null;
17
18
  export declare const transformFragmentExpandToNestedExpand: (fragment: Fragment) => Fragment | null;
18
19
  export declare const transformSliceExpandToNestedExpand: (slice: Slice) => Slice | null;
19
- export declare const memoizedTransformExpandToNestedExpand: import("memoize-one").MemoizedFn<(node: PMNode) => PMNode | null>;
20
+ export declare const memoizedTransformExpandToNestedExpand: MemoizedFn<(node: PMNode) => PMNode | null>;
20
21
  export declare const canCreateNodeWithContentInsideAnotherNode: (nodeTypesToCreate: NodeType[], nodeWithTargetFragment: Fragment) => boolean;
21
22
  export declare function canMoveNodeToIndex(destParent: PMNode, indexIntoParent: number, srcNode: PMNode, $destNodePos: ResolvedPos, destNode?: PMNode): boolean;
22
23
  export declare function canMoveSliceToIndex(slice: Slice, sliceFromPos: number, sliceToPos: number, destParent: PMNode, indexIntoParent: number, $destNodePos: ResolvedPos, destNode?: PMNode): boolean;
@@ -32,7 +32,7 @@ export declare const QUICK_INSERT_DIMENSIONS: {
32
32
  export declare const QUICK_INSERT_LEFT_OFFSET = 16;
33
33
  export declare const dragHandleGap: (nodeType: string, parentNodeType?: string) => number;
34
34
  export declare const rootElementGap: (nodeType: string) => number;
35
- export declare const getNestedNodeLeftPaddingMargin: (nodeType?: string) => "8px" | "16px" | "20px" | "24px" | "28px" | "40px";
35
+ export declare const getNestedNodeLeftPaddingMargin: (nodeType?: string) => "24px" | "8px" | "16px" | "20px" | "28px" | "40px";
36
36
  export declare const topPositionAdjustment: (nodeType: string) => number;
37
37
  export declare const dropTargetMarginMap: {
38
38
  [key: number]: string;
@@ -1,5 +1,5 @@
1
1
  export declare const NODE_ANCHOR_ATTR_NAME = "data-node-anchor";
2
2
  export declare const NODE_NODE_TYPE_ATTR_NAME = "data-prosemirror-node-name";
3
- export declare const getAnchorAttrName: () => "data-node-anchor" | "data-drag-handler-anchor-name";
4
- export declare const getTypeNameAttrName: () => "data-prosemirror-node-name" | "data-drag-handler-node-type";
3
+ export declare const getAnchorAttrName: () => "data-drag-handler-anchor-name" | "data-node-anchor";
4
+ export declare const getTypeNameAttrName: () => "data-drag-handler-node-type" | "data-prosemirror-node-name";
5
5
  export declare const getTypeNameFromDom: (element?: Element | null) => string;
@@ -11,5 +11,5 @@ interface VisibilityContainerProps {
11
11
  children: React.ReactNode;
12
12
  controlSide?: 'left' | 'right';
13
13
  }
14
- export declare const VisibilityContainer: ({ api, children, controlSide }: VisibilityContainerProps) => jsx.JSX.Element;
14
+ export declare const VisibilityContainer: ({ api, children, controlSide, }: VisibilityContainerProps) => jsx.JSX.Element;
15
15
  export {};
@@ -1,5 +1,6 @@
1
+ import { type MemoizedFn } from 'memoize-one';
1
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
2
- export declare const isAnchorSupported: import("memoize-one").MemoizedFn<() => boolean>;
3
+ export declare const isAnchorSupported: MemoizedFn<() => boolean>;
3
4
  type RectInfo = {
4
5
  bottom: number;
5
6
  height: number;
@@ -15,8 +15,8 @@ export declare const isNodeWithCodeBlock: (tr: Transaction, start: number, nodeS
15
15
  * @param start The start position of the node.
16
16
  * @returns The appropriate selection for the node.
17
17
  */
18
- export declare const newGetSelection: (doc: PMNode, selectionEmpty: boolean, start: number) => false | NodeSelection | TextSelection;
19
- export declare const getSelection: (tr: Transaction, start: number, api?: ExtractInjectionAPI<BlockControlsPlugin>) => false | NodeSelection | TextSelection;
18
+ export declare const newGetSelection: (doc: PMNode, selectionEmpty: boolean, start: number) => false | TextSelection | NodeSelection;
19
+ export declare const getSelection: (tr: Transaction, start: number, api?: ExtractInjectionAPI<BlockControlsPlugin>) => false | TextSelection | NodeSelection;
20
20
  export declare const selectNode: (tr: Transaction, start: number, nodeType: string, api?: ExtractInjectionAPI<BlockControlsPlugin>) => Transaction;
21
21
  export declare const setCursorPositionAtMovedNode: (tr: Transaction, start: number, api?: ExtractInjectionAPI<BlockControlsPlugin>) => Transaction;
22
22
  /**
@@ -1,3 +1,4 @@
1
+ import type { Mark } from '@atlaskit/editor-prosemirror/model';
1
2
  import { type EditorState } from '@atlaskit/editor-prosemirror/state';
2
3
  /**
3
4
  * Returns list of block marks on schema that widgets are allowed to render inside
@@ -13,4 +14,4 @@ import { type EditorState } from '@atlaskit/editor-prosemirror/state';
13
14
  * // [indent, alignment]
14
15
  * ```
15
16
  */
16
- export declare const getActiveBlockMarks: (state: EditorState, pos: number) => import("prosemirror-model").Mark[];
17
+ export declare const getActiveBlockMarks: (state: EditorState, pos: number) => Mark[];
@@ -1,6 +1,7 @@
1
1
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
2
  import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
3
  import { NodeSelection, TextSelection, type ReadonlyTransaction, type Selection, type Transaction } from '@atlaskit/editor-prosemirror/state';
4
+ import type { CellSelection } from '@atlaskit/editor-tables';
4
5
  import type { BlockControlsPlugin } from '../../blockControlsPluginType';
5
6
  export declare const getMultiSelectionIfPosInside: (api: ExtractInjectionAPI<BlockControlsPlugin>, pos: number, tr?: Transaction) => {
6
7
  anchor?: number;
@@ -66,4 +67,4 @@ export declare const adjustSelectionBoundsForEdgePositions: ($from: ResolvedPos,
66
67
  * @param $to The resolved position of the end of the selection
67
68
  * @returns A Selection or undefined if selection is invalid
68
69
  */
69
- export declare const createPreservedSelection: ($from: ResolvedPos, $to: ResolvedPos) => NodeSelection | TextSelection | import("@atlaskit/editor-tables").CellSelection | undefined;
70
+ export declare const createPreservedSelection: ($from: ResolvedPos, $to: ResolvedPos) => TextSelection | CellSelection | NodeSelection | undefined;
@@ -1,3 +1,4 @@
1
1
  import { type Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export declare const getInsertLayoutStep: (tr: Transaction) => import("prosemirror-transform").Step | undefined;
2
+ import { Step } from '@atlaskit/editor-prosemirror/transform';
3
+ export declare const getInsertLayoutStep: (tr: Transaction) => Step | undefined;
3
4
  export declare const updateSelection: (tr: Transaction, to: number, insertAtRight?: boolean) => Transaction;
@@ -1,3 +1,4 @@
1
+ import { type MemoizedFn } from 'memoize-one';
1
2
  import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
2
3
  import type { NodeType, Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
4
  export declare const isInsideTable: (nodeType: NodeType) => Boolean;
@@ -16,7 +17,7 @@ export declare const isInSameLayout: ($from: ResolvedPos, $to: ResolvedPos) => b
16
17
  export declare const transformExpandToNestedExpand: (expandNode: PMNode) => PMNode | null;
17
18
  export declare const transformFragmentExpandToNestedExpand: (fragment: Fragment) => Fragment | null;
18
19
  export declare const transformSliceExpandToNestedExpand: (slice: Slice) => Slice | null;
19
- export declare const memoizedTransformExpandToNestedExpand: import("memoize-one").MemoizedFn<(node: PMNode) => PMNode | null>;
20
+ export declare const memoizedTransformExpandToNestedExpand: MemoizedFn<(node: PMNode) => PMNode | null>;
20
21
  export declare const canCreateNodeWithContentInsideAnotherNode: (nodeTypesToCreate: NodeType[], nodeWithTargetFragment: Fragment) => boolean;
21
22
  export declare function canMoveNodeToIndex(destParent: PMNode, indexIntoParent: number, srcNode: PMNode, $destNodePos: ResolvedPos, destNode?: PMNode): boolean;
22
23
  export declare function canMoveSliceToIndex(slice: Slice, sliceFromPos: number, sliceToPos: number, destParent: PMNode, indexIntoParent: number, $destNodePos: ResolvedPos, destNode?: PMNode): boolean;
@@ -32,7 +32,7 @@ export declare const QUICK_INSERT_DIMENSIONS: {
32
32
  export declare const QUICK_INSERT_LEFT_OFFSET = 16;
33
33
  export declare const dragHandleGap: (nodeType: string, parentNodeType?: string) => number;
34
34
  export declare const rootElementGap: (nodeType: string) => number;
35
- export declare const getNestedNodeLeftPaddingMargin: (nodeType?: string) => "8px" | "16px" | "20px" | "24px" | "28px" | "40px";
35
+ export declare const getNestedNodeLeftPaddingMargin: (nodeType?: string) => "24px" | "8px" | "16px" | "20px" | "28px" | "40px";
36
36
  export declare const topPositionAdjustment: (nodeType: string) => number;
37
37
  export declare const dropTargetMarginMap: {
38
38
  [key: number]: string;
@@ -1,5 +1,5 @@
1
1
  export declare const NODE_ANCHOR_ATTR_NAME = "data-node-anchor";
2
2
  export declare const NODE_NODE_TYPE_ATTR_NAME = "data-prosemirror-node-name";
3
- export declare const getAnchorAttrName: () => "data-node-anchor" | "data-drag-handler-anchor-name";
4
- export declare const getTypeNameAttrName: () => "data-prosemirror-node-name" | "data-drag-handler-node-type";
3
+ export declare const getAnchorAttrName: () => "data-drag-handler-anchor-name" | "data-node-anchor";
4
+ export declare const getTypeNameAttrName: () => "data-drag-handler-node-type" | "data-prosemirror-node-name";
5
5
  export declare const getTypeNameFromDom: (element?: Element | null) => string;
@@ -11,5 +11,5 @@ interface VisibilityContainerProps {
11
11
  children: React.ReactNode;
12
12
  controlSide?: 'left' | 'right';
13
13
  }
14
- export declare const VisibilityContainer: ({ api, children, controlSide }: VisibilityContainerProps) => jsx.JSX.Element;
14
+ export declare const VisibilityContainer: ({ api, children, controlSide, }: VisibilityContainerProps) => jsx.JSX.Element;
15
15
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "9.0.0",
3
+ "version": "9.0.2",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -56,7 +56,7 @@
56
56
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
57
57
  "@atlaskit/primitives": "^18.0.0",
58
58
  "@atlaskit/theme": "^22.0.0",
59
- "@atlaskit/tmp-editor-statsig": "^35.10.0",
59
+ "@atlaskit/tmp-editor-statsig": "^36.3.0",
60
60
  "@atlaskit/tokens": "^11.1.0",
61
61
  "@atlaskit/tooltip": "^20.14.0",
62
62
  "@babel/runtime": "^7.0.0",
@@ -67,7 +67,7 @@
67
67
  "uuid": "^3.1.0"
68
68
  },
69
69
  "peerDependencies": {
70
- "@atlaskit/editor-common": "^112.0.0",
70
+ "@atlaskit/editor-common": "^112.2.0",
71
71
  "react": "^18.2.0",
72
72
  "react-dom": "^18.2.0",
73
73
  "react-intl-next": "npm:react-intl@^5.18.1"