@atlaskit/editor-plugin-table 0.0.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.
@@ -0,0 +1,17 @@
1
+ {
2
+ "extends": "../tsconfig",
3
+ "compilerOptions": {
4
+ "declaration": true,
5
+ "target": "es5",
6
+ "paths": {}
7
+ },
8
+ "include": [
9
+ "../src/**/*.ts",
10
+ "../src/**/*.tsx"
11
+ ],
12
+ "exclude": [
13
+ "../src/**/__tests__/*",
14
+ "../src/**/*.test.*",
15
+ "../src/**/test.*"
16
+ ]
17
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ Object.defineProperty(exports, "tablesPlugin", {
9
+ enumerable: true,
10
+ get: function get() {
11
+ return _tablePlugin.default;
12
+ }
13
+ });
14
+
15
+ var _tablePlugin = _interopRequireDefault(require("./plugins/table-plugin"));
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.pluginKey = exports.getPluginState = void 0;
7
+
8
+ var _prosemirrorState = require("prosemirror-state");
9
+
10
+ var pluginKey = new _prosemirrorState.PluginKey('nextTablePlugin');
11
+ exports.pluginKey = pluginKey;
12
+
13
+ var getPluginState = function getPluginState(state) {
14
+ return state && pluginKey.getState(state);
15
+ };
16
+
17
+ exports.getPluginState = getPluginState;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
9
+
10
+ var _pluginKey = require("./plugin-key");
11
+
12
+ var _prosemirrorModel = require("prosemirror-model");
13
+
14
+ var _prosemirrorView = require("prosemirror-view");
15
+
16
+ function createPlugin() {
17
+ return new _safePlugin.SafePlugin({
18
+ key: _pluginKey.pluginKey,
19
+ state: {
20
+ init: function init() {
21
+ var z = {
22
+ Mark: _prosemirrorModel.Mark,
23
+ EditorView: _prosemirrorView.EditorView
24
+ }; // eslint-disable-next-line no-console
25
+
26
+ console.log('delete to use prosemirror-model/view', z); // eslint-disable-next-line no-console
27
+
28
+ console.log('next table plugin loaded');
29
+ return {
30
+ scaffold: true
31
+ };
32
+ },
33
+ apply: function apply() {}
34
+ }
35
+ });
36
+ } // const tablesPlugin = (options?: TablePluginOptions): any => ({
37
+
38
+
39
+ var tablesPlugin = function tablesPlugin() {
40
+ return {
41
+ name: 'nextTable',
42
+ pmPlugins: function pmPlugins() {
43
+ return [{
44
+ name: 'next-table-scaffold',
45
+ plugin: function plugin() {
46
+ return createPlugin();
47
+ }
48
+ }];
49
+ }
50
+ };
51
+ };
52
+
53
+ var _default = tablesPlugin;
54
+ exports.default = _default;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-table",
3
+ "version": "0.0.0"
4
+ }
@@ -0,0 +1 @@
1
+ export { default as tablesPlugin } from './plugins/table-plugin';
@@ -0,0 +1,3 @@
1
+ import { PluginKey } from 'prosemirror-state';
2
+ export const pluginKey = new PluginKey('nextTablePlugin');
3
+ export const getPluginState = state => state && pluginKey.getState(state);
@@ -0,0 +1,45 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import { pluginKey } from './plugin-key';
3
+ import { Mark } from 'prosemirror-model';
4
+ import { EditorView } from 'prosemirror-view';
5
+
6
+ function createPlugin() {
7
+ return new SafePlugin({
8
+ key: pluginKey,
9
+ state: {
10
+ init() {
11
+ const z = {
12
+ Mark,
13
+ EditorView
14
+ }; // eslint-disable-next-line no-console
15
+
16
+ console.log('delete to use prosemirror-model/view', z); // eslint-disable-next-line no-console
17
+
18
+ console.log('next table plugin loaded');
19
+ return {
20
+ scaffold: true
21
+ };
22
+ },
23
+
24
+ apply() {}
25
+
26
+ }
27
+ });
28
+ } // const tablesPlugin = (options?: TablePluginOptions): any => ({
29
+
30
+
31
+ const tablesPlugin = () => ({
32
+ name: 'nextTable',
33
+
34
+ pmPlugins() {
35
+ return [{
36
+ name: 'next-table-scaffold',
37
+ plugin: () => {
38
+ return createPlugin();
39
+ }
40
+ }];
41
+ }
42
+
43
+ });
44
+
45
+ export default tablesPlugin;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-table",
3
+ "version": "0.0.0"
4
+ }
@@ -0,0 +1 @@
1
+ export { default as tablesPlugin } from './plugins/table-plugin';
@@ -0,0 +1,5 @@
1
+ import { PluginKey } from 'prosemirror-state';
2
+ export var pluginKey = new PluginKey('nextTablePlugin');
3
+ export var getPluginState = function getPluginState(state) {
4
+ return state && pluginKey.getState(state);
5
+ };
@@ -0,0 +1,43 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import { pluginKey } from './plugin-key';
3
+ import { Mark } from 'prosemirror-model';
4
+ import { EditorView } from 'prosemirror-view';
5
+
6
+ function createPlugin() {
7
+ return new SafePlugin({
8
+ key: pluginKey,
9
+ state: {
10
+ init: function init() {
11
+ var z = {
12
+ Mark: Mark,
13
+ EditorView: EditorView
14
+ }; // eslint-disable-next-line no-console
15
+
16
+ console.log('delete to use prosemirror-model/view', z); // eslint-disable-next-line no-console
17
+
18
+ console.log('next table plugin loaded');
19
+ return {
20
+ scaffold: true
21
+ };
22
+ },
23
+ apply: function apply() {}
24
+ }
25
+ });
26
+ } // const tablesPlugin = (options?: TablePluginOptions): any => ({
27
+
28
+
29
+ var tablesPlugin = function tablesPlugin() {
30
+ return {
31
+ name: 'nextTable',
32
+ pmPlugins: function pmPlugins() {
33
+ return [{
34
+ name: 'next-table-scaffold',
35
+ plugin: function plugin() {
36
+ return createPlugin();
37
+ }
38
+ }];
39
+ }
40
+ };
41
+ };
42
+
43
+ export default tablesPlugin;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-table",
3
+ "version": "0.0.0"
4
+ }
@@ -0,0 +1 @@
1
+ export { default as tablesPlugin } from './plugins/table-plugin';
@@ -0,0 +1,4 @@
1
+ import { EditorState, PluginKey } from 'prosemirror-state';
2
+ import { TablePluginState } from '../types';
3
+ export declare const pluginKey: PluginKey<TablePluginState, any>;
4
+ export declare const getPluginState: (state: EditorState) => TablePluginState | undefined | null;
@@ -0,0 +1,2 @@
1
+ declare const tablesPlugin: () => any;
2
+ export default tablesPlugin;
@@ -0,0 +1,3 @@
1
+ export interface TablePluginState {
2
+ scaffold?: boolean;
3
+ }
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-table",
3
+ "version": "0.0.0",
4
+ "description": "Table plugin for the @atlaskit/editor",
5
+ "publishConfig": {
6
+ "registry": "https://registry.npmjs.org/"
7
+ },
8
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend",
9
+ "author": "Atlassian Pty Ltd",
10
+ "main": "dist/cjs/index.js",
11
+ "module": "dist/esm/index.js",
12
+ "module:es2019": "dist/es2019/index.js",
13
+ "types": "dist/types/index.d.ts",
14
+ "atlaskit:src": "src/index.ts",
15
+ "atlassian": {
16
+ "team": "Editor",
17
+ "releaseModel": "continuous"
18
+ },
19
+ "dependencies": {
20
+ "@atlaskit/editor-common": "^69.1.0",
21
+ "@babel/runtime": "^7.0.0",
22
+ "@types/prosemirror-state": "^1.2.0",
23
+ "@types/prosemirror-view": "^1.9.0",
24
+ "prosemirror-model": "1.14.3",
25
+ "prosemirror-state": "1.3.4",
26
+ "prosemirror-view": "1.23.2"
27
+ },
28
+ "peerDependencies": {
29
+ "react": "^16.8.0",
30
+ "react-intl-next": "npm:react-intl@^5.18.1"
31
+ },
32
+ "devDependencies": {
33
+ "@atlaskit/editor-test-helpers": "^17.1.0",
34
+ "@atlaskit/visual-regression": "*",
35
+ "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
36
+ "enzyme": "^3.10.0",
37
+ "react-dom": "^16.8.0",
38
+ "typescript": "4.3.5"
39
+ },
40
+ "af:exports": {
41
+ "./types": "./src/types.ts",
42
+ ".": "./src/index.ts"
43
+ },
44
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
45
+ "techstack": {
46
+ "@repo/internal": {
47
+ "theming": "tokens"
48
+ }
49
+ }
50
+ }
package/report.api.md ADDED
@@ -0,0 +1,11 @@
1
+ ## API Report File for "@atlaskit/editor-plugin-table".
2
+
3
+ > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
6
+
7
+ ```ts
8
+ export declare const tablesPlugin: () => any;
9
+
10
+ export {};
11
+ ```
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { default as tablesPlugin } from './plugins/table-plugin';
@@ -0,0 +1,7 @@
1
+ import { EditorState, PluginKey } from 'prosemirror-state';
2
+ import { TablePluginState } from '../types';
3
+
4
+ export const pluginKey = new PluginKey<TablePluginState>('nextTablePlugin');
5
+ export const getPluginState = (
6
+ state: EditorState,
7
+ ): TablePluginState | undefined | null => state && pluginKey.getState(state);
@@ -0,0 +1,40 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import { pluginKey } from './plugin-key';
3
+ import { Mark } from 'prosemirror-model';
4
+ import { EditorView } from 'prosemirror-view';
5
+
6
+ function createPlugin() {
7
+ return new SafePlugin({
8
+ key: pluginKey,
9
+ state: {
10
+ init() {
11
+ const z = { Mark, EditorView };
12
+ // eslint-disable-next-line no-console
13
+ console.log('delete to use prosemirror-model/view', z);
14
+ // eslint-disable-next-line no-console
15
+ console.log('next table plugin loaded');
16
+ return {
17
+ scaffold: true,
18
+ };
19
+ },
20
+ apply() {},
21
+ },
22
+ });
23
+ }
24
+
25
+ // const tablesPlugin = (options?: TablePluginOptions): any => ({
26
+ const tablesPlugin = (): any => ({
27
+ name: 'nextTable',
28
+ pmPlugins() {
29
+ return [
30
+ {
31
+ name: 'next-table-scaffold',
32
+ plugin: () => {
33
+ return createPlugin();
34
+ },
35
+ },
36
+ ];
37
+ },
38
+ });
39
+
40
+ export default tablesPlugin;
package/src/types.ts ADDED
@@ -0,0 +1,3 @@
1
+ export interface TablePluginState {
2
+ scaffold?: boolean;
3
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": [
4
+ "./src/**/*.ts",
5
+ "./src/**/*.tsx",
6
+ "./examples/**/*.ts",
7
+ "./examples/**/*.tsx",
8
+ "./example-helpers/**/*.ts",
9
+ "./example-helpers/**/*.tsx",
10
+ ],
11
+ "compilerOptions": {
12
+ "baseUrl": "./"
13
+ }
14
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-table/types",
3
+ "main": "../dist/cjs/types.js",
4
+ "module": "../dist/esm/types.js",
5
+ "module:es2019": "../dist/es2019/types.js",
6
+ "types": "../dist/types/types.d.ts"
7
+ }