@atlaskit/renderer 128.4.1 → 128.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 128.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`13ec7df78a017`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/13ec7df78a017) -
8
+ Editor-5664: Fix scroll position for block links
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies
13
+
14
+ ## 128.5.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [`d9e33431d0d37`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d9e33431d0d37) -
19
+ [ux] EDITOR-5603 update editor status with team 26 lozenge styles
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies
24
+
3
25
  ## 128.4.1
4
26
 
5
27
  ### Patch Changes
@@ -13,11 +13,37 @@ var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-contex
13
13
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
14
  var _useInlineAnnotationProps = require("../../ui/annotations/element/useInlineAnnotationProps");
15
15
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
16
+ var ANALYTICS_DATA = {
17
+ userContext: 'document'
18
+ };
16
19
  var _default = exports.default = /*#__PURE__*/(0, _react.memo)(function Status(props) {
17
20
  var text = props.text,
18
21
  color = props.color,
22
+ style = props.style,
19
23
  localId = props.localId;
20
24
  var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
25
+ if ((0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts')) {
26
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
27
+ return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({}, inlineAnnotationProps, {
28
+ role: 'emphasis'
29
+ }), /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
30
+ data: ANALYTICS_DATA
31
+ }, /*#__PURE__*/_react.default.createElement(_element.Status, {
32
+ text: style === 'mixedCase' ? text : text.toUpperCase(),
33
+ color: color,
34
+ localId: localId,
35
+ role: undefined
36
+ })));
37
+ }
38
+ return /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
39
+ data: ANALYTICS_DATA
40
+ }, /*#__PURE__*/_react.default.createElement(_element.Status, {
41
+ text: style === 'mixedCase' ? text : text.toUpperCase(),
42
+ color: color,
43
+ localId: localId,
44
+ role: undefined
45
+ }));
46
+ }
21
47
  if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
22
48
  return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({}, inlineAnnotationProps, {
23
49
  role: 'emphasis'
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _utils = require("../../utils");
8
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
9
  var status = function status(node, _schema) {
9
- return node.attrs.text ? "[ ".concat(node.attrs.text.toUpperCase(), " ]") : (0, _utils.getText)(node);
10
+ return node.attrs.text ? node.attrs.style === 'mixedCase' && (0, _platformFeatureFlags.fg)('platform-dst-lozenge-tag-badge-visual-uplifts') ? "[ ".concat(node.attrs.text, " ]") : "[ ".concat(node.attrs.text.toUpperCase(), " ]") : (0, _utils.getText)(node);
10
11
  };
11
12
  var _default = exports.default = status;
@@ -71,7 +71,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
71
71
  var TABLE_INFO_TIMEOUT = 10000;
72
72
  var RENDER_EVENT_SAMPLE_RATE = 0.2;
73
73
  var packageName = "@atlaskit/renderer";
74
- var packageVersion = "128.4.0";
74
+ var packageVersion = "128.5.0";
75
75
  var setAsQueryContainerStyles = (0, _react2.css)({
76
76
  containerName: 'ak-renderer-wrapper',
77
77
  containerType: 'inline-size'
@@ -440,7 +440,7 @@ var RendererFunctionalComponent = exports.RendererFunctionalComponent = function
440
440
  timeZone: props.timeZone
441
441
  });
442
442
  }, [props.featureFlags, props.isTopLevelRenderer, createRendererContext, props.timeZone]);
