@atlaskit/renderer 112.6.0 → 112.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 112.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#168591](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168591)
8
+ [`b75a552ecb1c6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b75a552ecb1c6) -
9
+ [ED-25816] Fix: non full-width resized layout becomes full width in full-width renderer
10
+ - Updated dependencies
11
+
3
12
  ## 112.6.0
4
13
 
5
14
  ### Minor Changes
@@ -1,13 +1,16 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.default = Breakout;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
7
9
  var _react = require("@emotion/react");
8
10
  var _ui = require("@atlaskit/editor-common/ui");
9
11
  var _utils = require("@atlaskit/editor-common/utils");
10
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
11
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
15
  /**
13
16
  * @jsxRuntime classic
@@ -25,9 +28,12 @@ var wrapperStyles = (0, _react.css)({
25
28
  function Breakout(props) {
26
29
  return (0, _react.jsx)(_ui.WidthConsumer, null, function (_ref) {
27
30
  var width = _ref.width;
28
- return (0, _react.jsx)("div", {
31
+ return (0, _react.jsx)("div", (0, _extends2.default)({
29
32
  css: wrapperStyles,
30
- "data-mode": props.mode,
33
+ "data-mode": props.mode
34
+ }, (0, _experiments.editorExperiment)('advanced_layouts', true) && {
35
+ 'data-has-width': !!props.width
36
+ }, {
31
37
  style: {
32
38
  width: (0, _platformFeatureFlags.fg)('platform_editor_advanced_layouts_breakout_resizing') ?
33
39
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -38,6 +44,6 @@ function Breakout(props) {
38
44
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
39
45
  ,
40
46
  className: "fabric-editor-breakout-mark fabric-editor-block-mark"
41
- }, props.children);
47
+ }), props.children);
42
48
  });
43
49
  }
@@ -65,7 +65,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
65
65
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
66
66
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
67
67
  var packageName = "@atlaskit/renderer";
68
- var packageVersion = "112.6.0";
68
+ var packageVersion = "112.6.1";
69
69
  var setAsQueryContainerStyles = (0, _react2.css)({
70
70
  containerName: 'ak-renderer-wrapper',
71
71
  containerType: 'inline-size',
@@ -100,7 +100,7 @@ var fullWidthStyles = function fullWidthStyles(_ref5) {
100
100
  if (appearance !== 'full-width') {
101
101
  return '';
102
102
  }
103
- return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t\tmax-width: ", "px;\n\t\tmargin: 0 auto;\n\n\t\t.fabric-editor-breakout-mark,\n\t\t.ak-renderer-extension {\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t", "\n\t"])), _editorSharedStyles.akEditorFullWidthLayoutWidth, (0, _table.isTableResizingEnabled)(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
103
+ return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t\tmax-width: ", "px;\n\t\tmargin: 0 auto;\n\n\t\t/* don't override if the breakout mark has width attribute defined */\n\t\t.fabric-editor-breakout-mark:not([data-has-width='true']),\n\t\t.ak-renderer-extension {\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t", "\n\t"])), _editorSharedStyles.akEditorFullWidthLayoutWidth, (0, _table.isTableResizingEnabled)(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
104
104
  };
105
105
  var breakoutWidthStyle = function breakoutWidthStyle() {
106
106
  return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t\t*:not([data-mark-type='fragment']) .", " {\n\t\t\t// TODO - improve inline style logic on table container so important styles aren't required here\n\t\t\twidth: 100% !important;\n\t\t\tleft: 0 !important;\n\t\t}\n\n\t\t[data-mark-type='fragment'] * .", " {\n\t\t\t// TODO - improve inline style logic on table container so important styles aren't required here\n\t\t\twidth: 100% !important;\n\t\t\tleft: 0 !important;\n\t\t}\n\t"])), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
@@ -26,7 +26,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
26
26
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
27
27
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState` is not object-safe
28
28
  var markStyles = function markStyles() {
29
- return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true']),\n \t\t&:hover:not(:focus) {\n \t", "\n \t\t}\n\t}\n"])), _adfSchema.AnnotationMarkStates.ACTIVE, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? (0, _styles.AnnotationSharedCSSByState)().common : '', (0, _styles.AnnotationSharedCSSByState)().blur, (0, _styles.AnnotationSharedCSSByState)().focus, (0, _styles.AnnotationSharedCSSByState)().hover);
29
+ return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true']),\n\t\t&:hover:not(:focus) {\n\t\t\t", "\n\t\t}\n\t}\n"])), _adfSchema.AnnotationMarkStates.ACTIVE, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? (0, _styles.AnnotationSharedCSSByState)().common : '', (0, _styles.AnnotationSharedCSSByState)().blur, (0, _styles.AnnotationSharedCSSByState)().focus, (0, _styles.AnnotationSharedCSSByState)().hover);
30
30
  };
31
31
  var isMobile = function isMobile() {
32
32
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  /**
2
3
  * @jsxRuntime classic
3
4
  * @jsx jsx
@@ -7,6 +8,7 @@ import { css, jsx } from '@emotion/react';
7
8
  import { WidthConsumer } from '@atlaskit/editor-common/ui';
8
9
  import { calcBreakoutWithCustomWidth, calcBreakoutWidth } from '@atlaskit/editor-common/utils';
9
10
  import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
11
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
12
  import { fg } from '@atlaskit/platform-feature-flags';
11
13
  const wrapperStyles = css({
12
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -18,9 +20,12 @@ const wrapperStyles = css({
18
20
  export default function Breakout(props) {
19
21
  return jsx(WidthConsumer, null, ({
20
22
  width
21
- }) => jsx("div", {
23
+ }) => jsx("div", _extends({
22
24
  css: wrapperStyles,
23
- "data-mode": props.mode,
25
+ "data-mode": props.mode
26
+ }, editorExperiment('advanced_layouts', true) && {
27
+ 'data-has-width': !!props.width
28
+ }, {
24
29
  style: {
25
30
  width: fg('platform_editor_advanced_layouts_breakout_resizing') ?
26
31
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -31,5 +36,5 @@ export default function Breakout(props) {
31
36
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
32
37
  ,
33
38
  className: "fabric-editor-breakout-mark fabric-editor-block-mark"
34
- }, props.children));
39
+ }), props.children));
35
40
  }
@@ -45,7 +45,7 @@ import { countNodes } from './count-nodes';
45
45
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
46
46
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
47
47
  const packageName = "@atlaskit/renderer";
48
- const packageVersion = "112.6.0";
48
+ const packageVersion = "112.6.1";
49
49
  const setAsQueryContainerStyles = css({
50
50
  containerName: 'ak-renderer-wrapper',
51
51
  containerType: 'inline-size',
@@ -306,7 +306,8 @@ const fullWidthStyles = ({
306
306
  max-width: ${akEditorFullWidthLayoutWidth}px;
307
307
  margin: 0 auto;
308
308
 
309
- .fabric-editor-breakout-mark,
309
+ /* don't override if the breakout mark has width attribute defined */
310
+ .fabric-editor-breakout-mark:not([data-has-width='true']),
310
311
  .ak-renderer-extension {
311
312
  width: 100% !important;
312
313
  }
@@ -28,9 +28,9 @@ const markStyles = () => css`
28
28
  ${AnnotationSharedCSSByState().focus}
29
29
  }
30
30
  &[data-is-hovered='true']:not([data-has-focus='true']),
31
- &:hover:not(:focus) {
32
- ${AnnotationSharedCSSByState().hover}
33
- }
31
+ &:hover:not(:focus) {
32
+ ${AnnotationSharedCSSByState().hover}
33
+ }
34
34
  }
35
35
  `;
36
36
  const isMobile = () => {
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  /**
2
3
  * @jsxRuntime classic
3
4
  * @jsx jsx
@@ -7,6 +8,7 @@ import { css, jsx } from '@emotion/react';
7
8
  import { WidthConsumer } from '@atlaskit/editor-common/ui';
8
9
  import { calcBreakoutWithCustomWidth, calcBreakoutWidth } from '@atlaskit/editor-common/utils';
9
10
  import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
11
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
12
  import { fg } from '@atlaskit/platform-feature-flags';
11
13
  var wrapperStyles = css({
12
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -18,9 +20,12 @@ var wrapperStyles = css({
18
20
  export default function Breakout(props) {
19
21
  return jsx(WidthConsumer, null, function (_ref) {
20
22
  var width = _ref.width;
21
- return jsx("div", {
23
+ return jsx("div", _extends({
22
24
  css: wrapperStyles,
23
- "data-mode": props.mode,
25
+ "data-mode": props.mode
26
+ }, editorExperiment('advanced_layouts', true) && {
27
+ 'data-has-width': !!props.width
28
+ }, {
24
29
  style: {
25
30
  width: fg('platform_editor_advanced_layouts_breakout_resizing') ?
26
31
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
@@ -31,6 +36,6 @@ export default function Breakout(props) {
31
36
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
32
37
  ,
33
38
  className: "fabric-editor-breakout-mark fabric-editor-block-mark"
34
- }, props.children);
39
+ }), props.children);
35
40
  });
36
41
  }
@@ -55,7 +55,7 @@ import { countNodes } from './count-nodes';
55
55
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
56
56
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
57
57
  var packageName = "@atlaskit/renderer";
58
- var packageVersion = "112.6.0";
58
+ var packageVersion = "112.6.1";
59
59
  var setAsQueryContainerStyles = css({
60
60
  containerName: 'ak-renderer-wrapper',
61
61
  containerType: 'inline-size',
@@ -91,7 +91,7 @@ var fullWidthStyles = function fullWidthStyles(_ref5) {
91
91
  if (appearance !== 'full-width') {
92
92
  return '';
93
93
  }
94
- return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n\t\tmax-width: ", "px;\n\t\tmargin: 0 auto;\n\n\t\t.fabric-editor-breakout-mark,\n\t\t.ak-renderer-extension {\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t", "\n\t"])), akEditorFullWidthLayoutWidth, isTableResizingEnabled(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
94
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n\t\tmax-width: ", "px;\n\t\tmargin: 0 auto;\n\n\t\t/* don't override if the breakout mark has width attribute defined */\n\t\t.fabric-editor-breakout-mark:not([data-has-width='true']),\n\t\t.ak-renderer-extension {\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t", "\n\t"])), akEditorFullWidthLayoutWidth, isTableResizingEnabled(appearance) ? '' : "\n .pm-table-container {\n width: 100% !important;\n }\n ");
95
95
  };
96
96
  var breakoutWidthStyle = function breakoutWidthStyle() {
97
97
  return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\t\t*:not([data-mark-type='fragment']) .", " {\n\t\t\t// TODO - improve inline style logic on table container so important styles aren't required here\n\t\t\twidth: 100% !important;\n\t\t\tleft: 0 !important;\n\t\t}\n\n\t\t[data-mark-type='fragment'] * .", " {\n\t\t\t// TODO - improve inline style logic on table container so important styles aren't required here\n\t\t\twidth: 100% !important;\n\t\t\tleft: 0 !important;\n\t\t}\n\t"])), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER);
@@ -21,7 +21,7 @@ import { inlineCommentMessages } from '../../../messages';
21
21
 
22
22
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState` is not object-safe
23
23
  var markStyles = function markStyles() {
24
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true']),\n \t\t&:hover:not(:focus) {\n \t", "\n \t\t}\n\t}\n"])), AnnotationMarkStates.ACTIVE, fg('editor_inline_comments_on_inline_nodes') ? AnnotationSharedCSSByState().common : '', AnnotationSharedCSSByState().blur, AnnotationSharedCSSByState().focus, AnnotationSharedCSSByState().hover);
24
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true']),\n\t\t&:hover:not(:focus) {\n\t\t\t", "\n\t\t}\n\t}\n"])), AnnotationMarkStates.ACTIVE, fg('editor_inline_comments_on_inline_nodes') ? AnnotationSharedCSSByState().common : '', AnnotationSharedCSSByState().blur, AnnotationSharedCSSByState().focus, AnnotationSharedCSSByState().hover);
25
25
  };
26
26
  var isMobile = function isMobile() {
27
27
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "112.6.0",
3
+ "version": "112.6.1",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,20 +24,20 @@
24
24
  "dependencies": {
25
25
  "@atlaskit/adf-schema": "^44.2.0",
26
26
  "@atlaskit/adf-utils": "^19.13.0",
27
- "@atlaskit/analytics-listeners": "^8.11.0",
27
+ "@atlaskit/analytics-listeners": "^8.12.0",
28
28
  "@atlaskit/analytics-namespaced-context": "^6.12.0",
29
29
  "@atlaskit/analytics-next": "^10.1.0",
30
30
  "@atlaskit/button": "^20.3.0",
31
31
  "@atlaskit/code": "^15.6.0",
32
- "@atlaskit/editor-common": "^95.4.0",
32
+ "@atlaskit/editor-common": "^95.6.0",
33
33
  "@atlaskit/editor-json-transformer": "^8.21.0",
34
34
  "@atlaskit/editor-palette": "1.6.3",
35
35
  "@atlaskit/editor-prosemirror": "6.0.0",
36
36
  "@atlaskit/editor-shared-styles": "^3.2.0",
37
37
  "@atlaskit/emoji": "^67.11.0",
38
38
  "@atlaskit/feature-gate-js-client": "^4.23.0",
39
- "@atlaskit/icon": "^22.25.0",
40
- "@atlaskit/link-datasource": "^3.12.0",
39
+ "@atlaskit/icon": "^22.26.0",
40
+ "@atlaskit/link-datasource": "^3.13.0",
41
41
  "@atlaskit/media-card": "^78.14.0",
42
42
  "@atlaskit/media-client": "^28.3.0",
43
43
  "@atlaskit/media-client-react": "^2.3.0",
@@ -47,10 +47,10 @@
47
47
  "@atlaskit/media-viewer": "^49.4.0",
48
48
  "@atlaskit/platform-feature-flags": "^0.3.0",
49
49
  "@atlaskit/smart-card": "^30.3.0",
50
- "@atlaskit/status": "^1.7.0",
50
+ "@atlaskit/status": "^1.8.0",
51
51
  "@atlaskit/task-decision": "^17.11.0",
52
52
  "@atlaskit/theme": "^14.0.0",
53
- "@atlaskit/tmp-editor-statsig": "^2.19.0",
53
+ "@atlaskit/tmp-editor-statsig": "^2.20.0",
54
54
  "@atlaskit/tokens": "^2.3.0",
55
55
  "@atlaskit/tooltip": "^18.9.0",
56
56
  "@babel/runtime": "^7.0.0",