@atlaskit/editor-plugin-block-type 3.14.7 → 3.14.9
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 +22 -0
- package/dist/cjs/plugin/index.js +0 -1
- package/dist/cjs/plugin/pm-plugins/main.js +39 -1
- package/dist/cjs/plugin/ui/ToolbarBlockType/blocktype-button.js +4 -10
- package/dist/es2019/plugin/index.js +0 -1
- package/dist/es2019/plugin/pm-plugins/main.js +42 -0
- package/dist/es2019/plugin/ui/ToolbarBlockType/blocktype-button.js +4 -10
- package/dist/esm/plugin/index.js +0 -1
- package/dist/esm/plugin/pm-plugins/main.js +38 -0
- package/dist/esm/plugin/ui/ToolbarBlockType/blocktype-button.js +4 -10
- package/dist/types/plugin/index.d.ts +1 -6
- package/dist/types/plugin/pm-plugins/main.d.ts +3 -0
- package/dist/types-ts4.5/plugin/index.d.ts +1 -3
- package/dist/types-ts4.5/plugin/pm-plugins/main.d.ts +3 -0
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
2
2
|
|
3
|
+
## 3.14.9
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#141778](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/141778)
|
8
|
+
[`1c6f578277694`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c6f578277694) -
|
9
|
+
ED-24870 & ED-24864 - Add the logic to gate the nested media in quotes functionality behind the
|
10
|
+
nest-media-and-codeblock-in-quote experiment. Also adjust the logic so the nested expands are now
|
11
|
+
behind the nested-expand-in-expand experiment.
|
12
|
+
|
13
|
+
## 3.14.8
|
14
|
+
|
15
|
+
### Patch Changes
|
16
|
+
|
17
|
+
- [#140915](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/140915)
|
18
|
+
[`eaccad51157d6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eaccad51157d6) -
|
19
|
+
[ux] Migrate new icons including color, highlight and task on Editor primary toolbar
|
20
|
+
- [#141594](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/141594)
|
21
|
+
[`3f6b2eb7bd493`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3f6b2eb7bd493) -
|
22
|
+
[ux] [ED-24867] This change moves nesting codeblocks and media in blockquotes via insertion
|
23
|
+
methods behind an experiment gate.
|
24
|
+
|
3
25
|
## 3.14.7
|
4
26
|
|
5
27
|
### Patch Changes
|
package/dist/cjs/plugin/index.js
CHANGED
@@ -105,7 +105,6 @@ var blockTypePlugin = exports.blockTypePlugin = function blockTypePlugin(_ref3)
|
|
105
105
|
var _api$primaryToolbar;
|
106
106
|
var options = _ref3.config,
|
107
107
|
api = _ref3.api;
|
108
|
-
// Confluence and Jira is pulling it in through platform feature flags, from a feature gate
|
109
108
|
var isNestingInQuoteSchemaChanged = (0, _platformFeatureFlags.fg)('platform_editor_nest_in_quotes_adf_change') || (0, _platformFeatureFlags.fg)('editor_nest_media_and_codeblock_in_quotes_jira');
|
110
109
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref4) {
|
111
110
|
var popupsMountPoint = _ref4.popupsMountPoint,
|
@@ -4,12 +4,13 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
5
5
|
value: true
|
6
6
|
});
|
7
|
-
exports.pluginKey = exports.createPlugin = void 0;
|
7
|
+
exports.pluginKey = exports.handleBlockQuoteDND = exports.createPlugin = void 0;
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
10
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
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
13
14
|
var _blockTypes = require("../block-types");
|
14
15
|
var _commands = require("../commands");
|
15
16
|
var _consts = require("../consts");
|
@@ -145,7 +146,44 @@ var createPlugin = exports.createPlugin = function createPlugin(editorAPI, dispa
|
|
145
146
|
altKeyLocation = 0;
|
146
147
|
}
|
147
148
|
return false;
|
149
|
+
},
|
150
|
+
handleDrop: function handleDrop(view, event, slice, moved) {
|
151
|
+
return handleBlockQuoteDND(view, event, slice);
|
148
152
|
}
|
149
153
|
}
|
150
154
|
});
|
155
|
+
};
|
156
|
+
var handleBlockQuoteDND = exports.handleBlockQuoteDND = function handleBlockQuoteDND(view, event, slice) {
|
157
|
+
// Throwaway code for the sake of the expiriment. handleDrop can be removed after experiment complete.
|
158
|
+
if ((0, _experiments.editorExperiment)('nest-media-and-codeblock-in-quote', false)) {
|
159
|
+
var sliceContainsCodeBlockOrMedia = false;
|
160
|
+
slice.content.forEach(function (node) {
|
161
|
+
if (node.type === view.state.schema.nodes.codeBlock) {
|
162
|
+
sliceContainsCodeBlockOrMedia = true;
|
163
|
+
} else if (node.type === view.state.schema.nodes.mediaSingle) {
|
164
|
+
sliceContainsCodeBlockOrMedia = true;
|
165
|
+
} else if (node.type === view.state.schema.nodes.mediaGroup) {
|
166
|
+
sliceContainsCodeBlockOrMedia = true;
|
167
|
+
}
|
168
|
+
});
|
169
|
+
if (sliceContainsCodeBlockOrMedia) {
|
170
|
+
var state = view.state;
|
171
|
+
var schema = state.schema;
|
172
|
+
var dropPos = view.posAtCoords({
|
173
|
+
left: event.clientX,
|
174
|
+
top: event.clientY
|
175
|
+
});
|
176
|
+
if (!dropPos) {
|
177
|
+
return false;
|
178
|
+
}
|
179
|
+
var resolvedPos = state.doc.resolve(dropPos.pos);
|
180
|
+
var dropLocationNodeType = resolvedPos.node().type;
|
181
|
+
var dropLocationParentNodeType = resolvedPos.depth > 0 ? resolvedPos.node(resolvedPos.depth - 1).type : dropLocationNodeType;
|
182
|
+
if (dropLocationNodeType === schema.nodes.blockquote || dropLocationParentNodeType === schema.nodes.blockquote) {
|
183
|
+
event.preventDefault();
|
184
|
+
return true;
|
185
|
+
}
|
186
|
+
}
|
187
|
+
}
|
188
|
+
return false;
|
151
189
|
};
|
@@ -11,10 +11,9 @@ var _reactIntlNext = require("react-intl-next");
|
|
11
11
|
var _messages = require("@atlaskit/editor-common/messages");
|
12
12
|
var _styles = require("@atlaskit/editor-common/styles");
|
13
13
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
14
|
-
var _textStyleEditorTextStyle = _interopRequireDefault(require("@atlaskit/icon/core/migration/text-style--editor-text-style"));
|
15
14
|
var _text = _interopRequireDefault(require("@atlaskit/icon/core/text"));
|
15
|
+
var _textStyle = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/text-style"));
|
16
16
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
|
17
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
18
17
|
var _blockTypes = require("../../block-types");
|
19
18
|
var _styled = require("./styled");
|
20
19
|
/**
|
@@ -47,17 +46,12 @@ var BlockTypeButton = exports.BlockTypeButton = function BlockTypeButton(props)
|
|
47
46
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
48
47
|
css: [_styles.wrapperStyle, props.isSmall && _styled.wrapperSmallStyle],
|
49
48
|
"data-testid": "toolbar-block-type-text-styles-icon"
|
50
|
-
}, (0, _react2.jsx)(_react.default.Fragment, null, props.isSmall && (
|
51
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
52
|
-
(0, _platformFeatureFlags.fg)('platform.design-system-team.enable-new-icons') ? (0, _react2.jsx)(_text.default, {
|
49
|
+
}, (0, _react2.jsx)(_react.default.Fragment, null, props.isSmall && (0, _react2.jsx)(_text.default, {
|
53
50
|
label: labelTextStyles,
|
54
51
|
spacing: "spacious",
|
55
|
-
color: "currentColor"
|
56
|
-
}) : (0, _react2.jsx)(_textStyleEditorTextStyle.default, {
|
57
52
|
color: "currentColor",
|
58
|
-
|
59
|
-
|
60
|
-
})), (0, _react2.jsx)("span", {
|
53
|
+
LEGACY_fallbackIcon: _textStyle.default
|
54
|
+
}), (0, _react2.jsx)("span", {
|
61
55
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
62
56
|
css: _styles.expandIconContainerStyle
|
63
57
|
}, (0, _react2.jsx)(_chevronDown.default, {
|
@@ -90,7 +90,6 @@ const blockTypePlugin = ({
|
|
90
90
|
api
|
91
91
|
}) => {
|
92
92
|
var _api$primaryToolbar;
|
93
|
-
// Confluence and Jira is pulling it in through platform feature flags, from a feature gate
|
94
93
|
const isNestingInQuoteSchemaChanged = fg('platform_editor_nest_in_quotes_adf_change') || fg('editor_nest_media_and_codeblock_in_quotes_jira');
|
95
94
|
const primaryToolbarComponent = ({
|
96
95
|
popupsMountPoint,
|
@@ -2,6 +2,7 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
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
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
5
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';
|
6
7
|
import { setHeadingWithAnalytics, setNormalTextWithAnalytics } from '../commands';
|
7
8
|
import { HEADING_KEYS } from '../consts';
|
@@ -133,7 +134,48 @@ export const createPlugin = (editorAPI, dispatch, lastNodeMustBeParagraph) => {
|
|
133
134
|
altKeyLocation = 0;
|
134
135
|
}
|
135
136
|
return false;
|
137
|
+
},
|
138
|
+
handleDrop(view, event, slice, moved) {
|
139
|
+
return handleBlockQuoteDND(view, event, slice);
|
136
140
|
}
|
137
141
|
}
|
138
142
|
});
|
143
|
+
};
|
144
|
+
export const handleBlockQuoteDND = (view, event, slice) => {
|
145
|
+
// Throwaway code for the sake of the expiriment. handleDrop can be removed after experiment complete.
|
146
|
+
if (editorExperiment('nest-media-and-codeblock-in-quote', false)) {
|
147
|
+
let sliceContainsCodeBlockOrMedia = false;
|
148
|
+
slice.content.forEach(node => {
|
149
|
+
if (node.type === view.state.schema.nodes.codeBlock) {
|
150
|
+
sliceContainsCodeBlockOrMedia = true;
|
151
|
+
} else if (node.type === view.state.schema.nodes.mediaSingle) {
|
152
|
+
sliceContainsCodeBlockOrMedia = true;
|
153
|
+
} else if (node.type === view.state.schema.nodes.mediaGroup) {
|
154
|
+
sliceContainsCodeBlockOrMedia = true;
|
155
|
+
}
|
156
|
+
});
|
157
|
+
if (sliceContainsCodeBlockOrMedia) {
|
158
|
+
const {
|
159
|
+
state
|
160
|
+
} = view;
|
161
|
+
const {
|
162
|
+
schema
|
163
|
+
} = state;
|
164
|
+
const dropPos = view.posAtCoords({
|
165
|
+
left: event.clientX,
|
166
|
+
top: event.clientY
|
167
|
+
});
|
168
|
+
if (!dropPos) {
|
169
|
+
return false;
|
170
|
+
}
|
171
|
+
const resolvedPos = state.doc.resolve(dropPos.pos);
|
172
|
+
const dropLocationNodeType = resolvedPos.node().type;
|
173
|
+
const dropLocationParentNodeType = resolvedPos.depth > 0 ? resolvedPos.node(resolvedPos.depth - 1).type : dropLocationNodeType;
|
174
|
+
if (dropLocationNodeType === schema.nodes.blockquote || dropLocationParentNodeType === schema.nodes.blockquote) {
|
175
|
+
event.preventDefault();
|
176
|
+
return true;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
}
|
180
|
+
return false;
|
139
181
|
};
|
@@ -10,10 +10,9 @@ import { FormattedMessage } from 'react-intl-next';
|
|
10
10
|
import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
11
11
|
import { expandIconContainerStyle, wrapperStyle } from '@atlaskit/editor-common/styles';
|
12
12
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
13
|
-
import TextStyleIcon from '@atlaskit/icon/core/migration/text-style--editor-text-style';
|
14
13
|
import TextIcon from '@atlaskit/icon/core/text';
|
14
|
+
import { default as TextStyleIconLegacy } from '@atlaskit/icon/glyph/editor/text-style';
|
15
15
|
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
17
16
|
import { NORMAL_TEXT } from '../../block-types';
|
18
17
|
import { buttonContentReducedSpacingStyle, buttonContentStyle, wrapperSmallStyle } from './styled';
|
19
18
|
export const BlockTypeButton = props => {
|
@@ -39,17 +38,12 @@ export const BlockTypeButton = props => {
|
|
39
38
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
40
39
|
css: [wrapperStyle, props.isSmall && wrapperSmallStyle],
|
41
40
|
"data-testid": "toolbar-block-type-text-styles-icon"
|
42
|
-
}, jsx(React.Fragment, null, props.isSmall && (
|
43
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
44
|
-
fg('platform.design-system-team.enable-new-icons') ? jsx(TextIcon, {
|
41
|
+
}, jsx(React.Fragment, null, props.isSmall && jsx(TextIcon, {
|
45
42
|
label: labelTextStyles,
|
46
43
|
spacing: "spacious",
|
47
|
-
color: "currentColor"
|
48
|
-
}) : jsx(TextStyleIcon, {
|
49
44
|
color: "currentColor",
|
50
|
-
|
51
|
-
|
52
|
-
})), jsx("span", {
|
45
|
+
LEGACY_fallbackIcon: TextStyleIconLegacy
|
46
|
+
}), jsx("span", {
|
53
47
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
54
48
|
css: expandIconContainerStyle
|
55
49
|
}, jsx(ChevronDownIcon, {
|
package/dist/esm/plugin/index.js
CHANGED
@@ -92,7 +92,6 @@ var blockTypePlugin = function blockTypePlugin(_ref3) {
|
|
92
92
|
var _api$primaryToolbar;
|
93
93
|
var options = _ref3.config,
|
94
94
|
api = _ref3.api;
|
95
|
-
// Confluence and Jira is pulling it in through platform feature flags, from a feature gate
|
96
95
|
var isNestingInQuoteSchemaChanged = fg('platform_editor_nest_in_quotes_adf_change') || fg('editor_nest_media_and_codeblock_in_quotes_jira');
|
97
96
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref4) {
|
98
97
|
var popupsMountPoint = _ref4.popupsMountPoint,
|
@@ -5,6 +5,7 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
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
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
8
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';
|
9
10
|
import { setHeadingWithAnalytics, setNormalTextWithAnalytics } from '../commands';
|
10
11
|
import { HEADING_KEYS } from '../consts';
|
@@ -138,7 +139,44 @@ export var createPlugin = function createPlugin(editorAPI, dispatch, lastNodeMus
|
|
138
139
|
altKeyLocation = 0;
|
139
140
|
}
|
140
141
|
return false;
|
142
|
+
},
|
143
|
+
handleDrop: function handleDrop(view, event, slice, moved) {
|
144
|
+
return handleBlockQuoteDND(view, event, slice);
|
141
145
|
}
|
142
146
|
}
|
143
147
|
});
|
148
|
+
};
|
149
|
+
export var handleBlockQuoteDND = function handleBlockQuoteDND(view, event, slice) {
|
150
|
+
// Throwaway code for the sake of the expiriment. handleDrop can be removed after experiment complete.
|
151
|
+
if (editorExperiment('nest-media-and-codeblock-in-quote', false)) {
|
152
|
+
var sliceContainsCodeBlockOrMedia = false;
|
153
|
+
slice.content.forEach(function (node) {
|
154
|
+
if (node.type === view.state.schema.nodes.codeBlock) {
|
155
|
+
sliceContainsCodeBlockOrMedia = true;
|
156
|
+
} else if (node.type === view.state.schema.nodes.mediaSingle) {
|
157
|
+
sliceContainsCodeBlockOrMedia = true;
|
158
|
+
} else if (node.type === view.state.schema.nodes.mediaGroup) {
|
159
|
+
sliceContainsCodeBlockOrMedia = true;
|
160
|
+
}
|
161
|
+
});
|
162
|
+
if (sliceContainsCodeBlockOrMedia) {
|
163
|
+
var state = view.state;
|
164
|
+
var schema = state.schema;
|
165
|
+
var dropPos = view.posAtCoords({
|
166
|
+
left: event.clientX,
|
167
|
+
top: event.clientY
|
168
|
+
});
|
169
|
+
if (!dropPos) {
|
170
|
+
return false;
|
171
|
+
}
|
172
|
+
var resolvedPos = state.doc.resolve(dropPos.pos);
|
173
|
+
var dropLocationNodeType = resolvedPos.node().type;
|
174
|
+
var dropLocationParentNodeType = resolvedPos.depth > 0 ? resolvedPos.node(resolvedPos.depth - 1).type : dropLocationNodeType;
|
175
|
+
if (dropLocationNodeType === schema.nodes.blockquote || dropLocationParentNodeType === schema.nodes.blockquote) {
|
176
|
+
event.preventDefault();
|
177
|
+
return true;
|
178
|
+
}
|
179
|
+
}
|
180
|
+
}
|
181
|
+
return false;
|
144
182
|
};
|
@@ -10,10 +10,9 @@ import { FormattedMessage } from 'react-intl-next';
|
|
10
10
|
import { toolbarMessages } from '@atlaskit/editor-common/messages';
|
11
11
|
import { expandIconContainerStyle, wrapperStyle } from '@atlaskit/editor-common/styles';
|
12
12
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
13
|
-
import TextStyleIcon from '@atlaskit/icon/core/migration/text-style--editor-text-style';
|
14
13
|
import TextIcon from '@atlaskit/icon/core/text';
|
14
|
+
import { default as TextStyleIconLegacy } from '@atlaskit/icon/glyph/editor/text-style';
|
15
15
|
import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
|
16
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
17
16
|
import { NORMAL_TEXT } from '../../block-types';
|
18
17
|
import { buttonContentReducedSpacingStyle, buttonContentStyle, wrapperSmallStyle } from './styled';
|
19
18
|
export var BlockTypeButton = function BlockTypeButton(props) {
|
@@ -39,17 +38,12 @@ export var BlockTypeButton = function BlockTypeButton(props) {
|
|
39
38
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
40
39
|
css: [wrapperStyle, props.isSmall && wrapperSmallStyle],
|
41
40
|
"data-testid": "toolbar-block-type-text-styles-icon"
|
42
|
-
}, jsx(React.Fragment, null, props.isSmall && (
|
43
|
-
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
|
44
|
-
fg('platform.design-system-team.enable-new-icons') ? jsx(TextIcon, {
|
41
|
+
}, jsx(React.Fragment, null, props.isSmall && jsx(TextIcon, {
|
45
42
|
label: labelTextStyles,
|
46
43
|
spacing: "spacious",
|
47
|
-
color: "currentColor"
|
48
|
-
}) : jsx(TextStyleIcon, {
|
49
44
|
color: "currentColor",
|
50
|
-
|
51
|
-
|
52
|
-
})), jsx("span", {
|
45
|
+
LEGACY_fallbackIcon: TextStyleIconLegacy
|
46
|
+
}), jsx("span", {
|
53
47
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
54
48
|
css: expandIconContainerStyle
|
55
49
|
}, jsx(ChevronDownIcon, {
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import type { Command, EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
2
2
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
3
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
4
3
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
5
4
|
import type { TextBlockTypes } from './block-types';
|
6
5
|
import type { InputMethod } from './commands/block-type';
|
@@ -8,11 +7,7 @@ import type { BlockTypeState } from './pm-plugins/main';
|
|
8
7
|
import type { BlockTypePluginOptions } from './types';
|
9
8
|
export type BlockTypePlugin = NextEditorPlugin<'blockType', {
|
10
9
|
pluginConfiguration: BlockTypePluginOptions | undefined;
|
11
|
-
dependencies: [
|
12
|
-
OptionalPlugin<AnalyticsPlugin>,
|
13
|
-
OptionalPlugin<PrimaryToolbarPlugin>,
|
14
|
-
OptionalPlugin<FeatureFlagsPlugin>
|
15
|
-
];
|
10
|
+
dependencies: [OptionalPlugin<AnalyticsPlugin>, OptionalPlugin<PrimaryToolbarPlugin>];
|
16
11
|
sharedState: BlockTypeState | undefined;
|
17
12
|
actions: {
|
18
13
|
insertBlockQuote: (inputMethod: InputMethod) => Command;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
3
|
+
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
3
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
5
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
4
6
|
import type { BlockTypePlugin } from '../index';
|
5
7
|
import type { BlockType } from '../types';
|
6
8
|
export type BlockTypeState = {
|
@@ -16,3 +18,4 @@ export declare const createPlugin: (editorAPI: ExtractInjectionAPI<BlockTypePlug
|
|
16
18
|
availableBlockTypes: BlockType[];
|
17
19
|
availableWrapperBlockTypes: BlockType[];
|
18
20
|
}>;
|
21
|
+
export declare const handleBlockQuoteDND: (view: EditorView, event: DragEvent, slice: Slice) => boolean;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import type { Command, EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
2
2
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
3
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
4
3
|
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
5
4
|
import type { TextBlockTypes } from './block-types';
|
6
5
|
import type { InputMethod } from './commands/block-type';
|
@@ -10,8 +9,7 @@ export type BlockTypePlugin = NextEditorPlugin<'blockType', {
|
|
10
9
|
pluginConfiguration: BlockTypePluginOptions | undefined;
|
11
10
|
dependencies: [
|
12
11
|
OptionalPlugin<AnalyticsPlugin>,
|
13
|
-
OptionalPlugin<PrimaryToolbarPlugin
|
14
|
-
OptionalPlugin<FeatureFlagsPlugin>
|
12
|
+
OptionalPlugin<PrimaryToolbarPlugin>
|
15
13
|
];
|
16
14
|
sharedState: BlockTypeState | undefined;
|
17
15
|
actions: {
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
3
|
+
import type { Slice } from '@atlaskit/editor-prosemirror/model';
|
3
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
5
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
4
6
|
import type { BlockTypePlugin } from '../index';
|
5
7
|
import type { BlockType } from '../types';
|
6
8
|
export type BlockTypeState = {
|
@@ -16,3 +18,4 @@ export declare const createPlugin: (editorAPI: ExtractInjectionAPI<BlockTypePlug
|
|
16
18
|
availableBlockTypes: BlockType[];
|
17
19
|
availableWrapperBlockTypes: BlockType[];
|
18
20
|
}>;
|
21
|
+
export declare const handleBlockQuoteDND: (view: EditorView, event: DragEvent, slice: Slice) => boolean;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
3
|
-
"version": "3.14.
|
3
|
+
"version": "3.14.9",
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
5
5
|
"author": "Atlassian Pty Ltd",
|
6
6
|
"license": "Apache-2.0",
|
@@ -34,18 +34,18 @@
|
|
34
34
|
},
|
35
35
|
"dependencies": {
|
36
36
|
"@atlaskit/adf-schema": "^40.9.0",
|
37
|
-
"@atlaskit/editor-common": "^89.
|
37
|
+
"@atlaskit/editor-common": "^89.3.0",
|
38
38
|
"@atlaskit/editor-plugin-analytics": "^1.8.0",
|
39
39
|
"@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
|
40
40
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
41
41
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
42
42
|
"@atlaskit/editor-tables": "^2.8.0",
|
43
|
-
"@atlaskit/icon": "^22.
|
43
|
+
"@atlaskit/icon": "^22.18.0",
|
44
44
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
45
45
|
"@atlaskit/prosemirror-input-rules": "^3.2.0",
|
46
46
|
"@atlaskit/theme": "^13.0.0",
|
47
47
|
"@atlaskit/tmp-editor-statsig": "*",
|
48
|
-
"@atlaskit/tokens": "^1.
|
48
|
+
"@atlaskit/tokens": "^1.60.0",
|
49
49
|
"@babel/runtime": "^7.0.0",
|
50
50
|
"@emotion/react": "^11.7.1"
|
51
51
|
},
|
@@ -56,7 +56,6 @@
|
|
56
56
|
"devDependencies": {
|
57
57
|
"@af/visual-regression": "*",
|
58
58
|
"@atlaskit/analytics-next": "^10.1.0",
|
59
|
-
"@atlaskit/editor-plugin-feature-flags": "^1.2.0",
|
60
59
|
"@atlaskit/editor-plugin-quick-insert": "^1.3.0",
|
61
60
|
"@atlaskit/editor-plugin-type-ahead": "^1.8.0",
|
62
61
|
"@atlaskit/ssr": "*",
|