@atlaskit/renderer 109.7.1 → 109.7.3

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/.eslintrc.js ADDED
@@ -0,0 +1,8 @@
1
+ module.exports = {
2
+ rules: {
3
+ '@atlaskit/design-system/ensure-design-token-usage/preview': [
4
+ 'error',
5
+ { domains: ['spacing'], shouldEnforceFallbacks: false },
6
+ ],
7
+ },
8
+ };
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 109.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#79344](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/79344) [`b6bc418abde3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6bc418abde3) - CXP-3050 Enforced design tokens and primitives on media-card
8
+
9
+ ## 109.7.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [#75947](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75947) [`43549c3789b1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/43549c3789b1) - Migrate @atlaskit/editor-core to use declarative entry points
14
+
3
15
  ## 109.7.1
4
16
 
5
17
  ### Patch Changes
@@ -24,6 +24,7 @@ var _utils2 = require("@atlaskit/editor-common/utils");
24
24
  var datasourceContainerStyle = (0, _react2.css)({
25
25
  borderRadius: "var(--ds-border-radius-200, 8px)",
26
26
  border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")")),
27
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
27
28
  marginLeft: '50%',
28
29
  transform: 'translateX(-50%)'
29
30
  });
@@ -22,16 +22,16 @@ var codeBlockButtonsStyle = (0, _react.css)({
22
22
  position: 'absolute',
23
23
  height: '0',
24
24
  width: '100%',
25
- right: '6px',
26
- top: '4px',
27
- padding: '2px',
25
+ right: "var(--ds-space-075, 6px)",
26
+ top: "var(--ds-space-050, 4px)",
27
+ padding: "var(--ds-space-025, 2px)",
28
28
  button: {
29
29
  height: '32px',
30
30
  width: '32px',
31
31
  border: "2px solid ".concat("var(--ds-border, ".concat(_colors.N0, ")")),
32
32
  borderRadius: '4px',
33
- marginLeft: '4px',
34
- padding: '2px',
33
+ marginLeft: "var(--ds-space-050, 4px)",
34
+ padding: "var(--ds-space-025, 2px)",
35
35
  background: "".concat("var(--ds-surface-overlay, ".concat(_colors.N20, ")")),
36
36
  color: "var(--ds-icon, rgb(66, 82, 110))",
37
37
  '&:hover': {
@@ -33,6 +33,7 @@ var embedCardWrapperStyles = (0, _react.css)({
33
33
  margin: '0 auto'
34
34
  });
35
35
  var uIMediaSingleLayoutStyles = (0, _react.css)({
36
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
36
37
  marginLeft: '50%',
37
38
  transform: 'translateX(-50%)'
38
39
  });
@@ -8,7 +8,7 @@ exports.tableStickyPadding = exports.StickyTable = exports.OverflowParent = expo
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
12
  var _react = _interopRequireDefault(require("react"));
13
13
  var _react2 = require("@emotion/react");
14
14
  var _styles = require("@atlaskit/editor-common/styles");
@@ -17,24 +17,47 @@ var _colors = require("@atlaskit/theme/colors");
17
17
  var _table = require("./table");
18
18
  var _injectProps = require("../../utils/inject-props");
19
19
  var _table2 = require("../table");
20
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
21
20
  /** @jsx jsx */
21
+
22
22
  var tableStickyPadding = exports.tableStickyPadding = 8;
23
23
  var modeSpecficStyles = {
24
- none: (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: none;\n "]))),
25
- stick: (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: fixed;\n "]))),
26
- 'pin-bottom': (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n "])))
24
+ none: (0, _react2.css)({
25
+ display: 'none'
26
+ }),
27
+ stick: (0, _react2.css)({
28
+ position: 'fixed'
29
+ }),
30
+ 'pin-bottom': (0, _react2.css)({
31
+ position: 'absolute'
32
+ })
27
33
  };
28
34
 
29
35
  // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
30
36
  var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width, rendererAppearance) {
37
+ var _css;
31
38
  var stickyHeaderZIndex;
32
39
  if ((0, _table2.isTableResizingEnabled)(rendererAppearance)) {
33
40
  stickyHeaderZIndex = 13;
34
41
  } else {
35
42
  stickyHeaderZIndex = _editorSharedStyles.akEditorStickyHeaderZIndex;
36
43
  }
37
- return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n tr {\n background: ", ";\n }\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: 0 6px 4px -4px ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".is-sticky.right-shadow::after,\n &\n .", ".is-sticky.left-shadow::before {\n top: 0px;\n height: 100%;\n }\n\n &.fixed-table-div-custom-table-resizing[mode='stick'] {\n z-index: ", ";\n }\n "])), typeof top === 'number' && "top: ".concat(top, "px;"), width, stickyHeaderZIndex, _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-surface, white)", tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow-perimeter, ".concat(_colors.N40A, ")"), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER, stickyHeaderZIndex);
44
+ return (0, _react2.css)(typeof top === 'number' && "top: ".concat(top, "px;"), (_css = {
45
+ width: "".concat(width, "px"),
46
+ zIndex: stickyHeaderZIndex
47
+ }, (0, _defineProperty2.default)(_css, "& .".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, ", & .").concat(_styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
48
+ marginTop: 0,
49
+ marginBottom: 0,
50
+ tr: {
51
+ background: "var(--ds-surface, white)"
52
+ }
53
+ }), (0, _defineProperty2.default)(_css, "borderTop", "".concat(tableStickyPadding, "px solid ", "var(--ds-surface, white)")), (0, _defineProperty2.default)(_css, "background", "var(--ds-surface-overlay, white)"), (0, _defineProperty2.default)(_css, "boxShadow", "0 6px 4px -4px ".concat("var(--ds-shadow-overflow-perimeter, ".concat(_colors.N40A, ")"))), (0, _defineProperty2.default)(_css, "div[data-expanded='false'] &", {
54
+ display: 'none'
55
+ }), (0, _defineProperty2.default)(_css, "& .".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, ".is-sticky.right-shadow::after, & .").concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, ".is-sticky.left-shadow::before"), {
56
+ top: '0px',
57
+ height: '100%'
58
+ }), (0, _defineProperty2.default)(_css, "&.fixed-table-div-custom-table-resizing[mode='stick']", {
59
+ zIndex: stickyHeaderZIndex
60
+ }), _css));
38
61
  };
