@atlaskit/editor-common 94.3.0 → 94.4.0
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/analytics/types/node-events.js +2 -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/monitoring/error.js +1 -1
- package/dist/cjs/styles/index.js +6 -0
- package/dist/cjs/styles/shared/embedCard.js +45 -18
- package/dist/cjs/styles/shared/media-single.js +49 -2
- package/dist/cjs/ui/Caption/index.js +7 -6
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/analytics/types/node-events.js +2 -0
- 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/monitoring/error.js +1 -1
- package/dist/es2019/styles/index.js +1 -1
- package/dist/es2019/styles/shared/embedCard.js +26 -1
- package/dist/es2019/styles/shared/media-single.js +68 -1
- package/dist/es2019/ui/Caption/index.js +7 -6
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/analytics/types/node-events.js +2 -0
- 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/monitoring/error.js +1 -1
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/styles/shared/embedCard.js +45 -18
- package/dist/esm/styles/shared/media-single.js +49 -2
- package/dist/esm/ui/Caption/index.js +7 -6
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/node-events.d.ts +6 -4
- package/dist/types/styles/index.d.ts +1 -1
- package/dist/types/styles/shared/embedCard.d.ts +1 -1
- package/dist/types/styles/shared/media-single.d.ts +2 -1
- package/dist/types/ui-menu/ColorPickerButton/index.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/node-events.d.ts +6 -4
- package/dist/types-ts4.5/styles/index.d.ts +1 -1
- package/dist/types-ts4.5/styles/shared/embedCard.d.ts +1 -1
- package/dist/types-ts4.5/styles/shared/media-single.d.ts +2 -1
- package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +1 -1
- package/package.json +8 -5
|
@@ -17,6 +17,8 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
17
17
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
18
18
|
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
19
19
|
import { ButtonItem } from '@atlaskit/menu';
|
|
20
|
+
import { Stack, Text } from '@atlaskit/primitives';
|
|
21
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
20
22
|
import Tooltip from '@atlaskit/tooltip';
|
|
21
23
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../../analytics';
|
|
22
24
|
import { IconFallback } from '../../../quick-insert';
|
|
@@ -280,8 +282,7 @@ var itemStyleOverrides = {
|
|
|
280
282
|
alignItems: 'flex-start'
|
|
281
283
|
};
|
|
282
284
|
var ElementBefore = /*#__PURE__*/memo(function (_ref6) {
|
|
283
|
-
var icon = _ref6.icon
|
|
284
|
-
title = _ref6.title;
|
|
285
|
+
var icon = _ref6.icon;
|
|
285
286
|
return jsx("div", {
|
|
286
287
|
css: [itemIcon, itemIconStyle]
|
|
287
288
|
}, icon ? icon() : jsx(IconFallback, null));
|
|
@@ -290,25 +291,51 @@ var ItemContent = /*#__PURE__*/memo(function (_ref7) {
|
|
|
290
291
|
var title = _ref7.title,
|
|
291
292
|
description = _ref7.description,
|
|
292
293
|
keyshortcut = _ref7.keyshortcut;
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
294
|
+
if (editorExperiment('typography_migration_ugc', true)) {
|
|
295
|
+
return (
|
|
296
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
297
|
+
jsx("div", {
|
|
298
|
+
css: itemBody,
|
|
299
|
+
className: "item-body"
|
|
300
|
+
}, jsx("div", {
|
|
301
|
+
css: itemText
|
|
302
|
+
}, jsx(Stack, {
|
|
303
|
+
space: "space.025"
|
|
304
|
+
}, jsx("div", {
|
|
305
|
+
css: itemTitleWrapper
|
|
306
|
+
}, jsx(Text, {
|
|
307
|
+
maxLines: 1
|
|
308
|
+
}, title), jsx("div", {
|
|
309
|
+
css: itemAfter
|
|
310
|
+
}, keyshortcut && jsx("div", {
|
|
311
|
+
css: shortcutStyle
|
|
312
|
+
}, keyshortcut))), description && jsx(Text, {
|
|
313
|
+
color: "color.text.subtle",
|
|
314
|
+
size: "small",
|
|
315
|
+
maxLines: 2
|
|
316
|
+
}, description))))
|
|
317
|
+
);
|
|
318
|
+
} else {
|
|
319
|
+
return (
|
|
320
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
321
|
+
jsx("div", {
|
|
322
|
+
css: itemBody,
|
|
323
|
+
className: "item-body"
|
|
324
|
+
}, jsx("div", {
|
|
325
|
+
css: itemText
|
|
326
|
+
}, jsx("div", {
|
|
327
|
+
css: itemTitleWrapper
|
|
328
|
+
}, jsx("p", {
|
|
329
|
+
css: itemTitle
|
|
330
|
+
}, title), jsx("div", {
|
|
331
|
+
css: itemAfter
|
|
332
|
+
}, keyshortcut && jsx("div", {
|
|
333
|
+
css: shortcutStyle
|
|
334
|
+
}, keyshortcut))), description && jsx("p", {
|
|
335
|
+
css: itemDescription
|
|
336
|
+
}, description)))
|
|
337
|
+
);
|
|
338
|
+
}
|
|
312
339
|
});
|
|
313
340
|
var elementItemsWrapper = css({
|
|
314
341
|
flex: 1,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
8
|
import { LinkButton } from '@atlaskit/button/new';
|
|
9
|
-
import { Box, xcss } from '@atlaskit/primitives';
|
|
9
|
+
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
10
10
|
import NotFoundIllustration from './NotFoundIllustration';
|
|
11
11
|
export default function EmptyState(_ref) {
|
|
12
12
|
var onExternalLinkClick = _ref.onExternalLinkClick;
|
|
@@ -21,7 +21,7 @@ export default function EmptyState(_ref) {
|
|
|
21
21
|
description: "Empty state heading"
|
|
22
22
|
})), jsx("div", {
|
|
23
23
|
css: emptyStateSubHeading
|
|
24
|
-
}, jsx(
|
|
24
|
+
}, jsx(Text, null, jsx(FormattedMessage, {
|
|
25
25
|
id: "fabric.editor.elementbrowser.search.empty-state.sub-heading",
|
|
26
26
|
defaultMessage: "Try searching with a different term or discover new apps for Atlassian products.",
|
|
27
27
|
description: "Empty state sub-heading"
|
|
@@ -12,6 +12,7 @@ import { FormattedMessage } from 'react-intl-next';
|
|
|
12
12
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../analytics';
|
|
15
|
+
import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
|
|
15
16
|
import { DEVICE_BREAKPOINT_NUMBERS, ELEMENT_BROWSER_ID, GRID_SIZE, INLINE_SIDEBAR_HEIGHT, SIDEBAR_HEADING_WRAPPER_HEIGHT, SIDEBAR_WIDTH } from '../constants';
|
|
16
17
|
import useContainerWidth from '../hooks/use-container-width';
|
|
17
18
|
import useSelectAndFocusOnArrowNavigation from '../hooks/use-select-and-focus-on-arrow-navigation';
|
|
@@ -71,7 +72,8 @@ var sidebarHeading = css({
|
|
|
71
72
|
display: 'inline-flex',
|
|
72
73
|
alignItems: 'center',
|
|
73
74
|
paddingLeft: "var(--ds-space-150, 12px)",
|
|
74
|
-
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
76
|
+
font: editorUGCToken('editor.font.heading.h1', 'typography-modernized') // use editor h1 modernized here as the style matches
|
|
75
77
|
});
|
|
76
78
|
var mobileMainContent = css({
|
|
77
79
|
flex: '1 1 auto',
|
|
@@ -271,51 +273,54 @@ function MobileBrowser(_ref) {
|
|
|
271
273
|
createAnalyticsEvent = _ref.createAnalyticsEvent,
|
|
272
274
|
emptyStateHandler = _ref.emptyStateHandler,
|
|
273
275
|
viewMoreItem = _ref.viewMoreItem;
|
|
274
|
-
return
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
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
|
-
|
|
276
|
+
return (
|
|
277
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
278
|
+
jsx("div", {
|
|
279
|
+
css: mobileElementBrowserContainer,
|
|
280
|
+
onKeyDown: onKeyDown,
|
|
281
|
+
"data-testid": "mobile__element-browser"
|
|
282
|
+
}, jsx("div", {
|
|
283
|
+
css: showCategories ? [mobileSideBar, mobileSideBarShowCategories] : mobileSideBar
|
|
284
|
+
}, showSearch && jsx(ElementSearch, {
|
|
285
|
+
onSearch: onSearch,
|
|
286
|
+
onKeyDown: onKeyPress,
|
|
287
|
+
mode: mode,
|
|
288
|
+
focus: focusOnSearch,
|
|
289
|
+
onClick: setFocusOnSearch,
|
|
290
|
+
searchTerm: searchTerm,
|
|
291
|
+
items: items,
|
|
292
|
+
selectedItemIndex: selectedItemIndex
|
|
293
|
+
}), showCategories && jsx("nav", {
|
|
294
|
+
css: mobileCategoryListWrapper,
|
|
295
|
+
tabIndex: -1
|
|
296
|
+
}, jsx(CategoryList, {
|
|
297
|
+
categories: categories,
|
|
298
|
+
onSelectCategory: onSelectCategory,
|
|
299
|
+
selectedCategory: selectedCategory,
|
|
300
|
+
focusedCategoryIndex: focusedCategoryIndex,
|
|
301
|
+
setFocusedCategoryIndex: setFocusedCategoryIndex,
|
|
302
|
+
setFocusedItemIndex: setFocusedItemIndex,
|
|
303
|
+
setFocusOnSearch: setFocusOnSearch
|
|
304
|
+
}))), jsx("div", {
|
|
305
|
+
css: mobileMainContent
|
|
306
|
+
}, jsx(ElementList, {
|
|
307
|
+
items: items,
|
|
308
|
+
mode: mode,
|
|
309
|
+
onInsertItem: onInsertItem,
|
|
310
|
+
selectedItemIndex: selectedItemIndex,
|
|
311
|
+
focusedItemIndex: focusedItemIndex,
|
|
312
|
+
setFocusedItemIndex: setFocusedItemIndex,
|
|
313
|
+
columnCount: columnCount,
|
|
314
|
+
setColumnCount: setColumnCount,
|
|
315
|
+
createAnalyticsEvent: createAnalyticsEvent,
|
|
316
|
+
emptyStateHandler: emptyStateHandler,
|
|
317
|
+
selectedCategory: selectedCategory,
|
|
318
|
+
searchTerm: searchTerm
|
|
319
|
+
})), viewMoreItem && jsx(ViewMore, {
|
|
320
|
+
item: viewMoreItem,
|
|
321
|
+
focus: focusOnViewMore
|
|
322
|
+
}))
|
|
323
|
+
);
|
|
319
324
|
}
|
|
320
325
|
function DesktopBrowser(_ref2) {
|
|
321
326
|
var showCategories = _ref2.showCategories,
|
|
@@ -347,7 +352,7 @@ function DesktopBrowser(_ref2) {
|
|
|
347
352
|
"data-testid": "desktop__element-browser"
|
|
348
353
|
}, showCategories && jsx("div", {
|
|
349
354
|
css: showCategories ? sideBarShowCategories : sideBar
|
|
350
|
-
}, jsx("
|
|
355
|
+
}, jsx("div", {
|
|
351
356
|
css: sidebarHeading,
|
|
352
357
|
"data-testid": "sidebar-heading",
|
|
353
358
|
id: "sidebar-heading"
|
|
@@ -69,7 +69,7 @@ var buttonLabelStyles = css({
|
|
|
69
69
|
'&.remove-nested-left-margin': {
|
|
70
70
|
marginLeft: 0
|
|
71
71
|
},
|
|
72
|
-
fontSize:
|
|
72
|
+
fontSize: "var(--ds-space-200, 16px)",
|
|
73
73
|
fontWeight: "var(--ds-font-weight-regular, 400)"
|
|
74
74
|
});
|
|
75
75
|
var spacerStyles = css({
|
|
@@ -77,6 +77,9 @@ var spacerStyles = css({
|
|
|
77
77
|
height: '10px'
|
|
78
78
|
});
|
|
79
79
|
var textStyles = css({
|
|
80
|
+
// cannot use font.body or editor custom font.body here as line-height need to be 1 (from sharedLabelStyles)
|
|
81
|
+
// cannot use space token as there is not token for 14px
|
|
82
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
80
83
|
fontSize: '14px',
|
|
81
84
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
82
85
|
padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)")
|
|
@@ -138,53 +141,58 @@ export var ExtensionLabel = function ExtensionLabel(_ref) {
|
|
|
138
141
|
var iconClassNames = classnames({
|
|
139
142
|
'hide-icon': isBodiedMacro && !isNodeHovered
|
|
140
143
|
});
|
|
141
|
-
return
|
|
142
|
-
// eslint-disable-next-line
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
144
|
+
return (
|
|
145
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
146
|
+
jsx("div", {
|
|
147
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
148
|
+
css: containerStyles
|
|
149
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
150
|
+
,
|
|
151
|
+
className: containerClassNames
|
|
152
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
153
|
+
,
|
|
154
|
+
style: customContainerStyles
|
|
155
|
+
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
156
|
+
,
|
|
157
|
+
onMouseOver: function onMouseOver() {
|
|
158
|
+
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(true);
|
|
159
|
+
},
|
|
160
|
+
onMouseLeave: function onMouseLeave() {
|
|
161
|
+
setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(false);
|
|
162
|
+
},
|
|
163
|
+
"data-testid": "new-lozenge-container"
|
|
164
|
+
}, showMacroButtonUpdates ? jsx(Fragment, null, jsx(Tooltip, {
|
|
165
|
+
content: jsx(FormattedMessage, _extends({}, i18n.configure, {
|
|
166
|
+
values: {
|
|
167
|
+
macroName: text
|
|
168
|
+
}
|
|
169
|
+
})),
|
|
170
|
+
position: "top"
|
|
171
|
+
}, function (tooltipProps) {
|
|
172
|
+
return jsx("span", _extends({
|
|
173
|
+
"data-testid": "new-lozenge-button"
|
|
174
|
+
}, tooltipProps, {
|
|
175
|
+
css: [sharedLabelStyles, buttonLabelStyles]
|
|
176
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
177
|
+
,
|
|
178
|
+
className: "".concat(sharedLabelClassNames, " ").concat(newButtonLabelClassNames)
|
|
179
|
+
}), text, jsx("span", {
|
|
180
|
+
css: iconStyles,
|
|
181
|
+
className: iconClassNames,
|
|
182
|
+
"data-testid": "config-icon"
|
|
183
|
+
}, jsx(PreferencesIcon, {
|
|
184
|
+
label: ""
|
|
185
|
+
})));
|
|
186
|
+
}), jsx("div", {
|
|
187
|
+
css: spacerStyles
|
|
188
|
+
})) : jsx("span", {
|
|
189
|
+
"data-testid": "new-lozenge",
|
|
190
|
+
css: [sharedLabelStyles, originalLabelStyles]
|
|
169
191
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
170
192
|
,
|
|
171
|
-
className:
|
|
172
|
-
}
|
|
173
|
-
css:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}, jsx(PreferencesIcon, {
|
|
177
|
-
label: ""
|
|
178
|
-
})));
|
|
179
|
-
}), jsx("div", {
|
|
180
|
-
css: spacerStyles
|
|
181
|
-
})) : jsx("span", {
|
|
182
|
-
"data-testid": "new-lozenge",
|
|
183
|
-
css: [sharedLabelStyles, originalLabelStyles]
|
|
184
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
185
|
-
,
|
|
186
|
-
className: sharedLabelClassNames
|
|
187
|
-
}, jsx("span", {
|
|
188
|
-
css: textStyles
|
|
189
|
-
}, text)));
|
|
193
|
+
className: sharedLabelClassNames
|
|
194
|
+
}, jsx("span", {
|
|
195
|
+
css: textStyles
|
|
196
|
+
}, text)))
|
|
197
|
+
);
|
|
190
198
|
};
|
|
@@ -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 = "94.
|
|
10
|
+
var packageVersion = "94.4.0";
|
|
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
|
package/dist/esm/styles/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export { backgroundColorStyles } from './shared/background-color';
|
|
|
3
3
|
export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl } from './shared/table';
|
|
4
4
|
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
|
|
5
5
|
export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
6
|
-
export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
|
|
6
|
+
export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName } from './shared/media-single';
|
|
7
7
|
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
8
8
|
export { headingsSharedStyles } from './shared/headings';
|
|
9
9
|
export { ruleSharedStyles } from './shared/rule';
|
|
@@ -1,27 +1,54 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
+
import { akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
|
-
export var embedCardStyles =
|
|
5
|
-
|
|
6
|
-
'.ProseMirror': {
|
|
6
|
+
export var embedCardStyles = function embedCardStyles() {
|
|
7
|
+
return fg('platform_editor_element_dnd_nested_fix_patch_3') ? css({
|
|
7
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
'.ProseMirror': {
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
11
|
+
".embedCardView-content-wrap[layout^='wrap-']": {
|
|
12
|
+
maxWidth: '100%',
|
|
13
|
+
position: 'relative',
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
15
|
+
zIndex: akEditorWrappedNodeZIndex
|
|
16
|
+
},
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
18
|
+
".embedCardView-content-wrap[layout='wrap-left']": {
|
|
19
|
+
float: 'left'
|
|
20
|
+
},
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
22
|
+
".embedCardView-content-wrap[layout='wrap-right']": {
|
|
23
|
+
float: 'right'
|
|
24
|
+
},
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
26
|
+
".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
|
|
27
|
+
clear: 'both'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}) : css({
|
|
19
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
|
-
|
|
21
|
-
|
|
32
|
+
'.ProseMirror': {
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
34
|
+
".embedCardView-content-wrap[layout^='wrap-']": {
|
|
35
|
+
maxWidth: '100%'
|
|
36
|
+
},
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
38
|
+
".embedCardView-content-wrap[layout='wrap-left']": {
|
|
39
|
+
float: 'left'
|
|
40
|
+
},
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
42
|
+
".embedCardView-content-wrap[layout='wrap-right']": {
|
|
43
|
+
float: 'right'
|
|
44
|
+
},
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
46
|
+
".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
|
|
47
|
+
clear: 'both'
|
|
48
|
+
}
|
|
22
49
|
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
50
|
+
});
|
|
51
|
+
};
|
|
25
52
|
|
|
26
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
27
54
|
export var embedSpacingStyles = css({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
var _css;
|
|
2
|
+
var _css, _css2;
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
|
+
import { akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
|
|
5
6
|
var richMediaClassName = 'rich-media-item';
|
|
6
7
|
var wrappedMediaBreakoutPoint = 410;
|
|
7
8
|
var mediaSingleSharedStyle = css((_css = {}, _defineProperty(_css, "li .".concat(richMediaClassName), {
|
|
@@ -46,6 +47,52 @@ var mediaSingleSharedStyle = css((_css = {}, _defineProperty(_css, "li .".concat
|
|
|
46
47
|
margin: "var(--ds-space-150, 12px)".concat(" 0")
|
|
47
48
|
}
|
|
48
49
|
}), _css));
|
|
50
|
+
var mediaSingleSharedStyleNew = css((_css2 = {}, _defineProperty(_css2, "li .".concat(richMediaClassName), {
|
|
51
|
+
margin: 0
|
|
52
|
+
}), _defineProperty(_css2, '&.ua-chrome li > .mediaSingleView-content-wrap::before', {
|
|
53
|
+
content: "''",
|
|
54
|
+
display: 'block',
|
|
55
|
+
height: 0
|
|
56
|
+
}), _defineProperty(_css2, '&.ua-firefox', {
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
58
|
+
'.mediaSingleView-content-wrap': {
|
|
59
|
+
userSelect: 'none'
|
|
60
|
+
},
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
62
|
+
'.captionView-content-wrap': {
|
|
63
|
+
userSelect: 'text'
|
|
64
|
+
}
|
|
65
|
+
}), _defineProperty(_css2, ".mediaSingleView-content-wrap[layout^='wrap-']", {
|
|
66
|
+
position: 'relative',
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
|
|
68
|
+
zIndex: akEditorWrappedNodeZIndex
|
|
69
|
+
}), _defineProperty(_css2, ".mediaSingleView-content-wrap[layout='center']", {
|
|
70
|
+
clear: 'both'
|
|
71
|
+
}), _defineProperty(_css2, "table .".concat(richMediaClassName), {
|
|
72
|
+
marginTop: "var(--ds-space-150, 12px)",
|
|
73
|
+
marginBottom: "var(--ds-space-150, 12px)",
|
|
74
|
+
clear: 'both',
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
76
|
+
'&.image-wrap-left[data-layout], &.image-wrap-right[data-layout]': {
|
|
77
|
+
clear: 'none',
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
79
|
+
'&:first-child': {
|
|
80
|
+
marginTop: "var(--ds-space-150, 12px)"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}), _defineProperty(_css2, ".".concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-left"), {
|
|
84
|
+
clear: 'both'
|
|
85
|
+
}), _defineProperty(_css2, ".".concat(richMediaClassName, ".image-wrap-left + .").concat(richMediaClassName, ".image-wrap-right, .").concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-left, .").concat(richMediaClassName, ".image-wrap-left + .").concat(richMediaClassName, ".image-wrap-left, .").concat(richMediaClassName, ".image-wrap-right + .").concat(richMediaClassName, ".image-wrap-right"), {
|
|
86
|
+
marginRight: 0,
|
|
87
|
+
marginLeft: 0
|
|
88
|
+
}), _defineProperty(_css2, "@media all and (max-width: ".concat(wrappedMediaBreakoutPoint, "px)"), {
|
|
89
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
90
|
+
"div.mediaSingleView-content-wrap[layout='wrap-left'], div.mediaSingleView-content-wrap[data-layout='wrap-left'], div.mediaSingleView-content-wrap[layout='wrap-right'], div.mediaSingleView-content-wrap[data-layout='wrap-right']": {
|
|
91
|
+
float: 'none',
|
|
92
|
+
overflow: 'auto',
|
|
93
|
+
margin: "var(--ds-space-150, 12px)".concat(" 0")
|
|
94
|
+
}
|
|
95
|
+
}), _css2));
|
|
49
96
|
|
|
50
97
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
51
|
-
export { mediaSingleSharedStyle, richMediaClassName };
|
|
98
|
+
export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName };
|
|
@@ -15,6 +15,7 @@ import React from 'react';
|
|
|
15
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
16
|
import { css, jsx } from '@emotion/react';
|
|
17
17
|
import { injectIntl } from 'react-intl-next';
|
|
18
|
+
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
18
19
|
import { messages } from './messages';
|
|
19
20
|
var captionWrapperStyle = css({
|
|
20
21
|
marginTop: "var(--ds-space-100, 8px)",
|
|
@@ -22,10 +23,10 @@ var captionWrapperStyle = css({
|
|
|
22
23
|
position: 'relative',
|
|
23
24
|
color: "var(--ds-text-subtle, #44546F)"
|
|
24
25
|
});
|
|
25
|
-
var placeholderStyle =
|
|
26
|
-
color:
|
|
26
|
+
var placeholderStyle = xcss({
|
|
27
|
+
color: 'color.text.subtlest',
|
|
27
28
|
position: 'absolute',
|
|
28
|
-
top: 0,
|
|
29
|
+
top: 'space.0',
|
|
29
30
|
width: '100%'
|
|
30
31
|
});
|
|
31
32
|
export var CaptionComponent = /*#__PURE__*/function (_React$Component) {
|
|
@@ -50,9 +51,9 @@ export var CaptionComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
50
51
|
"data-testid": "media-caption"
|
|
51
52
|
}, dataAttributes, {
|
|
52
53
|
css: captionWrapperStyle
|
|
53
|
-
}), showPlaceholder ? jsx(
|
|
54
|
-
|
|
55
|
-
}, formatMessage(messages.placeholder)) : null, children);
|
|
54
|
+
}), showPlaceholder ? jsx(Box, {
|
|
55
|
+
xcss: placeholderStyle
|
|
56
|
+
}, jsx(Text, null, formatMessage(messages.placeholder))) : null, children);
|
|
56
57
|
}
|
|
57
58
|
}]);
|
|
58
59
|
return CaptionComponent;
|
|
@@ -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 = "94.
|
|
24
|
+
var packageVersion = "94.4.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -7,7 +7,9 @@ export declare enum LAYOUT_TYPE {
|
|
|
7
7
|
THREE_COLS_EQUAL = "threeColumnsEqual",
|
|
8
8
|
LEFT_SIDEBAR = "twoColumnsLeftSidebar",
|
|
9
9
|
RIGHT_SIDEBAR = "twoColumnsRightSidebar",
|
|
10
|
-
THREE_WITH_SIDEBARS = "threeColumnsWithSidebars "
|
|
10
|
+
THREE_WITH_SIDEBARS = "threeColumnsWithSidebars ",
|
|
11
|
+
FOUR_COLS_EQUAL = "fourColumnsEqual",
|
|
12
|
+
FIVE_COLS_EQUAL = "fiveColumnsEqual"
|
|
11
13
|
}
|
|
12
14
|
export declare enum SMART_LINK_TYPE {
|
|
13
15
|
INLINE_CARD = "inline",
|
|
@@ -36,11 +38,11 @@ type DeletedSmartLink = TrackAEP<ACTION.DELETED, ACTION_SUBJECT.SMART_LINK, ACTI
|
|
|
36
38
|
displayMode: ACTION_SUBJECT_ID.CARD_BLOCK | ACTION_SUBJECT_ID.CARD_INLINE;
|
|
37
39
|
}, undefined>;
|
|
38
40
|
type ChangedLayoutAEP = TrackAEP<ACTION.CHANGED_LAYOUT, ACTION_SUBJECT.LAYOUT, undefined, {
|
|
39
|
-
previousLayout
|
|
40
|
-
newLayout
|
|
41
|
+
previousLayout?: LAYOUT_TYPE;
|
|
42
|
+
newLayout?: LAYOUT_TYPE;
|
|
41
43
|
}, undefined>;
|
|
42
44
|
type DeletedLayoutAEP = TrackAEP<ACTION.DELETED, ACTION_SUBJECT.LAYOUT, undefined, {
|
|
43
|
-
layout
|
|
45
|
+
layout?: LAYOUT_TYPE;
|
|
44
46
|
}, undefined>;
|
|
45
47
|
type DeletedExpandAEP = TrackAEP<ACTION.DELETED, ACTION_SUBJECT.EXPAND | ACTION_SUBJECT.NESTED_EXPAND, undefined, {
|
|
46
48
|
inputMethod: INPUT_METHOD.TOOLBAR;
|
|
@@ -3,7 +3,7 @@ export { backgroundColorStyles } from './shared/background-color';
|
|
|
3
3
|
export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl, } from './shared/table';
|
|
4
4
|
export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, } from './shared/annotation';
|
|
5
5
|
export { columnLayoutSharedStyle } from './shared/column-layout';
|
|
6
|
-
export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
|
|
6
|
+
export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName, } from './shared/media-single';
|
|
7
7
|
export { blockquoteSharedStyles } from './shared/blockquote';
|
|
8
8
|
export { headingsSharedStyles } from './shared/headings';
|
|
9
9
|
export { ruleSharedStyles } from './shared/rule';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const embedCardStyles: import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const embedCardStyles: () => import("@emotion/react").SerializedStyles;
|
|
2
2
|
export declare const embedSpacingStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
declare const richMediaClassName = "rich-media-item";
|
|
2
2
|
declare const mediaSingleSharedStyle: import("@emotion/react").SerializedStyles;
|
|
3
|
-
|
|
3
|
+
declare const mediaSingleSharedStyleNew: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export { mediaSingleSharedStyle, mediaSingleSharedStyleNew, richMediaClassName };
|
|
@@ -30,5 +30,5 @@ declare const _default: React.ForwardRefExoticComponent<Pick<Omit<{
|
|
|
30
30
|
skipFocusButtonAfterPick?: boolean | undefined;
|
|
31
31
|
absoluteOffset?: PopupPosition | undefined;
|
|
32
32
|
returnEscToButton?: boolean | undefined;
|
|
33
|
-
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "size" | "currentColor" | "onChange" | "title" | "key" | "
|
|
33
|
+
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "size" | "currentColor" | "onChange" | "title" | "key" | "cols" | "placement" | "alignX" | "absoluteOffset" | "analyticsContext" | "isAriaExpanded" | "returnEscToButton" | "hexToPaletteColor" | "paletteColorTooltipMessages" | "colorPalette" | "mountPoint" | "setDisableParentScroll" | "skipFocusButtonAfterPick"> & React.RefAttributes<any>>;
|
|
34
34
|
export default _default;
|