@atlaskit/editor-plugin-expand 8.3.8 → 8.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,26 @@
1
1
  # @atlaskit/editor-plugin-expand
2
2
 
3
+ ## 8.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0f91061590da3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0f91061590da3) -
8
+ Split platform_editor_vc90_transition_fixes_batch_1 into
9
+ platform_editor_vc90_transition_table_border, platform_editor_vc90_transition_expand_icon,
10
+ platform_editor_vc90_transition_mentions, platform_editor_vc90_transition_panel_icon
11
+ - Updated dependencies
12
+
13
+ ## 8.4.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [`342dd44a8575e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/342dd44a8575e) -
18
+ [ux] EDITOR-4609 Add prop to disable pasting expands
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 8.3.8
4
25
 
5
26
  ### Patch Changes
@@ -208,8 +208,8 @@ var focusIcon = exports.focusIcon = function focusIcon(expand) {
208
208
  return false;
209
209
  }
210
210
 
211
- // TODO: ED-29205 - During platform_editor_vc90_transition_fixes_batch_1 cleanup, rename `iconContainer` to `iconButton`.
212
- var iconContainer = (0, _expValEquals.expValEquals)('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true) ? expand.querySelector(".".concat(_styles.expandClassNames.iconButton)) : expand.querySelector(".".concat(_styles.expandClassNames.iconContainer));
211
+ // TODO: ED-29205 - During platform_editor_vc90_transition_expand_icon cleanup, rename `iconContainer` to `iconButton`.
212
+ var iconContainer = (0, _expValEquals.expValEquals)('platform_editor_vc90_transition_expand_icon', 'isEnabled', true) ? expand.querySelector(".".concat(_styles.expandClassNames.iconButton)) : expand.querySelector(".".concat(_styles.expandClassNames.iconContainer));
213
213
  if (iconContainer && iconContainer.focus) {
214
214
  var tr = state.tr;
215
215
  var pos = state.selection.from;
@@ -488,7 +488,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
488
488
  this.content = this.dom.querySelector(".".concat(_styles.expandClassNames.content));
489
489
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
490
490
  this.renderKey = (0, _v.default)();
491
- if ((0, _expValEquals.expValEquals)('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true)) {
491
+ if ((0, _expValEquals.expValEquals)('platform_editor_vc90_transition_expand_icon', 'isEnabled', true)) {
492
492
  this.renderNativeIcon(this.node);
493
493
  } else {
494
494
  this.renderIcon(this.intl);
@@ -612,7 +612,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
612
612
  // we toggle a class name to hide the content and animate the chevron.
613
613
  if (this.dom) {
614
614
  this.dom.classList.toggle(_styles.expandClassNames.expanded);
615
- if ((0, _expValEquals.expValEquals)('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true)) {
615
+ if ((0, _expValEquals.expValEquals)('platform_editor_vc90_transition_expand_icon', 'isEnabled', true)) {
616
616
  this.renderNativeIcon(node);
617
617
  } else {
618
618
  this.renderIcon(this && this.intl, node);
@@ -12,6 +12,7 @@ var _blockMenu = require("@atlaskit/editor-common/block-menu");
12
12
  var _messages = require("@atlaskit/editor-common/messages");
13
13
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
14
14
  var _utils = require("@atlaskit/editor-common/utils");
15
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
16
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
16
17
  var _toggleExpandRange = require("../editor-commands/toggleExpandRange");
17
18
  var _ExpandBlockMenuItem = require("../ui/ExpandBlockMenuItem");
@@ -65,6 +66,12 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
65
66
  },
66
67
  toggleExpandRange: _toggleExpandRange.toggleExpandRange
67
68
  },
69
+ getSharedState: function getSharedState() {
70
+ var _options$allowInserti;
71
+ return (0, _expValEquals.expValEquals)('platform_editor_expand_paste_in_comment_editor', 'isEnabled', true) ? {
72
+ allowInsertion: (_options$allowInserti = options === null || options === void 0 ? void 0 : options.allowInsertion) !== null && _options$allowInserti !== void 0 ? _options$allowInserti : true
73
+ } : undefined;
74
+ },
68
75
  pmPlugins: function pmPlugins() {
69
76
  return [{
70
77
  name: 'expand',
@@ -244,8 +244,8 @@ var focusIcon = exports.focusIcon = function focusIcon(expand) {
244
244
  return false;
245
245
  }
246
246
 
247
- // TODO: ED-29205 - During platform_editor_vc90_transition_fixes_batch_1 cleanup, rename `iconContainer` to `iconButton`.
248
- var iconContainer = (0, _expValEquals.expValEquals)('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true) ? expand.querySelector(".".concat(_styles.expandClassNames.iconButton)) : expand.querySelector(".".concat(_styles.expandClassNames.iconContainer));
247
+ // TODO: ED-29205 - During platform_editor_vc90_transition_expand_icon cleanup, rename `iconContainer` to `iconButton`.
248
+ var iconContainer = (0, _expValEquals.expValEquals)('platform_editor_vc90_transition_expand_icon', 'isEnabled', true) ? expand.querySelector(".".concat(_styles.expandClassNames.iconButton)) : expand.querySelector(".".concat(_styles.expandClassNames.iconContainer));
249
249
  if (iconContainer && iconContainer.focus) {
250
250
  var tr = state.tr;
251
251
  var pos = state.selection.from;
@@ -471,7 +471,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
471
471
  if (!_expand.expandedState.has(this.node)) {
472
472
  _expand.expandedState.set(this.node, false);
473
473
  }
474
- if ((0, _expValEquals.expValEquals)('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true)) {
474
+ if ((0, _expValEquals.expValEquals)('platform_editor_vc90_transition_expand_icon', 'isEnabled', true)) {
475
475
  this.renderNativeIcon(this.node);
476
476
  } else {
477
477
  this.renderIcon(this.icon, !(0, _expand.isExpandCollapsed)(this.node));
@@ -586,7 +586,7 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
586
586
  this.dom.className = (0, _NodeView.buildExpandClassName)(node.type.name, expanded);
587
587
  }
588
588
  // Re-render the icon to update the aria-expanded attribute
589
- if ((0, _expValEquals.expValEquals)('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true)) {
589
+ if ((0, _expValEquals.expValEquals)('platform_editor_vc90_transition_expand_icon', 'isEnabled', true)) {
590
590
  this.renderNativeIcon(node);
591
591
  } else {
592
592
  var _expandedState$get3;
@@ -13,6 +13,7 @@ var _messages = require("@atlaskit/editor-common/messages");
13
13
  var _quickInsert = require("@atlaskit/editor-common/quick-insert");
14
14
  var _utils = require("@atlaskit/editor-common/utils");
15
15
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
17
  var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
17
18
  var _toggleExpandRange = require("../editor-commands/toggleExpandRange");
18
19
  var _ExpandBlockMenuItem = require("../ui/ExpandBlockMenuItem");
@@ -65,6 +66,12 @@ var expandPlugin = exports.expandPlugin = function expandPlugin(_ref) {
65
66
  },
66
67
  toggleExpandRange: _toggleExpandRange.toggleExpandRange
67
68
  },
69
+ getSharedState: function getSharedState() {
70
+ var _options$allowInserti;
71
+ return (0, _expValEquals.expValEquals)('platform_editor_expand_paste_in_comment_editor', 'isEnabled', true) ? {
72
+ allowInsertion: (_options$allowInserti = options === null || options === void 0 ? void 0 : options.allowInsertion) !== null && _options$allowInserti !== void 0 ? _options$allowInserti : true
73
+ } : undefined;
74
+ },
68
75
  pmPlugins: function pmPlugins() {
69
76
  return [{
70
77
  name: 'expand',
@@ -188,8 +188,8 @@ export const focusIcon = expand => (state, dispatch, editorView) => {
188
188
  return false;
189
189
  }
190
190
 
191
- // TODO: ED-29205 - During platform_editor_vc90_transition_fixes_batch_1 cleanup, rename `iconContainer` to `iconButton`.
192
- const iconContainer = expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true) ? expand.querySelector(`.${expandClassNames.iconButton}`) : expand.querySelector(`.${expandClassNames.iconContainer}`);
191
+ // TODO: ED-29205 - During platform_editor_vc90_transition_expand_icon cleanup, rename `iconContainer` to `iconButton`.
192
+ const iconContainer = expValEquals('platform_editor_vc90_transition_expand_icon', 'isEnabled', true) ? expand.querySelector(`.${expandClassNames.iconButton}`) : expand.querySelector(`.${expandClassNames.iconContainer}`);
193
193
  if (iconContainer && iconContainer.focus) {
194
194
  const {
195
195
  tr
@@ -492,7 +492,7 @@ export class ExpandNodeView {
492
492
  this.content = this.dom.querySelector(`.${expandClassNames.content}`);
493
493
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
494
494
  this.renderKey = uuid();
495
- if (expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true)) {
495
+ if (expValEquals('platform_editor_vc90_transition_expand_icon', 'isEnabled', true)) {
496
496
  this.renderNativeIcon(this.node);
497
497
  } else {
498
498
  this.renderIcon(this.intl);
@@ -600,7 +600,7 @@ export class ExpandNodeView {
600
600
  // we toggle a class name to hide the content and animate the chevron.
601
601
  if (this.dom) {
602
602
  this.dom.classList.toggle(expandClassNames.expanded);
603
- if (expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true)) {
603
+ if (expValEquals('platform_editor_vc90_transition_expand_icon', 'isEnabled', true)) {
604
604
  this.renderNativeIcon(node);
605
605
  } else {
606
606
  this.renderIcon(this && this.intl, node);
@@ -5,6 +5,7 @@ import { TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION,
5
5
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
6
6
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
7
7
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
8
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
9
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
9
10
  import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
10
11
  import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
@@ -57,6 +58,12 @@ export let expandPlugin = ({
57
58
  toggleExpandWithMatch: selection => toggleExpandWithMatch(selection),
58
59
  toggleExpandRange
59
60
  },
61
+ getSharedState() {
62
+ var _options$allowInserti;
63
+ return expValEquals('platform_editor_expand_paste_in_comment_editor', 'isEnabled', true) ? {
64
+ allowInsertion: (_options$allowInserti = options === null || options === void 0 ? void 0 : options.allowInsertion) !== null && _options$allowInserti !== void 0 ? _options$allowInserti : true
65
+ } : undefined;
66
+ },
60
67
  pmPlugins() {
61
68
  return [{
62
69
  name: 'expand',
@@ -224,8 +224,8 @@ export const focusIcon = expand => (state, dispatch, editorView) => {
224
224
  return false;
225
225
  }
226
226
 
227
- // TODO: ED-29205 - During platform_editor_vc90_transition_fixes_batch_1 cleanup, rename `iconContainer` to `iconButton`.
228
- const iconContainer = expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true) ? expand.querySelector(`.${expandClassNames.iconButton}`) : expand.querySelector(`.${expandClassNames.iconContainer}`);
227
+ // TODO: ED-29205 - During platform_editor_vc90_transition_expand_icon cleanup, rename `iconContainer` to `iconButton`.
228
+ const iconContainer = expValEquals('platform_editor_vc90_transition_expand_icon', 'isEnabled', true) ? expand.querySelector(`.${expandClassNames.iconButton}`) : expand.querySelector(`.${expandClassNames.iconContainer}`);
229
229
  if (iconContainer && iconContainer.focus) {
230
230
  const {
231
231
  tr
@@ -472,7 +472,7 @@ export class ExpandNodeView {
472
472
  if (!expandedState.has(this.node)) {
473
473
  expandedState.set(this.node, false);
474
474
  }
475
- if (expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true)) {
475
+ if (expValEquals('platform_editor_vc90_transition_expand_icon', 'isEnabled', true)) {
476
476
  this.renderNativeIcon(this.node);
477
477
  } else {
478
478
  this.renderIcon(this.icon, !isExpandCollapsed(this.node));
@@ -576,7 +576,7 @@ export class ExpandNodeView {
576
576
  this.dom.className = buildExpandClassName(node.type.name, expanded);
577
577
  }
578
578
  // Re-render the icon to update the aria-expanded attribute
579
- if (expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true)) {
579
+ if (expValEquals('platform_editor_vc90_transition_expand_icon', 'isEnabled', true)) {
580
580
  this.renderNativeIcon(node);
581
581
  } else {
582
582
  var _expandedState$get3;
@@ -6,6 +6,7 @@ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/
6
6
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
7
7
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
10
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
10
11
  import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
11
12
  import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
@@ -57,6 +58,12 @@ export let expandPlugin = ({
57
58
  toggleExpandWithMatch: selection => toggleExpandWithMatch(selection),
58
59
  toggleExpandRange
59
60
  },
61
+ getSharedState() {
62
+ var _options$allowInserti;
63
+ return expValEquals('platform_editor_expand_paste_in_comment_editor', 'isEnabled', true) ? {
64
+ allowInsertion: (_options$allowInserti = options === null || options === void 0 ? void 0 : options.allowInsertion) !== null && _options$allowInserti !== void 0 ? _options$allowInserti : true
65
+ } : undefined;
66
+ },
60
67
  pmPlugins() {
61
68
  return [{
62
69
  name: 'expand',
@@ -201,8 +201,8 @@ export var focusIcon = function focusIcon(expand) {
201
201
  return false;
202
202
  }
203
203
 
204
- // TODO: ED-29205 - During platform_editor_vc90_transition_fixes_batch_1 cleanup, rename `iconContainer` to `iconButton`.
205
- var iconContainer = expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true) ? expand.querySelector(".".concat(expandClassNames.iconButton)) : expand.querySelector(".".concat(expandClassNames.iconContainer));
204
+ // TODO: ED-29205 - During platform_editor_vc90_transition_expand_icon cleanup, rename `iconContainer` to `iconButton`.
205
+ var iconContainer = expValEquals('platform_editor_vc90_transition_expand_icon', 'isEnabled', true) ? expand.querySelector(".".concat(expandClassNames.iconButton)) : expand.querySelector(".".concat(expandClassNames.iconContainer));
206
206
  if (iconContainer && iconContainer.focus) {
207
207
  var tr = state.tr;
208
208
  var pos = state.selection.from;
@@ -481,7 +481,7 @@ export var ExpandNodeView = /*#__PURE__*/function () {
481
481
  this.content = this.dom.querySelector(".".concat(expandClassNames.content));
482
482
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
483
483
  this.renderKey = uuid();
484
- if (expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true)) {
484
+ if (expValEquals('platform_editor_vc90_transition_expand_icon', 'isEnabled', true)) {
485
485
  this.renderNativeIcon(this.node);
486
486
  } else {
487
487
  this.renderIcon(this.intl);
@@ -605,7 +605,7 @@ export var ExpandNodeView = /*#__PURE__*/function () {
605
605
  // we toggle a class name to hide the content and animate the chevron.
606
606
  if (this.dom) {
607
607
  this.dom.classList.toggle(expandClassNames.expanded);
608
- if (expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true)) {
608
+ if (expValEquals('platform_editor_vc90_transition_expand_icon', 'isEnabled', true)) {
609
609
  this.renderNativeIcon(node);
610
610
  } else {
611
611
  this.renderIcon(this && this.intl, node);
@@ -5,6 +5,7 @@ import { TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION,
5
5
  import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
6
6
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
7
7
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
8
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
9
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
9
10
  import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
10
11
  import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
@@ -59,6 +60,12 @@ export var expandPlugin = function expandPlugin(_ref) {
59
60
  },
60
61
  toggleExpandRange: toggleExpandRange
61
62
  },
63
+ getSharedState: function getSharedState() {
64
+ var _options$allowInserti;
65
+ return expValEquals('platform_editor_expand_paste_in_comment_editor', 'isEnabled', true) ? {
66
+ allowInsertion: (_options$allowInserti = options === null || options === void 0 ? void 0 : options.allowInsertion) !== null && _options$allowInserti !== void 0 ? _options$allowInserti : true
67
+ } : undefined;
68
+ },
62
69
  pmPlugins: function pmPlugins() {
63
70
  return [{
64
71
  name: 'expand',
@@ -239,8 +239,8 @@ export var focusIcon = function focusIcon(expand) {
239
239
  return false;
240
240
  }
241
241
 
242
- // TODO: ED-29205 - During platform_editor_vc90_transition_fixes_batch_1 cleanup, rename `iconContainer` to `iconButton`.
243
- var iconContainer = expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true) ? expand.querySelector(".".concat(expandClassNames.iconButton)) : expand.querySelector(".".concat(expandClassNames.iconContainer));
242
+ // TODO: ED-29205 - During platform_editor_vc90_transition_expand_icon cleanup, rename `iconContainer` to `iconButton`.
243
+ var iconContainer = expValEquals('platform_editor_vc90_transition_expand_icon', 'isEnabled', true) ? expand.querySelector(".".concat(expandClassNames.iconButton)) : expand.querySelector(".".concat(expandClassNames.iconContainer));
244
244
  if (iconContainer && iconContainer.focus) {
245
245
  var tr = state.tr;
246
246
  var pos = state.selection.from;
@@ -463,7 +463,7 @@ export var ExpandNodeView = /*#__PURE__*/function () {
463
463
  if (!expandedState.has(this.node)) {
464
464
  expandedState.set(this.node, false);
465
465
  }
466
- if (expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true)) {
466
+ if (expValEquals('platform_editor_vc90_transition_expand_icon', 'isEnabled', true)) {
467
467
  this.renderNativeIcon(this.node);
468
468
  } else {
469
469
  this.renderIcon(this.icon, !isExpandCollapsed(this.node));
@@ -578,7 +578,7 @@ export var ExpandNodeView = /*#__PURE__*/function () {
578
578
  this.dom.className = buildExpandClassName(node.type.name, expanded);
579
579
  }
580
580
  // Re-render the icon to update the aria-expanded attribute
581
- if (expValEquals('platform_editor_vc90_transition_fixes_batch_1', 'isEnabled', true)) {
581
+ if (expValEquals('platform_editor_vc90_transition_expand_icon', 'isEnabled', true)) {
582
582
  this.renderNativeIcon(node);
583
583
  } else {
584
584
  var _expandedState$get3;
@@ -6,6 +6,7 @@ import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/
6
6
  import { IconExpand } from '@atlaskit/editor-common/quick-insert';
7
7
  import { createWrapSelectionTransaction } from '@atlaskit/editor-common/utils';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
9
10
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
10
11
  import { toggleExpandRange } from '../editor-commands/toggleExpandRange';
11
12
  import { createExpandBlockMenuItem } from '../ui/ExpandBlockMenuItem';
@@ -59,6 +60,12 @@ export var expandPlugin = function expandPlugin(_ref) {
59
60
  },
60
61
  toggleExpandRange: toggleExpandRange
61
62
  },
63
+ getSharedState: function getSharedState() {
64
+ var _options$allowInserti;
65
+ return expValEquals('platform_editor_expand_paste_in_comment_editor', 'isEnabled', true) ? {
66
+ allowInsertion: (_options$allowInserti = options === null || options === void 0 ? void 0 : options.allowInsertion) !== null && _options$allowInserti !== void 0 ? _options$allowInserti : true
67
+ } : undefined;
68
+ },
62
69
  pmPlugins: function pmPlugins() {
63
70
  return [{
64
71
  name: 'expand',
@@ -20,6 +20,9 @@ export type ExpandPluginAction = {
20
20
  };
21
21
  type: 'SET_EXPAND_REF';
22
22
  };
23
+ export type ExpandPluginSharedState = {
24
+ allowInsertion?: boolean;
25
+ } | undefined;
23
26
  export type InsertMethod = INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.INSERT_MENU;
24
27
  export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
25
28
  /**
@@ -64,10 +67,6 @@ export type ExpandPlugin = NextEditorPlugin<'expand', {
64
67
  insertExpandWithInputMethod: ReturnType<typeof insertExpandWithInputMethod>;
65
68
  };
66
69
  commands: {
67
- /**
68
- * Toggle the expand or nested expand node open
69
- */
70
- toggleExpandWithMatch: (selection: Selection) => EditorCommand;
71
70
  /**
72
71
  * Expand or collapse a range of expand nodes. With no parameters
73
72
  *
@@ -96,7 +95,12 @@ export type ExpandPlugin = NextEditorPlugin<'expand', {
96
95
  * ```
97
96
  */
98
97
  toggleExpandRange: (from?: number, to?: number, open?: boolean) => EditorCommand;
98
+ /**
99
+ * Toggle the expand or nested expand node open
100
+ */
101
+ toggleExpandWithMatch: (selection: Selection) => EditorCommand;
99
102
  };
100
103
  dependencies: ExpandPluginDependencies;
101
104
  pluginConfiguration: ExpandPluginOptions | undefined;
105
+ sharedState: ExpandPluginSharedState;
102
106
  }>;
@@ -20,6 +20,9 @@ export type ExpandPluginAction = {
20
20
  };
21
21
  type: 'SET_EXPAND_REF';
22
22
  };
23
+ export type ExpandPluginSharedState = {
24
+ allowInsertion?: boolean;
25
+ } | undefined;
23
26
  export type InsertMethod = INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.INSERT_MENU;
24
27
  export interface ExpandPluginOptions extends LongPressSelectionPluginOptions {
25
28
  /**
@@ -64,10 +67,6 @@ export type ExpandPlugin = NextEditorPlugin<'expand', {
64
67
  insertExpandWithInputMethod: ReturnType<typeof insertExpandWithInputMethod>;
65
68
  };
66
69
  commands: {
67
- /**
68
- * Toggle the expand or nested expand node open
69
- */
70
- toggleExpandWithMatch: (selection: Selection) => EditorCommand;
71
70
  /**
72
71
  * Expand or collapse a range of expand nodes. With no parameters
73
72
  *
@@ -96,7 +95,12 @@ export type ExpandPlugin = NextEditorPlugin<'expand', {
96
95
  * ```
97
96
  */
98
97
  toggleExpandRange: (from?: number, to?: number, open?: boolean) => EditorCommand;
98
+ /**
99
+ * Toggle the expand or nested expand node open
100
+ */
101
+ toggleExpandWithMatch: (selection: Selection) => EditorCommand;
99
102
  };
100
103
  dependencies: ExpandPluginDependencies;
101
104
  pluginConfiguration: ExpandPluginOptions | undefined;
105
+ sharedState: ExpandPluginSharedState;
102
106
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-expand",
3
- "version": "8.3.8",
3
+ "version": "8.4.1",
4
4
  "description": "Expand plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -29,8 +29,8 @@
29
29
  ],
30
30
  "atlaskit:src": "src/index.ts",
31
31
  "dependencies": {
32
- "@atlaskit/adf-schema": "^52.0.0",
33
- "@atlaskit/button": "^23.9.0",
32
+ "@atlaskit/adf-schema": "^52.1.0",
33
+ "@atlaskit/button": "^23.10.0",
34
34
  "@atlaskit/editor-plugin-analytics": "^7.0.0",
35
35
  "@atlaskit/editor-plugin-block-menu": "^6.1.0",
36
36
  "@atlaskit/editor-plugin-decorations": "^7.0.0",
@@ -47,7 +47,7 @@
47
47
  "@atlaskit/icon-lab": "^5.17.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
49
  "@atlaskit/prosemirror-history": "^0.2.0",
50
- "@atlaskit/tmp-editor-statsig": "^32.0.0",
50
+ "@atlaskit/tmp-editor-statsig": "^32.10.0",
51
51
  "@atlaskit/tokens": "^11.0.0",
52
52
  "@atlaskit/tooltip": "^20.14.0",
53
53
  "@babel/runtime": "^7.0.0",
@@ -56,7 +56,7 @@
56
56
  "w3c-keyname": "^2.1.8"
57
57
  },
58
58
  "peerDependencies": {
59
- "@atlaskit/editor-common": "^111.20.0",
59
+ "@atlaskit/editor-common": "^111.24.0",
60
60
  "react": "^18.2.0",
61
61
  "react-dom": "^18.2.0",
62
62
  "react-intl-next": "npm:react-intl@^5.18.1"