@atlaskit/editor-plugin-block-type 15.0.15 → 16.0.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 +32 -0
- package/ToolbarBlockType/package.json +1 -8
- package/block-type/package.json +1 -8
- package/block-types/package.json +1 -8
- package/blockTypePlugin/package.json +1 -8
- package/blockTypePluginType/package.json +1 -8
- package/consts/block-types/package.json +1 -8
- package/consts/package.json +1 -8
- package/main/package.json +1 -8
- package/package.json +25 -33
- package/types/package.json +1 -8
- package/dist/types-ts4.5/blockTypePlugin.d.ts +0 -3
- package/dist/types-ts4.5/blockTypePluginType.d.ts +0 -38
- package/dist/types-ts4.5/entry-points/ToolbarBlockType.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/block-type.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/block-types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/blockTypePlugin.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/blockTypePluginType.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/consts-block-types.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/main.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 -7
- package/dist/types-ts4.5/pm-plugins/block-types.d.ts +0 -38
- package/dist/types-ts4.5/pm-plugins/commands/block-type.d.ts +0 -25
- package/dist/types-ts4.5/pm-plugins/commands/clear-formatting.d.ts +0 -8
- package/dist/types-ts4.5/pm-plugins/commands/delete-and-move-cursor.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/commands/delete-block-content.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/commands/wrapSelectionIn.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/consts.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/input-rule.d.ts +0 -6
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -15
- package/dist/types-ts4.5/pm-plugins/types.d.ts +0 -39
- package/dist/types-ts4.5/pm-plugins/ui/FloatingToolbarComponent.d.ts +0 -8
- package/dist/types-ts4.5/pm-plugins/ui/PrimaryToolbarComponent.d.ts +0 -15
- package/dist/types-ts4.5/pm-plugins/ui/ToolbarBlockType/HeadingButton.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/ui/ToolbarBlockType/QuoteButton.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/ui/ToolbarBlockType/TextStylesMenuButton.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/ui/ToolbarBlockType/blocktype-button.d.ts +0 -22
- package/dist/types-ts4.5/pm-plugins/ui/ToolbarBlockType/icons.d.ts +0 -8
- package/dist/types-ts4.5/pm-plugins/ui/ToolbarBlockType/index.d.ts +0 -46
- package/dist/types-ts4.5/pm-plugins/ui/ToolbarBlockType/styled.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/ui/toolbar-components.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/utils.d.ts +0 -53
- package/dist/types-ts4.5/ui/HeadingBlockMenuItem.d.ts +0 -9
- package/dist/types-ts4.5/ui/ParagraphBlockMenuItem.d.ts +0 -8
- package/dist/types-ts4.5/ui/QuoteBlockMenuItem.d.ts +0 -12
- package/dist/types-ts4.5/ui/consts.d.ts +0 -1
- package/dist/types-ts4.5/ui/index.d.ts +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
|
2
2
|
|
|
3
|
+
## 16.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
29
|
+
## 15.0.16
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
|
|
3
35
|
## 15.0.15
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/ToolbarBlockType.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/ToolbarBlockType.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/ToolbarBlockType.d.ts"
|
|
17
10
|
}
|
package/block-type/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/block-type.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/block-type.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/block-type.d.ts"
|
|
17
10
|
}
|
package/block-types/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/block-types.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/block-types.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/block-types.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/blockTypePlugin.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/blockTypePlugin.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/blockTypePlugin.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/blockTypePluginType.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/blockTypePluginType.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/blockTypePluginType.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../../dist/types/entry-points/consts-block-types.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../../dist/types-ts4.5/entry-points/consts-block-types.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../../dist/types/entry-points/consts-block-types.d.ts"
|
|
17
10
|
}
|
package/consts/package.json
CHANGED
package/main/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/main.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/main.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/main.d.ts"
|
|
17
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -16,48 +16,40 @@
|
|
|
16
16
|
"module": "dist/esm/index.js",
|
|
17
17
|
"module:es2019": "dist/es2019/index.js",
|
|
18
18
|
"types": "dist/types/index.d.ts",
|
|
19
|
-
"typesVersions": {
|
|
20
|
-
">=4.5 <4.9": {
|
|
21
|
-
"*": [
|
|
22
|
-
"dist/types-ts4.5/*",
|
|
23
|
-
"dist/types-ts4.5/index.d.ts"
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
19
|
"sideEffects": [
|
|
28
20
|
"*.compiled.css"
|
|
29
21
|
],
|
|
30
22
|
"atlaskit:src": "src/index.ts",
|
|
31
23
|
"dependencies": {
|
|
32
|
-
"@atlaskit/adf-schema": "^
|
|
33
|
-
"@atlaskit/css": "^0.
|
|
34
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
35
|
-
"@atlaskit/editor-plugin-block-menu": "^
|
|
36
|
-
"@atlaskit/editor-plugin-interaction": "^
|
|
37
|
-
"@atlaskit/editor-plugin-list": "^
|
|
38
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
39
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
40
|
-
"@atlaskit/editor-plugin-selection-toolbar": "^
|
|
41
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
42
|
-
"@atlaskit/editor-prosemirror": "^
|
|
43
|
-
"@atlaskit/editor-shared-styles": "^
|
|
44
|
-
"@atlaskit/editor-tables": "^
|
|
45
|
-
"@atlaskit/editor-toolbar": "^
|
|
46
|
-
"@atlaskit/editor-toolbar-model": "^0.
|
|
47
|
-
"@atlaskit/icon": "^
|
|
48
|
-
"@atlaskit/icon-lab": "^
|
|
49
|
-
"@atlaskit/platform-feature-flags": "^
|
|
50
|
-
"@atlaskit/primitives": "^
|
|
51
|
-
"@atlaskit/prosemirror-history": "^0.
|
|
52
|
-
"@atlaskit/prosemirror-input-rules": "^
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
54
|
-
"@atlaskit/tokens": "^
|
|
24
|
+
"@atlaskit/adf-schema": "^55.0.0",
|
|
25
|
+
"@atlaskit/css": "^1.0.0",
|
|
26
|
+
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
27
|
+
"@atlaskit/editor-plugin-block-menu": "^11.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-interaction": "^21.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-list": "^14.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^13.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-selection": "^12.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-selection-toolbar": "^13.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-toolbar": "^9.0.0",
|
|
34
|
+
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
35
|
+
"@atlaskit/editor-shared-styles": "^4.0.0",
|
|
36
|
+
"@atlaskit/editor-tables": "^3.0.0",
|
|
37
|
+
"@atlaskit/editor-toolbar": "^2.0.0",
|
|
38
|
+
"@atlaskit/editor-toolbar-model": "^1.0.0",
|
|
39
|
+
"@atlaskit/icon": "^36.0.0",
|
|
40
|
+
"@atlaskit/icon-lab": "^7.0.0",
|
|
41
|
+
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
42
|
+
"@atlaskit/primitives": "^20.0.0",
|
|
43
|
+
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
44
|
+
"@atlaskit/prosemirror-input-rules": "^4.0.0",
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^104.0.0",
|
|
46
|
+
"@atlaskit/tokens": "^14.0.0",
|
|
55
47
|
"@babel/runtime": "^7.0.0",
|
|
56
48
|
"@compiled/react": "^0.20.0",
|
|
57
49
|
"@emotion/react": "^11.7.1"
|
|
58
50
|
},
|
|
59
51
|
"peerDependencies": {
|
|
60
|
-
"@atlaskit/editor-common": "^
|
|
52
|
+
"@atlaskit/editor-common": "^116.0.0",
|
|
61
53
|
"react": "^18.2.0",
|
|
62
54
|
"react-dom": "^18.2.0",
|
|
63
55
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
package/types/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/types.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/types.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/types.d.ts"
|
|
17
10
|
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { _MarkdownModePluginStub, Command, EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
-
import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu';
|
|
4
|
-
import type { InteractionPlugin } from '@atlaskit/editor-plugin-interaction';
|
|
5
|
-
import type { ListPlugin } from '@atlaskit/editor-plugin-list';
|
|
6
|
-
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
7
|
-
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
8
|
-
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
9
|
-
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
|
|
10
|
-
import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
|
|
11
|
-
import type { TextBlockTypes } from './pm-plugins/block-types';
|
|
12
|
-
import type { ClearFormattingInputMethod, InputMethod } from './pm-plugins/commands/block-type';
|
|
13
|
-
import type { BlockTypeState } from './pm-plugins/main';
|
|
14
|
-
import type { BlockTypePluginOptions } from './pm-plugins/types';
|
|
15
|
-
export type BlockTypePlugin = NextEditorPlugin<'blockType', {
|
|
16
|
-
actions: {
|
|
17
|
-
insertBlockQuote: (inputMethod: InputMethod) => Command;
|
|
18
|
-
};
|
|
19
|
-
commands: {
|
|
20
|
-
clearFormatting: (inputMethod: ClearFormattingInputMethod) => EditorCommand;
|
|
21
|
-
insertBlockQuote: (inputMethod: InputMethod) => EditorCommand;
|
|
22
|
-
setTextLevel: (level: TextBlockTypes, inputMethod: InputMethod, fromBlockQuote?: boolean) => EditorCommand;
|
|
23
|
-
};
|
|
24
|
-
dependencies: [
|
|
25
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
26
|
-
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
27
|
-
OptionalPlugin<SelectionToolbarPlugin>,
|
|
28
|
-
OptionalPlugin<UserPreferencesPlugin>,
|
|
29
|
-
OptionalPlugin<ToolbarPlugin>,
|
|
30
|
-
OptionalPlugin<BlockMenuPlugin>,
|
|
31
|
-
OptionalPlugin<ListPlugin>,
|
|
32
|
-
OptionalPlugin<SelectionPlugin>,
|
|
33
|
-
OptionalPlugin<InteractionPlugin>,
|
|
34
|
-
OptionalPlugin<_MarkdownModePluginStub>
|
|
35
|
-
];
|
|
36
|
-
pluginConfiguration: BlockTypePluginOptions | undefined;
|
|
37
|
-
sharedState: BlockTypeState | undefined;
|
|
38
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { DropdownItem } from '../pm-plugins/ui/ToolbarBlockType/index';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { InputMethod, ClearFormattingInputMethod } from '../pm-plugins/commands/block-type';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { TextBlockTypes } from '../pm-plugins/block-types';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { blockTypePlugin } from '../blockTypePlugin';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { BlockTypePlugin } from '../blockTypePluginType';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, NORMAL_TEXT, PANEL, } from '../pm-plugins/block-types';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { BlockTypeState } from '../pm-plugins/main';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { BlockTypePluginOptions, BlockType } from '../pm-plugins/types';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { blockTypePlugin } from './blockTypePlugin';
|
|
2
|
-
export type { BlockTypePlugin } from './blockTypePluginType';
|
|
3
|
-
export type { BlockTypePluginOptions, BlockType } from './pm-plugins/types';
|
|
4
|
-
export type { BlockTypeState } from './pm-plugins/main';
|
|
5
|
-
export type { InputMethod, ClearFormattingInputMethod } from './pm-plugins/commands/block-type';
|
|
6
|
-
export type { DropdownItem } from './pm-plugins/ui/ToolbarBlockType';
|
|
7
|
-
export type { TextBlockTypes } from './pm-plugins/block-types';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { BlockType, BlockTypeWithRank } from './types';
|
|
2
|
-
export declare const NORMAL_TEXT: BlockType;
|
|
3
|
-
export declare const SMALL_TEXT: BlockType;
|
|
4
|
-
export declare const HEADING_1: BlockType;
|
|
5
|
-
export declare const HEADING_2: BlockType;
|
|
6
|
-
export declare const HEADING_3: BlockType;
|
|
7
|
-
export declare const HEADING_4: BlockType;
|
|
8
|
-
export declare const HEADING_5: BlockType;
|
|
9
|
-
export declare const HEADING_6: BlockType;
|
|
10
|
-
export declare const BLOCK_QUOTE: BlockType;
|
|
11
|
-
export declare const CODE_BLOCK: BlockType;
|
|
12
|
-
export declare const PANEL: BlockType;
|
|
13
|
-
export declare const OTHER: BlockType;
|
|
14
|
-
export declare const TEXT_BLOCK_TYPES: BlockType[];
|
|
15
|
-
declare enum ToolbarBlockTypes {
|
|
16
|
-
normal = "normal",
|
|
17
|
-
heading1 = "heading1",
|
|
18
|
-
heading2 = "heading2",
|
|
19
|
-
heading3 = "heading3",
|
|
20
|
-
heading4 = "heading4",
|
|
21
|
-
heading5 = "heading5",
|
|
22
|
-
heading6 = "heading6",
|
|
23
|
-
blockquote = "blockquote"
|
|
24
|
-
}
|
|
25
|
-
export declare const toolbarBlockTypesWithRank: ({ allowFontSize, }: {
|
|
26
|
-
allowFontSize?: boolean;
|
|
27
|
-
}) => Record<ToolbarBlockTypes, BlockTypeWithRank>;
|
|
28
|
-
export type TextBlockTypes = 'normal' | 'smallText' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6';
|
|
29
|
-
export declare const FORMATTING_NODE_TYPES: string[];
|
|
30
|
-
export declare const FORMATTING_MARK_TYPES: string[];
|
|
31
|
-
export declare const WRAPPER_BLOCK_TYPES: BlockType[];
|
|
32
|
-
export declare const ALL_BLOCK_TYPES: BlockType[];
|
|
33
|
-
export declare const getBlockTypesInDropdown: (includeBlockQuoteAsTextstyleOption?: boolean) => BlockType[];
|
|
34
|
-
export declare const HEADINGS_BY_LEVEL: Record<number, BlockType>;
|
|
35
|
-
export declare const HEADINGS_BY_NAME: {
|
|
36
|
-
[blockType: string]: BlockType;
|
|
37
|
-
};
|
|
38
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { Command, EditorCommand, HeadingLevelsAndNormalText } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { TextBlockTypes } from '../block-types';
|
|
4
|
-
export type InputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FORMATTING | INPUT_METHOD.KEYBOARD | INPUT_METHOD.FLOATING_TB;
|
|
5
|
-
export type ClearFormattingInputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.SHORTCUT | INPUT_METHOD.FLOATING_TB;
|
|
6
|
-
export declare function setBlockType(name: TextBlockTypes): EditorCommand;
|
|
7
|
-
export declare function setHeading(level: HeadingLevelsAndNormalText, fromBlockQuote?: boolean): EditorCommand;
|
|
8
|
-
export declare function setBlockTypeWithAnalytics(name: TextBlockTypes, inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined, fromBlockQuote?: boolean): EditorCommand;
|
|
9
|
-
export declare function setSmallText(fromBlockQuote?: boolean): EditorCommand;
|
|
10
|
-
export declare function setSmallTextWithAnalytics(inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined, fromBlockQuote?: boolean): EditorCommand;
|
|
11
|
-
export declare function setNormalText(fromBlockQuote?: boolean): EditorCommand;
|
|
12
|
-
export declare function clearFormatting(inputMethod: ClearFormattingInputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined): EditorCommand;
|
|
13
|
-
export declare function setNormalTextWithAnalytics(inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined, fromBlockQuote?: boolean): EditorCommand;
|
|
14
|
-
export declare const setHeadingWithAnalytics: (newHeadingLevel: HeadingLevelsAndNormalText, inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined, fromBlockQuote?: boolean) => EditorCommand;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @param name - block type name
|
|
18
|
-
* @param inputMethod - input method
|
|
19
|
-
* @param editorAnalyticsApi - analytics api, undefined if not available either because it failed to load or wasn't added
|
|
20
|
-
* otherwise Editor becomes very sad and crashes
|
|
21
|
-
* @returns - command that inserts block type
|
|
22
|
-
*/
|
|
23
|
-
export declare const insertBlockQuoteWithAnalytics: (inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
24
|
-
export declare function insertBlockQuoteWithAnalyticsCommand(inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined): EditorCommand;
|
|
25
|
-
export declare const cleanUpAtTheStartOfDocument: Command;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Node, NodeType, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
4
|
-
export declare const FORMATTING_NODE_TYPES: string[];
|
|
5
|
-
export declare const FORMATTING_MARK_TYPES: string[];
|
|
6
|
-
export declare const formatTypes: Record<string, string>;
|
|
7
|
-
export declare const cellSelectionNodesBetween: (selection: CellSelection, doc: Node, f: (node: Node, pos: number, parent: Node | null, index: number) => void | boolean, startPos?: number) => void;
|
|
8
|
-
export declare function clearNodeFormattingOnSelection(schema: Schema, tr: Transaction, formattedNodeType: NodeType, nodeName: string, formattingCleared: string[]): (node: Node, pos: number) => boolean;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
|
-
/**
|
|
3
|
-
* Fixes cursor position after delete for list/task in panel and table
|
|
4
|
-
*
|
|
5
|
-
* ED-13873 fixes a bug where after deleting a list the cursor would move
|
|
6
|
-
* to the cell to the right. Uses setSelection to position the cursor as expected after deleting.
|
|
7
|
-
*
|
|
8
|
-
* @param state EditorState
|
|
9
|
-
* @param dispatch CommandDispatch
|
|
10
|
-
* @returns boolean
|
|
11
|
-
*/
|
|
12
|
-
export declare const deleteAndMoveCursor: Command;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
/**
|
|
4
|
-
* Prevent removing the block when deleting block content
|
|
5
|
-
*
|
|
6
|
-
* @param state EditorState
|
|
7
|
-
* @param dispatch CommandDispatch
|
|
8
|
-
* @returns boolean
|
|
9
|
-
*/
|
|
10
|
-
export declare function deleteBlockContent(isNodeAWrappingBlockNode: (node?: PMNode | null) => boolean): Command;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
declare function inputRulePlugin(editorAnalyticsAPI: EditorAnalyticsAPI | undefined, schema: Schema, featureFlags: FeatureFlags): SafePlugin | undefined;
|
|
6
|
-
export default inputRulePlugin;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
export default function keymapPlugin(editorAnalyticsApi: EditorAnalyticsAPI | undefined, schema: Schema, _featureFlags: FeatureFlags): SafePlugin;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { BlockTypePlugin } from '../blockTypePluginType';
|
|
5
|
-
import type { BlockType } from './types';
|
|
6
|
-
export type BlockTypeState = {
|
|
7
|
-
availableBlockTypes: BlockType[];
|
|
8
|
-
availableBlockTypesInDropdown: BlockType[];
|
|
9
|
-
availableWrapperBlockTypes: BlockType[];
|
|
10
|
-
blockTypesDisabled: boolean;
|
|
11
|
-
currentBlockType: BlockType;
|
|
12
|
-
formattingIsPresent?: boolean;
|
|
13
|
-
};
|
|
14
|
-
export declare const pluginKey: PluginKey<BlockTypeState>;
|
|
15
|
-
export declare const createPlugin: (editorAPI: ExtractInjectionAPI<BlockTypePlugin> | undefined, dispatch: (eventName: string | PluginKey, data: any) => void, lastNodeMustBeParagraph?: boolean, includeBlockQuoteAsTextstyleOption?: boolean, allowFontSize?: boolean) => SafePlugin<BlockTypeState>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ReactElement } from 'react';
|
|
2
|
-
import type { MessageDescriptor } from 'react-intl';
|
|
3
|
-
import type { AllowedBlockTypes, HeadingLevelsAndNormalText } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { NodeSpec } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
export type BlockTypeName = 'normal' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'blockquote' | 'codeblock' | 'panel' | 'notePanel' | 'successPanel' | 'warningPanel' | 'errorPanel' | 'other';
|
|
6
|
-
export interface BlockType {
|
|
7
|
-
icon?: ReactElement;
|
|
8
|
-
LEGACY_icon?: ReactElement;
|
|
9
|
-
level?: HeadingLevelsAndNormalText;
|
|
10
|
-
markName?: string;
|
|
11
|
-
name: string;
|
|
12
|
-
nodeName: string;
|
|
13
|
-
tagName?: string;
|
|
14
|
-
title: MessageDescriptor;
|
|
15
|
-
}
|
|
16
|
-
export interface BlockTypeWithRank extends BlockType {
|
|
17
|
-
toolbarKey: string;
|
|
18
|
-
toolbarRank: number;
|
|
19
|
-
}
|
|
20
|
-
export interface BlockTypeNode {
|
|
21
|
-
name: AllowedBlockTypes;
|
|
22
|
-
node: NodeSpec;
|
|
23
|
-
}
|
|
24
|
-
export interface BlockTypePluginOptions {
|
|
25
|
-
allowBlockType?: {
|
|
26
|
-
exclude?: Array<AllowedBlockTypes>;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Add ability to toggle paragraph size variations.
|
|
30
|
-
*
|
|
31
|
-
* Note: Feature is in development and logic is under an experiment.
|
|
32
|
-
* Note: `fontSize` mark must be supported in the ADF schema for this feature to work.
|
|
33
|
-
* Note: To support fontSize variatons in tasks, allowBlockTaskItem must be enabled for tasksAndDecisionsPlugin
|
|
34
|
-
*/
|
|
35
|
-
allowFontSize?: boolean;
|
|
36
|
-
includeBlockQuoteAsTextstyleOption?: boolean;
|
|
37
|
-
isUndoRedoButtonsEnabled?: boolean;
|
|
38
|
-
lastNodeMustBeParagraph?: boolean;
|
|
39
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { BlockTypePlugin } from '../../blockTypePluginType';
|
|
4
|
-
interface FloatingToolbarComponentProps {
|
|
5
|
-
api: ExtractInjectionAPI<BlockTypePlugin> | undefined;
|
|
6
|
-
}
|
|
7
|
-
export declare function FloatingToolbarComponent({ api, }: FloatingToolbarComponentProps): React.JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { BlockTypePlugin } from '../../blockTypePluginType';
|
|
4
|
-
interface PrimaryToolbarComponentProps {
|
|
5
|
-
api: ExtractInjectionAPI<BlockTypePlugin> | undefined;
|
|
6
|
-
disabled: boolean;
|
|
7
|
-
isSmall: boolean;
|
|
8
|
-
isToolbarReducedSpacing: boolean;
|
|
9
|
-
popupsBoundariesElement?: HTMLElement;
|
|
10
|
-
popupsMountPoint?: HTMLElement;
|
|
11
|
-
popupsScrollableElement?: HTMLElement;
|
|
12
|
-
shouldUseDefaultRole: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare function PrimaryToolbarComponent({ api, isSmall, disabled, isToolbarReducedSpacing, popupsMountPoint, popupsBoundariesElement, popupsScrollableElement, shouldUseDefaultRole, }: PrimaryToolbarComponentProps): React.JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { BlockTypePlugin } from '../../../blockTypePluginType';
|
|
3
|
-
import type { BlockTypeWithRank } from '../../types';
|
|
4
|
-
type HeadingButtonProps = {
|
|
5
|
-
api?: ExtractInjectionAPI<BlockTypePlugin>;
|
|
6
|
-
blockType: BlockTypeWithRank;
|
|
7
|
-
};
|
|
8
|
-
export declare const HeadingButton: ({ blockType, api }: HeadingButtonProps) => React.JSX.Element | null;
|
|
9
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { BlockTypePlugin } from '../../../blockTypePluginType';
|
|
4
|
-
import type { BlockTypeWithRank } from '../../types';
|
|
5
|
-
type QuoteButtonProps = {
|
|
6
|
-
api?: ExtractInjectionAPI<BlockTypePlugin>;
|
|
7
|
-
blockType: BlockTypeWithRank;
|
|
8
|
-
};
|
|
9
|
-
export declare const QuoteButton: ({ blockType, api }: QuoteButtonProps) => React.JSX.Element | null;
|
|
10
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { BlockTypePlugin } from '../../../blockTypePluginType';
|
|
4
|
-
type TextStylesMenuButtonProps = {
|
|
5
|
-
allowFontSize?: boolean;
|
|
6
|
-
api?: ExtractInjectionAPI<BlockTypePlugin>;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
};
|
|
9
|
-
export declare const TextStylesMenuButton: ({ allowFontSize, api, children, }: TextStylesMenuButtonProps) => React.JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { ReactElement } from 'react';
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
8
|
-
import type { MessageDescriptor, WrappedComponentProps } from 'react-intl';
|
|
9
|
-
export interface BlockTypeButtonProps {
|
|
10
|
-
'aria-expanded': React.AriaAttributes['aria-expanded'];
|
|
11
|
-
blockTypeIcon?: ReactElement;
|
|
12
|
-
blockTypeName?: string;
|
|
13
|
-
disabled: boolean;
|
|
14
|
-
formatMessage: WrappedComponentProps['intl']['formatMessage'];
|
|
15
|
-
isReducedSpacing?: boolean;
|
|
16
|
-
isSmall?: boolean;
|
|
17
|
-
onClick(e: React.MouseEvent): void;
|
|
18
|
-
onKeyDown(e: React.KeyboardEvent): void;
|
|
19
|
-
selected: boolean;
|
|
20
|
-
title: MessageDescriptor;
|
|
21
|
-
}
|
|
22
|
-
export declare const BlockTypeButton: (props: BlockTypeButtonProps) => jsx.JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const Text: () => React.JSX.Element;
|
|
3
|
-
export declare const H1: () => React.JSX.Element;
|
|
4
|
-
export declare const H2: () => React.JSX.Element;
|
|
5
|
-
export declare const H3: () => React.JSX.Element;
|
|
6
|
-
export declare const H4: () => React.JSX.Element;
|
|
7
|
-
export declare const H5: () => React.JSX.Element;
|
|
8
|
-
export declare const H6: () => React.JSX.Element;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
7
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
-
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
9
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
-
import { ThemeMutationObserver } from '@atlaskit/tokens';
|
|
11
|
-
import type { ThemeState } from '@atlaskit/tokens';
|
|
12
|
-
import type { BlockTypePlugin } from '../../../blockTypePluginType';
|
|
13
|
-
import type { TextBlockTypes } from '../../block-types';
|
|
14
|
-
import type { BlockType } from '../../types';
|
|
15
|
-
export type DropdownItem = MenuItem & {
|
|
16
|
-
value: BlockType;
|
|
17
|
-
};
|
|
18
|
-
export interface Props {
|
|
19
|
-
api: ExtractInjectionAPI<BlockTypePlugin> | undefined;
|
|
20
|
-
availableBlockTypes?: BlockType[];
|
|
21
|
-
availableBlockTypesInDropdown?: BlockType[];
|
|
22
|
-
blockTypesDisabled?: boolean;
|
|
23
|
-
clearFormatting: () => void;
|
|
24
|
-
currentBlockType?: BlockType;
|
|
25
|
-
editorView?: EditorView;
|
|
26
|
-
formattingIsPresent?: boolean;
|
|
27
|
-
isDisabled?: boolean;
|
|
28
|
-
isReducedSpacing?: boolean;
|
|
29
|
-
isSmall?: boolean;
|
|
30
|
-
popupsBoundariesElement?: HTMLElement;
|
|
31
|
-
popupsMountPoint?: HTMLElement;
|
|
32
|
-
popupsScrollableElement?: HTMLElement;
|
|
33
|
-
setTextLevel: (type: TextBlockTypes, fromBlockQuote?: boolean) => void;
|
|
34
|
-
shouldUseDefaultRole?: boolean;
|
|
35
|
-
wrapBlockQuote: (type: TextBlockTypes) => void;
|
|
36
|
-
}
|
|
37
|
-
export interface State {
|
|
38
|
-
active: boolean;
|
|
39
|
-
isOpenedByKeyboard: boolean;
|
|
40
|
-
observer: ThemeMutationObserver | null;
|
|
41
|
-
typographyTheme?: ThemeState['typography'];
|
|
42
|
-
}
|
|
43
|
-
declare const _default_1: React.FC<WithIntlProps<Props & WrappedComponentProps>> & {
|
|
44
|
-
WrappedComponent: React.ComponentType<Props & WrappedComponentProps>;
|
|
45
|
-
};
|
|
46
|
-
export default _default_1;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type SerializedStyles } from '@emotion/react';
|
|
6
|
-
import { type ThemeState } from '@atlaskit/tokens';
|
|
7
|
-
export declare const blockTypeMenuItemStyle: (tagName: string, selected?: boolean, typographyTheme?: ThemeState["typography"]) => () => SerializedStyles;
|
|
8
|
-
export declare const keyboardShortcut: SerializedStyles;
|
|
9
|
-
export declare const keyboardShortcutSelect: SerializedStyles;
|
|
10
|
-
export declare const wrapperSmallStyle: SerializedStyles;
|
|
11
|
-
export declare const expandIconWrapperStyle: SerializedStyles;
|
|
12
|
-
export declare const floatingToolbarWrapperStyle: SerializedStyles;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
3
|
-
import type { BlockTypePlugin } from '../../blockTypePluginType';
|
|
4
|
-
export declare const getToolbarComponents: (api?: ExtractInjectionAPI<BlockTypePlugin>, allowFontSize?: boolean) => RegisterComponent[];
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { InputRuleWrapper } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { BlockType } from './types';
|
|
5
|
-
export declare const isNodeAWrappingBlockNode: (node?: PMNode | null) => boolean;
|
|
6
|
-
export declare const createJoinNodesRule: (match: RegExp, nodeType: NodeType) => InputRuleWrapper;
|
|
7
|
-
type WrappingTextRuleProps = {
|
|
8
|
-
getAttrs?: Record<string, any> | ((matchResult: RegExpExecArray) => Record<string, any>);
|
|
9
|
-
match: RegExp;
|
|
10
|
-
nodeType: NodeType;
|
|
11
|
-
};
|
|
12
|
-
export declare const createWrappingTextBlockRule: ({ match, nodeType, getAttrs, }: WrappingTextRuleProps) => InputRuleWrapper;
|
|
13
|
-
/**
|
|
14
|
-
* Function will check if changing block types: Paragraph, Heading is enabled.
|
|
15
|
-
*/
|
|
16
|
-
export declare function areBlockTypesDisabled(state: EditorState, allowFontSize?: boolean): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Checks if the current selection is inside a list node (bulletList, orderedList, or taskList).
|
|
19
|
-
* Used to determine which text styles should be enabled when the small font size experiment is active.
|
|
20
|
-
*/
|
|
21
|
-
export declare function isSelectionInsideListNode(state: EditorState): boolean;
|
|
22
|
-
export declare function isSelectionInsideBlockquote(state: EditorState): boolean;
|
|
23
|
-
export declare const checkFormattingIsPresent: (state: EditorState) => boolean;
|
|
24
|
-
export declare const hasBlockQuoteInOptions: (dropdownOptions: BlockType[]) => boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Returns a { from, to } range that extends the selection boundaries outward
|
|
27
|
-
* to include the entirety of any list nodes at either end. If the selection
|
|
28
|
-
* start is inside a list, `from` is pulled back to the list's start; if the
|
|
29
|
-
* selection end is inside a list, `to` is pushed forward to the list's end.
|
|
30
|
-
* Non-list content in the middle is included as-is.
|
|
31
|
-
*/
|
|
32
|
-
export declare function getSelectionRangeExpandedToLists(tr: Transaction): {
|
|
33
|
-
from: number;
|
|
34
|
-
to: number;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Converts all taskItem nodes within the given range to blockTaskItem nodes.
|
|
38
|
-
*
|
|
39
|
-
* taskItem nodes contain inline content directly, which cannot hold block-level
|
|
40
|
-
* marks like fontSize. blockTaskItem nodes wrap content in paragraphs, which can
|
|
41
|
-
* hold block marks. This conversion is needed when applying small text formatting
|
|
42
|
-
* to task lists.
|
|
43
|
-
*
|
|
44
|
-
* The inline content of each taskItem is wrapped in a paragraph node, and the
|
|
45
|
-
* taskItem is replaced with a blockTaskItem that preserves the original attributes
|
|
46
|
-
* (localId, state).
|
|
47
|
-
*
|
|
48
|
-
* Collects taskItem positions in a forward pass over the unmutated document,
|
|
49
|
-
* then applies replacements in reverse document order so positions remain valid
|
|
50
|
-
* without needing remapping or doc snapshots.
|
|
51
|
-
*/
|
|
52
|
-
export declare function convertTaskItemsToBlockTaskItems(tr: Transaction, from: number, to: number): void;
|
|
53
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { BlockTypePlugin } from '../blockTypePluginType';
|
|
4
|
-
type HeadingBlockMenuItemProps = {
|
|
5
|
-
api: ExtractInjectionAPI<BlockTypePlugin> | undefined;
|
|
6
|
-
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
|
-
};
|
|
8
|
-
export declare const createHeadingBlockMenuItem: ({ level, api }: HeadingBlockMenuItemProps) => () => React.JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { BlockTypePlugin } from '../blockTypePluginType';
|
|
4
|
-
type ParagraphBlockMenuItemProps = {
|
|
5
|
-
api: ExtractInjectionAPI<BlockTypePlugin> | undefined;
|
|
6
|
-
};
|
|
7
|
-
export declare const createParagraphBlockMenuItem: ({ api }: ParagraphBlockMenuItemProps) => () => React.JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
|
-
import type { BlockTypePlugin } from '../blockTypePluginType';
|
|
8
|
-
type QuoteBlockMenuItemProps = {
|
|
9
|
-
api: ExtractInjectionAPI<BlockTypePlugin> | undefined;
|
|
10
|
-
};
|
|
11
|
-
export declare const createQuoteBlockMenuItem: ({ api }: QuoteBlockMenuItemProps) => () => React.JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, NORMAL_TEXT, PANEL, } from '../pm-plugins/block-types';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { RegisterBlockMenuComponent } from '@atlaskit/editor-plugin-block-menu';
|
|
3
|
-
import type { BlockTypePlugin } from '../blockTypePluginType';
|
|
4
|
-
export declare const getBlockTypeComponents: (api: ExtractInjectionAPI<BlockTypePlugin> | undefined) => RegisterBlockMenuComponent[];
|