@atlaskit/renderer 130.2.12 → 130.2.14

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.
Files changed (93) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/react/nodes/tableNew.js +1 -1
  3. package/dist/cjs/react/utils/getCardClickHandler.js +2 -1
  4. package/dist/cjs/steps/index.js +2 -0
  5. package/dist/cjs/ui/Expand.js +4 -1
  6. package/dist/cjs/ui/ExtensionRenderer.js +4 -1
  7. package/dist/cjs/ui/Renderer/PortalContext.js +2 -0
  8. package/dist/cjs/ui/Renderer/RendererStyleContainer.js +2 -1
  9. package/dist/cjs/ui/Renderer/breakout-ssr.js +5 -1
  10. package/dist/cjs/ui/Renderer/count-nodes.js +2 -0
  11. package/dist/cjs/ui/Renderer/index.js +8 -7
  12. package/dist/cjs/ui/Renderer/truncated-wrapper.js +2 -1
  13. package/dist/cjs/ui/Renderer/useMemoFromPropsDerivative.js +2 -0
  14. package/dist/cjs/ui/RendererActionsContext/index.js +2 -0
  15. package/dist/cjs/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +2 -0
  16. package/dist/cjs/ui/active-header-id-provider.js +3 -3
  17. package/dist/cjs/ui/annotations/contexts/AnnotationManagerContext.js +1 -0
  18. package/dist/cjs/ui/annotations/contexts/AnnotationRangeContext.js +1 -0
  19. package/dist/cjs/ui/annotations/draft/component.js +2 -1
  20. package/dist/cjs/ui/annotations/draft/dom.js +2 -0
  21. package/dist/cjs/ui/annotations/element/mark.js +1 -0
  22. package/dist/cjs/ui/annotations/element/useInlineAnnotationProps.js +2 -0
  23. package/dist/es2019/react/nodes/tableNew.js +1 -1
  24. package/dist/es2019/react/utils/getCardClickHandler.js +2 -2
  25. package/dist/es2019/steps/index.js +1 -0
  26. package/dist/es2019/ui/Expand.js +4 -1
  27. package/dist/es2019/ui/ExtensionRenderer.js +4 -2
  28. package/dist/es2019/ui/Renderer/PortalContext.js +1 -0
  29. package/dist/es2019/ui/Renderer/RendererStyleContainer.js +3 -2
  30. package/dist/es2019/ui/Renderer/breakout-ssr.js +4 -1
  31. package/dist/es2019/ui/Renderer/count-nodes.js +1 -0
  32. package/dist/es2019/ui/Renderer/index.js +9 -8
  33. package/dist/es2019/ui/Renderer/truncated-wrapper.js +2 -2
  34. package/dist/es2019/ui/Renderer/useMemoFromPropsDerivative.js +1 -0
  35. package/dist/es2019/ui/RendererActionsContext/index.js +1 -0
  36. package/dist/es2019/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +1 -0
  37. package/dist/es2019/ui/active-header-id-provider.js +3 -4
  38. package/dist/es2019/ui/annotations/contexts/AnnotationManagerContext.js +1 -0
  39. package/dist/es2019/ui/annotations/contexts/AnnotationRangeContext.js +1 -0
  40. package/dist/es2019/ui/annotations/draft/component.js +3 -2
  41. package/dist/es2019/ui/annotations/draft/dom.js +2 -0
  42. package/dist/es2019/ui/annotations/element/mark.js +1 -0
  43. package/dist/es2019/ui/annotations/element/useInlineAnnotationProps.js +1 -0
  44. package/dist/esm/react/nodes/tableNew.js +1 -1
  45. package/dist/esm/react/utils/getCardClickHandler.js +2 -2
  46. package/dist/esm/steps/index.js +1 -0
  47. package/dist/esm/ui/Expand.js +4 -1
  48. package/dist/esm/ui/ExtensionRenderer.js +4 -2
  49. package/dist/esm/ui/Renderer/PortalContext.js +1 -0
  50. package/dist/esm/ui/Renderer/RendererStyleContainer.js +3 -2
  51. package/dist/esm/ui/Renderer/breakout-ssr.js +4 -1
  52. package/dist/esm/ui/Renderer/count-nodes.js +1 -0
  53. package/dist/esm/ui/Renderer/index.js +9 -8
  54. package/dist/esm/ui/Renderer/truncated-wrapper.js +2 -2
  55. package/dist/esm/ui/Renderer/useMemoFromPropsDerivative.js +1 -0
  56. package/dist/esm/ui/RendererActionsContext/index.js +1 -0
  57. package/dist/esm/ui/TaskItemsFormatContext/TaskItemsFormatContext.js +1 -0
  58. package/dist/esm/ui/active-header-id-provider.js +3 -3
  59. package/dist/esm/ui/annotations/contexts/AnnotationManagerContext.js +1 -0
  60. package/dist/esm/ui/annotations/contexts/AnnotationRangeContext.js +1 -0
  61. package/dist/esm/ui/annotations/draft/component.js +3 -2
  62. package/dist/esm/ui/annotations/draft/dom.js +2 -0
  63. package/dist/esm/ui/annotations/element/mark.js +1 -0
  64. package/dist/esm/ui/annotations/element/useInlineAnnotationProps.js +1 -0
  65. package/dist/types/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +1 -1
  66. package/dist/types/ui/Expand.d.ts +3 -3
  67. package/dist/types/ui/ExtensionRenderer.d.ts +2 -1
  68. package/dist/types/ui/MediaCard.d.ts +2 -2
  69. package/dist/types/ui/Renderer/RendererStyleContainer.d.ts +2 -2
  70. package/dist/types/ui/Renderer/ValidationContext.d.ts +3 -2
  71. package/dist/types/ui/Renderer/get-base-font-size.d.ts +1 -1
  72. package/dist/types/ui/Renderer/index.d.ts +2 -3
  73. package/dist/types/ui/annotations/context.d.ts +3 -2
  74. package/dist/types/ui/annotations/draft/dom.d.ts +1 -1
  75. package/dist/types/ui/annotations/draft/text.d.ts +1 -1
  76. package/dist/types/ui/annotations/element/mark.d.ts +83 -82
  77. package/dist/types/ui/annotations/element/useInlineAnnotationProps.d.ts +6 -6
  78. package/dist/types/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +2 -1
  79. package/dist/types-ts4.5/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +1 -1
  80. package/dist/types-ts4.5/ui/Expand.d.ts +3 -3
  81. package/dist/types-ts4.5/ui/ExtensionRenderer.d.ts +2 -1
  82. package/dist/types-ts4.5/ui/MediaCard.d.ts +2 -2
  83. package/dist/types-ts4.5/ui/Renderer/RendererStyleContainer.d.ts +2 -2
  84. package/dist/types-ts4.5/ui/Renderer/ValidationContext.d.ts +3 -2
  85. package/dist/types-ts4.5/ui/Renderer/get-base-font-size.d.ts +1 -1
  86. package/dist/types-ts4.5/ui/Renderer/index.d.ts +2 -3
  87. package/dist/types-ts4.5/ui/annotations/context.d.ts +3 -2
  88. package/dist/types-ts4.5/ui/annotations/draft/dom.d.ts +1 -1
  89. package/dist/types-ts4.5/ui/annotations/draft/text.d.ts +1 -1
  90. package/dist/types-ts4.5/ui/annotations/element/mark.d.ts +83 -82
  91. package/dist/types-ts4.5/ui/annotations/element/useInlineAnnotationProps.d.ts +6 -6
  92. package/dist/types-ts4.5/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +2 -1
  93. package/package.json +3 -3
