@atlaskit/renderer 128.2.3 → 128.3.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 +20 -0
- package/dist/cjs/react/index.js +8 -6
- package/dist/cjs/react/marks/data-consumer.js +3 -1
- package/dist/cjs/react/marks/link.js +7 -6
- package/dist/cjs/react/nodes/blockCard.js +16 -11
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockButtonContainer.js +7 -8
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +1 -2
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockCopyButton.js +3 -1
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockWrapButton.js +3 -1
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +1 -1
- package/dist/cjs/react/nodes/emoji.js +6 -2
- package/dist/cjs/react/nodes/heading.js +3 -1
- package/dist/cjs/react/nodes/inlineCard.js +19 -6
- package/dist/cjs/react/nodes/media/index.js +20 -5
- package/dist/cjs/react/nodes/mediaInline.js +4 -1
- package/dist/cjs/react/nodes/mediaSingle/index.js +3 -1
- package/dist/cjs/react/nodes/panel.js +7 -7
- package/dist/cjs/react/nodes/status.js +6 -2
- package/dist/cjs/react/nodes/table/sticky.js +2 -3
- package/dist/cjs/react/nodes/table.js +7 -4
- package/dist/cjs/react/nodes/taskItem.js +9 -3
- package/dist/cjs/ui/Expand.js +9 -5
- package/dist/cjs/ui/ExtensionRenderer.js +3 -1
- package/dist/cjs/ui/MediaCard.js +3 -1
- package/dist/cjs/ui/Renderer/RendererStyleContainer.js +67 -68
- package/dist/cjs/ui/Renderer/index.js +22 -10
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +3 -2
- package/dist/es2019/react/index.js +7 -6
- package/dist/es2019/react/marks/data-consumer.js +3 -1
- package/dist/es2019/react/marks/link.js +7 -6
- package/dist/es2019/react/nodes/blockCard.js +16 -11
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockButtonContainer.js +7 -8
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +1 -2
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockCopyButton.js +3 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockWrapButton.js +3 -1
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +1 -1
- package/dist/es2019/react/nodes/emoji.js +6 -2
- package/dist/es2019/react/nodes/heading.js +3 -1
- package/dist/es2019/react/nodes/inlineCard.js +19 -6
- package/dist/es2019/react/nodes/media/index.js +20 -5
- package/dist/es2019/react/nodes/mediaInline.js +5 -2
- package/dist/es2019/react/nodes/mediaSingle/index.js +3 -1
- package/dist/es2019/react/nodes/panel.js +7 -7
- package/dist/es2019/react/nodes/status.js +6 -2
- package/dist/es2019/react/nodes/table/sticky.js +4 -5
- package/dist/es2019/react/nodes/table.js +7 -4
- package/dist/es2019/react/nodes/taskItem.js +9 -3
- package/dist/es2019/ui/Expand.js +9 -5
- package/dist/es2019/ui/ExtensionRenderer.js +3 -1
- package/dist/es2019/ui/MediaCard.js +3 -1
- package/dist/es2019/ui/Renderer/RendererStyleContainer.js +73 -74
- package/dist/es2019/ui/Renderer/index.js +22 -10
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +3 -2
- package/dist/esm/react/index.js +8 -6
- package/dist/esm/react/marks/data-consumer.js +3 -1
- package/dist/esm/react/marks/link.js +7 -6
- package/dist/esm/react/nodes/blockCard.js +16 -11
- package/dist/esm/react/nodes/codeBlock/components/codeBlockButtonContainer.js +7 -8
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +1 -2
- package/dist/esm/react/nodes/codeBlock/components/codeBlockCopyButton.js +3 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockWrapButton.js +3 -1
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +1 -1
- package/dist/esm/react/nodes/emoji.js +6 -2
- package/dist/esm/react/nodes/heading.js +3 -1
- package/dist/esm/react/nodes/inlineCard.js +19 -6
- package/dist/esm/react/nodes/media/index.js +20 -5
- package/dist/esm/react/nodes/mediaInline.js +4 -1
- package/dist/esm/react/nodes/mediaSingle/index.js +3 -1
- package/dist/esm/react/nodes/panel.js +7 -7
- package/dist/esm/react/nodes/status.js +6 -2
- package/dist/esm/react/nodes/table/sticky.js +2 -3
- package/dist/esm/react/nodes/table.js +7 -4
- package/dist/esm/react/nodes/taskItem.js +9 -3
- package/dist/esm/ui/Expand.js +9 -5
- package/dist/esm/ui/ExtensionRenderer.js +3 -1
- package/dist/esm/ui/MediaCard.js +3 -1
- package/dist/esm/ui/Renderer/RendererStyleContainer.js +68 -69
- package/dist/esm/ui/Renderer/index.js +22 -10
- package/dist/esm/ui/Renderer/truncated-wrapper.js +3 -2
- package/dist/types/types/mediaOptions.d.ts +3 -0
- package/dist/types/ui/MediaCard.d.ts +3 -0
- package/dist/types-ts4.5/types/mediaOptions.d.ts +3 -0
- package/dist/types-ts4.5/ui/MediaCard.d.ts +3 -0
- package/package.json +5 -5
|
@@ -57,7 +57,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
|
57
57
|
const TABLE_INFO_TIMEOUT = 10000;
|
|
58
58
|
const RENDER_EVENT_SAMPLE_RATE = 0.2;
|
|
59
59
|
const packageName = "@atlaskit/renderer";
|
|
60
|
-
const packageVersion = "
|
|
60
|
+
const packageVersion = "128.3.0";
|
|
61
61
|
const setAsQueryContainerStyles = css({
|
|
62
62
|
containerName: 'ak-renderer-wrapper',
|
|
63
63
|
containerType: 'inline-size'
|
|
@@ -447,6 +447,7 @@ export const RendererFunctionalComponent = props => {
|
|
|
447
447
|
}, jsx(ActiveHeaderIdProvider, {
|
|
448
448
|
value: getActiveHeadingId(props.allowHeadingAnchorLinks)
|
|
449
449
|
}, jsx(AnalyticsContext.Provider, {
|
|
450
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
450
451
|
value: {
|
|
451
452
|
fireAnalyticsEvent: event => fireAnalyticsEvent(event)
|
|
452
453
|
}
|
|
@@ -464,7 +465,9 @@ export const RendererFunctionalComponent = props => {
|
|
|
464
465
|
allowPlaceholderText: props.allowPlaceholderText,
|
|
465
466
|
useBlockRenderForCodeBlock: (_rendererContext$feat = rendererContext.featureFlags.useBlockRenderForCodeBlock) !== null && _rendererContext$feat !== void 0 ? _rendererContext$feat : true,
|
|
466
467
|
addTelepointer: props.addTelepointer,
|
|
467
|
-
innerRef: editorRef
|
|
468
|
+
innerRef: editorRef
|
|
469
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
470
|
+
,
|
|
468
471
|
onClick: event => handleWrapperOnClick(event, props, mouseDownSelection),
|
|
469
472
|
onMouseDown: onMouseDownEditView,
|
|
470
473
|
ssr: (_props$media = props.media) === null || _props$media === void 0 ? void 0 : _props$media.ssr,
|
|
@@ -499,7 +502,9 @@ export const RendererFunctionalComponent = props => {
|
|
|
499
502
|
allowColumnSorting: props.allowColumnSorting,
|
|
500
503
|
allowNestedHeaderLinks: isNestedHeaderLinksEnabled(props.allowHeadingAnchorLinks),
|
|
501
504
|
useBlockRenderForCodeBlock: (_rendererContext$feat2 = rendererContext.featureFlags.useBlockRenderForCodeBlock) !== null && _rendererContext$feat2 !== void 0 ? _rendererContext$feat2 : true,
|
|
502
|
-
addTelepointer: props.addTelepointer
|
|
505
|
+
addTelepointer: props.addTelepointer
|
|
506
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
507
|
+
,
|
|
503
508
|
onClick: event => handleWrapperOnClick(event, props, mouseDownSelection),
|
|
504
509
|
isTopLevelRenderer: rendererContext.isTopLevelRenderer,
|
|
505
510
|
allowRendererContainerStyles: props.allowRendererContainerStyles
|
|
@@ -556,7 +561,9 @@ export function Renderer(props) {
|
|
|
556
561
|
// Usage notes:
|
|
557
562
|
// Used by Confluence for View page renderer
|
|
558
563
|
// For the nested renderers - see RendererWithAnnotationSelection.
|
|
559
|
-
export const RendererWithAnalytics = /*#__PURE__*/React.memo(props => jsx(FabricEditorAnalyticsContext
|
|
564
|
+
export const RendererWithAnalytics = /*#__PURE__*/React.memo(props => jsx(FabricEditorAnalyticsContext
|
|
565
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
566
|
+
, {
|
|
560
567
|
data: {
|
|
561
568
|
appearance: getAnalyticsAppearance(props.appearance),
|
|
562
569
|
packageName,
|
|
@@ -565,7 +572,9 @@ export const RendererWithAnalytics = /*#__PURE__*/React.memo(props => jsx(Fabric
|
|
|
565
572
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
566
573
|
editorSessionId: uuid()
|
|
567
574
|
}
|
|
568
|
-
}, jsx(WithCreateAnalyticsEvent
|
|
575
|
+
}, jsx(WithCreateAnalyticsEvent
|
|
576
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
577
|
+
, {
|
|
569
578
|
render: createAnalyticsEvent => {
|
|
570
579
|
// `IntlErrorBoundary` only captures Internationalisation errors, leaving others for `ErrorBoundary`.
|
|
571
580
|
return jsx(ErrorBoundary, {
|
|
@@ -761,11 +770,14 @@ function RendererActionsInternalUpdater({
|
|
|
761
770
|
return () => actions._privateUnregisterRenderer();
|
|
762
771
|
}, [actions, schema, _doc, onAnalyticsEvent]);
|
|
763
772
|
if (editorExperiment('comment_on_bodied_extensions', true)) {
|
|
764
|
-
return
|
|
765
|
-
value
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
773
|
+
return (
|
|
774
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
775
|
+
jsx(RootRendererContext.Provider, {
|
|
776
|
+
value: {
|
|
777
|
+
doc: _doc
|
|
778
|
+
}
|
|
779
|
+
}, children)
|
|
780
|
+
);
|
|
769
781
|
}
|
|
770
782
|
return children;
|
|
771
783
|
}
|
|
@@ -18,7 +18,8 @@ const fadeOutStyles = (maxHeight, top, backgroundColor) => css({
|
|
|
18
18
|
bottom: 0,
|
|
19
19
|
left: 0,
|
|
20
20
|
right: 0,
|
|
21
|
-
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
22
|
+
backgroundImage: `linear-gradient( ${"var(--ds-background-neutral-subtle, #00000000)"}, ${backgroundColor} )`
|
|
22
23
|
}
|
|
23
24
|
});
|
|
24
25
|
const FadeOut = props => {
|
|
@@ -48,7 +49,7 @@ export class TruncatedWrapper extends Component {
|
|
|
48
49
|
const {
|
|
49
50
|
height = 95,
|
|
50
51
|
fadeHeight = 24,
|
|
51
|
-
backgroundColor = "var(--ds-surface,
|
|
52
|
+
backgroundColor = "var(--ds-surface, #FFFFFF)",
|
|
52
53
|
children
|
|
53
54
|
} = this.props;
|
|
54
55
|
return jsx(FadeOut, {
|
package/dist/esm/react/index.js
CHANGED
|
@@ -485,7 +485,8 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
485
485
|
value: function getMediaProps(node) {
|
|
486
486
|
var _this6 = this,
|
|
487
487
|
_this$media,
|
|
488
|
-
_this$media2
|
|
488
|
+
_this$media2,
|
|
489
|
+
_this$media3;
|
|
489
490
|
var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
490
491
|
var _node$type$schema$mar = node.type.schema.marks,
|
|
491
492
|
annotation = _node$type$schema$mar.annotation,
|
|
@@ -520,6 +521,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
520
521
|
// surroundTextNodesWithTextWrapper checks inlineComment.allowDraftMode
|
|
521
522
|
allowAnnotationsDraftMode: this.surroundTextNodesWithTextWrapper,
|
|
522
523
|
enableSyncMediaCard: (_this$media2 = this.media) === null || _this$media2 === void 0 ? void 0 : _this$media2.enableSyncMediaCard,
|
|
524
|
+
mediaViewerExtensions: (_this$media3 = this.media) === null || _this$media3 === void 0 ? void 0 : _this$media3.mediaViewerExtensions,
|
|
523
525
|
nestedUnder: nestedUnder
|
|
524
526
|
});
|
|
525
527
|
}
|
|
@@ -572,21 +574,21 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
572
574
|
}, {
|
|
573
575
|
key: "getMediaGroupProps",
|
|
574
576
|
value: function getMediaGroupProps(node) {
|
|
575
|
-
var _this$
|
|
577
|
+
var _this$media4, _this$media5;
|
|
576
578
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
577
579
|
shouldOpenMediaViewer: this.shouldOpenMediaViewer,
|
|
578
580
|
allowAltTextOnImages: this.allowAltTextOnImages,
|
|
579
581
|
featureFlags: this.media && this.media.featureFlags,
|
|
580
|
-
enableDownloadButton: (_this$
|
|
581
|
-
ssr: (_this$
|
|
582
|
+
enableDownloadButton: (_this$media4 = this.media) === null || _this$media4 === void 0 ? void 0 : _this$media4.enableDownloadButton,
|
|
583
|
+
ssr: (_this$media5 = this.media) === null || _this$media5 === void 0 ? void 0 : _this$media5.ssr
|
|
582
584
|
});
|
|
583
585
|
}
|
|
584
586
|
}, {
|
|
585
587
|
key: "getMediaInlineProps",
|
|
586
588
|
value: function getMediaInlineProps(node) {
|
|
587
|
-
var _this$
|
|
589
|
+
var _this$media6;
|
|
588
590
|
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
589
|
-
ssr: (_this$
|
|
591
|
+
ssr: (_this$media6 = this.media) === null || _this$media6 === void 0 ? void 0 : _this$media6.ssr
|
|
590
592
|
});
|
|
591
593
|
}
|
|
592
594
|
}, {
|
|
@@ -2,7 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export default function DataConsumer(props) {
|
|
4
4
|
var WrapperElement = props.isInline ? 'span' : 'div';
|
|
5
|
-
return /*#__PURE__*/React.createElement(WrapperElement
|
|
5
|
+
return /*#__PURE__*/React.createElement(WrapperElement
|
|
6
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
|
|
7
|
+
, _extends({
|
|
6
8
|
"data-source": props.sources ? JSON.stringify(props.sources) : undefined,
|
|
7
9
|
"data-mark-type": "dataConsumer"
|
|
8
10
|
// Ignored via go/ees005
|
|
@@ -6,7 +6,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
6
6
|
import React, { Fragment } from 'react';
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import { B400, B300, B500 } from '@atlaskit/theme/colors';
|
|
10
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import { getEventHandler } from '../../utils';
|
|
12
11
|
import { PLATFORM, MODE } from '../../analytics/events';
|
|
@@ -14,13 +13,13 @@ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/anal
|
|
|
14
13
|
import LinkUrl from '@atlaskit/smart-card/link-url';
|
|
15
14
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
16
15
|
var anchorStyles = css({
|
|
17
|
-
color: "var(--ds-link,
|
|
16
|
+
color: "var(--ds-link, #1868DB)",
|
|
18
17
|
'&:hover': {
|
|
19
|
-
color: "var(--ds-link,
|
|
18
|
+
color: "var(--ds-link, #1868DB)",
|
|
20
19
|
textDecoration: 'underline'
|
|
21
20
|
},
|
|
22
21
|
'&:active': {
|
|
23
|
-
color: "var(--ds-link-pressed,
|
|
22
|
+
color: "var(--ds-link-pressed, #1558BC)"
|
|
24
23
|
}
|
|
25
24
|
});
|
|
26
25
|
export default function Link(props) {
|
|
@@ -36,7 +35,7 @@ export default function Link(props) {
|
|
|
36
35
|
try {
|
|
37
36
|
var _onSetLinkTarget;
|
|
38
37
|
actualTarget = (_onSetLinkTarget = onSetLinkTarget(href)) !== null && _onSetLinkTarget !== void 0 ? _onSetLinkTarget : actualTarget;
|
|
39
|
-
} catch (error) {
|
|
38
|
+
} catch (error) {// eslint-disable-line no-unused-vars
|
|
40
39
|
// If URL parsing fails, use the original target
|
|
41
40
|
}
|
|
42
41
|
}
|
|
@@ -62,7 +61,9 @@ export default function Link(props) {
|
|
|
62
61
|
return jsx(AnalyticsContext, {
|
|
63
62
|
data: analyticsData
|
|
64
63
|
}, jsx(LinkUrl, _extends({
|
|
65
|
-
css: anchorStyles
|
|
64
|
+
css: anchorStyles
|
|
65
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
66
|
+
,
|
|
66
67
|
onClick: function onClick(e) {
|
|
67
68
|
if (fireAnalyticsEvent) {
|
|
68
69
|
fireAnalyticsEvent({
|
|
@@ -16,37 +16,36 @@ import { DatasourceTableView } from '@atlaskit/link-datasource';
|
|
|
16
16
|
import { CardSSR } from '@atlaskit/smart-card/ssr';
|
|
17
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
18
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
|
-
import { N40 } from '@atlaskit/theme/colors';
|
|
20
19
|
import { calcBreakoutWidth, canRenderDatasource } from '@atlaskit/editor-common/utils';
|
|
21
20
|
import { usePortal } from '../../ui/Renderer/PortalContext';
|
|
22
21
|
import { RendererCssClassName } from '../../consts';
|
|
23
22
|
var datasourceCenterWrapperStyles = css({
|
|
24
|
-
marginTop: "var(--ds-space-150,
|
|
25
|
-
marginBottom: "var(--ds-space-150,
|
|
23
|
+
marginTop: "var(--ds-space-150, 12px)",
|
|
24
|
+
marginBottom: "var(--ds-space-150, 12px)"
|
|
26
25
|
});
|
|
27
26
|
var datasourceContainerStyleWithMarginTop = css({
|
|
28
27
|
borderRadius: "var(--ds-radius-large, 8px)",
|
|
29
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border,
|
|
28
|
+
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)"),
|
|
30
29
|
overflow: 'hidden',
|
|
31
|
-
marginTop: "var(--ds-space-150,
|
|
32
|
-
marginBottom: "var(--ds-space-150,
|
|
30
|
+
marginTop: "var(--ds-space-150, 12px)",
|
|
31
|
+
marginBottom: "var(--ds-space-150, 12px)"
|
|
33
32
|
});
|
|
34
33
|
|
|
35
34
|
// No vertical margin when inside center wrapper (wrapper has margin so it participates in collapse). Styles from datasourceContainerStyleLegacy
|
|
36
35
|
var datasourceContainerStyleNoVerticalMargin = css({
|
|
37
36
|
borderRadius: "var(--ds-radius-large, 8px)",
|
|
38
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border,
|
|
37
|
+
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)"),
|
|
39
38
|
overflow: 'hidden'
|
|
40
39
|
});
|
|
41
40
|
var datasourceContainerStyleLegacy = css({
|
|
42
41
|
borderRadius: "var(--ds-radius-large, 8px)",
|
|
43
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border,
|
|
42
|
+
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)"),
|
|
44
43
|
overflow: 'hidden',
|
|
45
44
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
46
45
|
marginLeft: '50%',
|
|
47
|
-
marginBottom: "var(--ds-space-150,
|
|
46
|
+
marginBottom: "var(--ds-space-150, 12px)",
|
|
48
47
|
transform: 'translateX(-50%)',
|
|
49
|
-
marginTop: "var(--ds-space-150,
|
|
48
|
+
marginTop: "var(--ds-space-150, 12px)"
|
|
50
49
|
});
|
|
51
50
|
export default function BlockCard(props) {
|
|
52
51
|
var url = props.url,
|
|
@@ -96,6 +95,8 @@ export default function BlockCard(props) {
|
|
|
96
95
|
var key = _ref3.key;
|
|
97
96
|
return key;
|
|
98
97
|
});
|
|
98
|
+
|
|
99
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
|
|
99
100
|
var columnCustomSizesEntries = columns === null || columns === void 0 ? void 0 : columns.filter(function (c) {
|
|
100
101
|
return !!c.width;
|
|
101
102
|
}).map(function (_ref4) {
|
|
@@ -104,6 +105,8 @@ export default function BlockCard(props) {
|
|
|
104
105
|
return [key, width];
|
|
105
106
|
});
|
|
106
107
|
var columnCustomSizes = columnCustomSizesEntries !== null && columnCustomSizesEntries !== void 0 && columnCustomSizesEntries.length ? Object.fromEntries(columnCustomSizesEntries) : undefined;
|
|
108
|
+
|
|
109
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
|
|
107
110
|
var wrappedColumnKeys = columns === null || columns === void 0 ? void 0 : columns.filter(function (c) {
|
|
108
111
|
return c.isWrapped;
|
|
109
112
|
}).map(function (c) {
|
|
@@ -191,7 +194,9 @@ export default function BlockCard(props) {
|
|
|
191
194
|
}, jsx("div", {
|
|
192
195
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
193
196
|
className: "blockCardView-content-wrap",
|
|
194
|
-
"data-block-card": true
|
|
197
|
+
"data-block-card": true
|
|
198
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
|
|
199
|
+
,
|
|
195
200
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
196
201
|
"data-card-url": url,
|
|
197
202
|
"data-local-id": localId
|
|
@@ -6,11 +6,10 @@
|
|
|
6
6
|
import { jsx, css } from '@emotion/react';
|
|
7
7
|
import CopyButton from './codeBlockCopyButton';
|
|
8
8
|
import CodeWrapButton from './codeBlockWrapButton';
|
|
9
|
-
import { N0, N20, N30, N700 } from '@atlaskit/theme/colors';
|
|
10
9
|
var codeBlockButtonsWrapper = css({
|
|
11
10
|
position: 'sticky',
|
|
12
11
|
top: '0px',
|
|
13
|
-
background: "
|
|
12
|
+
background: "var(--ds-surface, #FFFFFF)"
|
|
14
13
|
});
|
|
15
14
|
var codeBlockButtonsStyle = css({
|
|
16
15
|
display: 'flex',
|
|
@@ -25,24 +24,24 @@ var codeBlockButtonsStyle = css({
|
|
|
25
24
|
button: {
|
|
26
25
|
height: '32px',
|
|
27
26
|
width: '32px',
|
|
28
|
-
border: "var(--ds-border-width-selected, 2px)".concat(" solid ", "var(--ds-border,
|
|
27
|
+
border: "var(--ds-border-width-selected, 2px)".concat(" solid ", "var(--ds-border, #0B120E24)"),
|
|
29
28
|
borderRadius: "var(--ds-radius-small, 4px)",
|
|
30
29
|
marginLeft: "var(--ds-space-050, 4px)",
|
|
31
30
|
padding: "var(--ds-space-025, 2px)",
|
|
32
|
-
background: "
|
|
33
|
-
color: "var(--ds-icon,
|
|
31
|
+
background: "var(--ds-surface-overlay, #FFFFFF)",
|
|
32
|
+
color: "var(--ds-icon, #292A2E)",
|
|
34
33
|
'&:hover': {
|
|
35
34
|
borderWidth: "var(--ds-border-width-selected, 2px)",
|
|
36
|
-
backgroundColor: "
|
|
35
|
+
backgroundColor: "var(--ds-surface-overlay-hovered, #F0F1F2)",
|
|
37
36
|
height: '32px',
|
|
38
37
|
width: '32px'
|
|
39
38
|
},
|
|
40
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
41
40
|
'&.clicked': {
|
|
42
|
-
backgroundColor: "
|
|
41
|
+
backgroundColor: "var(--ds-background-neutral-bold-pressed, #505258)",
|
|
43
42
|
borderRadius: "var(--ds-radius-small, 4px)",
|
|
44
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
45
|
-
color: "
|
|
44
|
+
color: "var(--ds-icon-inverse, #FFFFFF)".concat(" !important")
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
});
|
|
@@ -5,14 +5,13 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
5
5
|
*/
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
7
|
import { jsx, css } from '@emotion/react';
|
|
8
|
-
import { N20 } from '@atlaskit/theme/colors';
|
|
9
8
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
10
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
10
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
11
|
import CodeBlockButtonContainer from './codeBlockButtonContainer';
|
|
13
12
|
var codeBlockStyleOverrides = css(_defineProperty({
|
|
14
13
|
tabSize: 4,
|
|
15
|
-
backgroundColor: "var(--ds-surface-raised,
|
|
14
|
+
backgroundColor: "var(--ds-surface-raised, #FFFFFF)",
|
|
16
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
17
16
|
button: {
|
|
18
17
|
opacity: 0,
|
|
@@ -48,7 +48,9 @@ var CopyButton = function CopyButton(_ref) {
|
|
|
48
48
|
className: className,
|
|
49
49
|
iconBefore: jsx(CopyIcon, {
|
|
50
50
|
label: tooltip
|
|
51
|
-
})
|
|
51
|
+
})
|
|
52
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
53
|
+
,
|
|
52
54
|
onClick: function onClick(event) {
|
|
53
55
|
fireAnalyticsEvent({
|
|
54
56
|
// @ts-expect-error - Type 'ACTION.CLICKED' is not assignable to type 'ACTION.CLICKED | ACTION.MEDIA_LINK_TRANSFORMED | ACTION.STARTED | ACTION.TOGGLE_EXPAND | ACTION.UNSUPPORTED_CONTENT_ENCOUNTERED | ACTION.VISITED | ACTION.RENDERED | ACTION.INVALID_PROSEMIRROR_DOCUMENT | ACTION.CRASHED | ... 6 more ... | AnnotationActionType'.
|
|
@@ -32,7 +32,9 @@ var CodeBlockWrapButton = function CodeBlockWrapButton(_ref) {
|
|
|
32
32
|
iconBefore: jsx(TextWrapIcon, {
|
|
33
33
|
label: ""
|
|
34
34
|
}),
|
|
35
|
-
isSelected: wrapLongLines
|
|
35
|
+
isSelected: wrapLongLines
|
|
36
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
37
|
+
,
|
|
36
38
|
onClick: function onClick(event) {
|
|
37
39
|
fireAnalyticsEvent({
|
|
38
40
|
// @ts-expect-error - Type 'ACTION.CLICKED' is not assignable to type 'ACTION.CLICKED | ACTION.MEDIA_LINK_TRANSFORMED | ACTION.STARTED | ACTION.TOGGLE_EXPAND | ACTION.UNSUPPORTED_CONTENT_ENCOUNTERED | ACTION.VISITED | ACTION.RENDERED | ACTION.INVALID_PROSEMIRROR_DOCUMENT | ACTION.CRASHED | ... 6 more ... | AnnotationActionType'
|
|
@@ -111,7 +111,7 @@ var codeBlockSharedStyles = css(_defineProperty(_defineProperty(_defineProperty(
|
|
|
111
111
|
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
112
112
|
lineHeight: '1.5rem',
|
|
113
113
|
textAlign: 'right',
|
|
114
|
-
color: "var(--ds-text-subtlest, #
|
|
114
|
+
color: "var(--ds-text-subtlest, #6B6E76)",
|
|
115
115
|
boxSizing: 'content-box'
|
|
116
116
|
})));
|
|
117
117
|
var lightWeightCodeBlockStyles = css(_defineProperty({}, ".".concat(CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER), {
|
|
@@ -43,7 +43,9 @@ var EmojiNode = /*#__PURE__*/function (_PureComponent) {
|
|
|
43
43
|
if (!providers.emojiProvider) {
|
|
44
44
|
return null;
|
|
45
45
|
}
|
|
46
|
-
return jsx(ResourcedEmoji
|
|
46
|
+
return jsx(ResourcedEmoji
|
|
47
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
48
|
+
, {
|
|
47
49
|
emojiId: {
|
|
48
50
|
id: id,
|
|
49
51
|
fallback: fallback,
|
|
@@ -79,7 +81,9 @@ var EmojiNode = /*#__PURE__*/function (_PureComponent) {
|
|
|
79
81
|
}, {
|
|
80
82
|
key: "render",
|
|
81
83
|
value: function render() {
|
|
82
|
-
return jsx(WithProviders
|
|
84
|
+
return jsx(WithProviders
|
|
85
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
86
|
+
, {
|
|
83
87
|
providers: ['emojiProvider'],
|
|
84
88
|
providerFactory: this.providerFactory,
|
|
85
89
|
renderNode: this.renderWithProvider
|
|
@@ -45,7 +45,9 @@ function WrappedHeadingAnchor(_ref) {
|
|
|
45
45
|
var fireAnalyticsEvent = _ref2.fireAnalyticsEvent;
|
|
46
46
|
return jsx(HeadingAnchor, {
|
|
47
47
|
enableNestedHeaderLinks: enableNestedHeaderLinks,
|
|
48
|
-
level: level
|
|
48
|
+
level: level
|
|
49
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
50
|
+
,
|
|
49
51
|
onCopyText: function onCopyText() {
|
|
50
52
|
fireAnalyticsEvent({
|
|
51
53
|
action: ACTION.CLICKED,
|
|
@@ -101,7 +101,9 @@ var OverlayWithCardContext = function OverlayWithCardContext(_ref) {
|
|
|
101
101
|
url: url,
|
|
102
102
|
compactPadding: rendererAppearance === 'comment',
|
|
103
103
|
showPanelButton: showPanelButton,
|
|
104
|
-
showPanelButtonIcon: showPanelButtonIcon
|
|
104
|
+
showPanelButtonIcon: showPanelButtonIcon
|
|
105
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
106
|
+
,
|
|
105
107
|
onClick: function onClick(event) {
|
|
106
108
|
if (isPreviewPanelAvailable) {
|
|
107
109
|
var _extractSmartLinkEmbe;
|
|
@@ -203,7 +205,9 @@ var InlineCard = function InlineCard(props) {
|
|
|
203
205
|
appearance: SMART_LINK_APPEARANCE.INLINE,
|
|
204
206
|
source: SMART_LINK_DRAG_TYPES.RENDERER
|
|
205
207
|
}, jsx("span", _extends({
|
|
206
|
-
"data-inline-card": true
|
|
208
|
+
"data-inline-card": true
|
|
209
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
|
|
210
|
+
,
|
|
207
211
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
208
212
|
"data-card-url": url
|
|
209
213
|
// Ignored via go/ees005
|
|
@@ -242,7 +246,9 @@ var InlineCard = function InlineCard(props) {
|
|
|
242
246
|
appearance: SMART_LINK_APPEARANCE.INLINE,
|
|
243
247
|
source: SMART_LINK_DRAG_TYPES.RENDERER
|
|
244
248
|
}, jsx("span", {
|
|
245
|
-
"data-inline-card": true
|
|
249
|
+
"data-inline-card": true
|
|
250
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
|
|
251
|
+
,
|
|
246
252
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
247
253
|
"data-card-url": url,
|
|
248
254
|
"data-renderer-mark": inlineAnnotationProps['data-renderer-mark'],
|
|
@@ -262,7 +268,9 @@ var InlineCard = function InlineCard(props) {
|
|
|
262
268
|
url: url,
|
|
263
269
|
showHoverPreview: !hideHoverPreview,
|
|
264
270
|
actionOptions: actionOptions,
|
|
265
|
-
onClick: onClick
|
|
271
|
+
onClick: onClick
|
|
272
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
273
|
+
,
|
|
266
274
|
onResolve: function onResolve(data) {
|
|
267
275
|
if (!data.url || !data.title) {
|
|
268
276
|
return;
|
|
@@ -292,7 +300,9 @@ var InlineCard = function InlineCard(props) {
|
|
|
292
300
|
url: url,
|
|
293
301
|
showHoverPreview: !hideHoverPreview,
|
|
294
302
|
actionOptions: actionOptions,
|
|
295
|
-
onClick: onClick
|
|
303
|
+
onClick: onClick
|
|
304
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
305
|
+
,
|
|
296
306
|
onResolve: function onResolve(data) {
|
|
297
307
|
if (!data.url || !data.title) {
|
|
298
308
|
return;
|
|
@@ -313,7 +323,9 @@ var InlineCard = function InlineCard(props) {
|
|
|
313
323
|
}, jsx(AnalyticsContext, {
|
|
314
324
|
data: analyticsData
|
|
315
325
|
}, jsx("span", _extends({
|
|
316
|
-
"data-inline-card": true
|
|
326
|
+
"data-inline-card": true
|
|
327
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-computations-in-render -- Ignored via go/ees017 (to be fixed)
|
|
328
|
+
,
|
|
317
329
|
"data-card-data": data ? JSON.stringify(data) : undefined,
|
|
318
330
|
"data-card-url": url
|
|
319
331
|
// Ignored via go/ees005
|
|
@@ -336,6 +348,7 @@ var InlineCard = function InlineCard(props) {
|
|
|
336
348
|
// Ignored via go/ees005
|
|
337
349
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
338
350
|
}, cardProps, {
|
|
351
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
339
352
|
onResolve: function onResolve(data) {
|
|
340
353
|
if (!data.url || !data.title) {
|
|
341
354
|
return;
|
|
@@ -107,12 +107,15 @@ var MediaAnnotation = function MediaAnnotation(_ref3) {
|
|
|
107
107
|
}
|
|
108
108
|
return jsx(AnnotationComponent, {
|
|
109
109
|
id: mark.attrs.id,
|
|
110
|
-
annotationType: mark.attrs.annotationType
|
|
110
|
+
annotationType: mark.attrs.annotationType
|
|
111
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
112
|
+
,
|
|
111
113
|
dataAttributes: {
|
|
112
114
|
'data-renderer-mark': true,
|
|
113
115
|
'data-block-mark': true
|
|
114
116
|
}
|
|
115
117
|
// This should be fine being empty [] since the serializer serializeFragmentChild getMarkProps call always passes
|
|
118
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
116
119
|
,
|
|
117
120
|
annotationParentIds: [],
|
|
118
121
|
allowAnnotations: true,
|
|
@@ -201,10 +204,14 @@ var CommentBadgeWrapper = function CommentBadgeWrapper(_ref5) {
|
|
|
201
204
|
});
|
|
202
205
|
}
|
|
203
206
|
};
|
|
204
|
-
return jsx(CommentBadgeNext
|
|
207
|
+
return jsx(CommentBadgeNext
|
|
208
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
209
|
+
, _extends({
|
|
205
210
|
onMouseEnter: function onMouseEnter() {
|
|
206
211
|
return setEntered(true);
|
|
207
|
-
}
|
|
212
|
+
}
|
|
213
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
214
|
+
,
|
|
208
215
|
onMouseLeave: function onMouseLeave() {
|
|
209
216
|
return setEntered(false);
|
|
210
217
|
},
|
|
@@ -254,7 +261,9 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
254
261
|
marks: annotationMarks
|
|
255
262
|
}, jsx(MediaBorder, {
|
|
256
263
|
mark: borderMark
|
|
257
|
-
}, jsx(AnalyticsContext
|
|
264
|
+
}, jsx(AnalyticsContext
|
|
265
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
266
|
+
, {
|
|
258
267
|
data: _defineProperty({}, MEDIA_CONTEXT, {
|
|
259
268
|
border: !!borderMark
|
|
260
269
|
})
|
|
@@ -322,7 +331,9 @@ var Media = /*#__PURE__*/function (_PureComponent) {
|
|
|
322
331
|
if (!providers) {
|
|
323
332
|
return this.renderCard();
|
|
324
333
|
}
|
|
325
|
-
return jsx(WithProviders
|
|
334
|
+
return jsx(WithProviders
|
|
335
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
336
|
+
, {
|
|
326
337
|
providers: ['mediaProvider', 'contextIdentifierProvider'],
|
|
327
338
|
providerFactory: providers,
|
|
328
339
|
renderNode: this.renderCard
|
|
@@ -350,10 +361,14 @@ var MediaWithDraftAnnotation = function MediaWithDraftAnnotation(props) {
|
|
|
350
361
|
}
|
|
351
362
|
var posToCheck = ((_draftPosition$from = draftPosition === null || draftPosition === void 0 ? void 0 : draftPosition.from) !== null && _draftPosition$from !== void 0 ? _draftPosition$from : 0) + 1;
|
|
352
363
|
if (draftPosition !== null && posToCheck === pos) {
|
|
364
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
353
365
|
setShouldApplyDraftAnnotation(true);
|
|
366
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
354
367
|
setPosition(posToCheck);
|
|
355
368
|
} else if (draftPosition === null && shouldApplyDraftAnnotation) {
|
|
369
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
356
370
|
setShouldApplyDraftAnnotation(false);
|
|
371
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
357
372
|
setPosition(undefined);
|
|
358
373
|
}
|
|
359
374
|
}, [draftPosition, pos, shouldApplyDraftAnnotation]);
|
|
@@ -91,6 +91,7 @@ var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
|
91
91
|
}, [identifier, collectionName]);
|
|
92
92
|
useEffect(function () {
|
|
93
93
|
var id = clipboardAttrs.id;
|
|
94
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-chain-state-updates -- Ignored via go/ees017 (to be fixed)
|
|
94
95
|
id && updateFileState(id);
|
|
95
96
|
}, [contextIdentifier, clipboardAttrs, updateFileState]);
|
|
96
97
|
|
|
@@ -181,7 +182,9 @@ var MediaInline = function MediaInline(props) {
|
|
|
181
182
|
alt: alt,
|
|
182
183
|
width: width,
|
|
183
184
|
height: height,
|
|
184
|
-
ssr: ssr
|
|
185
|
+
ssr: ssr
|
|
186
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
187
|
+
,
|
|
185
188
|
border: {
|
|
186
189
|
borderSize: borderSize,
|
|
187
190
|
borderColor: borderColor
|
|
@@ -237,7 +237,9 @@ var MediaSingleWithChildren = function MediaSingleWithChildren(props) {
|
|
|
237
237
|
width: width,
|
|
238
238
|
height: height,
|
|
239
239
|
lineLength: isInsideOfBlockNode ? containerWidth : lineLength,
|
|
240
|
-
containerWidth: containerWidth
|
|
240
|
+
containerWidth: containerWidth
|
|
241
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
242
|
+
,
|
|
241
243
|
size: {
|
|
242
244
|
width: widthAttr,
|
|
243
245
|
widthType: widthType
|