39
62
  var FixedTableDiv = exports.FixedTableDiv = function FixedTableDiv(props) {
40
63
  var top = props.top,
@@ -71,12 +94,15 @@ var StickyTable = exports.StickyTable = function StickyTable(_ref) {
71
94
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
72
95
  if ((0, _table2.isTableResizingEnabled)(rendererAppearance)) {
73
96
  styles = (0, _react2.css)({
97
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
74
98
  top: mode === 'pin-bottom' ? top : undefined,
75
99
  position: 'absolute'
76
100
  });
77
101
  } else {
78
102
  styles = (0, _react2.css)({
103
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
79
104
  left: left && left < 0 ? left : undefined,
105
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
80
106
  top: mode === 'pin-bottom' ? top : undefined,
81
107
  position: 'relative'
82
108
  });
@@ -358,7 +358,8 @@ var TableContainer = exports.TableContainer = /*#__PURE__*/function (_React$Comp
358
358
  ref: this.props.handleRef,
359
359
  style: {
360
360
  width: tableWidth,
361
- left: left // eslint-disable-line @atlaskit/design-system/ensure-design-token-usage
361
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
362
+ left: left
362
363
  }
363
364
  }, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') && stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/_react.default.createElement(_sticky.StickyTable, {
364
365
  isNumberColumnEnabled: isNumberColumnEnabled,
@@ -55,7 +55,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
55
55
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
56
56
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
57
57
  var packageName = "@atlaskit/renderer";
58
- var packageVersion = "109.7.1";
58
+ var packageVersion = "109.7.3";
59
59
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
60
60
  (0, _inherits2.default)(Renderer, _PureComponent);
61
61
  var _super = _createSuper(Renderer);
@@ -33,6 +33,8 @@ var TELEPOINTER_ID = exports.TELEPOINTER_ID = 'ai-streaming-telepointer';
33
33
  var telepointerStyles = function telepointerStyles() {
34
34
  var _getGlobalTheme = (0, _tokens.getGlobalTheme)(),
35
35
  colorMode = _getGlobalTheme.colorMode;
36
+
37
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
36
38
  return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n #", " {\n display: inline-block;\n position: relative;\n width: 1.5px;\n height: 25px;\n background: linear-gradient(\n 45deg,\n ", " -12.02%,\n ", " 19.18%,\n ", " 71.87%\n );\n margin-left: ", ";\n\n &::after {\n content: 'AI';\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n font-size: 10px;\n font-weight: 700;\n width: 12.5px;\n height: 13px;\n padding-top: 1px;\n padding-left: 1.5px;\n line-height: initial;\n border-radius: 0px 2px 2px 0px;\n color: ", ";\n background: linear-gradient(\n 45deg,\n ", " -57%,\n ", " 71.87%\n );\n }\n }\n "])), TELEPOINTER_ID, colorMode === 'dark' ? '#f5cd47' : '#f8e6a0', colorMode === 'dark' ? '#60c6d2' : '#8bdbe5', colorMode === 'dark' ? '#388bff' : '#0c66e4', "var(--ds-space-025, 2px)", "var(--ds-text-inverse, white)", colorMode === 'dark' ? '#60c6d2' : '#8bdbe5', colorMode === 'dark' ? '#388bff' : '#0c66e4');
37
39
  };
38
40
  var getLineHeight = function getLineHeight(fontCode) {
@@ -102,7 +104,8 @@ var breakoutWidthStyle = function breakoutWidthStyle() {
102
104
  return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n *:not([data-mark-type='fragment'])\n .", " {\n // TODO - improve inline style logic on table container so important styles aren't required here\n width: 100% !important;\n left: 0 !important;\n }\n\n [data-mark-type='fragment'] * .", " {\n // TODO - improve inline style logic on table container so important styles aren't required here\n width: 100% !important;\n left: 0 !important;\n }\n "])), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
103
105
  };
104
106
  var getShadowOverrides = function getShadowOverrides() {
105
- return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.increase-shadow-visibility_lh89r') ? (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n width: ", "px;\n background: linear-gradient(\n to left,\n transparent 0,\n ", " 140%\n ),\n linear-gradient(\n to right,\n ", " 0px,\n transparent 1px\n );\n }\n\n &.", "::after {\n background: linear-gradient(\n to right,\n transparent 0,\n ", " 140%\n ),\n linear-gradient(\n to left,\n ", " 0px,\n transparent 1px\n );\n left: calc(100% - ", "px);\n }\n "])), _ui.shadowClassNames.RIGHT_SHADOW, _ui.shadowClassNames.LEFT_SHADOW, tableShadowWidth, "var(--ds-shadow-overflow-spread, ".concat(_colors.N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", _ui.shadowClassNames.RIGHT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(_colors.N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", tableShadowWidth) : '';
107
+ return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.table.increase-shadow-visibility_lh89r') ? // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
108
+ (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n width: ", "px;\n background: linear-gradient(\n to left,\n transparent 0,\n ", " 140%\n ),\n linear-gradient(\n to right,\n ", " 0px,\n transparent 1px\n );\n }\n\n &.", "::after {\n background: linear-gradient(\n to right,\n transparent 0,\n ", " 140%\n ),\n linear-gradient(\n to left,\n ", " 0px,\n transparent 1px\n );\n left: calc(100% - ", "px);\n }\n "])), _ui.shadowClassNames.RIGHT_SHADOW, _ui.shadowClassNames.LEFT_SHADOW, tableShadowWidth, "var(--ds-shadow-overflow-spread, ".concat(_colors.N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", _ui.shadowClassNames.RIGHT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(_colors.N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", tableShadowWidth) : '';
106
109
  };
107
110
  var rendererStyles = exports.rendererStyles = function rendererStyles(wrapperProps) {
108
111
  return function (theme) {
@@ -111,6 +114,8 @@ var rendererStyles = exports.rendererStyles = function rendererStyles(wrapperPro
111
114
  theme: theme
112
115
  };
113
116
  var useBlockRenderForCodeBlock = wrapperProps.useBlockRenderForCodeBlock;
117
+
118
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
114
119
  return (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n .", " {\n ", "\n }\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", "\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", ";\n color: ", ";\n padding: ", " ", ";\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", " 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: ", ";\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n ", "\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n ", "\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: block;\n /* stylelint-enable */\n\n position: relative;\n border-radius: ", ";\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n\n ", "\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", ";\n & > div + div {\n margin-left: ", ";\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n &:not([data-node-type='decisionList']) > li,\n // This prevents https://product-fabric.atlassian.net/browse/ED-20924\n &:not(.", ") > li {\n ", "\n }\n "])), (0, _editorSharedStyles.editorFontSize)(themeProps), "var(--ds-text, ".concat(colors.N800, ")"), _consts.RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), _consts.RendererCssClassName.DOCUMENT, _mediaInline.mediaInlineImageStyles, headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), "var(--ds-text-subtlest, ".concat(colors.N200, ")"), telepointerStyles(), _styles.whitespaceSharedStyles, _styles.blockquoteSharedStyles, (0, _styles.headingsSharedStyles)(), (0, _styles.ruleSharedStyles)(), _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.blockMarksSharedStyles, (0, _styles.codeMarkSharedStyles)(), _styles.shadowSharedStyle, _styles.dateSharedStyle, _styles.textColorStyles, _styles.tasksAndDecisionsStyles, _styles.smartCardSharedStyles, (0, _constants.fontFamily)(), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), "var(--ds-background-neutral, ".concat(colors.N30A, ")"), "var(--ds-border-radius-100, 3px)", "var(--ds-text, ".concat(colors.N800, ")"), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), "var(--ds-space-300, 24px)", _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-space-100, 8px)", alignedHeadingAnchorStyle(wrapperProps), _styles.mediaSingleSharedStyle, _consts.RendererCssClassName.DOCUMENT, breakoutWidthStyle(), _consts.RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, _consts.RendererCssClassName.EXTENSION, _consts.RendererCssClassName.DOCUMENT, _consts.RendererCssClassName.EXTENSION, _editorSharedStyles.blockNodesVerticalMargin, _consts.RendererCssClassName.EXTENSION_CENTER_ALIGN, _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, _ui.shadowObserverClassNames.SHADOW_CONTAINER, _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER, (0, _styles.tableSharedStyle)(), _consts.RendererCssClassName.DOCUMENT, _styles.TableSharedCssClassName.TABLE_CONTAINER, _ui.shadowClassNames.RIGHT_SHADOW, _ui.shadowClassNames.LEFT_SHADOW, _styles.tableMarginTop - 1, _styles.tableMarginTop, _editorSharedStyles.akEditorStickyHeaderZIndex, getShadowOverrides(), _ui.shadowObserverClassNames.SENTINEL_LEFT, _ui.shadowObserverClassNames.SENTINEL_RIGHT, _styles.tableMarginTop, tableSortableColumnStyle(wrapperProps), _consts.RendererCssClassName.NUMBER_COLUMN, "var(--ds-background-neutral, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), _editorSharedStyles.akEditorTableNumberColumnWidth, "var(--ds-text-subtlest, ".concat(colors.N200, ")"), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), _consts.RendererCssClassName.NUMBER_COLUMN, _editorSharedStyles.akEditorStickyHeaderZIndex, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), _editorSharedStyles.akEditorStickyHeaderZIndex, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), "var(--ds-border-radius-100, 3px)", _editorSharedStyles.blockNodesVerticalMargin, useGridRenderForCodeBlock(useBlockRenderForCodeBlock), (0, _lightWeightCodeBlock.getLightWeightCodeBlockStylesForRootRendererStyleSheet)(), _styles.columnLayoutSharedStyle, "var(--ds-space-250, 20px)", "var(--ds-space-400, 32px)", _editorSharedStyles.gridMediumMaxWidth, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _utils.browser.safari ? _styles.codeBlockInListSafariFix : '');
115
120
  };
116
121
  };
@@ -17,6 +17,7 @@ import { calcBreakoutWidth, canRenderDatasource } from '@atlaskit/editor-common/
17
17
  const datasourceContainerStyle = css({
18
18
  borderRadius: `${"var(--ds-border-radius-200, 8px)"}`,
19
19
  border: `1px solid ${`var(--ds-border, ${N40})`}`,
20
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
20
21
  marginLeft: '50%',
21
22
  transform: 'translateX(-50%)'
22
23
  });
@@ -14,16 +14,16 @@ const codeBlockButtonsStyle = css({
14
14
  position: 'absolute',
15
15
  height: '0',
16
16
  width: '100%',
17
- right: '6px',
18
- top: '4px',
19
- padding: '2px',
17
+ right: "var(--ds-space-075, 6px)",
18
+ top: "var(--ds-space-050, 4px)",
19
+ padding: "var(--ds-space-025, 2px)",
20
20
  button: {
21
21
  height: '32px',
22
22
  width: '32px',
23
23
  border: `2px solid ${`var(--ds-border, ${N0})`}`,
24
24
  borderRadius: '4px',
25
- marginLeft: '4px',
26
- padding: '2px',
25
+ marginLeft: "var(--ds-space-050, 4px)",
26
+ padding: "var(--ds-space-025, 2px)",
27
27
  background: `${`var(--ds-surface-overlay, ${N20})`}`,
28
28
  color: `${"var(--ds-icon, rgb(66, 82, 110))"}`,
29
29
  '&:hover': {
@@ -24,6 +24,7 @@ const embedCardWrapperStyles = css({
24
24
  margin: '0 auto'
25
25
  });
26
26
  const uIMediaSingleLayoutStyles = css({
27
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
27
28
  marginLeft: '50%',
28
29
  transform: 'translateX(-50%)'
29
30
  });
@@ -10,15 +10,15 @@ import { recursivelyInjectProps } from '../../utils/inject-props';
10
10
  import { isTableResizingEnabled } from '../table';
11
11
  export const tableStickyPadding = 8;
12
12
  const modeSpecficStyles = {
13
- none: css`
14
- display: none;
15
- `,
16
- stick: css`
17
- position: fixed;
18
- `,
19
- 'pin-bottom': css`
20
- position: absolute;
21
- `
13
+ none: css({
14
+ display: 'none'
15
+ }),
16
+ stick: css({
17
+ position: 'fixed'
18
+ }),
19
+ 'pin-bottom': css({
20
+ position: 'absolute'
21
+ })
22
22
  };
23
23
 
24
24
  // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
@@ -29,43 +29,30 @@ const fixedTableDivStaticStyles = (top, width, rendererAppearance) => {
29
29
  } else {
30
30
  stickyHeaderZIndex = akEditorStickyHeaderZIndex;
31
31
  }
32
- return css`
33
- ${typeof top === 'number' && `top: ${top}px;`}
34
- width: ${width}px;
35
- z-index: ${stickyHeaderZIndex};
36
- &
37
- .${TableSharedCssClassName.TABLE_CONTAINER},
38
- &
39
- .${TableSharedCssClassName.TABLE_STICKY_WRAPPER}
40
- > table {
41
- margin-top: 0;
42
- margin-bottom: 0;
43
- tr {
44
- background: ${"var(--ds-surface, white)"};
32
+ return css(typeof top === 'number' && `top: ${top}px;`, {
33
+ width: `${width}px`,
34
+ zIndex: stickyHeaderZIndex,
35
+ [`& .${TableSharedCssClassName.TABLE_CONTAINER}, & .${TableSharedCssClassName.TABLE_STICKY_WRAPPER} > table`]: {
36
+ marginTop: 0,
37
+ marginBottom: 0,
38
+ tr: {
39
+ background: "var(--ds-surface, white)"
45
40
  }
41
+ },
42
+ borderTop: `${tableStickyPadding}px solid ${"var(--ds-surface, white)"}`,
43
+ background: "var(--ds-surface-overlay, white)",
44
+ boxShadow: `0 6px 4px -4px ${`var(--ds-shadow-overflow-perimeter, ${N40A})`}`,
45
+ "div[data-expanded='false'] &": {
46
+ display: 'none'
47
+ },
48
+ [`& .${TableSharedCssClassName.TABLE_CONTAINER}.is-sticky.right-shadow::after, & .${TableSharedCssClassName.TABLE_CONTAINER}.is-sticky.left-shadow::before`]: {
49
+ top: '0px',
50
+ height: '100%'
51
+ },
52
+ "&.fixed-table-div-custom-table-resizing[mode='stick']": {
53
+ zIndex: stickyHeaderZIndex
46
54
  }
47
-
48
- border-top: ${tableStickyPadding}px solid
49
- ${"var(--ds-surface, white)"};
50
- background: ${"var(--ds-surface-overlay, white)"};
51
- box-shadow: 0 6px 4px -4px ${`var(--ds-shadow-overflow-perimeter, ${N40A})`};
52
-
53
- div[data-expanded='false'] & {
54
- display: none;
55
- }
56
-
57
- &
58
- .${TableSharedCssClassName.TABLE_CONTAINER}.is-sticky.right-shadow::after,
59
- &
60
- .${TableSharedCssClassName.TABLE_CONTAINER}.is-sticky.left-shadow::before {
61
- top: 0px;
62
- height: 100%;
63
- }
64
-
65
- &.fixed-table-div-custom-table-resizing[mode='stick'] {
66
- z-index: ${stickyHeaderZIndex};
67
- }
68
- `;
55
+ });
69
56
  };
70
57
  export const FixedTableDiv = props => {
71
58
  const {
@@ -105,12 +92,15 @@ export const StickyTable = ({
105
92
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
106
93
  if (isTableResizingEnabled(rendererAppearance)) {
107
94
  styles = css({
95
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
108
96
  top: mode === 'pin-bottom' ? top : undefined,
109
97
  position: 'absolute'
110
98
  });
111
99
  } else {
112
100
  styles = css({
101
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
113
102
  left: left && left < 0 ? left : undefined,
103
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
114
104
  top: mode === 'pin-bottom' ? top : undefined,
115
105
  position: 'relative'
116
106
  });
@@ -305,7 +305,8 @@ export class TableContainer extends React.Component {
305
305
  ref: this.props.handleRef,
306
306
  style: {
307
307
  width: tableWidth,
308
- left // eslint-disable-line @atlaskit/design-system/ensure-design-token-usage
308
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
309
+ left
309
310
  }
310
311
  }, getBooleanFF('platform.editor.custom-table-width') && stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/React.createElement(StickyTable, {
311
312
  isNumberColumnEnabled: isNumberColumnEnabled,
@@ -36,7 +36,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
36
36
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
37
37
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
38
38
  const packageName = "@atlaskit/renderer";
39
- const packageVersion = "109.7.1";
39
+ const packageVersion = "109.7.3";
40
40
  export class Renderer extends PureComponent {
41
41
  constructor(props) {
42
42
  super(props);
@@ -24,6 +24,8 @@ const telepointerStyles = () => {
24
24
  const {
25
25
  colorMode
26
26
  } = getGlobalTheme();
27
+
28
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
27
29
  return css`
28
30
  #${TELEPOINTER_ID} {
29
31
  display: inline-block;
@@ -358,7 +360,9 @@ const breakoutWidthStyle = () => {
358
360
  `;
359
361
  };
360
362
  const getShadowOverrides = () => {
361
- return getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? css`
363
+ return getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ?
364
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
365
+ css`
362
366
  /** Shadow overrides */
363
367
  &.${shadowClassNames.RIGHT_SHADOW}::after,
364
368
  &.${shadowClassNames.LEFT_SHADOW}::before {
@@ -398,6 +402,8 @@ export const rendererStyles = wrapperProps => theme => {
398
402
  const {
399
403
  useBlockRenderForCodeBlock
400
404
  } = wrapperProps;
405
+
406
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
401
407
  return css`
402
408
  font-size: ${editorFontSize(themeProps)}px;
403
409
  line-height: 1.5rem;
@@ -17,6 +17,7 @@ import { calcBreakoutWidth, canRenderDatasource } from '@atlaskit/editor-common/
17
17
  var datasourceContainerStyle = css({
18
18
  borderRadius: "var(--ds-border-radius-200, 8px)",
19
19
  border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")")),
20
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
20
21
  marginLeft: '50%',
21
22
  transform: 'translateX(-50%)'
22
23
  });
@@ -14,16 +14,16 @@ var codeBlockButtonsStyle = css({
14
14
  position: 'absolute',
15
15
  height: '0',
16
16
  width: '100%',
17
- right: '6px',
18
- top: '4px',
19
- padding: '2px',
17
+ right: "var(--ds-space-075, 6px)",
18
+ top: "var(--ds-space-050, 4px)",
19
+ padding: "var(--ds-space-025, 2px)",
20
20
  button: {
21
21
  height: '32px',
22
22
  width: '32px',
23
23
  border: "2px solid ".concat("var(--ds-border, ".concat(N0, ")")),
24
24
  borderRadius: '4px',
25
- marginLeft: '4px',
26
- padding: '2px',
25
+ marginLeft: "var(--ds-space-050, 4px)",
26
+ padding: "var(--ds-space-025, 2px)",
27
27
  background: "".concat("var(--ds-surface-overlay, ".concat(N20, ")")),
28
28
  color: "var(--ds-icon, rgb(66, 82, 110))",
29
29
  '&:hover': {
@@ -25,6 +25,7 @@ var embedCardWrapperStyles = css({
25
25
  margin: '0 auto'
26
26
  });
27
27
  var uIMediaSingleLayoutStyles = css({
28
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
28
29
  marginLeft: '50%',
29
30
  transform: 'translateX(-50%)'
30
31
  });
@@ -1,8 +1,7 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _extends from "@babel/runtime/helpers/extends";
4
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
5
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
4
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
6
5
  /** @jsx jsx */
7
6
  import React from 'react';
8
7
  import { css, jsx } from '@emotion/react';
@@ -14,20 +13,43 @@ import { recursivelyInjectProps } from '../../utils/inject-props';
14
13
  import { isTableResizingEnabled } from '../table';
15
14
  export var tableStickyPadding = 8;
16
15
  var modeSpecficStyles = {
17
- none: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: none;\n "]))),
18
- stick: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: fixed;\n "]))),
19
- 'pin-bottom': css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n "])))
16
+ none: css({
17
+ display: 'none'
18
+ }),
19
+ stick: css({
20
+ position: 'fixed'
21
+ }),
22
+ 'pin-bottom': css({
23
+ position: 'absolute'
24
+ })
20
25
  };
21
26
 
22
27
  // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
23
28
  var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width, rendererAppearance) {
29
+ var _css;
24
30
  var stickyHeaderZIndex;
25
31
  if (isTableResizingEnabled(rendererAppearance)) {
26
32
  stickyHeaderZIndex = 13;
27
33
  } else {
28
34
  stickyHeaderZIndex = akEditorStickyHeaderZIndex;
29
35
  }
30
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n tr {\n background: ", ";\n }\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: 0 6px 4px -4px ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".is-sticky.right-shadow::after,\n &\n .", ".is-sticky.left-shadow::before {\n top: 0px;\n height: 100%;\n }\n\n &.fixed-table-div-custom-table-resizing[mode='stick'] {\n z-index: ", ";\n }\n "])), typeof top === 'number' && "top: ".concat(top, "px;"), width, stickyHeaderZIndex, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-surface, white)", tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow-perimeter, ".concat(N40A, ")"), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER, stickyHeaderZIndex);
36
+ return css(typeof top === 'number' && "top: ".concat(top, "px;"), (_css = {
37
+ width: "".concat(width, "px"),
38
+ zIndex: stickyHeaderZIndex
39
+ }, _defineProperty(_css, "& .".concat(TableSharedCssClassName.TABLE_CONTAINER, ", & .").concat(TableSharedCssClassName.TABLE_STICKY_WRAPPER, " > table"), {
40
+ marginTop: 0,
41
+ marginBottom: 0,
42
+ tr: {
43
+ background: "var(--ds-surface, white)"
44
+ }
45
+ }), _defineProperty(_css, "borderTop", "".concat(tableStickyPadding, "px solid ", "var(--ds-surface, white)")), _defineProperty(_css, "background", "var(--ds-surface-overlay, white)"), _defineProperty(_css, "boxShadow", "0 6px 4px -4px ".concat("var(--ds-shadow-overflow-perimeter, ".concat(N40A, ")"))), _defineProperty(_css, "div[data-expanded='false'] &", {
46
+ display: 'none'
47
+ }), _defineProperty(_css, "& .".concat(TableSharedCssClassName.TABLE_CONTAINER, ".is-sticky.right-shadow::after, & .").concat(TableSharedCssClassName.TABLE_CONTAINER, ".is-sticky.left-shadow::before"), {
48
+ top: '0px',
49
+ height: '100%'
50
+ }), _defineProperty(_css, "&.fixed-table-div-custom-table-resizing[mode='stick']", {
51
+ zIndex: stickyHeaderZIndex
52
+ }), _css));
31
53
  };
32
54
  export var FixedTableDiv = function FixedTableDiv(props) {
33
55
  var top = props.top,
@@ -64,12 +86,15 @@ export var StickyTable = function StickyTable(_ref) {
64
86
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
65
87
  if (isTableResizingEnabled(rendererAppearance)) {
66
88
  styles = css({
89
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
67
90
  top: mode === 'pin-bottom' ? top : undefined,
68
91
  position: 'absolute'
69
92
  });
70
93
  } else {
71
94
  styles = css({
95
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
72
96
  left: left && left < 0 ? left : undefined,
97
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
73
98
  top: mode === 'pin-bottom' ? top : undefined,
74
99
  position: 'relative'
75
100
  });
@@ -351,7 +351,8 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
351
351
  ref: this.props.handleRef,
352
352
  style: {
353
353
  width: tableWidth,
354
- left: left // eslint-disable-line @atlaskit/design-system/ensure-design-token-usage
354
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview
355
+ left: left
355
356
  }
356
357
  }, getBooleanFF('platform.editor.custom-table-width') && stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/React.createElement(StickyTable, {
357
358
  isNumberColumnEnabled: isNumberColumnEnabled,
@@ -46,7 +46,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
46
46
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
47
47
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
48
48
  var packageName = "@atlaskit/renderer";
49
- var packageVersion = "109.7.1";
49
+ var packageVersion = "109.7.3";
50
50
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
51
51
  _inherits(Renderer, _PureComponent);
52
52
  var _super = _createSuper(Renderer);
@@ -25,6 +25,8 @@ export var TELEPOINTER_ID = 'ai-streaming-telepointer';
25
25
  var telepointerStyles = function telepointerStyles() {
26
26
  var _getGlobalTheme = getGlobalTheme(),
27
27
  colorMode = _getGlobalTheme.colorMode;
28
+
29
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
28
30
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n #", " {\n display: inline-block;\n position: relative;\n width: 1.5px;\n height: 25px;\n background: linear-gradient(\n 45deg,\n ", " -12.02%,\n ", " 19.18%,\n ", " 71.87%\n );\n margin-left: ", ";\n\n &::after {\n content: 'AI';\n position: absolute;\n display: block;\n top: 0;\n left: 0;\n font-size: 10px;\n font-weight: 700;\n width: 12.5px;\n height: 13px;\n padding-top: 1px;\n padding-left: 1.5px;\n line-height: initial;\n border-radius: 0px 2px 2px 0px;\n color: ", ";\n background: linear-gradient(\n 45deg,\n ", " -57%,\n ", " 71.87%\n );\n }\n }\n "])), TELEPOINTER_ID, colorMode === 'dark' ? '#f5cd47' : '#f8e6a0', colorMode === 'dark' ? '#60c6d2' : '#8bdbe5', colorMode === 'dark' ? '#388bff' : '#0c66e4', "var(--ds-space-025, 2px)", "var(--ds-text-inverse, white)", colorMode === 'dark' ? '#60c6d2' : '#8bdbe5', colorMode === 'dark' ? '#388bff' : '#0c66e4');
29
31
  };
30
32
  var getLineHeight = function getLineHeight(fontCode) {
@@ -94,7 +96,8 @@ var breakoutWidthStyle = function breakoutWidthStyle() {
94
96
  return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n *:not([data-mark-type='fragment'])\n .", " {\n // TODO - improve inline style logic on table container so important styles aren't required here\n width: 100% !important;\n left: 0 !important;\n }\n\n [data-mark-type='fragment'] * .", " {\n // TODO - improve inline style logic on table container so important styles aren't required here\n width: 100% !important;\n left: 0 !important;\n }\n "])), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER);
95
97
  };
96
98
  var getShadowOverrides = function getShadowOverrides() {
97
- return getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n width: ", "px;\n background: linear-gradient(\n to left,\n transparent 0,\n ", " 140%\n ),\n linear-gradient(\n to right,\n ", " 0px,\n transparent 1px\n );\n }\n\n &.", "::after {\n background: linear-gradient(\n to right,\n transparent 0,\n ", " 140%\n ),\n linear-gradient(\n to left,\n ", " 0px,\n transparent 1px\n );\n left: calc(100% - ", "px);\n }\n "])), shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableShadowWidth, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", shadowClassNames.RIGHT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", tableShadowWidth) : '';
99
+ return getBooleanFF('platform.editor.table.increase-shadow-visibility_lh89r') ? // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
100
+ css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n width: ", "px;\n background: linear-gradient(\n to left,\n transparent 0,\n ", " 140%\n ),\n linear-gradient(\n to right,\n ", " 0px,\n transparent 1px\n );\n }\n\n &.", "::after {\n background: linear-gradient(\n to right,\n transparent 0,\n ", " 140%\n ),\n linear-gradient(\n to left,\n ", " 0px,\n transparent 1px\n );\n left: calc(100% - ", "px);\n }\n "])), shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableShadowWidth, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", shadowClassNames.RIGHT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", tableShadowWidth) : '';
98
101
  };
99
102
  export var rendererStyles = function rendererStyles(wrapperProps) {
100
103
  return function (theme) {
@@ -103,6 +106,8 @@ export var rendererStyles = function rendererStyles(wrapperProps) {
103
106
  theme: theme
104
107
  };
105
108
  var useBlockRenderForCodeBlock = wrapperProps.useBlockRenderForCodeBlock;
109
+
110
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
106
111
  return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n .", "::after {\n // we add a clearfix after ak-renderer-document in order to\n // contain internal floats (such as media images that are \"wrap-left\")\n // to just the renderer (and not spill outside of it)\n content: '';\n visibility: hidden;\n display: block;\n height: 0;\n clear: both;\n }\n\n ", "\n ", "\n\n .", " {\n ", "\n }\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", "\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", ";\n color: ", ";\n padding: ", " ", ";\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", " 0;\n }\n\n .", ".rich-media-wrapped\n + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped\n + .rich-media-wrapped\n + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: ", ";\n }\n }\n\n ", "\n /* plugin styles */\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n ", "\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n .", "\n .", " {\n display: flex;\n }\n }\n\n ", "\n\n .", " .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after,\n &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n ", "\n\n &\n .", ",\n &\n .", " {\n height: calc(100% - ", "px);\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-of-type {\n height: 100%;\n\n td,\n th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid\n ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid\n ", ";\n border-bottom: 1px solid\n ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th,\n .sticky td {\n box-shadow: 0px 1px\n ", ",\n 0px -0.5px ", ",\n inset -1px 0px ", ",\n 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: block;\n /* stylelint-enable */\n\n position: relative;\n border-radius: ", ";\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n\n ", "\n\n ", "\n\n ", ";\n & [data-layout-section] {\n margin-top: ", ";\n & > div + div {\n margin-left: ", ";\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n }\n }\n\n & li {\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n &:not([data-node-type='decisionList']) > li,\n // This prevents https://product-fabric.atlassian.net/browse/ED-20924\n &:not(.", ") > li {\n ", "\n }\n "])), editorFontSize(themeProps), "var(--ds-text, ".concat(colors.N800, ")"), RendererCssClassName.DOCUMENT, fullPageStyles(wrapperProps, themeProps), fullWidthStyles(wrapperProps), RendererCssClassName.DOCUMENT, mediaInlineImageStyles, headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), "var(--ds-link, ".concat(colors.B400, ")"), "var(--ds-link, ".concat(colors.B300, ")"), "var(--ds-link-pressed, ".concat(colors.B500, ")"), "var(--ds-text-subtlest, ".concat(colors.N200, ")"), telepointerStyles(), whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles(), ruleSharedStyles(), paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles(), shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), "var(--ds-background-neutral, ".concat(colors.N30A, ")"), "var(--ds-border-radius-100, 3px)", "var(--ds-text, ".concat(colors.N800, ")"), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", "var(--ds-background-danger, ".concat(colors.R50, ")"), "var(--ds-text-danger, ".concat(colors.R500, ")"), "var(--ds-space-300, 24px)", richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-space-100, 8px)", alignedHeadingAnchorStyle(wrapperProps), mediaSingleSharedStyle, RendererCssClassName.DOCUMENT, breakoutWidthStyle(), RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER, RendererCssClassName.EXTENSION, RendererCssClassName.DOCUMENT, RendererCssClassName.EXTENSION, blockNodesVerticalMargin, RendererCssClassName.EXTENSION_CENTER_ALIGN, TableSharedCssClassName.TABLE_NODE_WRAPPER, shadowObserverClassNames.SHADOW_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableSharedStyle(), RendererCssClassName.DOCUMENT, TableSharedCssClassName.TABLE_CONTAINER, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, tableMarginTop - 1, tableMarginTop, akEditorStickyHeaderZIndex, getShadowOverrides(), shadowObserverClassNames.SENTINEL_LEFT, shadowObserverClassNames.SENTINEL_RIGHT, tableMarginTop, tableSortableColumnStyle(wrapperProps), RendererCssClassName.NUMBER_COLUMN, "var(--ds-background-neutral, ".concat(akEditorTableToolbar, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), akEditorTableNumberColumnWidth, "var(--ds-text-subtlest, ".concat(colors.N200, ")"), relativeFontSizeToBase16(fontSize()), RendererCssClassName.NUMBER_COLUMN, akEditorStickyHeaderZIndex, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), akEditorStickyHeaderZIndex, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableToolbar, ")"), "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableToolbar, ")"), "var(--ds-border-radius-100, 3px)", blockNodesVerticalMargin, useGridRenderForCodeBlock(useBlockRenderForCodeBlock), getLightWeightCodeBlockStylesForRootRendererStyleSheet(), columnLayoutSharedStyle, "var(--ds-space-250, 20px)", "var(--ds-space-400, 32px)", gridMediumMaxWidth, blockNodesVerticalMargin, blockNodesVerticalMargin, blockNodesVerticalMargin, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, browser.safari ? codeBlockInListSafariFix : '');
107
112
  };
108
113
  };
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
- import { Position } from './types';
2
+ import type { Position } from './types';
3
3
  import type { AnnotationProviders } from '@atlaskit/editor-common/types';
4
- import { AnnotationMarkStates } from '@atlaskit/adf-schema';
5
- type ChildrenProps = {
4
+ import type { AnnotationMarkStates } from '@atlaskit/adf-schema';
5
+ export type AnnotationsDraftContextWrapperChildrenProps = {
6
6
  applyAnnotationDraftAt: (position: Position) => void;
7
7
  clearAnnotationDraft: () => void;
8
8
  };
9
- export type RenderCallbackType = (props: React.PropsWithChildren<ChildrenProps>) => React.ReactNode;
9
+ export type RenderCallbackType = (props: React.PropsWithChildren<AnnotationsDraftContextWrapperChildrenProps>) => React.ReactNode;
10
10
  type Props = {
11
11
  children: RenderCallbackType;
12
12
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
3
  type Props = {
4
4
  rendererRef: React.RefObject<HTMLDivElement>;
5
5
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
- import { Position } from './types';
2
+ import type { Position } from './types';
3
3
  import type { AnnotationProviders } from '@atlaskit/editor-common/types';
4
- import { AnnotationMarkStates } from '@atlaskit/adf-schema';
5
- type ChildrenProps = {
4
+ import type { AnnotationMarkStates } from '@atlaskit/adf-schema';
5
+ export type AnnotationsDraftContextWrapperChildrenProps = {
6
6
  applyAnnotationDraftAt: (position: Position) => void;
7
7
  clearAnnotationDraft: () => void;
8
8
  };
9
- export type RenderCallbackType = (props: React.PropsWithChildren<ChildrenProps>) => React.ReactNode;
9
+ export type RenderCallbackType = (props: React.PropsWithChildren<AnnotationsDraftContextWrapperChildrenProps>) => React.ReactNode;
10
10
  type Props = {
11
11
  children: RenderCallbackType;
12
12
  };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
+ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
3
3
  type Props = {
4
4
  rendererRef: React.RefObject<HTMLDivElement>;
5
5
  createAnalyticsEvent?: CreateUIAnalyticsEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "109.7.1",
3
+ "version": "109.7.3",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  "@atlaskit/analytics-listeners": "^8.9.0",
30
30
  "@atlaskit/analytics-namespaced-context": "^6.9.0",
31
31
  "@atlaskit/analytics-next": "^9.2.0",
32
- "@atlaskit/button": "^17.6.0",
32
+ "@atlaskit/button": "^17.7.0",
33
33
  "@atlaskit/code": "^15.1.0",
34
34
  "@atlaskit/editor-common": "^78.11.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.10.0",
@@ -62,7 +62,7 @@
62
62
  "uuid": "^3.1.0"
63
63
  },
64
64
  "peerDependencies": {
65
- "@atlaskit/link-provider": "^1.7.0",
65
+ "@atlaskit/link-provider": "^1.8.0",
66
66
  "@atlaskit/media-core": "^34.2.0",
67
67
  "react": "^16.8.0",
68
68
  "react-dom": "^16.8.0"
@@ -72,9 +72,10 @@
72
72
  "@af/visual-regression": "*",
73
73
  "@atlaskit/analytics-gas-types": "^5.1.0",
74
74
  "@atlaskit/css-reset": "^6.6.0",
75
- "@atlaskit/link-provider": "^1.7.0",
75
+ "@atlaskit/editor-test-helpers": "^18.14.0",
76
+ "@atlaskit/link-provider": "^1.8.0",
76
77
  "@atlaskit/link-test-helpers": "^6.2.0",
77
- "@atlaskit/linking-common": "^5.3.0",
78
+ "@atlaskit/linking-common": "^5.4.0",
78
79
  "@atlaskit/media-core": "^34.2.0",
79
80
  "@atlaskit/media-integration-test-helpers": "^3.0.0",
80
81
  "@atlaskit/media-test-helpers": "^33.0.0",