@atlaskit/renderer 103.0.0 → 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.
- package/CHANGELOG.md +27 -0
- package/dist/cjs/consts.js +2 -2
- package/dist/cjs/messages.js +1 -1
- package/dist/cjs/react/nodes/panel.js +19 -10
- package/dist/cjs/react/nodes/tableCell.js +8 -26
- package/dist/cjs/ui/ExtensionRenderer.js +9 -2
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/ui/Renderer/style.js +5 -3
- package/dist/cjs/ui/SortingIcon.js +55 -28
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/consts.js +2 -2
- package/dist/es2019/messages.js +1 -1
- package/dist/es2019/react/nodes/panel.js +16 -6
- package/dist/es2019/react/nodes/tableCell.js +8 -27
- package/dist/es2019/ui/ExtensionRenderer.js +7 -2
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/ui/Renderer/style.js +308 -287
- package/dist/es2019/ui/SortingIcon.js +89 -32
- package/dist/es2019/version.json +1 -1
- package/dist/esm/consts.js +2 -2
- package/dist/esm/messages.js +1 -1
- package/dist/esm/react/nodes/panel.js +18 -10
- package/dist/esm/react/nodes/tableCell.js +8 -26
- package/dist/esm/ui/ExtensionRenderer.js +9 -2
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/ui/Renderer/style.js +5 -4
- package/dist/esm/ui/SortingIcon.js +55 -27
- package/dist/esm/version.json +1 -1
- package/dist/types/consts.d.ts +2 -2
- package/dist/types/react/nodes/bodiedExtension.d.ts +2 -1
- package/dist/types/react/nodes/extension.d.ts +2 -1
- package/dist/types/react/nodes/inlineExtension.d.ts +2 -0
- package/dist/types/ui/ExtensionRenderer.d.ts +2 -0
- package/dist/types/ui/SortingIcon.d.ts +4 -1
- package/package.json +19 -23
- package/report.api.md +359 -255
- package/dist/types-ts4.0/actions/index.d.ts +0 -61
- package/dist/types-ts4.0/actions/matches-utils.d.ts +0 -7
- package/dist/types-ts4.0/actions.d.ts +0 -3
- package/dist/types-ts4.0/analytics/analyticsContext.d.ts +0 -6
- package/dist/types-ts4.0/analytics/enums.d.ts +0 -56
- package/dist/types-ts4.0/analytics/events.d.ts +0 -110
- package/dist/types-ts4.0/analytics/unsupported-content.d.ts +0 -10
- package/dist/types-ts4.0/consts.d.ts +0 -12
- package/dist/types-ts4.0/i18n/cs.d.ts +0 -20
- package/dist/types-ts4.0/i18n/da.d.ts +0 -20
- package/dist/types-ts4.0/i18n/de.d.ts +0 -20
- package/dist/types-ts4.0/i18n/en.d.ts +0 -20
- package/dist/types-ts4.0/i18n/en_GB.d.ts +0 -20
- package/dist/types-ts4.0/i18n/en_ZZ.d.ts +0 -20
- package/dist/types-ts4.0/i18n/es.d.ts +0 -20
- package/dist/types-ts4.0/i18n/et.d.ts +0 -8
- package/dist/types-ts4.0/i18n/fi.d.ts +0 -20
- package/dist/types-ts4.0/i18n/fr.d.ts +0 -20
- package/dist/types-ts4.0/i18n/hu.d.ts +0 -20
- package/dist/types-ts4.0/i18n/index.d.ts +0 -31
- package/dist/types-ts4.0/i18n/it.d.ts +0 -20
- package/dist/types-ts4.0/i18n/ja.d.ts +0 -20
- package/dist/types-ts4.0/i18n/ko.d.ts +0 -20
- package/dist/types-ts4.0/i18n/nb.d.ts +0 -20
- package/dist/types-ts4.0/i18n/nl.d.ts +0 -20
- package/dist/types-ts4.0/i18n/pl.d.ts +0 -20
- package/dist/types-ts4.0/i18n/pt_BR.d.ts +0 -20
- package/dist/types-ts4.0/i18n/pt_PT.d.ts +0 -8
- package/dist/types-ts4.0/i18n/ru.d.ts +0 -20
- package/dist/types-ts4.0/i18n/sk.d.ts +0 -8
- package/dist/types-ts4.0/i18n/sv.d.ts +0 -20
- package/dist/types-ts4.0/i18n/th.d.ts +0 -20
- package/dist/types-ts4.0/i18n/tr.d.ts +0 -20
- package/dist/types-ts4.0/i18n/uk.d.ts +0 -20
- package/dist/types-ts4.0/i18n/vi.d.ts +0 -20
- package/dist/types-ts4.0/i18n/zh.d.ts +0 -20
- package/dist/types-ts4.0/i18n/zh_TW.d.ts +0 -20
- package/dist/types-ts4.0/index.d.ts +0 -11
- package/dist/types-ts4.0/messages.d.ts +0 -61
- package/dist/types-ts4.0/react/hooks/use-bidi-warnings.d.ts +0 -10
- package/dist/types-ts4.0/react/hooks/use-in-viewport.d.ts +0 -5
- package/dist/types-ts4.0/react/hooks/use-observed-width.d.ts +0 -3
- package/dist/types-ts4.0/react/index.d.ts +0 -118
- package/dist/types-ts4.0/react/marks/alignment.d.ts +0 -4
- package/dist/types-ts4.0/react/marks/annotation.d.ts +0 -6
- package/dist/types-ts4.0/react/marks/breakout.d.ts +0 -6
- package/dist/types-ts4.0/react/marks/code.d.ts +0 -16
- package/dist/types-ts4.0/react/marks/confluence-inline-comment.d.ts +0 -8
- package/dist/types-ts4.0/react/marks/data-consumer.d.ts +0 -4
- package/dist/types-ts4.0/react/marks/em.d.ts +0 -3
- package/dist/types-ts4.0/react/marks/fragment.d.ts +0 -4
- package/dist/types-ts4.0/react/marks/indentation.d.ts +0 -4
- package/dist/types-ts4.0/react/marks/index.d.ts +0 -21
- package/dist/types-ts4.0/react/marks/link.d.ts +0 -9
- package/dist/types-ts4.0/react/marks/strike.d.ts +0 -3
- package/dist/types-ts4.0/react/marks/strong.d.ts +0 -3
- package/dist/types-ts4.0/react/marks/subsup.d.ts +0 -4
- package/dist/types-ts4.0/react/marks/textColor.d.ts +0 -4
- package/dist/types-ts4.0/react/marks/underline.d.ts +0 -3
- package/dist/types-ts4.0/react/marks/unsupportedMark.d.ts +0 -3
- package/dist/types-ts4.0/react/marks/unsupportedNodeAttribute.d.ts +0 -3
- package/dist/types-ts4.0/react/nodes/blockCard.d.ts +0 -10
- package/dist/types-ts4.0/react/nodes/blockquote.d.ts +0 -2
- package/dist/types-ts4.0/react/nodes/bodiedExtension.d.ts +0 -23
- package/dist/types-ts4.0/react/nodes/bulletList.d.ts +0 -5
- package/dist/types-ts4.0/react/nodes/caption.d.ts +0 -4
- package/dist/types-ts4.0/react/nodes/codeBlock/codeBlock.d.ts +0 -14
- package/dist/types-ts4.0/react/nodes/codeBlock/components/codeBlockContainer.d.ts +0 -12
- package/dist/types-ts4.0/react/nodes/codeBlock/components/lightWeightCodeBlock.d.ts +0 -9
- package/dist/types-ts4.0/react/nodes/codeBlock/windowedCodeBlock.d.ts +0 -4
- package/dist/types-ts4.0/react/nodes/codeBlockCopyButton.d.ts +0 -9
- package/dist/types-ts4.0/react/nodes/date.d.ts +0 -11
- package/dist/types-ts4.0/react/nodes/decisionItem.d.ts +0 -3
- package/dist/types-ts4.0/react/nodes/decisionList.d.ts +0 -7
- package/dist/types-ts4.0/react/nodes/doc.d.ts +0 -3
- package/dist/types-ts4.0/react/nodes/embedCard.d.ts +0 -17
- package/dist/types-ts4.0/react/nodes/emoji.d.ts +0 -10
- package/dist/types-ts4.0/react/nodes/extension.d.ts +0 -112
- package/dist/types-ts4.0/react/nodes/fallback.d.ts +0 -16
- package/dist/types-ts4.0/react/nodes/hardBreak.d.ts +0 -6
- package/dist/types-ts4.0/react/nodes/heading-anchor.d.ts +0 -14
- package/dist/types-ts4.0/react/nodes/heading.d.ts +0 -14
- package/dist/types-ts4.0/react/nodes/index.d.ts +0 -94
- package/dist/types-ts4.0/react/nodes/inline.d.ts +0 -1
- package/dist/types-ts4.0/react/nodes/inlineCard.d.ts +0 -65
- package/dist/types-ts4.0/react/nodes/inlineExtension.d.ts +0 -16
- package/dist/types-ts4.0/react/nodes/layoutColumn.d.ts +0 -6
- package/dist/types-ts4.0/react/nodes/layoutSection.d.ts +0 -2
- package/dist/types-ts4.0/react/nodes/listItem.d.ts +0 -2
- package/dist/types-ts4.0/react/nodes/media.d.ts +0 -27
- package/dist/types-ts4.0/react/nodes/mediaGroup.d.ts +0 -29
- package/dist/types-ts4.0/react/nodes/mediaInline.d.ts +0 -20
- package/dist/types-ts4.0/react/nodes/mediaSingle/index.d.ts +0 -23
- package/dist/types-ts4.0/react/nodes/mediaSingle/styles.d.ts +0 -2
- package/dist/types-ts4.0/react/nodes/mention.d.ts +0 -13
- package/dist/types-ts4.0/react/nodes/orderedList.d.ts +0 -6
- package/dist/types-ts4.0/react/nodes/panel.d.ts +0 -17
- package/dist/types-ts4.0/react/nodes/paragraph.d.ts +0 -3
- package/dist/types-ts4.0/react/nodes/placeholder.d.ts +0 -6
- package/dist/types-ts4.0/react/nodes/rule.d.ts +0 -2
- package/dist/types-ts4.0/react/nodes/status.d.ts +0 -10
- package/dist/types-ts4.0/react/nodes/table/colgroup.d.ts +0 -3
- package/dist/types-ts4.0/react/nodes/table/sticky.d.ts +0 -38
- package/dist/types-ts4.0/react/nodes/table/table.d.ts +0 -7
- package/dist/types-ts4.0/react/nodes/table/types.d.ts +0 -7
- package/dist/types-ts4.0/react/nodes/table.d.ts +0 -269
- package/dist/types-ts4.0/react/nodes/tableCell.d.ts +0 -81
- package/dist/types-ts4.0/react/nodes/tableRow.d.ts +0 -24
- package/dist/types-ts4.0/react/nodes/task-item-with-providers.d.ts +0 -29
- package/dist/types-ts4.0/react/nodes/taskItem.d.ts +0 -19
- package/dist/types-ts4.0/react/nodes/taskList.d.ts +0 -8
- package/dist/types-ts4.0/react/nodes/text-wrapper.d.ts +0 -8
- package/dist/types-ts4.0/react/nodes/unknownBlock.d.ts +0 -2
- package/dist/types-ts4.0/react/renderer-node.d.ts +0 -4
- package/dist/types-ts4.0/react/types.d.ts +0 -57
- package/dist/types-ts4.0/react/utils/clipboard.d.ts +0 -1
- package/dist/types-ts4.0/react/utils/element-selection.d.ts +0 -9
- package/dist/types-ts4.0/react/utils/getCardClickHandler.d.ts +0 -2
- package/dist/types-ts4.0/react/utils/inject-props.d.ts +0 -6
- package/dist/types-ts4.0/react/utils/links.d.ts +0 -3
- package/dist/types-ts4.0/react/utils/lists.d.ts +0 -2
- package/dist/types-ts4.0/react/utils/performance/RenderTracking.d.ts +0 -15
- package/dist/types-ts4.0/react/utils/use-select-all-trap.d.ts +0 -2
- package/dist/types-ts4.0/render-document.d.ts +0 -23
- package/dist/types-ts4.0/renderer-context.d.ts +0 -9
- package/dist/types-ts4.0/serializer.d.ts +0 -4
- package/dist/types-ts4.0/steps/index.d.ts +0 -14
- package/dist/types-ts4.0/text/index.d.ts +0 -8
- package/dist/types-ts4.0/text/nodes/blockquote.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/bulletList.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/date.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/decisionItem.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/hardBreak.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/heading.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/index.d.ts +0 -6
- package/dist/types-ts4.0/text/nodes/inlineCard.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/listItem.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/mediaGroup.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/mention.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/orderedList.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/panel.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/paragraph.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/rule.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/status.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/table.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/taskItem.d.ts +0 -3
- package/dist/types-ts4.0/text/nodes/unknown.d.ts +0 -3
- package/dist/types-ts4.0/text-serializer.d.ts +0 -1
- package/dist/types-ts4.0/types/i18n.d.ts +0 -5
- package/dist/types-ts4.0/types/mediaOptions.d.ts +0 -12
- package/dist/types-ts4.0/types/smartLinksOptions.d.ts +0 -3
- package/dist/types-ts4.0/ui/Expand.d.ts +0 -21
- package/dist/types-ts4.0/ui/ExtensionRenderer.d.ts +0 -40
- package/dist/types-ts4.0/ui/MediaCard.d.ts +0 -77
- package/dist/types-ts4.0/ui/Renderer/ErrorBoundary.d.ts +0 -24
- package/dist/types-ts4.0/ui/Renderer/breakout-ssr.d.ts +0 -11
- package/dist/types-ts4.0/ui/Renderer/click-to-edit.d.ts +0 -6
- package/dist/types-ts4.0/ui/Renderer/index.d.ts +0 -33
- package/dist/types-ts4.0/ui/Renderer/style.d.ts +0 -14
- package/dist/types-ts4.0/ui/Renderer/truncated-wrapper.d.ts +0 -12
- package/dist/types-ts4.0/ui/Renderer/types.d.ts +0 -16
- package/dist/types-ts4.0/ui/RendererActionsContext/WithRendererActions.d.ts +0 -6
- package/dist/types-ts4.0/ui/RendererActionsContext/index.d.ts +0 -9
- package/dist/types-ts4.0/ui/SmartCardStorage.d.ts +0 -60
- package/dist/types-ts4.0/ui/SortingIcon.d.ts +0 -20
- package/dist/types-ts4.0/ui/TaskItemsFormatContext/TaskItemsFormatContext.d.ts +0 -15
- package/dist/types-ts4.0/ui/TaskItemsFormatContext/index.d.ts +0 -2
- package/dist/types-ts4.0/ui/active-header-id-provider.d.ts +0 -18
- package/dist/types-ts4.0/ui/annotations/context.d.ts +0 -27
- package/dist/types-ts4.0/ui/annotations/draft/component.d.ts +0 -20
- package/dist/types-ts4.0/ui/annotations/draft/dom.d.ts +0 -7
- package/dist/types-ts4.0/ui/annotations/draft/index.d.ts +0 -2
- package/dist/types-ts4.0/ui/annotations/draft/position.d.ts +0 -2
- package/dist/types-ts4.0/ui/annotations/draft/text.d.ts +0 -11
- package/dist/types-ts4.0/ui/annotations/element/index.d.ts +0 -10
- package/dist/types-ts4.0/ui/annotations/element/mark.d.ts +0 -14
- package/dist/types-ts4.0/ui/annotations/hooks/index.d.ts +0 -3
- package/dist/types-ts4.0/ui/annotations/hooks/use-events.d.ts +0 -18
- package/dist/types-ts4.0/ui/annotations/hooks/use-inline-comment-subscriber.d.ts +0 -1
- package/dist/types-ts4.0/ui/annotations/hooks/use-inline-comments-filter.d.ts +0 -9
- package/dist/types-ts4.0/ui/annotations/hooks/use-load-annotations.d.ts +0 -6
- package/dist/types-ts4.0/ui/annotations/hooks/user-selection.d.ts +0 -9
- package/dist/types-ts4.0/ui/annotations/hooks/utils.d.ts +0 -2
- package/dist/types-ts4.0/ui/annotations/index.d.ts +0 -5
- package/dist/types-ts4.0/ui/annotations/selection/index.d.ts +0 -1
- package/dist/types-ts4.0/ui/annotations/selection/mounter.d.ts +0 -20
- package/dist/types-ts4.0/ui/annotations/selection/range-validator.d.ts +0 -13
- package/dist/types-ts4.0/ui/annotations/selection/wrapper.d.ts +0 -8
- package/dist/types-ts4.0/ui/annotations/types.d.ts +0 -22
- package/dist/types-ts4.0/ui/annotations/view/index.d.ts +0 -7
- package/dist/types-ts4.0/ui/index.d.ts +0 -1
- package/dist/types-ts4.0/ui/renderer-props.d.ts +0 -100
- package/dist/types-ts4.0/use-feature-flags.d.ts +0 -2
- package/dist/types-ts4.0/utils.d.ts +0 -24
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
declare type ChildrenProps = {
|
|
6
|
-
applyAnnotationDraftAt: (position: Position) => void;
|
|
7
|
-
clearAnnotationDraft: () => void;
|
|
8
|
-
};
|
|
9
|
-
export declare type RenderCallbackType = React.FC<ChildrenProps>;
|
|
10
|
-
declare type Props = {
|
|
11
|
-
children: RenderCallbackType;
|
|
12
|
-
};
|
|
13
|
-
declare 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 {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { InsertDraftPosition, Position } from '../types';
|
|
4
|
-
export declare const AnnotationDraft: React.FC<{
|
|
5
|
-
draftPosition: Position;
|
|
6
|
-
}>;
|
|
7
|
-
declare 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
|
-
declare type Props = {
|
|
15
|
-
startPos: number;
|
|
16
|
-
endPos: number;
|
|
17
|
-
children: string;
|
|
18
|
-
};
|
|
19
|
-
export declare const TextWithAnnotationDraft: React.FC<Props>;
|
|
20
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TextPosition, Position } from '../types';
|
|
2
|
-
declare type Offset = {
|
|
3
|
-
startOffset: number;
|
|
4
|
-
endOffset: number;
|
|
5
|
-
};
|
|
6
|
-
export declare const splitText: (text: string, { startOffset, endOffset }: Offset) => string[] | null;
|
|
7
|
-
export declare const calcTextSplitOffset: (position: Position, textPosition: TextPosition, text: string) => {
|
|
8
|
-
startOffset: number;
|
|
9
|
-
endOffset: number;
|
|
10
|
-
};
|
|
11
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { AnnotationId, AnnotationDataAttributes, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
|
-
declare type MarkElementProps = {
|
|
4
|
-
id: AnnotationId;
|
|
5
|
-
annotationParentIds: AnnotationId[];
|
|
6
|
-
dataAttributes: AnnotationDataAttributes;
|
|
7
|
-
annotationType: AnnotationTypes;
|
|
8
|
-
};
|
|
9
|
-
declare const MarkElement: React.FC<MarkElementProps>;
|
|
10
|
-
export { MarkElement };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { OnAnnotationClickPayload } from '@atlaskit/editor-common/types';
|
|
4
|
-
import { AnnotationMarkStates, AnnotationId, AnnotationDataAttributes } from '@atlaskit/adf-schema';
|
|
5
|
-
declare type MarkComponentProps = {
|
|
6
|
-
id: AnnotationId;
|
|
7
|
-
annotationParentIds: AnnotationId[];
|
|
8
|
-
dataAttributes: AnnotationDataAttributes;
|
|
9
|
-
state: AnnotationMarkStates | null;
|
|
10
|
-
hasFocus: boolean;
|
|
11
|
-
onClick: (props: OnAnnotationClickPayload) => void;
|
|
12
|
-
};
|
|
13
|
-
export declare const MarkComponent: React.FC<MarkComponentProps>;
|
|
14
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { InlineCommentViewComponentProps } from '@atlaskit/editor-common/types';
|
|
3
|
-
import { AnnotationMarkStates, AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
4
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
|
-
declare type ListenEventProps = {
|
|
6
|
-
id: AnnotationId;
|
|
7
|
-
updateSubscriber: AnnotationUpdateEmitter | null;
|
|
8
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
9
|
-
};
|
|
10
|
-
declare type UseAnnotationUpdateSatteByEventProps = {
|
|
11
|
-
type: AnnotationTypes;
|
|
12
|
-
updateSubscriber: AnnotationUpdateEmitter | null;
|
|
13
|
-
};
|
|
14
|
-
export declare const useAnnotationStateByTypeEvent: ({ type, updateSubscriber, }: UseAnnotationUpdateSatteByEventProps) => Record<string, AnnotationMarkStates | null>;
|
|
15
|
-
export declare const useHasFocusEvent: ({ id, updateSubscriber, }: ListenEventProps) => boolean;
|
|
16
|
-
declare type AnnotationsWithClickTarget = Pick<InlineCommentViewComponentProps, 'annotations' | 'clickElementTarget'> | null;
|
|
17
|
-
export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent'>) => AnnotationsWithClickTarget;
|
|
18
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useInlineCommentSubscriberContext: () => import("@atlaskit/editor-common/types").AnnotationUpdateEmitter | null;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AnnotationId, AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
2
|
-
declare type Props = {
|
|
3
|
-
annotationIds: AnnotationId[];
|
|
4
|
-
filter: {
|
|
5
|
-
state: AnnotationMarkStates;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
export declare const useInlineCommentsFilter: ({ annotationIds, filter: { state: stateFilter }, }: Props) => string[];
|
|
9
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Wrapper as SelectionComponentWrapper } from './wrapper';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { AnnotationByMatches, InlineCommentSelectionComponentProps } from '@atlaskit/editor-common/types';
|
|
3
|
-
import { ApplyAnnotation } from '../../../actions/index';
|
|
4
|
-
import { Position } from '../types';
|
|
5
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
|
-
declare type Props = {
|
|
7
|
-
range: Range;
|
|
8
|
-
component: React.ComponentType<InlineCommentSelectionComponentProps>;
|
|
9
|
-
wrapperDOM: React.RefObject<HTMLDivElement>;
|
|
10
|
-
documentPosition: Position | false;
|
|
11
|
-
isAnnotationAllowed: boolean;
|
|
12
|
-
onClose: () => void;
|
|
13
|
-
applyAnnotation: ApplyAnnotation;
|
|
14
|
-
applyAnnotationDraftAt: (position: Position) => void;
|
|
15
|
-
clearAnnotationDraft: () => void;
|
|
16
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
17
|
-
generateIndexMatch?: (pos: Position) => false | AnnotationByMatches;
|
|
18
|
-
};
|
|
19
|
-
export declare const SelectionInlineCommentMounter: React.FC<Props>;
|
|
20
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Position } from '../types';
|
|
3
|
-
import type { InlineCommentSelectionComponentProps } from '@atlaskit/editor-common/types';
|
|
4
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
|
-
declare type Props = {
|
|
6
|
-
selectionComponent: React.ComponentType<InlineCommentSelectionComponentProps>;
|
|
7
|
-
rendererRef: React.RefObject<HTMLDivElement>;
|
|
8
|
-
applyAnnotationDraftAt: (position: Position) => void;
|
|
9
|
-
clearAnnotationDraft: () => void;
|
|
10
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
11
|
-
};
|
|
12
|
-
export declare const SelectionRangeValidator: React.FC<Props>;
|
|
13
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
3
|
-
declare type Props = {
|
|
4
|
-
rendererRef: React.RefObject<HTMLDivElement>;
|
|
5
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
6
|
-
};
|
|
7
|
-
export declare const Wrapper: (props: React.PropsWithChildren<Props>) => JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
3
|
-
import type { AnnotationProviders } from '@atlaskit/editor-common/types';
|
|
4
|
-
export declare enum InsertDraftPosition {
|
|
5
|
-
AROUND_TEXT = "AROUND_TEXT",
|
|
6
|
-
START = "START",
|
|
7
|
-
END = "END",
|
|
8
|
-
INSIDE = "INSIDE"
|
|
9
|
-
}
|
|
10
|
-
export declare type Position = {
|
|
11
|
-
from: number;
|
|
12
|
-
to: number;
|
|
13
|
-
};
|
|
14
|
-
export declare type AnnotationsWrapperProps = {
|
|
15
|
-
adfDocument: JSONDocNode;
|
|
16
|
-
annotationProvider: AnnotationProviders | null | undefined;
|
|
17
|
-
rendererRef: React.RefObject<HTMLDivElement>;
|
|
18
|
-
};
|
|
19
|
-
export declare type TextPosition = {
|
|
20
|
-
start: number;
|
|
21
|
-
end: number;
|
|
22
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Renderer } from './Renderer';
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { 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 { ADFStage } from '@atlaskit/editor-common/validator';
|
|
6
|
-
import type { AnnotationProviders } from '@atlaskit/editor-common/types';
|
|
7
|
-
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
8
|
-
import type { UnsupportedContentLevelsTracking } from '@atlaskit/editor-common/utils';
|
|
9
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
10
|
-
import { RendererContext } from '../';
|
|
11
|
-
import { RenderOutputStat } from '../render-document';
|
|
12
|
-
import { RendererAppearance, StickyHeaderProps, HeadingAnchorLinksProps, NodeComponentsProps } from './Renderer/types';
|
|
13
|
-
import { MediaOptions } from '../types/mediaOptions';
|
|
14
|
-
import { SmartLinksOptions } from '../types/smartLinksOptions';
|
|
15
|
-
import { ACTION_SUBJECT } from '../analytics/enums';
|
|
16
|
-
export interface RawObjectFeatureFlags {
|
|
17
|
-
['renderer-render-tracking']: string;
|
|
18
|
-
}
|
|
19
|
-
export interface NormalizedObjectFeatureFlags {
|
|
20
|
-
rendererRenderTracking: {
|
|
21
|
-
[ACTION_SUBJECT.RENDERER]: {
|
|
22
|
-
enabled: boolean;
|
|
23
|
-
useShallow: boolean;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export interface RendererProps {
|
|
28
|
-
document: any;
|
|
29
|
-
dataProviders?: ProviderFactory;
|
|
30
|
-
eventHandlers?: EventHandlers;
|
|
31
|
-
extensionHandlers?: ExtensionHandlers;
|
|
32
|
-
enableSsrInlineScripts?: boolean;
|
|
33
|
-
onComplete?: (stat: RenderOutputStat) => void;
|
|
34
|
-
onError?: (error: any) => void;
|
|
35
|
-
portal?: HTMLElement;
|
|
36
|
-
rendererContext?: RendererContext;
|
|
37
|
-
schema?: Schema;
|
|
38
|
-
appearance?: RendererAppearance;
|
|
39
|
-
adfStage?: ADFStage;
|
|
40
|
-
disableHeadingIDs?: boolean;
|
|
41
|
-
disableActions?: boolean;
|
|
42
|
-
allowHeadingAnchorLinks?: HeadingAnchorLinksProps;
|
|
43
|
-
allowPlaceholderText?: boolean;
|
|
44
|
-
maxHeight?: number;
|
|
45
|
-
fadeOutHeight?: number;
|
|
46
|
-
truncated?: boolean;
|
|
47
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
48
|
-
allowColumnSorting?: boolean;
|
|
49
|
-
shouldOpenMediaViewer?: boolean;
|
|
50
|
-
allowAltTextOnImages?: boolean;
|
|
51
|
-
stickyHeaders?: StickyHeaderProps;
|
|
52
|
-
media?: MediaOptions;
|
|
53
|
-
smartLinks?: SmartLinksOptions;
|
|
54
|
-
allowAnnotations?: boolean;
|
|
55
|
-
annotationProvider?: AnnotationProviders | null;
|
|
56
|
-
innerRef?: React.RefObject<HTMLDivElement>;
|
|
57
|
-
useSpecBasedValidator?: boolean;
|
|
58
|
-
allowCopyToClipboard?: boolean;
|
|
59
|
-
allowCustomPanels?: boolean;
|
|
60
|
-
analyticsEventSeverityTracking?: {
|
|
61
|
-
enabled: boolean;
|
|
62
|
-
severityNormalThreshold: number;
|
|
63
|
-
severityDegradedThreshold: number;
|
|
64
|
-
};
|
|
65
|
-
allowUgcScrubber?: boolean;
|
|
66
|
-
allowSelectAllTrap?: boolean;
|
|
67
|
-
unsupportedContentLevelsTracking?: UnsupportedContentLevelsTracking;
|
|
68
|
-
nodeComponents?: NodeComponentsProps;
|
|
69
|
-
/**
|
|
70
|
-
* @default undefined
|
|
71
|
-
* @description
|
|
72
|
-
* Short lived feature flags for experiments and gradual rollouts
|
|
73
|
-
* Flags are expected to follow these rules or they are filtered out
|
|
74
|
-
*
|
|
75
|
-
* 1. cased in kebab-case (match [a-z-])
|
|
76
|
-
* 2. have boolean values or object {} values
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* ```tsx
|
|
80
|
-
* (<Renderer featureFlags={{ 'my-feature': true }} />);
|
|
81
|
-
* getFeatureFlags()?.myFeature === true;
|
|
82
|
-
* ```
|
|
83
|
-
*
|
|
84
|
-
* @example
|
|
85
|
-
* ```tsx
|
|
86
|
-
* (<Renderer featureFlags={{ 'my-feature': 'thing' }} />);
|
|
87
|
-
* getFeatureFlags()?.myFeature === undefined;
|
|
88
|
-
* ```
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```tsx
|
|
92
|
-
* (<Renderer featureFlags={{ 'product.my-feature': false }} />);
|
|
93
|
-
* getFeatureFlags()?.myFeature === undefined;
|
|
94
|
-
* getFeatureFlags()?.productMyFeature === undefined;
|
|
95
|
-
* ```
|
|
96
|
-
*/
|
|
97
|
-
featureFlags?: {
|
|
98
|
-
[featureFlag: string]: boolean;
|
|
99
|
-
} | Partial<RawObjectFeatureFlags>;
|
|
100
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { Schema } from 'prosemirror-model';
|
|
2
|
-
import type { ADNode } from '@atlaskit/editor-common/validator';
|
|
3
|
-
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
|
-
import type { Transformer } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { Node as PMNode } from 'prosemirror-model';
|
|
6
|
-
import type { RendererAppearance } from './ui/Renderer/types';
|
|
7
|
-
export declare type TransformerProvider<T> = (schema: Schema) => Transformer<T>;
|
|
8
|
-
export declare class ADFEncoder<T> {
|
|
9
|
-
encode: (value: T) => any;
|
|
10
|
-
constructor(createTransformerWithSchema: TransformerProvider<T>);
|
|
11
|
-
}
|
|
12
|
-
export declare const getText: (node: PMNode | ADNode) => string;
|
|
13
|
-
export declare const getEventHandler: (eventHandlers?: EventHandlers | undefined, type?: keyof EventHandlers | undefined, eventName?: string) => any;
|
|
14
|
-
export declare const getPlatform: (rendererAppearance: RendererAppearance) => "mobile" | "web";
|
|
15
|
-
/**
|
|
16
|
-
* Traverse through parent elements of element. Return element for which evaluate(element) returns
|
|
17
|
-
* true. If topElement is reached before evaluate returns true, return false. Does not run evaluate
|
|
18
|
-
* on topElement.
|
|
19
|
-
* @param element Starting HTMLElement
|
|
20
|
-
* @param topElement HTMLElement to end search at. evaluate is not called on this element
|
|
21
|
-
* @param evaluate Function which returns true or false based on the given element. eg: Checks if
|
|
22
|
-
* element has desired classname.
|
|
23
|
-
*/
|
|
24
|
-
export declare function findInTree(element: HTMLElement, topElement: HTMLElement, evaluate: (element: HTMLElement) => boolean): boolean;
|