@atlaskit/renderer 112.7.3 → 112.7.5
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 +16 -0
- package/dist/cjs/index.js +5 -4
- package/dist/cjs/react/marks/index.js +3 -0
- package/dist/cjs/react/nodes/index.js +1 -1
- package/dist/cjs/ui/Renderer/index.js +2 -4
- package/dist/cjs/ui/annotations/element/mark.js +2 -3
- package/dist/es2019/i18n/index.js +3 -0
- package/dist/es2019/index.js +3 -2
- package/dist/es2019/react/marks/index.js +3 -0
- package/dist/es2019/react/nodes/index.js +3 -0
- package/dist/es2019/ui/Renderer/index.js +1 -3
- package/dist/es2019/ui/annotations/element/mark.js +5 -6
- package/dist/esm/i18n/index.js +3 -0
- package/dist/esm/index.js +3 -2
- package/dist/esm/react/marks/index.js +3 -0
- package/dist/esm/react/nodes/index.js +3 -0
- package/dist/esm/ui/Renderer/index.js +1 -3
- package/dist/esm/ui/annotations/element/mark.js +2 -3
- package/dist/types/index.d.ts +6 -5
- package/dist/types/react/index.d.ts +1 -1
- package/dist/types/react/nodes/bodiedExtension.d.ts +1 -1
- package/dist/types/react/nodes/extensionFrame.d.ts +1 -1
- package/dist/types/react/nodes/multiBodiedExtension.d.ts +1 -1
- package/dist/types/react/types.d.ts +1 -1
- package/dist/types/ui/Renderer/index.d.ts +0 -2
- package/dist/types/ui/renderer-props.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +6 -5
- package/dist/types-ts4.5/react/index.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/bodiedExtension.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/extensionFrame.d.ts +1 -1
- package/dist/types-ts4.5/react/nodes/multiBodiedExtension.d.ts +1 -1
- package/dist/types-ts4.5/react/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/Renderer/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/renderer-props.d.ts +1 -1
- package/package.json +9 -3
- package/dist/cjs/ui/index.js +0 -28
- package/dist/es2019/ui/index.js +0 -2
- package/dist/esm/ui/index.js +0 -2
- package/dist/types/ui/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/index.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 112.7.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#179610](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/179610)
|
|
8
|
+
[`bd2c53ff5831b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bd2c53ff5831b) -
|
|
9
|
+
[ux] Bug fix to remove the hover state from all the nodes which are not required
|
|
10
|
+
|
|
11
|
+
## 112.7.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#178990](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/178990)
|
|
16
|
+
[`99dddf300e09d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/99dddf300e09d) -
|
|
17
|
+
Removed internal re-exports and use more specific imports
|
|
18
|
+
|
|
3
19
|
## 112.7.3
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "ADFEncoder", {
|
|
|
14
14
|
Object.defineProperty(exports, "AnnotationsWrapper", {
|
|
15
15
|
enumerable: true,
|
|
16
16
|
get: function get() {
|
|
17
|
-
return
|
|
17
|
+
return _annotations.AnnotationsWrapper;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "ReactRenderer", {
|
|
@@ -32,7 +32,7 @@ Object.defineProperty(exports, "ReactSerializer", {
|
|
|
32
32
|
Object.defineProperty(exports, "RendererWithAnalytics", {
|
|
33
33
|
enumerable: true,
|
|
34
34
|
get: function get() {
|
|
35
|
-
return
|
|
35
|
+
return _Renderer.RendererWithAnalytics;
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "TextSerializer", {
|
|
@@ -44,7 +44,7 @@ Object.defineProperty(exports, "TextSerializer", {
|
|
|
44
44
|
Object.defineProperty(exports, "defaultNodeComponents", {
|
|
45
45
|
enumerable: true,
|
|
46
46
|
get: function get() {
|
|
47
|
-
return
|
|
47
|
+
return _nodes.nodeToReact;
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "renderDocument", {
|
|
@@ -56,7 +56,8 @@ Object.defineProperty(exports, "renderDocument", {
|
|
|
56
56
|
var _react = _interopRequireDefault(require("./react"));
|
|
57
57
|
var _text = _interopRequireDefault(require("./text"));
|
|
58
58
|
var _Renderer = _interopRequireWildcard(require("./ui/Renderer"));
|
|
59
|
-
var
|
|
59
|
+
var _nodes = require("./react/nodes");
|
|
60
|
+
var _annotations = require("./ui/annotations");
|
|
60
61
|
var _utils = require("./utils");
|
|
61
62
|
var _renderDocument = require("./render-document");
|
|
62
63
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -129,6 +129,9 @@ var _border = _interopRequireDefault(require("./border"));
|
|
|
129
129
|
var _confluenceInlineComment = _interopRequireDefault(require("./confluence-inline-comment"));
|
|
130
130
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
131
131
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
132
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
133
|
+
// Mapping file
|
|
134
|
+
|
|
132
135
|
// Stage0
|
|
133
136
|
|
|
134
137
|
var markToReact = exports.markToReact = {
|
|
@@ -182,7 +182,7 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
182
182
|
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; }
|
|
183
183
|
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) { (0, _defineProperty2.default)(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; }
|
|
184
184
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
185
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
185
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /* eslint-disable @atlaskit/editor/no-re-export */ // Mapping file
|
|
186
186
|
var WindowedCodeBlock = exports.WindowedCodeBlock = (0, _reactLoadable.default)({
|
|
187
187
|
loader: function loader() {
|
|
188
188
|
return Promise.resolve().then(function () {
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.NORMAL_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = void 0;
|
|
9
9
|
exports.Renderer = Renderer;
|
|
10
|
-
exports.
|
|
10
|
+
exports.default = exports.__RendererClassComponent = exports.RendererWithAnalytics = void 0;
|
|
11
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
13
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -50,7 +50,6 @@ var _rendererContext = require("../../renderer-context");
|
|
|
50
50
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
51
51
|
var _ErrorBoundary = require("./ErrorBoundary");
|
|
52
52
|
var _EditorMediaClientProvider = require("../../react/utils/EditorMediaClientProvider");
|
|
53
|
-
var _nodes = require("../../react/nodes");
|
|
54
53
|
var _countNodes = require("./count-nodes");
|
|
55
54
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
56
55
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -64,13 +63,12 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
64
63
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
65
64
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
66
65
|
var packageName = "@atlaskit/renderer";
|
|
67
|
-
var packageVersion = "112.7.
|
|
66
|
+
var packageVersion = "112.7.5";
|
|
68
67
|
var setAsQueryContainerStyles = (0, _react2.css)({
|
|
69
68
|
containerName: 'ak-renderer-wrapper',
|
|
70
69
|
containerType: 'inline-size',
|
|
71
70
|
contain: 'layout style inline-size'
|
|
72
71
|
});
|
|
73
|
-
var defaultNodeComponents = exports.defaultNodeComponents = _nodes.nodeToReact;
|
|
74
72
|
|
|
75
73
|
/**
|
|
76
74
|
* Exported due to enzyme test reliance on this component.
|
|
@@ -10,7 +10,6 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
var _react = require("react");
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
|
-
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
14
13
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
15
14
|
var _adfSchema = require("@atlaskit/adf-schema");
|
|
16
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -26,7 +25,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
26
25
|
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) { (0, _defineProperty2.default)(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; }
|
|
27
26
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState` is not object-safe
|
|
28
27
|
var markStyles = function markStyles() {
|
|
29
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true'])
|
|
28
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true'])\n\t\t{\n\t\t\t", "\n\t\t\t}\n\t}\n"])), _adfSchema.AnnotationMarkStates.ACTIVE, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? (0, _styles.AnnotationSharedCSSByState)().common : '', (0, _styles.AnnotationSharedCSSByState)().blur, (0, _styles.AnnotationSharedCSSByState)().focus, (0, _platformFeatureFlags.fg)('confluence-frontend-comments-panel') ? (0, _styles.AnnotationSharedCSSByState)().hover : '');
|
|
30
29
|
};
|
|
31
30
|
var isMobile = function isMobile() {
|
|
32
31
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
@@ -62,7 +61,7 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
|
|
|
62
61
|
isHovered = _ref.isHovered,
|
|
63
62
|
onClick = _ref.onClick,
|
|
64
63
|
useBlockLevel = _ref.useBlockLevel;
|
|
65
|
-
var isInlineCommentsKbAccessible =
|
|
64
|
+
var isInlineCommentsKbAccessible = (0, _platformFeatureFlags.fg)('inline_comments_keyboard_accessible_renderer');
|
|
66
65
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
67
66
|
var annotationIds = (0, _react.useMemo)(function () {
|
|
68
67
|
return (0, _toConsumableArray2.default)(new Set([].concat((0, _toConsumableArray2.default)(annotationParentIds), [id])));
|
package/dist/es2019/index.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
export { default as ReactSerializer } from './react';
|
|
5
5
|
export { default as TextSerializer } from './text';
|
|
6
|
-
export { default as ReactRenderer,
|
|
7
|
-
export {
|
|
6
|
+
export { default as ReactRenderer, RendererWithAnalytics } from './ui/Renderer';
|
|
7
|
+
export { nodeToReact as defaultNodeComponents } from './react/nodes';
|
|
8
|
+
export { AnnotationsWrapper } from './ui/annotations';
|
|
8
9
|
export { ADFEncoder } from './utils';
|
|
9
10
|
export { renderDocument } from './render-document';
|
|
@@ -40,18 +40,16 @@ import { useRendererContext, RendererContextProvider } from '../../renderer-cont
|
|
|
40
40
|
import memoizeOne from 'memoize-one';
|
|
41
41
|
import { ErrorBoundary } from './ErrorBoundary';
|
|
42
42
|
import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientProvider';
|
|
43
|
-
import { nodeToReact } from '../../react/nodes';
|
|
44
43
|
import { countNodes } from './count-nodes';
|
|
45
44
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
45
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
46
|
const packageName = "@atlaskit/renderer";
|
|
48
|
-
const packageVersion = "112.7.
|
|
47
|
+
const packageVersion = "112.7.5";
|
|
49
48
|
const setAsQueryContainerStyles = css({
|
|
50
49
|
containerName: 'ak-renderer-wrapper',
|
|
51
50
|
containerType: 'inline-size',
|
|
52
51
|
contain: 'layout style inline-size'
|
|
53
52
|
});
|
|
54
|
-
export const defaultNodeComponents = nodeToReact;
|
|
55
53
|
|
|
56
54
|
/**
|
|
57
55
|
* Exported due to enzyme test reliance on this component.
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import { useMemo, useCallback } 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 FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
10
9
|
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
11
10
|
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
12
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -27,10 +26,10 @@ const markStyles = () => css`
|
|
|
27
26
|
&[data-has-focus='true'] {
|
|
28
27
|
${AnnotationSharedCSSByState().focus}
|
|
29
28
|
}
|
|
30
|
-
&[data-is-hovered='true']:not([data-has-focus='true'])
|
|
31
|
-
|
|
32
|
-
${AnnotationSharedCSSByState().hover}
|
|
33
|
-
|
|
29
|
+
&[data-is-hovered='true']:not([data-has-focus='true'])
|
|
30
|
+
{
|
|
31
|
+
${fg('confluence-frontend-comments-panel') ? AnnotationSharedCSSByState().hover : ''}
|
|
32
|
+
}
|
|
34
33
|
}
|
|
35
34
|
`;
|
|
36
35
|
const isMobile = () => {
|
|
@@ -66,7 +65,7 @@ export const MarkComponent = ({
|
|
|
66
65
|
onClick,
|
|
67
66
|
useBlockLevel
|
|
68
67
|
}) => {
|
|
69
|
-
const isInlineCommentsKbAccessible =
|
|
68
|
+
const isInlineCommentsKbAccessible = fg('inline_comments_keyboard_accessible_renderer');
|
|
70
69
|
const intl = useIntl();
|
|
71
70
|
const annotationIds = useMemo(() => [...new Set([...annotationParentIds, id])], [id, annotationParentIds]);
|
|
72
71
|
const onMarkClick = useCallback(event => {
|
package/dist/esm/i18n/index.js
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
export { default as ReactSerializer } from './react';
|
|
5
5
|
export { default as TextSerializer } from './text';
|
|
6
|
-
export { default as ReactRenderer,
|
|
7
|
-
export {
|
|
6
|
+
export { default as ReactRenderer, RendererWithAnalytics } from './ui/Renderer';
|
|
7
|
+
export { nodeToReact as defaultNodeComponents } from './react/nodes';
|
|
8
|
+
export { AnnotationsWrapper } from './ui/annotations';
|
|
8
9
|
export { ADFEncoder } from './utils';
|
|
9
10
|
export { renderDocument } from './render-document';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
|
+
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
5
|
+
// Mapping file
|
|
6
|
+
|
|
4
7
|
import Loadable from 'react-loadable';
|
|
5
8
|
import Blockquote from './blockquote';
|
|
6
9
|
import BodiedExtension from './bodiedExtension';
|
|
@@ -49,18 +49,16 @@ import { useRendererContext, RendererContextProvider } from '../../renderer-cont
|
|
|
49
49
|
import memoizeOne from 'memoize-one';
|
|
50
50
|
import { ErrorBoundary } from './ErrorBoundary';
|
|
51
51
|
import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientProvider';
|
|
52
|
-
import { nodeToReact } from '../../react/nodes';
|
|
53
52
|
import { countNodes } from './count-nodes';
|
|
54
53
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
55
54
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
56
55
|
var packageName = "@atlaskit/renderer";
|
|
57
|
-
var packageVersion = "112.7.
|
|
56
|
+
var packageVersion = "112.7.5";
|
|
58
57
|
var setAsQueryContainerStyles = css({
|
|
59
58
|
containerName: 'ak-renderer-wrapper',
|
|
60
59
|
containerType: 'inline-size',
|
|
61
60
|
contain: 'layout style inline-size'
|
|
62
61
|
});
|
|
63
|
-
export var defaultNodeComponents = nodeToReact;
|
|
64
62
|
|
|
65
63
|
/**
|
|
66
64
|
* Exported due to enzyme test reliance on this component.
|
|
@@ -12,7 +12,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
12
12
|
import { useMemo, useCallback } from 'react';
|
|
13
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
14
|
import { css, jsx } from '@emotion/react';
|
|
15
|
-
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
16
15
|
import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
|
|
17
16
|
import { AnnotationMarkStates } from '@atlaskit/adf-schema';
|
|
18
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -21,7 +20,7 @@ import { inlineCommentMessages } from '../../../messages';
|
|
|
21
20
|
|
|
22
21
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState` is not object-safe
|
|
23
22
|
var markStyles = function markStyles() {
|
|
24
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true'])
|
|
23
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t\t&[data-is-hovered='true']:not([data-has-focus='true'])\n\t\t{\n\t\t\t", "\n\t\t\t}\n\t}\n"])), AnnotationMarkStates.ACTIVE, fg('editor_inline_comments_on_inline_nodes') ? AnnotationSharedCSSByState().common : '', AnnotationSharedCSSByState().blur, AnnotationSharedCSSByState().focus, fg('confluence-frontend-comments-panel') ? AnnotationSharedCSSByState().hover : '');
|
|
25
24
|
};
|
|
26
25
|
var isMobile = function isMobile() {
|
|
27
26
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
@@ -57,7 +56,7 @@ export var MarkComponent = function MarkComponent(_ref) {
|
|
|
57
56
|
isHovered = _ref.isHovered,
|
|
58
57
|
onClick = _ref.onClick,
|
|
59
58
|
useBlockLevel = _ref.useBlockLevel;
|
|
60
|
-
var isInlineCommentsKbAccessible =
|
|
59
|
+
var isInlineCommentsKbAccessible = fg('inline_comments_keyboard_accessible_renderer');
|
|
61
60
|
var intl = useIntl();
|
|
62
61
|
var annotationIds = useMemo(function () {
|
|
63
62
|
return _toConsumableArray(new Set([].concat(_toConsumableArray(annotationParentIds), [id])));
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export type { Serializer } from './serializer';
|
|
2
1
|
export { default as ReactSerializer } from './react';
|
|
3
2
|
export { default as TextSerializer } from './text';
|
|
4
|
-
export { default as ReactRenderer,
|
|
5
|
-
export {
|
|
6
|
-
export
|
|
7
|
-
export type {
|
|
3
|
+
export { default as ReactRenderer, RendererWithAnalytics } from './ui/Renderer';
|
|
4
|
+
export { nodeToReact as defaultNodeComponents } from './react/nodes';
|
|
5
|
+
export { AnnotationsWrapper } from './ui/annotations';
|
|
6
|
+
export type { Serializer } from './serializer';
|
|
7
|
+
export type { HeadingAnchorLinksProps, RendererAppearance, StickyHeaderProps, NodeComponentsProps, } from './ui/Renderer/types';
|
|
8
|
+
export type { RendererProps } from './ui/renderer-props';
|
|
8
9
|
export type { RendererContext, NodeProps } from './react/types';
|
|
9
10
|
export { ADFEncoder } from './utils';
|
|
10
11
|
export { renderDocument } from './render-document';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Fragment, Mark, Node } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { Serializer } from '../';
|
|
3
|
+
import type { Serializer } from '../serializer';
|
|
4
4
|
import type { RendererAppearance, StickyHeaderConfig, HeadingAnchorLinksProps, NodeComponentsProps } from '../ui/Renderer/types';
|
|
5
5
|
import type { AnalyticsEventPayload } from '../analytics/events';
|
|
6
6
|
import type { TextWrapper } from './nodes';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { RendererContext } from '../types';
|
|
4
|
-
import type { Serializer } from '
|
|
4
|
+
import type { Serializer } from '../../serializer';
|
|
5
5
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
6
6
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
7
7
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
import type { RendererContext } from '../types';
|
|
9
|
-
import type { Serializer } from '
|
|
9
|
+
import type { Serializer } from '../../serializer';
|
|
10
10
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
11
11
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
12
12
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -6,7 +6,7 @@ import { jsx } from '@emotion/react';
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import type { Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
import type { RendererContext } from '../types';
|
|
9
|
-
import type { Serializer } from '
|
|
9
|
+
import type { Serializer } from '../../serializer';
|
|
10
10
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
11
11
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
12
12
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -4,7 +4,7 @@ import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
|
4
4
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
6
6
|
import type { AnalyticsEventPayload } from '../analytics/events';
|
|
7
|
-
import type { Serializer } from '../
|
|
7
|
+
import type { Serializer } from '../serializer';
|
|
8
8
|
import type { RendererAppearance, HeadingAnchorLinksProps } from '../ui/Renderer/types';
|
|
9
9
|
import type { AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
10
10
|
export interface RendererContext {
|
|
@@ -4,11 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React, { PureComponent } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { NodeComponentsProps } from './types';
|
|
8
7
|
import type { RendererProps } from '../renderer-props';
|
|
9
8
|
export declare const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
10
9
|
export declare const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
11
|
-
export declare const defaultNodeComponents: NodeComponentsProps;
|
|
12
10
|
/**
|
|
13
11
|
* Exported due to enzyme test reliance on this component.
|
|
14
12
|
*/
|
|
@@ -15,7 +15,6 @@ import type { MediaOptions } from '../types/mediaOptions';
|
|
|
15
15
|
import type { SmartLinksOptions } from '../types/smartLinksOptions';
|
|
16
16
|
import type { DocNode } from '@atlaskit/adf-schema';
|
|
17
17
|
import type { TextHighlighter } from '../react/types';
|
|
18
|
-
export type { NodeComponentsProps } from './Renderer/types';
|
|
19
18
|
interface RawObjectFeatureFlags {
|
|
20
19
|
['renderer-render-tracking']: string;
|
|
21
20
|
}
|
|
@@ -112,3 +111,4 @@ export interface RendererProps {
|
|
|
112
111
|
UNSTABLE_allowTableAlignment?: boolean;
|
|
113
112
|
UNSTABLE_allowTableResizing?: boolean;
|
|
114
113
|
}
|
|
114
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export type { Serializer } from './serializer';
|
|
2
1
|
export { default as ReactSerializer } from './react';
|
|
3
2
|
export { default as TextSerializer } from './text';
|
|
4
|
-
export { default as ReactRenderer,
|
|
5
|
-
export {
|
|
6
|
-
export
|
|
7
|
-
export type {
|
|
3
|
+
export { default as ReactRenderer, RendererWithAnalytics } from './ui/Renderer';
|
|
4
|
+
export { nodeToReact as defaultNodeComponents } from './react/nodes';
|
|
5
|
+
export { AnnotationsWrapper } from './ui/annotations';
|
|
6
|
+
export type { Serializer } from './serializer';
|
|
7
|
+
export type { HeadingAnchorLinksProps, RendererAppearance, StickyHeaderProps, NodeComponentsProps, } from './ui/Renderer/types';
|
|
8
|
+
export type { RendererProps } from './ui/renderer-props';
|
|
8
9
|
export type { RendererContext, NodeProps } from './react/types';
|
|
9
10
|
export { ADFEncoder } from './utils';
|
|
10
11
|
export { renderDocument } from './render-document';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Fragment, Mark, Node } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import type { Serializer } from '../';
|
|
3
|
+
import type { Serializer } from '../serializer';
|
|
4
4
|
import type { RendererAppearance, StickyHeaderConfig, HeadingAnchorLinksProps, NodeComponentsProps } from '../ui/Renderer/types';
|
|
5
5
|
import type { AnalyticsEventPayload } from '../analytics/events';
|
|
6
6
|
import type { TextWrapper } from './nodes';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { RendererContext } from '../types';
|
|
4
|
-
import type { Serializer } from '
|
|
4
|
+
import type { Serializer } from '../../serializer';
|
|
5
5
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
6
6
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
7
7
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
import type { RendererContext } from '../types';
|
|
9
|
-
import type { Serializer } from '
|
|
9
|
+
import type { Serializer } from '../../serializer';
|
|
10
10
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
11
11
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
12
12
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -6,7 +6,7 @@ import { jsx } from '@emotion/react';
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import type { Mark as PMMark, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
8
|
import type { RendererContext } from '../types';
|
|
9
|
-
import type { Serializer } from '
|
|
9
|
+
import type { Serializer } from '../../serializer';
|
|
10
10
|
import type { ExtensionLayout } from '@atlaskit/adf-schema';
|
|
11
11
|
import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
12
12
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -4,7 +4,7 @@ import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
|
|
|
4
4
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
5
|
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
6
6
|
import type { AnalyticsEventPayload } from '../analytics/events';
|
|
7
|
-
import type { Serializer } from '../
|
|
7
|
+
import type { Serializer } from '../serializer';
|
|
8
8
|
import type { RendererAppearance, HeadingAnchorLinksProps } from '../ui/Renderer/types';
|
|
9
9
|
import type { AnnotationId, AnnotationTypes } from '@atlaskit/adf-schema';
|
|
10
10
|
export interface RendererContext {
|
|
@@ -4,11 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React, { PureComponent } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
|
-
import type { NodeComponentsProps } from './types';
|
|
8
7
|
import type { RendererProps } from '../renderer-props';
|
|
9
8
|
export declare const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
10
9
|
export declare const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
11
|
-
export declare const defaultNodeComponents: NodeComponentsProps;
|
|
12
10
|
/**
|
|
13
11
|
* Exported due to enzyme test reliance on this component.
|
|
14
12
|
*/
|
|
@@ -15,7 +15,6 @@ import type { MediaOptions } from '../types/mediaOptions';
|
|
|
15
15
|
import type { SmartLinksOptions } from '../types/smartLinksOptions';
|
|
16
16
|
import type { DocNode } from '@atlaskit/adf-schema';
|
|
17
17
|
import type { TextHighlighter } from '../react/types';
|
|
18
|
-
export type { NodeComponentsProps } from './Renderer/types';
|
|
19
18
|
interface RawObjectFeatureFlags {
|
|
20
19
|
['renderer-render-tracking']: string;
|
|
21
20
|
}
|
|
@@ -112,3 +111,4 @@ export interface RendererProps {
|
|
|
112
111
|
UNSTABLE_allowTableAlignment?: boolean;
|
|
113
112
|
UNSTABLE_allowTableResizing?: boolean;
|
|
114
113
|
}
|
|
114
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "112.7.
|
|
3
|
+
"version": "112.7.5",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@atlaskit/icon": "^23.1.0",
|
|
40
40
|
"@atlaskit/link-datasource": "^3.15.0",
|
|
41
41
|
"@atlaskit/media-card": "^78.15.0",
|
|
42
|
-
"@atlaskit/media-client": "^28.
|
|
42
|
+
"@atlaskit/media-client": "^28.6.0",
|
|
43
43
|
"@atlaskit/media-client-react": "^2.4.0",
|
|
44
44
|
"@atlaskit/media-common": "^11.7.0",
|
|
45
45
|
"@atlaskit/media-filmstrip": "^48.1.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@atlaskit/status": "^1.8.0",
|
|
51
51
|
"@atlaskit/task-decision": "^17.11.0",
|
|
52
52
|
"@atlaskit/theme": "^14.0.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^2.27.0",
|
|
54
54
|
"@atlaskit/tokens": "^2.4.0",
|
|
55
55
|
"@atlaskit/tooltip": "^19.0.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
@@ -161,6 +161,12 @@
|
|
|
161
161
|
},
|
|
162
162
|
"platform_editor_nested_tables_renderer_styles": {
|
|
163
163
|
"type": "boolean"
|
|
164
|
+
},
|
|
165
|
+
"inline_comments_keyboard_accessible_renderer": {
|
|
166
|
+
"type": "boolean"
|
|
167
|
+
},
|
|
168
|
+
"confluence-frontend-comments-panel": {
|
|
169
|
+
"type": "boolean"
|
|
164
170
|
}
|
|
165
171
|
},
|
|
166
172
|
"af:exports": {
|
package/dist/cjs/ui/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "AnnotationsWrapper", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function get() {
|
|
10
|
-
return _annotations.AnnotationsWrapper;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "Renderer", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function get() {
|
|
16
|
-
return _Renderer.default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "RendererWithAnalytics", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function get() {
|
|
22
|
-
return _Renderer.RendererWithAnalytics;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
var _Renderer = _interopRequireWildcard(require("./Renderer"));
|
|
26
|
-
var _annotations = require("./annotations/");
|
|
27
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
28
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
package/dist/es2019/ui/index.js
DELETED
package/dist/esm/ui/index.js
DELETED
package/dist/types/ui/index.d.ts
DELETED