@atlaskit/editor-common 105.2.1 → 105.2.2
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 +8 -0
- package/dist/cjs/analytics/types/enums.js +4 -0
- package/dist/cjs/analytics/types/offline-editing-event.js +5 -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 +23 -1
- package/dist/cjs/ui/MediaSingle/styled.js +33 -2
- package/dist/es2019/analytics/types/enums.js +4 -0
- package/dist/es2019/analytics/types/offline-editing-event.js +1 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MediaSingle/index.js +23 -1
- package/dist/es2019/ui/MediaSingle/styled.js +33 -2
- package/dist/esm/analytics/types/enums.js +4 -0
- package/dist/esm/analytics/types/offline-editing-event.js +1 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MediaSingle/index.js +23 -1
- package/dist/esm/ui/MediaSingle/styled.js +33 -2
- package/dist/types/analytics/types/enums.d.ts +5 -1
- package/dist/types/analytics/types/events.d.ts +2 -1
- package/dist/types/analytics/types/offline-editing-event.d.ts +13 -0
- package/dist/types/ui/MediaSingle/index.d.ts +21 -0
- package/dist/types/ui/MediaSingle/styled.d.ts +32 -1
- package/dist/types-ts4.5/analytics/types/enums.d.ts +5 -1
- package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/offline-editing-event.d.ts +13 -0
- package/dist/types-ts4.5/ui/MediaSingle/index.d.ts +21 -0
- package/dist/types-ts4.5/ui/MediaSingle/styled.d.ts +32 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 105.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#153287](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/153287)
|
|
8
|
+
[`aa386bc7b76a5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aa386bc7b76a5) -
|
|
9
|
+
ED-27636 Offline Editing: Add types to be used for offline storage analytic events
|
|
10
|
+
|
|
3
11
|
## 105.2.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -90,6 +90,8 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
90
90
|
ACTION["MATCHED"] = "matched";
|
|
91
91
|
ACTION["MEDIA_LINK_TRANSFORMED"] = "mediaLinkTransformed";
|
|
92
92
|
ACTION["NODE_CONTENT_SANITIZED"] = "nodeContentSanitized";
|
|
93
|
+
ACTION["OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR"] = "offlineStorageTooManyRetriesError";
|
|
94
|
+
ACTION["OFFLINE_STORAGE_STEPS_DATABASE_ERROR"] = "offlineStorageStepsDatabaseError";
|
|
93
95
|
ACTION["OPENED"] = "opened";
|
|
94
96
|
ACTION["OUTDENTED"] = "outdented";
|
|
95
97
|
ACTION["PASTED"] = "pasted";
|
|
@@ -317,6 +319,7 @@ var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJ
|
|
|
317
319
|
ACTION_SUBJECT["AI_DEFINITIONS"] = "aiDefinitions";
|
|
318
320
|
ACTION_SUBJECT["USER_PREFERENCES"] = "userPreferences";
|
|
319
321
|
ACTION_SUBJECT["ALIGNMENT"] = "alignment";
|
|
322
|
+
ACTION_SUBJECT["OFFLINE_EDITING"] = "offlineEditing";
|
|
320
323
|
return ACTION_SUBJECT;
|
|
321
324
|
}({});
|
|
322
325
|
var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
@@ -405,6 +408,7 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
|
|
|
405
408
|
ACTION_SUBJECT_ID["NESTED_EXPAND"] = "nestedExpand";
|
|
406
409
|
ACTION_SUBJECT_ID["NODE"] = "node";
|
|
407
410
|
ACTION_SUBJECT_ID["OPEN_LINK"] = "openLink";
|
|
411
|
+
ACTION_SUBJECT_ID["OFFLINE_EDITING"] = "offlineEditing";
|
|
408
412
|
ACTION_SUBJECT_ID["PANEL"] = "panel";
|
|
409
413
|
ACTION_SUBJECT_ID["PASTE_BLOCK_CARD"] = "blockCard";
|
|
410
414
|
ACTION_SUBJECT_ID["PASTE_BLOCKQUOTE"] = "blockQuote";
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
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; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "105.2.
|
|
20
|
+
var packageVersion = "105.2.2";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// Ignored via go/ees007
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "105.2.
|
|
26
|
+
var packageVersion = "105.2.2";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -24,6 +24,27 @@ var _styled = require("./styled");
|
|
|
24
24
|
|
|
25
25
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* MediaSingle
|
|
29
|
+
* @param root0
|
|
30
|
+
* @param root0.layout
|
|
31
|
+
* @param root0.width
|
|
32
|
+
* @param root0.height
|
|
33
|
+
* @param root0.containerWidth
|
|
34
|
+
* @param root0.isLoading
|
|
35
|
+
* @param root0.pctWidth
|
|
36
|
+
* @param root0.size
|
|
37
|
+
* @param root0.className
|
|
38
|
+
* @param root0.children
|
|
39
|
+
* @param root0.nodeType
|
|
40
|
+
* @param root0.fullWidthMode
|
|
41
|
+
* @param root0.lineLength
|
|
42
|
+
* @param root0.hasFallbackContainer
|
|
43
|
+
* @param root0.handleMediaSingleRef
|
|
44
|
+
* @param root0.isInsideOfInlineExtension
|
|
45
|
+
* @param root0.dataAttributes
|
|
46
|
+
* @example
|
|
47
|
+
*/
|
|
27
48
|
function MediaSingle(_ref) {
|
|
28
49
|
var layout = _ref.layout,
|
|
29
50
|
width = _ref.width,
|
|
@@ -107,7 +128,8 @@ function MediaSingle(_ref) {
|
|
|
107
128
|
mediaSingleWidth: mediaSingleWidth,
|
|
108
129
|
fullWidthMode: fullWidthMode,
|
|
109
130
|
isExtendedResizeExperienceOn: isPixelWidth,
|
|
110
|
-
isInsideOfInlineExtension: isInsideOfInlineExtension
|
|
131
|
+
isInsideOfInlineExtension: isInsideOfInlineExtension,
|
|
132
|
+
nodeType: nodeType
|
|
111
133
|
})
|
|
112
134
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
113
135
|
}, (0, _platformFeatureFlags.fg)('platform_fix_media_image_resizing') || (0, _platformFeatureFlags.fg)('platform_editor_fix_image_size_diff_during_ssr') ? {} : {
|
|
@@ -55,6 +55,13 @@ function getWidthIfDefaultMode(originalWidth, containerWidth, isInsideOfInlineEx
|
|
|
55
55
|
* If an image has not been resized using the pctWidth attribute,
|
|
56
56
|
* then an image in wide or full-width can not be wider than the image's
|
|
57
57
|
* original width.
|
|
58
|
+
* @param layout
|
|
59
|
+
* @param width
|
|
60
|
+
* @param containerWidth
|
|
61
|
+
* @param fullWidthMode
|
|
62
|
+
* @param isResized
|
|
63
|
+
* @param isInsideOfInlineExtension
|
|
64
|
+
* @example
|
|
58
65
|
*/
|
|
59
66
|
function calcLegacyWidth(layout, width) {
|
|
60
67
|
var containerWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -82,6 +89,12 @@ function calcLegacyWidth(layout, width) {
|
|
|
82
89
|
* If an image has not been resized using the pctWidth attribute,
|
|
83
90
|
* then an image in wide or full-width can not be wider than the image's
|
|
84
91
|
* original width.
|
|
92
|
+
* @param layout
|
|
93
|
+
* @param width
|
|
94
|
+
* @param containerWidth
|
|
95
|
+
* @param fullWidthMode
|
|
96
|
+
* @param isResized
|
|
97
|
+
* @example
|
|
85
98
|
*/
|
|
86
99
|
function calcLegacyWidthForInline(layout, width) {
|
|
87
100
|
var containerWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -107,6 +120,10 @@ function calcLegacyWidthForInline(layout, width) {
|
|
|
107
120
|
*
|
|
108
121
|
* Wide and full-width images are always that size (960px and 100%); there is
|
|
109
122
|
* no distinction between max-width and width.
|
|
123
|
+
* @param layout
|
|
124
|
+
* @param width
|
|
125
|
+
* @param containerWidth
|
|
126
|
+
* @example
|
|
110
127
|
*/
|
|
111
128
|
function calcResizedWidth(layout, width) {
|
|
112
129
|
var containerWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -156,6 +173,7 @@ function isImageAligned(layout) {
|
|
|
156
173
|
*
|
|
157
174
|
* @param widthValue CSS width value to be rounded
|
|
158
175
|
* @returns Reduced CSS width value where px value given, or otherwise the original value
|
|
176
|
+
* @example
|
|
159
177
|
*/
|
|
160
178
|
// Ignored via go/ees005
|
|
161
179
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -173,6 +191,18 @@ function roundToClosestEvenPxValue(widthValue) {
|
|
|
173
191
|
/**
|
|
174
192
|
* Can't use `.attrs` to handle highly dynamic styles because we are still
|
|
175
193
|
* supporting `styled-components` v1.
|
|
194
|
+
* @param root0
|
|
195
|
+
* @param root0.containerWidth
|
|
196
|
+
* @param root0.fullWidthMode
|
|
197
|
+
* @param root0.isResized
|
|
198
|
+
* @param root0.layout
|
|
199
|
+
* @param root0.mediaSingleWidth
|
|
200
|
+
* @param root0.width
|
|
201
|
+
* @param root0.isExtendedResizeExperienceOn
|
|
202
|
+
* @param root0.isNestedNode
|
|
203
|
+
* @param root0.isInsideOfInlineExtension
|
|
204
|
+
* @param root0.nodeType
|
|
205
|
+
* @example
|
|
176
206
|
*/
|
|
177
207
|
var MediaSingleDimensionHelper = exports.MediaSingleDimensionHelper = function MediaSingleDimensionHelper(_ref) {
|
|
178
208
|
var _ref$containerWidth = _ref.containerWidth,
|
|
@@ -186,7 +216,8 @@ var MediaSingleDimensionHelper = exports.MediaSingleDimensionHelper = function M
|
|
|
186
216
|
_ref$isNestedNode = _ref.isNestedNode,
|
|
187
217
|
isNestedNode = _ref$isNestedNode === void 0 ? false : _ref$isNestedNode,
|
|
188
218
|
_ref$isInsideOfInline = _ref.isInsideOfInlineExtension,
|
|
189
|
-
isInsideOfInlineExtension = _ref$isInsideOfInline === void 0 ? false : _ref$isInsideOfInline
|
|
219
|
+
isInsideOfInlineExtension = _ref$isInsideOfInline === void 0 ? false : _ref$isInsideOfInline,
|
|
220
|
+
nodeType = _ref.nodeType;
|
|
190
221
|
var calculatedWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? "".concat(mediaSingleWidth || width, "px") : mediaSingleWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized, isInsideOfInlineExtension));
|
|
191
222
|
var calculatedMaxWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? "".concat(containerWidth, "px") : calcMaxWidth(layout, containerWidth));
|
|
192
223
|
|
|
@@ -203,7 +234,7 @@ var MediaSingleDimensionHelper = exports.MediaSingleDimensionHelper = function M
|
|
|
203
234
|
'@container view-page-content (min-width: 1px)': {
|
|
204
235
|
maxWidth: '100cqw'
|
|
205
236
|
}
|
|
206
|
-
}) : '', (0, _isSsr.isSSR)() && (0, _platformFeatureFlags.fg)('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(parseInt(calculatedWidth.replace('px', '')), parseInt(calculatedMaxWidth.replace('px', ''))) + 'px' : 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));
|
|
237
|
+
}) : '', (0, _isSsr.isSSR)() && !calculatedMaxWidth.endsWith('%') && (0, _platformFeatureFlags.fg)('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(parseInt(calculatedWidth.replace('px', '')), parseInt(calculatedMaxWidth.replace('px', ''))) + 'px' : 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));
|
|
207
238
|
};
|
|
208
239
|
var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
|
|
209
240
|
var hasFallbackContainer = _ref2.hasFallbackContainer,
|
|
@@ -84,6 +84,8 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
84
84
|
ACTION["MATCHED"] = "matched";
|
|
85
85
|
ACTION["MEDIA_LINK_TRANSFORMED"] = "mediaLinkTransformed";
|
|
86
86
|
ACTION["NODE_CONTENT_SANITIZED"] = "nodeContentSanitized";
|
|
87
|
+
ACTION["OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR"] = "offlineStorageTooManyRetriesError";
|
|
88
|
+
ACTION["OFFLINE_STORAGE_STEPS_DATABASE_ERROR"] = "offlineStorageStepsDatabaseError";
|
|
87
89
|
ACTION["OPENED"] = "opened";
|
|
88
90
|
ACTION["OUTDENTED"] = "outdented";
|
|
89
91
|
ACTION["PASTED"] = "pasted";
|
|
@@ -311,6 +313,7 @@ export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
311
313
|
ACTION_SUBJECT["AI_DEFINITIONS"] = "aiDefinitions";
|
|
312
314
|
ACTION_SUBJECT["USER_PREFERENCES"] = "userPreferences";
|
|
313
315
|
ACTION_SUBJECT["ALIGNMENT"] = "alignment";
|
|
316
|
+
ACTION_SUBJECT["OFFLINE_EDITING"] = "offlineEditing";
|
|
314
317
|
return ACTION_SUBJECT;
|
|
315
318
|
}({});
|
|
316
319
|
export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
@@ -399,6 +402,7 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
399
402
|
ACTION_SUBJECT_ID["NESTED_EXPAND"] = "nestedExpand";
|
|
400
403
|
ACTION_SUBJECT_ID["NODE"] = "node";
|
|
401
404
|
ACTION_SUBJECT_ID["OPEN_LINK"] = "openLink";
|
|
405
|
+
ACTION_SUBJECT_ID["OFFLINE_EDITING"] = "offlineEditing";
|
|
402
406
|
ACTION_SUBJECT_ID["PANEL"] = "panel";
|
|
403
407
|
ACTION_SUBJECT_ID["PASTE_BLOCK_CARD"] = "blockCard";
|
|
404
408
|
ACTION_SUBJECT_ID["PASTE_BLOCKQUOTE"] = "blockQuote";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 = "105.2.
|
|
4
|
+
const packageVersion = "105.2.2";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "105.2.
|
|
16
|
+
const packageVersion = "105.2.2";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -15,6 +15,27 @@ import { MEDIA_SINGLE_GUTTER_SIZE } from '../../media-single/constants';
|
|
|
15
15
|
import { getMediaSinglePixelWidth } from '../../media-single/utils';
|
|
16
16
|
import { shouldAddDefaultWrappedWidth } from '../../utils/rich-media-utils';
|
|
17
17
|
import { MediaSingleDimensionHelper, MediaWrapper } from './styled';
|
|
18
|
+
/**
|
|
19
|
+
* MediaSingle
|
|
20
|
+
* @param root0
|
|
21
|
+
* @param root0.layout
|
|
22
|
+
* @param root0.width
|
|
23
|
+
* @param root0.height
|
|
24
|
+
* @param root0.containerWidth
|
|
25
|
+
* @param root0.isLoading
|
|
26
|
+
* @param root0.pctWidth
|
|
27
|
+
* @param root0.size
|
|
28
|
+
* @param root0.className
|
|
29
|
+
* @param root0.children
|
|
30
|
+
* @param root0.nodeType
|
|
31
|
+
* @param root0.fullWidthMode
|
|
32
|
+
* @param root0.lineLength
|
|
33
|
+
* @param root0.hasFallbackContainer
|
|
34
|
+
* @param root0.handleMediaSingleRef
|
|
35
|
+
* @param root0.isInsideOfInlineExtension
|
|
36
|
+
* @param root0.dataAttributes
|
|
37
|
+
* @example
|
|
38
|
+
*/
|
|
18
39
|
export default function MediaSingle({
|
|
19
40
|
layout,
|
|
20
41
|
width,
|
|
@@ -92,7 +113,8 @@ export default function MediaSingle({
|
|
|
92
113
|
mediaSingleWidth,
|
|
93
114
|
fullWidthMode,
|
|
94
115
|
isExtendedResizeExperienceOn: isPixelWidth,
|
|
95
|
-
isInsideOfInlineExtension
|
|
116
|
+
isInsideOfInlineExtension,
|
|
117
|
+
nodeType
|
|
96
118
|
})
|
|
97
119
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
98
120
|
}, fg('platform_fix_media_image_resizing') || fg('platform_editor_fix_image_size_diff_during_ssr') ? {} : {
|
|
@@ -41,6 +41,13 @@ function getWidthIfDefaultMode(originalWidth, containerWidth, isInsideOfInlineEx
|
|
|
41
41
|
* If an image has not been resized using the pctWidth attribute,
|
|
42
42
|
* then an image in wide or full-width can not be wider than the image's
|
|
43
43
|
* original width.
|
|
44
|
+
* @param layout
|
|
45
|
+
* @param width
|
|
46
|
+
* @param containerWidth
|
|
47
|
+
* @param fullWidthMode
|
|
48
|
+
* @param isResized
|
|
49
|
+
* @param isInsideOfInlineExtension
|
|
50
|
+
* @example
|
|
44
51
|
*/
|
|
45
52
|
export function calcLegacyWidth(layout, width, containerWidth = 0, fullWidthMode, isResized, isInsideOfInlineExtension) {
|
|
46
53
|
switch (layout) {
|
|
@@ -64,6 +71,12 @@ export function calcLegacyWidth(layout, width, containerWidth = 0, fullWidthMode
|
|
|
64
71
|
* If an image has not been resized using the pctWidth attribute,
|
|
65
72
|
* then an image in wide or full-width can not be wider than the image's
|
|
66
73
|
* original width.
|
|
74
|
+
* @param layout
|
|
75
|
+
* @param width
|
|
76
|
+
* @param containerWidth
|
|
77
|
+
* @param fullWidthMode
|
|
78
|
+
* @param isResized
|
|
79
|
+
* @example
|
|
67
80
|
*/
|
|
68
81
|
export function calcLegacyWidthForInline(layout, width, containerWidth = 0, fullWidthMode, isResized) {
|
|
69
82
|
switch (layout) {
|
|
@@ -86,6 +99,10 @@ export function calcLegacyWidthForInline(layout, width, containerWidth = 0, full
|
|
|
86
99
|
*
|
|
87
100
|
* Wide and full-width images are always that size (960px and 100%); there is
|
|
88
101
|
* no distinction between max-width and width.
|
|
102
|
+
* @param layout
|
|
103
|
+
* @param width
|
|
104
|
+
* @param containerWidth
|
|
105
|
+
* @example
|
|
89
106
|
*/
|
|
90
107
|
export function calcResizedWidth(layout, width, containerWidth = 0) {
|
|
91
108
|
switch (layout) {
|
|
@@ -134,6 +151,7 @@ function isImageAligned(layout) {
|
|
|
134
151
|
*
|
|
135
152
|
* @param widthValue CSS width value to be rounded
|
|
136
153
|
* @returns Reduced CSS width value where px value given, or otherwise the original value
|
|
154
|
+
* @example
|
|
137
155
|
*/
|
|
138
156
|
// Ignored via go/ees005
|
|
139
157
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -151,6 +169,18 @@ export function roundToClosestEvenPxValue(widthValue) {
|
|
|
151
169
|
/**
|
|
152
170
|
* Can't use `.attrs` to handle highly dynamic styles because we are still
|
|
153
171
|
* supporting `styled-components` v1.
|
|
172
|
+
* @param root0
|
|
173
|
+
* @param root0.containerWidth
|
|
174
|
+
* @param root0.fullWidthMode
|
|
175
|
+
* @param root0.isResized
|
|
176
|
+
* @param root0.layout
|
|
177
|
+
* @param root0.mediaSingleWidth
|
|
178
|
+
* @param root0.width
|
|
179
|
+
* @param root0.isExtendedResizeExperienceOn
|
|
180
|
+
* @param root0.isNestedNode
|
|
181
|
+
* @param root0.isInsideOfInlineExtension
|
|
182
|
+
* @param root0.nodeType
|
|
183
|
+
* @example
|
|
154
184
|
*/
|
|
155
185
|
export const MediaSingleDimensionHelper = ({
|
|
156
186
|
containerWidth = 0,
|
|
@@ -162,7 +192,8 @@ export const MediaSingleDimensionHelper = ({
|
|
|
162
192
|
// original media width
|
|
163
193
|
isExtendedResizeExperienceOn,
|
|
164
194
|
isNestedNode = false,
|
|
165
|
-
isInsideOfInlineExtension = false
|
|
195
|
+
isInsideOfInlineExtension = false,
|
|
196
|
+
nodeType
|
|
166
197
|
}) => {
|
|
167
198
|
const calculatedWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? `${mediaSingleWidth || width}px` : mediaSingleWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized, isInsideOfInlineExtension));
|
|
168
199
|
const calculatedMaxWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? `${containerWidth}px` : calcMaxWidth(layout, containerWidth));
|
|
@@ -194,7 +225,7 @@ export const MediaSingleDimensionHelper = ({
|
|
|
194
225
|
}
|
|
195
226
|
}) : ''}
|
|
196
227
|
/* If container doesn't exists, it will fallback to this */
|
|
197
|
-
max-width: ${isSSR() && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(parseInt(calculatedWidth.replace('px', '')), parseInt(calculatedMaxWidth.replace('px', ''))) + 'px' : calculatedMaxWidth};
|
|
228
|
+
max-width: ${isSSR() && !calculatedMaxWidth.endsWith('%') && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(parseInt(calculatedWidth.replace('px', '')), parseInt(calculatedMaxWidth.replace('px', ''))) + 'px' : calculatedMaxWidth};
|
|
198
229
|
${isExtendedResizeExperienceOn && `&[class*='is-resizing'] {
|
|
199
230
|
.new-file-experience-wrapper {
|
|
200
231
|
box-shadow: none !important;
|
|
@@ -84,6 +84,8 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
84
84
|
ACTION["MATCHED"] = "matched";
|
|
85
85
|
ACTION["MEDIA_LINK_TRANSFORMED"] = "mediaLinkTransformed";
|
|
86
86
|
ACTION["NODE_CONTENT_SANITIZED"] = "nodeContentSanitized";
|
|
87
|
+
ACTION["OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR"] = "offlineStorageTooManyRetriesError";
|
|
88
|
+
ACTION["OFFLINE_STORAGE_STEPS_DATABASE_ERROR"] = "offlineStorageStepsDatabaseError";
|
|
87
89
|
ACTION["OPENED"] = "opened";
|
|
88
90
|
ACTION["OUTDENTED"] = "outdented";
|
|
89
91
|
ACTION["PASTED"] = "pasted";
|
|
@@ -311,6 +313,7 @@ export var ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
311
313
|
ACTION_SUBJECT["AI_DEFINITIONS"] = "aiDefinitions";
|
|
312
314
|
ACTION_SUBJECT["USER_PREFERENCES"] = "userPreferences";
|
|
313
315
|
ACTION_SUBJECT["ALIGNMENT"] = "alignment";
|
|
316
|
+
ACTION_SUBJECT["OFFLINE_EDITING"] = "offlineEditing";
|
|
314
317
|
return ACTION_SUBJECT;
|
|
315
318
|
}({});
|
|
316
319
|
export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
@@ -399,6 +402,7 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
|
|
|
399
402
|
ACTION_SUBJECT_ID["NESTED_EXPAND"] = "nestedExpand";
|
|
400
403
|
ACTION_SUBJECT_ID["NODE"] = "node";
|
|
401
404
|
ACTION_SUBJECT_ID["OPEN_LINK"] = "openLink";
|
|
405
|
+
ACTION_SUBJECT_ID["OFFLINE_EDITING"] = "offlineEditing";
|
|
402
406
|
ACTION_SUBJECT_ID["PANEL"] = "panel";
|
|
403
407
|
ACTION_SUBJECT_ID["PASTE_BLOCK_CARD"] = "blockCard";
|
|
404
408
|
ACTION_SUBJECT_ID["PASTE_BLOCKQUOTE"] = "blockQuote";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 = "105.2.
|
|
10
|
+
var packageVersion = "105.2.2";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "105.2.
|
|
23
|
+
var packageVersion = "105.2.2";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -16,6 +16,27 @@ import { MEDIA_SINGLE_GUTTER_SIZE } from '../../media-single/constants';
|
|
|
16
16
|
import { getMediaSinglePixelWidth } from '../../media-single/utils';
|
|
17
17
|
import { shouldAddDefaultWrappedWidth } from '../../utils/rich-media-utils';
|
|
18
18
|
import { MediaSingleDimensionHelper, MediaWrapper } from './styled';
|
|
19
|
+
/**
|
|
20
|
+
* MediaSingle
|
|
21
|
+
* @param root0
|
|
22
|
+
* @param root0.layout
|
|
23
|
+
* @param root0.width
|
|
24
|
+
* @param root0.height
|
|
25
|
+
* @param root0.containerWidth
|
|
26
|
+
* @param root0.isLoading
|
|
27
|
+
* @param root0.pctWidth
|
|
28
|
+
* @param root0.size
|
|
29
|
+
* @param root0.className
|
|
30
|
+
* @param root0.children
|
|
31
|
+
* @param root0.nodeType
|
|
32
|
+
* @param root0.fullWidthMode
|
|
33
|
+
* @param root0.lineLength
|
|
34
|
+
* @param root0.hasFallbackContainer
|
|
35
|
+
* @param root0.handleMediaSingleRef
|
|
36
|
+
* @param root0.isInsideOfInlineExtension
|
|
37
|
+
* @param root0.dataAttributes
|
|
38
|
+
* @example
|
|
39
|
+
*/
|
|
19
40
|
export default function MediaSingle(_ref) {
|
|
20
41
|
var layout = _ref.layout,
|
|
21
42
|
width = _ref.width,
|
|
@@ -99,7 +120,8 @@ export default function MediaSingle(_ref) {
|
|
|
99
120
|
mediaSingleWidth: mediaSingleWidth,
|
|
100
121
|
fullWidthMode: fullWidthMode,
|
|
101
122
|
isExtendedResizeExperienceOn: isPixelWidth,
|
|
102
|
-
isInsideOfInlineExtension: isInsideOfInlineExtension
|
|
123
|
+
isInsideOfInlineExtension: isInsideOfInlineExtension,
|
|
124
|
+
nodeType: nodeType
|
|
103
125
|
})
|
|
104
126
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
105
127
|
}, fg('platform_fix_media_image_resizing') || fg('platform_editor_fix_image_size_diff_during_ssr') ? {} : {
|
|
@@ -45,6 +45,13 @@ function getWidthIfDefaultMode(originalWidth, containerWidth, isInsideOfInlineEx
|
|
|
45
45
|
* If an image has not been resized using the pctWidth attribute,
|
|
46
46
|
* then an image in wide or full-width can not be wider than the image's
|
|
47
47
|
* original width.
|
|
48
|
+
* @param layout
|
|
49
|
+
* @param width
|
|
50
|
+
* @param containerWidth
|
|
51
|
+
* @param fullWidthMode
|
|
52
|
+
* @param isResized
|
|
53
|
+
* @param isInsideOfInlineExtension
|
|
54
|
+
* @example
|
|
48
55
|
*/
|
|
49
56
|
export function calcLegacyWidth(layout, width) {
|
|
50
57
|
var containerWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -72,6 +79,12 @@ export function calcLegacyWidth(layout, width) {
|
|
|
72
79
|
* If an image has not been resized using the pctWidth attribute,
|
|
73
80
|
* then an image in wide or full-width can not be wider than the image's
|
|
74
81
|
* original width.
|
|
82
|
+
* @param layout
|
|
83
|
+
* @param width
|
|
84
|
+
* @param containerWidth
|
|
85
|
+
* @param fullWidthMode
|
|
86
|
+
* @param isResized
|
|
87
|
+
* @example
|
|
75
88
|
*/
|
|
76
89
|
export function calcLegacyWidthForInline(layout, width) {
|
|
77
90
|
var containerWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -97,6 +110,10 @@ export function calcLegacyWidthForInline(layout, width) {
|
|
|
97
110
|
*
|
|
98
111
|
* Wide and full-width images are always that size (960px and 100%); there is
|
|
99
112
|
* no distinction between max-width and width.
|
|
113
|
+
* @param layout
|
|
114
|
+
* @param width
|
|
115
|
+
* @param containerWidth
|
|
116
|
+
* @example
|
|
100
117
|
*/
|
|
101
118
|
export function calcResizedWidth(layout, width) {
|
|
102
119
|
var containerWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -146,6 +163,7 @@ function isImageAligned(layout) {
|
|
|
146
163
|
*
|
|
147
164
|
* @param widthValue CSS width value to be rounded
|
|
148
165
|
* @returns Reduced CSS width value where px value given, or otherwise the original value
|
|
166
|
+
* @example
|
|
149
167
|
*/
|
|
150
168
|
// Ignored via go/ees005
|
|
151
169
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -163,6 +181,18 @@ export function roundToClosestEvenPxValue(widthValue) {
|
|
|
163
181
|
/**
|
|
164
182
|
* Can't use `.attrs` to handle highly dynamic styles because we are still
|
|
165
183
|
* supporting `styled-components` v1.
|
|
184
|
+
* @param root0
|
|
185
|
+
* @param root0.containerWidth
|
|
186
|
+
* @param root0.fullWidthMode
|
|
187
|
+
* @param root0.isResized
|
|
188
|
+
* @param root0.layout
|
|
189
|
+
* @param root0.mediaSingleWidth
|
|
190
|
+
* @param root0.width
|
|
191
|
+
* @param root0.isExtendedResizeExperienceOn
|
|
192
|
+
* @param root0.isNestedNode
|
|
193
|
+
* @param root0.isInsideOfInlineExtension
|
|
194
|
+
* @param root0.nodeType
|
|
195
|
+
* @example
|
|
166
196
|
*/
|
|
167
197
|
export var MediaSingleDimensionHelper = function MediaSingleDimensionHelper(_ref) {
|
|
168
198
|
var _ref$containerWidth = _ref.containerWidth,
|
|
@@ -176,7 +206,8 @@ export var MediaSingleDimensionHelper = function MediaSingleDimensionHelper(_ref
|
|
|
176
206
|
_ref$isNestedNode = _ref.isNestedNode,
|
|
177
207
|
isNestedNode = _ref$isNestedNode === void 0 ? false : _ref$isNestedNode,
|
|
178
208
|
_ref$isInsideOfInline = _ref.isInsideOfInlineExtension,
|
|
179
|
-
isInsideOfInlineExtension = _ref$isInsideOfInline === void 0 ? false : _ref$isInsideOfInline
|
|
209
|
+
isInsideOfInlineExtension = _ref$isInsideOfInline === void 0 ? false : _ref$isInsideOfInline,
|
|
210
|
+
nodeType = _ref.nodeType;
|
|
180
211
|
var calculatedWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? "".concat(mediaSingleWidth || width, "px") : mediaSingleWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized, isInsideOfInlineExtension));
|
|
181
212
|
var calculatedMaxWidth = roundToClosestEvenPxValue(isExtendedResizeExperienceOn ? "".concat(containerWidth, "px") : calcMaxWidth(layout, containerWidth));
|
|
182
213
|
|
|
@@ -193,7 +224,7 @@ export var MediaSingleDimensionHelper = function MediaSingleDimensionHelper(_ref
|
|
|
193
224
|
'@container view-page-content (min-width: 1px)': {
|
|
194
225
|
maxWidth: '100cqw'
|
|
195
226
|
}
|
|
196
|
-
}) : '', isSSR() && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(parseInt(calculatedWidth.replace('px', '')), parseInt(calculatedMaxWidth.replace('px', ''))) + 'px' : 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));
|
|
227
|
+
}) : '', isSSR() && !calculatedMaxWidth.endsWith('%') && fg('platform_editor_fix_image_size_diff_during_ssr') ? Math.max(parseInt(calculatedWidth.replace('px', '')), parseInt(calculatedMaxWidth.replace('px', ''))) + 'px' : 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));
|
|
197
228
|
};
|
|
198
229
|
var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
|
|
199
230
|
var hasFallbackContainer = _ref2.hasFallbackContainer,
|
|
@@ -83,6 +83,8 @@ export declare enum ACTION {
|
|
|
83
83
|
MATCHED = "matched",
|
|
84
84
|
MEDIA_LINK_TRANSFORMED = "mediaLinkTransformed",
|
|
85
85
|
NODE_CONTENT_SANITIZED = "nodeContentSanitized",
|
|
86
|
+
OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR = "offlineStorageTooManyRetriesError",
|
|
87
|
+
OFFLINE_STORAGE_STEPS_DATABASE_ERROR = "offlineStorageStepsDatabaseError",
|
|
86
88
|
OPENED = "opened",
|
|
87
89
|
OUTDENTED = "outdented",
|
|
88
90
|
PASTED = "pasted",
|
|
@@ -303,7 +305,8 @@ export declare enum ACTION_SUBJECT {
|
|
|
303
305
|
EDITOR_PLUGIN_SELECTION_EXTENSION = "editorPluginSelectionExtension",
|
|
304
306
|
AI_DEFINITIONS = "aiDefinitions",
|
|
305
307
|
USER_PREFERENCES = "userPreferences",
|
|
306
|
-
ALIGNMENT = "alignment"
|
|
308
|
+
ALIGNMENT = "alignment",
|
|
309
|
+
OFFLINE_EDITING = "offlineEditing"
|
|
307
310
|
}
|
|
308
311
|
export declare enum ACTION_SUBJECT_ID {
|
|
309
312
|
ACTION = "action",
|
|
@@ -391,6 +394,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
391
394
|
NESTED_EXPAND = "nestedExpand",
|
|
392
395
|
NODE = "node",
|
|
393
396
|
OPEN_LINK = "openLink",
|
|
397
|
+
OFFLINE_EDITING = "offlineEditing",
|
|
394
398
|
PANEL = "panel",
|
|
395
399
|
PASTE_BLOCK_CARD = "blockCard",
|
|
396
400
|
PASTE_BLOCKQUOTE = "blockQuote",
|
|
@@ -39,6 +39,7 @@ import { type MentionEventPayload } from './mention-events';
|
|
|
39
39
|
import type { MoveContentEventPayload } from './move-content-events';
|
|
40
40
|
import { type NestedTableActionsEventPayload } from './nested-table-events';
|
|
41
41
|
import type { NodeEventPayload } from './node-events';
|
|
42
|
+
import type { OfflineEditingEventPayload } from './offline-editing-event';
|
|
42
43
|
import type { PasteEventPayload } from './paste-events';
|
|
43
44
|
import type { ReferentialityEventPayload } from './referentiality-events';
|
|
44
45
|
import type { SelectionEventPayload } from './selection-events';
|
|
@@ -59,7 +60,7 @@ export type SimplifiedNode = {
|
|
|
59
60
|
marks?: string[];
|
|
60
61
|
content?: SimplifiedNode[];
|
|
61
62
|
};
|
|
62
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | AlignmentEventPayload | UndoRedoAEP;
|
|
63
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload;
|
|
63
64
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
64
65
|
previousColor: string;
|
|
65
66
|
newColor: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
2
|
+
import type { TrackAEP } from './utils';
|
|
3
|
+
type OfflineEditingAEP = TrackAEP<ACTION.OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR | ACTION.OFFLINE_STORAGE_STEPS_DATABASE_ERROR, ACTION_SUBJECT.OFFLINE_EDITING, ACTION_SUBJECT_ID.OFFLINE_EDITING, {
|
|
4
|
+
errorMessage?: string;
|
|
5
|
+
version?: number;
|
|
6
|
+
stepsCount?: number;
|
|
7
|
+
status?: string;
|
|
8
|
+
retryCount?: number;
|
|
9
|
+
retrySource?: string;
|
|
10
|
+
healthy?: boolean;
|
|
11
|
+
}, undefined>;
|
|
12
|
+
export type OfflineEditingEventPayload = OfflineEditingAEP;
|
|
13
|
+
export {};
|
|
@@ -31,4 +31,25 @@ export interface Props {
|
|
|
31
31
|
dataAttributes?: Record<string, any>;
|
|
32
32
|
editorAppearance?: EditorAppearance;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* MediaSingle
|
|
36
|
+
* @param root0
|
|
37
|
+
* @param root0.layout
|
|
38
|
+
* @param root0.width
|
|
39
|
+
* @param root0.height
|
|
40
|
+
* @param root0.containerWidth
|
|
41
|
+
* @param root0.isLoading
|
|
42
|
+
* @param root0.pctWidth
|
|
43
|
+
* @param root0.size
|
|
44
|
+
* @param root0.className
|
|
45
|
+
* @param root0.children
|
|
46
|
+
* @param root0.nodeType
|
|
47
|
+
* @param root0.fullWidthMode
|
|
48
|
+
* @param root0.lineLength
|
|
49
|
+
* @param root0.hasFallbackContainer
|
|
50
|
+
* @param root0.handleMediaSingleRef
|
|
51
|
+
* @param root0.isInsideOfInlineExtension
|
|
52
|
+
* @param root0.dataAttributes
|
|
53
|
+
* @example
|
|
54
|
+
*/
|
|
34
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;
|
|
@@ -12,6 +12,13 @@ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema'
|
|
|
12
12
|
* If an image has not been resized using the pctWidth attribute,
|
|
13
13
|
* then an image in wide or full-width can not be wider than the image's
|
|
14
14
|
* original width.
|
|
15
|
+
* @param layout
|
|
16
|
+
* @param width
|
|
17
|
+
* @param containerWidth
|
|
18
|
+
* @param fullWidthMode
|
|
19
|
+
* @param isResized
|
|
20
|
+
* @param isInsideOfInlineExtension
|
|
21
|
+
* @example
|
|
15
22
|
*/
|
|
16
23
|
export declare function calcLegacyWidth(layout: MediaSingleLayout, width: number, containerWidth?: number, fullWidthMode?: boolean, isResized?: boolean, isInsideOfInlineExtension?: boolean): string;
|
|
17
24
|
/**
|
|
@@ -20,6 +27,12 @@ export declare function calcLegacyWidth(layout: MediaSingleLayout, width: number
|
|
|
20
27
|
* If an image has not been resized using the pctWidth attribute,
|
|
21
28
|
* then an image in wide or full-width can not be wider than the image's
|
|
22
29
|
* original width.
|
|
30
|
+
* @param layout
|
|
31
|
+
* @param width
|
|
32
|
+
* @param containerWidth
|
|
33
|
+
* @param fullWidthMode
|
|
34
|
+
* @param isResized
|
|
35
|
+
* @example
|
|
23
36
|
*/
|
|
24
37
|
export declare function calcLegacyWidthForInline(layout: MediaSingleLayout, width: number, containerWidth?: number, fullWidthMode?: boolean, isResized?: boolean): string;
|
|
25
38
|
/**
|
|
@@ -27,6 +40,10 @@ export declare function calcLegacyWidthForInline(layout: MediaSingleLayout, widt
|
|
|
27
40
|
*
|
|
28
41
|
* Wide and full-width images are always that size (960px and 100%); there is
|
|
29
42
|
* no distinction between max-width and width.
|
|
43
|
+
* @param layout
|
|
44
|
+
* @param width
|
|
45
|
+
* @param containerWidth
|
|
46
|
+
* @example
|
|
30
47
|
*/
|
|
31
48
|
export declare function calcResizedWidth(layout: MediaSingleLayout, width: number, containerWidth?: number): any;
|
|
32
49
|
/**
|
|
@@ -35,6 +52,7 @@ export declare function calcResizedWidth(layout: MediaSingleLayout, width: numbe
|
|
|
35
52
|
*
|
|
36
53
|
* @param widthValue CSS width value to be rounded
|
|
37
54
|
* @returns Reduced CSS width value where px value given, or otherwise the original value
|
|
55
|
+
* @example
|
|
38
56
|
*/
|
|
39
57
|
export declare function roundToClosestEvenPxValue(widthValue: any): any;
|
|
40
58
|
export interface MediaSingleWrapperProps {
|
|
@@ -54,12 +72,25 @@ export interface MediaSingleWrapperProps {
|
|
|
54
72
|
isExtendedResizeExperienceOn?: boolean;
|
|
55
73
|
isNestedNode?: boolean;
|
|
56
74
|
isInsideOfInlineExtension?: boolean;
|
|
75
|
+
nodeType?: string;
|
|
57
76
|
}
|
|
58
77
|
/**
|
|
59
78
|
* Can't use `.attrs` to handle highly dynamic styles because we are still
|
|
60
79
|
* supporting `styled-components` v1.
|
|
80
|
+
* @param root0
|
|
81
|
+
* @param root0.containerWidth
|
|
82
|
+
* @param root0.fullWidthMode
|
|
83
|
+
* @param root0.isResized
|
|
84
|
+
* @param root0.layout
|
|
85
|
+
* @param root0.mediaSingleWidth
|
|
86
|
+
* @param root0.width
|
|
87
|
+
* @param root0.isExtendedResizeExperienceOn
|
|
88
|
+
* @param root0.isNestedNode
|
|
89
|
+
* @param root0.isInsideOfInlineExtension
|
|
90
|
+
* @param root0.nodeType
|
|
91
|
+
* @example
|
|
61
92
|
*/
|
|
62
|
-
export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension, }: MediaSingleWrapperProps) => import("@emotion/react").SerializedStyles;
|
|
93
|
+
export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension, nodeType, }: MediaSingleWrapperProps) => import("@emotion/react").SerializedStyles;
|
|
63
94
|
export interface MediaWrapperProps {
|
|
64
95
|
paddingBottom?: string;
|
|
65
96
|
height?: number;
|
|
@@ -83,6 +83,8 @@ export declare enum ACTION {
|
|
|
83
83
|
MATCHED = "matched",
|
|
84
84
|
MEDIA_LINK_TRANSFORMED = "mediaLinkTransformed",
|
|
85
85
|
NODE_CONTENT_SANITIZED = "nodeContentSanitized",
|
|
86
|
+
OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR = "offlineStorageTooManyRetriesError",
|
|
87
|
+
OFFLINE_STORAGE_STEPS_DATABASE_ERROR = "offlineStorageStepsDatabaseError",
|
|
86
88
|
OPENED = "opened",
|
|
87
89
|
OUTDENTED = "outdented",
|
|
88
90
|
PASTED = "pasted",
|
|
@@ -303,7 +305,8 @@ export declare enum ACTION_SUBJECT {
|
|
|
303
305
|
EDITOR_PLUGIN_SELECTION_EXTENSION = "editorPluginSelectionExtension",
|
|
304
306
|
AI_DEFINITIONS = "aiDefinitions",
|
|
305
307
|
USER_PREFERENCES = "userPreferences",
|
|
306
|
-
ALIGNMENT = "alignment"
|
|
308
|
+
ALIGNMENT = "alignment",
|
|
309
|
+
OFFLINE_EDITING = "offlineEditing"
|
|
307
310
|
}
|
|
308
311
|
export declare enum ACTION_SUBJECT_ID {
|
|
309
312
|
ACTION = "action",
|
|
@@ -391,6 +394,7 @@ export declare enum ACTION_SUBJECT_ID {
|
|
|
391
394
|
NESTED_EXPAND = "nestedExpand",
|
|
392
395
|
NODE = "node",
|
|
393
396
|
OPEN_LINK = "openLink",
|
|
397
|
+
OFFLINE_EDITING = "offlineEditing",
|
|
394
398
|
PANEL = "panel",
|
|
395
399
|
PASTE_BLOCK_CARD = "blockCard",
|
|
396
400
|
PASTE_BLOCKQUOTE = "blockQuote",
|
|
@@ -39,6 +39,7 @@ import { type MentionEventPayload } from './mention-events';
|
|
|
39
39
|
import type { MoveContentEventPayload } from './move-content-events';
|
|
40
40
|
import { type NestedTableActionsEventPayload } from './nested-table-events';
|
|
41
41
|
import type { NodeEventPayload } from './node-events';
|
|
42
|
+
import type { OfflineEditingEventPayload } from './offline-editing-event';
|
|
42
43
|
import type { PasteEventPayload } from './paste-events';
|
|
43
44
|
import type { ReferentialityEventPayload } from './referentiality-events';
|
|
44
45
|
import type { SelectionEventPayload } from './selection-events';
|
|
@@ -59,7 +60,7 @@ export type SimplifiedNode = {
|
|
|
59
60
|
marks?: string[];
|
|
60
61
|
content?: SimplifiedNode[];
|
|
61
62
|
};
|
|
62
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | AlignmentEventPayload | UndoRedoAEP;
|
|
63
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload;
|
|
63
64
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
64
65
|
previousColor: string;
|
|
65
66
|
newColor: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
|
|
2
|
+
import type { TrackAEP } from './utils';
|
|
3
|
+
type OfflineEditingAEP = TrackAEP<ACTION.OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR | ACTION.OFFLINE_STORAGE_STEPS_DATABASE_ERROR, ACTION_SUBJECT.OFFLINE_EDITING, ACTION_SUBJECT_ID.OFFLINE_EDITING, {
|
|
4
|
+
errorMessage?: string;
|
|
5
|
+
version?: number;
|
|
6
|
+
stepsCount?: number;
|
|
7
|
+
status?: string;
|
|
8
|
+
retryCount?: number;
|
|
9
|
+
retrySource?: string;
|
|
10
|
+
healthy?: boolean;
|
|
11
|
+
}, undefined>;
|
|
12
|
+
export type OfflineEditingEventPayload = OfflineEditingAEP;
|
|
13
|
+
export {};
|
|
@@ -31,4 +31,25 @@ export interface Props {
|
|
|
31
31
|
dataAttributes?: Record<string, any>;
|
|
32
32
|
editorAppearance?: EditorAppearance;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* MediaSingle
|
|
36
|
+
* @param root0
|
|
37
|
+
* @param root0.layout
|
|
38
|
+
* @param root0.width
|
|
39
|
+
* @param root0.height
|
|
40
|
+
* @param root0.containerWidth
|
|
41
|
+
* @param root0.isLoading
|
|
42
|
+
* @param root0.pctWidth
|
|
43
|
+
* @param root0.size
|
|
44
|
+
* @param root0.className
|
|
45
|
+
* @param root0.children
|
|
46
|
+
* @param root0.nodeType
|
|
47
|
+
* @param root0.fullWidthMode
|
|
48
|
+
* @param root0.lineLength
|
|
49
|
+
* @param root0.hasFallbackContainer
|
|
50
|
+
* @param root0.handleMediaSingleRef
|
|
51
|
+
* @param root0.isInsideOfInlineExtension
|
|
52
|
+
* @param root0.dataAttributes
|
|
53
|
+
* @example
|
|
54
|
+
*/
|
|
34
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;
|
|
@@ -12,6 +12,13 @@ import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema'
|
|
|
12
12
|
* If an image has not been resized using the pctWidth attribute,
|
|
13
13
|
* then an image in wide or full-width can not be wider than the image's
|
|
14
14
|
* original width.
|
|
15
|
+
* @param layout
|
|
16
|
+
* @param width
|
|
17
|
+
* @param containerWidth
|
|
18
|
+
* @param fullWidthMode
|
|
19
|
+
* @param isResized
|
|
20
|
+
* @param isInsideOfInlineExtension
|
|
21
|
+
* @example
|
|
15
22
|
*/
|
|
16
23
|
export declare function calcLegacyWidth(layout: MediaSingleLayout, width: number, containerWidth?: number, fullWidthMode?: boolean, isResized?: boolean, isInsideOfInlineExtension?: boolean): string;
|
|
17
24
|
/**
|
|
@@ -20,6 +27,12 @@ export declare function calcLegacyWidth(layout: MediaSingleLayout, width: number
|
|
|
20
27
|
* If an image has not been resized using the pctWidth attribute,
|
|
21
28
|
* then an image in wide or full-width can not be wider than the image's
|
|
22
29
|
* original width.
|
|
30
|
+
* @param layout
|
|
31
|
+
* @param width
|
|
32
|
+
* @param containerWidth
|
|
33
|
+
* @param fullWidthMode
|
|
34
|
+
* @param isResized
|
|
35
|
+
* @example
|
|
23
36
|
*/
|
|
24
37
|
export declare function calcLegacyWidthForInline(layout: MediaSingleLayout, width: number, containerWidth?: number, fullWidthMode?: boolean, isResized?: boolean): string;
|
|
25
38
|
/**
|
|
@@ -27,6 +40,10 @@ export declare function calcLegacyWidthForInline(layout: MediaSingleLayout, widt
|
|
|
27
40
|
*
|
|
28
41
|
* Wide and full-width images are always that size (960px and 100%); there is
|
|
29
42
|
* no distinction between max-width and width.
|
|
43
|
+
* @param layout
|
|
44
|
+
* @param width
|
|
45
|
+
* @param containerWidth
|
|
46
|
+
* @example
|
|
30
47
|
*/
|
|
31
48
|
export declare function calcResizedWidth(layout: MediaSingleLayout, width: number, containerWidth?: number): any;
|
|
32
49
|
/**
|
|
@@ -35,6 +52,7 @@ export declare function calcResizedWidth(layout: MediaSingleLayout, width: numbe
|
|
|
35
52
|
*
|
|
36
53
|
* @param widthValue CSS width value to be rounded
|
|
37
54
|
* @returns Reduced CSS width value where px value given, or otherwise the original value
|
|
55
|
+
* @example
|
|
38
56
|
*/
|
|
39
57
|
export declare function roundToClosestEvenPxValue(widthValue: any): any;
|
|
40
58
|
export interface MediaSingleWrapperProps {
|
|
@@ -54,12 +72,25 @@ export interface MediaSingleWrapperProps {
|
|
|
54
72
|
isExtendedResizeExperienceOn?: boolean;
|
|
55
73
|
isNestedNode?: boolean;
|
|
56
74
|
isInsideOfInlineExtension?: boolean;
|
|
75
|
+
nodeType?: string;
|
|
57
76
|
}
|
|
58
77
|
/**
|
|
59
78
|
* Can't use `.attrs` to handle highly dynamic styles because we are still
|
|
60
79
|
* supporting `styled-components` v1.
|
|
80
|
+
* @param root0
|
|
81
|
+
* @param root0.containerWidth
|
|
82
|
+
* @param root0.fullWidthMode
|
|
83
|
+
* @param root0.isResized
|
|
84
|
+
* @param root0.layout
|
|
85
|
+
* @param root0.mediaSingleWidth
|
|
86
|
+
* @param root0.width
|
|
87
|
+
* @param root0.isExtendedResizeExperienceOn
|
|
88
|
+
* @param root0.isNestedNode
|
|
89
|
+
* @param root0.isInsideOfInlineExtension
|
|
90
|
+
* @param root0.nodeType
|
|
91
|
+
* @example
|
|
61
92
|
*/
|
|
62
|
-
export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension, }: MediaSingleWrapperProps) => import("@emotion/react").SerializedStyles;
|
|
93
|
+
export declare const MediaSingleDimensionHelper: ({ containerWidth, fullWidthMode, isResized, layout, mediaSingleWidth, width, isExtendedResizeExperienceOn, isNestedNode, isInsideOfInlineExtension, nodeType, }: MediaSingleWrapperProps) => import("@emotion/react").SerializedStyles;
|
|
63
94
|
export interface MediaWrapperProps {
|
|
64
95
|
paddingBottom?: string;
|
|
65
96
|
height?: number;
|
package/package.json
CHANGED