@@ -3,8 +3,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  * @jsxRuntime classic
4
4
  * @jsx jsx
5
5
  */
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
- import { css, jsx } from '@emotion/react';
6
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- emotion jsx pragma; go/DSP-18766
7
+ import { css, jsx } from '@emotion/react'; // oxlint-ignore @typescript-eslint/consistent-type-imports -- classic @jsx jsx factory + jsx.JSX.Element types
8
8
  import React from 'react';
9
9
  import memoizeOne from 'memoize-one';
10
10
  import { getNodeRenderer } from '@atlaskit/editor-common/extensions';
@@ -35,6 +35,8 @@ var plainTextMacroStyle = css({
35
35
  display: 'inline'
36
36
  }
37
37
  });
38
+
39
+ /** Renders extension (macro) nodes inside the ADF renderer. */
38
40
  export default function ExtensionRenderer(props) {
39
41
  var extensionHandlers = props.extensionHandlers,
40
42
  rendererContext = props.rendererContext,
@@ -1,3 +1,4 @@
1
+ /* eslint-disable jsdoc/require-jsdoc -- thin portal context helpers */
1
2
  import React, { useContext } from 'react';
2
3
  export var PortalContext = /*#__PURE__*/React.createContext(undefined);
3
4
  export function usePortal(props) {
@@ -9,8 +9,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
9
9
  * @jsxRuntime classic
10
10
  * @jsx jsx
11
11
  */
12
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
13
- import { css, jsx } from '@emotion/react';
12
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- emotion jsx pragma; go/DSP-18766
13
+ import { css, jsx } from '@emotion/react'; // oxlint-ignore @typescript-eslint/consistent-type-imports -- classic @jsx jsx factory + jsx.JSX.Element types
14
+
14
15
  import { FullPagePadding } from './style';
15
16
  import { fg } from '@atlaskit/platform-feature-flags';
16
17
  import { RendererCssClassName } from '../../consts';
@@ -1,3 +1,4 @@
1
+ /* eslint-disable jsdoc/require-jsdoc -- SSR inline script helpers */
1
2
  import React from 'react';
2
3
  import { breakoutConsts } from '@atlaskit/editor-common/utils';
3
4
  import { fg } from '@atlaskit/platform-feature-flags';
@@ -70,7 +71,9 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript, fla
70
71
  element = element.parentElement;
71
72
  }
72
73
  }
