@atlaskit/editor-core 187.2.2 → 187.2.4
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/dist/cjs/plugins/image-upload/index.js +17 -1
- package/dist/cjs/plugins/image-upload/pm-plugins/commands-toolbar.js +19 -0
- package/dist/cjs/plugins/image-upload/pm-plugins/main.js +76 -77
- package/dist/cjs/plugins/insert-block/index.js +12 -17
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/image-upload/index.js +31 -15
- package/dist/es2019/plugins/image-upload/pm-plugins/commands-toolbar.js +12 -0
- package/dist/es2019/plugins/image-upload/pm-plugins/main.js +1 -4
- package/dist/es2019/plugins/insert-block/index.js +8 -13
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/image-upload/index.js +17 -1
- package/dist/esm/plugins/image-upload/pm-plugins/commands-toolbar.js +12 -0
- package/dist/esm/plugins/image-upload/pm-plugins/main.js +76 -77
- package/dist/esm/plugins/insert-block/index.js +8 -13
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/image-upload/index.d.ts +15 -2
- package/dist/types/plugins/image-upload/pm-plugins/commands-toolbar.d.ts +3 -0
- package/dist/types/plugins/image-upload/pm-plugins/commands.d.ts +2 -2
- package/dist/types/plugins/image-upload/pm-plugins/main.d.ts +2 -2
- package/dist/types/plugins/image-upload/types.d.ts +4 -0
- package/dist/types/plugins/insert-block/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/image-upload/index.d.ts +15 -2
- package/dist/types-ts4.5/plugins/image-upload/pm-plugins/commands-toolbar.d.ts +3 -0
- package/dist/types-ts4.5/plugins/image-upload/pm-plugins/commands.d.ts +2 -2
- package/dist/types-ts4.5/plugins/image-upload/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/plugins/image-upload/types.d.ts +4 -0
- package/dist/types-ts4.5/plugins/insert-block/index.d.ts +3 -1
- package/package.json +1 -1
- package/tmp/api-report-tmp.d.ts +0 -2257
|
@@ -102,86 +102,85 @@ var getNewActiveUpload = function getNewActiveUpload(tr, pluginState) {
|
|
|
102
102
|
}
|
|
103
103
|
return pluginState.activeUpload;
|
|
104
104
|
};
|
|
105
|
-
export var createPlugin = function createPlugin(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return
|
|
105
|
+
export var createPlugin = function createPlugin(uploadHandlerReference) {
|
|
106
|
+
return function (_ref2) {
|
|
107
|
+
var dispatch = _ref2.dispatch,
|
|
108
|
+
providerFactory = _ref2.providerFactory;
|
|
109
|
+
return new SafePlugin({
|
|
110
|
+
state: {
|
|
111
|
+
init: function init(_config, state) {
|
|
112
|
+
return {
|
|
113
|
+
active: false,
|
|
114
|
+
enabled: canInsertMedia(state),
|
|
115
|
+
hidden: !state.schema.nodes.media || !state.schema.nodes.mediaSingle
|
|
116
|
+
};
|
|
117
|
+
},
|
|
118
|
+
apply: function apply(tr, pluginState, _oldState, newState) {
|
|
119
|
+
var newActive = isMediaSelected(newState);
|
|
120
|
+
var newEnabled = canInsertMedia(newState);
|
|
121
|
+
var newActiveUpload = getNewActiveUpload(tr, pluginState);
|
|
122
|
+
if (newActive !== pluginState.active || newEnabled !== pluginState.enabled || newActiveUpload !== pluginState.activeUpload) {
|
|
123
|
+
var newPluginState = _objectSpread(_objectSpread({}, pluginState), {}, {
|
|
124
|
+
active: newActive,
|
|
125
|
+
enabled: newEnabled,
|
|
126
|
+
activeUpload: newActiveUpload
|
|
127
|
+
});
|
|
128
|
+
dispatch(stateKey, newPluginState);
|
|
129
|
+
return newPluginState;
|
|
130
|
+
}
|
|
131
|
+
return pluginState;
|
|
132
132
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
133
|
+
},
|
|
134
|
+
key: stateKey,
|
|
135
|
+
view: function view() {
|
|
136
|
+
var handleProvider = /*#__PURE__*/function () {
|
|
137
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(name, provider) {
|
|
138
|
+
var imageUploadProvider;
|
|
139
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
140
|
+
while (1) switch (_context.prev = _context.next) {
|
|
141
|
+
case 0:
|
|
142
|
+
if (!(name !== 'imageUploadProvider' || !provider)) {
|
|
143
|
+
_context.next = 2;
|
|
144
|
+
break;
|
|
145
|
+
}
|
|
146
|
+
return _context.abrupt("return");
|
|
147
|
+
case 2:
|
|
148
|
+
_context.prev = 2;
|
|
149
|
+
_context.next = 5;
|
|
150
|
+
return provider;
|
|
151
|
+
case 5:
|
|
152
|
+
imageUploadProvider = _context.sent;
|
|
153
|
+
uploadHandlerReference.current = imageUploadProvider;
|
|
154
|
+
_context.next = 12;
|
|
146
155
|
break;
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
}));
|
|
168
|
-
return function handleProvider(_x, _x2) {
|
|
169
|
-
return _ref3.apply(this, arguments);
|
|
156
|
+
case 9:
|
|
157
|
+
_context.prev = 9;
|
|
158
|
+
_context.t0 = _context["catch"](2);
|
|
159
|
+
uploadHandlerReference.current = null;
|
|
160
|
+
case 12:
|
|
161
|
+
case "end":
|
|
162
|
+
return _context.stop();
|
|
163
|
+
}
|
|
164
|
+
}, _callee, null, [[2, 9]]);
|
|
165
|
+
}));
|
|
166
|
+
return function handleProvider(_x, _x2) {
|
|
167
|
+
return _ref3.apply(this, arguments);
|
|
168
|
+
};
|
|
169
|
+
}();
|
|
170
|
+
providerFactory.subscribe('imageUploadProvider', handleProvider);
|
|
171
|
+
return {
|
|
172
|
+
destroy: function destroy() {
|
|
173
|
+
uploadHandlerReference.current = null;
|
|
174
|
+
providerFactory.unsubscribe('imageUploadProvider', handleProvider);
|
|
175
|
+
}
|
|
170
176
|
};
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
providerFactory.unsubscribe('imageUploadProvider', handleProvider);
|
|
177
|
+
},
|
|
178
|
+
props: {
|
|
179
|
+
handleDOMEvents: {
|
|
180
|
+
drop: createDOMHandler(isDroppedFile, 'atlassian.editor.image.drop', uploadHandlerReference),
|
|
181
|
+
paste: createDOMHandler(isPastedFile, 'atlassian.editor.image.paste', uploadHandlerReference)
|
|
177
182
|
}
|
|
178
|
-
};
|
|
179
|
-
},
|
|
180
|
-
props: {
|
|
181
|
-
handleDOMEvents: {
|
|
182
|
-
drop: createDOMHandler(isDroppedFile, 'atlassian.editor.image.drop', uploadHandlerReference),
|
|
183
|
-
paste: createDOMHandler(isPastedFile, 'atlassian.editor.image.paste', uploadHandlerReference)
|
|
184
183
|
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
184
|
+
});
|
|
185
|
+
};
|
|
187
186
|
};
|
|
@@ -11,9 +11,7 @@ import WithPluginState from '../../ui/WithPluginState';
|
|
|
11
11
|
import ToolbarInsertBlock from './ui/ToolbarInsertBlock';
|
|
12
12
|
import { pluginKey as typeAheadPluginKey } from '../type-ahead/pm-plugins/key';
|
|
13
13
|
import { insertBlockTypesWithAnalytics } from '../block-type/commands';
|
|
14
|
-
import { startImageUpload } from '../image-upload/pm-plugins/commands';
|
|
15
14
|
import { INPUT_METHOD } from '../analytics';
|
|
16
|
-
import { stateKey as imageUploadStateKey } from '../image-upload/pm-plugins/plugin-key';
|
|
17
15
|
import { pluginKey as placeholderTextStateKey } from '../placeholder-text/plugin-key';
|
|
18
16
|
import { pluginKey as macroStateKey } from '../macro/plugin-key';
|
|
19
17
|
import { ToolbarSize } from '../../ui/Toolbar/types';
|
|
@@ -70,7 +68,6 @@ var insertBlockPlugin = function insertBlockPlugin() {
|
|
|
70
68
|
mentionState: mentionPluginKey,
|
|
71
69
|
macroState: macroStateKey,
|
|
72
70
|
emojiState: emojiPluginKey,
|
|
73
|
-
imageUpload: imageUploadStateKey,
|
|
74
71
|
placeholderTextState: placeholderTextStateKey,
|
|
75
72
|
layoutState: layoutStateKey
|
|
76
73
|
},
|
|
@@ -81,7 +78,6 @@ var insertBlockPlugin = function insertBlockPlugin() {
|
|
|
81
78
|
_ref2$macroState = _ref2.macroState,
|
|
82
79
|
macroState = _ref2$macroState === void 0 ? {} : _ref2$macroState,
|
|
83
80
|
emojiState = _ref2.emojiState,
|
|
84
|
-
imageUpload = _ref2.imageUpload,
|
|
85
81
|
placeholderTextState = _ref2.placeholderTextState,
|
|
86
82
|
layoutState = _ref2.layoutState;
|
|
87
83
|
return /*#__PURE__*/React.createElement(ToolbarInsertBlockWithInjectionApi, {
|
|
@@ -103,7 +99,6 @@ var insertBlockPlugin = function insertBlockPlugin() {
|
|
|
103
99
|
mediaState: mediaState,
|
|
104
100
|
macroState: macroState,
|
|
105
101
|
emojiState: emojiState,
|
|
106
|
-
imageUpload: imageUpload,
|
|
107
102
|
placeholderTextState: placeholderTextState,
|
|
108
103
|
layoutState: layoutState,
|
|
109
104
|
providers: providers,
|
|
@@ -121,7 +116,7 @@ var insertBlockPlugin = function insertBlockPlugin() {
|
|
|
121
116
|
};
|
|
122
117
|
};
|
|
123
118
|
function ToolbarInsertBlockWithInjectionApi(_ref3) {
|
|
124
|
-
var _pluginInjectionApi$d;
|
|
119
|
+
var _pluginInjectionApi$d, _pluginInjectionApi$d2;
|
|
125
120
|
var editorView = _ref3.editorView,
|
|
126
121
|
editorActions = _ref3.editorActions,
|
|
127
122
|
dispatchAnalyticsEvent = _ref3.dispatchAnalyticsEvent,
|
|
@@ -141,14 +136,14 @@ function ToolbarInsertBlockWithInjectionApi(_ref3) {
|
|
|
141
136
|
mediaState = _ref3.mediaState,
|
|
142
137
|
macroState = _ref3.macroState,
|
|
143
138
|
emojiState = _ref3.emojiState,
|
|
144
|
-
imageUpload = _ref3.imageUpload,
|
|
145
139
|
placeholderTextState = _ref3.placeholderTextState,
|
|
146
140
|
layoutState = _ref3.layoutState,
|
|
147
141
|
featureFlags = _ref3.featureFlags;
|
|
148
142
|
var buttons = toolbarSizeToButtons(toolbarSize);
|
|
149
|
-
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date']),
|
|
143
|
+
var _useSharedPluginState = useSharedPluginState(pluginInjectionApi, ['hyperlink', 'date', 'imageUpload']),
|
|
150
144
|
dateState = _useSharedPluginState.dateState,
|
|
151
|
-
hyperlinkState = _useSharedPluginState.hyperlinkState
|
|
145
|
+
hyperlinkState = _useSharedPluginState.hyperlinkState,
|
|
146
|
+
imageUploadState = _useSharedPluginState.imageUploadState;
|
|
152
147
|
return /*#__PURE__*/React.createElement(ToolbarInsertBlock, {
|
|
153
148
|
pluginInjectionApi: pluginInjectionApi,
|
|
154
149
|
buttons: buttons,
|
|
@@ -167,9 +162,9 @@ function ToolbarInsertBlockWithInjectionApi(_ref3) {
|
|
|
167
162
|
mediaUploadsEnabled: mediaState && mediaState.allowsUploads,
|
|
168
163
|
onShowMediaPicker: mediaState && mediaState.showMediaPicker,
|
|
169
164
|
mediaSupported: !!mediaState,
|
|
170
|
-
imageUploadSupported: !!imageUpload,
|
|
171
|
-
imageUploadEnabled:
|
|
172
|
-
handleImageUpload:
|
|
165
|
+
imageUploadSupported: !!(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.dependencies.imageUpload),
|
|
166
|
+
imageUploadEnabled: imageUploadState === null || imageUploadState === void 0 ? void 0 : imageUploadState.enabled,
|
|
167
|
+
handleImageUpload: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d = pluginInjectionApi.dependencies.imageUpload) === null || _pluginInjectionApi$d === void 0 ? void 0 : _pluginInjectionApi$d.actions.startUpload,
|
|
173
168
|
availableWrapperBlockTypes: blockTypeState && blockTypeState.availableWrapperBlockTypes,
|
|
174
169
|
linkSupported: !!hyperlinkState,
|
|
175
170
|
linkDisabled: !hyperlinkState || !hyperlinkState.canInsertLink || !!hyperlinkState.activeLinkMark,
|
|
@@ -177,7 +172,7 @@ function ToolbarInsertBlockWithInjectionApi(_ref3) {
|
|
|
177
172
|
emojiProvider: providers.emojiProvider,
|
|
178
173
|
nativeStatusSupported: options.nativeStatusSupported,
|
|
179
174
|
horizontalRuleEnabled: options.horizontalRuleEnabled,
|
|
180
|
-
onInsertBlockType: handleInsertBlockType(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
175
|
+
onInsertBlockType: handleInsertBlockType(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$d2 = pluginInjectionApi.dependencies.analytics) === null || _pluginInjectionApi$d2 === void 0 ? void 0 : _pluginInjectionApi$d2.actions),
|
|
181
176
|
onInsertMacroFromMacroBrowser: insertMacroFromMacroBrowser,
|
|
182
177
|
macroProvider: macroState.macroProvider,
|
|
183
178
|
popupsMountPoint: popupsMountPoint,
|
package/dist/esm/version.json
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
|
|
1
|
+
import type { Command, NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
type ImageUploadActions = {
|
|
3
|
+
startUpload: () => Command;
|
|
4
|
+
};
|
|
5
|
+
type ImageUploadSharedState = {
|
|
6
|
+
active: boolean;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
hidden: boolean;
|
|
9
|
+
};
|
|
10
|
+
type ImageUploadPlugin = NextEditorPlugin<'imageUpload', {
|
|
11
|
+
actions: ImageUploadActions;
|
|
12
|
+
sharedState: ImageUploadSharedState | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
declare const imageUpload: ImageUploadPlugin;
|
|
3
15
|
export default imageUpload;
|
|
16
|
+
export type { ImageUploadPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InsertedImageProperties } from '@atlaskit/editor-common/provider-factory';
|
|
1
|
+
import type { InsertedImageProperties } from '@atlaskit/editor-common/provider-factory';
|
|
2
2
|
import type { Command } from '../../../types';
|
|
3
|
-
import { ImageUploadPluginReferenceEvent } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ImageUploadPluginReferenceEvent } from '@atlaskit/editor-common/types';
|
|
4
4
|
export declare const insertExternalImage: (options: InsertedImageProperties) => Command;
|
|
5
5
|
export declare const startImageUpload: (event?: ImageUploadPluginReferenceEvent) => Command;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { ImageUploadPluginState } from '../types';
|
|
2
|
+
import { ImageUploadPluginState, UploadHandlerReference } from '../types';
|
|
3
3
|
import type { PMPluginFactoryParams } from '../../../types';
|
|
4
|
-
export declare const createPlugin: ({ dispatch, providerFactory
|
|
4
|
+
export declare const createPlugin: (uploadHandlerReference: UploadHandlerReference) => ({ dispatch, providerFactory }: PMPluginFactoryParams) => SafePlugin<ImageUploadPluginState>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ImageUploadPluginReferenceEvent } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ImageUploadProvider } from '@atlaskit/editor-common/provider-factory';
|
|
2
3
|
export type { InsertedImageProperties, ImageUploadProvider as ImageUploadHandler, } from '@atlaskit/editor-common/provider-factory';
|
|
3
4
|
export type ImageUploadPluginAction = {
|
|
4
5
|
name: 'START_UPLOAD';
|
|
@@ -12,3 +13,6 @@ export type ImageUploadPluginState = {
|
|
|
12
13
|
event?: ImageUploadPluginReferenceEvent;
|
|
13
14
|
};
|
|
14
15
|
};
|
|
16
|
+
export type UploadHandlerReference = {
|
|
17
|
+
current: ImageUploadProvider | null;
|
|
18
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ImageUploadPlugin } from '../image-upload';
|
|
2
3
|
import type datePlugin from '../date';
|
|
3
4
|
import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
4
5
|
import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
@@ -20,7 +21,8 @@ declare const insertBlockPlugin: NextEditorPlugin<'insertBlock', {
|
|
|
20
21
|
OptionalPlugin<typeof tablesPlugin>,
|
|
21
22
|
OptionalPlugin<typeof hyperlinkPlugin>,
|
|
22
23
|
OptionalPlugin<typeof datePlugin>,
|
|
23
|
-
OptionalPlugin<typeof analyticsPlugin
|
|
24
|
+
OptionalPlugin<typeof analyticsPlugin>,
|
|
25
|
+
OptionalPlugin<ImageUploadPlugin>
|
|
24
26
|
];
|
|
25
27
|
}>;
|
|
26
28
|
export default insertBlockPlugin;
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
import { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
|
|
1
|
+
import type { Command, NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
type ImageUploadActions = {
|
|
3
|
+
startUpload: () => Command;
|
|
4
|
+
};
|
|
5
|
+
type ImageUploadSharedState = {
|
|
6
|
+
active: boolean;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
hidden: boolean;
|
|
9
|
+
};
|
|
10
|
+
type ImageUploadPlugin = NextEditorPlugin<'imageUpload', {
|
|
11
|
+
actions: ImageUploadActions;
|
|
12
|
+
sharedState: ImageUploadSharedState | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
declare const imageUpload: ImageUploadPlugin;
|
|
3
15
|
export default imageUpload;
|
|
16
|
+
export type { ImageUploadPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InsertedImageProperties } from '@atlaskit/editor-common/provider-factory';
|
|
1
|
+
import type { InsertedImageProperties } from '@atlaskit/editor-common/provider-factory';
|
|
2
2
|
import type { Command } from '../../../types';
|
|
3
|
-
import { ImageUploadPluginReferenceEvent } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { ImageUploadPluginReferenceEvent } from '@atlaskit/editor-common/types';
|
|
4
4
|
export declare const insertExternalImage: (options: InsertedImageProperties) => Command;
|
|
5
5
|
export declare const startImageUpload: (event?: ImageUploadPluginReferenceEvent) => Command;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { ImageUploadPluginState } from '../types';
|
|
2
|
+
import { ImageUploadPluginState, UploadHandlerReference } from '../types';
|
|
3
3
|
import type { PMPluginFactoryParams } from '../../../types';
|
|
4
|
-
export declare const createPlugin: ({ dispatch, providerFactory
|
|
4
|
+
export declare const createPlugin: (uploadHandlerReference: UploadHandlerReference) => ({ dispatch, providerFactory }: PMPluginFactoryParams) => SafePlugin<ImageUploadPluginState>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ImageUploadPluginReferenceEvent } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ImageUploadProvider } from '@atlaskit/editor-common/provider-factory';
|
|
2
3
|
export type { InsertedImageProperties, ImageUploadProvider as ImageUploadHandler, } from '@atlaskit/editor-common/provider-factory';
|
|
3
4
|
export type ImageUploadPluginAction = {
|
|
4
5
|
name: 'START_UPLOAD';
|
|
@@ -12,3 +13,6 @@ export type ImageUploadPluginState = {
|
|
|
12
13
|
event?: ImageUploadPluginReferenceEvent;
|
|
13
14
|
};
|
|
14
15
|
};
|
|
16
|
+
export type UploadHandlerReference = {
|
|
17
|
+
current: ImageUploadProvider | null;
|
|
18
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { ImageUploadPlugin } from '../image-upload';
|
|
2
3
|
import type datePlugin from '../date';
|
|
3
4
|
import { tablesPlugin } from '@atlaskit/editor-plugin-table';
|
|
4
5
|
import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
@@ -20,7 +21,8 @@ declare const insertBlockPlugin: NextEditorPlugin<'insertBlock', {
|
|
|
20
21
|
OptionalPlugin<typeof tablesPlugin>,
|
|
21
22
|
OptionalPlugin<typeof hyperlinkPlugin>,
|
|
22
23
|
OptionalPlugin<typeof datePlugin>,
|
|
23
|
-
OptionalPlugin<typeof analyticsPlugin
|
|
24
|
+
OptionalPlugin<typeof analyticsPlugin>,
|
|
25
|
+
OptionalPlugin<ImageUploadPlugin>
|
|
24
26
|
];
|
|
25
27
|
}>;
|
|
26
28
|
export default insertBlockPlugin;
|