@atlaskit/renderer 108.17.2 → 108.17.4
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 +12 -0
- package/dist/cjs/react/marks/alignment.js +2 -3
- package/dist/cjs/react/marks/breakout.js +2 -3
- package/dist/cjs/react/marks/link.js +3 -4
- package/dist/cjs/react/nodes/blockCard.js +11 -13
- package/dist/cjs/react/nodes/codeBlock/codeBlock.js +2 -5
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockButtonContainer.js +4 -6
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +2 -3
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockCopyButton.js +8 -11
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockWrapButton.js +8 -11
- package/dist/cjs/react/nodes/codeBlock/components/lightWeightCodeBlock.js +7 -8
- package/dist/cjs/react/nodes/codeBlock/windowedCodeBlock.js +5 -6
- package/dist/cjs/react/nodes/embedCard.js +8 -9
- package/dist/cjs/react/nodes/heading-anchor.js +4 -5
- package/dist/cjs/react/nodes/layoutColumn.js +2 -3
- package/dist/cjs/react/nodes/media/index.js +7 -8
- package/dist/cjs/react/nodes/mediaSingle/index.js +3 -6
- package/dist/cjs/react/nodes/mediaSingle/styles.js +0 -1
- package/dist/cjs/react/nodes/panel.js +7 -9
- package/dist/cjs/react/nodes/table/sticky.js +6 -7
- package/dist/cjs/ui/Expand.js +16 -18
- package/dist/cjs/ui/Renderer/index.js +22 -23
- package/dist/cjs/ui/Renderer/truncated-wrapper.js +2 -3
- package/dist/cjs/ui/SortingIcon.js +4 -5
- package/dist/cjs/ui/annotations/draft/component.js +8 -9
- package/dist/cjs/ui/annotations/element/mark.js +1 -2
- package/dist/es2019/react/marks/alignment.js +3 -4
- package/dist/es2019/react/marks/breakout.js +3 -4
- package/dist/es2019/react/marks/link.js +4 -5
- package/dist/es2019/react/nodes/blockCard.js +12 -13
- package/dist/es2019/react/nodes/codeBlock/codeBlock.js +2 -4
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockButtonContainer.js +5 -6
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +3 -4
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockCopyButton.js +5 -7
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockWrapButton.js +7 -9
- package/dist/es2019/react/nodes/codeBlock/components/lightWeightCodeBlock.js +8 -9
- package/dist/es2019/react/nodes/codeBlock/windowedCodeBlock.js +4 -6
- package/dist/es2019/react/nodes/embedCard.js +9 -10
- package/dist/es2019/react/nodes/heading-anchor.js +5 -6
- package/dist/es2019/react/nodes/layoutColumn.js +3 -4
- package/dist/es2019/react/nodes/media/index.js +6 -9
- package/dist/es2019/react/nodes/mediaSingle/index.js +3 -6
- package/dist/es2019/react/nodes/mediaSingle/styles.js +0 -1
- package/dist/es2019/react/nodes/panel.js +7 -8
- package/dist/es2019/react/nodes/table/sticky.js +7 -8
- package/dist/es2019/ui/Expand.js +16 -17
- package/dist/es2019/ui/Renderer/index.js +21 -23
- package/dist/es2019/ui/Renderer/truncated-wrapper.js +3 -4
- package/dist/es2019/ui/SortingIcon.js +5 -6
- package/dist/es2019/ui/annotations/draft/component.js +9 -10
- package/dist/es2019/ui/annotations/element/mark.js +2 -3
- package/dist/esm/react/marks/alignment.js +3 -4
- package/dist/esm/react/marks/breakout.js +3 -4
- package/dist/esm/react/marks/link.js +4 -5
- package/dist/esm/react/nodes/blockCard.js +12 -13
- package/dist/esm/react/nodes/codeBlock/codeBlock.js +2 -4
- package/dist/esm/react/nodes/codeBlock/components/codeBlockButtonContainer.js +5 -6
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +3 -4
- package/dist/esm/react/nodes/codeBlock/components/codeBlockCopyButton.js +5 -7
- package/dist/esm/react/nodes/codeBlock/components/codeBlockWrapButton.js +7 -9
- package/dist/esm/react/nodes/codeBlock/components/lightWeightCodeBlock.js +8 -9
- package/dist/esm/react/nodes/codeBlock/windowedCodeBlock.js +4 -6
- package/dist/esm/react/nodes/embedCard.js +9 -10
- package/dist/esm/react/nodes/heading-anchor.js +5 -6
- package/dist/esm/react/nodes/layoutColumn.js +3 -4
- package/dist/esm/react/nodes/media/index.js +6 -9
- package/dist/esm/react/nodes/mediaSingle/index.js +3 -6
- package/dist/esm/react/nodes/mediaSingle/styles.js +0 -1
- package/dist/esm/react/nodes/panel.js +7 -8
- package/dist/esm/react/nodes/table/sticky.js +7 -8
- package/dist/esm/ui/Expand.js +16 -17
- package/dist/esm/ui/Renderer/index.js +21 -23
- package/dist/esm/ui/Renderer/truncated-wrapper.js +3 -4
- package/dist/esm/ui/SortingIcon.js +5 -6
- package/dist/esm/ui/annotations/draft/component.js +9 -10
- package/dist/esm/ui/annotations/element/mark.js +2 -3
- package/package.json +3 -3
|
@@ -10,9 +10,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
11
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
12
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
|
-
/** @jsx jsx */
|
|
14
13
|
import React, { Fragment, useContext, useLayoutEffect, useRef } from 'react';
|
|
15
|
-
import { jsx } from '@emotion/react';
|
|
16
14
|
import { PureComponent } from 'react';
|
|
17
15
|
import { getSchemaBasedOnStage } from '@atlaskit/adf-schema/schema-default';
|
|
18
16
|
import { reduce } from '@atlaskit/adf-utils/traverse';
|
|
@@ -45,7 +43,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
45
43
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
44
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
45
|
var packageName = "@atlaskit/renderer";
|
|
48
|
-
var packageVersion = "108.17.
|
|
46
|
+
var packageVersion = "108.17.4";
|
|
49
47
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
50
48
|
_inherits(Renderer, _PureComponent);
|
|
51
49
|
var _super = _createSuper(Renderer);
|
|
@@ -350,17 +348,17 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
350
348
|
if (onComplete) {
|
|
351
349
|
onComplete(stat);
|
|
352
350
|
}
|
|
353
|
-
var rendererOutput =
|
|
351
|
+
var rendererOutput = /*#__PURE__*/React.createElement(RendererContextProvider, {
|
|
354
352
|
value: this.featureFlags(this.props.featureFlags)
|
|
355
|
-
},
|
|
353
|
+
}, /*#__PURE__*/React.createElement(ActiveHeaderIdProvider, {
|
|
356
354
|
value: getActiveHeadingId(allowHeadingAnchorLinks)
|
|
357
|
-
},
|
|
355
|
+
}, /*#__PURE__*/React.createElement(AnalyticsContext.Provider, {
|
|
358
356
|
value: {
|
|
359
357
|
fireAnalyticsEvent: function fireAnalyticsEvent(event) {
|
|
360
358
|
return _this3.fireAnalyticsEvent(event);
|
|
361
359
|
}
|
|
362
360
|
}
|
|
363
|
-
},
|
|
361
|
+
}, /*#__PURE__*/React.createElement(SmartCardStorageProvider, null, /*#__PURE__*/React.createElement(RendererWrapper, {
|
|
364
362
|
appearance: appearance,
|
|
365
363
|
allowNestedHeaderLinks: allowNestedHeaderLinks,
|
|
366
364
|
allowColumnSorting: allowColumnSorting,
|
|
@@ -373,30 +371,30 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
373
371
|
innerRef: this.editorRef,
|
|
374
372
|
onClick: handleWrapperOnClick,
|
|
375
373
|
onMouseDown: this.onMouseDownEditView
|
|
376
|
-
}, enableSsrInlineScripts ?
|
|
374
|
+
}, enableSsrInlineScripts ? /*#__PURE__*/React.createElement(BreakoutSSRInlineScript, null) : null, /*#__PURE__*/React.createElement(RendererActionsInternalUpdater, {
|
|
377
375
|
doc: pmDoc,
|
|
378
376
|
schema: schema,
|
|
379
377
|
onAnalyticsEvent: this.fireAnalyticsEvent
|
|
380
378
|
}, result))))));
|
|
381
|
-
var rendererResult = truncated ?
|
|
379
|
+
var rendererResult = truncated ? /*#__PURE__*/React.createElement(TruncatedWrapper, {
|
|
382
380
|
height: maxHeight,
|
|
383
381
|
fadeHeight: fadeOutHeight
|
|
384
382
|
}, rendererOutput) : rendererOutput;
|
|
385
383
|
var rendererRenderTracking = (_this$featureFlags2 = this.featureFlags(this.props.featureFlags)) === null || _this$featureFlags2 === void 0 || (_this$featureFlags2 = _this$featureFlags2.featureFlags) === null || _this$featureFlags2 === void 0 || (_this$featureFlags2 = _this$featureFlags2.rendererRenderTracking) === null || _this$featureFlags2 === void 0 ? void 0 : _this$featureFlags2[ACTION_SUBJECT.RENDERER];
|
|
386
|
-
var reRenderTracking = (rendererRenderTracking === null || rendererRenderTracking === void 0 ? void 0 : rendererRenderTracking.enabled) &&
|
|
384
|
+
var reRenderTracking = (rendererRenderTracking === null || rendererRenderTracking === void 0 ? void 0 : rendererRenderTracking.enabled) && /*#__PURE__*/React.createElement(RenderTracking, {
|
|
387
385
|
componentProps: this.props,
|
|
388
386
|
action: ACTION.RE_RENDERED,
|
|
389
387
|
actionSubject: ACTION_SUBJECT.RENDERER,
|
|
390
388
|
handleAnalyticsEvent: this.fireAnalyticsEvent,
|
|
391
389
|
useShallow: rendererRenderTracking.useShallow
|
|
392
390
|
});
|
|
393
|
-
return
|
|
391
|
+
return /*#__PURE__*/React.createElement(Fragment, null, reRenderTracking, rendererResult);
|
|
394
392
|
} catch (e) {
|
|
395
393
|
var _featureFlags$feature2;
|
|
396
394
|
if (onError) {
|
|
397
395
|
onError(e);
|
|
398
396
|
}
|
|
399
|
-
return
|
|
397
|
+
return /*#__PURE__*/React.createElement(RendererWrapper, {
|
|
400
398
|
appearance: appearance,
|
|
401
399
|
allowCopyToClipboard: allowCopyToClipboard,
|
|
402
400
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
@@ -406,7 +404,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
406
404
|
useBlockRenderForCodeBlock: (_featureFlags$feature2 = featureFlags.featureFlags.useBlockRenderForCodeBlock) !== null && _featureFlags$feature2 !== void 0 ? _featureFlags$feature2 : true,
|
|
407
405
|
addTelepointer: this.props.addTelepointer,
|
|
408
406
|
onClick: handleWrapperOnClick
|
|
409
|
-
},
|
|
407
|
+
}, /*#__PURE__*/React.createElement(UnsupportedBlock, null));
|
|
410
408
|
}
|
|
411
409
|
}
|
|
412
410
|
}, {
|
|
@@ -427,7 +425,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
427
425
|
return Renderer;
|
|
428
426
|
}(PureComponent);
|
|
429
427
|
var RendererWithAnalytics = /*#__PURE__*/React.memo(function (props) {
|
|
430
|
-
return
|
|
428
|
+
return /*#__PURE__*/React.createElement(FabricEditorAnalyticsContext, {
|
|
431
429
|
data: {
|
|
432
430
|
appearance: getAnalyticsAppearance(props.appearance),
|
|
433
431
|
packageName: packageName,
|
|
@@ -435,15 +433,15 @@ var RendererWithAnalytics = /*#__PURE__*/React.memo(function (props) {
|
|
|
435
433
|
componentName: 'renderer',
|
|
436
434
|
editorSessionId: uuid()
|
|
437
435
|
}
|
|
438
|
-
},
|
|
436
|
+
}, /*#__PURE__*/React.createElement(WithCreateAnalyticsEvent, {
|
|
439
437
|
render: function render(createAnalyticsEvent) {
|
|
440
438
|
// `IntlErrorBoundary` only captures Internationalisation errors, leaving others for `ErrorBoundary`.
|
|
441
|
-
return
|
|
439
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
442
440
|
component: ACTION_SUBJECT.RENDERER,
|
|
443
441
|
rethrowError: true,
|
|
444
442
|
fallbackComponent: null,
|
|
445
443
|
createAnalyticsEvent: createAnalyticsEvent
|
|
446
|
-
},
|
|
444
|
+
}, /*#__PURE__*/React.createElement(IntlErrorBoundary, null, /*#__PURE__*/React.createElement(Renderer, _extends({}, props, {
|
|
447
445
|
createAnalyticsEvent: createAnalyticsEvent
|
|
448
446
|
}))));
|
|
449
447
|
}
|
|
@@ -510,12 +508,12 @@ var RendererWrapper = /*#__PURE__*/React.memo(function (props) {
|
|
|
510
508
|
};
|
|
511
509
|
}
|
|
512
510
|
}, [innerRef, addTelepointer]);
|
|
513
|
-
return
|
|
511
|
+
return /*#__PURE__*/React.createElement(WidthProvider, {
|
|
514
512
|
className: "ak-renderer-wrapper is-".concat(appearance),
|
|
515
513
|
"data-appearance": appearance
|
|
516
|
-
},
|
|
514
|
+
}, /*#__PURE__*/React.createElement(BaseTheme, {
|
|
517
515
|
baseFontSize: appearance && appearance !== 'comment' ? akEditorFullPageDefaultFontSize : undefined
|
|
518
|
-
},
|
|
516
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
519
517
|
ref: innerRef,
|
|
520
518
|
onClick: onClick,
|
|
521
519
|
onMouseDown: onMouseDown,
|
|
@@ -552,15 +550,15 @@ var RendererWithAnnotationSelection = function RendererWithAnnotationSelection(p
|
|
|
552
550
|
var localRef = React.useRef(null);
|
|
553
551
|
var innerRef = props.innerRef || localRef;
|
|
554
552
|
if (!allowAnnotations) {
|
|
555
|
-
return
|
|
553
|
+
return /*#__PURE__*/React.createElement(RendererWithAnalytics, _extends({
|
|
556
554
|
innerRef: innerRef
|
|
557
555
|
}, props));
|
|
558
556
|
}
|
|
559
|
-
return
|
|
557
|
+
return /*#__PURE__*/React.createElement(RendererActionsContext, null, /*#__PURE__*/React.createElement(AnnotationsWrapper, {
|
|
560
558
|
rendererRef: innerRef,
|
|
561
559
|
adfDocument: adfDocument,
|
|
562
560
|
annotationProvider: props.annotationProvider
|
|
563
|
-
},
|
|
561
|
+
}, /*#__PURE__*/React.createElement(RendererWithAnalytics, _extends({
|
|
564
562
|
innerRef: innerRef
|
|
565
563
|
}, props, {
|
|
566
564
|
featureFlags: props.featureFlags
|
|
@@ -7,8 +7,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
7
7
|
var _templateObject;
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
9
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
10
|
-
|
|
11
|
-
import { css, jsx } from '@emotion/react';
|
|
10
|
+
import { css } from '@emotion/react';
|
|
12
11
|
import { Component } from 'react';
|
|
13
12
|
var fadeOutStyles = function fadeOutStyles(maxHeight, top, backgroundColor) {
|
|
14
13
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n overflow-y: hidden;\n max-height: ", "px;\n &::after {\n content: '';\n position: absolute;\n top: ", "px;\n bottom: 0;\n left: 0;\n right: 0;\n background-image: linear-gradient(\n ", ",\n ", "\n );\n }\n"])), maxHeight, top, "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0))", backgroundColor);
|
|
@@ -20,7 +19,7 @@ var FadeOut = function FadeOut(props) {
|
|
|
20
19
|
height = props.height;
|
|
21
20
|
var top = height - fadeHeight;
|
|
22
21
|
var styles = fadeOutStyles(height, top, backgroundColor);
|
|
23
|
-
return
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
24
23
|
css: styles
|
|
25
24
|
}, children);
|
|
26
25
|
};
|
|
@@ -44,7 +43,7 @@ export var TruncatedWrapper = /*#__PURE__*/function (_Component) {
|
|
|
44
43
|
_this$props$backgroun = _this$props.backgroundColor,
|
|
45
44
|
backgroundColor = _this$props$backgroun === void 0 ? "var(--ds-surface, white)" : _this$props$backgroun,
|
|
46
45
|
children = _this$props.children;
|
|
47
|
-
return
|
|
46
|
+
return /*#__PURE__*/React.createElement(FadeOut, {
|
|
48
47
|
height: height,
|
|
49
48
|
fadeHeight: fadeHeight,
|
|
50
49
|
backgroundColor: backgroundColor
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3;
|
|
3
|
-
|
|
4
|
-
import { css, jsx } from '@emotion/react';
|
|
3
|
+
import { css } from '@emotion/react';
|
|
5
4
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
5
|
import { N20, N30 } from '@atlaskit/theme/colors';
|
|
7
6
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
@@ -93,11 +92,11 @@ var SortingIcon = function SortingIcon(_ref) {
|
|
|
93
92
|
onKeyDown(event);
|
|
94
93
|
}
|
|
95
94
|
};
|
|
96
|
-
return
|
|
95
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
97
96
|
delay: 0,
|
|
98
97
|
content: content,
|
|
99
98
|
position: "top"
|
|
100
|
-
},
|
|
99
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
101
100
|
css: buttonStyles,
|
|
102
101
|
className: buttonClassName,
|
|
103
102
|
role: "button",
|
|
@@ -106,10 +105,10 @@ var SortingIcon = function SortingIcon(_ref) {
|
|
|
106
105
|
"aria-disabled": !isSortingAllowed,
|
|
107
106
|
onClick: handleClick,
|
|
108
107
|
onKeyDown: handleKeyDown
|
|
109
|
-
},
|
|
108
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
110
109
|
css: iconWrapperStyles,
|
|
111
110
|
className: getIconClassName(isSortingAllowed, sortOrdered)
|
|
112
|
-
},
|
|
111
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
113
112
|
css: iconStyles
|
|
114
113
|
}))));
|
|
115
114
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
var _templateObject;
|
|
4
|
-
/** @jsx jsx */
|
|
5
4
|
import React, { Fragment } from 'react';
|
|
6
|
-
import { css
|
|
5
|
+
import { css } from '@emotion/react';
|
|
7
6
|
import { InsertDraftPosition } from '../types';
|
|
8
7
|
import { AnnotationsDraftContext } from '../context';
|
|
9
8
|
import { splitText, calcTextSplitOffset, findTextString } from './text';
|
|
@@ -16,7 +15,7 @@ var markStyles = function markStyles(props) {
|
|
|
16
15
|
export var AnnotationDraft = function AnnotationDraft(_ref) {
|
|
17
16
|
var draftPosition = _ref.draftPosition,
|
|
18
17
|
children = _ref.children;
|
|
19
|
-
return
|
|
18
|
+
return /*#__PURE__*/React.createElement("mark", _extends({
|
|
20
19
|
"data-renderer-mark": true
|
|
21
20
|
}, dataAttributes(draftPosition), {
|
|
22
21
|
css: markStyles
|
|
@@ -41,12 +40,12 @@ export var applyAnnotationOnText = function applyAnnotationOnText(_ref2) {
|
|
|
41
40
|
var annotateIndex = getAnnotationIndex(shouldApplyAnnotationAt, texts.length);
|
|
42
41
|
return texts.map(function (value, index) {
|
|
43
42
|
if (annotateIndex === index) {
|
|
44
|
-
return
|
|
43
|
+
return /*#__PURE__*/React.createElement(AnnotationDraft, {
|
|
45
44
|
key: index,
|
|
46
45
|
draftPosition: draftPosition
|
|
47
46
|
}, value);
|
|
48
47
|
}
|
|
49
|
-
return
|
|
48
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
50
49
|
key: index
|
|
51
50
|
}, value);
|
|
52
51
|
});
|
|
@@ -69,27 +68,27 @@ export var TextWithAnnotationDraft = function TextWithAnnotationDraft(_ref3) {
|
|
|
69
68
|
return calcInsertDraftPositionOnText(textPosition, nextDraftPosition);
|
|
70
69
|
}, [nextDraftPosition, textPosition]);
|
|
71
70
|
if (shouldApplyAnnotationAt === false || !nextDraftPosition) {
|
|
72
|
-
return
|
|
71
|
+
return /*#__PURE__*/React.createElement(Fragment, null, children);
|
|
73
72
|
}
|
|
74
73
|
if (shouldApplyAnnotationAt === InsertDraftPosition.AROUND_TEXT) {
|
|
75
|
-
return
|
|
74
|
+
return /*#__PURE__*/React.createElement(AnnotationDraft, {
|
|
76
75
|
key: 0,
|
|
77
76
|
draftPosition: nextDraftPosition
|
|
78
77
|
}, children);
|
|
79
78
|
}
|
|
80
79
|
var textString = findTextString(children);
|
|
81
80
|
if (!textString) {
|
|
82
|
-
return
|
|
81
|
+
return /*#__PURE__*/React.createElement(Fragment, null, children);
|
|
83
82
|
}
|
|
84
83
|
var offsets = calcTextSplitOffset(nextDraftPosition, textPosition, textString);
|
|
85
84
|
var texts = splitText(textString, offsets);
|
|
86
85
|
if (!texts) {
|
|
87
|
-
return
|
|
86
|
+
return /*#__PURE__*/React.createElement(Fragment, null, children);
|
|
88
87
|
}
|
|
89
88
|
var components = applyAnnotationOnText({
|
|
90
89
|
texts: texts,
|
|
91
90
|
shouldApplyAnnotationAt: shouldApplyAnnotationAt,
|
|
92
91
|
draftPosition: nextDraftPosition
|
|
93
92
|
});
|
|
94
|
-
return
|
|
93
|
+
return /*#__PURE__*/React.createElement(Fragment, null, components);
|
|
95
94
|
};
|
|
@@ -5,9 +5,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
5
5
|
var _templateObject;
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
-
/** @jsx jsx */
|
|
9
8
|
import React, { useMemo, useCallback } from 'react';
|
|
10
|
-
import { css
|
|
9
|
+
import { css } from '@emotion/react';
|
|
11
10
|
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
12
11
|
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
13
12
|
var markStyles = function markStyles(props) {
|
|
@@ -50,7 +49,7 @@ export var MarkComponent = function MarkComponent(_ref) {
|
|
|
50
49
|
} : {
|
|
51
50
|
'aria-details': annotationIds.join(', ')
|
|
52
51
|
};
|
|
53
|
-
return
|
|
52
|
+
return /*#__PURE__*/React.createElement("mark", _extends({
|
|
54
53
|
id: id,
|
|
55
54
|
onClick: onMarkClick
|
|
56
55
|
}, accessibility, overriddenData, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "108.17.
|
|
3
|
+
"version": "108.17.4",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"supportsReact18": true
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@atlaskit/adf-schema": "^
|
|
28
|
+
"@atlaskit/adf-schema": "^35.0.0",
|
|
29
29
|
"@atlaskit/adf-utils": "^19.0.0",
|
|
30
30
|
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
31
31
|
"@atlaskit/analytics-namespaced-context": "^6.7.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/link-datasource": "^1.19.0",
|
|
43
43
|
"@atlaskit/media-card": "^77.4.0",
|
|
44
44
|
"@atlaskit/media-client": "^25.1.0",
|
|
45
|
-
"@atlaskit/media-client-react": "^
|
|
45
|
+
"@atlaskit/media-client-react": "^2.0.0",
|
|
46
46
|
"@atlaskit/media-common": "^11.0.0",
|
|
47
47
|
"@atlaskit/media-filmstrip": "^47.0.0",
|
|
48
48
|
"@atlaskit/media-ui": "^25.0.0",
|