73
- var renderer = findUp(document.querySelector("[data-breakout-script-id=\"".concat(id, "\"]")), function (elem) {
74
+ var renderer = findUp(
75
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- inline script runs in browser document context
76
+ document.querySelector("[data-breakout-script-id=\"".concat(id, "\"]")), function (elem) {
74
77
  var _elem$parentElement;
75
78
  return !!((_elem$parentElement = elem.parentElement) !== null && _elem$parentElement !== void 0 && _elem$parentElement.classList.contains('ak-renderer-wrapper'));
76
79
  });
@@ -1,3 +1,4 @@
1
+ /* eslint-disable jsdoc/require-jsdoc */
1
2
  import { reduce } from '@atlaskit/adf-utils/traverse';
2
3
 
3
4
  // Ignored via go/ees005
@@ -9,13 +9,13 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
9
9
  * @jsx jsx
10
10
  */
11
11
  import React, { Fragment, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef } from 'react';
12
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
12
  import { getSchemaBasedOnStage } from '@atlaskit/adf-schema/schema-default';
14
13
  import { ProviderFactory, ProviderFactoryProvider } from '@atlaskit/editor-common/provider-factory';
15
14
  import { BaseTheme, IntlErrorBoundary, UnsupportedBlock, WidthProvider, WithCreateAnalyticsEvent } from '@atlaskit/editor-common/ui';
16
15
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
17
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
18
- import { css, jsx } from '@emotion/react';
16
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- emotion jsx pragma; go/DSP-18766
17
+ import { css, jsx } from '@emotion/react'; // oxlint-ignore @typescript-eslint/consistent-type-imports -- classic @jsx jsx factory + jsx.JSX.Element types
18
+
19
19
  import { getBrowserInfo } from '@atlaskit/editor-common/browser';
20
20
  import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-measures';
21
21
  import { getDistortedDurationMonitor } from '@atlaskit/editor-common/performance/measure-render';
@@ -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 = "130.2.11";
65
+ var packageVersion = "0.0.0-development";
66
66
  var setAsQueryContainerStyles = css({
67
67
  containerName: 'ak-renderer-wrapper',
68
68
  containerType: 'inline-size'
@@ -299,6 +299,7 @@ export var RendererFunctionalComponent = function RendererFunctionalComponent(pr
299
299
  var hash = window.location.hash && decodeURIComponent(window.location.hash.slice(1));
300
300
  var disableHeadingIDs = props.disableHeadingIDs;
301
301
  if (!disableHeadingIDs && hash && editorRef && editorRef.current instanceof HTMLElement) {
302
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- anchor navigation uses document.getElementById for hash targets
302
303
  var anchorLinkElement = document.getElementById(hash);
303
304
  if (anchorLinkElement && editorRef.current.contains(anchorLinkElement)) {
304
305
  _fireAnalyticsEvent({
@@ -537,9 +538,8 @@ var RendererFunctionalComponentWithPortalContext = /*#__PURE__*/React.memo(funct
537
538
  });
538
539
 
539
540
  /**
540
- *
541
- * @param props
542
- * @example
541
+ * Top-level ADF renderer: renders document content with analytics and validation context.
542
+ * @param props Renderer configuration and document tree.
543
543
  */
544
544
  export function Renderer(props) {
545
545
  var _props$isTopLevelRend;
@@ -617,6 +617,7 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
617
617
  isTopLevelRenderer = props.isTopLevelRenderer,
618
618
  allowRendererContainerStyles = props.allowRendererContainerStyles;
619
619
  var createTelepointer = function createTelepointer() {
620
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- telepointer span for collaborative presence
620
621
  var telepointer = document.createElement('span');
621
622
  telepointer.textContent = "\u200B";
622
623
  telepointer.id = TELEPOINTER_ID;
@@ -702,7 +703,7 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
702
703
  }
703
704
  }, [innerRef, addTelepointer]);
704
705
  var renderer = jsx(WidthProvider
705
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
706
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides, @atlaskit/ui-styling-standard/no-classname-prop -- legacy renderer wrapper appearance classes
706
707
  , {
707
708
  className: "ak-renderer-wrapper is-".concat(appearance),
708
709
  "data-appearance": appearance,
@@ -9,8 +9,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
9
9
  * @jsxRuntime classic
10
10
  * @jsx jsx
11
11
  */
12
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
- import { css, jsx } from '@emotion/react';
12
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- emotion jsx pragma; go/DSP-18766
13
+ import { css, jsx } from '@emotion/react'; // oxlint-ignore @typescript-eslint/consistent-type-imports -- classic @jsx jsx factory + jsx.JSX.Element types
14
14
  import { Component } from 'react';
15
15
  var fadeOutStyles = function fadeOutStyles(maxHeight, top, backgroundColor) {
16
16
  return css({
@@ -1,4 +1,5 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ /* eslint-disable jsdoc/require-jsdoc */
2
3
  import { useMemo, useRef } from 'react';
3
4
  export function useMemoFromPropsDerivative(factory, propsDerivator, props) {
4
5
  // cache the last set of props
@@ -1,3 +1,4 @@
1
+ /* eslint-disable jsdoc/require-jsdoc */
1
2
  import React, { useMemo } from 'react';
2
3
  import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
@@ -1,3 +1,4 @@
1
+ /* eslint-disable jsdoc/require-jsdoc */
1
2
  import React from 'react';
2
3
  var defaultValue = [undefined, function () {}];
3
4
  var TaskItemsFormatContext = /*#__PURE__*/React.createContext(defaultValue);
@@ -1,8 +1,8 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useState } from 'react';
3
- var _React$createContext = /*#__PURE__*/React.createContext(undefined),
4
- Provider = _React$createContext.Provider,
5
- Consumer = _React$createContext.Consumer;
3
+ var dest = /*#__PURE__*/React.createContext(undefined);
4
+ var Provider = dest.Provider;
5
+ var Consumer = dest.Consumer;
6
6
  /**
7
7
  * We need to expose this abstraction on top of the native Consumer in order to control when
8
8
  * The consumer will get notified when a match has happened. If we use the Consumer directly in
@@ -284,6 +284,7 @@ export var AnnotationManagerProvider = function AnnotationManagerProvider(_ref)
284
284
  dispatch({
285
285
  type: 'setSelectedMarkRef',
286
286
  data: {
287
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- resolve mark node by id in the document
287
288
  markRef: document.getElementById(id) || undefined
288
289
  }
289
290
  });
@@ -142,6 +142,7 @@ export var AnnotationRangeProviderInner = function AnnotationRangeProviderInner(
142
142
  if (!mediaNode) {
143
143
  return;
144
144
  }
145
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- range for media hover highlight
145
146
  var range = document.createRange();
146
147
  range.setStartBefore(mediaNode);
147
148
  range.setEndAfter(mediaNode);
@@ -4,8 +4,9 @@ import _extends from "@babel/runtime/helpers/extends";
4
4
  * @jsx jsx
5
5
  */
6
6
  import React, { Fragment, useCallback } from 'react';
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
- import { css, jsx } from '@emotion/react';
7
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- emotion jsx pragma; go/DSP-18766
8
+ import { css, jsx } from '@emotion/react'; // oxlint-ignore @typescript-eslint/consistent-type-imports -- classic @jsx jsx factory + jsx.JSX.Element types
9
+
9
10
  import { InsertDraftPosition } from '../types';
10
11
  import { splitText, calcTextSplitOffset, findTextString } from './text';
11
12
  import { calcInsertDraftPositionOnText } from './position';
@@ -1,5 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ /* eslint-disable @atlaskit/platform/no-direct-document-usage -- draft selection uses document range APIs */
4
+
3
5
  export var dataAttributes = function dataAttributes(_ref) {
4
6
  var from = _ref.from,
5
7
  to = _ref.to;
@@ -204,6 +204,7 @@ export var MarkComponent = function MarkComponent(_ref) {
204
204
  }, [annotationIds, onClick, state, isAnnotationManagerEnabled]);
205
205
  var onMarkEnter = function onMarkEnter(evt) {
206
206
  var _document$activeEleme;
207
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- keyboard focus for mark / Enter handling
207
208
  var focusedElementTag = (_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.tagName;
208
209
  if (focusedElementTag === 'MARK' && evt.key === 'Enter') {
209
210
  onMarkClick(evt);
@@ -1,3 +1,4 @@
1
+ /* eslint-disable jsdoc/require-jsdoc */
1
2
  import { fg } from '@atlaskit/platform-feature-flags';
2
3
  import { useAnnotationRangeState } from '../contexts/AnnotationRangeContext';
3
4
  export function useInlineAnnotationProps(props) {
@@ -13,5 +13,5 @@ export declare const LightWeightCodeBlockCssClassName: {
13
13
  * @deprecated styles are moved to RendererStyleContainer
14
14
  */
15
15
  export declare const getLightWeightCodeBlockStylesForRootRendererStyleSheet: () => SerializedStyles;
16
- declare const LightWeightCodeBlock: React.ForwardRefExoticComponent<Pick<CodeBlockProps, "text" | "className" | "codeBidiWarningTooltipEnabled"> & React.RefAttributes<HTMLDivElement>>;
16
+ declare const LightWeightCodeBlock: React.ForwardRefExoticComponent<Pick<CodeBlockProps, 'text' | 'className' | 'codeBidiWarningTooltipEnabled'> & React.RefAttributes<HTMLDivElement>>;
17
17
  export default LightWeightCodeBlock;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { WrappedComponentProps } from 'react-intl';
2
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
3
  import type { AnalyticsEventPayload } from '../analytics/events';
4
4
  import type { RendererAppearance, RendererContentMode } from './Renderer/types';
5
5
  export interface ExpandProps {
@@ -13,7 +13,7 @@ export interface ExpandProps {
13
13
  rendererContentMode?: RendererContentMode;
14
14
  title: string;
15
15
  }
16
- declare const _default: React.FC<import("react-intl").WithIntlProps<ExpandProps & WrappedComponentProps>> & {
16
+ declare const _default_1: React.FC<WithIntlProps<ExpandProps & WrappedComponentProps>> & {
17
17
  WrappedComponent: React.ComponentType<ExpandProps & WrappedComponentProps>;
18
18
  };
19
- export default _default;
19
+ export default _default_1;
@@ -28,7 +28,8 @@ interface Props {
28
28
  text?: string;
29
29
  type: 'extension' | 'inlineExtension' | 'bodiedExtension' | 'multiBodiedExtension';
30
30
  }
31
- export default function ExtensionRenderer(props: Props): JSX.Element;
31
+ /** Renders extension (macro) nodes inside the ADF renderer. */
32
+ export default function ExtensionRenderer(props: Props): jsx.JSX.Element;
32
33
  export declare const InlineNodeRendererWrapper: ({ children, isPlainTextMacro, ssrPlaceholder, ssrPlaceholderReplace, }: React.PropsWithChildren<{
33
34
  isPlainTextMacro?: boolean;
34
35
  ssrPlaceholder?: string;
@@ -5,7 +5,7 @@ import type { MediaClientConfig } from '@atlaskit/media-core';
5
5
  import type { ImageResizeMode, Identifier, FileState, MediaClient } from '@atlaskit/media-client';
6
6
  import type { MediaType } from '@atlaskit/adf-schema';
7
7
  import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
8
- import type { ImageStatus } from '@atlaskit/editor-common/utils';
8
+ import type { ImageLoaderProps, ImageStatus } from '@atlaskit/editor-common/utils';
9
9
  import type { MediaFeatureFlags } from '@atlaskit/media-common';
10
10
  import type { RendererAppearance } from './Renderer/types';
11
11
  import type { RendererContext } from '../react/types';
@@ -94,5 +94,5 @@ export declare const getClipboardAttrs: ({ id, alt, collection, contextIdentifie
94
94
  [key: string]: string | number | undefined;
95
95
  };
96
96
  export declare const MediaCardInternal: (props: MediaCardProps) => React.JSX.Element;
97
- export declare const MediaCard: React.ComponentClass<MediaCardProps & import("@atlaskit/editor-common/utils").ImageLoaderProps, any>;
97
+ export declare const MediaCard: React.ComponentClass<MediaCardProps & ImageLoaderProps>;
98
98
  export {};
@@ -2,9 +2,9 @@
2
2
  * @jsxRuntime classic
3
3
  * @jsx jsx
4
4
  */
5
- import { jsx } from '@emotion/react';
5
+ import { jsx, type SerializedStyles } from '@emotion/react';
6
6
  import type { RendererWrapperProps } from './index';
7
- export declare const textHighlightPaddingStyles: import("@emotion/utils").SerializedStyles;
7
+ export declare const textHighlightPaddingStyles: SerializedStyles;
8
8
  type RendererStyleContainerProps = Pick<RendererWrapperProps, 'onClick' | 'onMouseDown' | 'appearance' | 'contentMode' | 'allowNestedHeaderLinks' | 'allowColumnSorting' | 'useBlockRenderForCodeBlock' | 'allowAnnotations' | 'allowTableResizing' | 'innerRef' | 'children' | 'allowRendererContainerStyles'> & {
9
9
  isInsideOfSyncBlock?: boolean;
10
10
  isInsideSyncBlock?: boolean;
@@ -1,3 +1,4 @@
1
+ import { type Context, type Provider } from 'react';
1
2
  type ValidationContextType = {
2
3
  allowNestedTables?: boolean;
3
4
  skipValidation?: boolean;
@@ -8,6 +9,6 @@ type ValidationContextType = {
8
9
  * to bypass the ADF schema validation when necessary.
9
10
  * It also allows validation overrides to be passed to nested renderers. For example renderers nested inside bodiedExtension
10
11
  */
11
- export declare const ValidationContext: import("react").Context<ValidationContextType>;
12
- export declare const ValidationContextProvider: import("react").Provider<ValidationContextType>;
12
+ export declare const ValidationContext: Context<ValidationContextType>;
13
+ export declare const ValidationContextProvider: Provider<ValidationContextType>;
13
14
  export {};
@@ -1,2 +1,2 @@
1
1
  import type { RendererAppearance, RendererContentMode } from './types';
2
- export declare const getBaseFontSize: (appearance: RendererAppearance, contentMode: RendererContentMode) => 16 | 13 | 14;
2
+ export declare const getBaseFontSize: (appearance: RendererAppearance, contentMode: RendererContentMode) => 13 | 14 | 16;
@@ -17,9 +17,8 @@ export declare const RendererFunctionalComponent: (props: RendererProps & {
17
17
  };
18
18
  }) => jsx.JSX.Element;
19
19
  /**
20
- *
21
- * @param props
22
- * @example
20
+ * Top-level ADF renderer: renders document content with analytics and validation context.
21
+ * @param props Renderer configuration and document tree.
23
22
  */
24
23
  export declare function Renderer(props: RendererProps): jsx.JSX.Element;
25
24
  export declare const RendererWithAnalytics: React.MemoExoticComponent<(props: RendererProps) => jsx.JSX.Element>;
@@ -1,4 +1,5 @@
1
+ import { type Context } from 'react';
1
2
  import type { AnnotationProviders } from '@atlaskit/editor-common/types';
2
3
  import type { AnnotationMarkStates } from '@atlaskit/adf-schema';
3
- export declare const ProvidersContext: import("react").Context<AnnotationProviders | null | undefined>;
4
- export declare const InlineCommentsStateContext: import("react").Context<Record<string, AnnotationMarkStates | null>>;
4
+ export declare const ProvidersContext: Context<AnnotationProviders | null | undefined>;
5
+ export declare const InlineCommentsStateContext: Context<Record<string, AnnotationMarkStates | null>>;
@@ -1,7 +1,7 @@
1
1
  import type { Position } from '../types';
2
2
  export declare const dataAttributes: ({ from, to }: Position) => {
3
3
  "data-annotation-draft-mark": boolean;
4
- "data-draft-start-at": number;
5
4
  "data-draft-end-at": number;
5
+ "data-draft-start-at": number;
6
6
  };
7
7
  export declare const updateWindowSelectionAroundDraft: (pos: Position) => boolean;
@@ -7,7 +7,7 @@ type Offset = {
7
7
  };
8
8
  export declare const splitText: (text: string, { startOffset, endOffset }: Offset) => string[] | null;
9
9
  export declare const calcTextSplitOffset: (position: Position, textPosition: TextPosition, text: string) => {
10
- startOffset: number;
11
10
  endOffset: number;
11
+ startOffset: number;
12
12
  };
13
13
  export {};
@@ -3,8 +3,9 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import type React from 'react';
6
+ import { type SerializedStyles } from '@emotion/react';
6
7
  import type { OnAnnotationClickPayload } from '@atlaskit/editor-common/types';
7
- import type { AnnotationId, AnnotationDataAttributes } from '@atlaskit/adf-schema';
8
+ import type { AnnotationId, AnnotationDataAttributes, AnnotationTypes } from '@atlaskit/adf-schema';
8
9
  import { AnnotationMarkStates } from '@atlaskit/adf-schema';
9
10
  type MarkComponentProps = {
10
11
  annotationParentIds: AnnotationId[];
@@ -17,108 +18,108 @@ type MarkComponentProps = {
17
18
  useBlockLevel?: boolean;
18
19
  };
19
20
  export declare const MarkComponent: ({ annotationParentIds, children, dataAttributes, id, state, hasFocus, isHovered, onClick, useBlockLevel, }: React.PropsWithChildren<MarkComponentProps>) => React.ReactElement<{
20
- css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
21
+ "aria-disabled": boolean;
22
+ css?: (false | SerializedStyles)[] | undefined;
23
+ "data-id": AnnotationId;
24
+ "data-mark-annotation-state"?: AnnotationMarkStates;
25
+ "data-mark-annotation-type": AnnotationTypes;
26
+ "data-mark-type": string;
27
+ id: string;
28
+ ref: ((node: HTMLElement | null) => void) | undefined;
21
29
  style?: {
22
- '--ak-renderer-annotation-startmarker': string;
23
- '--ak-renderer-annotation-endmarker': string;
30
+ "--ak-renderer-annotation-endmarker": string;
31
+ "--ak-renderer-annotation-startmarker": string;
24
32
  } | undefined;
25
- 'data-id': AnnotationId;
26
- 'data-mark-annotation-state'?: AnnotationMarkStates;
27
- 'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
28
- 'data-mark-type': string;
29
- 'aria-disabled': boolean;
30
- ref: ((node: HTMLElement | null) => void) | undefined;
31
- id: string;
32
33
  } | {
33
- css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
34
+ "aria-disabled": boolean;
35
+ css?: (false | SerializedStyles)[] | undefined;
36
+ "data-has-focus": boolean;
37
+ "data-id": AnnotationId;
38
+ "data-is-hovered": boolean;
39
+ "data-mark-annotation-state": AnnotationMarkStates;
40
+ "data-mark-annotation-type": AnnotationTypes;
41
+ "data-mark-type": string;
42
+ id: string;
43
+ ref: ((node: HTMLElement | null) => void) | undefined;
34
44
  style?: {
35
- '--ak-renderer-annotation-startmarker': string;
36
- '--ak-renderer-annotation-endmarker': string;
45
+ "--ak-renderer-annotation-endmarker": string;
46
+ "--ak-renderer-annotation-startmarker": string;
37
47
  } | undefined;
38
- 'data-mark-annotation-state': AnnotationMarkStates;
39
- 'data-has-focus': boolean;
40
- 'data-is-hovered': boolean;
41
- 'data-id': AnnotationId;
42
- 'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
43
- 'data-mark-type': string;
44
- 'aria-disabled': boolean;
45
- ref: ((node: HTMLElement | null) => void) | undefined;
46
- id: string;
47
48
  } | {
48
- css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
49
+ "aria-details": string;
50
+ "aria-disabled"?: undefined;
51
+ "aria-expanded"?: undefined;
52
+ css?: (false | SerializedStyles)[] | undefined;
53
+ "data-id": AnnotationId;
54
+ "data-mark-annotation-state"?: AnnotationMarkStates;
55
+ "data-mark-annotation-type": AnnotationTypes;
56
+ "data-mark-type": string;
57
+ id: string;
58
+ onKeyDown?: undefined;
59
+ ref: ((node: HTMLElement | null) => void) | undefined;
60
+ role?: undefined;
49
61
  style?: {
50
- '--ak-renderer-annotation-startmarker': string;
51
- '--ak-renderer-annotation-endmarker': string;
62
+ "--ak-renderer-annotation-endmarker": string;
63
+ "--ak-renderer-annotation-startmarker": string;
52
64
  } | undefined;
53
- 'data-id': AnnotationId;
54
- 'data-mark-annotation-state'?: AnnotationMarkStates;
55
- 'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
56
- 'data-mark-type': string;
57
- role?: undefined;
58
65
  tabIndex?: undefined;
66
+ } | {
67
+ "aria-details": string;
68
+ "aria-disabled"?: undefined;
69
+ "aria-expanded"?: undefined;
70
+ css?: (false | SerializedStyles)[] | undefined;
71
+ "data-has-focus": boolean;
72
+ "data-id": AnnotationId;
73
+ "data-is-hovered": boolean;
74
+ "data-mark-annotation-state": AnnotationMarkStates;
75
+ "data-mark-annotation-type": AnnotationTypes;
76
+ "data-mark-type": string;
77
+ id: string;
59
78
  onKeyDown?: undefined;
60
- 'aria-expanded'?: undefined;
61
- 'aria-details': string;
62
- 'aria-disabled'?: undefined;
63
79
  ref: ((node: HTMLElement | null) => void) | undefined;
64
- id: string;
65
- } | {
66
- css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
80
+ role?: undefined;
67
81
  style?: {
68
- '--ak-renderer-annotation-startmarker': string;
69
- '--ak-renderer-annotation-endmarker': string;
82
+ "--ak-renderer-annotation-endmarker": string;
83
+ "--ak-renderer-annotation-startmarker": string;
70
84
  } | undefined;
71
- 'data-mark-annotation-state': AnnotationMarkStates;
72
- 'data-has-focus': boolean;
73
- 'data-is-hovered': boolean;
74
- 'data-id': AnnotationId;
75
- 'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
76
- 'data-mark-type': string;
77
- role?: undefined;
78
85
  tabIndex?: undefined;
79
- onKeyDown?: undefined;
80
- 'aria-expanded'?: undefined;
81
- 'aria-details': string;
82
- 'aria-disabled'?: undefined;
83
- ref: ((node: HTMLElement | null) => void) | undefined;
84
- id: string;
85
86
  } | {
86
- css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
87
+ "aria-details": string;
88
+ "aria-disabled"?: undefined;
89
+ "aria-expanded": boolean;
90
+ css?: (false | SerializedStyles)[] | undefined;
91
+ "data-id": AnnotationId;
92
+ "data-mark-annotation-state"?: AnnotationMarkStates;
93
+ "data-mark-annotation-type": AnnotationTypes;
94
+ "data-mark-type": string;
95
+ id: string;
96
+ onKeyDown: (evt: KeyboardEvent) => void;
97
+ ref: ((node: HTMLElement | null) => void) | undefined;
98
+ role: string;
87
99
  style?: {
88
- '--ak-renderer-annotation-startmarker': string;
89
- '--ak-renderer-annotation-endmarker': string;
100
+ "--ak-renderer-annotation-endmarker": string;
101
+ "--ak-renderer-annotation-startmarker": string;
90
102
  } | undefined;
91
- 'data-id': AnnotationId;
92
- 'data-mark-annotation-state'?: AnnotationMarkStates;
93
- 'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
94
- 'data-mark-type': string;
95
- role: string;
96
103
  tabIndex: number;
104
+ } | {
105
+ "aria-details": string;
106
+ "aria-disabled"?: undefined;
107
+ "aria-expanded": boolean;
108
+ css?: (false | SerializedStyles)[] | undefined;
109
+ "data-has-focus": boolean;
110
+ "data-id": AnnotationId;
111
+ "data-is-hovered": boolean;
112
+ "data-mark-annotation-state": AnnotationMarkStates;
113
+ "data-mark-annotation-type": AnnotationTypes;
114
+ "data-mark-type": string;
115
+ id: string;
97
116
  onKeyDown: (evt: KeyboardEvent) => void;
98
- 'aria-expanded': boolean;
99
- 'aria-details': string;
100
- 'aria-disabled'?: undefined;
101
117
  ref: ((node: HTMLElement | null) => void) | undefined;
102
- id: string;
103
- } | {
104
- css?: (false | import("@emotion/utils").SerializedStyles)[] | undefined;
118
+ role: string;
105
119
  style?: {
106
- '--ak-renderer-annotation-startmarker': string;
107
- '--ak-renderer-annotation-endmarker': string;
120
+ "--ak-renderer-annotation-endmarker": string;
121
+ "--ak-renderer-annotation-startmarker": string;
108
122
  } | undefined;
109
- 'data-mark-annotation-state': AnnotationMarkStates;
110
- 'data-has-focus': boolean;
111
- 'data-is-hovered': boolean;
112
- 'data-id': AnnotationId;
113
- 'data-mark-annotation-type': import("@atlaskit/adf-schema").AnnotationTypes;
114
- 'data-mark-type': string;
115
- role: string;
116
123
  tabIndex: number;
117
- onKeyDown: (evt: KeyboardEvent) => void;
118
- 'aria-expanded': boolean;
119
- 'aria-details': string;
120
- 'aria-disabled'?: undefined;
121
- ref: ((node: HTMLElement | null) => void) | undefined;
122
- id: string;
123
- }, string | React.JSXElementConstructor<any>>;
124
+ }>;
124
125
  export {};
@@ -4,21 +4,21 @@ export type MarkDataAttributes = {
4
4
  };
5
5
  };
6
6
  export declare function useInlineAnnotationProps(props: MarkDataAttributes): {
7
- 'data-renderer-mark'?: undefined;
8
7
  'data-annotation-draft-mark'?: undefined;
9
8
  'data-annotation-inline-node'?: undefined;
10
- 'data-renderer-start-pos'?: undefined;
11
9
  'data-annotation-mark'?: undefined;
10
+ 'data-renderer-mark'?: undefined;
11
+ 'data-renderer-start-pos'?: undefined;
12
12
  } | {
13
- 'data-renderer-mark': boolean;
14
13
  'data-annotation-draft-mark': boolean;
15
14
  'data-annotation-inline-node': boolean;
16
- 'data-renderer-start-pos': number;
17
15
  'data-annotation-mark'?: undefined;
16
+ 'data-renderer-mark': boolean;
17
+ 'data-renderer-start-pos': number;
18
18
  } | {
19
+ 'data-annotation-draft-mark'?: undefined;
19
20
  'data-annotation-inline-node': boolean;
20
21
  'data-annotation-mark': boolean;
21
- 'data-renderer-start-pos': number;
22
22
  'data-renderer-mark'?: undefined;
23
- 'data-annotation-draft-mark'?: undefined;
23
+ 'data-renderer-start-pos': number;
24
24
  };
@@ -1 +1,2 @@
1
- export declare const useInlineCommentSubscriberContext: () => import("@atlaskit/editor-common/types").AnnotationUpdateEmitter | null;
1
+ import type { AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
2
+ export declare const useInlineCommentSubscriberContext: () => AnnotationUpdateEmitter | null;
@@ -13,5 +13,5 @@ export declare const LightWeightCodeBlockCssClassName: {
13
13
  * @deprecated styles are moved to RendererStyleContainer
14
14
  */
15
15
  export declare const getLightWeightCodeBlockStylesForRootRendererStyleSheet: () => SerializedStyles;
16
- declare const LightWeightCodeBlock: React.ForwardRefExoticComponent<Pick<CodeBlockProps, "text" | "className" | "codeBidiWarningTooltipEnabled"> & React.RefAttributes<HTMLDivElement>>;
16
+ declare const LightWeightCodeBlock: React.ForwardRefExoticComponent<Pick<CodeBlockProps, 'text' | 'className' | 'codeBidiWarningTooltipEnabled'> & React.RefAttributes<HTMLDivElement>>;
17
17
  export default LightWeightCodeBlock;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { WrappedComponentProps } from 'react-intl';
2
+ import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
3
3
  import type { AnalyticsEventPayload } from '../analytics/events';
4
4
  import type { RendererAppearance, RendererContentMode } from './Renderer/types';
5
5
  export interface ExpandProps {
@@ -13,7 +13,7 @@ export interface ExpandProps {
13
13
  rendererContentMode?: RendererContentMode;
14
14
  title: string;
15
15
  }
16
- declare const _default: React.FC<import("react-intl").WithIntlProps<ExpandProps & WrappedComponentProps>> & {
16
+ declare const _default_1: React.FC<WithIntlProps<ExpandProps & WrappedComponentProps>> & {
17
17
  WrappedComponent: React.ComponentType<ExpandProps & WrappedComponentProps>;
18
18
  };
19
- export default _default;
19
+ export default _default_1;
@@ -28,7 +28,8 @@ interface Props {
28
28
  text?: string;
29
29
  type: 'extension' | 'inlineExtension' | 'bodiedExtension' | 'multiBodiedExtension';
30
30
  }
31
- export default function ExtensionRenderer(props: Props): JSX.Element;
31
+ /** Renders extension (macro) nodes inside the ADF renderer. */
32
+ export default function ExtensionRenderer(props: Props): jsx.JSX.Element;
32
33
  export declare const InlineNodeRendererWrapper: ({ children, isPlainTextMacro, ssrPlaceholder, ssrPlaceholderReplace, }: React.PropsWithChildren<{
33
34
  isPlainTextMacro?: boolean;
34
35
  ssrPlaceholder?: string;