@atlaskit/editor-plugin-hyperlink 0.0.0 → 0.1.0

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 CHANGED
@@ -1 +1 @@
1
- # @atlaskit/editor-plugin-hyperlink
1
+ # @atlaskit/editor-plugin-hyperlink
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-hyperlink",
3
- "version": "0.0.0",
3
+ "version": "0.1.0",
4
4
  "description": "Hyperlink plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,12 +33,12 @@
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^26.1.0",
35
35
  "@atlaskit/analytics-next": "^9.1.0",
36
- "@atlaskit/editor-common": "^74.17.0",
36
+ "@atlaskit/editor-common": "^74.20.0",
37
37
  "@atlaskit/editor-plugin-analytics": "^0.1.0",
38
38
  "@atlaskit/editor-plugin-feature-flags": "^0.1.0",
39
39
  "@atlaskit/icon": "^21.12.0",
40
40
  "@atlaskit/platform-feature-flags": "^0.2.0",
41
- "@atlaskit/prosemirror-input-rules": "^2.2.0",
41
+ "@atlaskit/prosemirror-input-rules": "^2.3.0",
42
42
  "@babel/runtime": "^7.0.0",
43
43
  "prosemirror-keymap": "1.1.4",
44
44
  "prosemirror-model": "1.16.0",
