@atlaskit/editor-plugin-type-ahead 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 ADDED
@@ -0,0 +1 @@
1
+ # @atlaskit/editor-plugin-type-ahead
package/LICENSE.md ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2023 Atlassian Pty Ltd
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # EditorPluginTypeAhead
2
+
3
+ Type-ahead plugin for @atlaskit/editor-core
4
+
5
+ ## Usage
6
+
7
+ `import { TypeAheadPlugin } from @atlaskit/editor-plugin-type-ahead';`
8
+
9
+ Detailed docs and example usage can be found [here](https://atlaskit.atlassian.com/packages/editor/editor-plugin-type-ahead).
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export type { TypeAheadPlugin, TypeAheadPluginOptions, TypeAheadInputMethod, } from './types';
@@ -0,0 +1,21 @@
1
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import type { EditorCommand, NextEditorPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
4
+ export type TypeAheadInputMethod = INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
5
+ type Props = {
6
+ triggerHandler: TypeAheadHandler;
7
+ inputMethod: TypeAheadInputMethod;
8
+ query?: string;
9
+ };
10
+ export type TypeAheadPluginOptions = {
11
+ isMobile?: boolean;
12
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
13
+ };
14
+ type OpenTypeAheadAtCursorType = (props: Props) => EditorCommand;
15
+ export type TypeAheadPlugin = NextEditorPlugin<'typeAhead', {
16
+ pluginConfiguration: TypeAheadPluginOptions | undefined;
17
+ commands: {
18
+ openTypeAheadAtCursor: OpenTypeAheadAtCursorType;
19
+ };
20
+ }>;
21
+ export {};
@@ -0,0 +1 @@
1
+ export type { TypeAheadPlugin, TypeAheadPluginOptions, TypeAheadInputMethod, } from './types';
@@ -0,0 +1,21 @@
1
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import type { EditorCommand, NextEditorPlugin, TypeAheadHandler } from '@atlaskit/editor-common/types';
4
+ export type TypeAheadInputMethod = INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
5
+ type Props = {
6
+ triggerHandler: TypeAheadHandler;
7
+ inputMethod: TypeAheadInputMethod;
8
+ query?: string;
9
+ };
10
+ export type TypeAheadPluginOptions = {
11
+ isMobile?: boolean;
12
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
13
+ };
14
+ type OpenTypeAheadAtCursorType = (props: Props) => EditorCommand;
15
+ export type TypeAheadPlugin = NextEditorPlugin<'typeAhead', {
16
+ pluginConfiguration: TypeAheadPluginOptions | undefined;
17
+ commands: {
18
+ openTypeAheadAtCursor: OpenTypeAheadAtCursorType;
19
+ };
20
+ }>;
21
+ export {};
package/package.json ADDED
@@ -0,0 +1,90 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-type-ahead",
3
+ "version": "0.1.0",
4
+ "description": "Type-ahead plugin for @atlaskit/editor-core",
5
+ "author": "Atlassian Pty Ltd",
6
+ "license": "Apache-2.0",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/"
9
+ },
10
+ "atlassian": {
11
+ "team": "Editor",
12
+ "releaseModel": "continuous",
13
+ "singleton": true
14
+ },
15
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
16
+ "main": "dist/cjs/index.js",
17
+ "module": "dist/esm/index.js",
18
+ "module:es2019": "dist/es2019/index.js",
19
+ "types": "dist/types/index.d.ts",
20
+ "typesVersions": {
21
+ ">=4.5 <4.9": {
22
+ "*": [
23
+ "dist/types-ts4.5/*",
24
+ "dist/types-ts4.5/index.d.ts"
25
+ ]
26
+ }
27
+ },
28
+ "sideEffects": false,
29
+ "atlaskit:src": "src/index.ts",
30
+ "af:exports": {
31
+ ".": "./src/index.ts"
32
+ },
33
+ "dependencies": {
34
+ "@atlaskit/editor-common": "^74.49.0",
35
+ "@babel/runtime": "^7.0.0"
36
+ },
37
+ "peerDependencies": {
38
+ "react": "^16.8.0"
39
+ },
40
+ "devDependencies": {
41
+ "@af/visual-regression": "*",
42
+ "@atlaskit/ssr": "*",
43
+ "@atlaskit/visual-regression": "*",
44
+ "@atlaskit/webdriver-runner": "*",
45
+ "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
46
+ "@testing-library/react": "^12.1.5",
47
+ "react-dom": "^16.8.0",
48
+ "typescript": "~4.9.5",
49
+ "wait-for-expect": "^1.2.0"
50
+ },
51
+ "techstack": {
52
+ "@atlassian/frontend": {
53
+ "code-structure": [
54
+ "tangerine-next"
55
+ ],
56
+ "import-structure": [
57
+ "atlassian-conventions"
58
+ ],
59
+ "circular-dependencies": [
60
+ "file-and-folder-level"
61
+ ]
62
+ },
63
+ "@repo/internal": {
64
+ "dom-events": "use-bind-event-listener",
65
+ "analytics": [
66
+ "analytics-next"
67
+ ],
68
+ "design-tokens": [
69
+ "color"
70
+ ],
71
+ "theming": [
72
+ "react-context"
73
+ ],
74
+ "ui-components": [
75
+ "lite-mode"
76
+ ],
77
+ "deprecation": [
78
+ "no-deprecated-imports"
79
+ ],
80
+ "styling": [
81
+ "static",
82
+ "emotion"
83
+ ],
84
+ "imports": [
85
+ "import-no-extraneous-disable-for-examples-and-docs"
86
+ ]
87
+ }
88
+ },
89
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
90
+ }
package/report.api.md ADDED
@@ -0,0 +1,73 @@
1
+ <!-- API Report Version: 2.3 -->
2
+
3
+ ## API Report File for "@atlaskit/editor-plugin-type-ahead"
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 { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
19
+ import type { EditorCommand } from '@atlaskit/editor-common/types';
20
+ import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
21
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
22
+ import type { TypeAheadHandler } from '@atlaskit/editor-common/types';
23
+
24
+ // @public (undocumented)
25
+ type OpenTypeAheadAtCursorType = (props: Props) => EditorCommand;
26
+
27
+ // @public (undocumented)
28
+ type Props = {
29
+ triggerHandler: TypeAheadHandler;
30
+ inputMethod: TypeAheadInputMethod;
31
+ query?: string;
32
+ };
33
+
34
+ // @public (undocumented)
35
+ export type TypeAheadInputMethod =
36
+ | INPUT_METHOD.INSERT_MENU
37
+ | INPUT_METHOD.KEYBOARD
38
+ | INPUT_METHOD.QUICK_INSERT
39
+ | INPUT_METHOD.TOOLBAR;
40
+
41
+ // @public (undocumented)
42
+ export type TypeAheadPlugin = NextEditorPlugin<
43
+ 'typeAhead',
44
+ {
45
+ pluginConfiguration: TypeAheadPluginOptions | undefined;
46
+ commands: {
47
+ openTypeAheadAtCursor: OpenTypeAheadAtCursorType;
48
+ };
49
+ }
50
+ >;
51
+
52
+ // @public (undocumented)
53
+ export type TypeAheadPluginOptions = {
54
+ isMobile?: boolean;
55
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
56
+ };
57
+
58
+ // (No @packageDocumentation comment for this package)
59
+ ```
60
+
61
+ <!--SECTION END: Main Entry Types-->
62
+
63
+ ### Peer Dependencies
64
+
65
+ <!--SECTION START: Peer Dependencies-->
66
+
67
+ ```json
68
+ {
69
+ "react": "^16.8.0"
70
+ }
71
+ ```
72
+
73
+ <!--SECTION END: Peer Dependencies-->
@@ -0,0 +1,42 @@
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 { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
10
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
11
+ import type { TypeAheadHandler } from '@atlaskit/editor-common/types';
12
+
13
+ // @public (undocumented)
14
+ type OpenTypeAheadAtCursorType = (props: Props) => EditorCommand;
15
+
16
+ // @public (undocumented)
17
+ type Props = {
18
+ triggerHandler: TypeAheadHandler;
19
+ inputMethod: TypeAheadInputMethod;
20
+ query?: string;
21
+ };
22
+
23
+ // @public (undocumented)
24
+ export type TypeAheadInputMethod = INPUT_METHOD.INSERT_MENU | INPUT_METHOD.KEYBOARD | INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR;
25
+
26
+ // @public (undocumented)
27
+ export type TypeAheadPlugin = NextEditorPlugin<'typeAhead', {
28
+ pluginConfiguration: TypeAheadPluginOptions | undefined;
29
+ commands: {
30
+ openTypeAheadAtCursor: OpenTypeAheadAtCursorType;
31
+ };
32
+ }>;
33
+
34
+ // @public (undocumented)
35
+ export type TypeAheadPluginOptions = {
36
+ isMobile?: boolean;
37
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
38
+ };
39
+
40
+ // (No @packageDocumentation comment for this package)
41
+
42
+ ```