@atlaskit/editor-plugin-card 18.2.11 → 18.2.13
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 +14 -0
- package/dist/cjs/ui/PasteDisplayAsMenu.compiled.css +2 -1
- package/dist/cjs/ui/PasteDisplayAsMenu.js +5 -2
- package/dist/es2019/ui/PasteDisplayAsMenu.compiled.css +2 -1
- package/dist/es2019/ui/PasteDisplayAsMenu.js +6 -3
- package/dist/esm/ui/PasteDisplayAsMenu.compiled.css +2 -1
- package/dist/esm/ui/PasteDisplayAsMenu.js +6 -3
- package/dist/types/nodeviews/toDOM-fixes/blockCard.d.ts +1 -1
- package/dist/types/nodeviews/toDOM-fixes/embedCard.d.ts +1 -1
- package/dist/types/nodeviews/toDOM-fixes/inlineCard.d.ts +1 -1
- package/dist/types/pm-plugins/doc.d.ts +1 -1
- package/dist/types/pm-plugins/reducers.d.ts +1 -1
- package/dist/types/pm-plugins/util/resolve.d.ts +1 -1
- package/dist/types/pm-plugins/util/state.d.ts +1 -1
- package/dist/types/pm-plugins/utils.d.ts +2 -2
- package/dist/types/ui/HyperlinkToolbarAppearanceDropdown.d.ts +1 -1
- package/dist/types/ui/LayoutButton/types.d.ts +1 -1
- package/dist/types/ui/ResizableEmbedCard.d.ts +1 -1
- package/dist/types/ui/ToolbarViewedEvent.d.ts +1 -1
- package/dist/types/ui/pasteDisplayAsUtils.d.ts +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-card
|
|
2
2
|
|
|
3
|
+
## 18.2.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`32f168dee5a99`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/32f168dee5a99) -
|
|
8
|
+
Add tooltips to the "Display as" appearance buttons (URL, Inline, Card, Embed) in the paste
|
|
9
|
+
actions menu.
|
|
10
|
+
|
|
11
|
+
## 18.2.12
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 18.2.11
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
._18u0u2gc{margin-left:var(--ds-space-100,8px)}
|
|
7
7
|
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
8
8
|
._19pku2gc{margin-top:var(--ds-space-100,8px)}
|
|
9
|
-
._1bah1b1v{justify-content:space-around}
|
|
10
9
|
._1bah1h6o{justify-content:center}
|
|
11
10
|
._1bsb1osq{width:100%}
|
|
11
|
+
._1e0c11p5{display:grid}
|
|
12
12
|
._1e0c1txw{display:flex}
|
|
13
13
|
._2hwxu2gc{margin-right:var(--ds-space-100,8px)}
|
|
14
14
|
._4cvr1h6o{align-items:center}
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
._syaz1gmx{color:var(--ds-text-disabled,#080f214a)}
|
|
24
24
|
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
25
25
|
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
26
|
+
._yv0ehkll{grid-template-columns:1fr}
|
|
26
27
|
._irr31dpa:hover{background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
|
|
27
28
|
._irr3ufnl:hover{background-color:var(--ds-background-selected-hovered,#cfe1fd)}
|
|
28
29
|
._1di6fcek:active{background-color:var(--ds-background-neutral-subtle-pressed,#0b120e24)}
|
|
@@ -46,7 +46,7 @@ var SMART_LINK_DISPLAY_AS_PASTE_MENU_SECTION_KEY = exports.SMART_LINK_DISPLAY_AS
|
|
|
46
46
|
|
|
47
47
|
var styles = {
|
|
48
48
|
appearanceBox: "_2rko1qi0 _bfhkhfxm _19pku2gc _2hwxu2gc _otyru2gc _18u0u2gc _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66",
|
|
49
|
-
iconWrapper: "
|
|
49
|
+
iconWrapper: "_1e0c11p5 _yv0ehkll _1bsb1osq",
|
|
50
50
|
iconButton: "_2rko1qi0 _1h6d1l7x _1dqonqa1 _189ee4h9 _4cvr1h6o _syazi7uo _1e0c1txw _4t3izwfg _1bah1h6o _1bsb1osq _bfhksm61 _irr31dpa _1di6fcek",
|
|
51
51
|
iconButtonSelected: "_2rko1qi0 _1h6dq98m _1dqonqa1 _189ee4h9 _4cvr1h6o _bfhk15s3 _syazi7uo _1e0c1txw _4t3izwfg _1bah1h6o _1bsb1osq _irr3ufnl _1di6nozp",
|
|
52
52
|
iconButtonDisabled: "_2rko1qi0 _1h6dbk0g _1dqonqa1 _189ee4h9 _4cvr1h6o _bfhk187o _syaz1gmx _1e0c1txw _4t3izwfg _1bah1h6o _1bsb1osq"
|
|
@@ -60,6 +60,9 @@ var AppearanceOptionIconButton = function AppearanceOptionIconButton(_ref) {
|
|
|
60
60
|
onClick = _ref.onClick;
|
|
61
61
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
62
62
|
xcss: styles.iconWrapper
|
|
63
|
+
}, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
|
|
64
|
+
content: label,
|
|
65
|
+
position: "bottom"
|
|
63
66
|
}, /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
|
|
64
67
|
xcss: (0, _css.cx)(styles.iconButton, isDisabled && styles.iconButtonDisabled, !isDisabled && currentAppearance === appearance && styles.iconButtonSelected),
|
|
65
68
|
"aria-label": label,
|
|
@@ -68,7 +71,7 @@ var AppearanceOptionIconButton = function AppearanceOptionIconButton(_ref) {
|
|
|
68
71
|
onClick: onClick
|
|
69
72
|
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
70
73
|
label: label
|
|
71
|
-
})));
|
|
74
|
+
}))));
|
|
72
75
|
};
|
|
73
76
|
var InlineAppearanceIconButton = function InlineAppearanceIconButton(_ref2) {
|
|
74
77
|
var currentAppearance = _ref2.currentAppearance,
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
._18u0u2gc{margin-left:var(--ds-space-100,8px)}
|
|
7
7
|
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
8
8
|
._19pku2gc{margin-top:var(--ds-space-100,8px)}
|
|
9
|
-
._1bah1b1v{justify-content:space-around}
|
|
10
9
|
._1bah1h6o{justify-content:center}
|
|
11
10
|
._1bsb1osq{width:100%}
|
|
11
|
+
._1e0c11p5{display:grid}
|
|
12
12
|
._1e0c1txw{display:flex}
|
|
13
13
|
._2hwxu2gc{margin-right:var(--ds-space-100,8px)}
|
|
14
14
|
._4cvr1h6o{align-items:center}
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
._syaz1gmx{color:var(--ds-text-disabled,#080f214a)}
|
|
24
24
|
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
25
25
|
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
26
|
+
._yv0ehkll{grid-template-columns:1fr}
|
|
26
27
|
._irr31dpa:hover{background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
|
|
27
28
|
._irr3ufnl:hover{background-color:var(--ds-background-selected-hovered,#cfe1fd)}
|
|
28
29
|
._1di6fcek:active{background-color:var(--ds-background-neutral-subtle-pressed,#0b120e24)}
|
|
@@ -11,7 +11,7 @@ import { PASTE_MENU, useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
|
11
11
|
import { isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
12
12
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
13
13
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
14
|
-
import { ToolbarDropdownItemSection, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
14
|
+
import { ToolbarDropdownItemSection, ToolbarTooltip, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
15
15
|
import MinusIcon from '@atlaskit/icon/core/minus';
|
|
16
16
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
17
17
|
import SmartLinkEmbedIcon from '@atlaskit/icon/core/smart-link-embed';
|
|
@@ -35,7 +35,7 @@ export const SMART_LINK_DISPLAY_AS_PASTE_MENU_SECTION_KEY = 'smart-link-display-
|
|
|
35
35
|
|
|
36
36
|
const styles = {
|
|
37
37
|
appearanceBox: "_2rko1qi0 _bfhkhfxm _19pku2gc _2hwxu2gc _otyru2gc _18u0u2gc _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66",
|
|
38
|
-
iconWrapper: "
|
|
38
|
+
iconWrapper: "_1e0c11p5 _yv0ehkll _1bsb1osq",
|
|
39
39
|
iconButton: "_2rko1qi0 _1h6d1l7x _1dqonqa1 _189ee4h9 _4cvr1h6o _syazi7uo _1e0c1txw _4t3izwfg _1bah1h6o _1bsb1osq _bfhksm61 _irr31dpa _1di6fcek",
|
|
40
40
|
iconButtonSelected: "_2rko1qi0 _1h6dq98m _1dqonqa1 _189ee4h9 _4cvr1h6o _bfhk15s3 _syazi7uo _1e0c1txw _4t3izwfg _1bah1h6o _1bsb1osq _irr3ufnl _1di6nozp",
|
|
41
41
|
iconButtonDisabled: "_2rko1qi0 _1h6dbk0g _1dqonqa1 _189ee4h9 _4cvr1h6o _bfhk187o _syaz1gmx _1e0c1txw _4t3izwfg _1bah1h6o _1bsb1osq"
|
|
@@ -50,6 +50,9 @@ const AppearanceOptionIconButton = ({
|
|
|
50
50
|
}) => {
|
|
51
51
|
return /*#__PURE__*/React.createElement(Box, {
|
|
52
52
|
xcss: styles.iconWrapper
|
|
53
|
+
}, /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
54
|
+
content: label,
|
|
55
|
+
position: "bottom"
|
|
53
56
|
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
54
57
|
xcss: cx(styles.iconButton, isDisabled && styles.iconButtonDisabled, !isDisabled && currentAppearance === appearance && styles.iconButtonSelected),
|
|
55
58
|
"aria-label": label,
|
|
@@ -58,7 +61,7 @@ const AppearanceOptionIconButton = ({
|
|
|
58
61
|
onClick: onClick
|
|
59
62
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
60
63
|
label: label
|
|
61
|
-
})));
|
|
64
|
+
}))));
|
|
62
65
|
};
|
|
63
66
|
const InlineAppearanceIconButton = ({
|
|
64
67
|
currentAppearance,
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
._18u0u2gc{margin-left:var(--ds-space-100,8px)}
|
|
7
7
|
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
8
8
|
._19pku2gc{margin-top:var(--ds-space-100,8px)}
|
|
9
|
-
._1bah1b1v{justify-content:space-around}
|
|
10
9
|
._1bah1h6o{justify-content:center}
|
|
11
10
|
._1bsb1osq{width:100%}
|
|
11
|
+
._1e0c11p5{display:grid}
|
|
12
12
|
._1e0c1txw{display:flex}
|
|
13
13
|
._2hwxu2gc{margin-right:var(--ds-space-100,8px)}
|
|
14
14
|
._4cvr1h6o{align-items:center}
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
._syaz1gmx{color:var(--ds-text-disabled,#080f214a)}
|
|
24
24
|
._syazi7uo{color:var(--ds-text,#292a2e)}
|
|
25
25
|
._u5f31b66{padding-right:var(--ds-space-050,4px)}
|
|
26
|
+
._yv0ehkll{grid-template-columns:1fr}
|
|
26
27
|
._irr31dpa:hover{background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
|
|
27
28
|
._irr3ufnl:hover{background-color:var(--ds-background-selected-hovered,#cfe1fd)}
|
|
28
29
|
._1di6fcek:active{background-color:var(--ds-background-neutral-subtle-pressed,#0b120e24)}
|
|
@@ -13,7 +13,7 @@ import { PASTE_MENU, useEditorToolbar } from '@atlaskit/editor-common/toolbar';
|
|
|
13
13
|
import { isSupportedInParent } from '@atlaskit/editor-common/utils';
|
|
14
14
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
15
15
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
16
|
-
import { ToolbarDropdownItemSection, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
16
|
+
import { ToolbarDropdownItemSection, ToolbarTooltip, useToolbarDropdownMenu } from '@atlaskit/editor-toolbar';
|
|
17
17
|
import MinusIcon from '@atlaskit/icon/core/minus';
|
|
18
18
|
import SmartLinkCardIcon from '@atlaskit/icon/core/smart-link-card';
|
|
19
19
|
import SmartLinkEmbedIcon from '@atlaskit/icon/core/smart-link-embed';
|
|
@@ -37,7 +37,7 @@ export var SMART_LINK_DISPLAY_AS_PASTE_MENU_SECTION_KEY = 'smart-link-display-as
|
|
|
37
37
|
|
|
38
38
|
var styles = {
|
|
39
39
|
appearanceBox: "_2rko1qi0 _bfhkhfxm _19pku2gc _2hwxu2gc _otyru2gc _18u0u2gc _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66",
|
|
40
|
-
iconWrapper: "
|
|
40
|
+
iconWrapper: "_1e0c11p5 _yv0ehkll _1bsb1osq",
|
|
41
41
|
iconButton: "_2rko1qi0 _1h6d1l7x _1dqonqa1 _189ee4h9 _4cvr1h6o _syazi7uo _1e0c1txw _4t3izwfg _1bah1h6o _1bsb1osq _bfhksm61 _irr31dpa _1di6fcek",
|
|
42
42
|
iconButtonSelected: "_2rko1qi0 _1h6dq98m _1dqonqa1 _189ee4h9 _4cvr1h6o _bfhk15s3 _syazi7uo _1e0c1txw _4t3izwfg _1bah1h6o _1bsb1osq _irr3ufnl _1di6nozp",
|
|
43
43
|
iconButtonDisabled: "_2rko1qi0 _1h6dbk0g _1dqonqa1 _189ee4h9 _4cvr1h6o _bfhk187o _syaz1gmx _1e0c1txw _4t3izwfg _1bah1h6o _1bsb1osq"
|
|
@@ -51,6 +51,9 @@ var AppearanceOptionIconButton = function AppearanceOptionIconButton(_ref) {
|
|
|
51
51
|
onClick = _ref.onClick;
|
|
52
52
|
return /*#__PURE__*/React.createElement(Box, {
|
|
53
53
|
xcss: styles.iconWrapper
|
|
54
|
+
}, /*#__PURE__*/React.createElement(ToolbarTooltip, {
|
|
55
|
+
content: label,
|
|
56
|
+
position: "bottom"
|
|
54
57
|
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
55
58
|
xcss: cx(styles.iconButton, isDisabled && styles.iconButtonDisabled, !isDisabled && currentAppearance === appearance && styles.iconButtonSelected),
|
|
56
59
|
"aria-label": label,
|
|
@@ -59,7 +62,7 @@ var AppearanceOptionIconButton = function AppearanceOptionIconButton(_ref) {
|
|
|
59
62
|
onClick: onClick
|
|
60
63
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
61
64
|
label: label
|
|
62
|
-
})));
|
|
65
|
+
}))));
|
|
63
66
|
};
|
|
64
67
|
var InlineAppearanceIconButton = function InlineAppearanceIconButton(_ref2) {
|
|
65
68
|
var currentAppearance = _ref2.currentAppearance,
|
|
@@ -21,7 +21,7 @@ export declare const queueCardsFromChangedTr: (state: EditorState, tr: Transacti
|
|
|
21
21
|
* links that happen to fall within the broader step range.
|
|
22
22
|
*/
|
|
23
23
|
export declare const queueCardsFromRange: (state: EditorState, tr: Transaction, from: number, to: number, source: CardReplacementInputMethod, analyticsAction?: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, appearance?: CardAppearance) => Transaction;
|
|
24
|
-
export declare const queueCardFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, previousAppearance?: CardAppearance |
|
|
24
|
+
export declare const queueCardFromChangedTr: (state: EditorState, tr: Transaction, source: CardReplacementInputMethod, analyticsAction: ACTION, normalizeLinkText?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, previousAppearance?: CardAppearance | 'url') => Transaction;
|
|
25
25
|
export declare const convertHyperlinkToSmartCard: (state: EditorState, source: CardReplacementInputMethod, appearance: CardAppearance, normalizeLinkText?: boolean) => Transaction;
|
|
26
26
|
export declare const changeSelectedCardToLink: (text?: string, href?: string, sendAnalytics?: boolean, node?: Node, pos?: number, editorAnalyticsApi?: EditorAnalyticsAPI) => Command;
|
|
27
27
|
export declare const changeSelectedCardToLinkFallback: (text?: string, href?: string, sendAnalytics?: boolean, node?: Node, pos?: number, editorAnalyticsApi?: EditorAnalyticsAPI) => Command;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CardPluginAction, CardPluginState } from '../types';
|
|
2
|
-
declare const _default: (state: CardPluginState, action: CardPluginAction) => CardPluginState;
|
|
3
2
|
export default _default;
|
|
3
|
+
declare function _default(state: CardPluginState, action: CardPluginAction): CardPluginState;
|
|
@@ -6,4 +6,4 @@ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
|
6
6
|
import type { BlockCardAdf, DatasourceAdf, EmbedCardAdf, InlineCardAdf } from '@atlaskit/linking-common';
|
|
7
7
|
import type { Request } from '../../types';
|
|
8
8
|
export declare const resolveWithProvider: (view: EditorView, provider: CardProvider, request: Request, options: CardOptions, editorAnalyticsApi: EditorAnalyticsAPI | undefined, createAnalyticsEvent: CreateUIAnalyticsEvent | undefined, embedCardNodeTransformer?: EmbedCardNodeTransformer) => Promise<void | DatasourceAdf<Record<string, unknown>> | InlineCardAdf | BlockCardAdf | EmbedCardAdf>;
|
|
9
|
-
export declare const handleProvider: (_:
|
|
9
|
+
export declare const handleProvider: (_: 'cardProvider', provider: Promise<CardProvider> | undefined, view: EditorView) => void;
|
|
@@ -36,7 +36,7 @@ export declare const getPluginStateWithUpdatedPos: (pluginState: CardPluginState
|
|
|
36
36
|
appearance: CardAppearance;
|
|
37
37
|
compareLinkText: boolean;
|
|
38
38
|
pos: number;
|
|
39
|
-
previousAppearance?: CardAppearance |
|
|
39
|
+
previousAppearance?: CardAppearance | 'url';
|
|
40
40
|
shouldReplaceLink?: boolean;
|
|
41
41
|
source: CardReplacementInputMethod;
|
|
42
42
|
sourceEvent?: UIAnalyticsEvent | null | undefined;
|
|
@@ -22,14 +22,14 @@ export declare const displayInfoForCard: (node: Node, info?: CardInfo) => TitleU
|
|
|
22
22
|
export declare const findCardInfo: (state: EditorState) => CardInfo | undefined;
|
|
23
23
|
export declare const isEmbedSupportedAtPosition: (currentNodePosition: number, editorState: EditorState, currentAppearance?: CardAppearance) => boolean;
|
|
24
24
|
export declare const isBlockSupportedAtPosition: (currentNodePosition: number, editorState: EditorState, currentAppearance?: CardAppearance) => boolean;
|
|
25
|
-
export declare const getResolvedAttributesFromStore: (url: string, display: string | null, store?: CardContext[
|
|
25
|
+
export declare const getResolvedAttributesFromStore: (url: string, display: string | null, store?: CardContext['store']) => Partial<ToolbarResolvedAttributes>;
|
|
26
26
|
export declare const isDatasourceConfigEditable: (datasourceId: string) => boolean;
|
|
27
27
|
/**
|
|
28
28
|
* Typeguard that checks node attributes are datasource node attributes
|
|
29
29
|
* ** WARNING ** Typeguards are not a guarantee, if the asserted type changes
|
|
30
30
|
* this function will not be updated automatically
|
|
31
31
|
*/
|
|
32
|
-
export declare const isDatasourceAdfAttributes: (attrs: Record<string, unknown> | undefined) => attrs is DatasourceNode[
|
|
32
|
+
export declare const isDatasourceAdfAttributes: (attrs: Record<string, unknown> | undefined) => attrs is DatasourceNode['attrs'];
|
|
33
33
|
/**
|
|
34
34
|
* Typeguard that checks a node is a datasource node (blockCard and has datasource attributes)
|
|
35
35
|
* ** WARNING ** Typeguards are not a guarantee, if the asserted type changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Command, FloatingToolbarCustom, FloatingToolbarItem } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { HyperlinkToolbarAppearanceProps } from './HyperlinkToolbarAppearance';
|
|
3
|
-
export declare const getCustomHyperlinkAppearanceDropdown: ({ url, intl, editorAnalyticsApi, editorPluginApi, settingsConfig, cardOptions, allowDatasource, isDatasourceView, }: Omit<HyperlinkToolbarAppearanceProps,
|
|
3
|
+
export declare const getCustomHyperlinkAppearanceDropdown: ({ url, intl, editorAnalyticsApi, editorPluginApi, settingsConfig, cardOptions, allowDatasource, isDatasourceView, }: Omit<HyperlinkToolbarAppearanceProps, 'editorState'> & {
|
|
4
4
|
allowDatasource?: boolean;
|
|
5
5
|
isDatasourceView?: boolean;
|
|
6
6
|
settingsConfig: FloatingToolbarItem<Command>;
|
|
@@ -2,7 +2,7 @@ import type { IntlShape } from 'react-intl';
|
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import type { cardPlugin } from '../../index';
|
|
5
|
-
export declare const DATASOURCE_TABLE_LAYOUTS: readonly [
|
|
5
|
+
export declare const DATASOURCE_TABLE_LAYOUTS: readonly ['full-width', 'center', 'wide'];
|
|
6
6
|
export type DatasourceTableLayout = (typeof DATASOURCE_TABLE_LAYOUTS)[number];
|
|
7
7
|
export type LayoutButtonProps = {
|
|
8
8
|
boundariesElement?: HTMLElement;
|
|
@@ -33,7 +33,7 @@ export default class ResizableEmbedCard extends React.Component<Props, State> {
|
|
|
33
33
|
layout: RichMediaLayout;
|
|
34
34
|
width: number | null;
|
|
35
35
|
};
|
|
36
|
-
calcUnwrappedLayout: (pct: number, width: number) =>
|
|
36
|
+
calcUnwrappedLayout: (pct: number, width: number) => 'center' | 'wide' | 'full-width';
|
|
37
37
|
get $pos(): ResolvedPos | null;
|
|
38
38
|
/**
|
|
39
39
|
* The maxmimum number of grid columns this node can resize to.
|
|
@@ -7,5 +7,5 @@ type ToolbarViewedEventProps = {
|
|
|
7
7
|
/**
|
|
8
8
|
* Provides analytics context and card context
|
|
9
9
|
*/
|
|
10
|
-
export declare const ToolbarViewedEvent: ({ url, display, editorView, }: ToolbarViewedEventProps & Omit<EditorAnalyticsContextProps,
|
|
10
|
+
export declare const ToolbarViewedEvent: ({ url, display, editorView, }: ToolbarViewedEventProps & Omit<EditorAnalyticsContextProps, 'children'>) => React.JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export declare const DISPLAY_AS_OPTIONS: readonly [
|
|
2
|
+
export declare const DISPLAY_AS_OPTIONS: readonly ['url', 'inline', 'block', 'embed'];
|
|
3
3
|
export type DisplayAsOption = (typeof DISPLAY_AS_OPTIONS)[number];
|
|
4
4
|
export declare const getCardAtPasteRange: (state: EditorState, pasteStartPos: number, pasteEndPos: number) => {
|
|
5
|
-
appearance: Exclude<DisplayAsOption,
|
|
5
|
+
appearance: Exclude<DisplayAsOption, 'url'>;
|
|
6
6
|
pos: number;
|
|
7
7
|
} | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "18.2.
|
|
3
|
+
"version": "18.2.13",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@atlaskit/primitives": "^22.2.0",
|
|
60
60
|
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
61
61
|
"@atlaskit/smart-card": "^45.13.0",
|
|
62
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
62
|
+
"@atlaskit/tmp-editor-statsig": "^135.3.0",
|
|
63
63
|
"@atlaskit/tokens": "^16.3.0",
|
|
64
64
|
"@babel/runtime": "^7.0.0",
|
|
65
65
|
"@emotion/react": "^11.7.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"uuid": "^3.1.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@atlaskit/editor-common": "^116.
|
|
72
|
+
"@atlaskit/editor-common": "^116.44.0",
|
|
73
73
|
"@atlaskit/link-provider": "^5.2.0",
|
|
74
74
|
"react": "^18.2.0",
|
|
75
75
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|