@atlaskit/editor-core 187.8.13 → 187.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/plugins/emoji/commands/insert-emoji.js +31 -28
- package/dist/cjs/plugins/emoji/index.js +4 -3
- package/dist/cjs/plugins/emoji/pm-plugins/ascii-input-rules.js +23 -18
- package/dist/cjs/plugins/extension/pm-plugins/main.js +54 -9
- package/dist/cjs/plugins/floating-toolbar/index.js +1 -3
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +1 -1
- package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +33 -23
- package/dist/cjs/plugins/media/toolbar/index.js +16 -2
- package/dist/cjs/plugins/media/toolbar/utils.js +7 -2
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +574 -0
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/guidelines.js +117 -0
- package/dist/cjs/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.js +15 -0
- package/dist/cjs/plugins/selection/pm-plugins/events/keydown.js +61 -25
- package/dist/cjs/ui/Resizer/ResizeLabel/index.js +20 -0
- package/dist/cjs/ui/Resizer/ResizeLabel/styles.js +17 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/emoji/commands/insert-emoji.js +5 -5
- package/dist/es2019/plugins/emoji/index.js +6 -3
- package/dist/es2019/plugins/emoji/pm-plugins/ascii-input-rules.js +14 -11
- package/dist/es2019/plugins/extension/pm-plugins/main.js +50 -0
- package/dist/es2019/plugins/floating-toolbar/index.js +1 -1
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +1 -1
- package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +34 -23
- package/dist/es2019/plugins/media/toolbar/index.js +19 -3
- package/dist/es2019/plugins/media/toolbar/utils.js +7 -1
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +493 -0
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/guidelines.js +108 -0
- package/dist/es2019/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.js +8 -0
- package/dist/es2019/plugins/selection/pm-plugins/events/keydown.js +60 -24
- package/dist/es2019/ui/Resizer/ResizeLabel/index.js +12 -0
- package/dist/es2019/ui/Resizer/ResizeLabel/styles.js +25 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/emoji/commands/insert-emoji.js +29 -27
- package/dist/esm/plugins/emoji/index.js +4 -3
- package/dist/esm/plugins/emoji/pm-plugins/ascii-input-rules.js +23 -18
- package/dist/esm/plugins/extension/pm-plugins/main.js +45 -0
- package/dist/esm/plugins/floating-toolbar/index.js +1 -3
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +1 -1
- package/dist/esm/plugins/media/nodeviews/mediaSingle.js +33 -23
- package/dist/esm/plugins/media/toolbar/index.js +17 -3
- package/dist/esm/plugins/media/toolbar/utils.js +5 -1
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +564 -0
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/guidelines.js +108 -0
- package/dist/esm/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.js +8 -0
- package/dist/esm/plugins/selection/pm-plugins/events/keydown.js +62 -25
- package/dist/esm/ui/Resizer/ResizeLabel/index.js +12 -0
- package/dist/esm/ui/Resizer/ResizeLabel/styles.js +7 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/labs/next/presets/universal.d.ts +1 -2
- package/dist/types/plugins/emoji/commands/insert-emoji.d.ts +2 -2
- package/dist/types/plugins/emoji/pm-plugins/ascii-input-rules.d.ts +3 -2
- package/dist/types/plugins/extension/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/floating-toolbar/index.d.ts +3 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +1 -0
- package/dist/types/plugins/media/index.d.ts +2 -0
- package/dist/types/plugins/media/nodeviews/styles.d.ts +1 -1
- package/dist/types/plugins/media/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/media/toolbar/utils.d.ts +1 -0
- package/dist/types/plugins/media/types.d.ts +1 -0
- package/dist/types/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +61 -0
- package/dist/types/plugins/media/ui/ResizableMediaSingle/guidelines.d.ts +4 -0
- package/dist/types/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.d.ts +7 -0
- package/dist/types/plugins/media/ui/ResizableMediaSingle/types.d.ts +1 -0
- package/dist/types/ui/Resizer/ResizeLabel/index.d.ts +8 -0
- package/dist/types/ui/Resizer/ResizeLabel/styles.d.ts +3 -0
- package/dist/types-ts4.5/labs/next/presets/universal.d.ts +1 -2
- package/dist/types-ts4.5/plugins/emoji/commands/insert-emoji.d.ts +2 -2
- package/dist/types-ts4.5/plugins/emoji/pm-plugins/ascii-input-rules.d.ts +3 -2
- package/dist/types-ts4.5/plugins/extension/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/plugins/floating-toolbar/index.d.ts +3 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/index.d.ts +1 -0
- package/dist/types-ts4.5/plugins/media/index.d.ts +2 -0
- package/dist/types-ts4.5/plugins/media/nodeviews/styles.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/pm-plugins/main.d.ts +1 -1
- package/dist/types-ts4.5/plugins/media/toolbar/utils.d.ts +1 -0
- package/dist/types-ts4.5/plugins/media/types.d.ts +1 -0
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +61 -0
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/guidelines.d.ts +4 -0
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/resizable-media-single-messages.d.ts +7 -0
- package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/types.d.ts +1 -0
- package/dist/types-ts4.5/ui/Resizer/ResizeLabel/index.d.ts +8 -0
- package/dist/types-ts4.5/ui/Resizer/ResizeLabel/styles.d.ts +3 -0
- package/package.json +2 -2
- package/report.api.md +7 -4
- package/tmp/api-report-tmp.d.ts +5 -1
|
@@ -1,36 +1,68 @@
|
|
|
1
1
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* The way expand was built, no browser reconize selection on it.
|
|
5
|
+
* For instance, when a selection going to a "collapsed" expand
|
|
6
|
+
* the browser will try to send the cursor to inside the expand content (wrong),
|
|
7
|
+
* this behavior is caused because the expand content is never true hidden
|
|
8
|
+
* we just set the height to 1px.
|
|
9
|
+
*
|
|
10
|
+
* So, we need to capture a possible selection event
|
|
11
|
+
* when a collapsed exxpand is the next node in the common depth.
|
|
12
|
+
* If that is true, we create a new TextSelection and stop the event bubble
|
|
13
|
+
*/
|
|
2
14
|
var isCollpasedExpand = function isCollpasedExpand(node) {
|
|
3
15
|
return Boolean(node && ['expand', 'nestedExpand'].includes(node.type.name) && !node.attrs.__expanded);
|
|
4
16
|
};
|
|
5
|
-
|
|
6
|
-
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* ED-18072 - Cannot shift + arrow past bodied extension if it is not empty
|
|
20
|
+
*/
|
|
21
|
+
var isBodiedExtension = function isBodiedExtension(node) {
|
|
22
|
+
return Boolean(node && ['bodiedExtension'].includes(node.type.name));
|
|
23
|
+
};
|
|
24
|
+
var isProblematicNode = function isProblematicNode(node) {
|
|
25
|
+
return isCollpasedExpand(node) || isBodiedExtension(node);
|
|
26
|
+
};
|
|
27
|
+
var findFixedProblematicNodePosition = function findFixedProblematicNodePosition(doc, $head, direction) {
|
|
28
|
+
if ($head.pos === 0 || $head.depth === 0) {
|
|
7
29
|
return null;
|
|
8
30
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
31
|
+
if (direction === 'up') {
|
|
32
|
+
var pos = $head.before();
|
|
33
|
+
var $posResolved = $head.doc.resolve(pos);
|
|
34
|
+
var maybeProblematicNode = $posResolved.nodeBefore;
|
|
35
|
+
if (maybeProblematicNode && isProblematicNode(maybeProblematicNode)) {
|
|
36
|
+
var nodeSize = maybeProblematicNode.nodeSize;
|
|
37
|
+
var nodeStartPosition = pos - nodeSize;
|
|
38
|
+
|
|
39
|
+
// ($head.pos - 1) will correspond to (nodeStartPosition + nodeSize) when we are at the start of the text node
|
|
40
|
+
var isAtEndOfProblematicNode = $head.pos - 1 === nodeStartPosition + nodeSize;
|
|
41
|
+
if (isAtEndOfProblematicNode) {
|
|
42
|
+
var startPosNode = Math.max(nodeStartPosition, 0);
|
|
43
|
+
var $startPosNode = $head.doc.resolve(Math.min(startPosNode, $head.doc.content.size));
|
|
44
|
+
return $startPosNode;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (direction === 'down') {
|
|
49
|
+
var _pos = $head.after();
|
|
50
|
+
var _maybeProblematicNode = doc.nodeAt(_pos);
|
|
51
|
+
if (_maybeProblematicNode && isProblematicNode(_maybeProblematicNode) && $head.pos + 1 === _pos) {
|
|
52
|
+
var _nodeSize = _maybeProblematicNode.nodeSize;
|
|
53
|
+
var nodePosition = _pos + _nodeSize;
|
|
54
|
+
var _startPosNode = Math.max(nodePosition, 0);
|
|
55
|
+
var _$startPosNode = $head.doc.resolve(Math.min(_startPosNode, $head.doc.content.size));
|
|
56
|
+
return _$startPosNode;
|
|
57
|
+
}
|
|
18
58
|
}
|
|
19
59
|
return null;
|
|
20
60
|
};
|
|
21
61
|
export var onKeydown = function onKeydown(view, event) {
|
|
22
62
|
/*
|
|
23
|
-
* This workaround is needed for some specific
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* For instance, when a selection going to a "collapsed" expand
|
|
27
|
-
* the browser will try to send the cursor to inside the expand content (wrong),
|
|
28
|
-
* this behavior is caused because the expand content is never true hidden
|
|
29
|
-
* we just set the height to 1px.
|
|
30
|
-
*
|
|
31
|
-
* So, we need to capture a possible selection event
|
|
32
|
-
* when a collapsed exxpand is the next node in the common depth.
|
|
33
|
-
* If that is true, we create a new TextSelection and stop the event bubble
|
|
63
|
+
* This workaround is needed for some specific situations.
|
|
64
|
+
* - expand collapse
|
|
65
|
+
* - bodied extension
|
|
34
66
|
*/
|
|
35
67
|
if (!(event instanceof KeyboardEvent)) {
|
|
36
68
|
return false;
|
|
@@ -41,16 +73,21 @@ export var onKeydown = function onKeydown(view, event) {
|
|
|
41
73
|
if (!['ArrowUp', 'ArrowDown', 'ArrowRight', 'ArrowLeft', 'Home', 'End'].includes(event.key)) {
|
|
42
74
|
return false;
|
|
43
75
|
}
|
|
44
|
-
var _view$state
|
|
76
|
+
var _view$state = view.state,
|
|
77
|
+
doc = _view$state.doc,
|
|
78
|
+
_view$state$selection = _view$state.selection,
|
|
45
79
|
$head = _view$state$selection.$head,
|
|
46
80
|
$anchor = _view$state$selection.$anchor;
|
|
47
81
|
if (event.key === 'ArrowRight' && $head.nodeAfter || event.key === 'ArrowLeft' && $head.nodeBefore) {
|
|
48
82
|
return false;
|
|
49
83
|
}
|
|
50
84
|
var direction = ['ArrowLeft', 'ArrowUp', 'Home'].includes(event.key) ? 'up' : 'down';
|
|
51
|
-
var $fixedProblematicNodePosition = findFixedProblematicNodePosition($head, direction);
|
|
85
|
+
var $fixedProblematicNodePosition = findFixedProblematicNodePosition(doc, $head, direction);
|
|
52
86
|
if ($fixedProblematicNodePosition) {
|
|
53
|
-
|
|
87
|
+
// an offset is used here so that left arrow selects the first character before the node (consistent with arrow right)
|
|
88
|
+
var headOffset = event.key === 'ArrowLeft' ? -1 : 0;
|
|
89
|
+
var head = $fixedProblematicNodePosition.pos + headOffset;
|
|
90
|
+
var forcedTextSelection = TextSelection.create(view.state.doc, $anchor.pos, head);
|
|
54
91
|
var tr = view.state.tr;
|
|
55
92
|
tr.setSelection(forcedTextSelection);
|
|
56
93
|
view.dispatch(tr);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { wrapper, text, smallText } from './styles';
|
|
4
|
+
var ResizeLabelBreakoutWidth = 110;
|
|
5
|
+
var ResizeLabel = function ResizeLabel(props) {
|
|
6
|
+
return jsx("div", {
|
|
7
|
+
css: wrapper
|
|
8
|
+
}, jsx("span", {
|
|
9
|
+
css: [text, props.containerWidth < ResizeLabelBreakoutWidth && smallText]
|
|
10
|
+
}, props.label));
|
|
11
|
+
};
|
|
12
|
+
export default ResizeLabel;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import { B300 } from '@atlaskit/theme/colors';
|
|
5
|
+
export var wrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: ", ";\n width: 100%;\n text-align: center;\n position: absolute;\n transform: translateY(-125%);\n top: 0;\n"])), "var(--ds-font-size-100, 14px)");
|
|
6
|
+
export var text = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n border-radius: 6px;\n min-width: 75px;\n background-color: ", ";\n color: ", ";\n padding: ", " ", ";\n letter-spacing: 0.5px;\n"])), "var(--ds-text-accent-blue, ".concat(B300, ")"), "var(--ds-text-inverse, white)", "var(--ds-space-050, 4px)", "var(--ds-space-200, 16px)");
|
|
7
|
+
export var smallText = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n letter-spacing: -0.5px;\n font-size: ", ";\n min-width: 27px;\n padding: ", " ", ";\n"])), "var(--ds-font-size-050, 8px)", "var(--ds-space-0, 0px)", "var(--ds-space-025, 2px)");
|
package/dist/esm/version.json
CHANGED
|
@@ -2,9 +2,8 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
2
2
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { DefaultPresetPluginOptions } from './default';
|
|
4
4
|
import type { EditorPresetProps } from './types';
|
|
5
|
-
import type { EditorSharedPropsWithPlugins } from '../../../types/editor-props';
|
|
5
|
+
import type { EditorSharedPropsWithPlugins, EditorPluginFeatureProps, EditorProviderProps } from '../../../types/editor-props';
|
|
6
6
|
import type { FeatureFlags } from '../../../types/feature-flags';
|
|
7
|
-
import type { EditorPluginFeatureProps, EditorProviderProps } from '../../../types/editor-props';
|
|
8
7
|
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
9
8
|
type UniversalPresetProps = EditorPresetProps & DefaultPresetPluginOptions & EditorSharedPropsWithPlugins & EditorPluginFeatureProps & EditorProviderProps;
|
|
10
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { EmojiId } from '@atlaskit/emoji';
|
|
2
2
|
import type { Command } from '../../../types';
|
|
3
|
-
import type { INPUT_METHOD } from '
|
|
4
|
-
export declare
|
|
3
|
+
import type { INPUT_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
export declare const insertEmoji: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (emojiId: EmojiId, inputMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.ASCII | INPUT_METHOD.TYPEAHEAD) => Command;
|
|
@@ -3,7 +3,8 @@ import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import type { FeatureFlags } from '../../../types/feature-flags';
|
|
6
|
-
|
|
6
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
export declare function inputRulePlugin(schema: Schema, providerFactory: ProviderFactory, featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
|
|
7
8
|
export declare const stateKey: PluginKey<any>;
|
|
8
|
-
declare const plugins: (schema: Schema, providerFactory: ProviderFactory, featureFlags: FeatureFlags) => SafePlugin<any>[];
|
|
9
|
+
declare const plugins: (schema: Schema, providerFactory: ProviderFactory, featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => SafePlugin<any>[];
|
|
9
10
|
export default plugins;
|
|
@@ -5,13 +5,13 @@ import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-comm
|
|
|
5
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
7
7
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
8
9
|
import type { EditorAppearance } from '../../../types/editor-appearance';
|
|
9
10
|
import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
10
11
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
11
12
|
import { getPluginState, createCommand } from '../plugin-factory';
|
|
12
13
|
import { pluginKey } from '../plugin-key';
|
|
13
14
|
import type extensionPlugin from '../index';
|
|
14
|
-
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
15
15
|
export declare const createExtensionProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ExtensionProvider>) => Promise<void>;
|
|
16
16
|
export declare const createContextIdentifierProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
|
|
17
17
|
export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandlers, applyChange, }: {
|
|
@@ -3,7 +3,9 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
|
3
3
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { FloatingToolbarConfig } from './types';
|
|
5
5
|
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
6
|
-
export type FloatingToolbarPluginState =
|
|
6
|
+
export type FloatingToolbarPluginState = {
|
|
7
|
+
getConfigWithNodeInfo: (state: EditorState) => ConfigWithNodeInfo | null | undefined;
|
|
8
|
+
};
|
|
7
9
|
export type ConfigWithNodeInfo = {
|
|
8
10
|
config: FloatingToolbarConfig | undefined;
|
|
9
11
|
pos: number;
|
|
@@ -7,6 +7,7 @@ export declare class ToolbarInsertBlock extends React.PureComponent<Props & Wrap
|
|
|
7
7
|
private dropdownButtonRef?;
|
|
8
8
|
private emojiButtonRef?;
|
|
9
9
|
private plusButtonRef?;
|
|
10
|
+
private editorAnalyticsAPI;
|
|
10
11
|
state: State;
|
|
11
12
|
static getDerivedStateFromProps(props: Props & WrappedComponentProps, state: State): State | null;
|
|
12
13
|
componentDidUpdate(prevProps: Props): void;
|
|
@@ -5,6 +5,7 @@ import type { MediaState } from './pm-plugins/main';
|
|
|
5
5
|
import type { CustomMediaPicker, MediaOptions } from './types';
|
|
6
6
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
7
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
8
|
+
import type { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
8
9
|
import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
9
10
|
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
11
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
@@ -18,6 +19,7 @@ declare const mediaPlugin: NextEditorPlugin<'media', {
|
|
|
18
19
|
dependencies: [
|
|
19
20
|
typeof featureFlagsPlugin,
|
|
20
21
|
OptionalPlugin<typeof analyticsPlugin>,
|
|
22
|
+
typeof guidelinePlugin,
|
|
21
23
|
typeof gridPlugin,
|
|
22
24
|
typeof widthPlugin,
|
|
23
25
|
typeof decorationsPlugin,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import { NumericalCardDimensions } from '@atlaskit/media-card';
|
|
4
|
+
import type { NumericalCardDimensions } from '@atlaskit/media-card';
|
|
5
5
|
export declare const MediaInlineNodeSelector = "media-inline-node";
|
|
6
6
|
export declare const MediaSingleNodeSelector = "media-single-node";
|
|
7
7
|
export declare const figureWrapper: import("@emotion/react").SerializedStyles;
|
|
@@ -5,7 +5,6 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
5
5
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
6
6
|
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
7
7
|
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
8
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
8
|
import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
|
|
10
9
|
import type { Dispatch } from '../../../event-dispatcher';
|
|
11
10
|
import type { ProsemirrorGetPosHandler } from '../../../nodeviews';
|
|
@@ -15,6 +14,7 @@ import type { MediaStateEventSubscriber } from '../picker-facade';
|
|
|
15
14
|
import PickerFacade from '../picker-facade';
|
|
16
15
|
import type { MediaNodeWithPosHandler, MediaPluginState } from './types';
|
|
17
16
|
import type { IntlShape } from 'react-intl-next';
|
|
17
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
18
18
|
import type mediaPlugin from '../index';
|
|
19
19
|
export type { MediaState, MediaProvider, MediaStateStatus };
|
|
20
20
|
export { stateKey } from './plugin-key';
|
|
@@ -6,3 +6,4 @@ import type { MediaPluginState } from '../pm-plugins/types';
|
|
|
6
6
|
export declare const getSelectedMediaContainerNodeAttrs: (mediaPluginState: MediaPluginState) => MediaBaseAttributes | null;
|
|
7
7
|
export declare const downloadMedia: (mediaPluginState: MediaPluginState) => Promise<boolean>;
|
|
8
8
|
export declare const removeMediaGroupNode: (state: EditorState) => import("prosemirror-state").Transaction;
|
|
9
|
+
export declare const getSelectedMediaSingle: (state: EditorState) => import("prosemirror-utils").ContentNodeWithPos | undefined;
|
|
@@ -10,6 +10,7 @@ import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
|
10
10
|
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
11
11
|
import type { PlaceholderTextOptions } from '../../plugins/placeholder-text/types';
|
|
12
12
|
export type MediaStateStatus = 'unknown' | 'ready' | 'cancelled' | 'preview' | 'error' | 'mobile-upload-end';
|
|
13
|
+
export type MediaSingleWithType = 'pixel' | 'percentage';
|
|
13
14
|
export interface MediaOptions {
|
|
14
15
|
provider?: Providers['mediaProvider'];
|
|
15
16
|
allowMediaSingle?: boolean | MediaSingleOptions;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/// <reference path="../../../../../../../../../typings/prosemirror.d.ts" />
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
|
+
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
6
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
7
|
+
import type { Props } from './types';
|
|
8
|
+
import type { Dimensions } from '@atlaskit/editor-common/resizer';
|
|
9
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
10
|
+
type State = {
|
|
11
|
+
offsetLeft: number;
|
|
12
|
+
isVideoFile: boolean;
|
|
13
|
+
resizedPctWidth?: number;
|
|
14
|
+
isResizing: boolean;
|
|
15
|
+
size: Dimensions;
|
|
16
|
+
};
|
|
17
|
+
export declare const resizerNextTestId = "mediaSingle.resizerNext.testid";
|
|
18
|
+
export declare function calcOffsetLeft(insideInlineLike: boolean, insideLayout: boolean, pmViewDom: Element, wrapper?: HTMLElement): number;
|
|
19
|
+
type ResizableMediaSingleNextProps = Props & WrappedComponentProps;
|
|
20
|
+
declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSingleNextProps, State> {
|
|
21
|
+
constructor(props: ResizableMediaSingleNextProps);
|
|
22
|
+
/**
|
|
23
|
+
* Calculate media single node initial width if props.mediaSingleWidth is undefined
|
|
24
|
+
* (Mainly when switching from lagacy experience to new experience).
|
|
25
|
+
*
|
|
26
|
+
* @returns initial width in pixel
|
|
27
|
+
*/
|
|
28
|
+
calcInitialWidth(): number;
|
|
29
|
+
componentDidUpdate(prevProps: Props, prevState: State): boolean;
|
|
30
|
+
isNestedNode(): boolean;
|
|
31
|
+
private getDefaultGuidelines;
|
|
32
|
+
private getSnaps;
|
|
33
|
+
get wrappedLayout(): boolean;
|
|
34
|
+
componentDidMount(): Promise<void>;
|
|
35
|
+
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
36
|
+
checkVideoFile(viewMediaClientConfig?: MediaClientConfig): Promise<void>;
|
|
37
|
+
calcNewSize: (newWidth: number, stop: boolean) => {
|
|
38
|
+
width: number | null;
|
|
39
|
+
layout: MediaSingleLayout;
|
|
40
|
+
};
|
|
41
|
+
calcUnwrappedLayout: (width: number, containerWidth: number, contentWidth: number) => 'center' | 'wide' | 'full-width';
|
|
42
|
+
get $pos(): import("prosemirror-model").ResolvedPos | null;
|
|
43
|
+
/**
|
|
44
|
+
* The maxmimum number of grid columns this node can resize to.
|
|
45
|
+
*/
|
|
46
|
+
get gridWidth(): number;
|
|
47
|
+
calcColumnLeftOffset: () => number;
|
|
48
|
+
wrapper?: HTMLElement;
|
|
49
|
+
calcPxHeight: (newWidth: number) => number;
|
|
50
|
+
get insideInlineLike(): boolean;
|
|
51
|
+
get insideLayout(): boolean;
|
|
52
|
+
private saveWrapper;
|
|
53
|
+
private displayGuideline;
|
|
54
|
+
private setIsResizing;
|
|
55
|
+
render(): jsx.JSX.Element;
|
|
56
|
+
}
|
|
57
|
+
export { ResizableMediaSingleNext as UnwrappedResizableMediaSingleNext };
|
|
58
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<ResizableMediaSingleNextProps>> & {
|
|
59
|
+
WrappedComponent: React.ComponentType<ResizableMediaSingleNextProps>;
|
|
60
|
+
};
|
|
61
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
2
|
+
import type { EditorView } from 'prosemirror-view';
|
|
3
|
+
export declare const generateDefaultGuidelines: (editorWidth: number, containerWidth: number, isFullWidthMode?: boolean | undefined) => GuidelineConfig[];
|
|
4
|
+
export declare const generateDynamicGuidelines: (view: EditorView) => GuidelineConfig[];
|
|
@@ -22,5 +22,6 @@ export type Props = MediaSingleProps & {
|
|
|
22
22
|
viewMediaClientConfig?: MediaClientConfig;
|
|
23
23
|
fullWidthMode?: boolean;
|
|
24
24
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
25
|
+
mediaSingleWidth?: number;
|
|
25
26
|
pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined;
|
|
26
27
|
};
|
|
@@ -2,9 +2,8 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
2
2
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { DefaultPresetPluginOptions } from './default';
|
|
4
4
|
import type { EditorPresetProps } from './types';
|
|
5
|
-
import type { EditorSharedPropsWithPlugins } from '../../../types/editor-props';
|
|
5
|
+
import type { EditorSharedPropsWithPlugins, EditorPluginFeatureProps, EditorProviderProps } from '../../../types/editor-props';
|
|
6
6
|
import type { FeatureFlags } from '../../../types/feature-flags';
|
|
7
|
-
import type { EditorPluginFeatureProps, EditorProviderProps } from '../../../types/editor-props';
|
|
8
7
|
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
9
8
|
type UniversalPresetProps = EditorPresetProps & DefaultPresetPluginOptions & EditorSharedPropsWithPlugins & EditorPluginFeatureProps & EditorProviderProps;
|
|
10
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { EmojiId } from '@atlaskit/emoji';
|
|
2
2
|
import type { Command } from '../../../types';
|
|
3
|
-
import type { INPUT_METHOD } from '
|
|
4
|
-
export declare
|
|
3
|
+
import type { INPUT_METHOD, EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
export declare const insertEmoji: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (emojiId: EmojiId, inputMethod?: INPUT_METHOD.PICKER | INPUT_METHOD.ASCII | INPUT_METHOD.TYPEAHEAD) => Command;
|
|
@@ -3,7 +3,8 @@ import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import type { FeatureFlags } from '../../../types/feature-flags';
|
|
6
|
-
|
|
6
|
+
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
7
|
+
export declare function inputRulePlugin(schema: Schema, providerFactory: ProviderFactory, featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
|
|
7
8
|
export declare const stateKey: PluginKey<any>;
|
|
8
|
-
declare const plugins: (schema: Schema, providerFactory: ProviderFactory, featureFlags: FeatureFlags) => SafePlugin<any>[];
|
|
9
|
+
declare const plugins: (schema: Schema, providerFactory: ProviderFactory, featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => SafePlugin<any>[];
|
|
9
10
|
export default plugins;
|
|
@@ -5,13 +5,13 @@ import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-comm
|
|
|
5
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
6
6
|
import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
|
|
7
7
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
8
|
+
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
8
9
|
import type { EditorAppearance } from '../../../types/editor-appearance';
|
|
9
10
|
import type { Dispatch, EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
10
11
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal-provider';
|
|
11
12
|
import { getPluginState, createCommand } from '../plugin-factory';
|
|
12
13
|
import { pluginKey } from '../plugin-key';
|
|
13
14
|
import type extensionPlugin from '../index';
|
|
14
|
-
import type { ApplyChangeHandler } from '@atlaskit/editor-plugin-context-panel';
|
|
15
15
|
export declare const createExtensionProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ExtensionProvider>) => Promise<void>;
|
|
16
16
|
export declare const createContextIdentifierProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ContextIdentifierProvider>) => Promise<void>;
|
|
17
17
|
export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandlers, applyChange, }: {
|
|
@@ -3,7 +3,9 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
|
3
3
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { FloatingToolbarConfig } from './types';
|
|
5
5
|
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
6
|
-
export type FloatingToolbarPluginState =
|
|
6
|
+
export type FloatingToolbarPluginState = {
|
|
7
|
+
getConfigWithNodeInfo: (state: EditorState) => ConfigWithNodeInfo | null | undefined;
|
|
8
|
+
};
|
|
7
9
|
export type ConfigWithNodeInfo = {
|
|
8
10
|
config: FloatingToolbarConfig | undefined;
|
|
9
11
|
pos: number;
|
|
@@ -7,6 +7,7 @@ export declare class ToolbarInsertBlock extends React.PureComponent<Props & Wrap
|
|
|
7
7
|
private dropdownButtonRef?;
|
|
8
8
|
private emojiButtonRef?;
|
|
9
9
|
private plusButtonRef?;
|
|
10
|
+
private editorAnalyticsAPI;
|
|
10
11
|
state: State;
|
|
11
12
|
static getDerivedStateFromProps(props: Props & WrappedComponentProps, state: State): State | null;
|
|
12
13
|
componentDidUpdate(prevProps: Props): void;
|
|
@@ -5,6 +5,7 @@ import type { MediaState } from './pm-plugins/main';
|
|
|
5
5
|
import type { CustomMediaPicker, MediaOptions } from './types';
|
|
6
6
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
7
7
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
8
|
+
import type { guidelinePlugin } from '@atlaskit/editor-plugin-guideline';
|
|
8
9
|
import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
9
10
|
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
11
|
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
@@ -18,6 +19,7 @@ declare const mediaPlugin: NextEditorPlugin<'media', {
|
|
|
18
19
|
dependencies: [
|
|
19
20
|
typeof featureFlagsPlugin,
|
|
20
21
|
OptionalPlugin<typeof analyticsPlugin>,
|
|
22
|
+
typeof guidelinePlugin,
|
|
21
23
|
typeof gridPlugin,
|
|
22
24
|
typeof widthPlugin,
|
|
23
25
|
typeof decorationsPlugin,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
import { NumericalCardDimensions } from '@atlaskit/media-card';
|
|
4
|
+
import type { NumericalCardDimensions } from '@atlaskit/media-card';
|
|
5
5
|
export declare const MediaInlineNodeSelector = "media-inline-node";
|
|
6
6
|
export declare const MediaSingleNodeSelector = "media-single-node";
|
|
7
7
|
export declare const figureWrapper: import("@emotion/react").SerializedStyles;
|
|
@@ -5,7 +5,6 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
5
5
|
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
6
6
|
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
7
7
|
import type { ContextIdentifierProvider, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
8
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
8
|
import type { WidthPluginState } from '@atlaskit/editor-plugin-width';
|
|
10
9
|
import type { Dispatch } from '../../../event-dispatcher';
|
|
11
10
|
import type { ProsemirrorGetPosHandler } from '../../../nodeviews';
|
|
@@ -15,6 +14,7 @@ import type { MediaStateEventSubscriber } from '../picker-facade';
|
|
|
15
14
|
import PickerFacade from '../picker-facade';
|
|
16
15
|
import type { MediaNodeWithPosHandler, MediaPluginState } from './types';
|
|
17
16
|
import type { IntlShape } from 'react-intl-next';
|
|
17
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
18
18
|
import type mediaPlugin from '../index';
|
|
19
19
|
export type { MediaState, MediaProvider, MediaStateStatus };
|
|
20
20
|
export { stateKey } from './plugin-key';
|
|
@@ -6,3 +6,4 @@ import type { MediaPluginState } from '../pm-plugins/types';
|
|
|
6
6
|
export declare const getSelectedMediaContainerNodeAttrs: (mediaPluginState: MediaPluginState) => MediaBaseAttributes | null;
|
|
7
7
|
export declare const downloadMedia: (mediaPluginState: MediaPluginState) => Promise<boolean>;
|
|
8
8
|
export declare const removeMediaGroupNode: (state: EditorState) => import("prosemirror-state").Transaction;
|
|
9
|
+
export declare const getSelectedMediaSingle: (state: EditorState) => import("prosemirror-utils").ContentNodeWithPos | undefined;
|
|
@@ -10,6 +10,7 @@ import type { EditorSelectionAPI } from '@atlaskit/editor-common/selection';
|
|
|
10
10
|
import type { GetEditorFeatureFlags } from '@atlaskit/editor-common/types';
|
|
11
11
|
import type { PlaceholderTextOptions } from '../../plugins/placeholder-text/types';
|
|
12
12
|
export type MediaStateStatus = 'unknown' | 'ready' | 'cancelled' | 'preview' | 'error' | 'mobile-upload-end';
|
|
13
|
+
export type MediaSingleWithType = 'pixel' | 'percentage';
|
|
13
14
|
export interface MediaOptions {
|
|
14
15
|
provider?: Providers['mediaProvider'];
|
|
15
16
|
allowMediaSingle?: boolean | MediaSingleOptions;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/// <reference path="../../../../../../../../../typings/prosemirror.d.ts" />
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { jsx } from '@emotion/react';
|
|
5
|
+
import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
|
|
6
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
7
|
+
import type { Props } from './types';
|
|
8
|
+
import type { Dimensions } from '@atlaskit/editor-common/resizer';
|
|
9
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
10
|
+
type State = {
|
|
11
|
+
offsetLeft: number;
|
|
12
|
+
isVideoFile: boolean;
|
|
13
|
+
resizedPctWidth?: number;
|
|
14
|
+
isResizing: boolean;
|
|
15
|
+
size: Dimensions;
|
|
16
|
+
};
|
|
17
|
+
export declare const resizerNextTestId = "mediaSingle.resizerNext.testid";
|
|
18
|
+
export declare function calcOffsetLeft(insideInlineLike: boolean, insideLayout: boolean, pmViewDom: Element, wrapper?: HTMLElement): number;
|
|
19
|
+
type ResizableMediaSingleNextProps = Props & WrappedComponentProps;
|
|
20
|
+
declare class ResizableMediaSingleNext extends React.Component<ResizableMediaSingleNextProps, State> {
|
|
21
|
+
constructor(props: ResizableMediaSingleNextProps);
|
|
22
|
+
/**
|
|
23
|
+
* Calculate media single node initial width if props.mediaSingleWidth is undefined
|
|
24
|
+
* (Mainly when switching from lagacy experience to new experience).
|
|
25
|
+
*
|
|
26
|
+
* @returns initial width in pixel
|
|
27
|
+
*/
|
|
28
|
+
calcInitialWidth(): number;
|
|
29
|
+
componentDidUpdate(prevProps: Props, prevState: State): boolean;
|
|
30
|
+
isNestedNode(): boolean;
|
|
31
|
+
private getDefaultGuidelines;
|
|
32
|
+
private getSnaps;
|
|
33
|
+
get wrappedLayout(): boolean;
|
|
34
|
+
componentDidMount(): Promise<void>;
|
|
35
|
+
UNSAFE_componentWillReceiveProps(nextProps: Props): void;
|
|
36
|
+
checkVideoFile(viewMediaClientConfig?: MediaClientConfig): Promise<void>;
|
|
37
|
+
calcNewSize: (newWidth: number, stop: boolean) => {
|
|
38
|
+
width: number | null;
|
|
39
|
+
layout: MediaSingleLayout;
|
|
40
|
+
};
|
|
41
|
+
calcUnwrappedLayout: (width: number, containerWidth: number, contentWidth: number) => 'center' | 'wide' | 'full-width';
|
|
42
|
+
get $pos(): import("prosemirror-model").ResolvedPos | null;
|
|
43
|
+
/**
|
|
44
|
+
* The maxmimum number of grid columns this node can resize to.
|
|
45
|
+
*/
|
|
46
|
+
get gridWidth(): number;
|
|
47
|
+
calcColumnLeftOffset: () => number;
|
|
48
|
+
wrapper?: HTMLElement;
|
|
49
|
+
calcPxHeight: (newWidth: number) => number;
|
|
50
|
+
get insideInlineLike(): boolean;
|
|
51
|
+
get insideLayout(): boolean;
|
|
52
|
+
private saveWrapper;
|
|
53
|
+
private displayGuideline;
|
|
54
|
+
private setIsResizing;
|
|
55
|
+
render(): jsx.JSX.Element;
|
|
56
|
+
}
|
|
57
|
+
export { ResizableMediaSingleNext as UnwrappedResizableMediaSingleNext };
|
|
58
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<ResizableMediaSingleNextProps>> & {
|
|
59
|
+
WrappedComponent: React.ComponentType<ResizableMediaSingleNextProps>;
|
|
60
|
+
};
|
|
61
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GuidelineConfig } from '@atlaskit/editor-common/guideline';
|
|
2
|
+
import type { EditorView } from 'prosemirror-view';
|
|
3
|
+
export declare const generateDefaultGuidelines: (editorWidth: number, containerWidth: number, isFullWidthMode?: boolean | undefined) => GuidelineConfig[];
|
|
4
|
+
export declare const generateDynamicGuidelines: (view: EditorView) => GuidelineConfig[];
|
|
@@ -22,5 +22,6 @@ export type Props = MediaSingleProps & {
|
|
|
22
22
|
viewMediaClientConfig?: MediaClientConfig;
|
|
23
23
|
fullWidthMode?: boolean;
|
|
24
24
|
dispatchAnalyticsEvent: DispatchAnalyticsEvent;
|
|
25
|
+
mediaSingleWidth?: number;
|
|
25
26
|
pluginInjectionApi: ExtractInjectionAPI<typeof mediaPlugin> | undefined;
|
|
26
27
|
};
|