@atlaskit/editor-plugin-block-menu 0.0.9 → 0.0.10
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 +8 -0
- package/dist/types/blockMenuPluginType.d.ts +11 -11
- package/dist/types/ui/block-menu-renderer.d.ts +1 -1
- package/dist/types/ui/block-menu.d.ts +2 -2
- package/dist/types-ts4.5/blockMenuPluginType.d.ts +11 -11
- package/dist/types-ts4.5/ui/block-menu-renderer.d.ts +1 -1
- package/dist/types-ts4.5/ui/block-menu.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-menu
|
|
2
2
|
|
|
3
|
+
## 0.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`265c1bf0cefa4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/265c1bf0cefa4) -
|
|
8
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 0.0.9
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -3,27 +3,27 @@ import type { BlockControlsPlugin } from '@atlaskit/editor-plugin-block-controls
|
|
|
3
3
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
4
4
|
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
|
|
5
5
|
export type BlockMenuPlugin = NextEditorPlugin<'blockMenu', {
|
|
6
|
+
actions: {
|
|
7
|
+
getBlockMenuComponents: () => Array<RegisterBlockMenuComponent>;
|
|
8
|
+
registerBlockMenuComponents: (blockMenuComponents: Array<RegisterBlockMenuComponent>) => void;
|
|
9
|
+
};
|
|
6
10
|
dependencies: [
|
|
7
11
|
OptionalPlugin<BlockControlsPlugin>,
|
|
8
12
|
OptionalPlugin<UserIntentPlugin>,
|
|
9
13
|
OptionalPlugin<SelectionPlugin>
|
|
10
14
|
];
|
|
11
15
|
pluginConfiguration?: BlockMenuPluginOptions;
|
|
12
|
-
actions: {
|
|
13
|
-
registerBlockMenuComponents: (blockMenuComponents: Array<RegisterBlockMenuComponent>) => void;
|
|
14
|
-
getBlockMenuComponents: () => Array<RegisterBlockMenuComponent>;
|
|
15
|
-
};
|
|
16
16
|
}>;
|
|
17
17
|
export type BlockMenuPluginOptions = {
|
|
18
|
+
/**
|
|
19
|
+
* Optional query parameter name used for block-specific URL to create a deep link to specific block
|
|
20
|
+
*/
|
|
21
|
+
blockQueryParam?: string;
|
|
18
22
|
/**
|
|
19
23
|
* Optional function to retrieve the current link path for the editor context.
|
|
20
24
|
* @returns The current link path as a string, or null if no path is available
|
|
21
25
|
*/
|
|
22
26
|
getLinkPath?: () => string | null;
|
|
23
|
-
/**
|
|
24
|
-
* Optional query parameter name used for block-specific URL to create a deep link to specific block
|
|
25
|
-
*/
|
|
26
|
-
blockQueryParam?: string;
|
|
27
27
|
};
|
|
28
28
|
type WithRank<T> = T & {
|
|
29
29
|
rank: number;
|
|
@@ -49,16 +49,16 @@ export type BlockMenuSectionComponent = (props: {
|
|
|
49
49
|
}) => React.ReactNode;
|
|
50
50
|
export type BlockMenuItemComponent = () => React.ReactNode;
|
|
51
51
|
export type RegisterBlockMenuNested = BlockMenuNested & {
|
|
52
|
-
parent: Parent<BlockMenuSection>;
|
|
53
52
|
component?: BlockMenuNestedComponent;
|
|
53
|
+
parent: Parent<BlockMenuSection>;
|
|
54
54
|
};
|
|
55
55
|
export type RegisterBlockMenuSection = BlockMenuSection & {
|
|
56
|
-
rank: number;
|
|
57
56
|
component?: BlockMenuSectionComponent;
|
|
57
|
+
rank: number;
|
|
58
58
|
};
|
|
59
59
|
export type RegisterBlockMenuItem = BlockMenuItem & {
|
|
60
|
-
parent: Parent<BlockMenuSection>;
|
|
61
60
|
component?: BlockMenuItemComponent;
|
|
61
|
+
parent: Parent<BlockMenuSection>;
|
|
62
62
|
};
|
|
63
63
|
export type RegisterBlockMenuComponent = RegisterBlockMenuNested | RegisterBlockMenuSection | RegisterBlockMenuItem;
|
|
64
64
|
export {};
|
|
@@ -9,9 +9,9 @@ type BlockMenuProps = {
|
|
|
9
9
|
* Fallback components used in rendering
|
|
10
10
|
*/
|
|
11
11
|
fallbacks: {
|
|
12
|
+
item: BlockMenuItemComponent;
|
|
12
13
|
nestedMenu: BlockMenuNestedComponent;
|
|
13
14
|
section: BlockMenuSectionComponent;
|
|
14
|
-
item: BlockMenuItemComponent;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
export declare const BlockMenuRenderer: ({ components, fallbacks }: BlockMenuProps) => React.JSX.Element;
|
|
@@ -4,10 +4,10 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
4
4
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { BlockMenuPlugin } from '../blockMenuPluginType';
|
|
6
6
|
type BlockMenuProps = {
|
|
7
|
-
editorView: EditorView | undefined;
|
|
8
7
|
api: ExtractInjectionAPI<BlockMenuPlugin> | undefined;
|
|
9
|
-
mountTo?: HTMLElement;
|
|
10
8
|
boundariesElement?: HTMLElement;
|
|
9
|
+
editorView: EditorView | undefined;
|
|
10
|
+
mountTo?: HTMLElement;
|
|
11
11
|
scrollableElement?: HTMLElement;
|
|
12
12
|
};
|
|
13
13
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<BlockMenuProps & WrappedComponentProps>> & {
|
|
@@ -3,27 +3,27 @@ import type { BlockControlsPlugin } from '@atlaskit/editor-plugin-block-controls
|
|
|
3
3
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
4
4
|
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
|
|
5
5
|
export type BlockMenuPlugin = NextEditorPlugin<'blockMenu', {
|
|
6
|
+
actions: {
|
|
7
|
+
getBlockMenuComponents: () => Array<RegisterBlockMenuComponent>;
|
|
8
|
+
registerBlockMenuComponents: (blockMenuComponents: Array<RegisterBlockMenuComponent>) => void;
|
|
9
|
+
};
|
|
6
10
|
dependencies: [
|
|
7
11
|
OptionalPlugin<BlockControlsPlugin>,
|
|
8
12
|
OptionalPlugin<UserIntentPlugin>,
|
|
9
13
|
OptionalPlugin<SelectionPlugin>
|
|
10
14
|
];
|
|
11
15
|
pluginConfiguration?: BlockMenuPluginOptions;
|
|
12
|
-
actions: {
|
|
13
|
-
registerBlockMenuComponents: (blockMenuComponents: Array<RegisterBlockMenuComponent>) => void;
|
|
14
|
-
getBlockMenuComponents: () => Array<RegisterBlockMenuComponent>;
|
|
15
|
-
};
|
|
16
16
|
}>;
|
|
17
17
|
export type BlockMenuPluginOptions = {
|
|
18
|
+
/**
|
|
19
|
+
* Optional query parameter name used for block-specific URL to create a deep link to specific block
|
|
20
|
+
*/
|
|
21
|
+
blockQueryParam?: string;
|
|
18
22
|
/**
|
|
19
23
|
* Optional function to retrieve the current link path for the editor context.
|
|
20
24
|
* @returns The current link path as a string, or null if no path is available
|
|
21
25
|
*/
|
|
22
26
|
getLinkPath?: () => string | null;
|
|
23
|
-
/**
|
|
24
|
-
* Optional query parameter name used for block-specific URL to create a deep link to specific block
|
|
25
|
-
*/
|
|
26
|
-
blockQueryParam?: string;
|
|
27
27
|
};
|
|
28
28
|
type WithRank<T> = T & {
|
|
29
29
|
rank: number;
|
|
@@ -49,16 +49,16 @@ export type BlockMenuSectionComponent = (props: {
|
|
|
49
49
|
}) => React.ReactNode;
|
|
50
50
|
export type BlockMenuItemComponent = () => React.ReactNode;
|
|
51
51
|
export type RegisterBlockMenuNested = BlockMenuNested & {
|
|
52
|
-
parent: Parent<BlockMenuSection>;
|
|
53
52
|
component?: BlockMenuNestedComponent;
|
|
53
|
+
parent: Parent<BlockMenuSection>;
|
|
54
54
|
};
|
|
55
55
|
export type RegisterBlockMenuSection = BlockMenuSection & {
|
|
56
|
-
rank: number;
|
|
57
56
|
component?: BlockMenuSectionComponent;
|
|
57
|
+
rank: number;
|
|
58
58
|
};
|
|
59
59
|
export type RegisterBlockMenuItem = BlockMenuItem & {
|
|
60
|
-
parent: Parent<BlockMenuSection>;
|
|
61
60
|
component?: BlockMenuItemComponent;
|
|
61
|
+
parent: Parent<BlockMenuSection>;
|
|
62
62
|
};
|
|
63
63
|
export type RegisterBlockMenuComponent = RegisterBlockMenuNested | RegisterBlockMenuSection | RegisterBlockMenuItem;
|
|
64
64
|
export {};
|
|
@@ -9,9 +9,9 @@ type BlockMenuProps = {
|
|
|
9
9
|
* Fallback components used in rendering
|
|
10
10
|
*/
|
|
11
11
|
fallbacks: {
|
|
12
|
+
item: BlockMenuItemComponent;
|
|
12
13
|
nestedMenu: BlockMenuNestedComponent;
|
|
13
14
|
section: BlockMenuSectionComponent;
|
|
14
|
-
item: BlockMenuItemComponent;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
17
|
export declare const BlockMenuRenderer: ({ components, fallbacks }: BlockMenuProps) => React.JSX.Element;
|
|
@@ -4,10 +4,10 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
4
4
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import type { BlockMenuPlugin } from '../blockMenuPluginType';
|
|
6
6
|
type BlockMenuProps = {
|
|
7
|
-
editorView: EditorView | undefined;
|
|
8
7
|
api: ExtractInjectionAPI<BlockMenuPlugin> | undefined;
|
|
9
|
-
mountTo?: HTMLElement;
|
|
10
8
|
boundariesElement?: HTMLElement;
|
|
9
|
+
editorView: EditorView | undefined;
|
|
10
|
+
mountTo?: HTMLElement;
|
|
11
11
|
scrollableElement?: HTMLElement;
|
|
12
12
|
};
|
|
13
13
|
declare const _default: React.FC<import("react-intl-next").WithIntlProps<BlockMenuProps & WrappedComponentProps>> & {
|