@atlaskit/editor-plugin-panel 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/.eslintrc.js +18 -0
- package/CHANGELOG.md +1 -0
- package/LICENSE.md +13 -0
- package/README.md +30 -0
- package/dist/cjs/actions.js +125 -0
- package/dist/cjs/index.js +13 -0
- package/dist/cjs/message.js +44 -0
- package/dist/cjs/nodeviews/panel.js +94 -0
- package/dist/cjs/plugin.js +215 -0
- package/dist/cjs/pm-plugins/keymaps.js +81 -0
- package/dist/cjs/pm-plugins/main.js +28 -0
- package/dist/cjs/toolbar.js +293 -0
- package/dist/cjs/types.js +8 -0
- package/dist/cjs/utils.js +53 -0
- package/dist/es2019/actions.js +116 -0
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/message.js +38 -0
- package/dist/es2019/nodeviews/panel.js +82 -0
- package/dist/es2019/plugin.js +191 -0
- package/dist/es2019/pm-plugins/keymaps.js +82 -0
- package/dist/es2019/pm-plugins/main.js +21 -0
- package/dist/es2019/toolbar.js +279 -0
- package/dist/es2019/types.js +2 -0
- package/dist/es2019/utils.js +48 -0
- package/dist/esm/actions.js +116 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/message.js +38 -0
- package/dist/esm/nodeviews/panel.js +87 -0
- package/dist/esm/plugin.js +208 -0
- package/dist/esm/pm-plugins/keymaps.js +74 -0
- package/dist/esm/pm-plugins/main.js +22 -0
- package/dist/esm/toolbar.js +286 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/utils.js +46 -0
- package/dist/types/actions.d.ts +12 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/message.d.ts +37 -0
- package/dist/types/nodeviews/panel.d.ts +36 -0
- package/dist/types/plugin.d.ts +17 -0
- package/dist/types/pm-plugins/keymaps.d.ts +3 -0
- package/dist/types/pm-plugins/main.d.ts +11 -0
- package/dist/types/toolbar.d.ts +15 -0
- package/dist/types/types.d.ts +21 -0
- package/dist/types/utils.d.ts +5 -0
- package/dist/types-ts4.5/actions.d.ts +12 -0
- package/dist/types-ts4.5/index.d.ts +3 -0
- package/dist/types-ts4.5/message.d.ts +37 -0
- package/dist/types-ts4.5/nodeviews/panel.d.ts +36 -0
- package/dist/types-ts4.5/plugin.d.ts +17 -0
- package/dist/types-ts4.5/pm-plugins/keymaps.d.ts +3 -0
- package/dist/types-ts4.5/pm-plugins/main.d.ts +11 -0
- package/dist/types-ts4.5/toolbar.d.ts +15 -0
- package/dist/types-ts4.5/types.d.ts +21 -0
- package/dist/types-ts4.5/utils.d.ts +5 -0
- package/package.json +102 -0
- package/report.api.md +74 -0
- package/tmp/api-report-tmp.d.ts +44 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
2
|
+
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
export declare const pluginKey: PluginKey<any>;
|
|
4
|
+
export interface PanelPluginOptions extends LongPressSelectionPluginOptions, PanelPluginConfig {
|
|
5
|
+
}
|
|
6
|
+
export interface PanelPluginConfig {
|
|
7
|
+
allowCustomPanel?: boolean;
|
|
8
|
+
allowCustomPanelEdit?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type DomPanelAtrrs = {
|
|
11
|
+
class: string;
|
|
12
|
+
'data-panel-type': string;
|
|
13
|
+
'data-panel-color'?: string;
|
|
14
|
+
'data-panel-icon-id'?: string;
|
|
15
|
+
'data-panel-icon-text'?: string;
|
|
16
|
+
style: string;
|
|
17
|
+
};
|
|
18
|
+
export type EmojiInfo = {
|
|
19
|
+
shortName: string;
|
|
20
|
+
id: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PanelAttributes } from '@atlaskit/adf-schema';
|
|
2
|
+
import type { DOMOutputSpec } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
+
import type { EditorState, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
export declare const findPanel: (state: EditorState, selection?: Selection | null) => import("prosemirror-utils/dist/types").FindResult;
|
|
5
|
+
export declare const panelAttrsToDom: (attrs: PanelAttributes, allowCustomPanel: boolean) => DOMOutputSpec;
|
package/package.json
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/editor-plugin-panel",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Panel 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: Jenga",
|
|
12
|
+
"inPublicMirror": false,
|
|
13
|
+
"releaseModel": "continuous"
|
|
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/adf-schema": "^32.0.0",
|
|
35
|
+
"@atlaskit/editor-common": "^76.17.0",
|
|
36
|
+
"@atlaskit/editor-palette": "1.5.1",
|
|
37
|
+
"@atlaskit/editor-plugin-analytics": "^0.3.0",
|
|
38
|
+
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
39
|
+
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
40
|
+
"@atlaskit/editor-shared-styles": "^2.8.0",
|
|
41
|
+
"@atlaskit/icon": "^21.12.0",
|
|
42
|
+
"@atlaskit/theme": "^12.6.0",
|
|
43
|
+
"@babel/runtime": "^7.0.0"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"react": "^16.8.0",
|
|
47
|
+
"react-dom": "^16.8.0",
|
|
48
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@af/integration-testing": "*",
|
|
52
|
+
"@af/visual-regression": "*",
|
|
53
|
+
"@atlaskit/editor-plugin-emoji": "^0.4.0",
|
|
54
|
+
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
55
|
+
"@atlaskit/emoji": "^67.5.0",
|
|
56
|
+
"@atlaskit/ssr": "*",
|
|
57
|
+
"@atlaskit/util-data-test": "^17.8.0",
|
|
58
|
+
"@atlaskit/visual-regression": "*",
|
|
59
|
+
"@atlaskit/webdriver-runner": "*",
|
|
60
|
+
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
61
|
+
"@testing-library/react": "^12.1.5",
|
|
62
|
+
"react-dom": "^16.8.0",
|
|
63
|
+
"typescript": "~4.9.5",
|
|
64
|
+
"wait-for-expect": "^1.2.0"
|
|
65
|
+
},
|
|
66
|
+
"techstack": {
|
|
67
|
+
"@atlassian/frontend": {
|
|
68
|
+
"import-structure": [
|
|
69
|
+
"atlassian-conventions"
|
|
70
|
+
],
|
|
71
|
+
"circular-dependencies": [
|
|
72
|
+
"file-and-folder-level"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"@repo/internal": {
|
|
76
|
+
"dom-events": "use-bind-event-listener",
|
|
77
|
+
"analytics": [
|
|
78
|
+
"analytics-next"
|
|
79
|
+
],
|
|
80
|
+
"design-tokens": [
|
|
81
|
+
"color"
|
|
82
|
+
],
|
|
83
|
+
"theming": [
|
|
84
|
+
"react-context"
|
|
85
|
+
],
|
|
86
|
+
"ui-components": [
|
|
87
|
+
"lite-mode"
|
|
88
|
+
],
|
|
89
|
+
"deprecation": [
|
|
90
|
+
"no-deprecated-imports"
|
|
91
|
+
],
|
|
92
|
+
"styling": [
|
|
93
|
+
"static",
|
|
94
|
+
"emotion"
|
|
95
|
+
],
|
|
96
|
+
"imports": [
|
|
97
|
+
"import-no-extraneous-disable-for-examples-and-docs"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
|
|
102
|
+
}
|
package/report.api.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<!-- API Report Version: 2.3 -->
|
|
2
|
+
|
|
3
|
+
## API Report File for "@atlaskit/editor-plugin-panel"
|
|
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 type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
21
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
22
|
+
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
23
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
24
|
+
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
25
|
+
|
|
26
|
+
// @public (undocumented)
|
|
27
|
+
export type PanelPlugin = NextEditorPlugin<
|
|
28
|
+
'panel',
|
|
29
|
+
{
|
|
30
|
+
pluginConfiguration: PanelPluginOptions | undefined;
|
|
31
|
+
dependencies: [
|
|
32
|
+
typeof decorationsPlugin,
|
|
33
|
+
OptionalPlugin<typeof analyticsPlugin>,
|
|
34
|
+
];
|
|
35
|
+
actions: {
|
|
36
|
+
insertPanel: (inputMethod: INPUT_METHOD) => Command;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
>;
|
|
40
|
+
|
|
41
|
+
// @public (undocumented)
|
|
42
|
+
export const panelPlugin: PanelPlugin;
|
|
43
|
+
|
|
44
|
+
// @public (undocumented)
|
|
45
|
+
export interface PanelPluginConfig {
|
|
46
|
+
// (undocumented)
|
|
47
|
+
allowCustomPanel?: boolean;
|
|
48
|
+
// (undocumented)
|
|
49
|
+
allowCustomPanelEdit?: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// @public (undocumented)
|
|
53
|
+
interface PanelPluginOptions
|
|
54
|
+
extends LongPressSelectionPluginOptions,
|
|
55
|
+
PanelPluginConfig {}
|
|
56
|
+
|
|
57
|
+
// (No @packageDocumentation comment for this package)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
<!--SECTION END: Main Entry Types-->
|
|
61
|
+
|
|
62
|
+
### Peer Dependencies
|
|
63
|
+
|
|
64
|
+
<!--SECTION START: Peer Dependencies-->
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"react": "^16.8.0",
|
|
69
|
+
"react-dom": "^16.8.0",
|
|
70
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
<!--SECTION END: Peer Dependencies-->
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/editor-plugin-panel"
|
|
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 type { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
10
|
+
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
11
|
+
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
12
|
+
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
13
|
+
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
14
|
+
|
|
15
|
+
// @public (undocumented)
|
|
16
|
+
export type PanelPlugin = NextEditorPlugin<'panel', {
|
|
17
|
+
pluginConfiguration: PanelPluginOptions | undefined;
|
|
18
|
+
dependencies: [
|
|
19
|
+
typeof decorationsPlugin,
|
|
20
|
+
OptionalPlugin<typeof analyticsPlugin>
|
|
21
|
+
];
|
|
22
|
+
actions: {
|
|
23
|
+
insertPanel: (inputMethod: INPUT_METHOD) => Command;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
|
|
27
|
+
// @public (undocumented)
|
|
28
|
+
export const panelPlugin: PanelPlugin;
|
|
29
|
+
|
|
30
|
+
// @public (undocumented)
|
|
31
|
+
export interface PanelPluginConfig {
|
|
32
|
+
// (undocumented)
|
|
33
|
+
allowCustomPanel?: boolean;
|
|
34
|
+
// (undocumented)
|
|
35
|
+
allowCustomPanelEdit?: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// @public (undocumented)
|
|
39
|
+
interface PanelPluginOptions extends LongPressSelectionPluginOptions, PanelPluginConfig {
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// (No @packageDocumentation comment for this package)
|
|
43
|
+
|
|
44
|
+
```
|