@atlaskit/editor-plugin-hyperlink 13.1.14 → 13.1.16
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 +15 -0
- package/commands/package.json +1 -8
- package/dist/cjs/ui/toolbar/Toolbar.js +2 -1
- package/dist/es2019/ui/toolbar/Toolbar.js +2 -2
- package/dist/esm/ui/toolbar/Toolbar.js +2 -1
- package/hyperlinkPlugin/package.json +1 -8
- package/hyperlinkPluginType/package.json +1 -8
- package/package.json +3 -3
- package/dist/types-ts4.5/editor-commands/commands.d.ts +0 -26
- package/dist/types-ts4.5/entry-points/commands.d.ts +0 -2
- package/dist/types-ts4.5/entry-points/hyperlinkPlugin.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/hyperlinkPluginType.d.ts +0 -1
- package/dist/types-ts4.5/hyperlinkPlugin.d.ts +0 -6
- package/dist/types-ts4.5/hyperlinkPluginType.d.ts +0 -76
- package/dist/types-ts4.5/index.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/decorations.d.ts +0 -13
- package/dist/types-ts4.5/pm-plugins/fake-curor-for-toolbar-plugin-key.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/fake-cursor-for-toolbar.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/input-rule.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/toolbar-buttons.d.ts +0 -14
- package/dist/types-ts4.5/ui/PrimaryToolbarComponent.d.ts +0 -17
- package/dist/types-ts4.5/ui/toolbar/LinkButton.d.ts +0 -8
- package/dist/types-ts4.5/ui/toolbar/Toolbar.d.ts +0 -8
- package/dist/types-ts4.5/ui/toolbar-components.d.ts +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-hyperlink
|
|
2
2
|
|
|
3
|
+
## 13.1.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`027beb2f61316`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/027beb2f61316) -
|
|
8
|
+
Update smart link appearance, if and only if smart link is created from confluence editor quick
|
|
9
|
+
insert menu
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 13.1.15
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 13.1.14
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/commands/package.json
CHANGED
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/commands.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/commands.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/commands.d.ts"
|
|
17
10
|
}
|
|
@@ -288,6 +288,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(opti
|
|
|
288
288
|
var displayText = arguments.length > 2 ? arguments[2] : undefined;
|
|
289
289
|
var inputMethod = arguments.length > 3 ? arguments[3] : undefined;
|
|
290
290
|
var analytic = arguments.length > 4 ? arguments[4] : undefined;
|
|
291
|
+
var appearance = arguments.length > 5 ? arguments[5] : undefined;
|
|
291
292
|
var isEdit = isEditLink(activeLinkMark);
|
|
292
293
|
var action = isEdit ? _analytics.ACTION.UPDATED : _analytics.ACTION.INSERTED;
|
|
293
294
|
var skipAnalytics = (_toolbarKey$getState$ = (_toolbarKey$getState = _toolbarButtons.toolbarKey.getState(state)) === null || _toolbarKey$getState === void 0 ? void 0 : _toolbarKey$getState.skipAnalytics) !== null && _toolbarKey$getState$ !== void 0 ? _toolbarKey$getState$ : false;
|
|
@@ -295,7 +296,7 @@ var getToolbarConfig = exports.getToolbarConfig = function getToolbarConfig(opti
|
|
|
295
296
|
action: action,
|
|
296
297
|
inputMethod: inputMethod,
|
|
297
298
|
sourceEvent: analytic
|
|
298
|
-
}) : (0, _commands.insertLinkWithAnalytics)(inputMethod, activeLinkMark.from, activeLinkMark.to, href, editorCardActions, editorAnalyticsApi, title, displayText, skipAnalytics, analytic);
|
|
299
|
+
}) : (0, _commands.insertLinkWithAnalytics)(inputMethod, activeLinkMark.from, activeLinkMark.to, href, editorCardActions, editorAnalyticsApi, title, displayText, skipAnalytics, analytic, appearance);
|
|
299
300
|
command(view.state, view.dispatch, view);
|
|
300
301
|
view.focus();
|
|
301
302
|
}
|
|
@@ -265,7 +265,7 @@ export const getToolbarConfig = (options, pluginInjectionApi) => (state, intl, p
|
|
|
265
265
|
onClickAwayCallback: onClickAwayCallback
|
|
266
266
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
267
267
|
,
|
|
268
|
-
onSubmit: (href, title = '', displayText, inputMethod, analytic) => {
|
|
268
|
+
onSubmit: (href, title = '', displayText, inputMethod, analytic, appearance) => {
|
|
269
269
|
var _toolbarKey$getState$, _toolbarKey$getState;
|
|
270
270
|
const isEdit = isEditLink(activeLinkMark);
|
|
271
271
|
const action = isEdit ? ACTION.UPDATED : ACTION.INSERTED;
|
|
@@ -274,7 +274,7 @@ export const getToolbarConfig = (options, pluginInjectionApi) => (state, intl, p
|
|
|
274
274
|
action,
|
|
275
275
|
inputMethod,
|
|
276
276
|
sourceEvent: analytic
|
|
277
|
-
}) : insertLinkWithAnalytics(inputMethod, activeLinkMark.from, activeLinkMark.to, href, editorCardActions, editorAnalyticsApi, title, displayText, skipAnalytics, analytic);
|
|
277
|
+
}) : insertLinkWithAnalytics(inputMethod, activeLinkMark.from, activeLinkMark.to, href, editorCardActions, editorAnalyticsApi, title, displayText, skipAnalytics, analytic, appearance);
|
|
278
278
|
command(view.state, view.dispatch, view);
|
|
279
279
|
view.focus();
|
|
280
280
|
}
|
|
@@ -279,6 +279,7 @@ export var getToolbarConfig = function getToolbarConfig(options, pluginInjection
|
|
|
279
279
|
var displayText = arguments.length > 2 ? arguments[2] : undefined;
|
|
280
280
|
var inputMethod = arguments.length > 3 ? arguments[3] : undefined;
|
|
281
281
|
var analytic = arguments.length > 4 ? arguments[4] : undefined;
|
|
282
|
+
var appearance = arguments.length > 5 ? arguments[5] : undefined;
|
|
282
283
|
var isEdit = isEditLink(activeLinkMark);
|
|
283
284
|
var action = isEdit ? ACTION.UPDATED : ACTION.INSERTED;
|
|
284
285
|
var skipAnalytics = (_toolbarKey$getState$ = (_toolbarKey$getState = toolbarKey.getState(state)) === null || _toolbarKey$getState === void 0 ? void 0 : _toolbarKey$getState.skipAnalytics) !== null && _toolbarKey$getState$ !== void 0 ? _toolbarKey$getState$ : false;
|
|
@@ -286,7 +287,7 @@ export var getToolbarConfig = function getToolbarConfig(options, pluginInjection
|
|
|
286
287
|
action: action,
|
|
287
288
|
inputMethod: inputMethod,
|
|
288
289
|
sourceEvent: analytic
|
|
289
|
-
}) : insertLinkWithAnalytics(inputMethod, activeLinkMark.from, activeLinkMark.to, href, editorCardActions, editorAnalyticsApi, title, displayText, skipAnalytics, analytic);
|
|
290
|
+
}) : insertLinkWithAnalytics(inputMethod, activeLinkMark.from, activeLinkMark.to, href, editorCardActions, editorAnalyticsApi, title, displayText, skipAnalytics, analytic, appearance);
|
|
290
291
|
command(view.state, view.dispatch, view);
|
|
291
292
|
view.focus();
|
|
292
293
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/hyperlinkPlugin.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/hyperlinkPlugin.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/hyperlinkPlugin.d.ts"
|
|
17
10
|
}
|
|
@@ -6,12 +6,5 @@
|
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.compiled.css"
|
|
8
8
|
],
|
|
9
|
-
"types": "../dist/types/entry-points/hyperlinkPluginType.d.ts"
|
|
10
|
-
"typesVersions": {
|
|
11
|
-
">=4.5 <5.9": {
|
|
12
|
-
"*": [
|
|
13
|
-
"../dist/types-ts4.5/entry-points/hyperlinkPluginType.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
|
16
|
-
}
|
|
9
|
+
"types": "../dist/types/entry-points/hyperlinkPluginType.d.ts"
|
|
17
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-hyperlink",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.16",
|
|
4
4
|
"description": "Hyperlink plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"@atlaskit/icon": "^35.4.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
47
|
"@atlaskit/prosemirror-input-rules": "^3.7.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^103.0.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"@emotion/react": "^11.7.1",
|
|
51
51
|
"uuid": "^3.1.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^115.
|
|
54
|
+
"@atlaskit/editor-common": "^115.16.0",
|
|
55
55
|
"react": "^18.2.0",
|
|
56
56
|
"react-dom": "^18.2.0",
|
|
57
57
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import { type CardPluginActions } from '@atlaskit/editor-common/card';
|
|
5
|
-
import type { CardAppearance } from '@atlaskit/editor-common/provider-factory';
|
|
6
|
-
import type { Command, EditorCommand, LinkInputType } from '@atlaskit/editor-common/types';
|
|
7
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
-
export declare function setLinkHref(href: string, pos: number, editorAnalyticsApi: EditorAnalyticsAPI | undefined, to?: number, isTabPressed?: boolean): Command;
|
|
9
|
-
export type UpdateLink = (href: string, text: string, pos: number, to?: number) => Command;
|
|
10
|
-
export declare function updateLinkEditorCommand(href: string, text: string, pos: number, to?: number): EditorCommand;
|
|
11
|
-
export declare function updateLink(href: string, text: string, pos: number, to?: number): Command;
|
|
12
|
-
export declare function insertLink(from: number, to: number, incomingHref: string, incomingTitle?: string, displayText?: string, source?: LinkInputType, sourceEvent?: UIAnalyticsEvent | null | undefined, appearance?: CardAppearance, cardApiActions?: CardPluginActions): Command;
|
|
13
|
-
export type InsertLink = (inputMethod: LinkInputType, from: number, to: number, href: string, title?: string, displayText?: string, cardsAvailable?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, appearance?: CardAppearance) => Command;
|
|
14
|
-
export declare const insertLinkWithAnalytics: (inputMethod: LinkInputType, from: number, to: number, href: string, cardActions: CardPluginActions | undefined, editorAnalyticsApi: EditorAnalyticsAPI | undefined, title?: string, displayText?: string, cardsAvailable?: boolean, sourceEvent?: UIAnalyticsEvent | null | undefined, appearance?: CardAppearance) => Command;
|
|
15
|
-
export declare function removeLink(pos: number, editorAnalyticsApi: EditorAnalyticsAPI | undefined): Command;
|
|
16
|
-
export declare function removeLinkEditorCommand(pos: number, editorAnalyticsApi: EditorAnalyticsAPI | undefined): EditorCommand;
|
|
17
|
-
export declare function editInsertedLink(editorAnalyticsApi: EditorAnalyticsAPI | undefined): Command;
|
|
18
|
-
type InputMethod = INPUT_METHOD.TOOLBAR | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.SHORTCUT | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.FLOATING_TB;
|
|
19
|
-
export type ShowLinkToolbar = (inputMethod: InputMethod) => EditorCommand;
|
|
20
|
-
export declare function showLinkToolbar(inputMethod: InputMethod, editorAnalyticsApi: EditorAnalyticsAPI | undefined): EditorCommand;
|
|
21
|
-
export declare function hideLinkToolbar(): Command;
|
|
22
|
-
export type HideLinkToolbar = (tr: Transaction) => Transaction;
|
|
23
|
-
export declare const hideLinkToolbarSetMeta: HideLinkToolbar;
|
|
24
|
-
export declare const onEscapeCallback: (cardActions?: CardPluginActions) => Command;
|
|
25
|
-
export declare const onClickAwayCallback: Command;
|
|
26
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { hyperlinkPlugin } from '../hyperlinkPlugin';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { HyperlinkPlugin, HyperlinkPluginOptions, HyperlinkPluginDependencies, HyperlinkPluginActions, HyperlinkPluginSharedState, } from '../hyperlinkPluginType';
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type { HyperlinkState } from '@atlaskit/editor-common/link';
|
|
2
|
-
import type { EditorCommand, HyperlinkPluginOptions as CommonHyperlinkPluginOptions, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
|
-
import type { CardPlugin } from '@atlaskit/editor-plugin-card';
|
|
5
|
-
import type { ConnectivityPlugin } from '@atlaskit/editor-plugin-connectivity';
|
|
6
|
-
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
7
|
-
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
8
|
-
import type { SelectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
9
|
-
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
|
|
10
|
-
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
|
|
11
|
-
import type { UserPreferencesPlugin } from '@atlaskit/editor-plugin-user-preferences';
|
|
12
|
-
import type { HideLinkToolbar, InsertLink, ShowLinkToolbar, UpdateLink } from './editor-commands/commands';
|
|
13
|
-
type HyperlinkPluginCommands = {
|
|
14
|
-
/**
|
|
15
|
-
* EditorCommand to remove the current active link.
|
|
16
|
-
*
|
|
17
|
-
* Example:
|
|
18
|
-
*
|
|
19
|
-
* ```
|
|
20
|
-
* api.core.actions.execute(
|
|
21
|
-
* api.hyperlink.commands.removeLink()
|
|
22
|
-
* )
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
removeLink: () => EditorCommand;
|
|
26
|
-
/**
|
|
27
|
-
* EditorCommand to show link toolbar.
|
|
28
|
-
*
|
|
29
|
-
* Example:
|
|
30
|
-
*
|
|
31
|
-
* ```
|
|
32
|
-
* const newTr = pluginInjectionApi?.hyperlink.commands.showLinkToolbar(
|
|
33
|
-
* inputMethod
|
|
34
|
-
* )({ tr })
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
showLinkToolbar: ShowLinkToolbar;
|
|
38
|
-
/**
|
|
39
|
-
* EditorCommand to edit the current active link.
|
|
40
|
-
*
|
|
41
|
-
* Example:
|
|
42
|
-
*
|
|
43
|
-
* ```
|
|
44
|
-
* api.core.actions.execute(
|
|
45
|
-
* api.hyperlink.commands.updateLink(href, text)
|
|
46
|
-
* )
|
|
47
|
-
* ```
|
|
48
|
-
*/
|
|
49
|
-
updateLink: (href: string, text: string) => EditorCommand;
|
|
50
|
-
};
|
|
51
|
-
export type HyperlinkPluginDependencies = [
|
|
52
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
53
|
-
OptionalPlugin<CardPlugin>,
|
|
54
|
-
OptionalPlugin<EditorViewModePlugin>,
|
|
55
|
-
OptionalPlugin<ConnectivityPlugin>,
|
|
56
|
-
OptionalPlugin<PrimaryToolbarPlugin>,
|
|
57
|
-
OptionalPlugin<SelectionToolbarPlugin>,
|
|
58
|
-
OptionalPlugin<UserPreferencesPlugin>,
|
|
59
|
-
OptionalPlugin<ToolbarPlugin>,
|
|
60
|
-
OptionalPlugin<UserIntentPlugin>
|
|
61
|
-
];
|
|
62
|
-
export type HyperlinkPluginActions = {
|
|
63
|
-
hideLinkToolbar: HideLinkToolbar;
|
|
64
|
-
insertLink: InsertLink;
|
|
65
|
-
updateLink: UpdateLink;
|
|
66
|
-
};
|
|
67
|
-
export type HyperlinkPluginOptions = CommonHyperlinkPluginOptions;
|
|
68
|
-
export type HyperlinkPluginSharedState = HyperlinkState | undefined;
|
|
69
|
-
export type HyperlinkPlugin = NextEditorPlugin<'hyperlink', {
|
|
70
|
-
actions: HyperlinkPluginActions;
|
|
71
|
-
commands: HyperlinkPluginCommands;
|
|
72
|
-
dependencies: HyperlinkPluginDependencies;
|
|
73
|
-
pluginConfiguration: HyperlinkPluginOptions | undefined;
|
|
74
|
-
sharedState: HyperlinkPluginSharedState;
|
|
75
|
-
}>;
|
|
76
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { hyperlinkPlugin } from './hyperlinkPlugin';
|
|
2
|
-
export type { HyperlinkPlugin, HyperlinkPluginOptions, HyperlinkPluginDependencies, HyperlinkPluginActions, HyperlinkPluginSharedState, } from './hyperlinkPluginType';
|
|
3
|
-
export type { HideLinkToolbar, ShowLinkToolbar, InsertLink, UpdateLink, } from './editor-commands/commands';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type MouseEvent } from 'react';
|
|
2
|
-
import { type IntlShape } from 'react-intl';
|
|
3
|
-
import { type HyperlinkState } from '@atlaskit/editor-common/link';
|
|
4
|
-
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
export declare const ButtonWrapper: ({ editorView, pos, stateKey, intl, onOpenLinkClick, }: {
|
|
7
|
-
editorView: EditorView;
|
|
8
|
-
intl: IntlShape;
|
|
9
|
-
/** Callback fired when the Open Link dropdown item is clicked */
|
|
10
|
-
onOpenLinkClick: (event: MouseEvent<HTMLAnchorElement>) => void;
|
|
11
|
-
pos?: number;
|
|
12
|
-
stateKey: PluginKey<HyperlinkState>;
|
|
13
|
-
}) => HTMLSpanElement;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { InputRuleWrapper } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
/**
|
|
6
|
-
* Called when space after link, but not on enter
|
|
7
|
-
*/
|
|
8
|
-
export declare function createLinkInputRule(regexp: RegExp, editorAnalyticsApi: EditorAnalyticsAPI | undefined): InputRuleWrapper;
|
|
9
|
-
export declare function createInputRulePlugin(schema: Schema, editorAnalyticsApi: EditorAnalyticsAPI | undefined, autoLinkOnBlur?: boolean): SafePlugin | undefined;
|
|
10
|
-
export default createInputRulePlugin;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
export declare function createKeymapPlugin(editorAnalyticsApi: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
|
|
4
|
-
export default createKeymapPlugin;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IntlShape } from 'react-intl';
|
|
2
|
-
import type { OnClickCallback } from '@atlaskit/editor-common/card';
|
|
3
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
4
|
-
import type { HyperlinkState } from '@atlaskit/editor-common/link';
|
|
5
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
6
|
-
import type { EditorAppearance, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
7
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
-
import type { HyperlinkPlugin } from '../hyperlinkPluginType';
|
|
9
|
-
export declare const stateKey: PluginKey<HyperlinkState>;
|
|
10
|
-
export declare const plugin: (dispatch: Dispatch, intl: IntlShape, editorAppearance?: EditorAppearance, _pluginInjectionApi?: ExtractInjectionAPI<HyperlinkPlugin> | undefined, _onClickCallback?: OnClickCallback, __livePage?: boolean) => SafePlugin<HyperlinkState>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export type HyperlinkToolbarItemsState = {
|
|
4
|
-
/**
|
|
5
|
-
* If you are mounting your own items to the hyperlink toolbar you may decide
|
|
6
|
-
* you want to replace the hyperlink analytics with your own
|
|
7
|
-
* Defaults to false.
|
|
8
|
-
*/
|
|
9
|
-
skipAnalytics?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare const toolbarKey: PluginKey<HyperlinkToolbarItemsState | undefined>;
|
|
12
|
-
export declare const toolbarButtonsPlugin: (initialState?: {
|
|
13
|
-
skipAnalytics: boolean;
|
|
14
|
-
}) => SafePlugin<HyperlinkToolbarItemsState | undefined>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type ComponentType, type FC } from 'react';
|
|
6
|
-
import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
|
|
7
|
-
import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
8
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
|
-
import type { HyperlinkPlugin } from '../hyperlinkPluginType';
|
|
10
|
-
type PrimaryToolbarComponentProps = {
|
|
11
|
-
api: ExtractInjectionAPI<HyperlinkPlugin> | undefined;
|
|
12
|
-
editorAnalyticsAPI?: EditorAnalyticsAPI;
|
|
13
|
-
} & WrappedComponentProps;
|
|
14
|
-
export declare const PrimaryToolbarComponent: FC<WithIntlProps<PrimaryToolbarComponentProps>> & {
|
|
15
|
-
WrappedComponent: ComponentType<PrimaryToolbarComponentProps>;
|
|
16
|
-
};
|
|
17
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { HyperlinkPlugin } from '../../hyperlinkPluginType';
|
|
4
|
-
type LinkButtonProps = {
|
|
5
|
-
api?: ExtractInjectionAPI<HyperlinkPlugin>;
|
|
6
|
-
};
|
|
7
|
-
export declare const LinkButton: ({ api }: LinkButtonProps) => React.JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { HyperlinkAddToolbarProps } from '@atlaskit/editor-common/link';
|
|
3
|
-
import type { ExtractInjectionAPI, FloatingToolbarHandler, HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { HyperlinkPlugin } from '../../hyperlinkPluginType';
|
|
5
|
-
export declare function HyperlinkAddToolbarWithState({ linkPickerOptions, onSubmit, displayText, displayUrl, providerFactory, view, onCancel, invokeMethod, lpLinkPicker, onClose, onEscapeCallback, onClickAwayCallback, pluginInjectionApi, }: HyperlinkAddToolbarProps & {
|
|
6
|
-
pluginInjectionApi: ExtractInjectionAPI<HyperlinkPlugin> | undefined;
|
|
7
|
-
}): React.JSX.Element;
|
|
8
|
-
export declare const getToolbarConfig: (options: HyperlinkPluginOptions, pluginInjectionApi: ExtractInjectionAPI<HyperlinkPlugin> | undefined) => FloatingToolbarHandler;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
|
|
3
|
-
import type { HyperlinkPlugin } from '../hyperlinkPluginType';
|
|
4
|
-
export declare const getToolbarComponents: (api?: ExtractInjectionAPI<HyperlinkPlugin>) => RegisterComponent[];
|