@atlaskit/editor-plugin-quick-insert 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.
Files changed (52) hide show
  1. package/.eslintrc.js +14 -0
  2. package/CHANGELOG.md +1 -0
  3. package/LICENSE.md +13 -0
  4. package/README.md +30 -0
  5. package/dist/cjs/commands.js +44 -0
  6. package/dist/cjs/index.js +12 -0
  7. package/dist/cjs/plugin-key.js +9 -0
  8. package/dist/cjs/plugin.js +188 -0
  9. package/dist/cjs/search.js +33 -0
  10. package/dist/cjs/ui/ModalElementBrowser/ModalElementBrowser.js +159 -0
  11. package/dist/cjs/ui/ModalElementBrowser/categories.js +100 -0
  12. package/dist/cjs/ui/ModalElementBrowser/index.js +61 -0
  13. package/dist/cjs/ui/ModalElementBrowser/messages.js +15 -0
  14. package/dist/es2019/commands.js +29 -0
  15. package/dist/es2019/index.js +1 -0
  16. package/dist/es2019/plugin-key.js +2 -0
  17. package/dist/es2019/plugin.js +150 -0
  18. package/dist/es2019/search.js +16 -0
  19. package/dist/es2019/ui/ModalElementBrowser/ModalElementBrowser.js +136 -0
  20. package/dist/es2019/ui/ModalElementBrowser/categories.js +94 -0
  21. package/dist/es2019/ui/ModalElementBrowser/index.js +51 -0
  22. package/dist/es2019/ui/ModalElementBrowser/messages.js +8 -0
  23. package/dist/esm/commands.js +35 -0
  24. package/dist/esm/index.js +1 -0
  25. package/dist/esm/plugin-key.js +2 -0
  26. package/dist/esm/plugin.js +180 -0
  27. package/dist/esm/search.js +25 -0
  28. package/dist/esm/ui/ModalElementBrowser/ModalElementBrowser.js +146 -0
  29. package/dist/esm/ui/ModalElementBrowser/categories.js +94 -0
  30. package/dist/esm/ui/ModalElementBrowser/index.js +50 -0
  31. package/dist/esm/ui/ModalElementBrowser/messages.js +8 -0
  32. package/dist/types/commands.d.ts +5 -0
  33. package/dist/types/index.d.ts +2 -0
  34. package/dist/types/plugin-key.d.ts +3 -0
  35. package/dist/types/plugin.d.ts +15 -0
  36. package/dist/types/search.d.ts +5 -0
  37. package/dist/types/ui/ModalElementBrowser/ModalElementBrowser.d.ts +18 -0
  38. package/dist/types/ui/ModalElementBrowser/categories.d.ts +5 -0
  39. package/dist/types/ui/ModalElementBrowser/index.d.ts +11 -0
  40. package/dist/types/ui/ModalElementBrowser/messages.d.ts +7 -0
  41. package/dist/types-ts4.5/commands.d.ts +5 -0
  42. package/dist/types-ts4.5/index.d.ts +2 -0
  43. package/dist/types-ts4.5/plugin-key.d.ts +3 -0
  44. package/dist/types-ts4.5/plugin.d.ts +15 -0
  45. package/dist/types-ts4.5/search.d.ts +5 -0
  46. package/dist/types-ts4.5/ui/ModalElementBrowser/ModalElementBrowser.d.ts +18 -0
  47. package/dist/types-ts4.5/ui/ModalElementBrowser/categories.d.ts +5 -0
  48. package/dist/types-ts4.5/ui/ModalElementBrowser/index.d.ts +11 -0
  49. package/dist/types-ts4.5/ui/ModalElementBrowser/messages.d.ts +7 -0
  50. package/package.json +99 -0
  51. package/report.api.md +63 -0
  52. package/tmp/api-report-tmp.d.ts +33 -0
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
3
+ import type { EditorView } from '@atlaskit/editor-prosemirror/view';
4
+ import type { QuickInsertPlugin } from '../../index';
5
+ type Props = {
6
+ editorView: EditorView;
7
+ helpUrl: string | undefined;
8
+ pluginInjectionAPI: ExtractInjectionAPI<QuickInsertPlugin> | undefined;
9
+ };
10
+ declare const _default: ({ editorView, helpUrl, pluginInjectionAPI }: Props) => JSX.Element;
11
+ export default _default;
@@ -0,0 +1,7 @@
1
+ export declare const messages: {
2
+ help: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ };
package/package.json ADDED
@@ -0,0 +1,99 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-quick-insert",
3
+ "version": "0.1.0",
4
+ "description": "Quick insert 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: Lego",
12
+ "inPublicMirror": false,
13
+ "releaseModel": "continuous",
14
+ "website": {
15
+ "name": "EditorPluginQuickInsert",
16
+ "category": "Components"
17
+ }
18
+ },
19
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
20
+ "main": "dist/cjs/index.js",
21
+ "module": "dist/esm/index.js",
22
+ "module:es2019": "dist/es2019/index.js",
23
+ "types": "dist/types/index.d.ts",
24
+ "typesVersions": {
25
+ ">=4.5 <4.9": {
26
+ "*": [
27
+ "dist/types-ts4.5/*",
28
+ "dist/types-ts4.5/index.d.ts"
29
+ ]
30
+ }
31
+ },
32
+ "sideEffects": false,
33
+ "atlaskit:src": "src/index.ts",
34
+ "af:exports": {
35
+ ".": "./src/index.ts"
36
+ },
37
+ "dependencies": {
38
+ "@atlaskit/button": "^16.10.0",
39
+ "@atlaskit/editor-common": "^75.0.6",
40
+ "@atlaskit/editor-prosemirror": "1.1.0",
41
+ "@atlaskit/icon": "^21.12.0",
42
+ "@atlaskit/modal-dialog": "^12.6.0",
43
+ "@atlaskit/theme": "^12.6.0",
44
+ "@atlaskit/tokens": "^1.21.0",
45
+ "@babel/runtime": "^7.0.0",
46
+ "@emotion/react": "^11.7.1"
47
+ },
48
+ "peerDependencies": {
49
+ "react": "^16.8.0",
50
+ "react-intl-next": "npm:react-intl@^5.18.1"
51
+ },
52
+ "devDependencies": {
53
+ "@af/visual-regression": "*",
54
+ "@atlaskit/ssr": "*",
55
+ "@atlaskit/visual-regression": "*",
56
+ "@atlaskit/webdriver-runner": "*",
57
+ "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
58
+ "@testing-library/react": "^12.1.5",
59
+ "react-dom": "^16.8.0",
60
+ "typescript": "~4.9.5",
61
+ "wait-for-expect": "^1.2.0"
62
+ },
63
+ "techstack": {
64
+ "@atlassian/frontend": {
65
+ "import-structure": [
66
+ "atlassian-conventions"
67
+ ],
68
+ "circular-dependencies": [
69
+ "file-and-folder-level"
70
+ ]
71
+ },
72
+ "@repo/internal": {
73
+ "dom-events": "use-bind-event-listener",
74
+ "analytics": [
75
+ "analytics-next"
76
+ ],
77
+ "design-tokens": [
78
+ "color"
79
+ ],
80
+ "theming": [
81
+ "react-context"
82
+ ],
83
+ "ui-components": [
84
+ "lite-mode"
85
+ ],
86
+ "deprecation": [
87
+ "no-deprecated-imports"
88
+ ],
89
+ "styling": [
90
+ "static",
91
+ "emotion"
92
+ ],
93
+ "imports": [
94
+ "import-no-extraneous-disable-for-examples-and-docs"
95
+ ]
96
+ }
97
+ },
98
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
99
+ }
package/report.api.md ADDED
@@ -0,0 +1,63 @@
1
+ <!-- API Report Version: 2.3 -->
2
+
3
+ ## API Report File for "@atlaskit/editor-plugin-quick-insert"
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 { Command } from '@atlaskit/editor-common/types';
19
+ import type { EditorCommand } from '@atlaskit/editor-common/types';
20
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
21
+ import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
22
+ import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
23
+ import type { QuickInsertSearchOptions } from '@atlaskit/editor-common/types';
24
+ import type { QuickInsertSharedState } from '@atlaskit/editor-common/types';
25
+
26
+ // @public (undocumented)
27
+ export type QuickInsertPlugin = NextEditorPlugin<
28
+ 'quickInsert',
29
+ {
30
+ pluginConfiguration: QuickInsertPluginOptions | undefined;
31
+ sharedState: QuickInsertSharedState | null;
32
+ actions: {
33
+ insertItem: (item: QuickInsertItem) => Command;
34
+ getSuggestions: (
35
+ searchOptions: QuickInsertSearchOptions,
36
+ ) => QuickInsertItem[];
37
+ };
38
+ commands: {
39
+ openElementBrowserModal: EditorCommand;
40
+ };
41
+ }
42
+ >;
43
+
44
+ // @public (undocumented)
45
+ export const quickInsertPlugin: QuickInsertPlugin;
46
+
47
+ // (No @packageDocumentation comment for this package)
48
+ ```
49
+
50
+ <!--SECTION END: Main Entry Types-->
51
+
52
+ ### Peer Dependencies
53
+
54
+ <!--SECTION START: Peer Dependencies-->
55
+
56
+ ```json
57
+ {
58
+ "react": "^16.8.0",
59
+ "react-intl-next": "npm:react-intl@^5.18.1"
60
+ }
61
+ ```
62
+
63
+ <!--SECTION END: Peer Dependencies-->
@@ -0,0 +1,33 @@
1
+ ## API Report File for "@atlaskit/editor-plugin-quick-insert"
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 { Command } from '@atlaskit/editor-common/types';
8
+ import type { EditorCommand } from '@atlaskit/editor-common/types';
9
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
10
+ import type { QuickInsertItem } from '@atlaskit/editor-common/provider-factory';
11
+ import type { QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
12
+ import type { QuickInsertSearchOptions } from '@atlaskit/editor-common/types';
13
+ import type { QuickInsertSharedState } from '@atlaskit/editor-common/types';
14
+
15
+ // @public (undocumented)
16
+ export type QuickInsertPlugin = NextEditorPlugin<'quickInsert', {
17
+ pluginConfiguration: QuickInsertPluginOptions | undefined;
18
+ sharedState: QuickInsertSharedState | null;
19
+ actions: {
20
+ insertItem: (item: QuickInsertItem) => Command;
21
+ getSuggestions: (searchOptions: QuickInsertSearchOptions) => QuickInsertItem[];
22
+ };
23
+ commands: {
24
+ openElementBrowserModal: EditorCommand;
25
+ };
26
+ }>;
27
+
28
+ // @public (undocumented)
29
+ export const quickInsertPlugin: QuickInsertPlugin;
30
+
31
+ // (No @packageDocumentation comment for this package)
32
+
33
+ ```