@atlaskit/editor-common 112.7.4 → 112.8.0
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 +20 -0
- package/afm-cc/tsconfig.json +0 -3
- package/afm-jira/tsconfig.json +0 -3
- package/afm-products/tsconfig.json +0 -3
- package/dist/cjs/element-browser/components/CategoryList.js +1 -1
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +1 -1
- package/dist/cjs/element-browser/components/ElementList/EmptyState.js +1 -1
- package/dist/cjs/element-browser/components/ElementSearch.js +1 -1
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +2 -2
- package/dist/cjs/extensibility/Extension/Extension/styles.js +2 -2
- package/dist/cjs/extensibility/Extension/InlineExtension/styles.js +1 -1
- package/dist/cjs/extensibility/Extension/LegacyContentHeader/index.js +1 -1
- package/dist/cjs/extensibility/MultiBodiedExtension/styles.js +1 -1
- package/dist/cjs/extensions/UnknownMacroPlaceholder.compiled.css +3 -3
- package/dist/cjs/extensions/UnknownMacroPlaceholder.js +3 -3
- package/dist/cjs/lists/build-replacement-fragment.js +85 -0
- package/dist/cjs/lists/flatten-list.js +73 -0
- package/dist/cjs/lists/index.js +27 -0
- package/dist/cjs/lists/restore-selection.js +66 -0
- package/dist/cjs/media-single/CommentBadge.js +3 -3
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/assets/datasource-assets-objects.js +3 -3
- package/dist/cjs/quick-insert/assets/five-column-layout.js +1 -1
- package/dist/cjs/quick-insert/assets/four-column-layout.js +1 -1
- package/dist/cjs/quick-insert/assets/one-column-layout.js +1 -1
- package/dist/cjs/quick-insert/assets/three-column-layout.js +1 -1
- package/dist/cjs/quick-insert/assets/two-column-layout.js +1 -1
- package/dist/cjs/resizer/Resizer.js +1 -1
- package/dist/cjs/styles/shared/blockquote.js +1 -1
- package/dist/cjs/styles/shared/table.js +3 -3
- package/dist/cjs/table/SortingIcon.js +3 -3
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MultiBodiedExtension/index.js +1 -1
- package/dist/cjs/ui/TableSelector/index.js +3 -4
- package/dist/cjs/ui/TableSelector/table-selector.js +9 -10
- package/dist/cjs/ui-color/ColorPalette/Palettes/highlightColorPalette.js +2 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +1 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -1
- package/dist/cjs/ui-menu/DropdownMenu/index.js +3 -4
- package/dist/es2019/element-browser/components/CategoryList.js +2 -2
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +1 -1
- package/dist/es2019/element-browser/components/ElementList/EmptyState.js +1 -1
- package/dist/es2019/element-browser/components/ElementSearch.js +1 -1
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +2 -2
- package/dist/es2019/extensibility/Extension/Extension/styles.js +2 -2
- package/dist/es2019/extensibility/Extension/InlineExtension/styles.js +1 -1
- package/dist/es2019/extensibility/Extension/LegacyContentHeader/index.js +1 -1
- package/dist/es2019/extensibility/MultiBodiedExtension/styles.js +1 -1
- package/dist/es2019/extensions/UnknownMacroPlaceholder.compiled.css +3 -3
- package/dist/es2019/extensions/UnknownMacroPlaceholder.js +2 -2
- package/dist/es2019/lists/build-replacement-fragment.js +60 -0
- package/dist/es2019/lists/flatten-list.js +72 -0
- package/dist/es2019/lists/index.js +3 -0
- package/dist/es2019/lists/restore-selection.js +59 -0
- package/dist/es2019/media-single/CommentBadge.js +3 -3
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/assets/datasource-assets-objects.js +3 -3
- package/dist/es2019/quick-insert/assets/five-column-layout.js +1 -1
- package/dist/es2019/quick-insert/assets/four-column-layout.js +1 -1
- package/dist/es2019/quick-insert/assets/one-column-layout.js +1 -1
- package/dist/es2019/quick-insert/assets/three-column-layout.js +1 -1
- package/dist/es2019/quick-insert/assets/two-column-layout.js +1 -1
- package/dist/es2019/resizer/Resizer.js +1 -1
- package/dist/es2019/styles/shared/blockquote.js +2 -2
- package/dist/es2019/styles/shared/table.js +13 -14
- package/dist/es2019/table/SortingIcon.js +4 -4
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MultiBodiedExtension/index.js +1 -1
- package/dist/es2019/ui/TableSelector/index.js +3 -4
- package/dist/es2019/ui/TableSelector/table-selector.js +9 -10
- package/dist/es2019/ui-color/ColorPalette/Palettes/highlightColorPalette.js +2 -2
- package/dist/es2019/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +1 -2
- package/dist/es2019/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -1
- package/dist/es2019/ui-menu/DropdownMenu/index.js +7 -8
- package/dist/esm/element-browser/components/CategoryList.js +2 -2
- package/dist/esm/element-browser/components/ElementList/ElementList.js +1 -1
- package/dist/esm/element-browser/components/ElementList/EmptyState.js +1 -1
- package/dist/esm/element-browser/components/ElementSearch.js +1 -1
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +2 -2
- package/dist/esm/extensibility/Extension/Extension/styles.js +2 -2
- package/dist/esm/extensibility/Extension/InlineExtension/styles.js +1 -1
- package/dist/esm/extensibility/Extension/LegacyContentHeader/index.js +1 -1
- package/dist/esm/extensibility/MultiBodiedExtension/styles.js +1 -1
- package/dist/esm/extensions/UnknownMacroPlaceholder.compiled.css +3 -3
- package/dist/esm/extensions/UnknownMacroPlaceholder.js +3 -3
- package/dist/esm/lists/build-replacement-fragment.js +80 -0
- package/dist/esm/lists/flatten-list.js +67 -0
- package/dist/esm/lists/index.js +3 -0
- package/dist/esm/lists/restore-selection.js +59 -0
- package/dist/esm/media-single/CommentBadge.js +3 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/assets/datasource-assets-objects.js +3 -3
- package/dist/esm/quick-insert/assets/five-column-layout.js +1 -1
- package/dist/esm/quick-insert/assets/four-column-layout.js +1 -1
- package/dist/esm/quick-insert/assets/one-column-layout.js +1 -1
- package/dist/esm/quick-insert/assets/three-column-layout.js +1 -1
- package/dist/esm/quick-insert/assets/two-column-layout.js +1 -1
- package/dist/esm/resizer/Resizer.js +1 -1
- package/dist/esm/styles/shared/blockquote.js +2 -2
- package/dist/esm/styles/shared/table.js +4 -4
- package/dist/esm/table/SortingIcon.js +3 -3
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MultiBodiedExtension/index.js +1 -1
- package/dist/esm/ui/TableSelector/index.js +3 -4
- package/dist/esm/ui/TableSelector/table-selector.js +9 -10
- package/dist/esm/ui-color/ColorPalette/Palettes/highlightColorPalette.js +2 -2
- package/dist/esm/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +1 -2
- package/dist/esm/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -1
- package/dist/esm/ui-menu/DropdownMenu/index.js +3 -4
- package/dist/types/lists/build-replacement-fragment.d.ts +35 -0
- package/dist/types/lists/flatten-list.d.ts +47 -0
- package/dist/types/lists/index.d.ts +6 -0
- package/dist/types/lists/restore-selection.d.ts +41 -0
- package/dist/types-ts4.5/lists/build-replacement-fragment.d.ts +35 -0
- package/dist/types-ts4.5/lists/flatten-list.d.ts +47 -0
- package/dist/types-ts4.5/lists/index.d.ts +6 -0
- package/dist/types-ts4.5/lists/restore-selection.d.ts +41 -0
- package/package.json +2 -3
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
2
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
3
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
4
|
+
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
+
|
|
6
|
+
/** Rebuilds a list-like PM node from a flat array of items. */
|
|
7
|
+
|
|
8
|
+
/** Extracts top-level content nodes from an item being broken out past the root list. */
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Build a replacement Fragment from a flat array of items.
|
|
12
|
+
*
|
|
13
|
+
* Items with depth >= 0 are grouped and rebuilt via `rebuildFn`.
|
|
14
|
+
* Items with depth < 0 are extracted via `extractContentFn`.
|
|
15
|
+
*/
|
|
16
|
+
export function buildReplacementFragment(_ref) {
|
|
17
|
+
var items = _ref.items,
|
|
18
|
+
schema = _ref.schema,
|
|
19
|
+
rebuildFn = _ref.rebuildFn,
|
|
20
|
+
extractContentFn = _ref.extractContentFn;
|
|
21
|
+
var fragment = Fragment.empty;
|
|
22
|
+
var pendingListSegment = [];
|
|
23
|
+
var pendingStartIdx = 0;
|
|
24
|
+
var contentStartOffsets = new Array(items.length);
|
|
25
|
+
var flushListSegment = function flushListSegment() {
|
|
26
|
+
if (pendingListSegment.length > 0) {
|
|
27
|
+
var fragmentOffset = fragment.size;
|
|
28
|
+
var result = rebuildFn(pendingListSegment, schema);
|
|
29
|
+
if (result) {
|
|
30
|
+
// Map the rebuild's content start offsets into the overall fragment.
|
|
31
|
+
for (var i = 0; i < pendingListSegment.length; i++) {
|
|
32
|
+
contentStartOffsets[pendingStartIdx + i] = fragmentOffset + result.contentStartOffsets[i];
|
|
33
|
+
}
|
|
34
|
+
fragment = fragment.addToEnd(result.node);
|
|
35
|
+
}
|
|
36
|
+
pendingListSegment = [];
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var elIdx = 0;
|
|
40
|
+
var _iterator = _createForOfIteratorHelper(items),
|
|
41
|
+
_step;
|
|
42
|
+
try {
|
|
43
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
44
|
+
var _item = _step.value;
|
|
45
|
+
if (_item.depth < 0) {
|
|
46
|
+
flushListSegment();
|
|
47
|
+
// Extracted element — content children become top-level nodes.
|
|
48
|
+
// Record offset of first content child.
|
|
49
|
+
contentStartOffsets[elIdx] = fragment.size;
|
|
50
|
+
var _iterator2 = _createForOfIteratorHelper(extractContentFn(_item, schema)),
|
|
51
|
+
_step2;
|
|
52
|
+
try {
|
|
53
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
54
|
+
var node = _step2.value;
|
|
55
|
+
fragment = fragment.addToEnd(node);
|
|
56
|
+
}
|
|
57
|
+
} catch (err) {
|
|
58
|
+
_iterator2.e(err);
|
|
59
|
+
} finally {
|
|
60
|
+
_iterator2.f();
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
if (pendingListSegment.length === 0) {
|
|
64
|
+
pendingStartIdx = elIdx;
|
|
65
|
+
}
|
|
66
|
+
pendingListSegment.push(_item);
|
|
67
|
+
}
|
|
68
|
+
elIdx++;
|
|
69
|
+
}
|
|
70
|
+
} catch (err) {
|
|
71
|
+
_iterator.e(err);
|
|
72
|
+
} finally {
|
|
73
|
+
_iterator.f();
|
|
74
|
+
}
|
|
75
|
+
flushListSegment();
|
|
76
|
+
return {
|
|
77
|
+
fragment: fragment,
|
|
78
|
+
contentStartOffsets: contentStartOffsets
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-specific predicates that vary between regular lists and task lists.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Flattens a list-like PM structure (regular list or task list) into an
|
|
7
|
+
* array of content-bearing items with computed depths.
|
|
8
|
+
*
|
|
9
|
+
* Uses `doc.nodesBetween` to walk the tree and delegates type-specific
|
|
10
|
+
* decisions to the provided predicates. The core algorithm — selection
|
|
11
|
+
* intersection, depth adjustment, index tracking — is shared.
|
|
12
|
+
*/
|
|
13
|
+
export function flattenList(options, predicates) {
|
|
14
|
+
var doc = options.doc,
|
|
15
|
+
rootListStart = options.rootListStart,
|
|
16
|
+
rootListEnd = options.rootListEnd,
|
|
17
|
+
selectionFrom = options.selectionFrom,
|
|
18
|
+
selectionTo = options.selectionTo,
|
|
19
|
+
indentDelta = options.indentDelta,
|
|
20
|
+
maxDepth = options.maxDepth;
|
|
21
|
+
var isContentNode = predicates.isContentNode,
|
|
22
|
+
getSelectionBounds = predicates.getSelectionBounds,
|
|
23
|
+
getDepth = predicates.getDepth;
|
|
24
|
+
var items = [];
|
|
25
|
+
var startIndex = -1;
|
|
26
|
+
var endIndex = -1;
|
|
27
|
+
var exceedsMaxDepth = false;
|
|
28
|
+
var rootDepth = doc.resolve(rootListStart).depth;
|
|
29
|
+
doc.nodesBetween(rootListStart, rootListEnd, function (node, pos, parent) {
|
|
30
|
+
if (!isContentNode(node, parent) || parent == null) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
var _getSelectionBounds = getSelectionBounds(node, pos),
|
|
34
|
+
start = _getSelectionBounds.start,
|
|
35
|
+
end = _getSelectionBounds.end;
|
|
36
|
+
var isSelected = selectionFrom === selectionTo ? selectionFrom >= start && selectionFrom <= end : start < selectionTo && end > selectionFrom;
|
|
37
|
+
var resolvedDepth = doc.resolve(pos).depth;
|
|
38
|
+
var depth = getDepth(resolvedDepth, rootDepth) + (isSelected ? indentDelta : 0);
|
|
39
|
+
items.push({
|
|
40
|
+
node: node,
|
|
41
|
+
pos: pos,
|
|
42
|
+
depth: depth,
|
|
43
|
+
isSelected: isSelected,
|
|
44
|
+
listType: parent.type.name,
|
|
45
|
+
parentListAttrs: parent.attrs
|
|
46
|
+
});
|
|
47
|
+
if (isSelected) {
|
|
48
|
+
var index = items.length - 1;
|
|
49
|
+
if (startIndex === -1) {
|
|
50
|
+
startIndex = index;
|
|
51
|
+
}
|
|
52
|
+
endIndex = index;
|
|
53
|
+
if (maxDepth != null && depth >= maxDepth) {
|
|
54
|
+
exceedsMaxDepth = true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return true;
|
|
58
|
+
});
|
|
59
|
+
if (items.length === 0 || startIndex === -1 || exceedsMaxDepth) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
items: items,
|
|
64
|
+
startIndex: startIndex,
|
|
65
|
+
endIndex: endIndex
|
|
66
|
+
};
|
|
67
|
+
}
|
package/dist/esm/lists/index.js
CHANGED
|
@@ -6,5 +6,8 @@ export { moveTargetIntoList } from './replace-content';
|
|
|
6
6
|
export { JoinDirection, isListNodeValidContent, joinSiblingLists, processNestedTaskListsInSameLevel } from './node';
|
|
7
7
|
export { getCommonListAnalyticsAttributes, countListItemsInSelection } from './analytics';
|
|
8
8
|
export { hasValidListIndentationLevel } from './indentation';
|
|
9
|
+
export { restoreSelection, computeSelectionOffsets } from './restore-selection';
|
|
10
|
+
export { buildReplacementFragment } from './build-replacement-fragment';
|
|
11
|
+
export { flattenList } from './flatten-list';
|
|
9
12
|
export { isListNode, isListItemNode, isBulletList, isParagraphNode } from '../utils';
|
|
10
13
|
export { messages } from './messages';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import { GapCursorSelection } from '../selection';
|
|
3
|
+
/**
|
|
4
|
+
* Compute the new selection offsets after list items have been moved/indented/outdented.
|
|
5
|
+
*
|
|
6
|
+
* Uses the content start offsets computed during fragment rebuild to map each
|
|
7
|
+
* selection endpoint to its new absolute position, accounting for the change
|
|
8
|
+
* in the list structure.
|
|
9
|
+
*/
|
|
10
|
+
export function computeSelectionOffsets(_ref) {
|
|
11
|
+
var items = _ref.items,
|
|
12
|
+
startIndex = _ref.startIndex,
|
|
13
|
+
endIndex = _ref.endIndex,
|
|
14
|
+
originalFrom = _ref.originalFrom,
|
|
15
|
+
originalTo = _ref.originalTo,
|
|
16
|
+
contentStartOffsets = _ref.contentStartOffsets,
|
|
17
|
+
rootListStart = _ref.rootListStart,
|
|
18
|
+
docSize = _ref.docSize;
|
|
19
|
+
// +1 shifts from the outer edge of the list item node to the start of the content within
|
|
20
|
+
var fromContentStart = items[startIndex].pos + 1;
|
|
21
|
+
var toContentStart = items[endIndex].pos + 1;
|
|
22
|
+
var fromOffset = originalFrom - fromContentStart;
|
|
23
|
+
var toOffset = originalTo - toContentStart;
|
|
24
|
+
var clamp = function clamp(pos) {
|
|
25
|
+
return Math.min(Math.max(0, pos), docSize);
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
from: clamp(rootListStart + contentStartOffsets[startIndex] + fromOffset),
|
|
29
|
+
to: clamp(rootListStart + contentStartOffsets[endIndex] + toOffset)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Restore the transaction's selection after a list structural change
|
|
35
|
+
* (indent/outdent of list items or task list items).
|
|
36
|
+
*
|
|
37
|
+
* Uses the content start offsets computed during fragment rebuild to
|
|
38
|
+
* map each selection endpoint to its new absolute position.
|
|
39
|
+
*
|
|
40
|
+
* Handles NodeSelection, GapCursorSelection, and TextSelection.
|
|
41
|
+
*/
|
|
42
|
+
export function restoreSelection(_ref2) {
|
|
43
|
+
var tr = _ref2.tr,
|
|
44
|
+
originalSelection = _ref2.originalSelection,
|
|
45
|
+
from = _ref2.from,
|
|
46
|
+
to = _ref2.to;
|
|
47
|
+
var maxPos = tr.doc.content.size;
|
|
48
|
+
if (originalSelection instanceof NodeSelection) {
|
|
49
|
+
try {
|
|
50
|
+
tr.setSelection(NodeSelection.create(tr.doc, Math.min(from, maxPos - 1)));
|
|
51
|
+
} catch (_unused) {
|
|
52
|
+
tr.setSelection(Selection.near(tr.doc.resolve(from)));
|
|
53
|
+
}
|
|
54
|
+
} else if (originalSelection instanceof GapCursorSelection) {
|
|
55
|
+
tr.setSelection(new GapCursorSelection(tr.doc.resolve(from), originalSelection.side));
|
|
56
|
+
} else {
|
|
57
|
+
tr.setSelection(TextSelection.create(tr.doc, from, to));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -70,11 +70,11 @@ export var CommentBadge = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
70
70
|
var colourToken = useMemo(function () {
|
|
71
71
|
switch (status) {
|
|
72
72
|
case 'active':
|
|
73
|
-
return "var(--ds-background-accent-yellow-subtlest-pressed, #
|
|
73
|
+
return "var(--ds-background-accent-yellow-subtlest-pressed, #EFDD4E)";
|
|
74
74
|
case 'entered':
|
|
75
|
-
return "var(--ds-background-accent-yellow-subtlest-hovered, #
|
|
75
|
+
return "var(--ds-background-accent-yellow-subtlest-hovered, #F5E989)";
|
|
76
76
|
default:
|
|
77
|
-
return "var(--ds-background-accent-yellow-subtlest, #
|
|
77
|
+
return "var(--ds-background-accent-yellow-subtlest, #FEF7C8)";
|
|
78
78
|
}
|
|
79
79
|
}, [status]);
|
|
80
80
|
return jsx("div", {
|
|
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
|
|
|
10
10
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
11
11
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
12
12
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
13
|
-
var packageVersion = "
|
|
13
|
+
var packageVersion = "0.0.0-development";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// Ignored via go/ees007
|
|
@@ -13,18 +13,18 @@ export default function IconDatasourceAssetsObjects() {
|
|
|
13
13
|
y: "0",
|
|
14
14
|
width: "42",
|
|
15
15
|
height: "42",
|
|
16
|
-
fill: "var(--ds-background-accent-purple-subtlest, #
|
|
16
|
+
fill: "var(--ds-background-accent-purple-subtlest, #F8EEFE)"
|
|
17
17
|
}), /*#__PURE__*/React.createElement("rect", {
|
|
18
18
|
x: "8",
|
|
19
19
|
y: "8",
|
|
20
20
|
width: "26",
|
|
21
21
|
height: "26",
|
|
22
22
|
rx: "4",
|
|
23
|
-
fill: "var(--ds-background-input,
|
|
23
|
+
fill: "var(--ds-background-input, #FFFFFF)"
|
|
24
24
|
}), /*#__PURE__*/React.createElement("path", {
|
|
25
25
|
fillRule: "evenodd",
|
|
26
26
|
clipRule: "evenodd",
|
|
27
27
|
d: "M12.667 9.33317H29.3337C31.1746 9.33317 32.667 10.8256 32.667 12.6665V29.3332C32.667 31.1741 31.1746 32.6665 29.3337 32.6665H12.667C10.826 32.6665 9.33366 31.1741 9.33366 29.3332V12.6665C9.33366 10.8256 10.826 9.33317 12.667 9.33317ZM7.66699 12.6665C7.66699 9.90508 9.90557 7.6665 12.667 7.6665H29.3337C32.0951 7.6665 34.3337 9.90508 34.3337 12.6665V29.3332C34.3337 32.0946 32.0951 34.3332 29.3337 34.3332H12.667C9.90557 34.3332 7.66699 32.0946 7.66699 29.3332V12.6665ZM12.9579 13.4165C12.9579 13.0023 13.2937 12.6665 13.7079 12.6665H17.6443C18.0585 12.6665 18.3943 13.0023 18.3943 13.4165V16.9165C18.3943 17.3307 18.0585 17.6665 17.6443 17.6665H16.5823V19.3332H22.0186V18.4165C22.0186 18.0023 22.3544 17.6665 22.7686 17.6665H26.7049C27.1192 17.6665 27.4549 18.0023 27.4549 18.4165V21.9165C27.4549 22.3307 27.1192 22.6665 26.7049 22.6665H22.7686C22.3544 22.6665 22.0186 22.3307 22.0186 21.9165V20.9998H16.5823V25.9998H22.0186V25.0832C22.0186 24.669 22.3544 24.3332 22.7686 24.3332H26.7049C27.1192 24.3332 27.4549 24.669 27.4549 25.0832V28.5832C27.4549 28.9974 27.1192 29.3332 26.7049 29.3332H22.7686C22.3544 29.3332 22.0186 28.9974 22.0186 28.5832V27.6665H16.4368C15.5163 27.6665 14.7701 26.9203 14.7701 25.9998V19.3332V17.6665H13.7079C13.2937 17.6665 12.9579 17.3307 12.9579 16.9165V13.4165ZM14.7701 14.5832C14.7701 14.4451 14.882 14.3332 15.0201 14.3332H16.3322C16.4703 14.3332 16.5822 14.4451 16.5822 14.5832V15.7498C16.5822 15.8879 16.4703 15.9998 16.3322 15.9998H15.0201C14.882 15.9998 14.7701 15.8879 14.7701 15.7498V14.5832ZM24.0805 19.3332C23.9425 19.3332 23.8305 19.4451 23.8305 19.5832V20.7498C23.8305 20.8879 23.9425 20.9998 24.0805 20.9998H25.3927C25.5307 20.9998 25.6427 20.8879 25.6427 20.7498V19.5832C25.6427 19.4451 25.5307 19.3332 25.3927 19.3332H24.0805ZM24.0805 25.9998C23.9425 25.9998 23.8305 26.1118 23.8305 26.2498V27.4165C23.8305 27.5546 23.9425 27.6665 24.0805 27.6665H25.3927C25.5307 27.6665 25.6427 27.5546 25.6427 27.4165V26.2498C25.6427 26.1118 25.5307 25.9998 25.3927 25.9998H24.0805Z",
|
|
28
|
-
fill: "var(--ds-background-accent-gray-bolder-hovered, #
|
|
28
|
+
fill: "var(--ds-background-accent-gray-bolder-hovered, #505258)"
|
|
29
29
|
}));
|
|
30
30
|
}
|
|
@@ -35,7 +35,7 @@ export default function OneColumnLayoutIcon() {
|
|
|
35
35
|
width: "39",
|
|
36
36
|
height: "39",
|
|
37
37
|
rx: "2.5",
|
|
38
|
-
stroke: "var(--ds-border, #
|
|
38
|
+
stroke: "var(--ds-border, #0B120E24)",
|
|
39
39
|
strokeOpacity: "0.14"
|
|
40
40
|
})), /*#__PURE__*/React.createElement("rect", {
|
|
41
41
|
x: "6",
|
|
@@ -35,7 +35,7 @@ export default function OneColumnLayoutIcon() {
|
|
|
35
35
|
width: "39",
|
|
36
36
|
height: "39",
|
|
37
37
|
rx: "2.5",
|
|
38
|
-
stroke: "var(--ds-border, #
|
|
38
|
+
stroke: "var(--ds-border, #0B120E24)",
|
|
39
39
|
strokeOpacity: "0.14"
|
|
40
40
|
})), /*#__PURE__*/React.createElement("rect", {
|
|
41
41
|
x: "6",
|
|
@@ -34,7 +34,7 @@ export default function OneColumnLayoutIcon() {
|
|
|
34
34
|
width: "39",
|
|
35
35
|
height: "39",
|
|
36
36
|
rx: "2.5",
|
|
37
|
-
stroke: "var(--ds-border, #
|
|
37
|
+
stroke: "var(--ds-border, #0B120E24)",
|
|
38
38
|
strokeOpacity: "0.14"
|
|
39
39
|
})), /*#__PURE__*/React.createElement("rect", {
|
|
40
40
|
x: "6",
|
|
@@ -42,7 +42,7 @@ export default function ThreeColumnLayoutIcon() {
|
|
|
42
42
|
width: "39",
|
|
43
43
|
height: "39",
|
|
44
44
|
rx: "2.5",
|
|
45
|
-
stroke: "var(--ds-border, #
|
|
45
|
+
stroke: "var(--ds-border, #0B120E24)",
|
|
46
46
|
strokeOpacity: "0.14"
|
|
47
47
|
})), /*#__PURE__*/React.createElement("rect", {
|
|
48
48
|
x: "6",
|
|
@@ -35,7 +35,7 @@ export default function TwoColumnLayoutIcon() {
|
|
|
35
35
|
width: "39",
|
|
36
36
|
height: "39",
|
|
37
37
|
rx: "2.5",
|
|
38
|
-
stroke: "var(--ds-border, #
|
|
38
|
+
stroke: "var(--ds-border, #0B120E24)",
|
|
39
39
|
strokeOpacity: "0.14"
|
|
40
40
|
})), /*#__PURE__*/React.createElement("rect", {
|
|
41
41
|
x: "6",
|
|
@@ -18,7 +18,7 @@ import { messages } from '../messages/breakout';
|
|
|
18
18
|
import { handleWrapperClass, resizerDangerClassName, resizerExtendedZone, resizerHandleClassName, resizerHandleThumbClassName, resizerHandleTrackClassName, resizerHandleZIndex, resizerHoverZoneClassName, resizerItemClassName } from '../styles/shared/resizer';
|
|
19
19
|
var resizerLabelStyles = xcss({
|
|
20
20
|
position: 'absolute',
|
|
21
|
-
bottom: "var(--ds-space-0,
|
|
21
|
+
bottom: "var(--ds-space-0, 0px)",
|
|
22
22
|
width: '100%',
|
|
23
23
|
overflow: 'visible',
|
|
24
24
|
display: 'flex',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
5
|
export var blockquoteSharedStyles = css({
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -11,7 +11,7 @@ export var blockquoteSharedStyles = css({
|
|
|
11
11
|
display: 'inline-block',
|
|
12
12
|
paddingLeft: "var(--ds-space-200, 16px)",
|
|
13
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
14
|
-
borderLeft: "
|
|
14
|
+
borderLeft: "var(--ds-border-width-selected, 2px)".concat(" solid ", "var(--ds-border, #0B120E24)"),
|
|
15
15
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
16
16
|
margin: "".concat(blockNodesVerticalMargin, " 0 0 0"),
|
|
17
17
|
marginRight: 0,
|
|
@@ -3,7 +3,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
5
|
import { tableCellContentDomSelector, tableCellSelector, tableHeaderSelector, tablePrefixSelector } from '@atlaskit/adf-schema';
|
|
6
|
-
import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorSelectedNodeClassName,
|
|
6
|
+
import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorSelectedNodeClassName, akEditorTableNumberColumnWidth, akEditorWideLayoutWidth, overflowShadow } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
9
|
import { browser as browserLegacy, getBrowserInfo } from '../../utils/browser';
|
|
@@ -58,11 +58,11 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
|
58
58
|
var tableSharedStyle = function tableSharedStyle() {
|
|
59
59
|
var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
|
|
60
60
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
|
|
61
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t", "\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin: 0 auto ", ";\n\t\t\tbox-sizing: border-box;\n\n\t\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t.", ",\n\t\t\t\t.", " {\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 1px;\n\t\t\t\theight: calc(100% - ", ");\n\t\t\t\tbackground: ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tright: 0;\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t.", "[data-with-numbered-table='true'] {\n\t\t\t\tleft: ", "px;\n\t\t\t}\n\t\t}\n\t\t.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t\tclear: both;\n\t\t}\n\n\t\t.", " {\n\t\t\twill-change: width, margin-left;\n\t\t}\n\n\t\t.", " table {\n\t\t\twill-change: width;\n\t\t}\n\n\t\t.", " > table {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\n\t\t.", " > table,\n\t\t.", " > table {\n\t\t\tmargin: ", " ", " 0 0;\n\t\t}\n\n\t\t/* support panel nested in table */\n\t\t", "\n\n\t\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\t\tborder-collapse: collapse;\n\t\t\tborder: ", "px solid
|
|
61
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t", "\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin: 0 auto ", ";\n\t\t\tbox-sizing: border-box;\n\n\t\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t.", ",\n\t\t\t\t.", " {\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 1px;\n\t\t\t\theight: calc(100% - ", ");\n\t\t\t\tbackground: ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tright: 0;\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t.", "[data-with-numbered-table='true'] {\n\t\t\t\tleft: ", "px;\n\t\t\t}\n\t\t}\n\t\t.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t\tclear: both;\n\t\t}\n\n\t\t.", " {\n\t\t\twill-change: width, margin-left;\n\t\t}\n\n\t\t.", " table {\n\t\t\twill-change: width;\n\t\t}\n\n\t\t.", " > table {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\n\t\t.", " > table,\n\t\t.", " > table {\n\t\t\tmargin: ", " ", " 0 0;\n\t\t}\n\n\t\t/* support panel nested in table */\n\t\t", "\n\n\t\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\t\tborder-collapse: collapse;\n\t\t\tborder: ", "px solid ", ";\n\t\t\tborder-left-color: transparent;\n\t\t\tborder-right-color: transparent;\n\t\t\ttable-layout: fixed;\n\t\t\tfont-size: 1em;\n\t\t\twidth: 100%;\n\n\t\t\t&[data-autosize='true'] {\n\t\t\t\ttable-layout: auto;\n\t\t\t}\n\n\t\t\t& {\n\t\t\t\t* {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\t\t\t\thr {\n\t\t\t\t\tbox-sizing: content-box;\n\t\t\t\t}\n\n\t\t\t\ttbody {\n\t\t\t\t\tborder-bottom: none;\n\t\t\t\t}\n\t\t\t\tth td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\t> tbody > tr > th,\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tmin-width: ", "px;\n\t\t\t\t\tfont-weight: ", ";\n\t\t\t\t\tvertical-align: top;\n\t\t\t\t\tborder: 1px solid ", ";\n\t\t\t\t\tborder-right-width: 0;\n\t\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\t\tpadding: ", ";\n\t\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t\t", "\n\n\t\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected */\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\tth {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\ttext-align: left;\n\n\t\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t\t", " {\n\t\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t\t/* selector lives inside @atlaskit/code */\n\t\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_RIGHT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, "var(--ds-space-300, 24px)", "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_RIGHT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", fg('platform_editor_bordered_panel_nested_in_table') ? ".".concat(TableSharedCssClassName.TABLE_NODE_WRAPPER, " .ak-editor-panel {\n\t\t\tborder: ", "var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #0B120E24)", ";\n\t\t}") : '', TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-background-neutral-subtle, #00000000)", tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-space-100, 8px)", browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", "var(--ds-surface, #FFFFFF)", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? '&:not(.danger)' : '&:not([style]):not(.danger)', CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, #FFFFFF)", akEditorSelectedNodeClassName, "var(--ds-border, #0B120E24)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, overflowShadow({
|
|
62
62
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
63
|
-
}), "var(--ds-background-neutral,
|
|
63
|
+
}), "var(--ds-background-neutral, #0515240F)", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, #0515240F)", overflowShadow({
|
|
64
64
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
65
|
-
}), "var(--ds-background-neutral,
|
|
65
|
+
}), "var(--ds-background-neutral, #0515240F)", "var(--ds-background-neutral, #0515240F)");
|
|
66
66
|
};
|
|
67
67
|
export var calcTableWidth = function calcTableWidth(layout, containerWidth) {
|
|
68
68
|
var addControllerPadding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
@@ -22,7 +22,7 @@ export var StatusClassNames = /*#__PURE__*/function (StatusClassNames) {
|
|
|
22
22
|
}({});
|
|
23
23
|
|
|
24
24
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
25
|
-
var buttonStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tposition: absolute;\n\tdisplay: flex;\n\theight: 28px;\n\twidth: 28px;\n\tmargin: ", ";\n\tright: 0;\n\ttop: 0;\n\tborder: ", " solid ", ";\n\tborder-radius: ", ";\n\tbackground-color: ", ";\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n\n\t&:hover {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:active {\n\t\tbackground-color: ", ";\n\t}\n\n\t&.", "__not-allowed {\n\t\tcursor: not-allowed;\n\t}\n"])), "var(--ds-space-075, 6px)", "var(--ds-border-width-selected, 2px)", "var(--ds-border, #
|
|
25
|
+
var buttonStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tposition: absolute;\n\tdisplay: flex;\n\theight: 28px;\n\twidth: 28px;\n\tmargin: ", ";\n\tright: 0;\n\ttop: 0;\n\tborder: ", " solid ", ";\n\tborder-radius: ", ";\n\tbackground-color: ", ";\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n\n\t&:hover {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:active {\n\t\tbackground-color: ", ";\n\t}\n\n\t&.", "__not-allowed {\n\t\tcursor: not-allowed;\n\t}\n"])), "var(--ds-space-075, 6px)", "var(--ds-border-width-selected, 2px)", "var(--ds-border, #0B120E24)", "var(--ds-radius-small, 4px)", "var(--ds-surface-overlay, #FFFFFF)", "var(--ds-surface-overlay-hovered, #F0F1F2)", "var(--ds-surface-overlay-pressed, #DDDEE1)", SORTABLE_COLUMN_ICON_CLASSNAME);
|
|
26
26
|
|
|
27
27
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
28
28
|
var iconWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\twidth: 8px;\n\theight: 12px;\n\ttransition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1);\n\ttransform-origin: 50% 50%;\n\tdisplay: flex;\n\tjustify-content: center;\n\n\t&.", " {\n\t\ttransform: rotate(-180deg);\n\t}\n\n\t&.", "-inactive {\n\t\topacity: 0.7;\n\t}\n"])), StatusClassNames.DESC, SORTABLE_COLUMN_ICON_CLASSNAME);
|
|
@@ -34,10 +34,10 @@ var iconStyles = css({
|
|
|
34
34
|
height: '100%',
|
|
35
35
|
width: '2px',
|
|
36
36
|
borderRadius: "var(--ds-radius-full, 9999px)",
|
|
37
|
-
background: "var(--ds-icon, #
|
|
37
|
+
background: "var(--ds-icon, #292A2E)",
|
|
38
38
|
userSelect: 'none',
|
|
39
39
|
'&::before, &::after': {
|
|
40
|
-
background: "var(--ds-icon, #
|
|
40
|
+
background: "var(--ds-icon, #292A2E)",
|
|
41
41
|
content: "''",
|
|
42
42
|
height: '2px',
|
|
43
43
|
width: '6px',
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "
|
|
24
|
+
var packageVersion = "0.0.0-development";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -47,7 +47,7 @@ var mbeNavigation = css({
|
|
|
47
47
|
WebkitUserModify: 'read-only',
|
|
48
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
49
49
|
borderBottom: 'none !important',
|
|
50
|
-
background: "var(--ds-surface,
|
|
50
|
+
background: "var(--ds-surface, #FFFFFF)",
|
|
51
51
|
marginLeft: "var(--ds-space-100, 8px)",
|
|
52
52
|
marginRight: "var(--ds-space-100, 8px)",
|
|
53
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -13,7 +13,6 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
13
13
|
import { css, jsx } from '@emotion/react';
|
|
14
14
|
import { bind } from 'bind-event-listener';
|
|
15
15
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
16
|
-
import { N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
17
16
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
17
|
import { withReactEditorViewOuterListeners as withOuterListeners } from '../../ui-react';
|
|
19
18
|
import Popup from '../Popup';
|
|
@@ -33,9 +32,9 @@ var initialSizeState = {
|
|
|
33
32
|
};
|
|
34
33
|
var tableSelectorPopupWrapperStyles = css({
|
|
35
34
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
36
|
-
backgroundColor: "var(--ds-surface-overlay,
|
|
37
|
-
boxShadow: "var(--ds-shadow-overlay,
|
|
38
|
-
padding: "
|
|
35
|
+
backgroundColor: "var(--ds-surface-overlay, #FFFFFF)",
|
|
36
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)",
|
|
37
|
+
padding: "var(--ds-space-100, 8px)".concat(" ", TABLE_SELECTOR_PADDING_SIDE, "px")
|
|
39
38
|
});
|
|
40
39
|
export var TableSelectorPopup = function TableSelectorPopup(props) {
|
|
41
40
|
var _useState = useState(_objectSpread(_objectSpread({}, initialSizeState), props.defaultSize)),
|
|
@@ -7,7 +7,6 @@ import { useContext, useEffect, useMemo, useRef } from 'react';
|
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { injectIntl } from 'react-intl-next';
|
|
9
9
|
import { Stack } from '@atlaskit/primitives/compiled';
|
|
10
|
-
import { B100 } from '@atlaskit/theme/colors';
|
|
11
10
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
11
|
import { toolbarInsertBlockMessages as messages } from '../../messages';
|
|
13
12
|
import { OutsideClickTargetRefContext } from '../../ui-react';
|
|
@@ -15,22 +14,22 @@ export var TABLE_SELECTOR_BUTTON_GAP = 2;
|
|
|
15
14
|
export var TABLE_SELECTOR_BUTTON_SIZE = 17;
|
|
16
15
|
var MULTIPLICATION_SYMBOL = '×';
|
|
17
16
|
var selectedButtonStyles = css({
|
|
18
|
-
backgroundColor: "var(--ds-background-accent-blue-subtlest, #
|
|
19
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-background-accent-blue-subtle, #
|
|
17
|
+
backgroundColor: "var(--ds-background-accent-blue-subtlest, #E9F2FE)",
|
|
18
|
+
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-background-accent-blue-subtle, #669DF1)")
|
|
20
19
|
});
|
|
21
20
|
var buttonStyles = css({
|
|
22
21
|
height: "".concat(TABLE_SELECTOR_BUTTON_SIZE, "px"),
|
|
23
22
|
width: "".concat(TABLE_SELECTOR_BUTTON_SIZE, "px"),
|
|
24
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #
|
|
25
|
-
backgroundColor: "var(--ds-background-input, #
|
|
23
|
+
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)"),
|
|
24
|
+
backgroundColor: "var(--ds-background-input, #FFFFFF)",
|
|
26
25
|
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
|
|
27
26
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
28
27
|
cursor: 'pointer',
|
|
29
28
|
display: 'block',
|
|
30
29
|
'&:focus': {
|
|
31
30
|
outline: 'none',
|
|
32
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-focused,
|
|
33
|
-
boxShadow: "0 0 0 0.5px ".concat("var(--ds-border-focused,
|
|
31
|
+
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-focused, #4688EC)"),
|
|
32
|
+
boxShadow: "0 0 0 0.5px ".concat("var(--ds-border-focused, #4688EC)")
|
|
34
33
|
}
|
|
35
34
|
});
|
|
36
35
|
var selectionSizeTextStyles = css({
|
|
@@ -38,8 +37,8 @@ var selectionSizeTextStyles = css({
|
|
|
38
37
|
lineHeight: '14px',
|
|
39
38
|
display: 'flex',
|
|
40
39
|
justifyContent: 'center',
|
|
41
|
-
marginTop: "var(--ds-space-075,
|
|
42
|
-
padding: "var(--ds-space-075,
|
|
40
|
+
marginTop: "var(--ds-space-075, 6px)",
|
|
41
|
+
padding: "var(--ds-space-075, 6px)"
|
|
43
42
|
});
|
|
44
43
|
var TableSelectorButton = function TableSelectorButton(_ref) {
|
|
45
44
|
var row = _ref.row,
|
|
@@ -98,7 +97,7 @@ var gridWrapperStyles = function gridWrapperStyles(_ref2) {
|
|
|
98
97
|
gridTemplateColumns: "repeat(".concat(maxCols, ", 1fr)"),
|
|
99
98
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
100
99
|
gridTemplateRows: "repeat(".concat(maxRows, ", 1fr)"),
|
|
101
|
-
gap: "
|
|
100
|
+
gap: "var(--ds-space-025, 2px)"
|
|
102
101
|
});
|
|
103
102
|
};
|
|
104
103
|
var TableSelectorPopup = function TableSelectorPopup(_ref3) {
|
|
@@ -39,7 +39,7 @@ var DiagonalLineGlyph = function DiagonalLineGlyph(props) {
|
|
|
39
39
|
export var EditorDiagonalLineIcon = function EditorDiagonalLineIcon() {
|
|
40
40
|
var _useThemeObserver = useThemeObserver(),
|
|
41
41
|
colorMode = _useThemeObserver.colorMode;
|
|
42
|
-
var primaryColor = colorMode === 'dark' ? "var(--ds-background-accent-gray-bolder, #
|
|
42
|
+
var primaryColor = colorMode === 'dark' ? "var(--ds-background-accent-gray-bolder, #6B6E76)" : "var(--ds-background-accent-gray-subtle, #8C8F97)";
|
|
43
43
|
return (
|
|
44
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
45
45
|
jsx(DiagonalLineGlyph, {
|
|
@@ -54,7 +54,7 @@ export var highlightColorPalette = [{
|
|
|
54
54
|
value: REMOVE_HIGHLIGHT_COLOR,
|
|
55
55
|
label: 'No color',
|
|
56
56
|
// Mostly informative, only used for analytics
|
|
57
|
-
border: "var(--ds-border, #
|
|
57
|
+
border: "var(--ds-border, #0B120E24)",
|
|
58
58
|
message: getColorMessage(paletteMessages, 'no-color'),
|
|
59
59
|
decorator: jsx(EditorDiagonalLineIcon, null)
|
|
60
60
|
}];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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) { _defineProperty(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; }
|
|
4
|
-
import { DEFAULT_BORDER_COLOR } from './common';
|
|
5
4
|
export var panelBackgroundPalette = [{
|
|
6
5
|
label: 'White',
|
|
7
6
|
value: '#FFFFFF'
|
|
@@ -67,6 +66,6 @@ export var panelBackgroundPalette = [{
|
|
|
67
66
|
value: '#998DD9'
|
|
68
67
|
}].map(function (color) {
|
|
69
68
|
return _objectSpread(_objectSpread({}, color), {}, {
|
|
70
|
-
border: "var(--ds-border,
|
|
69
|
+
border: "var(--ds-border, #0B120E24)"
|
|
71
70
|
});
|
|
72
71
|
});
|
|
@@ -27,7 +27,6 @@ import React, { PureComponent, useContext } from 'react';
|
|
|
27
27
|
import { css, jsx } from '@emotion/react';
|
|
28
28
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
29
29
|
import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
30
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
31
30
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
32
31
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
33
32
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -56,17 +55,17 @@ var buttonStyles = function buttonStyles(isActive, submenuActive) {
|
|
|
56
55
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
57
56
|
*/
|
|
58
57
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
59
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\tposition: relative;\n\t\t\t\t&::before {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\twidth: 2px;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcontent: '';\n\t\t\t\t}\n\t\t\t\t> span,\n\t\t\t\t> span:hover,\n\t\t\t\t> span:active {\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t}\n\t\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t\t", ";\n\t\t\t\t}\n\t\t\t\t:focus-visible,\n\t\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\t\toutline: none;\n\t\t\t\t}\n\t\t\t"])), "var(--ds-border-selected,
|
|
58
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\tposition: relative;\n\t\t\t\t&::before {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\twidth: 2px;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcontent: '';\n\t\t\t\t}\n\t\t\t\t> span,\n\t\t\t\t> span:hover,\n\t\t\t\t> span:active {\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t}\n\t\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t\t", ";\n\t\t\t\t}\n\t\t\t\t:focus-visible,\n\t\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\t\toutline: none;\n\t\t\t\t}\n\t\t\t"])), "var(--ds-border-selected, #1868DB)", "var(--ds-background-selected, #E9F2FE)", "var(--ds-text-selected, #1868DB)", focusedMenuItemStyle);
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
/**
|
|
63
62
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
64
63
|
*/
|
|
65
64
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
66
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t> span,\n\t\t\t> span:hover,\n\t\t\t> span:active {\n\t\t\t\tbackground: ", ";\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-background-selected,
|
|
65
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t> span,\n\t\t\t> span:hover,\n\t\t\t> span:active {\n\t\t\t\tbackground: ", ";\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-background-selected, #E9F2FE)", "var(--ds-text-selected, #1868DB)", focusedMenuItemStyle);
|
|
67
66
|
} else {
|
|
68
67
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
69
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t\t> span:hover[aria-disabled='false'] {\n\t\t\t\tcolor: ", ";\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\t", "\n\t\t\t> span[aria-disabled='true'] {\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-text, #292A2E)", "var(--ds-background-neutral-subtle-hovered,
|
|
68
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t\t\t> span:hover[aria-disabled='false'] {\n\t\t\t\tcolor: ", ";\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\t", "\n\t\t\t> span[aria-disabled='true'] {\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-text, #292A2E)", "var(--ds-background-neutral-subtle-hovered, #0515240F)", !submenuActive && "\n\t\t\t\t\t> span:active[aria-disabled='false'] {\n\t\t\t\t\t\tbackground-color: ".concat("var(--ds-background-neutral-subtle-pressed, #0B120E24)", ";\n\t\t\t\t\t}"), "var(--ds-text-disabled, #080F214A)", focusedMenuItemStyle); // The default focus-visible style is removed to ensure consistency across browsers
|
|
70
69
|
}
|
|
71
70
|
};
|
|
72
71
|
var DropListWithOutsideClickTargetRef = function DropListWithOutsideClickTargetRef(props) {
|