@atlaskit/editor-common 95.6.3 → 95.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/cjs/code-block/index.js +1 -7
- package/dist/cjs/extensibility/Extension/Extension/index.js +0 -1
- package/dist/cjs/extensibility/Extension/Lozenge/EditToggle.js +35 -30
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +21 -18
- package/dist/cjs/media-inline/inline-image-wrapper.js +1 -1
- package/dist/cjs/media-single/ExternalImageBadge.js +28 -2
- package/dist/cjs/messages/layout.js +10 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/shared/code-block.js +4 -8
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/code-block/index.js +1 -7
- package/dist/es2019/extensibility/Extension/Extension/index.js +0 -1
- package/dist/es2019/extensibility/Extension/Lozenge/EditToggle.js +31 -26
- package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +21 -18
- package/dist/es2019/media-inline/inline-image-wrapper.js +1 -1
- package/dist/es2019/media-single/ExternalImageBadge.js +24 -1
- package/dist/es2019/messages/layout.js +10 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/shared/code-block.js +8 -56
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/code-block/index.js +1 -7
- package/dist/esm/extensibility/Extension/Extension/index.js +0 -1
- package/dist/esm/extensibility/Extension/Lozenge/EditToggle.js +35 -30
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +21 -18
- package/dist/esm/media-inline/inline-image-wrapper.js +1 -1
- package/dist/esm/media-single/ExternalImageBadge.js +27 -1
- package/dist/esm/messages/layout.js +10 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/shared/code-block.js +4 -8
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/media-single/ExternalImageBadge.d.ts +5 -1
- package/dist/types/messages/layout.d.ts +10 -0
- package/dist/types/styles/shared/code-block.d.ts +1 -4
- package/dist/types-ts4.5/media-single/ExternalImageBadge.d.ts +5 -1
- package/dist/types-ts4.5/messages/layout.d.ts +10 -0
- package/dist/types-ts4.5/styles/shared/code-block.d.ts +1 -4
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 95.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#167313](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/167313)
|
|
8
|
+
[`40d491ee58258`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/40d491ee58258) -
|
|
9
|
+
ED-24230 Remove code wrapping for editor FG
|
|
10
|
+
|
|
11
|
+
## 95.7.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#168624](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/168624)
|
|
16
|
+
[`6d928c0cb9227`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6d928c0cb9227) -
|
|
17
|
+
[ux] [ED-25832] Hide external image badges for atlassian.com domains
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#165765](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/165765)
|
|
22
|
+
[`3f441f30e6507`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3f441f30e6507) -
|
|
23
|
+
Bump adf-schema to 46.0.0
|
|
24
|
+
- Updated dependencies
|
|
25
|
+
|
|
3
26
|
## 95.6.3
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -10,9 +10,6 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
10
10
|
var defaultWordWrapState = exports.defaultWordWrapState = false;
|
|
11
11
|
var codeBlockWrappedStates = exports.codeBlockWrappedStates = new WeakMap();
|
|
12
12
|
var isCodeBlockWordWrapEnabled = exports.isCodeBlockWordWrapEnabled = function isCodeBlockWordWrapEnabled(codeBlockNode) {
|
|
13
|
-
if (!(0, _platformFeatureFlags.fg)('editor_support_code_block_wrapping')) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
13
|
var currentNodeWordWrapState = codeBlockWrappedStates.get(codeBlockNode);
|
|
17
14
|
return currentNodeWordWrapState !== undefined ? currentNodeWordWrapState : defaultWordWrapState;
|
|
18
15
|
};
|
|
@@ -22,9 +19,6 @@ var isCodeBlockWordWrapEnabled = exports.isCodeBlockWordWrapEnabled = function i
|
|
|
22
19
|
* Replaced with updateCodeBlockWrappedStateNodeKeys() under 'editor_code_block_wrapping_language_change_bug' feature gate.
|
|
23
20
|
*/
|
|
24
21
|
var transferCodeBlockWrappedValue = exports.transferCodeBlockWrappedValue = function transferCodeBlockWrappedValue(oldCodeBlockNode, newCodeBlockNode) {
|
|
25
|
-
if (!(0, _platformFeatureFlags.fg)('editor_support_code_block_wrapping')) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
22
|
// Don't overwrite the value for the new node if it already exists.
|
|
29
23
|
// This can happen when a drag&drop is swapping nodes.
|
|
30
24
|
if (codeBlockWrappedStates.has(newCodeBlockNode)) {
|
|
@@ -41,7 +35,7 @@ var transferCodeBlockWrappedValue = exports.transferCodeBlockWrappedValue = func
|
|
|
41
35
|
* This function takes all the given nodes, finds their old nodes from the old state and updates these old node keys.
|
|
42
36
|
*/
|
|
43
37
|
var updateCodeBlockWrappedStateNodeKeys = exports.updateCodeBlockWrappedStateNodeKeys = function updateCodeBlockWrappedStateNodeKeys(newCodeBlockNodes, oldState) {
|
|
44
|
-
if (!(0, _platformFeatureFlags.fg)('
|
|
38
|
+
if (!(0, _platformFeatureFlags.fg)('editor_code_block_wrapping_language_change_bug')) {
|
|
45
39
|
return;
|
|
46
40
|
}
|
|
47
41
|
newCodeBlockNodes.forEach(function (newCodeBlockNode) {
|
|
@@ -59,7 +59,6 @@ function ExtensionWithPluginState(props) {
|
|
|
59
59
|
var isTopLevelNode = _react.default.useMemo(function () {
|
|
60
60
|
var pos = typeof getPos === 'function' ? getPos() : undefined;
|
|
61
61
|
return typeof pos !== 'undefined' && !isNaN(pos) && view.state.doc.resolve(pos).depth === 0;
|
|
62
|
-
return false;
|
|
63
62
|
}, [view, getPos]);
|
|
64
63
|
var shouldBreakout =
|
|
65
64
|
// Extension should breakout when the layout is set to 'full-width' or 'wide'.
|
|
@@ -80,34 +80,39 @@ var EditToggle = exports.EditToggle = function EditToggle(_ref) {
|
|
|
80
80
|
var handleClick = (0, _react.useCallback)(function () {
|
|
81
81
|
setShowBodiedExtensionRendererView === null || setShowBodiedExtensionRendererView === void 0 || setShowBodiedExtensionRendererView(!showBodiedExtensionRendererView);
|
|
82
82
|
}, [showBodiedExtensionRendererView, setShowBodiedExtensionRendererView]);
|
|
83
|
-
return (
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
83
|
+
return (
|
|
84
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
85
|
+
(0, _react2.jsx)("div", {
|
|
86
|
+
"data-testid": "extension-edit-toggle-container"
|
|
87
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
88
|
+
,
|
|
89
|
+
css: isNodeHovered ? [buttonContainerStyles, showButtonContainerStyle] : buttonContainerStyles
|
|
90
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
91
|
+
,
|
|
92
|
+
style: customContainerStyles
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
94
|
+
,
|
|
95
|
+
className: "extension-edit-toggle-container"
|
|
96
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
97
|
+
,
|
|
98
|
+
onMouseOver: function onMouseOver() {
|
|
99
|
+
return setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
|
|
100
|
+
},
|
|
101
|
+
onMouseLeave: function onMouseLeave() {
|
|
102
|
+
return setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false);
|
|
103
|
+
}
|
|
104
|
+
}, (0, _react2.jsx)("span", {
|
|
105
|
+
"data-testid": "edit-toggle"
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
107
|
+
,
|
|
108
|
+
css: buttonStyles
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
110
|
+
,
|
|
111
|
+
className: "extension-edit-toggle",
|
|
112
|
+
onClick: handleClick
|
|
113
|
+
}, (0, _react2.jsx)(_primitives.Flex, {
|
|
114
|
+
as: "span",
|
|
115
|
+
xcss: iconStyles
|
|
116
|
+
}, icon), text))
|
|
117
|
+
);
|
|
113
118
|
};
|
|
@@ -151,24 +151,27 @@ var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
151
151
|
selected = _this$props7.selected,
|
|
152
152
|
id = _this$props7.id,
|
|
153
153
|
role = _this$props7.role;
|
|
154
|
-
return (
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
154
|
+
return (
|
|
155
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
156
|
+
(0, _react2.jsx)("li", {
|
|
157
|
+
css: [container, selected && containerSelected],
|
|
158
|
+
role: role,
|
|
159
|
+
id: id,
|
|
160
|
+
"aria-selected": selected,
|
|
161
|
+
"data-testid": "link-search-list-item",
|
|
162
|
+
onMouseMove: this.handleMouseMove,
|
|
163
|
+
onMouseEnter: this.handleMouseEnter,
|
|
164
|
+
onMouseLeave: this.handleMouseLeave,
|
|
165
|
+
onClick: this.handleSelect
|
|
166
|
+
}, this.renderIcon(), (0, _react2.jsx)("span", {
|
|
167
|
+
css: nameWrapper
|
|
168
|
+
}, (0, _react2.jsx)("div", {
|
|
169
|
+
css: nameStyle
|
|
170
|
+
}, item.name), (0, _react2.jsx)("div", {
|
|
171
|
+
"data-testid": "link-search-list-item-container",
|
|
172
|
+
css: containerName
|
|
173
|
+
}, item.container, this.renderTimeStamp())))
|
|
174
|
+
);
|
|
172
175
|
}
|
|
173
176
|
}]);
|
|
174
177
|
return LinkSearchListItem;
|
|
@@ -37,7 +37,7 @@ var InlineImageWrapper = exports.InlineImageWrapper = function InlineImageWrappe
|
|
|
37
37
|
var borderStyleVars = borderSize && borderColor ? (_ref2 = {}, (0, _defineProperty2.default)(_ref2, _styles.INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, borderSize), (0, _defineProperty2.default)(_ref2, _styles.INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, (0, _editorPalette.hexToEditorBorderPaletteColor)(borderColor) || borderColor), _ref2) : {};
|
|
38
38
|
var aspectStyleVars = aspectRatio ? (0, _defineProperty2.default)({}, _styles.INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, aspectRatio) : {};
|
|
39
39
|
return (
|
|
40
|
-
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
40
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
41
41
|
(0, _react.jsx)("span", (0, _extends2.default)({
|
|
42
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
43
43
|
style: _objectSpread(_objectSpread({}, borderStyleVars), aspectStyleVars)
|
|
@@ -4,10 +4,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.ExternalImageBadge = void 0;
|
|
7
|
+
exports.isUnbadgedHostname = 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"));
|
|
11
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
12
|
var _primitives = require("@atlaskit/primitives");
|
|
12
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
13
14
|
var _media = require("../media");
|
|
@@ -17,10 +18,35 @@ var baseStyles = (0, _primitives.xcss)({
|
|
|
17
18
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
18
19
|
cursor: 'pointer'
|
|
19
20
|
});
|
|
21
|
+
|
|
22
|
+
// On cleanup of 'platform_editor_hide_external_media_badge', make types non-optional
|
|
23
|
+
|
|
24
|
+
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
25
|
+
var isUnbadgedHostname = exports.isUnbadgedHostname = function isUnbadgedHostname(hostname) {
|
|
26
|
+
return Boolean(hostname &&
|
|
27
|
+
// Do not show badge for atlassian domains and subdomains
|
|
28
|
+
NO_EXTERNAL_BADGE_HOSTS.some(function (host) {
|
|
29
|
+
return hostname === host || hostname.endsWith(".".concat(host));
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
20
32
|
var ExternalImageBadge = exports.ExternalImageBadge = function ExternalImageBadge(_ref) {
|
|
21
|
-
var badgeSize = _ref.badgeSize
|
|
33
|
+
var badgeSize = _ref.badgeSize,
|
|
34
|
+
type = _ref.type,
|
|
35
|
+
url = _ref.url;
|
|
22
36
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
23
37
|
var message = intl.formatMessage(_media.externalMediaMessages.externalMediaFile);
|
|
38
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_hide_external_media_badge')) {
|
|
39
|
+
var hostname;
|
|
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
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
24
50
|
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
25
51
|
padding: badgeSize === 'medium' ? 'space.050' : 'space.0',
|
|
26
52
|
xcss: baseStyles,
|
|
@@ -46,6 +46,16 @@ var toolbarMessages = exports.toolbarMessages = (0, _reactIntlNext.defineMessage
|
|
|
46
46
|
defaultMessage: 'Three columns with sidebars layout',
|
|
47
47
|
description: 'Layout with 3 columns laid out as 25% - 50% - 25%'
|
|
48
48
|
},
|
|
49
|
+
threeColumnsWithLeftSidebars: {
|
|
50
|
+
id: 'fabric.editor.threeColumnsWithLeftSidebars',
|
|
51
|
+
defaultMessage: 'Three columns with left sidebar layout',
|
|
52
|
+
description: 'Layout with 3 columns laid out as 25% - 25% - 50%'
|
|
53
|
+
},
|
|
54
|
+
threeColumnsWithRightSidebars: {
|
|
55
|
+
id: 'fabric.editor.threeColumnsWithRightSidebars',
|
|
56
|
+
defaultMessage: 'Three columns with right sidebar layout',
|
|
57
|
+
description: 'Layout with 3 columns laid out as 50% - 25% - 25%'
|
|
58
|
+
},
|
|
49
59
|
floatingToolbarRadioGroupAriaLabel: {
|
|
50
60
|
id: 'fabric.editor.floatingToolbar.floatingToolbarRadioGroupAriaLabel',
|
|
51
61
|
defaultMessage: 'Layout options',
|
|
@@ -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.
|
|
20
|
+
var packageVersion = "95.7.1";
|
|
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
|
|
@@ -19,17 +19,13 @@ var CodeBlockSharedCssClassName = exports.CodeBlockSharedCssClassName = {
|
|
|
19
19
|
CODEBLOCK_LINE_NUMBER_GUTTER: 'line-number-gutter',
|
|
20
20
|
CODEBLOCK_CONTENT: 'code-content',
|
|
21
21
|
DS_CODEBLOCK: '[data-ds--code--code-block]',
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
CODEBLOCK_CONTENT_FG: 'code-content--fg',
|
|
25
|
-
CODEBLOCK_CONTENT_FG_WRAPPED: 'code-content--fg-wrapped',
|
|
26
|
-
CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET: 'code-content__line-number--wrapped',
|
|
27
|
-
CODEBLOCK_LINE_NUMBER_GUTTER_FG: 'line-number-gutter--fg'
|
|
22
|
+
CODEBLOCK_CONTENT_WRAPPED: 'code-content--wrapped',
|
|
23
|
+
CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET: 'code-content__line-number--wrapped'
|
|
28
24
|
};
|
|
29
25
|
var codeBlockSharedStyles = exports.codeBlockSharedStyles = function codeBlockSharedStyles() {
|
|
30
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", "\n\t\t> .", "\n\t\t> .", " {\n\t\tmargin-right: ", ";\n\n\t\tcode {\n\t\t\tdisplay: block;\n\t\t\tword-break: break-word;\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\t}\n\n\t.", "\n\t\t> .", " {\n\t\tdisplay: flex;\n\t\tflex: 1;\n\n\t\tcode {\n\t\t\tflex-grow: 1;\n\n\t\t\twhite-space: pre;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tbackground-color: ", ";\n\t\tborder-radius: ", ";\n\t\tmargin: ", " 0 0 0;\n\t\tfont-family: ", ";\n\t\tmin-width: ", "px;\n\t\tcursor: pointer;\n\t\tclear: both;\n\n\t\t--ds--code--bg-color: transparent;\n\n\t\t/* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n\t\twhite-space: normal;\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\ttop: 0px;\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\tbottom: 0px;\n\t\t\tright: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tdisplay: flex;\n\t\t\tborder-radius: ", ";\n\t\t\twidth: 100%;\n\t\t\tcounter-reset: line;\n\t\t\toverflow-x: auto;\n\n\t\t\tbackground-image: ", ";\n\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-attachment: local, local, local, local, scroll, scroll, scroll, scroll;\n\t\t\tbackground-size:\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%;\n\t\t\tbackground-position:\n\t\t\t\t0 0,\n\t\t\t\t0 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t0 0,\n\t\t\t\t0 0;\n\n\t\t\t/* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n\t\t\toverflow-y: hidden;\n\t\t}\n\n\t\t.", " {\n\t\t\
|
|
26
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", "\n\t\t> .", "\n\t\t> .", " {\n\t\tmargin-right: ", ";\n\n\t\tcode {\n\t\t\tdisplay: block;\n\t\t\tword-break: break-word;\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\t}\n\n\t.", "\n\t\t> .", " {\n\t\tdisplay: flex;\n\t\tflex: 1;\n\n\t\tcode {\n\t\t\tflex-grow: 1;\n\n\t\t\twhite-space: pre;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tbackground-color: ", ";\n\t\tborder-radius: ", ";\n\t\tmargin: ", " 0 0 0;\n\t\tfont-family: ", ";\n\t\tmin-width: ", "px;\n\t\tcursor: pointer;\n\t\tclear: both;\n\n\t\t--ds--code--bg-color: transparent;\n\n\t\t/* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n\t\twhite-space: normal;\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\ttop: 0px;\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\tbottom: 0px;\n\t\t\tright: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tbackground-color: ", ";\n\t\t\tdisplay: flex;\n\t\t\tborder-radius: ", ";\n\t\t\twidth: 100%;\n\t\t\tcounter-reset: line;\n\t\t\toverflow-x: auto;\n\n\t\t\tbackground-image: ", ";\n\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-attachment: local, local, local, local, scroll, scroll, scroll, scroll;\n\t\t\tbackground-size:\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%;\n\t\t\tbackground-position:\n\t\t\t\t0 0,\n\t\t\t\t0 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t0 0,\n\t\t\t\t0 0;\n\n\t\t\t/* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n\t\t\toverflow-y: hidden;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tposition: relative;\n\t\t\twidth: var(--lineNumberGutterWidth, 2rem);\n\t\t\tpadding: 0px ", ";\n\t\t\tflex-shrink: 0;\n\t\t\tfont-size: ", ";\n\t\t\tbox-sizing: content-box;\n\t\t}\n\n\t\t.", " {\n\t\t\tcode {\n\t\t\t\ttab-size: 4;\n\t\t\t\tcursor: text;\n\t\t\t\tcolor: ", ";\n\t\t\t\tborder-radius: ", ";\n\t\t\t\tmargin: ", ";\n\t\t\t\tfont-size: ", ";\n\t\t\t\tline-height: 1.5rem;\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tpointer-events: none;\n\t\t\tuser-select: none;\n\t\t\twidth: var(--lineNumberGutterWidth, 2rem);\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\tfont-size: ", ";\n\t\t\tpadding: 0px ", ";\n\t\t\tline-height: 1.5rem;\n\t\t\ttext-align: right;\n\t\t\tcolor: ", ";\n\t\t\tbox-sizing: content-box;\n\t\t}\n\t}\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, #FFFFFF)", "var(--ds-border-radius, 3px)", _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorCodeFontFamily, _editorSharedStyles.akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, "var(--ds-background-neutral, #091E420F)", "var(--ds-border-radius, 3px)", (0, _editorSharedStyles.overflowShadow)({
|
|
31
27
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
32
|
-
}), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.
|
|
28
|
+
}), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, #091E420F)", "var(--ds-space-100, 8px)", (0, _editorSharedStyles.relativeFontSizeToBase16)(14), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-text, #172B4D)", "var(--ds-border-radius, 3px)", "var(--ds-space-100, 8px)", (0, _editorSharedStyles.relativeFontSizeToBase16)(14), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET, (0, _editorSharedStyles.relativeFontSizeToBase16)(14), "var(--ds-space-100, 8px)", "var(--ds-text-subtlest, #505F79)");
|
|
33
29
|
};
|
|
34
30
|
|
|
35
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -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.
|
|
27
|
+
var packageVersion = "95.7.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -4,9 +4,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
4
4
|
export const defaultWordWrapState = false;
|
|
5
5
|
export const codeBlockWrappedStates = new WeakMap();
|
|
6
6
|
export const isCodeBlockWordWrapEnabled = codeBlockNode => {
|
|
7
|
-
if (!fg('editor_support_code_block_wrapping')) {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
7
|
const currentNodeWordWrapState = codeBlockWrappedStates.get(codeBlockNode);
|
|
11
8
|
return currentNodeWordWrapState !== undefined ? currentNodeWordWrapState : defaultWordWrapState;
|
|
12
9
|
};
|
|
@@ -16,9 +13,6 @@ export const isCodeBlockWordWrapEnabled = codeBlockNode => {
|
|
|
16
13
|
* Replaced with updateCodeBlockWrappedStateNodeKeys() under 'editor_code_block_wrapping_language_change_bug' feature gate.
|
|
17
14
|
*/
|
|
18
15
|
export const transferCodeBlockWrappedValue = (oldCodeBlockNode, newCodeBlockNode) => {
|
|
19
|
-
if (!fg('editor_support_code_block_wrapping')) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
16
|
// Don't overwrite the value for the new node if it already exists.
|
|
23
17
|
// This can happen when a drag&drop is swapping nodes.
|
|
24
18
|
if (codeBlockWrappedStates.has(newCodeBlockNode)) {
|
|
@@ -35,7 +29,7 @@ export const transferCodeBlockWrappedValue = (oldCodeBlockNode, newCodeBlockNode
|
|
|
35
29
|
* This function takes all the given nodes, finds their old nodes from the old state and updates these old node keys.
|
|
36
30
|
*/
|
|
37
31
|
export const updateCodeBlockWrappedStateNodeKeys = (newCodeBlockNodes, oldState) => {
|
|
38
|
-
if (!fg('
|
|
32
|
+
if (!fg('editor_code_block_wrapping_language_change_bug')) {
|
|
39
33
|
return;
|
|
40
34
|
}
|
|
41
35
|
newCodeBlockNodes.forEach(newCodeBlockNode => {
|
|
@@ -50,7 +50,6 @@ function ExtensionWithPluginState(props) {
|
|
|
50
50
|
const isTopLevelNode = React.useMemo(() => {
|
|
51
51
|
const pos = typeof getPos === 'function' ? getPos() : undefined;
|
|
52
52
|
return typeof pos !== 'undefined' && !isNaN(pos) && view.state.doc.resolve(pos).depth === 0;
|
|
53
|
-
return false;
|
|
54
53
|
}, [view, getPos]);
|
|
55
54
|
const shouldBreakout =
|
|
56
55
|
// Extension should breakout when the layout is set to 'full-width' or 'wide'.
|
|
@@ -74,30 +74,35 @@ export const EditToggle = ({
|
|
|
74
74
|
const handleClick = useCallback(() => {
|
|
75
75
|
setShowBodiedExtensionRendererView === null || setShowBodiedExtensionRendererView === void 0 ? void 0 : setShowBodiedExtensionRendererView(!showBodiedExtensionRendererView);
|
|
76
76
|
}, [showBodiedExtensionRendererView, setShowBodiedExtensionRendererView]);
|
|
77
|
-
return
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
77
|
+
return (
|
|
78
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
79
|
+
jsx("div", {
|
|
80
|
+
"data-testid": "extension-edit-toggle-container"
|
|
81
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
82
|
+
,
|
|
83
|
+
css: isNodeHovered ? [buttonContainerStyles, showButtonContainerStyle] : buttonContainerStyles
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
85
|
+
,
|
|
86
|
+
style: customContainerStyles
|
|
87
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
88
|
+
,
|
|
89
|
+
className: "extension-edit-toggle-container"
|
|
90
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
91
|
+
,
|
|
92
|
+
onMouseOver: () => setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true),
|
|
93
|
+
onMouseLeave: () => setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false)
|
|
94
|
+
}, jsx("span", {
|
|
95
|
+
"data-testid": "edit-toggle"
|
|
96
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
97
|
+
,
|
|
98
|
+
css: buttonStyles
|
|
99
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
100
|
+
,
|
|
101
|
+
className: "extension-edit-toggle",
|
|
102
|
+
onClick: handleClick
|
|
103
|
+
}, jsx(Flex, {
|
|
104
|
+
as: "span",
|
|
105
|
+
xcss: iconStyles
|
|
106
|
+
}, icon), text))
|
|
107
|
+
);
|
|
103
108
|
};
|
|
@@ -131,24 +131,27 @@ class LinkSearchListItem extends React.PureComponent {
|
|
|
131
131
|
id,
|
|
132
132
|
role
|
|
133
133
|
} = this.props;
|
|
134
|
-
return
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
134
|
+
return (
|
|
135
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
136
|
+
jsx("li", {
|
|
137
|
+
css: [container, selected && containerSelected],
|
|
138
|
+
role: role,
|
|
139
|
+
id: id,
|
|
140
|
+
"aria-selected": selected,
|
|
141
|
+
"data-testid": "link-search-list-item",
|
|
142
|
+
onMouseMove: this.handleMouseMove,
|
|
143
|
+
onMouseEnter: this.handleMouseEnter,
|
|
144
|
+
onMouseLeave: this.handleMouseLeave,
|
|
145
|
+
onClick: this.handleSelect
|
|
146
|
+
}, this.renderIcon(), jsx("span", {
|
|
147
|
+
css: nameWrapper
|
|
148
|
+
}, jsx("div", {
|
|
149
|
+
css: nameStyle
|
|
150
|
+
}, item.name), jsx("div", {
|
|
151
|
+
"data-testid": "link-search-list-item-container",
|
|
152
|
+
css: containerName
|
|
153
|
+
}, item.container, this.renderTimeStamp())))
|
|
154
|
+
);
|
|
152
155
|
}
|
|
153
156
|
}
|
|
154
157
|
export default injectIntl(LinkSearchListItem);
|
|
@@ -35,7 +35,7 @@ export const InlineImageWrapper = ({
|
|
|
35
35
|
[INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY]: aspectRatio
|
|
36
36
|
} : {};
|
|
37
37
|
return (
|
|
38
|
-
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
38
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
39
39
|
jsx("span", _extends({
|
|
40
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
41
41
|
style: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import InfoIcon from '@atlaskit/icon/glyph/info';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
6
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
7
|
import { externalMediaMessages } from '../media';
|
|
@@ -10,11 +11,33 @@ const baseStyles = xcss({
|
|
|
10
11
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
11
12
|
cursor: 'pointer'
|
|
12
13
|
});
|
|
14
|
+
|
|
15
|
+
// On cleanup of 'platform_editor_hide_external_media_badge', make types non-optional
|
|
16
|
+
|
|
17
|
+
const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
18
|
+
export const isUnbadgedHostname = hostname => Boolean(hostname &&
|
|
19
|
+
// Do not show badge for atlassian domains and subdomains
|
|
20
|
+
NO_EXTERNAL_BADGE_HOSTS.some(host => hostname === host || hostname.endsWith(`.${host}`)));
|
|
13
21
|
export const ExternalImageBadge = ({
|
|
14
|
-
badgeSize
|
|
22
|
+
badgeSize,
|
|
23
|
+
type,
|
|
24
|
+
url
|
|
15
25
|
}) => {
|
|
16
26
|
const intl = useIntl();
|
|
17
27
|
const message = intl.formatMessage(externalMediaMessages.externalMediaFile);
|
|
28
|
+
if (fg('platform_editor_hide_external_media_badge')) {
|
|
29
|
+
let hostname;
|
|
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)) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
18
41
|
return /*#__PURE__*/React.createElement(Box, {
|
|
19
42
|
padding: badgeSize === 'medium' ? 'space.050' : 'space.0',
|
|
20
43
|
xcss: baseStyles,
|
|
@@ -40,6 +40,16 @@ export const toolbarMessages = defineMessages({
|
|
|
40
40
|
defaultMessage: 'Three columns with sidebars layout',
|
|
41
41
|
description: 'Layout with 3 columns laid out as 25% - 50% - 25%'
|
|
42
42
|
},
|
|
43
|
+
threeColumnsWithLeftSidebars: {
|
|
44
|
+
id: 'fabric.editor.threeColumnsWithLeftSidebars',
|
|
45
|
+
defaultMessage: 'Three columns with left sidebar layout',
|
|
46
|
+
description: 'Layout with 3 columns laid out as 25% - 25% - 50%'
|
|
47
|
+
},
|
|
48
|
+
threeColumnsWithRightSidebars: {
|
|
49
|
+
id: 'fabric.editor.threeColumnsWithRightSidebars',
|
|
50
|
+
defaultMessage: 'Three columns with right sidebar layout',
|
|
51
|
+
description: 'Layout with 3 columns laid out as 50% - 25% - 25%'
|
|
52
|
+
},
|
|
43
53
|
floatingToolbarRadioGroupAriaLabel: {
|
|
44
54
|
id: 'fabric.editor.floatingToolbar.floatingToolbarRadioGroupAriaLabel',
|
|
45
55
|
defaultMessage: 'Layout options',
|
|
@@ -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.
|
|
4
|
+
const packageVersion = "95.7.1";
|
|
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
|
|
@@ -10,17 +10,13 @@ export const CodeBlockSharedCssClassName = {
|
|
|
10
10
|
CODEBLOCK_LINE_NUMBER_GUTTER: 'line-number-gutter',
|
|
11
11
|
CODEBLOCK_CONTENT: 'code-content',
|
|
12
12
|
DS_CODEBLOCK: '[data-ds--code--code-block]',
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
CODEBLOCK_CONTENT_FG: 'code-content--fg',
|
|
16
|
-
CODEBLOCK_CONTENT_FG_WRAPPED: 'code-content--fg-wrapped',
|
|
17
|
-
CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET: 'code-content__line-number--wrapped',
|
|
18
|
-
CODEBLOCK_LINE_NUMBER_GUTTER_FG: 'line-number-gutter--fg'
|
|
13
|
+
CODEBLOCK_CONTENT_WRAPPED: 'code-content--wrapped',
|
|
14
|
+
CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET: 'code-content__line-number--wrapped'
|
|
19
15
|
};
|
|
20
16
|
export const codeBlockSharedStyles = () => css`
|
|
21
|
-
.${CodeBlockSharedCssClassName.
|
|
22
|
-
> .${CodeBlockSharedCssClassName.
|
|
23
|
-
> .${CodeBlockSharedCssClassName.
|
|
17
|
+
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED}
|
|
18
|
+
> .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER}
|
|
19
|
+
> .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
|
|
24
20
|
margin-right: ${"var(--ds-space-100, 8px)"};
|
|
25
21
|
|
|
26
22
|
code {
|
|
@@ -30,8 +26,8 @@ export const codeBlockSharedStyles = () => css`
|
|
|
30
26
|
}
|
|
31
27
|
}
|
|
32
28
|
|
|
33
|
-
.${CodeBlockSharedCssClassName.
|
|
34
|
-
> .${CodeBlockSharedCssClassName.
|
|
29
|
+
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER}
|
|
30
|
+
> .${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
|
|
35
31
|
display: flex;
|
|
36
32
|
flex: 1;
|
|
37
33
|
|
|
@@ -74,6 +70,7 @@ export const codeBlockSharedStyles = () => css`
|
|
|
74
70
|
}
|
|
75
71
|
|
|
76
72
|
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER} {
|
|
73
|
+
position: relative;
|
|
77
74
|
background-color: ${"var(--ds-background-neutral, #091E420F)"};
|
|
78
75
|
display: flex;
|
|
79
76
|
border-radius: ${"var(--ds-border-radius, 3px)"};
|
|
@@ -110,35 +107,7 @@ export const codeBlockSharedStyles = () => css`
|
|
|
110
107
|
overflow-y: hidden;
|
|
111
108
|
}
|
|
112
109
|
|
|
113
|
-
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER_FG} {
|
|
114
|
-
// relative position set so number gutter remains absolute on horizontal scroll.
|
|
115
|
-
position: relative;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
110
|
.${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
|
|
119
|
-
flex-shrink: 0;
|
|
120
|
-
text-align: right;
|
|
121
|
-
background-color: ${"var(--ds-background-neutral, #091E420F)"};
|
|
122
|
-
padding: ${"var(--ds-space-100, 8px)"};
|
|
123
|
-
position: relative;
|
|
124
|
-
|
|
125
|
-
span {
|
|
126
|
-
display: block;
|
|
127
|
-
line-height: 0;
|
|
128
|
-
font-size: 0;
|
|
129
|
-
|
|
130
|
-
::before {
|
|
131
|
-
display: inline-block;
|
|
132
|
-
content: counter(line);
|
|
133
|
-
counter-increment: line;
|
|
134
|
-
color: ${"var(--ds-text-subtlest, #626F86)"};
|
|
135
|
-
font-size: ${relativeFontSizeToBase16(14)};
|
|
136
|
-
line-height: 1.5rem;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER_FG} {
|
|
142
111
|
background-color: ${"var(--ds-background-neutral, #091E420F)"};
|
|
143
112
|
position: relative;
|
|
144
113
|
width: var(--lineNumberGutterWidth, 2rem);
|
|
@@ -149,23 +118,6 @@ export const codeBlockSharedStyles = () => css`
|
|
|
149
118
|
}
|
|
150
119
|
|
|
151
120
|
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT} {
|
|
152
|
-
display: flex;
|
|
153
|
-
flex: 1;
|
|
154
|
-
|
|
155
|
-
code {
|
|
156
|
-
flex-grow: 1;
|
|
157
|
-
tab-size: 4;
|
|
158
|
-
cursor: text;
|
|
159
|
-
color: ${"var(--ds-text, #172B4D)"};
|
|
160
|
-
border-radius: ${"var(--ds-border-radius, 3px)"};
|
|
161
|
-
margin: ${"var(--ds-space-100, 8px)"};
|
|
162
|
-
white-space: pre;
|
|
163
|
-
font-size: ${relativeFontSizeToBase16(14)};
|
|
164
|
-
line-height: 1.5rem;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_FG} {
|
|
169
121
|
code {
|
|
170
122
|
tab-size: 4;
|
|
171
123
|
cursor: text;
|
|
@@ -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.
|
|
16
|
+
const packageVersion = "95.7.1";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -4,9 +4,6 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
4
4
|
export var defaultWordWrapState = false;
|
|
5
5
|
export var codeBlockWrappedStates = new WeakMap();
|
|
6
6
|
export var isCodeBlockWordWrapEnabled = function isCodeBlockWordWrapEnabled(codeBlockNode) {
|
|
7
|
-
if (!fg('editor_support_code_block_wrapping')) {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
7
|
var currentNodeWordWrapState = codeBlockWrappedStates.get(codeBlockNode);
|
|
11
8
|
return currentNodeWordWrapState !== undefined ? currentNodeWordWrapState : defaultWordWrapState;
|
|
12
9
|
};
|
|
@@ -16,9 +13,6 @@ export var isCodeBlockWordWrapEnabled = function isCodeBlockWordWrapEnabled(code
|
|
|
16
13
|
* Replaced with updateCodeBlockWrappedStateNodeKeys() under 'editor_code_block_wrapping_language_change_bug' feature gate.
|
|
17
14
|
*/
|
|
18
15
|
export var transferCodeBlockWrappedValue = function transferCodeBlockWrappedValue(oldCodeBlockNode, newCodeBlockNode) {
|
|
19
|
-
if (!fg('editor_support_code_block_wrapping')) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
16
|
// Don't overwrite the value for the new node if it already exists.
|
|
23
17
|
// This can happen when a drag&drop is swapping nodes.
|
|
24
18
|
if (codeBlockWrappedStates.has(newCodeBlockNode)) {
|
|
@@ -35,7 +29,7 @@ export var transferCodeBlockWrappedValue = function transferCodeBlockWrappedValu
|
|
|
35
29
|
* This function takes all the given nodes, finds their old nodes from the old state and updates these old node keys.
|
|
36
30
|
*/
|
|
37
31
|
export var updateCodeBlockWrappedStateNodeKeys = function updateCodeBlockWrappedStateNodeKeys(newCodeBlockNodes, oldState) {
|
|
38
|
-
if (!fg('
|
|
32
|
+
if (!fg('editor_code_block_wrapping_language_change_bug')) {
|
|
39
33
|
return;
|
|
40
34
|
}
|
|
41
35
|
newCodeBlockNodes.forEach(function (newCodeBlockNode) {
|
|
@@ -51,7 +51,6 @@ function ExtensionWithPluginState(props) {
|
|
|
51
51
|
var isTopLevelNode = React.useMemo(function () {
|
|
52
52
|
var pos = typeof getPos === 'function' ? getPos() : undefined;
|
|
53
53
|
return typeof pos !== 'undefined' && !isNaN(pos) && view.state.doc.resolve(pos).depth === 0;
|
|
54
|
-
return false;
|
|
55
54
|
}, [view, getPos]);
|
|
56
55
|
var shouldBreakout =
|
|
57
56
|
// Extension should breakout when the layout is set to 'full-width' or 'wide'.
|
|
@@ -73,34 +73,39 @@ export var EditToggle = function EditToggle(_ref) {
|
|
|
73
73
|
var handleClick = useCallback(function () {
|
|
74
74
|
setShowBodiedExtensionRendererView === null || setShowBodiedExtensionRendererView === void 0 || setShowBodiedExtensionRendererView(!showBodiedExtensionRendererView);
|
|
75
75
|
}, [showBodiedExtensionRendererView, setShowBodiedExtensionRendererView]);
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
76
|
+
return (
|
|
77
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
78
|
+
jsx("div", {
|
|
79
|
+
"data-testid": "extension-edit-toggle-container"
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
81
|
+
,
|
|
82
|
+
css: isNodeHovered ? [buttonContainerStyles, showButtonContainerStyle] : buttonContainerStyles
|
|
83
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
84
|
+
,
|
|
85
|
+
style: customContainerStyles
|
|
86
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
87
|
+
,
|
|
88
|
+
className: "extension-edit-toggle-container"
|
|
89
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
90
|
+
,
|
|
91
|
+
onMouseOver: function onMouseOver() {
|
|
92
|
+
return setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
|
|
93
|
+
},
|
|
94
|
+
onMouseLeave: function onMouseLeave() {
|
|
95
|
+
return setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false);
|
|
96
|
+
}
|
|
97
|
+
}, jsx("span", {
|
|
98
|
+
"data-testid": "edit-toggle"
|
|
99
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
100
|
+
,
|
|
101
|
+
css: buttonStyles
|
|
102
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
103
|
+
,
|
|
104
|
+
className: "extension-edit-toggle",
|
|
105
|
+
onClick: handleClick
|
|
106
|
+
}, jsx(Flex, {
|
|
107
|
+
as: "span",
|
|
108
|
+
xcss: iconStyles
|
|
109
|
+
}, icon), text))
|
|
110
|
+
);
|
|
106
111
|
};
|
|
@@ -145,24 +145,27 @@ var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
145
145
|
selected = _this$props7.selected,
|
|
146
146
|
id = _this$props7.id,
|
|
147
147
|
role = _this$props7.role;
|
|
148
|
-
return
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
148
|
+
return (
|
|
149
|
+
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions
|
|
150
|
+
jsx("li", {
|
|
151
|
+
css: [container, selected && containerSelected],
|
|
152
|
+
role: role,
|
|
153
|
+
id: id,
|
|
154
|
+
"aria-selected": selected,
|
|
155
|
+
"data-testid": "link-search-list-item",
|
|
156
|
+
onMouseMove: this.handleMouseMove,
|
|
157
|
+
onMouseEnter: this.handleMouseEnter,
|
|
158
|
+
onMouseLeave: this.handleMouseLeave,
|
|
159
|
+
onClick: this.handleSelect
|
|
160
|
+
}, this.renderIcon(), jsx("span", {
|
|
161
|
+
css: nameWrapper
|
|
162
|
+
}, jsx("div", {
|
|
163
|
+
css: nameStyle
|
|
164
|
+
}, item.name), jsx("div", {
|
|
165
|
+
"data-testid": "link-search-list-item-container",
|
|
166
|
+
css: containerName
|
|
167
|
+
}, item.container, this.renderTimeStamp())))
|
|
168
|
+
);
|
|
166
169
|
}
|
|
167
170
|
}]);
|
|
168
171
|
return LinkSearchListItem;
|
|
@@ -34,7 +34,7 @@ export var InlineImageWrapper = function InlineImageWrapper(_ref) {
|
|
|
34
34
|
var borderStyleVars = borderSize && borderColor ? (_ref2 = {}, _defineProperty(_ref2, INLINE_IMAGE_BORDER_SIZE_CSS_VAR_KEY, borderSize), _defineProperty(_ref2, INLINE_IMAGE_BORDER_COLOR_CSS_VAR_KEY, hexToEditorBorderPaletteColor(borderColor) || borderColor), _ref2) : {};
|
|
35
35
|
var aspectStyleVars = aspectRatio ? _defineProperty({}, INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, aspectRatio) : {};
|
|
36
36
|
return (
|
|
37
|
-
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
37
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
|
|
38
38
|
jsx("span", _extends({
|
|
39
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
40
40
|
style: _objectSpread(_objectSpread({}, borderStyleVars), aspectStyleVars)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
3
|
import InfoIcon from '@atlaskit/icon/glyph/info';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
6
|
import Tooltip from '@atlaskit/tooltip';
|
|
6
7
|
import { externalMediaMessages } from '../media';
|
|
@@ -10,10 +11,35 @@ var baseStyles = xcss({
|
|
|
10
11
|
lineHeight: "var(--ds-space-200, 16px)",
|
|
11
12
|
cursor: 'pointer'
|
|
12
13
|
});
|
|
14
|
+
|
|
15
|
+
// On cleanup of 'platform_editor_hide_external_media_badge', make types non-optional
|
|
16
|
+
|
|
17
|
+
var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com'];
|
|
18
|
+
export var isUnbadgedHostname = function isUnbadgedHostname(hostname) {
|
|
19
|
+
return Boolean(hostname &&
|
|
20
|
+
// Do not show badge for atlassian domains and subdomains
|
|
21
|
+
NO_EXTERNAL_BADGE_HOSTS.some(function (host) {
|
|
22
|
+
return hostname === host || hostname.endsWith(".".concat(host));
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
13
25
|
export var ExternalImageBadge = function ExternalImageBadge(_ref) {
|
|
14
|
-
var badgeSize = _ref.badgeSize
|
|
26
|
+
var badgeSize = _ref.badgeSize,
|
|
27
|
+
type = _ref.type,
|
|
28
|
+
url = _ref.url;
|
|
15
29
|
var intl = useIntl();
|
|
16
30
|
var message = intl.formatMessage(externalMediaMessages.externalMediaFile);
|
|
31
|
+
if (fg('platform_editor_hide_external_media_badge')) {
|
|
32
|
+
var hostname;
|
|
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
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
17
43
|
return /*#__PURE__*/React.createElement(Box, {
|
|
18
44
|
padding: badgeSize === 'medium' ? 'space.050' : 'space.0',
|
|
19
45
|
xcss: baseStyles,
|
|
@@ -40,6 +40,16 @@ export var toolbarMessages = defineMessages({
|
|
|
40
40
|
defaultMessage: 'Three columns with sidebars layout',
|
|
41
41
|
description: 'Layout with 3 columns laid out as 25% - 50% - 25%'
|
|
42
42
|
},
|
|
43
|
+
threeColumnsWithLeftSidebars: {
|
|
44
|
+
id: 'fabric.editor.threeColumnsWithLeftSidebars',
|
|
45
|
+
defaultMessage: 'Three columns with left sidebar layout',
|
|
46
|
+
description: 'Layout with 3 columns laid out as 25% - 25% - 50%'
|
|
47
|
+
},
|
|
48
|
+
threeColumnsWithRightSidebars: {
|
|
49
|
+
id: 'fabric.editor.threeColumnsWithRightSidebars',
|
|
50
|
+
defaultMessage: 'Three columns with right sidebar layout',
|
|
51
|
+
description: 'Layout with 3 columns laid out as 50% - 25% - 25%'
|
|
52
|
+
},
|
|
43
53
|
floatingToolbarRadioGroupAriaLabel: {
|
|
44
54
|
id: 'fabric.editor.floatingToolbar.floatingToolbarRadioGroupAriaLabel',
|
|
45
55
|
defaultMessage: 'Layout options',
|
|
@@ -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
|
+
var packageVersion = "95.7.1";
|
|
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
|
|
@@ -12,17 +12,13 @@ export var CodeBlockSharedCssClassName = {
|
|
|
12
12
|
CODEBLOCK_LINE_NUMBER_GUTTER: 'line-number-gutter',
|
|
13
13
|
CODEBLOCK_CONTENT: 'code-content',
|
|
14
14
|
DS_CODEBLOCK: '[data-ds--code--code-block]',
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
CODEBLOCK_CONTENT_FG: 'code-content--fg',
|
|
18
|
-
CODEBLOCK_CONTENT_FG_WRAPPED: 'code-content--fg-wrapped',
|
|
19
|
-
CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET: 'code-content__line-number--wrapped',
|
|
20
|
-
CODEBLOCK_LINE_NUMBER_GUTTER_FG: 'line-number-gutter--fg'
|
|
15
|
+
CODEBLOCK_CONTENT_WRAPPED: 'code-content--wrapped',
|
|
16
|
+
CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET: 'code-content__line-number--wrapped'
|
|
21
17
|
};
|
|
22
18
|
export var codeBlockSharedStyles = function codeBlockSharedStyles() {
|
|
23
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.", "\n\t\t> .", "\n\t\t> .", " {\n\t\tmargin-right: ", ";\n\n\t\tcode {\n\t\t\tdisplay: block;\n\t\t\tword-break: break-word;\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\t}\n\n\t.", "\n\t\t> .", " {\n\t\tdisplay: flex;\n\t\tflex: 1;\n\n\t\tcode {\n\t\t\tflex-grow: 1;\n\n\t\t\twhite-space: pre;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tbackground-color: ", ";\n\t\tborder-radius: ", ";\n\t\tmargin: ", " 0 0 0;\n\t\tfont-family: ", ";\n\t\tmin-width: ", "px;\n\t\tcursor: pointer;\n\t\tclear: both;\n\n\t\t--ds--code--bg-color: transparent;\n\n\t\t/* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n\t\twhite-space: normal;\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\ttop: 0px;\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\tbottom: 0px;\n\t\t\tright: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tdisplay: flex;\n\t\t\tborder-radius: ", ";\n\t\t\twidth: 100%;\n\t\t\tcounter-reset: line;\n\t\t\toverflow-x: auto;\n\n\t\t\tbackground-image: ", ";\n\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-attachment: local, local, local, local, scroll, scroll, scroll, scroll;\n\t\t\tbackground-size:\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%;\n\t\t\tbackground-position:\n\t\t\t\t0 0,\n\t\t\t\t0 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t0 0,\n\t\t\t\t0 0;\n\n\t\t\t/* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n\t\t\toverflow-y: hidden;\n\t\t}\n\n\t\t.", " {\n\t\t\
|
|
19
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.", "\n\t\t> .", "\n\t\t> .", " {\n\t\tmargin-right: ", ";\n\n\t\tcode {\n\t\t\tdisplay: block;\n\t\t\tword-break: break-word;\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\t}\n\n\t.", "\n\t\t> .", " {\n\t\tdisplay: flex;\n\t\tflex: 1;\n\n\t\tcode {\n\t\t\tflex-grow: 1;\n\n\t\t\twhite-space: pre;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: relative;\n\t\tbackground-color: ", ";\n\t\tborder-radius: ", ";\n\t\tmargin: ", " 0 0 0;\n\t\tfont-family: ", ";\n\t\tmin-width: ", "px;\n\t\tcursor: pointer;\n\t\tclear: both;\n\n\t\t--ds--code--bg-color: transparent;\n\n\t\t/* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n\t\twhite-space: normal;\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\ttop: 0px;\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tvisibility: hidden;\n\t\t\theight: 1.5rem;\n\t\t\tbottom: 0px;\n\t\t\tright: 0px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tbackground-color: ", ";\n\t\t\tdisplay: flex;\n\t\t\tborder-radius: ", ";\n\t\t\twidth: 100%;\n\t\t\tcounter-reset: line;\n\t\t\toverflow-x: auto;\n\n\t\t\tbackground-image: ", ";\n\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-attachment: local, local, local, local, scroll, scroll, scroll, scroll;\n\t\t\tbackground-size:\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%,\n\t\t\t\t", " 100%,\n\t\t\t\t1px 100%;\n\t\t\tbackground-position:\n\t\t\t\t0 0,\n\t\t\t\t0 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t100% 0,\n\t\t\t\t0 0,\n\t\t\t\t0 0;\n\n\t\t\t/* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n\t\t\toverflow-y: hidden;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tposition: relative;\n\t\t\twidth: var(--lineNumberGutterWidth, 2rem);\n\t\t\tpadding: 0px ", ";\n\t\t\tflex-shrink: 0;\n\t\t\tfont-size: ", ";\n\t\t\tbox-sizing: content-box;\n\t\t}\n\n\t\t.", " {\n\t\t\tcode {\n\t\t\t\ttab-size: 4;\n\t\t\t\tcursor: text;\n\t\t\t\tcolor: ", ";\n\t\t\t\tborder-radius: ", ";\n\t\t\t\tmargin: ", ";\n\t\t\t\tfont-size: ", ";\n\t\t\t\tline-height: 1.5rem;\n\t\t\t}\n\t\t}\n\n\t\t.", " {\n\t\t\tpointer-events: none;\n\t\t\tuser-select: none;\n\t\t\twidth: var(--lineNumberGutterWidth, 2rem);\n\t\t\tleft: 0;\n\t\t\tposition: absolute;\n\t\t\tfont-size: ", ";\n\t\t\tpadding: 0px ", ";\n\t\t\tline-height: 1.5rem;\n\t\t\ttext-align: right;\n\t\t\tcolor: ", ";\n\t\t\tbox-sizing: content-box;\n\t\t}\n\t}\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, #FFFFFF)", "var(--ds-border-radius, 3px)", blockNodesVerticalMargin, akEditorCodeFontFamily, akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, "var(--ds-background-neutral, #091E420F)", "var(--ds-border-radius, 3px)", overflowShadow({
|
|
24
20
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
25
|
-
}), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.
|
|
21
|
+
}), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, #091E420F)", "var(--ds-space-100, 8px)", relativeFontSizeToBase16(14), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-text, #172B4D)", "var(--ds-border-radius, 3px)", "var(--ds-space-100, 8px)", relativeFontSizeToBase16(14), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET, relativeFontSizeToBase16(14), "var(--ds-space-100, 8px)", "var(--ds-text-subtlest, #505F79)");
|
|
26
22
|
};
|
|
27
23
|
|
|
28
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -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.
|
|
24
|
+
var packageVersion = "95.7.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { type MediaType } from '@atlaskit/adf-schema';
|
|
2
3
|
type ExternalImageBadgeProps = {
|
|
3
4
|
badgeSize: 'medium' | 'small';
|
|
5
|
+
type?: MediaType;
|
|
6
|
+
url?: string | undefined;
|
|
4
7
|
};
|
|
5
|
-
export declare const
|
|
8
|
+
export declare const isUnbadgedHostname: (hostname: string | undefined) => boolean;
|
|
9
|
+
export declare const ExternalImageBadge: ({ badgeSize, type, url }: ExternalImageBadgeProps) => JSX.Element | null;
|
|
6
10
|
export {};
|
|
@@ -39,6 +39,16 @@ export declare const toolbarMessages: {
|
|
|
39
39
|
defaultMessage: string;
|
|
40
40
|
description: string;
|
|
41
41
|
};
|
|
42
|
+
threeColumnsWithLeftSidebars: {
|
|
43
|
+
id: string;
|
|
44
|
+
defaultMessage: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
threeColumnsWithRightSidebars: {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
42
52
|
floatingToolbarRadioGroupAriaLabel: {
|
|
43
53
|
id: string;
|
|
44
54
|
defaultMessage: string;
|
|
@@ -6,11 +6,8 @@ export declare const CodeBlockSharedCssClassName: {
|
|
|
6
6
|
CODEBLOCK_LINE_NUMBER_GUTTER: string;
|
|
7
7
|
CODEBLOCK_CONTENT: string;
|
|
8
8
|
DS_CODEBLOCK: string;
|
|
9
|
-
|
|
10
|
-
CODEBLOCK_CONTENT_FG: string;
|
|
11
|
-
CODEBLOCK_CONTENT_FG_WRAPPED: string;
|
|
9
|
+
CODEBLOCK_CONTENT_WRAPPED: string;
|
|
12
10
|
CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET: string;
|
|
13
|
-
CODEBLOCK_LINE_NUMBER_GUTTER_FG: string;
|
|
14
11
|
};
|
|
15
12
|
export declare const codeBlockSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
16
13
|
export declare const codeBlockInListSafariFix: import("@emotion/react").SerializedStyles;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { type MediaType } from '@atlaskit/adf-schema';
|
|
2
3
|
type ExternalImageBadgeProps = {
|
|
3
4
|
badgeSize: 'medium' | 'small';
|
|
5
|
+
type?: MediaType;
|
|
6
|
+
url?: string | undefined;
|
|
4
7
|
};
|
|
5
|
-
export declare const
|
|
8
|
+
export declare const isUnbadgedHostname: (hostname: string | undefined) => boolean;
|
|
9
|
+
export declare const ExternalImageBadge: ({ badgeSize, type, url }: ExternalImageBadgeProps) => JSX.Element | null;
|
|
6
10
|
export {};
|
|
@@ -39,6 +39,16 @@ export declare const toolbarMessages: {
|
|
|
39
39
|
defaultMessage: string;
|
|
40
40
|
description: string;
|
|
41
41
|
};
|
|
42
|
+
threeColumnsWithLeftSidebars: {
|
|
43
|
+
id: string;
|
|
44
|
+
defaultMessage: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
threeColumnsWithRightSidebars: {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
42
52
|
floatingToolbarRadioGroupAriaLabel: {
|
|
43
53
|
id: string;
|
|
44
54
|
defaultMessage: string;
|
|
@@ -6,11 +6,8 @@ export declare const CodeBlockSharedCssClassName: {
|
|
|
6
6
|
CODEBLOCK_LINE_NUMBER_GUTTER: string;
|
|
7
7
|
CODEBLOCK_CONTENT: string;
|
|
8
8
|
DS_CODEBLOCK: string;
|
|
9
|
-
|
|
10
|
-
CODEBLOCK_CONTENT_FG: string;
|
|
11
|
-
CODEBLOCK_CONTENT_FG_WRAPPED: string;
|
|
9
|
+
CODEBLOCK_CONTENT_WRAPPED: string;
|
|
12
10
|
CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET: string;
|
|
13
|
-
CODEBLOCK_LINE_NUMBER_GUTTER_FG: string;
|
|
14
11
|
};
|
|
15
12
|
export declare const codeBlockSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
16
13
|
export declare const codeBlockInListSafariFix: import("@emotion/react").SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "95.
|
|
3
|
+
"version": "95.7.1",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
},
|
|
112
112
|
"dependencies": {
|
|
113
113
|
"@atlaskit/activity-provider": "^2.5.0",
|
|
114
|
-
"@atlaskit/adf-schema": "^
|
|
114
|
+
"@atlaskit/adf-schema": "^46.1.0",
|
|
115
115
|
"@atlaskit/adf-utils": "^19.13.0",
|
|
116
116
|
"@atlaskit/analytics-listeners": "^8.13.0",
|
|
117
117
|
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
@@ -152,7 +152,7 @@
|
|
|
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
|
-
"@atlaskit/textfield": "^6.
|
|
155
|
+
"@atlaskit/textfield": "^6.6.0",
|
|
156
156
|
"@atlaskit/tmp-editor-statsig": "^2.21.0",
|
|
157
157
|
"@atlaskit/tokens": "^2.3.0",
|
|
158
158
|
"@atlaskit/tooltip": "^18.9.0",
|
|
@@ -246,9 +246,6 @@
|
|
|
246
246
|
"editor_inline_comments_paste_insert_nodes": {
|
|
247
247
|
"type": "boolean"
|
|
248
248
|
},
|
|
249
|
-
"editor_support_code_block_wrapping": {
|
|
250
|
-
"type": "boolean"
|
|
251
|
-
},
|
|
252
249
|
"editor_code_block_wrapping_language_change_bug": {
|
|
253
250
|
"type": "boolean"
|
|
254
251
|
},
|
|
@@ -293,6 +290,9 @@
|
|
|
293
290
|
},
|
|
294
291
|
"platform_editor_use_nested_table_pm_nodes": {
|
|
295
292
|
"type": "boolean"
|
|
293
|
+
},
|
|
294
|
+
"platform_editor_hide_external_media_badge": {
|
|
295
|
+
"type": "boolean"
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
}
|