@atlaskit/editor-plugin-block-menu 5.1.7 → 5.1.8
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 +10 -0
- package/dist/cjs/editor-commands/transform-node-utils/transform.js +5 -4
- package/dist/cjs/editor-commands/transform-node-utils/wrapMixedContentStep.js +141 -0
- package/dist/cjs/ui/block-menu-components.js +29 -24
- package/dist/cjs/ui/suggested-items-renderer.js +62 -0
- package/dist/cjs/ui/utils/suggested-items-rank.js +0 -41
- package/dist/es2019/editor-commands/transform-node-utils/transform.js +5 -4
- package/dist/es2019/editor-commands/transform-node-utils/wrapMixedContentStep.js +135 -0
- package/dist/es2019/ui/block-menu-components.js +12 -9
- package/dist/es2019/ui/suggested-items-renderer.js +48 -0
- package/dist/es2019/ui/utils/suggested-items-rank.js +17 -110
- package/dist/esm/editor-commands/transform-node-utils/transform.js +5 -4
- package/dist/esm/editor-commands/transform-node-utils/wrapMixedContentStep.js +135 -0
- package/dist/esm/ui/block-menu-components.js +30 -25
- package/dist/esm/ui/suggested-items-renderer.js +54 -0
- package/dist/esm/ui/utils/suggested-items-rank.js +0 -41
- package/dist/types/editor-commands/transform-node-utils/wrapMixedContentStep.d.ts +20 -0
- package/dist/types/ui/suggested-items-renderer.d.ts +8 -0
- package/dist/types/ui/utils/suggested-items-rank.d.ts +0 -36
- package/dist/types-ts4.5/editor-commands/transform-node-utils/wrapMixedContentStep.d.ts +20 -0
- package/dist/types-ts4.5/ui/suggested-items-renderer.d.ts +8 -0
- package/dist/types-ts4.5/ui/utils/suggested-items-rank.d.ts +0 -36
- package/package.json +3 -3
|
@@ -18,22 +18,6 @@ var _TRANSFORM_SUGGESTED_;
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import { TRANSFORM_STRUCTURE_PANEL_MENU_ITEM, TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM, TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM, TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM, TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM, TRANSFORM_HEADINGS_H2_MENU_ITEM, TRANSFORM_HEADINGS_H3_MENU_ITEM, TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM } from '@atlaskit/editor-common/block-menu';
|
|
21
|
-
/**
|
|
22
|
-
* Node type keys that map to ProseMirror node types from the ADF schema.
|
|
23
|
-
* These values must match the NodeTypeName type.
|
|
24
|
-
*
|
|
25
|
-
* TypeScript will enforce that all values are valid NodeTypeName values.
|
|
26
|
-
* If a new node type is added, it must be added to NodeTypeName first.
|
|
27
|
-
*
|
|
28
|
-
* Reference: packages/editor/editor-plugin-block-menu/src/editor-commands/transform-node-utils/types.ts
|
|
29
|
-
*
|
|
30
|
-
* Note: 'heading' represents all heading levels (1-6) as a single node type.
|
|
31
|
-
* The specific level is determined by the node's `attrs.level` property at runtime.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* // Usage:
|
|
35
|
-
* const nodeType = BLOCK_MENU_NODE_TYPES.PARAGRAPH; // Type: "paragraph"
|
|
36
|
-
*/
|
|
37
21
|
export var BLOCK_MENU_NODE_TYPES = {
|
|
38
22
|
PARAGRAPH: 'paragraph',
|
|
39
23
|
EXPAND: 'expand',
|
|
@@ -53,35 +37,10 @@ export var BLOCK_MENU_NODE_TYPES = {
|
|
|
53
37
|
EMBED_CARD: 'embedCard',
|
|
54
38
|
TABLE: 'table'
|
|
55
39
|
};
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Type for node type values extracted from BLOCK_MENU_NODE_TYPES
|
|
59
|
-
*/
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Type for the suggested items rank mapping
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Mapping of source node types to suggested transformation menu items with their ranks.
|
|
67
|
-
* Lower rank number = higher priority in the suggested menu section.
|
|
68
|
-
*/
|
|
69
40
|
export var TRANSFORM_SUGGESTED_ITEMS_RANK = (_TRANSFORM_SUGGESTED_ = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_TRANSFORM_SUGGESTED_, BLOCK_MENU_NODE_TYPES.PARAGRAPH, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 100), TRANSFORM_HEADINGS_H2_MENU_ITEM.key, 200), TRANSFORM_HEADINGS_H3_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.EXPAND, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.BLOCKQUOTE, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.LAYOUT_SECTION, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key, 200), TRANSFORM_HEADINGS_H2_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.PANEL, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.CODE_BLOCK, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.DECISION, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.BULLET_LIST, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_QUOTE_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.ORDERED_LIST, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_BULLETED_LIST_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_TASK_LIST_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.HEADING, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 100), TRANSFORM_HEADINGS_H2_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 300)), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_TRANSFORM_SUGGESTED_, BLOCK_MENU_NODE_TYPES.TASK_LIST, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_NUMBERED_LIST_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.MEDIA_SINGLE, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.EXTENSION, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.BODIED_EXTENSION, _defineProperty(_defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 200), TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key, 300)), BLOCK_MENU_NODE_TYPES.BLOCK_CARD, _defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 200)), BLOCK_MENU_NODE_TYPES.EMBED_CARD, _defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_PANEL_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_PARAGRAPH_MENU_ITEM.key, 200)), BLOCK_MENU_NODE_TYPES.TABLE, _defineProperty(_defineProperty({}, TRANSFORM_STRUCTURE_EXPAND_MENU_ITEM.key, 100), TRANSFORM_STRUCTURE_LAYOUT_MENU_ITEM.key, 200)));
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Get suggested menu items for a given node type
|
|
73
|
-
* @param nodeType - The source node type (e.g., 'paragraph', 'heading')
|
|
74
|
-
* @returns Object mapping menu item keys to their ranks, or undefined if no suggestions
|
|
75
|
-
*/
|
|
76
41
|
export var getSuggestedItemsForNodeType = function getSuggestedItemsForNodeType(nodeType) {
|
|
77
42
|
return TRANSFORM_SUGGESTED_ITEMS_RANK[nodeType];
|
|
78
43
|
};
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Get sorted suggested menu item keys for a given node type
|
|
82
|
-
* @param nodeType - The source node type
|
|
83
|
-
* @returns Array of menu item keys sorted by rank (highest priority first)
|
|
84
|
-
*/
|
|
85
44
|
export var getSortedSuggestedItems = function getSortedSuggestedItems(nodeType) {
|
|
86
45
|
var suggestions = getSuggestedItemsForNodeType(nodeType);
|
|
87
46
|
if (!suggestions) {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TransformStep } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A wrap step that handles mixed content according to the Compatibility Matrix:
|
|
4
|
+
* - Wraps consecutive compatible nodes into the target container
|
|
5
|
+
* - Same-type containers break out as separate containers (preserved as-is)
|
|
6
|
+
* - NestedExpands break out as regular expands (converted since nestedExpand can't exist outside expand)
|
|
7
|
+
* - Container structures that can't be nested in target break out (not flattened)
|
|
8
|
+
* - Text/list nodes that can't be wrapped are flattened and merged into the container
|
|
9
|
+
* - Atomic nodes (tables, media, macros) break out
|
|
10
|
+
*
|
|
11
|
+
* What can be wrapped depends on the target container's schema:
|
|
12
|
+
* - expand → panel: tables break out, nestedExpands convert to expands and break out
|
|
13
|
+
* - expand → blockquote: tables/media break out, nestedExpands convert to expands and break out
|
|
14
|
+
* - expand → expand: tables/media stay inside (expands can contain them)
|
|
15
|
+
*
|
|
16
|
+
* Example: expand(p('a'), table(), p('b')) → panel: [panel(p('a')), table(), panel(p('b'))]
|
|
17
|
+
* Example: expand(p('a'), panel(p('x')), p('b')) → panel: [panel(p('a')), panel(p('x')), panel(p('b'))]
|
|
18
|
+
* Example: expand(p('a'), nestedExpand({title: 'inner'})(p('x')), p('b')) → panel: [panel(p('a')), expand({title: 'inner'})(p('x')), panel(p('b'))]
|
|
19
|
+
*/
|
|
20
|
+
export declare const wrapMixedContentStep: TransformStep;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { BlockMenuPlugin } from '../blockMenuPluginType';
|
|
4
|
+
type SuggestedItemsRendererProps = {
|
|
5
|
+
api: ExtractInjectionAPI<BlockMenuPlugin> | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare const SuggestedItemsRenderer: React.NamedExoticComponent<SuggestedItemsRendererProps>;
|
|
8
|
+
export {};
|
|
@@ -13,22 +13,6 @@
|
|
|
13
13
|
* }
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
16
|
-
/**
|
|
17
|
-
* Node type keys that map to ProseMirror node types from the ADF schema.
|
|
18
|
-
* These values must match the NodeTypeName type.
|
|
19
|
-
*
|
|
20
|
-
* TypeScript will enforce that all values are valid NodeTypeName values.
|
|
21
|
-
* If a new node type is added, it must be added to NodeTypeName first.
|
|
22
|
-
*
|
|
23
|
-
* Reference: packages/editor/editor-plugin-block-menu/src/editor-commands/transform-node-utils/types.ts
|
|
24
|
-
*
|
|
25
|
-
* Note: 'heading' represents all heading levels (1-6) as a single node type.
|
|
26
|
-
* The specific level is determined by the node's `attrs.level` property at runtime.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* // Usage:
|
|
30
|
-
* const nodeType = BLOCK_MENU_NODE_TYPES.PARAGRAPH; // Type: "paragraph"
|
|
31
|
-
*/
|
|
32
16
|
export declare const BLOCK_MENU_NODE_TYPES: {
|
|
33
17
|
readonly PARAGRAPH: "paragraph";
|
|
34
18
|
readonly EXPAND: "expand";
|
|
@@ -48,34 +32,14 @@ export declare const BLOCK_MENU_NODE_TYPES: {
|
|
|
48
32
|
readonly EMBED_CARD: "embedCard";
|
|
49
33
|
readonly TABLE: "table";
|
|
50
34
|
};
|
|
51
|
-
/**
|
|
52
|
-
* Type for node type values extracted from BLOCK_MENU_NODE_TYPES
|
|
53
|
-
*/
|
|
54
35
|
export type BlockMenuNodeType = (typeof BLOCK_MENU_NODE_TYPES)[keyof typeof BLOCK_MENU_NODE_TYPES];
|
|
55
|
-
/**
|
|
56
|
-
* Type for the suggested items rank mapping
|
|
57
|
-
*/
|
|
58
36
|
export type SuggestedItemsRankMap = {
|
|
59
37
|
[nodeType: string]: {
|
|
60
38
|
[menuItemKey: string]: number;
|
|
61
39
|
};
|
|
62
40
|
};
|
|
63
|
-
/**
|
|
64
|
-
* Mapping of source node types to suggested transformation menu items with their ranks.
|
|
65
|
-
* Lower rank number = higher priority in the suggested menu section.
|
|
66
|
-
*/
|
|
67
41
|
export declare const TRANSFORM_SUGGESTED_ITEMS_RANK: SuggestedItemsRankMap;
|
|
68
|
-
/**
|
|
69
|
-
* Get suggested menu items for a given node type
|
|
70
|
-
* @param nodeType - The source node type (e.g., 'paragraph', 'heading')
|
|
71
|
-
* @returns Object mapping menu item keys to their ranks, or undefined if no suggestions
|
|
72
|
-
*/
|
|
73
42
|
export declare const getSuggestedItemsForNodeType: (nodeType: string) => {
|
|
74
43
|
[menuItemKey: string]: number;
|
|
75
44
|
} | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* Get sorted suggested menu item keys for a given node type
|
|
78
|
-
* @param nodeType - The source node type
|
|
79
|
-
* @returns Array of menu item keys sorted by rank (highest priority first)
|
|
80
|
-
*/
|
|
81
45
|
export declare const getSortedSuggestedItems: (nodeType: string) => string[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TransformStep } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* A wrap step that handles mixed content according to the Compatibility Matrix:
|
|
4
|
+
* - Wraps consecutive compatible nodes into the target container
|
|
5
|
+
* - Same-type containers break out as separate containers (preserved as-is)
|
|
6
|
+
* - NestedExpands break out as regular expands (converted since nestedExpand can't exist outside expand)
|
|
7
|
+
* - Container structures that can't be nested in target break out (not flattened)
|
|
8
|
+
* - Text/list nodes that can't be wrapped are flattened and merged into the container
|
|
9
|
+
* - Atomic nodes (tables, media, macros) break out
|
|
10
|
+
*
|
|
11
|
+
* What can be wrapped depends on the target container's schema:
|
|
12
|
+
* - expand → panel: tables break out, nestedExpands convert to expands and break out
|
|
13
|
+
* - expand → blockquote: tables/media break out, nestedExpands convert to expands and break out
|
|
14
|
+
* - expand → expand: tables/media stay inside (expands can contain them)
|
|
15
|
+
*
|
|
16
|
+
* Example: expand(p('a'), table(), p('b')) → panel: [panel(p('a')), table(), panel(p('b'))]
|
|
17
|
+
* Example: expand(p('a'), panel(p('x')), p('b')) → panel: [panel(p('a')), panel(p('x')), panel(p('b'))]
|
|
18
|
+
* Example: expand(p('a'), nestedExpand({title: 'inner'})(p('x')), p('b')) → panel: [panel(p('a')), expand({title: 'inner'})(p('x')), panel(p('b'))]
|
|
19
|
+
*/
|
|
20
|
+
export declare const wrapMixedContentStep: TransformStep;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { BlockMenuPlugin } from '../blockMenuPluginType';
|
|
4
|
+
type SuggestedItemsRendererProps = {
|
|
5
|
+
api: ExtractInjectionAPI<BlockMenuPlugin> | undefined;
|
|
6
|
+
};
|
|
7
|
+
export declare const SuggestedItemsRenderer: React.NamedExoticComponent<SuggestedItemsRendererProps>;
|
|
8
|
+
export {};
|
|
@@ -13,22 +13,6 @@
|
|
|
13
13
|
* }
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
16
|
-
/**
|
|
17
|
-
* Node type keys that map to ProseMirror node types from the ADF schema.
|
|
18
|
-
* These values must match the NodeTypeName type.
|
|
19
|
-
*
|
|
20
|
-
* TypeScript will enforce that all values are valid NodeTypeName values.
|
|
21
|
-
* If a new node type is added, it must be added to NodeTypeName first.
|
|
22
|
-
*
|
|
23
|
-
* Reference: packages/editor/editor-plugin-block-menu/src/editor-commands/transform-node-utils/types.ts
|
|
24
|
-
*
|
|
25
|
-
* Note: 'heading' represents all heading levels (1-6) as a single node type.
|
|
26
|
-
* The specific level is determined by the node's `attrs.level` property at runtime.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* // Usage:
|
|
30
|
-
* const nodeType = BLOCK_MENU_NODE_TYPES.PARAGRAPH; // Type: "paragraph"
|
|
31
|
-
*/
|
|
32
16
|
export declare const BLOCK_MENU_NODE_TYPES: {
|
|
33
17
|
readonly PARAGRAPH: "paragraph";
|
|
34
18
|
readonly EXPAND: "expand";
|
|
@@ -48,34 +32,14 @@ export declare const BLOCK_MENU_NODE_TYPES: {
|
|
|
48
32
|
readonly EMBED_CARD: "embedCard";
|
|
49
33
|
readonly TABLE: "table";
|
|
50
34
|
};
|
|
51
|
-
/**
|
|
52
|
-
* Type for node type values extracted from BLOCK_MENU_NODE_TYPES
|
|
53
|
-
*/
|
|
54
35
|
export type BlockMenuNodeType = (typeof BLOCK_MENU_NODE_TYPES)[keyof typeof BLOCK_MENU_NODE_TYPES];
|
|
55
|
-
/**
|
|
56
|
-
* Type for the suggested items rank mapping
|
|
57
|
-
*/
|
|
58
36
|
export type SuggestedItemsRankMap = {
|
|
59
37
|
[nodeType: string]: {
|
|
60
38
|
[menuItemKey: string]: number;
|
|
61
39
|
};
|
|
62
40
|
};
|
|
63
|
-
/**
|
|
64
|
-
* Mapping of source node types to suggested transformation menu items with their ranks.
|
|
65
|
-
* Lower rank number = higher priority in the suggested menu section.
|
|
66
|
-
*/
|
|
67
41
|
export declare const TRANSFORM_SUGGESTED_ITEMS_RANK: SuggestedItemsRankMap;
|
|
68
|
-
/**
|
|
69
|
-
* Get suggested menu items for a given node type
|
|
70
|
-
* @param nodeType - The source node type (e.g., 'paragraph', 'heading')
|
|
71
|
-
* @returns Object mapping menu item keys to their ranks, or undefined if no suggestions
|
|
72
|
-
*/
|
|
73
42
|
export declare const getSuggestedItemsForNodeType: (nodeType: string) => {
|
|
74
43
|
[menuItemKey: string]: number;
|
|
75
44
|
} | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* Get sorted suggested menu item keys for a given node type
|
|
78
|
-
* @param nodeType - The source node type
|
|
79
|
-
* @returns Array of menu item keys sorted by rank (highest priority first)
|
|
80
|
-
*/
|
|
81
45
|
export declare const getSortedSuggestedItems: (nodeType: string) => string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-menu",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.8",
|
|
4
4
|
"description": "BlockMenu plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
46
46
|
"@atlaskit/primitives": "^16.4.0",
|
|
47
|
-
"@atlaskit/tmp-editor-statsig": "^14.
|
|
47
|
+
"@atlaskit/tmp-editor-statsig": "^14.8.0",
|
|
48
48
|
"@atlaskit/tokens": "^8.4.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@atlaskit/editor-common": "^110.
|
|
52
|
+
"@atlaskit/editor-common": "^110.40.0",
|
|
53
53
|
"react": "^18.2.0",
|
|
54
54
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
55
55
|
},
|