@atlaskit/editor-common 67.0.0 → 68.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist/cjs/styles/shared/block-marks.js +1 -1
- package/dist/cjs/styles/shared/column-layout.js +1 -1
- package/dist/cjs/styles/shared/shadow.js +3 -1
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/styles/shared/task-decision.js +1 -1
- package/dist/cjs/ui/BaseTheme/index.js +4 -21
- package/dist/cjs/ui/Expand/index.js +1 -1
- package/dist/cjs/ui/OverflowShadow/index.js +49 -11
- package/dist/cjs/ui/OverflowShadow/shadowObserver.js +107 -0
- package/dist/cjs/ui/index.js +14 -0
- package/dist/cjs/utils/breakout.js +2 -2
- package/dist/cjs/utils/unsupportedContent/get-unsupported-content-level-data.js +3 -3
- package/dist/cjs/utils/validate-using-spec.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/styles/shared/block-marks.js +3 -2
- package/dist/es2019/styles/shared/column-layout.js +1 -0
- package/dist/es2019/styles/shared/shadow.js +12 -0
- package/dist/es2019/styles/shared/table.js +5 -4
- package/dist/es2019/styles/shared/task-decision.js +3 -1
- package/dist/es2019/ui/BaseTheme/index.js +3 -21
- package/dist/es2019/ui/Expand/index.js +2 -1
- package/dist/es2019/ui/OverflowShadow/index.js +48 -12
- package/dist/es2019/ui/OverflowShadow/shadowObserver.js +82 -0
- package/dist/es2019/ui/index.js +1 -0
- package/dist/es2019/utils/breakout.js +1 -1
- package/dist/es2019/utils/unsupportedContent/get-unsupported-content-level-data.js +1 -1
- package/dist/es2019/utils/validate-using-spec.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/styles/shared/block-marks.js +1 -1
- package/dist/esm/styles/shared/column-layout.js +1 -1
- package/dist/esm/styles/shared/shadow.js +2 -1
- package/dist/esm/styles/shared/table.js +1 -1
- package/dist/esm/styles/shared/task-decision.js +1 -1
- package/dist/esm/ui/BaseTheme/index.js +4 -22
- package/dist/esm/ui/Expand/index.js +1 -1
- package/dist/esm/ui/OverflowShadow/index.js +50 -11
- package/dist/esm/ui/OverflowShadow/shadowObserver.js +98 -0
- package/dist/esm/ui/index.js +1 -0
- package/dist/esm/utils/breakout.js +2 -2
- package/dist/esm/utils/unsupportedContent/get-unsupported-content-level-data.js +1 -1
- package/dist/esm/utils/validate-using-spec.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/extensions/manifest-helpers.d.ts +1 -1
- package/dist/types/extensions/module-helpers.d.ts +1 -1
- package/dist/types/extensions/types/extension-handler.d.ts +1 -1
- package/dist/types/extensions/types/extension-manifest-toolbar-item.d.ts +1 -1
- package/dist/types/extensions/types/extension-manifest.d.ts +1 -1
- package/dist/types/extensions/types/utils.d.ts +1 -1
- package/dist/types/provider-factory/autoformatting-provider.d.ts +1 -1
- package/dist/types/ui/BaseTheme/index.d.ts +2 -4
- package/dist/types/ui/OverflowShadow/index.d.ts +10 -3
- package/dist/types/ui/OverflowShadow/shadowObserver.d.ts +27 -0
- package/dist/types/ui/index.d.ts +1 -0
- package/dist/types/utils/unsupportedContent/get-unsupported-content-level-data.d.ts +1 -1
- package/dist/types/utils/validate-using-spec.d.ts +2 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 68.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`559b6610a0e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/559b6610a0e) - Modified some CSS rules to ensure Emotion is compatible with server side rendering.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 68.0.0
|
|
11
|
+
|
|
12
|
+
### Major Changes
|
|
13
|
+
|
|
14
|
+
- [`b7b72b61dca`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b7b72b61dca) - ED-10337 Refactor overflow shadows using intersection observer to improve renderer performance on initial load and when scrolling contents of the tables and extensions horizontally.
|
|
15
|
+
This is affecting vertical shadows inside tables and extensions in renderer.
|
|
16
|
+
On the OverflowShadowOptions interface of the shadows component exported from editor-common we are also removing scrollableSelector option which is no longer used.
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- [`8949731bc6a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8949731bc6a) - ED-14608: Migrate adf-utils imports in atlassian-frontend to new child entry points to improve treeshaking
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [`789b211a5e5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/789b211a5e5) - Removed the use of :first-child and nth-child selectors in CSS
|
|
25
|
+
- [`1e5c33f7598`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1e5c33f7598) - [ux] ED-14198 fix safari selection for layout
|
|
26
|
+
- [`d8b3bc73330`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d8b3bc73330) - [ED-14507] Deprecate the allowDynamicTextSizing editor prop and remove all code related to it. This feature has been unused since 2020.
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
29
|
+
## 67.0.1
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
|
|
3
35
|
## 67.0.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
|
@@ -13,5 +13,5 @@ var _react = require("@emotion/react");
|
|
|
13
13
|
|
|
14
14
|
var _templateObject;
|
|
15
15
|
|
|
16
|
-
var blockMarksSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /**\n * We need to remove margin-top from first item\n * inside doc, tableCell, tableHeader, blockquote, etc.\n */\n *:not(.fabric-editor-block-mark) >,\n /* For nested block marks */\n *:not(.fabric-editor-block-mark) > div.fabric-editor-block-mark:first-
|
|
16
|
+
var blockMarksSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /**\n * We need to remove margin-top from first item\n * inside doc, tableCell, tableHeader, blockquote, etc.\n */\n *:not(.fabric-editor-block-mark) >,\n /* For nested block marks */\n *:not(.fabric-editor-block-mark) > div.fabric-editor-block-mark:first-of-type {\n p,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n .heading-wrapper {\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n }\n }\n"])));
|
|
17
17
|
exports.blockMarksSharedStyles = blockMarksSharedStyles;
|
|
@@ -15,5 +15,5 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var columnLayoutSharedStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n [data-layout-section] {\n display: flex;\n flex-direction: row;\n & > * {\n flex: 1;\n min-width: 0;\n }\n\n & > .unsupportedBlockView-content-wrap {\n min-width: initial;\n }\n\n @media screen and (max-width: ", "px) {\n flex-direction: column;\n }\n }\n"])), _editorSharedStyles.gridMediumMaxWidth);
|
|
18
|
+
var columnLayoutSharedStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n [data-layout-section] {\n position: relative;\n display: flex;\n flex-direction: row;\n & > * {\n flex: 1;\n min-width: 0;\n }\n\n & > .unsupportedBlockView-content-wrap {\n min-width: initial;\n }\n\n @media screen and (max-width: ", "px) {\n flex-direction: column;\n }\n }\n"])), _editorSharedStyles.gridMediumMaxWidth);
|
|
19
19
|
exports.columnLayoutSharedStyle = columnLayoutSharedStyle;
|
|
@@ -17,6 +17,8 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
17
17
|
|
|
18
18
|
var _OverflowShadow = require("../../ui/OverflowShadow");
|
|
19
19
|
|
|
20
|
+
var _shadowObserver = require("../../ui/OverflowShadow/shadowObserver");
|
|
21
|
+
|
|
20
22
|
var _templateObject;
|
|
21
23
|
|
|
22
24
|
var shadowWidth = 8;
|
|
@@ -34,5 +36,5 @@ var shadowWidth = 8;
|
|
|
34
36
|
* background-attachment: local, local, scroll, scroll;
|
|
35
37
|
*/
|
|
36
38
|
|
|
37
|
-
var shadowSharedStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &\n .", "::before,\n .", "::after,\n .", "::before,\n .", "::after {\n display: none;\n position: absolute;\n pointer-events: none;\n z-index: ", ";\n width: ", "px;\n content: '';\n /* Scrollbar is outside the content in IE, inset in other browsers. */\n height: calc(100%);\n }\n\n & .", ", .", " {\n position: relative;\n }\n\n & .", "::before {\n background: linear-gradient(to left, rgba(99, 114, 130, 0) 0, ", " 100%);\n top: 0px;\n left: 0;\n display: block;\n }\n\n & .", "::after {\n background: linear-gradient(\n to right,\n rgba(99, 114, 130, 0) 0,\n ", " 100%\n );\n left: calc(100% - ", "px);\n top: 0px;\n display: block;\n }\n"])), _OverflowShadow.shadowClassNames.RIGHT_SHADOW, _OverflowShadow.shadowClassNames.RIGHT_SHADOW, _OverflowShadow.shadowClassNames.LEFT_SHADOW, _OverflowShadow.shadowClassNames.LEFT_SHADOW, _editorSharedStyles.akEditorShadowZIndex, shadowWidth, _OverflowShadow.shadowClassNames.RIGHT_SHADOW, _OverflowShadow.shadowClassNames.LEFT_SHADOW, _OverflowShadow.shadowClassNames.LEFT_SHADOW, _colors.N40A, _OverflowShadow.shadowClassNames.RIGHT_SHADOW, _colors.N40A, shadowWidth);
|
|
39
|
+
var shadowSharedStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &\n .", "::before,\n .", "::after,\n .", "::before,\n .", "::after {\n display: none;\n position: absolute;\n pointer-events: none;\n z-index: ", ";\n width: ", "px;\n content: '';\n /* Scrollbar is outside the content in IE, inset in other browsers. */\n height: calc(100%);\n }\n\n & .", ", .", " {\n position: relative;\n }\n\n & .", "::before {\n background: linear-gradient(to left, rgba(99, 114, 130, 0) 0, ", " 100%);\n top: 0px;\n left: 0;\n display: block;\n }\n\n & .", "::after {\n background: linear-gradient(\n to right,\n rgba(99, 114, 130, 0) 0,\n ", " 100%\n );\n left: calc(100% - ", "px);\n top: 0px;\n display: block;\n }\n & .", " {\n height: 100%;\n width: 0px;\n min-width: 0px;\n }\n\n & .", " {\n height: 100%;\n width: 0px;\n min-width: 0px;\n }\n"])), _OverflowShadow.shadowClassNames.RIGHT_SHADOW, _OverflowShadow.shadowClassNames.RIGHT_SHADOW, _OverflowShadow.shadowClassNames.LEFT_SHADOW, _OverflowShadow.shadowClassNames.LEFT_SHADOW, _editorSharedStyles.akEditorShadowZIndex, shadowWidth, _OverflowShadow.shadowClassNames.RIGHT_SHADOW, _OverflowShadow.shadowClassNames.LEFT_SHADOW, _OverflowShadow.shadowClassNames.LEFT_SHADOW, _colors.N40A, _OverflowShadow.shadowClassNames.RIGHT_SHADOW, _colors.N40A, shadowWidth, _shadowObserver.shadowObserverClassNames.SENTINEL_LEFT, _shadowObserver.shadowObserverClassNames.SENTINEL_RIGHT);
|
|
38
40
|
exports.shadowSharedStyle = shadowSharedStyle;
|
|
@@ -59,7 +59,7 @@ var TableSharedCssClassName = {
|
|
|
59
59
|
exports.TableSharedCssClassName = TableSharedCssClassName;
|
|
60
60
|
|
|
61
61
|
var tableSharedStyle = function tableSharedStyle(props) {
|
|
62
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-
|
|
62
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-of-type > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n .", " > table {\n margin: ", "px 0 0 0;\n }\n\n .", " > table,\n .", " > table {\n margin: ", "px ", "px 0 0;\n }\n\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: ", ";\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > :first-child:not(style),\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-of-type + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-of-type + span + * {\n margin-top: 0;\n }\n\n th p:not(:first-of-type),\n td p:not(:first-of-type) {\n margin-top: 12px;\n }\n }\n th {\n background-color: ", ";\n text-align: left;\n\n /* only apply this styling to codeblocks in default background headercells */\n /* TODO this needs to be overhauled as it relies on unsafe selectors */\n &:not([style]) {\n .code-block {\n background-image: ", ";\n background-attachment: local, scroll, scroll;\n background-position: 100% 0, 100% 0, 0 0;\n background-color: ", ";\n\n .line-number-gutter {\n background-color: ", ";\n }\n\n /* this is only relevant to the element taken care of by renderer */\n > [data-ds--code--code-block] {\n background-image: ", "!important;\n\n background-color: ", "!important;\n\n // selector lives inside @atlaskit/code\n --ds--code--line-number-bg-color: ", ";\n }\n }\n }\n }\n }\n }\n"])), TableSharedCssClassName.TABLE_CONTAINER, tableMarginBottom, TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableMarginTop, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableMarginTop, tableMarginSides, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, (0, _components.themed)({
|
|
63
63
|
light: (0, _tokens.token)('color.border', _editorSharedStyles.akEditorTableBorder),
|
|
64
64
|
dark: (0, _tokens.token)('color.border', _editorSharedStyles.akEditorTableBorderDark)
|
|
65
65
|
})(props), (0, _tokens.token)('color.background.neutral.subtle', 'white'), tableCellMinWidth, (0, _components.themed)({
|
|
@@ -19,5 +19,5 @@ var TaskDecisionSharedCssClassName = {
|
|
|
19
19
|
DECISION_CONTAINER: 'decisionItemView-content-wrap'
|
|
20
20
|
};
|
|
21
21
|
exports.TaskDecisionSharedCssClassName = TaskDecisionSharedCssClassName;
|
|
22
|
-
var tasksAndDecisionsStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .taskItemView-content-wrap,\n .", " {\n position: relative;\n min-width: ", "px;\n }\n\n .", " {\n margin-top: 0;\n }\n }\n\n div[data-task-list-local-id] {\n margin: 12px 0 0 0;\n }\n\n div[data-task-list-local-id]:first-child {\n margin-top: 0;\n }\n\n div[data-task-list-local-id] div[data-task-list-local-id] {\n margin-top: 0px;\n margin-left: 24px;\n }\n"])), TaskDecisionSharedCssClassName.DECISION_CONTAINER, _editorSharedStyles.akEditorTableCellMinWidth, TaskDecisionSharedCssClassName.DECISION_CONTAINER);
|
|
22
|
+
var tasksAndDecisionsStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .taskItemView-content-wrap,\n .", " {\n position: relative;\n min-width: ", "px;\n }\n\n .", " {\n margin-top: 0;\n }\n }\n\n div[data-task-list-local-id] {\n margin: 12px 0 0 0;\n }\n\n // If task list is first in the document then set margin top to zero.\n div[data-task-list-local-id]:first-child,\n style:first-child + div[data-task-list-local-id] {\n margin-top: 0;\n }\n\n div[data-task-list-local-id] div[data-task-list-local-id] {\n margin-top: 0px;\n margin-left: 24px;\n }\n"])), TaskDecisionSharedCssClassName.DECISION_CONTAINER, _editorSharedStyles.akEditorTableCellMinWidth, TaskDecisionSharedCssClassName.DECISION_CONTAINER);
|
|
23
23
|
exports.tasksAndDecisionsStyles = tasksAndDecisionsStyles;
|
|
@@ -29,19 +29,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
29
29
|
|
|
30
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
31
|
|
|
32
|
-
function mapBreakpointToFontSize(breakpoint) {
|
|
33
|
-
switch (breakpoint) {
|
|
34
|
-
case 'M':
|
|
35
|
-
return (0, _constants.fontSize)() + 2;
|
|
36
|
-
|
|
37
|
-
case 'L':
|
|
38
|
-
return (0, _constants.fontSize)() + 4;
|
|
39
|
-
|
|
40
|
-
default:
|
|
41
|
-
return (0, _constants.fontSize)();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
32
|
function mapBreakpointToLayoutMaxWidth(breakpoint) {
|
|
46
33
|
switch (breakpoint) {
|
|
47
34
|
case 'M':
|
|
@@ -56,9 +43,7 @@ function mapBreakpointToLayoutMaxWidth(breakpoint) {
|
|
|
56
43
|
}
|
|
57
44
|
|
|
58
45
|
function BaseThemeWrapper(_ref) {
|
|
59
|
-
var
|
|
60
|
-
dynamicTextSizing = _ref.dynamicTextSizing,
|
|
61
|
-
baseFontSize = _ref.baseFontSize,
|
|
46
|
+
var baseFontSize = _ref.baseFontSize,
|
|
62
47
|
children = _ref.children;
|
|
63
48
|
|
|
64
49
|
var _useGlobalTheme = (0, _components.useGlobalTheme)(),
|
|
@@ -66,12 +51,12 @@ function BaseThemeWrapper(_ref) {
|
|
|
66
51
|
|
|
67
52
|
var memoizedTheme = (0, _react.useMemo)(function () {
|
|
68
53
|
return (0, _defineProperty2.default)({
|
|
69
|
-
baseFontSize:
|
|
70
|
-
layoutMaxWidth:
|
|
54
|
+
baseFontSize: baseFontSize || (0, _constants.fontSize)(),
|
|
55
|
+
layoutMaxWidth: _editorSharedStyles.akEditorDefaultLayoutWidth
|
|
71
56
|
}, _constants.CHANNEL, {
|
|
72
57
|
mode: mode
|
|
73
58
|
});
|
|
74
|
-
}, [
|
|
59
|
+
}, [baseFontSize, mode]);
|
|
75
60
|
return /*#__PURE__*/_react.default.createElement(_react2.ThemeProvider, {
|
|
76
61
|
theme: memoizedTheme
|
|
77
62
|
}, children);
|
|
@@ -79,12 +64,10 @@ function BaseThemeWrapper(_ref) {
|
|
|
79
64
|
|
|
80
65
|
function BaseTheme(_ref3) {
|
|
81
66
|
var children = _ref3.children,
|
|
82
|
-
dynamicTextSizing = _ref3.dynamicTextSizing,
|
|
83
67
|
baseFontSize = _ref3.baseFontSize;
|
|
84
68
|
return /*#__PURE__*/_react.default.createElement(_WidthProvider.WidthConsumer, null, function (_ref4) {
|
|
85
69
|
var breakpoint = _ref4.breakpoint;
|
|
86
70
|
return /*#__PURE__*/_react.default.createElement(BaseThemeWrapper, {
|
|
87
|
-
dynamicTextSizing: dynamicTextSizing,
|
|
88
71
|
breakpoint: breakpoint,
|
|
89
72
|
baseFontSize: baseFontSize
|
|
90
73
|
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, children));
|
|
@@ -118,7 +118,7 @@ var containerStyles = function containerStyles(styleProps) {
|
|
|
118
118
|
var marginHorizontal = styleProps['data-node-type'] === 'expand' ? "-".concat(_editorSharedStyles.akLayoutGutterOffset, "px") : 0;
|
|
119
119
|
var margin = "".concat(marginTop, " ").concat(marginHorizontal, " ").concat(marginBottom);
|
|
120
120
|
return function (themeProps) {
|
|
121
|
-
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: ", "px;\n min-height: 25px;\n background: ", ";\n margin: ", ";\n\n transition: background 0.3s ", ",\n border-color 0.3s ", ";\n padding: ", "px;\n\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4152\n &:hover {\n border: 1px solid\n ", ";\n background: ", ";\n }\n\n td >
|
|
121
|
+
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: ", "px;\n min-height: 25px;\n background: ", ";\n margin: ", ";\n\n transition: background 0.3s ", ",\n border-color 0.3s ", ";\n padding: ", "px;\n\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4152\n &:hover {\n border: 1px solid\n ", ";\n background: ", ";\n }\n\n td > :not(style):first-child,\n td > style:first-child + * {\n margin-top: 0;\n }\n "])), focused ? EXPAND_FOCUSED_BORDER_COLOR : expanded ? EXPAND_EXPANDED_BORDER_COLOR(themeProps) : EXPAND_COLLAPSED_BORDER_COLOR, BORDER_RADIUS, !expanded ? EXPAND_COLLAPSED_BACKGROUND : EXPAND_SELECTED_BACKGROUND(themeProps), margin, _editorSharedStyles.akEditorSwoopCubicBezier, _editorSharedStyles.akEditorSwoopCubicBezier, (0, _constants.gridSize)(), (0, _components.themed)({
|
|
122
122
|
light: (0, _tokens.token)('color.border', colors.N50A),
|
|
123
123
|
dark: (0, _tokens.token)('color.border', colors.DN50)
|
|
124
124
|
})(themeProps), EXPAND_SELECTED_BACKGROUND(themeProps));
|
|
@@ -26,7 +26,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
26
26
|
|
|
27
27
|
var _react = _interopRequireDefault(require("react"));
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var _shadowObserver = require("./shadowObserver");
|
|
30
30
|
|
|
31
31
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
32
32
|
|
|
@@ -37,7 +37,6 @@ var shadowClassNames = {
|
|
|
37
37
|
LEFT_SHADOW: 'left-shadow'
|
|
38
38
|
};
|
|
39
39
|
exports.shadowClassNames = shadowClassNames;
|
|
40
|
-
var isIE11 = _browser.default.ie_version === 11;
|
|
41
40
|
|
|
42
41
|
function overflowShadow(Component, options) {
|
|
43
42
|
return /*#__PURE__*/function (_React$Component) {
|
|
@@ -55,18 +54,23 @@ function overflowShadow(Component, options) {
|
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
57
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "overflowContainerWidth", 0);
|
|
58
58
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
59
59
|
showLeftShadow: false,
|
|
60
60
|
showRightShadow: false
|
|
61
61
|
});
|
|
62
62
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleScroll", function (event) {
|
|
63
|
-
if (!_this.overflowContainer || event.target !== _this.overflowContainer) {
|
|
63
|
+
if (!_this.overflowContainer || event.target !== _this.overflowContainer || options.useShadowObserver) {
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
_this.updateShadows();
|
|
68
68
|
});
|
|
69
69
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "updateShadows", function () {
|
|
70
|
+
if (options.useShadowObserver) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
70
74
|
_this.setState(function (prevState) {
|
|
71
75
|
if (!_this.overflowContainer) {
|
|
72
76
|
return;
|
|
@@ -129,15 +133,15 @@ function overflowShadow(Component, options) {
|
|
|
129
133
|
_this.overflowContainer = container;
|
|
130
134
|
}
|
|
131
135
|
|
|
132
|
-
if (options.
|
|
133
|
-
_this.
|
|
136
|
+
if (options.useShadowObserver) {
|
|
137
|
+
_this.initShadowObserver();
|
|
138
|
+
|
|
139
|
+
return;
|
|
134
140
|
}
|
|
135
141
|
|
|
136
142
|
_this.updateShadows();
|
|
137
143
|
|
|
138
|
-
|
|
139
|
-
_this.overflowContainer.addEventListener('scroll', _this.handleScroll);
|
|
140
|
-
}
|
|
144
|
+
_this.overflowContainer.addEventListener('scroll', _this.handleScroll);
|
|
141
145
|
});
|
|
142
146
|
return _this;
|
|
143
147
|
}
|
|
@@ -145,7 +149,11 @@ function overflowShadow(Component, options) {
|
|
|
145
149
|
(0, _createClass2.default)(OverflowShadow, [{
|
|
146
150
|
key: "componentWillUnmount",
|
|
147
151
|
value: function componentWillUnmount() {
|
|
148
|
-
if (
|
|
152
|
+
if (options.useShadowObserver) {
|
|
153
|
+
return this.shadowObserver && this.shadowObserver.dispose();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (this.overflowContainer) {
|
|
149
157
|
this.overflowContainer.removeEventListener('scroll', this.handleScroll);
|
|
150
158
|
}
|
|
151
159
|
|
|
@@ -154,7 +162,37 @@ function overflowShadow(Component, options) {
|
|
|
154
162
|
}, {
|
|
155
163
|
key: "componentDidUpdate",
|
|
156
164
|
value: function componentDidUpdate() {
|
|
157
|
-
|
|
165
|
+
if (!options.useShadowObserver) {
|
|
166
|
+
this.updateShadows();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}, {
|
|
170
|
+
key: "initShadowObserver",
|
|
171
|
+
value: function initShadowObserver() {
|
|
172
|
+
var _this2 = this;
|
|
173
|
+
|
|
174
|
+
if (this.shadowObserver || !this.overflowContainer) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
this.shadowObserver = new _shadowObserver.ShadowObserver({
|
|
179
|
+
scrollContainer: this.overflowContainer,
|
|
180
|
+
onUpdateShadows: function onUpdateShadows(shadowStates) {
|
|
181
|
+
_this2.setState(function (prevState) {
|
|
182
|
+
var showLeftShadow = shadowStates.showLeftShadow,
|
|
183
|
+
showRightShadow = shadowStates.showRightShadow;
|
|
184
|
+
|
|
185
|
+
if (showLeftShadow !== prevState.showLeftShadow || showRightShadow !== prevState.showRightShadow) {
|
|
186
|
+
return {
|
|
187
|
+
showLeftShadow: showLeftShadow,
|
|
188
|
+
showRightShadow: showRightShadow
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return null;
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
});
|
|
158
196
|
}
|
|
159
197
|
}, {
|
|
160
198
|
key: "render",
|
|
@@ -162,7 +200,7 @@ function overflowShadow(Component, options) {
|
|
|
162
200
|
var _this$state = this.state,
|
|
163
201
|
showLeftShadow = _this$state.showLeftShadow,
|
|
164
202
|
showRightShadow = _this$state.showRightShadow;
|
|
165
|
-
var classNames = [showRightShadow && shadowClassNames.RIGHT_SHADOW, showLeftShadow && shadowClassNames.LEFT_SHADOW].filter(Boolean).join(' ');
|
|
203
|
+
var classNames = [showRightShadow && shadowClassNames.RIGHT_SHADOW, showLeftShadow && shadowClassNames.LEFT_SHADOW, options.useShadowObserver && _shadowObserver.shadowObserverClassNames.SHADOW_CONTAINER].filter(Boolean).join(' ');
|
|
166
204
|
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({
|
|
167
205
|
handleRef: this.handleContainer,
|
|
168
206
|
shadowClassNames: classNames
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.shadowObserverClassNames = exports.ShadowObserver = exports.ShadowKeys = void 0;
|
|
9
|
+
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
|
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
+
|
|
14
|
+
var _defineProperty3 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
+
|
|
16
|
+
var ShadowKeys;
|
|
17
|
+
exports.ShadowKeys = ShadowKeys;
|
|
18
|
+
|
|
19
|
+
(function (ShadowKeys) {
|
|
20
|
+
ShadowKeys["SHOW_LEFT_SHADOW"] = "showLeftShadow";
|
|
21
|
+
ShadowKeys["SHOW_RIGHT_SHADOW"] = "showRightShadow";
|
|
22
|
+
})(ShadowKeys || (exports.ShadowKeys = ShadowKeys = {}));
|
|
23
|
+
|
|
24
|
+
var shadowObserverClassNames = {
|
|
25
|
+
SENTINEL_LEFT: 'sentinel-left',
|
|
26
|
+
SENTINEL_RIGHT: 'sentinel-right',
|
|
27
|
+
SHADOW_CONTAINER: 'with-shadow-observer'
|
|
28
|
+
};
|
|
29
|
+
exports.shadowObserverClassNames = shadowObserverClassNames;
|
|
30
|
+
|
|
31
|
+
var requestIdleCallback = function requestIdleCallback(fn) {
|
|
32
|
+
return window.requestIdleCallback ? window.requestIdleCallback(fn) : window.requestAnimationFrame(fn);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var cancelIdleCallback = function cancelIdleCallback(id) {
|
|
36
|
+
return window.cancelIdleCallback ? window.cancelIdleCallback(id) : window.cancelAnimationFrame(id);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var ShadowObserver = /*#__PURE__*/function () {
|
|
40
|
+
function ShadowObserver(_ref) {
|
|
41
|
+
var _defineProperty2,
|
|
42
|
+
_this = this;
|
|
43
|
+
|
|
44
|
+
var scrollContainer = _ref.scrollContainer,
|
|
45
|
+
onUpdateShadows = _ref.onUpdateShadows;
|
|
46
|
+
(0, _classCallCheck2.default)(this, ShadowObserver);
|
|
47
|
+
(0, _defineProperty3.default)(this, "sentinels", {});
|
|
48
|
+
(0, _defineProperty3.default)(this, "shadowStates", (_defineProperty2 = {}, (0, _defineProperty3.default)(_defineProperty2, ShadowKeys.SHOW_LEFT_SHADOW, false), (0, _defineProperty3.default)(_defineProperty2, ShadowKeys.SHOW_RIGHT_SHADOW, false), _defineProperty2));
|
|
49
|
+
(0, _defineProperty3.default)(this, "init", function () {
|
|
50
|
+
if (!_this.scrollContainer || _this.intersectionObserver) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
_this.sentinels.right = document.createElement('div');
|
|
55
|
+
|
|
56
|
+
_this.sentinels.right.classList.add(shadowObserverClassNames.SENTINEL_RIGHT);
|
|
57
|
+
|
|
58
|
+
_this.scrollContainer.appendChild(_this.sentinels.right);
|
|
59
|
+
|
|
60
|
+
_this.sentinels.left = document.createElement('div');
|
|
61
|
+
|
|
62
|
+
_this.sentinels.left.classList.add(shadowObserverClassNames.SENTINEL_LEFT);
|
|
63
|
+
|
|
64
|
+
_this.scrollContainer.prepend(_this.sentinels.left);
|
|
65
|
+
|
|
66
|
+
_this.intersectionObserver = new IntersectionObserver(function (entries, _) {
|
|
67
|
+
entries.forEach(_this.onIntersect);
|
|
68
|
+
}, {
|
|
69
|
+
root: _this.scrollContainer
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
_this.intersectionObserver.observe(_this.sentinels.left);
|
|
73
|
+
|
|
74
|
+
_this.intersectionObserver.observe(_this.sentinels.right);
|
|
75
|
+
});
|
|
76
|
+
(0, _defineProperty3.default)(this, "onIntersect", function (entry) {
|
|
77
|
+
_this.requestCallbackId = requestIdleCallback(function () {
|
|
78
|
+
if (entry.target.classList.contains(shadowObserverClassNames.SENTINEL_LEFT)) {
|
|
79
|
+
_this.shadowStates[ShadowKeys.SHOW_LEFT_SHADOW] = !entry.isIntersecting;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (entry.target.classList.contains(shadowObserverClassNames.SENTINEL_RIGHT)) {
|
|
83
|
+
_this.shadowStates[ShadowKeys.SHOW_RIGHT_SHADOW] = !entry.isIntersecting;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
_this.onUpdateShadows(_this.shadowStates);
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
this.scrollContainer = scrollContainer;
|
|
90
|
+
this.onUpdateShadows = onUpdateShadows;
|
|
91
|
+
this.init();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
(0, _createClass2.default)(ShadowObserver, [{
|
|
95
|
+
key: "dispose",
|
|
96
|
+
value: function dispose() {
|
|
97
|
+
if (this.intersectionObserver) {
|
|
98
|
+
this.intersectionObserver.disconnect();
|
|
99
|
+
this.intersectionObserver = undefined;
|
|
100
|
+
this.requestCallbackId && cancelIdleCallback(this.requestCallbackId);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}]);
|
|
104
|
+
return ShadowObserver;
|
|
105
|
+
}();
|
|
106
|
+
|
|
107
|
+
exports.ShadowObserver = ShadowObserver;
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -85,6 +85,12 @@ Object.defineProperty(exports, "REACT_INTL_ERROR_MESSAGE", {
|
|
|
85
85
|
return _IntlErrorBoundary.REACT_INTL_ERROR_MESSAGE;
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
|
+
Object.defineProperty(exports, "ShadowObserver", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function get() {
|
|
91
|
+
return _shadowObserver.ShadowObserver;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
88
94
|
Object.defineProperty(exports, "UnsupportedBlock", {
|
|
89
95
|
enumerable: true,
|
|
90
96
|
get: function get() {
|
|
@@ -205,6 +211,12 @@ Object.defineProperty(exports, "shadowClassNames", {
|
|
|
205
211
|
return _OverflowShadow.shadowClassNames;
|
|
206
212
|
}
|
|
207
213
|
});
|
|
214
|
+
Object.defineProperty(exports, "shadowObserverClassNames", {
|
|
215
|
+
enumerable: true,
|
|
216
|
+
get: function get() {
|
|
217
|
+
return _shadowObserver.shadowObserverClassNames;
|
|
218
|
+
}
|
|
219
|
+
});
|
|
208
220
|
Object.defineProperty(exports, "sharedExpandStyles", {
|
|
209
221
|
enumerable: true,
|
|
210
222
|
get: function get() {
|
|
@@ -260,6 +272,8 @@ var _WidthProvider = require("./WidthProvider");
|
|
|
260
272
|
|
|
261
273
|
var _OverflowShadow = _interopRequireWildcard(require("./OverflowShadow"));
|
|
262
274
|
|
|
275
|
+
var _shadowObserver = require("./OverflowShadow/shadowObserver");
|
|
276
|
+
|
|
263
277
|
var _WithCreateAnalyticsEvent = require("./WithCreateAnalyticsEvent");
|
|
264
278
|
|
|
265
279
|
var _Expand = require("./Expand");
|
|
@@ -38,8 +38,8 @@ var breakoutConsts = {
|
|
|
38
38
|
return '100%';
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
|
-
calcLineLength: function calcLineLength(
|
|
42
|
-
return
|
|
41
|
+
calcLineLength: function calcLineLength() {
|
|
42
|
+
return breakoutConsts.defaultLayoutWidth;
|
|
43
43
|
},
|
|
44
44
|
calcWideWidth: function calcWideWidth() {
|
|
45
45
|
var containerWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : breakoutConsts.defaultLayoutWidth;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getUnsupportedContentLevelData = exports.UNSUPPORTED_CONTENT_LEVEL_SEVERITY_THRESHOLD_DEFAULTS = exports.UNSUPPORTED_CONTENT_LEVEL_SEVERITY = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _traverse = require("@atlaskit/adf-utils/traverse");
|
|
9
9
|
|
|
10
10
|
var UNSUPPORTED_CONTENT_LEVEL_SEVERITY;
|
|
11
11
|
exports.UNSUPPORTED_CONTENT_LEVEL_SEVERITY = UNSUPPORTED_CONTENT_LEVEL_SEVERITY;
|
|
@@ -32,7 +32,7 @@ var buildUnsupportedContentLevelThresholds = function buildUnsupportedContentLev
|
|
|
32
32
|
var countSupportedUnsupportedNodes = function countSupportedUnsupportedNodes(validDocument) {
|
|
33
33
|
var unsupportedNodes = 0;
|
|
34
34
|
var supportedNodes = 0;
|
|
35
|
-
(0,
|
|
35
|
+
(0, _traverse.traverse)(validDocument, {
|
|
36
36
|
any: function any(node) {
|
|
37
37
|
var unsupportedNodeTypes = ['unsupportedInline', 'unsupportedBlock', 'confluenceUnsupportedInline', 'confluenceUnsupportedBlock'];
|
|
38
38
|
|
|
@@ -45,7 +45,7 @@ var countSupportedUnsupportedNodes = function countSupportedUnsupportedNodes(val
|
|
|
45
45
|
// start an independent traversal for the purpose of counting
|
|
46
46
|
// unsupported content nodes (with nested children contributing towards
|
|
47
47
|
// that count)
|
|
48
|
-
(0,
|
|
48
|
+
(0, _traverse.traverse)(originalNode, {
|
|
49
49
|
any: function any() {
|
|
50
50
|
unsupportedNodes++;
|
|
51
51
|
}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.validationErrorHandler = exports.validateADFEntity = exports.UNSUPPORTED_NODE_ATTRIBUTE = void 0;
|
|
7
7
|
exports.wrapWithUnsupported = wrapWithUnsupported;
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _validator = require("@atlaskit/adf-utils/validator");
|
|
10
10
|
|
|
11
11
|
var _analytics = require("./analytics");
|
|
12
12
|
|
|
@@ -126,7 +126,7 @@ function trackValidationError(dispatchAnalyticsEvent, error, entity) {
|
|
|
126
126
|
var validateADFEntity = function validateADFEntity(schema, node, dispatchAnalyticsEvent) {
|
|
127
127
|
var nodes = Object.keys(schema.nodes);
|
|
128
128
|
var marks = Object.keys(schema.marks);
|
|
129
|
-
var validate = (0,
|
|
129
|
+
var validate = (0, _validator.validator)(nodes, marks, {
|
|
130
130
|
allowPrivateAttributes: true
|
|
131
131
|
});
|
|
132
132
|
var emptyDoc = {
|
package/dist/cjs/version.json
CHANGED
|
@@ -6,7 +6,7 @@ export const blockMarksSharedStyles = css`
|
|
|
6
6
|
*/
|
|
7
7
|
*:not(.fabric-editor-block-mark) >,
|
|
8
8
|
/* For nested block marks */
|
|
9
|
-
*:not(.fabric-editor-block-mark) > div.fabric-editor-block-mark:first-
|
|
9
|
+
*:not(.fabric-editor-block-mark) > div.fabric-editor-block-mark:first-of-type {
|
|
10
10
|
p,
|
|
11
11
|
h1,
|
|
12
12
|
h2,
|
|
@@ -15,7 +15,8 @@ export const blockMarksSharedStyles = css`
|
|
|
15
15
|
h5,
|
|
16
16
|
h6,
|
|
17
17
|
.heading-wrapper {
|
|
18
|
-
|
|
18
|
+
:first-child:not(style),
|
|
19
|
+
style:first-child + * {
|
|
19
20
|
margin-top: 0;
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -4,6 +4,7 @@ import { css } from '@emotion/react';
|
|
|
4
4
|
import { akEditorShadowZIndex } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import { N40A } from '@atlaskit/theme/colors';
|
|
6
6
|
import { shadowClassNames } from '../../ui/OverflowShadow';
|
|
7
|
+
import { shadowObserverClassNames } from '../../ui/OverflowShadow/shadowObserver';
|
|
7
8
|
const shadowWidth = 8;
|
|
8
9
|
/**
|
|
9
10
|
* TODO: This is close to working and removes a tone of JS from OverflowShadow component
|
|
@@ -56,5 +57,16 @@ const shadowSharedStyle = css`
|
|
|
56
57
|
top: 0px;
|
|
57
58
|
display: block;
|
|
58
59
|
}
|
|
60
|
+
& .${shadowObserverClassNames.SENTINEL_LEFT} {
|
|
61
|
+
height: 100%;
|
|
62
|
+
width: 0px;
|
|
63
|
+
min-width: 0px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
& .${shadowObserverClassNames.SENTINEL_RIGHT} {
|
|
67
|
+
height: 100%;
|
|
68
|
+
width: 0px;
|
|
69
|
+
min-width: 0px;
|
|
70
|
+
}
|
|
59
71
|
`;
|
|
60
72
|
export { shadowSharedStyle };
|
|
@@ -40,7 +40,7 @@ const tableSharedStyle = props => css`
|
|
|
40
40
|
/**
|
|
41
41
|
* Fix block top alignment inside table cells.
|
|
42
42
|
*/
|
|
43
|
-
.decisionItemView-content-wrap:first-
|
|
43
|
+
.decisionItemView-content-wrap:first-of-type > div {
|
|
44
44
|
margin-top: 0;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -109,15 +109,16 @@ const tableSharedStyle = props => css`
|
|
|
109
109
|
dark: getTableCellBackgroundDarkModeColors
|
|
110
110
|
})(props)};
|
|
111
111
|
|
|
112
|
-
>
|
|
112
|
+
> :first-child:not(style),
|
|
113
|
+
> style:first-child + * {
|
|
113
114
|
margin-top: 0;
|
|
114
115
|
}
|
|
115
116
|
|
|
116
|
-
> .ProseMirror-gapcursor.-right:first-
|
|
117
|
+
> .ProseMirror-gapcursor.-right:first-of-type + * {
|
|
117
118
|
margin-top: 0;
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
> .ProseMirror-gapcursor:first-
|
|
121
|
+
> .ProseMirror-gapcursor:first-of-type + span + * {
|
|
121
122
|
margin-top: 0;
|
|
122
123
|
}
|
|
123
124
|
|
|
@@ -20,7 +20,9 @@ export const tasksAndDecisionsStyles = css`
|
|
|
20
20
|
margin: 12px 0 0 0;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
// If task list is first in the document then set margin top to zero.
|
|
24
|
+
div[data-task-list-local-id]:first-child,
|
|
25
|
+
style:first-child + div[data-task-list-local-id] {
|
|
24
26
|
margin-top: 0;
|
|
25
27
|
}
|
|
26
28
|
|