@atlaskit/editor-common 110.28.0 → 110.29.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 +15 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MediaSingle/index.js +6 -2
- package/dist/cjs/ui/MediaSingle/styled.js +10 -5
- package/dist/cjs/utils/annotation/index.js +0 -3
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/index.js +5 -2
- package/dist/es2019/ui/MediaSingle/styled.js +9 -5
- package/dist/es2019/utils/annotation/index.js +0 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MediaSingle/index.js +6 -2
- package/dist/esm/ui/MediaSingle/styled.js +10 -5
- package/dist/esm/utils/annotation/index.js +0 -3
- package/dist/types/ui/MediaSingle/index.d.ts +3 -1
- package/dist/types/ui/MediaSingle/styled.d.ts +3 -3
- package/dist/types-ts4.5/ui/MediaSingle/index.d.ts +3 -1
- package/dist/types-ts4.5/ui/MediaSingle/styled.d.ts +3 -3
- package/package.json +2 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 110.29.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4cab7924c4af0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4cab7924c4af0) -
|
|
8
|
+
[ux] Clean up editor_inline_comments_paste_insert_nodes
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 110.29.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`2faceafe1c4dd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2faceafe1c4dd) -
|
|
16
|
+
[ux] fixing media late mutation for confluence view page
|
|
17
|
+
|
|
3
18
|
## 110.28.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "110.
|
|
19
|
+
var packageVersion = "110.29.0";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "110.
|
|
27
|
+
var packageVersion = "110.29.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -43,6 +43,7 @@ var _styled = require("./styled");
|
|
|
43
43
|
* @param root0.handleMediaSingleRef
|
|
44
44
|
* @param root0.isInsideOfInlineExtension
|
|
45
45
|
* @param root0.dataAttributes
|
|
46
|
+
* @param root0.isInRenderer
|
|
46
47
|
* @example
|
|
47
48
|
*/
|
|
48
49
|
function MediaSingle(_ref) {
|
|
@@ -66,7 +67,9 @@ function MediaSingle(_ref) {
|
|
|
66
67
|
handleMediaSingleRef = _ref.handleMediaSingleRef,
|
|
67
68
|
_ref$isInsideOfInline = _ref.isInsideOfInlineExtension,
|
|
68
69
|
isInsideOfInlineExtension = _ref$isInsideOfInline === void 0 ? false : _ref$isInsideOfInline,
|
|
69
|
-
dataAttributes = _ref.dataAttributes
|
|
70
|
+
dataAttributes = _ref.dataAttributes,
|
|
71
|
+
_ref$isInRenderer = _ref.isInRenderer,
|
|
72
|
+
isInRenderer = _ref$isInRenderer === void 0 ? false : _ref$isInRenderer;
|
|
70
73
|
var isPixelWidth = (size === null || size === void 0 ? void 0 : size.widthType) === 'pixel';
|
|
71
74
|
var mediaSingleWidth = (size === null || size === void 0 ? void 0 : size.width) || pctWidth;
|
|
72
75
|
var children = _react.default.Children.toArray(propsChildren);
|
|
@@ -129,7 +132,8 @@ function MediaSingle(_ref) {
|
|
|
129
132
|
fullWidthMode: fullWidthMode,
|
|
130
133
|
isExtendedResizeExperienceOn: isPixelWidth,
|
|
131
134
|
isInsideOfInlineExtension: isInsideOfInlineExtension,
|
|
132
|
-
|
|
135
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
136
|
+
isInRenderer: isInRenderer && (0, _platformFeatureFlags.fg)('media-perf-uplift-mutation-fix')
|
|
133
137
|
})
|
|
134
138
|
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/platform/no-preconditioning
|
|
135
139
|
}, !(0, _platformFeatureFlags.fg)('platform_editor_fix_media_in_renderer') ? {} : {
|
|
@@ -15,7 +15,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
18
|
-
var _isSsr = require("../../core-utils/is-ssr");
|
|
19
18
|
var _utils = require("../../utils");
|
|
20
19
|
var _breakout = require("../../utils/breakout");
|
|
21
20
|
var _excluded = ["children"];
|
|
@@ -200,7 +199,7 @@ function roundToClosestEvenPxValue(widthValue) {
|
|
|
200
199
|
* @param root0.isExtendedResizeExperienceOn
|
|
201
200
|
* @param root0.isNestedNode
|
|
202
201
|
* @param root0.isInsideOfInlineExtension
|
|
203
|
-
* @param root0.
|
|
202
|
+
* @param root0.isInRenderer
|
|
204
203
|
* @example
|
|
205
204
|
*/
|
|
206
205
|
var MediaSingleDimensionHelper = exports.MediaSingleDimensionHelper = function MediaSingleDimensionHelper(_ref) {
|
|
@@ -216,19 +215,25 @@ var MediaSingleDimensionHelper = exports.MediaSingleDimensionHelper = function M
|
|
|
216
215
|
isNestedNode = _ref$isNestedNode === void 0 ? false : _ref$isNestedNode,
|
|
217
216
|
_ref$isInsideOfInline = _ref.isInsideOfInlineExtension,
|
|
218
217
|
isInsideOfInlineExtension = _ref$isInsideOfInline === void 0 ? false : _ref$isInsideOfInline,
|
|
219
|
-
|
|
218
|
+
_ref$isInRenderer = _ref.isInRenderer,
|
|
219
|
+
isInRenderer = _ref$isInRenderer === void 0 ? false : _ref$isInRenderer;
|
|
220
220
|
var calculatedWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? "".concat(mediaSingleWidth || width, "px") : mediaSingleWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized, isInsideOfInlineExtension));
|
|
221
221
|
var calculatedMaxWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? "".concat(containerWidth, "px") : calcMaxWidth(layout, containerWidth));
|
|
222
222
|
|
|
223
223
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
224
224
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
225
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t/* For nested rich media items, set max-width to 100% */\n\t\ttr &,\n\t\t[data-layout-column] &,\n\t\t[data-node-type='expand'] &,\n\t\t[data-panel-type] &,\n\t\tli & {\n\t\t\tmax-width: 100%;\n\t\t}\n\n\t\twidth: ", ";\n\t\t", "\n\n\t\t
|
|
225
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t/* For nested rich media items, set max-width to 100% */\n\t\ttr &,\n\t\t[data-layout-column] &,\n\t\t[data-node-type='expand'] &,\n\t\t[data-panel-type] &,\n\t\tli & {\n\t\t\tmax-width: 100%;\n\t\t}\n\n\t\twidth: ", ";\n\t\t", "\n\n\t\t", "\n\t\t\n\t\t", "\n\n\t\t&:not(.is-resizing) {\n\t\t\ttransition: width 100ms ease-in;\n\t\t}\n\n\t\tfloat: ", ";\n\t\tmargin: ", ";\n\n\t\t&[class*='not-resizing'] {\n\t\t\t", "\n\t\t}\n\n\t\t", ";\n\t"])), calculatedWidth, layout === 'full-width' &&
|
|
226
226
|
/* This causes issues for new experience where we don't strip layout attributes
|
|
227
227
|
when copying top-level node and pasting into a table/layout,
|
|
228
228
|
because full-width layout will remain, causing node to be edge-to-edge */
|
|
229
229
|
!isExtendedResizeExperienceOn && (0, _react2.css)({
|
|
230
230
|
minWidth: '100%'
|
|
231
|
-
}),
|
|
231
|
+
}), isInRenderer ? (0, _react2.css)({
|
|
232
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-container-queries
|
|
233
|
+
'@container ak-renderer-wrapper (min-width: 1px)': {
|
|
234
|
+
maxWidth: '100cqw'
|
|
235
|
+
}
|
|
236
|
+
}) : "max-width: ".concat(calculatedMaxWidth, ";"), isExtendedResizeExperienceOn && "&[class*='is-resizing'] {\n .new-file-experience-wrapper {\n box-shadow: none !important;\n }\n\n ".concat(!isNestedNode && _utils.nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", "\n }"), float(layout), calcMargin(layout), isNestedNode ? /* Make nested node appear responsive when resizing table cell */"max-width: 100%;" : _utils.nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", isImageAligned(layout));
|
|
232
237
|
};
|
|
233
238
|
var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
|
|
234
239
|
var hasFallbackContainer = _ref2.hasFallbackContainer,
|
|
@@ -219,9 +219,6 @@ function getAnnotationInlineNodeTypes(state, annotationId) {
|
|
|
219
219
|
Used with the creation of the inline nodes: emoji, status, dates, mentions & inlineCards.
|
|
220
220
|
*/
|
|
221
221
|
function getAnnotationMarksForPos(pos) {
|
|
222
|
-
if (!(0, _platformFeatureFlags.fg)('editor_inline_comments_paste_insert_nodes')) {
|
|
223
|
-
return undefined;
|
|
224
|
-
}
|
|
225
222
|
var annotationMarks = pos.marks().filter(function (mark) {
|
|
226
223
|
return mark.type === pos.doc.type.schema.marks.annotation;
|
|
227
224
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "110.
|
|
4
|
+
const packageVersion = "110.29.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "110.
|
|
17
|
+
const packageVersion = "110.29.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -34,6 +34,7 @@ import { MediaSingleDimensionHelper, MediaWrapper } from './styled';
|
|
|
34
34
|
* @param root0.handleMediaSingleRef
|
|
35
35
|
* @param root0.isInsideOfInlineExtension
|
|
36
36
|
* @param root0.dataAttributes
|
|
37
|
+
* @param root0.isInRenderer
|
|
37
38
|
* @example
|
|
38
39
|
*/
|
|
39
40
|
export default function MediaSingle({
|
|
@@ -52,7 +53,8 @@ export default function MediaSingle({
|
|
|
52
53
|
hasFallbackContainer = true,
|
|
53
54
|
handleMediaSingleRef,
|
|
54
55
|
isInsideOfInlineExtension = false,
|
|
55
|
-
dataAttributes
|
|
56
|
+
dataAttributes,
|
|
57
|
+
isInRenderer = false
|
|
56
58
|
}) {
|
|
57
59
|
const isPixelWidth = (size === null || size === void 0 ? void 0 : size.widthType) === 'pixel';
|
|
58
60
|
let mediaSingleWidth = (size === null || size === void 0 ? void 0 : size.width) || pctWidth;
|
|
@@ -114,7 +116,8 @@ export default function MediaSingle({
|
|
|
114
116
|
fullWidthMode,
|
|
115
117
|
isExtendedResizeExperienceOn: isPixelWidth,
|
|
116
118
|
isInsideOfInlineExtension,
|
|
117
|
-
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
120
|
+
isInRenderer: isInRenderer && fg('media-perf-uplift-mutation-fix')
|
|
118
121
|
})
|
|
119
122
|
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/platform/no-preconditioning
|
|
120
123
|
}, !fg('platform_editor_fix_media_in_renderer') ? {} : {
|
|
@@ -8,7 +8,6 @@ import React from 'react';
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { akEditorDefaultLayoutWidth, akEditorFullPageMaxWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
11
|
-
import { isSSR } from '../../core-utils/is-ssr';
|
|
12
11
|
import { nonWrappedLayouts } from '../../utils';
|
|
13
12
|
import { calcBreakoutWidth, calcWideWidth } from '../../utils/breakout';
|
|
14
13
|
function float(layout) {
|
|
@@ -178,7 +177,7 @@ export function roundToClosestEvenPxValue(widthValue) {
|
|
|
178
177
|
* @param root0.isExtendedResizeExperienceOn
|
|
179
178
|
* @param root0.isNestedNode
|
|
180
179
|
* @param root0.isInsideOfInlineExtension
|
|
181
|
-
* @param root0.
|
|
180
|
+
* @param root0.isInRenderer
|
|
182
181
|
* @example
|
|
183
182
|
*/
|
|
184
183
|
export const MediaSingleDimensionHelper = ({
|
|
@@ -192,7 +191,7 @@ export const MediaSingleDimensionHelper = ({
|
|
|
192
191
|
isExtendedResizeExperienceOn,
|
|
193
192
|
isNestedNode = false,
|
|
194
193
|
isInsideOfInlineExtension = false,
|
|
195
|
-
|
|
194
|
+
isInRenderer = false
|
|
196
195
|
}) => {
|
|
197
196
|
const calculatedWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? `${mediaSingleWidth || width}px` : mediaSingleWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized, isInsideOfInlineExtension));
|
|
198
197
|
const calculatedMaxWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? `${containerWidth}px` : calcMaxWidth(layout, containerWidth));
|
|
@@ -218,8 +217,13 @@ export const MediaSingleDimensionHelper = ({
|
|
|
218
217
|
minWidth: '100%'
|
|
219
218
|
})}
|
|
220
219
|
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
${isInRenderer ? css({
|
|
221
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-container-queries
|
|
222
|
+
'@container ak-renderer-wrapper (min-width: 1px)': {
|
|
223
|
+
maxWidth: '100cqw'
|
|
224
|
+
}
|
|
225
|
+
}) : `max-width: ${calculatedMaxWidth};`}
|
|
226
|
+
|
|
223
227
|
${isExtendedResizeExperienceOn && `&[class*='is-resizing'] {
|
|
224
228
|
.new-file-experience-wrapper {
|
|
225
229
|
box-shadow: none !important;
|
|
@@ -214,9 +214,6 @@ export function getAnnotationInlineNodeTypes(state, annotationId) {
|
|
|
214
214
|
Used with the creation of the inline nodes: emoji, status, dates, mentions & inlineCards.
|
|
215
215
|
*/
|
|
216
216
|
export function getAnnotationMarksForPos(pos) {
|
|
217
|
-
if (!fg('editor_inline_comments_paste_insert_nodes')) {
|
|
218
|
-
return undefined;
|
|
219
|
-
}
|
|
220
217
|
const annotationMarks = pos.marks().filter(mark => mark.type === pos.doc.type.schema.marks.annotation);
|
|
221
218
|
return annotationMarks;
|
|
222
219
|
}
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "110.
|
|
10
|
+
var packageVersion = "110.29.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "110.
|
|
24
|
+
var packageVersion = "110.29.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -35,6 +35,7 @@ import { MediaSingleDimensionHelper, MediaWrapper } from './styled';
|
|
|
35
35
|
* @param root0.handleMediaSingleRef
|
|
36
36
|
* @param root0.isInsideOfInlineExtension
|
|
37
37
|
* @param root0.dataAttributes
|
|
38
|
+
* @param root0.isInRenderer
|
|
38
39
|
* @example
|
|
39
40
|
*/
|
|
40
41
|
export default function MediaSingle(_ref) {
|
|
@@ -58,7 +59,9 @@ export default function MediaSingle(_ref) {
|
|
|
58
59
|
handleMediaSingleRef = _ref.handleMediaSingleRef,
|
|
59
60
|
_ref$isInsideOfInline = _ref.isInsideOfInlineExtension,
|
|
60
61
|
isInsideOfInlineExtension = _ref$isInsideOfInline === void 0 ? false : _ref$isInsideOfInline,
|
|
61
|
-
dataAttributes = _ref.dataAttributes
|
|
62
|
+
dataAttributes = _ref.dataAttributes,
|
|
63
|
+
_ref$isInRenderer = _ref.isInRenderer,
|
|
64
|
+
isInRenderer = _ref$isInRenderer === void 0 ? false : _ref$isInRenderer;
|
|
62
65
|
var isPixelWidth = (size === null || size === void 0 ? void 0 : size.widthType) === 'pixel';
|
|
63
66
|
var mediaSingleWidth = (size === null || size === void 0 ? void 0 : size.width) || pctWidth;
|
|
64
67
|
var children = React.Children.toArray(propsChildren);
|
|
@@ -121,7 +124,8 @@ export default function MediaSingle(_ref) {
|
|
|
121
124
|
fullWidthMode: fullWidthMode,
|
|
122
125
|
isExtendedResizeExperienceOn: isPixelWidth,
|
|
123
126
|
isInsideOfInlineExtension: isInsideOfInlineExtension,
|
|
124
|
-
|
|
127
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
128
|
+
isInRenderer: isInRenderer && fg('media-perf-uplift-mutation-fix')
|
|
125
129
|
})
|
|
126
130
|
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/platform/no-preconditioning
|
|
127
131
|
}, !fg('platform_editor_fix_media_in_renderer') ? {} : {
|
|
@@ -12,7 +12,6 @@ import React from 'react';
|
|
|
12
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
13
|
import { css, jsx } from '@emotion/react';
|
|
14
14
|
import { akEditorDefaultLayoutWidth, akEditorFullPageMaxWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
15
|
-
import { isSSR } from '../../core-utils/is-ssr';
|
|
16
15
|
import { nonWrappedLayouts } from '../../utils';
|
|
17
16
|
import { calcBreakoutWidth, calcWideWidth } from '../../utils/breakout';
|
|
18
17
|
function float(layout) {
|
|
@@ -190,7 +189,7 @@ export function roundToClosestEvenPxValue(widthValue) {
|
|
|
190
189
|
* @param root0.isExtendedResizeExperienceOn
|
|
191
190
|
* @param root0.isNestedNode
|
|
192
191
|
* @param root0.isInsideOfInlineExtension
|
|
193
|
-
* @param root0.
|
|
192
|
+
* @param root0.isInRenderer
|
|
194
193
|
* @example
|
|
195
194
|
*/
|
|
196
195
|
export var MediaSingleDimensionHelper = function MediaSingleDimensionHelper(_ref) {
|
|
@@ -206,19 +205,25 @@ export var MediaSingleDimensionHelper = function MediaSingleDimensionHelper(_ref
|
|
|
206
205
|
isNestedNode = _ref$isNestedNode === void 0 ? false : _ref$isNestedNode,
|
|
207
206
|
_ref$isInsideOfInline = _ref.isInsideOfInlineExtension,
|
|
208
207
|
isInsideOfInlineExtension = _ref$isInsideOfInline === void 0 ? false : _ref$isInsideOfInline,
|
|
209
|
-
|
|
208
|
+
_ref$isInRenderer = _ref.isInRenderer,
|
|
209
|
+
isInRenderer = _ref$isInRenderer === void 0 ? false : _ref$isInRenderer;
|
|
210
210
|
var calculatedWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? "".concat(mediaSingleWidth || width, "px") : mediaSingleWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized, isInsideOfInlineExtension));
|
|
211
211
|
var calculatedMaxWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? "".concat(containerWidth, "px") : calcMaxWidth(layout, containerWidth));
|
|
212
212
|
|
|
213
213
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
214
214
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
215
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t/* For nested rich media items, set max-width to 100% */\n\t\ttr &,\n\t\t[data-layout-column] &,\n\t\t[data-node-type='expand'] &,\n\t\t[data-panel-type] &,\n\t\tli & {\n\t\t\tmax-width: 100%;\n\t\t}\n\n\t\twidth: ", ";\n\t\t", "\n\n\t\t
|
|
215
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t/* For nested rich media items, set max-width to 100% */\n\t\ttr &,\n\t\t[data-layout-column] &,\n\t\t[data-node-type='expand'] &,\n\t\t[data-panel-type] &,\n\t\tli & {\n\t\t\tmax-width: 100%;\n\t\t}\n\n\t\twidth: ", ";\n\t\t", "\n\n\t\t", "\n\t\t\n\t\t", "\n\n\t\t&:not(.is-resizing) {\n\t\t\ttransition: width 100ms ease-in;\n\t\t}\n\n\t\tfloat: ", ";\n\t\tmargin: ", ";\n\n\t\t&[class*='not-resizing'] {\n\t\t\t", "\n\t\t}\n\n\t\t", ";\n\t"])), calculatedWidth, layout === 'full-width' &&
|
|
216
216
|
/* This causes issues for new experience where we don't strip layout attributes
|
|
217
217
|
when copying top-level node and pasting into a table/layout,
|
|
218
218
|
because full-width layout will remain, causing node to be edge-to-edge */
|
|
219
219
|
!isExtendedResizeExperienceOn && css({
|
|
220
220
|
minWidth: '100%'
|
|
221
|
-
}),
|
|
221
|
+
}), isInRenderer ? css({
|
|
222
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-container-queries
|
|
223
|
+
'@container ak-renderer-wrapper (min-width: 1px)': {
|
|
224
|
+
maxWidth: '100cqw'
|
|
225
|
+
}
|
|
226
|
+
}) : "max-width: ".concat(calculatedMaxWidth, ";"), isExtendedResizeExperienceOn && "&[class*='is-resizing'] {\n .new-file-experience-wrapper {\n box-shadow: none !important;\n }\n\n ".concat(!isNestedNode && nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", "\n }"), float(layout), calcMargin(layout), isNestedNode ? /* Make nested node appear responsive when resizing table cell */"max-width: 100%;" : nonWrappedLayouts.includes(layout) && "margin-left: 50%;\n transform: translateX(-50%);", isImageAligned(layout));
|
|
222
227
|
};
|
|
223
228
|
var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
|
|
224
229
|
var hasFallbackContainer = _ref2.hasFallbackContainer,
|
|
@@ -203,9 +203,6 @@ export function getAnnotationInlineNodeTypes(state, annotationId) {
|
|
|
203
203
|
Used with the creation of the inline nodes: emoji, status, dates, mentions & inlineCards.
|
|
204
204
|
*/
|
|
205
205
|
export function getAnnotationMarksForPos(pos) {
|
|
206
|
-
if (!fg('editor_inline_comments_paste_insert_nodes')) {
|
|
207
|
-
return undefined;
|
|
208
|
-
}
|
|
209
206
|
var annotationMarks = pos.marks().filter(function (mark) {
|
|
210
207
|
return mark.type === pos.doc.type.schema.marks.annotation;
|
|
211
208
|
});
|
|
@@ -29,6 +29,7 @@ export interface Props {
|
|
|
29
29
|
*/
|
|
30
30
|
pctWidth?: number;
|
|
31
31
|
size?: MediaSingleSize;
|
|
32
|
+
isInRenderer?: boolean;
|
|
32
33
|
width?: number;
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
@@ -50,6 +51,7 @@ export interface Props {
|
|
|
50
51
|
* @param root0.handleMediaSingleRef
|
|
51
52
|
* @param root0.isInsideOfInlineExtension
|
|
52
53
|
* @param root0.dataAttributes
|
|
54
|
+
* @param root0.isInRenderer
|
|
53
55
|
* @example
|
|
54
56
|
*/
|
|
55
|
-
export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, dataAttributes, }: Props): jsx.JSX.Element;
|
|
57
|
+
export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, dataAttributes, isInRenderer, }: Props): jsx.JSX.Element;
|
|
@@ -65,7 +65,6 @@ export interface MediaSingleWrapperProps {
|
|
|
65
65
|
isResized?: boolean;
|
|
66
66
|
layout: MediaSingleLayout;
|
|
67
67
|
mediaSingleWidth?: number;
|
|
68
|
-
nodeType?: string;
|
|
69
68
|
/**
|
|
70
69
|
* @private
|
|
71
70
|
* @deprecated Use {@link MediaSingleWrapperProps["mediaSingleWidth"]} instead.
|
|
@@ -73,6 +72,7 @@ export interface MediaSingleWrapperProps {
|
|
|
73
72
|
*/
|
|
74
73
|
pctWidth?: number;
|
|
75
74
|
width?: number;
|
|
75
|
+
isInRenderer?: boolean;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* Can't use `.attrs` to handle highly dynamic styles because we are still
|
|
@@ -87,10 +87,10 @@ export interface MediaSingleWrapperProps {
|
|
|
87
87
|
* @param root0.isExtendedResizeExperienceOn
|
|
88
88
|
* @param root0.isNestedNode
|
|
89
89
|
* @param root0.isInsideOfInlineExtension
|
|
90
|
-
* @param root0.
|
|
90
|
+
* @param root0.isInRenderer
|
|
91
91
|
* @example
|
|
92
92
|
*/
|
|
93
|
-
export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension,
|
|
93
|
+
export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension, isInRenderer, }: MediaSingleWrapperProps) => import("@emotion/react").SerializedStyles;
|
|
94
94
|
export interface MediaWrapperProps {
|
|
95
95
|
hasFallbackContainer?: boolean;
|
|
96
96
|
height?: number;
|
|
@@ -29,6 +29,7 @@ export interface Props {
|
|
|
29
29
|
*/
|
|
30
30
|
pctWidth?: number;
|
|
31
31
|
size?: MediaSingleSize;
|
|
32
|
+
isInRenderer?: boolean;
|
|
32
33
|
width?: number;
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
@@ -50,6 +51,7 @@ export interface Props {
|
|
|
50
51
|
* @param root0.handleMediaSingleRef
|
|
51
52
|
* @param root0.isInsideOfInlineExtension
|
|
52
53
|
* @param root0.dataAttributes
|
|
54
|
+
* @param root0.isInRenderer
|
|
53
55
|
* @example
|
|
54
56
|
*/
|
|
55
|
-
export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, dataAttributes, }: Props): jsx.JSX.Element;
|
|
57
|
+
export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, dataAttributes, isInRenderer, }: Props): jsx.JSX.Element;
|
|
@@ -65,7 +65,6 @@ export interface MediaSingleWrapperProps {
|
|
|
65
65
|
isResized?: boolean;
|
|
66
66
|
layout: MediaSingleLayout;
|
|
67
67
|
mediaSingleWidth?: number;
|
|
68
|
-
nodeType?: string;
|
|
69
68
|
/**
|
|
70
69
|
* @private
|
|
71
70
|
* @deprecated Use {@link MediaSingleWrapperProps["mediaSingleWidth"]} instead.
|
|
@@ -73,6 +72,7 @@ export interface MediaSingleWrapperProps {
|
|
|
73
72
|
*/
|
|
74
73
|
pctWidth?: number;
|
|
75
74
|
width?: number;
|
|
75
|
+
isInRenderer?: boolean;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* Can't use `.attrs` to handle highly dynamic styles because we are still
|
|
@@ -87,10 +87,10 @@ export interface MediaSingleWrapperProps {
|
|
|
87
87
|
* @param root0.isExtendedResizeExperienceOn
|
|
88
88
|
* @param root0.isNestedNode
|
|
89
89
|
* @param root0.isInsideOfInlineExtension
|
|
90
|
-
* @param root0.
|
|
90
|
+
* @param root0.isInRenderer
|
|
91
91
|
* @example
|
|
92
92
|
*/
|
|
93
|
-
export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension,
|
|
93
|
+
export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension, isInRenderer, }: MediaSingleWrapperProps) => import("@emotion/react").SerializedStyles;
|
|
94
94
|
export interface MediaWrapperProps {
|
|
95
95
|
hasFallbackContainer?: boolean;
|
|
96
96
|
height?: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "110.
|
|
3
|
+
"version": "110.29.1",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@atlaskit/task-decision": "^19.2.0",
|
|
83
83
|
"@atlaskit/textfield": "^8.0.0",
|
|
84
84
|
"@atlaskit/theme": "^21.0.0",
|
|
85
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
85
|
+
"@atlaskit/tmp-editor-statsig": "^13.38.0",
|
|
86
86
|
"@atlaskit/tokens": "^8.0.0",
|
|
87
87
|
"@atlaskit/tooltip": "^20.8.0",
|
|
88
88
|
"@atlaskit/ufo": "^0.4.0",
|
|
@@ -165,9 +165,6 @@
|
|
|
165
165
|
"editor_inline_comments_on_inline_nodes": {
|
|
166
166
|
"type": "boolean"
|
|
167
167
|
},
|
|
168
|
-
"editor_inline_comments_paste_insert_nodes": {
|
|
169
|
-
"type": "boolean"
|
|
170
|
-
},
|
|
171
168
|
"platform_editor_typography_ugc": {
|
|
172
169
|
"type": "boolean"
|
|
173
170
|
},
|