@atlaskit/renderer 108.15.10 → 108.15.12
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 +12 -0
- package/dist/cjs/ui/Renderer/breakout-ssr.js +4 -0
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/breakout-ssr.js +4 -0
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/breakout-ssr.js +4 -0
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types-ts4.5/actions/index.d.ts +61 -0
- package/dist/types-ts4.5/actions/matches-utils.d.ts +7 -0
- package/dist/types-ts4.5/actions.d.ts +3 -0
- package/dist/types-ts4.5/analytics/analyticsContext.d.ts +6 -0
- package/dist/types-ts4.5/analytics/enums.d.ts +58 -0
- package/dist/types-ts4.5/analytics/events.d.ts +118 -0
- package/dist/types-ts4.5/analytics/unsupported-content.d.ts +10 -0
- package/dist/types-ts4.5/consts.d.ts +12 -0
- package/dist/types-ts4.5/i18n/cs.d.ts +25 -0
- package/dist/types-ts4.5/i18n/da.d.ts +20 -0
- package/dist/types-ts4.5/i18n/de.d.ts +20 -0
- package/dist/types-ts4.5/i18n/en.d.ts +25 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +25 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +25 -0
- package/dist/types-ts4.5/i18n/es.d.ts +20 -0
- package/dist/types-ts4.5/i18n/et.d.ts +8 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +25 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +20 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +20 -0
- package/dist/types-ts4.5/i18n/index.d.ts +31 -0
- package/dist/types-ts4.5/i18n/it.d.ts +20 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +25 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +20 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +20 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +20 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +20 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +25 -0
- package/dist/types-ts4.5/i18n/pt_PT.d.ts +8 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +25 -0
- package/dist/types-ts4.5/i18n/sk.d.ts +8 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +20 -0
- package/dist/types-ts4.5/i18n/th.d.ts +20 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +20 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +25 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +20 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +20 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +20 -0
- package/dist/types-ts4.5/index.d.ts +11 -0
- package/dist/types-ts4.5/messages.d.ts +88 -0
- package/dist/types-ts4.5/react/hooks/use-bidi-warnings.d.ts +10 -0
- package/dist/types-ts4.5/react/hooks/use-in-viewport.d.ts +5 -0
- package/dist/types-ts4.5/react/index.d.ts +124 -0
- package/dist/types-ts4.5/react/marks/alignment.d.ts +4 -0
- package/dist/types-ts4.5/react/marks/annotation.d.ts +6 -0
- package/dist/types-ts4.5/react/marks/breakout.d.ts +6 -0
- package/dist/types-ts4.5/react/marks/code.d.ts +16 -0
- package/dist/types-ts4.5/react/marks/confluence-inline-comment.d.ts +8 -0
- package/dist/types-ts4.5/react/marks/data-consumer.d.ts +4 -0
- package/dist/types-ts4.5/react/marks/em.d.ts +3 -0
- package/dist/types-ts4.5/react/marks/fragment.d.ts +4 -0
- package/dist/types-ts4.5/react/marks/indentation.d.ts +4 -0
- package/dist/types-ts4.5/react/marks/index.d.ts +21 -0
- package/dist/types-ts4.5/react/marks/link.d.ts +9 -0
- package/dist/types-ts4.5/react/marks/strike.d.ts +3 -0
- package/dist/types-ts4.5/react/marks/strong.d.ts +3 -0
- package/dist/types-ts4.5/react/marks/subsup.d.ts +4 -0
- package/dist/types-ts4.5/react/marks/textColor.d.ts +4 -0
- package/dist/types-ts4.5/react/marks/underline.d.ts +3 -0
- package/dist/types-ts4.5/react/marks/unsupportedMark.d.ts +3 -0
- package/dist/types-ts4.5/react/marks/unsupportedNodeAttribute.d.ts +3 -0
- package/dist/types-ts4.5/react/nodes/blockCard.d.ts +15 -0
- package/dist/types-ts4.5/react/nodes/blockquote.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/bodiedExtension.d.ts +24 -0
- package/dist/types-ts4.5/react/nodes/bulletList.d.ts +5 -0
- package/dist/types-ts4.5/react/nodes/caption.d.ts +4 -0
- package/dist/types-ts4.5/react/nodes/codeBlock/codeBlock.d.ts +15 -0
- package/dist/types-ts4.5/react/nodes/codeBlock/components/codeBlockButtonContainer.d.ts +12 -0
- package/dist/types-ts4.5/react/nodes/codeBlock/components/codeBlockContainer.d.ts +10 -0
- package/dist/types-ts4.5/react/nodes/codeBlock/components/codeBlockCopyButton.d.ts +9 -0
- package/dist/types-ts4.5/react/nodes/codeBlock/components/codeBlockWrapButton.d.ts +11 -0
- package/dist/types-ts4.5/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +9 -0
- package/dist/types-ts4.5/react/nodes/codeBlock/windowedCodeBlock.d.ts +4 -0
- package/dist/types-ts4.5/react/nodes/date.d.ts +11 -0
- package/dist/types-ts4.5/react/nodes/decisionItem.d.ts +3 -0
- package/dist/types-ts4.5/react/nodes/decisionList.d.ts +7 -0
- package/dist/types-ts4.5/react/nodes/doc.d.ts +3 -0
- package/dist/types-ts4.5/react/nodes/embedCard.d.ts +19 -0
- package/dist/types-ts4.5/react/nodes/emoji.d.ts +12 -0
- package/dist/types-ts4.5/react/nodes/extension.d.ts +113 -0
- package/dist/types-ts4.5/react/nodes/fallback.d.ts +19 -0
- package/dist/types-ts4.5/react/nodes/hardBreak.d.ts +6 -0
- package/dist/types-ts4.5/react/nodes/heading-anchor.d.ts +14 -0
- package/dist/types-ts4.5/react/nodes/heading.d.ts +14 -0
- package/dist/types-ts4.5/react/nodes/index.d.ts +98 -0
- package/dist/types-ts4.5/react/nodes/inline.d.ts +1 -0
- package/dist/types-ts4.5/react/nodes/inlineCard.d.ts +65 -0
- package/dist/types-ts4.5/react/nodes/inlineExtension.d.ts +18 -0
- package/dist/types-ts4.5/react/nodes/layoutColumn.d.ts +6 -0
- package/dist/types-ts4.5/react/nodes/layoutSection.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/listItem.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/media/index.d.ts +27 -0
- package/dist/types-ts4.5/react/nodes/media/styles.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/mediaGroup.d.ts +30 -0
- package/dist/types-ts4.5/react/nodes/mediaInline.d.ts +38 -0
- package/dist/types-ts4.5/react/nodes/mediaSingle/index.d.ts +24 -0
- package/dist/types-ts4.5/react/nodes/mediaSingle/styles.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/mention.d.ts +13 -0
- package/dist/types-ts4.5/react/nodes/orderedList.d.ts +9 -0
- package/dist/types-ts4.5/react/nodes/panel.d.ts +17 -0
- package/dist/types-ts4.5/react/nodes/paragraph.d.ts +3 -0
- package/dist/types-ts4.5/react/nodes/placeholder.d.ts +6 -0
- package/dist/types-ts4.5/react/nodes/rule.d.ts +2 -0
- package/dist/types-ts4.5/react/nodes/status.d.ts +10 -0
- package/dist/types-ts4.5/react/nodes/table/colgroup.d.ts +9 -0
- package/dist/types-ts4.5/react/nodes/table/sticky.d.ts +43 -0
- package/dist/types-ts4.5/react/nodes/table/table.d.ts +7 -0
- package/dist/types-ts4.5/react/nodes/table/types.d.ts +12 -0
- package/dist/types-ts4.5/react/nodes/table.d.ts +282 -0
- package/dist/types-ts4.5/react/nodes/tableCell.d.ts +81 -0
- package/dist/types-ts4.5/react/nodes/tableRow.d.ts +24 -0
- package/dist/types-ts4.5/react/nodes/task-item-with-providers.d.ts +29 -0
- package/dist/types-ts4.5/react/nodes/taskItem.d.ts +19 -0
- package/dist/types-ts4.5/react/nodes/taskList.d.ts +8 -0
- package/dist/types-ts4.5/react/nodes/text-wrapper.d.ts +8 -0
- package/dist/types-ts4.5/react/nodes/unknownBlock.d.ts +2 -0
- package/dist/types-ts4.5/react/renderer-node.d.ts +5 -0
- package/dist/types-ts4.5/react/types.d.ts +58 -0
- package/dist/types-ts4.5/react/utils/appearance.d.ts +4 -0
- package/dist/types-ts4.5/react/utils/clipboard.d.ts +1 -0
- package/dist/types-ts4.5/react/utils/element-selection.d.ts +9 -0
- package/dist/types-ts4.5/react/utils/getCardClickHandler.d.ts +2 -0
- package/dist/types-ts4.5/react/utils/inject-props.d.ts +6 -0
- package/dist/types-ts4.5/react/utils/links.d.ts +3 -0
- package/dist/types-ts4.5/react/utils/lists.d.ts +2 -0
- package/dist/types-ts4.5/react/utils/performance/RenderTracking.d.ts +15 -0
- package/dist/types-ts4.5/react/utils/use-select-all-trap.d.ts +2 -0
- package/dist/types-ts4.5/render-document.d.ts +23 -0
- package/dist/types-ts4.5/renderer-context.d.ts +7 -0
- package/dist/types-ts4.5/serializer.d.ts +4 -0
- package/dist/types-ts4.5/steps/index.d.ts +14 -0
- package/dist/types-ts4.5/text/index.d.ts +8 -0
- package/dist/types-ts4.5/text/nodes/blockquote.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/bulletList.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/date.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/decisionItem.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/hardBreak.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/heading.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/index.d.ts +6 -0
- package/dist/types-ts4.5/text/nodes/inlineCard.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/listItem.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/mediaGroup.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/mention.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/orderedList.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/panel.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/paragraph.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/rule.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/status.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/table.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/taskItem.d.ts +3 -0
- package/dist/types-ts4.5/text/nodes/unknown.d.ts +3 -0
- package/dist/types-ts4.5/text-serializer.d.ts +1 -0
- package/dist/types-ts4.5/types/i18n.d.ts +5 -0
- package/dist/types-ts4.5/types/mediaOptions.d.ts +13 -0
- package/dist/types-ts4.5/types/smartLinksOptions.d.ts +7 -0
- package/dist/types-ts4.5/ui/Expand.d.ts +23 -0
- package/dist/types-ts4.5/ui/ExtensionRenderer.d.ts +42 -0
- package/dist/types-ts4.5/ui/MediaCard.d.ts +79 -0
- package/dist/types-ts4.5/ui/Renderer/ErrorBoundary.d.ts +24 -0
- package/dist/types-ts4.5/ui/Renderer/breakout-ssr.d.ts +11 -0
- package/dist/types-ts4.5/ui/Renderer/click-to-edit.d.ts +6 -0
- package/dist/types-ts4.5/ui/Renderer/index.d.ts +38 -0
- package/dist/types-ts4.5/ui/Renderer/style.d.ts +16 -0
- package/dist/types-ts4.5/ui/Renderer/truncated-wrapper.d.ts +12 -0
- package/dist/types-ts4.5/ui/Renderer/types.d.ts +16 -0
- package/dist/types-ts4.5/ui/RendererActionsContext/WithRendererActions.d.ts +6 -0
- package/dist/types-ts4.5/ui/RendererActionsContext/index.d.ts +9 -0
- package/dist/types-ts4.5/ui/SmartCardStorage.d.ts +60 -0
- package/dist/types-ts4.5/ui/SortingIcon.d.ts +23 -0
- package/dist/types-ts4.5/ui/TaskItemsFormatContext/TaskItemsFormatContext.d.ts +15 -0
- package/dist/types-ts4.5/ui/TaskItemsFormatContext/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/active-header-id-provider.d.ts +18 -0
- package/dist/types-ts4.5/ui/annotations/context.d.ts +27 -0
- package/dist/types-ts4.5/ui/annotations/draft/component.d.ts +20 -0
- package/dist/types-ts4.5/ui/annotations/draft/dom.d.ts +7 -0
- package/dist/types-ts4.5/ui/annotations/draft/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/annotations/draft/position.d.ts +2 -0
- package/dist/types-ts4.5/ui/annotations/draft/text.d.ts +13 -0
- package/dist/types-ts4.5/ui/annotations/element/index.d.ts +10 -0
- package/dist/types-ts4.5/ui/annotations/element/mark.d.ts +14 -0
- package/dist/types-ts4.5/ui/annotations/hooks/index.d.ts +3 -0
- package/dist/types-ts4.5/ui/annotations/hooks/use-events.d.ts +18 -0
- package/dist/types-ts4.5/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +1 -0
- package/dist/types-ts4.5/ui/annotations/hooks/use-inline-comments-filter.d.ts +9 -0
- package/dist/types-ts4.5/ui/annotations/hooks/use-load-annotations.d.ts +6 -0
- package/dist/types-ts4.5/ui/annotations/hooks/user-selection.d.ts +9 -0
- package/dist/types-ts4.5/ui/annotations/hooks/utils.d.ts +2 -0
- package/dist/types-ts4.5/ui/annotations/index.d.ts +5 -0
- package/dist/types-ts4.5/ui/annotations/selection/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/annotations/selection/mounter.d.ts +20 -0
- package/dist/types-ts4.5/ui/annotations/selection/range-validator.d.ts +13 -0
- package/dist/types-ts4.5/ui/annotations/selection/wrapper.d.ts +8 -0
- package/dist/types-ts4.5/ui/annotations/types.d.ts +22 -0
- package/dist/types-ts4.5/ui/annotations/view/index.d.ts +7 -0
- package/dist/types-ts4.5/ui/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/renderer-props.d.ts +115 -0
- package/dist/types-ts4.5/use-feature-flags.d.ts +2 -0
- package/dist/types-ts4.5/utils.d.ts +24 -0
- package/package.json +3 -3
- package/tmp/api-report-tmp.d.ts +552 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Fragment, Schema } from '@atlaskit/editor-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
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
export type NodeReducer = (node: PMNode, schema: Schema) => string;
|
|
3
|
+
export declare const reduce: NodeReducer;
|
|
4
|
+
export declare const nodeToReducerMapping: {
|
|
5
|
+
[key: string]: NodeReducer;
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as TextSerializer } from './text';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
2
|
+
import type { MediaFeatureFlags, SSR } from '@atlaskit/media-common';
|
|
3
|
+
export 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
|
+
allowCaptions?: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { AnalyticsEventPayload } from '../analytics/events';
|
|
4
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
|
+
import { RendererAppearance } from './Renderer/types';
|
|
6
|
+
export type StyleProps = {
|
|
7
|
+
expanded?: boolean;
|
|
8
|
+
focused?: boolean;
|
|
9
|
+
'data-node-type'?: 'expand' | 'nestedExpand';
|
|
10
|
+
'data-title'?: string;
|
|
11
|
+
};
|
|
12
|
+
export interface ExpandProps {
|
|
13
|
+
title: string;
|
|
14
|
+
nodeType: 'expand' | 'nestedExpand';
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
|
|
17
|
+
nestedHeaderIds?: Array<string>;
|
|
18
|
+
rendererAppearance?: RendererAppearance;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<ExpandProps & WrappedComponentProps<"intl">>> & {
|
|
21
|
+
WrappedComponent: React.ComponentType<ExpandProps & WrappedComponentProps<"intl">>;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 '@atlaskit/editor-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>) => void;
|
|
36
|
+
getNodeRenderer: import("memoize-one").MemoizedFn<typeof getNodeRenderer>;
|
|
37
|
+
renderExtensionNode: (extensionProvider?: ExtensionProvider | null) => JSX.Element;
|
|
38
|
+
setupAndRenderExtensionNode: (providers: {
|
|
39
|
+
extensionProvider?: Promise<ExtensionProvider<any>> | undefined;
|
|
40
|
+
}) => JSX.Element;
|
|
41
|
+
render(): JSX.Element;
|
|
42
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
|
+
import type { CardAppearance, CardDimensions, CardOnClickCallback, NumericalCardDimensions } from '@atlaskit/media-card';
|
|
4
|
+
import type { MediaClientConfig } from '@atlaskit/media-core';
|
|
5
|
+
import type { ImageResizeMode, Identifier, FileState } from '@atlaskit/media-client';
|
|
6
|
+
import type { 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 type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
10
|
+
import type { RendererAppearance } from './Renderer/types';
|
|
11
|
+
import type { RendererContext } from '../react/types';
|
|
12
|
+
import type { MediaSSR } from '../types/mediaOptions';
|
|
13
|
+
export 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 mediaIdentifierMap: Map<string, Identifier>;
|
|
50
|
+
export declare const getListOfIdentifiersFromDoc: (doc?: ADFEntity) => Identifier[];
|
|
51
|
+
export declare class MediaCardInternal extends Component<MediaCardProps, State> {
|
|
52
|
+
state: State;
|
|
53
|
+
componentDidMount(): Promise<void>;
|
|
54
|
+
UNSAFE_componentWillReceiveProps(newProps: MediaCardProps): void;
|
|
55
|
+
componentWillUnmount(): void;
|
|
56
|
+
saveFileState: (id: string, mediaClientConfig: MediaClientConfig) => Promise<void>;
|
|
57
|
+
private renderLoadingCard;
|
|
58
|
+
private renderExternal;
|
|
59
|
+
/**
|
|
60
|
+
* We want to call provided `eventHandlers.media.onClick` when it's provided,
|
|
61
|
+
* but we also don't want to call it when it's a video and inline video player is enabled.
|
|
62
|
+
* This is due to consumers normally process this onClick call by opening media viewer and
|
|
63
|
+
* we don't want that to happened described above text.
|
|
64
|
+
*/
|
|
65
|
+
private getOnCardClickCallback;
|
|
66
|
+
render(): JSX.Element | null;
|
|
67
|
+
}
|
|
68
|
+
export type ClipboardAttrs = {
|
|
69
|
+
id: string;
|
|
70
|
+
alt?: string;
|
|
71
|
+
collection?: string;
|
|
72
|
+
contextIdentifierProvider?: ContextIdentifierProvider;
|
|
73
|
+
originalDimensions?: NumericalCardDimensions;
|
|
74
|
+
fileState?: FileState;
|
|
75
|
+
};
|
|
76
|
+
export declare const getClipboardAttrs: ({ id, alt, collection, contextIdentifierProvider, originalDimensions, fileState, }: ClipboardAttrs) => {
|
|
77
|
+
[key: string]: string | number | undefined;
|
|
78
|
+
};
|
|
79
|
+
export declare const MediaCard: React.ComponentClass<MediaCardProps & import("@atlaskit/editor-common/utils").ImageLoaderProps, any>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
+
import type { ComponentCrashErrorAEP } from '../../analytics/events';
|
|
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 {};
|
|
@@ -0,0 +1,11 @@
|
|
|
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;
|
|
@@ -0,0 +1,6 @@
|
|
|
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;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { PureComponent } from 'react';
|
|
3
|
+
import type { 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 editorRef;
|
|
16
|
+
private rafID?;
|
|
17
|
+
private mouseDownSelection?;
|
|
18
|
+
private id?;
|
|
19
|
+
/**
|
|
20
|
+
* This is used in measuring the Renderer Mount time and is then
|
|
21
|
+
* deleted once that measurement occurs.
|
|
22
|
+
*/
|
|
23
|
+
private renderedMeasurementDistortedDurationMonitor?;
|
|
24
|
+
constructor(props: RendererProps);
|
|
25
|
+
private anchorLinkAnalytics;
|
|
26
|
+
componentDidMount(): void;
|
|
27
|
+
UNSAFE_componentWillReceiveProps(nextProps: RendererProps): void;
|
|
28
|
+
private deriveSerializerProps;
|
|
29
|
+
private featureFlags;
|
|
30
|
+
private fireAnalyticsEvent;
|
|
31
|
+
private getSchema;
|
|
32
|
+
private onMouseDownEditView;
|
|
33
|
+
private handleMouseTripleClickInTables;
|
|
34
|
+
render(): jsx.JSX.Element;
|
|
35
|
+
componentWillUnmount(): void;
|
|
36
|
+
}
|
|
37
|
+
declare const RendererWithAnnotationSelection: (props: RendererProps) => jsx.JSX.Element;
|
|
38
|
+
export default RendererWithAnnotationSelection;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Theme } from '@emotion/react';
|
|
2
|
+
import type { RendererAppearance } from './types';
|
|
3
|
+
export declare const FullPagePadding = 32;
|
|
4
|
+
export type RendererWrapperProps = {
|
|
5
|
+
appearance?: RendererAppearance;
|
|
6
|
+
allowNestedHeaderLinks: boolean;
|
|
7
|
+
allowColumnSorting: boolean;
|
|
8
|
+
useBlockRenderForCodeBlock: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const TELEPOINTER_ID = "ai-streaming-telepointer";
|
|
11
|
+
export declare const headingSizes: {
|
|
12
|
+
[key: string]: {
|
|
13
|
+
[key: string]: number;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const rendererStyles: (wrapperProps: RendererWrapperProps) => (theme: Theme) => import("@emotion/react").SerializedStyles;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type RendererAppearance = 'comment' | 'full-page' | 'full-width' | 'mobile' | undefined;
|
|
3
|
+
export type StickyHeaderConfig = {
|
|
4
|
+
offsetTop?: number;
|
|
5
|
+
};
|
|
6
|
+
export type StickyHeaderProps = boolean | ({
|
|
7
|
+
show?: boolean;
|
|
8
|
+
} & StickyHeaderConfig);
|
|
9
|
+
export type HeadingAnchorLinksConfig = {
|
|
10
|
+
activeHeadingId?: string;
|
|
11
|
+
allowNestedHeaderLinks?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type NodeComponentsProps = {
|
|
14
|
+
[key: string]: React.ComponentType<any>;
|
|
15
|
+
};
|
|
16
|
+
export type HeadingAnchorLinksProps = boolean | HeadingAnchorLinksConfig;
|
|
@@ -0,0 +1,6 @@
|
|
|
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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import RendererActions from '../../actions/index';
|
|
3
|
+
export declare const RendererContext: React.Context<RendererActions>;
|
|
4
|
+
type RendererActionsContextProps = PropsWithChildren<{
|
|
5
|
+
context?: RendererActions;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function RendererActionsContext({ children, context, }: RendererActionsContextProps): JSX.Element;
|
|
8
|
+
export declare const RendererActionsContextConsumer: React.Consumer<RendererActions>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Diff } from '@atlaskit/editor-common/utils';
|
|
3
|
+
export interface WithSmartCardStorageProps {
|
|
4
|
+
smartCardStorage: Map<string, string>;
|
|
5
|
+
}
|
|
6
|
+
export declare const Context: React.Context<Map<string, string>>;
|
|
7
|
+
export declare const Provider: React.FunctionComponent;
|
|
8
|
+
export declare const withSmartCardStorage: <Props extends WithSmartCardStorageProps>(WrappedComponent: React.ComponentType<Props>) => {
|
|
9
|
+
new (props: Diff<Props, WithSmartCardStorageProps> | Readonly<Diff<Props, WithSmartCardStorageProps>>): {
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
context: any;
|
|
12
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Diff<Props, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
13
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
14
|
+
readonly props: Readonly<Diff<Props, WithSmartCardStorageProps>> & Readonly<{
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}>;
|
|
17
|
+
state: Readonly<{}>;
|
|
18
|
+
refs: {
|
|
19
|
+
[key: string]: React.ReactInstance;
|
|
20
|
+
};
|
|
21
|
+
componentDidMount?(): void;
|
|
22
|
+
shouldComponentUpdate?(nextProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
23
|
+
componentWillUnmount?(): void;
|
|
24
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
25
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
|
|
26
|
+
componentDidUpdate?(prevProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
27
|
+
componentWillMount?(): void;
|
|
28
|
+
UNSAFE_componentWillMount?(): void;
|
|
29
|
+
componentWillReceiveProps?(nextProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, nextContext: any): void;
|
|
30
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, nextContext: any): void;
|
|
31
|
+
componentWillUpdate?(nextProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
32
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
33
|
+
};
|
|
34
|
+
new (props: Diff<Props, WithSmartCardStorageProps>, context: any): {
|
|
35
|
+
render(): JSX.Element;
|
|
36
|
+
context: any;
|
|
37
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Diff<Props, WithSmartCardStorageProps>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
38
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
39
|
+
readonly props: Readonly<Diff<Props, WithSmartCardStorageProps>> & Readonly<{
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
}>;
|
|
42
|
+
state: Readonly<{}>;
|
|
43
|
+
refs: {
|
|
44
|
+
[key: string]: React.ReactInstance;
|
|
45
|
+
};
|
|
46
|
+
componentDidMount?(): void;
|
|
47
|
+
shouldComponentUpdate?(nextProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
48
|
+
componentWillUnmount?(): void;
|
|
49
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
50
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, prevState: Readonly<{}>): any;
|
|
51
|
+
componentDidUpdate?(prevProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
52
|
+
componentWillMount?(): void;
|
|
53
|
+
UNSAFE_componentWillMount?(): void;
|
|
54
|
+
componentWillReceiveProps?(nextProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, nextContext: any): void;
|
|
55
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, nextContext: any): void;
|
|
56
|
+
componentWillUpdate?(nextProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
57
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<Diff<Props, WithSmartCardStorageProps>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
58
|
+
};
|
|
59
|
+
contextType?: React.Context<any> | undefined;
|
|
60
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
export declare enum StatusClassNames {
|
|
5
|
+
ASC = "sorting-icon-svg__asc",
|
|
6
|
+
DESC = "sorting-icon-svg__desc",
|
|
7
|
+
NO_ORDER = "sorting-icon-svg__no_order",
|
|
8
|
+
SORTING_NOT_ALLOWED = "sorting-icon-svg__not-allowed"
|
|
9
|
+
}
|
|
10
|
+
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<{
|
|
11
|
+
isSortingAllowed: boolean;
|
|
12
|
+
sortOrdered?: SortOrder | undefined;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
onKeyDown: (event: import("react").KeyboardEvent<HTMLElement>) => void;
|
|
15
|
+
} & WrappedComponentProps<"intl">>> & {
|
|
16
|
+
WrappedComponent: import("react").ComponentType<{
|
|
17
|
+
isSortingAllowed: boolean;
|
|
18
|
+
sortOrdered?: SortOrder | undefined;
|
|
19
|
+
onClick: () => void;
|
|
20
|
+
onKeyDown: (event: import("react").KeyboardEvent<HTMLElement>) => void;
|
|
21
|
+
} & WrappedComponentProps<"intl">>;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export type TaskItemsDone = boolean | undefined;
|
|
3
|
+
export type TaskItemsStateContext = [
|
|
4
|
+
TaskItemsDone,
|
|
5
|
+
React.Dispatch<TaskItemsFormatReducerAction>
|
|
6
|
+
];
|
|
7
|
+
export declare const TaskItemsFormatContext: React.Context<TaskItemsStateContext>;
|
|
8
|
+
export type TaskItemsFormatReducerAction = boolean | undefined;
|
|
9
|
+
export declare function TaskItemsFormatProvider({ children }: {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}): JSX.Element;
|
|
12
|
+
export declare function useTaskItemsFormatContext(): TaskItemsStateContext;
|
|
13
|
+
export declare function TaskItemsFormatConsumer({ children, }: {
|
|
14
|
+
children: ([isChecked, dispatch]: TaskItemsStateContext) => ReactNode;
|
|
15
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const Provider: React.Provider<string | undefined>;
|
|
3
|
+
type Props = {
|
|
4
|
+
nestedHeaderIds: string[];
|
|
5
|
+
onNestedHeaderIdMatch: () => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* We need to expose this abstraction on top of the native Consumer in order to control when
|
|
9
|
+
* The consumer will get notified when a match has happened. If we use the Consumer directly in
|
|
10
|
+
* Expand components without this inner state, everytime a new prop comes in, and the `newActiveHeaderId`
|
|
11
|
+
* is the same as before, we will set the expand to true forever, until the active header id changes.
|
|
12
|
+
* Thus, the user won't be able to collapse the expand.
|
|
13
|
+
*
|
|
14
|
+
* By exposing `onNestedHeaderIdMatch` here we can control when will consumers be notified:
|
|
15
|
+
* only when a `newActiveHeaderId` comes in from the Provider and the list of header ids includes it.
|
|
16
|
+
*/
|
|
17
|
+
declare const ActiveHeaderIdConsumer: ({ nestedHeaderIds, onNestedHeaderIdMatch, }: Props) => JSX.Element;
|
|
18
|
+
export { Provider as ActiveHeaderIdProvider, ActiveHeaderIdConsumer };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Position } from './types';
|
|
3
|
+
import type { AnnotationProviders } from '@atlaskit/editor-common/types';
|
|
4
|
+
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
5
|
+
type ChildrenProps = {
|
|
6
|
+
applyAnnotationDraftAt: (position: Position) => void;
|
|
7
|
+
clearAnnotationDraft: () => void;
|
|
8
|
+
};
|
|
9
|
+
export type RenderCallbackType = React.FC<ChildrenProps>;
|
|
10
|
+
type Props = {
|
|
11
|
+
children: RenderCallbackType;
|
|
12
|
+
};
|
|
13
|
+
type State = {
|
|
14
|
+
position: Position | null;
|
|
15
|
+
};
|
|
16
|
+
export declare const AnnotationsDraftContext: React.Context<Position | null>;
|
|
17
|
+
export declare const ProvidersContext: React.Context<AnnotationProviders | null | undefined>;
|
|
18
|
+
export declare const InlineCommentsStateContext: React.Context<Record<string, AnnotationMarkStates | null>>;
|
|
19
|
+
export declare class AnnotationsDraftContextWrapper extends React.Component<Props, State> {
|
|
20
|
+
state: {
|
|
21
|
+
position: null;
|
|
22
|
+
};
|
|
23
|
+
render(): JSX.Element;
|
|
24
|
+
applyAnnotationDraftAt: (nextPosition: Position) => void;
|
|
25
|
+
clearAnnotationDraft: () => void;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
|
+
import { InsertDraftPosition, Position } from '../types';
|
|
4
|
+
export declare const AnnotationDraft: React.FC<{
|
|
5
|
+
draftPosition: Position;
|
|
6
|
+
}>;
|
|
7
|
+
type ApplyAnnotationsProps = {
|
|
8
|
+
texts: string[];
|
|
9
|
+
shouldApplyAnnotationAt: InsertDraftPosition.INSIDE | InsertDraftPosition.START | InsertDraftPosition.END;
|
|
10
|
+
draftPosition: Position;
|
|
11
|
+
};
|
|
12
|
+
export declare const getAnnotationIndex: (annotationPosition: InsertDraftPosition, fragmentCount: number) => number;
|
|
13
|
+
export declare const applyAnnotationOnText: ({ texts, shouldApplyAnnotationAt, draftPosition, }: ApplyAnnotationsProps) => JSX.Element[];
|
|
14
|
+
type Props = {
|
|
15
|
+
startPos: number;
|
|
16
|
+
endPos: number;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
};
|
|
19
|
+
export declare const TextWithAnnotationDraft: React.FC<Props>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Position } from '../types';
|
|
2
|
+
export declare const dataAttributes: ({ from, to }: Position) => {
|
|
3
|
+
"data-annotation-draft-mark": boolean;
|
|
4
|
+
"data-draft-start-at": number;
|
|
5
|
+
"data-draft-end-at": number;
|
|
6
|
+
};
|
|
7
|
+
export declare const updateWindowSelectionAroundDraft: (pos: Position) => boolean;
|