@@ -1,68 +1,105 @@
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 { EditorState } from 'prosemirror-state';
10
- import { EditorView } from 'prosemirror-view';
11
- import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
12
- import { FloatingToolbarItem } from '@atlaskit/editor-common/types';
13
- import type { HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
14
- import type { HyperlinkState } from '@atlaskit/editor-common/link';
15
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
16
- import type { IntlShape } from 'react-intl-next';
17
- import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
18
- import type { OptionalPlugin } from '@atlaskit/editor-common/types';
19
- import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
20
- import type { QueueCardsFromTransactionAction } from '@atlaskit/editor-common/card';
21
- import { Transaction } from 'prosemirror-state';
22
-
23
- // @public (undocumented)
24
- type GetToolbarItems = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory, link: string) => FloatingToolbarItem<any>[];
25
-
26
- // @public (undocumented)
27
- export type HideLinkToolbar = (tr: Transaction) => Transaction;
28
-
29
- // @public (undocumented)
30
- export const hyperlinkPlugin: NextEditorPlugin<'hyperlink', {
31
- pluginConfiguration: HyperlinkPluginOptions | undefined;
32
- dependencies: [
33
- typeof featureFlagsPlugin,
34
- OptionalPlugin<typeof analyticsPlugin>
35
- ];
36
- actions: {
37
- prependToolbarButtons: PrependToolbarButtons;
38
- showLinkToolbar: ShowLinkToolbar;
39
- hideLinkToolbar: HideLinkToolbar;
40
- };
41
- sharedState: HyperlinkState | undefined;
42
- }>;
43
-
44
- // @public (undocumented)
45
- type HyperlinkToolbarItemsState = {
46
- items: GetToolbarItems;
47
- onEscapeCallback: ((tr: Transaction) => Transaction) | undefined;
48
- onInsertLinkCallback: QueueCardsFromTransactionAction | undefined;
49
- };
50
-
51
- // @public (undocumented)
52
- type InputMethod = INPUT_METHOD.INSERT_MENU | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.SHORTCUT | INPUT_METHOD.TOOLBAR;
53
-
54
- // @public (undocumented)
55
- export type PrependToolbarButtons = (props: PrependToolbarButtonsProps) => void;
56
-
57
- // @public (undocumented)
58
- interface PrependToolbarButtonsProps extends HyperlinkToolbarItemsState {
59
- // (undocumented)
60
- view: EditorView;
61
- }
62
-
63
- // @public (undocumented)
64
- export type ShowLinkToolbar = (inputMethod: InputMethod) => Command;
65
-
66
- // (No @packageDocumentation comment for this package)
67
-
68
- ```
1
+ <!-- API Report Version: 2.3 -->
2
+
3
+ ## API Report File for "@atlaskit/editor-plugin-hyperlink"
4
+
5
+ > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
6
+ > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
+
8
+ ### Table of contents
9
+
10
+ - [Main Entry Types](#main-entry-types)
11
+ - [Peer Dependencies](#peer-dependencies)
12
+
13
+ ### Main Entry Types
14
+
15
+ <!--SECTION START: Main Entry Types-->
16
+
17
+ ```ts
18
+ import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
19
+ import type { Command } from '@atlaskit/editor-common/types';
20
+ import { EditorState } from 'prosemirror-state';
21
+ import { EditorView } from 'prosemirror-view';
22
+ import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
23
+ import { FloatingToolbarItem } from '@atlaskit/editor-common/types';
24
+ import type { HyperlinkPluginOptions } from '@atlaskit/editor-common/types';
25
+ import type { HyperlinkState } from '@atlaskit/editor-common/link';
26
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
27
+ import type { IntlShape } from 'react-intl-next';
28
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
29
+ import type { OptionalPlugin } from '@atlaskit/editor-common/types';
30
+ import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
31
+ import type { QueueCardsFromTransactionAction } from '@atlaskit/editor-common/card';
32
+ import { Transaction } from 'prosemirror-state';
33
+
34
+ // @public (undocumented)
35
+ type GetToolbarItems = (
36
+ state: EditorState,
37
+ intl: IntlShape,
38
+ providerFactory: ProviderFactory,
39
+ link: string,
40
+ ) => FloatingToolbarItem<any>[];
41
+
42
+ // @public (undocumented)
43
+ export type HideLinkToolbar = (tr: Transaction) => Transaction;
44
+
45
+ // @public (undocumented)
46
+ export const hyperlinkPlugin: NextEditorPlugin<
47
+ 'hyperlink',
48
+ {
49
+ pluginConfiguration: HyperlinkPluginOptions | undefined;
50
+ dependencies: [
51
+ typeof featureFlagsPlugin,
52
+ OptionalPlugin<typeof analyticsPlugin>,
53
+ ];
54
+ actions: {
55
+ prependToolbarButtons: PrependToolbarButtons;
56
+ showLinkToolbar: ShowLinkToolbar;
57
+ hideLinkToolbar: HideLinkToolbar;
58
+ };
59
+ sharedState: HyperlinkState | undefined;
60
+ }
61
+ >;
62
+
63
+ // @public (undocumented)
64
+ type HyperlinkToolbarItemsState = {
65
+ items: GetToolbarItems;
66
+ onEscapeCallback: ((tr: Transaction) => Transaction) | undefined;
67
+ onInsertLinkCallback: QueueCardsFromTransactionAction | undefined;
68
+ };
69
+
70
+ // @public (undocumented)
71
+ type InputMethod =
72
+ | INPUT_METHOD.INSERT_MENU
73
+ | INPUT_METHOD.QUICK_INSERT
74
+ | INPUT_METHOD.SHORTCUT
75
+ | INPUT_METHOD.TOOLBAR;
76
+
77
+ // @public (undocumented)
78
+ export type PrependToolbarButtons = (props: PrependToolbarButtonsProps) => void;
79
+
80
+ // @public (undocumented)
81
+ interface PrependToolbarButtonsProps extends HyperlinkToolbarItemsState {
82
+ // (undocumented)
83
+ view: EditorView;
84
+ }
85
+
86
+ // @public (undocumented)
87
+ export type ShowLinkToolbar = (inputMethod: InputMethod) => Command;
88
+
89
+ // (No @packageDocumentation comment for this package)
90
+ ```
91
+
92
+ <!--SECTION END: Main Entry Types-->
93
+
94
+ ### Peer Dependencies
95
+
96
+ <!--SECTION START: Peer Dependencies-->
97
+
98
+ ```json
99
+ {
100
+ "react": "^16.8.0",
101
+ "react-intl-next": "npm:react-intl@^5.18.1"
102
+ }
103
+ ```
104
+
105
+ <!--SECTION END: Peer Dependencies-->