@atlaskit/renderer 103.0.1 → 103.0.2

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 (205) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/ui/Renderer/index.js +1 -1
  3. package/dist/cjs/ui/Renderer/style.js +1 -1
  4. package/dist/cjs/version.json +1 -1
  5. package/dist/es2019/ui/Renderer/index.js +1 -1
  6. package/dist/es2019/ui/Renderer/style.js +284 -284
  7. package/dist/es2019/version.json +1 -1
  8. package/dist/esm/ui/Renderer/index.js +1 -1
  9. package/dist/esm/ui/Renderer/style.js +1 -1
  10. package/dist/esm/version.json +1 -1
  11. package/package.json +5 -13
  12. package/dist/types-ts4.0/actions/index.d.ts +0 -61
  13. package/dist/types-ts4.0/actions/matches-utils.d.ts +0 -7
  14. package/dist/types-ts4.0/actions.d.ts +0 -3
  15. package/dist/types-ts4.0/analytics/analyticsContext.d.ts +0 -6
  16. package/dist/types-ts4.0/analytics/enums.d.ts +0 -56
  17. package/dist/types-ts4.0/analytics/events.d.ts +0 -110
  18. package/dist/types-ts4.0/analytics/unsupported-content.d.ts +0 -10
  19. package/dist/types-ts4.0/consts.d.ts +0 -12
  20. package/dist/types-ts4.0/i18n/cs.d.ts +0 -20
  21. package/dist/types-ts4.0/i18n/da.d.ts +0 -20
  22. package/dist/types-ts4.0/i18n/de.d.ts +0 -20
  23. package/dist/types-ts4.0/i18n/en.d.ts +0 -20
  24. package/dist/types-ts4.0/i18n/en_GB.d.ts +0 -20
  25. package/dist/types-ts4.0/i18n/en_ZZ.d.ts +0 -20
  26. package/dist/types-ts4.0/i18n/es.d.ts +0 -20
  27. package/dist/types-ts4.0/i18n/et.d.ts +0 -8
  28. package/dist/types-ts4.0/i18n/fi.d.ts +0 -20
  29. package/dist/types-ts4.0/i18n/fr.d.ts +0 -20
  30. package/dist/types-ts4.0/i18n/hu.d.ts +0 -20
  31. package/dist/types-ts4.0/i18n/index.d.ts +0 -31
  32. package/dist/types-ts4.0/i18n/it.d.ts +0 -20
  33. package/dist/types-ts4.0/i18n/ja.d.ts +0 -20
  34. package/dist/types-ts4.0/i18n/ko.d.ts +0 -20
  35. package/dist/types-ts4.0/i18n/nb.d.ts +0 -20
  36. package/dist/types-ts4.0/i18n/nl.d.ts +0 -20
  37. package/dist/types-ts4.0/i18n/pl.d.ts +0 -20
  38. package/dist/types-ts4.0/i18n/pt_BR.d.ts +0 -20
  39. package/dist/types-ts4.0/i18n/pt_PT.d.ts +0 -8
  40. package/dist/types-ts4.0/i18n/ru.d.ts +0 -20
  41. package/dist/types-ts4.0/i18n/sk.d.ts +0 -8
  42. package/dist/types-ts4.0/i18n/sv.d.ts +0 -20
  43. package/dist/types-ts4.0/i18n/th.d.ts +0 -20
  44. package/dist/types-ts4.0/i18n/tr.d.ts +0 -20
  45. package/dist/types-ts4.0/i18n/uk.d.ts +0 -20
  46. package/dist/types-ts4.0/i18n/vi.d.ts +0 -20
  47. package/dist/types-ts4.0/i18n/zh.d.ts +0 -20
  48. package/dist/types-ts4.0/i18n/zh_TW.d.ts +0 -20
  49. package/dist/types-ts4.0/index.d.ts +0 -11
  50. package/dist/types-ts4.0/messages.d.ts +0 -61
  51. package/dist/types-ts4.0/react/hooks/use-bidi-warnings.d.ts +0 -10
  52. package/dist/types-ts4.0/react/hooks/use-in-viewport.d.ts +0 -5
  53. package/dist/types-ts4.0/react/hooks/use-observed-width.d.ts +0 -3
  54. package/dist/types-ts4.0/react/index.d.ts +0 -118
  55. package/dist/types-ts4.0/react/marks/alignment.d.ts +0 -4
  56. package/dist/types-ts4.0/react/marks/annotation.d.ts +0 -6
  57. package/dist/types-ts4.0/react/marks/breakout.d.ts +0 -6
  58. package/dist/types-ts4.0/react/marks/code.d.ts +0 -16
  59. package/dist/types-ts4.0/react/marks/confluence-inline-comment.d.ts +0 -8
  60. package/dist/types-ts4.0/react/marks/data-consumer.d.ts +0 -4
  61. package/dist/types-ts4.0/react/marks/em.d.ts +0 -3
  62. package/dist/types-ts4.0/react/marks/fragment.d.ts +0 -4
  63. package/dist/types-ts4.0/react/marks/indentation.d.ts +0 -4
  64. package/dist/types-ts4.0/react/marks/index.d.ts +0 -21
  65. package/dist/types-ts4.0/react/marks/link.d.ts +0 -9
  66. package/dist/types-ts4.0/react/marks/strike.d.ts +0 -3
  67. package/dist/types-ts4.0/react/marks/strong.d.ts +0 -3
  68. package/dist/types-ts4.0/react/marks/subsup.d.ts +0 -4
  69. package/dist/types-ts4.0/react/marks/textColor.d.ts +0 -4
  70. package/dist/types-ts4.0/react/marks/underline.d.ts +0 -3
  71. package/dist/types-ts4.0/react/marks/unsupportedMark.d.ts +0 -3
  72. package/dist/types-ts4.0/react/marks/unsupportedNodeAttribute.d.ts +0 -3
  73. package/dist/types-ts4.0/react/nodes/blockCard.d.ts +0 -10
  74. package/dist/types-ts4.0/react/nodes/blockquote.d.ts +0 -2
  75. package/dist/types-ts4.0/react/nodes/bodiedExtension.d.ts +0 -24
  76. package/dist/types-ts4.0/react/nodes/bulletList.d.ts +0 -5
  77. package/dist/types-ts4.0/react/nodes/caption.d.ts +0 -4
  78. package/dist/types-ts4.0/react/nodes/codeBlock/codeBlock.d.ts +0 -14
  79. package/dist/types-ts4.0/react/nodes/codeBlock/components/codeBlockContainer.d.ts +0 -12
  80. package/dist/types-ts4.0/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +0 -9
  81. package/dist/types-ts4.0/react/nodes/codeBlock/windowedCodeBlock.d.ts +0 -4
  82. package/dist/types-ts4.0/react/nodes/codeBlockCopyButton.d.ts +0 -9
  83. package/dist/types-ts4.0/react/nodes/date.d.ts +0 -11
  84. package/dist/types-ts4.0/react/nodes/decisionItem.d.ts +0 -3
  85. package/dist/types-ts4.0/react/nodes/decisionList.d.ts +0 -7
  86. package/dist/types-ts4.0/react/nodes/doc.d.ts +0 -3
  87. package/dist/types-ts4.0/react/nodes/embedCard.d.ts +0 -17
  88. package/dist/types-ts4.0/react/nodes/emoji.d.ts +0 -10
  89. package/dist/types-ts4.0/react/nodes/extension.d.ts +0 -113
  90. package/dist/types-ts4.0/react/nodes/fallback.d.ts +0 -16
  91. package/dist/types-ts4.0/react/nodes/hardBreak.d.ts +0 -6
  92. package/dist/types-ts4.0/react/nodes/heading-anchor.d.ts +0 -14
  93. package/dist/types-ts4.0/react/nodes/heading.d.ts +0 -14
  94. package/dist/types-ts4.0/react/nodes/index.d.ts +0 -94
  95. package/dist/types-ts4.0/react/nodes/inline.d.ts +0 -1
  96. package/dist/types-ts4.0/react/nodes/inlineCard.d.ts +0 -65
  97. package/dist/types-ts4.0/react/nodes/inlineExtension.d.ts +0 -18
  98. package/dist/types-ts4.0/react/nodes/layoutColumn.d.ts +0 -6
  99. package/dist/types-ts4.0/react/nodes/layoutSection.d.ts +0 -2
  100. package/dist/types-ts4.0/react/nodes/listItem.d.ts +0 -2
  101. package/dist/types-ts4.0/react/nodes/media.d.ts +0 -27
  102. package/dist/types-ts4.0/react/nodes/mediaGroup.d.ts +0 -29
  103. package/dist/types-ts4.0/react/nodes/mediaInline.d.ts +0 -20
  104. package/dist/types-ts4.0/react/nodes/mediaSingle/index.d.ts +0 -23
  105. package/dist/types-ts4.0/react/nodes/mediaSingle/styles.d.ts +0 -2
  106. package/dist/types-ts4.0/react/nodes/mention.d.ts +0 -13
  107. package/dist/types-ts4.0/react/nodes/orderedList.d.ts +0 -6
  108. package/dist/types-ts4.0/react/nodes/panel.d.ts +0 -17
  109. package/dist/types-ts4.0/react/nodes/paragraph.d.ts +0 -3
  110. package/dist/types-ts4.0/react/nodes/placeholder.d.ts +0 -6
  111. package/dist/types-ts4.0/react/nodes/rule.d.ts +0 -2
  112. package/dist/types-ts4.0/react/nodes/status.d.ts +0 -10
  113. package/dist/types-ts4.0/react/nodes/table/colgroup.d.ts +0 -3
  114. package/dist/types-ts4.0/react/nodes/table/sticky.d.ts +0 -38
  115. package/dist/types-ts4.0/react/nodes/table/table.d.ts +0 -7
  116. package/dist/types-ts4.0/react/nodes/table/types.d.ts +0 -7
  117. package/dist/types-ts4.0/react/nodes/table.d.ts +0 -269
  118. package/dist/types-ts4.0/react/nodes/tableCell.d.ts +0 -81
  119. package/dist/types-ts4.0/react/nodes/tableRow.d.ts +0 -24
  120. package/dist/types-ts4.0/react/nodes/task-item-with-providers.d.ts +0 -29
  121. package/dist/types-ts4.0/react/nodes/taskItem.d.ts +0 -19
  122. package/dist/types-ts4.0/react/nodes/taskList.d.ts +0 -8
  123. package/dist/types-ts4.0/react/nodes/text-wrapper.d.ts +0 -8
  124. package/dist/types-ts4.0/react/nodes/unknownBlock.d.ts +0 -2
  125. package/dist/types-ts4.0/react/renderer-node.d.ts +0 -4
  126. package/dist/types-ts4.0/react/types.d.ts +0 -57
  127. package/dist/types-ts4.0/react/utils/clipboard.d.ts +0 -1
  128. package/dist/types-ts4.0/react/utils/element-selection.d.ts +0 -9
  129. package/dist/types-ts4.0/react/utils/getCardClickHandler.d.ts +0 -2
  130. package/dist/types-ts4.0/react/utils/inject-props.d.ts +0 -6
  131. package/dist/types-ts4.0/react/utils/links.d.ts +0 -3
  132. package/dist/types-ts4.0/react/utils/lists.d.ts +0 -2
  133. package/dist/types-ts4.0/react/utils/performance/RenderTracking.d.ts +0 -15
  134. package/dist/types-ts4.0/react/utils/use-select-all-trap.d.ts +0 -2
  135. package/dist/types-ts4.0/render-document.d.ts +0 -23
  136. package/dist/types-ts4.0/renderer-context.d.ts +0 -9
  137. package/dist/types-ts4.0/serializer.d.ts +0 -4
  138. package/dist/types-ts4.0/steps/index.d.ts +0 -14
  139. package/dist/types-ts4.0/text/index.d.ts +0 -8
  140. package/dist/types-ts4.0/text/nodes/blockquote.d.ts +0 -3
  141. package/dist/types-ts4.0/text/nodes/bulletList.d.ts +0 -3
  142. package/dist/types-ts4.0/text/nodes/date.d.ts +0 -3
  143. package/dist/types-ts4.0/text/nodes/decisionItem.d.ts +0 -3
  144. package/dist/types-ts4.0/text/nodes/hardBreak.d.ts +0 -3
  145. package/dist/types-ts4.0/text/nodes/heading.d.ts +0 -3
  146. package/dist/types-ts4.0/text/nodes/index.d.ts +0 -6
  147. package/dist/types-ts4.0/text/nodes/inlineCard.d.ts +0 -3
  148. package/dist/types-ts4.0/text/nodes/listItem.d.ts +0 -3
  149. package/dist/types-ts4.0/text/nodes/mediaGroup.d.ts +0 -3
  150. package/dist/types-ts4.0/text/nodes/mention.d.ts +0 -3
  151. package/dist/types-ts4.0/text/nodes/orderedList.d.ts +0 -3
  152. package/dist/types-ts4.0/text/nodes/panel.d.ts +0 -3
  153. package/dist/types-ts4.0/text/nodes/paragraph.d.ts +0 -3
  154. package/dist/types-ts4.0/text/nodes/rule.d.ts +0 -3
  155. package/dist/types-ts4.0/text/nodes/status.d.ts +0 -3
  156. package/dist/types-ts4.0/text/nodes/table.d.ts +0 -3
  157. package/dist/types-ts4.0/text/nodes/taskItem.d.ts +0 -3
  158. package/dist/types-ts4.0/text/nodes/unknown.d.ts +0 -3
  159. package/dist/types-ts4.0/text-serializer.d.ts +0 -1
  160. package/dist/types-ts4.0/types/i18n.d.ts +0 -5
  161. package/dist/types-ts4.0/types/mediaOptions.d.ts +0 -12
  162. package/dist/types-ts4.0/types/smartLinksOptions.d.ts +0 -3
  163. package/dist/types-ts4.0/ui/Expand.d.ts +0 -21
  164. package/dist/types-ts4.0/ui/ExtensionRenderer.d.ts +0 -42
  165. package/dist/types-ts4.0/ui/MediaCard.d.ts +0 -77
  166. package/dist/types-ts4.0/ui/Renderer/ErrorBoundary.d.ts +0 -24
  167. package/dist/types-ts4.0/ui/Renderer/breakout-ssr.d.ts +0 -11
  168. package/dist/types-ts4.0/ui/Renderer/click-to-edit.d.ts +0 -6
  169. package/dist/types-ts4.0/ui/Renderer/index.d.ts +0 -33
  170. package/dist/types-ts4.0/ui/Renderer/style.d.ts +0 -14
  171. package/dist/types-ts4.0/ui/Renderer/truncated-wrapper.d.ts +0 -12
  172. package/dist/types-ts4.0/ui/Renderer/types.d.ts +0 -16
  173. package/dist/types-ts4.0/ui/RendererActionsContext/WithRendererActions.d.ts +0 -6
  174. package/dist/types-ts4.0/ui/RendererActionsContext/index.d.ts +0 -9
  175. package/dist/types-ts4.0/ui/SmartCardStorage.d.ts +0 -60
  176. package/dist/types-ts4.0/ui/SortingIcon.d.ts +0 -23
  177. package/dist/types-ts4.0/ui/TaskItemsFormatContext/TaskItemsFormatContext.d.ts +0 -15
  178. package/dist/types-ts4.0/ui/TaskItemsFormatContext/index.d.ts +0 -2
  179. package/dist/types-ts4.0/ui/active-header-id-provider.d.ts +0 -18
  180. package/dist/types-ts4.0/ui/annotations/context.d.ts +0 -27
  181. package/dist/types-ts4.0/ui/annotations/draft/component.d.ts +0 -20
  182. package/dist/types-ts4.0/ui/annotations/draft/dom.d.ts +0 -7
  183. package/dist/types-ts4.0/ui/annotations/draft/index.d.ts +0 -2
  184. package/dist/types-ts4.0/ui/annotations/draft/position.d.ts +0 -2
  185. package/dist/types-ts4.0/ui/annotations/draft/text.d.ts +0 -11
  186. package/dist/types-ts4.0/ui/annotations/element/index.d.ts +0 -10
  187. package/dist/types-ts4.0/ui/annotations/element/mark.d.ts +0 -14
  188. package/dist/types-ts4.0/ui/annotations/hooks/index.d.ts +0 -3
  189. package/dist/types-ts4.0/ui/annotations/hooks/use-events.d.ts +0 -18
  190. package/dist/types-ts4.0/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +0 -1
  191. package/dist/types-ts4.0/ui/annotations/hooks/use-inline-comments-filter.d.ts +0 -9
  192. package/dist/types-ts4.0/ui/annotations/hooks/use-load-annotations.d.ts +0 -6
  193. package/dist/types-ts4.0/ui/annotations/hooks/user-selection.d.ts +0 -9
  194. package/dist/types-ts4.0/ui/annotations/hooks/utils.d.ts +0 -2
  195. package/dist/types-ts4.0/ui/annotations/index.d.ts +0 -5
  196. package/dist/types-ts4.0/ui/annotations/selection/index.d.ts +0 -1
  197. package/dist/types-ts4.0/ui/annotations/selection/mounter.d.ts +0 -20
  198. package/dist/types-ts4.0/ui/annotations/selection/range-validator.d.ts +0 -13
  199. package/dist/types-ts4.0/ui/annotations/selection/wrapper.d.ts +0 -8
  200. package/dist/types-ts4.0/ui/annotations/types.d.ts +0 -22
  201. package/dist/types-ts4.0/ui/annotations/view/index.d.ts +0 -7
  202. package/dist/types-ts4.0/ui/index.d.ts +0 -1
  203. package/dist/types-ts4.0/ui/renderer-props.d.ts +0 -100
  204. package/dist/types-ts4.0/use-feature-flags.d.ts +0 -2
  205. package/dist/types-ts4.0/utils.d.ts +0 -24
