@atlaskit/renderer 104.0.2 → 105.0.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 +45 -0
- package/dist/cjs/actions/index.js +5 -5
- package/dist/cjs/analytics/enums.js +1 -66
- package/dist/cjs/analytics/unsupported-content.js +7 -7
- package/dist/cjs/react/index.js +11 -0
- package/dist/cjs/react/marks/alignment.js +1 -1
- package/dist/cjs/react/marks/link.js +4 -4
- package/dist/cjs/react/nodes/codeBlock/components/codeBlockContainer.js +2 -3
- package/dist/cjs/react/nodes/emoji.js +4 -2
- package/dist/cjs/react/nodes/heading.js +5 -5
- package/dist/cjs/react/nodes/media.js +5 -5
- package/dist/cjs/react/nodes/orderedList.js +30 -2
- package/dist/cjs/react/nodes/panel.js +2 -2
- package/dist/cjs/react/nodes/tableCell.js +9 -8
- package/dist/cjs/react/utils/performance/RenderTracking.js +2 -2
- package/dist/cjs/react/utils/use-select-all-trap.js +7 -7
- package/dist/cjs/render-document.js +7 -7
- package/dist/cjs/text/nodes/orderedList.js +4 -1
- package/dist/cjs/ui/Expand.js +4 -4
- package/dist/cjs/ui/Renderer/ErrorBoundary.js +3 -3
- package/dist/cjs/ui/Renderer/index.js +22 -19
- package/dist/cjs/ui/annotations/hooks/use-events.js +5 -5
- package/dist/cjs/ui/annotations/selection/mounter.js +17 -17
- package/dist/cjs/ui/renderer-props.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +1 -1
- package/dist/es2019/analytics/enums.js +1 -60
- package/dist/es2019/analytics/unsupported-content.js +1 -1
- package/dist/es2019/react/index.js +10 -0
- package/dist/es2019/react/marks/alignment.js +1 -1
- package/dist/es2019/react/marks/link.js +1 -1
- package/dist/es2019/react/nodes/codeBlock/components/codeBlockContainer.js +5 -4
- package/dist/es2019/react/nodes/emoji.js +4 -2
- package/dist/es2019/react/nodes/heading.js +1 -1
- package/dist/es2019/react/nodes/media.js +1 -1
- package/dist/es2019/react/nodes/orderedList.js +26 -2
- package/dist/es2019/react/nodes/panel.js +2 -2
- package/dist/es2019/react/nodes/tableCell.js +3 -2
- package/dist/es2019/react/utils/performance/RenderTracking.js +1 -1
- package/dist/es2019/react/utils/use-select-all-trap.js +1 -1
- package/dist/es2019/render-document.js +1 -1
- package/dist/es2019/text/nodes/orderedList.js +3 -1
- package/dist/es2019/ui/Expand.js +1 -1
- package/dist/es2019/ui/Renderer/ErrorBoundary.js +1 -1
- package/dist/es2019/ui/Renderer/index.js +6 -3
- package/dist/es2019/ui/annotations/hooks/use-events.js +1 -1
- package/dist/es2019/ui/annotations/selection/mounter.js +1 -1
- package/dist/es2019/ui/renderer-props.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +1 -1
- package/dist/esm/analytics/enums.js +1 -60
- package/dist/esm/analytics/unsupported-content.js +1 -1
- package/dist/esm/react/index.js +11 -0
- package/dist/esm/react/marks/alignment.js +1 -1
- package/dist/esm/react/marks/link.js +1 -1
- package/dist/esm/react/nodes/codeBlock/components/codeBlockContainer.js +3 -3
- package/dist/esm/react/nodes/emoji.js +4 -2
- package/dist/esm/react/nodes/heading.js +1 -1
- package/dist/esm/react/nodes/media.js +1 -1
- package/dist/esm/react/nodes/orderedList.js +26 -2
- package/dist/esm/react/nodes/panel.js +2 -2
- package/dist/esm/react/nodes/tableCell.js +3 -2
- package/dist/esm/react/utils/performance/RenderTracking.js +1 -1
- package/dist/esm/react/utils/use-select-all-trap.js +1 -1
- package/dist/esm/render-document.js +1 -1
- package/dist/esm/text/nodes/orderedList.js +3 -1
- package/dist/esm/ui/Expand.js +1 -1
- package/dist/esm/ui/Renderer/ErrorBoundary.js +1 -1
- package/dist/esm/ui/Renderer/index.js +6 -3
- package/dist/esm/ui/annotations/hooks/use-events.js +1 -1
- package/dist/esm/ui/annotations/selection/mounter.js +1 -1
- package/dist/esm/ui/renderer-props.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/enums.d.ts +0 -49
- package/dist/types/analytics/events.d.ts +2 -1
- package/dist/types/react/index.d.ts +4 -0
- package/dist/types/react/nodes/emoji.d.ts +2 -0
- package/dist/types/react/nodes/orderedList.d.ts +4 -1
- package/dist/types/react/utils/performance/RenderTracking.d.ts +1 -1
- package/dist/types/renderer-context.d.ts +1 -3
- package/dist/types/ui/renderer-props.d.ts +5 -2
- package/package.json +15 -14
- package/report.api.md +12 -100
package/dist/es2019/version.json
CHANGED
|
@@ -7,7 +7,7 @@ import { canApplyAnnotationOnRange, getAnnotationIdsFromRange } from '@atlaskit/
|
|
|
7
7
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
8
8
|
import { RemoveMarkStep } from 'prosemirror-transform';
|
|
9
9
|
import { createAnnotationStep, getPosFromRange } from '../steps';
|
|
10
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '
|
|
10
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
11
11
|
import { getIndexMatch } from './matches-utils';
|
|
12
12
|
|
|
13
13
|
var RendererActions = /*#__PURE__*/function () {
|
|
@@ -1,60 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
(function (EVENT_TYPE) {
|
|
4
|
-
EVENT_TYPE["OPERATIONAL"] = "operational";
|
|
5
|
-
EVENT_TYPE["SCREEN"] = "screen";
|
|
6
|
-
EVENT_TYPE["TRACK"] = "track";
|
|
7
|
-
EVENT_TYPE["UI"] = "ui";
|
|
8
|
-
})(EVENT_TYPE || (EVENT_TYPE = {}));
|
|
9
|
-
|
|
10
|
-
export var ACTION;
|
|
11
|
-
|
|
12
|
-
(function (ACTION) {
|
|
13
|
-
ACTION["STARTED"] = "started";
|
|
14
|
-
ACTION["RENDERED"] = "rendered";
|
|
15
|
-
ACTION["RE_RENDERED"] = "reRendered";
|
|
16
|
-
ACTION["RENDERER_TTI"] = "tti";
|
|
17
|
-
ACTION["CRASHED"] = "unhandledErrorCaught";
|
|
18
|
-
ACTION["INVALID_PROSEMIRROR_DOCUMENT"] = "invalidProsemirrorDocument";
|
|
19
|
-
ACTION["SELECT_ALL_CAUGHT"] = "selectAllCaught";
|
|
20
|
-
ACTION["SELECT_ALL_ESCAPED"] = "selectAllEscaped";
|
|
21
|
-
ACTION["CLICKED"] = "clicked";
|
|
22
|
-
ACTION["VIEWED"] = "viewed";
|
|
23
|
-
ACTION["VISITED"] = "visited";
|
|
24
|
-
ACTION["SORT_COLUMN"] = "sortedColumn";
|
|
25
|
-
ACTION["SORT_COLUMN_NOT_ALLOWED"] = "sortColumnNotAllowed";
|
|
26
|
-
ACTION["TOGGLE_EXPAND"] = "toggleExpand";
|
|
27
|
-
ACTION["INSERTED"] = "inserted";
|
|
28
|
-
ACTION["OPENED"] = "opened";
|
|
29
|
-
ACTION["CLOSED"] = "closed";
|
|
30
|
-
ACTION["DELETED"] = "deleted";
|
|
31
|
-
ACTION["EDITED"] = "edited";
|
|
32
|
-
ACTION["RESOLVED"] = "resolved";
|
|
33
|
-
ACTION["CREATE_NOT_ALLOWED"] = "createNotAllowed";
|
|
34
|
-
ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
|
|
35
|
-
ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED"] = "unsupportedContentLevelsTrackingErrored";
|
|
36
|
-
ACTION["MEDIA_LINK_TRANSFORMED"] = "mediaLinkTransformed";
|
|
37
|
-
})(ACTION || (ACTION = {}));
|
|
38
|
-
|
|
39
|
-
export var ACTION_SUBJECT;
|
|
40
|
-
|
|
41
|
-
(function (ACTION_SUBJECT) {
|
|
42
|
-
ACTION_SUBJECT["RENDERER"] = "renderer";
|
|
43
|
-
ACTION_SUBJECT["BUTTON"] = "button";
|
|
44
|
-
ACTION_SUBJECT["ANCHOR_LINK"] = "anchorLink";
|
|
45
|
-
ACTION_SUBJECT["TABLE"] = "table";
|
|
46
|
-
ACTION_SUBJECT["EXPAND"] = "expand";
|
|
47
|
-
ACTION_SUBJECT["NESTED_EXPAND"] = "nestedExpand";
|
|
48
|
-
ACTION_SUBJECT["MEDIA_SINGLE"] = "mediaSingle";
|
|
49
|
-
ACTION_SUBJECT["LINK"] = "link";
|
|
50
|
-
ACTION_SUBJECT["ANNOTATION"] = "annotation";
|
|
51
|
-
ACTION_SUBJECT["MEDIA"] = "media";
|
|
52
|
-
})(ACTION_SUBJECT || (ACTION_SUBJECT = {}));
|
|
53
|
-
|
|
54
|
-
export var ACTION_SUBJECT_ID;
|
|
55
|
-
|
|
56
|
-
(function (ACTION_SUBJECT_ID) {
|
|
57
|
-
ACTION_SUBJECT_ID["HEADING_ANCHOR_LINK"] = "headingAnchorLink";
|
|
58
|
-
ACTION_SUBJECT_ID["LINK"] = "link";
|
|
59
|
-
ACTION_SUBJECT_ID["INLINE_COMMENT"] = "inlineComment";
|
|
60
|
-
})(ACTION_SUBJECT_ID || (ACTION_SUBJECT_ID = {}));
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getUnsupportedContentLevelData, getAnalyticsAppearance } from '@atlaskit/editor-common/utils';
|
|
2
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '
|
|
2
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import { PLATFORM } from './events';
|
|
4
4
|
var rendersMap = {};
|
|
5
5
|
|
package/dist/esm/react/index.js
CHANGED
|
@@ -193,6 +193,7 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
193
193
|
this.allowAnnotations = Boolean(init.allowAnnotations);
|
|
194
194
|
this.surroundTextNodesWithTextWrapper = Boolean(init.surroundTextNodesWithTextWrapper);
|
|
195
195
|
this.media = init.media;
|
|
196
|
+
this.emojiResourceConfig = init.emojiResourceConfig;
|
|
196
197
|
this.smartLinks = init.smartLinks;
|
|
197
198
|
this.allowSelectAllTrap = init.allowSelectAllTrap;
|
|
198
199
|
this.nodeComponents = init.nodeComponents;
|
|
@@ -224,6 +225,9 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
224
225
|
case 'media':
|
|
225
226
|
return this.getMediaProps(node, path);
|
|
226
227
|
|
|
228
|
+
case 'emoji':
|
|
229
|
+
return this.getEmojiProps(node);
|
|
230
|
+
|
|
227
231
|
case 'mediaGroup':
|
|
228
232
|
return this.getMediaGroupProps(node);
|
|
229
233
|
|
|
@@ -456,6 +460,13 @@ var ReactSerializer = /*#__PURE__*/function () {
|
|
|
456
460
|
ssr: (_this$media = this.media) === null || _this$media === void 0 ? void 0 : _this$media.ssr
|
|
457
461
|
});
|
|
458
462
|
}
|
|
463
|
+
}, {
|
|
464
|
+
key: "getEmojiProps",
|
|
465
|
+
value: function getEmojiProps(node) {
|
|
466
|
+
return _objectSpread(_objectSpread({}, this.getProps(node)), {}, {
|
|
467
|
+
resourceConfig: this.emojiResourceConfig
|
|
468
|
+
});
|
|
469
|
+
}
|
|
459
470
|
}, {
|
|
460
471
|
key: "getEmbedCardProps",
|
|
461
472
|
value: function getEmbedCardProps(node) {
|
|
@@ -17,7 +17,7 @@ var MarkWrapper = function MarkWrapper(props) {
|
|
|
17
17
|
|
|
18
18
|
export default function Alignment(props) {
|
|
19
19
|
return jsx(MarkWrapper, {
|
|
20
|
-
className: "fabric-editor-block-mark",
|
|
20
|
+
className: "fabric-editor-block-mark fabric-editor-alignment",
|
|
21
21
|
"data-align": props.align
|
|
22
22
|
}, props.children);
|
|
23
23
|
}
|
|
@@ -9,7 +9,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import { B400, B300, B500 } from '@atlaskit/theme/colors';
|
|
10
10
|
import { getEventHandler } from '../../utils';
|
|
11
11
|
import { PLATFORM, MODE } from '../../analytics/events';
|
|
12
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '
|
|
12
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
13
13
|
import { token } from '@atlaskit/tokens';
|
|
14
14
|
var anchorStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n\n &:hover {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n color: ", ";\n }\n"])), token('color.link', B400), token('color.link', B300), token('color.link.pressed', B500));
|
|
15
15
|
export default function Link(props) {
|
|
@@ -10,10 +10,10 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
10
10
|
import { fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
11
11
|
import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
|
|
12
12
|
import CopyButton from '../../codeBlockCopyButton';
|
|
13
|
-
import { token } from '@atlaskit/tokens';
|
|
13
|
+
import { token } from '@atlaskit/tokens';
|
|
14
14
|
|
|
15
15
|
var codeBlockStyleOverrides = function codeBlockStyleOverrides(props) {
|
|
16
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n tab-size: 4;\n background-color: ", ";\n\n ", " {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, local, local, local, scroll, scroll;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 0 0;\n }\n "])), themed({
|
|
16
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n tab-size: 4;\n background-color: ", ";\n\n ", " {\n font-size: ", ";\n line-height: 1.5rem;\n background-image: ", ";\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n }\n "])), themed({
|
|
17
17
|
light: token('elevation.surface.raised', N20),
|
|
18
18
|
dark: token('elevation.surface.raised', DN50)
|
|
19
19
|
})(props), CodeBlockSharedCssClassName.DS_CODEBLOCK, relativeFontSizeToBase16(fontSize()), overflowShadow({
|
|
@@ -21,7 +21,7 @@ var codeBlockStyleOverrides = function codeBlockStyleOverrides(props) {
|
|
|
21
21
|
light: token('color.background.neutral', N20),
|
|
22
22
|
dark: token('color.background.neutral', DN50)
|
|
23
23
|
})(props),
|
|
24
|
-
|
|
24
|
+
leftCoverWidth: "".concat(gridSize() * 3, "px")
|
|
25
25
|
}));
|
|
26
26
|
};
|
|
27
27
|
|
|
@@ -31,14 +31,16 @@ var EmojiItem = /*#__PURE__*/function (_PureComponent) {
|
|
|
31
31
|
providers = _this$props.providers,
|
|
32
32
|
shortName = _this$props.shortName,
|
|
33
33
|
text = _this$props.text,
|
|
34
|
-
fitToHeight = _this$props.fitToHeight
|
|
34
|
+
fitToHeight = _this$props.fitToHeight,
|
|
35
|
+
resourceConfig = _this$props.resourceConfig;
|
|
35
36
|
return /*#__PURE__*/React.createElement(Emoji, {
|
|
36
37
|
allowTextFallback: true,
|
|
37
38
|
id: id,
|
|
38
39
|
shortName: shortName,
|
|
39
40
|
fallback: text,
|
|
40
41
|
providers: providers,
|
|
41
|
-
fitToHeight: fitToHeight
|
|
42
|
+
fitToHeight: fitToHeight,
|
|
43
|
+
resourceConfig: resourceConfig
|
|
42
44
|
});
|
|
43
45
|
}
|
|
44
46
|
}]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import HeadingAnchor from './heading-anchor';
|
|
4
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
import AnalyticsContext from '../../analytics/analyticsContext';
|
|
6
6
|
import { copyTextToClipboard } from '../utils/clipboard';
|
|
7
7
|
|
|
@@ -19,7 +19,7 @@ import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
|
19
19
|
import { mediaLinkStyle } from '@atlaskit/editor-common/ui';
|
|
20
20
|
import { MediaCard } from '../../ui/MediaCard';
|
|
21
21
|
import { getEventHandler } from '../../utils';
|
|
22
|
-
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '
|
|
22
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
23
23
|
import { MODE, PLATFORM } from '../../analytics/events';
|
|
24
24
|
|
|
25
25
|
var Media = /*#__PURE__*/function (_PureComponent) {
|
|
@@ -1,10 +1,34 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { orderedListSelector } from '@atlaskit/adf-schema';
|
|
4
|
+
import { getOrderedListInlineStyles } from '@atlaskit/editor-common/styles';
|
|
5
|
+
import { getItemCounterDigitsSize, resolveOrder } from '@atlaskit/editor-common/utils';
|
|
3
6
|
import { getListIndentLevel } from '../utils/lists';
|
|
7
|
+
import { useFeatureFlags } from '../../use-feature-flags';
|
|
4
8
|
export default function OrderedList(props) {
|
|
5
|
-
|
|
9
|
+
var featureFlags = useFeatureFlags();
|
|
10
|
+
var extraProps = {};
|
|
11
|
+
|
|
12
|
+
if (featureFlags !== null && featureFlags !== void 0 && featureFlags.restartNumberedLists) {
|
|
13
|
+
var _props$content;
|
|
14
|
+
|
|
15
|
+
var itemCounterDigitsSize = getItemCounterDigitsSize({
|
|
16
|
+
order: props.order,
|
|
17
|
+
itemsCount: props === null || props === void 0 ? void 0 : (_props$content = props.content) === null || _props$content === void 0 ? void 0 : _props$content.length
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
if (itemCounterDigitsSize) {
|
|
21
|
+
extraProps.style = getOrderedListInlineStyles(itemCounterDigitsSize, 'object');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (props.order !== undefined) {
|
|
25
|
+
extraProps.start = resolveOrder(props.order);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return /*#__PURE__*/React.createElement("ol", _extends({
|
|
6
30
|
className: orderedListSelector.substr(1),
|
|
7
31
|
"data-indent-level": props.path ? getListIndentLevel(props.path) : 1,
|
|
8
32
|
start: props.start
|
|
9
|
-
}, props.children);
|
|
33
|
+
}, extraProps), props.children);
|
|
10
34
|
}
|
|
@@ -27,7 +27,7 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
27
27
|
var styles = function styles(theme) {
|
|
28
28
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.", " {\n ", "\n\n &[data-panel-type=", "] {\n ", "\n }\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix({
|
|
29
29
|
theme: theme
|
|
30
|
-
}), PanelType.CUSTOM, hasIcon ? '' : 'padding: 12px;');
|
|
30
|
+
}), PanelType.CUSTOM, hasIcon ? '' : 'padding-left: 12px;');
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
if (props['data-panel-type'] === PanelType.CUSTOM && backgroundColor) {
|
|
@@ -40,7 +40,7 @@ var PanelStyled = function PanelStyled(_ref) {
|
|
|
40
40
|
});
|
|
41
41
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n &.", " {\n ", "\n }\n\n &[data-panel-type=", "] {\n ", ";\n ", "\n }\n "])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix({
|
|
42
42
|
theme: theme
|
|
43
|
-
}), PanelType.CUSTOM, customStyle, hasIcon ? '' : 'padding: 12px;');
|
|
43
|
+
}), PanelType.CUSTOM, customStyle, hasIcon ? '' : 'padding-left: 12px;');
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -17,7 +17,7 @@ import { compose } from '@atlaskit/editor-common/utils';
|
|
|
17
17
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
18
18
|
import SortingIcon from '../../ui/SortingIcon';
|
|
19
19
|
import { MODE, PLATFORM } from '../../analytics/events';
|
|
20
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '
|
|
20
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
21
21
|
import { RendererCssClassName } from '../../consts';
|
|
22
22
|
import { injectIntl } from 'react-intl-next';
|
|
23
23
|
import { tableCellMessages } from '../../messages';
|
|
@@ -71,7 +71,8 @@ var getDataAttributes = function getDataAttributes(colwidth) {
|
|
|
71
71
|
var getStyle = function getStyle(background, colGroupWidth, offsetTop) {
|
|
72
72
|
var style = {};
|
|
73
73
|
|
|
74
|
-
if (background
|
|
74
|
+
if (background && // ignore setting inline styles if ds neutral token is detected
|
|
75
|
+
!background.includes('--ds-background-neutral')) {
|
|
75
76
|
style.backgroundColor = background;
|
|
76
77
|
}
|
|
77
78
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import debounce from 'lodash/debounce';
|
|
3
3
|
import { useComponentRenderTracking } from '@atlaskit/editor-common/utils';
|
|
4
|
-
import { EVENT_TYPE } from '
|
|
4
|
+
import { EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
5
5
|
export function RenderTracking(props) {
|
|
6
6
|
var debouncedHandleAnalyticsEvent = useMemo(function () {
|
|
7
7
|
return debounce(props.handleAnalyticsEvent, 500);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import AnalyticsContext from '../../analytics/analyticsContext';
|
|
3
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '
|
|
3
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { ElementSelection } from './element-selection';
|
|
5
5
|
export var useSelectAllTrap = function useSelectAllTrap() {
|
|
6
6
|
var _React$useContext = React.useContext(AnalyticsContext),
|
|
@@ -3,7 +3,7 @@ import memoizeOne from 'memoize-one';
|
|
|
3
3
|
import { defaultSchema } from '@atlaskit/adf-schema/schema-default';
|
|
4
4
|
import { getValidDocument } from '@atlaskit/editor-common/validator';
|
|
5
5
|
import { validateADFEntity, findAndTrackUnsupportedContentNodes } from '@atlaskit/editor-common/utils';
|
|
6
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '
|
|
6
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { PLATFORM } from './analytics/events';
|
|
8
8
|
import { trackUnsupportedContentLevels } from './analytics/unsupported-content';
|
|
9
9
|
import { transformMediaLinkMarks } from '@atlaskit/adf-utils/transforms';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { getOrderFromOrderedListNode } from '@atlaskit/editor-common/utils';
|
|
1
2
|
import { reduce } from './';
|
|
2
3
|
|
|
3
4
|
var orderedList = function orderedList(node, schema) {
|
|
4
5
|
var result = [];
|
|
6
|
+
var order = getOrderFromOrderedListNode(node);
|
|
5
7
|
node.forEach(function (n, _offset, index) {
|
|
6
|
-
result.push("".concat(index +
|
|
8
|
+
result.push("".concat(index + order, ". ").concat(reduce(n, schema)));
|
|
7
9
|
});
|
|
8
10
|
return result.join('\n');
|
|
9
11
|
};
|
package/dist/esm/ui/Expand.js
CHANGED
|
@@ -13,7 +13,7 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
13
13
|
import { expandMessages, sharedExpandStyles, WidthProvider, ExpandIconWrapper, clearNextSiblingMarginTopStyle, ExpandLayoutWrapperWithRef } from '@atlaskit/editor-common/ui';
|
|
14
14
|
import { akEditorLineHeight, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
15
15
|
import { PLATFORM, MODE } from '../analytics/events';
|
|
16
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '
|
|
16
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
17
17
|
import { injectIntl } from 'react-intl-next';
|
|
18
18
|
import { ActiveHeaderIdConsumer } from './active-header-id-provider';
|
|
19
19
|
import _uniqueId from 'lodash/uniqueId';
|
|
@@ -12,7 +12,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
12
12
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import { PLATFORM } from '../../analytics/events';
|
|
15
|
-
import { ACTION, EVENT_TYPE } from '
|
|
15
|
+
import { ACTION, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
16
16
|
import { FabricChannel } from '@atlaskit/analytics-listeners';
|
|
17
17
|
export var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
18
18
|
_inherits(ErrorBoundary, _React$Component);
|
|
@@ -32,7 +32,7 @@ import uuid from 'uuid/v4';
|
|
|
32
32
|
import { ReactSerializer, renderDocument } from '../../';
|
|
33
33
|
import { rendererStyles } from './style';
|
|
34
34
|
import { TruncatedWrapper } from './truncated-wrapper';
|
|
35
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '
|
|
35
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
36
36
|
import { PLATFORM, MODE } from '../../analytics/events';
|
|
37
37
|
import AnalyticsContext from '../../analytics/analyticsContext';
|
|
38
38
|
import { Provider as SmartCardStorageProvider } from '../SmartCardStorage';
|
|
@@ -50,7 +50,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
|
|
|
50
50
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
51
51
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
52
52
|
var packageName = "@atlaskit/renderer";
|
|
53
|
-
var packageVersion = "
|
|
53
|
+
var packageVersion = "105.0.0";
|
|
54
54
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
55
55
|
_inherits(Renderer, _PureComponent);
|
|
56
56
|
|
|
@@ -298,6 +298,7 @@ export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
|
298
298
|
allowMediaLinking: props.media && props.media.allowLinking,
|
|
299
299
|
surroundTextNodesWithTextWrapper: allowAnnotationsDraftMode,
|
|
300
300
|
media: props.media,
|
|
301
|
+
emojiResourceConfig: props.emojiResourceConfig,
|
|
301
302
|
smartLinks: props.smartLinks,
|
|
302
303
|
allowCopyToClipboard: props.allowCopyToClipboard,
|
|
303
304
|
allowCustomPanels: props.allowCustomPanels,
|
|
@@ -552,7 +553,9 @@ var RendererWithAnnotationSelection = function RendererWithAnnotationSelection(p
|
|
|
552
553
|
annotationProvider: props.annotationProvider
|
|
553
554
|
}, jsx(RendererWithAnalytics, _extends({
|
|
554
555
|
innerRef: innerRef
|
|
555
|
-
}, props
|
|
556
|
+
}, props, {
|
|
557
|
+
featureFlags: props.featureFlags
|
|
558
|
+
}))));
|
|
556
559
|
};
|
|
557
560
|
|
|
558
561
|
export default RendererWithAnnotationSelection;
|
|
@@ -8,7 +8,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
8
8
|
import { useLayoutEffect, useState } from 'react';
|
|
9
9
|
import { AnnotationUpdateEvent } from '@atlaskit/editor-common/types';
|
|
10
10
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
11
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '
|
|
11
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
12
12
|
import { FabricChannel } from '@atlaskit/analytics-listeners';
|
|
13
13
|
export var useAnnotationStateByTypeEvent = function useAnnotationStateByTypeEvent(_ref) {
|
|
14
14
|
var type = _ref.type,
|
|
@@ -3,7 +3,7 @@ import React, { useCallback, useState, useContext } from 'react';
|
|
|
3
3
|
import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
4
4
|
import { updateWindowSelectionAroundDraft } from '../draft';
|
|
5
5
|
import { FabricChannel } from '@atlaskit/analytics-listeners';
|
|
6
|
-
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '
|
|
6
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
|
|
7
7
|
import { RendererContext as ActionsContext } from '../../RendererActionsContext';
|
|
8
8
|
export var SelectionInlineCommentMounter = /*#__PURE__*/React.memo(function (props) {
|
|
9
9
|
var Component = props.component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import { ACTION_SUBJECT } from '
|
|
1
|
+
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
package/dist/esm/version.json
CHANGED
|
@@ -1,52 +1,3 @@
|
|
|
1
|
-
export declare enum EVENT_TYPE {
|
|
2
|
-
OPERATIONAL = "operational",
|
|
3
|
-
SCREEN = "screen",
|
|
4
|
-
TRACK = "track",
|
|
5
|
-
UI = "ui"
|
|
6
|
-
}
|
|
7
|
-
export declare enum ACTION {
|
|
8
|
-
STARTED = "started",
|
|
9
|
-
RENDERED = "rendered",
|
|
10
|
-
RE_RENDERED = "reRendered",
|
|
11
|
-
RENDERER_TTI = "tti",
|
|
12
|
-
CRASHED = "unhandledErrorCaught",
|
|
13
|
-
INVALID_PROSEMIRROR_DOCUMENT = "invalidProsemirrorDocument",
|
|
14
|
-
SELECT_ALL_CAUGHT = "selectAllCaught",
|
|
15
|
-
SELECT_ALL_ESCAPED = "selectAllEscaped",
|
|
16
|
-
CLICKED = "clicked",
|
|
17
|
-
VIEWED = "viewed",
|
|
18
|
-
VISITED = "visited",
|
|
19
|
-
SORT_COLUMN = "sortedColumn",
|
|
20
|
-
SORT_COLUMN_NOT_ALLOWED = "sortColumnNotAllowed",
|
|
21
|
-
TOGGLE_EXPAND = "toggleExpand",
|
|
22
|
-
INSERTED = "inserted",
|
|
23
|
-
OPENED = "opened",
|
|
24
|
-
CLOSED = "closed",
|
|
25
|
-
DELETED = "deleted",
|
|
26
|
-
EDITED = "edited",
|
|
27
|
-
RESOLVED = "resolved",
|
|
28
|
-
CREATE_NOT_ALLOWED = "createNotAllowed",
|
|
29
|
-
UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED = "unsupportedContentLevelsTrackingSucceeded",
|
|
30
|
-
UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED = "unsupportedContentLevelsTrackingErrored",
|
|
31
|
-
MEDIA_LINK_TRANSFORMED = "mediaLinkTransformed"
|
|
32
|
-
}
|
|
33
|
-
export declare enum ACTION_SUBJECT {
|
|
34
|
-
RENDERER = "renderer",
|
|
35
|
-
BUTTON = "button",
|
|
36
|
-
ANCHOR_LINK = "anchorLink",
|
|
37
|
-
TABLE = "table",
|
|
38
|
-
EXPAND = "expand",
|
|
39
|
-
NESTED_EXPAND = "nestedExpand",
|
|
40
|
-
MEDIA_SINGLE = "mediaSingle",
|
|
41
|
-
LINK = "link",
|
|
42
|
-
ANNOTATION = "annotation",
|
|
43
|
-
MEDIA = "media"
|
|
44
|
-
}
|
|
45
|
-
export declare enum ACTION_SUBJECT_ID {
|
|
46
|
-
HEADING_ANCHOR_LINK = "headingAnchorLink",
|
|
47
|
-
LINK = "link",
|
|
48
|
-
INLINE_COMMENT = "inlineComment"
|
|
49
|
-
}
|
|
50
1
|
export declare type AEP<Action, ActionSubject, ActionSubjectID, Attributes, EventType> = {
|
|
51
2
|
action: Action;
|
|
52
3
|
actionSubject: ActionSubject;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ACTION, ACTION_SUBJECT,
|
|
1
|
+
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import { AEP } from './enums';
|
|
2
3
|
import { PropsDifference, SEVERITY, ShallowPropsDifference, UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from '@atlaskit/editor-common/utils';
|
|
3
4
|
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
|
|
4
5
|
import { SortOrder } from '@atlaskit/editor-common/types';
|
|
@@ -10,6 +10,7 @@ import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
|
10
10
|
import { RendererContext } from './types';
|
|
11
11
|
import { MediaOptions } from '../types/mediaOptions';
|
|
12
12
|
import { SmartLinksOptions } from '../types/smartLinksOptions';
|
|
13
|
+
import { EmojiResourceConfig } from '@atlaskit/emoji/resource';
|
|
13
14
|
export interface ReactSerializerInit {
|
|
14
15
|
providers?: ProviderFactory;
|
|
15
16
|
eventHandlers?: EventHandlers;
|
|
@@ -28,6 +29,7 @@ export interface ReactSerializerInit {
|
|
|
28
29
|
allowMediaLinking?: boolean;
|
|
29
30
|
surroundTextNodesWithTextWrapper?: boolean;
|
|
30
31
|
media?: MediaOptions;
|
|
32
|
+
emojiResourceConfig?: EmojiResourceConfig;
|
|
31
33
|
smartLinks?: SmartLinksOptions;
|
|
32
34
|
allowCopyToClipboard?: boolean;
|
|
33
35
|
allowPlaceholderText?: boolean;
|
|
@@ -74,6 +76,7 @@ export default class ReactSerializer implements Serializer<JSX.Element> {
|
|
|
74
76
|
private startPos;
|
|
75
77
|
private surroundTextNodesWithTextWrapper;
|
|
76
78
|
private media?;
|
|
79
|
+
private emojiResourceConfig?;
|
|
77
80
|
private smartLinks?;
|
|
78
81
|
private allowAnnotations;
|
|
79
82
|
private allowSelectAllTrap?;
|
|
@@ -94,6 +97,7 @@ export default class ReactSerializer implements Serializer<JSX.Element> {
|
|
|
94
97
|
private getDateProps;
|
|
95
98
|
private getMediaSingleProps;
|
|
96
99
|
private getMediaProps;
|
|
100
|
+
private getEmojiProps;
|
|
97
101
|
private getEmbedCardProps;
|
|
98
102
|
private getMediaGroupProps;
|
|
99
103
|
private getMediaInlineProps;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { EmojiAttributes } from '@atlaskit/adf-schema';
|
|
2
|
+
import { EmojiResourceConfig } from '@atlaskit/emoji/resource';
|
|
2
3
|
import { PureComponent } from 'react';
|
|
3
4
|
import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
5
|
export interface EmojiProps extends EmojiAttributes {
|
|
5
6
|
providers?: ProviderFactory;
|
|
7
|
+
resourceConfig?: EmojiResourceConfig;
|
|
6
8
|
fitToHeight?: number;
|
|
7
9
|
}
|
|
8
10
|
export default class EmojiItem extends PureComponent<EmojiProps, {}> {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Node } from 'prosemirror-model';
|
|
3
3
|
export default function OrderedList(props: {
|
|
4
|
+
order?: number;
|
|
4
5
|
start?: number;
|
|
5
6
|
path?: Node[];
|
|
6
|
-
|
|
7
|
+
content?: Node[];
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}): JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AnalyticsEventPayload } from '../../../analytics/events';
|
|
2
|
-
import { ACTION_SUBJECT, ACTION } from '
|
|
2
|
+
import { ACTION_SUBJECT, ACTION } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
export declare type FireAnalyticsCallback = <T = void>(payload: AnalyticsEventPayload<T>) => void | undefined;
|
|
4
4
|
declare type RenderActions = ACTION.RE_RENDERED;
|
|
5
5
|
declare type RenderActionSubjects = ACTION_SUBJECT.RENDERER;
|
|
@@ -6,13 +6,15 @@ import type { ADFStage } from '@atlaskit/editor-common/validator';
|
|
|
6
6
|
import type { AnnotationProviders } from '@atlaskit/editor-common/types';
|
|
7
7
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
8
8
|
import type { UnsupportedContentLevelsTracking } from '@atlaskit/editor-common/utils';
|
|
9
|
+
import { EmojiResourceConfig } from '@atlaskit/emoji/resource';
|
|
9
10
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
10
11
|
import { RendererContext } from '../';
|
|
11
12
|
import { RenderOutputStat } from '../render-document';
|
|
12
13
|
import { RendererAppearance, StickyHeaderProps, HeadingAnchorLinksProps, NodeComponentsProps } from './Renderer/types';
|
|
13
14
|
import { MediaOptions } from '../types/mediaOptions';
|
|
14
15
|
import { SmartLinksOptions } from '../types/smartLinksOptions';
|
|
15
|
-
import { ACTION_SUBJECT } from '
|
|
16
|
+
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
17
|
+
import { DocNode } from '@atlaskit/adf-schema';
|
|
16
18
|
export interface RawObjectFeatureFlags {
|
|
17
19
|
['renderer-render-tracking']: string;
|
|
18
20
|
}
|
|
@@ -25,7 +27,7 @@ export interface NormalizedObjectFeatureFlags {
|
|
|
25
27
|
};
|
|
26
28
|
}
|
|
27
29
|
export interface RendererProps {
|
|
28
|
-
document:
|
|
30
|
+
document: DocNode;
|
|
29
31
|
dataProviders?: ProviderFactory;
|
|
30
32
|
eventHandlers?: EventHandlers;
|
|
31
33
|
extensionHandlers?: ExtensionHandlers;
|
|
@@ -50,6 +52,7 @@ export interface RendererProps {
|
|
|
50
52
|
allowAltTextOnImages?: boolean;
|
|
51
53
|
stickyHeaders?: StickyHeaderProps;
|
|
52
54
|
media?: MediaOptions;
|
|
55
|
+
emojiResourceConfig?: EmojiResourceConfig;
|
|
53
56
|
smartLinks?: SmartLinksOptions;
|
|
54
57
|
allowAnnotations?: boolean;
|
|
55
58
|
annotationProvider?: AnnotationProviders | null;
|