@atlaskit/editor-plugin-type-ahead 0.1.1 → 0.3.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,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`ef0c2a89c72`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ef0c2a89c72) - Add isTypeAheadOpen action to type-ahead plugin. Decouple placeholder plugin from editor-core.
8
+
9
+ ## 0.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`ad3c5c21079`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ad3c5c21079) - Updating all plugins with minor version to correct issue with semver.
14
+
3
15
  ## 0.1.1
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -1,9 +1,30 @@
1
- # EditorPluginTypeAhead
1
+ # Editor plugin type ahead
2
2
 
3
- Type-ahead plugin for @atlaskit/editor-core
3
+ Type ahead plugin for @atlaskit/editor-core
4
+
5
+ **Note:** This component is designed for internal Atlassian development.
6
+ External contributors will be able to use this component but will not be able to submit issues.
7
+
8
+ ## Install
9
+ ---
10
+ - **Install** - *yarn add @atlaskit/editor-plugin-type-ahead*
11
+ - **npm** - [@atlaskit/editor-plugin-type-ahead](https://www.npmjs.com/package/@atlaskit/editor-plugin-type-ahead)
12
+ - **Source** - [Bitbucket](https://bitbucket.org/atlassian/atlassian-frontend/src/master/packages/editor/editor-plugin-type-ahead)
13
+ - **Bundle** - [unpkg.com](https://unpkg.com/@atlaskit/editor-plugin-type-ahead/dist/)
4
14
 
5
15
  ## Usage
16
+ ---
17
+ **Internal use only**
18
+
19
+ @atlaskit/editor-plugin-type-ahead is intended for internal use by the @atlaskit/editor-core and as a plugin dependency of the Editor within your product.
20
+
21
+ Direct use of this component is not supported.
6
22
 
7
- `import { TypeAheadPlugin } from @atlaskit/editor-plugin-type-ahead';`
23
+ Please see [Atlaskit - Editor plugin type ahead](https://atlaskit.atlassian.com/packages/editor/editor-plugin-type-ahead) for documentation and examples for this package.
8
24
 
9
- Detailed docs and example usage can be found [here](https://atlaskit.atlassian.com/packages/editor/editor-plugin-type-ahead).
25
+ ## Support
26
+ ---
27
+ For internal Atlassian, visit the slack channel [#help-editor](https://atlassian.slack.com/archives/CFG3PSQ9E) for support or visit [go/editor-help](https://go/editor-help) to submit a bug.
28
+ ## License
29
+ ---
30
+ Please see [Atlassian Frontend - License](https://developer.atlassian.com/cloud/framework/atlassian-frontend/#license) for more licensing information.
@@ -1,6 +1,7 @@
1
1
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
3
  import type { EditorCommand, NextEditorPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
4
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
5
  export type TypeAheadInputMethod = INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
5
6
  type Props = {
6
7
  triggerHandler: TypeAheadHandler;
@@ -12,8 +13,15 @@ export type TypeAheadPluginOptions = {
12
13
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
13
14
  };
14
15
  type OpenTypeAheadAtCursorType = (props: Props) => EditorCommand;
16
+ /**
17
+ * Type ahead plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
18
+ * from `@atlaskit/editor-core`.
19
+ */
15
20
  export type TypeAheadPlugin = NextEditorPlugin<'typeAhead', {
16
21
  pluginConfiguration: TypeAheadPluginOptions | undefined;
22
+ actions: {
23
+ isOpen: (editorState: EditorState) => boolean;
24
+ };
17
25
  commands: {
18
26
  openTypeAheadAtCursor: OpenTypeAheadAtCursorType;
19
27
  };
@@ -1,6 +1,7 @@
1
1
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
2
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
3
  import type { EditorCommand, NextEditorPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
4
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
5
  export type TypeAheadInputMethod = INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
5
6
  type Props = {
6
7
  triggerHandler: TypeAheadHandler;
@@ -12,8 +13,15 @@ export type TypeAheadPluginOptions = {
12
13
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
13
14
  };
14
15
  type OpenTypeAheadAtCursorType = (props: Props) => EditorCommand;
16
+ /**
17
+ * Type ahead plugin to be added to an `EditorPresetBuilder` and used with `ComposableEditor`
18
+ * from `@atlaskit/editor-core`.
19
+ */
15
20
  export type TypeAheadPlugin = NextEditorPlugin<'typeAhead', {
16
21
  pluginConfiguration: TypeAheadPluginOptions | undefined;
22
+ actions: {
23
+ isOpen: (editorState: EditorState) => boolean;
24
+ };
17
25
  commands: {
18
26
  openTypeAheadAtCursor: OpenTypeAheadAtCursorType;
19
27
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "0.1.1",
3
+ "version": "0.3.0",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -8,7 +8,7 @@
8
8
  "registry": "https://registry.npmjs.org/"
9
9
  },
10
10
  "atlassian": {
11
- "team": "Editor",
11
+ "team": "Editor: Lego",
12
12
  "releaseModel": "continuous",
13
13
  "singleton": true
14
14
  },
@@ -31,7 +31,8 @@
31
31
  ".": "./src/index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/editor-common": "^74.52.0",
34
+ "@atlaskit/editor-common": "^74.56.0",
35
+ "@atlaskit/editor-prosemirror": "1.1.0",
35
36
  "@babel/runtime": "^7.0.0"
36
37
  },
37
38
  "peerDependencies": {
package/report.api.md CHANGED
@@ -17,6 +17,7 @@
17
17
  ```ts
18
18
  import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
19
19
  import type { EditorCommand } from '@atlaskit/editor-common/types';
20
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
20
21
  import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
21
22
  import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
22
23
  import type { TypeAheadHandler } from '@atlaskit/editor-common/types';
@@ -38,11 +39,14 @@ export type TypeAheadInputMethod =
38
39
  | INPUT_METHOD.QUICK_INSERT
39
40
  | INPUT_METHOD.TOOLBAR;
40
41
 
41
- // @public (undocumented)
42
+ // @public
42
43
  export type TypeAheadPlugin = NextEditorPlugin<
43
44
  'typeAhead',
44
45
  {
45
46
  pluginConfiguration: TypeAheadPluginOptions | undefined;
47
+ actions: {
48
+ isOpen: (editorState: EditorState) => boolean;
49
+ };
46
50
  commands: {
47
51
  openTypeAheadAtCursor: OpenTypeAheadAtCursorType;
48
52
  };
@@ -0,0 +1,46 @@
1
+ ## API Report File for "@atlaskit/editor-plugin-type-ahead"
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 { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
8
+ import type { EditorCommand } from '@atlaskit/editor-common/types';
9
+ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
10
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
11
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
12
+ import type { TypeAheadHandler } from '@atlaskit/editor-common/types';
13
+
14
+ // @public (undocumented)
15
+ type OpenTypeAheadAtCursorType = (props: Props) => EditorCommand;
16
+
17
+ // @public (undocumented)
18
+ type Props = {
19
+ triggerHandler: TypeAheadHandler;
20
+ inputMethod: TypeAheadInputMethod;
21
+ query?: string;
22
+ };
23
+
24
+ // @public (undocumented)
25
+ export type TypeAheadInputMethod = INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
26
+
27
+ // @public
28
+ export type TypeAheadPlugin = NextEditorPlugin<'typeAhead', {
29
+ pluginConfiguration: TypeAheadPluginOptions | undefined;
30
+ actions: {
31
+ isOpen: (editorState: EditorState) => boolean;
32
+ };
33
+ commands: {
34
+ openTypeAheadAtCursor: OpenTypeAheadAtCursorType;
35
+ };
36
+ }>;
37
+
38
+ // @public (undocumented)
39
+ export type TypeAheadPluginOptions = {
40
+ isMobile?: boolean;
41
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
42
+ };
43
+
44
+ // (No @packageDocumentation comment for this package)
45
+
46
+ ```