443
- (0, _useScrollToBlock.useScrollToBlock)(editorRef, props.document);
443
+ (0, _useScrollToBlock.useScrollToBlock)(editorRef, props.document, props.scrollToBlock);
444
444
  try {
445
445
  var _rendererContext$feat, _props$media;
446
446
  var schema = getSchema(props.schema, props.adfStage);
@@ -7,6 +7,7 @@ exports.useScrollToBlock = void 0;
7
7
  var _react = require("react");
8
8
  var _browserApis = require("@atlaskit/browser-apis");
9
9
  var _blockMenu = require("@atlaskit/editor-common/block-menu");
10
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
11
  var _useStableScroll2 = require("./useStableScroll");
11
12
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
12
13
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
@@ -25,7 +26,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
25
26
  * @param containerRef - Optional ref to the renderer container (RendererStyleContainer)
26
27
  * @param adfDoc - The ADF document to search for nodes and expand parents
27
28
  */
28
- var useScrollToBlock = exports.useScrollToBlock = function useScrollToBlock(containerRef, adfDoc) {
29
+ var useScrollToBlock = exports.useScrollToBlock = function useScrollToBlock(containerRef, adfDoc, scrollToBlock) {
29
30
  var _useStableScroll = (0, _useStableScroll2.useStableScroll)({
30
31
  stabilityWaitTime: 750,
31
32
  maxStabilityWaitTime: 10000
@@ -120,7 +121,20 @@ var useScrollToBlock = exports.useScrollToBlock = function useScrollToBlock(cont
120
121
  // Element found and all parent expands are open! Use the utility to scroll.
121
122
  // (This will handle any final edge cases and do the actual scrolling).
122
123
  // Capture cleanup function to cancel pending timeouts.
123
- cancelExpandAndScroll = (0, _blockMenu.expandAllParentsThenScroll)(element);
124
+ if ((0, _platformFeatureFlags.fg)('platform_editor_block_menu_v2_patch_4')) {
125
+ cancelExpandAndScroll = (0, _blockMenu.expandAllParentsThenScroll)(element, 0, function (el) {
126
+ if (scrollToBlock) {
127
+ scrollToBlock(el);
128
+ } else {
129
+ el.scrollIntoView({
130
+ behavior: 'smooth',
131
+ block: 'start'
132
+ });
133
+ }
134
+ });
135
+ } else {
136
+ cancelExpandAndScroll = (0, _blockMenu.expandAllParentsThenScroll)(element);
137
+ }
124
138
  return true;
125
139
  };
126
140
  var performScroll = function performScroll() {
@@ -235,5 +249,5 @@ var useScrollToBlock = exports.useScrollToBlock = function useScrollToBlock(cont
235
249
  return cleanup;
236
250
  // Intentionally not including adfDoc in the dependency array to avoid unnecessary re-renders.
237
251
  // eslint-disable-next-line react-hooks/exhaustive-deps
238
- }, [containerRef, waitForStability, cleanupStability]);
252
+ }, [containerRef, waitForStability, cleanupStability, scrollToBlock]);
239
253
  };
@@ -4,13 +4,39 @@ import { Status as AkStatus } from '@atlaskit/status/element';
4
4
  import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
5
5
  import { fg } from '@atlaskit/platform-feature-flags';
6
6
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
7
+ const ANALYTICS_DATA = {
8
+ userContext: 'document'
9
+ };
7
10
  export default /*#__PURE__*/memo(function Status(props) {
8
11
  const {
9
12
  text,
10
13
  color,
14
+ style,
11
15
  localId
12
16
  } = props;
13
17
  const inlineAnnotationProps = useInlineAnnotationProps(props);
18
+ if (fg('platform-dst-lozenge-tag-badge-visual-uplifts')) {
19
+ if (fg('editor_inline_comments_on_inline_nodes')) {
20
+ return /*#__PURE__*/React.createElement("span", _extends({}, inlineAnnotationProps, {
21
+ role: 'emphasis'
22
+ }), /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
23
+ data: ANALYTICS_DATA
24
+ }, /*#__PURE__*/React.createElement(AkStatus, {
25
+ text: style === 'mixedCase' ? text : text.toUpperCase(),
26
+ color: color,
27
+ localId: localId,
28
+ role: undefined
29
+ })));
30
+ }
31
+ return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
32
+ data: ANALYTICS_DATA
33
+ }, /*#__PURE__*/React.createElement(AkStatus, {
34
+ text: style === 'mixedCase' ? text : text.toUpperCase(),
35
+ color: color,
36
+ localId: localId,
37
+ role: undefined
38
+ }));
39
+ }
14
40
  if (fg('editor_inline_comments_on_inline_nodes')) {
15
41
  return /*#__PURE__*/React.createElement("span", _extends({}, inlineAnnotationProps, {
16
42
  role: 'emphasis'
@@ -1,5 +1,6 @@
1
1
  import { getText } from '../../utils';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
2
3
  const status = (node, _schema) => {
3
- return node.attrs.text ? `[ ${node.attrs.text.toUpperCase()} ]` : getText(node);
4
+ return node.attrs.text ? node.attrs.style === 'mixedCase' && fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? `[ ${node.attrs.text} ]` : `[ ${node.attrs.text.toUpperCase()} ]` : getText(node);
4
5
  };
5
6
  export default status;
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
57
57
  const TABLE_INFO_TIMEOUT = 10000;
58
58
  const RENDER_EVENT_SAMPLE_RATE = 0.2;
59
59
  const packageName = "@atlaskit/renderer";
60
- const packageVersion = "128.4.0";
60
+ const packageVersion = "128.5.0";
61
61
  const setAsQueryContainerStyles = css({
62
62
  containerName: 'ak-renderer-wrapper',
63
63
  containerType: 'inline-size'
@@ -430,7 +430,7 @@ export const RendererFunctionalComponent = props => {
430
430
  ...createRendererContext(props.featureFlags, props.isTopLevelRenderer),
431
431
  timeZone: props.timeZone
432
432
  }), [props.featureFlags, props.isTopLevelRenderer, createRendererContext, props.timeZone]);
433
- useScrollToBlock(editorRef, props.document);
433
+ useScrollToBlock(editorRef, props.document, props.scrollToBlock);
434
434
  try {
435
435
  var _rendererContext$feat, _props$media;
436
436
  const schema = getSchema(props.schema, props.adfStage);
@@ -1,6 +1,7 @@
1
1
  import { useEffect } from 'react';
2
2
  import { getDocument } from '@atlaskit/browser-apis';
3
3
  import { DEFAULT_BLOCK_LINK_HASH_PREFIX, expandAllParentsThenScroll, expandElement, isExpandCollapsed, findNodeWithExpandParents, getLocalIdSelector } from '@atlaskit/editor-common/block-menu';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { useStableScroll } from './useStableScroll';
5
6
 
6
7
  /**
@@ -17,7 +18,7 @@ import { useStableScroll } from './useStableScroll';
17
18
  * @param containerRef - Optional ref to the renderer container (RendererStyleContainer)
18
19
  * @param adfDoc - The ADF document to search for nodes and expand parents
19
20
  */
20
- export const useScrollToBlock = (containerRef, adfDoc) => {
21
+ export const useScrollToBlock = (containerRef, adfDoc, scrollToBlock) => {
21
22
  const {
22
23
  waitForStability,
23
24
  cleanup: cleanupStability
@@ -106,7 +107,20 @@ export const useScrollToBlock = (containerRef, adfDoc) => {
106
107
  // Element found and all parent expands are open! Use the utility to scroll.
107
108
  // (This will handle any final edge cases and do the actual scrolling).
108
109
  // Capture cleanup function to cancel pending timeouts.
109
- cancelExpandAndScroll = expandAllParentsThenScroll(element);
110
+ if (fg('platform_editor_block_menu_v2_patch_4')) {
111
+ cancelExpandAndScroll = expandAllParentsThenScroll(element, 0, el => {
112
+ if (scrollToBlock) {
113
+ scrollToBlock(el);
114
+ } else {
115
+ el.scrollIntoView({
116
+ behavior: 'smooth',
117
+ block: 'start'
118
+ });
119
+ }
120
+ });
121
+ } else {
122
+ cancelExpandAndScroll = expandAllParentsThenScroll(element);
123
+ }
110
124
  return true;
111
125
  };
112
126
  const performScroll = () => {
@@ -214,5 +228,5 @@ export const useScrollToBlock = (containerRef, adfDoc) => {
214
228
  return cleanup;
215
229
  // Intentionally not including adfDoc in the dependency array to avoid unnecessary re-renders.
216
230
  // eslint-disable-next-line react-hooks/exhaustive-deps
217
- }, [containerRef, waitForStability, cleanupStability]);
231
+ }, [containerRef, waitForStability, cleanupStability, scrollToBlock]);
218
232
  };
@@ -4,11 +4,37 @@ import { Status as AkStatus } from '@atlaskit/status/element';
4
4
  import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
5
5
  import { fg } from '@atlaskit/platform-feature-flags';
6
6
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
7
+ var ANALYTICS_DATA = {
8
+ userContext: 'document'
9
+ };
7
10
  export default /*#__PURE__*/memo(function Status(props) {
8
11
  var text = props.text,
9
12
  color = props.color,
13
+ style = props.style,
10
14
  localId = props.localId;
11
15
  var inlineAnnotationProps = useInlineAnnotationProps(props);
16
+ if (fg('platform-dst-lozenge-tag-badge-visual-uplifts')) {
17
+ if (fg('editor_inline_comments_on_inline_nodes')) {
18
+ return /*#__PURE__*/React.createElement("span", _extends({}, inlineAnnotationProps, {
19
+ role: 'emphasis'
20
+ }), /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
21
+ data: ANALYTICS_DATA
22
+ }, /*#__PURE__*/React.createElement(AkStatus, {
23
+ text: style === 'mixedCase' ? text : text.toUpperCase(),
24
+ color: color,
25
+ localId: localId,
26
+ role: undefined
27
+ })));
28
+ }
29
+ return /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
30
+ data: ANALYTICS_DATA
31
+ }, /*#__PURE__*/React.createElement(AkStatus, {
32
+ text: style === 'mixedCase' ? text : text.toUpperCase(),
33
+ color: color,
34
+ localId: localId,
35
+ role: undefined
36
+ }));
37
+ }
12
38
  if (fg('editor_inline_comments_on_inline_nodes')) {
13
39
  return /*#__PURE__*/React.createElement("span", _extends({}, inlineAnnotationProps, {
14
40
  role: 'emphasis'
@@ -1,5 +1,6 @@
1
1
  import { getText } from '../../utils';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
2
3
  var status = function status(node, _schema) {
3
- return node.attrs.text ? "[ ".concat(node.attrs.text.toUpperCase(), " ]") : getText(node);
4
+ return node.attrs.text ? node.attrs.style === 'mixedCase' && fg('platform-dst-lozenge-tag-badge-visual-uplifts') ? "[ ".concat(node.attrs.text, " ]") : "[ ".concat(node.attrs.text.toUpperCase(), " ]") : getText(node);
4
5
  };
5
6
  export default status;
@@ -62,7 +62,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
62
62
  var TABLE_INFO_TIMEOUT = 10000;
63
63
  var RENDER_EVENT_SAMPLE_RATE = 0.2;
64
64
  var packageName = "@atlaskit/renderer";
65
- var packageVersion = "128.4.0";
65
+ var packageVersion = "128.5.0";
66
66
  var setAsQueryContainerStyles = css({
67
67
  containerName: 'ak-renderer-wrapper',
68
68
  containerType: 'inline-size'
@@ -431,7 +431,7 @@ export var RendererFunctionalComponent = function RendererFunctionalComponent(pr
431
431
  timeZone: props.timeZone
432
432
  });
433
433
  }, [props.featureFlags, props.isTopLevelRenderer, createRendererContext, props.timeZone]);
434
- useScrollToBlock(editorRef, props.document);
434
+ useScrollToBlock(editorRef, props.document, props.scrollToBlock);
435
435
  try {
436
436
  var _rendererContext$feat, _props$media;
437
437
  var schema = getSchema(props.schema, props.adfStage);
@@ -4,6 +4,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
4
4
  import { useEffect } from 'react';
5
5
  import { getDocument } from '@atlaskit/browser-apis';
6
6
  import { DEFAULT_BLOCK_LINK_HASH_PREFIX, expandAllParentsThenScroll, expandElement, isExpandCollapsed, findNodeWithExpandParents, getLocalIdSelector } from '@atlaskit/editor-common/block-menu';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { useStableScroll } from './useStableScroll';
8
9
 
9
10
  /**
@@ -20,7 +21,7 @@ import { useStableScroll } from './useStableScroll';
20
21
  * @param containerRef - Optional ref to the renderer container (RendererStyleContainer)
21
22
  * @param adfDoc - The ADF document to search for nodes and expand parents
22
23
  */
23
- export var useScrollToBlock = function useScrollToBlock(containerRef, adfDoc) {
24
+ export var useScrollToBlock = function useScrollToBlock(containerRef, adfDoc, scrollToBlock) {
24
25
  var _useStableScroll = useStableScroll({
25
26
  stabilityWaitTime: 750,
26
27
  maxStabilityWaitTime: 10000
@@ -115,7 +116,20 @@ export var useScrollToBlock = function useScrollToBlock(containerRef, adfDoc) {
115
116
  // Element found and all parent expands are open! Use the utility to scroll.
116
117
  // (This will handle any final edge cases and do the actual scrolling).
117
118
  // Capture cleanup function to cancel pending timeouts.
118
- cancelExpandAndScroll = expandAllParentsThenScroll(element);
119
+ if (fg('platform_editor_block_menu_v2_patch_4')) {
120
+ cancelExpandAndScroll = expandAllParentsThenScroll(element, 0, function (el) {
121
+ if (scrollToBlock) {
122
+ scrollToBlock(el);
123
+ } else {
124
+ el.scrollIntoView({
125
+ behavior: 'smooth',
126
+ block: 'start'
127
+ });
128
+ }
129
+ });
130
+ } else {
131
+ cancelExpandAndScroll = expandAllParentsThenScroll(element);
132
+ }
119
133
  return true;
120
134
  };
121
135
  var performScroll = function performScroll() {
@@ -230,5 +244,5 @@ export var useScrollToBlock = function useScrollToBlock(containerRef, adfDoc) {
230
244
  return cleanup;
231
245
  // Intentionally not including adfDoc in the dependency array to avoid unnecessary re-renders.
232
246
  // eslint-disable-next-line react-hooks/exhaustive-deps
233
- }, [containerRef, waitForStability, cleanupStability]);
247
+ }, [containerRef, waitForStability, cleanupStability, scrollToBlock]);
234
248
  };
@@ -4,6 +4,7 @@ import type { MarkDataAttributes } from '../../ui/annotations/element/useInlineA
4
4
  export interface Props extends MarkDataAttributes {
5
5
  color: Color;
6
6
  localId?: string;
7
+ style?: string;
7
8
  text: string;
8
9
  }
9
10
  declare const _default: React.NamedExoticComponent<Props>;
@@ -13,4 +13,4 @@ import type { DocNode } from '@atlaskit/adf-schema';
13
13
  * @param containerRef - Optional ref to the renderer container (RendererStyleContainer)
14
14
  * @param adfDoc - The ADF document to search for nodes and expand parents
15
15
  */
16
- export declare const useScrollToBlock: (containerRef?: React.RefObject<HTMLDivElement>, adfDoc?: DocNode) => void;
16
+ export declare const useScrollToBlock: (containerRef?: React.RefObject<HTMLDivElement>, adfDoc?: DocNode, scrollToBlock?: (element: HTMLElement) => void) => void;
@@ -136,6 +136,12 @@ export interface RendererProps {
136
136
  portal?: HTMLElement;
137
137
  rendererContext?: RendererContext;
138
138
  schema?: Schema;
139
+ /**
140
+ * Optional callback to scroll an element into view when using block links (#block-xxx).
141
+ * When provided, this is used instead of the default scrollIntoView for accurate positioning
142
+ * in product-specific scroll containers (e.g. Confluence view page).
143
+ */
144
+ scrollToBlock?: (element: HTMLElement) => void;
139
145
  /**
140
146
  * Determines if the extension should be displayed as inline based on the extension parameters.
141
147
  * @param extensionParams - The extension parameters.
@@ -4,6 +4,7 @@ import type { MarkDataAttributes } from '../../ui/annotations/element/useInlineA
4
4
  export interface Props extends MarkDataAttributes {
5
5
  color: Color;
6
6
  localId?: string;
7
+ style?: string;
7
8
  text: string;
8
9
  }
9
10
  declare const _default: React.NamedExoticComponent<Props>;
@@ -13,4 +13,4 @@ import type { DocNode } from '@atlaskit/adf-schema';
13
13
  * @param containerRef - Optional ref to the renderer container (RendererStyleContainer)
14
14
  * @param adfDoc - The ADF document to search for nodes and expand parents
15
15
  */
16
- export declare const useScrollToBlock: (containerRef?: React.RefObject<HTMLDivElement>, adfDoc?: DocNode) => void;
16
+ export declare const useScrollToBlock: (containerRef?: React.RefObject<HTMLDivElement>, adfDoc?: DocNode, scrollToBlock?: (element: HTMLElement) => void) => void;
@@ -136,6 +136,12 @@ export interface RendererProps {
136
136
  portal?: HTMLElement;
137
137
  rendererContext?: RendererContext;
138
138
  schema?: Schema;
139
+ /**
140
+ * Optional callback to scroll an element into view when using block links (#block-xxx).
141
+ * When provided, this is used instead of the default scrollIntoView for accurate positioning
142
+ * in product-specific scroll containers (e.g. Confluence view page).
143
+ */
144
+ scrollToBlock?: (element: HTMLElement) => void;
139
145
  /**
140
146
  * Determines if the extension should be displayed as inline based on the extension parameters.
141
147
  * @param extensionParams - The extension parameters.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "128.4.1",
3
+ "version": "128.6.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -56,10 +56,10 @@
56
56
  "@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
57
57
  "@atlaskit/react-ufo": "^5.6.0",
58
58
  "@atlaskit/smart-card": "^43.28.0",
59
- "@atlaskit/status": "^3.1.0",
59
+ "@atlaskit/status": "^3.2.0",
60
60
  "@atlaskit/task-decision": "^19.3.0",
61
61
  "@atlaskit/theme": "^22.0.0",
62
- "@atlaskit/tmp-editor-statsig": "^48.1.0",
62
+ "@atlaskit/tmp-editor-statsig": "^48.2.0",
63
63
  "@atlaskit/tokens": "^11.4.0",
64
64
  "@atlaskit/tooltip": "^21.0.0",
65
65
  "@atlaskit/visually-hidden": "^3.0.0",
@@ -73,7 +73,7 @@
73
73
  "uuid": "^3.1.0"
74
74
  },
75
75
  "peerDependencies": {
76
- "@atlaskit/editor-common": "^112.11.0",
76
+ "@atlaskit/editor-common": "^112.12.0",
77
77
  "@atlaskit/link-provider": "^4.3.0",
78
78
  "@atlaskit/media-core": "^37.0.0",
79
79
  "react": "^18.2.0",
@@ -244,6 +244,12 @@
244
244
  },
245
245
  "platform_editor_media_border_radius_fix": {
246
246
  "type": "boolean"
247
+ },
248
+ "platform_editor_block_menu_v2_patch_4": {
249
+ "type": "boolean"
250
+ },
251
+ "platform-dst-lozenge-tag-badge-visual-uplifts": {
252
+ "type": "boolean"
247
253
  }
248
254
  }
249
255
  }