@atlaskit/editor-plugin-layout 1.12.8 → 1.12.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 +9 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/{plugin.js → layoutPlugin.js} +3 -3
- package/dist/cjs/layoutPluginType.js +12 -0
- package/dist/cjs/{actions.js → pm-plugins/actions.js} +1 -1
- package/dist/cjs/pm-plugins/main.js +2 -2
- package/dist/cjs/pm-plugins/resizing.js +2 -2
- package/dist/cjs/{toolbar.js → ui/toolbar.js} +4 -4
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/{plugin.js → layoutPlugin.js} +3 -3
- package/dist/es2019/layoutPluginType.js +2 -0
- package/dist/es2019/{actions.js → pm-plugins/actions.js} +1 -1
- package/dist/es2019/pm-plugins/main.js +2 -2
- package/dist/es2019/pm-plugins/resizing.js +1 -1
- package/dist/es2019/{toolbar.js → ui/toolbar.js} +4 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/{plugin.js → layoutPlugin.js} +3 -3
- package/dist/esm/layoutPluginType.js +2 -0
- package/dist/esm/{actions.js → pm-plugins/actions.js} +1 -1
- package/dist/esm/pm-plugins/main.js +2 -2
- package/dist/esm/pm-plugins/resizing.js +1 -1
- package/dist/esm/{toolbar.js → ui/toolbar.js} +4 -4
- package/dist/types/index.d.ts +2 -2
- package/dist/types/layoutPlugin.d.ts +4 -0
- package/dist/types/{plugin.d.ts → layoutPluginType.d.ts} +1 -2
- package/dist/types/{node-views → nodeviews}/index.d.ts +1 -1
- package/dist/types/{actions.d.ts → pm-plugins/actions.d.ts} +1 -1
- package/dist/types/pm-plugins/resizing.d.ts +1 -1
- package/dist/types/{toolbar.d.ts → ui/toolbar.d.ts} +1 -1
- package/dist/types-ts4.5/index.d.ts +2 -2
- package/dist/types-ts4.5/layoutPlugin.d.ts +4 -0
- package/dist/types-ts4.5/{plugin.d.ts → layoutPluginType.d.ts} +1 -2
- package/dist/types-ts4.5/{node-views → nodeviews}/index.d.ts +1 -1
- package/dist/types-ts4.5/{actions.d.ts → pm-plugins/actions.d.ts} +1 -1
- package/dist/types-ts4.5/pm-plugins/resizing.d.ts +1 -1
- package/dist/types-ts4.5/{toolbar.d.ts → ui/toolbar.d.ts} +1 -1
- package/package.json +8 -5
- /package/dist/cjs/{node-views → nodeviews}/index.js +0 -0
- /package/dist/cjs/{consts.js → pm-plugins/consts.js} +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/index.js +0 -0
- /package/dist/cjs/{utils → pm-plugins/utils}/preRelease.js +0 -0
- /package/dist/cjs/{types.js → types/index.js} +0 -0
- /package/dist/es2019/{node-views → nodeviews}/index.js +0 -0
- /package/dist/es2019/{consts.js → pm-plugins/consts.js} +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/index.js +0 -0
- /package/dist/es2019/{utils → pm-plugins/utils}/preRelease.js +0 -0
- /package/dist/es2019/{types.js → types/index.js} +0 -0
- /package/dist/esm/{node-views → nodeviews}/index.js +0 -0
- /package/dist/esm/{consts.js → pm-plugins/consts.js} +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/index.js +0 -0
- /package/dist/esm/{utils → pm-plugins/utils}/preRelease.js +0 -0
- /package/dist/esm/{types.js → types/index.js} +0 -0
- /package/dist/types/{consts.d.ts → pm-plugins/consts.d.ts} +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/index.d.ts +0 -0
- /package/dist/types/{utils → pm-plugins/utils}/preRelease.d.ts +0 -0
- /package/dist/types/{types.d.ts → types/index.d.ts} +0 -0
- /package/dist/types-ts4.5/{consts.d.ts → pm-plugins/consts.d.ts} +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/index.d.ts +0 -0
- /package/dist/types-ts4.5/{utils → pm-plugins/utils}/preRelease.d.ts +0 -0
- /package/dist/types-ts4.5/{types.d.ts → types/index.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-layout
|
|
2
2
|
|
|
3
|
+
## 1.12.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#170473](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/170473)
|
|
8
|
+
[`2c463f9682286`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2c463f9682286) -
|
|
9
|
+
ED-25813: refactors plugins to meet folder standards
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 1.12.8
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "layoutPlugin", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function get() {
|
|
9
|
-
return
|
|
9
|
+
return _layoutPlugin.layoutPlugin;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
var
|
|
12
|
+
var _layoutPlugin = require("./layoutPlugin");
|
|
@@ -18,13 +18,13 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
18
18
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
19
19
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
20
20
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
|
-
var _actions = require("./actions");
|
|
21
|
+
var _actions = require("./pm-plugins/actions");
|
|
22
22
|
var _main = _interopRequireDefault(require("./pm-plugins/main"));
|
|
23
23
|
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
24
24
|
var _resizing = _interopRequireDefault(require("./pm-plugins/resizing"));
|
|
25
|
-
var
|
|
25
|
+
var _preRelease = require("./pm-plugins/utils/preRelease");
|
|
26
26
|
var _globalStyles = require("./ui/global-styles");
|
|
27
|
-
var
|
|
27
|
+
var _toolbar = require("./ui/toolbar");
|
|
28
28
|
var layoutPlugin = exports.layoutPlugin = function layoutPlugin(_ref) {
|
|
29
29
|
var _api$analytics;
|
|
30
30
|
var _ref$config = _ref.config,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "pluginKey", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _pluginKey.pluginKey;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _pluginKey = require("./pm-plugins/plugin-key");
|
|
@@ -16,7 +16,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
16
16
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
17
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
18
18
|
var _consts = require("./consts");
|
|
19
|
-
var _pluginKey = require("./
|
|
19
|
+
var _pluginKey = require("./plugin-key");
|
|
20
20
|
var _preRelease = require("./utils/preRelease");
|
|
21
21
|
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; }
|
|
22
22
|
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; }
|
|
@@ -13,9 +13,9 @@ var _keymap = require("@atlaskit/editor-prosemirror/keymap");
|
|
|
13
13
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
14
14
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
15
15
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
16
|
-
var _actions = require("
|
|
17
|
-
var _utils3 = require("../utils");
|
|
16
|
+
var _actions = require("./actions");
|
|
18
17
|
var _pluginKey = require("./plugin-key");
|
|
18
|
+
var _utils3 = require("./utils");
|
|
19
19
|
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; }
|
|
20
20
|
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; }
|
|
21
21
|
var DEFAULT_LAYOUT = exports.DEFAULT_LAYOUT = 'two_equal';
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.pluginKey = exports.default = void 0;
|
|
7
7
|
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
8
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
9
|
-
var
|
|
9
|
+
var _nodeviews = require("../nodeviews");
|
|
10
10
|
var pluginKey = exports.pluginKey = new _state.PluginKey('layoutResizingPlugin');
|
|
11
11
|
var _default = exports.default = function _default(options, pluginInjectionApi, portalProviderAPI, eventDispatcher) {
|
|
12
12
|
return new _safePlugin.SafePlugin({
|
|
@@ -14,7 +14,7 @@ var _default = exports.default = function _default(options, pluginInjectionApi,
|
|
|
14
14
|
props: {
|
|
15
15
|
nodeViews: {
|
|
16
16
|
layoutSection: function layoutSection(node, view, getPos) {
|
|
17
|
-
return new
|
|
17
|
+
return new _nodeviews.LayoutSectionView({
|
|
18
18
|
node: node,
|
|
19
19
|
view: view,
|
|
20
20
|
getPos: getPos,
|
|
@@ -24,10 +24,10 @@ var _layoutTwoLeftSidebar = _interopRequireDefault(require("@atlaskit/icon/glyph
|
|
|
24
24
|
var _layoutTwoRightSidebar = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/layout-two-right-sidebar"));
|
|
25
25
|
var _remove = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/remove"));
|
|
26
26
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
27
|
-
var _actions = require("
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
27
|
+
var _actions = require("../pm-plugins/actions");
|
|
28
|
+
var _preRelease = require("../pm-plugins/utils/preRelease");
|
|
29
|
+
var _LayoutThreeWithLeftSidebars = require("./icons/LayoutThreeWithLeftSidebars");
|
|
30
|
+
var _LayoutThreeWithRightSidebars = require("./icons/LayoutThreeWithRightSidebars");
|
|
31
31
|
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); }
|
|
32
32
|
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; }
|
|
33
33
|
var LAYOUT_TYPES = [{
|
package/dist/es2019/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { layoutPlugin } from './
|
|
1
|
+
export { layoutPlugin } from './layoutPlugin';
|
|
@@ -5,13 +5,13 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
5
5
|
import { layoutMessages, toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { IconFiveColumnLayout, IconFourColumnLayout, IconLayout, IconThreeColumnLayout, IconTwoColumnLayout } from '@atlaskit/editor-common/quick-insert';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { createDefaultLayoutSection, createMultiColumnLayoutSection, insertLayoutColumnsWithAnalytics } from './actions';
|
|
8
|
+
import { createDefaultLayoutSection, createMultiColumnLayoutSection, insertLayoutColumnsWithAnalytics } from './pm-plugins/actions';
|
|
9
9
|
import { default as createLayoutPlugin } from './pm-plugins/main';
|
|
10
10
|
import { pluginKey } from './pm-plugins/plugin-key';
|
|
11
11
|
import { default as createLayoutResizingPlugin } from './pm-plugins/resizing';
|
|
12
|
-
import {
|
|
12
|
+
import { isPreRelease2 } from './pm-plugins/utils/preRelease';
|
|
13
13
|
import { GlobalStylesWrapper } from './ui/global-styles';
|
|
14
|
-
import {
|
|
14
|
+
import { buildToolbar } from './ui/toolbar';
|
|
15
15
|
export { pluginKey };
|
|
16
16
|
export const layoutPlugin = ({
|
|
17
17
|
config: options = {},
|
|
@@ -6,7 +6,7 @@ import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state
|
|
|
6
6
|
import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
7
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
8
|
import { EVEN_DISTRIBUTED_COL_WIDTHS } from './consts';
|
|
9
|
-
import { pluginKey } from './
|
|
9
|
+
import { pluginKey } from './plugin-key';
|
|
10
10
|
import { isPreRelease2 } from './utils/preRelease';
|
|
11
11
|
export const ONE_COL_LAYOUTS = ['single'];
|
|
12
12
|
export const TWO_COL_LAYOUTS = ['two_equal', 'two_left_sidebar', 'two_right_sidebar'];
|
|
@@ -5,9 +5,9 @@ import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
|
|
|
5
5
|
import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
7
7
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import { fixColumnSizes, fixColumnStructure, getSelectedLayout } from '
|
|
9
|
-
import { getMaybeLayoutSection } from '../utils';
|
|
8
|
+
import { fixColumnSizes, fixColumnStructure, getSelectedLayout } from './actions';
|
|
10
9
|
import { pluginKey } from './plugin-key';
|
|
10
|
+
import { getMaybeLayoutSection } from './utils';
|
|
11
11
|
export const DEFAULT_LAYOUT = 'two_equal';
|
|
12
12
|
const isWholeSelectionInsideLayoutColumn = state => {
|
|
13
13
|
// Since findParentNodeOfType doesn't check if selection.to shares the parent, we do this check ourselves
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { LayoutSectionView } from '../
|
|
3
|
+
import { LayoutSectionView } from '../nodeviews';
|
|
4
4
|
export const pluginKey = new PluginKey('layoutResizingPlugin');
|
|
5
5
|
export default ((options, pluginInjectionApi, portalProviderAPI, eventDispatcher) => new SafePlugin({
|
|
6
6
|
key: pluginKey,
|
|
@@ -15,10 +15,10 @@ import LayoutTwoLeftSidebarIcon from '@atlaskit/icon/glyph/editor/layout-two-lef
|
|
|
15
15
|
import LayoutTwoRightSidebarIcon from '@atlaskit/icon/glyph/editor/layout-two-right-sidebar';
|
|
16
16
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
17
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
|
-
import { deleteActiveLayoutNode, getPresetLayout, setPresetLayout } from '
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
18
|
+
import { deleteActiveLayoutNode, getPresetLayout, setPresetLayout } from '../pm-plugins/actions';
|
|
19
|
+
import { isPreRelease2 } from '../pm-plugins/utils/preRelease';
|
|
20
|
+
import { LayoutThreeWithLeftSidebarsIcon } from './icons/LayoutThreeWithLeftSidebars';
|
|
21
|
+
import { LayoutThreeWithRightSidebarsIcon } from './icons/LayoutThreeWithRightSidebars';
|
|
22
22
|
const LAYOUT_TYPES = [{
|
|
23
23
|
id: 'editor.layout.twoEquals',
|
|
24
24
|
type: 'two_equal',
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { layoutPlugin } from './
|
|
1
|
+
export { layoutPlugin } from './layoutPlugin';
|
|
@@ -5,13 +5,13 @@ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } f
|
|
|
5
5
|
import { layoutMessages, toolbarInsertBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
6
|
import { IconFiveColumnLayout, IconFourColumnLayout, IconLayout, IconThreeColumnLayout, IconTwoColumnLayout } from '@atlaskit/editor-common/quick-insert';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
-
import { createDefaultLayoutSection, createMultiColumnLayoutSection, insertLayoutColumnsWithAnalytics } from './actions';
|
|
8
|
+
import { createDefaultLayoutSection, createMultiColumnLayoutSection, insertLayoutColumnsWithAnalytics } from './pm-plugins/actions';
|
|
9
9
|
import { default as createLayoutPlugin } from './pm-plugins/main';
|
|
10
10
|
import { pluginKey } from './pm-plugins/plugin-key';
|
|
11
11
|
import { default as createLayoutResizingPlugin } from './pm-plugins/resizing';
|
|
12
|
-
import {
|
|
12
|
+
import { isPreRelease2 } from './pm-plugins/utils/preRelease';
|
|
13
13
|
import { GlobalStylesWrapper } from './ui/global-styles';
|
|
14
|
-
import {
|
|
14
|
+
import { buildToolbar } from './ui/toolbar';
|
|
15
15
|
export { pluginKey };
|
|
16
16
|
export var layoutPlugin = function layoutPlugin(_ref) {
|
|
17
17
|
var _api$analytics;
|
|
@@ -9,7 +9,7 @@ import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state
|
|
|
9
9
|
import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
11
|
import { EVEN_DISTRIBUTED_COL_WIDTHS } from './consts';
|
|
12
|
-
import { pluginKey } from './
|
|
12
|
+
import { pluginKey } from './plugin-key';
|
|
13
13
|
import { isPreRelease2 } from './utils/preRelease';
|
|
14
14
|
export var ONE_COL_LAYOUTS = ['single'];
|
|
15
15
|
export var TWO_COL_LAYOUTS = ['two_equal', 'two_left_sidebar', 'two_right_sidebar'];
|
|
@@ -8,9 +8,9 @@ import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
|
|
|
8
8
|
import { Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
11
|
-
import { fixColumnSizes, fixColumnStructure, getSelectedLayout } from '
|
|
12
|
-
import { getMaybeLayoutSection } from '../utils';
|
|
11
|
+
import { fixColumnSizes, fixColumnStructure, getSelectedLayout } from './actions';
|
|
13
12
|
import { pluginKey } from './plugin-key';
|
|
13
|
+
import { getMaybeLayoutSection } from './utils';
|
|
14
14
|
export var DEFAULT_LAYOUT = 'two_equal';
|
|
15
15
|
var isWholeSelectionInsideLayoutColumn = function isWholeSelectionInsideLayoutColumn(state) {
|
|
16
16
|
// Since findParentNodeOfType doesn't check if selection.to shares the parent, we do this check ourselves
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { LayoutSectionView } from '../
|
|
3
|
+
import { LayoutSectionView } from '../nodeviews';
|
|
4
4
|
export var pluginKey = new PluginKey('layoutResizingPlugin');
|
|
5
5
|
export default (function (options, pluginInjectionApi, portalProviderAPI, eventDispatcher) {
|
|
6
6
|
return new SafePlugin({
|
|
@@ -16,10 +16,10 @@ import LayoutTwoLeftSidebarIcon from '@atlaskit/icon/glyph/editor/layout-two-lef
|
|
|
16
16
|
import LayoutTwoRightSidebarIcon from '@atlaskit/icon/glyph/editor/layout-two-right-sidebar';
|
|
17
17
|
import RemoveIcon from '@atlaskit/icon/glyph/editor/remove';
|
|
18
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
|
-
import { deleteActiveLayoutNode, getPresetLayout, setPresetLayout } from '
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
19
|
+
import { deleteActiveLayoutNode, getPresetLayout, setPresetLayout } from '../pm-plugins/actions';
|
|
20
|
+
import { isPreRelease2 } from '../pm-plugins/utils/preRelease';
|
|
21
|
+
import { LayoutThreeWithLeftSidebarsIcon } from './icons/LayoutThreeWithLeftSidebars';
|
|
22
|
+
import { LayoutThreeWithRightSidebarsIcon } from './icons/LayoutThreeWithRightSidebars';
|
|
23
23
|
var LAYOUT_TYPES = [{
|
|
24
24
|
id: 'editor.layout.twoEquals',
|
|
25
25
|
type: 'two_equal',
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { layoutPlugin } from './
|
|
2
|
-
export type { LayoutPlugin } from './
|
|
1
|
+
export { layoutPlugin } from './layoutPlugin';
|
|
2
|
+
export type { LayoutPlugin } from './layoutPluginType';
|
|
3
3
|
export type { LayoutPluginOptions } from './types';
|
|
@@ -3,7 +3,7 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
|
3
3
|
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
4
4
|
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
5
5
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
6
|
-
import { insertLayoutColumnsWithAnalytics } from './actions';
|
|
6
|
+
import type { insertLayoutColumnsWithAnalytics } from './pm-plugins/actions';
|
|
7
7
|
import { pluginKey } from './pm-plugins/plugin-key';
|
|
8
8
|
import type { LayoutPluginOptions } from './types';
|
|
9
9
|
export { pluginKey };
|
|
@@ -19,4 +19,3 @@ export type LayoutPlugin = NextEditorPlugin<'layout', {
|
|
|
19
19
|
insertLayoutColumns: ReturnType<typeof insertLayoutColumnsWithAnalytics>;
|
|
20
20
|
};
|
|
21
21
|
}>;
|
|
22
|
-
export declare const layoutPlugin: LayoutPlugin;
|
|
@@ -5,7 +5,7 @@ import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
|
5
5
|
import { type ExtractInjectionAPI, type getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
6
6
|
import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
7
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import { type LayoutPlugin } from '../
|
|
8
|
+
import { type LayoutPlugin } from '../layoutPluginType';
|
|
9
9
|
import { type LayoutPluginOptions } from '../types';
|
|
10
10
|
type LayoutSectionViewProps = {
|
|
11
11
|
node: PMNode;
|
|
@@ -2,7 +2,7 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
|
2
2
|
import type { Command, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import type { Change, PresetLayout } from '
|
|
5
|
+
import type { Change, PresetLayout } from '../types';
|
|
6
6
|
export declare const ONE_COL_LAYOUTS: PresetLayout[];
|
|
7
7
|
export declare const TWO_COL_LAYOUTS: PresetLayout[];
|
|
8
8
|
export declare const THREE_COL_LAYOUTS: PresetLayout[];
|
|
@@ -3,7 +3,7 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import { type LayoutPlugin } from '../
|
|
6
|
+
import { type LayoutPlugin } from '../layoutPluginType';
|
|
7
7
|
import type { LayoutPluginOptions } from '../types';
|
|
8
8
|
export declare const pluginKey: PluginKey<any>;
|
|
9
9
|
declare const _default: (options: LayoutPluginOptions, pluginInjectionApi: ExtractInjectionAPI<LayoutPlugin>, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher) => SafePlugin<undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { ExtractInjectionAPI, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { LayoutPlugin } from '
|
|
4
|
+
import type { LayoutPlugin } from '../index';
|
|
5
5
|
export declare const layoutToolbarTitle = "Layout floating controls";
|
|
6
6
|
export declare const buildToolbar: (state: EditorState, intl: IntlShape, pos: number, _allowBreakout: boolean, addSidebarLayouts: boolean, allowSingleColumnLayout: boolean, api: ExtractInjectionAPI<LayoutPlugin> | undefined) => FloatingToolbarConfig | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { layoutPlugin } from './
|
|
2
|
-
export type { LayoutPlugin } from './
|
|
1
|
+
export { layoutPlugin } from './layoutPlugin';
|
|
2
|
+
export type { LayoutPlugin } from './layoutPluginType';
|
|
3
3
|
export type { LayoutPluginOptions } from './types';
|
|
@@ -3,7 +3,7 @@ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
|
3
3
|
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
4
4
|
import type { EditorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
5
5
|
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
6
|
-
import { insertLayoutColumnsWithAnalytics } from './actions';
|
|
6
|
+
import type { insertLayoutColumnsWithAnalytics } from './pm-plugins/actions';
|
|
7
7
|
import { pluginKey } from './pm-plugins/plugin-key';
|
|
8
8
|
import type { LayoutPluginOptions } from './types';
|
|
9
9
|
export { pluginKey };
|
|
@@ -19,4 +19,3 @@ export type LayoutPlugin = NextEditorPlugin<'layout', {
|
|
|
19
19
|
insertLayoutColumns: ReturnType<typeof insertLayoutColumnsWithAnalytics>;
|
|
20
20
|
};
|
|
21
21
|
}>;
|
|
22
|
-
export declare const layoutPlugin: LayoutPlugin;
|
|
@@ -5,7 +5,7 @@ import ReactNodeView from '@atlaskit/editor-common/react-node-view';
|
|
|
5
5
|
import { type ExtractInjectionAPI, type getPosHandlerNode } from '@atlaskit/editor-common/types';
|
|
6
6
|
import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
7
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import { type LayoutPlugin } from '../
|
|
8
|
+
import { type LayoutPlugin } from '../layoutPluginType';
|
|
9
9
|
import { type LayoutPluginOptions } from '../types';
|
|
10
10
|
type LayoutSectionViewProps = {
|
|
11
11
|
node: PMNode;
|
|
@@ -2,7 +2,7 @@ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
|
2
2
|
import type { Command, TOOLBAR_MENU_TYPE } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import type { Change, PresetLayout } from '
|
|
5
|
+
import type { Change, PresetLayout } from '../types';
|
|
6
6
|
export declare const ONE_COL_LAYOUTS: PresetLayout[];
|
|
7
7
|
export declare const TWO_COL_LAYOUTS: PresetLayout[];
|
|
8
8
|
export declare const THREE_COL_LAYOUTS: PresetLayout[];
|
|
@@ -3,7 +3,7 @@ import { type PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
|
3
3
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
4
4
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import { type LayoutPlugin } from '../
|
|
6
|
+
import { type LayoutPlugin } from '../layoutPluginType';
|
|
7
7
|
import type { LayoutPluginOptions } from '../types';
|
|
8
8
|
export declare const pluginKey: PluginKey<any>;
|
|
9
9
|
declare const _default: (options: LayoutPluginOptions, pluginInjectionApi: ExtractInjectionAPI<LayoutPlugin>, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher) => SafePlugin<undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { ExtractInjectionAPI, FloatingToolbarConfig } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import type { LayoutPlugin } from '
|
|
4
|
+
import type { LayoutPlugin } from '../index';
|
|
5
5
|
export declare const layoutToolbarTitle = "Layout floating controls";
|
|
6
6
|
export declare const buildToolbar: (state: EditorState, intl: IntlShape, pos: number, _allowBreakout: boolean, addSidebarLayouts: boolean, allowSingleColumnLayout: boolean, api: ExtractInjectionAPI<LayoutPlugin> | undefined) => FloatingToolbarConfig | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-layout",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.9",
|
|
4
4
|
"description": "Layout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,16 +32,16 @@
|
|
|
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
36
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
37
37
|
"@atlaskit/editor-plugin-decorations": "^1.3.0",
|
|
38
38
|
"@atlaskit/editor-plugin-editor-disabled": "^1.3.0",
|
|
39
39
|
"@atlaskit/editor-plugin-width": "^1.3.0",
|
|
40
|
-
"@atlaskit/editor-prosemirror": "6.
|
|
41
|
-
"@atlaskit/icon": "^22.
|
|
40
|
+
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
41
|
+
"@atlaskit/icon": "^22.28.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
43
43
|
"@atlaskit/tmp-editor-statsig": "^2.21.0",
|
|
44
|
-
"@atlaskit/tokens": "^2.
|
|
44
|
+
"@atlaskit/tokens": "^2.4.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@emotion/react": "^11.7.1"
|
|
47
47
|
},
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
},
|
|
55
55
|
"techstack": {
|
|
56
56
|
"@atlassian/frontend": {
|
|
57
|
+
"code-structure": [
|
|
58
|
+
"editor-plugin"
|
|
59
|
+
],
|
|
57
60
|
"import-structure": [
|
|
58
61
|
"atlassian-conventions"
|
|
59
62
|
],
|
|
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
|