@atlaskit/editor-plugin-hyperlink 1.7.2 → 2.0.1
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/.eslintrc.js +3 -3
- package/CHANGELOG.md +348 -333
- package/LICENSE.md +6 -8
- package/dist/cjs/Toolbar.js +16 -32
- package/dist/cjs/commands.js +20 -19
- package/dist/cjs/plugin.js +9 -5
- package/dist/cjs/pm-plugins/toolbar-buttons.js +4 -69
- package/dist/es2019/Toolbar.js +15 -21
- package/dist/es2019/commands.js +8 -10
- package/dist/es2019/plugin.js +10 -6
- package/dist/es2019/pm-plugins/toolbar-buttons.js +3 -75
- package/dist/esm/Toolbar.js +15 -31
- package/dist/esm/commands.js +20 -19
- package/dist/esm/plugin.js +10 -6
- package/dist/esm/pm-plugins/toolbar-buttons.js +3 -68
- package/dist/types/Toolbar.d.ts +1 -5
- package/dist/types/commands.d.ts +4 -3
- package/dist/types/index.d.ts +0 -1
- package/dist/types/plugin.d.ts +2 -15
- package/dist/types/pm-plugins/toolbar-buttons.d.ts +3 -30
- package/dist/types-ts4.5/Toolbar.d.ts +1 -5
- package/dist/types-ts4.5/commands.d.ts +4 -3
- package/dist/types-ts4.5/index.d.ts +0 -1
- package/dist/types-ts4.5/plugin.d.ts +3 -15
- package/dist/types-ts4.5/pm-plugins/toolbar-buttons.d.ts +3 -30
- package/package.json +3 -4
- package/report.api.md +38 -47
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/editor-plugin-hyperlink"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -36,10 +37,10 @@ import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
36
37
|
|
|
37
38
|
// @public (undocumented)
|
|
38
39
|
type GetToolbarItems = (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
state: EditorState,
|
|
41
|
+
intl: IntlShape,
|
|
42
|
+
providerFactory: ProviderFactory,
|
|
43
|
+
link: string,
|
|
43
44
|
) => FloatingToolbarItem<any>[];
|
|
44
45
|
|
|
45
46
|
// @public (undocumented)
|
|
@@ -47,24 +48,21 @@ export type HideLinkToolbar = (tr: Transaction) => Transaction;
|
|
|
47
48
|
|
|
48
49
|
// @public (undocumented)
|
|
49
50
|
export type HyperlinkPlugin = NextEditorPlugin<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
sharedState: HyperlinkState | undefined;
|
|
67
|
-
}
|
|
51
|
+
'hyperlink',
|
|
52
|
+
{
|
|
53
|
+
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
54
|
+
dependencies: [OptionalPlugin<FeatureFlagsPlugin>, OptionalPlugin<AnalyticsPlugin>];
|
|
55
|
+
actions: {
|
|
56
|
+
prependToolbarButtons: PrependToolbarButtons;
|
|
57
|
+
hideLinkToolbar: HideLinkToolbar;
|
|
58
|
+
insertLink: InsertLink;
|
|
59
|
+
updateLink: UpdateLink;
|
|
60
|
+
};
|
|
61
|
+
commands: {
|
|
62
|
+
showLinkToolbar: ShowLinkToolbar;
|
|
63
|
+
};
|
|
64
|
+
sharedState: HyperlinkState | undefined;
|
|
65
|
+
}
|
|
68
66
|
>;
|
|
69
67
|
|
|
70
68
|
// @public
|
|
@@ -73,27 +71,25 @@ export const hyperlinkPlugin: HyperlinkPlugin;
|
|
|
73
71
|
// @public (undocumented)
|
|
74
72
|
type HyperlinkToolbarItemsState = {
|
|
75
73
|
items: GetToolbarItems;
|
|
76
|
-
onEscapeCallback: ((tr: Transaction) => Transaction) | undefined;
|
|
77
|
-
onInsertLinkCallback: QueueCardsFromTransactionAction | undefined;
|
|
78
74
|
};
|
|
79
75
|
|
|
80
76
|
// @public (undocumented)
|
|
81
77
|
type InputMethod =
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
| INPUT_METHOD.INSERT_MENU
|
|
79
|
+
| INPUT_METHOD.QUICK_INSERT
|
|
80
|
+
| INPUT_METHOD.SHORTCUT
|
|
81
|
+
| INPUT_METHOD.TOOLBAR;
|
|
86
82
|
|
|
87
83
|
// @public (undocumented)
|
|
88
84
|
export type InsertLink = (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
85
|
+
inputMethod: LinkInputType,
|
|
86
|
+
from: number,
|
|
87
|
+
to: number,
|
|
88
|
+
href: string,
|
|
89
|
+
title?: string,
|
|
90
|
+
displayText?: string,
|
|
91
|
+
cardsAvailable?: boolean,
|
|
92
|
+
sourceEvent?: UIAnalyticsEvent | null | undefined,
|
|
97
93
|
) => Command;
|
|
98
94
|
|
|
99
95
|
// @public (undocumented)
|
|
@@ -101,20 +97,15 @@ export type PrependToolbarButtons = (props: PrependToolbarButtonsProps) => void;
|
|
|
101
97
|
|
|
102
98
|
// @public (undocumented)
|
|
103
99
|
interface PrependToolbarButtonsProps extends HyperlinkToolbarItemsState {
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
// (undocumented)
|
|
101
|
+
view: EditorView;
|
|
106
102
|
}
|
|
107
103
|
|
|
108
104
|
// @public (undocumented)
|
|
109
105
|
export type ShowLinkToolbar = (inputMethod: InputMethod) => EditorCommand;
|
|
110
106
|
|
|
111
107
|
// @public (undocumented)
|
|
112
|
-
export type UpdateLink = (
|
|
113
|
-
href: string,
|
|
114
|
-
text: string,
|
|
115
|
-
pos: number,
|
|
116
|
-
to?: number,
|
|
117
|
-
) => Command;
|
|
108
|
+
export type UpdateLink = (href: string, text: string, pos: number, to?: number) => Command;
|
|
118
109
|
|
|
119
110
|
// (No @packageDocumentation comment for this package)
|
|
120
111
|
```
|
|
@@ -127,8 +118,8 @@ export type UpdateLink = (
|
|
|
127
118
|
|
|
128
119
|
```json
|
|
129
120
|
{
|
|
130
|
-
|
|
131
|
-
|
|
121
|
+
"react": "^16.8.0",
|
|
122
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
132
123
|
}
|
|
133
124
|
```
|
|
134
125
|
|