@atlaskit/editor-common 95.10.2 → 95.10.3
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 +19 -0
- package/dist/cjs/analytics/types/breakout-events.js +5 -0
- package/dist/cjs/analytics/types/enums.js +1 -0
- package/dist/cjs/media-single/ExternalImageBadge.js +11 -10
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/resizer/BreakoutResizer.js +17 -3
- package/dist/cjs/styles/shared/column-layout.js +5 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/breakout-events.js +1 -0
- package/dist/es2019/analytics/types/enums.js +1 -0
- package/dist/es2019/media-single/ExternalImageBadge.js +15 -12
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/resizer/BreakoutResizer.js +17 -3
- package/dist/es2019/styles/shared/column-layout.js +3 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/breakout-events.js +1 -0
- package/dist/esm/analytics/types/enums.js +1 -0
- package/dist/esm/media-single/ExternalImageBadge.js +10 -9
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/resizer/BreakoutResizer.js +17 -3
- package/dist/esm/styles/shared/column-layout.js +5 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/breakout-events.d.ts +10 -0
- package/dist/types/analytics/types/enums.d.ts +2 -1
- package/dist/types/analytics/types/events.d.ts +2 -1
- package/dist/types/card/LinkToolbarButtonGroup.d.ts +3 -3
- package/dist/types/card/ui/assets/card.d.ts +2 -2
- package/dist/types/card/ui/assets/embed.d.ts +2 -2
- package/dist/types/card/ui/assets/inline.d.ts +2 -2
- package/dist/types/card/ui/assets/url.d.ts +2 -2
- package/dist/types/media-single/ExternalImageBadge.d.ts +1 -1
- package/dist/types/resizer/BreakoutResizer.d.ts +3 -1
- package/dist/types-ts4.5/analytics/types/breakout-events.d.ts +10 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +2 -1
- package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
- package/dist/types-ts4.5/card/LinkToolbarButtonGroup.d.ts +3 -3
- package/dist/types-ts4.5/card/ui/assets/card.d.ts +2 -2
- package/dist/types-ts4.5/card/ui/assets/embed.d.ts +2 -2
- package/dist/types-ts4.5/card/ui/assets/inline.d.ts +2 -2
- package/dist/types-ts4.5/card/ui/assets/url.d.ts +2 -2
- package/dist/types-ts4.5/media-single/ExternalImageBadge.d.ts +1 -1
- package/dist/types-ts4.5/resizer/BreakoutResizer.d.ts +3 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 95.10.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#171500](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/171500)
|
|
8
|
+
[`76d8f83277b7d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/76d8f83277b7d) -
|
|
9
|
+
[ux] Update the gap between layout columns in Renderer to align with Editor
|
|
10
|
+
- [#171974](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/171974)
|
|
11
|
+
[`bc888f2b9c449`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bc888f2b9c449) -
|
|
12
|
+
Fire analytics event from BreakoutResizer component when breakout is resized
|
|
13
|
+
- [#171994](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/171994)
|
|
14
|
+
[`be58e4bb2e387`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/be58e4bb2e387) -
|
|
15
|
+
Migrating usages of UNSAFE types and entrypoints that have been renamed in `@atlaskit/icon` and
|
|
16
|
+
`@atlaskit/icon-lab`.
|
|
17
|
+
- [#169517](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/169517)
|
|
18
|
+
[`e9bdceff7dd34`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e9bdceff7dd34) -
|
|
19
|
+
Refactor url parsing for image badges
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 95.10.2
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -153,6 +153,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
153
153
|
ACTION["UPLOAD_SUCCEEDED"] = "uploadSucceeded";
|
|
154
154
|
ACTION["UPLOAD_FAILED"] = "uploadFailed";
|
|
155
155
|
ACTION["TOGGLE_CODE_BLOCK_WRAP"] = "toggleCodeBlockWrap";
|
|
156
|
+
ACTION["RESIZED"] = "resized";
|
|
156
157
|
return ACTION;
|
|
157
158
|
}({});
|
|
158
159
|
var INPUT_METHOD = exports.INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.isUnbadgedUrl = exports.ExternalImageBadge = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _info = _interopRequireDefault(require("@atlaskit/icon/glyph/info"));
|
|
@@ -22,7 +22,15 @@ var baseStyles = (0, _primitives.xcss)({
|
|
|
22
22
|
// On cleanup of 'platform_editor_hide_external_media_badge', make types non-optional
|
|
23
23
|
|
|
24
24
|
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
25
|
-
var
|
|
25
|
+
var isUnbadgedUrl = exports.isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
26
|
+
var hostname;
|
|
27
|
+
try {
|
|
28
|
+
var _URL = new URL(url || '');
|
|
29
|
+
hostname = _URL.hostname;
|
|
30
|
+
} catch (e) {
|
|
31
|
+
// If the URL is invalid (or empty), just carry on showing the badge
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
26
34
|
return Boolean(hostname &&
|
|
27
35
|
// Do not show badge for atlassian domains and subdomains
|
|
28
36
|
NO_EXTERNAL_BADGE_HOSTS.some(function (host) {
|
|
@@ -36,14 +44,7 @@ var ExternalImageBadge = exports.ExternalImageBadge = function ExternalImageBadg
|
|
|
36
44
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
37
45
|
var message = intl.formatMessage(_media.externalMediaMessages.externalMediaFile);
|
|
38
46
|
if ((0, _platformFeatureFlags.fg)('platform_editor_hide_external_media_badge')) {
|
|
39
|
-
|
|
40
|
-
try {
|
|
41
|
-
var _URL = new URL(url || '');
|
|
42
|
-
hostname = _URL.hostname;
|
|
43
|
-
} catch (e) {
|
|
44
|
-
// If the URL is invalid (or empty), just carry on showing the badge
|
|
45
|
-
}
|
|
46
|
-
if (type !== 'external' || isUnbadgedHostname(hostname)) {
|
|
47
|
+
if (type !== 'external' || isUnbadgedUrl(url)) {
|
|
47
48
|
return null;
|
|
48
49
|
}
|
|
49
50
|
}
|
|
@@ -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 = "95.10.
|
|
20
|
+
var packageVersion = "95.10.3";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -10,6 +10,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
12
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
|
+
var _analytics = require("../analytics");
|
|
13
14
|
var _styles = require("../styles");
|
|
14
15
|
var _Resizer = _interopRequireDefault(require("./Resizer"));
|
|
15
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -72,7 +73,8 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
72
73
|
getRef = _ref.getRef,
|
|
73
74
|
disabled = _ref.disabled,
|
|
74
75
|
getEditorWidth = _ref.getEditorWidth,
|
|
75
|
-
parentRef = _ref.parentRef
|
|
76
|
+
parentRef = _ref.parentRef,
|
|
77
|
+
editorAnalyticsApi = _ref.editorAnalyticsApi;
|
|
76
78
|
var _useState = (0, _react.useState)({
|
|
77
79
|
minWidth: undefined,
|
|
78
80
|
maxWidth: undefined,
|
|
@@ -131,9 +133,21 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
131
133
|
var node = state.doc.nodeAt(pos);
|
|
132
134
|
var newTr = state.tr;
|
|
133
135
|
if (node && breakoutSupportedNodes.includes(node.type.name)) {
|
|
136
|
+
var newBreakoutWidth = Math.max(newWidth, _editorSharedStyles.akEditorDefaultLayoutWidth);
|
|
134
137
|
newTr.setNodeMarkup(pos, node.type, node.attrs, [breakout.create({
|
|
135
|
-
width:
|
|
138
|
+
width: newBreakoutWidth
|
|
136
139
|
})]);
|
|
140
|
+
var breakoutResizePayload = {
|
|
141
|
+
action: _analytics.ACTION.RESIZED,
|
|
142
|
+
actionSubject: _analytics.ACTION_SUBJECT.ELEMENT,
|
|
143
|
+
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
144
|
+
attributes: {
|
|
145
|
+
nodeType: node.type.name,
|
|
146
|
+
prevWidth: originalState.width,
|
|
147
|
+
newWidth: newBreakoutWidth
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent(breakoutResizePayload)(newTr);
|
|
137
151
|
}
|
|
138
152
|
newTr.setMeta('is-resizer-resizing', false).setMeta('scrollIntoView', false);
|
|
139
153
|
dispatch(newTr);
|
|
@@ -142,7 +156,7 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
142
156
|
minWidth: undefined,
|
|
143
157
|
maxWidth: undefined
|
|
144
158
|
});
|
|
145
|
-
}, [editorView, getPos]);
|
|
159
|
+
}, [editorView, getPos, editorAnalyticsApi]);
|
|
146
160
|
if (disabled) {
|
|
147
161
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
148
162
|
"data-testid": "breakout-resizer-editor-view-wrapper",
|
|
@@ -56,8 +56,11 @@ var columnLayoutResponsiveRendererStyles = exports.columnLayoutResponsiveRendere
|
|
|
56
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
57
57
|
'.layout-section-container': {
|
|
58
58
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
59
|
-
'[data-layout-section]': (0, _defineProperty2.default)({
|
|
60
|
-
|
|
59
|
+
'[data-layout-section]': (0, _defineProperty2.default)({
|
|
60
|
+
gap: "var(--ds-space-600, 48px)"
|
|
61
|
+
}, "@container layout-area (max-width:".concat(LAYOUT_BREAKPOINT_RENDERER, "px)"), {
|
|
62
|
+
flexDirection: 'column',
|
|
63
|
+
gap: "var(--ds-space-400, 32px)"
|
|
61
64
|
})
|
|
62
65
|
}
|
|
63
66
|
});
|
|
@@ -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 = "95.10.
|
|
27
|
+
var packageVersion = "95.10.3";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -147,6 +147,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
147
147
|
ACTION["UPLOAD_SUCCEEDED"] = "uploadSucceeded";
|
|
148
148
|
ACTION["UPLOAD_FAILED"] = "uploadFailed";
|
|
149
149
|
ACTION["TOGGLE_CODE_BLOCK_WRAP"] = "toggleCodeBlockWrap";
|
|
150
|
+
ACTION["RESIZED"] = "resized";
|
|
150
151
|
return ACTION;
|
|
151
152
|
}({});
|
|
152
153
|
export let INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
|
|
@@ -15,9 +15,20 @@ const baseStyles = xcss({
|
|
|
15
15
|
// On cleanup of 'platform_editor_hide_external_media_badge', make types non-optional
|
|
16
16
|
|
|
17
17
|
const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
18
|
-
export const
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
export const isUnbadgedUrl = url => {
|
|
19
|
+
let hostname;
|
|
20
|
+
try {
|
|
21
|
+
({
|
|
22
|
+
hostname
|
|
23
|
+
} = new URL(url || ''));
|
|
24
|
+
} catch (e) {
|
|
25
|
+
// If the URL is invalid (or empty), just carry on showing the badge
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
return Boolean(hostname &&
|
|
29
|
+
// Do not show badge for atlassian domains and subdomains
|
|
30
|
+
NO_EXTERNAL_BADGE_HOSTS.some(host => hostname === host || hostname.endsWith(`.${host}`)));
|
|
31
|
+
};
|
|
21
32
|
export const ExternalImageBadge = ({
|
|
22
33
|
badgeSize,
|
|
23
34
|
type,
|
|
@@ -26,15 +37,7 @@ export const ExternalImageBadge = ({
|
|
|
26
37
|
const intl = useIntl();
|
|
27
38
|
const message = intl.formatMessage(externalMediaMessages.externalMediaFile);
|
|
28
39
|
if (fg('platform_editor_hide_external_media_badge')) {
|
|
29
|
-
|
|
30
|
-
try {
|
|
31
|
-
({
|
|
32
|
-
hostname
|
|
33
|
-
} = new URL(url || ''));
|
|
34
|
-
} catch (e) {
|
|
35
|
-
// If the URL is invalid (or empty), just carry on showing the badge
|
|
36
|
-
}
|
|
37
|
-
if (type !== 'external' || isUnbadgedHostname(hostname)) {
|
|
40
|
+
if (type !== 'external' || isUnbadgedUrl(url)) {
|
|
38
41
|
return null;
|
|
39
42
|
}
|
|
40
43
|
}
|
|
@@ -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 = "95.10.
|
|
4
|
+
const packageVersion = "95.10.3";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
2
2
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
|
|
3
3
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
4
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
4
5
|
import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles';
|
|
5
6
|
import Resizer from './Resizer';
|
|
6
7
|
const breakoutSupportedNodes = ['layoutSection', 'expand', 'codeBlock'];
|
|
@@ -61,7 +62,8 @@ const BreakoutResizer = ({
|
|
|
61
62
|
getRef,
|
|
62
63
|
disabled,
|
|
63
64
|
getEditorWidth,
|
|
64
|
-
parentRef
|
|
65
|
+
parentRef,
|
|
66
|
+
editorAnalyticsApi
|
|
65
67
|
}) => {
|
|
66
68
|
const [{
|
|
67
69
|
minWidth,
|
|
@@ -126,9 +128,21 @@ const BreakoutResizer = ({
|
|
|
126
128
|
const node = state.doc.nodeAt(pos);
|
|
127
129
|
const newTr = state.tr;
|
|
128
130
|
if (node && breakoutSupportedNodes.includes(node.type.name)) {
|
|
131
|
+
const newBreakoutWidth = Math.max(newWidth, akEditorDefaultLayoutWidth);
|
|
129
132
|
newTr.setNodeMarkup(pos, node.type, node.attrs, [breakout.create({
|
|
130
|
-
width:
|
|
133
|
+
width: newBreakoutWidth
|
|
131
134
|
})]);
|
|
135
|
+
const breakoutResizePayload = {
|
|
136
|
+
action: ACTION.RESIZED,
|
|
137
|
+
actionSubject: ACTION_SUBJECT.ELEMENT,
|
|
138
|
+
eventType: EVENT_TYPE.TRACK,
|
|
139
|
+
attributes: {
|
|
140
|
+
nodeType: node.type.name,
|
|
141
|
+
prevWidth: originalState.width,
|
|
142
|
+
newWidth: newBreakoutWidth
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 ? void 0 : editorAnalyticsApi.attachAnalyticsEvent(breakoutResizePayload)(newTr);
|
|
132
146
|
}
|
|
133
147
|
newTr.setMeta('is-resizer-resizing', false).setMeta('scrollIntoView', false);
|
|
134
148
|
dispatch(newTr);
|
|
@@ -137,7 +151,7 @@ const BreakoutResizer = ({
|
|
|
137
151
|
minWidth: undefined,
|
|
138
152
|
maxWidth: undefined
|
|
139
153
|
});
|
|
140
|
-
}, [editorView, getPos]);
|
|
154
|
+
}, [editorView, getPos, editorAnalyticsApi]);
|
|
141
155
|
if (disabled) {
|
|
142
156
|
return /*#__PURE__*/React.createElement("div", {
|
|
143
157
|
"data-testid": "breakout-resizer-editor-view-wrapper",
|
|
@@ -50,9 +50,11 @@ const columnLayoutResponsiveRendererStyles = css({
|
|
|
50
50
|
'.layout-section-container': {
|
|
51
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
52
52
|
'[data-layout-section]': {
|
|
53
|
+
gap: "var(--ds-space-600, 48px)",
|
|
53
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-container-queries, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
54
55
|
[`@container layout-area (max-width:${LAYOUT_BREAKPOINT_RENDERER}px)`]: {
|
|
55
|
-
flexDirection: 'column'
|
|
56
|
+
flexDirection: 'column',
|
|
57
|
+
gap: "var(--ds-space-400, 32px)"
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
}
|
|
@@ -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 = "95.10.
|
|
16
|
+
const packageVersion = "95.10.3";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -147,6 +147,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
|
|
|
147
147
|
ACTION["UPLOAD_SUCCEEDED"] = "uploadSucceeded";
|
|
148
148
|
ACTION["UPLOAD_FAILED"] = "uploadFailed";
|
|
149
149
|
ACTION["TOGGLE_CODE_BLOCK_WRAP"] = "toggleCodeBlockWrap";
|
|
150
|
+
ACTION["RESIZED"] = "resized";
|
|
150
151
|
return ACTION;
|
|
151
152
|
}({});
|
|
152
153
|
export var INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
|
|
@@ -15,7 +15,15 @@ var baseStyles = xcss({
|
|
|
15
15
|
// On cleanup of 'platform_editor_hide_external_media_badge', make types non-optional
|
|
16
16
|
|
|
17
17
|
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
18
|
-
export var
|
|
18
|
+
export var isUnbadgedUrl = function isUnbadgedUrl(url) {
|
|
19
|
+
var hostname;
|
|
20
|
+
try {
|
|
21
|
+
var _URL = new URL(url || '');
|
|
22
|
+
hostname = _URL.hostname;
|
|
23
|
+
} catch (e) {
|
|
24
|
+
// If the URL is invalid (or empty), just carry on showing the badge
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
19
27
|
return Boolean(hostname &&
|
|
20
28
|
// Do not show badge for atlassian domains and subdomains
|
|
21
29
|
NO_EXTERNAL_BADGE_HOSTS.some(function (host) {
|
|
@@ -29,14 +37,7 @@ export var ExternalImageBadge = function ExternalImageBadge(_ref) {
|
|
|
29
37
|
var intl = useIntl();
|
|
30
38
|
var message = intl.formatMessage(externalMediaMessages.externalMediaFile);
|
|
31
39
|
if (fg('platform_editor_hide_external_media_badge')) {
|
|
32
|
-
|
|
33
|
-
try {
|
|
34
|
-
var _URL = new URL(url || '');
|
|
35
|
-
hostname = _URL.hostname;
|
|
36
|
-
} catch (e) {
|
|
37
|
-
// If the URL is invalid (or empty), just carry on showing the badge
|
|
38
|
-
}
|
|
39
|
-
if (type !== 'external' || isUnbadgedHostname(hostname)) {
|
|
40
|
+
if (type !== 'external' || isUnbadgedUrl(url)) {
|
|
40
41
|
return null;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
@@ -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 = "95.10.
|
|
10
|
+
var packageVersion = "95.10.3";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -2,6 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import React, { useCallback, useMemo, useState } from 'react';
|
|
3
3
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
5
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
5
6
|
import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles';
|
|
6
7
|
import Resizer from './Resizer';
|
|
7
8
|
var breakoutSupportedNodes = ['layoutSection', 'expand', 'codeBlock'];
|
|
@@ -62,7 +63,8 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
62
63
|
getRef = _ref.getRef,
|
|
63
64
|
disabled = _ref.disabled,
|
|
64
65
|
getEditorWidth = _ref.getEditorWidth,
|
|
65
|
-
parentRef = _ref.parentRef
|
|
66
|
+
parentRef = _ref.parentRef,
|
|
67
|
+
editorAnalyticsApi = _ref.editorAnalyticsApi;
|
|
66
68
|
var _useState = useState({
|
|
67
69
|
minWidth: undefined,
|
|
68
70
|
maxWidth: undefined,
|
|
@@ -121,9 +123,21 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
121
123
|
var node = state.doc.nodeAt(pos);
|
|
122
124
|
var newTr = state.tr;
|
|
123
125
|
if (node && breakoutSupportedNodes.includes(node.type.name)) {
|
|
126
|
+
var newBreakoutWidth = Math.max(newWidth, akEditorDefaultLayoutWidth);
|
|
124
127
|
newTr.setNodeMarkup(pos, node.type, node.attrs, [breakout.create({
|
|
125
|
-
width:
|
|
128
|
+
width: newBreakoutWidth
|
|
126
129
|
})]);
|
|
130
|
+
var breakoutResizePayload = {
|
|
131
|
+
action: ACTION.RESIZED,
|
|
132
|
+
actionSubject: ACTION_SUBJECT.ELEMENT,
|
|
133
|
+
eventType: EVENT_TYPE.TRACK,
|
|
134
|
+
attributes: {
|
|
135
|
+
nodeType: node.type.name,
|
|
136
|
+
prevWidth: originalState.width,
|
|
137
|
+
newWidth: newBreakoutWidth
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
editorAnalyticsApi === null || editorAnalyticsApi === void 0 || editorAnalyticsApi.attachAnalyticsEvent(breakoutResizePayload)(newTr);
|
|
127
141
|
}
|
|
128
142
|
newTr.setMeta('is-resizer-resizing', false).setMeta('scrollIntoView', false);
|
|
129
143
|
dispatch(newTr);
|
|
@@ -132,7 +146,7 @@ var BreakoutResizer = function BreakoutResizer(_ref) {
|
|
|
132
146
|
minWidth: undefined,
|
|
133
147
|
maxWidth: undefined
|
|
134
148
|
});
|
|
135
|
-
}, [editorView, getPos]);
|
|
149
|
+
}, [editorView, getPos, editorAnalyticsApi]);
|
|
136
150
|
if (disabled) {
|
|
137
151
|
return /*#__PURE__*/React.createElement("div", {
|
|
138
152
|
"data-testid": "breakout-resizer-editor-view-wrapper",
|
|
@@ -48,8 +48,11 @@ var columnLayoutResponsiveRendererStyles = css({
|
|
|
48
48
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
49
49
|
'.layout-section-container': {
|
|
50
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
51
|
-
'[data-layout-section]': _defineProperty({
|
|
52
|
-
|
|
51
|
+
'[data-layout-section]': _defineProperty({
|
|
52
|
+
gap: "var(--ds-space-600, 48px)"
|
|
53
|
+
}, "@container layout-area (max-width:".concat(LAYOUT_BREAKPOINT_RENDERER, "px)"), {
|
|
54
|
+
flexDirection: 'column',
|
|
55
|
+
gap: "var(--ds-space-400, 32px)"
|
|
53
56
|
})
|
|
54
57
|
}
|
|
55
58
|
});
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "95.10.
|
|
24
|
+
var packageVersion = "95.10.3";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ACTION, ACTION_SUBJECT } from './enums';
|
|
2
|
+
import type { TrackAEP } from './utils';
|
|
3
|
+
type BreakoutSupportedNodes = 'layoutSection' | 'expand' | 'codeBlock';
|
|
4
|
+
export type BreakoutResizedAEP = TrackAEP<ACTION.RESIZED, ACTION_SUBJECT.ELEMENT, undefined, {
|
|
5
|
+
nodeType: BreakoutSupportedNodes;
|
|
6
|
+
prevWidth?: number;
|
|
7
|
+
newWidth?: number;
|
|
8
|
+
}, undefined>;
|
|
9
|
+
export type BreakoutEventPayload = BreakoutResizedAEP;
|
|
10
|
+
export {};
|
|
@@ -153,7 +153,8 @@ export declare enum ACTION {
|
|
|
153
153
|
UPLOAD_COMMENCED = "uploadCommenced",
|
|
154
154
|
UPLOAD_SUCCEEDED = "uploadSucceeded",
|
|
155
155
|
UPLOAD_FAILED = "uploadFailed",
|
|
156
|
-
TOGGLE_CODE_BLOCK_WRAP = "toggleCodeBlockWrap"
|
|
156
|
+
TOGGLE_CODE_BLOCK_WRAP = "toggleCodeBlockWrap",
|
|
157
|
+
RESIZED = "resized"
|
|
157
158
|
}
|
|
158
159
|
export declare enum INPUT_METHOD {
|
|
159
160
|
ASCII = "ascii",
|
|
@@ -5,6 +5,7 @@ import type { NewCollabSyncUpErrorAttributes } from '../../collab';
|
|
|
5
5
|
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserBrowserExtensionResults } from '../../utils';
|
|
6
6
|
import { type AIDefinitionsEventPayload } from './ai-definitions-events';
|
|
7
7
|
import type { AvatarEventPayload } from './avatar';
|
|
8
|
+
import { type BreakoutEventPayload } from './breakout-events';
|
|
8
9
|
import type { ConfigPanelEventPayload } from './config-panel-events';
|
|
9
10
|
import type { ContextMenuEventPayload } from './context-menu-events';
|
|
10
11
|
import type { CutCopyEventPayload } from './cut-copy-events';
|
|
@@ -48,7 +49,7 @@ export type SimplifiedNode = {
|
|
|
48
49
|
marks?: string[];
|
|
49
50
|
content?: SimplifiedNode[];
|
|
50
51
|
};
|
|
51
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | 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 | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AIDefinitionsEventPayload;
|
|
52
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | 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 | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AIDefinitionsEventPayload | BreakoutEventPayload;
|
|
52
53
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
53
54
|
previousColor: string;
|
|
54
55
|
newColor: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import type {
|
|
3
|
+
import type { NewCoreIconProps } from '@atlaskit/icon/types';
|
|
4
4
|
export interface ButtonOptionProps {
|
|
5
5
|
title: string;
|
|
6
6
|
selected: boolean;
|
|
@@ -8,8 +8,8 @@ export interface ButtonOptionProps {
|
|
|
8
8
|
disabled: boolean;
|
|
9
9
|
tooltipContent?: string | null;
|
|
10
10
|
onClick: () => void;
|
|
11
|
-
icon: (props:
|
|
12
|
-
iconFallback: (props:
|
|
11
|
+
icon: (props: NewCoreIconProps) => JSX.Element;
|
|
12
|
+
iconFallback: (props: NewCoreIconProps) => JSX.Element;
|
|
13
13
|
}
|
|
14
14
|
export interface LinkToolbarButtonGroupProps {
|
|
15
15
|
options: ButtonOptionProps[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
export declare const IconCard: (props:
|
|
2
|
+
import type { NewIconProps } from '@atlaskit/icon/types';
|
|
3
|
+
export declare const IconCard: (props: NewIconProps) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
export declare const IconEmbed: (props:
|
|
2
|
+
import type { NewIconProps } from '@atlaskit/icon/types';
|
|
3
|
+
export declare const IconEmbed: (props: NewIconProps) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
export declare const IconInline: (props:
|
|
2
|
+
import type { NewIconProps } from '@atlaskit/icon/types';
|
|
3
|
+
export declare const IconInline: (props: NewIconProps) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
export declare const IconUrl: (props:
|
|
2
|
+
import type { NewCoreIconProps } from '@atlaskit/icon/types';
|
|
3
|
+
export declare const IconUrl: (props: NewCoreIconProps) => JSX.Element;
|
|
@@ -5,6 +5,6 @@ type ExternalImageBadgeProps = {
|
|
|
5
5
|
type?: MediaType;
|
|
6
6
|
url?: string | undefined;
|
|
7
7
|
};
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const isUnbadgedUrl: (url: string | undefined) => boolean;
|
|
9
9
|
export declare const ExternalImageBadge: ({ badgeSize, type, url }: ExternalImageBadgeProps) => JSX.Element | null;
|
|
10
10
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '../analytics';
|
|
3
4
|
import { type EditorContainerWidth, type getPosHandlerNode } from '../types';
|
|
4
5
|
type BreakoutSupportedNodes = 'layoutSection' | 'expand' | 'codeBlock';
|
|
5
6
|
export declare const ignoreResizerMutations: (mutation: MutationRecord | {
|
|
@@ -12,7 +13,7 @@ export declare const ignoreResizerMutations: (mutation: MutationRecord | {
|
|
|
12
13
|
*
|
|
13
14
|
* use experiment platform_editor_advanced_layouts
|
|
14
15
|
*/
|
|
15
|
-
declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled, getEditorWidth, parentRef, }: {
|
|
16
|
+
declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled, getEditorWidth, parentRef, editorAnalyticsApi, }: {
|
|
16
17
|
editorView: EditorView;
|
|
17
18
|
nodeType: BreakoutSupportedNodes;
|
|
18
19
|
getPos: getPosHandlerNode;
|
|
@@ -20,5 +21,6 @@ declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled
|
|
|
20
21
|
disabled?: boolean | undefined;
|
|
21
22
|
getEditorWidth: () => EditorContainerWidth | undefined;
|
|
22
23
|
parentRef?: HTMLElement | undefined;
|
|
24
|
+
editorAnalyticsApi?: EditorAnalyticsAPI | undefined;
|
|
23
25
|
}) => JSX.Element;
|
|
24
26
|
export { BreakoutResizer };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ACTION, ACTION_SUBJECT } from './enums';
|
|
2
|
+
import type { TrackAEP } from './utils';
|
|
3
|
+
type BreakoutSupportedNodes = 'layoutSection' | 'expand' | 'codeBlock';
|
|
4
|
+
export type BreakoutResizedAEP = TrackAEP<ACTION.RESIZED, ACTION_SUBJECT.ELEMENT, undefined, {
|
|
5
|
+
nodeType: BreakoutSupportedNodes;
|
|
6
|
+
prevWidth?: number;
|
|
7
|
+
newWidth?: number;
|
|
8
|
+
}, undefined>;
|
|
9
|
+
export type BreakoutEventPayload = BreakoutResizedAEP;
|
|
10
|
+
export {};
|
|
@@ -153,7 +153,8 @@ export declare enum ACTION {
|
|
|
153
153
|
UPLOAD_COMMENCED = "uploadCommenced",
|
|
154
154
|
UPLOAD_SUCCEEDED = "uploadSucceeded",
|
|
155
155
|
UPLOAD_FAILED = "uploadFailed",
|
|
156
|
-
TOGGLE_CODE_BLOCK_WRAP = "toggleCodeBlockWrap"
|
|
156
|
+
TOGGLE_CODE_BLOCK_WRAP = "toggleCodeBlockWrap",
|
|
157
|
+
RESIZED = "resized"
|
|
157
158
|
}
|
|
158
159
|
export declare enum INPUT_METHOD {
|
|
159
160
|
ASCII = "ascii",
|
|
@@ -5,6 +5,7 @@ import type { NewCollabSyncUpErrorAttributes } from '../../collab';
|
|
|
5
5
|
import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserBrowserExtensionResults } from '../../utils';
|
|
6
6
|
import { type AIDefinitionsEventPayload } from './ai-definitions-events';
|
|
7
7
|
import type { AvatarEventPayload } from './avatar';
|
|
8
|
+
import { type BreakoutEventPayload } from './breakout-events';
|
|
8
9
|
import type { ConfigPanelEventPayload } from './config-panel-events';
|
|
9
10
|
import type { ContextMenuEventPayload } from './context-menu-events';
|
|
10
11
|
import type { CutCopyEventPayload } from './cut-copy-events';
|
|
@@ -48,7 +49,7 @@ export type SimplifiedNode = {
|
|
|
48
49
|
marks?: string[];
|
|
49
50
|
content?: SimplifiedNode[];
|
|
50
51
|
};
|
|
51
|
-
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | 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 | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AIDefinitionsEventPayload;
|
|
52
|
+
export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | 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 | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AIDefinitionsEventPayload | BreakoutEventPayload;
|
|
52
53
|
type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
|
|
53
54
|
previousColor: string;
|
|
54
55
|
newColor: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import type {
|
|
3
|
+
import type { NewCoreIconProps } from '@atlaskit/icon/types';
|
|
4
4
|
export interface ButtonOptionProps {
|
|
5
5
|
title: string;
|
|
6
6
|
selected: boolean;
|
|
@@ -8,8 +8,8 @@ export interface ButtonOptionProps {
|
|
|
8
8
|
disabled: boolean;
|
|
9
9
|
tooltipContent?: string | null;
|
|
10
10
|
onClick: () => void;
|
|
11
|
-
icon: (props:
|
|
12
|
-
iconFallback: (props:
|
|
11
|
+
icon: (props: NewCoreIconProps) => JSX.Element;
|
|
12
|
+
iconFallback: (props: NewCoreIconProps) => JSX.Element;
|
|
13
13
|
}
|
|
14
14
|
export interface LinkToolbarButtonGroupProps {
|
|
15
15
|
options: ButtonOptionProps[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
export declare const IconCard: (props:
|
|
2
|
+
import type { NewIconProps } from '@atlaskit/icon/types';
|
|
3
|
+
export declare const IconCard: (props: NewIconProps) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
export declare const IconEmbed: (props:
|
|
2
|
+
import type { NewIconProps } from '@atlaskit/icon/types';
|
|
3
|
+
export declare const IconEmbed: (props: NewIconProps) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
export declare const IconInline: (props:
|
|
2
|
+
import type { NewIconProps } from '@atlaskit/icon/types';
|
|
3
|
+
export declare const IconInline: (props: NewIconProps) => JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
export declare const IconUrl: (props:
|
|
2
|
+
import type { NewCoreIconProps } from '@atlaskit/icon/types';
|
|
3
|
+
export declare const IconUrl: (props: NewCoreIconProps) => JSX.Element;
|
|
@@ -5,6 +5,6 @@ type ExternalImageBadgeProps = {
|
|
|
5
5
|
type?: MediaType;
|
|
6
6
|
url?: string | undefined;
|
|
7
7
|
};
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const isUnbadgedUrl: (url: string | undefined) => boolean;
|
|
9
9
|
export declare const ExternalImageBadge: ({ badgeSize, type, url }: ExternalImageBadgeProps) => JSX.Element | null;
|
|
10
10
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
+
import type { EditorAnalyticsAPI } from '../analytics';
|
|
3
4
|
import { type EditorContainerWidth, type getPosHandlerNode } from '../types';
|
|
4
5
|
type BreakoutSupportedNodes = 'layoutSection' | 'expand' | 'codeBlock';
|
|
5
6
|
export declare const ignoreResizerMutations: (mutation: MutationRecord | {
|
|
@@ -12,7 +13,7 @@ export declare const ignoreResizerMutations: (mutation: MutationRecord | {
|
|
|
12
13
|
*
|
|
13
14
|
* use experiment platform_editor_advanced_layouts
|
|
14
15
|
*/
|
|
15
|
-
declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled, getEditorWidth, parentRef, }: {
|
|
16
|
+
declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled, getEditorWidth, parentRef, editorAnalyticsApi, }: {
|
|
16
17
|
editorView: EditorView;
|
|
17
18
|
nodeType: BreakoutSupportedNodes;
|
|
18
19
|
getPos: getPosHandlerNode;
|
|
@@ -20,5 +21,6 @@ declare const BreakoutResizer: ({ editorView, nodeType, getPos, getRef, disabled
|
|
|
20
21
|
disabled?: boolean | undefined;
|
|
21
22
|
getEditorWidth: () => EditorContainerWidth | undefined;
|
|
22
23
|
parentRef?: HTMLElement | undefined;
|
|
24
|
+
editorAnalyticsApi?: EditorAnalyticsAPI | undefined;
|
|
23
25
|
}) => JSX.Element;
|
|
24
26
|
export { BreakoutResizer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "95.10.
|
|
3
|
+
"version": "95.10.3",
|
|
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/"
|
|
@@ -128,8 +128,8 @@
|
|
|
128
128
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
129
129
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
130
130
|
"@atlaskit/emoji": "^67.11.0",
|
|
131
|
-
"@atlaskit/icon": "^
|
|
132
|
-
"@atlaskit/icon-object": "^6.
|
|
131
|
+
"@atlaskit/icon": "^23.0.0",
|
|
132
|
+
"@atlaskit/icon-object": "^6.9.0",
|
|
133
133
|
"@atlaskit/link-datasource": "^3.13.0",
|
|
134
134
|
"@atlaskit/link-picker": "^1.47.0",
|
|
135
135
|
"@atlaskit/media-card": "^78.15.0",
|
|
@@ -139,21 +139,21 @@
|
|
|
139
139
|
"@atlaskit/media-file-preview": "^0.9.0",
|
|
140
140
|
"@atlaskit/media-picker": "^67.0.0",
|
|
141
141
|
"@atlaskit/media-ui": "^27.0.0",
|
|
142
|
-
"@atlaskit/media-viewer": "49.4.
|
|
142
|
+
"@atlaskit/media-viewer": "49.4.4",
|
|
143
143
|
"@atlaskit/mention": "^23.4.0",
|
|
144
144
|
"@atlaskit/menu": "^2.13.0",
|
|
145
145
|
"@atlaskit/onboarding": "^12.1.0",
|
|
146
146
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
147
147
|
"@atlaskit/popper": "^6.3.0",
|
|
148
148
|
"@atlaskit/primitives": "^13.3.0",
|
|
149
|
-
"@atlaskit/profilecard": "^20.
|
|
149
|
+
"@atlaskit/profilecard": "^20.13.0",
|
|
150
150
|
"@atlaskit/section-message": "^6.8.0",
|
|
151
|
-
"@atlaskit/smart-card": "^32.
|
|
151
|
+
"@atlaskit/smart-card": "^32.5.0",
|
|
152
152
|
"@atlaskit/smart-user-picker": "^6.11.0",
|
|
153
153
|
"@atlaskit/spinner": "^16.3.0",
|
|
154
154
|
"@atlaskit/task-decision": "^17.11.0",
|
|
155
155
|
"@atlaskit/textfield": "^6.6.0",
|
|
156
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
156
|
+
"@atlaskit/tmp-editor-statsig": "^2.22.0",
|
|
157
157
|
"@atlaskit/tokens": "^2.4.0",
|
|
158
158
|
"@atlaskit/tooltip": "^18.9.0",
|
|
159
159
|
"@atlaskit/width-detector": "^4.3.0",
|