@atlaskit/editor-plugin-block-menu 10.1.14 → 10.1.16
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 +12 -0
- package/blockMenuPlugin/package.json +1 -8
- package/blockMenuPluginType/package.json +1 -8
- package/package.json +2 -2
- package/types/package.json +1 -8
- package/dist/types-ts4.5/blockMenuPlugin.d.ts +0 -2
- package/dist/types-ts4.5/blockMenuPluginType.d.ts +0 -125
- package/dist/types-ts4.5/editor-actions/index.d.ts +0 -52
- package/dist/types-ts4.5/editor-actions/isTransformToTargetDisabled.d.ts +0 -11
- package/dist/types-ts4.5/editor-commands/selection.d.ts +0 -10
- package/dist/types-ts4.5/editor-commands/transform-node-utils/TRANSFORMATION_MATRIX.d.ts +0 -5
- package/dist/types-ts4.5/editor-commands/transform-node-utils/marks.d.ts +0 -9
- package/dist/types-ts4.5/editor-commands/transform-node-utils/nodeChecks.d.ts +0 -17
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/applyTargetTextTypeStep.d.ts +0 -23
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/convertEachNodeStep.d.ts +0 -2
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/decisionListToListStep.d.ts +0 -30
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/flattenListStep.d.ts +0 -29
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/flattenStep.d.ts +0 -2
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/listToDecisionListStep.d.ts +0 -25
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/listToListStep.d.ts +0 -65
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/mergeNeighbourListsStep.d.ts +0 -32
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/unwrapExpandStep.d.ts +0 -13
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/unwrapLayoutStep.d.ts +0 -14
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/unwrapListStep.d.ts +0 -25
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/unwrapStep.d.ts +0 -2
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/wrapBlockquoteToDecisionListStep.d.ts +0 -15
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/wrapIntoListStep.d.ts +0 -9
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/wrapMixedContentStep.d.ts +0 -39
- package/dist/types-ts4.5/editor-commands/transform-node-utils/steps/wrapStep.d.ts +0 -10
- package/dist/types-ts4.5/editor-commands/transform-node-utils/transform.d.ts +0 -29
- package/dist/types-ts4.5/editor-commands/transform-node-utils/types.d.ts +0 -14
- package/dist/types-ts4.5/editor-commands/transform-node-utils/utils.d.ts +0 -39
- package/dist/types-ts4.5/editor-commands/transformNode.d.ts +0 -5
- package/dist/types-ts4.5/editor-commands/types.d.ts +0 -8
- package/dist/types-ts4.5/entry-points/blockMenuPlugin.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/blockMenuPluginType.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/experiences/block-menu-experiences.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/experiences/experience-check-utils.d.ts +0 -65
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/utils/shouldSuppressKeyboardEvent.d.ts +0 -14
- package/dist/types-ts4.5/ui/MenuSection.d.ts +0 -9
- package/dist/types-ts4.5/ui/block-menu-components.d.ts +0 -6
- package/dist/types-ts4.5/ui/block-menu-provider.d.ts +0 -24
- package/dist/types-ts4.5/ui/block-menu-renderer/BlockMenuComponent.d.ts +0 -11
- package/dist/types-ts4.5/ui/block-menu-renderer/BlockMenuComponents.d.ts +0 -12
- package/dist/types-ts4.5/ui/block-menu-renderer/BlockMenuRenderer.d.ts +0 -12
- package/dist/types-ts4.5/ui/block-menu-renderer/fallbacks.d.ts +0 -2
- package/dist/types-ts4.5/ui/block-menu-renderer/types.d.ts +0 -27
- package/dist/types-ts4.5/ui/block-menu-renderer/utils.d.ts +0 -36
- package/dist/types-ts4.5/ui/block-menu.d.ts +0 -16
- package/dist/types-ts4.5/ui/consts.d.ts +0 -11
- package/dist/types-ts4.5/ui/copy-link.d.ts +0 -12
- package/dist/types-ts4.5/ui/copy-section.d.ts +0 -4
- package/dist/types-ts4.5/ui/delete-button.d.ts +0 -11
- package/dist/types-ts4.5/ui/delete-section.d.ts +0 -4
- package/dist/types-ts4.5/ui/flag.d.ts +0 -8
- package/dist/types-ts4.5/ui/format-menu-nested.d.ts +0 -7
- package/dist/types-ts4.5/ui/format-menu-section.d.ts +0 -7
- package/dist/types-ts4.5/ui/hooks/useSuggestedItems.d.ts +0 -3
- package/dist/types-ts4.5/ui/move-down.d.ts +0 -11
- package/dist/types-ts4.5/ui/move-up.d.ts +0 -11
- package/dist/types-ts4.5/ui/suggested-items-menu-section.d.ts +0 -9
- package/dist/types-ts4.5/ui/suggested-menu-items.d.ts +0 -8
- package/dist/types-ts4.5/ui/utils/checkHasPreviousSectionContent.d.ts +0 -26
- package/dist/types-ts4.5/ui/utils/checkIsFormatMenuHidden.d.ts +0 -3
- package/dist/types-ts4.5/ui/utils/copyLink.d.ts +0 -8
- package/dist/types-ts4.5/ui/utils/createMenuItemsMap.d.ts +0 -6
- package/dist/types-ts4.5/ui/utils/fixBlockMenuPositionAndScroll.d.ts +0 -1
- package/dist/types-ts4.5/ui/utils/getSuggestedItemsFromSelection.d.ts +0 -6
- package/dist/types-ts4.5/ui/utils/isNestedNode.d.ts +0 -14
- package/dist/types-ts4.5/ui/utils/suggested-items-rank.d.ts +0 -46
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { BlockMenuPlugin, RegisterBlockMenuItem } from '../../blockMenuPluginType';
|
|
3
|
-
/**
|
|
4
|
-
* Helper function to create menu items map from block menu components.
|
|
5
|
-
*/
|
|
6
|
-
export declare const createMenuItemsMap: (blockMenuComponents: ReturnType<ExtractInjectionAPI<BlockMenuPlugin>["blockMenu"]["actions"]["getBlockMenuComponents"]> | undefined) => Map<string, RegisterBlockMenuItem>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const fixBlockMenuPositionAndScroll: (firstSelectedNode: Element | undefined) => void;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { RegisterBlockMenuItem } from '../../blockMenuPluginType';
|
|
3
|
-
/**
|
|
4
|
-
* Pure function to calculate suggested items based on selection and menu components.
|
|
5
|
-
*/
|
|
6
|
-
export declare const getSuggestedItemsFromSelection: (menuItemsMap: Map<string, RegisterBlockMenuItem>, currentSelection: Selection | null | undefined) => RegisterBlockMenuItem[];
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
/**
|
|
3
|
-
* Determines if a node is nested (not at top-level) based on its depth and context.
|
|
4
|
-
*
|
|
5
|
-
* Simple rules:
|
|
6
|
-
* - Depth 0-1: Always top-level (not nested)
|
|
7
|
-
* - Depth 2: Top-level for blockquotes and task lists
|
|
8
|
-
* - Depth 3: Top-level for list items only
|
|
9
|
-
* - Depth 4+: Always nested
|
|
10
|
-
*
|
|
11
|
-
* @param selection - The current ProseMirror selection
|
|
12
|
-
* @returns true if nested, false if top-level
|
|
13
|
-
*/
|
|
14
|
-
export declare const isNestedNode: (selection: Selection | undefined, menuTriggerBy: string) => boolean;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Suggested transformations mapping for each block type.
|
|
3
|
-
* Based on the Block Menu Compatibility Matrix:
|
|
4
|
-
* https://hello.atlassian.net/wiki/spaces/egcuc/pages/5868774224/Block+Menu+Compatibility+Matrix#Suggested-for-each-block-type
|
|
5
|
-
*
|
|
6
|
-
* This mapping defines which transform items should appear in the TRANSFORM_SUGGESTED_MENU_SECTION
|
|
7
|
-
* for each block type, ranked by priority (lower rank = higher priority).
|
|
8
|
-
*
|
|
9
|
-
* Structure:
|
|
10
|
-
* {
|
|
11
|
-
* [sourceNodeType]: {
|
|
12
|
-
* [targetMenuItemKey]: rank
|
|
13
|
-
* }
|
|
14
|
-
* }
|
|
15
|
-
*/
|
|
16
|
-
import type { NodeTypeName } from '../../editor-commands/transform-node-utils/types';
|
|
17
|
-
export declare const BLOCK_MENU_NODE_TYPES: {
|
|
18
|
-
readonly PARAGRAPH: NodeTypeName;
|
|
19
|
-
readonly EXPAND: NodeTypeName;
|
|
20
|
-
readonly BLOCKQUOTE: NodeTypeName;
|
|
21
|
-
readonly LAYOUT_SECTION: NodeTypeName;
|
|
22
|
-
readonly PANEL: NodeTypeName;
|
|
23
|
-
readonly CODE_BLOCK: NodeTypeName;
|
|
24
|
-
readonly DECISION: NodeTypeName;
|
|
25
|
-
readonly BULLET_LIST: NodeTypeName;
|
|
26
|
-
readonly ORDERED_LIST: NodeTypeName;
|
|
27
|
-
readonly HEADING: NodeTypeName;
|
|
28
|
-
readonly TASK_LIST: NodeTypeName;
|
|
29
|
-
readonly MEDIA_SINGLE: NodeTypeName;
|
|
30
|
-
readonly EXTENSION: NodeTypeName;
|
|
31
|
-
readonly BODIED_EXTENSION: NodeTypeName;
|
|
32
|
-
readonly BLOCK_CARD: NodeTypeName;
|
|
33
|
-
readonly EMBED_CARD: NodeTypeName;
|
|
34
|
-
readonly TABLE: NodeTypeName;
|
|
35
|
-
};
|
|
36
|
-
export type BlockMenuNodeType = (typeof BLOCK_MENU_NODE_TYPES)[keyof typeof BLOCK_MENU_NODE_TYPES];
|
|
37
|
-
export type SuggestedItemsRankMap = {
|
|
38
|
-
[nodeType: string]: {
|
|
39
|
-
[menuItemKey: string]: number;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export declare const TRANSFORM_SUGGESTED_ITEMS_RANK: SuggestedItemsRankMap;
|
|
43
|
-
export declare const getSuggestedItemsForNodeType: (nodeType: string) => {
|
|
44
|
-
[menuItemKey: string]: number;
|
|
45
|
-
} | undefined;
|
|
46
|
-
export declare const getSortedSuggestedItems: (nodeType: string) => string[];
|