@atlaskit/renderer 107.3.4 → 108.0.1
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 +17 -0
- package/actions/package.json +2 -2
- package/consts/package.json +2 -2
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +4 -4
- package/dist/types/analytics/enums.d.ts +1 -1
- package/dist/types/analytics/events.d.ts +29 -29
- package/dist/types/analytics/unsupported-content.d.ts +2 -2
- package/dist/types/i18n/cs.d.ts +6 -6
- package/dist/types/i18n/da.d.ts +6 -6
- package/dist/types/i18n/de.d.ts +6 -6
- package/dist/types/i18n/en.d.ts +6 -6
- package/dist/types/i18n/en_GB.d.ts +6 -6
- package/dist/types/i18n/en_ZZ.d.ts +6 -6
- package/dist/types/i18n/es.d.ts +6 -6
- package/dist/types/i18n/et.d.ts +1 -1
- package/dist/types/i18n/fi.d.ts +6 -6
- package/dist/types/i18n/fr.d.ts +6 -6
- package/dist/types/i18n/hu.d.ts +6 -6
- package/dist/types/i18n/it.d.ts +6 -6
- package/dist/types/i18n/ja.d.ts +6 -6
- package/dist/types/i18n/ko.d.ts +6 -6
- package/dist/types/i18n/nb.d.ts +6 -6
- package/dist/types/i18n/nl.d.ts +6 -6
- package/dist/types/i18n/pl.d.ts +6 -6
- package/dist/types/i18n/pt_BR.d.ts +6 -6
- package/dist/types/i18n/pt_PT.d.ts +1 -1
- package/dist/types/i18n/ru.d.ts +6 -6
- package/dist/types/i18n/sk.d.ts +1 -1
- package/dist/types/i18n/sv.d.ts +6 -6
- package/dist/types/i18n/th.d.ts +6 -6
- package/dist/types/i18n/tr.d.ts +6 -6
- package/dist/types/i18n/uk.d.ts +6 -6
- package/dist/types/i18n/vi.d.ts +6 -6
- package/dist/types/i18n/zh.d.ts +6 -6
- package/dist/types/i18n/zh_TW.d.ts +6 -6
- package/dist/types/react/hooks/use-observed-width.d.ts +2 -2
- package/dist/types/react/nodes/codeBlock/components/codeBlockCopyButton.d.ts +1 -1
- package/dist/types/react/nodes/codeBlock/components/codeBlockWrapButton.d.ts +1 -1
- package/dist/types/react/nodes/extension.d.ts +3 -3
- package/dist/types/react/nodes/fallback.d.ts +1 -1
- package/dist/types/react/nodes/heading-anchor.d.ts +2 -2
- package/dist/types/react/nodes/heading.d.ts +1 -1
- package/dist/types/react/nodes/index.d.ts +1 -1
- package/dist/types/react/nodes/media.d.ts +1 -1
- package/dist/types/react/nodes/mediaInline.d.ts +2 -2
- package/dist/types/react/nodes/table/sticky.d.ts +2 -2
- package/dist/types/react/nodes/table/table.d.ts +1 -1
- package/dist/types/react/nodes/table/types.d.ts +1 -1
- package/dist/types/react/nodes/table.d.ts +2 -2
- package/dist/types/react/nodes/tableCell.d.ts +2 -2
- package/dist/types/react/nodes/tableRow.d.ts +2 -2
- package/dist/types/react/nodes/text-wrapper.d.ts +1 -1
- package/dist/types/react/types.d.ts +2 -2
- package/dist/types/react/utils/getCardClickHandler.d.ts +1 -1
- package/dist/types/react/utils/performance/RenderTracking.d.ts +4 -4
- package/dist/types/render-document.d.ts +2 -2
- package/dist/types/renderer-context.d.ts +1 -1
- package/dist/types/text/nodes/index.d.ts +1 -1
- package/dist/types/types/mediaOptions.d.ts +1 -1
- package/dist/types/ui/Expand.d.ts +1 -1
- package/dist/types/ui/ExtensionRenderer.d.ts +2 -2
- package/dist/types/ui/MediaCard.d.ts +2 -2
- package/dist/types/ui/Renderer/style.d.ts +1 -1
- package/dist/types/ui/Renderer/types.d.ts +6 -6
- package/dist/types/ui/RendererActionsContext/index.d.ts +1 -1
- package/dist/types/ui/TaskItemsFormatContext/TaskItemsFormatContext.d.ts +3 -3
- package/dist/types/ui/active-header-id-provider.d.ts +1 -1
- package/dist/types/ui/annotations/context.d.ts +4 -4
- package/dist/types/ui/annotations/draft/component.d.ts +2 -2
- package/dist/types/ui/annotations/draft/text.d.ts +1 -1
- package/dist/types/ui/annotations/element/index.d.ts +1 -1
- package/dist/types/ui/annotations/element/mark.d.ts +1 -1
- package/dist/types/ui/annotations/hooks/use-events.d.ts +3 -3
- package/dist/types/ui/annotations/hooks/use-inline-comments-filter.d.ts +1 -1
- package/dist/types/ui/annotations/hooks/use-load-annotations.d.ts +1 -1
- package/dist/types/ui/annotations/hooks/user-selection.d.ts +1 -1
- package/dist/types/ui/annotations/selection/mounter.d.ts +1 -1
- package/dist/types/ui/annotations/selection/range-validator.d.ts +1 -1
- package/dist/types/ui/annotations/selection/wrapper.d.ts +1 -1
- package/dist/types/ui/annotations/types.d.ts +3 -3
- package/dist/types/ui/annotations/view/index.d.ts +1 -1
- package/dist/types/utils.d.ts +2 -2
- package/messages/package.json +2 -2
- package/package.json +51 -43
- package/render-document/package.json +2 -2
- package/renderer-context/package.json +2 -2
- package/serializer/package.json +2 -2
- package/text-serializer/package.json +2 -2
- package/use-feature-flags/package.json +2 -2
- package/utils/package.json +2 -2
|
@@ -4,14 +4,14 @@ import { InsertDraftPosition, Position } from '../types';
|
|
|
4
4
|
export declare const AnnotationDraft: React.FC<{
|
|
5
5
|
draftPosition: Position;
|
|
6
6
|
}>;
|
|
7
|
-
|
|
7
|
+
type ApplyAnnotationsProps = {
|
|
8
8
|
texts: string[];
|
|
9
9
|
shouldApplyAnnotationAt: InsertDraftPosition.INSIDE | InsertDraftPosition.START | InsertDraftPosition.END;
|
|
10
10
|
draftPosition: Position;
|
|
11
11
|
};
|
|
12
12
|
export declare const getAnnotationIndex: (annotationPosition: InsertDraftPosition, fragmentCount: number) => number;
|
|
13
13
|
export declare const applyAnnotationOnText: ({ texts, shouldApplyAnnotationAt, draftPosition, }: ApplyAnnotationsProps) => JSX.Element[];
|
|
14
|
-
|
|
14
|
+
type Props = {
|
|
15
15
|
startPos: number;
|
|
16
16
|
endPos: number;
|
|
17
17
|
children: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AnnotationId, AnnotationDataAttributes, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
3
|
-
|
|
3
|
+
type MarkElementProps = {
|
|
4
4
|
id: AnnotationId;
|
|
5
5
|
annotationParentIds: AnnotationId[];
|
|
6
6
|
dataAttributes: AnnotationDataAttributes;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { OnAnnotationClickPayload } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { AnnotationMarkStates, AnnotationId, AnnotationDataAttributes } from '@atlaskit/adf-schema';
|
|
5
|
-
|
|
5
|
+
type MarkComponentProps = {
|
|
6
6
|
id: AnnotationId;
|
|
7
7
|
annotationParentIds: AnnotationId[];
|
|
8
8
|
dataAttributes: AnnotationDataAttributes;
|
|
@@ -2,17 +2,17 @@ import { AnnotationUpdateEmitter } from '@atlaskit/editor-common/types';
|
|
|
2
2
|
import type { InlineCommentViewComponentProps } from '@atlaskit/editor-common/types';
|
|
3
3
|
import { AnnotationMarkStates, AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
4
4
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
|
-
|
|
5
|
+
type ListenEventProps = {
|
|
6
6
|
id: AnnotationId;
|
|
7
7
|
updateSubscriber: AnnotationUpdateEmitter | null;
|
|
8
8
|
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
type UseAnnotationUpdateSatteByEventProps = {
|
|
11
11
|
type: AnnotationTypes;
|
|
12
12
|
updateSubscriber: AnnotationUpdateEmitter | null;
|
|
13
13
|
};
|
|
14
14
|
export declare const useAnnotationStateByTypeEvent: ({ type, updateSubscriber, }: UseAnnotationUpdateSatteByEventProps) => Record<string, AnnotationMarkStates | null>;
|
|
15
15
|
export declare const useHasFocusEvent: ({ id, updateSubscriber, }: ListenEventProps) => boolean;
|
|
16
|
-
|
|
16
|
+
type AnnotationsWithClickTarget = Pick<InlineCommentViewComponentProps, 'annotations' | 'clickElementTarget'> | null;
|
|
17
17
|
export declare const useAnnotationClickEvent: (props: Pick<ListenEventProps, 'updateSubscriber' | 'createAnalyticsEvent'>) => AnnotationsWithClickTarget;
|
|
18
18
|
export {};
|
|
@@ -3,7 +3,7 @@ import type { AnnotationByMatches, InlineCommentSelectionComponentProps } from '
|
|
|
3
3
|
import { ApplyAnnotation } from '../../../actions/index';
|
|
4
4
|
import { Position } from '../types';
|
|
5
5
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
|
-
|
|
6
|
+
type Props = {
|
|
7
7
|
range: Range;
|
|
8
8
|
component: React.ComponentType<InlineCommentSelectionComponentProps>;
|
|
9
9
|
wrapperDOM: React.RefObject<HTMLDivElement>;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Position } from '../types';
|
|
3
3
|
import type { InlineCommentSelectionComponentProps } from '@atlaskit/editor-common/types';
|
|
4
4
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
|
-
|
|
5
|
+
type Props = {
|
|
6
6
|
selectionComponent: React.ComponentType<InlineCommentSelectionComponentProps>;
|
|
7
7
|
rendererRef: React.RefObject<HTMLDivElement>;
|
|
8
8
|
applyAnnotationDraftAt: (position: Position) => void;
|
|
@@ -7,16 +7,16 @@ export declare enum InsertDraftPosition {
|
|
|
7
7
|
END = "END",
|
|
8
8
|
INSIDE = "INSIDE"
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type Position = {
|
|
11
11
|
from: number;
|
|
12
12
|
to: number;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type AnnotationsWrapperProps = {
|
|
15
15
|
adfDocument: JSONDocNode;
|
|
16
16
|
annotationProvider: AnnotationProviders | null | undefined;
|
|
17
17
|
rendererRef: React.RefObject<HTMLDivElement>;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type TextPosition = {
|
|
20
20
|
start: number;
|
|
21
21
|
end: number;
|
|
22
22
|
};
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
|
4
4
|
import type { Transformer } from '@atlaskit/editor-common/types';
|
|
5
5
|
import type { Node as PMNode } from 'prosemirror-model';
|
|
6
6
|
import type { RendererAppearance } from './ui/Renderer/types';
|
|
7
|
-
export
|
|
7
|
+
export type TransformerProvider<T> = (schema: Schema) => Transformer<T>;
|
|
8
8
|
export declare class ADFEncoder<T> {
|
|
9
9
|
encode: (value: T) => any;
|
|
10
10
|
constructor(createTransformerWithSchema: TransformerProvider<T>);
|
|
11
11
|
}
|
|
12
12
|
export declare const getText: (node: PMNode | ADNode) => string;
|
|
13
|
-
export declare const getEventHandler: (eventHandlers?: EventHandlers
|
|
13
|
+
export declare const getEventHandler: (eventHandlers?: EventHandlers, type?: keyof EventHandlers, eventName?: string) => any;
|
|
14
14
|
export declare const getPlatform: (rendererAppearance: RendererAppearance) => "mobile" | "web";
|
|
15
15
|
/**
|
|
16
16
|
* Traverse through parent elements of element. Return element for which evaluate(element) returns
|
package/messages/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "108.0.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.5 <4.9": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.5/*",
|
|
19
|
+
"dist/types-ts4.5/index.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
15
23
|
"sideEffects": false,
|
|
16
24
|
"atlaskit:src": "src/index.ts",
|
|
17
25
|
"atlassian": {
|
|
@@ -24,31 +32,31 @@
|
|
|
24
32
|
}
|
|
25
33
|
},
|
|
26
34
|
"dependencies": {
|
|
27
|
-
"@atlaskit/adf-schema": "^25.
|
|
28
|
-
"@atlaskit/adf-utils": "^18.
|
|
29
|
-
"@atlaskit/analytics-listeners": "^8.
|
|
30
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
31
|
-
"@atlaskit/analytics-next": "^9.
|
|
32
|
-
"@atlaskit/button": "^16.
|
|
33
|
-
"@atlaskit/code": "^14.
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
35
|
-
"@atlaskit/editor-json-transformer": "^8.
|
|
36
|
-
"@atlaskit/editor-palette": "1.
|
|
37
|
-
"@atlaskit/editor-shared-styles": "^2.
|
|
38
|
-
"@atlaskit/emoji": "^67.
|
|
39
|
-
"@atlaskit/icon": "^21.
|
|
40
|
-
"@atlaskit/media-card": "^74.
|
|
41
|
-
"@atlaskit/media-client": "^
|
|
42
|
-
"@atlaskit/media-common": "^4.
|
|
43
|
-
"@atlaskit/media-filmstrip": "^
|
|
44
|
-
"@atlaskit/media-ui": "^22.
|
|
45
|
-
"@atlaskit/media-viewer": "^47.
|
|
46
|
-
"@atlaskit/smart-card": "^
|
|
47
|
-
"@atlaskit/status": "^1.
|
|
48
|
-
"@atlaskit/task-decision": "^17.
|
|
49
|
-
"@atlaskit/theme": "^12.
|
|
50
|
-
"@atlaskit/tokens": "^1.
|
|
51
|
-
"@atlaskit/tooltip": "^17.
|
|
35
|
+
"@atlaskit/adf-schema": "^25.6.0",
|
|
36
|
+
"@atlaskit/adf-utils": "^18.2.0",
|
|
37
|
+
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
38
|
+
"@atlaskit/analytics-namespaced-context": "^6.7.0",
|
|
39
|
+
"@atlaskit/analytics-next": "^9.1.0",
|
|
40
|
+
"@atlaskit/button": "^16.7.0",
|
|
41
|
+
"@atlaskit/code": "^14.6.0",
|
|
42
|
+
"@atlaskit/editor-common": "^74.0.0",
|
|
43
|
+
"@atlaskit/editor-json-transformer": "^8.9.0",
|
|
44
|
+
"@atlaskit/editor-palette": "1.4.1",
|
|
45
|
+
"@atlaskit/editor-shared-styles": "^2.4.0",
|
|
46
|
+
"@atlaskit/emoji": "^67.4.0",
|
|
47
|
+
"@atlaskit/icon": "^21.12.0",
|
|
48
|
+
"@atlaskit/media-card": "^74.8.0",
|
|
49
|
+
"@atlaskit/media-client": "^22.0.0",
|
|
50
|
+
"@atlaskit/media-common": "^4.1.0",
|
|
51
|
+
"@atlaskit/media-filmstrip": "^47.0.0",
|
|
52
|
+
"@atlaskit/media-ui": "^22.4.0",
|
|
53
|
+
"@atlaskit/media-viewer": "^47.6.0",
|
|
54
|
+
"@atlaskit/smart-card": "^26.1.0",
|
|
55
|
+
"@atlaskit/status": "^1.3.0",
|
|
56
|
+
"@atlaskit/task-decision": "^17.6.0",
|
|
57
|
+
"@atlaskit/theme": "^12.5.0",
|
|
58
|
+
"@atlaskit/tokens": "^1.4.0",
|
|
59
|
+
"@atlaskit/tooltip": "^17.8.0",
|
|
52
60
|
"@babel/runtime": "^7.0.0",
|
|
53
61
|
"@emotion/react": "^11.7.1",
|
|
54
62
|
"lodash": "^4.17.21",
|
|
@@ -61,30 +69,30 @@
|
|
|
61
69
|
"uuid": "^3.1.0"
|
|
62
70
|
},
|
|
63
71
|
"peerDependencies": {
|
|
64
|
-
"@atlaskit/link-provider": "^1.
|
|
65
|
-
"@atlaskit/media-core": "^34.
|
|
72
|
+
"@atlaskit/link-provider": "^1.6.1",
|
|
73
|
+
"@atlaskit/media-core": "^34.1.1",
|
|
66
74
|
"react": "^16.8.0",
|
|
67
75
|
"react-dom": "^16.8.0"
|
|
68
76
|
},
|
|
69
77
|
"devDependencies": {
|
|
70
|
-
"@atlaskit/analytics-gas-types": "^5.0
|
|
71
|
-
"@atlaskit/avatar": "^21.
|
|
72
|
-
"@atlaskit/css-reset": "^6.
|
|
78
|
+
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
79
|
+
"@atlaskit/avatar": "^21.3.0",
|
|
80
|
+
"@atlaskit/css-reset": "^6.5.0",
|
|
73
81
|
"@atlaskit/docs": "*",
|
|
74
|
-
"@atlaskit/editor-core": "^
|
|
75
|
-
"@atlaskit/editor-test-helpers": "^18.
|
|
76
|
-
"@atlaskit/link-provider": "^1.
|
|
77
|
-
"@atlaskit/logo": "^13.
|
|
78
|
-
"@atlaskit/media-core": "^34.
|
|
82
|
+
"@atlaskit/editor-core": "^183.0.0",
|
|
83
|
+
"@atlaskit/editor-test-helpers": "^18.3.0",
|
|
84
|
+
"@atlaskit/link-provider": "^1.6.0",
|
|
85
|
+
"@atlaskit/logo": "^13.14.0",
|
|
86
|
+
"@atlaskit/media-core": "^34.1.0",
|
|
79
87
|
"@atlaskit/media-integration-test-helpers": "^2.6.0",
|
|
80
|
-
"@atlaskit/media-test-helpers": "^
|
|
81
|
-
"@atlaskit/mention": "^22.
|
|
88
|
+
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
89
|
+
"@atlaskit/mention": "^22.1.0",
|
|
82
90
|
"@atlaskit/navigation-next": "^9.0.0",
|
|
83
|
-
"@atlaskit/profilecard": "^19.
|
|
84
|
-
"@atlaskit/radio": "^5.
|
|
85
|
-
"@atlaskit/range": "^7.
|
|
91
|
+
"@atlaskit/profilecard": "^19.3.0",
|
|
92
|
+
"@atlaskit/radio": "^5.5.0",
|
|
93
|
+
"@atlaskit/range": "^7.1.0",
|
|
86
94
|
"@atlaskit/ssr": "*",
|
|
87
|
-
"@atlaskit/util-data-test": "^17.
|
|
95
|
+
"@atlaskit/util-data-test": "^17.8.0",
|
|
88
96
|
"@atlaskit/visual-regression": "*",
|
|
89
97
|
"@atlaskit/webdriver-runner": "*",
|
|
90
98
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
@@ -104,7 +112,7 @@
|
|
|
104
112
|
"react-test-renderer": "^16.8.0",
|
|
105
113
|
"rxjs": "^5.5.0",
|
|
106
114
|
"sinon": "^2.2.0",
|
|
107
|
-
"typescript": "4.
|
|
115
|
+
"typescript": "~4.9.5",
|
|
108
116
|
"worker-plugin": "^4.0.2"
|
|
109
117
|
},
|
|
110
118
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1",
|
package/serializer/package.json
CHANGED