@atlaskit/editor-plugin-breakout 1.9.4 → 1.9.6
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 +16 -0
- package/dist/cjs/{plugin.js → breakoutPlugin.js} +11 -4
- package/dist/cjs/{commands → editor-commands}/remove-breakout.js +2 -2
- package/dist/cjs/{commands → editor-commands}/set-breakout-mode.js +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/ui/LayoutButton.js +6 -6
- package/dist/es2019/{plugin.js → breakoutPlugin.js} +11 -4
- package/dist/es2019/{commands → editor-commands}/remove-breakout.js +2 -2
- package/dist/es2019/{commands → editor-commands}/set-breakout-mode.js +2 -2
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/ui/LayoutButton.js +6 -6
- package/dist/esm/{plugin.js → breakoutPlugin.js} +11 -4
- package/dist/esm/{commands → editor-commands}/remove-breakout.js +2 -2
- package/dist/esm/{commands → editor-commands}/set-breakout-mode.js +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/ui/LayoutButton.js +6 -6
- package/dist/types/breakoutPlugin.d.ts +2 -0
- package/dist/types/{plugin.d.ts → breakoutPluginType.d.ts} +7 -3
- package/dist/types/index.d.ts +2 -3
- package/dist/{types-ts4.5 → types/pm-plugins}/plugin-key.d.ts +1 -1
- package/dist/types-ts4.5/breakoutPlugin.d.ts +2 -0
- package/dist/types-ts4.5/{plugin.d.ts → breakoutPluginType.d.ts} +7 -3
- package/dist/types-ts4.5/index.d.ts +2 -3
- package/dist/{types → types-ts4.5/pm-plugins}/plugin-key.d.ts +1 -1
- package/package.json +10 -5
- package/dist/types/types.d.ts +0 -4
- package/dist/types-ts4.5/types.d.ts +0 -4
- /package/dist/cjs/{types.js → breakoutPluginType.js} +0 -0
- /package/dist/cjs/{plugin-key.js → pm-plugins/plugin-key.js} +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/find-breakout-node.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/get-breakout-mode.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/is-breakout-mark-allowed.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/is-supported-node.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/single-player-expand.js +0 -0
- /package/dist/es2019/{types.js → breakoutPluginType.js} +0 -0
- /package/dist/es2019/{plugin-key.js → pm-plugins/plugin-key.js} +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/find-breakout-node.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/get-breakout-mode.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/is-breakout-mark-allowed.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/is-supported-node.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/single-player-expand.js +0 -0
- /package/dist/esm/{types.js → breakoutPluginType.js} +0 -0
- /package/dist/esm/{plugin-key.js → pm-plugins/plugin-key.js} +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/find-breakout-node.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/get-breakout-mode.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/is-breakout-mark-allowed.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/is-supported-node.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/single-player-expand.js +0 -0
- /package/dist/types/{commands → editor-commands}/remove-breakout.d.ts +0 -0
- /package/dist/types/{commands → editor-commands}/set-breakout-mode.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/find-breakout-node.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/get-breakout-mode.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/is-breakout-mark-allowed.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/is-supported-node.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/single-player-expand.d.ts +0 -0
- /package/dist/types-ts4.5/{commands → editor-commands}/remove-breakout.d.ts +0 -0
- /package/dist/types-ts4.5/{commands → editor-commands}/set-breakout-mode.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/find-breakout-node.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/get-breakout-mode.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/is-breakout-mark-allowed.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/is-supported-node.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/single-player-expand.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-breakout
|
|
2
2
|
|
|
3
|
+
## 1.9.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#169341](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/169341)
|
|
8
|
+
[`b8cceed0c0786`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b8cceed0c0786) -
|
|
9
|
+
ED-25806: migrates file structure to editor engineering standards
|
|
10
|
+
|
|
11
|
+
## 1.9.5
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#169284](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/169284)
|
|
16
|
+
[`6e121d2945aae`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6e121d2945aae) -
|
|
17
|
+
ED-25760 draop hints are not triggered for unchanged layout
|
|
18
|
+
|
|
3
19
|
## 1.9.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -16,9 +16,10 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
16
16
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
17
17
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
18
18
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
|
-
var
|
|
19
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
20
|
+
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
21
|
+
var _findBreakoutNode = require("./pm-plugins/utils/find-breakout-node");
|
|
20
22
|
var _LayoutButton = _interopRequireDefault(require("./ui/LayoutButton"));
|
|
21
|
-
var _findBreakoutNode = require("./utils/find-breakout-node");
|
|
22
23
|
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; }
|
|
23
24
|
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; }
|
|
24
25
|
var BreakoutViewOld = /*#__PURE__*/function () {
|
|
@@ -212,10 +213,16 @@ var LayoutButtonWrapper = function LayoutButtonWrapper(_ref3) {
|
|
|
212
213
|
scrollableElement = _ref3.scrollableElement,
|
|
213
214
|
mountPoint = _ref3.mountPoint;
|
|
214
215
|
// Re-render with `width` (but don't use state) due to https://bitbucket.org/atlassian/%7Bc8e2f021-38d2-46d0-9b7a-b3f7b428f724%7D/pull-requests/24272
|
|
215
|
-
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['width', 'breakout', 'editorViewMode', 'editorDisabled']),
|
|
216
|
+
var _useSharedPluginState = (0, _hooks.useSharedPluginState)(api, ['width', 'breakout', 'editorViewMode', 'editorDisabled', 'blockControls']),
|
|
216
217
|
breakoutState = _useSharedPluginState.breakoutState,
|
|
217
218
|
editorViewModeState = _useSharedPluginState.editorViewModeState,
|
|
218
|
-
editorDisabledState = _useSharedPluginState.editorDisabledState
|
|
219
|
+
editorDisabledState = _useSharedPluginState.editorDisabledState,
|
|
220
|
+
blockControlsState = _useSharedPluginState.blockControlsState;
|
|
221
|
+
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isDragging || blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isPMDragging) {
|
|
222
|
+
if ((0, _experiments.editorExperiment)('advanced_layouts', true)) {
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
219
226
|
var isViewMode = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
220
227
|
var isEditMode = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'edit';
|
|
221
228
|
if ((0, _platformFeatureFlags.fg)('platform_editor_react_editor_view_react_18')) {
|
|
@@ -7,8 +7,8 @@ exports.removeBreakout = removeBreakout;
|
|
|
7
7
|
var _codeBlock = require("@atlaskit/editor-common/code-block");
|
|
8
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
9
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
|
-
var _findBreakoutNode = require("../utils/find-breakout-node");
|
|
11
|
-
var _singlePlayerExpand = require("../utils/single-player-expand");
|
|
10
|
+
var _findBreakoutNode = require("../pm-plugins/utils/find-breakout-node");
|
|
11
|
+
var _singlePlayerExpand = require("../pm-plugins/utils/single-player-expand");
|
|
12
12
|
function removeBreakout(isLivePage) {
|
|
13
13
|
return function (state, dispatch) {
|
|
14
14
|
var node = (0, _findBreakoutNode.findSupportedNodeForBreakout)(state.selection);
|
|
@@ -7,8 +7,8 @@ exports.setBreakoutMode = setBreakoutMode;
|
|
|
7
7
|
var _codeBlock = require("@atlaskit/editor-common/code-block");
|
|
8
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
9
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
|
-
var _findBreakoutNode = require("../utils/find-breakout-node");
|
|
11
|
-
var _singlePlayerExpand = require("../utils/single-player-expand");
|
|
10
|
+
var _findBreakoutNode = require("../pm-plugins/utils/find-breakout-node");
|
|
11
|
+
var _singlePlayerExpand = require("../pm-plugins/utils/single-player-expand");
|
|
12
12
|
function setBreakoutMode(mode, isLivePage) {
|
|
13
13
|
return function (state, dispatch) {
|
|
14
14
|
var node = (0, _findBreakoutNode.findSupportedNodeForBreakout)(state.selection);
|
package/dist/cjs/index.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "breakoutPlugin", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function get() {
|
|
9
|
-
return
|
|
9
|
+
return _breakoutPlugin.breakoutPlugin;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
var
|
|
12
|
+
var _breakoutPlugin = require("./breakoutPlugin");
|
|
@@ -20,12 +20,12 @@ var _collapse = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/coll
|
|
|
20
20
|
var _expand = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/expand"));
|
|
21
21
|
var _colors = require("@atlaskit/theme/colors");
|
|
22
22
|
var _constants = require("@atlaskit/theme/constants");
|
|
23
|
-
var _removeBreakout = require("../commands/remove-breakout");
|
|
24
|
-
var _setBreakoutMode = require("../commands/set-breakout-mode");
|
|
25
|
-
var _pluginKey = require("../plugin-key");
|
|
26
|
-
var _getBreakoutMode = require("../utils/get-breakout-mode");
|
|
27
|
-
var _isBreakoutMarkAllowed = require("../utils/is-breakout-mark-allowed");
|
|
28
|
-
var _isSupportedNode = require("../utils/is-supported-node");
|
|
23
|
+
var _removeBreakout = require("../editor-commands/remove-breakout");
|
|
24
|
+
var _setBreakoutMode = require("../editor-commands/set-breakout-mode");
|
|
25
|
+
var _pluginKey = require("../pm-plugins/plugin-key");
|
|
26
|
+
var _getBreakoutMode = require("../pm-plugins/utils/get-breakout-mode");
|
|
27
|
+
var _isBreakoutMarkAllowed = require("../pm-plugins/utils/is-breakout-mark-allowed");
|
|
28
|
+
var _isSupportedNode = require("../pm-plugins/utils/is-supported-node");
|
|
29
29
|
/**
|
|
30
30
|
* @jsxRuntime classic
|
|
31
31
|
* @jsx jsx
|
|
@@ -7,9 +7,10 @@ import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
|
7
7
|
import { calcBreakoutWidthPx } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { akEditorGutterPaddingDynamic, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import {
|
|
10
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
|
+
import { pluginKey } from './pm-plugins/plugin-key';
|
|
12
|
+
import { findSupportedNodeForBreakout } from './pm-plugins/utils/find-breakout-node';
|
|
11
13
|
import LayoutButton from './ui/LayoutButton';
|
|
12
|
-
import { findSupportedNodeForBreakout } from './utils/find-breakout-node';
|
|
13
14
|
class BreakoutViewOld {
|
|
14
15
|
constructor(
|
|
15
16
|
/**
|
|
@@ -206,8 +207,14 @@ const LayoutButtonWrapper = ({
|
|
|
206
207
|
const {
|
|
207
208
|
breakoutState,
|
|
208
209
|
editorViewModeState,
|
|
209
|
-
editorDisabledState
|
|
210
|
-
|
|
210
|
+
editorDisabledState,
|
|
211
|
+
blockControlsState
|
|
212
|
+
} = useSharedPluginState(api, ['width', 'breakout', 'editorViewMode', 'editorDisabled', 'blockControls']);
|
|
213
|
+
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isDragging || blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isPMDragging) {
|
|
214
|
+
if (editorExperiment('advanced_layouts', true)) {
|
|
215
|
+
return null;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
211
218
|
const isViewMode = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
212
219
|
const isEditMode = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'edit';
|
|
213
220
|
if (fg('platform_editor_react_editor_view_react_18')) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { transferCodeBlockWrappedValue } from '@atlaskit/editor-common/code-block';
|
|
2
2
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { findSupportedNodeForBreakout } from '../utils/find-breakout-node';
|
|
5
|
-
import { updateExpandedState } from '../utils/single-player-expand';
|
|
4
|
+
import { findSupportedNodeForBreakout } from '../pm-plugins/utils/find-breakout-node';
|
|
5
|
+
import { updateExpandedState } from '../pm-plugins/utils/single-player-expand';
|
|
6
6
|
export function removeBreakout(isLivePage) {
|
|
7
7
|
return (state, dispatch) => {
|
|
8
8
|
const node = findSupportedNodeForBreakout(state.selection);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { transferCodeBlockWrappedValue } from '@atlaskit/editor-common/code-block';
|
|
2
2
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { findSupportedNodeForBreakout } from '../utils/find-breakout-node';
|
|
5
|
-
import { updateExpandedState } from '../utils/single-player-expand';
|
|
4
|
+
import { findSupportedNodeForBreakout } from '../pm-plugins/utils/find-breakout-node';
|
|
5
|
+
import { updateExpandedState } from '../pm-plugins/utils/single-player-expand';
|
|
6
6
|
export function setBreakoutMode(mode, isLivePage) {
|
|
7
7
|
return (state, dispatch) => {
|
|
8
8
|
const node = findSupportedNodeForBreakout(state.selection);
|
package/dist/es2019/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { breakoutPlugin } from './
|
|
1
|
+
export { breakoutPlugin } from './breakoutPlugin';
|
|
@@ -19,12 +19,12 @@ import CollapseIcon from '@atlaskit/icon/glyph/editor/collapse';
|
|
|
19
19
|
import ExpandIcon from '@atlaskit/icon/glyph/editor/expand';
|
|
20
20
|
import { B300, N20A, N300 } from '@atlaskit/theme/colors';
|
|
21
21
|
import { layers } from '@atlaskit/theme/constants';
|
|
22
|
-
import { removeBreakout } from '../commands/remove-breakout';
|
|
23
|
-
import { setBreakoutMode } from '../commands/set-breakout-mode';
|
|
24
|
-
import { getPluginState } from '../plugin-key';
|
|
25
|
-
import { getBreakoutMode } from '../utils/get-breakout-mode';
|
|
26
|
-
import { isBreakoutMarkAllowed } from '../utils/is-breakout-mark-allowed';
|
|
27
|
-
import { isSupportedNodeForBreakout } from '../utils/is-supported-node';
|
|
22
|
+
import { removeBreakout } from '../editor-commands/remove-breakout';
|
|
23
|
+
import { setBreakoutMode } from '../editor-commands/set-breakout-mode';
|
|
24
|
+
import { getPluginState } from '../pm-plugins/plugin-key';
|
|
25
|
+
import { getBreakoutMode } from '../pm-plugins/utils/get-breakout-mode';
|
|
26
|
+
import { isBreakoutMarkAllowed } from '../pm-plugins/utils/is-breakout-mark-allowed';
|
|
27
|
+
import { isSupportedNodeForBreakout } from '../pm-plugins/utils/is-supported-node';
|
|
28
28
|
const toolbarButtonWrapperStyles = css({
|
|
29
29
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
30
30
|
'&& button': {
|
|
@@ -11,9 +11,10 @@ import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
|
11
11
|
import { calcBreakoutWidthPx } from '@atlaskit/editor-common/utils';
|
|
12
12
|
import { akEditorGutterPaddingDynamic, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
-
import {
|
|
14
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
15
|
+
import { pluginKey } from './pm-plugins/plugin-key';
|
|
16
|
+
import { findSupportedNodeForBreakout } from './pm-plugins/utils/find-breakout-node';
|
|
15
17
|
import LayoutButton from './ui/LayoutButton';
|
|
16
|
-
import { findSupportedNodeForBreakout } from './utils/find-breakout-node';
|
|
17
18
|
var BreakoutViewOld = /*#__PURE__*/function () {
|
|
18
19
|
function BreakoutViewOld(
|
|
19
20
|
/**
|
|
@@ -205,10 +206,16 @@ var LayoutButtonWrapper = function LayoutButtonWrapper(_ref3) {
|
|
|
205
206
|
scrollableElement = _ref3.scrollableElement,
|
|
206
207
|
mountPoint = _ref3.mountPoint;
|
|
207
208
|
// Re-render with `width` (but don't use state) due to https://bitbucket.org/atlassian/%7Bc8e2f021-38d2-46d0-9b7a-b3f7b428f724%7D/pull-requests/24272
|
|
208
|
-
var _useSharedPluginState = useSharedPluginState(api, ['width', 'breakout', 'editorViewMode', 'editorDisabled']),
|
|
209
|
+
var _useSharedPluginState = useSharedPluginState(api, ['width', 'breakout', 'editorViewMode', 'editorDisabled', 'blockControls']),
|
|
209
210
|
breakoutState = _useSharedPluginState.breakoutState,
|
|
210
211
|
editorViewModeState = _useSharedPluginState.editorViewModeState,
|
|
211
|
-
editorDisabledState = _useSharedPluginState.editorDisabledState
|
|
212
|
+
editorDisabledState = _useSharedPluginState.editorDisabledState,
|
|
213
|
+
blockControlsState = _useSharedPluginState.blockControlsState;
|
|
214
|
+
if (blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isDragging || blockControlsState !== null && blockControlsState !== void 0 && blockControlsState.isPMDragging) {
|
|
215
|
+
if (editorExperiment('advanced_layouts', true)) {
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
212
219
|
var isViewMode = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'view';
|
|
213
220
|
var isEditMode = (editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode) === 'edit';
|
|
214
221
|
if (fg('platform_editor_react_editor_view_react_18')) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { transferCodeBlockWrappedValue } from '@atlaskit/editor-common/code-block';
|
|
2
2
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { findSupportedNodeForBreakout } from '../utils/find-breakout-node';
|
|
5
|
-
import { updateExpandedState } from '../utils/single-player-expand';
|
|
4
|
+
import { findSupportedNodeForBreakout } from '../pm-plugins/utils/find-breakout-node';
|
|
5
|
+
import { updateExpandedState } from '../pm-plugins/utils/single-player-expand';
|
|
6
6
|
export function removeBreakout(isLivePage) {
|
|
7
7
|
return function (state, dispatch) {
|
|
8
8
|
var node = findSupportedNodeForBreakout(state.selection);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { transferCodeBlockWrappedValue } from '@atlaskit/editor-common/code-block';
|
|
2
2
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { findSupportedNodeForBreakout } from '../utils/find-breakout-node';
|
|
5
|
-
import { updateExpandedState } from '../utils/single-player-expand';
|
|
4
|
+
import { findSupportedNodeForBreakout } from '../pm-plugins/utils/find-breakout-node';
|
|
5
|
+
import { updateExpandedState } from '../pm-plugins/utils/single-player-expand';
|
|
6
6
|
export function setBreakoutMode(mode, isLivePage) {
|
|
7
7
|
return function (state, dispatch) {
|
|
8
8
|
var node = findSupportedNodeForBreakout(state.selection);
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { breakoutPlugin } from './
|
|
1
|
+
export { breakoutPlugin } from './breakoutPlugin';
|
|
@@ -19,12 +19,12 @@ import CollapseIcon from '@atlaskit/icon/glyph/editor/collapse';
|
|
|
19
19
|
import ExpandIcon from '@atlaskit/icon/glyph/editor/expand';
|
|
20
20
|
import { B300, N20A, N300 } from '@atlaskit/theme/colors';
|
|
21
21
|
import { layers } from '@atlaskit/theme/constants';
|
|
22
|
-
import { removeBreakout } from '../commands/remove-breakout';
|
|
23
|
-
import { setBreakoutMode } from '../commands/set-breakout-mode';
|
|
24
|
-
import { getPluginState } from '../plugin-key';
|
|
25
|
-
import { getBreakoutMode } from '../utils/get-breakout-mode';
|
|
26
|
-
import { isBreakoutMarkAllowed } from '../utils/is-breakout-mark-allowed';
|
|
27
|
-
import { isSupportedNodeForBreakout } from '../utils/is-supported-node';
|
|
22
|
+
import { removeBreakout } from '../editor-commands/remove-breakout';
|
|
23
|
+
import { setBreakoutMode } from '../editor-commands/set-breakout-mode';
|
|
24
|
+
import { getPluginState } from '../pm-plugins/plugin-key';
|
|
25
|
+
import { getBreakoutMode } from '../pm-plugins/utils/get-breakout-mode';
|
|
26
|
+
import { isBreakoutMarkAllowed } from '../pm-plugins/utils/is-breakout-mark-allowed';
|
|
27
|
+
import { isSupportedNodeForBreakout } from '../pm-plugins/utils/is-supported-node';
|
|
28
28
|
var toolbarButtonWrapperStyles = css({
|
|
29
29
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
30
30
|
'&& button': {
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import { type BlockControlsPlugin } from '@atlaskit/editor-plugin-block-controls';
|
|
2
3
|
import { type EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
3
4
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
4
5
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
5
|
-
import type {
|
|
6
|
+
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
+
export interface BreakoutPluginState {
|
|
8
|
+
breakoutNode: ContentNodeWithPos | undefined;
|
|
9
|
+
}
|
|
6
10
|
export interface BreakoutPluginOptions {
|
|
7
11
|
allowBreakoutButton?: boolean;
|
|
8
12
|
}
|
|
@@ -11,8 +15,8 @@ export type BreakoutPlugin = NextEditorPlugin<'breakout', {
|
|
|
11
15
|
dependencies: [
|
|
12
16
|
WidthPlugin,
|
|
13
17
|
OptionalPlugin<EditorViewModePlugin>,
|
|
14
|
-
OptionalPlugin<EditorDisabledPlugin
|
|
18
|
+
OptionalPlugin<EditorDisabledPlugin>,
|
|
19
|
+
OptionalPlugin<BlockControlsPlugin>
|
|
15
20
|
];
|
|
16
21
|
sharedState: Partial<BreakoutPluginState>;
|
|
17
22
|
}>;
|
|
18
|
-
export declare const breakoutPlugin: BreakoutPlugin;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export { breakoutPlugin } from './
|
|
2
|
-
export type { BreakoutPlugin, BreakoutPluginOptions } from './
|
|
3
|
-
export type { BreakoutPluginState } from './types';
|
|
1
|
+
export { breakoutPlugin } from './breakoutPlugin';
|
|
2
|
+
export type { BreakoutPlugin, BreakoutPluginOptions, BreakoutPluginState, } from './breakoutPluginType';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { BreakoutPluginState } from '
|
|
3
|
+
import type { BreakoutPluginState } from '../breakoutPluginType';
|
|
4
4
|
export declare const pluginKey: PluginKey<BreakoutPluginState>;
|
|
5
5
|
export declare const getPluginState: (state: EditorState) => BreakoutPluginState | undefined;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
+
import { type BlockControlsPlugin } from '@atlaskit/editor-plugin-block-controls';
|
|
2
3
|
import { type EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
3
4
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
4
5
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
5
|
-
import type {
|
|
6
|
+
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
7
|
+
export interface BreakoutPluginState {
|
|
8
|
+
breakoutNode: ContentNodeWithPos | undefined;
|
|
9
|
+
}
|
|
6
10
|
export interface BreakoutPluginOptions {
|
|
7
11
|
allowBreakoutButton?: boolean;
|
|
8
12
|
}
|
|
@@ -11,8 +15,8 @@ export type BreakoutPlugin = NextEditorPlugin<'breakout', {
|
|
|
11
15
|
dependencies: [
|
|
12
16
|
WidthPlugin,
|
|
13
17
|
OptionalPlugin<EditorViewModePlugin>,
|
|
14
|
-
OptionalPlugin<EditorDisabledPlugin
|
|
18
|
+
OptionalPlugin<EditorDisabledPlugin>,
|
|
19
|
+
OptionalPlugin<BlockControlsPlugin>
|
|
15
20
|
];
|
|
16
21
|
sharedState: Partial<BreakoutPluginState>;
|
|
17
22
|
}>;
|
|
18
|
-
export declare const breakoutPlugin: BreakoutPlugin;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export { breakoutPlugin } from './
|
|
2
|
-
export type { BreakoutPlugin, BreakoutPluginOptions } from './
|
|
3
|
-
export type { BreakoutPluginState } from './types';
|
|
1
|
+
export { breakoutPlugin } from './breakoutPlugin';
|
|
2
|
+
export type { BreakoutPlugin, BreakoutPluginOptions, BreakoutPluginState, } from './breakoutPluginType';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { BreakoutPluginState } from '
|
|
3
|
+
import type { BreakoutPluginState } from '../breakoutPluginType';
|
|
4
4
|
export declare const pluginKey: PluginKey<BreakoutPluginState>;
|
|
5
5
|
export declare const getPluginState: (state: EditorState) => BreakoutPluginState | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-breakout",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.6",
|
|
4
4
|
"description": "Breakout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,16 +32,18 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
35
|
-
"@atlaskit/editor-common": "^95.
|
|
35
|
+
"@atlaskit/editor-common": "^95.10.0",
|
|
36
|
+
"@atlaskit/editor-plugin-block-controls": "^2.13.0",
|
|
36
37
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
37
38
|
"@atlaskit/editor-plugin-editor-viewmode": "^2.1.0",
|
|
38
39
|
"@atlaskit/editor-plugin-width": "^1.3.0",
|
|
39
|
-
"@atlaskit/editor-prosemirror": "6.
|
|
40
|
+
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
40
41
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
41
|
-
"@atlaskit/icon": "^22.
|
|
42
|
+
"@atlaskit/icon": "^22.28.0",
|
|
42
43
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
43
44
|
"@atlaskit/theme": "^14.0.0",
|
|
44
|
-
"@atlaskit/
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^2.17.0",
|
|
46
|
+
"@atlaskit/tokens": "^2.4.0",
|
|
45
47
|
"@babel/runtime": "^7.0.0",
|
|
46
48
|
"@emotion/react": "^11.7.1"
|
|
47
49
|
},
|
|
@@ -69,6 +71,9 @@
|
|
|
69
71
|
],
|
|
70
72
|
"circular-dependencies": [
|
|
71
73
|
"file-and-folder-level"
|
|
74
|
+
],
|
|
75
|
+
"code-structure": [
|
|
76
|
+
"editor-plugin"
|
|
72
77
|
]
|
|
73
78
|
},
|
|
74
79
|
"@repo/internal": {
|
package/dist/types/types.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|