@atlaskit/editor-plugin-block-menu 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.
package/LICENSE.md ADDED
@@ -0,0 +1,11 @@
1
+ Copyright 2019 Atlassian Pty Ltd
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
4
+ compliance with the License. You may obtain a copy of the License at
5
+
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+
8
+ Unless required by applicable law or agreed to in writing, software distributed under the License is
9
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10
+ implied. See the License for the specific language governing permissions and limitations under the
11
+ License.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # Editor plugin block menu
@@ -0,0 +1,24 @@
1
+ {
2
+ "extends": "../../../../tsconfig.entry-points.confluence.json",
3
+ "compilerOptions": {
4
+ "target": "es5",
5
+ "composite": true,
6
+ "outDir": "../../../../../confluence/tsDist/@atlaskit__editor-plugin-block-menu",
7
+ "rootDir": "../"
8
+ },
9
+ "include": [
10
+ "../src/**/*.ts",
11
+ "../src/**/*.tsx"
12
+ ],
13
+ "exclude": [
14
+ "../src/**/__tests__/*",
15
+ "../src/**/*.test.*",
16
+ "../src/**/test.*",
17
+ "../src/**/examples.*"
18
+ ],
19
+ "references": [
20
+ {
21
+ "path": "../../editor-common/afm-cc/tsconfig.json"
22
+ }
23
+ ]
24
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "extends": "../tsconfig",
3
+ "compilerOptions": {
4
+ "target": "es5",
5
+ "paths": {}
6
+ },
7
+ "include": [
8
+ "../src/**/*.ts",
9
+ "../src/**/*.tsx"
10
+ ],
11
+ "exclude": [
12
+ "../src/**/__tests__/*",
13
+ "../src/**/*.test.*",
14
+ "../src/**/test.*",
15
+ "../src/**/examples.*"
16
+ ]
17
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.blockMenuPlugin = void 0;
7
+ var _main = require("./pm-plugins/main");
8
+ var blockMenuPlugin = exports.blockMenuPlugin = function blockMenuPlugin() {
9
+ return {
10
+ name: 'blockMenu',
11
+ pmPlugins: function pmPlugins() {
12
+ return [{
13
+ name: 'blockMenuPlugin',
14
+ plugin: _main.createPlugin
15
+ }];
16
+ }
17
+ };
18
+ };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "blockMenuPlugin", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _blockMenuPlugin.blockMenuPlugin;
10
+ }
11
+ });
12
+ var _blockMenuPlugin = require("./blockMenuPlugin");
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createPlugin = exports.blockMenuPluginKey = void 0;
7
+ var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
8
+ var _state = require("@atlaskit/editor-prosemirror/state");
9
+ var blockMenuPluginKey = exports.blockMenuPluginKey = new _state.PluginKey('blockMenuPlugin');
10
+
11
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
12
+
13
+ var createPlugin = exports.createPlugin = function createPlugin() {
14
+ return new _safePlugin.SafePlugin({
15
+ key: blockMenuPluginKey,
16
+ state: {
17
+ init: function init() {
18
+ return {};
19
+ },
20
+ apply: function apply(tr, currentPluginState) {
21
+ var meta = tr.getMeta(blockMenuPluginKey);
22
+ if (meta) {
23
+ return meta;
24
+ }
25
+ return currentPluginState;
26
+ }
27
+ }
28
+ });
29
+ };
@@ -0,0 +1,10 @@
1
+ import { createPlugin } from './pm-plugins/main';
2
+ export const blockMenuPlugin = () => ({
3
+ name: 'blockMenu',
4
+ pmPlugins() {
5
+ return [{
6
+ name: 'blockMenuPlugin',
7
+ plugin: createPlugin
8
+ }];
9
+ }
10
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ // Entry file in package.json
3
+
4
+ export { blockMenuPlugin } from './blockMenuPlugin';
@@ -0,0 +1,23 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
+ export const blockMenuPluginKey = new PluginKey('blockMenuPlugin');
4
+
5
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
6
+
7
+ export const createPlugin = () => {
8
+ return new SafePlugin({
9
+ key: blockMenuPluginKey,
10
+ state: {
11
+ init() {
12
+ return {};
13
+ },
14
+ apply: (tr, currentPluginState) => {
15
+ const meta = tr.getMeta(blockMenuPluginKey);
16
+ if (meta) {
17
+ return meta;
18
+ }
19
+ return currentPluginState;
20
+ }
21
+ }
22
+ });
23
+ };
@@ -0,0 +1,12 @@
1
+ import { createPlugin } from './pm-plugins/main';
2
+ export var blockMenuPlugin = function blockMenuPlugin() {
3
+ return {
4
+ name: 'blockMenu',
5
+ pmPlugins: function pmPlugins() {
6
+ return [{
7
+ name: 'blockMenuPlugin',
8
+ plugin: createPlugin
9
+ }];
10
+ }
11
+ };
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ // Entry file in package.json
3
+
4
+ export { blockMenuPlugin } from './blockMenuPlugin';
@@ -0,0 +1,23 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
+ export var blockMenuPluginKey = new PluginKey('blockMenuPlugin');
4
+
5
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
6
+
7
+ export var createPlugin = function createPlugin() {
8
+ return new SafePlugin({
9
+ key: blockMenuPluginKey,
10
+ state: {
11
+ init: function init() {
12
+ return {};
13
+ },
14
+ apply: function apply(tr, currentPluginState) {
15
+ var meta = tr.getMeta(blockMenuPluginKey);
16
+ if (meta) {
17
+ return meta;
18
+ }
19
+ return currentPluginState;
20
+ }
21
+ }
22
+ });
23
+ };
@@ -0,0 +1,2 @@
1
+ import type { BlockMenuPlugin } from './blockMenuPluginType';
2
+ export declare const blockMenuPlugin: BlockMenuPlugin;
@@ -0,0 +1,2 @@
1
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
+ export type BlockMenuPlugin = NextEditorPlugin<'blockMenu'>;
@@ -0,0 +1,2 @@
1
+ export { blockMenuPlugin } from './blockMenuPlugin';
2
+ export type { BlockMenuPlugin } from './blockMenuPluginType';
@@ -0,0 +1,6 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
+ export declare const blockMenuPluginKey: PluginKey<any>;
4
+ type BlockMenuPluginState = {};
5
+ export declare const createPlugin: () => SafePlugin<BlockMenuPluginState>;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { BlockMenuPlugin } from './blockMenuPluginType';
2
+ export declare const blockMenuPlugin: BlockMenuPlugin;
@@ -0,0 +1,2 @@
1
+ import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
2
+ export type BlockMenuPlugin = NextEditorPlugin<'blockMenu'>;
@@ -0,0 +1,2 @@
1
+ export { blockMenuPlugin } from './blockMenuPlugin';
2
+ export type { BlockMenuPlugin } from './blockMenuPluginType';
@@ -0,0 +1,6 @@
1
+ import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
+ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
3
+ export declare const blockMenuPluginKey: PluginKey<any>;
4
+ type BlockMenuPluginState = {};
5
+ export declare const createPlugin: () => SafePlugin<BlockMenuPluginState>;
6
+ export {};
@@ -0,0 +1,43 @@
1
+ import React from 'react';
2
+
3
+ import { AtlassianInternalWarning, code, md } from '@atlaskit/docs';
4
+ // eslint-disable-next-line @atlassian/tangerine/import/entry-points
5
+ import { createEditorUseOnlyNotice } from '@atlaskit/editor-common/doc-utils';
6
+ import { token } from '@atlaskit/tokens';
7
+
8
+ export default md`
9
+
10
+ ${createEditorUseOnlyNotice('Editor Plugin Block Menu', [
11
+ { name: 'Editor Core', link: '/packages/editor/editor-core' },
12
+ ])}
13
+
14
+
15
+ ${
16
+ (
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
18
+ <div style={{ marginTop: token('space.100', '8px') }}>
19
+ <AtlassianInternalWarning />
20
+ </div>
21
+ )
22
+ }
23
+
24
+ This package includes the block menu plugin used by \`@atlaskit/editor-core\`.
25
+
26
+ ## Usage
27
+ ---
28
+
29
+ The \`dependencies\`, \`configuration\`, \`state\`, \`actions\`, and \`commands\` of the plugin are defined
30
+ below:
31
+
32
+ ${code`
33
+ type BlockMenuPlugin = NextEditorPlugin<'blockMenu'>
34
+ `}
35
+
36
+
37
+ ## Support
38
+ ---
39
+ 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.
40
+ ## License
41
+ ---
42
+ Please see [Atlassian Frontend - License](https://hello.atlassian.net/wiki/spaces/AF/pages/2589099144/Documentation#License) for more licensing information.
43
+ `;
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@atlaskit/editor-plugin-block-menu",
3
+ "version": "0.0.0",
4
+ "description": "BlockMenu 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
+ "releaseModel": "continuous",
13
+ "singleton": true
14
+ },
15
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
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-prosemirror": "7.0.0",
35
+ "@babel/runtime": "^7.0.0"
36
+ },
37
+ "peerDependencies": {
38
+ "@atlaskit/editor-common": "^107.12.0",
39
+ "react": "^18.2.0"
40
+ },
41
+ "devDependencies": {
42
+ "typescript": "~5.4.2"
43
+ },
44
+ "techstack": {
45
+ "@atlassian/frontend": {
46
+ "code-structure": [
47
+ "editor-plugin"
48
+ ],
49
+ "import-structure": [
50
+ "atlassian-conventions"
51
+ ],
52
+ "circular-dependencies": [
53
+ "file-and-folder-level"
54
+ ]
55
+ },
56
+ "@repo/internal": {
57
+ "dom-events": "use-bind-event-listener",
58
+ "analytics": [
59
+ "analytics-next"
60
+ ],
61
+ "design-tokens": [
62
+ "color"
63
+ ],
64
+ "theming": [
65
+ "react-context"
66
+ ],
67
+ "ui-components": [
68
+ "lite-mode"
69
+ ],
70
+ "deprecation": "no-deprecated-imports",
71
+ "styling": [
72
+ "emotion",
73
+ "emotion"
74
+ ],
75
+ "imports": [
76
+ "import-no-extraneous-disable-for-examples-and-docs"
77
+ ]
78
+ }
79
+ }
80
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": [
4
+ "src/**/*.ts",
5
+ "src/**/*.tsx"
6
+ ],
7
+ "compilerOptions": {}
8
+ }