@atlaskit/editor-common 94.2.1 → 94.3.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 +27 -0
- package/dist/cjs/doc-utils/editor-use-only.js +2 -0
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +48 -21
- package/dist/cjs/element-browser/components/ElementList/EmptyState.js +1 -1
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +52 -47
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +56 -48
- package/dist/cjs/messages/insert-block.js +0 -20
- package/dist/cjs/messages/layout.js +15 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/Caption/index.js +7 -6
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Pulse/Pulse.js +1 -2
- package/dist/cjs/with-plugin-state/index.js +1 -1
- package/dist/es2019/doc-utils/editor-use-only.js +1 -0
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +50 -20
- package/dist/es2019/element-browser/components/ElementList/EmptyState.js +2 -2
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +52 -47
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +56 -48
- package/dist/es2019/messages/insert-block.js +0 -20
- package/dist/es2019/messages/layout.js +15 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/Caption/index.js +7 -6
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Pulse/Pulse.js +1 -2
- package/dist/es2019/with-plugin-state/index.js +1 -1
- package/dist/esm/doc-utils/editor-use-only.js +1 -0
- package/dist/esm/element-browser/components/ElementList/ElementList.js +48 -21
- package/dist/esm/element-browser/components/ElementList/EmptyState.js +2 -2
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +52 -47
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +56 -48
- package/dist/esm/messages/insert-block.js +0 -20
- package/dist/esm/messages/layout.js +15 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/Caption/index.js +7 -6
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Pulse/Pulse.js +1 -2
- package/dist/esm/with-plugin-state/index.js +1 -1
- package/dist/types/messages/insert-block.d.ts +0 -20
- package/dist/types/messages/layout.d.ts +15 -0
- package/dist/types/types/floating-toolbar.d.ts +2 -0
- package/dist/types/ui-menu/ColorPickerButton/index.d.ts +1 -1
- package/dist/types-ts4.5/messages/insert-block.d.ts +0 -20
- package/dist/types-ts4.5/messages/layout.d.ts +15 -0
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +2 -0
- package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 94.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#155488](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/155488)
|
|
8
|
+
[`75a3286a32347`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/75a3286a32347) -
|
|
9
|
+
update tokens
|
|
10
|
+
|
|
11
|
+
## 94.3.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#154829](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/154829)
|
|
16
|
+
[`0646280e9ab18`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0646280e9ab18) -
|
|
17
|
+
[EDF-1176](https://product-fabric.atlassian.net/browse/EDF-1176) - add pulse EP effect to AI
|
|
18
|
+
button in Editor floating toolbar
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#155293](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/155293)
|
|
23
|
+
[`28161e3c04419`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/28161e3c04419) -
|
|
24
|
+
[ux] Implement toolbar options on layout for setting number of columns
|
|
25
|
+
- [#156078](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/156078)
|
|
26
|
+
[`2b70196727715`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2b70196727715) -
|
|
27
|
+
[ux] Update text for inserting multi column layout
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
|
|
3
30
|
## 94.2.1
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.createEditorUseOnlyNotice = createEditorUseOnlyNotice;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _sectionMessage = _interopRequireDefault(require("@atlaskit/section-message"));
|
|
10
|
+
/* eslint-disable @atlaskit/design-system/use-primitives-text */
|
|
11
|
+
|
|
10
12
|
function AlternativePackagesMessage(_ref) {
|
|
11
13
|
var alternatePackages = _ref.alternatePackages;
|
|
12
14
|
if (!alternatePackages) {
|
|
@@ -19,6 +19,8 @@ var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-
|
|
|
19
19
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
20
20
|
var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
|
|
21
21
|
var _menu = require("@atlaskit/menu");
|
|
22
|
+
var _primitives = require("@atlaskit/primitives");
|
|
23
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
22
24
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
23
25
|
var _analytics = require("../../../analytics");
|
|
24
26
|
var _quickInsert = require("../../../quick-insert");
|
|
@@ -290,8 +292,7 @@ var itemStyleOverrides = {
|
|
|
290
292
|
alignItems: 'flex-start'
|
|
291
293
|
};
|
|
292
294
|
var ElementBefore = /*#__PURE__*/(0, _react.memo)(function (_ref6) {
|
|
293
|
-
var icon = _ref6.icon
|
|
294
|
-
title = _ref6.title;
|
|
295
|
+
var icon = _ref6.icon;
|
|
295
296
|
return (0, _react2.jsx)("div", {
|
|
296
297
|
css: [itemIcon, itemIconStyle]
|
|
297
298
|
}, icon ? icon() : (0, _react2.jsx)(_quickInsert.IconFallback, null));
|
|
@@ -300,25 +301,51 @@ var ItemContent = /*#__PURE__*/(0, _react.memo)(function (_ref7) {
|
|
|
300
301
|
var title = _ref7.title,
|
|
301
302
|
description = _ref7.description,
|
|
302
303
|
keyshortcut = _ref7.keyshortcut;
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
304
|
+
if ((0, _experiments.editorExperiment)('typography_migration_ugc', true)) {
|
|
305
|
+
return (
|
|
306
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
307
|
+
(0, _react2.jsx)("div", {
|
|
308
|
+
css: itemBody,
|
|
309
|
+
className: "item-body"
|
|
310
|
+
}, (0, _react2.jsx)("div", {
|
|
311
|
+
css: itemText
|
|
312
|
+
}, (0, _react2.jsx)(_primitives.Stack, {
|
|
313
|
+
space: "space.025"
|
|
314
|
+
}, (0, _react2.jsx)("div", {
|
|
315
|
+
css: itemTitleWrapper
|
|
316
|
+
}, (0, _react2.jsx)(_primitives.Text, {
|
|
317
|
+
maxLines: 1
|
|
318
|
+
}, title), (0, _react2.jsx)("div", {
|
|
319
|
+
css: itemAfter
|
|
320
|
+
}, keyshortcut && (0, _react2.jsx)("div", {
|
|
321
|
+
css: _shortcut.shortcutStyle
|
|
322
|
+
}, keyshortcut))), description && (0, _react2.jsx)(_primitives.Text, {
|
|
323
|
+
color: "color.text.subtle",
|
|
324
|
+
size: "small",
|
|
325
|
+
maxLines: 2
|
|
326
|
+
}, description))))
|
|
327
|
+
);
|
|
328
|
+
} else {
|
|
329
|
+
return (
|
|
330
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
331
|
+
(0, _react2.jsx)("div", {
|
|
332
|
+
css: itemBody,
|
|
333
|
+
className: "item-body"
|
|
334
|
+
}, (0, _react2.jsx)("div", {
|
|
335
|
+
css: itemText
|
|
336
|
+
}, (0, _react2.jsx)("div", {
|
|
337
|
+
css: itemTitleWrapper
|
|
338
|
+
}, (0, _react2.jsx)("p", {
|
|
339
|
+
css: itemTitle
|
|
340
|
+
}, title), (0, _react2.jsx)("div", {
|
|
341
|
+
css: itemAfter
|
|
342
|
+
}, keyshortcut && (0, _react2.jsx)("div", {
|
|
343
|
+
css: _shortcut.shortcutStyle
|
|
344
|
+
}, keyshortcut))), description && (0, _react2.jsx)("p", {
|
|
345
|
+
css: itemDescription
|
|
346
|
+
}, description)))
|
|
347
|
+
);
|
|
348
|
+
}
|
|
322
349
|
});
|
|
323
350
|
var elementItemsWrapper = (0, _react2.css)({
|
|
324
351
|
flex: 1,
|
|
@@ -29,7 +29,7 @@ function EmptyState(_ref) {
|
|
|
29
29
|
description: "Empty state heading"
|
|
30
30
|
})), (0, _react.jsx)("div", {
|
|
31
31
|
css: emptyStateSubHeading
|
|
32
|
-
}, (0, _react.jsx)(
|
|
32
|
+
}, (0, _react.jsx)(_primitives.Text, null, (0, _react.jsx)(_reactIntlNext.FormattedMessage, {
|
|
33
33
|
id: "fabric.editor.elementbrowser.search.empty-state.sub-heading",
|
|
34
34
|
defaultMessage: "Try searching with a different term or discover new apps for Atlassian products.",
|
|
35
35
|
description: "Empty state sub-heading"
|
|
@@ -14,6 +14,7 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
14
14
|
var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsContext"));
|
|
15
15
|
var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
|
|
16
16
|
var _analytics = require("../../analytics");
|
|
17
|
+
var _getEditorUgcToken = _interopRequireDefault(require("../../ugc-tokens/get-editor-ugc-token"));
|
|
17
18
|
var _constants = require("../constants");
|
|
18
19
|
var _useContainerWidth2 = _interopRequireDefault(require("../hooks/use-container-width"));
|
|
19
20
|
var _useSelectAndFocusOnArrowNavigation = _interopRequireDefault(require("../hooks/use-select-and-focus-on-arrow-navigation"));
|
|
@@ -82,7 +83,8 @@ var sidebarHeading = (0, _react2.css)({
|
|
|
82
83
|
display: 'inline-flex',
|
|
83
84
|
alignItems: 'center',
|
|
84
85
|
paddingLeft: "var(--ds-space-150, 12px)",
|
|
85
|
-
|
|
86
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
87
|
+
font: (0, _getEditorUgcToken.default)('editor.font.heading.h1', 'typography-modernized') // use editor h1 modernized here as the style matches
|
|
86
88
|
});
|
|
87
89
|
var mobileMainContent = (0, _react2.css)({
|
|
88
90
|
flex: '1 1 auto',
|
|
@@ -282,51 +284,54 @@ function MobileBrowser(_ref) {
|
|
|
282
284
|
createAnalyticsEvent = _ref.createAnalyticsEvent,
|
|
283
285
|
emptyStateHandler = _ref.emptyStateHandler,
|
|
284
286
|
viewMoreItem = _ref.viewMoreItem;
|
|
285
|
-
return (
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
287
|
+
return (
|
|
288
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
289
|
+
(0, _react2.jsx)("div", {
|
|
290
|
+
css: mobileElementBrowserContainer,
|
|
291
|
+
onKeyDown: onKeyDown,
|
|
292
|
+
"data-testid": "mobile__element-browser"
|
|
293
|
+
}, (0, _react2.jsx)("div", {
|
|
294
|
+
css: showCategories ? [mobileSideBar, mobileSideBarShowCategories] : mobileSideBar
|
|
295
|
+
}, showSearch && (0, _react2.jsx)(_ElementSearch.default, {
|
|
296
|
+
onSearch: onSearch,
|
|
297
|
+
onKeyDown: onKeyPress,
|
|
298
|
+
mode: mode,
|
|
299
|
+
focus: focusOnSearch,
|
|
300
|
+
onClick: setFocusOnSearch,
|
|
301
|
+
searchTerm: searchTerm,
|
|
302
|
+
items: items,
|
|
303
|
+
selectedItemIndex: selectedItemIndex
|
|
304
|
+
}), showCategories && (0, _react2.jsx)("nav", {
|
|
305
|
+
css: mobileCategoryListWrapper,
|
|
306
|
+
tabIndex: -1
|
|
307
|
+
}, (0, _react2.jsx)(_CategoryList.default, {
|
|
308
|
+
categories: categories,
|
|
309
|
+
onSelectCategory: onSelectCategory,
|
|
310
|
+
selectedCategory: selectedCategory,
|
|
311
|
+
focusedCategoryIndex: focusedCategoryIndex,
|
|
312
|
+
setFocusedCategoryIndex: setFocusedCategoryIndex,
|
|
313
|
+
setFocusedItemIndex: setFocusedItemIndex,
|
|
314
|
+
setFocusOnSearch: setFocusOnSearch
|
|
315
|
+
}))), (0, _react2.jsx)("div", {
|
|
316
|
+
css: mobileMainContent
|
|
317
|
+
}, (0, _react2.jsx)(_ElementList.default, {
|
|
318
|
+
items: items,
|
|
319
|
+
mode: mode,
|
|
320
|
+
onInsertItem: onInsertItem,
|
|
321
|
+
selectedItemIndex: selectedItemIndex,
|
|
322
|
+
focusedItemIndex: focusedItemIndex,
|
|
323
|
+
setFocusedItemIndex: setFocusedItemIndex,
|
|
324
|
+
columnCount: columnCount,
|
|
325
|
+
setColumnCount: setColumnCount,
|
|
326
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
327
|
+
emptyStateHandler: emptyStateHandler,
|
|
328
|
+
selectedCategory: selectedCategory,
|
|
329
|
+
searchTerm: searchTerm
|
|
330
|
+
})), viewMoreItem && (0, _react2.jsx)(_ViewMore.ViewMore, {
|
|
331
|
+
item: viewMoreItem,
|
|
332
|
+
focus: focusOnViewMore
|
|
333
|
+
}))
|
|
334
|
+
);
|
|
330
335
|
}
|
|
331
336
|
function DesktopBrowser(_ref2) {
|
|
332
337
|
var showCategories = _ref2.showCategories,
|
|
@@ -358,7 +363,7 @@ function DesktopBrowser(_ref2) {
|
|
|
358
363
|
"data-testid": "desktop__element-browser"
|
|
359
364
|
}, showCategories && (0, _react2.jsx)("div", {
|
|
360
365
|
css: showCategories ? sideBarShowCategories : sideBar
|
|
361
|
-
}, (0, _react2.jsx)("
|
|
366
|
+
}, (0, _react2.jsx)("div", {
|
|
362
367
|
css: sidebarHeading,
|
|
363
368
|
"data-testid": "sidebar-heading",
|
|
364
369
|
id: "sidebar-heading"
|
|
@@ -78,7 +78,7 @@ var buttonLabelStyles = (0, _react2.css)({
|
|
|
78
78
|
'&.remove-nested-left-margin': {
|
|
79
79
|
marginLeft: 0
|
|
80
80
|
},
|
|
81
|
-
fontSize:
|
|
81
|
+
fontSize: "var(--ds-space-200, 16px)",
|
|
82
82
|
fontWeight: "var(--ds-font-weight-regular, 400)"
|
|
83
83
|
});
|
|
84
84
|
var spacerStyles = (0, _react2.css)({
|
|
@@ -86,6 +86,9 @@ var spacerStyles = (0, _react2.css)({
|
|
|
86
86
|
height: '10px'
|
|
87
87
|
});
|
|
88
88
|
var textStyles = (0, _react2.css)({
|
|
89
|
+
// cannot use font.body or editor custom font.body here as line-height need to be 1 (from sharedLabelStyles)
|
|
90
|
+
// cannot use space token as there is not token for 14px
|
|
91
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
89
92
|
fontSize: '14px',
|
|
90
93
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
91
94
|
padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)")
|
|
@@ -147,53 +150,58 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
147
150
|
var iconClassNames = (0, _classnames.default)({
|
|
148
151
|
'hide-icon': isBodiedMacro && !isNodeHovered
|
|
149
152
|
});
|
|
150
|
-
return (
|
|
151
|
-
// eslint-disable-next-line
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
153
|
+
return (
|
|
154
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
155
|
+
(0, _react2.jsx)("div", {
|
|
156
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
157
|
+
css: containerStyles
|
|
158
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
159
|
+
,
|
|
160
|
+
className: containerClassNames
|
|
161
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
162
|
+
,
|
|
163
|
+
style: customContainerStyles
|
|
164
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
165
|
+
,
|
|
166
|
+
onMouseOver: function onMouseOver() {
|
|
167
|
+
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(true);
|
|
168
|
+
},
|
|
169
|
+
onMouseLeave: function onMouseLeave() {
|
|
170
|
+
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(false);
|
|
171
|
+
},
|
|
172
|
+
"data-testid": "new-lozenge-container"
|
|
173
|
+
}, showMacroButtonUpdates ? (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_tooltip.default, {
|
|
174
|
+
content: (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, i18n.configure, {
|
|
175
|
+
values: {
|
|
176
|
+
macroName: text
|
|
177
|
+
}
|
|
178
|
+
})),
|
|
179
|
+
position: "top"
|
|
180
|
+
}, function (tooltipProps) {
|
|
181
|
+
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
182
|
+
"data-testid": "new-lozenge-button"
|
|
183
|
+
}, tooltipProps, {
|
|
184
|
+
css: [sharedLabelStyles, buttonLabelStyles]
|
|
185
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
186
|
+
,
|
|
187
|
+
className: "".concat(sharedLabelClassNames, " ").concat(newButtonLabelClassNames)
|
|
188
|
+
}), text, (0, _react2.jsx)("span", {
|
|
189
|
+
css: iconStyles,
|
|
190
|
+
className: iconClassNames,
|
|
191
|
+
"data-testid": "config-icon"
|
|
192
|
+
}, (0, _react2.jsx)(_preferences.default, {
|
|
193
|
+
label: ""
|
|
194
|
+
})));
|
|
195
|
+
}), (0, _react2.jsx)("div", {
|
|
196
|
+
css: spacerStyles
|
|
197
|
+
})) : (0, _react2.jsx)("span", {
|
|
198
|
+
"data-testid": "new-lozenge",
|
|
199
|
+
css: [sharedLabelStyles, originalLabelStyles]
|
|
178
200
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
179
201
|
,
|
|
180
|
-
className:
|
|
181
|
-
}
|
|
182
|
-
css:
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}, (0, _react2.jsx)(_preferences.default, {
|
|
186
|
-
label: ""
|
|
187
|
-
})));
|
|
188
|
-
}), (0, _react2.jsx)("div", {
|
|
189
|
-
css: spacerStyles
|
|
190
|
-
})) : (0, _react2.jsx)("span", {
|
|
191
|
-
"data-testid": "new-lozenge",
|
|
192
|
-
css: [sharedLabelStyles, originalLabelStyles]
|
|
193
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
194
|
-
,
|
|
195
|
-
className: sharedLabelClassNames
|
|
196
|
-
}, (0, _react2.jsx)("span", {
|
|
197
|
-
css: textStyles
|
|
198
|
-
}, text)));
|
|
202
|
+
className: sharedLabelClassNames
|
|
203
|
+
}, (0, _react2.jsx)("span", {
|
|
204
|
+
css: textStyles
|
|
205
|
+
}, text)))
|
|
206
|
+
);
|
|
199
207
|
};
|
|
@@ -171,26 +171,6 @@ var toolbarInsertBlockMessages = exports.toolbarInsertBlockMessages = (0, _react
|
|
|
171
171
|
defaultMessage: 'Layouts',
|
|
172
172
|
description: 'Create a multi column section or layout'
|
|
173
173
|
},
|
|
174
|
-
twoColumns: {
|
|
175
|
-
id: 'fabric.editor.twoColumns',
|
|
176
|
-
defaultMessage: '2 columns layout',
|
|
177
|
-
description: 'Create a section or layout with two columns'
|
|
178
|
-
},
|
|
179
|
-
threeColumns: {
|
|
180
|
-
id: 'fabric.editor.threeColumns',
|
|
181
|
-
defaultMessage: '3 columns layout',
|
|
182
|
-
description: 'Create a section or layout with three columns'
|
|
183
|
-
},
|
|
184
|
-
fourColumns: {
|
|
185
|
-
id: 'fabric.editor.fourColumns',
|
|
186
|
-
defaultMessage: '4 columns layout',
|
|
187
|
-
description: 'Create a section or layout with four columns'
|
|
188
|
-
},
|
|
189
|
-
fiveColumns: {
|
|
190
|
-
id: 'fabric.editor.fiveColumns',
|
|
191
|
-
defaultMessage: '5 columns layout',
|
|
192
|
-
description: 'Create a section or layout with five columns'
|
|
193
|
-
},
|
|
194
174
|
columnsDescription: {
|
|
195
175
|
id: 'fabric.editor.columns.description',
|
|
196
176
|
defaultMessage: 'Structure your page using sections',
|
|
@@ -21,6 +21,16 @@ var toolbarMessages = exports.toolbarMessages = (0, _reactIntlNext.defineMessage
|
|
|
21
21
|
defaultMessage: 'Three columns layout',
|
|
22
22
|
description: 'Layout with three columns of equal width'
|
|
23
23
|
},
|
|
24
|
+
fourColumns: {
|
|
25
|
+
id: 'fabric.editor.fourColumns',
|
|
26
|
+
defaultMessage: 'Four columns layout',
|
|
27
|
+
description: 'Layout with four columns of equal width'
|
|
28
|
+
},
|
|
29
|
+
fiveColumns: {
|
|
30
|
+
id: 'fabric.editor.fiveColumns',
|
|
31
|
+
defaultMessage: 'Five columns layout',
|
|
32
|
+
description: 'Layout with five columns of equal width'
|
|
33
|
+
},
|
|
24
34
|
rightSidebar: {
|
|
25
35
|
id: 'fabric.editor.rightSidebar',
|
|
26
36
|
defaultMessage: 'Right sidebar layout',
|
|
@@ -45,5 +55,10 @@ var toolbarMessages = exports.toolbarMessages = (0, _reactIntlNext.defineMessage
|
|
|
45
55
|
id: 'fabric.editor.layout.placeholder',
|
|
46
56
|
defaultMessage: 'Add content',
|
|
47
57
|
description: 'Add placeholder text for empty layout'
|
|
58
|
+
},
|
|
59
|
+
columnOption: {
|
|
60
|
+
id: 'fabric.editor.layout.columnOption',
|
|
61
|
+
defaultMessage: '{count, plural, one {-column} other {{count}-columns}}',
|
|
62
|
+
description: 'column option text for layout'
|
|
48
63
|
}
|
|
49
64
|
});
|
|
@@ -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 = "94.
|
|
20
|
+
var packageVersion = "94.3.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
|
|
@@ -14,6 +14,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
16
|
var _reactIntlNext = require("react-intl-next");
|
|
17
|
+
var _primitives = require("@atlaskit/primitives");
|
|
17
18
|
var _messages = require("./messages");
|
|
18
19
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
19
20
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
@@ -26,10 +27,10 @@ var captionWrapperStyle = (0, _react2.css)({
|
|
|
26
27
|
position: 'relative',
|
|
27
28
|
color: "var(--ds-text-subtle, #44546F)"
|
|
28
29
|
});
|
|
29
|
-
var placeholderStyle = (0,
|
|
30
|
-
color:
|
|
30
|
+
var placeholderStyle = (0, _primitives.xcss)({
|
|
31
|
+
color: 'color.text.subtlest',
|
|
31
32
|
position: 'absolute',
|
|
32
|
-
top: 0,
|
|
33
|
+
top: 'space.0',
|
|
33
34
|
width: '100%'
|
|
34
35
|
});
|
|
35
36
|
var CaptionComponent = exports.CaptionComponent = /*#__PURE__*/function (_React$Component) {
|
|
@@ -54,9 +55,9 @@ var CaptionComponent = exports.CaptionComponent = /*#__PURE__*/function (_React$
|
|
|
54
55
|
"data-testid": "media-caption"
|
|
55
56
|
}, dataAttributes, {
|
|
56
57
|
css: captionWrapperStyle
|
|
57
|
-
}), showPlaceholder ? (0, _react2.jsx)(
|
|
58
|
-
|
|
59
|
-
}, formatMessage(_messages.messages.placeholder)) : null, children);
|
|
58
|
+
}), showPlaceholder ? (0, _react2.jsx)(_primitives.Box, {
|
|
59
|
+
xcss: placeholderStyle
|
|
60
|
+
}, (0, _react2.jsx)(_primitives.Text, null, formatMessage(_messages.messages.placeholder))) : null, children);
|
|
60
61
|
}
|
|
61
62
|
}]);
|
|
62
63
|
return CaptionComponent;
|
|
@@ -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 = "94.
|
|
27
|
+
var packageVersion = "94.3.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.Pulse = Pulse;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _onboarding = require("@atlaskit/onboarding");
|
|
10
|
-
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
10
|
/**
|
|
12
11
|
* Wraps children with {@link SpotlightPulse} component.
|
|
13
12
|
*
|
|
@@ -21,7 +20,7 @@ function Pulse(_ref) {
|
|
|
21
20
|
_ref$radius = _ref.radius,
|
|
22
21
|
radius = _ref$radius === void 0 ? 3 : _ref$radius,
|
|
23
22
|
children = _ref.children;
|
|
24
|
-
if (
|
|
23
|
+
if (pulse) {
|
|
25
24
|
return (
|
|
26
25
|
/*#__PURE__*/
|
|
27
26
|
// SpotlightPulse shows pulse effect if `pulse` is `undefined`.
|
|
@@ -28,7 +28,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
28
28
|
var DEFAULT_SAMPLING_RATE = 100;
|
|
29
29
|
var DEFAULT_SLOW_THRESHOLD = 4;
|
|
30
30
|
|
|
31
|
-
// That context was
|
|
31
|
+
// That context was extract from the old WithPluginState from editor-core
|
|
32
32
|
// It was using some private types from
|
|
33
33
|
// - EditorAction: packages/editor/editor-core/src/actions/index.ts
|
|
34
34
|
// - EditorSharedConfig: packages/editor/editor-core/src/labs/next/internal/context/shared-config.tsx
|
|
@@ -14,6 +14,8 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
14
14
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
15
15
|
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
16
16
|
import { ButtonItem } from '@atlaskit/menu';
|
|
17
|
+
import { Stack, Text } from '@atlaskit/primitives';
|
|
18
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
17
19
|
import Tooltip from '@atlaskit/tooltip';
|
|
18
20
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../../analytics';
|
|
19
21
|
import { IconFallback } from '../../../quick-insert';
|
|
@@ -276,8 +278,7 @@ const itemStyleOverrides = {
|
|
|
276
278
|
alignItems: 'flex-start'
|
|
277
279
|
};
|
|
278
280
|
const ElementBefore = /*#__PURE__*/memo(({
|
|
279
|
-
icon
|
|
280
|
-
title
|
|
281
|
+
icon
|
|
281
282
|
}) => jsx("div", {
|
|
282
283
|
css: [itemIcon, itemIconStyle]
|
|
283
284
|
}, icon ? icon() : jsx(IconFallback, null)));
|
|
@@ -285,24 +286,53 @@ const ItemContent = /*#__PURE__*/memo(({
|
|
|
285
286
|
title,
|
|
286
287
|
description,
|
|
287
288
|
keyshortcut
|
|
288
|
-
}) =>
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}, jsx("div", {
|
|
296
|
-
|
|
297
|
-
}, jsx(
|
|
298
|
-
|
|
299
|
-
},
|
|
300
|
-
|
|
301
|
-
},
|
|
302
|
-
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
},
|
|
289
|
+
}) => {
|
|
290
|
+
if (editorExperiment('typography_migration_ugc', true)) {
|
|
291
|
+
return (
|
|
292
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
293
|
+
jsx("div", {
|
|
294
|
+
css: itemBody,
|
|
295
|
+
className: "item-body"
|
|
296
|
+
}, jsx("div", {
|
|
297
|
+
css: itemText
|
|
298
|
+
}, jsx(Stack, {
|
|
299
|
+
space: "space.025"
|
|
300
|
+
}, jsx("div", {
|
|
301
|
+
css: itemTitleWrapper
|
|
302
|
+
}, jsx(Text, {
|
|
303
|
+
maxLines: 1
|
|
304
|
+
}, title), jsx("div", {
|
|
305
|
+
css: itemAfter
|
|
306
|
+
}, keyshortcut && jsx("div", {
|
|
307
|
+
css: shortcutStyle
|
|
308
|
+
}, keyshortcut))), description && jsx(Text, {
|
|
309
|
+
color: "color.text.subtle",
|
|
310
|
+
size: "small",
|
|
311
|
+
maxLines: 2
|
|
312
|
+
}, description))))
|
|
313
|
+
);
|
|
314
|
+
} else {
|
|
315
|
+
return (
|
|
316
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
317
|
+
jsx("div", {
|
|
318
|
+
css: itemBody,
|
|
319
|
+
className: "item-body"
|
|
320
|
+
}, jsx("div", {
|
|
321
|
+
css: itemText
|
|
322
|
+
}, jsx("div", {
|
|
323
|
+
css: itemTitleWrapper
|
|
324
|
+
}, jsx("p", {
|
|
325
|
+
css: itemTitle
|
|
326
|
+
}, title), jsx("div", {
|
|
327
|
+
css: itemAfter
|
|
328
|
+
}, keyshortcut && jsx("div", {
|
|
329
|
+
css: shortcutStyle
|
|
330
|
+
}, keyshortcut))), description && jsx("p", {
|
|
331
|
+
css: itemDescription
|
|
332
|
+
}, description)))
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
});
|
|
306
336
|
const elementItemsWrapper = css({
|
|
307
337
|
flex: 1,
|
|
308
338
|
flexFlow: 'row wrap',
|