@atlaskit/editor-plugin-card 0.4.7 → 0.4.8
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/index.d.ts +1 -0
- package/dist/types/plugin.d.ts +14 -13
- package/dist/types/toolbar.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/plugin.d.ts +14 -13
- package/dist/types-ts4.5/toolbar.d.ts +1 -1
- package/package.json +4 -5
- package/report.api.md +16 -13
- package/tmp/api-report-tmp.d.ts +0 -190
package/CHANGELOG.md
CHANGED
package/dist/types/index.d.ts
CHANGED
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import type { CardPluginActions } from '@atlaskit/editor-common/card';
|
|
2
2
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type
|
|
3
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
+
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
5
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
6
6
|
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
7
|
+
import type { GridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
8
|
+
import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
9
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
10
|
import type { CardPluginOptions, CardPluginState } from './types';
|
|
11
|
-
export
|
|
11
|
+
export type CardPlugin = NextEditorPlugin<'card', {
|
|
12
12
|
pluginConfiguration: CardPluginOptions;
|
|
13
13
|
dependencies: [
|
|
14
|
-
|
|
15
|
-
OptionalPlugin<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
FeatureFlagsPlugin,
|
|
15
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
16
|
+
WidthPlugin,
|
|
17
|
+
DecorationsPlugin,
|
|
18
|
+
GridPlugin,
|
|
19
19
|
FloatingToolbarPlugin,
|
|
20
|
-
|
|
20
|
+
HyperlinkPlugin
|
|
21
21
|
];
|
|
22
22
|
sharedState: CardPluginState | null;
|
|
23
23
|
actions: CardPluginActions;
|
|
24
24
|
}>;
|
|
25
|
+
export declare const cardPlugin: CardPlugin;
|
package/dist/types/toolbar.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
3
3
|
import type { Command, ExtractInjectionAPI, FeatureFlags, FloatingToolbarHandler, LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
4
|
-
import { CardPlatform } from '@atlaskit/smart-card';
|
|
4
|
+
import type { CardPlatform } from '@atlaskit/smart-card';
|
|
5
5
|
import type { cardPlugin } from './index';
|
|
6
6
|
export declare const removeCard: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
7
7
|
export declare const visitCardLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import type { CardPluginActions } from '@atlaskit/editor-common/card';
|
|
2
2
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type
|
|
3
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
+
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
5
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
6
6
|
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
7
|
+
import type { GridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
8
|
+
import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
9
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
10
10
|
import type { CardPluginOptions, CardPluginState } from './types';
|
|
11
|
-
export
|
|
11
|
+
export type CardPlugin = NextEditorPlugin<'card', {
|
|
12
12
|
pluginConfiguration: CardPluginOptions;
|
|
13
13
|
dependencies: [
|
|
14
|
-
|
|
15
|
-
OptionalPlugin<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
FeatureFlagsPlugin,
|
|
15
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
16
|
+
WidthPlugin,
|
|
17
|
+
DecorationsPlugin,
|
|
18
|
+
GridPlugin,
|
|
19
19
|
FloatingToolbarPlugin,
|
|
20
|
-
|
|
20
|
+
HyperlinkPlugin
|
|
21
21
|
];
|
|
22
22
|
sharedState: CardPluginState | null;
|
|
23
23
|
actions: CardPluginActions;
|
|
24
24
|
}>;
|
|
25
|
+
export declare const cardPlugin: CardPlugin;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
3
3
|
import type { Command, ExtractInjectionAPI, FeatureFlags, FloatingToolbarHandler, LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
4
|
-
import { CardPlatform } from '@atlaskit/smart-card';
|
|
4
|
+
import type { CardPlatform } from '@atlaskit/smart-card';
|
|
5
5
|
import type { cardPlugin } from './index';
|
|
6
6
|
export declare const removeCard: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
|
7
7
|
export declare const visitCardLink: (editorAnalyticsApi: EditorAnalyticsAPI | undefined) => Command;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-card",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.8",
|
|
4
4
|
"description": "Card plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "28.1.2",
|
|
35
35
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
36
|
-
"@atlaskit/editor-common": "^74.
|
|
36
|
+
"@atlaskit/editor-common": "^74.52.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^0.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-decorations": "^0.1.0",
|
|
39
39
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"@atlaskit/link-analytics": "^8.2.0",
|
|
48
48
|
"@atlaskit/link-datasource": "^1.0.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
50
|
-
"@atlaskit/smart-card": "^26.
|
|
50
|
+
"@atlaskit/smart-card": "^26.16.0",
|
|
51
51
|
"@atlaskit/theme": "^12.5.0",
|
|
52
|
-
"@atlaskit/tokens": "^1.
|
|
52
|
+
"@atlaskit/tokens": "^1.16.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
54
54
|
"@emotion/react": "^11.7.1",
|
|
55
55
|
"lodash": "^4.17.21",
|
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
66
|
-
"@atlaskit/editor-test-helpers": "^18.11.0",
|
|
67
66
|
"@atlaskit/link-test-helpers": "^6.0.0",
|
|
68
67
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
69
68
|
"@atlaskit/ssr": "*",
|
package/report.api.md
CHANGED
|
@@ -16,26 +16,26 @@
|
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
18
|
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
19
|
-
import type {
|
|
19
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
20
20
|
import { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
21
21
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
22
22
|
import type { CardPluginActions } from '@atlaskit/editor-common/card';
|
|
23
23
|
import { CardProvider } from '@atlaskit/editor-common/provider-factory';
|
|
24
24
|
import type { CardReplacementInputMethod } from '@atlaskit/editor-common/card';
|
|
25
25
|
import type { DatasourceModalType } from '@atlaskit/editor-common/types';
|
|
26
|
-
import type {
|
|
26
|
+
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
27
27
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
28
|
-
import type
|
|
28
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
29
29
|
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
30
|
-
import type {
|
|
31
|
-
import type {
|
|
30
|
+
import type { GridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
31
|
+
import type { HyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
32
32
|
import type { LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
33
33
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
34
34
|
import { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
|
|
35
35
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
36
36
|
import { SmartLinkEvents } from '@atlaskit/smart-card';
|
|
37
37
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
38
|
-
import type {
|
|
38
|
+
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
39
39
|
|
|
40
40
|
// @public (undocumented)
|
|
41
41
|
type CardInfo = {
|
|
@@ -45,24 +45,27 @@ type CardInfo = {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
// @public (undocumented)
|
|
48
|
-
export
|
|
48
|
+
export type CardPlugin = NextEditorPlugin<
|
|
49
49
|
'card',
|
|
50
50
|
{
|
|
51
51
|
pluginConfiguration: CardPluginOptions;
|
|
52
52
|
dependencies: [
|
|
53
|
-
|
|
54
|
-
OptionalPlugin<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
FeatureFlagsPlugin,
|
|
54
|
+
OptionalPlugin<AnalyticsPlugin>,
|
|
55
|
+
WidthPlugin,
|
|
56
|
+
DecorationsPlugin,
|
|
57
|
+
GridPlugin,
|
|
58
58
|
FloatingToolbarPlugin,
|
|
59
|
-
|
|
59
|
+
HyperlinkPlugin,
|
|
60
60
|
];
|
|
61
61
|
sharedState: CardPluginState | null;
|
|
62
62
|
actions: CardPluginActions;
|
|
63
63
|
}
|
|
64
64
|
>;
|
|
65
65
|
|
|
66
|
+
// @public (undocumented)
|
|
67
|
+
export const cardPlugin: CardPlugin;
|
|
68
|
+
|
|
66
69
|
// @public (undocumented)
|
|
67
70
|
type CardPluginEvent = DatasourceEvent | LinkEvent;
|
|
68
71
|
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/editor-plugin-card"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { ACTION } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
9
|
-
import { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
10
|
-
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
11
|
-
import type { CardPluginActions } from '@atlaskit/editor-common/card';
|
|
12
|
-
import { CardProvider } from '@atlaskit/editor-common/provider-factory';
|
|
13
|
-
import type { CardReplacementInputMethod } from '@atlaskit/editor-common/card';
|
|
14
|
-
import type { DatasourceModalType } from '@atlaskit/editor-common/types';
|
|
15
|
-
import type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
16
|
-
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
17
|
-
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
18
|
-
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
19
|
-
import type { gridPlugin } from '@atlaskit/editor-plugin-grid';
|
|
20
|
-
import type { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
21
|
-
import type { LinkPickerOptions } from '@atlaskit/editor-common/types';
|
|
22
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
23
|
-
import { Node as Node_2 } from '@atlaskit/editor-prosemirror/model';
|
|
24
|
-
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
25
|
-
import { SmartLinkEvents } from '@atlaskit/smart-card';
|
|
26
|
-
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
27
|
-
import type { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
28
|
-
|
|
29
|
-
// @public (undocumented)
|
|
30
|
-
type CardInfo = {
|
|
31
|
-
title?: string;
|
|
32
|
-
url?: string;
|
|
33
|
-
pos: number;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// @public (undocumented)
|
|
37
|
-
export const cardPlugin: NextEditorPlugin<'card', {
|
|
38
|
-
pluginConfiguration: CardPluginOptions;
|
|
39
|
-
dependencies: [
|
|
40
|
-
typeof featureFlagsPlugin,
|
|
41
|
-
OptionalPlugin<typeof analyticsPlugin>,
|
|
42
|
-
typeof widthPlugin,
|
|
43
|
-
typeof decorationsPlugin,
|
|
44
|
-
typeof gridPlugin,
|
|
45
|
-
FloatingToolbarPlugin,
|
|
46
|
-
typeof hyperlinkPlugin
|
|
47
|
-
];
|
|
48
|
-
sharedState: CardPluginState | null;
|
|
49
|
-
actions: CardPluginActions;
|
|
50
|
-
}>;
|
|
51
|
-
|
|
52
|
-
// @public (undocumented)
|
|
53
|
-
type CardPluginEvent = DatasourceEvent | LinkEvent;
|
|
54
|
-
|
|
55
|
-
// @public (undocumented)
|
|
56
|
-
type CardPluginOptions = CardOptions & {
|
|
57
|
-
editorAppearance?: EditorAppearance;
|
|
58
|
-
platform: 'mobile' | 'web';
|
|
59
|
-
fullWidthMode?: boolean;
|
|
60
|
-
linkPicker?: LinkPickerOptions;
|
|
61
|
-
cardPluginEvents?: EditorCardPluginEvents<CardPluginEvent>;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
// @public (undocumented)
|
|
65
|
-
type CardPluginState = {
|
|
66
|
-
requests: Request_2[];
|
|
67
|
-
provider: CardProvider | null;
|
|
68
|
-
cards: CardInfo[];
|
|
69
|
-
showLinkingToolbar: boolean;
|
|
70
|
-
smartLinkEvents?: SmartLinkEvents;
|
|
71
|
-
editorAppearance?: EditorAppearance;
|
|
72
|
-
showDatasourceModal: boolean;
|
|
73
|
-
datasourceModalType?: DatasourceModalType;
|
|
74
|
-
datasourceTableRef?: HTMLElement;
|
|
75
|
-
layout?: DatasourceTableLayout;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
// @public (undocumented)
|
|
79
|
-
type DatasourceCreatedEvent = {
|
|
80
|
-
event: EVENT.CREATED;
|
|
81
|
-
subject: EVENT_SUBJECT.DATASOURCE;
|
|
82
|
-
data: Metadata_2;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
// @public (undocumented)
|
|
86
|
-
type DatasourceDeletedEvent = {
|
|
87
|
-
event: EVENT.DELETED;
|
|
88
|
-
subject: EVENT_SUBJECT.DATASOURCE;
|
|
89
|
-
data: Metadata_2;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
// @public (undocumented)
|
|
93
|
-
type DatasourceEvent = DatasourceCreatedEvent | DatasourceDeletedEvent | DatasourceUpdatedEvent;
|
|
94
|
-
|
|
95
|
-
// @public (undocumented)
|
|
96
|
-
type DatasourceTableLayout = 'center' | 'full-width' | 'wide';
|
|
97
|
-
|
|
98
|
-
// @public (undocumented)
|
|
99
|
-
type DatasourceUpdatedEvent = {
|
|
100
|
-
event: EVENT.UPDATED;
|
|
101
|
-
subject: EVENT_SUBJECT.DATASOURCE;
|
|
102
|
-
data: Metadata_2<UpdateMetadata>;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
// @public (undocumented)
|
|
106
|
-
type EditorCardPluginEvents<T> = {
|
|
107
|
-
push: (...events: T[]) => void;
|
|
108
|
-
subscribe: (listener: Subscriber<T>) => () => void;
|
|
109
|
-
flush: () => void;
|
|
110
|
-
getSize: () => number;
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
// @public (undocumented)
|
|
114
|
-
enum EVENT {
|
|
115
|
-
// (undocumented)
|
|
116
|
-
CREATED = "created",
|
|
117
|
-
// (undocumented)
|
|
118
|
-
DELETED = "deleted",
|
|
119
|
-
// (undocumented)
|
|
120
|
-
UPDATED = "updated"
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// @public (undocumented)
|
|
124
|
-
enum EVENT_SUBJECT {
|
|
125
|
-
// (undocumented)
|
|
126
|
-
DATASOURCE = "datasource",
|
|
127
|
-
// (undocumented)
|
|
128
|
-
LINK = "link"
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// @public
|
|
132
|
-
type LinkCreatedEvent = {
|
|
133
|
-
event: EVENT.CREATED;
|
|
134
|
-
subject: EVENT_SUBJECT.LINK;
|
|
135
|
-
data: Metadata_2;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
// @public (undocumented)
|
|
139
|
-
type LinkDeletedEvent = {
|
|
140
|
-
event: EVENT.DELETED;
|
|
141
|
-
subject: EVENT_SUBJECT.LINK;
|
|
142
|
-
data: Metadata_2;
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
// @public (undocumented)
|
|
146
|
-
type LinkEvent = LinkCreatedEvent | LinkDeletedEvent | LinkUpdatedEvent;
|
|
147
|
-
|
|
148
|
-
// @public (undocumented)
|
|
149
|
-
type LinkUpdatedEvent = {
|
|
150
|
-
event: EVENT.UPDATED;
|
|
151
|
-
subject: EVENT_SUBJECT.LINK;
|
|
152
|
-
data: Metadata_2<UpdateMetadata>;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
// @public (undocumented)
|
|
156
|
-
type Metadata_2<T = {}> = {
|
|
157
|
-
node: Node_2;
|
|
158
|
-
isUndo?: boolean;
|
|
159
|
-
isRedo?: boolean;
|
|
160
|
-
action?: string;
|
|
161
|
-
inputMethod?: string;
|
|
162
|
-
sourceEvent?: unknown;
|
|
163
|
-
nodeContext?: string;
|
|
164
|
-
} & T;
|
|
165
|
-
|
|
166
|
-
// @public (undocumented)
|
|
167
|
-
type Request_2 = {
|
|
168
|
-
pos: number;
|
|
169
|
-
url: string;
|
|
170
|
-
appearance: CardAppearance;
|
|
171
|
-
compareLinkText: boolean;
|
|
172
|
-
source: CardReplacementInputMethod;
|
|
173
|
-
previousAppearance?: 'url' | CardAppearance;
|
|
174
|
-
analyticsAction?: ACTION;
|
|
175
|
-
shouldReplaceLink?: boolean;
|
|
176
|
-
sourceEvent?: UIAnalyticsEvent | null | undefined;
|
|
177
|
-
};
|
|
178
|
-
export { Request_2 as Request }
|
|
179
|
-
|
|
180
|
-
// @public (undocumented)
|
|
181
|
-
type Subscriber<T> = (event: T) => void;
|
|
182
|
-
|
|
183
|
-
// @public (undocumented)
|
|
184
|
-
type UpdateMetadata = {
|
|
185
|
-
previousDisplay?: string;
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
// (No @packageDocumentation comment for this package)
|
|
189
|
-
|
|
190
|
-
```
|