@atlaskit/renderer 112.7.12 → 112.7.13
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 +8 -0
- package/dist/cjs/actions/index.js +6 -0
- package/dist/cjs/actions/matches-utils.js +6 -0
- package/dist/cjs/analytics/unsupported-content.js +7 -0
- package/dist/cjs/react/index.js +61 -10
- package/dist/cjs/react/marks/alignment.js +5 -5
- package/dist/cjs/react/marks/annotation.js +8 -3
- package/dist/cjs/react/marks/breakout.js +2 -0
- package/dist/cjs/react/marks/code.js +2 -0
- package/dist/cjs/react/marks/confluence-inline-comment.js +2 -0
- package/dist/cjs/react/marks/data-consumer.js +2 -0
- package/dist/cjs/react/marks/em.js +2 -0
- package/dist/cjs/react/marks/fragment.js +2 -0
- package/dist/cjs/react/marks/index.js +3 -0
- package/dist/cjs/react/marks/link.js +2 -0
- package/dist/cjs/react/marks/strike.js +5 -8
- package/dist/cjs/react/marks/strong.js +2 -0
- package/dist/cjs/react/marks/subsup.js +5 -0
- package/dist/cjs/react/marks/underline.js +2 -0
- package/dist/cjs/react/marks/unsupportedMark.js +2 -0
- package/dist/cjs/react/marks/unsupportedNodeAttribute.js +2 -0
- package/dist/cjs/react/nodes/TableStickyScrollbar.js +17 -1
- package/dist/cjs/react/nodes/blockCard.js +6 -0
- package/dist/cjs/react/nodes/bodiedExtension.js +8 -2
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +7 -3
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +5 -1
- package/dist/cjs/react/nodes/date.js +13 -11
- package/dist/cjs/react/nodes/decisionList.js +2 -0
- package/dist/cjs/react/nodes/doc.js +5 -0
- package/dist/cjs/react/nodes/embedCard.js +42 -36
- package/dist/cjs/react/nodes/emoji.js +13 -9
- package/dist/cjs/react/nodes/extension.js +8 -2
- package/dist/cjs/react/nodes/fallback.js +6 -1
- package/dist/cjs/react/nodes/heading-anchor.js +9 -6
- package/dist/cjs/react/nodes/heading.js +16 -11
- package/dist/cjs/react/nodes/index.js +12 -1
- package/dist/cjs/react/nodes/inline.js +2 -0
- package/dist/cjs/react/nodes/inlineCard.js +8 -0
- package/dist/cjs/react/nodes/inlineExtension.js +20 -15
- package/dist/cjs/react/nodes/media/index.js +17 -1
- package/dist/cjs/react/nodes/mediaGroup.js +21 -7
- package/dist/cjs/react/nodes/mediaInline.js +2 -0
- package/dist/cjs/react/nodes/mediaSingle/index.js +21 -0
- package/dist/cjs/react/nodes/mention.js +13 -8
- package/dist/cjs/react/nodes/multiBodiedExtension.js +10 -2
- package/dist/cjs/react/nodes/orderedList.js +2 -0
- package/dist/cjs/react/nodes/panel.js +3 -1
- package/dist/cjs/react/nodes/paragraph.js +2 -0
- package/dist/cjs/react/nodes/status.js +16 -11
- package/dist/cjs/react/nodes/table/colgroup.js +6 -2
- package/dist/cjs/react/nodes/table/sticky.js +13 -0
- package/dist/cjs/react/nodes/table.js +31 -2
- package/dist/cjs/react/nodes/tableCell.js +18 -1
- package/dist/cjs/react/nodes/tableRow.js +2 -0
- package/dist/cjs/react/nodes/task-item-with-providers.js +3 -0
- package/dist/cjs/react/nodes/taskItem.js +4 -0
- package/dist/cjs/react/nodes/taskList.js +2 -0
- package/dist/cjs/react/utils/render-text-segments.js +2 -0
- package/dist/cjs/react/utils/segment-text.js +4 -1
- package/dist/cjs/react/utils/use-select-all-trap.js +11 -0
- package/dist/cjs/render-document.js +11 -2
- package/dist/cjs/steps/index.js +6 -1
- package/dist/cjs/text/index.js +3 -0
- package/dist/cjs/ui/Expand.js +7 -3
- package/dist/cjs/ui/ExtensionRenderer.js +3 -0
- package/dist/cjs/ui/MediaCard.js +34 -19
- package/dist/cjs/ui/Renderer/ErrorBoundary.js +4 -0
- package/dist/cjs/ui/Renderer/breakout-ssr.js +28 -2
- package/dist/cjs/ui/Renderer/count-nodes.js +2 -0
- package/dist/cjs/ui/Renderer/index.js +68 -7
- package/dist/cjs/ui/Renderer/style.js +12 -7
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +3 -0
- package/dist/cjs/ui/SmartCardStorage.js +6 -1
- package/dist/cjs/ui/annotations/context.js +3 -0
- package/dist/cjs/ui/annotations/draft/component.js +24 -12
- package/dist/cjs/ui/annotations/element/mark.js +5 -0
- package/dist/cjs/ui/annotations/element/useInlineAnnotationProps.js +7 -1
- package/dist/cjs/ui/annotations/hooks/user-selection.js +9 -1
- package/dist/cjs/ui/annotations/hover/mounter.js +4 -1
- package/dist/cjs/ui/annotations/selection/mounter.js +4 -1
- package/dist/cjs/ui/annotations/wrapper.js +8 -2
- package/dist/cjs/utils.js +9 -1
- package/dist/es2019/actions/index.js +6 -0
- package/dist/es2019/actions/matches-utils.js +6 -0
- package/dist/es2019/analytics/unsupported-content.js +8 -0
- package/dist/es2019/react/index.js +67 -10
- package/dist/es2019/react/marks/alignment.js +5 -5
- package/dist/es2019/react/marks/annotation.js +8 -3
- package/dist/es2019/react/marks/breakout.js +2 -0
- package/dist/es2019/react/marks/code.js +2 -0
- package/dist/es2019/react/marks/confluence-inline-comment.js +2 -0
- package/dist/es2019/react/marks/data-consumer.js +2 -0
- package/dist/es2019/react/marks/em.js +2 -0
- package/dist/es2019/react/marks/fragment.js +2 -0
- package/dist/es2019/react/marks/index.js +3 -0
- package/dist/es2019/react/marks/link.js +2 -0
- package/dist/es2019/react/marks/strike.js +5 -8
- package/dist/es2019/react/marks/strong.js +2 -0
- package/dist/es2019/react/marks/subsup.js +5 -0
- package/dist/es2019/react/marks/underline.js +2 -0
- package/dist/es2019/react/marks/unsupportedMark.js +2 -0
- package/dist/es2019/react/marks/unsupportedNodeAttribute.js +2 -0
- package/dist/es2019/react/nodes/TableStickyScrollbar.js +16 -1
- package/dist/es2019/react/nodes/blockCard.js +6 -0
- package/dist/es2019/react/nodes/bodiedExtension.js +8 -2
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +4 -1
- package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +4 -1
- package/dist/es2019/react/nodes/date.js +13 -11
- package/dist/es2019/react/nodes/decisionList.js +2 -0
- package/dist/es2019/react/nodes/doc.js +6 -0
- package/dist/es2019/react/nodes/embedCard.js +42 -36
- package/dist/es2019/react/nodes/emoji.js +13 -9
- package/dist/es2019/react/nodes/extension.js +8 -2
- package/dist/es2019/react/nodes/fallback.js +6 -1
- package/dist/es2019/react/nodes/heading-anchor.js +10 -6
- package/dist/es2019/react/nodes/heading.js +16 -11
- package/dist/es2019/react/nodes/index.js +13 -1
- package/dist/es2019/react/nodes/inline.js +3 -0
- package/dist/es2019/react/nodes/inlineCard.js +8 -0
- package/dist/es2019/react/nodes/inlineExtension.js +21 -16
- package/dist/es2019/react/nodes/media/index.js +17 -1
- package/dist/es2019/react/nodes/mediaGroup.js +14 -1
- package/dist/es2019/react/nodes/mediaInline.js +2 -0
- package/dist/es2019/react/nodes/mediaSingle/index.js +21 -0
- package/dist/es2019/react/nodes/mention.js +13 -8
- package/dist/es2019/react/nodes/multiBodiedExtension.js +10 -2
- package/dist/es2019/react/nodes/orderedList.js +2 -0
- package/dist/es2019/react/nodes/panel.js +3 -1
- package/dist/es2019/react/nodes/paragraph.js +2 -0
- package/dist/es2019/react/nodes/status.js +16 -11
- package/dist/es2019/react/nodes/table/colgroup.js +6 -2
- package/dist/es2019/react/nodes/table/sticky.js +13 -0
- package/dist/es2019/react/nodes/table.js +32 -3
- package/dist/es2019/react/nodes/tableCell.js +18 -1
- package/dist/es2019/react/nodes/tableRow.js +2 -0
- package/dist/es2019/react/nodes/task-item-with-providers.js +3 -0
- package/dist/es2019/react/nodes/taskItem.js +4 -0
- package/dist/es2019/react/nodes/taskList.js +2 -0
- package/dist/es2019/react/utils/render-text-segments.js +2 -0
- package/dist/es2019/react/utils/segment-text.js +4 -1
- package/dist/es2019/react/utils/use-select-all-trap.js +11 -0
- package/dist/es2019/render-document.js +11 -2
- package/dist/es2019/steps/index.js +6 -1
- package/dist/es2019/text/index.js +3 -0
- package/dist/es2019/ui/Expand.js +7 -3
- package/dist/es2019/ui/ExtensionRenderer.js +3 -0
- package/dist/es2019/ui/MediaCard.js +34 -19
- package/dist/es2019/ui/Renderer/ErrorBoundary.js +4 -0
- package/dist/es2019/ui/Renderer/breakout-ssr.js +28 -2
- package/dist/es2019/ui/Renderer/count-nodes.js +3 -0
- package/dist/es2019/ui/Renderer/index.js +68 -7
- package/dist/es2019/ui/Renderer/style.js +47 -37
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +3 -0
- package/dist/es2019/ui/SmartCardStorage.js +6 -1
- package/dist/es2019/ui/annotations/context.js +3 -0
- package/dist/es2019/ui/annotations/draft/component.js +24 -12
- package/dist/es2019/ui/annotations/element/mark.js +5 -0
- package/dist/es2019/ui/annotations/element/useInlineAnnotationProps.js +7 -1
- package/dist/es2019/ui/annotations/hooks/user-selection.js +9 -1
- package/dist/es2019/ui/annotations/hover/mounter.js +4 -1
- package/dist/es2019/ui/annotations/selection/mounter.js +4 -1
- package/dist/es2019/ui/annotations/wrapper.js +8 -2
- package/dist/es2019/utils.js +12 -1
- package/dist/esm/actions/index.js +6 -0
- package/dist/esm/actions/matches-utils.js +6 -0
- package/dist/esm/analytics/unsupported-content.js +8 -0
- package/dist/esm/react/index.js +61 -10
- package/dist/esm/react/marks/alignment.js +5 -5
- package/dist/esm/react/marks/annotation.js +8 -3
- package/dist/esm/react/marks/breakout.js +2 -0
- package/dist/esm/react/marks/code.js +2 -0
- package/dist/esm/react/marks/confluence-inline-comment.js +2 -0
- package/dist/esm/react/marks/data-consumer.js +2 -0
- package/dist/esm/react/marks/em.js +2 -0
- package/dist/esm/react/marks/fragment.js +2 -0
- package/dist/esm/react/marks/index.js +3 -0
- package/dist/esm/react/marks/link.js +2 -0
- package/dist/esm/react/marks/strike.js +5 -8
- package/dist/esm/react/marks/strong.js +2 -0
- package/dist/esm/react/marks/subsup.js +5 -0
- package/dist/esm/react/marks/underline.js +2 -0
- package/dist/esm/react/marks/unsupportedMark.js +2 -0
- package/dist/esm/react/marks/unsupportedNodeAttribute.js +2 -0
- package/dist/esm/react/nodes/TableStickyScrollbar.js +17 -1
- package/dist/esm/react/nodes/blockCard.js +6 -0
- package/dist/esm/react/nodes/bodiedExtension.js +8 -2
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +7 -3
- package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +5 -1
- package/dist/esm/react/nodes/date.js +13 -11
- package/dist/esm/react/nodes/decisionList.js +2 -0
- package/dist/esm/react/nodes/doc.js +6 -0
- package/dist/esm/react/nodes/embedCard.js +42 -36
- package/dist/esm/react/nodes/emoji.js +13 -9
- package/dist/esm/react/nodes/extension.js +8 -2
- package/dist/esm/react/nodes/fallback.js +6 -1
- package/dist/esm/react/nodes/heading-anchor.js +9 -6
- package/dist/esm/react/nodes/heading.js +16 -11
- package/dist/esm/react/nodes/index.js +13 -1
- package/dist/esm/react/nodes/inline.js +3 -0
- package/dist/esm/react/nodes/inlineCard.js +8 -0
- package/dist/esm/react/nodes/inlineExtension.js +20 -15
- package/dist/esm/react/nodes/media/index.js +17 -1
- package/dist/esm/react/nodes/mediaGroup.js +21 -7
- package/dist/esm/react/nodes/mediaInline.js +2 -0
- package/dist/esm/react/nodes/mediaSingle/index.js +21 -0
- package/dist/esm/react/nodes/mention.js +13 -8
- package/dist/esm/react/nodes/multiBodiedExtension.js +10 -2
- package/dist/esm/react/nodes/orderedList.js +2 -0
- package/dist/esm/react/nodes/panel.js +3 -1
- package/dist/esm/react/nodes/paragraph.js +2 -0
- package/dist/esm/react/nodes/status.js +16 -11
- package/dist/esm/react/nodes/table/colgroup.js +6 -2
- package/dist/esm/react/nodes/table/sticky.js +13 -0
- package/dist/esm/react/nodes/table.js +31 -2
- package/dist/esm/react/nodes/tableCell.js +18 -1
- package/dist/esm/react/nodes/tableRow.js +2 -0
- package/dist/esm/react/nodes/task-item-with-providers.js +3 -0
- package/dist/esm/react/nodes/taskItem.js +4 -0
- package/dist/esm/react/nodes/taskList.js +2 -0
- package/dist/esm/react/utils/render-text-segments.js +2 -0
- package/dist/esm/react/utils/segment-text.js +4 -1
- package/dist/esm/react/utils/use-select-all-trap.js +11 -0
- package/dist/esm/render-document.js +11 -2
- package/dist/esm/steps/index.js +6 -1
- package/dist/esm/text/index.js +3 -0
- package/dist/esm/ui/Expand.js +7 -3
- package/dist/esm/ui/ExtensionRenderer.js +3 -0
- package/dist/esm/ui/MediaCard.js +34 -19
- package/dist/esm/ui/Renderer/ErrorBoundary.js +4 -0
- package/dist/esm/ui/Renderer/breakout-ssr.js +28 -2
- package/dist/esm/ui/Renderer/count-nodes.js +3 -0
- package/dist/esm/ui/Renderer/index.js +68 -7
- package/dist/esm/ui/Renderer/style.js +12 -7
- package/dist/esm/ui/Renderer/truncated-wrapper.js +3 -0
- package/dist/esm/ui/SmartCardStorage.js +6 -1
- package/dist/esm/ui/annotations/context.js +3 -0
- package/dist/esm/ui/annotations/draft/component.js +24 -12
- package/dist/esm/ui/annotations/element/mark.js +5 -0
- package/dist/esm/ui/annotations/element/useInlineAnnotationProps.js +7 -1
- package/dist/esm/ui/annotations/hooks/user-selection.js +9 -1
- package/dist/esm/ui/annotations/hover/mounter.js +4 -1
- package/dist/esm/ui/annotations/selection/mounter.js +4 -1
- package/dist/esm/ui/annotations/wrapper.js +8 -2
- package/dist/esm/utils.js +10 -1
- package/dist/types/analytics/events.d.ts +1 -2
- package/dist/types/react/marks/confluence-inline-comment.d.ts +1 -1
- package/dist/types/react/nodes/decisionList.d.ts +1 -1
- package/dist/types/react/nodes/index.d.ts +1 -1
- package/dist/types/react/nodes/taskItem.d.ts +1 -1
- package/dist/types/react/nodes/taskList.d.ts +1 -1
- package/dist/types/react/types.d.ts +2 -2
- package/dist/types/utils.d.ts +1 -2
- package/dist/types-ts4.5/analytics/events.d.ts +1 -2
- package/dist/types-ts4.5/react/marks/confluence-inline-comment.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/decisionList.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/index.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/taskItem.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/taskList.d.ts +1 -1
- package/dist/types-ts4.5/react/types.d.ts +2 -2
- package/dist/types-ts4.5/utils.d.ts +1 -2
- package/docs/0-intro.tsx +14 -1
- package/package.json +1 -1
- package/tsconfig.json +0 -1
|
@@ -46,7 +46,10 @@ export var useUserSelectionRange = function useUserSelectionRange(props) {
|
|
|
46
46
|
// platform/packages/editor/renderer/src/steps/index.ts Line 180
|
|
47
47
|
|
|
48
48
|
// This workaround ensures the endContainer is set to a text node when endContainer is non-text and the parent container is the root element
|
|
49
|
-
if (isTripleClick &&
|
|
49
|
+
if (isTripleClick &&
|
|
50
|
+
// Ignored via go/ees005
|
|
51
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
52
|
+
isRoot(commonAncestorContainer) && (parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName) === 'P' // ignore if the parent node is strong, em, etc.
|
|
50
53
|
) {
|
|
51
54
|
var _parentNode$lastChild, _parentNode$lastChild2;
|
|
52
55
|
var lastChild = parentNode !== null && parentNode !== void 0 && parentNode.lastChild && (parentNode === null || parentNode === void 0 || (_parentNode$lastChild = parentNode.lastChild) === null || _parentNode$lastChild === void 0 ? void 0 : _parentNode$lastChild.nodeType) === Node.TEXT_NODE ? parentNode === null || parentNode === void 0 ? void 0 : parentNode.lastChild : parentNode === null || parentNode === void 0 || (_parentNode$lastChild2 = parentNode.lastChild) === null || _parentNode$lastChild2 === void 0 ? void 0 : _parentNode$lastChild2.childNodes[0];
|
|
@@ -57,8 +60,13 @@ export var useUserSelectionRange = function useUserSelectionRange(props) {
|
|
|
57
60
|
}
|
|
58
61
|
}, 250);
|
|
59
62
|
};
|
|
63
|
+
|
|
64
|
+
// Ignored via go/ees005
|
|
65
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
60
66
|
document.addEventListener('selectionchange', onSelectionChange);
|
|
61
67
|
return function () {
|
|
68
|
+
// Ignored via go/ees005
|
|
69
|
+
// eslint-disable-next-line @repo/internal/dom-events/no-unsafe-event-listeners
|
|
62
70
|
document.removeEventListener('selectionchange', onSelectionChange);
|
|
63
71
|
clearRange();
|
|
64
72
|
};
|
|
@@ -122,7 +122,10 @@ export var Mounter = /*#__PURE__*/React.memo(function (props) {
|
|
|
122
122
|
}, [onCloseProps, removeDraftModeCallback, createAnalyticsEvent]);
|
|
123
123
|
return /*#__PURE__*/React.createElement(Component, {
|
|
124
124
|
range: range,
|
|
125
|
-
isWithinRange: isWithinRange
|
|
125
|
+
isWithinRange: isWithinRange
|
|
126
|
+
// Ignored via go/ees005
|
|
127
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
128
|
+
,
|
|
126
129
|
wrapperDOM: wrapperDOM.current,
|
|
127
130
|
isAnnotationAllowed: isAnnotationAllowed,
|
|
128
131
|
onClose: onCloseCallback,
|
|
@@ -163,7 +163,10 @@ export var SelectionInlineCommentMounter = /*#__PURE__*/React.memo(function (pro
|
|
|
163
163
|
}, [onCloseProps, removeDraftModeCallback, createAnalyticsEvent, inlineNodeTypes]);
|
|
164
164
|
return /*#__PURE__*/React.createElement(Component, {
|
|
165
165
|
range: range,
|
|
166
|
-
draftRange: draftRange
|
|
166
|
+
draftRange: draftRange
|
|
167
|
+
// Ignored via go/ees005
|
|
168
|
+
// eslint-disable-next-line @atlaskit/editor/no-as-casting
|
|
169
|
+
,
|
|
167
170
|
wrapperDOM: wrapperDOM.current,
|
|
168
171
|
isAnnotationAllowed: isAnnotationAllowed,
|
|
169
172
|
onClose: onCloseCallback,
|
|
@@ -30,13 +30,19 @@ export var AnnotationsContextWrapper = function AnnotationsContextWrapper(props)
|
|
|
30
30
|
clearAnnotationDraft = _ref.clearAnnotationDraft;
|
|
31
31
|
return /*#__PURE__*/React.createElement(React.Fragment, null, children, !!hoverComponent && /*#__PURE__*/React.createElement(HoverRangeValidator, {
|
|
32
32
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
33
|
-
rendererRef: rendererRef
|
|
33
|
+
rendererRef: rendererRef
|
|
34
|
+
// Ignored via go/ees005
|
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
36
|
+
,
|
|
34
37
|
component: hoverComponent,
|
|
35
38
|
applyAnnotationDraftAt: applyAnnotationDraftAt,
|
|
36
39
|
clearAnnotationDraft: clearAnnotationDraft
|
|
37
40
|
}), !!selectionComponent && /*#__PURE__*/React.createElement(SelectionRangeValidator, {
|
|
38
41
|
createAnalyticsEvent: createAnalyticsEvent,
|
|
39
|
-
rendererRef: rendererRef
|
|
42
|
+
rendererRef: rendererRef
|
|
43
|
+
// Ignored via go/ees005
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
45
|
+
,
|
|
40
46
|
selectionComponent: selectionComponent,
|
|
41
47
|
applyAnnotationDraftAt: applyAnnotationDraftAt,
|
|
42
48
|
clearAnnotationDraft: clearAnnotationDraft
|
package/dist/esm/utils.js
CHANGED
|
@@ -5,12 +5,19 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
5
5
|
|
|
6
6
|
import { defaultSchema } from '@atlaskit/adf-schema/schema-default';
|
|
7
7
|
import { JSONTransformer } from '@atlaskit/editor-json-transformer';
|
|
8
|
+
|
|
9
|
+
// Ignored via go/ees005
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
11
|
function createEncoder(parser, encoder) {
|
|
9
12
|
return function (value) {
|
|
10
13
|
return encoder.encode(parser.parse(value));
|
|
11
14
|
};
|
|
12
15
|
}
|
|
13
|
-
export var ADFEncoder = /*#__PURE__*/_createClass(
|
|
16
|
+
export var ADFEncoder = /*#__PURE__*/_createClass(
|
|
17
|
+
// Ignored via go/ees005
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
|
+
|
|
20
|
+
function ADFEncoder(createTransformerWithSchema) {
|
|
14
21
|
_classCallCheck(this, ADFEncoder);
|
|
15
22
|
var transformer = createTransformerWithSchema(defaultSchema);
|
|
16
23
|
this.encode = createEncoder(transformer, new JSONTransformer());
|
|
@@ -20,6 +27,8 @@ export var getText = function getText(node) {
|
|
|
20
27
|
};
|
|
21
28
|
export var getEventHandler = function getEventHandler(eventHandlers, type) {
|
|
22
29
|
var eventName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'onClick';
|
|
30
|
+
// Ignored via go/ees005
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23
32
|
return eventHandlers && type && eventHandlers[type] && eventHandlers[type][eventName];
|
|
24
33
|
};
|
|
25
34
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, OperationalAEP } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { AEP } from './enums';
|
|
3
|
-
import type { SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from '@atlaskit/editor-common/utils';
|
|
4
|
-
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import type { SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY, UnsupportedContentPayload, UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
|
|
5
4
|
import type { SortOrder } from '@atlaskit/editor-common/types';
|
|
6
5
|
export declare enum PLATFORM {
|
|
7
6
|
NATIVE = "mobileNative",
|
|
@@ -3,7 +3,7 @@ import { type MarkProps } from '../types';
|
|
|
3
3
|
interface Props {
|
|
4
4
|
reference: string;
|
|
5
5
|
}
|
|
6
|
-
export default class ConfluenceInlineComment extends Component<MarkProps<Props>,
|
|
6
|
+
export default class ConfluenceInlineComment extends Component<MarkProps<Props>, Object> {
|
|
7
7
|
render(): JSX.Element;
|
|
8
8
|
}
|
|
9
9
|
export {};
|
|
@@ -2,6 +2,6 @@ import { PureComponent } from 'react';
|
|
|
2
2
|
export interface Props {
|
|
3
3
|
children?: JSX.Element | JSX.Element[];
|
|
4
4
|
}
|
|
5
|
-
export default class DecisionList extends PureComponent<Props,
|
|
5
|
+
export default class DecisionList extends PureComponent<Props, Object> {
|
|
6
6
|
render(): JSX.Element | null;
|
|
7
7
|
}
|
|
@@ -29,7 +29,7 @@ declare const CodeBlock: React.ComponentType<import("react-intl-next").WithIntlP
|
|
|
29
29
|
declare const TaskList: React.ComponentType<import("./taskList").Props> & Loadable.LoadableComponent;
|
|
30
30
|
declare const TaskItem: React.ComponentType<import("../types").NodeProps<import("./taskItem").Props>> & Loadable.LoadableComponent;
|
|
31
31
|
declare const DecisionList: React.ComponentType<import("./decisionList").Props> & Loadable.LoadableComponent;
|
|
32
|
-
declare const DecisionItem: React.ComponentType<import("../types").NodeMeta> & Loadable.LoadableComponent;
|
|
32
|
+
declare const DecisionItem: React.ComponentType<Object & import("../types").NodeMeta> & Loadable.LoadableComponent;
|
|
33
33
|
declare const Date: React.ComponentType<import("./date").Props> & Loadable.LoadableComponent;
|
|
34
34
|
declare const Status: React.ComponentType<import("./status").Props> & Loadable.LoadableComponent;
|
|
35
35
|
declare const Emoji: React.ComponentType<import("./emoji").EmojiProps> & Loadable.LoadableComponent;
|
|
@@ -9,7 +9,7 @@ export interface Props {
|
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
}
|
|
12
|
-
export default class TaskItem extends PureComponent<NodeProps<Props>,
|
|
12
|
+
export default class TaskItem extends PureComponent<NodeProps<Props>, Object> {
|
|
13
13
|
private providerFactory;
|
|
14
14
|
constructor(props: NodeProps<Props>);
|
|
15
15
|
componentWillUnmount(): void;
|
|
@@ -57,8 +57,8 @@ export interface AnnotationMarkMeta extends MarkMeta {
|
|
|
57
57
|
useBlockLevel?: boolean;
|
|
58
58
|
isMediaInline?: boolean;
|
|
59
59
|
}
|
|
60
|
-
export type NodeProps<NodeAttrs =
|
|
61
|
-
export type MarkProps<MarkAttrs =
|
|
60
|
+
export type NodeProps<NodeAttrs = Object> = NodeAttrs & PropsWithChildren<NodeMeta>;
|
|
61
|
+
export type MarkProps<MarkAttrs = Object> = MarkAttrs & PropsWithChildren<MarkMeta>;
|
|
62
62
|
export type TextHighlighter = {
|
|
63
63
|
pattern: RegExp;
|
|
64
64
|
component: React.ComponentType<{
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { Schema, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { ADNode } from '@atlaskit/editor-common/validator';
|
|
3
3
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
4
|
import type { Transformer } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
5
|
export type TransformerProvider<T> = (schema: Schema) => Transformer<T>;
|
|
7
6
|
export declare class ADFEncoder<T> {
|
|
8
7
|
encode: (value: T) => any;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, OperationalAEP } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { AEP } from './enums';
|
|
3
|
-
import type { SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from '@atlaskit/editor-common/utils';
|
|
4
|
-
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
|
|
3
|
+
import type { SEVERITY, UNSUPPORTED_CONTENT_LEVEL_SEVERITY, UnsupportedContentPayload, UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
|
|
5
4
|
import type { SortOrder } from '@atlaskit/editor-common/types';
|
|
6
5
|
export declare enum PLATFORM {
|
|
7
6
|
NATIVE = "mobileNative",
|
|
@@ -3,7 +3,7 @@ import { type MarkProps } from '../types';
|
|
|
3
3
|
interface Props {
|
|
4
4
|
reference: string;
|
|
5
5
|
}
|
|
6
|
-
export default class ConfluenceInlineComment extends Component<MarkProps<Props>,
|
|
6
|
+
export default class ConfluenceInlineComment extends Component<MarkProps<Props>, Object> {
|
|
7
7
|
render(): JSX.Element;
|
|
8
8
|
}
|
|
9
9
|
export {};
|
|
@@ -2,6 +2,6 @@ import { PureComponent } from 'react';
|
|
|
2
2
|
export interface Props {
|
|
3
3
|
children?: JSX.Element | JSX.Element[];
|
|
4
4
|
}
|
|
5
|
-
export default class DecisionList extends PureComponent<Props,
|
|
5
|
+
export default class DecisionList extends PureComponent<Props, Object> {
|
|
6
6
|
render(): JSX.Element | null;
|
|
7
7
|
}
|
|
@@ -29,7 +29,7 @@ declare const CodeBlock: React.ComponentType<import("react-intl-next").WithIntlP
|
|
|
29
29
|
declare const TaskList: React.ComponentType<import("./taskList").Props> & Loadable.LoadableComponent;
|
|
30
30
|
declare const TaskItem: React.ComponentType<import("../types").NodeProps<import("./taskItem").Props>> & Loadable.LoadableComponent;
|
|
31
31
|
declare const DecisionList: React.ComponentType<import("./decisionList").Props> & Loadable.LoadableComponent;
|
|
32
|
-
declare const DecisionItem: React.ComponentType<import("../types").NodeMeta> & Loadable.LoadableComponent;
|
|
32
|
+
declare const DecisionItem: React.ComponentType<Object & import("../types").NodeMeta> & Loadable.LoadableComponent;
|
|
33
33
|
declare const Date: React.ComponentType<import("./date").Props> & Loadable.LoadableComponent;
|
|
34
34
|
declare const Status: React.ComponentType<import("./status").Props> & Loadable.LoadableComponent;
|
|
35
35
|
declare const Emoji: React.ComponentType<import("./emoji").EmojiProps> & Loadable.LoadableComponent;
|
|
@@ -9,7 +9,7 @@ export interface Props {
|
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
}
|
|
12
|
-
export default class TaskItem extends PureComponent<NodeProps<Props>,
|
|
12
|
+
export default class TaskItem extends PureComponent<NodeProps<Props>, Object> {
|
|
13
13
|
private providerFactory;
|
|
14
14
|
constructor(props: NodeProps<Props>);
|
|
15
15
|
componentWillUnmount(): void;
|
|
@@ -57,8 +57,8 @@ export interface AnnotationMarkMeta extends MarkMeta {
|
|
|
57
57
|
useBlockLevel?: boolean;
|
|
58
58
|
isMediaInline?: boolean;
|
|
59
59
|
}
|
|
60
|
-
export type NodeProps<NodeAttrs =
|
|
61
|
-
export type MarkProps<MarkAttrs =
|
|
60
|
+
export type NodeProps<NodeAttrs = Object> = NodeAttrs & PropsWithChildren<NodeMeta>;
|
|
61
|
+
export type MarkProps<MarkAttrs = Object> = MarkAttrs & PropsWithChildren<MarkMeta>;
|
|
62
62
|
export type TextHighlighter = {
|
|
63
63
|
pattern: RegExp;
|
|
64
64
|
component: React.ComponentType<{
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
1
|
+
import type { Schema, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { ADNode } from '@atlaskit/editor-common/validator';
|
|
3
3
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
4
|
import type { Transformer } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
6
5
|
export type TransformerProvider<T> = (schema: Schema) => Transformer<T>;
|
|
7
6
|
export declare class ADFEncoder<T> {
|
|
8
7
|
encode: (value: T) => any;
|
package/docs/0-intro.tsx
CHANGED
|
@@ -19,8 +19,12 @@ ReactDOM.render(<ReactRenderer document={DOCUMENT} />, container);
|
|
|
19
19
|
|
|
20
20
|
${(
|
|
21
21
|
<Example
|
|
22
|
+
// Ignored via go/ees005
|
|
23
|
+
// eslint-disable-next-line import/no-commonjs
|
|
22
24
|
Component={require('../examples/1-with-providers').default}
|
|
23
25
|
title="With Providers"
|
|
26
|
+
// Ignored via go/ees005
|
|
27
|
+
// eslint-disable-next-line import/no-commonjs
|
|
24
28
|
source={require('!!raw-loader!../examples/1-with-providers')}
|
|
25
29
|
/>
|
|
26
30
|
)}
|
|
@@ -125,8 +129,12 @@ ReactDOM.render(<ReactRenderer document={DOCUMENT} truncated={true} maxHeight={7
|
|
|
125
129
|
|
|
126
130
|
${(
|
|
127
131
|
<Example
|
|
132
|
+
// Ignored via go/ees005
|
|
133
|
+
// eslint-disable-next-line import/no-commonjs
|
|
128
134
|
Component={require('../examples/15-truncated').default}
|
|
129
135
|
title="Truncated"
|
|
136
|
+
// Ignored via go/ees005
|
|
137
|
+
// eslint-disable-next-line import/no-commonjs
|
|
130
138
|
source={require('!!raw-loader!../examples/15-truncated')}
|
|
131
139
|
/>
|
|
132
140
|
)}
|
|
@@ -140,6 +148,11 @@ Full light and dark mode support for the Editor is a work in progress. Currently
|
|
|
140
148
|
- Custom table backgrounds
|
|
141
149
|
|
|
142
150
|
${(
|
|
143
|
-
<Props
|
|
151
|
+
<Props
|
|
152
|
+
heading="Props"
|
|
153
|
+
// Ignored via go/ees005
|
|
154
|
+
// eslint-disable-next-line import/no-commonjs
|
|
155
|
+
props={require('!!extract-react-types-loader!../src/ui/Renderer/index')}
|
|
156
|
+
/>
|
|
144
157
|
)}
|
|
145
158
|
`;
|
package/package.json
CHANGED