@atlaskit/editor-core 187.6.1 → 187.6.10
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 +7 -0
- package/dist/cjs/plugins/expand/commands.js +2 -1
- package/dist/cjs/plugins/expand/index.js +1 -1
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/expand/commands.js +2 -1
- package/dist/es2019/plugins/expand/index.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +2 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/expand/commands.js +2 -1
- package/dist/esm/plugins/expand/index.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +2 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.6.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`fa2209eee80`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fa2209eee80) - [ux] Fixes z-index full page editor main toolbar
|
|
8
|
+
- [`9b64591559a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9b64591559a) - [ux] ED-19163 Expand should only wrap selected text if added inline
|
|
9
|
+
|
|
3
10
|
## 187.6.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -13,6 +13,7 @@ var _gapCursorSelection = require("../selection/gap-cursor-selection");
|
|
|
13
13
|
var _utils2 = require("./utils");
|
|
14
14
|
var _pluginFactory = require("./pm-plugins/plugin-factory");
|
|
15
15
|
var _blockType = require("../block-type/commands/block-type");
|
|
16
|
+
var _prosemirrorUtils = require("prosemirror-utils");
|
|
16
17
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
19
|
var setExpandRef = function setExpandRef(ref) {
|
|
@@ -123,7 +124,7 @@ var insertExpand = function insertExpand(state, dispatch) {
|
|
|
123
124
|
if (!expandNode) {
|
|
124
125
|
return false;
|
|
125
126
|
}
|
|
126
|
-
var tr = (0, _blockType.createWrapSelectionTransaction)({
|
|
127
|
+
var tr = state.selection.empty ? (0, _prosemirrorUtils.safeInsert)(expandNode)(state.tr).scrollIntoView() : (0, _blockType.createWrapSelectionTransaction)({
|
|
127
128
|
state: state,
|
|
128
129
|
type: expandNode.type
|
|
129
130
|
});
|
|
@@ -74,7 +74,7 @@ var expandPlugin = function expandPlugin() {
|
|
|
74
74
|
if (!node) {
|
|
75
75
|
return false;
|
|
76
76
|
}
|
|
77
|
-
var tr = (0, _blockType.createWrapSelectionTransaction)({
|
|
77
|
+
var tr = state.selection.empty ? insert(node) : (0, _blockType.createWrapSelectionTransaction)({
|
|
78
78
|
state: state,
|
|
79
79
|
type: node.type
|
|
80
80
|
});
|
|
@@ -17,7 +17,7 @@ var toolbarLineHeight = 56;
|
|
|
17
17
|
// box-shadow is overriden by the mainToolbar
|
|
18
18
|
var mainToolbarWithKeyline = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: 0 ", "px 0 0\n ", ";\n"])), _editorSharedStyles.akEditorToolbarKeylineHeight, "var(--ds-border, ".concat(_colors.N30, ")"));
|
|
19
19
|
var mainToolbarTwoLineStyle = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n @media (max-width: ", "px) {\n flex-wrap: wrap;\n height: calc(", "px * 2);\n }\n"])), MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, toolbarLineHeight);
|
|
20
|
-
var mainToolbar = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n box-shadow: none;\n transition: box-shadow 200ms ", ";\n z-index: ", ";\n display: flex;\n height: ", "px;\n flex-shrink: 0;\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4456\n background-color: ", ";\n\n & object {\n height: 0 !important;\n }\n\n @media (max-width: ", "px) {\n display: grid;\n height: calc(", "px * 2);\n }\n"])), _editorSharedStyles.akEditorSwoopCubicBezier, _editorSharedStyles.
|
|
20
|
+
var mainToolbar = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n box-shadow: none;\n transition: box-shadow 200ms ", ";\n z-index: ", ";\n display: flex;\n height: ", "px;\n flex-shrink: 0;\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4456\n background-color: ", ";\n\n & object {\n height: 0 !important;\n }\n\n @media (max-width: ", "px) {\n display: grid;\n height: calc(", "px * 2);\n }\n"])), _editorSharedStyles.akEditorSwoopCubicBezier, _editorSharedStyles.akEditorFloatingDialogZIndex, toolbarLineHeight, "var(--ds-surface, white)", _editorSharedStyles.akEditorMobileMaxWidth, toolbarLineHeight);
|
|
21
21
|
var mainToolbarStyle = function mainToolbarStyle(showKeyline, twoLineEditorToolbar) {
|
|
22
22
|
return [mainToolbar, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle];
|
|
23
23
|
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.6.
|
|
9
|
+
var version = "187.6.10";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -5,6 +5,7 @@ import { GapCursorSelection, Side } from '../selection/gap-cursor-selection';
|
|
|
5
5
|
import { findExpand } from './utils';
|
|
6
6
|
import { createCommand } from './pm-plugins/plugin-factory';
|
|
7
7
|
import { createWrapSelectionTransaction } from '../block-type/commands/block-type';
|
|
8
|
+
import { safeInsert } from 'prosemirror-utils';
|
|
8
9
|
export const setExpandRef = ref => createCommand({
|
|
9
10
|
type: 'SET_EXPAND_REF',
|
|
10
11
|
data: {
|
|
@@ -102,7 +103,7 @@ export const insertExpand = (state, dispatch) => {
|
|
|
102
103
|
if (!expandNode) {
|
|
103
104
|
return false;
|
|
104
105
|
}
|
|
105
|
-
const tr = createWrapSelectionTransaction({
|
|
106
|
+
const tr = state.selection.empty ? safeInsert(expandNode)(state.tr).scrollIntoView() : createWrapSelectionTransaction({
|
|
106
107
|
state,
|
|
107
108
|
type: expandNode.type
|
|
108
109
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { N30 } from '@atlaskit/theme/colors';
|
|
3
|
-
import {
|
|
3
|
+
import { akEditorFloatingDialogZIndex, akEditorSwoopCubicBezier, akEditorToolbarKeylineHeight, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
export const MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
|
|
5
5
|
const toolbarLineHeight = 56;
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ const mainToolbar = css`
|
|
|
20
20
|
align-items: center;
|
|
21
21
|
box-shadow: none;
|
|
22
22
|
transition: box-shadow 200ms ${akEditorSwoopCubicBezier};
|
|
23
|
-
z-index: ${
|
|
23
|
+
z-index: ${akEditorFloatingDialogZIndex};
|
|
24
24
|
display: flex;
|
|
25
25
|
height: ${toolbarLineHeight}px;
|
|
26
26
|
flex-shrink: 0;
|
package/dist/es2019/version.json
CHANGED
|
@@ -8,6 +8,7 @@ import { GapCursorSelection, Side } from '../selection/gap-cursor-selection';
|
|
|
8
8
|
import { findExpand } from './utils';
|
|
9
9
|
import { createCommand } from './pm-plugins/plugin-factory';
|
|
10
10
|
import { createWrapSelectionTransaction } from '../block-type/commands/block-type';
|
|
11
|
+
import { safeInsert } from 'prosemirror-utils';
|
|
11
12
|
export var setExpandRef = function setExpandRef(ref) {
|
|
12
13
|
return createCommand({
|
|
13
14
|
type: 'SET_EXPAND_REF',
|
|
@@ -110,7 +111,7 @@ export var insertExpand = function insertExpand(state, dispatch) {
|
|
|
110
111
|
if (!expandNode) {
|
|
111
112
|
return false;
|
|
112
113
|
}
|
|
113
|
-
var tr = createWrapSelectionTransaction({
|
|
114
|
+
var tr = state.selection.empty ? safeInsert(expandNode)(state.tr).scrollIntoView() : createWrapSelectionTransaction({
|
|
114
115
|
state: state,
|
|
115
116
|
type: expandNode.type
|
|
116
117
|
});
|
|
@@ -2,14 +2,14 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { N30 } from '@atlaskit/theme/colors';
|
|
5
|
-
import {
|
|
5
|
+
import { akEditorFloatingDialogZIndex, akEditorSwoopCubicBezier, akEditorToolbarKeylineHeight, akEditorMobileMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
export var MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT = 868;
|
|
7
7
|
var toolbarLineHeight = 56;
|
|
8
8
|
|
|
9
9
|
// box-shadow is overriden by the mainToolbar
|
|
10
10
|
var mainToolbarWithKeyline = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n box-shadow: 0 ", "px 0 0\n ", ";\n"])), akEditorToolbarKeylineHeight, "var(--ds-border, ".concat(N30, ")"));
|
|
11
11
|
var mainToolbarTwoLineStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n @media (max-width: ", "px) {\n flex-wrap: wrap;\n height: calc(", "px * 2);\n }\n"])), MAXIMUM_TWO_LINE_TOOLBAR_BREAKPOINT, toolbarLineHeight);
|
|
12
|
-
var mainToolbar = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n box-shadow: none;\n transition: box-shadow 200ms ", ";\n z-index: ", ";\n display: flex;\n height: ", "px;\n flex-shrink: 0;\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4456\n background-color: ", ";\n\n & object {\n height: 0 !important;\n }\n\n @media (max-width: ", "px) {\n display: grid;\n height: calc(", "px * 2);\n }\n"])), akEditorSwoopCubicBezier,
|
|
12
|
+
var mainToolbar = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: relative;\n align-items: center;\n box-shadow: none;\n transition: box-shadow 200ms ", ";\n z-index: ", ";\n display: flex;\n height: ", "px;\n flex-shrink: 0;\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4456\n background-color: ", ";\n\n & object {\n height: 0 !important;\n }\n\n @media (max-width: ", "px) {\n display: grid;\n height: calc(", "px * 2);\n }\n"])), akEditorSwoopCubicBezier, akEditorFloatingDialogZIndex, toolbarLineHeight, "var(--ds-surface, white)", akEditorMobileMaxWidth, toolbarLineHeight);
|
|
13
13
|
export var mainToolbarStyle = function mainToolbarStyle(showKeyline, twoLineEditorToolbar) {
|
|
14
14
|
return [mainToolbar, showKeyline && mainToolbarWithKeyline, twoLineEditorToolbar && mainToolbarTwoLineStyle];
|
|
15
15
|
};
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.6.
|
|
3
|
+
"version": "187.6.10",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/code": "^14.6.0",
|
|
56
56
|
"@atlaskit/date": "^0.10.0",
|
|
57
57
|
"@atlaskit/datetime-picker": "^12.7.0",
|
|
58
|
-
"@atlaskit/editor-common": "^74.
|
|
58
|
+
"@atlaskit/editor-common": "^74.28.0",
|
|
59
59
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|
|
60
60
|
"@atlaskit/editor-markdown-transformer": "^5.2.5",
|
|
61
61
|
"@atlaskit/editor-palette": "1.5.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@atlaskit/editor-plugin-grid": "^0.1.0",
|
|
70
70
|
"@atlaskit/editor-plugin-guideline": "^0.3.4",
|
|
71
71
|
"@atlaskit/editor-plugin-hyperlink": "^0.2.0",
|
|
72
|
-
"@atlaskit/editor-plugin-table": "^2.
|
|
72
|
+
"@atlaskit/editor-plugin-table": "^2.6.0",
|
|
73
73
|
"@atlaskit/editor-plugin-width": "^0.1.0",
|
|
74
74
|
"@atlaskit/editor-shared-styles": "^2.5.0",
|
|
75
75
|
"@atlaskit/editor-tables": "^2.3.0",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@atlaskit/radio": "^5.6.0",
|
|
96
96
|
"@atlaskit/section-message": "^6.4.0",
|
|
97
97
|
"@atlaskit/select": "^16.5.0",
|
|
98
|
-
"@atlaskit/smart-card": "^26.
|
|
98
|
+
"@atlaskit/smart-card": "^26.12.0",
|
|
99
99
|
"@atlaskit/smart-user-picker": "^6.1.0",
|
|
100
100
|
"@atlaskit/spinner": "^15.5.0",
|
|
101
101
|
"@atlaskit/status": "^1.3.0",
|
|
@@ -149,14 +149,14 @@
|
|
|
149
149
|
"@atlaskit/collab-provider": "9.7.3",
|
|
150
150
|
"@atlaskit/dropdown-menu": "^11.11.0",
|
|
151
151
|
"@atlaskit/editor-extension-dropbox": "^0.4.0",
|
|
152
|
-
"@atlaskit/editor-plugin-table": "^2.
|
|
152
|
+
"@atlaskit/editor-plugin-table": "^2.6.0",
|
|
153
153
|
"@atlaskit/editor-test-helpers": "^18.10.0",
|
|
154
154
|
"@atlaskit/flag": "^15.2.0",
|
|
155
155
|
"@atlaskit/icon-object": "^6.3.0",
|
|
156
156
|
"@atlaskit/inline-dialog": "^13.6.0",
|
|
157
157
|
"@atlaskit/link-analytics": "^8.2.0",
|
|
158
158
|
"@atlaskit/link-provider": "^1.6.0",
|
|
159
|
-
"@atlaskit/link-test-helpers": "^
|
|
159
|
+
"@atlaskit/link-test-helpers": "^6.0.0",
|
|
160
160
|
"@atlaskit/media-core": "^34.1.0",
|
|
161
161
|
"@atlaskit/media-integration-test-helpers": "^3.0.0",
|
|
162
162
|
"@atlaskit/media-test-helpers": "^33.0.0",
|