@atlaskit/editor-common 74.49.3 → 74.50.1
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 +12 -0
- package/dist/cjs/commands/index.js +28 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/selection/gap-cursor/utils/setGapCursorSelection.js +11 -0
- package/dist/cjs/selection/index.js +7 -0
- package/dist/cjs/styles/shared/resizer.js +1 -1
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/commands/index.js +25 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/selection/gap-cursor/utils/setGapCursorSelection.js +7 -0
- package/dist/es2019/selection/index.js +1 -0
- package/dist/es2019/styles/shared/resizer.js +4 -0
- package/dist/es2019/styles/shared/table.js +8 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/commands/index.js +25 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/selection/gap-cursor/utils/setGapCursorSelection.js +5 -0
- package/dist/esm/selection/index.js +1 -0
- package/dist/esm/styles/shared/resizer.js +1 -1
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/commands/index.d.ts +2 -1
- package/dist/types/selection/gap-cursor/selection.d.ts +3 -2
- package/dist/types/selection/gap-cursor/utils/is-ignored.d.ts +1 -1
- package/dist/types/selection/gap-cursor/utils/is-valid-target-node.d.ts +1 -1
- package/dist/types/selection/gap-cursor/utils/setGapCursorSelection.d.ts +3 -0
- package/dist/types/selection/index.d.ts +1 -0
- package/dist/types/styles/shared/table.d.ts +2 -2
- package/dist/types-ts4.5/commands/index.d.ts +2 -1
- package/dist/types-ts4.5/selection/gap-cursor/selection.d.ts +3 -2
- package/dist/types-ts4.5/selection/gap-cursor/utils/is-ignored.d.ts +1 -1
- package/dist/types-ts4.5/selection/gap-cursor/utils/is-valid-target-node.d.ts +1 -1
- package/dist/types-ts4.5/selection/gap-cursor/utils/setGapCursorSelection.d.ts +3 -0
- package/dist/types-ts4.5/selection/index.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/table.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 74.50.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`eefbc3c6065`](https://bitbucket.org/atlassian/atlassian-frontend/commits/eefbc3c6065) - [ED-19510] Applies performance tweaks for table
|
|
8
|
+
|
|
9
|
+
## 74.50.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`8e9c21af71d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8e9c21af71d) - Extracting list plugin code from editor-core to @atlaskit/editor-plugin-list.
|
|
14
|
+
|
|
3
15
|
## 74.49.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -7,7 +7,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.addParagraphAtEnd = addParagraphAtEnd;
|
|
8
8
|
exports.clearEditorContent = exports.changeImageAlignment = void 0;
|
|
9
9
|
exports.createParagraphAtEnd = createParagraphAtEnd;
|
|
10
|
-
exports.
|
|
10
|
+
exports.createToggleBlockMarkOnRange = void 0;
|
|
11
|
+
exports.findCutBefore = findCutBefore;
|
|
12
|
+
exports.toggleBlockMark = void 0;
|
|
11
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
14
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
15
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
@@ -124,4 +126,28 @@ var clearEditorContent = function clearEditorContent(state, dispatch) {
|
|
|
124
126
|
}
|
|
125
127
|
return false;
|
|
126
128
|
};
|
|
127
|
-
|
|
129
|
+
|
|
130
|
+
// https://github.com/ProseMirror/prosemirror-commands/blob/master/src/commands.js#L90
|
|
131
|
+
// Keep going left up the tree, without going across isolating boundaries, until we
|
|
132
|
+
// can go along the tree at that same level
|
|
133
|
+
//
|
|
134
|
+
// You can think of this as, if you could construct each document like we do in the tests,
|
|
135
|
+
// return the position of the first ) backwards from the current selection.
|
|
136
|
+
exports.clearEditorContent = clearEditorContent;
|
|
137
|
+
function findCutBefore($pos) {
|
|
138
|
+
// parent is non-isolating, so we can look across this boundary
|
|
139
|
+
if (!$pos.parent.type.spec.isolating) {
|
|
140
|
+
// search up the tree from the pos's *parent*
|
|
141
|
+
for (var i = $pos.depth - 1; i >= 0; i--) {
|
|
142
|
+
// starting from the inner most node's parent, find out
|
|
143
|
+
// if we're not its first child
|
|
144
|
+
if ($pos.index(i) > 0) {
|
|
145
|
+
return $pos.doc.resolve($pos.before(i + 1));
|
|
146
|
+
}
|
|
147
|
+
if ($pos.node(i).type.spec.isolating) {
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "74.
|
|
19
|
+
var packageVersion = "74.50.1";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.setGapCursorSelection = setGapCursorSelection;
|
|
7
|
+
var _selection = require("../selection");
|
|
8
|
+
function setGapCursorSelection(view, pos, side) {
|
|
9
|
+
var state = view.state;
|
|
10
|
+
view.dispatch(state.tr.setSelection(new _selection.GapCursorSelection(state.doc.resolve(pos), side)));
|
|
11
|
+
}
|
|
@@ -87,6 +87,12 @@ Object.defineProperty(exports, "isValidTargetNode", {
|
|
|
87
87
|
return _utils.isValidTargetNode;
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
|
+
Object.defineProperty(exports, "setGapCursorSelection", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function get() {
|
|
93
|
+
return _setGapCursorSelection.setGapCursorSelection;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
90
96
|
Object.defineProperty(exports, "startPositionOfParent", {
|
|
91
97
|
enumerable: true,
|
|
92
98
|
get: function get() {
|
|
@@ -96,4 +102,5 @@ Object.defineProperty(exports, "startPositionOfParent", {
|
|
|
96
102
|
var _types = require("./types");
|
|
97
103
|
var _selection = require("./gap-cursor/selection");
|
|
98
104
|
var _utils = require("./gap-cursor/utils");
|
|
105
|
+
var _setGapCursorSelection = require("./gap-cursor/utils/setGapCursorSelection");
|
|
99
106
|
var _utils2 = require("./utils");
|
|
@@ -42,5 +42,5 @@ var resizerHandleClassName = {
|
|
|
42
42
|
large: resizerHandleLargeClassName
|
|
43
43
|
};
|
|
44
44
|
exports.resizerHandleClassName = resizerHandleClassName;
|
|
45
|
-
var resizerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", ", .", " {\n display: flex;\n visibility: hidden;\n flex-direction: column;\n justify-content: center;\n width: 7px;\n transition: visibility 0.2s;\n }\n\n .", " {\n align-items: flex-end;\n }\n\n .", " {\n align-items: flex-start;\n }\n\n .", "::after,\n .", "::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n transition: background-color 0.2s;\n\n border-radius: 6px;\n }\n\n .", ":hover\n .", ",\n .", ":hover\n .", ",\n .", ".display-handle\n .", ",\n .", ".display-handle\n .", " {\n visibility: visible;\n }\n\n .", ":hover\n .", "::after,\n .", ":hover\n .", "::after,\n .", ".display-handle\n .", "::after,\n .", ".display-handle\n .", "::after {\n background: ", ";\n }\n\n .", ".danger {\n &\n .", "::after,\n .", "::after {\n transition: none;\n background: ", ";\n }\n }\n\n .", "\n .", "::after,\n .", "\n .", "::after,\n .", "\n .", ":hover::after,\n .", "\n .", ":hover::after,\n .", ".is-resizing\n .", "::after,\n .", ".is-resizing\n .", "::after {\n background: ", ";\n }\n\n .", ".", "::after,\n .", ".", "::after {\n height: 64px;\n }\n\n .", ".", "::after,\n .", ".", "::after {\n height: 43px;\n }\n\n .", ".", "::after,\n .", ".", "::after {\n height: 96px;\n }\n\n .", ".", "::after,\n .", ".", "::after {\n position: sticky;\n top: 10px;\n bottom: 10px;\n }\n\n .", " {\n visibility: hidden;\n position: absolute;\n width: 7px;\n border-radius: 4px;\n opacity: 0;\n transition: background-color 0.2s, visibility 0.2s;\n }\n\n .", ":hover\n .", ",\n .", ":hover\n .", " {\n visibility: visible;\n background-color: ", ";\n opacity: 0.5;\n }\n"])), resizerHandleRightClassName, resizerHandleLeftClassName, resizerHandleRightClassName, resizerHandleLeftClassName, resizerHandleRightClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, "var(--ds-border, ".concat(_colors.N60, ")"), resizerItemClassName, resizerHandleRightClassName, resizerHandleLeftClassName, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), akEditorSelectedNodeClassName, resizerHandleRightClassName, akEditorSelectedNodeClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, "var(--ds-border-focused, ".concat(_colors.B200, ")"), resizerHandleRightClassName, resizerHandleClassName.medium, resizerHandleLeftClassName, resizerHandleClassName.medium, resizerHandleRightClassName, resizerHandleClassName.small, resizerHandleLeftClassName, resizerHandleClassName.small, resizerHandleRightClassName, resizerHandleClassName.large, resizerHandleLeftClassName, resizerHandleClassName.large, resizerHandleRightClassName, resizerHandleStickyClassName, resizerHandleLeftClassName, resizerHandleStickyClassName, resizerHandleShadowClassName, resizerHandleRightClassName, resizerHandleShadowClassName, resizerHandleLeftClassName, resizerHandleShadowClassName, "var(--ds-background-selected, ".concat(_colors.B50, ")"));
|
|
45
|
+
var resizerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", ", .", " {\n display: flex;\n visibility: hidden;\n flex-direction: column;\n justify-content: center;\n width: 7px;\n transition: visibility 0.2s;\n }\n\n .", " {\n align-items: flex-end;\n }\n\n .", " {\n align-items: flex-start;\n }\n\n .", "::after,\n .", "::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n transition: background-color 0.2s;\n\n border-radius: 6px;\n }\n\n .", " {\n will-change: width;\n }\n\n .", ":hover\n .", ",\n .", ":hover\n .", ",\n .", ".display-handle\n .", ",\n .", ".display-handle\n .", " {\n visibility: visible;\n }\n\n .", ":hover\n .", "::after,\n .", ":hover\n .", "::after,\n .", ".display-handle\n .", "::after,\n .", ".display-handle\n .", "::after {\n background: ", ";\n }\n\n .", ".danger {\n &\n .", "::after,\n .", "::after {\n transition: none;\n background: ", ";\n }\n }\n\n .", "\n .", "::after,\n .", "\n .", "::after,\n .", "\n .", ":hover::after,\n .", "\n .", ":hover::after,\n .", ".is-resizing\n .", "::after,\n .", ".is-resizing\n .", "::after {\n background: ", ";\n }\n\n .", ".", "::after,\n .", ".", "::after {\n height: 64px;\n }\n\n .", ".", "::after,\n .", ".", "::after {\n height: 43px;\n }\n\n .", ".", "::after,\n .", ".", "::after {\n height: 96px;\n }\n\n .", ".", "::after,\n .", ".", "::after {\n position: sticky;\n top: 10px;\n bottom: 10px;\n }\n\n .", " {\n visibility: hidden;\n position: absolute;\n width: 7px;\n border-radius: 4px;\n opacity: 0;\n transition: background-color 0.2s, visibility 0.2s;\n }\n\n .", ":hover\n .", ",\n .", ":hover\n .", " {\n visibility: visible;\n background-color: ", ";\n opacity: 0.5;\n }\n"])), resizerHandleRightClassName, resizerHandleLeftClassName, resizerHandleRightClassName, resizerHandleLeftClassName, resizerHandleRightClassName, resizerHandleLeftClassName, resizerItemClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, "var(--ds-border, ".concat(_colors.N60, ")"), resizerItemClassName, resizerHandleRightClassName, resizerHandleLeftClassName, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), akEditorSelectedNodeClassName, resizerHandleRightClassName, akEditorSelectedNodeClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, "var(--ds-border-focused, ".concat(_colors.B200, ")"), resizerHandleRightClassName, resizerHandleClassName.medium, resizerHandleLeftClassName, resizerHandleClassName.medium, resizerHandleRightClassName, resizerHandleClassName.small, resizerHandleLeftClassName, resizerHandleClassName.small, resizerHandleRightClassName, resizerHandleClassName.large, resizerHandleLeftClassName, resizerHandleClassName.large, resizerHandleRightClassName, resizerHandleStickyClassName, resizerHandleLeftClassName, resizerHandleStickyClassName, resizerHandleShadowClassName, resizerHandleRightClassName, resizerHandleShadowClassName, resizerHandleLeftClassName, resizerHandleShadowClassName, "var(--ds-background-selected, ".concat(_colors.B50, ")"));
|
|
46
46
|
exports.resizerStyles = resizerStyles;
|
|
@@ -54,7 +54,7 @@ var TableSharedCssClassName = {
|
|
|
54
54
|
};
|
|
55
55
|
exports.TableSharedCssClassName = TableSharedCssClassName;
|
|
56
56
|
var tableSharedStyle = function tableSharedStyle(props) {
|
|
57
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-of-type > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n\n .", " > table {\n margin: ", "px 0 0 0;\n }\n\n .", " > table,\n .", " > table {\n margin: ", "px ", "px 0 0;\n }\n\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: ", ";\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > :first-child:not(style),\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n th p:not(:first-of-type),\n td p:not(:first-of-type) {\n margin-top: 12px;\n }\n }\n th {\n background-color: ", ";\n text-align: left;\n\n /* only apply this styling to codeblocks in default background headercells */\n /* TODO this needs to be overhauled as it relies on unsafe selectors */\n &:not([style]):not(.danger) {\n .", ":not(.danger) {\n background-color: ", ";\n\n :not(.", ") {\n box-shadow: 0px 0px 0px 1px\n ", ";\n }\n\n .", " {\n background-image: ", ";\n\n background-color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n\n /* this is only relevant to the element taken care of by renderer */\n > [data-ds--code--code-block] {\n background-image: ", "!important;\n\n background-color: ", "!important;\n\n // selector lives inside @atlaskit/code\n --ds--code--line-number-bg-color: ", ";\n }\n }\n }\n }\n }\n }\n"])), (0, _tableCell.tableCellBackgroundStyleOverride)(), TableSharedCssClassName.TABLE_CONTAINER, tableMarginBottom, TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableMarginTop, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableMarginTop, tableMarginSides, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, (0, _components.themed)({
|
|
57
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-of-type > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n\n .", " {\n will-change: width, height, margin-left;\n }\n\n .", " table {\n will-change: width;\n }\n\n .", " > table {\n margin: ", "px 0 0 0;\n }\n\n .", " > table,\n .", " > table {\n margin: ", "px ", "px 0 0;\n }\n\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: ", ";\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > :first-child:not(style),\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n th p:not(:first-of-type),\n td p:not(:first-of-type) {\n margin-top: 12px;\n }\n }\n th {\n background-color: ", ";\n text-align: left;\n\n /* only apply this styling to codeblocks in default background headercells */\n /* TODO this needs to be overhauled as it relies on unsafe selectors */\n &:not([style]):not(.danger) {\n .", ":not(.danger) {\n background-color: ", ";\n\n :not(.", ") {\n box-shadow: 0px 0px 0px 1px\n ", ";\n }\n\n .", " {\n background-image: ", ";\n\n background-color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n\n /* this is only relevant to the element taken care of by renderer */\n > [data-ds--code--code-block] {\n background-image: ", "!important;\n\n background-color: ", "!important;\n\n // selector lives inside @atlaskit/code\n --ds--code--line-number-bg-color: ", ";\n }\n }\n }\n }\n }\n }\n"])), (0, _tableCell.tableCellBackgroundStyleOverride)(), TableSharedCssClassName.TABLE_CONTAINER, tableMarginBottom, TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableMarginTop, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableMarginTop, tableMarginSides, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, (0, _components.themed)({
|
|
58
58
|
light: "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"),
|
|
59
59
|
dark: "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorderDark, ")")
|
|
60
60
|
})(props), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, (0, _components.themed)({
|
|
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
24
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
25
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "74.
|
|
27
|
+
var packageVersion = "74.50.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -112,4 +112,28 @@ export const clearEditorContent = (state, dispatch) => {
|
|
|
112
112
|
return true;
|
|
113
113
|
}
|
|
114
114
|
return false;
|
|
115
|
-
};
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// https://github.com/ProseMirror/prosemirror-commands/blob/master/src/commands.js#L90
|
|
118
|
+
// Keep going left up the tree, without going across isolating boundaries, until we
|
|
119
|
+
// can go along the tree at that same level
|
|
120
|
+
//
|
|
121
|
+
// You can think of this as, if you could construct each document like we do in the tests,
|
|
122
|
+
// return the position of the first ) backwards from the current selection.
|
|
123
|
+
export function findCutBefore($pos) {
|
|
124
|
+
// parent is non-isolating, so we can look across this boundary
|
|
125
|
+
if (!$pos.parent.type.spec.isolating) {
|
|
126
|
+
// search up the tree from the pos's *parent*
|
|
127
|
+
for (let i = $pos.depth - 1; i >= 0; i--) {
|
|
128
|
+
// starting from the inner most node's parent, find out
|
|
129
|
+
// if we're not its first child
|
|
130
|
+
if ($pos.index(i) > 0) {
|
|
131
|
+
return $pos.doc.resolve($pos.before(i + 1));
|
|
132
|
+
}
|
|
133
|
+
if ($pos.node(i).type.spec.isolating) {
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "74.
|
|
3
|
+
const packageVersion = "74.50.1";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { RelativeSelectionPos } from './types';
|
|
2
2
|
export { GapCursorSelection, Side, JSON_ID, GapBookmark } from './gap-cursor/selection';
|
|
3
3
|
export { isIgnored, isValidTargetNode } from './gap-cursor/utils';
|
|
4
|
+
export { setGapCursorSelection } from './gap-cursor/utils/setGapCursorSelection';
|
|
4
5
|
export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, endPositionOfParent, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent } from './utils';
|
|
@@ -54,6 +54,14 @@ const tableSharedStyle = props => css`
|
|
|
54
54
|
clear: both;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
+
.${TableSharedCssClassName.TABLE_RESIZER_CONTAINER} {
|
|
58
|
+
will-change: width, height, margin-left;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.${TableSharedCssClassName.TABLE_RESIZER_CONTAINER} table {
|
|
62
|
+
will-change: width;
|
|
63
|
+
}
|
|
64
|
+
|
|
57
65
|
.${TableSharedCssClassName.TABLE_NODE_WRAPPER} > table {
|
|
58
66
|
margin: ${tableMarginTop}px 0 0 0;
|
|
59
67
|
}
|
|
@@ -8,7 +8,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
8
8
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
9
9
|
import Layer from '../Layer';
|
|
10
10
|
const packageName = "@atlaskit/editor-common";
|
|
11
|
-
const packageVersion = "74.
|
|
11
|
+
const packageVersion = "74.50.1";
|
|
12
12
|
const halfFocusRing = 1;
|
|
13
13
|
const dropOffset = '0, 8';
|
|
14
14
|
class DropList extends Component {
|
|
@@ -110,4 +110,28 @@ export var clearEditorContent = function clearEditorContent(state, dispatch) {
|
|
|
110
110
|
return true;
|
|
111
111
|
}
|
|
112
112
|
return false;
|
|
113
|
-
};
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// https://github.com/ProseMirror/prosemirror-commands/blob/master/src/commands.js#L90
|
|
116
|
+
// Keep going left up the tree, without going across isolating boundaries, until we
|
|
117
|
+
// can go along the tree at that same level
|
|
118
|
+
//
|
|
119
|
+
// You can think of this as, if you could construct each document like we do in the tests,
|
|
120
|
+
// return the position of the first ) backwards from the current selection.
|
|
121
|
+
export function findCutBefore($pos) {
|
|
122
|
+
// parent is non-isolating, so we can look across this boundary
|
|
123
|
+
if (!$pos.parent.type.spec.isolating) {
|
|
124
|
+
// search up the tree from the pos's *parent*
|
|
125
|
+
for (var i = $pos.depth - 1; i >= 0; i--) {
|
|
126
|
+
// starting from the inner most node's parent, find out
|
|
127
|
+
// if we're not its first child
|
|
128
|
+
if ($pos.index(i) > 0) {
|
|
129
|
+
return $pos.doc.resolve($pos.before(i + 1));
|
|
130
|
+
}
|
|
131
|
+
if ($pos.node(i).type.spec.isolating) {
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
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) { _defineProperty(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; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "74.
|
|
9
|
+
var packageVersion = "74.50.1";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { RelativeSelectionPos } from './types';
|
|
2
2
|
export { GapCursorSelection, Side, JSON_ID, GapBookmark } from './gap-cursor/selection';
|
|
3
3
|
export { isIgnored, isValidTargetNode } from './gap-cursor/utils';
|
|
4
|
+
export { setGapCursorSelection } from './gap-cursor/utils/setGapCursorSelection';
|
|
4
5
|
export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, endPositionOfParent, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent } from './utils';
|
|
@@ -25,4 +25,4 @@ export var resizerHandleClassName = {
|
|
|
25
25
|
medium: resizerHandleMediumClassName,
|
|
26
26
|
large: resizerHandleLargeClassName
|
|
27
27
|
};
|
|
28
|
-
export var resizerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", ", .", " {\n display: flex;\n visibility: hidden;\n flex-direction: column;\n justify-content: center;\n width: 7px;\n transition: visibility 0.2s;\n }\n\n .", " {\n align-items: flex-end;\n }\n\n .", " {\n align-items: flex-start;\n }\n\n .", "::after,\n .", "::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n transition: background-color 0.2s;\n\n border-radius: 6px;\n }\n\n .", ":hover\n .", ",\n .", ":hover\n .", ",\n .", ".display-handle\n .", ",\n .", ".display-handle\n .", " {\n visibility: visible;\n }\n\n .", ":hover\n .", "::after,\n .", ":hover\n .", "::after,\n .", ".display-handle\n .", "::after,\n .", ".display-handle\n .", "::after {\n background: ", ";\n }\n\n .", ".danger {\n &\n .", "::after,\n .", "::after {\n transition: none;\n background: ", ";\n }\n }\n\n .", "\n .", "::after,\n .", "\n .", "::after,\n .", "\n .", ":hover::after,\n .", "\n .", ":hover::after,\n .", ".is-resizing\n .", "::after,\n .", ".is-resizing\n .", "::after {\n background: ", ";\n }\n\n .", ".", "::after,\n .", ".", "::after {\n height: 64px;\n }\n\n .", ".", "::after,\n .", ".", "::after {\n height: 43px;\n }\n\n .", ".", "::after,\n .", ".", "::after {\n height: 96px;\n }\n\n .", ".", "::after,\n .", ".", "::after {\n position: sticky;\n top: 10px;\n bottom: 10px;\n }\n\n .", " {\n visibility: hidden;\n position: absolute;\n width: 7px;\n border-radius: 4px;\n opacity: 0;\n transition: background-color 0.2s, visibility 0.2s;\n }\n\n .", ":hover\n .", ",\n .", ":hover\n .", " {\n visibility: visible;\n background-color: ", ";\n opacity: 0.5;\n }\n"])), resizerHandleRightClassName, resizerHandleLeftClassName, resizerHandleRightClassName, resizerHandleLeftClassName, resizerHandleRightClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, "var(--ds-border, ".concat(N60, ")"), resizerItemClassName, resizerHandleRightClassName, resizerHandleLeftClassName, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), akEditorSelectedNodeClassName, resizerHandleRightClassName, akEditorSelectedNodeClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, "var(--ds-border-focused, ".concat(B200, ")"), resizerHandleRightClassName, resizerHandleClassName.medium, resizerHandleLeftClassName, resizerHandleClassName.medium, resizerHandleRightClassName, resizerHandleClassName.small, resizerHandleLeftClassName, resizerHandleClassName.small, resizerHandleRightClassName, resizerHandleClassName.large, resizerHandleLeftClassName, resizerHandleClassName.large, resizerHandleRightClassName, resizerHandleStickyClassName, resizerHandleLeftClassName, resizerHandleStickyClassName, resizerHandleShadowClassName, resizerHandleRightClassName, resizerHandleShadowClassName, resizerHandleLeftClassName, resizerHandleShadowClassName, "var(--ds-background-selected, ".concat(B50, ")"));
|
|
28
|
+
export var resizerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", ", .", " {\n display: flex;\n visibility: hidden;\n flex-direction: column;\n justify-content: center;\n width: 7px;\n transition: visibility 0.2s;\n }\n\n .", " {\n align-items: flex-end;\n }\n\n .", " {\n align-items: flex-start;\n }\n\n .", "::after,\n .", "::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n transition: background-color 0.2s;\n\n border-radius: 6px;\n }\n\n .", " {\n will-change: width;\n }\n\n .", ":hover\n .", ",\n .", ":hover\n .", ",\n .", ".display-handle\n .", ",\n .", ".display-handle\n .", " {\n visibility: visible;\n }\n\n .", ":hover\n .", "::after,\n .", ":hover\n .", "::after,\n .", ".display-handle\n .", "::after,\n .", ".display-handle\n .", "::after {\n background: ", ";\n }\n\n .", ".danger {\n &\n .", "::after,\n .", "::after {\n transition: none;\n background: ", ";\n }\n }\n\n .", "\n .", "::after,\n .", "\n .", "::after,\n .", "\n .", ":hover::after,\n .", "\n .", ":hover::after,\n .", ".is-resizing\n .", "::after,\n .", ".is-resizing\n .", "::after {\n background: ", ";\n }\n\n .", ".", "::after,\n .", ".", "::after {\n height: 64px;\n }\n\n .", ".", "::after,\n .", ".", "::after {\n height: 43px;\n }\n\n .", ".", "::after,\n .", ".", "::after {\n height: 96px;\n }\n\n .", ".", "::after,\n .", ".", "::after {\n position: sticky;\n top: 10px;\n bottom: 10px;\n }\n\n .", " {\n visibility: hidden;\n position: absolute;\n width: 7px;\n border-radius: 4px;\n opacity: 0;\n transition: background-color 0.2s, visibility 0.2s;\n }\n\n .", ":hover\n .", ",\n .", ":hover\n .", " {\n visibility: visible;\n background-color: ", ";\n opacity: 0.5;\n }\n"])), resizerHandleRightClassName, resizerHandleLeftClassName, resizerHandleRightClassName, resizerHandleLeftClassName, resizerHandleRightClassName, resizerHandleLeftClassName, resizerItemClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, "var(--ds-border, ".concat(N60, ")"), resizerItemClassName, resizerHandleRightClassName, resizerHandleLeftClassName, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), akEditorSelectedNodeClassName, resizerHandleRightClassName, akEditorSelectedNodeClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, resizerItemClassName, resizerHandleRightClassName, resizerItemClassName, resizerHandleLeftClassName, "var(--ds-border-focused, ".concat(B200, ")"), resizerHandleRightClassName, resizerHandleClassName.medium, resizerHandleLeftClassName, resizerHandleClassName.medium, resizerHandleRightClassName, resizerHandleClassName.small, resizerHandleLeftClassName, resizerHandleClassName.small, resizerHandleRightClassName, resizerHandleClassName.large, resizerHandleLeftClassName, resizerHandleClassName.large, resizerHandleRightClassName, resizerHandleStickyClassName, resizerHandleLeftClassName, resizerHandleStickyClassName, resizerHandleShadowClassName, resizerHandleRightClassName, resizerHandleShadowClassName, resizerHandleLeftClassName, resizerHandleShadowClassName, "var(--ds-background-selected, ".concat(B50, ")"));
|
|
@@ -38,7 +38,7 @@ export var TableSharedCssClassName = {
|
|
|
38
38
|
TABLE_RESIZER_CONTAINER: "".concat(tablePrefixSelector, "-resizer-container")
|
|
39
39
|
};
|
|
40
40
|
var tableSharedStyle = function tableSharedStyle(props) {
|
|
41
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-of-type > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n\n .", " > table {\n margin: ", "px 0 0 0;\n }\n\n .", " > table,\n .", " > table {\n margin: ", "px ", "px 0 0;\n }\n\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: ", ";\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > :first-child:not(style),\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n th p:not(:first-of-type),\n td p:not(:first-of-type) {\n margin-top: 12px;\n }\n }\n th {\n background-color: ", ";\n text-align: left;\n\n /* only apply this styling to codeblocks in default background headercells */\n /* TODO this needs to be overhauled as it relies on unsafe selectors */\n &:not([style]):not(.danger) {\n .", ":not(.danger) {\n background-color: ", ";\n\n :not(.", ") {\n box-shadow: 0px 0px 0px 1px\n ", ";\n }\n\n .", " {\n background-image: ", ";\n\n background-color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n\n /* this is only relevant to the element taken care of by renderer */\n > [data-ds--code--code-block] {\n background-image: ", "!important;\n\n background-color: ", "!important;\n\n // selector lives inside @atlaskit/code\n --ds--code--line-number-bg-color: ", ";\n }\n }\n }\n }\n }\n }\n"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, tableMarginBottom, TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableMarginTop, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableMarginTop, tableMarginSides, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, themed({
|
|
41
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-of-type > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n\n .", " {\n will-change: width, height, margin-left;\n }\n\n .", " table {\n will-change: width;\n }\n\n .", " > table {\n margin: ", "px 0 0 0;\n }\n\n .", " > table,\n .", " > table {\n margin: ", "px ", "px 0 0;\n }\n\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: ", ";\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > :first-child:not(style),\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n th p:not(:first-of-type),\n td p:not(:first-of-type) {\n margin-top: 12px;\n }\n }\n th {\n background-color: ", ";\n text-align: left;\n\n /* only apply this styling to codeblocks in default background headercells */\n /* TODO this needs to be overhauled as it relies on unsafe selectors */\n &:not([style]):not(.danger) {\n .", ":not(.danger) {\n background-color: ", ";\n\n :not(.", ") {\n box-shadow: 0px 0px 0px 1px\n ", ";\n }\n\n .", " {\n background-image: ", ";\n\n background-color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n\n /* this is only relevant to the element taken care of by renderer */\n > [data-ds--code--code-block] {\n background-image: ", "!important;\n\n background-color: ", "!important;\n\n // selector lives inside @atlaskit/code\n --ds--code--line-number-bg-color: ", ";\n }\n }\n }\n }\n }\n }\n"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, tableMarginBottom, TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableMarginTop, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableMarginTop, tableMarginSides, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, themed({
|
|
42
42
|
light: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"),
|
|
43
43
|
dark: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorderDark, ")")
|
|
44
44
|
})(props), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, themed({
|
|
@@ -18,7 +18,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
18
18
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
19
19
|
import Layer from '../Layer';
|
|
20
20
|
var packageName = "@atlaskit/editor-common";
|
|
21
|
-
var packageVersion = "74.
|
|
21
|
+
var packageVersion = "74.50.1";
|
|
22
22
|
var halfFocusRing = 1;
|
|
23
23
|
var dropOffset = '0, 8';
|
|
24
24
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MarkType, NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { MarkType, NodeType, Node as PMNode, ResolvedPos, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { Command } from '../types/command';
|
|
4
4
|
type AlignmentState = 'start' | 'end' | 'center';
|
|
@@ -15,4 +15,5 @@ export declare const createToggleBlockMarkOnRange: <T extends {} = object>(markT
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const toggleBlockMark: <T extends {} = object>(markType: MarkType, getAttrs: (prevAttrs?: T | undefined, node?: PMNode) => false | T | undefined, allowedBlocks?: NodeType[] | ((schema: Schema, node: PMNode, parent: PMNode | null) => boolean) | undefined) => Command;
|
|
17
17
|
export declare const clearEditorContent: Command;
|
|
18
|
+
export declare function findCutBefore($pos: ResolvedPos): ResolvedPos | null;
|
|
18
19
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Node as PMNode, ResolvedPos
|
|
1
|
+
import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { Mapping } from '@atlaskit/editor-prosemirror/transform';
|
|
4
|
+
import type { Mapping } from '@atlaskit/editor-prosemirror/transform';
|
|
4
5
|
export declare enum Side {
|
|
5
6
|
LEFT = "left",
|
|
6
7
|
RIGHT = "right"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare const isIgnored: (node?: PMNode | null) => boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare const isValidTargetNode: (node?: PMNode | null) => boolean;
|
|
@@ -2,4 +2,5 @@ export { RelativeSelectionPos } from './types';
|
|
|
2
2
|
export type { SelectionPluginState, EditorSelectionAPI } from './types';
|
|
3
3
|
export { GapCursorSelection, Side, JSON_ID, GapBookmark, } from './gap-cursor/selection';
|
|
4
4
|
export { isIgnored, isValidTargetNode } from './gap-cursor/utils';
|
|
5
|
+
export { setGapCursorSelection } from './gap-cursor/utils/setGapCursorSelection';
|
|
5
6
|
export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, endPositionOfParent, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent, } from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TableLayout } from '@atlaskit/adf-schema';
|
|
2
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
1
|
+
import type { TableLayout } from '@atlaskit/adf-schema';
|
|
2
|
+
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
3
3
|
export declare const tableMarginTop = 24;
|
|
4
4
|
export declare const tableMarginBottom = 16;
|
|
5
5
|
export declare const tableMarginTopWithControl = 14;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MarkType, NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { MarkType, NodeType, Node as PMNode, ResolvedPos, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { Command } from '../types/command';
|
|
4
4
|
type AlignmentState = 'start' | 'end' | 'center';
|
|
@@ -15,4 +15,5 @@ export declare const createToggleBlockMarkOnRange: <T extends {} = object>(markT
|
|
|
15
15
|
*/
|
|
16
16
|
export declare const toggleBlockMark: <T extends {} = object>(markType: MarkType, getAttrs: (prevAttrs?: T | undefined, node?: PMNode) => false | T | undefined, allowedBlocks?: NodeType[] | ((schema: Schema, node: PMNode, parent: PMNode | null) => boolean) | undefined) => Command;
|
|
17
17
|
export declare const clearEditorContent: Command;
|
|
18
|
+
export declare function findCutBefore($pos: ResolvedPos): ResolvedPos | null;
|
|
18
19
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Node as PMNode, ResolvedPos
|
|
1
|
+
import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { Mapping } from '@atlaskit/editor-prosemirror/transform';
|
|
4
|
+
import type { Mapping } from '@atlaskit/editor-prosemirror/transform';
|
|
4
5
|
export declare enum Side {
|
|
5
6
|
LEFT = "left",
|
|
6
7
|
RIGHT = "right"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare const isIgnored: (node?: PMNode | null) => boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
export declare const isValidTargetNode: (node?: PMNode | null) => boolean;
|
|
@@ -2,4 +2,5 @@ export { RelativeSelectionPos } from './types';
|
|
|
2
2
|
export type { SelectionPluginState, EditorSelectionAPI } from './types';
|
|
3
3
|
export { GapCursorSelection, Side, JSON_ID, GapBookmark, } from './gap-cursor/selection';
|
|
4
4
|
export { isIgnored, isValidTargetNode } from './gap-cursor/utils';
|
|
5
|
+
export { setGapCursorSelection } from './gap-cursor/utils/setGapCursorSelection';
|
|
5
6
|
export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, endPositionOfParent, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent, } from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TableLayout } from '@atlaskit/adf-schema';
|
|
2
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
1
|
+
import type { TableLayout } from '@atlaskit/adf-schema';
|
|
2
|
+
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
3
3
|
export declare const tableMarginTop = 24;
|
|
4
4
|
export declare const tableMarginBottom = 16;
|
|
5
5
|
export declare const tableMarginTopWithControl = 14;
|
package/package.json
CHANGED