@atlaskit/editor-plugin-block-menu 7.0.21 → 7.0.23

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,19 @@
1
1
  # @atlaskit/editor-plugin-block-menu
2
2
 
3
+ ## 7.0.23
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 7.0.22
10
+
11
+ ### Patch Changes
12
+
13
+ - [`32a165c38d466`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/32a165c38d466) -
14
+ Add an option to the block menu so that nodes can change width as required
15
+ - Updated dependencies
16
+
3
17
  ## 7.0.21
4
18
 
5
19
  ### Patch Changes
@@ -81,11 +81,13 @@ var blockMenuPlugin = exports.blockMenuPlugin = function blockMenuPlugin(_ref) {
81
81
  }
82
82
  },
83
83
  getSharedState: function getSharedState(editorState) {
84
- var _api$blockControls2, _pluginState$showFlag;
84
+ var _config$useStandardNo, _api$blockControls2, _pluginState$showFlag;
85
+ var useStandardNodeWidth = (_config$useStandardNo = config === null || config === void 0 ? void 0 : config.useStandardNodeWidth) !== null && _config$useStandardNo !== void 0 ? _config$useStandardNo : false;
85
86
  if (!editorState) {
86
87
  return {
87
88
  currentSelectedNodeName: undefined,
88
- showFlag: false
89
+ showFlag: false,
90
+ useStandardNodeWidth: useStandardNodeWidth
89
91
  };
90
92
  }
91
93
 
@@ -97,7 +99,8 @@ var blockMenuPlugin = exports.blockMenuPlugin = function blockMenuPlugin(_ref) {
97
99
  var showFlag = (_pluginState$showFlag = pluginState === null || pluginState === void 0 ? void 0 : pluginState.showFlag) !== null && _pluginState$showFlag !== void 0 ? _pluginState$showFlag : false;
98
100
  return {
99
101
  currentSelectedNodeName: currentSelectedNodeName,
100
- showFlag: showFlag
102
+ showFlag: showFlag,
103
+ useStandardNodeWidth: useStandardNodeWidth
101
104
  };
102
105
  },
103
106
  contentComponent: function contentComponent(_ref2) {
@@ -68,11 +68,13 @@ export const blockMenuPlugin = ({
68
68
  }
69
69
  },
70
70
  getSharedState(editorState) {
71
- var _api$blockControls2, _api$blockControls2$s, _pluginState$showFlag;
71
+ var _config$useStandardNo, _api$blockControls2, _api$blockControls2$s, _pluginState$showFlag;
72
+ const useStandardNodeWidth = (_config$useStandardNo = config === null || config === void 0 ? void 0 : config.useStandardNodeWidth) !== null && _config$useStandardNo !== void 0 ? _config$useStandardNo : false;
72
73
  if (!editorState) {
73
74
  return {
74
75
  currentSelectedNodeName: undefined,
75
- showFlag: false
76
+ showFlag: false,
77
+ useStandardNodeWidth
76
78
  };
77
79
  }
78
80
 
@@ -84,7 +86,8 @@ export const blockMenuPlugin = ({
84
86
  const showFlag = (_pluginState$showFlag = pluginState === null || pluginState === void 0 ? void 0 : pluginState.showFlag) !== null && _pluginState$showFlag !== void 0 ? _pluginState$showFlag : false;
85
87
  return {
86
88
  currentSelectedNodeName,
87
- showFlag
89
+ showFlag,
90
+ useStandardNodeWidth
88
91
  };
89
92
  },
90
93
  contentComponent({
@@ -74,11 +74,13 @@ export var blockMenuPlugin = function blockMenuPlugin(_ref) {
74
74
  }
75
75
  },
76
76
  getSharedState: function getSharedState(editorState) {
77
- var _api$blockControls2, _pluginState$showFlag;
77
+ var _config$useStandardNo, _api$blockControls2, _pluginState$showFlag;
78
+ var useStandardNodeWidth = (_config$useStandardNo = config === null || config === void 0 ? void 0 : config.useStandardNodeWidth) !== null && _config$useStandardNo !== void 0 ? _config$useStandardNo : false;
78
79
  if (!editorState) {
79
80
  return {
80
81
  currentSelectedNodeName: undefined,
81
- showFlag: false
82
+ showFlag: false,
83
+ useStandardNodeWidth: useStandardNodeWidth
82
84
  };
83
85
  }
84
86
 
@@ -90,7 +92,8 @@ export var blockMenuPlugin = function blockMenuPlugin(_ref) {
90
92
  var showFlag = (_pluginState$showFlag = pluginState === null || pluginState === void 0 ? void 0 : pluginState.showFlag) !== null && _pluginState$showFlag !== void 0 ? _pluginState$showFlag : false;
91
93
  return {
92
94
  currentSelectedNodeName: currentSelectedNodeName,
93
- showFlag: showFlag
95
+ showFlag: showFlag,
96
+ useStandardNodeWidth: useStandardNodeWidth
94
97
  };
95
98
  },
96
99
  contentComponent: function contentComponent(_ref2) {
@@ -40,6 +40,13 @@ export type BlockMenuPluginOptions = {
40
40
  * @returns The current link path as a string, or null if no path is available
41
41
  */
42
42
  getLinkPath?: () => string | null;
43
+ /**
44
+ * When true, nodes maintain their standard width without negative margins
45
+ * for block menu compatibility. Used in contexts like Jira issue descriptions
46
+ * where block menu controls need consistent spacing.
47
+ * @default false
48
+ */
49
+ useStandardNodeWidth?: boolean;
43
50
  };
44
51
  export type BlockMenuSharedState = {
45
52
  /**
@@ -51,6 +58,11 @@ export type BlockMenuSharedState = {
51
58
  * Whether to show a flag (e.g. for copy confirmation)
52
59
  */
53
60
  showFlag: FLAG_ID | false;
61
+ /**
62
+ * When true, nodes maintain their standard width without negative margins
63
+ * for block menu compatibility.
64
+ */
65
+ useStandardNodeWidth?: boolean;
54
66
  } | undefined;
55
67
  type WithRank<T> = T & {
56
68
  rank: number;
@@ -40,6 +40,13 @@ export type BlockMenuPluginOptions = {
40
40
  * @returns The current link path as a string, or null if no path is available
41
41
  */
42
42
  getLinkPath?: () => string | null;
43
+ /**
44
+ * When true, nodes maintain their standard width without negative margins
45
+ * for block menu compatibility. Used in contexts like Jira issue descriptions
46
+ * where block menu controls need consistent spacing.
47
+ * @default false
48
+ */
49
+ useStandardNodeWidth?: boolean;
43
50
  };
44
51
  export type BlockMenuSharedState = {
45
52
  /**
@@ -51,6 +58,11 @@ export type BlockMenuSharedState = {
51
58
  * Whether to show a flag (e.g. for copy confirmation)
52
59
  */
53
60
  showFlag: FLAG_ID | false;
61
+ /**
62
+ * When true, nodes maintain their standard width without negative margins
63
+ * for block menu compatibility.
64
+ */
65
+ useStandardNodeWidth?: boolean;
54
66
  } | undefined;
55
67
  type WithRank<T> = T & {
56
68
  rank: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-menu",
3
- "version": "7.0.21",
3
+ "version": "7.0.23",
4
4
  "description": "BlockMenu plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/platform-feature-flags": "^1.1.0",
45
45
  "@atlaskit/primitives": "^18.1.0",
46
46
  "@atlaskit/prosemirror-history": "^0.2.0",
47
- "@atlaskit/tmp-editor-statsig": "^51.0.0",
47
+ "@atlaskit/tmp-editor-statsig": "^52.0.0",
48
48
  "@atlaskit/tokens": "^11.4.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "bind-event-listener": "^3.0.0"