@atlaskit/renderer 108.7.3 → 108.7.4

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,11 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 108.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5057217ab16`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5057217ab16) - [ux] Fix border cutoff on renderer for linked images
8
+
3
9
  ## 108.7.3
4
10
 
5
11
  ### Patch Changes
@@ -20,11 +20,12 @@ var _analyticsNext = require("@atlaskit/analytics-next");
20
20
  var _analyticsNamespacedContext = require("@atlaskit/analytics-namespaced-context");
21
21
  var _providerFactory = require("@atlaskit/editor-common/provider-factory");
22
22
  var _ui = require("@atlaskit/editor-common/ui");
23
- var _MediaCard = require("../../ui/MediaCard");
23
+ var _MediaCard = require("../../../ui/MediaCard");
24
24
  var _editorPalette = require("@atlaskit/editor-palette");
25
- var _utils = require("../../utils");
25
+ var _utils = require("../../../utils");
26
26
  var _analytics = require("@atlaskit/editor-common/analytics");
27
- var _events = require("../../analytics/events");
27
+ var _events = require("../../../analytics/events");
28
+ var _styles = require("./styles");
28
29
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
30
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
30
31
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
@@ -79,21 +80,14 @@ var Media = /*#__PURE__*/function (_PureComponent) {
79
80
  "data-mark-type": "border",
80
81
  "data-color": borderColor,
81
82
  "data-size": borderWidth,
82
- style: {
83
- width: "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)"),
84
- height: "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)"),
85
- borderColor: paletteColorValue,
86
- borderWidth: "".concat(borderWidth, "px"),
87
- borderStyle: 'solid',
88
- borderRadius: "".concat(borderWidth * 2, "px")
89
- }
83
+ css: (0, _styles.borderStyle)(!!linkHref, paletteColorValue, borderWidth)
90
84
  }, mediaComponent) : mediaComponent;
91
85
  return linkHref ? (0, _react2.jsx)("a", {
92
86
  href: linkHref,
93
87
  rel: "noreferrer noopener",
94
88
  onClick: _this.handleMediaLinkClick,
95
89
  "data-block-link": linkHref,
96
- css: _ui.mediaLinkStyle
90
+ css: (0, _styles.linkStyle)(!!borderMark)
97
91
  }, mediaComponentWithBorder) : mediaComponentWithBorder;
98
92
  });
99
93
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleMediaLinkClick", function (event) {
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.linkStyle = exports.borderStyle = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
+ var _react = require("@emotion/react");
10
+ var _ui = require("@atlaskit/editor-common/ui");
11
+ var _templateObject, _templateObject2;
12
+ var linkStyle = function linkStyle(hasBorderMark) {
13
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n background: transparent;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n cursor: pointer;\n width: ", ";\n height: ", ";\n"])), hasBorderMark ? "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)") : '100%', hasBorderMark ? "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)") : '100%');
14
+ };
15
+ exports.linkStyle = linkStyle;
16
+ var borderStyle = function borderStyle(hasLinkMark, color, width) {
17
+ return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: ", ";\n height: ", ";\n border-color: ", ";\n border-width: ", "px;\n border-style: solid;\n border-radius: ", "px;\n"])), hasLinkMark ? '100%' : "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)"), hasLinkMark ? '100%' : "calc(100% - ".concat(_ui.IMAGE_AND_BORDER_ADJUSTMENT, "px)"), color, width, width * 2);
18
+ };
19
+ exports.borderStyle = borderStyle;
@@ -55,7 +55,7 @@ exports.NORMAL_SEVERITY_THRESHOLD = NORMAL_SEVERITY_THRESHOLD;
55
55
  var DEGRADED_SEVERITY_THRESHOLD = 3000;
56
56
  exports.DEGRADED_SEVERITY_THRESHOLD = DEGRADED_SEVERITY_THRESHOLD;
57
57
  var packageName = "@atlaskit/renderer";
58
- var packageVersion = "108.7.3";
58
+ var packageVersion = "108.7.4";
59
59
  var Renderer = /*#__PURE__*/function (_PureComponent) {
60
60
  (0, _inherits2.default)(Renderer, _PureComponent);
61
61
  var _super = _createSuper(Renderer);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.7.3",
3
+ "version": "108.7.4",
4
4
  "sideEffects": false
5
5
  }
@@ -7,12 +7,13 @@ import { jsx } from '@emotion/react';
7
7
  import { AnalyticsContext } from '@atlaskit/analytics-next';
8
8
  import { MEDIA_CONTEXT } from '@atlaskit/analytics-namespaced-context';
9
9
  import { WithProviders } from '@atlaskit/editor-common/provider-factory';
10
- import { mediaLinkStyle, IMAGE_AND_BORDER_ADJUSTMENT } from '@atlaskit/editor-common/ui';
11
- import { MediaCard } from '../../ui/MediaCard';
10
+ import { IMAGE_AND_BORDER_ADJUSTMENT } from '@atlaskit/editor-common/ui';
11
+ import { MediaCard } from '../../../ui/MediaCard';
12
12
  import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
13
- import { getEventHandler } from '../../utils';
13
+ import { getEventHandler } from '../../../utils';
14
14
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
15
- import { MODE, PLATFORM } from '../../analytics/events';
15
+ import { MODE, PLATFORM } from '../../../analytics/events';
16
+ import { linkStyle, borderStyle } from './styles';
16
17
  export default class Media extends PureComponent {
17
18
  constructor(...args) {
18
19
  super(...args);
@@ -60,21 +61,14 @@ export default class Media extends PureComponent {
60
61
  "data-mark-type": "border",
61
62
  "data-color": borderColor,
62
63
  "data-size": borderWidth,
63
- style: {
64
- width: `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)`,
65
- height: `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)`,
66
- borderColor: paletteColorValue,
67
- borderWidth: `${borderWidth}px`,
68
- borderStyle: 'solid',
69
- borderRadius: `${borderWidth * 2}px`
70
- }
64
+ css: borderStyle(!!linkHref, paletteColorValue, borderWidth)
71
65
  }, mediaComponent) : mediaComponent;
72
66
  return linkHref ? jsx("a", {
73
67
  href: linkHref,
74
68
  rel: "noreferrer noopener",
75
69
  onClick: this.handleMediaLinkClick,
76
70
  "data-block-link": linkHref,
77
- css: mediaLinkStyle
71
+ css: linkStyle(!!borderMark)
78
72
  }, mediaComponentWithBorder) : mediaComponentWithBorder;
79
73
  });
80
74
  _defineProperty(this, "handleMediaLinkClick", event => {
@@ -0,0 +1,21 @@
1
+ import { css } from '@emotion/react';
2
+ import { IMAGE_AND_BORDER_ADJUSTMENT } from '@atlaskit/editor-common/ui';
3
+ export const linkStyle = hasBorderMark => css`
4
+ position: absolute;
5
+ background: transparent;
6
+ top: 0;
7
+ right: 0;
8
+ bottom: 0;
9
+ left: 0;
10
+ cursor: pointer;
11
+ width: ${hasBorderMark ? `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)` : '100%'};
12
+ height: ${hasBorderMark ? `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)` : '100%'};
13
+ `;
14
+ export const borderStyle = (hasLinkMark, color, width) => css`
15
+ width: ${hasLinkMark ? '100%' : `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)`};
16
+ height: ${hasLinkMark ? '100%' : `calc(100% - ${IMAGE_AND_BORDER_ADJUSTMENT}px)`};
17
+ border-color: ${color};
18
+ border-width: ${width}px;
19
+ border-style: solid;
20
+ border-radius: ${width * 2}px;
21
+ `;
@@ -35,7 +35,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
35
35
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
36
36
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
37
37
  const packageName = "@atlaskit/renderer";
38
- const packageVersion = "108.7.3";
38
+ const packageVersion = "108.7.4";
39
39
  export class Renderer extends PureComponent {
40
40
  constructor(props) {
41
41
  super(props);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.7.3",
3
+ "version": "108.7.4",
4
4
  "sideEffects": false
5
5
  }
@@ -15,12 +15,13 @@ import { jsx } from '@emotion/react';
15
15
  import { AnalyticsContext } from '@atlaskit/analytics-next';
16
16
  import { MEDIA_CONTEXT } from '@atlaskit/analytics-namespaced-context';
17
17
  import { WithProviders } from '@atlaskit/editor-common/provider-factory';
18
- import { mediaLinkStyle, IMAGE_AND_BORDER_ADJUSTMENT } from '@atlaskit/editor-common/ui';
19
- import { MediaCard } from '../../ui/MediaCard';
18
+ import { IMAGE_AND_BORDER_ADJUSTMENT } from '@atlaskit/editor-common/ui';
19
+ import { MediaCard } from '../../../ui/MediaCard';
20
20
  import { hexToEditorBorderPaletteColor } from '@atlaskit/editor-palette';
21
- import { getEventHandler } from '../../utils';
21
+ import { getEventHandler } from '../../../utils';
22
22
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
23
- import { MODE, PLATFORM } from '../../analytics/events';
23
+ import { MODE, PLATFORM } from '../../../analytics/events';
24
+ import { linkStyle, borderStyle } from './styles';
24
25
  var Media = /*#__PURE__*/function (_PureComponent) {
25
26
  _inherits(Media, _PureComponent);
26
27
  var _super = _createSuper(Media);
@@ -71,21 +72,14 @@ var Media = /*#__PURE__*/function (_PureComponent) {
71
72
  "data-mark-type": "border",
72
73
  "data-color": borderColor,
73
74
  "data-size": borderWidth,
74
- style: {
75
- width: "calc(100% - ".concat(IMAGE_AND_BORDER_ADJUSTMENT, "px)"),
76
- height: "calc(100% - ".concat(IMAGE_AND_BORDER_ADJUSTMENT, "px)"),
77
- borderColor: paletteColorValue,
78
- borderWidth: "".concat(borderWidth, "px"),
79
- borderStyle: 'solid',
80
- borderRadius: "".concat(borderWidth * 2, "px")
81
- }
75
+ css: borderStyle(!!linkHref, paletteColorValue, borderWidth)
82
76
  }, mediaComponent) : mediaComponent;
83
77
  return linkHref ? jsx("a", {
84
78
  href: linkHref,
85
79
  rel: "noreferrer noopener",
86
80
  onClick: _this.handleMediaLinkClick,
87
81
  "data-block-link": linkHref,
88
- css: mediaLinkStyle
82
+ css: linkStyle(!!borderMark)
89
83
  }, mediaComponentWithBorder) : mediaComponentWithBorder;
90
84
  });
91
85
  _defineProperty(_assertThisInitialized(_this), "handleMediaLinkClick", function (event) {
@@ -0,0 +1,10 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+ var _templateObject, _templateObject2;
3
+ import { css } from '@emotion/react';
4
+ import { IMAGE_AND_BORDER_ADJUSTMENT } from '@atlaskit/editor-common/ui';
5
+ export var linkStyle = function linkStyle(hasBorderMark) {
6
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n background: transparent;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n cursor: pointer;\n width: ", ";\n height: ", ";\n"])), hasBorderMark ? "calc(100% - ".concat(IMAGE_AND_BORDER_ADJUSTMENT, "px)") : '100%', hasBorderMark ? "calc(100% - ".concat(IMAGE_AND_BORDER_ADJUSTMENT, "px)") : '100%');
7
+ };
8
+ export var borderStyle = function borderStyle(hasLinkMark, color, width) {
9
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n border-color: ", ";\n border-width: ", "px;\n border-style: solid;\n border-radius: ", "px;\n"])), hasLinkMark ? '100%' : "calc(100% - ".concat(IMAGE_AND_BORDER_ADJUSTMENT, "px)"), hasLinkMark ? '100%' : "calc(100% - ".concat(IMAGE_AND_BORDER_ADJUSTMENT, "px)"), color, width, width * 2);
10
+ };
@@ -45,7 +45,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
45
45
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
46
46
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
47
47
  var packageName = "@atlaskit/renderer";
48
- var packageVersion = "108.7.3";
48
+ var packageVersion = "108.7.4";
49
49
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
50
50
  _inherits(Renderer, _PureComponent);
51
51
  var _super = _createSuper(Renderer);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.7.3",
3
+ "version": "108.7.4",
4
4
  "sideEffects": false
5
5
  }
@@ -4,10 +4,10 @@ import { PureComponent } from 'react';
4
4
  import { jsx } from '@emotion/react';
5
5
  import type { EventHandlers } from '@atlaskit/editor-common/ui';
6
6
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
- import { MediaCardProps } from '../../ui/MediaCard';
7
+ import { MediaCardProps } from '../../../ui/MediaCard';
8
8
  import { LinkDefinition, BorderMarkDefinition } from '@atlaskit/adf-schema';
9
9
  import type { MediaFeatureFlags } from '@atlaskit/media-common';
10
- import { AnalyticsEventPayload } from '../../analytics/events';
10
+ import { AnalyticsEventPayload } from '../../../analytics/events';
11
11
  export type MediaProps = MediaCardProps & {
12
12
  providers?: ProviderFactory;
13
13
  allowAltTextOnImages?: boolean;
@@ -0,0 +1,2 @@
1
+ export declare const linkStyle: (hasBorderMark: boolean) => import("@emotion/react").SerializedStyles;
2
+ export declare const borderStyle: (hasLinkMark: boolean, color: string, width: number) => import("@emotion/react").SerializedStyles;
@@ -4,10 +4,10 @@ import { PureComponent } from 'react';
4
4
  import { jsx } from '@emotion/react';
5
5
  import type { EventHandlers } from '@atlaskit/editor-common/ui';
6
6
  import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
- import { MediaCardProps } from '../../ui/MediaCard';
7
+ import { MediaCardProps } from '../../../ui/MediaCard';
8
8
  import { LinkDefinition, BorderMarkDefinition } from '@atlaskit/adf-schema';
9
9
  import type { MediaFeatureFlags } from '@atlaskit/media-common';
10
- import { AnalyticsEventPayload } from '../../analytics/events';
10
+ import { AnalyticsEventPayload } from '../../../analytics/events';
11
11
  export type MediaProps = MediaCardProps & {
12
12
  providers?: ProviderFactory;
13
13
  allowAltTextOnImages?: boolean;
@@ -0,0 +1,2 @@
1
+ export declare const linkStyle: (hasBorderMark: boolean) => import("@emotion/react").SerializedStyles;
2
+ export declare const borderStyle: (hasLinkMark: boolean, color: string, width: number) => import("@emotion/react").SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.7.3",
3
+ "version": "108.7.4",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/analytics-next": "^9.1.0",
32
32
  "@atlaskit/button": "^16.8.0",
33
33
  "@atlaskit/code": "^14.6.0",
34
- "@atlaskit/editor-common": "^74.23.0",
34
+ "@atlaskit/editor-common": "^74.24.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.10.0",
36
36
  "@atlaskit/editor-palette": "1.5.1",
37
37
  "@atlaskit/editor-shared-styles": "^2.4.0",
@@ -0,0 +1,546 @@
1
+ ## API Report File for "@atlaskit/renderer"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="react" />
8
+
9
+ import { ACTION } from '@atlaskit/editor-common/analytics';
10
+ import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
11
+ import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
12
+ import type { ADFStage } from '@atlaskit/editor-common/validator';
13
+ import type { AnnotationProviders } from '@atlaskit/editor-common/types';
14
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
15
+ import { DocNode } from '@atlaskit/adf-schema';
16
+ import { EmojiResourceConfig } from '@atlaskit/emoji/resource';
17
+ import { EVENT_TYPE } from '@atlaskit/editor-common/analytics';
18
+ import type { EventHandlers } from '@atlaskit/editor-common/ui';
19
+ import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
20
+ import { Fragment } from 'prosemirror-model';
21
+ import { jsx } from '@emotion/react';
22
+ import { Mark } from 'prosemirror-model';
23
+ import { MediaClientConfig } from '@atlaskit/media-core';
24
+ import { MediaFeatureFlags } from '@atlaskit/media-common';
25
+ import { Node as Node_2 } from 'prosemirror-model';
26
+ import { OperationalAEP } from '@atlaskit/editor-common/analytics';
27
+ import { PropsDifference } from '@atlaskit/editor-common/utils';
28
+ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
29
+ import { Schema } from 'prosemirror-model';
30
+ import { SEVERITY } from '@atlaskit/editor-common/utils';
31
+ import { ShallowPropsDifference } from '@atlaskit/editor-common/utils';
32
+ import { SortOrder } from '@atlaskit/editor-common/types';
33
+ import { SSR } from '@atlaskit/media-common';
34
+ import type { Transformer as Transformer_2 } from '@atlaskit/editor-common/types';
35
+ import { UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from '@atlaskit/editor-common/utils';
36
+ import type { UnsupportedContentLevelsTracking } from '@atlaskit/editor-common/utils';
37
+ import type { UnsupportedContentPayload } from '@atlaskit/editor-common/utils';
38
+ import type { UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
39
+
40
+ // @public (undocumented)
41
+ export class ADFEncoder<T> {
42
+ constructor(createTransformerWithSchema: TransformerProvider<T>);
43
+ // (undocumented)
44
+ encode: (value: T) => any;
45
+ }
46
+
47
+ // @public (undocumented)
48
+ type AEP<Action, ActionSubject, ActionSubjectID, Attributes, EventType> = {
49
+ action: Action;
50
+ actionSubject: ActionSubject;
51
+ actionSubjectId?: ActionSubjectID;
52
+ attributes?: Attributes;
53
+ eventType: EventType;
54
+ };
55
+
56
+ // @public (undocumented)
57
+ type AnalyticsEventPayload<T = void> = AnchorLinkAEP | AnnotationAEP | AnnotationDeleteAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | ComponentCrashErrorAEP | ExpandAEP | HeadingAnchorLinkButtonAEP | InvalidProsemirrorDocumentErrorAEP | MediaLnkTransformedAEP | RendererReRenderedAEP<T> | RendererRenderedAEP | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | RendererStartAEP | RendererTTIAEP | RendererUnsupportedContentLevelsTrackingErrored | RendererUnsupportedContentLevelsTrackingSucceeded | TableSortColumnAEP | TableSortColumnNotAllowedAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | VisitLinkAEP | VisitMediaLinkAEP;
58
+
59
+ // @public (undocumented)
60
+ type AnchorLinkAEP = UIAEP<ACTION.VIEWED, ACTION_SUBJECT.ANCHOR_LINK, undefined, {
61
+ platform: PLATFORM.WEB;
62
+ mode: MODE.RENDERER;
63
+ }>;
64
+
65
+ // @public (undocumented)
66
+ type AnnotationActionType = ACTION.CLOSED | ACTION.CREATE_NOT_ALLOWED | ACTION.DELETED | ACTION.EDITED | ACTION.INSERTED | ACTION.OPENED | ACTION.RESOLVED | ACTION.VIEWED;
67
+
68
+ // @public (undocumented)
69
+ type AnnotationAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, AnnotationAEPAttributes, undefined>;
70
+
71
+ // @public (undocumented)
72
+ type AnnotationAEPAttributes = AnnotationDraftAEPAttributes | AnnotationResolvedAEPAttributes;
73
+
74
+ // @public (undocumented)
75
+ type AnnotationDeleteAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID, undefined, EVENT_TYPE.TRACK>;
76
+
77
+ // @public (undocumented)
78
+ type AnnotationDraftAEPAttributes = {
79
+ overlap?: number;
80
+ };
81
+
82
+ // @public (undocumented)
83
+ type AnnotationResolvedAEPAttributes = {
84
+ method?: RESOLVE_METHOD;
85
+ };
86
+
87
+ // @public (undocumented)
88
+ type ButtonAEP<ActionSubjectID, Attributes> = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.BUTTON, ActionSubjectID, Attributes>;
89
+
90
+ // @public (undocumented)
91
+ type CodeBlockCopyAEP = ButtonAEP<ACTION_SUBJECT_ID.CODEBLOCK_COPY, undefined>;
92
+
93
+ // @public (undocumented)
94
+ type CodeBlockWrapAEP = ButtonAEP<ACTION_SUBJECT_ID.CODEBLOCK_WRAP, {
95
+ wrapped: boolean;
96
+ }>;
97
+
98
+ // @public (undocumented)
99
+ type ComponentCrashErrorAEP = OperationalAEP<ACTION.CRASHED, ACTION_SUBJECT.RENDERER, ACTION_SUBJECT_ID, {
100
+ platform: PLATFORM.WEB;
101
+ errorMessage?: string;
102
+ errorStack?: string;
103
+ componentStack?: string;
104
+ errorRethrown?: boolean;
105
+ }, {
106
+ errorStack?: string;
107
+ }>;
108
+
109
+ // @public (undocumented)
110
+ type DispatchAnalyticsEvent = (event: AnalyticsEventPayload) => void;
111
+
112
+ // @public (undocumented)
113
+ type ExpandAEP = AEP<ACTION.TOGGLE_EXPAND, ACTION_SUBJECT.EXPAND | ACTION_SUBJECT.NESTED_EXPAND, undefined, {
114
+ platform: PLATFORM.WEB;
115
+ mode: MODE.RENDERER;
116
+ expanded: boolean;
117
+ }, EVENT_TYPE.TRACK>;
118
+
119
+ // @public (undocumented)
120
+ type HeadingAnchorLinkButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.HEADING_ANCHOR_LINK, undefined>;
121
+
122
+ // @public (undocumented)
123
+ type HeadingAnchorLinksConfig = {
124
+ activeHeadingId?: string;
125
+ allowNestedHeaderLinks?: boolean;
126
+ };
127
+
128
+ // @public (undocumented)
129
+ export type HeadingAnchorLinksProps = HeadingAnchorLinksConfig | boolean;
130
+
131
+ // @public (undocumented)
132
+ type InvalidProsemirrorDocumentErrorAEP = AEP<ACTION.INVALID_PROSEMIRROR_DOCUMENT, ACTION_SUBJECT.RENDERER, ACTION_SUBJECT_ID, {
133
+ platform: PLATFORM.WEB;
134
+ errorStack?: string;
135
+ }, EVENT_TYPE.OPERATIONAL>;
136
+
137
+ // @public (undocumented)
138
+ type MediaLnkTransformedAEP = AEP<ACTION.MEDIA_LINK_TRANSFORMED, ACTION_SUBJECT.RENDERER, undefined, undefined, EVENT_TYPE.OPERATIONAL>;
139
+
140
+ // @public (undocumented)
141
+ interface MediaOptions {
142
+ // (undocumented)
143
+ allowLinking?: boolean;
144
+ // (undocumented)
145
+ enableDownloadButton?: boolean;
146
+ // (undocumented)
147
+ featureFlags?: MediaFeatureFlags;
148
+ // (undocumented)
149
+ ssr?: MediaSSR;
150
+ }
151
+
152
+ // @public (undocumented)
153
+ export type MediaSSR = {
154
+ mode: SSR;
155
+ config: MediaClientConfig;
156
+ };
157
+
158
+ // @public (undocumented)
159
+ enum MODE {
160
+ // (undocumented)
161
+ EDITOR = "editor",
162
+ // (undocumented)
163
+ RENDERER = "renderer"
164
+ }
165
+
166
+ // @public (undocumented)
167
+ type NodeComponentsProps = {
168
+ [key: string]: React.ComponentType<any>;
169
+ };
170
+
171
+ // @public (undocumented)
172
+ interface ParentInfo {
173
+ // (undocumented)
174
+ parentIsIncompleteTask: boolean;
175
+ // (undocumented)
176
+ path: Array<Node_2>;
177
+ // (undocumented)
178
+ pos: number;
179
+ }
180
+
181
+ // @public (undocumented)
182
+ enum PLATFORM {
183
+ // (undocumented)
184
+ HYBRID = "mobileHybrid",
185
+ // (undocumented)
186
+ NATIVE = "mobileNative",
187
+ // (undocumented)
188
+ WEB = "web"
189
+ }
190
+
191
+ // @public (undocumented)
192
+ interface RawObjectFeatureFlags {
193
+ // (undocumented)
194
+ ['renderer-render-tracking']: string;
195
+ }
196
+
197
+ // @public (undocumented)
198
+ export const ReactRenderer: (props: RendererProps) => jsx.JSX.Element;
199
+
200
+ // @public (undocumented)
201
+ export class ReactSerializer implements Serializer<JSX.Element> {
202
+ constructor(init: ReactSerializerInit);
203
+ // (undocumented)
204
+ static buildMarkStructure(content: Node_2[]): Mark[];
205
+ // (undocumented)
206
+ static fromSchema(_: unknown, init: ReactSerializerInit): ReactSerializer;
207
+ // (undocumented)
208
+ static getChildNodes(fragment: Fragment): (Node_2 | TextWrapper)[];
209
+ // (undocumented)
210
+ static getMarks(node: Node_2): Mark[];
211
+ // (undocumented)
212
+ serializeFragment(fragment: Fragment, props?: any, target?: any, key?: string, parentInfo?: ParentInfo): JSX.Element | null;
213
+ }
214
+
215
+ // @public (undocumented)
216
+ interface ReactSerializerInit {
217
+ // (undocumented)
218
+ allowAltTextOnImages?: boolean;
219
+ // (undocumented)
220
+ allowAnnotations?: boolean;
221
+ // (undocumented)
222
+ allowColumnSorting?: boolean;
223
+ // (undocumented)
224
+ allowCopyToClipboard?: boolean;
225
+ // (undocumented)
226
+ allowCustomPanels?: boolean;
227
+ // (undocumented)
228
+ allowHeadingAnchorLinks?: HeadingAnchorLinksProps;
229
+ // (undocumented)
230
+ allowMediaLinking?: boolean;
231
+ // (undocumented)
232
+ allowPlaceholderText?: boolean;
233
+ // (undocumented)
234
+ allowSelectAllTrap?: boolean;
235
+ // (undocumented)
236
+ allowWindowedCodeBlock?: boolean;
237
+ // (undocumented)
238
+ allowWrapCodeBlock?: boolean;
239
+ // (undocumented)
240
+ appearance?: RendererAppearance;
241
+ // (undocumented)
242
+ disableActions?: boolean;
243
+ // (undocumented)
244
+ disableHeadingIDs?: boolean;
245
+ // (undocumented)
246
+ emojiResourceConfig?: EmojiResourceConfig;
247
+ // (undocumented)
248
+ eventHandlers?: EventHandlers;
249
+ // (undocumented)
250
+ extensionHandlers?: ExtensionHandlers;
251
+ // (undocumented)
252
+ fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
253
+ // (undocumented)
254
+ media?: MediaOptions;
255
+ // (undocumented)
256
+ nodeComponents?: NodeComponentsProps;
257
+ // (undocumented)
258
+ objectContext?: RendererContext;
259
+ // (undocumented)
260
+ portal?: HTMLElement;
261
+ // (undocumented)
262
+ providers?: ProviderFactory;
263
+ // (undocumented)
264
+ shouldOpenMediaViewer?: boolean;
265
+ // (undocumented)
266
+ smartLinks?: SmartLinksOptions;
267
+ // (undocumented)
268
+ stickyHeaders?: StickyHeaderConfig;
269
+ // (undocumented)
270
+ surroundTextNodesWithTextWrapper?: boolean;
271
+ }
272
+
273
+ // @public (undocumented)
274
+ export const renderDocument: <T>(doc: any, serializer: Serializer<T>, schema?: Schema, adfStage?: ADFStage, useSpecBasedValidator?: boolean, rendererId?: string, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, unsupportedContentLevelsTracking?: UnsupportedContentLevelsTracking, appearance?: RendererAppearance) => RenderOutput<T | null>;
275
+
276
+ // @public (undocumented)
277
+ export type RendererAppearance = 'comment' | 'full-page' | 'full-width' | 'mobile' | undefined;
278
+
279
+ // @public (undocumented)
280
+ export interface RendererContext {
281
+ // (undocumented)
282
+ adDoc?: any;
283
+ // (undocumented)
284
+ containerAri?: string;
285
+ // (undocumented)
286
+ objectAri?: string;
287
+ // (undocumented)
288
+ schema?: Schema;
289
+ }
290
+
291
+ // @public (undocumented)
292
+ export interface RendererProps {
293
+ // (undocumented)
294
+ adfStage?: ADFStage;
295
+ // (undocumented)
296
+ allowAltTextOnImages?: boolean;
297
+ // (undocumented)
298
+ allowAnnotations?: boolean;
299
+ // (undocumented)
300
+ allowColumnSorting?: boolean;
301
+ // (undocumented)
302
+ allowCopyToClipboard?: boolean;
303
+ // (undocumented)
304
+ allowCustomPanels?: boolean;
305
+ // (undocumented)
306
+ allowHeadingAnchorLinks?: HeadingAnchorLinksProps;
307
+ // (undocumented)
308
+ allowPlaceholderText?: boolean;
309
+ // (undocumented)
310
+ allowSelectAllTrap?: boolean;
311
+ // (undocumented)
312
+ allowUgcScrubber?: boolean;
313
+ // (undocumented)
314
+ allowWrapCodeBlock?: boolean;
315
+ // (undocumented)
316
+ analyticsEventSeverityTracking?: {
317
+ enabled: boolean;
318
+ severityNormalThreshold: number;
319
+ severityDegradedThreshold: number;
320
+ };
321
+ // (undocumented)
322
+ annotationProvider?: AnnotationProviders | null;
323
+ // (undocumented)
324
+ appearance?: RendererAppearance;
325
+ // (undocumented)
326
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
327
+ // (undocumented)
328
+ dataProviders?: ProviderFactory;
329
+ // (undocumented)
330
+ disableActions?: boolean;
331
+ // (undocumented)
332
+ disableHeadingIDs?: boolean;
333
+ // (undocumented)
334
+ document: DocNode;
335
+ // (undocumented)
336
+ emojiResourceConfig?: EmojiResourceConfig;
337
+ // (undocumented)
338
+ enableSsrInlineScripts?: boolean;
339
+ // (undocumented)
340
+ eventHandlers?: EventHandlers;
341
+ // (undocumented)
342
+ extensionHandlers?: ExtensionHandlers;
343
+ // (undocumented)
344
+ fadeOutHeight?: number;
345
+ featureFlags?: Partial<RawObjectFeatureFlags> | {
346
+ [featureFlag: string]: boolean;
347
+ };
348
+ // (undocumented)
349
+ innerRef?: React.RefObject<HTMLDivElement>;
350
+ // (undocumented)
351
+ maxHeight?: number;
352
+ // (undocumented)
353
+ media?: MediaOptions;
354
+ // (undocumented)
355
+ nodeComponents?: NodeComponentsProps;
356
+ // (undocumented)
357
+ onComplete?: (stat: RenderOutputStat) => void;
358
+ // (undocumented)
359
+ onError?: (error: any) => void;
360
+ // (undocumented)
361
+ portal?: HTMLElement;
362
+ // (undocumented)
363
+ rendererContext?: RendererContext;
364
+ // (undocumented)
365
+ schema?: Schema;
366
+ // (undocumented)
367
+ shouldOpenMediaViewer?: boolean;
368
+ // (undocumented)
369
+ smartLinks?: SmartLinksOptions;
370
+ // (undocumented)
371
+ stickyHeaders?: StickyHeaderProps;
372
+ // (undocumented)
373
+ truncated?: boolean;
374
+ // (undocumented)
375
+ unsupportedContentLevelsTracking?: UnsupportedContentLevelsTracking;
376
+ // (undocumented)
377
+ useSpecBasedValidator?: boolean;
378
+ }
379
+
380
+ // @public (undocumented)
381
+ type RendererRenderedAEP = AEP<ACTION.RENDERED, ACTION_SUBJECT.RENDERER, undefined, {
382
+ platform: PLATFORM.WEB;
383
+ duration: number;
384
+ distortedDuration: boolean;
385
+ ttfb?: number;
386
+ nodes: Record<string, number>;
387
+ severity?: SEVERITY;
388
+ }, EVENT_TYPE.OPERATIONAL>;
389
+
390
+ // @public (undocumented)
391
+ type RendererReRenderedAEP<Props> = AEP<ACTION.RE_RENDERED, ACTION_SUBJECT.RENDERER, undefined, {
392
+ propsDifference: PropsDifference<Props> | ShallowPropsDifference<Props>;
393
+ count: number;
394
+ componentId?: string;
395
+ }, EVENT_TYPE.OPERATIONAL>;
396
+
397
+ // @public (undocumented)
398
+ type RendererSelectAllCaughtAEP = AEP<ACTION.SELECT_ALL_CAUGHT, ACTION_SUBJECT.RENDERER, undefined, {
399
+ platform: PLATFORM.WEB;
400
+ }, EVENT_TYPE.TRACK>;
401
+
402
+ // @public (undocumented)
403
+ type RendererSelectAllEscapedAEP = AEP<ACTION.SELECT_ALL_ESCAPED, ACTION_SUBJECT.RENDERER, undefined, {
404
+ platform: PLATFORM.WEB;
405
+ }, EVENT_TYPE.TRACK>;
406
+
407
+ // @public (undocumented)
408
+ type RendererStartAEP = AEP<ACTION.STARTED, ACTION_SUBJECT.RENDERER, undefined, {
409
+ platform: PLATFORM.WEB;
410
+ }, EVENT_TYPE.UI>;
411
+
412
+ // @public (undocumented)
413
+ type RendererTTIAEP = AEP<ACTION.RENDERER_TTI, ACTION_SUBJECT.RENDERER, undefined, {
414
+ tti: number;
415
+ ttiFromInvocation: number;
416
+ canceled: boolean;
417
+ }, EVENT_TYPE.OPERATIONAL>;
418
+
419
+ // @public (undocumented)
420
+ type RendererUnsupportedContentLevelsTrackingErrored = AEP<ACTION.UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED, ACTION_SUBJECT.RENDERER, undefined, {
421
+ platform: PLATFORM.WEB;
422
+ error: string;
423
+ }, EVENT_TYPE.OPERATIONAL>;
424
+
425
+ // @public (undocumented)
426
+ type RendererUnsupportedContentLevelsTrackingSucceeded = AEP<ACTION.UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED, ACTION_SUBJECT.RENDERER, undefined, {
427
+ appearance?: string;
428
+ platform: PLATFORM.WEB;
429
+ unsupportedContentLevelSeverity: UNSUPPORTED_CONTENT_LEVEL_SEVERITY;
430
+ unsupportedContentLevelPercentage: number;
431
+ unsupportedNodesCount: number;
432
+ supportedNodesCount: number;
433
+ }, EVENT_TYPE.OPERATIONAL>;
434
+
435
+ // @public (undocumented)
436
+ interface RenderOutput<T> {
437
+ // (undocumented)
438
+ pmDoc?: Node_2;
439
+ // (undocumented)
440
+ result: T;
441
+ // (undocumented)
442
+ stat: RenderOutputStat;
443
+ }
444
+
445
+ // @public (undocumented)
446
+ export interface RenderOutputStat {
447
+ // (undocumented)
448
+ buildTreeTime?: number;
449
+ // (undocumented)
450
+ sanitizeTime: number;
451
+ // (undocumented)
452
+ serializeTime?: number;
453
+ }
454
+
455
+ // @public (undocumented)
456
+ enum RESOLVE_METHOD {
457
+ // (undocumented)
458
+ COMPONENT = "component",
459
+ // (undocumented)
460
+ CONSUMER = "consumer",
461
+ // (undocumented)
462
+ ORPHANED = "orphaned"
463
+ }
464
+
465
+ // @public (undocumented)
466
+ export interface Serializer<T> {
467
+ // (undocumented)
468
+ serializeFragment(fragment: Fragment, props?: any, target?: any, key?: string): T | null;
469
+ }
470
+
471
+ // @public (undocumented)
472
+ interface SmartLinksOptions {
473
+ // (undocumented)
474
+ showAuthTooltip?: boolean;
475
+ // (undocumented)
476
+ showServerActions?: boolean;
477
+ // (undocumented)
478
+ ssr?: boolean;
479
+ }
480
+
481
+ // @public (undocumented)
482
+ type StickyHeaderConfig = {
483
+ offsetTop?: number;
484
+ };
485
+
486
+ // @public (undocumented)
487
+ type StickyHeaderProps = ({
488
+ show?: boolean;
489
+ } & StickyHeaderConfig) | boolean;
490
+
491
+ // @public (undocumented)
492
+ type TableSortColumnAEP = AEP<ACTION.SORT_COLUMN, ACTION_SUBJECT.TABLE, undefined, {
493
+ platform: PLATFORM.WEB;
494
+ mode: MODE.RENDERER;
495
+ sortOrder: SortOrder;
496
+ columnIndex: number;
497
+ }, EVENT_TYPE.TRACK>;
498
+
499
+ // @public (undocumented)
500
+ type TableSortColumnNotAllowedAEP = AEP<ACTION.SORT_COLUMN_NOT_ALLOWED, ACTION_SUBJECT.TABLE, undefined, {
501
+ platform: PLATFORM.WEB;
502
+ mode: MODE.RENDERER;
503
+ }, EVENT_TYPE.TRACK>;
504
+
505
+ // @public (undocumented)
506
+ export class TextSerializer implements Serializer<string> {
507
+ constructor(schema: Schema);
508
+ // (undocumented)
509
+ static fromSchema(schema?: Schema): TextSerializer;
510
+ // (undocumented)
511
+ serializeFragment(fragment: Fragment): string;
512
+ }
513
+
514
+ // @public (undocumented)
515
+ interface TextWrapper {
516
+ // (undocumented)
517
+ content: Node_2[];
518
+ // (undocumented)
519
+ nodeSize: number;
520
+ // (undocumented)
521
+ type: {
522
+ name: 'textWrapper';
523
+ };
524
+ }
525
+
526
+ // @public (undocumented)
527
+ type TransformerProvider<T> = (schema: Schema) => Transformer_2<T>;
528
+
529
+ // @public (undocumented)
530
+ type UIAEP<Action, ActionSubject, ActionSubjectID, Attributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, EVENT_TYPE.UI>;
531
+
532
+ // @public (undocumented)
533
+ type VisitLinkAEP = AEP<ACTION.VISITED, ACTION_SUBJECT.LINK, undefined, {
534
+ platform: PLATFORM.WEB;
535
+ mode: MODE.RENDERER;
536
+ }, EVENT_TYPE.TRACK>;
537
+
538
+ // @public (undocumented)
539
+ type VisitMediaLinkAEP = AEP<ACTION.VISITED, ACTION_SUBJECT.MEDIA, ACTION_SUBJECT_ID.LINK, {
540
+ platform: PLATFORM.WEB;
541
+ mode: MODE.RENDERER;
542
+ }, EVENT_TYPE.TRACK>;
543
+
544
+ // (No @packageDocumentation comment for this package)
545
+
546
+ ```