@atlaskit/renderer 124.7.1 → 124.8.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,24 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 124.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`68b3394583485`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/68b3394583485) -
8
+ [ux] [EDITOR-2378] Add renderer support for bodied sync block
9
+ - Updated dependencies
10
+
11
+ ## 124.8.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`18aec70029328`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/18aec70029328) -
16
+ EDITOR-2420 Rename parameter values of `dense` contentMode to `compact`
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies
21
+
3
22
  ## 124.7.1
4
23
 
5
24
  ### Patch Changes
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = BodiedSyncBlock;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ function BodiedSyncBlock(props) {
10
+ var children = props.children,
11
+ localId = props.localId,
12
+ resourceId = props.resourceId;
13
+ return /*#__PURE__*/_react.default.createElement("div", {
14
+ "data-bodied-sync-block": true,
15
+ "data-local-id": localId,
16
+ "data-resource-id": resourceId
17
+ }, children);
18
+ }
@@ -447,6 +447,18 @@ var SyncBlockLoader = (0, _reactLoadable.default)({
447
447
  return null;
448
448
  }
449
449
  });
450
+ var BodiedSyncBlock = (0, _reactLoadable.default)({
451
+ loader: function loader() {
452
+ return Promise.resolve().then(function () {
453
+ return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_renderer-node_BodiedSyncBlock" */'./bodiedSyncBlock'));
454
+ }).then(function (mod) {
455
+ return mod.default;
456
+ });
457
+ },
458
+ loading: function loading() {
459
+ return null;
460
+ }
461
+ });
450
462
  var nodeToReact = exports.nodeToReact = {
451
463
  blockquote: _blockquote.default,
452
464
  bulletList: _bulletList.default,
@@ -490,6 +502,7 @@ var nodeToReact = exports.nodeToReact = {
490
502
  unsupportedInline: _ui.UnsupportedInline,
491
503
  expand: Expand,
492
504
  syncBlock: SyncBlockLoader,
505
+ bodiedSyncBlock: BodiedSyncBlock,
493
506
  nestedExpand: Expand,
494
507
  embedCard: EmbedCard,
495
508
  blockTaskItem: TaskItem
@@ -227,7 +227,7 @@ function Expand(_ref2) {
227
227
  return setFocused(false);
228
228
  }, []);
229
229
  var isCompactModeSupported = (0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test') && (0, _platformFeatureFlags.fg)('platform_editor_content_mode_button_mvp');
230
- var isDense = rendererContentMode === 'dense' && isCompactModeSupported;
230
+ var isCompact = rendererContentMode === ((0, _expValEquals.expValEquals)('confluence_content_mode_replace_dense_with_compact', 'cohort', 'test') ? 'compact' : 'dense') && isCompactModeSupported;
231
231
  return (0, _react.jsx)(Container, {
232
232
  "data-testid": "expand-container-".concat(nodeType, "-").concat(id),
233
233
  "data-node-type": nodeType,
@@ -287,7 +287,7 @@ function Expand(_ref2) {
287
287
  spacing: "spacious",
288
288
  size: "small"
289
289
  }))), (0, _react.jsx)("span", {
290
- css: [titleStyles, isDense && titleStylesDense],
290
+ css: [titleStyles, isCompact && titleStylesDense],
291
291
  id: id
292
292
  }, title || intl.formatMessage(_ui.expandMessages.expandDefaultTitle))), (0, _react.jsx)(ContentContainer, {
293
293
  expanded: expanded
@@ -8,7 +8,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
8
8
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
9
9
  var getBaseFontSize = exports.getBaseFontSize = function getBaseFontSize(appearance, contentMode) {
10
10
  if ((0, _expValEquals.expValEquals)('cc_editor_ai_content_mode', 'variant', 'test')) {
11
- if (contentMode === 'dense') {
11
+ if (contentMode === ((0, _expValEquals.expValEquals)('confluence_content_mode_replace_dense_with_compact', 'cohort', 'test') ? 'compact' : 'dense')) {
12
12
  return _editorSharedStyles.akEditorFullPageDenseFontSize;
13
13
  }
14
14
  }
@@ -68,7 +68,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
68
68
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
69
69
  var TABLE_WIDTH_INFO_TIMEOUT = 10000;
70
70
  var packageName = "@atlaskit/renderer";
71
- var packageVersion = "124.7.0";
71
+ var packageVersion = "0.0.0-development";
72
72
  var setAsQueryContainerStyles = (0, _react2.css)({
73
73
  containerName: 'ak-renderer-wrapper',
74
74
  containerType: 'inline-size'
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ export default function BodiedSyncBlock(props) {
3
+ const {
4
+ children,
5
+ localId,
6
+ resourceId
7
+ } = props;
8
+ return /*#__PURE__*/React.createElement("div", {
9
+ "data-bodied-sync-block": true,
10
+ "data-local-id": localId,
11
+ "data-resource-id": resourceId
12
+ }, children);
13
+ }
@@ -131,6 +131,10 @@ const SyncBlockLoader = Loadable({
131
131
  './syncBlock').then(mod => mod.default),
132
132
  loading: () => null
133
133
  });
134
+ const BodiedSyncBlock = Loadable({
135
+ loader: () => import( /* webpackChunkName: "@atlaskit-internal_renderer-node_BodiedSyncBlock" */'./bodiedSyncBlock').then(mod => mod.default),
136
+ loading: () => null
137
+ });
134
138
  export const nodeToReact = {
135
139
  blockquote: Blockquote,
136
140
  bulletList: BulletList,
@@ -174,6 +178,7 @@ export const nodeToReact = {
174
178
  unsupportedInline: UnsupportedInline,
175
179
  expand: Expand,
176
180
  syncBlock: SyncBlockLoader,
181
+ bodiedSyncBlock: BodiedSyncBlock,
177
182
  nestedExpand: Expand,
178
183
  embedCard: EmbedCard,
179
184
  blockTaskItem: TaskItem
@@ -207,7 +207,7 @@ function Expand({
207
207
  const handleFocus = useCallback(() => setFocused(true), []);
208
208
  const handleBlur = useCallback(() => setFocused(false), []);
209
209
  const isCompactModeSupported = expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp');
210
- const isDense = rendererContentMode === 'dense' && isCompactModeSupported;
210
+ const isCompact = rendererContentMode === (expValEquals('confluence_content_mode_replace_dense_with_compact', 'cohort', 'test') ? 'compact' : 'dense') && isCompactModeSupported;
211
211
  return jsx(Container, {
212
212
  "data-testid": `expand-container-${nodeType}-${id}`,
213
213
  "data-node-type": nodeType,
@@ -267,7 +267,7 @@ function Expand({
267
267
  spacing: "spacious",
268
268
  size: "small"
269
269
  }))), jsx("span", {
270
- css: [titleStyles, isDense && titleStylesDense],
270
+ css: [titleStyles, isCompact && titleStylesDense],
271
271
  id: id
272
272
  }, title || intl.formatMessage(expandMessages.expandDefaultTitle))), jsx(ContentContainer, {
273
273
  expanded: expanded
@@ -2,7 +2,7 @@ import { akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize } from '
2
2
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
3
  export const getBaseFontSize = (appearance, contentMode) => {
4
4
  if (expValEquals('cc_editor_ai_content_mode', 'variant', 'test')) {
5
- if (contentMode === 'dense') {
5
+ if (contentMode === (expValEquals('confluence_content_mode_replace_dense_with_compact', 'cohort', 'test') ? 'compact' : 'dense')) {
6
6
  return akEditorFullPageDenseFontSize;
7
7
  }
8
8
  }
@@ -54,7 +54,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
54
54
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
55
55
  const TABLE_WIDTH_INFO_TIMEOUT = 10000;
56
56
  const packageName = "@atlaskit/renderer";
57
- const packageVersion = "124.7.0";
57
+ const packageVersion = "0.0.0-development";
58
58
  const setAsQueryContainerStyles = css({
59
59
  containerName: 'ak-renderer-wrapper',
60
60
  containerType: 'inline-size'
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export default function BodiedSyncBlock(props) {
3
+ var children = props.children,
4
+ localId = props.localId,
5
+ resourceId = props.resourceId;
6
+ return /*#__PURE__*/React.createElement("div", {
7
+ "data-bodied-sync-block": true,
8
+ "data-local-id": localId,
9
+ "data-resource-id": resourceId
10
+ }, children);
11
+ }
@@ -254,6 +254,16 @@ var SyncBlockLoader = Loadable({
254
254
  return null;
255
255
  }
256
256
  });
257
+ var BodiedSyncBlock = Loadable({
258
+ loader: function loader() {
259
+ return import( /* webpackChunkName: "@atlaskit-internal_renderer-node_BodiedSyncBlock" */'./bodiedSyncBlock').then(function (mod) {
260
+ return mod.default;
261
+ });
262
+ },
263
+ loading: function loading() {
264
+ return null;
265
+ }
266
+ });
257
267
  export var nodeToReact = {
258
268
  blockquote: Blockquote,
259
269
  bulletList: BulletList,
@@ -297,6 +307,7 @@ export var nodeToReact = {
297
307
  unsupportedInline: UnsupportedInline,
298
308
  expand: Expand,
299
309
  syncBlock: SyncBlockLoader,
310
+ bodiedSyncBlock: BodiedSyncBlock,
300
311
  nestedExpand: Expand,
301
312
  embedCard: EmbedCard,
302
313
  blockTaskItem: TaskItem
@@ -218,7 +218,7 @@ function Expand(_ref2) {
218
218
  return setFocused(false);
219
219
  }, []);
220
220
  var isCompactModeSupported = expValEquals('cc_editor_ai_content_mode', 'variant', 'test') && fg('platform_editor_content_mode_button_mvp');
221
- var isDense = rendererContentMode === 'dense' && isCompactModeSupported;
221
+ var isCompact = rendererContentMode === (expValEquals('confluence_content_mode_replace_dense_with_compact', 'cohort', 'test') ? 'compact' : 'dense') && isCompactModeSupported;
222
222
  return jsx(Container, {
223
223
  "data-testid": "expand-container-".concat(nodeType, "-").concat(id),
224
224
  "data-node-type": nodeType,
@@ -278,7 +278,7 @@ function Expand(_ref2) {
278
278
  spacing: "spacious",
279
279
  size: "small"
280
280
  }))), jsx("span", {
281
- css: [titleStyles, isDense && titleStylesDense],
281
+ css: [titleStyles, isCompact && titleStylesDense],
282
282
  id: id
283
283
  }, title || intl.formatMessage(expandMessages.expandDefaultTitle))), jsx(ContentContainer, {
284
284
  expanded: expanded
@@ -2,7 +2,7 @@ import { akEditorFullPageDefaultFontSize, akEditorFullPageDenseFontSize } from '
2
2
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
3
  export var getBaseFontSize = function getBaseFontSize(appearance, contentMode) {
4
4
  if (expValEquals('cc_editor_ai_content_mode', 'variant', 'test')) {
5
- if (contentMode === 'dense') {
5
+ if (contentMode === (expValEquals('confluence_content_mode_replace_dense_with_compact', 'cohort', 'test') ? 'compact' : 'dense')) {
6
6
  return akEditorFullPageDenseFontSize;
7
7
  }
8
8
  }
@@ -59,7 +59,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
59
59
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
60
60
  var TABLE_WIDTH_INFO_TIMEOUT = 10000;
61
61
  var packageName = "@atlaskit/renderer";
62
- var packageVersion = "124.7.0";
62
+ var packageVersion = "0.0.0-development";
63
63
  var setAsQueryContainerStyles = css({
64
64
  containerName: 'ak-renderer-wrapper',
65
65
  containerType: 'inline-size'
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ children: React.ReactNode;
4
+ localId: string;
5
+ resourceId: string;
6
+ }
7
+ export default function BodiedSyncBlock(props: Props): React.JSX.Element;
8
+ export {};
@@ -1,5 +1,5 @@
1
1
  export type RendererAppearance = 'comment' | 'full-page' | 'full-width' | undefined;
2
- export type RendererContentMode = 'standard' | 'dense' | undefined;
2
+ export type RendererContentMode = 'standard' | 'dense' | 'compact' | undefined;
3
3
  /**
4
4
  * DO NOT USE THESE OPTIONS
5
5
  * These StickyHeaderConfig_DO_NOT_USE options are being TEMPORARILY added so Confluence can use Sticky Table Headers
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ children: React.ReactNode;
4
+ localId: string;
5
+ resourceId: string;
6
+ }
7
+ export default function BodiedSyncBlock(props: Props): React.JSX.Element;
8
+ export {};
@@ -1,5 +1,5 @@
1
1
  export type RendererAppearance = 'comment' | 'full-page' | 'full-width' | undefined;
2
- export type RendererContentMode = 'standard' | 'dense' | undefined;
2
+ export type RendererContentMode = 'standard' | 'dense' | 'compact' | undefined;
3
3
  /**
4
4
  * DO NOT USE THESE OPTIONS
5
5
  * These StickyHeaderConfig_DO_NOT_USE options are being TEMPORARILY added so Confluence can use Sticky Table Headers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "124.7.1",
3
+ "version": "124.8.1",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  "@atlaskit/feature-gate-js-client": "^5.5.0",
42
42
  "@atlaskit/icon": "^28.5.0",
43
43
  "@atlaskit/link": "^3.2.0",
44
- "@atlaskit/link-datasource": "^4.26.0",
44
+ "@atlaskit/link-datasource": "^4.27.0",
45
45
  "@atlaskit/link-extractors": "^2.4.0",
46
46
  "@atlaskit/media-card": "^79.5.0",
47
47
  "@atlaskit/media-client": "^35.5.0",
@@ -57,7 +57,7 @@
57
57
  "@atlaskit/status": "^3.0.0",
58
58
  "@atlaskit/task-decision": "^19.2.0",
59
59
  "@atlaskit/theme": "^21.0.0",
60
- "@atlaskit/tmp-editor-statsig": "^13.13.0",
60
+ "@atlaskit/tmp-editor-statsig": "^13.16.0",
61
61
  "@atlaskit/tokens": "^7.0.0",
62
62
  "@atlaskit/tooltip": "^20.6.0",
63
63
  "@atlaskit/visually-hidden": "^3.0.0",
@@ -71,7 +71,7 @@
71
71
  "uuid": "^3.1.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "@atlaskit/editor-common": "^110.14.0",
74
+ "@atlaskit/editor-common": "^110.15.0",
75
75
  "@atlaskit/link-provider": "^4.0.0",
76
76
  "@atlaskit/media-core": "^37.0.0",
77
77
  "react": "^18.2.0",
@@ -94,7 +94,7 @@
94
94
  "@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-958ca0ab9d.patch",
95
95
  "@atlaskit/profilecard": "^24.20.0",
96
96
  "@atlaskit/util-data-test": "^18.3.0",
97
- "@atlassian/feature-flags-test-utils": "^0.3.0",
97
+ "@atlassian/feature-flags-test-utils": "^1.0.0",
98
98
  "@testing-library/react": "^13.4.0",
99
99
  "@testing-library/react-hooks": "^8.0.1",
100
100
  "@testing-library/user-event": "^14.4.3",