@@ -1,19 +0,0 @@
1
- import { PureComponent, ReactNode } from 'react';
2
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
3
- import { RendererContext } from '../types';
4
- import { NodeProps } from '../types';
5
- export interface Props {
6
- localId: string;
7
- rendererContext?: RendererContext;
8
- state?: string;
9
- providers?: ProviderFactory;
10
- children?: ReactNode;
11
- disabled?: boolean;
12
- }
13
- export default class TaskItem extends PureComponent<NodeProps<Props>, {}> {
14
- private providerFactory;
15
- constructor(props: NodeProps<Props>);
16
- componentWillUnmount(): void;
17
- private renderWithProvider;
18
- render(): JSX.Element;
19
- }
@@ -1,8 +0,0 @@
1
- import { PureComponent, ReactNode } from 'react';
2
- export interface Props {
3
- localId?: string;
4
- children?: ReactNode;
5
- }
6
- export default class TaskList extends PureComponent<Props, {}> {
7
- render(): JSX.Element | null;
8
- }
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- declare type Props = {
3
- startPos: number;
4
- endPos: number;
5
- children?: string | null;
6
- };
7
- declare const TextWrapper: (props: Props) => JSX.Element | null;
8
- export default TextWrapper;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export default function UnknownBlock(props: React.Props<any>): JSX.Element;
@@ -1,4 +0,0 @@
1
- import { Node } from 'prosemirror-model';
2
- export declare const isLayoutNode: (node: Node) => boolean;
3
- export declare const hasBreakOutMark: (node: Node) => boolean;
4
- export declare const insideBreakoutLayout: (path: Node[]) => boolean;
@@ -1,57 +0,0 @@
1
- import { PropsWithChildren } from 'react';
2
- import { Node as PMNode, NodeType, Schema } from 'prosemirror-model';
3
- import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
4
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
5
- import type { EventHandlers } from '@atlaskit/editor-common/ui';
6
- import { AnalyticsEventPayload } from '../analytics/events';
7
- import { Serializer } from '../index';
8
- import { RendererAppearance, HeadingAnchorLinksProps } from '../ui/Renderer/types';
9
- import { AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
10
- export interface RendererContext {
11
- objectAri?: string;
12
- containerAri?: string;
13
- adDoc?: any;
14
- schema?: Schema;
15
- }
16
- export interface NodeMeta {
17
- text?: PMNode['text'];
18
- providers?: ProviderFactory | undefined;
19
- eventHandlers?: EventHandlers | undefined;
20
- extensionHandlers?: ExtensionHandlers | undefined;
21
- portal?: HTMLElement | undefined;
22
- rendererContext?: RendererContext;
23
- serializer: Serializer<JSX.Element>;
24
- content?: {
25
- [key: string]: any;
26
- } | null;
27
- allowHeadingAnchorLinks?: HeadingAnchorLinksProps;
28
- allowCopyToClipboard?: boolean;
29
- allowPlaceholderText?: boolean;
30
- allowCustomPanels?: boolean;
31
- rendererAppearance?: RendererAppearance;
32
- fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
33
- nodeType: NodeType['name'];
34
- marks: PMNode['marks'];
35
- dataAttributes: {
36
- 'data-renderer-start-pos': number;
37
- };
38
- [key: string]: any;
39
- }
40
- export interface MarkMeta {
41
- dataAttributes: {
42
- 'data-renderer-mark': true;
43
- };
44
- eventHandlers?: EventHandlers;
45
- fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
46
- markKey?: any;
47
- isInline?: boolean;
48
- [key: string]: any;
49
- }
50
- export interface AnnotationMarkMeta extends MarkMeta {
51
- id: AnnotationId;
52
- annotationType: AnnotationTypes;
53
- annotationParentIds: string[];
54
- allowAnnotations: boolean;
55
- }
56
- export declare type NodeProps<NodeAttrs = {}> = NodeAttrs & PropsWithChildren<NodeMeta>;
57
- export declare type MarkProps<MarkAttrs = {}> = MarkAttrs & PropsWithChildren<MarkMeta>;
@@ -1 +0,0 @@
1
- export declare const copyTextToClipboard: (text: string) => Promise<void>;
@@ -1,9 +0,0 @@
1
- export declare class ElementSelection {
2
- readonly type: string;
3
- readonly range?: Range;
4
- private constructor();
5
- eq(selection?: ElementSelection): boolean;
6
- inside(el: HTMLElement): boolean;
7
- select(el: HTMLElement): ElementSelection;
8
- static fromWindow(win?: Window): ElementSelection;
9
- }
@@ -1,2 +0,0 @@
1
- import type { EventHandlers } from '@atlaskit/editor-common/ui';
2
- export declare const getCardClickHandler: (eventHandlers?: EventHandlers | undefined, url?: string | undefined) => ((e: React.MouseEvent<HTMLElement>) => any) | undefined;
@@ -1,6 +0,0 @@
1
- import { ReactNode } from 'react';
2
- /**
3
- * Helper function to recursively injects props to
4
- * all valid children react nodes.
5
- */
6
- export declare function recursivelyInjectProps(children: ReactNode[], propsToInject: Object): ReactNode[];
@@ -1,3 +0,0 @@
1
- import { HeadingAnchorLinksProps } from '../../ui/Renderer/types';
2
- export declare function isNestedHeaderLinksEnabled(allowHeadingAnchorLinks?: HeadingAnchorLinksProps): boolean;
3
- export declare function getActiveHeadingId(allowHeadingAnchorLinks?: HeadingAnchorLinksProps): string | undefined;
@@ -1,2 +0,0 @@
1
- import { Node } from 'prosemirror-model';
2
- export declare function getListIndentLevel(path: Node[]): number;
@@ -1,15 +0,0 @@
1
- import type { AnalyticsEventPayload } from '../../../analytics/events';
2
- import { ACTION_SUBJECT, ACTION } from '../../../analytics/enums';
3
- export declare type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
4
- declare type RenderActions = ACTION.RE_RENDERED;
5
- declare type RenderActionSubjects = ACTION_SUBJECT.RENDERER;
6
- export declare type RenderTrackingProps<ComponentProps> = {
7
- componentProps: ComponentProps;
8
- action: RenderActions;
9
- actionSubject: RenderActionSubjects;
10
- handleAnalyticsEvent: FireAnalyticsCallback;
11
- propsToIgnore?: Array<keyof ComponentProps>;
12
- useShallow?: boolean;
13
- };
14
- export declare function RenderTracking<Props>(props: RenderTrackingProps<Props>): null;
15
- export {};
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const useSelectAllTrap: <T extends HTMLElement>() => React.MutableRefObject<T | null>;
@@ -1,23 +0,0 @@
1
- import { Serializer } from './serializer';
2
- import type { ADFStage } from '@atlaskit/editor-common/validator';
3
- import type { UnsupportedContentLevelsTracking } from '@atlaskit/editor-common/utils';
4
- import { Node as PMNode, Schema } from 'prosemirror-model';
5
- import { AnalyticsEventPayload } from './analytics/events';
6
- import { RendererAppearance } from './ui/Renderer/types';
7
- export interface RenderOutput<T> {
8
- result: T;
9
- stat: RenderOutputStat;
10
- pmDoc?: PMNode;
11
- }
12
- export interface RenderOutputStat {
13
- buildTreeTime?: number;
14
- sanitizeTime: number;
15
- serializeTime?: number;
16
- }
17
- export interface ResultWithTime<T> {
18
- output: T;
19
- time: number;
20
- }
21
- declare type DispatchAnalyticsEvent = (event: AnalyticsEventPayload) => void;
22
- export declare const renderDocument: <T>(doc: any, serializer: Serializer<T>, schema?: Schema, adfStage?: ADFStage, useSpecBasedValidator?: boolean, rendererId?: string, dispatchAnalyticsEvent?: DispatchAnalyticsEvent | undefined, unsupportedContentLevelsTracking?: UnsupportedContentLevelsTracking | undefined, appearance?: RendererAppearance) => RenderOutput<T | null>;
23
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- export declare type FeatureFlags = {
3
- showHoverPreview?: boolean;
4
- };
5
- export declare type RendererContextProps = {
6
- featureFlags?: FeatureFlags;
7
- };
8
- export declare const useRendererContext: () => RendererContextProps;
9
- export declare const RendererContextProvider: React.Provider<{}>;
@@ -1,4 +0,0 @@
1
- import { Fragment } from 'prosemirror-model';
2
- export interface Serializer<T> {
3
- serializeFragment(fragment: Fragment, props?: any, target?: any, key?: string): T | null;
4
- }
@@ -1,14 +0,0 @@
1
- import { Schema } from 'prosemirror-model';
2
- import { AddMarkStep } from 'prosemirror-transform';
3
- export declare function resolvePos(node: Node | null, offset: number): number | false;
4
- interface AnnotationStepOptions {
5
- schema: Schema;
6
- annotationId: string;
7
- annotationType: 'inlineComment';
8
- }
9
- export declare function getPosFromRange(range: Range): {
10
- from: number;
11
- to: number;
12
- } | false;
13
- export declare function createAnnotationStep(from: number, to: number, opts: AnnotationStepOptions): AddMarkStep<Schema<any, any>>;
14
- export {};
@@ -1,8 +0,0 @@
1
- import { Fragment, Schema } from 'prosemirror-model';
2
- import { Serializer } from '../serializer';
3
- export default class TextSerializer implements Serializer<string> {
4
- private schema;
5
- constructor(schema: Schema);
6
- serializeFragment(fragment: Fragment): string;
7
- static fromSchema(schema?: Schema): TextSerializer;
8
- }
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const blockquote: NodeReducer;
3
- export default blockquote;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const bulletList: NodeReducer;
3
- export default bulletList;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const date: NodeReducer;
3
- export default date;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const decisionItem: NodeReducer;
3
- export default decisionItem;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const hardBreak: NodeReducer;
3
- export default hardBreak;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const heading: NodeReducer;
3
- export default heading;
@@ -1,6 +0,0 @@
1
- import { Node as PMNode, Schema } from 'prosemirror-model';
2
- export declare type NodeReducer = (node: PMNode, schema: Schema) => string;
3
- export declare const reduce: NodeReducer;
4
- export declare const nodeToReducerMapping: {
5
- [key: string]: NodeReducer;
6
- };
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const inlineCard: NodeReducer;
3
- export default inlineCard;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const listItem: NodeReducer;
3
- export default listItem;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const mediaGroup: NodeReducer;
3
- export default mediaGroup;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const mention: NodeReducer;
3
- export default mention;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const orderedList: NodeReducer;
3
- export default orderedList;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const panel: NodeReducer;
3
- export default panel;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const paragraph: NodeReducer;
3
- export default paragraph;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const rule: NodeReducer;
3
- export default rule;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const status: NodeReducer;
3
- export default status;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const table: NodeReducer;
3
- export default table;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const taskItem: NodeReducer;
3
- export default taskItem;
@@ -1,3 +0,0 @@
1
- import { NodeReducer } from './';
2
- declare const unknown: NodeReducer;
3
- export default unknown;
@@ -1 +0,0 @@
1
- export { default as TextSerializer } from './text';
@@ -1,5 +0,0 @@
1
- export interface MessageDescriptor {
2
- id: string;
3
- description: string;
4
- defaultMessage: string;
5
- }
@@ -1,12 +0,0 @@
1
- import { MediaClientConfig } from '@atlaskit/media-core';
2
- import { MediaFeatureFlags, SSR } from '@atlaskit/media-common';
3
- export declare type MediaSSR = {
4
- mode: SSR;
5
- config: MediaClientConfig;
6
- };
7
- export interface MediaOptions {
8
- allowLinking?: boolean;
9
- enableDownloadButton?: boolean;
10
- featureFlags?: MediaFeatureFlags;
11
- ssr?: MediaSSR;
12
- }
@@ -1,3 +0,0 @@
1
- export interface SmartLinksOptions {
2
- ssr?: boolean;
3
- }
@@ -1,21 +0,0 @@
1
- /** @jsx jsx */
2
- import React from 'react';
3
- import { AnalyticsEventPayload } from '../analytics/events';
4
- import { WrappedComponentProps } from 'react-intl-next';
5
- export declare type StyleProps = {
6
- expanded?: boolean;
7
- focused?: boolean;
8
- 'data-node-type'?: 'expand' | 'nestedExpand';
9
- 'data-title'?: string;
10
- };
11
- export interface ExpandProps {
12
- title: string;
13
- nodeType: 'expand' | 'nestedExpand';
14
- children: React.ReactNode;
15
- fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
16
- nestedHeaderIds?: Array<string>;
17
- }
18
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<ExpandProps & WrappedComponentProps<"intl">>> & {
19
- WrappedComponent: React.ComponentType<ExpandProps & WrappedComponentProps<"intl">>;
20
- };
21
- export default _default;
@@ -1,42 +0,0 @@
1
- import React from 'react';
2
- import { RendererContext } from '../react/types';
3
- import { ExtensionLayout } from '@atlaskit/adf-schema';
4
- import { getNodeRenderer } from '@atlaskit/editor-common/extensions';
5
- import type { ExtensionHandlers, ExtensionProvider } from '@atlaskit/editor-common/extensions';
6
- import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
7
- import { Mark as PMMark } from 'prosemirror-model';
8
- export interface Props {
9
- type: 'extension' | 'inlineExtension' | 'bodiedExtension';
10
- extensionHandlers?: ExtensionHandlers;
11
- providers?: ProviderFactory;
12
- rendererContext: RendererContext;
13
- extensionType: string;
14
- extensionKey: string;
15
- text?: string;
16
- parameters?: any;
17
- content?: any;
18
- layout?: ExtensionLayout;
19
- localId?: string;
20
- marks?: PMMark[];
21
- children: ({ result }: {
22
- result?: JSX.Element | null;
23
- }) => JSX.Element;
24
- }
25
- export interface State {
26
- extensionProvider?: ExtensionProvider | null;
27
- }
28
- export default class ExtensionRenderer extends React.Component<Props, State> {
29
- state: {
30
- extensionProvider: null;
31
- };
32
- mounted: boolean;
33
- UNSAFE_componentWillMount(): void;
34
- componentWillUnmount(): void;
35
- handleProvider: (name: keyof State, providerPromise?: Promise<any> | undefined) => void;
36
- getNodeRenderer: import("memoize-one").MemoizedFn<typeof getNodeRenderer>;
37
- renderExtensionNode: (extensionProvider?: ExtensionProvider<any> | null | undefined) => JSX.Element;
38
- setupAndRenderExtensionNode: (providers: {
39
- extensionProvider?: Promise<ExtensionProvider<any>> | undefined;
40
- }) => JSX.Element;
41
- render(): JSX.Element;
42
- }
@@ -1,77 +0,0 @@
1
- import React, { Component } from 'react';
2
- import type { ADFEntity } from '@atlaskit/adf-utils/types';
3
- import { CardAppearance, CardDimensions, CardOnClickCallback, NumericalCardDimensions } from '@atlaskit/media-card';
4
- import { MediaClientConfig } from '@atlaskit/media-core';
5
- import { ImageResizeMode, Identifier, FileState } from '@atlaskit/media-client';
6
- import { MediaType } from '@atlaskit/adf-schema';
7
- import type { ContextIdentifierProvider } from '@atlaskit/editor-common/provider-factory';
8
- import type { ImageStatus } from '@atlaskit/editor-common/utils';
9
- import { MediaFeatureFlags } from '@atlaskit/media-common';
10
- import { RendererAppearance } from './Renderer/types';
11
- import { RendererContext } from '../react/types';
12
- import { MediaSSR } from '../types/mediaOptions';
13
- export declare type MediaProvider = {
14
- viewMediaClientConfig: MediaClientConfig;
15
- };
16
- export interface MediaCardProps {
17
- id?: string;
18
- mediaProvider?: Promise<MediaProvider>;
19
- contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
20
- eventHandlers?: {
21
- media?: {
22
- onClick?: CardOnClickCallback;
23
- };
24
- };
25
- shouldOpenMediaViewer?: boolean;
26
- type: MediaType;
27
- collection?: string;
28
- url?: string;
29
- cardDimensions?: CardDimensions;
30
- originalDimensions?: NumericalCardDimensions;
31
- resizeMode?: ImageResizeMode;
32
- appearance?: CardAppearance;
33
- rendererAppearance?: RendererAppearance;
34
- occurrenceKey?: string;
35
- imageStatus?: ImageStatus;
36
- disableOverlay?: boolean;
37
- useInlinePlayer?: boolean;
38
- rendererContext?: RendererContext;
39
- alt?: string;
40
- featureFlags?: MediaFeatureFlags;
41
- shouldEnableDownloadButton?: boolean;
42
- ssr?: MediaSSR;
43
- }
44
- export interface State {
45
- mediaClientConfig?: MediaClientConfig;
46
- contextIdentifierProvider?: ContextIdentifierProvider;
47
- fileState?: FileState;
48
- }
49
- export declare const getListOfIdentifiersFromDoc: (doc?: ADFEntity | undefined) => Identifier[];
50
- export declare class MediaCardInternal extends Component<MediaCardProps, State> {
51
- state: State;
52
- componentDidMount(): Promise<void>;
53
- UNSAFE_componentWillReceiveProps(newProps: MediaCardProps): void;
54
- componentWillUnmount(): void;
55
- saveFileState: (id: string, mediaClientConfig: MediaClientConfig) => Promise<void>;
56
- private renderLoadingCard;
57
- private renderExternal;
58
- /**
59
- * We want to call provided `eventHandlers.media.onClick` when it's provided,
60
- * but we also don't want to call it when it's a video and inline video player is enabled.
61
- * This is due to consumers normally process this onClick call by opening media viewer and
62
- * we don't want that to happened described above text.
63
- */
64
- private getOnCardClickCallback;
65
- render(): JSX.Element | null;
66
- }
67
- export declare const getClipboardAttrs: ({ id, alt, collection, contextIdentifierProvider, originalDimensions, fileState, }: {
68
- id: string;
69
- alt?: string | undefined;
70
- collection?: string | undefined;
71
- contextIdentifierProvider?: ContextIdentifierProvider | undefined;
72
- originalDimensions?: NumericalCardDimensions | undefined;
73
- fileState?: FileState | undefined;
74
- }) => {
75
- [key: string]: string | number | undefined;
76
- };
77
- export declare const MediaCard: React.ComponentClass<MediaCardProps & import("@atlaskit/editor-common/utils").ImageLoaderProps, any>;
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import { ComponentCrashErrorAEP } from '../../analytics/events';
3
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
- interface ErrorBoundaryProps {
5
- component: ComponentCrashErrorAEP['actionSubject'];
6
- componentId?: ComponentCrashErrorAEP['actionSubjectId'];
7
- fallbackComponent?: React.ReactNode;
8
- createAnalyticsEvent?: CreateUIAnalyticsEvent;
9
- rethrowError?: boolean;
10
- }
11
- interface ErrorBoundaryState {
12
- errorCaptured: boolean;
13
- }
14
- export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
15
- state: {
16
- errorCaptured: boolean;
17
- };
18
- private fireAnalyticsEvent;
19
- private hasFallback;
20
- private shouldRecover;
21
- componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
22
- render(): React.ReactNode;
23
- }
24
- export {};
@@ -1,11 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * Inline Script that updates breakout node width on client side,
4
- * before main JavaScript bundle is ready.
5
- *
6
- * More info: https://product-fabric.atlassian.net/wiki/spaces/E/pages/1216218119/Renderer+SSR+for+Breakout+Nodes
7
- */
8
- export declare function BreakoutSSRInlineScript(): JSX.Element | null;
9
- export declare function createBreakoutInlineScript(id: number): string;
10
- export declare const breakoutInlineScriptContext: string;
11
- export declare const calcLineLength: any;
@@ -1,6 +0,0 @@
1
- /**
2
- * Check if an element is interactive (or otherwise if clicking on it shouldn't transition the
3
- * renderer to the editor in somewhere like the Jira description
4
- * @param element
5
- */
6
- export declare function isInteractiveElement(element: HTMLElement | HTMLLinkElement): boolean;
@@ -1,33 +0,0 @@
1
- import { jsx } from '@emotion/react';
2
- import { PureComponent } from 'react';
3
- import { RendererProps } from '../renderer-props';
4
- export declare const NORMAL_SEVERITY_THRESHOLD = 2000;
5
- export declare const DEGRADED_SEVERITY_THRESHOLD = 3000;
6
- export interface Extension<T> {
7
- extensionKey: string;
8
- parameters?: T;
9
- content?: any;
10
- }
11
- export type { RendererProps as Props };
12
- export declare class Renderer extends PureComponent<RendererProps> {
13
- private providerFactory;
14
- private serializer;
15
- private rafID?;
16
- private editorRef;
17
- private mouseDownSelection?;
18
- private id?;
19
- constructor(props: RendererProps);
20
- private anchorLinkAnalytics;
21
- componentDidMount(): void;
22
- UNSAFE_componentWillReceiveProps(nextProps: RendererProps): void;
23
- private deriveSerializerProps;
24
- private featureFlags;
25
- private fireAnalyticsEvent;
26
- private getSchema;
27
- private onMouseDownEditView;
28
- private handleMouseTripleClickInTables;
29
- render(): jsx.JSX.Element;
30
- componentWillUnmount(): void;
31
- }
32
- declare const RendererWithAnnotationSelection: (props: RendererProps) => jsx.JSX.Element;
33
- export default RendererWithAnnotationSelection;
@@ -1,14 +0,0 @@
1
- import { Theme } from '@emotion/react';
2
- import { RendererAppearance } from './types';
3
- export declare const FullPagePadding = 32;
4
- export declare type RendererWrapperProps = {
5
- appearance?: RendererAppearance;
6
- allowNestedHeaderLinks: boolean;
7
- allowColumnSorting: boolean;
8
- };
9
- export declare const headingSizes: {
10
- [key: string]: {
11
- [key: string]: number;
12
- };
13
- };
14
- export declare const rendererStyles: (wrapperProps: RendererWrapperProps) => (theme: Theme) => import("@emotion/react").SerializedStyles;
@@ -1,12 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import { Component } from 'react';
4
- export interface TruncatedWrapperProps {
5
- height?: number;
6
- fadeHeight?: number;
7
- backgroundColor?: string;
8
- }
9
- export declare class TruncatedWrapper extends Component<TruncatedWrapperProps, {}> {
10
- constructor(props: TruncatedWrapperProps);
11
- render(): jsx.JSX.Element;
12
- }
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- export declare type RendererAppearance = 'comment' | 'full-page' | 'full-width' | 'mobile' | undefined;
3
- export declare type StickyHeaderConfig = {
4
- offsetTop?: number;
5
- };
6
- export declare type StickyHeaderProps = boolean | ({
7
- show?: boolean;
8
- } & StickyHeaderConfig);
9
- export declare type HeadingAnchorLinksConfig = {
10
- activeHeadingId?: string;
11
- allowNestedHeaderLinks?: boolean;
12
- };
13
- export declare type NodeComponentsProps = {
14
- [key: string]: React.ComponentType<any>;
15
- };
16
- export declare type HeadingAnchorLinksProps = boolean | HeadingAnchorLinksConfig;
@@ -1,6 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import RendererActions from '../../actions/index';
3
- export interface WithRendererActionsProps {
4
- render(actions: RendererActions): ReactNode | null;
5
- }
6
- export declare function WithRendererActions({ render }: WithRendererActionsProps): JSX.Element;