@atlaskit/editor-plugin-block-type 4.0.1 → 4.0.3
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 +17 -0
- package/consts/package.json +5 -5
- package/dist/cjs/{plugin/index.js → blockTypePlugin.js} +3 -3
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/{plugin/pm-plugins → pm-plugins}/input-rule.js +1 -1
- package/dist/cjs/{plugin/pm-plugins → pm-plugins}/keymap.js +3 -3
- package/dist/cjs/{plugin/pm-plugins → pm-plugins}/main.js +4 -4
- package/dist/cjs/pm-plugins/types.js +5 -0
- package/dist/cjs/{consts.js → ui/consts.js} +1 -1
- package/dist/es2019/{plugin/index.js → blockTypePlugin.js} +3 -3
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/{plugin/pm-plugins → pm-plugins}/input-rule.js +1 -1
- package/dist/es2019/{plugin/pm-plugins → pm-plugins}/keymap.js +3 -3
- package/dist/es2019/{plugin/pm-plugins → pm-plugins}/main.js +4 -4
- package/dist/{esm → es2019/ui}/consts.js +1 -1
- package/dist/esm/{plugin/index.js → blockTypePlugin.js} +3 -3
- package/dist/esm/blockTypePluginType.js +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/{plugin/pm-plugins → pm-plugins}/input-rule.js +1 -1
- package/dist/esm/{plugin/pm-plugins → pm-plugins}/keymap.js +3 -3
- package/dist/esm/{plugin/pm-plugins → pm-plugins}/main.js +4 -4
- package/dist/esm/pm-plugins/types.js +1 -0
- package/dist/{es2019 → esm/ui}/consts.js +1 -1
- package/dist/types/blockTypePlugin.d.ts +5 -0
- package/dist/types/{plugin/index.d.ts → blockTypePluginType.d.ts} +3 -7
- package/dist/types/index.d.ts +7 -7
- package/dist/types/{plugin/pm-plugins → pm-plugins}/main.d.ts +2 -2
- package/dist/types/{plugin → pm-plugins}/ui/PrimaryToolbarComponent.d.ts +1 -1
- package/dist/types/{plugin → pm-plugins}/ui/ToolbarBlockType/index.d.ts +2 -2
- package/dist/types/{consts.d.ts → ui/consts.d.ts} +1 -1
- package/dist/types-ts4.5/blockTypePlugin.d.ts +5 -0
- package/dist/types-ts4.5/{plugin/index.d.ts → blockTypePluginType.d.ts} +3 -7
- package/dist/types-ts4.5/index.d.ts +7 -7
- package/dist/types-ts4.5/{plugin/pm-plugins → pm-plugins}/main.d.ts +2 -2
- package/dist/types-ts4.5/{plugin → pm-plugins}/ui/PrimaryToolbarComponent.d.ts +1 -1
- package/dist/types-ts4.5/{plugin → pm-plugins}/ui/ToolbarBlockType/index.d.ts +2 -2
- package/dist/types-ts4.5/{consts.d.ts → ui/consts.d.ts} +1 -1
- package/package.json +12 -9
- package/styles/package.json +5 -5
- package/dist/cjs/i18n/cs.js +0 -47
- package/dist/cjs/i18n/da.js +0 -47
- package/dist/cjs/i18n/de.js +0 -47
- package/dist/cjs/i18n/en.js +0 -47
- package/dist/cjs/i18n/en_GB.js +0 -47
- package/dist/cjs/i18n/en_ZZ.js +0 -47
- package/dist/cjs/i18n/es.js +0 -47
- package/dist/cjs/i18n/fi.js +0 -47
- package/dist/cjs/i18n/fr.js +0 -47
- package/dist/cjs/i18n/hu.js +0 -47
- package/dist/cjs/i18n/it.js +0 -47
- package/dist/cjs/i18n/ja.js +0 -47
- package/dist/cjs/i18n/ko.js +0 -47
- package/dist/cjs/i18n/nb.js +0 -47
- package/dist/cjs/i18n/nl.js +0 -47
- package/dist/cjs/i18n/pl.js +0 -47
- package/dist/cjs/i18n/pt_BR.js +0 -47
- package/dist/cjs/i18n/ru.js +0 -47
- package/dist/cjs/i18n/sv.js +0 -47
- package/dist/cjs/i18n/th.js +0 -47
- package/dist/cjs/i18n/tr.js +0 -47
- package/dist/cjs/i18n/uk.js +0 -47
- package/dist/cjs/i18n/vi.js +0 -47
- package/dist/cjs/i18n/zh.js +0 -47
- package/dist/cjs/i18n/zh_TW.js +0 -47
- package/dist/cjs/styles.js +0 -12
- package/dist/es2019/i18n/cs.js +0 -41
- package/dist/es2019/i18n/da.js +0 -41
- package/dist/es2019/i18n/de.js +0 -41
- package/dist/es2019/i18n/en.js +0 -41
- package/dist/es2019/i18n/en_GB.js +0 -41
- package/dist/es2019/i18n/en_ZZ.js +0 -41
- package/dist/es2019/i18n/es.js +0 -41
- package/dist/es2019/i18n/fi.js +0 -41
- package/dist/es2019/i18n/fr.js +0 -41
- package/dist/es2019/i18n/hu.js +0 -41
- package/dist/es2019/i18n/it.js +0 -41
- package/dist/es2019/i18n/ja.js +0 -41
- package/dist/es2019/i18n/ko.js +0 -41
- package/dist/es2019/i18n/nb.js +0 -41
- package/dist/es2019/i18n/nl.js +0 -41
- package/dist/es2019/i18n/pl.js +0 -41
- package/dist/es2019/i18n/pt_BR.js +0 -41
- package/dist/es2019/i18n/ru.js +0 -41
- package/dist/es2019/i18n/sv.js +0 -41
- package/dist/es2019/i18n/th.js +0 -41
- package/dist/es2019/i18n/tr.js +0 -41
- package/dist/es2019/i18n/uk.js +0 -41
- package/dist/es2019/i18n/vi.js +0 -41
- package/dist/es2019/i18n/zh.js +0 -41
- package/dist/es2019/i18n/zh_TW.js +0 -41
- package/dist/es2019/styles.js +0 -1
- package/dist/esm/i18n/cs.js +0 -41
- package/dist/esm/i18n/da.js +0 -41
- package/dist/esm/i18n/de.js +0 -41
- package/dist/esm/i18n/en.js +0 -41
- package/dist/esm/i18n/en_GB.js +0 -41
- package/dist/esm/i18n/en_ZZ.js +0 -41
- package/dist/esm/i18n/es.js +0 -41
- package/dist/esm/i18n/fi.js +0 -41
- package/dist/esm/i18n/fr.js +0 -41
- package/dist/esm/i18n/hu.js +0 -41
- package/dist/esm/i18n/it.js +0 -41
- package/dist/esm/i18n/ja.js +0 -41
- package/dist/esm/i18n/ko.js +0 -41
- package/dist/esm/i18n/nb.js +0 -41
- package/dist/esm/i18n/nl.js +0 -41
- package/dist/esm/i18n/pl.js +0 -41
- package/dist/esm/i18n/pt_BR.js +0 -41
- package/dist/esm/i18n/ru.js +0 -41
- package/dist/esm/i18n/sv.js +0 -41
- package/dist/esm/i18n/th.js +0 -41
- package/dist/esm/i18n/tr.js +0 -41
- package/dist/esm/i18n/uk.js +0 -41
- package/dist/esm/i18n/vi.js +0 -41
- package/dist/esm/i18n/zh.js +0 -41
- package/dist/esm/i18n/zh_TW.js +0 -41
- package/dist/esm/styles.js +0 -1
- package/dist/types/i18n/cs.d.ts +0 -40
- package/dist/types/i18n/da.d.ts +0 -40
- package/dist/types/i18n/de.d.ts +0 -40
- package/dist/types/i18n/en.d.ts +0 -40
- package/dist/types/i18n/en_GB.d.ts +0 -40
- package/dist/types/i18n/en_ZZ.d.ts +0 -40
- package/dist/types/i18n/es.d.ts +0 -40
- package/dist/types/i18n/fi.d.ts +0 -40
- package/dist/types/i18n/fr.d.ts +0 -40
- package/dist/types/i18n/hu.d.ts +0 -40
- package/dist/types/i18n/it.d.ts +0 -40
- package/dist/types/i18n/ja.d.ts +0 -40
- package/dist/types/i18n/ko.d.ts +0 -40
- package/dist/types/i18n/nb.d.ts +0 -40
- package/dist/types/i18n/nl.d.ts +0 -40
- package/dist/types/i18n/pl.d.ts +0 -40
- package/dist/types/i18n/pt_BR.d.ts +0 -40
- package/dist/types/i18n/ru.d.ts +0 -40
- package/dist/types/i18n/sv.d.ts +0 -40
- package/dist/types/i18n/th.d.ts +0 -40
- package/dist/types/i18n/tr.d.ts +0 -40
- package/dist/types/i18n/uk.d.ts +0 -40
- package/dist/types/i18n/vi.d.ts +0 -40
- package/dist/types/i18n/zh.d.ts +0 -40
- package/dist/types/i18n/zh_TW.d.ts +0 -40
- package/dist/types/styles.d.ts +0 -1
- package/dist/types-ts4.5/i18n/cs.d.ts +0 -40
- package/dist/types-ts4.5/i18n/da.d.ts +0 -40
- package/dist/types-ts4.5/i18n/de.d.ts +0 -40
- package/dist/types-ts4.5/i18n/en.d.ts +0 -40
- package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -40
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -40
- package/dist/types-ts4.5/i18n/es.d.ts +0 -40
- package/dist/types-ts4.5/i18n/fi.d.ts +0 -40
- package/dist/types-ts4.5/i18n/fr.d.ts +0 -40
- package/dist/types-ts4.5/i18n/hu.d.ts +0 -40
- package/dist/types-ts4.5/i18n/it.d.ts +0 -40
- package/dist/types-ts4.5/i18n/ja.d.ts +0 -40
- package/dist/types-ts4.5/i18n/ko.d.ts +0 -40
- package/dist/types-ts4.5/i18n/nb.d.ts +0 -40
- package/dist/types-ts4.5/i18n/nl.d.ts +0 -40
- package/dist/types-ts4.5/i18n/pl.d.ts +0 -40
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -40
- package/dist/types-ts4.5/i18n/ru.d.ts +0 -40
- package/dist/types-ts4.5/i18n/sv.d.ts +0 -40
- package/dist/types-ts4.5/i18n/th.d.ts +0 -40
- package/dist/types-ts4.5/i18n/tr.d.ts +0 -40
- package/dist/types-ts4.5/i18n/uk.d.ts +0 -40
- package/dist/types-ts4.5/i18n/vi.d.ts +0 -40
- package/dist/types-ts4.5/i18n/zh.d.ts +0 -40
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -40
- package/dist/types-ts4.5/styles.d.ts +0 -1
- /package/dist/cjs/{plugin/types.js → blockTypePluginType.js} +0 -0
- /package/dist/cjs/{plugin → pm-plugins}/block-types.js +0 -0
- /package/dist/cjs/{plugin → pm-plugins}/commands/block-type.js +0 -0
- /package/dist/cjs/{plugin → pm-plugins}/commands/delete-and-move-cursor.js +0 -0
- /package/dist/cjs/{plugin → pm-plugins}/commands/delete-block-content.js +0 -0
- /package/dist/cjs/{plugin → pm-plugins}/commands/index.js +0 -0
- /package/dist/cjs/{plugin → pm-plugins}/consts.js +0 -0
- /package/dist/cjs/{plugin → pm-plugins}/ui/PrimaryToolbarComponent.js +0 -0
- /package/dist/cjs/{plugin → pm-plugins}/ui/ToolbarBlockType/blocktype-button.js +0 -0
- /package/dist/cjs/{plugin → pm-plugins}/ui/ToolbarBlockType/index.js +0 -0
- /package/dist/cjs/{plugin → pm-plugins}/ui/ToolbarBlockType/styled.js +0 -0
- /package/dist/cjs/{plugin → pm-plugins}/utils.js +0 -0
- /package/dist/cjs/{plugin → ui}/styles.js +0 -0
- /package/dist/es2019/{plugin/types.js → blockTypePluginType.js} +0 -0
- /package/dist/es2019/{plugin → pm-plugins}/block-types.js +0 -0
- /package/dist/es2019/{plugin → pm-plugins}/commands/block-type.js +0 -0
- /package/dist/es2019/{plugin → pm-plugins}/commands/delete-and-move-cursor.js +0 -0
- /package/dist/es2019/{plugin → pm-plugins}/commands/delete-block-content.js +0 -0
- /package/dist/es2019/{plugin → pm-plugins}/commands/index.js +0 -0
- /package/dist/es2019/{plugin → pm-plugins}/consts.js +0 -0
- /package/dist/{esm/plugin → es2019/pm-plugins}/types.js +0 -0
- /package/dist/es2019/{plugin → pm-plugins}/ui/PrimaryToolbarComponent.js +0 -0
- /package/dist/es2019/{plugin → pm-plugins}/ui/ToolbarBlockType/blocktype-button.js +0 -0
- /package/dist/es2019/{plugin → pm-plugins}/ui/ToolbarBlockType/index.js +0 -0
- /package/dist/es2019/{plugin → pm-plugins}/ui/ToolbarBlockType/styled.js +0 -0
- /package/dist/es2019/{plugin → pm-plugins}/utils.js +0 -0
- /package/dist/es2019/{plugin → ui}/styles.js +0 -0
- /package/dist/esm/{plugin → pm-plugins}/block-types.js +0 -0
- /package/dist/esm/{plugin → pm-plugins}/commands/block-type.js +0 -0
- /package/dist/esm/{plugin → pm-plugins}/commands/delete-and-move-cursor.js +0 -0
- /package/dist/esm/{plugin → pm-plugins}/commands/delete-block-content.js +0 -0
- /package/dist/esm/{plugin → pm-plugins}/commands/index.js +0 -0
- /package/dist/esm/{plugin → pm-plugins}/consts.js +0 -0
- /package/dist/esm/{plugin → pm-plugins}/ui/PrimaryToolbarComponent.js +0 -0
- /package/dist/esm/{plugin → pm-plugins}/ui/ToolbarBlockType/blocktype-button.js +0 -0
- /package/dist/esm/{plugin → pm-plugins}/ui/ToolbarBlockType/index.js +0 -0
- /package/dist/esm/{plugin → pm-plugins}/ui/ToolbarBlockType/styled.js +0 -0
- /package/dist/esm/{plugin → pm-plugins}/utils.js +0 -0
- /package/dist/esm/{plugin → ui}/styles.js +0 -0
- /package/dist/types/{plugin → pm-plugins}/block-types.d.ts +0 -0
- /package/dist/types/{plugin → pm-plugins}/commands/block-type.d.ts +0 -0
- /package/dist/types/{plugin → pm-plugins}/commands/delete-and-move-cursor.d.ts +0 -0
- /package/dist/types/{plugin → pm-plugins}/commands/delete-block-content.d.ts +0 -0
- /package/dist/types/{plugin → pm-plugins}/commands/index.d.ts +0 -0
- /package/dist/types/{plugin → pm-plugins}/consts.d.ts +0 -0
- /package/dist/types/{plugin/pm-plugins → pm-plugins}/input-rule.d.ts +0 -0
- /package/dist/types/{plugin/pm-plugins → pm-plugins}/keymap.d.ts +0 -0
- /package/dist/types/{plugin → pm-plugins}/types.d.ts +0 -0
- /package/dist/types/{plugin → pm-plugins}/ui/ToolbarBlockType/blocktype-button.d.ts +0 -0
- /package/dist/types/{plugin → pm-plugins}/ui/ToolbarBlockType/styled.d.ts +0 -0
- /package/dist/types/{plugin → pm-plugins}/utils.d.ts +0 -0
- /package/dist/types/{plugin → ui}/styles.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin → pm-plugins}/block-types.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin → pm-plugins}/commands/block-type.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin → pm-plugins}/commands/delete-and-move-cursor.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin → pm-plugins}/commands/delete-block-content.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin → pm-plugins}/commands/index.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin → pm-plugins}/consts.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin/pm-plugins → pm-plugins}/input-rule.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin/pm-plugins → pm-plugins}/keymap.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin → pm-plugins}/types.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin → pm-plugins}/ui/ToolbarBlockType/blocktype-button.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin → pm-plugins}/ui/ToolbarBlockType/styled.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin → pm-plugins}/utils.d.ts +0 -0
- /package/dist/types-ts4.5/{plugin → ui}/styles.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
|
2
2
|
|
|
3
|
+
## 4.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#159777](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/159777)
|
|
8
|
+
[`e708d0a9e4b36`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e708d0a9e4b36) -
|
|
9
|
+
Refactoring plugins to meet folder standards.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 4.0.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#159176](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/159176)
|
|
17
|
+
[`8f1d77592a9dc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8f1d77592a9dc) -
|
|
18
|
+
Bump adf-schema to 44.2.0
|
|
19
|
+
|
|
3
20
|
## 4.0.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/consts/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type/consts",
|
|
3
|
-
"main": "../dist/cjs/consts.js",
|
|
4
|
-
"module": "../dist/esm/consts.js",
|
|
5
|
-
"module:es2019": "../dist/es2019/consts.js",
|
|
3
|
+
"main": "../dist/cjs/ui/consts.js",
|
|
4
|
+
"module": "../dist/esm/ui/consts.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/ui/consts.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/consts.d.ts",
|
|
7
|
+
"types": "../dist/types/ui/consts.d.ts",
|
|
8
8
|
"typesVersions": {
|
|
9
9
|
">=4.5 <5.4": {
|
|
10
10
|
"*": [
|
|
11
|
-
"../dist/types-ts4.5/consts.d.ts"
|
|
11
|
+
"../dist/types-ts4.5/ui/consts.d.ts"
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -20,12 +20,12 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
20
20
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
21
21
|
var _types = require("@atlaskit/editor-common/types");
|
|
22
22
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
|
-
var _commands = require("./commands");
|
|
24
|
-
var _blockType = require("./commands/block-type");
|
|
23
|
+
var _commands = require("./pm-plugins/commands");
|
|
24
|
+
var _blockType = require("./pm-plugins/commands/block-type");
|
|
25
25
|
var _inputRule = _interopRequireDefault(require("./pm-plugins/input-rule"));
|
|
26
26
|
var _keymap = _interopRequireDefault(require("./pm-plugins/keymap"));
|
|
27
27
|
var _main = require("./pm-plugins/main");
|
|
28
|
-
var _PrimaryToolbarComponent = require("./ui/PrimaryToolbarComponent");
|
|
28
|
+
var _PrimaryToolbarComponent = require("./pm-plugins/ui/PrimaryToolbarComponent");
|
|
29
29
|
var headingPluginOptions = function headingPluginOptions(_ref, isAllowed, editorAnalyticsApi) {
|
|
30
30
|
var formatMessage = _ref.formatMessage;
|
|
31
31
|
if (!isAllowed) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "blockTypePlugin", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function get() {
|
|
9
|
-
return
|
|
9
|
+
return _blockTypePlugin.blockTypePlugin;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
var
|
|
12
|
+
var _blockTypePlugin = require("./blockTypePlugin");
|
|
@@ -11,7 +11,7 @@ var _commands = require("@atlaskit/editor-common/commands");
|
|
|
11
11
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
12
12
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
13
13
|
var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
|
|
14
|
-
var _utils2 = require("
|
|
14
|
+
var _utils2 = require("./utils");
|
|
15
15
|
var MAX_HEADING_LEVEL = 6;
|
|
16
16
|
function getHeadingLevel(match) {
|
|
17
17
|
return {
|
|
@@ -10,9 +10,9 @@ var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
|
10
10
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
11
11
|
var _commands = require("@atlaskit/editor-prosemirror/commands");
|
|
12
12
|
var _history = require("@atlaskit/editor-prosemirror/history");
|
|
13
|
-
var blockTypes = _interopRequireWildcard(require("
|
|
14
|
-
var _commands2 = require("
|
|
15
|
-
var _utils2 = require("
|
|
13
|
+
var blockTypes = _interopRequireWildcard(require("./block-types"));
|
|
14
|
+
var _commands2 = require("./commands");
|
|
15
|
+
var _utils2 = require("./utils");
|
|
16
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var backspaceCommand = (0, _commands.chainCommands)(_commands2.cleanUpAtTheStartOfDocument, (0, _commands2.deleteBlockContent)(_utils2.isNodeAWrappingBlockNode), _commands2.deleteAndMoveCursor);
|
|
@@ -11,10 +11,10 @@ var _browser = require("@atlaskit/editor-common/browser");
|
|
|
11
11
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
13
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
|
-
var _blockTypes = require("
|
|
15
|
-
var _commands = require("
|
|
16
|
-
var _consts = require("
|
|
17
|
-
var _utils = require("
|
|
14
|
+
var _blockTypes = require("./block-types");
|
|
15
|
+
var _commands = require("./commands");
|
|
16
|
+
var _consts = require("./consts");
|
|
17
|
+
var _utils = require("./utils");
|
|
18
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
20
20
|
var blockTypeForNode = function blockTypeForNode(node, schema) {
|
|
@@ -6,12 +6,12 @@ import { blockTypeMessages as messages } from '@atlaskit/editor-common/messages'
|
|
|
6
6
|
import { IconHeading, IconQuote } from '@atlaskit/editor-common/quick-insert';
|
|
7
7
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
-
import { setBlockTypeWithAnalytics } from './commands';
|
|
10
|
-
import { insertBlockQuoteWithAnalytics } from './commands/block-type';
|
|
9
|
+
import { setBlockTypeWithAnalytics } from './pm-plugins/commands';
|
|
10
|
+
import { insertBlockQuoteWithAnalytics } from './pm-plugins/commands/block-type';
|
|
11
11
|
import inputRulePlugin from './pm-plugins/input-rule';
|
|
12
12
|
import keymapPlugin from './pm-plugins/keymap';
|
|
13
13
|
import { createPlugin, pluginKey } from './pm-plugins/main';
|
|
14
|
-
import { PrimaryToolbarComponent } from './ui/PrimaryToolbarComponent';
|
|
14
|
+
import { PrimaryToolbarComponent } from './pm-plugins/ui/PrimaryToolbarComponent';
|
|
15
15
|
const headingPluginOptions = ({
|
|
16
16
|
formatMessage
|
|
17
17
|
}, isAllowed, editorAnalyticsApi) => {
|
package/dist/es2019/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { blockTypePlugin } from './
|
|
1
|
+
export { blockTypePlugin } from './blockTypePlugin';
|
|
@@ -3,7 +3,7 @@ import { insertBlock } from '@atlaskit/editor-common/commands';
|
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import { createRule, inputRuleWithAnalytics } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
|
|
6
|
-
import { createJoinNodesRule, createWrappingTextBlockRule } from '
|
|
6
|
+
import { createJoinNodesRule, createWrappingTextBlockRule } from './utils';
|
|
7
7
|
const MAX_HEADING_LEVEL = 6;
|
|
8
8
|
function getHeadingLevel(match) {
|
|
9
9
|
return {
|
|
@@ -3,9 +3,9 @@ import { backspace, bindKeymapWithCommand, deleteKey, findKeyMapForBrowser, find
|
|
|
3
3
|
import { createNewParagraphAbove, createNewParagraphBelow, deleteEmptyParagraphAndMoveBlockUp, insertNewLineWithAnalytics } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
|
|
5
5
|
import { redo, undo } from '@atlaskit/editor-prosemirror/history';
|
|
6
|
-
import * as blockTypes from '
|
|
7
|
-
import { cleanUpAtTheStartOfDocument, deleteAndMoveCursor, deleteBlockContent, insertBlockQuoteWithAnalytics } from '
|
|
8
|
-
import { isNodeAWrappingBlockNode } from '
|
|
6
|
+
import * as blockTypes from './block-types';
|
|
7
|
+
import { cleanUpAtTheStartOfDocument, deleteAndMoveCursor, deleteBlockContent, insertBlockQuoteWithAnalytics } from './commands';
|
|
8
|
+
import { isNodeAWrappingBlockNode } from './utils';
|
|
9
9
|
const backspaceCommand = chainCommands(cleanUpAtTheStartOfDocument, deleteBlockContent(isNodeAWrappingBlockNode), deleteAndMoveCursor);
|
|
10
10
|
const del = chainCommands(deleteEmptyParagraphAndMoveBlockUp(isNodeAWrappingBlockNode), deleteBlockContent(isNodeAWrappingBlockNode), deleteAndMoveCursor);
|
|
11
11
|
export default function keymapPlugin(editorAnalyticsApi, schema, _featureFlags) {
|
|
@@ -3,10 +3,10 @@ import { browser } from '@atlaskit/editor-common/browser';
|
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
|
-
import { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, HEADINGS_BY_LEVEL, NORMAL_TEXT, OTHER, PANEL, TEXT_BLOCK_TYPES, WRAPPER_BLOCK_TYPES } from '
|
|
7
|
-
import { setHeadingWithAnalytics, setNormalTextWithAnalytics } from '
|
|
8
|
-
import { HEADING_KEYS } from '
|
|
9
|
-
import { areBlockTypesDisabled } from '
|
|
6
|
+
import { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, HEADINGS_BY_LEVEL, NORMAL_TEXT, OTHER, PANEL, TEXT_BLOCK_TYPES, WRAPPER_BLOCK_TYPES } from './block-types';
|
|
7
|
+
import { setHeadingWithAnalytics, setNormalTextWithAnalytics } from './commands';
|
|
8
|
+
import { HEADING_KEYS } from './consts';
|
|
9
|
+
import { areBlockTypesDisabled } from './utils';
|
|
10
10
|
const blockTypeForNode = (node, schema) => {
|
|
11
11
|
if (node.type === schema.nodes.heading) {
|
|
12
12
|
const maybeNode = HEADINGS_BY_LEVEL[node.attrs['level']];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, NORMAL_TEXT, PANEL } from '
|
|
1
|
+
export { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, NORMAL_TEXT, PANEL } from '../pm-plugins/block-types';
|
|
@@ -7,12 +7,12 @@ import { blockTypeMessages as messages } from '@atlaskit/editor-common/messages'
|
|
|
7
7
|
import { IconHeading, IconQuote } from '@atlaskit/editor-common/quick-insert';
|
|
8
8
|
import { ToolbarSize } from '@atlaskit/editor-common/types';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { setBlockTypeWithAnalytics } from './commands';
|
|
11
|
-
import { insertBlockQuoteWithAnalytics } from './commands/block-type';
|
|
10
|
+
import { setBlockTypeWithAnalytics } from './pm-plugins/commands';
|
|
11
|
+
import { insertBlockQuoteWithAnalytics } from './pm-plugins/commands/block-type';
|
|
12
12
|
import inputRulePlugin from './pm-plugins/input-rule';
|
|
13
13
|
import keymapPlugin from './pm-plugins/keymap';
|
|
14
14
|
import { createPlugin, pluginKey } from './pm-plugins/main';
|
|
15
|
-
import { PrimaryToolbarComponent } from './ui/PrimaryToolbarComponent';
|
|
15
|
+
import { PrimaryToolbarComponent } from './pm-plugins/ui/PrimaryToolbarComponent';
|
|
16
16
|
var headingPluginOptions = function headingPluginOptions(_ref, isAllowed, editorAnalyticsApi) {
|
|
17
17
|
var formatMessage = _ref.formatMessage;
|
|
18
18
|
if (!isAllowed) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { blockTypePlugin } from './
|
|
1
|
+
export { blockTypePlugin } from './blockTypePlugin';
|
|
@@ -4,7 +4,7 @@ import { insertBlock } from '@atlaskit/editor-common/commands';
|
|
|
4
4
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
5
5
|
import { createRule, inputRuleWithAnalytics } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
|
|
7
|
-
import { createJoinNodesRule, createWrappingTextBlockRule } from '
|
|
7
|
+
import { createJoinNodesRule, createWrappingTextBlockRule } from './utils';
|
|
8
8
|
var MAX_HEADING_LEVEL = 6;
|
|
9
9
|
function getHeadingLevel(match) {
|
|
10
10
|
return {
|
|
@@ -3,9 +3,9 @@ import { backspace, bindKeymapWithCommand, deleteKey, findKeyMapForBrowser, find
|
|
|
3
3
|
import { createNewParagraphAbove, createNewParagraphBelow, deleteEmptyParagraphAndMoveBlockUp, insertNewLineWithAnalytics } from '@atlaskit/editor-common/utils';
|
|
4
4
|
import { chainCommands } from '@atlaskit/editor-prosemirror/commands';
|
|
5
5
|
import { redo, undo } from '@atlaskit/editor-prosemirror/history';
|
|
6
|
-
import * as blockTypes from '
|
|
7
|
-
import { cleanUpAtTheStartOfDocument, deleteAndMoveCursor, deleteBlockContent, insertBlockQuoteWithAnalytics } from '
|
|
8
|
-
import { isNodeAWrappingBlockNode } from '
|
|
6
|
+
import * as blockTypes from './block-types';
|
|
7
|
+
import { cleanUpAtTheStartOfDocument, deleteAndMoveCursor, deleteBlockContent, insertBlockQuoteWithAnalytics } from './commands';
|
|
8
|
+
import { isNodeAWrappingBlockNode } from './utils';
|
|
9
9
|
var backspaceCommand = chainCommands(cleanUpAtTheStartOfDocument, deleteBlockContent(isNodeAWrappingBlockNode), deleteAndMoveCursor);
|
|
10
10
|
var del = chainCommands(deleteEmptyParagraphAndMoveBlockUp(isNodeAWrappingBlockNode), deleteBlockContent(isNodeAWrappingBlockNode), deleteAndMoveCursor);
|
|
11
11
|
export default function keymapPlugin(editorAnalyticsApi, schema, _featureFlags) {
|
|
@@ -6,10 +6,10 @@ import { browser } from '@atlaskit/editor-common/browser';
|
|
|
6
6
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
7
7
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
|
-
import { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, HEADINGS_BY_LEVEL, NORMAL_TEXT, OTHER, PANEL, TEXT_BLOCK_TYPES, WRAPPER_BLOCK_TYPES } from '
|
|
10
|
-
import { setHeadingWithAnalytics, setNormalTextWithAnalytics } from '
|
|
11
|
-
import { HEADING_KEYS } from '
|
|
12
|
-
import { areBlockTypesDisabled } from '
|
|
9
|
+
import { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, HEADINGS_BY_LEVEL, NORMAL_TEXT, OTHER, PANEL, TEXT_BLOCK_TYPES, WRAPPER_BLOCK_TYPES } from './block-types';
|
|
10
|
+
import { setHeadingWithAnalytics, setNormalTextWithAnalytics } from './commands';
|
|
11
|
+
import { HEADING_KEYS } from './consts';
|
|
12
|
+
import { areBlockTypesDisabled } from './utils';
|
|
13
13
|
var blockTypeForNode = function blockTypeForNode(node, schema) {
|
|
14
14
|
if (node.type === schema.nodes.heading) {
|
|
15
15
|
var maybeNode = HEADINGS_BY_LEVEL[node.attrs['level']];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, NORMAL_TEXT, PANEL } from '
|
|
1
|
+
export { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, NORMAL_TEXT, PANEL } from '../pm-plugins/block-types';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Command, EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
3
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
4
|
-
import type { TextBlockTypes } from './block-types';
|
|
5
|
-
import type { InputMethod } from './commands/block-type';
|
|
4
|
+
import type { TextBlockTypes } from './pm-plugins/block-types';
|
|
5
|
+
import type { InputMethod } from './pm-plugins/commands/block-type';
|
|
6
6
|
import type { BlockTypeState } from './pm-plugins/main';
|
|
7
|
-
import type { BlockTypePluginOptions } from './types';
|
|
7
|
+
import type { BlockTypePluginOptions } from './pm-plugins/types';
|
|
8
8
|
export type BlockTypePlugin = NextEditorPlugin<'blockType', {
|
|
9
9
|
pluginConfiguration: BlockTypePluginOptions | undefined;
|
|
10
10
|
dependencies: [OptionalPlugin<AnalyticsPlugin>, OptionalPlugin<PrimaryToolbarPlugin>];
|
|
@@ -16,7 +16,3 @@ export type BlockTypePlugin = NextEditorPlugin<'blockType', {
|
|
|
16
16
|
setTextLevel: (level: TextBlockTypes, inputMethod: InputMethod) => EditorCommand;
|
|
17
17
|
};
|
|
18
18
|
}>;
|
|
19
|
-
declare const blockTypePlugin: BlockTypePlugin;
|
|
20
|
-
export { blockTypePlugin };
|
|
21
|
-
export { pluginKey } from './pm-plugins/main';
|
|
22
|
-
export type { BlockTypeState } from './pm-plugins/main';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { blockTypePlugin } from './
|
|
2
|
-
export type { BlockTypePlugin } from './
|
|
3
|
-
export type { BlockTypePluginOptions, BlockType } from './
|
|
4
|
-
export type { BlockTypeState } from './
|
|
5
|
-
export type { InputMethod } from './
|
|
6
|
-
export type { DropdownItem } from './
|
|
7
|
-
export type { TextBlockTypes } from './
|
|
1
|
+
export { blockTypePlugin } from './blockTypePlugin';
|
|
2
|
+
export type { BlockTypePlugin } from './blockTypePluginType';
|
|
3
|
+
export type { BlockTypePluginOptions, BlockType } from './pm-plugins/types';
|
|
4
|
+
export type { BlockTypeState } from './pm-plugins/main';
|
|
5
|
+
export type { InputMethod } from './pm-plugins/commands';
|
|
6
|
+
export type { DropdownItem } from './pm-plugins/ui/ToolbarBlockType';
|
|
7
|
+
export type { TextBlockTypes } from './pm-plugins/block-types';
|
|
@@ -3,8 +3,8 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
3
3
|
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { BlockTypePlugin } from '../
|
|
7
|
-
import type { BlockType } from '
|
|
6
|
+
import type { BlockTypePlugin } from '../blockTypePluginType';
|
|
7
|
+
import type { BlockType } from './types';
|
|
8
8
|
export type BlockTypeState = {
|
|
9
9
|
currentBlockType: BlockType;
|
|
10
10
|
blockTypesDisabled: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { BlockTypePlugin } from '
|
|
3
|
+
import type { BlockTypePlugin } from '../../blockTypePluginType';
|
|
4
4
|
interface PrimaryToolbarComponentProps {
|
|
5
5
|
isSmall: boolean;
|
|
6
6
|
isToolbarReducedSpacing: boolean;
|
|
@@ -8,9 +8,9 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
8
8
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
10
|
import { ThemeMutationObserver } from '@atlaskit/tokens';
|
|
11
|
+
import type { BlockTypePlugin } from '../../../blockTypePluginType';
|
|
11
12
|
import type { TextBlockTypes } from '../../block-types';
|
|
12
|
-
import type {
|
|
13
|
-
import type { BlockTypeState } from '../../pm-plugins/main';
|
|
13
|
+
import type { BlockTypeState } from '../../main';
|
|
14
14
|
import type { BlockType } from '../../types';
|
|
15
15
|
export type DropdownItem = MenuItem & {
|
|
16
16
|
value: BlockType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, NORMAL_TEXT, PANEL, } from '
|
|
1
|
+
export { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, NORMAL_TEXT, PANEL, } from '../pm-plugins/block-types';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Command, EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
3
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
4
|
-
import type { TextBlockTypes } from './block-types';
|
|
5
|
-
import type { InputMethod } from './commands/block-type';
|
|
4
|
+
import type { TextBlockTypes } from './pm-plugins/block-types';
|
|
5
|
+
import type { InputMethod } from './pm-plugins/commands/block-type';
|
|
6
6
|
import type { BlockTypeState } from './pm-plugins/main';
|
|
7
|
-
import type { BlockTypePluginOptions } from './types';
|
|
7
|
+
import type { BlockTypePluginOptions } from './pm-plugins/types';
|
|
8
8
|
export type BlockTypePlugin = NextEditorPlugin<'blockType', {
|
|
9
9
|
pluginConfiguration: BlockTypePluginOptions | undefined;
|
|
10
10
|
dependencies: [
|
|
@@ -19,7 +19,3 @@ export type BlockTypePlugin = NextEditorPlugin<'blockType', {
|
|
|
19
19
|
setTextLevel: (level: TextBlockTypes, inputMethod: InputMethod) => EditorCommand;
|
|
20
20
|
};
|
|
21
21
|
}>;
|
|
22
|
-
declare const blockTypePlugin: BlockTypePlugin;
|
|
23
|
-
export { blockTypePlugin };
|
|
24
|
-
export { pluginKey } from './pm-plugins/main';
|
|
25
|
-
export type { BlockTypeState } from './pm-plugins/main';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { blockTypePlugin } from './
|
|
2
|
-
export type { BlockTypePlugin } from './
|
|
3
|
-
export type { BlockTypePluginOptions, BlockType } from './
|
|
4
|
-
export type { BlockTypeState } from './
|
|
5
|
-
export type { InputMethod } from './
|
|
6
|
-
export type { DropdownItem } from './
|
|
7
|
-
export type { TextBlockTypes } from './
|
|
1
|
+
export { blockTypePlugin } from './blockTypePlugin';
|
|
2
|
+
export type { BlockTypePlugin } from './blockTypePluginType';
|
|
3
|
+
export type { BlockTypePluginOptions, BlockType } from './pm-plugins/types';
|
|
4
|
+
export type { BlockTypeState } from './pm-plugins/main';
|
|
5
|
+
export type { InputMethod } from './pm-plugins/commands';
|
|
6
|
+
export type { DropdownItem } from './pm-plugins/ui/ToolbarBlockType';
|
|
7
|
+
export type { TextBlockTypes } from './pm-plugins/block-types';
|
|
@@ -3,8 +3,8 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
3
3
|
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import type { BlockTypePlugin } from '../
|
|
7
|
-
import type { BlockType } from '
|
|
6
|
+
import type { BlockTypePlugin } from '../blockTypePluginType';
|
|
7
|
+
import type { BlockType } from './types';
|
|
8
8
|
export type BlockTypeState = {
|
|
9
9
|
currentBlockType: BlockType;
|
|
10
10
|
blockTypesDisabled: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { BlockTypePlugin } from '
|
|
3
|
+
import type { BlockTypePlugin } from '../../blockTypePluginType';
|
|
4
4
|
interface PrimaryToolbarComponentProps {
|
|
5
5
|
isSmall: boolean;
|
|
6
6
|
isToolbarReducedSpacing: boolean;
|
|
@@ -8,9 +8,9 @@ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
|
8
8
|
import type { MenuItem } from '@atlaskit/editor-common/ui-menu';
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
10
|
import { ThemeMutationObserver } from '@atlaskit/tokens';
|
|
11
|
+
import type { BlockTypePlugin } from '../../../blockTypePluginType';
|
|
11
12
|
import type { TextBlockTypes } from '../../block-types';
|
|
12
|
-
import type {
|
|
13
|
-
import type { BlockTypeState } from '../../pm-plugins/main';
|
|
13
|
+
import type { BlockTypeState } from '../../main';
|
|
14
14
|
import type { BlockType } from '../../types';
|
|
15
15
|
export type DropdownItem = MenuItem & {
|
|
16
16
|
value: BlockType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, NORMAL_TEXT, PANEL, } from '
|
|
1
|
+
export { BLOCK_QUOTE, CODE_BLOCK, HEADING_1, HEADING_2, HEADING_3, HEADING_4, HEADING_5, HEADING_6, NORMAL_TEXT, PANEL, } from '../pm-plugins/block-types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,24 +29,24 @@
|
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"af:exports": {
|
|
31
31
|
".": "./src/index.ts",
|
|
32
|
-
"./consts": "./src/consts.ts",
|
|
33
|
-
"./styles": "./src/styles.ts"
|
|
32
|
+
"./consts": "./src/ui/consts.ts",
|
|
33
|
+
"./styles": "./src/ui/styles.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@atlaskit/adf-schema": "^
|
|
37
|
-
"@atlaskit/editor-common": "^94.
|
|
36
|
+
"@atlaskit/adf-schema": "^44.2.0",
|
|
37
|
+
"@atlaskit/editor-common": "^94.12.0",
|
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
39
39
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
41
|
-
"@atlaskit/editor-shared-styles": "^3.
|
|
41
|
+
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
42
42
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
43
43
|
"@atlaskit/icon": "^22.24.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
45
45
|
"@atlaskit/primitives": "^13.0.0",
|
|
46
46
|
"@atlaskit/prosemirror-input-rules": "^3.2.0",
|
|
47
47
|
"@atlaskit/theme": "^14.0.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
49
|
-
"@atlaskit/tokens": "^2.
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^2.11.0",
|
|
49
|
+
"@atlaskit/tokens": "^2.1.0",
|
|
50
50
|
"@babel/runtime": "^7.0.0",
|
|
51
51
|
"@emotion/react": "^11.7.1"
|
|
52
52
|
},
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@af/visual-regression": "*",
|
|
60
60
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
61
|
-
"@atlaskit/editor-plugin-quick-insert": "^1.
|
|
61
|
+
"@atlaskit/editor-plugin-quick-insert": "^1.6.0",
|
|
62
62
|
"@atlaskit/editor-plugin-type-ahead": "^1.10.0",
|
|
63
63
|
"@atlaskit/ssr": "*",
|
|
64
64
|
"@atlaskit/visual-regression": "*",
|
|
@@ -69,6 +69,9 @@
|
|
|
69
69
|
},
|
|
70
70
|
"techstack": {
|
|
71
71
|
"@atlassian/frontend": {
|
|
72
|
+
"code-structure": [
|
|
73
|
+
"editor-plugin"
|
|
74
|
+
],
|
|
72
75
|
"import-structure": [
|
|
73
76
|
"atlassian-conventions"
|
|
74
77
|
],
|
package/styles/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type/styles",
|
|
3
|
-
"main": "../dist/cjs/styles.js",
|
|
4
|
-
"module": "../dist/esm/styles.js",
|
|
5
|
-
"module:es2019": "../dist/es2019/styles.js",
|
|
3
|
+
"main": "../dist/cjs/ui/styles.js",
|
|
4
|
+
"module": "../dist/esm/ui/styles.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/ui/styles.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/styles.d.ts",
|
|
7
|
+
"types": "../dist/types/ui/styles.d.ts",
|
|
8
8
|
"typesVersions": {
|
|
9
9
|
">=4.5 <5.4": {
|
|
10
10
|
"*": [
|
|
11
|
-
"../dist/types-ts4.5/styles.d.ts"
|
|
11
|
+
"../dist/types-ts4.5/ui/styles.d.ts"
|
|
12
12
|
]
|
|
13
13
|
}
|
|
14
14
|
}
|
package/dist/cjs/i18n/cs.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
/* prettier-ignore */
|
|
8
|
-
/**
|
|
9
|
-
* NOTE:
|
|
10
|
-
*
|
|
11
|
-
* This file is automatically generated by Traduki 2.0.
|
|
12
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
|
-
*/
|
|
14
|
-
//Czech
|
|
15
|
-
var _default = exports.default = {
|
|
16
|
-
'fabric.editor.blockquote.description': 'Vložit citaci',
|
|
17
|
-
'fabric.editor.blockquote2': 'Citace',
|
|
18
|
-
'fabric.editor.codeblock': 'Fragment kódu',
|
|
19
|
-
'fabric.editor.codeblock.description': 'Zobrazit kód se zvýrazněním syntaxe',
|
|
20
|
-
'fabric.editor.customPanel': 'Vlastní panel',
|
|
21
|
-
'fabric.editor.customPanel.description': 'Přidejte poznámku se smajlíkem a barevným pozadím.',
|
|
22
|
-
'fabric.editor.errorPanel': 'Panel chyb',
|
|
23
|
-
'fabric.editor.errorPanel.description': 'Chyby zobrazit v barevném panelu',
|
|
24
|
-
'fabric.editor.heading1': 'Nadpis 1',
|
|
25
|
-
'fabric.editor.heading1Description': 'Použít pro nadpis nejvyšší úrovně',
|
|
26
|
-
'fabric.editor.heading2': 'Nadpis 2',
|
|
27
|
-
'fabric.editor.heading2Description': 'Použít pro klíčové oddíly',
|
|
28
|
-
'fabric.editor.heading3': 'Nadpis 3',
|
|
29
|
-
'fabric.editor.heading3Description': 'Použít pro pododdíly a nadpisy skupin',
|
|
30
|
-
'fabric.editor.heading4': 'Nadpis 4',
|
|
31
|
-
'fabric.editor.heading4Description': 'Použít pro podnadpisy',
|
|
32
|
-
'fabric.editor.heading5': 'Nadpis 5',
|
|
33
|
-
'fabric.editor.heading5Description': 'Použít pro seskupení položek seznamu',
|
|
34
|
-
'fabric.editor.heading6': 'Nadpis 6',
|
|
35
|
-
'fabric.editor.heading6Description': 'Použít pro nadpis nejnižší úrovně',
|
|
36
|
-
'fabric.editor.infoPanel': 'Informační panel',
|
|
37
|
-
'fabric.editor.infoPanel.description': 'Zvýraznit informace v barevném panelu',
|
|
38
|
-
'fabric.editor.normal': 'Standardní text',
|
|
39
|
-
'fabric.editor.notePanel': 'Panel poznámek',
|
|
40
|
-
'fabric.editor.notePanel.description': 'Přidat poznámku do barevného panelu',
|
|
41
|
-
'fabric.editor.other': 'Jiné...',
|
|
42
|
-
'fabric.editor.successPanel': 'Panel úspěchů',
|
|
43
|
-
'fabric.editor.successPanel.description': 'Přidat tipy do barevného panelu',
|
|
44
|
-
'fabric.editor.textStyles': 'Styly textu',
|
|
45
|
-
'fabric.editor.warningPanel': 'Panel upozornění',
|
|
46
|
-
'fabric.editor.warningPanel.description': 'Přidat poznámku s varováním do barevného panelu'
|
|
47
|
-
};
|