@atlaskit/editor-plugin-block-menu 9.0.18 → 9.1.0
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 +17 -0
- package/dist/cjs/editor-commands/transform-node-utils/TRANSFORMATION_MATRIX.js +5 -5
- package/dist/cjs/editor-commands/transform-node-utils/{unwrapExpandStep.js → steps/unwrapExpandStep.js} +1 -1
- package/dist/cjs/editor-commands/transform-node-utils/{wrapIntoListStep.js → steps/wrapIntoListStep.js} +2 -2
- package/dist/cjs/editor-commands/transform-node-utils/{wrapStep.js → steps/wrapStep.js} +2 -2
- package/dist/cjs/editor-commands/transform-node-utils/utils.js +4 -1
- package/dist/cjs/editor-commands/transformNode.js +1 -1
- package/dist/es2019/editor-commands/transform-node-utils/TRANSFORMATION_MATRIX.js +5 -6
- package/dist/es2019/editor-commands/transform-node-utils/{unwrapExpandStep.js → steps/unwrapExpandStep.js} +1 -1
- package/dist/es2019/editor-commands/transform-node-utils/{wrapIntoListStep.js → steps/wrapIntoListStep.js} +2 -2
- package/dist/es2019/editor-commands/transform-node-utils/{wrapStep.js → steps/wrapStep.js} +2 -2
- package/dist/es2019/editor-commands/transform-node-utils/utils.js +3 -0
- package/dist/es2019/editor-commands/transformNode.js +1 -1
- package/dist/esm/editor-commands/transform-node-utils/TRANSFORMATION_MATRIX.js +5 -6
- package/dist/esm/editor-commands/transform-node-utils/{unwrapExpandStep.js → steps/unwrapExpandStep.js} +1 -1
- package/dist/esm/editor-commands/transform-node-utils/{wrapIntoListStep.js → steps/wrapIntoListStep.js} +2 -2
- package/dist/esm/editor-commands/transform-node-utils/{wrapStep.js → steps/wrapStep.js} +2 -2
- package/dist/esm/editor-commands/transform-node-utils/utils.js +3 -0
- package/dist/esm/editor-commands/transformNode.js +1 -1
- package/dist/types/blockMenuPluginType.d.ts +1 -1
- package/dist/types/editor-commands/selection.d.ts +1 -1
- package/dist/types/editor-commands/transform-node-utils/{flattenStep.d.ts → steps/flattenStep.d.ts} +1 -1
- package/dist/types/editor-commands/transform-node-utils/{unwrapExpandStep.d.ts → steps/unwrapExpandStep.d.ts} +1 -1
- package/dist/types/editor-commands/transform-node-utils/{unwrapStep.d.ts → steps/unwrapStep.d.ts} +1 -1
- package/dist/{types-ts4.5/editor-commands/transform-node-utils → types/editor-commands/transform-node-utils/steps}/wrapIntoListStep.d.ts +1 -1
- package/dist/types/editor-commands/transform-node-utils/{wrapStep.d.ts → steps/wrapStep.d.ts} +1 -1
- package/dist/types/editor-commands/transform-node-utils/utils.d.ts +1 -0
- package/dist/types/editor-commands/transformNode.d.ts +1 -1
- package/dist/{types-ts4.5/editor-commands/transforms → types/editor-commands}/types.d.ts +0 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types-ts4.5/blockMenuPluginType.d.ts +1 -1
- package/dist/types-ts4.5/editor-commands/selection.d.ts +1 -1
- package/dist/types-ts4.5/editor-commands/transform-node-utils/{flattenStep.d.ts → steps/flattenStep.d.ts} +1 -1
- package/dist/types-ts4.5/editor-commands/transform-node-utils/{unwrapExpandStep.d.ts → steps/unwrapExpandStep.d.ts} +1 -1
- package/dist/types-ts4.5/editor-commands/transform-node-utils/{unwrapStep.d.ts → steps/unwrapStep.d.ts} +1 -1
- package/dist/{types/editor-commands/transform-node-utils → types-ts4.5/editor-commands/transform-node-utils/steps}/wrapIntoListStep.d.ts +1 -1
- package/dist/types-ts4.5/editor-commands/transform-node-utils/{wrapStep.d.ts → steps/wrapStep.d.ts} +1 -1
- package/dist/types-ts4.5/editor-commands/transform-node-utils/utils.d.ts +1 -0
- package/dist/types-ts4.5/editor-commands/transformNode.d.ts +1 -1
- package/dist/{types/editor-commands/transforms → types-ts4.5/editor-commands}/types.d.ts +0 -3
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/package.json +4 -4
- package/dist/cjs/editor-commands/transforms/block-transforms.js +0 -55
- package/dist/cjs/editor-commands/transforms/container-transforms.js +0 -448
- package/dist/cjs/editor-commands/transforms/inline-node-transforms.js +0 -39
- package/dist/cjs/editor-commands/transforms/layout/utils.js +0 -355
- package/dist/cjs/editor-commands/transforms/layout-transforms.js +0 -79
- package/dist/cjs/editor-commands/transforms/list/transformOrderedUnorderedListToBlockNodes.js +0 -97
- package/dist/cjs/editor-commands/transforms/list/transformTaskListToBlockNodes.js +0 -59
- package/dist/cjs/editor-commands/transforms/list/transformToTaskList.js +0 -44
- package/dist/cjs/editor-commands/transforms/list-transforms.js +0 -161
- package/dist/cjs/editor-commands/transforms/transformNodeToTargetType.js +0 -77
- package/dist/cjs/editor-commands/transforms/utils.js +0 -260
- package/dist/es2019/editor-commands/transforms/block-transforms.js +0 -58
- package/dist/es2019/editor-commands/transforms/container-transforms.js +0 -449
- package/dist/es2019/editor-commands/transforms/inline-node-transforms.js +0 -33
- package/dist/es2019/editor-commands/transforms/layout/utils.js +0 -334
- package/dist/es2019/editor-commands/transforms/layout-transforms.js +0 -75
- package/dist/es2019/editor-commands/transforms/list/transformOrderedUnorderedListToBlockNodes.js +0 -93
- package/dist/es2019/editor-commands/transforms/list/transformTaskListToBlockNodes.js +0 -47
- package/dist/es2019/editor-commands/transforms/list/transformToTaskList.js +0 -38
- package/dist/es2019/editor-commands/transforms/list-transforms.js +0 -168
- package/dist/es2019/editor-commands/transforms/transformNodeToTargetType.js +0 -76
- package/dist/es2019/editor-commands/transforms/utils.js +0 -248
- package/dist/esm/editor-commands/transforms/block-transforms.js +0 -50
- package/dist/esm/editor-commands/transforms/container-transforms.js +0 -441
- package/dist/esm/editor-commands/transforms/inline-node-transforms.js +0 -33
- package/dist/esm/editor-commands/transforms/layout/utils.js +0 -348
- package/dist/esm/editor-commands/transforms/layout-transforms.js +0 -72
- package/dist/esm/editor-commands/transforms/list/transformOrderedUnorderedListToBlockNodes.js +0 -90
- package/dist/esm/editor-commands/transforms/list/transformTaskListToBlockNodes.js +0 -53
- package/dist/esm/editor-commands/transforms/list/transformToTaskList.js +0 -37
- package/dist/esm/editor-commands/transforms/list-transforms.js +0 -155
- package/dist/esm/editor-commands/transforms/transformNodeToTargetType.js +0 -72
- package/dist/esm/editor-commands/transforms/utils.js +0 -253
- package/dist/types/editor-commands/transforms/block-transforms.d.ts +0 -5
- package/dist/types/editor-commands/transforms/container-transforms.d.ts +0 -20
- package/dist/types/editor-commands/transforms/inline-node-transforms.d.ts +0 -6
- package/dist/types/editor-commands/transforms/layout/utils.d.ts +0 -5
- package/dist/types/editor-commands/transforms/layout-transforms.d.ts +0 -6
- package/dist/types/editor-commands/transforms/list/transformOrderedUnorderedListToBlockNodes.d.ts +0 -3
- package/dist/types/editor-commands/transforms/list/transformTaskListToBlockNodes.d.ts +0 -3
- package/dist/types/editor-commands/transforms/list/transformToTaskList.d.ts +0 -10
- package/dist/types/editor-commands/transforms/list-transforms.d.ts +0 -23
- package/dist/types/editor-commands/transforms/transformNodeToTargetType.d.ts +0 -14
- package/dist/types/editor-commands/transforms/utils.d.ts +0 -45
- package/dist/types-ts4.5/editor-commands/transforms/block-transforms.d.ts +0 -5
- package/dist/types-ts4.5/editor-commands/transforms/container-transforms.d.ts +0 -20
- package/dist/types-ts4.5/editor-commands/transforms/inline-node-transforms.d.ts +0 -6
- package/dist/types-ts4.5/editor-commands/transforms/layout/utils.d.ts +0 -5
- package/dist/types-ts4.5/editor-commands/transforms/layout-transforms.d.ts +0 -6
- package/dist/types-ts4.5/editor-commands/transforms/list/transformOrderedUnorderedListToBlockNodes.d.ts +0 -3
- package/dist/types-ts4.5/editor-commands/transforms/list/transformTaskListToBlockNodes.d.ts +0 -3
- package/dist/types-ts4.5/editor-commands/transforms/list/transformToTaskList.d.ts +0 -10
- package/dist/types-ts4.5/editor-commands/transforms/list-transforms.d.ts +0 -23
- package/dist/types-ts4.5/editor-commands/transforms/transformNodeToTargetType.d.ts +0 -14
- package/dist/types-ts4.5/editor-commands/transforms/utils.d.ts +0 -45
- /package/dist/cjs/editor-commands/transform-node-utils/{flattenStep.js → steps/flattenStep.js} +0 -0
- /package/dist/cjs/editor-commands/transform-node-utils/{unwrapStep.js → steps/unwrapStep.js} +0 -0
- /package/dist/cjs/editor-commands/{transforms/types.js → types.js} +0 -0
- /package/dist/es2019/editor-commands/transform-node-utils/{flattenStep.js → steps/flattenStep.js} +0 -0
- /package/dist/es2019/editor-commands/transform-node-utils/{unwrapStep.js → steps/unwrapStep.js} +0 -0
- /package/dist/es2019/editor-commands/{transforms/types.js → types.js} +0 -0
- /package/dist/esm/editor-commands/transform-node-utils/{flattenStep.js → steps/flattenStep.js} +0 -0
- /package/dist/esm/editor-commands/transform-node-utils/{unwrapStep.js → steps/unwrapStep.js} +0 -0
- /package/dist/esm/editor-commands/{transforms/types.js → types.js} +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { TransformContext } from '@atlaskit/editor-common/transforms';
|
|
2
|
-
import type { NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
export declare const unwrapLayoutNodesToTextNodes: (context: TransformContext, finalTargetNodeType: NodeType) => PMNode[];
|
|
4
|
-
export declare const transformToListNode: (nodes: PMNode[], targetNodeType: NodeType, schema: Schema) => PMNode[];
|
|
5
|
-
export declare const convertUnwrappedLayoutContent: (nodes: PMNode[], targetNodeType: NodeType, schema: Schema, targetAttrs?: TransformContext["targetAttrs"]) => PMNode[];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { TransformContext } from '@atlaskit/editor-common/transforms';
|
|
2
|
-
import { type Mark, type Node as PMNode, type Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
export declare const createDefaultLayoutSection: (schema: Schema, content: PMNode, marks?: readonly Mark[]) => PMNode;
|
|
5
|
-
export declare const convertToLayout: (context: TransformContext) => Transaction;
|
|
6
|
-
export declare const transformLayoutNode: (context: TransformContext) => Transaction;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
/**
|
|
4
|
-
* Transform selection to task list
|
|
5
|
-
* Handles the special structure where taskItem contains text directly (no paragraph wrapper)
|
|
6
|
-
*/
|
|
7
|
-
export declare const transformToTaskList: (tr: Transaction, range: {
|
|
8
|
-
end: number;
|
|
9
|
-
start: number;
|
|
10
|
-
}, targetNodeType: NodeType, targetAttrs: Record<string, unknown> | undefined, nodes: Record<string, NodeType>) => Transaction | null;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { TransformContext } from '@atlaskit/editor-common/transforms';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { TransformFunction } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Transform selection to list type
|
|
6
|
-
*/
|
|
7
|
-
export declare const transformBlockToList: (context: TransformContext) => Transaction | null;
|
|
8
|
-
/**
|
|
9
|
-
* Transform list to block nodes
|
|
10
|
-
*/
|
|
11
|
-
export declare const transformListToBlockNodes: (context: TransformContext) => Transaction | null;
|
|
12
|
-
/**
|
|
13
|
-
* Wraps bulletList, orderedList or taskList in node of container type
|
|
14
|
-
*/
|
|
15
|
-
export declare const transformListToContainer: (context: TransformContext) => Transaction | null;
|
|
16
|
-
/**
|
|
17
|
-
* Transform list nodes
|
|
18
|
-
*/
|
|
19
|
-
export declare const transformListNode: TransformFunction;
|
|
20
|
-
/**
|
|
21
|
-
* Lift list content and convert to block type
|
|
22
|
-
*/
|
|
23
|
-
export declare const liftListToBlockType: () => null;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { TransfromNodeTargetType } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Transforms a source node to the specified target type.
|
|
6
|
-
* Throws errors on failure which should be caught at the command level.
|
|
7
|
-
*
|
|
8
|
-
* @param tr - The transaction to apply transformations to
|
|
9
|
-
* @param sourceNode - The node to transform
|
|
10
|
-
* @param sourcePos - The position of the source node in the document
|
|
11
|
-
* @param targetType - The target node type to transform to
|
|
12
|
-
* @returns The modified transaction if successful, null if transformation is not possible
|
|
13
|
-
*/
|
|
14
|
-
export declare function transformNodeToTargetType(tr: Transaction, sourceNode: PMNode, sourcePos: number, targetType: TransfromNodeTargetType): Transaction | null;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { Mark, Node as PMNode, NodeType, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { TransfromNodeTargetType } from './types';
|
|
4
|
-
export declare const getTargetNodeInfo: (targetType: TransfromNodeTargetType, nodes: Record<string, NodeType>) => {
|
|
5
|
-
attrs?: Record<string, unknown>;
|
|
6
|
-
nodeType: NodeType;
|
|
7
|
-
} | null;
|
|
8
|
-
export declare const isBlockNode: (node: PMNode) => boolean;
|
|
9
|
-
export declare const isHeadingOrParagraphNode: (node: PMNode) => boolean;
|
|
10
|
-
export declare const isListNode: (node: PMNode) => boolean;
|
|
11
|
-
export declare const isContainerNode: (node: PMNode) => boolean;
|
|
12
|
-
export declare const isBlockNodeType: (nodeType: NodeType) => boolean;
|
|
13
|
-
export declare const isListNodeType: (nodeType: NodeType) => boolean;
|
|
14
|
-
export declare const isContainerNodeType: (nodeType: NodeType) => boolean;
|
|
15
|
-
export declare const isLayoutNodeType: (nodeType: NodeType) => boolean;
|
|
16
|
-
export declare const isLayoutNode: (node: PMNode) => boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Check if a node should be extracted as a standalone block node
|
|
19
|
-
* rather than converted to inline content
|
|
20
|
-
*/
|
|
21
|
-
export declare const isBlockNodeForExtraction: (node: PMNode) => boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Get a function that checks if content is supported in the target container type
|
|
24
|
-
*/
|
|
25
|
-
export declare const getContentSupportChecker: (targetNodeType: NodeType) => ((node: PMNode) => boolean);
|
|
26
|
-
/**
|
|
27
|
-
* Convert a node to inline content that can be placed in a paragraph
|
|
28
|
-
*/
|
|
29
|
-
export declare const convertNodeToInlineContent: (node: PMNode, schema: Schema) => PMNode[];
|
|
30
|
-
/**
|
|
31
|
-
* Filter marks from content based on the target node type
|
|
32
|
-
* @param content The content fragment to filter
|
|
33
|
-
* @param targetNodeType The target node type to check against
|
|
34
|
-
* @returns A new fragment with marks filtered for the target node type
|
|
35
|
-
*/
|
|
36
|
-
export declare const filterMarksForTargetNodeType: (content: Fragment, targetNodeType: NodeType) => Fragment;
|
|
37
|
-
/** * Convert content from a code block node into multiple paragraph nodes
|
|
38
|
-
*/
|
|
39
|
-
export declare const convertCodeBlockContentToParagraphs: (codeBlockNode: PMNode, schema: Schema) => PMNode[];
|
|
40
|
-
export declare const getMarksWithBreakout: (sourceNode: PMNode, targetNodeType: NodeType) => readonly Mark[];
|
|
41
|
-
/**
|
|
42
|
-
* Determines the conversion type based on source and target node types
|
|
43
|
-
* This is for analytics use - these types match existing analytics events for consistency
|
|
44
|
-
*/
|
|
45
|
-
export declare const getConversionType: (from: string, to: string) => "blockNodeInserted" | "listInserted" | "listConverted" | "textFormatted" | undefined;
|
/package/dist/cjs/editor-commands/transform-node-utils/{flattenStep.js → steps/flattenStep.js}
RENAMED
|
File without changes
|
/package/dist/cjs/editor-commands/transform-node-utils/{unwrapStep.js → steps/unwrapStep.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/es2019/editor-commands/transform-node-utils/{flattenStep.js → steps/flattenStep.js}
RENAMED
|
File without changes
|
/package/dist/es2019/editor-commands/transform-node-utils/{unwrapStep.js → steps/unwrapStep.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/esm/editor-commands/transform-node-utils/{flattenStep.js → steps/flattenStep.js}
RENAMED
|
File without changes
|
/package/dist/esm/editor-commands/transform-node-utils/{unwrapStep.js → steps/unwrapStep.js}
RENAMED
|
File without changes
|
|
File without changes
|