@atlaskit/renderer 108.21.1 → 109.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cjs/react/nodes/mediaInline.js +5 -5
- package/dist/cjs/react/nodes/orderedList.js +10 -14
- package/dist/cjs/ui/Renderer/index.js +1 -1
- package/dist/es2019/react/nodes/mediaInline.js +5 -5
- package/dist/es2019/react/nodes/orderedList.js +10 -14
- package/dist/es2019/ui/Renderer/index.js +1 -1
- package/dist/esm/react/nodes/mediaInline.js +5 -5
- package/dist/esm/react/nodes/orderedList.js +10 -14
- package/dist/esm/ui/Renderer/index.js +1 -1
- package/dist/types/react/nodes/mediaInline.d.ts +7 -7
- package/dist/types-ts4.5/react/nodes/mediaInline.d.ts +7 -7
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/renderer
|
|
2
2
|
|
|
3
|
+
## 109.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#60167](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/60167) [`ae0930df4bfa`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ae0930df4bfa) - Renamed supportReact18 to runReact18
|
|
8
|
+
|
|
9
|
+
## 109.0.0
|
|
10
|
+
|
|
11
|
+
### Major Changes
|
|
12
|
+
|
|
13
|
+
- [#59319](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/59319) [`d2e34e936bf2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d2e34e936bf2) - [ED-15859] Clean up restartNumberedLists feature flag and set this feature as the default behaviour for ordered lists. Currently this feature is only rolled out in Confluence so this change will roll it out to all other products which adopt this version.
|
|
14
|
+
|
|
3
15
|
## 108.21.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -11,14 +11,14 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
12
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
14
|
-
var
|
|
15
|
-
var _mediaCard = require("@atlaskit/media-card");
|
|
16
|
-
var _mediaUi = require("@atlaskit/media-ui");
|
|
14
|
+
var _mediaInline = require("@atlaskit/editor-common/media-inline");
|
|
17
15
|
var _providerFactory = require("@atlaskit/editor-common/provider-factory");
|
|
16
|
+
var _mediaCard = require("@atlaskit/media-card");
|
|
18
17
|
var _mediaClientReact = require("@atlaskit/media-client-react");
|
|
19
|
-
var
|
|
18
|
+
var _mediaUi = require("@atlaskit/media-ui");
|
|
19
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
20
20
|
var _reactIntlNext = require("react-intl-next");
|
|
21
|
-
var
|
|
21
|
+
var _MediaCard = require("../../ui/MediaCard");
|
|
22
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
23
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
24
|
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; }
|
|
@@ -11,22 +11,18 @@ var _adfSchema = require("@atlaskit/adf-schema");
|
|
|
11
11
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
12
12
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
13
13
|
var _lists = require("../utils/lists");
|
|
14
|
-
var _useFeatureFlags = require("../../use-feature-flags");
|
|
15
14
|
function OrderedList(props) {
|
|
16
|
-
var
|
|
15
|
+
var _props$content;
|
|
17
16
|
var extraProps = {};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (props.order !== undefined) {
|
|
28
|
-
extraProps.start = (0, _utils.resolveOrder)(props.order);
|
|
29
|
-
}
|
|
17
|
+
var itemCounterDigitsSize = (0, _utils.getItemCounterDigitsSize)({
|
|
18
|
+
order: props.order,
|
|
19
|
+
itemsCount: props === null || props === void 0 || (_props$content = props.content) === null || _props$content === void 0 ? void 0 : _props$content.length
|
|
20
|
+
});
|
|
21
|
+
if (itemCounterDigitsSize && itemCounterDigitsSize > 2) {
|
|
22
|
+
extraProps.style = (0, _styles.getOrderedListInlineStyles)(itemCounterDigitsSize, 'object');
|
|
23
|
+
}
|
|
24
|
+
if (props.order !== undefined) {
|
|
25
|
+
extraProps.start = (0, _utils.resolveOrder)(props.order);
|
|
30
26
|
}
|
|
31
27
|
return /*#__PURE__*/_react.default.createElement("ol", (0, _extends2.default)({
|
|
32
28
|
className: _adfSchema.orderedListSelector.substr(1),
|
|
@@ -54,7 +54,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
54
54
|
var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
55
55
|
var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
56
56
|
var packageName = "@atlaskit/renderer";
|
|
57
|
-
var packageVersion = "
|
|
57
|
+
var packageVersion = "109.0.1";
|
|
58
58
|
var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
59
59
|
(0, _inherits2.default)(Renderer, _PureComponent);
|
|
60
60
|
var _super = _createSuper(Renderer);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import
|
|
3
|
-
import { MediaInlineCard } from '@atlaskit/media-card';
|
|
4
|
-
import { MediaInlineCardErroredView, MediaInlineCardLoadingView, messages } from '@atlaskit/media-ui';
|
|
2
|
+
import { MediaInlineImageCard, shouldShowInlineImage } from '@atlaskit/editor-common/media-inline';
|
|
5
3
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
4
|
+
import { MediaInlineCard } from '@atlaskit/media-card';
|
|
6
5
|
import { MediaClientContext } from '@atlaskit/media-client-react';
|
|
7
|
-
import {
|
|
6
|
+
import { MediaInlineCardErroredView, MediaInlineCardLoadingView, messages } from '@atlaskit/media-ui';
|
|
7
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
8
8
|
import { createIntl, injectIntl } from 'react-intl-next';
|
|
9
|
-
import {
|
|
9
|
+
import { getClipboardAttrs, mediaIdentifierMap } from '../../ui/MediaCard';
|
|
10
10
|
export const RenderMediaInline = ({
|
|
11
11
|
rendererAppearance,
|
|
12
12
|
intl,
|
|
@@ -4,22 +4,18 @@ import { orderedListSelector } from '@atlaskit/adf-schema';
|
|
|
4
4
|
import { getOrderedListInlineStyles } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { getItemCounterDigitsSize, resolveOrder } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { getListIndentLevel } from '../utils/lists';
|
|
7
|
-
import { useFeatureFlags } from '../../use-feature-flags';
|
|
8
7
|
export default function OrderedList(props) {
|
|
9
|
-
|
|
8
|
+
var _props$content;
|
|
10
9
|
let extraProps = {};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (props.order !== undefined) {
|
|
21
|
-
extraProps.start = resolveOrder(props.order);
|
|
22
|
-
}
|
|
10
|
+
const itemCounterDigitsSize = getItemCounterDigitsSize({
|
|
11
|
+
order: props.order,
|
|
12
|
+
itemsCount: props === null || props === void 0 ? void 0 : (_props$content = props.content) === null || _props$content === void 0 ? void 0 : _props$content.length
|
|
13
|
+
});
|
|
14
|
+
if (itemCounterDigitsSize && itemCounterDigitsSize > 2) {
|
|
15
|
+
extraProps.style = getOrderedListInlineStyles(itemCounterDigitsSize, 'object');
|
|
16
|
+
}
|
|
17
|
+
if (props.order !== undefined) {
|
|
18
|
+
extraProps.start = resolveOrder(props.order);
|
|
23
19
|
}
|
|
24
20
|
return /*#__PURE__*/React.createElement("ol", _extends({
|
|
25
21
|
className: orderedListSelector.substr(1),
|
|
@@ -35,7 +35,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
35
35
|
export const NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
36
36
|
export const DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
37
37
|
const packageName = "@atlaskit/renderer";
|
|
38
|
-
const packageVersion = "
|
|
38
|
+
const packageVersion = "109.0.1";
|
|
39
39
|
export class Renderer extends PureComponent {
|
|
40
40
|
constructor(props) {
|
|
41
41
|
super(props);
|
|
@@ -5,14 +5,14 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
-
import
|
|
9
|
-
import { MediaInlineCard } from '@atlaskit/media-card';
|
|
10
|
-
import { MediaInlineCardErroredView, MediaInlineCardLoadingView, messages } from '@atlaskit/media-ui';
|
|
8
|
+
import { MediaInlineImageCard, shouldShowInlineImage } from '@atlaskit/editor-common/media-inline';
|
|
11
9
|
import { WithProviders } from '@atlaskit/editor-common/provider-factory';
|
|
10
|
+
import { MediaInlineCard } from '@atlaskit/media-card';
|
|
12
11
|
import { MediaClientContext } from '@atlaskit/media-client-react';
|
|
13
|
-
import {
|
|
12
|
+
import { MediaInlineCardErroredView, MediaInlineCardLoadingView, messages } from '@atlaskit/media-ui';
|
|
13
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
14
14
|
import { createIntl, injectIntl } from 'react-intl-next';
|
|
15
|
-
import {
|
|
15
|
+
import { getClipboardAttrs, mediaIdentifierMap } from '../../ui/MediaCard';
|
|
16
16
|
export var RenderMediaInline = function RenderMediaInline(_ref) {
|
|
17
17
|
var rendererAppearance = _ref.rendererAppearance,
|
|
18
18
|
intl = _ref.intl,
|
|
@@ -4,22 +4,18 @@ import { orderedListSelector } from '@atlaskit/adf-schema';
|
|
|
4
4
|
import { getOrderedListInlineStyles } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { getItemCounterDigitsSize, resolveOrder } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { getListIndentLevel } from '../utils/lists';
|
|
7
|
-
import { useFeatureFlags } from '../../use-feature-flags';
|
|
8
7
|
export default function OrderedList(props) {
|
|
9
|
-
var
|
|
8
|
+
var _props$content;
|
|
10
9
|
var extraProps = {};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (props.order !== undefined) {
|
|
21
|
-
extraProps.start = resolveOrder(props.order);
|
|
22
|
-
}
|
|
10
|
+
var itemCounterDigitsSize = getItemCounterDigitsSize({
|
|
11
|
+
order: props.order,
|
|
12
|
+
itemsCount: props === null || props === void 0 || (_props$content = props.content) === null || _props$content === void 0 ? void 0 : _props$content.length
|
|
13
|
+
});
|
|
14
|
+
if (itemCounterDigitsSize && itemCounterDigitsSize > 2) {
|
|
15
|
+
extraProps.style = getOrderedListInlineStyles(itemCounterDigitsSize, 'object');
|
|
16
|
+
}
|
|
17
|
+
if (props.order !== undefined) {
|
|
18
|
+
extraProps.start = resolveOrder(props.order);
|
|
23
19
|
}
|
|
24
20
|
return /*#__PURE__*/React.createElement("ol", _extends({
|
|
25
21
|
className: orderedListSelector.substr(1),
|
|
@@ -45,7 +45,7 @@ import { EditorMediaClientProvider } from '../../react/utils/EditorMediaClientPr
|
|
|
45
45
|
export var NORMAL_SEVERITY_THRESHOLD = 2000;
|
|
46
46
|
export var DEGRADED_SEVERITY_THRESHOLD = 3000;
|
|
47
47
|
var packageName = "@atlaskit/renderer";
|
|
48
|
-
var packageVersion = "
|
|
48
|
+
var packageVersion = "109.0.1";
|
|
49
49
|
export var Renderer = /*#__PURE__*/function (_PureComponent) {
|
|
50
50
|
_inherits(Renderer, _PureComponent);
|
|
51
51
|
var _super = _createSuper(Renderer);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { FC } from 'react';
|
|
1
|
+
import type { MediaInlineAttrs } from '@atlaskit/editor-common/media-inline';
|
|
3
2
|
import type { ContextIdentifierProvider, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
+
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
4
|
import type { FileIdentifier } from '@atlaskit/media-client';
|
|
5
|
-
import type {
|
|
5
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
6
|
+
import type { FC } from 'react';
|
|
7
|
+
import React from 'react';
|
|
6
8
|
import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
7
|
-
import type {
|
|
9
|
+
import type { ClipboardAttrs, MediaProvider } from '../../ui/MediaCard';
|
|
8
10
|
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
9
|
-
import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
10
11
|
import type { RendererContext } from '../types';
|
|
11
|
-
import type { MediaInlineAttrs } from '@atlaskit/editor-common/media-inline';
|
|
12
12
|
type MediaInlineProviders = {
|
|
13
13
|
mediaProvider?: Promise<MediaProvider>;
|
|
14
14
|
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
@@ -34,7 +34,7 @@ export type MediaInlineProps = {
|
|
|
34
34
|
featureFlags?: MediaFeatureFlags;
|
|
35
35
|
};
|
|
36
36
|
export declare const RenderMediaInline: FC<RenderMediaInlineProps & MediaInlineAttrs>;
|
|
37
|
-
declare const _default:
|
|
37
|
+
declare const _default: FC<import("react-intl-next").WithIntlProps<MediaInlineProps & WrappedComponentProps<"intl"> & MediaInlineAttrs>> & {
|
|
38
38
|
WrappedComponent: React.ComponentType<MediaInlineProps & WrappedComponentProps<"intl"> & MediaInlineAttrs>;
|
|
39
39
|
};
|
|
40
40
|
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { FC } from 'react';
|
|
1
|
+
import type { MediaInlineAttrs } from '@atlaskit/editor-common/media-inline';
|
|
3
2
|
import type { ContextIdentifierProvider, ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
3
|
+
import type { EventHandlers } from '@atlaskit/editor-common/ui';
|
|
4
4
|
import type { FileIdentifier } from '@atlaskit/media-client';
|
|
5
|
-
import type {
|
|
5
|
+
import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
6
|
+
import type { FC } from 'react';
|
|
7
|
+
import React from 'react';
|
|
6
8
|
import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
7
|
-
import type {
|
|
9
|
+
import type { ClipboardAttrs, MediaProvider } from '../../ui/MediaCard';
|
|
8
10
|
import type { RendererAppearance } from '../../ui/Renderer/types';
|
|
9
|
-
import type { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
10
11
|
import type { RendererContext } from '../types';
|
|
11
|
-
import type { MediaInlineAttrs } from '@atlaskit/editor-common/media-inline';
|
|
12
12
|
type MediaInlineProviders = {
|
|
13
13
|
mediaProvider?: Promise<MediaProvider>;
|
|
14
14
|
contextIdentifierProvider?: Promise<ContextIdentifierProvider>;
|
|
@@ -34,7 +34,7 @@ export type MediaInlineProps = {
|
|
|
34
34
|
featureFlags?: MediaFeatureFlags;
|
|
35
35
|
};
|
|
36
36
|
export declare const RenderMediaInline: FC<RenderMediaInlineProps & MediaInlineAttrs>;
|
|
37
|
-
declare const _default:
|
|
37
|
+
declare const _default: FC<import("react-intl-next").WithIntlProps<MediaInlineProps & WrappedComponentProps<"intl"> & MediaInlineAttrs>> & {
|
|
38
38
|
WrappedComponent: React.ComponentType<MediaInlineProps & WrappedComponentProps<"intl"> & MediaInlineAttrs>;
|
|
39
39
|
};
|
|
40
40
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/renderer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "109.0.1",
|
|
4
4
|
"description": "Renderer component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"website": {
|
|
23
23
|
"name": "Renderer"
|
|
24
24
|
},
|
|
25
|
-
"
|
|
25
|
+
"runReact18": true
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@atlaskit/adf-schema": "^35.1.1",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/analytics-listeners": "^8.7.0",
|
|
31
31
|
"@atlaskit/analytics-namespaced-context": "^6.7.0",
|
|
32
32
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
33
|
-
"@atlaskit/button": "^17.
|
|
33
|
+
"@atlaskit/button": "^17.1.0",
|
|
34
34
|
"@atlaskit/code": "^15.1.0",
|
|
35
35
|
"@atlaskit/editor-common": "^76.27.0",
|
|
36
36
|
"@atlaskit/editor-json-transformer": "^8.10.0",
|