@atlaskit/editor-common 96.3.0 → 96.3.2
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 +19 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/resizer/BreakoutResizer.js +6 -3
- package/dist/cjs/styles/shared/table.js +2 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/calculate-toolbar-position.js +10 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/resizer/BreakoutResizer.js +6 -3
- package/dist/es2019/styles/shared/table.js +6 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/calculate-toolbar-position.js +10 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/resizer/BreakoutResizer.js +6 -3
- package/dist/esm/styles/shared/table.js +2 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/calculate-toolbar-position.js +10 -1
- package/dist/types/resizer/BreakoutResizer.d.ts +2 -1
- package/dist/types-ts4.5/resizer/BreakoutResizer.d.ts +2 -1
- package/package.json +10 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 96.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#175424](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/175424)
|
|
8
|
+
[`a58e3d02b1639`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a58e3d02b1639) -
|
|
9
|
+
[ux] Fixes position of the Selection/floating toolbar to avoid horizontal scroll when text is
|
|
10
|
+
selected close to the right side of the viewport.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 96.3.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#174774](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/174774)
|
|
18
|
+
[`8e4f117f6abde`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8e4f117f6abde) -
|
|
19
|
+
[ux] ED-25744 Resolve styling issues with column sort and background color for nested tables
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 96.3.0
|
|
4
23
|
|
|
5
24
|
### Minor Changes
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "96.3.
|
|
20
|
+
var packageVersion = "96.3.2";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -74,7 +74,8 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
74
74
|
disabled = _ref.disabled,
|
|
75
75
|
getEditorWidth = _ref.getEditorWidth,
|
|
76
76
|
parentRef = _ref.parentRef,
|
|
77
|
-
editorAnalyticsApi = _ref.editorAnalyticsApi
|
|
77
|
+
editorAnalyticsApi = _ref.editorAnalyticsApi,
|
|
78
|
+
displayGapCursor = _ref.displayGapCursor;
|
|
78
79
|
var _useState = (0, _react.useState)({
|
|
79
80
|
minWidth: undefined,
|
|
80
81
|
maxWidth: undefined,
|
|
@@ -110,6 +111,7 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
110
111
|
var widthState = getEditorWidth();
|
|
111
112
|
var dispatch = editorView.dispatch,
|
|
112
113
|
state = editorView.state;
|
|
114
|
+
displayGapCursor(false);
|
|
113
115
|
if (widthState !== undefined && widthState.lineLength !== undefined && widthState.width !== undefined) {
|
|
114
116
|
newMinWidth = Math.min(widthState.lineLength, _editorSharedStyles.akEditorDefaultLayoutWidth);
|
|
115
117
|
newMaxWidth = Math.min(widthState.width - (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2 - _editorSharedStyles.akEditorGutterPadding, _editorSharedStyles.akEditorFullWidthLayoutWidth);
|
|
@@ -120,7 +122,7 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
120
122
|
maxWidth: newMaxWidth
|
|
121
123
|
});
|
|
122
124
|
dispatch(state.tr.setMeta('is-resizer-resizing', true));
|
|
123
|
-
}, [getEditorWidth, editorView]);
|
|
125
|
+
}, [getEditorWidth, editorView, displayGapCursor]);
|
|
124
126
|
var handleResizeStop = (0, _react.useCallback)(function (originalState, delta) {
|
|
125
127
|
var newWidth = originalState.width + delta.width;
|
|
126
128
|
var pos = getPos();
|
|
@@ -150,13 +152,14 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
150
152
|
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent(breakoutResizePayload)(newTr);
|
|
151
153
|
}
|
|
152
154
|
newTr.setMeta('is-resizer-resizing', false).setMeta('scrollIntoView', false);
|
|
155
|
+
displayGapCursor(true);
|
|
153
156
|
dispatch(newTr);
|
|
154
157
|
setResizingState({
|
|
155
158
|
isResizing: false,
|
|
156
159
|
minWidth: undefined,
|
|
157
160
|
maxWidth: undefined
|
|
158
161
|
});
|
|
159
|
-
}, [editorView,
|
|
162
|
+
}, [getPos, editorView, displayGapCursor, editorAnalyticsApi]);
|
|
160
163
|
if (disabled) {
|
|
161
164
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
162
165
|
"data-testid": "breakout-resizer-editor-view-wrapper",
|
|
@@ -9,6 +9,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
14
|
var _browser = require("../../utils/browser");
|
|
14
15
|
var _codeBlock = require("./code-block");
|
|
@@ -57,7 +58,7 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
|
57
58
|
|
|
58
59
|
// 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
|
|
59
60
|
var tableSharedStyle = exports.tableSharedStyle = function tableSharedStyle() {
|
|
60
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\tth,\n\t\t\ttd {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: normal;\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\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", "\n\n\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\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\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> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t// selector lives inside @atlaskit/code\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\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}\n"])), (0, _tableCell.tableCellBackgroundStyleOverride)(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.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)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), (0, _experiments.editorExperiment)('table-nested-dnd', true) ? "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-250, 20px)") : "var(--ds-space-100, 8px)", _browser.browser.gecko || _browser.browser.ie || _browser.browser.mac && _browser.browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", "var(--ds-background-accent-gray-subtlest, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, transparent)", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, (0, _editorSharedStyles.overflowShadow)({
|
|
61
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\tth,\n\t\t\ttd {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: normal;\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\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", "\n\n\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\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\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> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t// selector lives inside @atlaskit/code\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\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}\n"])), (0, _tableCell.tableCellBackgroundStyleOverride)(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.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)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), (0, _experiments.editorExperiment)('table-nested-dnd', true) ? "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-250, 20px)") : "var(--ds-space-100, 8px)", _browser.browser.gecko || _browser.browser.ie || _browser.browser.mac && _browser.browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", (0, _platformFeatureFlags.fg)('platform_editor_nested_tables_renderer_styles') ? "// 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> tbody > tr > td {\n\t\t\t\tbackground-color: ".concat("var(--ds-surface, #FFFFFF)", ";\n\t\t\t}") : '', "var(--ds-background-accent-gray-subtlest, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, transparent)", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, (0, _editorSharedStyles.overflowShadow)({
|
|
61
62
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
62
63
|
}), "var(--ds-background-neutral, rgb(235, 237, 240))", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, rgb(226, 229, 233))", (0, _editorSharedStyles.overflowShadow)({
|
|
63
64
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "96.3.
|
|
27
|
+
var packageVersion = "96.3.2";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.calculateToolbarPositionTrackHead = exports.calculateToolbarPositionAboveSelection = void 0;
|
|
7
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
7
8
|
/*
|
|
8
9
|
Calculates the position of the floating toolbar relative to the selection.
|
|
9
10
|
This is a re-implementation which closely matches the behaviour on Confluence renderer.
|
|
@@ -127,10 +128,18 @@ var calculateToolbarPositionTrackHead = exports.calculateToolbarPositionTrackHea
|
|
|
127
128
|
top = _getCoordsBelowSelect2.top;
|
|
128
129
|
left = _getCoordsBelowSelect2.left;
|
|
129
130
|
}
|
|
131
|
+
var leftCoord = Math.max(0, left - wrapperBounds.left);
|
|
132
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_selection_toolbar_scroll_fix')) {
|
|
133
|
+
if (leftCoord + toolbarRect.width > wrapperBounds.width) {
|
|
134
|
+
var scrollbarWidth = 20;
|
|
135
|
+
leftCoord = Math.max(0, wrapperBounds.width - (toolbarRect.width + scrollbarWidth));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
130
139
|
// remap positions from browser document to wrapperBounds
|
|
131
140
|
return {
|
|
132
141
|
top: top - wrapperBounds.top + scrollWrapper.scrollTop,
|
|
133
|
-
left:
|
|
142
|
+
left: leftCoord
|
|
134
143
|
};
|
|
135
144
|
};
|
|
136
145
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "96.3.
|
|
4
|
+
const packageVersion = "96.3.2";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -63,7 +63,8 @@ const BreakoutResizer = ({
|
|
|
63
63
|
disabled,
|
|
64
64
|
getEditorWidth,
|
|
65
65
|
parentRef,
|
|
66
|
-
editorAnalyticsApi
|
|
66
|
+
editorAnalyticsApi,
|
|
67
|
+
displayGapCursor
|
|
67
68
|
}) => {
|
|
68
69
|
const [{
|
|
69
70
|
minWidth,
|
|
@@ -101,6 +102,7 @@ const BreakoutResizer = ({
|
|
|
101
102
|
dispatch,
|
|
102
103
|
state
|
|
103
104
|
} = editorView;
|
|
105
|
+
displayGapCursor(false);
|
|
104
106
|
if (widthState !== undefined && widthState.lineLength !== undefined && widthState.width !== undefined) {
|
|
105
107
|
newMinWidth = Math.min(widthState.lineLength, akEditorDefaultLayoutWidth);
|
|
106
108
|
newMaxWidth = Math.min(widthState.width - akEditorGutterPaddingDynamic() * 2 - akEditorGutterPadding, akEditorFullWidthLayoutWidth);
|
|
@@ -111,7 +113,7 @@ const BreakoutResizer = ({
|
|
|
111
113
|
maxWidth: newMaxWidth
|
|
112
114
|
});
|
|
113
115
|
dispatch(state.tr.setMeta('is-resizer-resizing', true));
|
|
114
|
-
}, [getEditorWidth, editorView]);
|
|
116
|
+
}, [getEditorWidth, editorView, displayGapCursor]);
|
|
115
117
|
const handleResizeStop = useCallback((originalState, delta) => {
|
|
116
118
|
const newWidth = originalState.width + delta.width;
|
|
117
119
|
const pos = getPos();
|
|
@@ -145,13 +147,14 @@ const BreakoutResizer = ({
|
|
|
145
147
|
editorAnalyticsApi === null || editorAnalyticsApi === void 0 ? void 0 : editorAnalyticsApi.attachAnalyticsEvent(breakoutResizePayload)(newTr);
|
|
146
148
|
}
|
|
147
149
|
newTr.setMeta('is-resizer-resizing', false).setMeta('scrollIntoView', false);
|
|
150
|
+
displayGapCursor(true);
|
|
148
151
|
dispatch(newTr);
|
|
149
152
|
setResizingState({
|
|
150
153
|
isResizing: false,
|
|
151
154
|
minWidth: undefined,
|
|
152
155
|
maxWidth: undefined
|
|
153
156
|
});
|
|
154
|
-
}, [editorView,
|
|
157
|
+
}, [getPos, editorView, displayGapCursor, editorAnalyticsApi]);
|
|
155
158
|
if (disabled) {
|
|
156
159
|
return /*#__PURE__*/React.createElement("div", {
|
|
157
160
|
"data-testid": "breakout-resizer-editor-view-wrapper",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { tableCellContentDomSelector, tableCellSelector, tableHeaderSelector, tablePrefixSelector } from '@atlaskit/adf-schema';
|
|
4
4
|
import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorSelectedNodeClassName, akEditorTableBorder, akEditorTableNumberColumnWidth, akEditorTableToolbar, akEditorWideLayoutWidth, overflowShadow } from '@atlaskit/editor-shared-styles';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
6
7
|
import { browser } from '../../utils/browser';
|
|
7
8
|
import { CodeBlockSharedCssClassName } from './code-block';
|
|
@@ -152,6 +153,11 @@ const tableSharedStyle = () => css`
|
|
|
152
153
|
margin-top: ${"var(--ds-space-150, 12px)"};
|
|
153
154
|
}
|
|
154
155
|
}
|
|
156
|
+
|
|
157
|
+
${fg('platform_editor_nested_tables_renderer_styles') ? `// Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected
|
|
158
|
+
> tbody > tr > td {
|
|
159
|
+
background-color: ${"var(--ds-surface, #FFFFFF)"};
|
|
160
|
+
}` : ''}
|
|
155
161
|
th {
|
|
156
162
|
background-color: ${`var(--ds-background-accent-gray-subtlest, ${akEditorTableToolbar})`};
|
|
157
163
|
text-align: left;
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "96.3.
|
|
16
|
+
const packageVersion = "96.3.2";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
/*
|
|
2
3
|
Calculates the position of the floating toolbar relative to the selection.
|
|
3
4
|
This is a re-implementation which closely matches the behaviour on Confluence renderer.
|
|
@@ -122,10 +123,18 @@ export const calculateToolbarPositionTrackHead = toolbarTitle => (editorView, ne
|
|
|
122
123
|
left
|
|
123
124
|
} = getCoordsBelowSelection(bottomCoords, toolbarRect));
|
|
124
125
|
}
|
|
126
|
+
let leftCoord = Math.max(0, left - wrapperBounds.left);
|
|
127
|
+
if (fg('platform_editor_selection_toolbar_scroll_fix')) {
|
|
128
|
+
if (leftCoord + toolbarRect.width > wrapperBounds.width) {
|
|
129
|
+
const scrollbarWidth = 20;
|
|
130
|
+
leftCoord = Math.max(0, wrapperBounds.width - (toolbarRect.width + scrollbarWidth));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
125
134
|
// remap positions from browser document to wrapperBounds
|
|
126
135
|
return {
|
|
127
136
|
top: top - wrapperBounds.top + scrollWrapper.scrollTop,
|
|
128
|
-
left:
|
|
137
|
+
left: leftCoord
|
|
129
138
|
};
|
|
130
139
|
};
|
|
131
140
|
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "96.3.
|
|
10
|
+
var packageVersion = "96.3.2";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -64,7 +64,8 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
64
64
|
disabled = _ref.disabled,
|
|
65
65
|
getEditorWidth = _ref.getEditorWidth,
|
|
66
66
|
parentRef = _ref.parentRef,
|
|
67
|
-
editorAnalyticsApi = _ref.editorAnalyticsApi
|
|
67
|
+
editorAnalyticsApi = _ref.editorAnalyticsApi,
|
|
68
|
+
displayGapCursor = _ref.displayGapCursor;
|
|
68
69
|
var _useState = useState({
|
|
69
70
|
minWidth: undefined,
|
|
70
71
|
maxWidth: undefined,
|
|
@@ -100,6 +101,7 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
100
101
|
var widthState = getEditorWidth();
|
|
101
102
|
var dispatch = editorView.dispatch,
|
|
102
103
|
state = editorView.state;
|
|
104
|
+
displayGapCursor(false);
|
|
103
105
|
if (widthState !== undefined && widthState.lineLength !== undefined && widthState.width !== undefined) {
|
|
104
106
|
newMinWidth = Math.min(widthState.lineLength, akEditorDefaultLayoutWidth);
|
|
105
107
|
newMaxWidth = Math.min(widthState.width - akEditorGutterPaddingDynamic() * 2 - akEditorGutterPadding, akEditorFullWidthLayoutWidth);
|
|
@@ -110,7 +112,7 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
110
112
|
maxWidth: newMaxWidth
|
|
111
113
|
});
|
|
112
114
|
dispatch(state.tr.setMeta('is-resizer-resizing', true));
|
|
113
|
-
}, [getEditorWidth, editorView]);
|
|
115
|
+
}, [getEditorWidth, editorView, displayGapCursor]);
|
|
114
116
|
var handleResizeStop = useCallback(function (originalState, delta) {
|
|
115
117
|
var newWidth = originalState.width + delta.width;
|
|
116
118
|
var pos = getPos();
|
|
@@ -140,13 +142,14 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
140
142
|
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent(breakoutResizePayload)(newTr);
|
|
141
143
|
}
|
|
142
144
|
newTr.setMeta('is-resizer-resizing', false).setMeta('scrollIntoView', false);
|
|
145
|
+
displayGapCursor(true);
|
|
143
146
|
dispatch(newTr);
|
|
144
147
|
setResizingState({
|
|
145
148
|
isResizing: false,
|
|
146
149
|
minWidth: undefined,
|
|
147
150
|
maxWidth: undefined
|
|
148
151
|
});
|
|
149
|
-
}, [editorView,
|
|
152
|
+
}, [getPos, editorView, displayGapCursor, editorAnalyticsApi]);
|
|
150
153
|
if (disabled) {
|
|
151
154
|
return /*#__PURE__*/React.createElement("div", {
|
|
152
155
|
"data-testid": "breakout-resizer-editor-view-wrapper",
|
|
@@ -4,6 +4,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
5
|
import { tableCellContentDomSelector, tableCellSelector, tableHeaderSelector, tablePrefixSelector } from '@atlaskit/adf-schema';
|
|
6
6
|
import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorSelectedNodeClassName, akEditorTableBorder, akEditorTableNumberColumnWidth, akEditorTableToolbar, akEditorWideLayoutWidth, overflowShadow } from '@atlaskit/editor-shared-styles';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
9
|
import { browser } from '../../utils/browser';
|
|
9
10
|
import { CodeBlockSharedCssClassName } from './code-block';
|
|
@@ -51,7 +52,7 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
|
51
52
|
|
|
52
53
|
// 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
|
|
53
54
|
var tableSharedStyle = function tableSharedStyle() {
|
|
54
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\tth,\n\t\t\ttd {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: normal;\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\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", "\n\n\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\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\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> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t// selector lives inside @atlaskit/code\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\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}\n"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", 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)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), editorExperiment('table-nested-dnd', true) ? "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-250, 20px)") : "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-background-accent-gray-subtlest, ".concat(akEditorTableToolbar, ")"), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", akEditorSelectedNodeClassName, "var(--ds-border, transparent)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, overflowShadow({
|
|
55
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\tth,\n\t\t\ttd {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: normal;\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\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", "\n\n\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\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\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> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t// selector lives inside @atlaskit/code\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\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}\n"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", 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)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), editorExperiment('table-nested-dnd', true) ? "var(--ds-space-100, 8px)".concat(" ", "var(--ds-space-250, 20px)") : "var(--ds-space-100, 8px)", browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", fg('platform_editor_nested_tables_renderer_styles') ? "// 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> tbody > tr > td {\n\t\t\t\tbackground-color: ".concat("var(--ds-surface, #FFFFFF)", ";\n\t\t\t}") : '', "var(--ds-background-accent-gray-subtlest, ".concat(akEditorTableToolbar, ")"), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", akEditorSelectedNodeClassName, "var(--ds-border, transparent)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, overflowShadow({
|
|
55
56
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
56
57
|
}), "var(--ds-background-neutral, rgb(235, 237, 240))", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, rgb(226, 229, 233))", overflowShadow({
|
|
57
58
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "96.3.
|
|
24
|
+
var packageVersion = "96.3.2";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
2
|
/*
|
|
2
3
|
Calculates the position of the floating toolbar relative to the selection.
|
|
3
4
|
This is a re-implementation which closely matches the behaviour on Confluence renderer.
|
|
@@ -121,10 +122,18 @@ export var calculateToolbarPositionTrackHead = function calculateToolbarPosition
|
|
|
121
122
|
top = _getCoordsBelowSelect2.top;
|
|
122
123
|
left = _getCoordsBelowSelect2.left;
|
|
123
124
|
}
|
|
125
|
+
var leftCoord = Math.max(0, left - wrapperBounds.left);
|
|
126
|
+
if (fg('platform_editor_selection_toolbar_scroll_fix')) {
|
|
127
|
+
if (leftCoord + toolbarRect.width > wrapperBounds.width) {
|
|
128
|
+
var scrollbarWidth = 20;
|
|
129
|
+
leftCoord = Math.max(0, wrapperBounds.width - (toolbarRect.width + scrollbarWidth));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
124
133
|
// remap positions from browser document to wrapperBounds
|
|
125
134
|
return {
|
|
126
135
|
top: top - wrapperBounds.top + scrollWrapper.scrollTop,
|
|
127
|
-
left:
|
|
136
|
+
left: leftCoord
|
|
128
137
|
};
|
|
129
138
|
};
|
|
130
139
|
};
|
|
@@ -13,7 +13,7 @@ export declare const ignoreResizerMutations: (mutation: MutationRecord | {
|
|
|
13
13
|
*
|
|
14
14
|
* use experiment platform_editor_advanced_layouts
|
|
15
15
|
*/
|
|
16
|
-
declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled, getEditorWidth, parentRef, editorAnalyticsApi, }: {
|
|
16
|
+
declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled, getEditorWidth, parentRef, editorAnalyticsApi, displayGapCursor, }: {
|
|
17
17
|
editorView: EditorView;
|
|
18
18
|
nodeType: BreakoutSupportedNodes;
|
|
19
19
|
getPos: getPosHandlerNode;
|
|
@@ -22,5 +22,6 @@ declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled
|
|
|
22
22
|
getEditorWidth: () => EditorContainerWidth | undefined;
|
|
23
23
|
parentRef?: HTMLElement | undefined;
|
|
24
24
|
editorAnalyticsApi?: EditorAnalyticsAPI | undefined;
|
|
25
|
+
displayGapCursor: (toggle: boolean) => boolean;
|
|
25
26
|
}) => JSX.Element;
|
|
26
27
|
export { BreakoutResizer };
|
|
@@ -13,7 +13,7 @@ export declare const ignoreResizerMutations: (mutation: MutationRecord | {
|
|
|
13
13
|
*
|
|
14
14
|
* use experiment platform_editor_advanced_layouts
|
|
15
15
|
*/
|
|
16
|
-
declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled, getEditorWidth, parentRef, editorAnalyticsApi, }: {
|
|
16
|
+
declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled, getEditorWidth, parentRef, editorAnalyticsApi, displayGapCursor, }: {
|
|
17
17
|
editorView: EditorView;
|
|
18
18
|
nodeType: BreakoutSupportedNodes;
|
|
19
19
|
getPos: getPosHandlerNode;
|
|
@@ -22,5 +22,6 @@ declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled
|
|
|
22
22
|
getEditorWidth: () => EditorContainerWidth | undefined;
|
|
23
23
|
parentRef?: HTMLElement | undefined;
|
|
24
24
|
editorAnalyticsApi?: EditorAnalyticsAPI | undefined;
|
|
25
|
+
displayGapCursor: (toggle: boolean) => boolean;
|
|
25
26
|
}) => JSX.Element;
|
|
26
27
|
export { BreakoutResizer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "96.3.
|
|
3
|
+
"version": "96.3.2",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
129
129
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
130
130
|
"@atlaskit/emoji": "^67.11.0",
|
|
131
|
-
"@atlaskit/icon": "^23.
|
|
131
|
+
"@atlaskit/icon": "^23.1.0",
|
|
132
132
|
"@atlaskit/icon-object": "^6.9.0",
|
|
133
133
|
"@atlaskit/link-datasource": "^3.13.0",
|
|
134
134
|
"@atlaskit/link-picker": "^1.47.0",
|
|
@@ -142,13 +142,13 @@
|
|
|
142
142
|
"@atlaskit/media-viewer": "49.4.4",
|
|
143
143
|
"@atlaskit/mention": "^23.4.0",
|
|
144
144
|
"@atlaskit/menu": "^2.13.0",
|
|
145
|
-
"@atlaskit/onboarding": "^12.
|
|
145
|
+
"@atlaskit/onboarding": "^12.2.0",
|
|
146
146
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
147
147
|
"@atlaskit/popper": "^6.3.0",
|
|
148
148
|
"@atlaskit/primitives": "^13.3.0",
|
|
149
149
|
"@atlaskit/profilecard": "^21.0.0",
|
|
150
150
|
"@atlaskit/section-message": "^6.8.0",
|
|
151
|
-
"@atlaskit/smart-card": "^32.
|
|
151
|
+
"@atlaskit/smart-card": "^32.6.0",
|
|
152
152
|
"@atlaskit/smart-user-picker": "^6.11.0",
|
|
153
153
|
"@atlaskit/spinner": "^16.3.0",
|
|
154
154
|
"@atlaskit/task-decision": "^17.11.0",
|
|
@@ -296,6 +296,12 @@
|
|
|
296
296
|
},
|
|
297
297
|
"platform_editor_hide_external_media_badge": {
|
|
298
298
|
"type": "boolean"
|
|
299
|
+
},
|
|
300
|
+
"platform_editor_nested_tables_renderer_styles": {
|
|
301
|
+
"type": "boolean"
|
|
302
|
+
},
|
|
303
|
+
"platform_editor_selection_toolbar_scroll_fix": {
|
|
304
|
+
"type": "boolean"
|
|
299
305
|
}
|
|
300
306
|
}
|
|
301
307
|
}
|