@atlaskit/editor-common 68.0.0 → 69.0.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 +35 -0
- package/codemods/69.0.0-update-validator-imports.ts +7 -0
- package/codemods/migrates/entry-points.ts +37 -0
- package/dist/cjs/extensions/manifest-helpers.js +2 -2
- package/dist/cjs/styles/index.js +15 -1
- package/dist/cjs/styles/shared/block-marks.js +1 -1
- package/dist/cjs/styles/shared/code-block.js +58 -0
- package/dist/cjs/styles/shared/emoji.js +2 -1
- package/dist/cjs/styles/shared/panel.js +2 -1
- package/dist/cjs/styles/shared/table.js +1 -1
- package/dist/cjs/styles/shared/task-decision.js +1 -1
- package/dist/cjs/ui/Expand/index.js +1 -1
- package/dist/cjs/ui/Popup/index.js +38 -1
- package/dist/cjs/ui/clear-next-sibling-margin-top.js +11 -4
- package/dist/cjs/ui/index.js +6 -0
- package/dist/cjs/utils/index.js +0 -56
- package/dist/cjs/validator.js +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/styles/index.js +2 -1
- package/dist/es2019/styles/shared/block-marks.js +2 -1
- package/dist/es2019/styles/shared/code-block.js +94 -0
- package/dist/es2019/styles/shared/emoji.js +3 -2
- package/dist/es2019/styles/shared/panel.js +2 -1
- package/dist/es2019/styles/shared/table.js +2 -1
- package/dist/es2019/styles/shared/task-decision.js +2 -1
- package/dist/es2019/ui/Expand/index.js +2 -1
- package/dist/es2019/ui/Popup/index.js +24 -1
- package/dist/es2019/ui/clear-next-sibling-margin-top.js +9 -1
- package/dist/es2019/ui/index.js +1 -1
- package/dist/es2019/utils/index.js +0 -1
- package/dist/es2019/validator.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/extensions/default-extension-provider.js +1 -1
- package/dist/esm/extensions/extension-fields-helpers.js +1 -1
- package/dist/esm/extensions/extension-handlers.js +1 -1
- package/dist/esm/extensions/manifest-helpers.js +1 -1
- package/dist/esm/extensions/module-helpers.js +1 -1
- package/dist/esm/provider-helpers/combine-providers.js +1 -1
- package/dist/esm/styles/index.js +2 -1
- package/dist/esm/styles/shared/block-marks.js +1 -1
- package/dist/esm/styles/shared/code-block.js +39 -0
- package/dist/esm/styles/shared/emoji.js +3 -2
- package/dist/esm/styles/shared/panel.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/Expand/index.js +1 -1
- package/dist/esm/ui/Popup/index.js +40 -1
- package/dist/esm/ui/clear-next-sibling-margin-top.js +8 -2
- package/dist/esm/ui/index.js +1 -1
- package/dist/esm/utils/index.js +0 -1
- package/dist/esm/validator.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/provider-factory/card-provider.d.ts +1 -1
- package/dist/types/styles/index.d.ts +1 -0
- package/dist/types/styles/shared/code-block.d.ts +8 -0
- package/dist/types/styles/shared/emoji.d.ts +1 -0
- package/dist/types/styles/shared/panel.d.ts +1 -0
- package/dist/types/ui/Popup/index.d.ts +4 -0
- package/dist/types/ui/clear-next-sibling-margin-top.d.ts +1 -0
- package/dist/types/ui/index.d.ts +1 -1
- package/dist/types/utils/index.d.ts +0 -2
- package/dist/types/validator.d.ts +1 -1
- package/package.json +13 -12
- package/report.api.md +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 69.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`04589993d81`](https://bitbucket.org/atlassian/atlassian-frontend/commits/04589993d81) - ED-15148: moved duplicate entrypoints from @atlaskit/editor-common/utils to @atlaskit/editor-common/validator
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- [`8ff3031db06`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8ff3031db06) - Introduce new optional argument to CardProvider.resolve
|
|
12
|
+
- [`07c8b0b4504`](https://bitbucket.org/atlassian/atlassian-frontend/commits/07c8b0b4504) - [ux] ED-15102 adds a copy button to nodes with floating toolbars
|
|
13
|
+
- [`2d979ce9877`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2d979ce9877) - [ux] ED-14945: Add windowed codeblock support in renderer (This feature sits behind a flag in the featureFlags prop 'allow-windowed-code-block')
|
|
14
|
+
- [`04746af08f6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/04746af08f6) - [ux] ED-15097 added floating toolbar copy button to table
|
|
15
|
+
- [`e4dba654a71`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e4dba654a71) - [ux] ED-15233: Fix breakout button positioning for breakout supported nodes in scenarios where editor disabled props changes while Editor is visually hidden and redisplayed.
|
|
16
|
+
Fixed by skipping breakout width update work when the editorView dom element is width 0 (hidden) and deferring LayoutButton position updates to second animation frame (on window
|
|
17
|
+
and editor resizes).
|
|
18
|
+
- [`11f56527739`](https://bitbucket.org/atlassian/atlassian-frontend/commits/11f56527739) - Export emoji placeholder class name
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [`153b80fdcda`](https://bitbucket.org/atlassian/atlassian-frontend/commits/153b80fdcda) - [ux] ED-15111: Fix aligned text and headings margin-top values in layouts in Renderer (by clearing them)
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
25
|
+
## 68.0.2
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies
|
|
30
|
+
|
|
31
|
+
## 68.0.1
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- [`559b6610a0e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/559b6610a0e) - Modified some CSS rules to ensure Emotion is compatible with server side rendering.
|
|
36
|
+
- Updated dependencies
|
|
37
|
+
|
|
3
38
|
## 68.0.0
|
|
4
39
|
|
|
5
40
|
### Major Changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { changeImportEntryPoint } from '@atlaskit/codemod-utils';
|
|
2
|
+
|
|
3
|
+
const PACKAGE_NAME = '@atlaskit/editor-common';
|
|
4
|
+
|
|
5
|
+
export const validatorExports = [
|
|
6
|
+
'getMarksByOrder',
|
|
7
|
+
'getValidContent',
|
|
8
|
+
'getValidDocument',
|
|
9
|
+
'getValidMark',
|
|
10
|
+
'getValidNode',
|
|
11
|
+
'getValidUnknownNode',
|
|
12
|
+
'isSameMark',
|
|
13
|
+
'isSubSupType',
|
|
14
|
+
'markOrder',
|
|
15
|
+
'ADFStages',
|
|
16
|
+
].map((name) =>
|
|
17
|
+
changeImportEntryPoint(
|
|
18
|
+
`${PACKAGE_NAME}/utils`,
|
|
19
|
+
name,
|
|
20
|
+
`${PACKAGE_NAME}/validator`,
|
|
21
|
+
),
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export const validatorTypes = [
|
|
25
|
+
'ADDoc',
|
|
26
|
+
'ADFStage',
|
|
27
|
+
'ADMark',
|
|
28
|
+
'ADMarkSimple',
|
|
29
|
+
'ADNode',
|
|
30
|
+
].map((name) =>
|
|
31
|
+
changeImportEntryPoint(
|
|
32
|
+
`${PACKAGE_NAME}/utils`,
|
|
33
|
+
name,
|
|
34
|
+
`${PACKAGE_NAME}/validator`,
|
|
35
|
+
true,
|
|
36
|
+
),
|
|
37
|
+
);
|
|
@@ -11,10 +11,10 @@ exports.buildExtensionKeyAndNodeKey = void 0;
|
|
|
11
11
|
exports.buildNode = buildNode;
|
|
12
12
|
exports.resolveImport = exports.getExtensionKeyAndNodeKey = void 0;
|
|
13
13
|
|
|
14
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
|
|
16
14
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
17
15
|
|
|
16
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
+
|
|
18
18
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
19
19
|
|
|
20
20
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
package/dist/cjs/styles/index.js
CHANGED
|
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "AnnotationSharedClassNames", {
|
|
|
15
15
|
return _annotation.AnnotationSharedClassNames;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "CodeBlockSharedCssClassName", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _codeBlock.CodeBlockSharedCssClassName;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
Object.defineProperty(exports, "DateSharedCssClassName", {
|
|
19
25
|
enumerable: true,
|
|
20
26
|
get: function get() {
|
|
@@ -69,6 +75,12 @@ Object.defineProperty(exports, "calcTableWidth", {
|
|
|
69
75
|
return _table.calcTableWidth;
|
|
70
76
|
}
|
|
71
77
|
});
|
|
78
|
+
Object.defineProperty(exports, "codeBlockSharedStyles", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function get() {
|
|
81
|
+
return _codeBlock.codeBlockSharedStyles;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
72
84
|
Object.defineProperty(exports, "codeMarkSharedStyles", {
|
|
73
85
|
enumerable: true,
|
|
74
86
|
get: function get() {
|
|
@@ -258,4 +270,6 @@ var _taskDecision = require("./shared/task-decision");
|
|
|
258
270
|
|
|
259
271
|
var _status = require("./shared/status");
|
|
260
272
|
|
|
261
|
-
var _smartCard = require("./shared/smart-card");
|
|
273
|
+
var _smartCard = require("./shared/smart-card");
|
|
274
|
+
|
|
275
|
+
var _codeBlock = require("./shared/code-block");
|
|
@@ -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-of-type {\n p,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n .heading-wrapper {\n
|
|
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;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.codeBlockSharedStyles = exports.CodeBlockSharedCssClassName = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
|
+
|
|
14
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
|
+
|
|
16
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
17
|
+
|
|
18
|
+
var _components = require("@atlaskit/theme/components");
|
|
19
|
+
|
|
20
|
+
var _constants = require("@atlaskit/theme/constants");
|
|
21
|
+
|
|
22
|
+
var _tokens = require("@atlaskit/tokens");
|
|
23
|
+
|
|
24
|
+
var _templateObject;
|
|
25
|
+
|
|
26
|
+
var CodeBlockSharedCssClassName = {
|
|
27
|
+
CODEBLOCK_CONTAINER: 'code-block',
|
|
28
|
+
CODEBLOCK_LINE_NUMBER_GUTTER: 'line-number-gutter',
|
|
29
|
+
CODEBLOCK_CONTENT: 'code-content',
|
|
30
|
+
DS_CODEBLOCK: '[data-ds--code--code-block]'
|
|
31
|
+
};
|
|
32
|
+
exports.CodeBlockSharedCssClassName = CodeBlockSharedCssClassName;
|
|
33
|
+
|
|
34
|
+
var codeBlockSharedStyles = function codeBlockSharedStyles(props) {
|
|
35
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: relative;\n background-color: ", ";\n border-radius: ", "px;\n counter-reset: line;\n display: flex;\n overflow-x: auto;\n\n background-image: ", ";\n\n --ds--code--bg-color: transparent;\n\n background-repeat: no-repeat;\n background-attachment: local, scroll, scroll;\n background-size: 8px 100%, 8px 100%, 8px 100%;\n background-position: 100% 0, 100% 0, 0 0;\n font-family: ", ";\n margin: ", " 0 0 0;\n min-width: ", "px;\n cursor: pointer;\n\n .", " {\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", "px;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n ::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n color: ", ";\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n color: ", ";\n border-radius: ", "px;\n margin: ", "px;\n white-space: pre;\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, (0, _components.themed)({
|
|
36
|
+
light: (0, _tokens.token)('color.background.neutral', _colors.N20),
|
|
37
|
+
dark: (0, _tokens.token)('color.background.neutral', _colors.DN50)
|
|
38
|
+
})(props), (0, _constants.borderRadius)(), (0, _editorSharedStyles.overflowShadow)({
|
|
39
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4118
|
|
40
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
41
|
+
background: (0, _components.themed)({
|
|
42
|
+
light: _colors.N20,
|
|
43
|
+
dark: _colors.DN50
|
|
44
|
+
})(props),
|
|
45
|
+
width: '8px'
|
|
46
|
+
}), _editorSharedStyles.akEditorCodeFontFamily, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, (0, _components.themed)({
|
|
47
|
+
light: (0, _tokens.token)('color.background.neutral', _colors.N30),
|
|
48
|
+
dark: (0, _tokens.token)('color.background.neutral', _colors.DN20)
|
|
49
|
+
})(props), (0, _constants.gridSize)(), (0, _components.themed)({
|
|
50
|
+
light: (0, _tokens.token)('color.text.subtlest', _colors.N400),
|
|
51
|
+
dark: (0, _tokens.token)('color.text.subtlest', _colors.DN400)
|
|
52
|
+
})(props), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, (0, _components.themed)({
|
|
53
|
+
light: (0, _tokens.token)('color.text', _colors.N800),
|
|
54
|
+
dark: (0, _tokens.token)('color.text', _colors.DN800)
|
|
55
|
+
})(props), (0, _constants.borderRadius)(), (0, _constants.gridSize)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
exports.codeBlockSharedStyles = codeBlockSharedStyles;
|
|
@@ -11,6 +11,7 @@ var EmojiSharedCssClassName = {
|
|
|
11
11
|
EMOJI_CONTAINER: 'emojiView-content-wrap',
|
|
12
12
|
EMOJI_NODE: _emoji.emojiNode,
|
|
13
13
|
EMOJI_SPRITE: _emoji.emojiSprite,
|
|
14
|
-
EMOJI_IMAGE: _emoji.emojiImage
|
|
14
|
+
EMOJI_IMAGE: _emoji.emojiImage,
|
|
15
|
+
EMOJI_PLACEHOLDER: _emoji.emojiPlaceholder
|
|
15
16
|
};
|
|
16
17
|
exports.EmojiSharedCssClassName = EmojiSharedCssClassName;
|
|
@@ -178,7 +178,8 @@ var PanelSharedSelectors = {
|
|
|
178
178
|
emojiPopup: "[aria-label=\"Popup\"]",
|
|
179
179
|
searchEmoji: "[aria-label=\"Search emoji\"]",
|
|
180
180
|
orangeWarningIcon: "[aria-label=\":warning:\"]",
|
|
181
|
-
yellowWarningIcon: "[aria-label=\":warning:\"] span:nth-child(1)"
|
|
181
|
+
yellowWarningIcon: "[aria-label=\":warning:\"] span:nth-child(1)",
|
|
182
|
+
copyButton: "button[aria-label=\"Copy\"]"
|
|
182
183
|
};
|
|
183
184
|
exports.PanelSharedSelectors = PanelSharedSelectors;
|
|
184
185
|
|
|
@@ -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-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 >
|
|
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 // If task list is first in the document then set margin top to zero.\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;
|
|
@@ -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));
|
|
@@ -41,6 +41,12 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
41
41
|
|
|
42
42
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
43
43
|
|
|
44
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
45
|
+
|
|
46
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
47
|
+
|
|
48
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
49
|
+
|
|
44
50
|
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); }; }
|
|
45
51
|
|
|
46
52
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -62,6 +68,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
71
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "rafIds", new Set());
|
|
65
72
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
66
73
|
validPosition: true
|
|
67
74
|
});
|
|
@@ -73,8 +80,37 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
73
80
|
|
|
74
81
|
_this.initPopup(popup);
|
|
75
82
|
});
|
|
83
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "cancelRequestAnimationFrames", function () {
|
|
84
|
+
var _iterator = _createForOfIteratorHelper(_this.rafIds),
|
|
85
|
+
_step;
|
|
86
|
+
|
|
87
|
+
try {
|
|
88
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
89
|
+
var rafId = _step.value;
|
|
90
|
+
cancelAnimationFrame(rafId);
|
|
91
|
+
}
|
|
92
|
+
} catch (err) {
|
|
93
|
+
_iterator.e(err);
|
|
94
|
+
} finally {
|
|
95
|
+
_iterator.f();
|
|
96
|
+
}
|
|
97
|
+
});
|
|
76
98
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "scheduledUpdatePosition", (0, _rafSchd.default)(function (props) {
|
|
77
|
-
|
|
99
|
+
if (!_this.props.waitForExtraLayoutUpdates) {
|
|
100
|
+
_this.updatePosition(_this.props);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (_this.props.scheduleExtraLayoutUpdates) {
|
|
104
|
+
// We need two requestAnimationFrame calls to ensure reflow/repaints
|
|
105
|
+
// are flushed to DOM before our popup position recalculations happen
|
|
106
|
+
var rafId = requestAnimationFrame(function () {
|
|
107
|
+
_this.updatePosition(_this.props);
|
|
108
|
+
|
|
109
|
+
_this.rafIds.delete(rafId);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
_this.rafIds.add(rafId);
|
|
113
|
+
}
|
|
78
114
|
}));
|
|
79
115
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onResize", function () {
|
|
80
116
|
return _this.scheduledUpdatePosition(_this.props);
|
|
@@ -237,6 +273,7 @@ var Popup = /*#__PURE__*/function (_React$Component) {
|
|
|
237
273
|
}
|
|
238
274
|
|
|
239
275
|
this.scheduledUpdatePosition.cancel();
|
|
276
|
+
this.cancelRequestAnimationFrames();
|
|
240
277
|
}
|
|
241
278
|
}, {
|
|
242
279
|
key: "renderPopup",
|
|
@@ -5,14 +5,21 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.clearNextSiblingMarginTopStyle = void 0;
|
|
8
|
+
exports.clearNextSiblingMarginTopStyle = exports.clearNextSiblingBlockMarkMarginTopStyle = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
12
|
var _react = require("@emotion/react");
|
|
13
13
|
|
|
14
|
-
var _templateObject;
|
|
14
|
+
var _templateObject, _templateObject2;
|
|
15
15
|
|
|
16
16
|
// We use !important to ensure next sibling gets the margin reset no matter what
|
|
17
|
-
var
|
|
18
|
-
|
|
17
|
+
var marginTopReset = "margin-top: 0 !important;";
|
|
18
|
+
var clearNextSiblingMarginTopStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & + * {\n ", "\n }\n"])), marginTopReset);
|
|
19
|
+
exports.clearNextSiblingMarginTopStyle = clearNextSiblingMarginTopStyle;
|
|
20
|
+
var textElements = ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
21
|
+
var nextSiblingBlockMarkContentSelectors = textElements.map(function (elem) {
|
|
22
|
+
return "+ .fabric-editor-block-mark > ".concat(elem);
|
|
23
|
+
}).join(',');
|
|
24
|
+
var clearNextSiblingBlockMarkMarginTopStyle = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", " {\n ", "\n }\n"])), nextSiblingBlockMarkContentSelectors, marginTopReset);
|
|
25
|
+
exports.clearNextSiblingBlockMarkMarginTopStyle = clearNextSiblingBlockMarkMarginTopStyle;
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -151,6 +151,12 @@ Object.defineProperty(exports, "calcPxFromPct", {
|
|
|
151
151
|
return _grid.calcPxFromPct;
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
|
+
Object.defineProperty(exports, "clearNextSiblingBlockMarkMarginTopStyle", {
|
|
155
|
+
enumerable: true,
|
|
156
|
+
get: function get() {
|
|
157
|
+
return _clearNextSiblingMarginTop.clearNextSiblingBlockMarkMarginTopStyle;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
154
160
|
Object.defineProperty(exports, "clearNextSiblingMarginTopStyle", {
|
|
155
161
|
enumerable: true,
|
|
156
162
|
get: function get() {
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -167,12 +167,6 @@ Object.defineProperty(exports, "getExtensionRenderer", {
|
|
|
167
167
|
return _extensionHandler.getExtensionRenderer;
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
|
-
Object.defineProperty(exports, "getMarksByOrder", {
|
|
171
|
-
enumerable: true,
|
|
172
|
-
get: function get() {
|
|
173
|
-
return _validator.getMarksByOrder;
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
170
|
Object.defineProperty(exports, "getModeFromTheme", {
|
|
177
171
|
enumerable: true,
|
|
178
172
|
get: function get() {
|
|
@@ -209,36 +203,6 @@ Object.defineProperty(exports, "getUnsupportedContentLevelData", {
|
|
|
209
203
|
return _analytics.getUnsupportedContentLevelData;
|
|
210
204
|
}
|
|
211
205
|
});
|
|
212
|
-
Object.defineProperty(exports, "getValidContent", {
|
|
213
|
-
enumerable: true,
|
|
214
|
-
get: function get() {
|
|
215
|
-
return _validator.getValidContent;
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
Object.defineProperty(exports, "getValidDocument", {
|
|
219
|
-
enumerable: true,
|
|
220
|
-
get: function get() {
|
|
221
|
-
return _validator.getValidDocument;
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
Object.defineProperty(exports, "getValidMark", {
|
|
225
|
-
enumerable: true,
|
|
226
|
-
get: function get() {
|
|
227
|
-
return _validator.getValidMark;
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
Object.defineProperty(exports, "getValidNode", {
|
|
231
|
-
enumerable: true,
|
|
232
|
-
get: function get() {
|
|
233
|
-
return _validator.getValidNode;
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
Object.defineProperty(exports, "getValidUnknownNode", {
|
|
237
|
-
enumerable: true,
|
|
238
|
-
get: function get() {
|
|
239
|
-
return _validator.getValidUnknownNode;
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
206
|
Object.defineProperty(exports, "hasMergedCell", {
|
|
243
207
|
enumerable: true,
|
|
244
208
|
get: function get() {
|
|
@@ -263,24 +227,6 @@ Object.defineProperty(exports, "isPerformanceObserverAvailable", {
|
|
|
263
227
|
return _isPerformanceApiAvailable.isPerformanceObserverAvailable;
|
|
264
228
|
}
|
|
265
229
|
});
|
|
266
|
-
Object.defineProperty(exports, "isSameMark", {
|
|
267
|
-
enumerable: true,
|
|
268
|
-
get: function get() {
|
|
269
|
-
return _validator.isSameMark;
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
Object.defineProperty(exports, "isSubSupType", {
|
|
273
|
-
enumerable: true,
|
|
274
|
-
get: function get() {
|
|
275
|
-
return _validator.isSubSupType;
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
Object.defineProperty(exports, "markOrder", {
|
|
279
|
-
enumerable: true,
|
|
280
|
-
get: function get() {
|
|
281
|
-
return _validator.markOrder;
|
|
282
|
-
}
|
|
283
|
-
});
|
|
284
230
|
Object.defineProperty(exports, "measureRender", {
|
|
285
231
|
enumerable: true,
|
|
286
232
|
get: function get() {
|
|
@@ -376,8 +322,6 @@ var _annotation = require("./annotation");
|
|
|
376
322
|
|
|
377
323
|
var _macro = require("./macro");
|
|
378
324
|
|
|
379
|
-
var _validator = require("./validator");
|
|
380
|
-
|
|
381
325
|
var _browser = _interopRequireDefault(require("./browser"));
|
|
382
326
|
|
|
383
327
|
var _errorReporter = _interopRequireDefault(require("./error-reporter"));
|
package/dist/cjs/validator.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "ADFStages", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _validator.ADFStages;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "getMarksByOrder", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
package/dist/cjs/version.json
CHANGED
|
@@ -17,4 +17,5 @@ export { shadowSharedStyle } from './shared/shadow';
|
|
|
17
17
|
export { dateSharedStyle, DateSharedCssClassName } from './shared/date';
|
|
18
18
|
export { tasksAndDecisionsStyles, TaskDecisionSharedCssClassName } from './shared/task-decision';
|
|
19
19
|
export { StatusSharedCssClassName } from './shared/status';
|
|
20
|
-
export { smartCardSharedStyles, SmartCardSharedCssClassName } from './shared/smart-card';
|
|
20
|
+
export { smartCardSharedStyles, SmartCardSharedCssClassName } from './shared/smart-card';
|
|
21
|
+
export { CodeBlockSharedCssClassName, codeBlockSharedStyles } from './shared/code-block';
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
import { akEditorCodeFontFamily, akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
3
|
+
import { DN20, DN400, DN50, DN800, N20, N30, N400, N800 } from '@atlaskit/theme/colors';
|
|
4
|
+
import { themed } from '@atlaskit/theme/components';
|
|
5
|
+
import { borderRadius, fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
6
|
+
import { token } from '@atlaskit/tokens';
|
|
7
|
+
export const CodeBlockSharedCssClassName = {
|
|
8
|
+
CODEBLOCK_CONTAINER: 'code-block',
|
|
9
|
+
CODEBLOCK_LINE_NUMBER_GUTTER: 'line-number-gutter',
|
|
10
|
+
CODEBLOCK_CONTENT: 'code-content',
|
|
11
|
+
DS_CODEBLOCK: '[data-ds--code--code-block]'
|
|
12
|
+
};
|
|
13
|
+
export const codeBlockSharedStyles = props => css`
|
|
14
|
+
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER} {
|
|
15
|
+
position: relative;
|
|
16
|
+
background-color: ${themed({
|
|
17
|
+
light: token('color.background.neutral', N20),
|
|
18
|
+
dark: token('color.background.neutral', DN50)
|
|
19
|
+
})(props)};
|
|
20
|
+
border-radius: ${borderRadius()}px;
|
|
21
|
+
counter-reset: line;
|
|
22
|
+
display: flex;
|
|
23
|
+
overflow-x: auto;
|
|
24
|
+
|
|
25
|
+
background-image: ${overflowShadow({
|
|
26
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4118
|
|
27
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
28
|
+
background: themed({
|
|
29
|
+
light: N20,
|
|
30
|
+
dark: DN50
|
|
31
|
+
})(props),
|
|
32
|
+
width: '8px'
|
|
33
|
+
})};
|
|
34
|
+
|
|
35
|
+
--ds--code--bg-color: transparent;
|
|
36
|
+
|
|
37
|
+
background-repeat: no-repeat;
|
|
38
|
+
background-attachment: local, scroll, scroll;
|
|
39
|
+
background-size: 8px 100%, 8px 100%, 8px 100%;
|
|
40
|
+
background-position: 100% 0, 100% 0, 0 0;
|
|
41
|
+
font-family: ${akEditorCodeFontFamily};
|
|
42
|
+
margin: ${blockNodesVerticalMargin} 0 0 0;
|
|
43
|
+
min-width: ${akEditorTableCellMinWidth}px;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
|
|
46
|
+
.${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
text-align: right;
|
|
49
|
+
background-color: ${themed({
|
|
50
|
+
light: token('color.background.neutral', N30),
|
|
51
|
+
dark: token('color.background.neutral', DN20)
|
|
52
|
+
})(props)};
|
|
53
|
+
padding: ${gridSize()}px;
|
|
54
|
+
|
|
55
|
+
span {
|
|
56
|
+
display: block;
|
|
57
|
+
line-height: 0;
|
|
58
|
+
font-size: 0;
|
|
59
|
+
|
|
60
|
+
::before {
|
|
61
|
+
display: inline-block;
|
|
62
|
+
content: counter(line);
|
|
63
|
+
counter-increment: line;
|
|
64
|
+
color: ${themed({
|
|
65
|
+
light: token('color.text.subtlest', N400),
|
|
66
|
+
dark: token('color.text.subtlest', DN400)
|
|
67
|
+
})(props)};
|
|
68
|
+
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
69
|
+
line-height: 1.5rem;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex: 1;
|
|
77
|
+
|
|
78
|
+
code {
|
|
79
|
+
flex-grow: 1;
|
|
80
|
+
tab-size: 4;
|
|
81
|
+
cursor: text;
|
|
82
|
+
color: ${themed({
|
|
83
|
+
light: token('color.text', N800),
|
|
84
|
+
dark: token('color.text', DN800)
|
|
85
|
+
})(props)};
|
|
86
|
+
border-radius: ${borderRadius()}px;
|
|
87
|
+
margin: ${gridSize()}px;
|
|
88
|
+
white-space: pre;
|
|
89
|
+
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
90
|
+
line-height: 1.5rem;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { emojiImage, emojiNode, emojiSprite } from '@atlaskit/emoji';
|
|
1
|
+
import { emojiImage, emojiNode, emojiPlaceholder, emojiSprite } from '@atlaskit/emoji';
|
|
2
2
|
export const EmojiSharedCssClassName = {
|
|
3
3
|
EMOJI_CONTAINER: 'emojiView-content-wrap',
|
|
4
4
|
EMOJI_NODE: emojiNode,
|
|
5
5
|
EMOJI_SPRITE: emojiSprite,
|
|
6
|
-
EMOJI_IMAGE: emojiImage
|
|
6
|
+
EMOJI_IMAGE: emojiImage,
|
|
7
|
+
EMOJI_PLACEHOLDER: emojiPlaceholder
|
|
7
8
|
};
|
|
@@ -138,7 +138,8 @@ export const PanelSharedSelectors = {
|
|
|
138
138
|
emojiPopup: `[aria-label="Popup"]`,
|
|
139
139
|
searchEmoji: `[aria-label="Search emoji"]`,
|
|
140
140
|
orangeWarningIcon: `[aria-label=":warning:"]`,
|
|
141
|
-
yellowWarningIcon: `[aria-label=":warning:"] span:nth-child(1)
|
|
141
|
+
yellowWarningIcon: `[aria-label=":warning:"] span:nth-child(1)`,
|
|
142
|
+
copyButton: `button[aria-label="Copy"]`
|
|
142
143
|
};
|
|
143
144
|
|
|
144
145
|
const iconDynamicStyles = panelType => props => {
|