@atlaskit/renderer 82.1.0 → 84.1.0
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 +101 -0
- package/dist/cjs/actions/matches-utils.js +1 -1
- package/dist/cjs/analytics/enums.js +2 -1
- package/dist/cjs/analytics/events.js +1 -1
- package/dist/cjs/i18n/index.js +26 -26
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/messages.js +4 -4
- package/dist/cjs/react/index.js +32 -12
- package/dist/cjs/react/marks/annotation.js +1 -1
- package/dist/cjs/react/marks/breakout.js +1 -1
- package/dist/cjs/react/marks/code.js +11 -4
- package/dist/cjs/react/marks/fragment.js +21 -0
- package/dist/cjs/react/marks/index.js +28 -19
- package/dist/cjs/react/marks/textColor.js +15 -4
- package/dist/cjs/react/nodes/codeBlock.js +6 -4
- package/dist/cjs/react/nodes/codeBlockCopyButton.js +2 -2
- package/dist/cjs/react/nodes/copy-text-provider.js +1 -1
- package/dist/cjs/react/nodes/date.js +2 -2
- package/dist/cjs/react/nodes/doc.js +1 -1
- package/dist/cjs/react/nodes/extension.js +1 -1
- package/dist/cjs/react/nodes/heading-anchor.js +2 -2
- package/dist/cjs/react/nodes/heading.js +2 -4
- package/dist/cjs/react/nodes/index.js +31 -22
- package/dist/cjs/react/nodes/media.js +4 -2
- package/dist/cjs/react/nodes/mediaSingle/index.js +3 -3
- package/dist/cjs/react/nodes/panel.js +4 -6
- package/dist/cjs/react/nodes/table/colgroup.js +1 -1
- package/dist/cjs/react/nodes/table/sticky.js +1 -1
- package/dist/cjs/react/nodes/tableCell.js +1 -1
- package/dist/cjs/react/nodes/text-wrapper.js +5 -6
- package/dist/cjs/react/renderer-node.js +1 -1
- package/dist/cjs/react/utils/links.js +1 -1
- package/dist/cjs/render-document.js +21 -1
- package/dist/cjs/renderer-context.js +1 -1
- package/dist/cjs/steps/index.js +2 -2
- package/dist/cjs/text/nodes/index.js +1 -1
- package/dist/cjs/ui/Expand.js +2 -2
- package/dist/cjs/ui/MediaCard.js +12 -6
- package/dist/cjs/ui/Renderer/breakout-ssr.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +11 -11
- package/dist/cjs/ui/Renderer/style.js +9 -7
- package/dist/cjs/ui/RendererActionsContext/index.js +1 -1
- package/dist/cjs/ui/SortingIcon.js +2 -2
- package/dist/cjs/ui/active-header-id-provider.js +1 -1
- package/dist/cjs/ui/annotations/context.js +1 -1
- package/dist/cjs/ui/annotations/draft/component.js +7 -7
- package/dist/cjs/ui/annotations/draft/index.js +4 -4
- package/dist/cjs/ui/annotations/draft/text.js +1 -1
- package/dist/cjs/ui/annotations/hooks/index.js +8 -8
- package/dist/cjs/ui/annotations/hooks/use-events.js +4 -2
- package/dist/cjs/ui/annotations/index.js +5 -5
- package/dist/cjs/utils.js +2 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/enums.js +1 -0
- package/dist/es2019/messages.js +1 -1
- package/dist/es2019/react/index.js +29 -8
- package/dist/es2019/react/marks/code.js +6 -2
- package/dist/es2019/react/marks/fragment.js +10 -0
- package/dist/es2019/react/marks/index.js +4 -2
- package/dist/es2019/react/marks/textColor.js +7 -4
- package/dist/es2019/react/nodes/codeBlock.js +5 -3
- package/dist/es2019/react/nodes/codeBlockCopyButton.js +1 -1
- package/dist/es2019/react/nodes/date.js +1 -1
- package/dist/es2019/react/nodes/heading-anchor.js +1 -1
- package/dist/es2019/react/nodes/heading.js +2 -3
- package/dist/es2019/react/nodes/media.js +4 -2
- package/dist/es2019/react/nodes/mediaSingle/index.js +1 -1
- package/dist/es2019/react/nodes/panel.js +5 -6
- package/dist/es2019/react/nodes/text-wrapper.js +7 -6
- package/dist/es2019/render-document.js +19 -1
- package/dist/es2019/ui/Expand.js +1 -1
- package/dist/es2019/ui/MediaCard.js +11 -5
- package/dist/es2019/ui/Renderer/index.js +10 -10
- package/dist/es2019/ui/Renderer/style.js +4 -2
- package/dist/es2019/ui/SortingIcon.js +1 -1
- package/dist/es2019/ui/annotations/draft/component.js +6 -6
- package/dist/es2019/ui/annotations/hooks/use-events.js +3 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/enums.js +1 -0
- package/dist/esm/messages.js +1 -1
- package/dist/esm/react/index.js +31 -12
- package/dist/esm/react/marks/code.js +6 -2
- package/dist/esm/react/marks/fragment.js +10 -0
- package/dist/esm/react/marks/index.js +4 -2
- package/dist/esm/react/marks/textColor.js +8 -4
- package/dist/esm/react/nodes/codeBlock.js +5 -3
- package/dist/esm/react/nodes/codeBlockCopyButton.js +1 -1
- package/dist/esm/react/nodes/date.js +1 -1
- package/dist/esm/react/nodes/heading-anchor.js +1 -1
- package/dist/esm/react/nodes/heading.js +2 -3
- package/dist/esm/react/nodes/media.js +4 -2
- package/dist/esm/react/nodes/mediaSingle/index.js +1 -1
- package/dist/esm/react/nodes/panel.js +5 -6
- package/dist/esm/react/nodes/text-wrapper.js +7 -6
- package/dist/esm/render-document.js +19 -1
- package/dist/esm/ui/Expand.js +1 -1
- package/dist/esm/ui/MediaCard.js +11 -5
- package/dist/esm/ui/Renderer/index.js +10 -10
- package/dist/esm/ui/Renderer/style.js +4 -3
- package/dist/esm/ui/SortingIcon.js +1 -1
- package/dist/esm/ui/annotations/draft/component.js +6 -6
- package/dist/esm/ui/annotations/hooks/use-events.js +3 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/enums.d.ts +1 -0
- package/dist/types/analytics/events.d.ts +5 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/react/index.d.ts +1 -0
- package/dist/types/react/marks/alignment.d.ts +1 -0
- package/dist/types/react/marks/annotation.d.ts +1 -0
- package/dist/types/react/marks/code.d.ts +12 -4
- package/dist/types/react/marks/data-consumer.d.ts +1 -0
- package/dist/types/react/marks/em.d.ts +1 -0
- package/dist/types/react/marks/fragment.d.ts +4 -0
- package/dist/types/react/marks/indentation.d.ts +1 -0
- package/dist/types/react/marks/index.d.ts +2 -1
- package/dist/types/react/marks/link.d.ts +1 -0
- package/dist/types/react/marks/strike.d.ts +1 -0
- package/dist/types/react/marks/strong.d.ts +1 -0
- package/dist/types/react/marks/subsup.d.ts +1 -0
- package/dist/types/react/marks/textColor.d.ts +1 -0
- package/dist/types/react/marks/underline.d.ts +1 -0
- package/dist/types/react/marks/unsupportedMark.d.ts +1 -0
- package/dist/types/react/marks/unsupportedNodeAttribute.d.ts +1 -0
- package/dist/types/react/nodes/blockCard.d.ts +1 -0
- package/dist/types/react/nodes/caption.d.ts +1 -0
- package/dist/types/react/nodes/codeBlock.d.ts +12 -3
- package/dist/types/react/nodes/codeBlockCopyButton.d.ts +3 -3
- package/dist/types/react/nodes/date.d.ts +3 -3
- package/dist/types/react/nodes/decisionItem.d.ts +1 -0
- package/dist/types/react/nodes/doc.d.ts +1 -0
- package/dist/types/react/nodes/embedCard.d.ts +1 -0
- package/dist/types/react/nodes/heading-anchor.d.ts +4 -4
- package/dist/types/react/nodes/heading.d.ts +1 -0
- package/dist/types/react/nodes/index.d.ts +8 -8
- package/dist/types/react/nodes/mediaSingle/index.d.ts +3 -3
- package/dist/types/react/nodes/paragraph.d.ts +1 -0
- package/dist/types/react/nodes/placeholder.d.ts +1 -0
- package/dist/types/react/nodes/rule.d.ts +1 -0
- package/dist/types/react/nodes/table/colgroup.d.ts +1 -0
- package/dist/types/react/nodes/text-wrapper.d.ts +3 -3
- package/dist/types/types/mediaOptions.d.ts +7 -1
- package/dist/types/ui/Expand.d.ts +3 -3
- package/dist/types/ui/MediaCard.d.ts +2 -0
- package/dist/types/ui/Renderer/breakout-ssr.d.ts +1 -0
- package/dist/types/ui/SortingIcon.d.ts +1 -0
- package/dist/types/ui/annotations/draft/component.d.ts +1 -1
- package/dist/types/ui/renderer-props.d.ts +1 -1
- package/package.json +23 -23
|
@@ -17,17 +17,16 @@ import EmojiItem from './emoji'; // AFP-2532 TODO: Fix automatic suppressions be
|
|
|
17
17
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
18
18
|
|
|
19
19
|
import { themed } from '@atlaskit/theme';
|
|
20
|
+
import { getPanelBackgroundDarkModeColors } from '@atlaskit/editor-common';
|
|
20
21
|
var PanelStyled = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), function (props) {
|
|
21
22
|
if (props['data-panel-type'] !== PanelType.CUSTOM || !props.backgroundColor) {
|
|
22
23
|
return '';
|
|
23
|
-
}
|
|
24
|
+
} // Similar to mainDynamicStyles()
|
|
24
25
|
|
|
25
|
-
var border = themed({
|
|
26
|
-
light: 'none',
|
|
27
|
-
dark: "1px solid rgba(255, 255, 255, 0.4)"
|
|
28
|
-
})(props); // Similar to mainDynamicStyles()
|
|
29
26
|
|
|
30
|
-
return "\n &[data-panel-type=".concat(PanelType.CUSTOM, "] {\n background-color: ").concat(props.backgroundColor, ";\n
|
|
27
|
+
return "\n &[data-panel-type=".concat(PanelType.CUSTOM, "] {\n background-color: ").concat(props.backgroundColor, ";\n ").concat(themed({
|
|
28
|
+
dark: getPanelBackgroundDarkModeColors
|
|
29
|
+
}), ";\n }\n ");
|
|
31
30
|
});
|
|
32
31
|
var panelIcons = {
|
|
33
32
|
info: InfoIcon,
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextWithAnnotationDraft } from '../../ui/annotations';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
var TextWrapper = function TextWrapper(props) {
|
|
4
5
|
var startPos = props.startPos,
|
|
5
6
|
endPos = props.endPos;
|
|
6
|
-
var
|
|
7
|
+
var children = props.children;
|
|
7
8
|
|
|
8
|
-
if (!
|
|
9
|
+
if (!children) {
|
|
9
10
|
return null;
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
return /*#__PURE__*/React.createElement(TextWithAnnotationDraft, {
|
|
13
|
-
text: text,
|
|
14
14
|
startPos: startPos,
|
|
15
15
|
endPos: endPos
|
|
16
|
-
});
|
|
17
|
-
}
|
|
16
|
+
}, children);
|
|
17
|
+
};
|
|
18
|
+
|
|
18
19
|
export default TextWrapper;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { defaultSchema } from '@atlaskit/adf-schema';
|
|
2
2
|
import { getValidDocument } from '@atlaskit/editor-common/validator';
|
|
3
3
|
import { validateADFEntity, findAndTrackUnsupportedContentNodes } from '@atlaskit/editor-common';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from './analytics/enums';
|
|
5
|
+
import { PLATFORM } from './analytics/events';
|
|
4
6
|
import { trackUnsupportedContentLevels } from './analytics/unsupported-content';
|
|
5
7
|
var SUPPORTS_HIRES_TIMER_API = !!(window.performance && performance.now);
|
|
6
8
|
|
|
@@ -64,7 +66,23 @@ export var renderDocument = function renderDocument(doc, serializer) {
|
|
|
64
66
|
|
|
65
67
|
var _withStopwatch2 = withStopwatch(function () {
|
|
66
68
|
var pmNode = schema.nodeFromJSON(validDoc);
|
|
67
|
-
|
|
69
|
+
|
|
70
|
+
try {
|
|
71
|
+
pmNode.check();
|
|
72
|
+
} catch (err) {
|
|
73
|
+
if (dispatchAnalyticsEvent) {
|
|
74
|
+
dispatchAnalyticsEvent({
|
|
75
|
+
action: ACTION.INVALID_PROSEMIRROR_DOCUMENT,
|
|
76
|
+
actionSubject: ACTION_SUBJECT.RENDERER,
|
|
77
|
+
attributes: {
|
|
78
|
+
platform: PLATFORM.WEB,
|
|
79
|
+
error: err === null || err === void 0 ? void 0 : err.toString()
|
|
80
|
+
},
|
|
81
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
68
86
|
return pmNode;
|
|
69
87
|
}),
|
|
70
88
|
node = _withStopwatch2.output,
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -13,7 +13,7 @@ import { expandMessages, sharedExpandStyles, WidthProvider, ExpandIconWrapper, E
|
|
|
13
13
|
import { akEditorLineHeight, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
14
14
|
import { PLATFORM, MODE } from '../analytics/events';
|
|
15
15
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics/enums';
|
|
16
|
-
import { injectIntl } from 'react-intl';
|
|
16
|
+
import { injectIntl } from 'react-intl-next';
|
|
17
17
|
import { ActiveHeaderIdConsumer } from './active-header-id-provider';
|
|
18
18
|
import _uniqueId from 'lodash/uniqueId';
|
|
19
19
|
var Title = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n border: none;\n font-size: ", ";\n line-height: ", ";\n font-weight: normal;\n display: flex;\n flex: 1;\n margin: 0;\n padding: 0 0 0 ", "px;\n text-align: left;\n"])), relativeFontSizeToBase16(fontSize()), akEditorLineHeight, gridSize() / 2);
|
package/dist/esm/ui/MediaCard.js
CHANGED
|
@@ -262,7 +262,8 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
|
|
|
262
262
|
imageStatus = _this$props4.imageStatus,
|
|
263
263
|
disableOverlay = _this$props4.disableOverlay,
|
|
264
264
|
alt = _this$props4.alt,
|
|
265
|
-
featureFlags = _this$props4.featureFlags
|
|
265
|
+
featureFlags = _this$props4.featureFlags,
|
|
266
|
+
ssr = _this$props4.ssr;
|
|
266
267
|
|
|
267
268
|
if (imageStatus === 'loading' || !url) {
|
|
268
269
|
return this.renderLoadingCard();
|
|
@@ -287,7 +288,8 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
|
|
|
287
288
|
mediaViewerDataSource: {
|
|
288
289
|
list: Array.from(mediaIdentifierMap.values())
|
|
289
290
|
},
|
|
290
|
-
featureFlags: featureFlags
|
|
291
|
+
featureFlags: featureFlags,
|
|
292
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
291
293
|
});
|
|
292
294
|
}
|
|
293
295
|
/**
|
|
@@ -302,7 +304,7 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
|
|
|
302
304
|
value: function render() {
|
|
303
305
|
var _this$state = this.state,
|
|
304
306
|
contextIdentifierProvider = _this$state.contextIdentifierProvider,
|
|
305
|
-
|
|
307
|
+
mediaClientConfigInState = _this$state.mediaClientConfig,
|
|
306
308
|
fileState = _this$state.fileState;
|
|
307
309
|
var _this$props5 = this.props,
|
|
308
310
|
id = _this$props5.id,
|
|
@@ -318,7 +320,8 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
|
|
|
318
320
|
originalDimensions = _this$props5.originalDimensions,
|
|
319
321
|
forceOpenMediaViewer = _this$props5.shouldOpenMediaViewer,
|
|
320
322
|
featureFlags = _this$props5.featureFlags,
|
|
321
|
-
shouldEnableDownloadButton = _this$props5.shouldEnableDownloadButton
|
|
323
|
+
shouldEnableDownloadButton = _this$props5.shouldEnableDownloadButton,
|
|
324
|
+
ssr = _this$props5.ssr;
|
|
322
325
|
var isMobile = rendererAppearance === 'mobile';
|
|
323
326
|
var shouldPlayInline = useInlinePlayer !== undefined ? useInlinePlayer : true;
|
|
324
327
|
var isInlinePlayer = isMobile ? false : shouldPlayInline;
|
|
@@ -333,6 +336,8 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
|
|
|
333
336
|
return null;
|
|
334
337
|
}
|
|
335
338
|
|
|
339
|
+
var mediaClientConfig = !!ssr ? ssr.config : mediaClientConfigInState;
|
|
340
|
+
|
|
336
341
|
if (!mediaClientConfig || !id) {
|
|
337
342
|
return this.renderLoadingCard();
|
|
338
343
|
}
|
|
@@ -374,7 +379,8 @@ export var MediaCardInternal = /*#__PURE__*/function (_Component) {
|
|
|
374
379
|
list: Array.from(mediaIdentifierMap.values())
|
|
375
380
|
},
|
|
376
381
|
featureFlags: featureFlags,
|
|
377
|
-
shouldEnableDownloadButton: shouldEnableDownloadButton
|
|
382
|
+
shouldEnableDownloadButton: shouldEnableDownloadButton,
|
|
383
|
+
ssr: ssr === null || ssr === void 0 ? void 0 : ssr.mode
|
|
378
384
|
}));
|
|
379
385
|
}
|
|
380
386
|
}]);
|
|
@@ -17,10 +17,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
17
17
|
|
|
18
18
|
import React, { useContext, useLayoutEffect, useRef } from 'react';
|
|
19
19
|
import { PureComponent } from 'react';
|
|
20
|
-
import { IntlProvider } from 'react-intl';
|
|
21
20
|
import { getSchemaBasedOnStage } from '@atlaskit/adf-schema';
|
|
22
21
|
import { reduce } from '@atlaskit/adf-utils';
|
|
23
|
-
import { UnsupportedBlock, ProviderFactory, BaseTheme, WidthProvider, getAnalyticsAppearance, getAnalyticsEventSeverity, WithCreateAnalyticsEvent, getResponseEndTime, startMeasure, stopMeasure, shouldForceTracking } from '@atlaskit/editor-common';
|
|
22
|
+
import { UnsupportedBlock, ProviderFactory, BaseTheme, WidthProvider, getAnalyticsAppearance, getAnalyticsEventSeverity, WithCreateAnalyticsEvent, getResponseEndTime, startMeasure, stopMeasure, shouldForceTracking, IntlNextErrorBoundary, LegacyToNextIntlProvider, IntlLegacyFallbackProvider } from '@atlaskit/editor-common';
|
|
24
23
|
import { normalizeFeatureFlags } from '@atlaskit/editor-common/normalize-feature-flags';
|
|
25
24
|
import { akEditorFullPageDefaultFontSize } from '@atlaskit/editor-shared-styles';
|
|
26
25
|
import { IframeWidthObserverFallbackWrapper, IframeWrapperConsumer } from '@atlaskit/width-detector';
|
|
@@ -174,7 +173,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
174
173
|
var nextMedia = nextProps.media || {};
|
|
175
174
|
var media = this.props.media || {};
|
|
176
175
|
|
|
177
|
-
if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.
|
|
176
|
+
if (nextProps.portal !== this.props.portal || nextProps.appearance !== this.props.appearance || nextProps.stickyHeaders !== this.props.stickyHeaders || nextProps.disableActions !== this.props.disableActions || nextProps.allowCustomPanels !== this.props.allowCustomPanels || nextProps.allowHeadingAnchorLinks !== this.props.allowHeadingAnchorLinks || nextMedia.allowLinking !== media.allowLinking) {
|
|
178
177
|
this.serializer = new ReactSerializer(this.deriveSerializerProps(nextProps));
|
|
179
178
|
}
|
|
180
179
|
}
|
|
@@ -208,7 +207,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
208
207
|
surroundTextNodesWithTextWrapper: allowAnnotationsDraftMode,
|
|
209
208
|
media: props.media,
|
|
210
209
|
allowCopyToClipboard: props.allowCopyToClipboard,
|
|
211
|
-
allowCustomPanels: props.
|
|
210
|
+
allowCustomPanels: props.allowCustomPanels,
|
|
212
211
|
allowAnnotations: props.allowAnnotations,
|
|
213
212
|
allowSelectAllTrap: props.allowSelectAllTrap,
|
|
214
213
|
allowPlaceholderText: props.allowPlaceholderText
|
|
@@ -234,7 +233,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
234
233
|
allowPlaceholderText = _this$props2.allowPlaceholderText,
|
|
235
234
|
allowColumnSorting = _this$props2.allowColumnSorting,
|
|
236
235
|
allowCopyToClipboard = _this$props2.allowCopyToClipboard,
|
|
237
|
-
|
|
236
|
+
allowCustomPanels = _this$props2.allowCustomPanels;
|
|
238
237
|
var allowNestedHeaderLinks = isNestedHeaderLinksEnabled(allowHeadingAnchorLinks);
|
|
239
238
|
/**
|
|
240
239
|
* Handle clicks inside renderer. If the click isn't on media, in the media picker, or on a
|
|
@@ -297,7 +296,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
297
296
|
value: this.featureFlags(this.props.featureFlags)
|
|
298
297
|
}, /*#__PURE__*/React.createElement(CopyTextProvider, null, /*#__PURE__*/React.createElement(ActiveHeaderIdProvider, {
|
|
299
298
|
value: getActiveHeadingId(allowHeadingAnchorLinks)
|
|
300
|
-
}, /*#__PURE__*/React.createElement(
|
|
299
|
+
}, /*#__PURE__*/React.createElement(LegacyToNextIntlProvider, null, /*#__PURE__*/React.createElement(IntlLegacyFallbackProvider, null, /*#__PURE__*/React.createElement(AnalyticsContext.Provider, {
|
|
301
300
|
value: {
|
|
302
301
|
fireAnalyticsEvent: function fireAnalyticsEvent(event) {
|
|
303
302
|
return _this3.fireAnalyticsEvent(event);
|
|
@@ -309,7 +308,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
309
308
|
allowNestedHeaderLinks: allowNestedHeaderLinks,
|
|
310
309
|
allowColumnSorting: allowColumnSorting,
|
|
311
310
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
312
|
-
allowCustomPanels:
|
|
311
|
+
allowCustomPanels: allowCustomPanels,
|
|
313
312
|
allowPlaceholderText: allowPlaceholderText,
|
|
314
313
|
innerRef: this.editorRef,
|
|
315
314
|
onClick: handleWrapperOnClick,
|
|
@@ -320,7 +319,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
320
319
|
doc: pmDoc,
|
|
321
320
|
schema: schema,
|
|
322
321
|
onAnalyticsEvent: this.fireAnalyticsEvent
|
|
323
|
-
}, result))))))));
|
|
322
|
+
}, result)))))))));
|
|
324
323
|
return truncated ? /*#__PURE__*/React.createElement(TruncatedWrapper, {
|
|
325
324
|
height: maxHeight,
|
|
326
325
|
fadeHeight: fadeOutHeight
|
|
@@ -371,14 +370,15 @@ var RendererWithAnalytics = /*#__PURE__*/React.memo(function (props) {
|
|
|
371
370
|
}
|
|
372
371
|
}, /*#__PURE__*/React.createElement(WithCreateAnalyticsEvent, {
|
|
373
372
|
render: function render(createAnalyticsEvent) {
|
|
373
|
+
// `IntlNextErrorBoundary` only captures Internationalisation errors, leaving others for `ErrorBoundary`.
|
|
374
374
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
375
375
|
component: ACTION_SUBJECT.RENDERER,
|
|
376
376
|
rethrowError: true,
|
|
377
377
|
fallbackComponent: null,
|
|
378
378
|
createAnalyticsEvent: createAnalyticsEvent
|
|
379
|
-
}, /*#__PURE__*/React.createElement(Renderer, _extends({}, props, {
|
|
379
|
+
}, /*#__PURE__*/React.createElement(IntlNextErrorBoundary, null, /*#__PURE__*/React.createElement(Renderer, _extends({}, props, {
|
|
380
380
|
createAnalyticsEvent: createAnalyticsEvent
|
|
381
|
-
})));
|
|
381
|
+
}))));
|
|
382
382
|
}
|
|
383
383
|
}));
|
|
384
384
|
});
|
|
@@ -7,7 +7,8 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
7
7
|
import { gridSize, fontFamily, fontSize, borderRadius } from '@atlaskit/theme/constants';
|
|
8
8
|
import * as colors from '@atlaskit/theme/colors';
|
|
9
9
|
import { headingSizes as headingSizesImport } from '@atlaskit/theme/typography';
|
|
10
|
-
import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, panelSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle,
|
|
10
|
+
import { tableSharedStyle, columnLayoutSharedStyle, blockquoteSharedStyles, headingsSharedStyles, panelSharedStyles, ruleSharedStyles, whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, mediaSingleSharedStyle, TableSharedCssClassName, tableMarginTop, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, richMediaClassName, tasksAndDecisionsStyles, smartCardSharedStyles, tableCellPadding, textColorStyles } from '@atlaskit/editor-common/styles';
|
|
11
|
+
import { shadowClassNames } from '@atlaskit/editor-common/ui';
|
|
11
12
|
import { editorFontSize, blockNodesVerticalMargin, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, gridMediumMaxWidth, akEditorFullWidthLayoutWidth, akEditorStickyHeaderZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
12
13
|
import { RendererCssClassName } from '../../consts';
|
|
13
14
|
import { HeadingAnchorWrapperClassName } from '../../react/nodes/heading-anchor';
|
|
@@ -91,10 +92,10 @@ var fullWidthStyles = function fullWidthStyles(_ref4) {
|
|
|
91
92
|
}; // prettier-ignore
|
|
92
93
|
|
|
93
94
|
|
|
94
|
-
export var Wrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + .rich-media-wrapped + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n ", "\n\n .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after, &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-child {\n height: 100%;\n\n td, th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid ", ";\n border-bottom: 1px solid ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th, .sticky td {\n box-shadow: 0px 1px ", ", 0px -0.5px ", ", inset -1px 0px ", ", 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard{\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n"])), editorFontSize, themed({
|
|
95
|
+
export var Wrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: ", "px;\n line-height: 1.5rem;\n color: ", ";\n\n ", "\n ", "\n\n & h1 {\n ", "\n }\n\n & h2 {\n ", "\n }\n\n & h3 {\n ", "\n }\n\n & h4 {\n ", "\n }\n\n & h5 {\n ", "\n }\n\n & h6 {\n ", "\n }\n\n & span.akActionMark {\n color: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n }\n\n & span.akActionMark {\n cursor: pointer;\n }\n\n & span[data-placeholder] {\n color: ", ";\n }\n\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", "\n\n & .UnknownBlock {\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n white-space: pre-wrap;\n word-wrap: break-word;\n }\n\n & span.date-node {\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n padding: 2px 4px;\n margin: 0 1px;\n transition: background 0.3s;\n }\n\n & span.date-node-highlighted {\n background: ", ";\n color: ", ";\n }\n\n & .renderer-image {\n max-width: 100%;\n display: block;\n margin: ", "px 0;\n }\n\n .", ".rich-media-wrapped + .", ":not(.rich-media-wrapped) {\n clear: both;\n }\n\n & .code-block,\n & blockquote,\n & hr,\n & > div > div:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + .rich-media-wrapped + *:not(.rich-media-wrapped),\n .", ".rich-media-wrapped + div:not(.rich-media-wrapped),\n .", ".image-align-start,\n .", ".image-center,\n .", ".image-align-end {\n clear: both;\n }\n\n & .rich-media-wrapped {\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n margin-top: 8px;\n }\n }\n\n ", "\n\n ", " &\n div[class^='image-wrap-'] + div[class^='image-wrap-'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* Breakout for tables and extensions */\n .", " > {\n * .", " {\n width: 100% !important;\n left: 0 !important;\n }\n\n * .", " {\n overflow-x: auto;\n }\n\n & .", ":first-child {\n margin-top: 0;\n }\n }\n\n .", " {\n margin-top: ", ";\n }\n\n .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .", " {\n overflow-x: auto;\n }\n\n ", "\n\n .", " {\n z-index: 0;\n transition: all 0.1s linear;\n display: flex; /* needed to avoid position: fixed jumpiness in Chrome */\n\n /** Shadow overrides */\n &.", "::after, &.", "::before {\n top: ", "px;\n height: calc(100% - ", "px);\n z-index: ", ";\n }\n\n /**\n * A hack for making all the <th /> heights equal in case some have shorter\n * content than others.\n *\n * This is done to make sort buttons fill entire <th />.\n */\n table {\n height: 1px; /* will be ignored */\n ", ";\n margin-left: 0;\n margin-right: 0;\n }\n\n table tr:first-child {\n height: 100%;\n\n td, th {\n position: relative;\n }\n }\n\n table[data-number-column='true'] {\n .", " {\n background-color: ", ";\n border-right: 1px solid ", ";\n width: ", "px;\n text-align: center;\n color: ", ";\n font-size: ", ";\n }\n\n .fixed .", " {\n border-right: 0px none;\n }\n }\n }\n\n tr[data-header-row].fixed {\n position: fixed !important;\n display: flex;\n overflow: hidden;\n z-index: ", ";\n\n border-right: 1px solid ", ";\n border-bottom: 1px solid ", ";\n\n /* this is to compensate for the table border */\n transform: translateX(-1px);\n }\n\n .sticky > th {\n z-index: ", ";\n position: sticky !important;\n top: 0;\n }\n\n /* Make the number column header sticky */\n .sticky > td {\n position: sticky !important;\n top: 0;\n }\n\n /* add border for position: sticky\n and work around background-clip: padding-box\n bug for FF causing box-shadow bug in Chrome */\n .sticky th, .sticky td {\n box-shadow: 0px 1px ", ", 0px -0.5px ", ", inset -1px 0px ", ", 0px -1px ", ";\n }\n\n /* this will remove jumpiness caused in Chrome for sticky headers */\n .fixed + tr {\n min-height: 0px;\n }\n\n /*\n * We wrap CodeBlock in a grid to prevent it from overflowing the container of the renderer.\n * See ED-4159.\n */\n & .code-block {\n max-width: 100%;\n /* -ms- properties are necessary until MS supports the latest version of the grid spec */\n /* stylelint-disable value-no-vendor-prefix, declaration-block-no-duplicate-properties */\n display: -ms-grid;\n display: grid;\n -ms-grid-columns: auto 1fr;\n /* stylelint-enable */\n\n grid-template-columns: minmax(0, 1fr);\n position: relative;\n border-radius: ", "px;\n\n /*\n * The overall renderer has word-wrap: break; which causes issues with\n * code block line numbers in Safari / iOS.\n */\n word-wrap: normal;\n\n & > span {\n /* stylelint-disable value-no-vendor-prefix */\n -ms-grid-row: 1;\n -ms-grid-column: 2;\n /* stylelint-enable */\n grid-column: 1;\n }\n }\n\n & .MediaGroup,\n & .code-block {\n margin-top: ", ";\n\n &:first-child {\n margin-top: 0;\n }\n\n &:hover button.copy-to-clipboard, .copy-to-clipboard:focus{\n opacity: 1;\n position: absolute;\n height: 32px;\n width: 32px;\n right: 6px;\n top: 4px;\n padding: 2px;\n }\n }\n\n ", ";\n & [data-layout-section] {\n margin-top: ", "px;\n & > div + div {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n & > div + div {\n margin-left: 0;\n }\n }\n }\n"])), editorFontSize, themed({
|
|
95
96
|
light: colors.N800,
|
|
96
97
|
dark: '#B8C7E0'
|
|
97
|
-
}), fullPageStyles, fullWidthStyles, headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), colors.B400, colors.B300, colors.placeholderText, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, panelSharedStyles, ruleSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
|
|
98
|
+
}), fullPageStyles, fullWidthStyles, headingAnchorStyle('h1'), headingAnchorStyle('h2'), headingAnchorStyle('h3'), headingAnchorStyle('h4'), headingAnchorStyle('h5'), headingAnchorStyle('h6'), colors.B400, colors.B300, colors.placeholderText, whitespaceSharedStyles, blockquoteSharedStyles, headingsSharedStyles, panelSharedStyles, ruleSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, codeMarkSharedStyles, shadowSharedStyle, dateSharedStyle, textColorStyles, tasksAndDecisionsStyles, smartCardSharedStyles, fontFamily(), relativeFontSizeToBase16(fontSize()), themed({
|
|
98
99
|
light: colors.N30A,
|
|
99
100
|
dark: colors.DN70
|
|
100
101
|
}), borderRadius(), themed({
|
|
@@ -23,7 +23,7 @@ export var StatusClassNames;
|
|
|
23
23
|
})(StatusClassNames || (StatusClassNames = {}));
|
|
24
24
|
|
|
25
25
|
var Wrapper = styled.figure(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n display: flex;\n height: 28px;\n width: 28px;\n margin: 6px;\n right: 0;\n top: 0;\n border: 2px solid #fff;\n border-radius: ", "px;\n background-color: ", ";\n justify-content: center;\n align-items: center;\n\n &:hover {\n background-color: ", ";\n }\n\n &.", " {\n cursor: not-allowed;\n }\n"])), gridSize() / 2, N20, N30, StatusClassNames.SORTING_NOT_ALLOWED);
|
|
26
|
-
var TableSortingIcon = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 8px;\n height: 12px;\n transition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1);\n transform-origin: 50% 50%;\n background-image: url(", ");\n\n &.", " {\n transform: rotate(-180deg);\n }\n\n &.", "-inactive {\n opacity: 0.
|
|
26
|
+
var TableSortingIcon = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 8px;\n height: 12px;\n transition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1);\n transform-origin: 50% 50%;\n background-image: url(", ");\n\n &.", " {\n transform: rotate(-180deg);\n }\n\n &.", "-inactive {\n opacity: 0.7;\n }\n"])), TableSortIconDataUrl, StatusClassNames.DESC, TABLE_SORTING_ICON_CLASS);
|
|
27
27
|
|
|
28
28
|
var getClassName = function getClassName(status) {
|
|
29
29
|
switch (status) {
|
|
@@ -55,7 +55,7 @@ export var applyAnnotationOnText = function applyAnnotationOnText(_ref2) {
|
|
|
55
55
|
export var TextWithAnnotationDraft = function TextWithAnnotationDraft(_ref3) {
|
|
56
56
|
var startPos = _ref3.startPos,
|
|
57
57
|
endPos = _ref3.endPos,
|
|
58
|
-
|
|
58
|
+
children = _ref3.children;
|
|
59
59
|
var textPosition = React.useMemo(function () {
|
|
60
60
|
return {
|
|
61
61
|
start: startPos,
|
|
@@ -72,21 +72,21 @@ export var TextWithAnnotationDraft = function TextWithAnnotationDraft(_ref3) {
|
|
|
72
72
|
}, [nextDraftPosition, textPosition]);
|
|
73
73
|
|
|
74
74
|
if (shouldApplyAnnotationAt === false || !nextDraftPosition) {
|
|
75
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
75
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
if (shouldApplyAnnotationAt === InsertDraftPosition.AROUND_TEXT) {
|
|
79
79
|
return /*#__PURE__*/React.createElement(AnnotationDraft, {
|
|
80
80
|
key: 0,
|
|
81
81
|
draftPosition: nextDraftPosition
|
|
82
|
-
},
|
|
82
|
+
}, children);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
var offsets = calcTextSplitOffset(nextDraftPosition, textPosition,
|
|
86
|
-
var texts = splitText(
|
|
85
|
+
var offsets = calcTextSplitOffset(nextDraftPosition, textPosition, children);
|
|
86
|
+
var texts = splitText(children, offsets);
|
|
87
87
|
|
|
88
88
|
if (!texts) {
|
|
89
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null,
|
|
89
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
var components = applyAnnotationOnText({
|
|
@@ -31,7 +31,9 @@ export var useAnnotationStateByTypeEvent = function useAnnotationStateByTypeEven
|
|
|
31
31
|
|
|
32
32
|
var nextStates = Object.values(payload).reduce(function (acc, curr) {
|
|
33
33
|
if (curr.annotationType === type) {
|
|
34
|
-
|
|
34
|
+
// Check for empty state to prevent additional renders
|
|
35
|
+
var isEmpty = curr.state === null || curr.state === undefined;
|
|
36
|
+
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, curr.id, !isEmpty ? curr.state : states[curr.id]));
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
return acc;
|
package/dist/esm/version.json
CHANGED
|
@@ -8,6 +8,7 @@ export declare enum ACTION {
|
|
|
8
8
|
STARTED = "started",
|
|
9
9
|
RENDERED = "rendered",
|
|
10
10
|
CRASHED = "unhandledErrorCaught",
|
|
11
|
+
INVALID_PROSEMIRROR_DOCUMENT = "invalidProsemirrorDocument",
|
|
11
12
|
SELECT_ALL_CAUGHT = "selectAllCaught",
|
|
12
13
|
SELECT_ALL_ESCAPED = "selectAllEscaped",
|
|
13
14
|
CLICKED = "clicked",
|
|
@@ -27,6 +27,10 @@ export declare type ComponentCrashErrorAEP = AEP<ACTION.CRASHED, ACTION_SUBJECT.
|
|
|
27
27
|
componentStack?: string;
|
|
28
28
|
errorRethrown?: boolean;
|
|
29
29
|
}, EVENT_TYPE.OPERATIONAL>;
|
|
30
|
+
declare type InvalidProsemirrorDocumentErrorAEP = AEP<ACTION.INVALID_PROSEMIRROR_DOCUMENT, ACTION_SUBJECT.RENDERER, ACTION_SUBJECT_ID, {
|
|
31
|
+
platform: PLATFORM.WEB;
|
|
32
|
+
errorStack?: string;
|
|
33
|
+
}, EVENT_TYPE.OPERATIONAL>;
|
|
30
34
|
declare type RendererUnsupportedContentLevelsTrackingSucceeded = AEP<ACTION.UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED, ACTION_SUBJECT.RENDERER, undefined, {
|
|
31
35
|
appearance?: string;
|
|
32
36
|
platform: PLATFORM.WEB;
|
|
@@ -90,5 +94,5 @@ export declare enum RESOLVE_METHOD {
|
|
|
90
94
|
ORPHANED = "orphaned"
|
|
91
95
|
}
|
|
92
96
|
export declare type AnnotationAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, AnnotationAEPAttributes, undefined>;
|
|
93
|
-
export declare type AnalyticsEventPayload = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | HeadingAnchorLinkButtonAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP;
|
|
97
|
+
export declare type AnalyticsEventPayload = RendererStartAEP | RendererRenderedAEP | ComponentCrashErrorAEP | RendererUnsupportedContentLevelsTrackingSucceeded | RendererUnsupportedContentLevelsTrackingErrored | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | HeadingAnchorLinkButtonAEP | AnchorLinkAEP | TableSortColumnNotAllowedAEP | TableSortColumnAEP | VisitLinkAEP | VisitMediaLinkAEP | ExpandAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | AnnotationAEP | AnnotationDeleteAEP | InvalidProsemirrorDocumentErrorAEP;
|
|
94
98
|
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import { Mark } from 'prosemirror-model';
|
|
3
4
|
import type { MarkProps } from '../types';
|
|
4
|
-
export declare
|
|
5
|
-
declare
|
|
6
|
-
|
|
5
|
+
export declare const isCodeMark: (mark: Mark) => boolean;
|
|
6
|
+
export declare function CodeWithIntl(props: MarkProps<{
|
|
7
|
+
codeBidiWarningTooltipEnabled: boolean;
|
|
8
|
+
}> & WrappedComponentProps): JSX.Element;
|
|
9
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<{
|
|
10
|
+
codeBidiWarningTooltipEnabled: boolean;
|
|
11
|
+
} & import("../types").MarkMeta & WrappedComponentProps<"intl">>> & {
|
|
12
|
+
WrappedComponent: React.ComponentType<{
|
|
13
|
+
codeBidiWarningTooltipEnabled: boolean;
|
|
14
|
+
} & import("../types").MarkMeta & WrappedComponentProps<"intl">>;
|
|
7
15
|
};
|
|
8
16
|
export default _default;
|
|
@@ -12,9 +12,10 @@ import Breakout from './breakout';
|
|
|
12
12
|
import UnsupportedMark from './unsupportedMark';
|
|
13
13
|
import UnsupportedNodeAttribute from './unsupportedNodeAttribute';
|
|
14
14
|
import DataConsumer from './data-consumer';
|
|
15
|
+
import FragmentMark from './fragment';
|
|
15
16
|
import Annotation, { isAnnotationMark } from './annotation';
|
|
16
17
|
export declare const markToReact: {
|
|
17
18
|
[key: string]: ComponentType<any>;
|
|
18
19
|
};
|
|
19
20
|
export declare const toReact: (mark: Mark) => ComponentType<any>;
|
|
20
|
-
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, Underline, Breakout, Annotation, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, };
|
|
21
|
+
export { Code, Em, Link, Strike, Strong, Subsup, TextColor, Underline, Breakout, Annotation, UnsupportedMark, isAnnotationMark, UnsupportedNodeAttribute, DataConsumer, FragmentMark, };
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
1
3
|
import { SupportedLanguages } from '@atlaskit/code';
|
|
2
4
|
export interface Props {
|
|
3
5
|
text: string;
|
|
4
6
|
language: SupportedLanguages;
|
|
5
7
|
allowCopyToClipboard?: boolean;
|
|
8
|
+
codeBidiWarningTooltipEnabled: boolean;
|
|
6
9
|
className?: string;
|
|
7
10
|
}
|
|
8
|
-
declare const _default: import("styled-components").StyledComponentClass<(Props &
|
|
11
|
+
declare const _default: import("styled-components").StyledComponentClass<(Pick<Props & WrappedComponentProps<"intl">, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
12
|
+
forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
|
|
13
|
+
} & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<Props & WrappedComponentProps<"intl">, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
14
|
+
forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
|
|
15
|
+
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<Props & WrappedComponentProps<"intl">, "text" | "className" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
16
|
+
forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
|
|
17
|
+
} & import("@atlaskit/theme").NoThemeProps), any, (Pick<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>, "text" | "className" | "forwardedRef" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
9
18
|
theme?: any;
|
|
10
|
-
} & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<Props
|
|
19
|
+
} & import("@atlaskit/theme").AtlaskitThemeProps) | (Pick<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>, "text" | "className" | "forwardedRef" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
11
20
|
theme?: any;
|
|
12
|
-
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<Props
|
|
21
|
+
} & import("@atlaskit/theme").CustomThemeProps) | (Pick<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>, "text" | "className" | "forwardedRef" | "language" | "allowCopyToClipboard" | "codeBidiWarningTooltipEnabled"> & {
|
|
13
22
|
theme?: any;
|
|
14
23
|
} & import("@atlaskit/theme").NoThemeProps)>;
|
|
15
24
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
declare type Props = {
|
|
4
4
|
content: string;
|
|
5
5
|
};
|
|
6
|
-
declare const _default: React.
|
|
7
|
-
WrappedComponent:
|
|
6
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
7
|
+
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WrappedComponentProps } from 'react-intl-next';
|
|
3
3
|
export interface Props {
|
|
4
4
|
timestamp: string;
|
|
5
5
|
parentIsIncompleteTask?: boolean;
|
|
6
6
|
}
|
|
7
|
-
declare const _default: React.
|
|
8
|
-
WrappedComponent:
|
|
7
|
+
declare const _default: React.FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps<"intl">>> & {
|
|
8
|
+
WrappedComponent: React.ComponentType<Props & WrappedComponentProps<"intl">>;
|
|
9
9
|
};
|
|
10
10
|
export default _default;
|