@atlaskit/editor-plugin-card 18.2.11 → 18.2.12
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 +6 -0
- 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
|
@@ -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.12",
|
|
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.0.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.41.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"
|