@atlaskit/editor-plugin-hyperlink 0.3.3 → 0.3.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 +6 -0
- package/dist/types/plugin.d.ts +3 -6
- package/dist/types-ts4.5/plugin.d.ts +4 -4
- package/package.json +2 -3
- package/report.api.md +3 -6
- package/tmp/api-report-tmp.d.ts +0 -84
package/CHANGELOG.md
CHANGED
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import type { HyperlinkState } from '@atlaskit/editor-common/link';
|
|
2
2
|
import type { HyperlinkPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type {
|
|
4
|
-
import type
|
|
3
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
5
|
import type { HideLinkToolbar, InsertLink, ShowLinkToolbar, UpdateLink } from './commands';
|
|
6
6
|
import type { PrependToolbarButtons } from './pm-plugins/toolbar-buttons';
|
|
7
7
|
export type HyperlinkPlugin = NextEditorPlugin<'hyperlink', {
|
|
8
8
|
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
9
|
-
dependencies: [
|
|
10
|
-
typeof featureFlagsPlugin,
|
|
11
|
-
OptionalPlugin<typeof analyticsPlugin>
|
|
12
|
-
];
|
|
9
|
+
dependencies: [FeatureFlagsPlugin, OptionalPlugin<AnalyticsPlugin>];
|
|
13
10
|
actions: {
|
|
14
11
|
/**
|
|
15
12
|
* Add items to the left of the hyperlink floating toolbar
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { HyperlinkState } from '@atlaskit/editor-common/link';
|
|
2
2
|
import type { HyperlinkPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type {
|
|
4
|
-
import type
|
|
3
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
5
|
import type { HideLinkToolbar, InsertLink, ShowLinkToolbar, UpdateLink } from './commands';
|
|
6
6
|
import type { PrependToolbarButtons } from './pm-plugins/toolbar-buttons';
|
|
7
7
|
export type HyperlinkPlugin = NextEditorPlugin<'hyperlink', {
|
|
8
8
|
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
9
9
|
dependencies: [
|
|
10
|
-
|
|
11
|
-
OptionalPlugin<
|
|
10
|
+
FeatureFlagsPlugin,
|
|
11
|
+
OptionalPlugin<AnalyticsPlugin>
|
|
12
12
|
];
|
|
13
13
|
actions: {
|
|
14
14
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-hyperlink",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Hyperlink 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-feature-flags": "^0.1.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
@@ -49,7 +49,6 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
52
|
-
"@atlaskit/editor-test-helpers": "^18.11.0",
|
|
53
52
|
"@atlaskit/link-test-helpers": "^6.0.0",
|
|
54
53
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
55
54
|
"@atlaskit/ssr": "*",
|
package/report.api.md
CHANGED
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
<!--SECTION START: Main Entry Types-->
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
|
-
import type {
|
|
18
|
+
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
19
19
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
20
20
|
import type { EditorCommand } from '@atlaskit/editor-common/types';
|
|
21
21
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
22
22
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
23
|
-
import type
|
|
23
|
+
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
24
24
|
import type { FloatingToolbarItem } from '@atlaskit/editor-common/types';
|
|
25
25
|
import type { HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
|
|
26
26
|
import type { HyperlinkState } from '@atlaskit/editor-common/link';
|
|
@@ -50,10 +50,7 @@ export type HyperlinkPlugin = NextEditorPlugin<
|
|
|
50
50
|
'hyperlink',
|
|
51
51
|
{
|
|
52
52
|
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
53
|
-
dependencies: [
|
|
54
|
-
typeof featureFlagsPlugin,
|
|
55
|
-
OptionalPlugin<typeof analyticsPlugin>,
|
|
56
|
-
];
|
|
53
|
+
dependencies: [FeatureFlagsPlugin, OptionalPlugin<AnalyticsPlugin>];
|
|
57
54
|
actions: {
|
|
58
55
|
prependToolbarButtons: PrependToolbarButtons;
|
|
59
56
|
hideLinkToolbar: HideLinkToolbar;
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/editor-plugin-hyperlink"
|
|
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 type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
8
|
-
import type { Command } from '@atlaskit/editor-common/types';
|
|
9
|
-
import type { EditorCommand } from '@atlaskit/editor-common/types';
|
|
10
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
11
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
12
|
-
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
13
|
-
import type { FloatingToolbarItem } from '@atlaskit/editor-common/types';
|
|
14
|
-
import type { HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
|
|
15
|
-
import type { HyperlinkState } from '@atlaskit/editor-common/link';
|
|
16
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
17
|
-
import type { IntlShape } from 'react-intl-next';
|
|
18
|
-
import type { LinkInputType } from '@atlaskit/editor-common/types';
|
|
19
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
20
|
-
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
21
|
-
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
22
|
-
import type { QueueCardsFromTransactionAction } from '@atlaskit/editor-common/card';
|
|
23
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
24
|
-
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
25
|
-
|
|
26
|
-
// @public (undocumented)
|
|
27
|
-
type GetToolbarItems = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory, link: string) => FloatingToolbarItem<any>[];
|
|
28
|
-
|
|
29
|
-
// @public (undocumented)
|
|
30
|
-
export type HideLinkToolbar = (tr: Transaction) => Transaction;
|
|
31
|
-
|
|
32
|
-
// @public (undocumented)
|
|
33
|
-
export type HyperlinkPlugin = NextEditorPlugin<'hyperlink', {
|
|
34
|
-
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
35
|
-
dependencies: [
|
|
36
|
-
typeof featureFlagsPlugin,
|
|
37
|
-
OptionalPlugin<typeof analyticsPlugin>
|
|
38
|
-
];
|
|
39
|
-
actions: {
|
|
40
|
-
prependToolbarButtons: PrependToolbarButtons;
|
|
41
|
-
hideLinkToolbar: HideLinkToolbar;
|
|
42
|
-
insertLink: InsertLink;
|
|
43
|
-
updateLink: UpdateLink;
|
|
44
|
-
};
|
|
45
|
-
commands: {
|
|
46
|
-
showLinkToolbar: ShowLinkToolbar;
|
|
47
|
-
};
|
|
48
|
-
sharedState: HyperlinkState | undefined;
|
|
49
|
-
}>;
|
|
50
|
-
|
|
51
|
-
// @public (undocumented)
|
|
52
|
-
export const hyperlinkPlugin: HyperlinkPlugin;
|
|
53
|
-
|
|
54
|
-
// @public (undocumented)
|
|
55
|
-
type HyperlinkToolbarItemsState = {
|
|
56
|
-
items: GetToolbarItems;
|
|
57
|
-
onEscapeCallback: ((tr: Transaction) => Transaction) | undefined;
|
|
58
|
-
onInsertLinkCallback: QueueCardsFromTransactionAction | undefined;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
// @public (undocumented)
|
|
62
|
-
type InputMethod = INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TOOLBAR;
|
|
63
|
-
|
|
64
|
-
// @public (undocumented)
|
|
65
|
-
export type InsertLink = (inputMethod: LinkInputType, from: number, to: number, href: string, title?: string, displayText?: string, cardsAvailable?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined) => Command;
|
|
66
|
-
|
|
67
|
-
// @public (undocumented)
|
|
68
|
-
export type PrependToolbarButtons = (props: PrependToolbarButtonsProps) => void;
|
|
69
|
-
|
|
70
|
-
// @public (undocumented)
|
|
71
|
-
interface PrependToolbarButtonsProps extends HyperlinkToolbarItemsState {
|
|
72
|
-
// (undocumented)
|
|
73
|
-
view: EditorView;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// @public (undocumented)
|
|
77
|
-
export type ShowLinkToolbar = (inputMethod: InputMethod) => EditorCommand;
|
|
78
|
-
|
|
79
|
-
// @public (undocumented)
|
|
80
|
-
export type UpdateLink = (href: string, text: string, pos: number, to?: number) => Command;
|
|
81
|
-
|
|
82
|
-
// (No @packageDocumentation comment for this package)
|
|
83
|
-
|
|
84
|
-
```
|