@atlaskit/editor-core 187.41.3 → 187.41.5
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 +38 -18
- package/dist/cjs/create-editor/feature-flags-from-props.js +2 -3
- package/dist/cjs/plugins/collab-edit/ui/styles.js +2 -2
- package/dist/cjs/plugins/date/nodeviews/date.js +6 -1
- package/dist/cjs/plugins/extension/index.js +35 -9
- package/dist/cjs/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +8 -15
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +7 -18
- package/dist/cjs/plugins/media/styles.js +1 -1
- package/dist/cjs/plugins/media/toolbar/commands.js +63 -25
- package/dist/cjs/plugins/media/toolbar/index.js +13 -18
- package/dist/cjs/plugins/media/ui/ImageBorder/index.js +1 -3
- package/dist/cjs/plugins/media/ui/PixelEntry/index.js +6 -5
- package/dist/cjs/plugins/media/utils/analytics.js +1 -1
- package/dist/cjs/plugins/paste/handlers.js +2 -1
- package/dist/cjs/plugins/text-color/index.js +2 -6
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +2 -5
- package/dist/cjs/ui/ColorPickerButton/index.js +3 -4
- package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +1 -11
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/feature-flags-from-props.js +2 -3
- package/dist/es2019/plugins/collab-edit/ui/styles.js +2 -2
- package/dist/es2019/plugins/date/nodeviews/date.js +6 -1
- package/dist/es2019/plugins/extension/index.js +30 -4
- package/dist/es2019/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +8 -15
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +3 -15
- package/dist/es2019/plugins/media/styles.js +3 -5
- package/dist/es2019/plugins/media/toolbar/commands.js +31 -1
- package/dist/es2019/plugins/media/toolbar/index.js +14 -20
- package/dist/es2019/plugins/media/ui/ImageBorder/index.js +1 -3
- package/dist/es2019/plugins/media/ui/PixelEntry/index.js +6 -5
- package/dist/es2019/plugins/media/utils/analytics.js +1 -1
- package/dist/es2019/plugins/paste/handlers.js +2 -1
- package/dist/es2019/plugins/text-color/index.js +2 -6
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +2 -7
- package/dist/es2019/ui/ColorPickerButton/index.js +2 -3
- package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +1 -11
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/feature-flags-from-props.js +2 -3
- package/dist/esm/plugins/collab-edit/ui/styles.js +2 -2
- package/dist/esm/plugins/date/nodeviews/date.js +6 -1
- package/dist/esm/plugins/extension/index.js +35 -9
- package/dist/esm/plugins/floating-toolbar/ui/ExtensionsPlaceholder.js +8 -15
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +7 -18
- package/dist/esm/plugins/media/styles.js +1 -1
- package/dist/esm/plugins/media/toolbar/commands.js +37 -1
- package/dist/esm/plugins/media/toolbar/index.js +14 -19
- package/dist/esm/plugins/media/ui/ImageBorder/index.js +1 -3
- package/dist/esm/plugins/media/ui/PixelEntry/index.js +6 -5
- package/dist/esm/plugins/media/utils/analytics.js +1 -1
- package/dist/esm/plugins/paste/handlers.js +2 -1
- package/dist/esm/plugins/text-color/index.js +2 -6
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +2 -5
- package/dist/esm/ui/ColorPickerButton/index.js +3 -4
- package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +1 -11
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/labs/next/presets/default.d.ts +44 -2
- package/dist/types/plugins/floating-toolbar/ui/ExtensionsPlaceholder.d.ts +2 -0
- package/dist/types/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
- package/dist/types/plugins/media/toolbar/commands.d.ts +3 -1
- package/dist/types/plugins/media/ui/ImageBorder/index.d.ts +3 -4
- package/dist/types/plugins/media/ui/PixelEntry/types.d.ts +2 -0
- package/dist/types/plugins/text-color/index.d.ts +1 -2
- package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +0 -2
- package/dist/types/ui/ColorPickerButton/index.d.ts +1 -2
- package/dist/types/ui/ConfigPanel/Fields/Expand.d.ts +2 -2
- package/dist/types-ts4.5/labs/next/presets/default.d.ts +54 -0
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/ExtensionsPlaceholder.d.ts +2 -0
- package/dist/types-ts4.5/plugins/floating-toolbar/ui/Toolbar.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/toolbar/commands.d.ts +3 -1
- package/dist/types-ts4.5/plugins/media/ui/ImageBorder/index.d.ts +3 -4
- package/dist/types-ts4.5/plugins/media/ui/PixelEntry/types.d.ts +2 -0
- package/dist/types-ts4.5/plugins/text-color/index.d.ts +0 -2
- package/dist/types-ts4.5/plugins/text-color/ui/ToolbarTextColor/index.d.ts +0 -2
- package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/ConfigPanel/Fields/Expand.d.ts +2 -2
- package/package.json +6 -6
|
@@ -20,7 +20,7 @@ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
|
20
20
|
import { FilePreviewItem } from './filePreviewItem';
|
|
21
21
|
import { downloadMedia, getSelectedMediaSingle, removeMediaGroupNode, getPixelWidthOfElement, calcNewLayout, getMaxToolbarWidth } from './utils';
|
|
22
22
|
import { isVideo } from '../utils/media-single';
|
|
23
|
-
import { changeInlineToMediaCard, changeMediaCardToInline, removeInlineCard, setBorderMark, toggleBorderMark } from './commands';
|
|
23
|
+
import { changeInlineToMediaCard, changeMediaCardToInline, removeInlineCard, setBorderMark, toggleBorderMark, updateMediaSingleWidth } from './commands';
|
|
24
24
|
import { MediaInlineNodeSelector, MediaSingleNodeSelector } from '../nodeviews/styles';
|
|
25
25
|
import ImageBorderItem from '../ui/ImageBorder';
|
|
26
26
|
import { currentMediaNodeBorderMark } from '../utils/current-media-node';
|
|
@@ -229,7 +229,6 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
229
229
|
var _pluginInjectionApi$a2;
|
|
230
230
|
setBorderMark(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a2 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.actions)(attrs)(state, dispatch);
|
|
231
231
|
},
|
|
232
|
-
showSomewhatSemanticTooltips: getEditorFeatureFlags === null || getEditorFeatureFlags === void 0 ? void 0 : getEditorFeatureFlags().useSomewhatSemanticTextColorNames,
|
|
233
232
|
borderMark: borderMark,
|
|
234
233
|
intl: intl
|
|
235
234
|
});
|
|
@@ -318,17 +317,12 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
318
317
|
}
|
|
319
318
|
},
|
|
320
319
|
onSubmit: ({
|
|
321
|
-
width
|
|
320
|
+
width,
|
|
321
|
+
validation
|
|
322
322
|
}) => {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
widthType: 'pixel',
|
|
327
|
-
layout: calcNewLayout(width, layout, contentWidth, options.fullWidthEnabled)
|
|
328
|
-
});
|
|
329
|
-
tr.setMeta('scrollIntoView', false);
|
|
330
|
-
tr.setSelection(NodeSelection.create(tr.doc, selectedMediaSingleNode.pos));
|
|
331
|
-
dispatch(tr);
|
|
323
|
+
var _pluginInjectionApi$a4;
|
|
324
|
+
const newLayout = calcNewLayout(width, layout, contentWidth, options.fullWidthEnabled);
|
|
325
|
+
updateMediaSingleWidth(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a4 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a4 === void 0 ? void 0 : _pluginInjectionApi$a4.actions)(width, validation, newLayout)(state, dispatch);
|
|
332
326
|
},
|
|
333
327
|
onMigrate: () => {
|
|
334
328
|
const tr = state.tr.setNodeMarkup(selectedMediaSingleNode.pos, undefined, {
|
|
@@ -388,14 +382,14 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
388
382
|
};
|
|
389
383
|
const openLink = () => {
|
|
390
384
|
if (editorView) {
|
|
391
|
-
var _pluginInjectionApi$
|
|
385
|
+
var _pluginInjectionApi$a5;
|
|
392
386
|
const {
|
|
393
387
|
state: {
|
|
394
388
|
tr
|
|
395
389
|
},
|
|
396
390
|
dispatch
|
|
397
391
|
} = editorView;
|
|
398
|
-
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
392
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a5 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a5 === void 0 ? void 0 : _pluginInjectionApi$a5.actions.attachAnalyticsEvent({
|
|
399
393
|
eventType: EVENT_TYPE.TRACK,
|
|
400
394
|
action: ACTION.VISITED,
|
|
401
395
|
actionSubject: ACTION_SUBJECT.MEDIA,
|
|
@@ -421,8 +415,8 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
|
|
|
421
415
|
}
|
|
422
416
|
}
|
|
423
417
|
if (allowAltTextOnImages) {
|
|
424
|
-
var _pluginInjectionApi$
|
|
425
|
-
toolbarButtons.push(altTextButton(intl, state, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
418
|
+
var _pluginInjectionApi$a6;
|
|
419
|
+
toolbarButtons.push(altTextButton(intl, state, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a6 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a6 === void 0 ? void 0 : _pluginInjectionApi$a6.actions), {
|
|
426
420
|
type: 'separator'
|
|
427
421
|
});
|
|
428
422
|
}
|
|
@@ -506,22 +500,22 @@ export const floatingToolbar = (state, intl, options = {}, pluginInjectionApi) =
|
|
|
506
500
|
selectedNodeType = state.selection.node.type;
|
|
507
501
|
}
|
|
508
502
|
if (allowMediaInline && (parentMediaGroupNode === null || parentMediaGroupNode === void 0 ? void 0 : parentMediaGroupNode.node.type) === mediaGroup) {
|
|
509
|
-
var _pluginInjectionApi$
|
|
503
|
+
var _pluginInjectionApi$a7;
|
|
510
504
|
const mediaOffset = state.selection.$from.parentOffset + 1;
|
|
511
505
|
baseToolbar.getDomRef = () => {
|
|
512
506
|
var _mediaPluginState$ele;
|
|
513
507
|
const selector = mediaFilmstripItemDOMSelector(mediaOffset);
|
|
514
508
|
return (_mediaPluginState$ele = mediaPluginState.element) === null || _mediaPluginState$ele === void 0 ? void 0 : _mediaPluginState$ele.querySelector(selector);
|
|
515
509
|
};
|
|
516
|
-
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
510
|
+
items = generateMediaCardFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a7 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a7 === void 0 ? void 0 : _pluginInjectionApi$a7.actions);
|
|
517
511
|
} else if (allowMediaInline && selectedNodeType && selectedNodeType === mediaInline) {
|
|
518
|
-
var _pluginInjectionApi$
|
|
512
|
+
var _pluginInjectionApi$a8;
|
|
519
513
|
baseToolbar.getDomRef = () => {
|
|
520
514
|
var _mediaPluginState$ele2;
|
|
521
515
|
const element = (_mediaPluginState$ele2 = mediaPluginState.element) === null || _mediaPluginState$ele2 === void 0 ? void 0 : _mediaPluginState$ele2.querySelector(`.${MediaInlineNodeSelector}`);
|
|
522
516
|
return element || mediaPluginState.element;
|
|
523
517
|
};
|
|
524
|
-
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
518
|
+
items = generateMediaInlineFloatingToolbar(state, intl, mediaPluginState, hoverDecoration, pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a8 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a8 === void 0 ? void 0 : _pluginInjectionApi$a8.actions);
|
|
525
519
|
} else {
|
|
526
520
|
baseToolbar.getDomRef = () => {
|
|
527
521
|
var _mediaPluginState$ele3;
|
|
@@ -18,7 +18,6 @@ const ImageBorder = ({
|
|
|
18
18
|
formatMessage
|
|
19
19
|
},
|
|
20
20
|
toggleBorder,
|
|
21
|
-
showSomewhatSemanticTooltips,
|
|
22
21
|
borderMark,
|
|
23
22
|
setBorder
|
|
24
23
|
}) => {
|
|
@@ -71,8 +70,7 @@ const ImageBorder = ({
|
|
|
71
70
|
paletteOptions: {
|
|
72
71
|
palette: borderColorPalette,
|
|
73
72
|
paletteColorTooltipMessages: borderPaletteTooltipMessages,
|
|
74
|
-
hexToPaletteColor: hexToEditorBorderPaletteColor
|
|
75
|
-
showSomewhatSemanticTooltips
|
|
73
|
+
hexToPaletteColor: hexToEditorBorderPaletteColor
|
|
76
74
|
}
|
|
77
75
|
})))
|
|
78
76
|
}, {
|
|
@@ -45,25 +45,26 @@ export const PixelEntry = ({
|
|
|
45
45
|
}
|
|
46
46
|
if (onSubmit) {
|
|
47
47
|
let widthToBeSumitted = data.inputWidth;
|
|
48
|
-
let
|
|
48
|
+
let validation = 'valid';
|
|
49
49
|
if (data.inputWidth < minWidth) {
|
|
50
50
|
widthToBeSumitted = minWidth;
|
|
51
|
-
|
|
51
|
+
validation = 'less-than-min';
|
|
52
52
|
}
|
|
53
53
|
if (data.inputWidth > maxWidth) {
|
|
54
54
|
widthToBeSumitted = maxWidth;
|
|
55
|
-
|
|
55
|
+
validation = 'greater-than-max';
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
// If user keeps submitting an invalid input, node width attribute will be updated with the same value
|
|
59
59
|
// and won't upadte the state in useEffect (since width is the same)
|
|
60
60
|
// Thus, we set the state here to always display the correct dimension
|
|
61
|
-
if (
|
|
61
|
+
if (validation !== 'valid') {
|
|
62
62
|
setComputedWidth(widthToBeSumitted);
|
|
63
63
|
setComputedHeight(Math.round(ratioWidth * widthToBeSumitted));
|
|
64
64
|
}
|
|
65
65
|
onSubmit({
|
|
66
|
-
width: widthToBeSumitted
|
|
66
|
+
width: widthToBeSumitted,
|
|
67
|
+
validation
|
|
67
68
|
});
|
|
68
69
|
}
|
|
69
70
|
};
|
|
@@ -39,7 +39,7 @@ export const getMediaInputResizeAnalyticsEvent = (type, attributes) => {
|
|
|
39
39
|
return {
|
|
40
40
|
action: ACTION.EDITED,
|
|
41
41
|
actionSubject,
|
|
42
|
-
actionSubjectId: ACTION_SUBJECT_ID.
|
|
42
|
+
actionSubjectId: ACTION_SUBJECT_ID.RESIZED,
|
|
43
43
|
attributes: {
|
|
44
44
|
width,
|
|
45
45
|
layout,
|
|
@@ -635,7 +635,8 @@ export function handleMarkdown(markdownSlice, queueCardsFromChangedTr, from, to)
|
|
|
635
635
|
} else {
|
|
636
636
|
tr.replaceSelection(markdownSlice);
|
|
637
637
|
}
|
|
638
|
-
tr.
|
|
638
|
+
const textPosition = tr.doc.resolve(Math.min(pastesFrom + markdownSlice.size, tr.doc.content.size));
|
|
639
|
+
tr.setSelection(TextSelection.near(textPosition, -1));
|
|
639
640
|
queueCardsFromChangedTr === null || queueCardsFromChangedTr === void 0 ? void 0 : queueCardsFromChangedTr(state, tr, INPUT_METHOD.CLIPBOARD);
|
|
640
641
|
if (dispatch) {
|
|
641
642
|
dispatch(tr.scrollIntoView());
|
|
@@ -10,11 +10,8 @@ const pluginConfig = textColorConfig => {
|
|
|
10
10
|
return textColorConfig;
|
|
11
11
|
};
|
|
12
12
|
const textColorPlugin = ({
|
|
13
|
-
config: textColorConfig
|
|
14
|
-
api
|
|
13
|
+
config: textColorConfig
|
|
15
14
|
}) => {
|
|
16
|
-
var _api$featureFlags;
|
|
17
|
-
const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
18
15
|
return {
|
|
19
16
|
name: 'textColor',
|
|
20
17
|
marks() {
|
|
@@ -54,8 +51,7 @@ const textColorPlugin = ({
|
|
|
54
51
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
55
52
|
popupsScrollableElement: popupsScrollableElement,
|
|
56
53
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
57
|
-
disabled: disabled
|
|
58
|
-
featureFlags: featureFlags
|
|
54
|
+
disabled: disabled
|
|
59
55
|
})
|
|
60
56
|
});
|
|
61
57
|
}
|
|
@@ -143,14 +143,10 @@ export class ToolbarTextColor extends React.Component {
|
|
|
143
143
|
intl: {
|
|
144
144
|
formatMessage
|
|
145
145
|
},
|
|
146
|
-
disabled
|
|
147
|
-
featureFlags
|
|
146
|
+
disabled
|
|
148
147
|
} = this.props;
|
|
149
148
|
const labelTextColor = formatMessage(messages.textColor);
|
|
150
149
|
const palette = pluginState.palette;
|
|
151
|
-
const {
|
|
152
|
-
useSomewhatSemanticTextColorNames
|
|
153
|
-
} = featureFlags;
|
|
154
150
|
let fitWidth;
|
|
155
151
|
if (document.body.clientWidth <= 740) {
|
|
156
152
|
// This was originally hard-coded, but moved here to a const
|
|
@@ -216,8 +212,7 @@ export class ToolbarTextColor extends React.Component {
|
|
|
216
212
|
paletteOptions: {
|
|
217
213
|
palette,
|
|
218
214
|
hexToPaletteColor: hexToEditorTextPaletteColor,
|
|
219
|
-
paletteColorTooltipMessages: textPaletteTooltipMessages
|
|
220
|
-
showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames
|
|
215
|
+
paletteColorTooltipMessages: textPaletteTooltipMessages
|
|
221
216
|
}
|
|
222
217
|
}))), jsx("span", {
|
|
223
218
|
css: separatorStyles
|
|
@@ -21,7 +21,7 @@ const colorPickerButtonWrapper = css`
|
|
|
21
21
|
position: relative;
|
|
22
22
|
`;
|
|
23
23
|
const colorPickerExpandContainer = css`
|
|
24
|
-
margin: 0px -4px;
|
|
24
|
+
margin: 0px ${"var(--ds-space-negative-050, -4px)"};
|
|
25
25
|
`;
|
|
26
26
|
|
|
27
27
|
// Control the size of color picker buttons and preview
|
|
@@ -34,7 +34,7 @@ const colorPickerWrapper = theme => css`
|
|
|
34
34
|
dark: `var(--ds-surface-overlay, ${DN50})`
|
|
35
35
|
})(theme)};
|
|
36
36
|
box-shadow: 0 4px 8px -2px ${N60A}, 0 0 1px ${N60A};
|
|
37
|
-
padding: 8px 0px;
|
|
37
|
+
padding: ${"var(--ds-space-100, 8px)"} 0px;
|
|
38
38
|
`;
|
|
39
39
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
40
40
|
|
|
@@ -148,7 +148,6 @@ const ColorPickerButton = props => {
|
|
|
148
148
|
paletteOptions: {
|
|
149
149
|
palette: props.colorPalette,
|
|
150
150
|
hexToPaletteColor: props.hexToPaletteColor,
|
|
151
|
-
showSomewhatSemanticTooltips: props.showSomewhatSemanticTooltips,
|
|
152
151
|
paletteColorTooltipMessages: props.paletteColorTooltipMessages
|
|
153
152
|
}
|
|
154
153
|
}))));
|
|
@@ -342,10 +342,8 @@ const ColorPicker = props => {
|
|
|
342
342
|
onFieldChange(name, currentColor !== colorValue);
|
|
343
343
|
};
|
|
344
344
|
const {
|
|
345
|
-
useSomewhatSemanticTextColorNames,
|
|
346
345
|
expandedChartColors
|
|
347
346
|
} = featureFlags !== null && featureFlags !== void 0 ? featureFlags : {
|
|
348
|
-
useSomewhatSemanticTextColorNames: false,
|
|
349
347
|
expandedChartColors: false
|
|
350
348
|
};
|
|
351
349
|
return expandedChartColors ? jsx(ColorPickerButton, {
|
|
@@ -353,15 +351,7 @@ const ColorPicker = props => {
|
|
|
353
351
|
currentColor: currentColor,
|
|
354
352
|
onChange: onColorChange,
|
|
355
353
|
colorPalette: extendedColorPalette,
|
|
356
|
-
paletteColorTooltipMessages: chartsColorPaletteTooltipMessages
|
|
357
|
-
// We did not want to create new FF or update
|
|
358
|
-
// useSomewhatSemanticTextColorNames name
|
|
359
|
-
// because it is temporary and require extra work.
|
|
360
|
-
// So even though it says text color names,
|
|
361
|
-
// we are going to use for all color pickers
|
|
362
|
-
// such as text, background and table charts.
|
|
363
|
-
,
|
|
364
|
-
showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames,
|
|
354
|
+
paletteColorTooltipMessages: chartsColorPaletteTooltipMessages,
|
|
365
355
|
cols: EXPANDED_COLOR_PICKER_COLUMNS,
|
|
366
356
|
alignX: "right",
|
|
367
357
|
placement: "ConfigPanel",
|
|
@@ -33,7 +33,7 @@ const labelContainer = css`
|
|
|
33
33
|
`;
|
|
34
34
|
const expandContentContainer = isHidden => css`
|
|
35
35
|
display: ${isHidden ? 'none' : 'block'};
|
|
36
|
-
margin-top:
|
|
36
|
+
margin-top: ${"var(--ds-space-negative-100, -8px)"};
|
|
37
37
|
`;
|
|
38
38
|
function Expand({
|
|
39
39
|
field,
|
|
@@ -25,7 +25,7 @@ function getSpellCheck(featureFlags) {
|
|
|
25
25
|
* which is used by both current and archv3 editors.
|
|
26
26
|
*/
|
|
27
27
|
export function createFeatureFlagsFromProps(props) {
|
|
28
|
-
var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27
|
|
28
|
+
var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27;
|
|
29
29
|
var normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
|
|
30
30
|
return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
|
|
31
31
|
newInsertionBehaviour: props.allowNewInsertionBehaviour,
|
|
@@ -56,8 +56,7 @@ export function createFeatureFlagsFromProps(props) {
|
|
|
56
56
|
// Including fallback to props.featureFlags so that mobile feature flags
|
|
57
57
|
// are included (they are not kebab cased)
|
|
58
58
|
restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.restartNumberedLists) === true,
|
|
59
|
-
useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.useSomewhatSemanticTextColorNames) : false)),
|
|
60
59
|
lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
|
|
61
|
-
preventPopupOverflow: Boolean(typeof ((_props$
|
|
60
|
+
preventPopupOverflow: Boolean(typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27['prevent-popup-overflow']) : false)
|
|
62
61
|
});
|
|
63
62
|
}
|
|
@@ -3,8 +3,8 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { N20 } from '@atlaskit/theme/colors';
|
|
5
5
|
import { akEditorSmallZIndex, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
6
|
-
export var inviteTeamWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: 50%;\n min-width: ", ";\n margin-left:
|
|
7
|
-
export var avatarContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: ", ";\n display: flex;\n align-items: center;\n\n // ED-13102: This is to override list styles that come from the\n // .wiki-content class in Confluence that should not apply within\n // the toolbar. Has to be extra specific to override.\n && > ul {\n list-style-type: none;\n }\n\n div:last-child button.invite-to-edit {\n border-radius: 50%;\n height: 32px;\n width: 32px;\n padding:
|
|
6
|
+
export var inviteTeamWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: 50%;\n min-width: ", ";\n margin-left: ", ";\n"])), "var(--ds-background-neutral, ".concat(N20, ")"), "var(--ds-space-400, 32px)", "var(--ds-space-negative-050, -4px)");
|
|
7
|
+
export var avatarContainer = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: ", ";\n display: flex;\n align-items: center;\n\n // ED-13102: This is to override list styles that come from the\n // .wiki-content class in Confluence that should not apply within\n // the toolbar. Has to be extra specific to override.\n && > ul {\n list-style-type: none;\n }\n\n div:last-child button.invite-to-edit {\n border-radius: 50%;\n height: 32px;\n width: 32px;\n padding: ", ";\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-025, 2px)");
|
|
8
8
|
export var badge = function badge(color) {
|
|
9
9
|
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: block;\n position: absolute;\n right: 1px;\n bottom: 1px;\n width: 13px;\n height: 13px;\n z-index: ", ";\n border-radius: 3px;\n background: ", ";\n color: ", ";\n font-size: ", ";\n line-height: 0;\n padding-top: 7px;\n text-align: center;\n box-shadow: 0 0 1px ", ";\n box-sizing: border-box;\n"])), akEditorSmallZIndex, color, "var(--ds-text-inverse, #fff)", relativeFontSizeToBase16(9), "var(--ds-border-inverse, #fff)");
|
|
10
10
|
};
|
|
@@ -12,7 +12,12 @@ export function DateNodeView(props) {
|
|
|
12
12
|
selection = _props$view$state.selection,
|
|
13
13
|
getPos = props.getPos;
|
|
14
14
|
var intl = useIntl();
|
|
15
|
-
var pos
|
|
15
|
+
var pos;
|
|
16
|
+
try {
|
|
17
|
+
pos = typeof getPos === 'function' ? getPos() : undefined;
|
|
18
|
+
} catch (e) {
|
|
19
|
+
pos = undefined;
|
|
20
|
+
}
|
|
16
21
|
|
|
17
22
|
// We fall back to selection.$from even though it does not cover all use cases
|
|
18
23
|
// eg. upon Editor init, selection is at the start, not at the Date node
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { extension, bodiedExtension, inlineExtension } from '@atlaskit/adf-schema';
|
|
2
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
3
|
import { createPlugin } from './pm-plugins/main';
|
|
3
4
|
import keymapPlugin from './pm-plugins/keymap';
|
|
4
5
|
import { createPlugin as createUniqueIdPlugin } from './pm-plugins/unique-id';
|
|
@@ -6,11 +7,16 @@ import { getToolbarConfig } from './toolbar';
|
|
|
6
7
|
import { getContextPanel } from './context-panel';
|
|
7
8
|
import { createExtensionAPI } from './extension-api';
|
|
8
9
|
var extensionPlugin = function extensionPlugin(_ref) {
|
|
9
|
-
var _api$featureFlags, _api$
|
|
10
|
+
var _api$featureFlags, _api$contextPanel3, _api$contextPanel4;
|
|
10
11
|
var _ref$config = _ref.config,
|
|
11
12
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
12
|
-
|
|
13
|
-
var featureFlags = (
|
|
13
|
+
_api = _ref.api;
|
|
14
|
+
var featureFlags = (_api === null || _api === void 0 ? void 0 : (_api$featureFlags = _api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
15
|
+
//Note: This is a hack to get the editor view reference in the plugin. Copied from table plugin.
|
|
16
|
+
//This is needed to get the current selection in the editor
|
|
17
|
+
var editorViewRef = {
|
|
18
|
+
current: null
|
|
19
|
+
};
|
|
14
20
|
return {
|
|
15
21
|
name: 'extension',
|
|
16
22
|
nodes: function nodes() {
|
|
@@ -34,7 +40,7 @@ var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
34
40
|
portalProviderAPI = _ref2.portalProviderAPI,
|
|
35
41
|
eventDispatcher = _ref2.eventDispatcher;
|
|
36
42
|
var extensionHandlers = options.extensionHandlers || {};
|
|
37
|
-
return createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher,
|
|
43
|
+
return createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, _api, options.useLongPressSelection, {
|
|
38
44
|
appearance: options.appearance
|
|
39
45
|
});
|
|
40
46
|
}
|
|
@@ -42,25 +48,45 @@ var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
42
48
|
name: 'extensionKeymap',
|
|
43
49
|
plugin: function plugin() {
|
|
44
50
|
var _api$contextPanel;
|
|
45
|
-
return keymapPlugin(
|
|
51
|
+
return keymapPlugin(_api === null || _api === void 0 ? void 0 : (_api$contextPanel = _api.contextPanel) === null || _api$contextPanel === void 0 ? void 0 : _api$contextPanel.actions.applyChange);
|
|
46
52
|
}
|
|
47
53
|
}, {
|
|
48
54
|
name: 'extensionUniqueId',
|
|
49
55
|
plugin: function plugin() {
|
|
50
56
|
return createUniqueIdPlugin();
|
|
51
57
|
}
|
|
58
|
+
}, {
|
|
59
|
+
name: 'extensionEditorViewRef',
|
|
60
|
+
plugin: function plugin() {
|
|
61
|
+
return new SafePlugin({
|
|
62
|
+
view: function view(editorView) {
|
|
63
|
+
editorViewRef.current = editorView;
|
|
64
|
+
return {
|
|
65
|
+
destroy: function destroy() {
|
|
66
|
+
editorViewRef.current = null;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
52
72
|
}];
|
|
53
73
|
},
|
|
54
74
|
actions: {
|
|
55
|
-
|
|
75
|
+
api: function api() {
|
|
76
|
+
var _api$contextPanel2;
|
|
77
|
+
return createExtensionAPI({
|
|
78
|
+
editorView: editorViewRef.current,
|
|
79
|
+
applyChange: _api === null || _api === void 0 ? void 0 : (_api$contextPanel2 = _api.contextPanel) === null || _api$contextPanel2 === void 0 ? void 0 : _api$contextPanel2.actions.applyChange
|
|
80
|
+
});
|
|
81
|
+
}
|
|
56
82
|
},
|
|
57
83
|
pluginsOptions: {
|
|
58
84
|
floatingToolbar: getToolbarConfig({
|
|
59
85
|
breakoutEnabled: options.breakoutEnabled,
|
|
60
|
-
hoverDecoration:
|
|
61
|
-
applyChangeToContextPanel:
|
|
86
|
+
hoverDecoration: _api === null || _api === void 0 ? void 0 : _api.decorations.actions.hoverDecoration,
|
|
87
|
+
applyChangeToContextPanel: _api === null || _api === void 0 ? void 0 : (_api$contextPanel3 = _api.contextPanel) === null || _api$contextPanel3 === void 0 ? void 0 : _api$contextPanel3.actions.applyChange
|
|
62
88
|
}),
|
|
63
|
-
contextPanel: getContextPanel(options.allowAutoSave, featureFlags,
|
|
89
|
+
contextPanel: getContextPanel(options.allowAutoSave, featureFlags, _api === null || _api === void 0 ? void 0 : (_api$contextPanel4 = _api.contextPanel) === null || _api$contextPanel4 === void 0 ? void 0 : _api$contextPanel4.actions.applyChange)
|
|
64
90
|
}
|
|
65
91
|
};
|
|
66
92
|
};
|
|
@@ -6,7 +6,6 @@ import Loadable from 'react-loadable';
|
|
|
6
6
|
import { getContextualToolbarItemsFromModule } from '@atlaskit/editor-common/extensions';
|
|
7
7
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
8
8
|
import { nodeToJSON } from '../../../utils';
|
|
9
|
-
import { createExtensionAPI } from '../../extension/extension-api';
|
|
10
9
|
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
11
10
|
import Separator from './Separator';
|
|
12
11
|
var noop = function noop() {
|
|
@@ -45,8 +44,7 @@ var resolveExtensionIcon = /*#__PURE__*/function () {
|
|
|
45
44
|
var ExtensionButton = function ExtensionButton(props) {
|
|
46
45
|
var item = props.item,
|
|
47
46
|
node = props.node,
|
|
48
|
-
|
|
49
|
-
applyChangeToContextPanel = props.applyChangeToContextPanel;
|
|
47
|
+
extensionApi = props.extensionApi;
|
|
50
48
|
var ButtonIcon = React.useMemo(function () {
|
|
51
49
|
return item.icon ? Loadable({
|
|
52
50
|
loader: function () {
|
|
@@ -74,11 +72,7 @@ var ExtensionButton = function ExtensionButton(props) {
|
|
|
74
72
|
throw new Error("'action' of context toolbar item '".concat(item.key, "' is not a function"));
|
|
75
73
|
}
|
|
76
74
|
var targetNodeAdf = nodeToJSON(node);
|
|
77
|
-
|
|
78
|
-
editorView: editorView,
|
|
79
|
-
applyChange: applyChangeToContextPanel
|
|
80
|
-
});
|
|
81
|
-
item.action(targetNodeAdf, api);
|
|
75
|
+
item.action(targetNodeAdf, extensionApi);
|
|
82
76
|
};
|
|
83
77
|
return /*#__PURE__*/React.createElement(Button, {
|
|
84
78
|
title: item.label,
|
|
@@ -96,7 +90,8 @@ export var ExtensionsPlaceholder = function ExtensionsPlaceholder(props) {
|
|
|
96
90
|
editorView = props.editorView,
|
|
97
91
|
extensionProvider = props.extensionProvider,
|
|
98
92
|
separator = props.separator,
|
|
99
|
-
applyChangeToContextPanel = props.applyChangeToContextPanel
|
|
93
|
+
applyChangeToContextPanel = props.applyChangeToContextPanel,
|
|
94
|
+
extensionApi = props.extensionApi;
|
|
100
95
|
var _useState = useState([]),
|
|
101
96
|
_useState2 = _slicedToArray(_useState, 2),
|
|
102
97
|
extensions = _useState2[0],
|
|
@@ -140,11 +135,8 @@ export var ExtensionsPlaceholder = function ExtensionsPlaceholder(props) {
|
|
|
140
135
|
return nodeToJSON(node);
|
|
141
136
|
}, [node]);
|
|
142
137
|
var extensionItems = React.useMemo(function () {
|
|
143
|
-
return getContextualToolbarItemsFromModule(extensions, nodeAdf,
|
|
144
|
-
|
|
145
|
-
applyChange: applyChangeToContextPanel
|
|
146
|
-
}));
|
|
147
|
-
}, [extensions, nodeAdf, editorView, applyChangeToContextPanel]);
|
|
138
|
+
return getContextualToolbarItemsFromModule(extensions, nodeAdf, extensionApi);
|
|
139
|
+
}, [extensions, nodeAdf, extensionApi]);
|
|
148
140
|
if (!extensionItems.length) {
|
|
149
141
|
return null;
|
|
150
142
|
}
|
|
@@ -160,7 +152,8 @@ export var ExtensionsPlaceholder = function ExtensionsPlaceholder(props) {
|
|
|
160
152
|
node: node,
|
|
161
153
|
item: item,
|
|
162
154
|
editorView: editorView,
|
|
163
|
-
applyChangeToContextPanel: applyChangeToContextPanel
|
|
155
|
+
applyChangeToContextPanel: applyChangeToContextPanel,
|
|
156
|
+
extensionApi: extensionApi
|
|
164
157
|
}));
|
|
165
158
|
if (index < extensionItems.length - 1) {
|
|
166
159
|
children.push( /*#__PURE__*/React.createElement(Separator, null));
|
|
@@ -52,14 +52,10 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
52
52
|
featureFlags = _ref.featureFlags,
|
|
53
53
|
api = _ref.api;
|
|
54
54
|
var emojiAndColourPickerMountPoint = scrollable ? popupsMountPoint || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.fabric-editor-popup-scroll-parent')) || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.ak-editor-content-area')) || undefined : popupsMountPoint;
|
|
55
|
-
var _ref2 = featureFlags || {
|
|
56
|
-
useSomewhatSemanticTextColorNames: false
|
|
57
|
-
},
|
|
58
|
-
useSomewhatSemanticTextColorNames = _ref2.useSomewhatSemanticTextColorNames;
|
|
59
55
|
return jsx(ButtonGroup, null, items.filter(function (item) {
|
|
60
56
|
return !item.hidden;
|
|
61
57
|
}).map(function (item, idx) {
|
|
62
|
-
var _api$contextPanel;
|
|
58
|
+
var _api$contextPanel, _api$extension;
|
|
63
59
|
switch (item.type) {
|
|
64
60
|
case 'button':
|
|
65
61
|
var ButtonIcon = item.icon;
|
|
@@ -191,14 +187,6 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
191
187
|
,
|
|
192
188
|
hexToPaletteColor: hexToEditorBackgroundPaletteColor,
|
|
193
189
|
paletteColorTooltipMessages: backgroundPaletteTooltipMessages
|
|
194
|
-
// We did not want to create new FF or update
|
|
195
|
-
// useSomewhatSemanticTextColorNames name
|
|
196
|
-
// because it is temporary and require extra work.
|
|
197
|
-
// So even though it says text color names,
|
|
198
|
-
// we are going to use for all color pickers
|
|
199
|
-
// such as text, background and table charts.
|
|
200
|
-
,
|
|
201
|
-
showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames
|
|
202
190
|
});
|
|
203
191
|
}
|
|
204
192
|
if (item.selectType === 'emoji') {
|
|
@@ -220,8 +208,8 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
220
208
|
if (!editorView || !extensionsProvider) {
|
|
221
209
|
return null;
|
|
222
210
|
}
|
|
223
|
-
var
|
|
224
|
-
extendFloatingToolbar =
|
|
211
|
+
var _ref2 = featureFlags || {},
|
|
212
|
+
extendFloatingToolbar = _ref2.extendFloatingToolbar;
|
|
225
213
|
if (!extendFloatingToolbar) {
|
|
226
214
|
return null;
|
|
227
215
|
}
|
|
@@ -231,7 +219,8 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
231
219
|
editorView: editorView,
|
|
232
220
|
extensionProvider: extensionsProvider,
|
|
233
221
|
separator: item.separator,
|
|
234
|
-
applyChangeToContextPanel: api === null || api === void 0 ? void 0 : (_api$contextPanel = api.contextPanel) === null || _api$contextPanel === void 0 ? void 0 : _api$contextPanel.actions.applyChange
|
|
222
|
+
applyChangeToContextPanel: api === null || api === void 0 ? void 0 : (_api$contextPanel = api.contextPanel) === null || _api$contextPanel === void 0 ? void 0 : _api$contextPanel.actions.applyChange,
|
|
223
|
+
extensionApi: api === null || api === void 0 ? void 0 : (_api$extension = api.extension) === null || _api$extension === void 0 ? void 0 : _api$extension.actions.api()
|
|
235
224
|
});
|
|
236
225
|
case 'separator':
|
|
237
226
|
return jsx(Separator, {
|
|
@@ -364,8 +353,8 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
364
353
|
// this prevents https://product-fabric.atlassian.net/browse/ED-10207
|
|
365
354
|
_createClass(Toolbar, [{
|
|
366
355
|
key: "resetStyling",
|
|
367
|
-
value: function resetStyling(
|
|
368
|
-
var table =
|
|
356
|
+
value: function resetStyling(_ref3) {
|
|
357
|
+
var table = _ref3.table;
|
|
369
358
|
if (this.props.editorView) {
|
|
370
359
|
var _this$props$api;
|
|
371
360
|
var _this$props$editorVie2 = this.props.editorView,
|
|
@@ -5,7 +5,7 @@ import { mediaSingleSharedStyle, richMediaClassName } from '@atlaskit/editor-com
|
|
|
5
5
|
import { akEditorDeleteBorder, akEditorDeleteBackground, akEditorSelectedBorderBoldSize, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPadding, akEditorSelectedNodeClassName, akEditorDeleteIconColor } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { N60, B200, Y500 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { fileCardImageViewSelector, inlinePlayerClassName, newFileExperienceClassName } from '@atlaskit/media-card';
|
|
8
|
-
export var mediaStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .media-extended-resize-experience[layout^='wrap-'] {\n // override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n // to prevent scroll bar\n overflow: visible !important;\n }\n\n & [layout^='wrap-'] + [layout^='wrap-'] {\n clear: none;\n & + p,\n & + div[class^='fabric-editor-align'],\n & + ul,\n & + ol,\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n clear: both !important;\n }\n & .", " {\n margin-left: 0;\n margin-right: 0;\n }\n }\n\n .mediaSingleView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n // overwrite default Prosemirror setting making it clear: both\n clear: inherit;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right']\n + .mediaSingleView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n\n /* Larger margins for resize handlers when at depth 0 of the document */\n & > .mediaSingleView-content-wrap {\n .richMedia-resize-handle-right {\n margin-right: -", "px;\n }\n .richMedia-resize-handle-left {\n margin-left: -", "px;\n }\n }\n }\n\n .richMedia-resize-handle-right,\n .richMedia-resize-handle-left {\n display: flex;\n flex-direction: column;\n\n /* vertical align */\n justify-content: center;\n }\n\n .richMedia-resize-handle-right {\n align-items: flex-end;\n padding-right: ", ";\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: ", ";\n margin-left: -", "px;\n }\n\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n\n border-radius: 6px;\n }\n\n .", ":hover .richMedia-resize-handle-left::after,\n .", ":hover .richMedia-resize-handle-right::after {\n background: ", ";\n }\n\n .", " .richMedia-resize-handle-right::after,\n .", " .richMedia-resize-handle-left::after,\n .", " .richMedia-resize-handle-right:hover::after,\n .", " .richMedia-resize-handle-left:hover::after,\n .", ".is-resizing .richMedia-resize-handle-right::after,\n .", ".is-resizing .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n .__resizable_base__ {\n left: unset !important;\n width: auto !important;\n height: auto !important;\n }\n\n /* Danger when top level node for smart cards / inline links */\n .danger > div > div > .media-card-frame,\n .danger > span > a {\n background-color: ", ";\n box-shadow: 0px 0px 0px ", "px\n ", ";\n transition: background-color 0s, box-shadow 0s;\n }\n /* Danger when nested node or common */\n .danger {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* Media single video player */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* New file experience */\n .", " .", " {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n /* Media resize handlers */\n .
|
|
8
|
+
export var mediaStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .media-extended-resize-experience[layout^='wrap-'] {\n // override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n // to prevent scroll bar\n overflow: visible !important;\n }\n\n & [layout^='wrap-'] + [layout^='wrap-'] {\n clear: none;\n & + p,\n & + div[class^='fabric-editor-align'],\n & + ul,\n & + ol,\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n clear: both !important;\n }\n & .", " {\n margin-left: 0;\n margin-right: 0;\n }\n }\n\n .mediaSingleView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n // overwrite default Prosemirror setting making it clear: both\n clear: inherit;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right']\n + .mediaSingleView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n\n /* Larger margins for resize handlers when at depth 0 of the document */\n & > .mediaSingleView-content-wrap {\n .richMedia-resize-handle-right {\n margin-right: -", "px;\n }\n .richMedia-resize-handle-left {\n margin-left: -", "px;\n }\n }\n }\n\n .richMedia-resize-handle-right,\n .richMedia-resize-handle-left {\n display: flex;\n flex-direction: column;\n\n /* vertical align */\n justify-content: center;\n }\n\n .richMedia-resize-handle-right {\n align-items: flex-end;\n padding-right: ", ";\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: ", ";\n margin-left: -", "px;\n }\n\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n\n border-radius: 6px;\n }\n\n .", ":hover .richMedia-resize-handle-left::after,\n .", ":hover .richMedia-resize-handle-right::after {\n background: ", ";\n }\n\n .", " .richMedia-resize-handle-right::after,\n .", " .richMedia-resize-handle-left::after,\n .", " .richMedia-resize-handle-right:hover::after,\n .", " .richMedia-resize-handle-left:hover::after,\n .", ".is-resizing .richMedia-resize-handle-right::after,\n .", ".is-resizing .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n .__resizable_base__ {\n left: unset !important;\n width: auto !important;\n height: auto !important;\n }\n\n /* Danger when top level node for smart cards / inline links */\n .danger > div > div > .media-card-frame,\n .danger > span > a {\n background-color: ", ";\n box-shadow: 0px 0px 0px ", "px\n ", ";\n transition: background-color 0s, box-shadow 0s;\n }\n /* Danger when nested node or common */\n .danger {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* Media single video player */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* New file experience */\n .", " .", " {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n /* Media resize handlers */\n .resizer-handle-thumb {\n background: ", " !important;\n }\n\n /* Smart cards */\n div div .media-card-frame,\n .inlineCardView-content-wrap > span > a {\n background-color: ", "; /* R75 with 50% opactiy */\n transition: background-color 0s;\n }\n\n div div .media-card-frame::after {\n box-shadow: none;\n }\n }\n\n .warning {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n\n .", " .", "::after {\n border: 1px solid ", ";\n }\n\n .", " .", " {\n box-shadow: 0 0 0 1px ", " !important;\n }\n\n .resizer-handle-thumb {\n background: ", " !important;\n }\n }\n"])), mediaSingleSharedStyle, richMediaClassName, richMediaClassName, richMediaClassName, akEditorMediaResizeHandlerPaddingWide, akEditorMediaResizeHandlerPaddingWide, "var(--ds-space-150, 12px)", akEditorMediaResizeHandlerPadding, "var(--ds-space-150, 12px)", akEditorMediaResizeHandlerPadding, richMediaClassName, richMediaClassName, "var(--ds-border, ".concat(N60, ")"), akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, richMediaClassName, richMediaClassName, richMediaClassName, richMediaClassName, "var(--ds-border-focused, ".concat(B200, ")"), "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), akEditorSelectedBorderBoldSize, "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), richMediaClassName, fileCardImageViewSelector, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, inlinePlayerClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), richMediaClassName, newFileExperienceClassName, "var(--ds-border-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), "var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))", richMediaClassName, fileCardImageViewSelector, "var(--ds-border-warning, ".concat(Y500, ")"), richMediaClassName, inlinePlayerClassName, "var(--ds-border-warning, ".concat(Y500, ")"), richMediaClassName, newFileExperienceClassName, "var(--ds-border-warning, ".concat(Y500, ")"), "var(--ds-icon-warning, ".concat(Y500, ")"));
|
|
9
9
|
|
|
10
10
|
/* `left: unset` above is to work around Chrome bug where rendering a div with
|
|
11
11
|
* that style applied inside a container that has a scroll, causes any svgs on
|