@atlaskit/renderer 124.16.4 → 124.16.6

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.16.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e1fb8551a5f6a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e1fb8551a5f6a) -
8
+ ED-29571: Update renderer with support for hash link to block
9
+ - [`f910a750d2d52`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f910a750d2d52) -
10
+ Moving all references to aifc_create_enabled FG over to a new seperately controlled
11
+ platform_editor_ai_aifc_streaming gate
12
+ - Updated dependencies
13
+
14
+ ## 124.16.5
15
+
16
+ ### Patch Changes
17
+
18
+ - [`0eb9453d515b3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0eb9453d515b3) -
19
+ Added the ability to override the codeBlock and windowedCodeBlock nodes.
20
+ - Updated dependencies
21
+
3
22
  ## 124.16.4
4
23
 
5
24
  ### Patch Changes
@@ -53,9 +53,6 @@
53
53
  {
54
54
  "path": "../../editor-shared-styles/afm-cc/tsconfig.json"
55
55
  },
56
- {
57
- "path": "../../editor-tables/afm-cc/tsconfig.json"
58
- },
59
56
  {
60
57
  "path": "../../../elements/emoji/afm-cc/tsconfig.json"
61
58
  },
@@ -53,9 +53,6 @@
53
53
  {
54
54
  "path": "../../editor-shared-styles/afm-jira/tsconfig.json"
55
55
  },
56
- {
57
- "path": "../../editor-tables/afm-jira/tsconfig.json"
58
- },
59
56
  {
60
57
  "path": "../../../elements/emoji/afm-jira/tsconfig.json"
61
58
  },
@@ -53,9 +53,6 @@
53
53
  {
54
54
  "path": "../../editor-shared-styles/afm-products/tsconfig.json"
55
55
  },
56
- {
57
- "path": "../../editor-tables/afm-products/tsconfig.json"
58
- },
59
56
  {
60
57
  "path": "../../../elements/emoji/afm-products/tsconfig.json"
61
58
  },
@@ -28,6 +28,8 @@ var _Expand = _interopRequireDefault(require("../../ui/Expand"));
28
28
  */
29
29
  var nodeToReact = {
30
30
  codeBlock: _codeBlock.default,
31
+ windowedCodeBlock: _codeBlock.default,
32
+ // CodeBlock is similar to windowedCodeBlock, just with sync loading and without the isInViewport check.
31
33
  date: _date.default,
32
34
  decisionList: _decisionList.default,
33
35
  decisionItem: _decisionItem.default,
@@ -514,15 +514,27 @@ var toReact = exports.toReact = function toReact(node, flags, nodeComponents
514
514
  if (node.type.name === 'doc' && (flags === null || flags === void 0 ? void 0 : flags.allowSelectAllTrap) === true) {
515
515
  return _doc.DocWithSelectAllTrap;
516
516
  }
517
- if (node.type.name === 'codeBlock') {
518
- if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
519
- return WindowedCodeBlock;
517
+ if (!(0, _platformFeatureFlags.fg)('jfp-magma-ssr-iv-editor-codeblock')) {
518
+ if (node.type.name === 'codeBlock') {
519
+ if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
520
+ return WindowedCodeBlock;
521
+ }
522
+ return CodeBlock;
520
523
  }
521
- return CodeBlock;
522
524
  }
523
525
 
524
526
  // Allowing custom components to override those provided in nodeToReact
525
527
  var nodes = _objectSpread(_objectSpread({}, nodeToReact), nodeComponents);
528
+ if ((0, _platformFeatureFlags.fg)('jfp-magma-ssr-iv-editor-codeblock')) {
529
+ if (node.type.name === 'codeBlock') {
530
+ var _nodes$codeBlock;
531
+ if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
532
+ var _nodes$windowedCodeBl;
533
+ return (_nodes$windowedCodeBl = nodes.windowedCodeBlock) !== null && _nodes$windowedCodeBl !== void 0 ? _nodes$windowedCodeBl : WindowedCodeBlock;
534
+ }
535
+ return (_nodes$codeBlock = nodes.codeBlock) !== null && _nodes$codeBlock !== void 0 ? _nodes$codeBlock : CodeBlock;
536
+ }
537
+ }
526
538
  nodes['multiBodiedExtension'] = (0, _platformFeatureFlags.fg)('platform_editor_multi_body_extension_extensibility') ? _multiBodiedExtension.default : _multiBodiedExtensionOld.default;
527
539
  return nodes[node.type.name];
528
540
  };
@@ -1655,7 +1655,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
1655
1655
  '--ak-renderer-editor-font-heading-h6': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.heading.h6')),
1656
1656
  '--ak-renderer-editor-font-normal-text': "".concat((0, _ugcTokens.editorUGCToken)('editor.font.body'))
1657
1657
  },
1658
- css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) && rendererMaxWidthStyles, !(0, _platformFeatureFlags.fg)('aifc_create_enabled') && telepointerStyles, (0, _platformFeatureFlags.fg)('aifc_create_enabled') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && isCompactModeSupported && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, (0, _expValEquals.expValEquals)('platform_editor_text_highlight_padding', 'isEnabled', true) &&
1658
+ css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true)) && !(0, _table.isTableResizingEnabled)(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', true) && rendererMaxWidthStyles, !(0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_streaming') && telepointerStyles, (0, _platformFeatureFlags.fg)('platform_editor_ai_aifc_streaming') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && isCompactModeSupported && extensionStyle, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, (0, _expValEquals.expValEquals)('platform_editor_text_highlight_padding', 'isEnabled', true) &&
1659
1659
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
1660
1660
  textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, (0, _experiments.editorExperiment)('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
1661
1661
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -69,7 +69,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
69
69
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
70
70
  var TABLE_INFO_TIMEOUT = 10000;
71
71
  var packageName = "@atlaskit/renderer";
72
- var packageVersion = "0.0.0-development";
72
+ var packageVersion = "124.16.5";
73
73
  var setAsQueryContainerStyles = (0, _react2.css)({
74
74
  containerName: 'ak-renderer-wrapper',
75
75
  containerType: 'inline-size'
@@ -782,7 +782,9 @@ var RendererWithAnnotationSelection = function RendererWithAnnotationSelection(p
782
782
  var innerRef = props.innerRef || localRef;
783
783
 
784
784
  // @see https://hello.jira.atlassian.cloud/browse/EDITOR-3389
785
- if (props.appearance === 'max' && (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', false)) {
785
+ if (props.appearance === 'max' &&
786
+ // @ts-expect-error - false is not allowed as an expected value
787
+ (0, _expValEquals.expValEquals)('editor_tinymce_full_width_mode', 'isEnabled', false)) {
786
788
  props.appearance = 'full-width';
787
789
  }
788
790
  if (!allowAnnotations) {
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useScrollToLocalId = void 0;
7
7
  var _react = require("react");
8
8
  var _browserApis = require("@atlaskit/browser-apis");
9
+ var _blockMenu = require("@atlaskit/editor-common/block-menu");
9
10
  // Find editor node dom with localId - similar to confluence useScrollOnUrlChange.ts
10
11
  var getLocalIdSelector = function getLocalIdSelector(localId, container) {
11
12
  // Check if the element with data-local-id exists
@@ -45,9 +46,10 @@ var useScrollToLocalId = exports.useScrollToLocalId = function useScrollToLocalI
45
46
  return;
46
47
  }
47
48
 
48
- // Parse URL parameters for block ID
49
- var urlParams = new URLSearchParams(window.location.search);
50
- var blockId = urlParams.get('block');
49
+ // Parse hash fragment for block ID (format: #block-{localId})
50
+ var hash = window.location.hash;
51
+ var defaultPrefixWithHash = "#".concat(_blockMenu.DEFAULT_BLOCK_LINK_HASH_PREFIX);
52
+ var blockId = hash.startsWith(defaultPrefixWithHash) ? hash.slice(defaultPrefixWithHash.length) : null;
51
53
  if (!blockId) {
52
54
  return;
53
55
  }
@@ -22,6 +22,8 @@ import Expand from '../../ui/Expand';
22
22
  */
23
23
  const nodeToReact = {
24
24
  codeBlock: CodeBlock,
25
+ windowedCodeBlock: CodeBlock,
26
+ // CodeBlock is similar to windowedCodeBlock, just with sync loading and without the isInViewport check.
25
27
  date: Date,
26
28
  decisionList: DecisionList,
27
29
  decisionItem: DecisionItem,
@@ -190,11 +190,13 @@ export const toReact = (node, flags, nodeComponents
190
190
  if (node.type.name === 'doc' && (flags === null || flags === void 0 ? void 0 : flags.allowSelectAllTrap) === true) {
191
191
  return DocWithSelectAllTrap;
192
192
  }
193
- if (node.type.name === 'codeBlock') {
194
- if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
195
- return WindowedCodeBlock;
193
+ if (!fg('jfp-magma-ssr-iv-editor-codeblock')) {
194
+ if (node.type.name === 'codeBlock') {
195
+ if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
196
+ return WindowedCodeBlock;
197
+ }
198
+ return CodeBlock;
196
199
  }
197
- return CodeBlock;
198
200
  }
199
201
 
200
202
  // Allowing custom components to override those provided in nodeToReact
@@ -202,6 +204,16 @@ export const toReact = (node, flags, nodeComponents
202
204
  ...nodeToReact,
203
205
  ...nodeComponents
204
206
  };
207
+ if (fg('jfp-magma-ssr-iv-editor-codeblock')) {
208
+ if (node.type.name === 'codeBlock') {
209
+ var _nodes$codeBlock;
210
+ if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
211
+ var _nodes$windowedCodeBl;
212
+ return (_nodes$windowedCodeBl = nodes.windowedCodeBlock) !== null && _nodes$windowedCodeBl !== void 0 ? _nodes$windowedCodeBl : WindowedCodeBlock;
213
+ }
214
+ return (_nodes$codeBlock = nodes.codeBlock) !== null && _nodes$codeBlock !== void 0 ? _nodes$codeBlock : CodeBlock;
215
+ }
216
+ }
205
217
  nodes['multiBodiedExtension'] = fg('platform_editor_multi_body_extension_extensibility') ? MultiBodiedExtension : MultiBodiedExtensionOld;
206
218
  return nodes[node.type.name];
207
219
  };
@@ -2078,7 +2078,7 @@ export const RendererStyleContainer = props => {
2078
2078
  '--ak-renderer-editor-font-heading-h6': `${editorUGCToken('editor.font.heading.h6')}`,
2079
2079
  '--ak-renderer-editor-font-normal-text': `${editorUGCToken('editor.font.body')}`
2080
2080
  },
2081
- css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && rendererMaxWidthStyles, !fg('aifc_create_enabled') && telepointerStyles, fg('aifc_create_enabled') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true) &&
2081
+ css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && rendererMaxWidthStyles, !fg('platform_editor_ai_aifc_streaming') && telepointerStyles, fg('platform_editor_ai_aifc_streaming') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true) &&
2082
2082
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
2083
2083
  textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
2084
2084
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -55,7 +55,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
55
55
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
56
56
  const TABLE_INFO_TIMEOUT = 10000;
57
57
  const packageName = "@atlaskit/renderer";
58
- const packageVersion = "0.0.0-development";
58
+ const packageVersion = "124.16.5";
59
59
  const setAsQueryContainerStyles = css({
60
60
  containerName: 'ak-renderer-wrapper',
61
61
  containerType: 'inline-size'
@@ -769,7 +769,9 @@ const RendererWithAnnotationSelection = props => {
769
769
  const innerRef = props.innerRef || localRef;
770
770
 
771
771
  // @see https://hello.jira.atlassian.cloud/browse/EDITOR-3389
772
- if (props.appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', false)) {
772
+ if (props.appearance === 'max' &&
773
+ // @ts-expect-error - false is not allowed as an expected value
774
+ expValEquals('editor_tinymce_full_width_mode', 'isEnabled', false)) {
773
775
  props.appearance = 'full-width';
774
776
  }
775
777
  if (!allowAnnotations) {
@@ -1,5 +1,6 @@
1
1
  import { useEffect } from 'react';
2
2
  import { getDocument } from '@atlaskit/browser-apis';
3
+ import { DEFAULT_BLOCK_LINK_HASH_PREFIX } from '@atlaskit/editor-common/block-menu';
3
4
 
4
5
  // Find editor node dom with localId - similar to confluence useScrollOnUrlChange.ts
5
6
  const getLocalIdSelector = (localId, container) => {
@@ -40,9 +41,10 @@ export const useScrollToLocalId = (containerRef, shouldScrollToLocalId) => {
40
41
  return;
41
42
  }
42
43
 
43
- // Parse URL parameters for block ID
44
- const urlParams = new URLSearchParams(window.location.search);
45
- const blockId = urlParams.get('block');
44
+ // Parse hash fragment for block ID (format: #block-{localId})
45
+ const hash = window.location.hash;
46
+ const defaultPrefixWithHash = `#${DEFAULT_BLOCK_LINK_HASH_PREFIX}`;
47
+ const blockId = hash.startsWith(defaultPrefixWithHash) ? hash.slice(defaultPrefixWithHash.length) : null;
46
48
  if (!blockId) {
47
49
  return;
48
50
  }
@@ -22,6 +22,8 @@ import Expand from '../../ui/Expand';
22
22
  */
23
23
  var nodeToReact = {
24
24
  codeBlock: CodeBlock,
25
+ windowedCodeBlock: CodeBlock,
26
+ // CodeBlock is similar to windowedCodeBlock, just with sync loading and without the isInViewport check.
25
27
  date: Date,
26
28
  decisionList: DecisionList,
27
29
  decisionItem: DecisionItem,
@@ -319,15 +319,27 @@ export var toReact = function toReact(node, flags, nodeComponents
319
319
  if (node.type.name === 'doc' && (flags === null || flags === void 0 ? void 0 : flags.allowSelectAllTrap) === true) {
320
320
  return DocWithSelectAllTrap;
321
321
  }
322
- if (node.type.name === 'codeBlock') {
323
- if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
324
- return WindowedCodeBlock;
322
+ if (!fg('jfp-magma-ssr-iv-editor-codeblock')) {
323
+ if (node.type.name === 'codeBlock') {
324
+ if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
325
+ return WindowedCodeBlock;
326
+ }
327
+ return CodeBlock;
325
328
  }
326
- return CodeBlock;
327
329
  }
328
330
 
329
331
  // Allowing custom components to override those provided in nodeToReact
330
332
  var nodes = _objectSpread(_objectSpread({}, nodeToReact), nodeComponents);
333
+ if (fg('jfp-magma-ssr-iv-editor-codeblock')) {
334
+ if (node.type.name === 'codeBlock') {
335
+ var _nodes$codeBlock;
336
+ if ((flags === null || flags === void 0 ? void 0 : flags.allowWindowedCodeBlock) === true) {
337
+ var _nodes$windowedCodeBl;
338
+ return (_nodes$windowedCodeBl = nodes.windowedCodeBlock) !== null && _nodes$windowedCodeBl !== void 0 ? _nodes$windowedCodeBl : WindowedCodeBlock;
339
+ }
340
+ return (_nodes$codeBlock = nodes.codeBlock) !== null && _nodes$codeBlock !== void 0 ? _nodes$codeBlock : CodeBlock;
341
+ }
342
+ }
331
343
  nodes['multiBodiedExtension'] = fg('platform_editor_multi_body_extension_extensibility') ? MultiBodiedExtension : MultiBodiedExtensionOld;
332
344
  return nodes[node.type.name];
333
345
  };
@@ -1648,7 +1648,7 @@ export var RendererStyleContainer = function RendererStyleContainer(props) {
1648
1648
  '--ak-renderer-editor-font-heading-h6': "".concat(editorUGCToken('editor.font.heading.h6')),
1649
1649
  '--ak-renderer-editor-font-normal-text': "".concat(editorUGCToken('editor.font.body'))
1650
1650
  },
1651
- css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && rendererMaxWidthStyles, !fg('aifc_create_enabled') && telepointerStyles, fg('aifc_create_enabled') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true) &&
1651
+ css: [baseStyles, hideHeadingCopyLinkWrapperStyles, appearance === 'full-page' && isPreviewPanelResponsivenessOn && rendererFullPageStylesWithReducedPadding, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && rendererFullPageStyles, appearance === 'full-width' && rendererFullWidthStyles, (appearance === 'full-width' || appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true)) && !isTableResizingEnabled(appearance) && rendererFullWidthStylesForTableResizing, appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', true) && rendererMaxWidthStyles, !fg('platform_editor_ai_aifc_streaming') && telepointerStyles, fg('platform_editor_ai_aifc_streaming') && rovoTelepointerStyles, whitespaceSharedStyles, blockquoteSharedStyles, fg('platform_editor_typography_ugc') ? headingsSharedStylesWithEditorUGC : headingsSharedStyles, headingWithAlignmentStyles, ruleSharedStyles, (contentMode === 'compact' || contentMode === 'dense') && isCompactModeSupported && extensionStyle, fg('platform_editor_typography_ugc') ? isCompactModeSupported ? paragraphStylesUGCScaledMargin : paragraphSharedStylesWithEditorUGC : isCompactModeSupported ? paragraphSharedStyleScaledMargin : paragraphSharedStyles, listsSharedStyles, browser.gecko && listsSharedStylesForGekko, indentationSharedStyles, fg('platform_editor__renderer_indentation_text_margin') && indentationSharedStylesWithMarginFix, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, backgroundColorStyles, expValEquals('platform_editor_text_highlight_padding', 'isEnabled', true) &&
1652
1652
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
1653
1653
  textHighlightPaddingStyles, tasksAndDecisionsStyles, smartCardStyles, smartCardStylesAvatarFix, editorExperiment('platform_editor_preview_panel_linking_exp', true) && headerSmartCardStyles, smartCardStylesAvatarMarginFix, smartCardStylesAvatarListZeroMarginTop, fg('editor_inline_comments_on_inline_nodes') && rendererAnnotationStyles,
1654
1654
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
@@ -60,7 +60,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
60
60
  // we want to calculate all the table widths (which causes reflows) after the renderer has finished loading to mitigate performance impact
61
61
  var TABLE_INFO_TIMEOUT = 10000;
62
62
  var packageName = "@atlaskit/renderer";
63
- var packageVersion = "0.0.0-development";
63
+ var packageVersion = "124.16.5";
64
64
  var setAsQueryContainerStyles = css({
65
65
  containerName: 'ak-renderer-wrapper',
66
66
  containerType: 'inline-size'
@@ -773,7 +773,9 @@ var RendererWithAnnotationSelection = function RendererWithAnnotationSelection(p
773
773
  var innerRef = props.innerRef || localRef;
774
774
 
775
775
  // @see https://hello.jira.atlassian.cloud/browse/EDITOR-3389
776
- if (props.appearance === 'max' && expValEquals('editor_tinymce_full_width_mode', 'isEnabled', false)) {
776
+ if (props.appearance === 'max' &&
777
+ // @ts-expect-error - false is not allowed as an expected value
778
+ expValEquals('editor_tinymce_full_width_mode', 'isEnabled', false)) {
777
779
  props.appearance = 'full-width';
778
780
  }
779
781
  if (!allowAnnotations) {
@@ -1,5 +1,6 @@
1
1
  import { useEffect } from 'react';
2
2
  import { getDocument } from '@atlaskit/browser-apis';
3
+ import { DEFAULT_BLOCK_LINK_HASH_PREFIX } from '@atlaskit/editor-common/block-menu';
3
4
 
4
5
  // Find editor node dom with localId - similar to confluence useScrollOnUrlChange.ts
5
6
  var getLocalIdSelector = function getLocalIdSelector(localId, container) {
@@ -40,9 +41,10 @@ export var useScrollToLocalId = function useScrollToLocalId(containerRef, should
40
41
  return;
41
42
  }
42
43
 
43
- // Parse URL parameters for block ID
44
- var urlParams = new URLSearchParams(window.location.search);
45
- var blockId = urlParams.get('block');
44
+ // Parse hash fragment for block ID (format: #block-{localId})
45
+ var hash = window.location.hash;
46
+ var defaultPrefixWithHash = "#".concat(DEFAULT_BLOCK_LINK_HASH_PREFIX);
47
+ var blockId = hash.startsWith(defaultPrefixWithHash) ? hash.slice(defaultPrefixWithHash.length) : null;
46
48
  if (!blockId) {
47
49
  return;
48
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "124.16.4",
3
+ "version": "124.16.6",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,7 +36,6 @@
36
36
  "@atlaskit/editor-palette": "^2.1.0",
37
37
  "@atlaskit/editor-prosemirror": "7.0.0",
38
38
  "@atlaskit/editor-shared-styles": "^3.10.0",
39
- "@atlaskit/editor-tables": "^2.9.0",
40
39
  "@atlaskit/emoji": "^69.8.0",
41
40
  "@atlaskit/feature-gate-js-client": "^5.5.0",
42
41
  "@atlaskit/icon": "^29.0.0",
@@ -54,12 +53,12 @@
54
53
  "@atlaskit/platform-feature-flags": "^1.1.0",
55
54
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
56
55
  "@atlaskit/react-ufo": "^4.15.0",
57
- "@atlaskit/smart-card": "^43.10.0",
56
+ "@atlaskit/smart-card": "^43.11.0",
58
57
  "@atlaskit/status": "^3.0.0",
59
58
  "@atlaskit/task-decision": "^19.2.0",
60
59
  "@atlaskit/theme": "^21.0.0",
61
- "@atlaskit/tmp-editor-statsig": "^13.42.0",
62
- "@atlaskit/tokens": "^8.3.0",
60
+ "@atlaskit/tmp-editor-statsig": "^14.0.0",
61
+ "@atlaskit/tokens": "^8.4.0",
63
62
  "@atlaskit/tooltip": "^20.10.0",
64
63
  "@atlaskit/visually-hidden": "^3.0.0",
65
64
  "@babel/runtime": "^7.0.0",
@@ -72,7 +71,7 @@
72
71
  "uuid": "^3.1.0"
73
72
  },
74
73
  "peerDependencies": {
75
- "@atlaskit/editor-common": "^110.34.0",
74
+ "@atlaskit/editor-common": "^110.36.0",
76
75
  "@atlaskit/link-provider": "^4.0.0",
77
76
  "@atlaskit/media-core": "^37.0.0",
78
77
  "react": "^18.2.0",
@@ -83,7 +82,6 @@
83
82
  "@af/visual-regression": "workspace:^",
84
83
  "@atlaskit/analytics-gas-types": "^5.1.0",
85
84
  "@atlaskit/checkbox": "^17.1.0",
86
- "@atlaskit/css-reset": "^7.3.0",
87
85
  "@atlaskit/link-provider": "^4.0.0",
88
86
  "@atlaskit/link-test-helpers": "^8.5.0",
89
87
  "@atlaskit/media-core": "^37.0.0",
@@ -92,7 +90,7 @@
92
90
  "@atlaskit/mention": "^24.4.0",
93
91
  "@atlaskit/modal-dialog": "^14.7.0",
94
92
  "@atlaskit/navigation-next": "patch:@atlaskit/navigation-next@npm%3A9.0.17#~/.yarn/patches/@atlaskit-navigation-next-npm-9.0.17-958ca0ab9d.patch",
95
- "@atlaskit/profilecard": "^24.21.0",
93
+ "@atlaskit/profilecard": "^24.22.0",
96
94
  "@atlaskit/util-data-test": "^18.3.0",
97
95
  "@atlassian/feature-flags-test-utils": "^1.0.0",
98
96
  "@testing-library/react": "^13.4.0",
@@ -134,7 +132,7 @@
134
132
  "platform-ssr-table-resize": {
135
133
  "type": "boolean"
136
134
  },
137
- "aifc_create_enabled": {
135
+ "platform_editor_ai_aifc_streaming": {
138
136
  "type": "boolean"
139
137
  },
140
138
  "platform_fix_nested_num_column_scaling": {
@@ -244,6 +242,9 @@
244
242
  },
245
243
  "platform_editor_ai_adf_prompts_in_all_products": {
246
244
  "type": "boolean"
245
+ },
246
+ "jfp-magma-ssr-iv-editor-codeblock": {
247
+ "type": "boolean"
247
248
  }
248
249
  }
249
250
  }