@atlaskit/editor-plugin-insert-block 4.1.7 → 4.2.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 +11 -0
- package/dist/cjs/insertBlockPlugin.js +15 -5
- package/dist/cjs/ui/toolbar-components/EmojiButton.js +132 -0
- package/dist/cjs/ui/toolbar-components/ImageButton.js +47 -0
- package/dist/cjs/ui/toolbar-components/LayoutButton.js +39 -0
- package/dist/cjs/ui/toolbar-components/MediaButton.js +71 -0
- package/dist/cjs/ui/toolbar-components/MentionButton.js +46 -0
- package/dist/cjs/ui/toolbar-components/TableButton.js +52 -0
- package/dist/cjs/ui/toolbar-components/TableSizePicker.js +83 -0
- package/dist/cjs/ui/toolbar-components/TaskListButton.js +40 -0
- package/dist/cjs/ui/toolbar-components/utils/utils.js +12 -0
- package/dist/cjs/ui/toolbar-components.js +172 -0
- package/dist/es2019/insertBlockPlugin.js +15 -5
- package/dist/es2019/ui/toolbar-components/EmojiButton.js +120 -0
- package/dist/es2019/ui/toolbar-components/ImageButton.js +46 -0
- package/dist/es2019/ui/toolbar-components/LayoutButton.js +37 -0
- package/dist/es2019/ui/toolbar-components/MediaButton.js +66 -0
- package/dist/es2019/ui/toolbar-components/MentionButton.js +42 -0
- package/dist/es2019/ui/toolbar-components/TableButton.js +50 -0
- package/dist/es2019/ui/toolbar-components/TableSizePicker.js +70 -0
- package/dist/es2019/ui/toolbar-components/TaskListButton.js +38 -0
- package/dist/es2019/ui/toolbar-components/utils/utils.js +4 -0
- package/dist/es2019/ui/toolbar-components.js +152 -0
- package/dist/esm/insertBlockPlugin.js +15 -5
- package/dist/esm/ui/toolbar-components/EmojiButton.js +123 -0
- package/dist/esm/ui/toolbar-components/ImageButton.js +40 -0
- package/dist/esm/ui/toolbar-components/LayoutButton.js +32 -0
- package/dist/esm/ui/toolbar-components/MediaButton.js +63 -0
- package/dist/esm/ui/toolbar-components/MentionButton.js +39 -0
- package/dist/esm/ui/toolbar-components/TableButton.js +45 -0
- package/dist/esm/ui/toolbar-components/TableSizePicker.js +74 -0
- package/dist/esm/ui/toolbar-components/TaskListButton.js +33 -0
- package/dist/esm/ui/toolbar-components/utils/utils.js +6 -0
- package/dist/esm/ui/toolbar-components.js +165 -0
- package/dist/types/types/index.d.ts +3 -1
- package/dist/types/ui/toolbar-components/EmojiButton.d.ts +8 -0
- package/dist/types/ui/toolbar-components/ImageButton.d.ts +8 -0
- package/dist/types/ui/toolbar-components/LayoutButton.d.ts +8 -0
- package/dist/types/ui/toolbar-components/MediaButton.d.ts +8 -0
- package/dist/types/ui/toolbar-components/MentionButton.d.ts +8 -0
- package/dist/types/ui/toolbar-components/TableButton.d.ts +8 -0
- package/dist/types/ui/toolbar-components/TableSizePicker.d.ts +9 -0
- package/dist/types/ui/toolbar-components/TaskListButton.d.ts +8 -0
- package/dist/types/ui/toolbar-components/utils/utils.d.ts +4 -0
- package/dist/types/ui/toolbar-components.d.ts +9 -0
- package/dist/types-ts4.5/types/index.d.ts +3 -1
- package/dist/types-ts4.5/ui/toolbar-components/EmojiButton.d.ts +8 -0
- package/dist/types-ts4.5/ui/toolbar-components/ImageButton.d.ts +8 -0
- package/dist/types-ts4.5/ui/toolbar-components/LayoutButton.d.ts +8 -0
- package/dist/types-ts4.5/ui/toolbar-components/MediaButton.d.ts +8 -0
- package/dist/types-ts4.5/ui/toolbar-components/MentionButton.d.ts +8 -0
- package/dist/types-ts4.5/ui/toolbar-components/TableButton.d.ts +8 -0
- package/dist/types-ts4.5/ui/toolbar-components/TableSizePicker.d.ts +9 -0
- package/dist/types-ts4.5/ui/toolbar-components/TaskListButton.d.ts +8 -0
- package/dist/types-ts4.5/ui/toolbar-components/utils/utils.d.ts +4 -0
- package/dist/types-ts4.5/ui/toolbar-components.d.ts +9 -0
- package/package.json +6 -3
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl-next';
|
|
3
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
|
+
import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
6
|
+
import { ToolbarButton, ToolbarTooltip, TaskIcon } from '@atlaskit/editor-toolbar';
|
|
7
|
+
export var TaskListButton = function TaskListButton(_ref) {
|
|
8
|
+
var api = _ref.api;
|
|
9
|
+
var _useIntl = useIntl(),
|
|
10
|
+
formatMessage = _useIntl.formatMessage;
|
|
11
|
+
var _useEditorToolbar = useEditorToolbar(),
|
|
12
|
+
editorView = _useEditorToolbar.editorView;
|
|
13
|
+
if (!(editorView !== null && editorView !== void 0 && editorView.state.schema.nodes.taskItem)) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
var onClick = function onClick() {
|
|
17
|
+
if (editorView) {
|
|
18
|
+
var _api$taskDecision;
|
|
19
|
+
var state = editorView.state,
|
|
20
|
+
dispatch = editorView.dispatch;
|
|
21
|
+
api === null || api === void 0 || (_api$taskDecision = api.taskDecision) === null || _api$taskDecision === void 0 || _api$taskDecision.actions.insertTaskDecision('taskList', INPUT_METHOD.TOOLBAR)(state, dispatch);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
25
|
+
content: formatMessage(messages.action)
|
|
26
|
+
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
27
|
+
iconBefore: /*#__PURE__*/React.createElement(TaskIcon, {
|
|
28
|
+
label: formatMessage(messages.action)
|
|
29
|
+
}),
|
|
30
|
+
onClick: onClick,
|
|
31
|
+
ariaKeyshortcuts: "[ ] Space"
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { INSERT_BLOCK_SECTION, TASK_LIST_GROUP, MEDIA_GROUP, TOOLBAR_RANK, TOOLBARS, INSERT_BLOCK_SECTION_RANK, TASK_LIST_BUTTON, TASK_LIST_GROUP_RANK, MEDIA_BUTTON, MENTION_GROUP, MEDIA_GROUP_RANK, MENTION_BUTTON, MENTION_GROUP_RANK, EMOJI_GROUP, EMOJI_BUTTON, EMOJI_GROUP_RANK, LAYOUT_GROUP, LAYOUT_BUTTON, LAYOUT_GROUP_RANK, TABLE_GROUP_RANK, TABLE_BUTTON, TABLE_GROUP, TABLE_SIZE_PICKER } from "@atlaskit/editor-common/toolbar";
|
|
3
|
+
import { EmojiButton } from './toolbar-components/EmojiButton';
|
|
4
|
+
import { ImageButton } from './toolbar-components/ImageButton';
|
|
5
|
+
import { LayoutButton } from './toolbar-components/LayoutButton';
|
|
6
|
+
import { MediaButton } from './toolbar-components/MediaButton';
|
|
7
|
+
import { MentionButton } from './toolbar-components/MentionButton';
|
|
8
|
+
import { TableButton } from './toolbar-components/TableButton';
|
|
9
|
+
import { TableSizePicker } from './toolbar-components/TableSizePicker';
|
|
10
|
+
import { TaskListButton } from "./toolbar-components/TaskListButton";
|
|
11
|
+
export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
12
|
+
var api = _ref.api,
|
|
13
|
+
tableSelectorSupported = _ref.tableSelectorSupported;
|
|
14
|
+
return [{
|
|
15
|
+
type: INSERT_BLOCK_SECTION.type,
|
|
16
|
+
key: INSERT_BLOCK_SECTION.key,
|
|
17
|
+
parents: [{
|
|
18
|
+
type: 'toolbar',
|
|
19
|
+
key: TOOLBARS.PRIMARY_TOOLBAR,
|
|
20
|
+
rank: TOOLBAR_RANK[INSERT_BLOCK_SECTION.key]
|
|
21
|
+
}]
|
|
22
|
+
}, {
|
|
23
|
+
type: TASK_LIST_GROUP.type,
|
|
24
|
+
key: TASK_LIST_GROUP.key,
|
|
25
|
+
parents: [{
|
|
26
|
+
type: INSERT_BLOCK_SECTION.type,
|
|
27
|
+
key: INSERT_BLOCK_SECTION.key,
|
|
28
|
+
rank: INSERT_BLOCK_SECTION_RANK[TASK_LIST_GROUP.key]
|
|
29
|
+
}]
|
|
30
|
+
}, {
|
|
31
|
+
type: TASK_LIST_BUTTON.type,
|
|
32
|
+
key: TASK_LIST_BUTTON.key,
|
|
33
|
+
parents: [{
|
|
34
|
+
type: TASK_LIST_GROUP.type,
|
|
35
|
+
key: TASK_LIST_GROUP.key,
|
|
36
|
+
rank: TASK_LIST_GROUP_RANK[TASK_LIST_BUTTON.key]
|
|
37
|
+
}],
|
|
38
|
+
component: function component() {
|
|
39
|
+
return /*#__PURE__*/React.createElement(TaskListButton, {
|
|
40
|
+
api: api
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
type: MEDIA_GROUP.type,
|
|
45
|
+
key: MEDIA_GROUP.key,
|
|
46
|
+
parents: [{
|
|
47
|
+
type: INSERT_BLOCK_SECTION.type,
|
|
48
|
+
key: INSERT_BLOCK_SECTION.key,
|
|
49
|
+
rank: INSERT_BLOCK_SECTION_RANK[MEDIA_GROUP.key]
|
|
50
|
+
}]
|
|
51
|
+
}, {
|
|
52
|
+
type: MEDIA_BUTTON.type,
|
|
53
|
+
key: MEDIA_BUTTON.key,
|
|
54
|
+
parents: [{
|
|
55
|
+
type: MEDIA_GROUP.type,
|
|
56
|
+
key: MEDIA_GROUP.key,
|
|
57
|
+
rank: MEDIA_GROUP_RANK[MEDIA_BUTTON.key]
|
|
58
|
+
}],
|
|
59
|
+
component: function component() {
|
|
60
|
+
return !!(api !== null && api !== void 0 && api.imageUpload) ? /*#__PURE__*/React.createElement(ImageButton, {
|
|
61
|
+
api: api
|
|
62
|
+
}) : /*#__PURE__*/React.createElement(MediaButton, {
|
|
63
|
+
api: api
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
type: MENTION_GROUP.type,
|
|
68
|
+
key: MENTION_GROUP.key,
|
|
69
|
+
parents: [{
|
|
70
|
+
type: INSERT_BLOCK_SECTION.type,
|
|
71
|
+
key: INSERT_BLOCK_SECTION.key,
|
|
72
|
+
rank: INSERT_BLOCK_SECTION_RANK[MENTION_GROUP.key]
|
|
73
|
+
}]
|
|
74
|
+
}, {
|
|
75
|
+
type: MENTION_BUTTON.type,
|
|
76
|
+
key: MENTION_BUTTON.key,
|
|
77
|
+
parents: [{
|
|
78
|
+
type: MENTION_GROUP.type,
|
|
79
|
+
key: MENTION_GROUP.key,
|
|
80
|
+
rank: MENTION_GROUP_RANK[MENTION_BUTTON.key]
|
|
81
|
+
}],
|
|
82
|
+
component: function component() {
|
|
83
|
+
return /*#__PURE__*/React.createElement(MentionButton, {
|
|
84
|
+
api: api
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
type: EMOJI_GROUP.type,
|
|
89
|
+
key: EMOJI_GROUP.key,
|
|
90
|
+
parents: [{
|
|
91
|
+
type: INSERT_BLOCK_SECTION.type,
|
|
92
|
+
key: INSERT_BLOCK_SECTION.key,
|
|
93
|
+
rank: INSERT_BLOCK_SECTION_RANK[EMOJI_GROUP.key]
|
|
94
|
+
}]
|
|
95
|
+
}, {
|
|
96
|
+
type: EMOJI_BUTTON.type,
|
|
97
|
+
key: EMOJI_BUTTON.key,
|
|
98
|
+
parents: [{
|
|
99
|
+
type: EMOJI_GROUP.type,
|
|
100
|
+
key: EMOJI_GROUP.key,
|
|
101
|
+
rank: EMOJI_GROUP_RANK[EMOJI_BUTTON.key]
|
|
102
|
+
}],
|
|
103
|
+
component: function component() {
|
|
104
|
+
return /*#__PURE__*/React.createElement(EmojiButton, {
|
|
105
|
+
api: api
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}, {
|
|
109
|
+
type: LAYOUT_GROUP.type,
|
|
110
|
+
key: LAYOUT_GROUP.key,
|
|
111
|
+
parents: [{
|
|
112
|
+
type: INSERT_BLOCK_SECTION.type,
|
|
113
|
+
key: INSERT_BLOCK_SECTION.key,
|
|
114
|
+
rank: INSERT_BLOCK_SECTION_RANK[LAYOUT_GROUP.key]
|
|
115
|
+
}]
|
|
116
|
+
}, {
|
|
117
|
+
type: LAYOUT_BUTTON.type,
|
|
118
|
+
key: LAYOUT_BUTTON.key,
|
|
119
|
+
parents: [{
|
|
120
|
+
type: LAYOUT_GROUP.type,
|
|
121
|
+
key: LAYOUT_GROUP.key,
|
|
122
|
+
rank: LAYOUT_GROUP_RANK[LAYOUT_BUTTON.key]
|
|
123
|
+
}],
|
|
124
|
+
component: function component() {
|
|
125
|
+
return /*#__PURE__*/React.createElement(LayoutButton, {
|
|
126
|
+
api: api
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}, {
|
|
130
|
+
type: TABLE_GROUP.type,
|
|
131
|
+
key: TABLE_GROUP.key,
|
|
132
|
+
parents: [{
|
|
133
|
+
type: INSERT_BLOCK_SECTION.type,
|
|
134
|
+
key: INSERT_BLOCK_SECTION.key,
|
|
135
|
+
rank: INSERT_BLOCK_SECTION_RANK[TABLE_GROUP.key]
|
|
136
|
+
}]
|
|
137
|
+
}, {
|
|
138
|
+
type: TABLE_BUTTON.type,
|
|
139
|
+
key: TABLE_BUTTON.key,
|
|
140
|
+
parents: [{
|
|
141
|
+
type: TABLE_GROUP.type,
|
|
142
|
+
key: TABLE_GROUP.key,
|
|
143
|
+
rank: TABLE_GROUP_RANK[TABLE_BUTTON.key]
|
|
144
|
+
}],
|
|
145
|
+
component: function component() {
|
|
146
|
+
return /*#__PURE__*/React.createElement(TableButton, {
|
|
147
|
+
api: api
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
}, {
|
|
151
|
+
type: TABLE_SIZE_PICKER.type,
|
|
152
|
+
key: TABLE_SIZE_PICKER.key,
|
|
153
|
+
parents: [{
|
|
154
|
+
type: TABLE_GROUP.type,
|
|
155
|
+
key: TABLE_GROUP.key,
|
|
156
|
+
rank: TABLE_GROUP_RANK[TABLE_SIZE_PICKER.key]
|
|
157
|
+
}],
|
|
158
|
+
component: function component() {
|
|
159
|
+
return /*#__PURE__*/React.createElement(TableSizePicker, {
|
|
160
|
+
api: api,
|
|
161
|
+
tableSelectorSupported: tableSelectorSupported
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}];
|
|
165
|
+
};
|
|
@@ -24,6 +24,7 @@ import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
|
24
24
|
import type { StatusPlugin } from '@atlaskit/editor-plugin-status';
|
|
25
25
|
import type { TablePlugin } from '@atlaskit/editor-plugin-table';
|
|
26
26
|
import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
|
|
27
|
+
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
|
|
27
28
|
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
28
29
|
export type InsertBlockPluginDependencies = [
|
|
29
30
|
TypeAheadPlugin,
|
|
@@ -51,7 +52,8 @@ export type InsertBlockPluginDependencies = [
|
|
|
51
52
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
52
53
|
OptionalPlugin<FeatureFlagsPlugin>,
|
|
53
54
|
OptionalPlugin<ContextPanelPlugin>,
|
|
54
|
-
OptionalPlugin<ConnectivityPlugin
|
|
55
|
+
OptionalPlugin<ConnectivityPlugin>,
|
|
56
|
+
OptionalPlugin<ToolbarPlugin>
|
|
55
57
|
];
|
|
56
58
|
export interface InsertBlockPluginOptions {
|
|
57
59
|
allowTables?: boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type EmojiButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const EmojiButton: ({ api }: EmojiButtonProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type ImageButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const ImageButton: ({ api }: ImageButtonProps) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type LayoutButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const LayoutButton: ({ api }: LayoutButtonProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type MediaButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const MediaButton: ({ api }: MediaButtonProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type MentionButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const MentionButton: ({ api }: MentionButtonProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type TableButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const TableButton: ({ api }: TableButtonProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type TableSizePickerProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
tableSelectorSupported?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const TableSizePicker: ({ api, tableSelectorSupported }: TableSizePickerProps) => React.JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type TaskListButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const TaskListButton: ({ api }: TaskListButtonProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExtractInjectionAPI } from "@atlaskit/editor-common/types";
|
|
2
|
+
import type { RegisterComponent } from "@atlaskit/editor-toolbar-model";
|
|
3
|
+
import type { InsertBlockPlugin } from "../insertBlockPluginType";
|
|
4
|
+
type GetToolbarComponentsProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
tableSelectorSupported?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const getToolbarComponents: ({ api, tableSelectorSupported }: GetToolbarComponentsProps) => RegisterComponent[];
|
|
9
|
+
export {};
|
|
@@ -24,6 +24,7 @@ import type { RulePlugin } from '@atlaskit/editor-plugin-rule';
|
|
|
24
24
|
import type { StatusPlugin } from '@atlaskit/editor-plugin-status';
|
|
25
25
|
import type { TablePlugin } from '@atlaskit/editor-plugin-table';
|
|
26
26
|
import type { TasksAndDecisionsPlugin } from '@atlaskit/editor-plugin-tasks-and-decisions';
|
|
27
|
+
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
|
|
27
28
|
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
28
29
|
export type InsertBlockPluginDependencies = [
|
|
29
30
|
TypeAheadPlugin,
|
|
@@ -51,7 +52,8 @@ export type InsertBlockPluginDependencies = [
|
|
|
51
52
|
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
52
53
|
OptionalPlugin<FeatureFlagsPlugin>,
|
|
53
54
|
OptionalPlugin<ContextPanelPlugin>,
|
|
54
|
-
OptionalPlugin<ConnectivityPlugin
|
|
55
|
+
OptionalPlugin<ConnectivityPlugin>,
|
|
56
|
+
OptionalPlugin<ToolbarPlugin>
|
|
55
57
|
];
|
|
56
58
|
export interface InsertBlockPluginOptions {
|
|
57
59
|
allowTables?: boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type EmojiButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const EmojiButton: ({ api }: EmojiButtonProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type ImageButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const ImageButton: ({ api }: ImageButtonProps) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type LayoutButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const LayoutButton: ({ api }: LayoutButtonProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type MediaButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const MediaButton: ({ api }: MediaButtonProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type MentionButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const MentionButton: ({ api }: MentionButtonProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type TableButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const TableButton: ({ api }: TableButtonProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type TableSizePickerProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
tableSelectorSupported?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const TableSizePicker: ({ api, tableSelectorSupported }: TableSizePickerProps) => React.JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { InsertBlockPlugin } from '../../insertBlockPluginType';
|
|
4
|
+
type TaskListButtonProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
};
|
|
7
|
+
export declare const TaskListButton: ({ api }: TaskListButtonProps) => React.JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExtractInjectionAPI } from "@atlaskit/editor-common/types";
|
|
2
|
+
import type { RegisterComponent } from "@atlaskit/editor-toolbar-model";
|
|
3
|
+
import type { InsertBlockPlugin } from "../insertBlockPluginType";
|
|
4
|
+
type GetToolbarComponentsProps = {
|
|
5
|
+
api?: ExtractInjectionAPI<InsertBlockPlugin>;
|
|
6
|
+
tableSelectorSupported?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const getToolbarComponents: ({ api, tableSelectorSupported }: GetToolbarComponentsProps) => RegisterComponent[];
|
|
9
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-insert-block",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Insert block plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -57,17 +57,20 @@
|
|
|
57
57
|
"@atlaskit/editor-plugin-status": "^4.1.0",
|
|
58
58
|
"@atlaskit/editor-plugin-table": "^12.2.0",
|
|
59
59
|
"@atlaskit/editor-plugin-tasks-and-decisions": "^6.3.0",
|
|
60
|
+
"@atlaskit/editor-plugin-toolbar": "^0.2.0",
|
|
60
61
|
"@atlaskit/editor-plugin-type-ahead": "^3.1.0",
|
|
61
62
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
62
63
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
63
|
-
"@atlaskit/
|
|
64
|
+
"@atlaskit/editor-toolbar": "^0.3.0",
|
|
65
|
+
"@atlaskit/editor-toolbar-model": "^0.1.0",
|
|
66
|
+
"@atlaskit/emoji": "^69.4.0",
|
|
64
67
|
"@atlaskit/heading": "^5.2.0",
|
|
65
68
|
"@atlaskit/icon": "^27.12.0",
|
|
66
69
|
"@atlaskit/icon-lab": "^5.6.0",
|
|
67
70
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
68
71
|
"@atlaskit/primitives": "^14.11.0",
|
|
69
72
|
"@atlaskit/theme": "^19.0.0",
|
|
70
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
73
|
+
"@atlaskit/tmp-editor-statsig": "^11.0.0",
|
|
71
74
|
"@atlaskit/tokens": "^6.0.0",
|
|
72
75
|
"@atlaskit/tooltip": "^20.4.0",
|
|
73
76
|
"@babel/runtime": "^7.0.0",
|