@atlaskit/editor-plugin-media 1.20.3 → 1.20.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/.eslintrc.js +13 -13
- package/CHANGELOG.md +593 -582
- package/LICENSE.md +6 -8
- package/dist/cjs/nodeviews/mediaSingle.js +3 -1
- package/dist/cjs/nodeviews/styles.js +4 -1
- package/dist/cjs/toolbar/linking-toolbar-appearance.js +3 -1
- package/dist/cjs/ui/CaptionPlaceholder/index.js +1 -1
- package/dist/cjs/ui/ImageBorder/index.js +12 -4
- package/dist/cjs/ui/ImageBorder/styles.js +7 -7
- package/dist/cjs/ui/MediaLinkingToolbar.js +56 -53
- package/dist/cjs/ui/PixelEntry/styles.js +1 -1
- package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +3 -1
- package/dist/cjs/ui/ResizableMediaSingle/styled.js +1 -1
- package/dist/es2019/nodeviews/mediaSingle.js +3 -1
- package/dist/es2019/nodeviews/styles.js +4 -1
- package/dist/es2019/toolbar/linking-toolbar-appearance.js +3 -1
- package/dist/es2019/ui/CaptionPlaceholder/index.js +5 -5
- package/dist/es2019/ui/ImageBorder/index.js +12 -4
- package/dist/es2019/ui/ImageBorder/styles.js +82 -82
- package/dist/es2019/ui/MediaLinkingToolbar.js +55 -52
- package/dist/es2019/ui/PixelEntry/styles.js +11 -11
- package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +3 -1
- package/dist/es2019/ui/ResizableMediaSingle/styled.js +5 -5
- package/dist/esm/nodeviews/mediaSingle.js +3 -1
- package/dist/esm/nodeviews/styles.js +4 -1
- package/dist/esm/toolbar/linking-toolbar-appearance.js +3 -1
- package/dist/esm/ui/CaptionPlaceholder/index.js +1 -1
- package/dist/esm/ui/ImageBorder/index.js +12 -4
- package/dist/esm/ui/ImageBorder/styles.js +7 -7
- package/dist/esm/ui/MediaLinkingToolbar.js +56 -53
- package/dist/esm/ui/PixelEntry/styles.js +1 -1
- package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +3 -1
- package/dist/esm/ui/ResizableMediaSingle/styled.js +1 -1
- package/dist/types/nodeviews/mediaNodeView/index.d.ts +1 -1
- package/dist/types/pm-plugins/alt-text/index.d.ts +1 -1
- package/dist/types/toolbar/filePreviewItem.d.ts +1 -1
- package/dist/types/toolbar/layout-group.d.ts +1 -1
- package/dist/types/ui/MediaPicker/BrowserWrapper.d.ts +1 -1
- package/dist/types/ui/MediaPicker/ClipboardWrapper.d.ts +1 -1
- package/dist/types/ui/PixelEntry/index.d.ts +1 -1
- package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/alt-text/index.d.ts +1 -1
- package/dist/types-ts4.5/toolbar/filePreviewItem.d.ts +1 -1
- package/dist/types-ts4.5/toolbar/layout-group.d.ts +1 -1
- package/dist/types-ts4.5/ui/MediaPicker/BrowserWrapper.d.ts +1 -1
- package/dist/types-ts4.5/ui/MediaPicker/ClipboardWrapper.d.ts +1 -1
- package/dist/types-ts4.5/ui/PixelEntry/index.d.ts +1 -1
- package/package.json +11 -13
- package/report.api.md +302 -316
|
@@ -99,58 +99,61 @@ export class LinkAddToolbar extends React.PureComponent {
|
|
|
99
99
|
key: index
|
|
100
100
|
}, error);
|
|
101
101
|
});
|
|
102
|
-
return
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
validationErrors
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
102
|
+
return (
|
|
103
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
104
|
+
jsx("div", {
|
|
105
|
+
className: "recent-list"
|
|
106
|
+
}, jsx("div", {
|
|
107
|
+
css: [container, !!activityProvider && containerWithProvider]
|
|
108
|
+
}, jsx("div", {
|
|
109
|
+
css: inputWrapper
|
|
110
|
+
}, jsx("span", {
|
|
111
|
+
css: buttonWrapper
|
|
112
|
+
}, jsx(Button, {
|
|
113
|
+
title: formatLinkAddressText,
|
|
114
|
+
icon: jsx(ChevronLeftLargeIcon, {
|
|
115
|
+
label: formatLinkAddressText
|
|
116
|
+
}),
|
|
117
|
+
onClick: () => this.handleOnBack({
|
|
118
|
+
url: value,
|
|
119
|
+
inputMethod: currentInputMethod
|
|
120
|
+
})
|
|
121
|
+
})), jsx(PanelTextInput, {
|
|
122
|
+
inputId: "media-link-search-input",
|
|
123
|
+
testId: "media-link-input",
|
|
124
|
+
placeholder: getPlaceholder(!!activityProvider),
|
|
125
|
+
autoFocus: true,
|
|
126
|
+
onCancel: this.handleCancel,
|
|
127
|
+
defaultValue: value,
|
|
128
|
+
onSubmit: inputValue => {
|
|
129
|
+
const validationErrors = this.getValidationErrors(inputValue, currentInputMethod);
|
|
130
|
+
this.setState({
|
|
131
|
+
validationErrors
|
|
132
|
+
});
|
|
133
|
+
if (!validationErrors.length) {
|
|
134
|
+
onSubmit();
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
onChange: value => {
|
|
138
|
+
this.setState({
|
|
139
|
+
validationErrors: []
|
|
140
|
+
});
|
|
141
|
+
onChange(value);
|
|
142
|
+
},
|
|
143
|
+
onKeyDown: onKeyDown
|
|
144
|
+
}), jsx("label", {
|
|
145
|
+
className: "assistive",
|
|
146
|
+
htmlFor: "media-link-search-input"
|
|
147
|
+
}, formatMessage(linkToolbarMessages.searchInput)), normalizeUrl(displayUrl) && jsx(Fragment, null, jsx(Separator, null), jsx(Button, {
|
|
148
|
+
title: formatUnlinkText,
|
|
149
|
+
icon: jsx(EditorUnlinkIcon, {
|
|
150
|
+
label: formatUnlinkText
|
|
151
|
+
}),
|
|
152
|
+
onClick: this.handleUnlink
|
|
153
|
+
}))), !!errorsList.length && jsx("section", {
|
|
154
|
+
css: validationWrapper
|
|
155
|
+
}, errorsList), renderRecentList()))
|
|
156
|
+
);
|
|
154
157
|
});
|
|
155
158
|
}
|
|
156
159
|
getValidationErrors(value, inputMethod) {
|
|
@@ -3,18 +3,18 @@ const PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH = 120;
|
|
|
3
3
|
|
|
4
4
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
5
5
|
export const pixelSizingWrapper = css`
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
display: grid;
|
|
7
|
+
grid-template-columns: 1fr 1em 1fr 0;
|
|
8
|
+
grid-template-rows: auto;
|
|
9
|
+
grid-template-areas: 'widthinput label heightinput submit';
|
|
10
|
+
width: ${PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH}px;
|
|
11
|
+
text-align: center;
|
|
12
|
+
height: ${"var(--ds-space-300, 24px)"};
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
// Atlaskit fieldset does not allow style override
|
|
15
|
+
& > * {
|
|
16
|
+
margin-top: 0 !important;
|
|
17
|
+
}
|
|
18
18
|
`;
|
|
19
19
|
export const pixelEntryForm = css({
|
|
20
20
|
form: {
|
|
@@ -434,7 +434,9 @@ class ResizableMediaSingleNext extends React.Component {
|
|
|
434
434
|
})
|
|
435
435
|
}, jsx(ResizerNext, {
|
|
436
436
|
minWidth: minViewWidth,
|
|
437
|
-
maxWidth: maxWidth
|
|
437
|
+
maxWidth: maxWidth
|
|
438
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
439
|
+
,
|
|
438
440
|
className: resizerNextClassName,
|
|
439
441
|
snapGap: MEDIA_SINGLE_SNAP_GAP,
|
|
440
442
|
enable: enable,
|
|
@@ -2,9 +2,9 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { MediaSingleDimensionHelper } from '@atlaskit/editor-common/ui';
|
|
3
3
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
4
4
|
export const wrapperStyle = props => css`
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
& > div {
|
|
6
|
+
${MediaSingleDimensionHelper(props)};
|
|
7
|
+
position: relative;
|
|
8
|
+
clear: both;
|
|
9
|
+
}
|
|
10
10
|
`;
|
|
@@ -437,7 +437,9 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
|
|
|
437
437
|
var isCurrentNodeDrafting = (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (node === null || node === void 0 || (_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.attrs.id);
|
|
438
438
|
var MediaChildren = jsx("figure", {
|
|
439
439
|
ref: this.mediaSingleWrapperRef,
|
|
440
|
-
css: figureWrapperStyles
|
|
440
|
+
css: figureWrapperStyles
|
|
441
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
442
|
+
,
|
|
441
443
|
className: MediaSingleNodeSelector,
|
|
442
444
|
onClick: this.onMediaSingleClicked
|
|
443
445
|
}, commentsOnMedia && jsx(CommentBadge, {
|
|
@@ -21,11 +21,14 @@ export var MediaCardWrapper = function MediaCardWrapper(_ref) {
|
|
|
21
21
|
onContextMenu = _ref.onContextMenu;
|
|
22
22
|
var calculatedBorderWidth = selected && borderWidth > 0 ? borderWidth + 1 : borderWidth;
|
|
23
23
|
return jsx("div", {
|
|
24
|
-
"data-testid": "media-card-wrapper"
|
|
24
|
+
"data-testid": "media-card-wrapper"
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
26
|
+
,
|
|
25
27
|
className: "media-card-wrapper",
|
|
26
28
|
style: {
|
|
27
29
|
borderColor: "var(--custom-palette-color)",
|
|
28
30
|
borderWidth: "".concat(calculatedBorderWidth, "px"),
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
29
32
|
borderStyle: 'solid',
|
|
30
33
|
borderRadius: "".concat(calculatedBorderWidth * 2, "px")
|
|
31
34
|
}
|
|
@@ -69,7 +69,9 @@ export var LinkToolbarAppearance = function LinkToolbarAppearance(_ref) {
|
|
|
69
69
|
title: linkTitle,
|
|
70
70
|
icon: jsx(OpenIcon, {
|
|
71
71
|
label: linkTitle
|
|
72
|
-
})
|
|
72
|
+
})
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
74
|
+
,
|
|
73
75
|
className: "hyperlink-open-link"
|
|
74
76
|
}), jsx(Separator, null));
|
|
75
77
|
} else {
|
|
@@ -8,7 +8,7 @@ import { captionMessages as messages } from '@atlaskit/editor-common/media';
|
|
|
8
8
|
import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
|
|
9
9
|
import { N200 } from '@atlaskit/theme/colors';
|
|
10
10
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
11
|
-
var placeholder = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
11
|
+
var placeholder = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: ", ";\n\twidth: 100%;\n\ttext-align: center;\n\tmargin-top: ", " !important;\n\tdisplay: block;\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-space-100, 8px)");
|
|
12
12
|
export default /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
13
13
|
var onClick = _ref.onClick;
|
|
14
14
|
return jsx("span", {
|
|
@@ -57,7 +57,9 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
57
57
|
value: {
|
|
58
58
|
name: 'color'
|
|
59
59
|
},
|
|
60
|
-
elemAfter:
|
|
60
|
+
elemAfter:
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
62
|
+
jsx("div", {
|
|
61
63
|
className: DropdownMenuSharedCssClassName.SUBMENU
|
|
62
64
|
}, jsx("div", {
|
|
63
65
|
css: contextualMenuColorIcon(color && hexToEditorBorderPaletteColor(color))
|
|
@@ -83,7 +85,9 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
83
85
|
value: {
|
|
84
86
|
name: 'size'
|
|
85
87
|
},
|
|
86
|
-
elemAfter:
|
|
88
|
+
elemAfter:
|
|
89
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
90
|
+
jsx("div", {
|
|
87
91
|
className: DropdownMenuSharedCssClassName.SUBMENU
|
|
88
92
|
}, jsx("div", {
|
|
89
93
|
css: contextualMenuArrow
|
|
@@ -132,7 +136,9 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
132
136
|
enabled: enabled,
|
|
133
137
|
isOpen: isOpen
|
|
134
138
|
})
|
|
135
|
-
}, jsx(ToolbarButton
|
|
139
|
+
}, jsx(ToolbarButton
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
141
|
+
, {
|
|
136
142
|
className: "image-border-toolbar-btn",
|
|
137
143
|
selected: enabled,
|
|
138
144
|
onClick: toggleBorder,
|
|
@@ -144,7 +150,9 @@ var ImageBorder = function ImageBorder(_ref) {
|
|
|
144
150
|
title: enabled ? formatMessage(messages.removeBorder) : formatMessage(messages.addBorder)
|
|
145
151
|
}), jsx("div", {
|
|
146
152
|
ref: popupTarget
|
|
147
|
-
}, jsx(ToolbarButton
|
|
153
|
+
}, jsx(ToolbarButton
|
|
154
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
155
|
+
, {
|
|
148
156
|
className: "image-border-toolbar-dropdown",
|
|
149
157
|
selected: enabled || isOpen,
|
|
150
158
|
"aria-label": formatMessage(messages.borderOptions),
|
|
@@ -18,21 +18,21 @@ export var menuItemDimensions = {
|
|
|
18
18
|
// TODO: Migrate away from gridSize
|
|
19
19
|
// Recommendation: Replace directly with 4 due to itemSpacing being used in calculations
|
|
20
20
|
export var itemSpacing = gridSize() / 2;
|
|
21
|
-
export var contextualMenuArrow = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
21
|
+
export var contextualMenuArrow = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tdisplay: flex;\n\t&::after {\n\t\tcontent: '\u203A';\n\t\tmargin-left: ", ";\n\t\tline-height: 20px;\n\t\tcolor: ", ";\n\t}\n"])), "var(--ds-space-050, 4px)", "var(--ds-icon, ".concat(N90, ")"));
|
|
22
22
|
export var contextualMenuColorIcon = function contextualMenuColorIcon(color) {
|
|
23
|
-
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n
|
|
23
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t", "\n\t&::before {\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tborder: 1px solid ", ";\n\t\tborder-radius: ", ";\n\t\twidth: 20px;\n\t\theight: 20px;\n\t\t", "\n\t}\n"])), contextualMenuArrow, DEFAULT_BORDER_COLOR, "var(--ds-border-radius-100, 3px)", color && "background: ".concat(color));
|
|
24
24
|
};
|
|
25
25
|
export var contextualSubMenu = function contextualSubMenu(index) {
|
|
26
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n
|
|
26
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\tborder-radius: ", ";\n\tbackground: ", ";\n\tbox-shadow: ", ";\n\tdisplay: flex;\n\tposition: absolute;\n\ttop: ", "px;\n\tleft: ", "px;\n\tpadding: ", ";\n\n\t> div {\n\t\tpadding: 0;\n\t}\n"])), "var(--ds-border-radius-100, 3px)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A), ")"), index * (menuItemDimensions.height + itemSpacing * 2), menuItemDimensions.width, "var(--ds-space-100, 8px)");
|
|
27
27
|
};
|
|
28
28
|
export var buttonStyle = function buttonStyle(selected) {
|
|
29
|
-
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n
|
|
29
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\theight: 26px;\n\twidth: 26px;\n\tpadding: 0;\n\tborder-radius: 4px;\n\tbackground-color: ", ";\n\tborder: 1px solid ", ";\n\tcursor: pointer;\n\tdisplay: block;\n"])), selected ? "var(--ds-text, ".concat(N800, ")") : "var(--ds-background-neutral, ".concat(N20A, ")"), DEFAULT_BORDER_COLOR);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
33
|
-
export var buttonWrapperStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n
|
|
33
|
+
export var buttonWrapperStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n\tborder: 1px solid transparent;\n\tmargin: ", ";\n\tfont-size: 0;\n\tdisplay: flex;\n\talign-items: center;\n\tpadding: ", ";\n\tborder-radius: 6px;\n\t&:focus-within,\n\t&:focus,\n\t&:hover {\n\t\tborder-color: ", " !important;\n\t}\n"])), "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", N50);
|
|
34
34
|
export var line = function line(size, selected) {
|
|
35
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n
|
|
35
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n\tposition: relative;\n\t&:before {\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\twidth: 12px;\n\t\theight: ", "px;\n\t\tbackground-color: ", ";\n\t\tborder-radius: 90px;\n\t\ttransform: translate(-50%, -50%) rotate(135deg);\n\t}\n"])), size, selected ? "var(--ds-icon-inverse, ".concat(N0, ")") : "var(--ds-icon, #44546F)");
|
|
36
36
|
};
|
|
37
37
|
var getHoverStyles = function getHoverStyles(selector) {
|
|
38
38
|
return "&:hover ".concat(selector, " {\n background: ", "var(--ds-background-neutral-subtle-hovered, ".concat(colors.N20A, ")"), ";\n\n &:hover {\n background: ", "var(--ds-background-neutral-hovered, ".concat(colors.N30A, ")"), ";\n }\n }");
|
|
@@ -40,5 +40,5 @@ var getHoverStyles = function getHoverStyles(selector) {
|
|
|
40
40
|
export var toolbarButtonWrapper = function toolbarButtonWrapper(_ref) {
|
|
41
41
|
var enabled = _ref.enabled,
|
|
42
42
|
isOpen = _ref.isOpen;
|
|
43
|
-
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n
|
|
43
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\tdisplay: flex;\n\t.image-border-toolbar-btn {\n\t\tborder-top-right-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\t\tpadding: 0;\n\t\t& > span {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\t.image-border-toolbar-dropdown {\n\t\tpadding: 0;\n\t\t& > span {\n\t\t\tmargin: 0;\n\t\t}\n\t\twidth: 16px !important;\n\t\tborder-top-left-radius: 0 !important;\n\t\tborder-bottom-left-radius: 0 !important;\n\t\tmargin-left: ", ";\n\t}\n\n\t", "\n\t", "\n"])), "var(--ds-space-025, 2px)", !enabled && getHoverStyles('.image-border-toolbar-btn'), !isOpen && !enabled && getHoverStyles('.image-border-toolbar-dropdown'));
|
|
44
44
|
};
|
|
@@ -103,60 +103,63 @@ export var LinkAddToolbar = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
103
103
|
key: index
|
|
104
104
|
}, error);
|
|
105
105
|
});
|
|
106
|
-
return
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
inputId: "media-link-search-input",
|
|
127
|
-
testId: "media-link-input",
|
|
128
|
-
placeholder: getPlaceholder(!!activityProvider),
|
|
129
|
-
autoFocus: true,
|
|
130
|
-
onCancel: _this.handleCancel,
|
|
131
|
-
defaultValue: value,
|
|
132
|
-
onSubmit: function onSubmit(inputValue) {
|
|
133
|
-
var validationErrors = _this.getValidationErrors(inputValue, currentInputMethod);
|
|
134
|
-
_this.setState({
|
|
135
|
-
validationErrors: validationErrors
|
|
136
|
-
});
|
|
137
|
-
if (!validationErrors.length) {
|
|
138
|
-
_onSubmit();
|
|
106
|
+
return (
|
|
107
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
108
|
+
jsx("div", {
|
|
109
|
+
className: "recent-list"
|
|
110
|
+
}, jsx("div", {
|
|
111
|
+
css: [container, !!activityProvider && containerWithProvider]
|
|
112
|
+
}, jsx("div", {
|
|
113
|
+
css: inputWrapper
|
|
114
|
+
}, jsx("span", {
|
|
115
|
+
css: buttonWrapper
|
|
116
|
+
}, jsx(Button, {
|
|
117
|
+
title: formatLinkAddressText,
|
|
118
|
+
icon: jsx(ChevronLeftLargeIcon, {
|
|
119
|
+
label: formatLinkAddressText
|
|
120
|
+
}),
|
|
121
|
+
onClick: function onClick() {
|
|
122
|
+
return _this.handleOnBack({
|
|
123
|
+
url: value,
|
|
124
|
+
inputMethod: currentInputMethod
|
|
125
|
+
});
|
|
139
126
|
}
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
127
|
+
})), jsx(PanelTextInput, {
|
|
128
|
+
inputId: "media-link-search-input",
|
|
129
|
+
testId: "media-link-input",
|
|
130
|
+
placeholder: getPlaceholder(!!activityProvider),
|
|
131
|
+
autoFocus: true,
|
|
132
|
+
onCancel: _this.handleCancel,
|
|
133
|
+
defaultValue: value,
|
|
134
|
+
onSubmit: function onSubmit(inputValue) {
|
|
135
|
+
var validationErrors = _this.getValidationErrors(inputValue, currentInputMethod);
|
|
136
|
+
_this.setState({
|
|
137
|
+
validationErrors: validationErrors
|
|
138
|
+
});
|
|
139
|
+
if (!validationErrors.length) {
|
|
140
|
+
_onSubmit();
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
onChange: function onChange(value) {
|
|
144
|
+
_this.setState({
|
|
145
|
+
validationErrors: []
|
|
146
|
+
});
|
|
147
|
+
_onChange(value);
|
|
148
|
+
},
|
|
149
|
+
onKeyDown: onKeyDown
|
|
150
|
+
}), jsx("label", {
|
|
151
|
+
className: "assistive",
|
|
152
|
+
htmlFor: "media-link-search-input"
|
|
153
|
+
}, formatMessage(linkToolbarMessages.searchInput)), normalizeUrl(displayUrl) && jsx(Fragment, null, jsx(Separator, null), jsx(Button, {
|
|
154
|
+
title: formatUnlinkText,
|
|
155
|
+
icon: jsx(EditorUnlinkIcon, {
|
|
156
|
+
label: formatUnlinkText
|
|
157
|
+
}),
|
|
158
|
+
onClick: _this.handleUnlink
|
|
159
|
+
}))), !!errorsList.length && jsx("section", {
|
|
160
|
+
css: validationWrapper
|
|
161
|
+
}, errorsList), renderRecentList()))
|
|
162
|
+
);
|
|
160
163
|
});
|
|
161
164
|
return _this;
|
|
162
165
|
}
|
|
@@ -4,7 +4,7 @@ import { css } from '@emotion/react';
|
|
|
4
4
|
var PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH = 120;
|
|
5
5
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
7
|
-
export var pixelSizingWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
7
|
+
export var pixelSizingWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tdisplay: grid;\n\tgrid-template-columns: 1fr 1em 1fr 0;\n\tgrid-template-rows: auto;\n\tgrid-template-areas: 'widthinput label heightinput submit';\n\twidth: ", "px;\n\ttext-align: center;\n\theight: ", ";\n\n\t// Atlaskit fieldset does not allow style override\n\t& > * {\n\t\tmargin-top: 0 !important;\n\t}\n"])), PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH, "var(--ds-space-300, 24px)");
|
|
8
8
|
export var pixelEntryForm = css({
|
|
9
9
|
form: {
|
|
10
10
|
width: '100%'
|
|
@@ -513,7 +513,9 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
|
|
|
513
513
|
})
|
|
514
514
|
}, jsx(ResizerNext, {
|
|
515
515
|
minWidth: minViewWidth,
|
|
516
|
-
maxWidth: maxWidth
|
|
516
|
+
maxWidth: maxWidth
|
|
517
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
518
|
+
,
|
|
517
519
|
className: resizerNextClassName,
|
|
518
520
|
snapGap: MEDIA_SINGLE_SNAP_GAP,
|
|
519
521
|
enable: enable,
|
|
@@ -4,5 +4,5 @@ import { css } from '@emotion/react';
|
|
|
4
4
|
import { MediaSingleDimensionHelper } from '@atlaskit/editor-common/ui';
|
|
5
5
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
6
6
|
export var wrapperStyle = function wrapperStyle(props) {
|
|
7
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
7
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t& > div {\n\t\t", ";\n\t\tposition: relative;\n\t\tclear: both;\n\t}\n"])), MediaSingleDimensionHelper(props));
|
|
8
8
|
};
|
|
@@ -26,7 +26,7 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
|
|
|
26
26
|
renderMediaNodeWithState: (mediaProvider?: Promise<MediaProvider>, contextIdentifierProvider?: Promise<ContextIdentifierProvider>) => ({ width: editorWidth }: {
|
|
27
27
|
width?: WidthPluginState | undefined;
|
|
28
28
|
}) => JSX.Element;
|
|
29
|
-
renderMediaNodeWithProviders: ({ mediaProvider, contextIdentifierProvider
|
|
29
|
+
renderMediaNodeWithProviders: ({ mediaProvider, contextIdentifierProvider }: Providers) => JSX.Element;
|
|
30
30
|
render(): JSX.Element;
|
|
31
31
|
}
|
|
32
32
|
export declare const ReactMediaNode: (portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
|
|
@@ -3,5 +3,5 @@ import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
export declare const pluginKey: PluginKey<any>;
|
|
5
5
|
declare const createCommand: <A = import("./actions").MediaAltTextAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").MediaAltTextState;
|
|
6
|
-
export declare const createPlugin: ({ dispatch, providerFactory
|
|
6
|
+
export declare const createPlugin: ({ dispatch, providerFactory }: PMPluginFactoryParams) => SafePlugin<import("./types").MediaAltTextState>;
|
|
7
7
|
export { createCommand, getPluginState };
|
|
@@ -5,5 +5,5 @@ interface FilePreviewProps {
|
|
|
5
5
|
mediaPluginState: MediaPluginState;
|
|
6
6
|
intl: IntlShape;
|
|
7
7
|
}
|
|
8
|
-
export declare const FilePreviewItem: ({ mediaPluginState, intl
|
|
8
|
+
export declare const FilePreviewItem: ({ mediaPluginState, intl }: FilePreviewProps) => JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -6,5 +6,5 @@ type Props = {
|
|
|
6
6
|
dispatchCommand: (command: Command) => void;
|
|
7
7
|
hide: () => void;
|
|
8
8
|
};
|
|
9
|
-
export declare const LayoutGroup: ({ layoutButtons, dispatchCommand, hide
|
|
9
|
+
export declare const LayoutGroup: ({ layoutButtons, dispatchCommand, hide }: Props) => jsx.JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -7,5 +7,5 @@ type Props = {
|
|
|
7
7
|
onBrowseFn: (browse: () => void) => void;
|
|
8
8
|
featureFlags?: MediaFeatureFlags;
|
|
9
9
|
};
|
|
10
|
-
export declare const BrowserWrapper: ({ mediaState, isOpen, onBrowseFn, featureFlags
|
|
10
|
+
export declare const BrowserWrapper: ({ mediaState, isOpen, onBrowseFn, featureFlags }: Props) => JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -6,5 +6,5 @@ type Props = {
|
|
|
6
6
|
featureFlags?: MediaFeatureFlags;
|
|
7
7
|
container?: HTMLElement;
|
|
8
8
|
};
|
|
9
|
-
export declare const ClipboardWrapper: ({ mediaState, featureFlags, container
|
|
9
|
+
export declare const ClipboardWrapper: ({ mediaState, featureFlags, container }: Props) => JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -2,6 +2,6 @@ import { jsx } from '@emotion/react';
|
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
3
|
import type { PixelEntryProps } from './types';
|
|
4
4
|
export declare const PixelEntry: ({ width, mediaWidth, mediaHeight, onSubmit, minWidth, maxWidth, onChange, intl: { formatMessage }, showMigration, onMigrate, }: PixelEntryProps) => jsx.JSX.Element;
|
|
5
|
-
export declare const FullWidthDisplay: ({ intl: { formatMessage }
|
|
5
|
+
export declare const FullWidthDisplay: ({ intl: { formatMessage } }: {
|
|
6
6
|
intl: IntlShape;
|
|
7
7
|
}) => jsx.JSX.Element;
|
|
@@ -26,7 +26,7 @@ declare class MediaNodeView extends SelectionBasedNodeView<MediaNodeViewProps> {
|
|
|
26
26
|
renderMediaNodeWithState: (mediaProvider?: Promise<MediaProvider>, contextIdentifierProvider?: Promise<ContextIdentifierProvider>) => ({ width: editorWidth }: {
|
|
27
27
|
width?: WidthPluginState | undefined;
|
|
28
28
|
}) => JSX.Element;
|
|
29
|
-
renderMediaNodeWithProviders: ({ mediaProvider, contextIdentifierProvider
|
|
29
|
+
renderMediaNodeWithProviders: ({ mediaProvider, contextIdentifierProvider }: Providers) => JSX.Element;
|
|
30
30
|
render(): JSX.Element;
|
|
31
31
|
}
|
|
32
32
|
export declare const ReactMediaNode: (portalProviderAPI: LegacyPortalProviderAPI | PortalProviderAPI, eventDispatcher: EventDispatcher, providerFactory: ProviderFactory, mediaOptions: MediaOptions | undefined, pluginInjectionApi: ExtractInjectionAPI<MediaNextEditorPluginType> | undefined) => (node: PMNode, view: EditorView, getPos: getPosHandler) => MediaNodeView;
|
|
@@ -3,5 +3,5 @@ import type { PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
|
3
3
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
export declare const pluginKey: PluginKey<any>;
|
|
5
5
|
declare const createCommand: <A = import("./actions").MediaAltTextAction>(action: A | ((state: Readonly<import("prosemirror-state").EditorState>) => false | A), transform?: ((tr: import("prosemirror-state").Transaction, state: import("prosemirror-state").EditorState) => import("prosemirror-state").Transaction) | undefined) => import("@atlaskit/editor-common/types").Command, getPluginState: (state: import("prosemirror-state").EditorState) => import("./types").MediaAltTextState;
|
|
6
|
-
export declare const createPlugin: ({ dispatch, providerFactory
|
|
6
|
+
export declare const createPlugin: ({ dispatch, providerFactory }: PMPluginFactoryParams) => SafePlugin<import("./types").MediaAltTextState>;
|
|
7
7
|
export { createCommand, getPluginState };
|
|
@@ -5,5 +5,5 @@ interface FilePreviewProps {
|
|
|
5
5
|
mediaPluginState: MediaPluginState;
|
|
6
6
|
intl: IntlShape;
|
|
7
7
|
}
|
|
8
|
-
export declare const FilePreviewItem: ({ mediaPluginState, intl
|
|
8
|
+
export declare const FilePreviewItem: ({ mediaPluginState, intl }: FilePreviewProps) => JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -6,5 +6,5 @@ type Props = {
|
|
|
6
6
|
dispatchCommand: (command: Command) => void;
|
|
7
7
|
hide: () => void;
|
|
8
8
|
};
|
|
9
|
-
export declare const LayoutGroup: ({ layoutButtons, dispatchCommand, hide
|
|
9
|
+
export declare const LayoutGroup: ({ layoutButtons, dispatchCommand, hide }: Props) => jsx.JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -7,5 +7,5 @@ type Props = {
|
|
|
7
7
|
onBrowseFn: (browse: () => void) => void;
|
|
8
8
|
featureFlags?: MediaFeatureFlags;
|
|
9
9
|
};
|
|
10
|
-
export declare const BrowserWrapper: ({ mediaState, isOpen, onBrowseFn, featureFlags
|
|
10
|
+
export declare const BrowserWrapper: ({ mediaState, isOpen, onBrowseFn, featureFlags }: Props) => JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -6,5 +6,5 @@ type Props = {
|
|
|
6
6
|
featureFlags?: MediaFeatureFlags;
|
|
7
7
|
container?: HTMLElement;
|
|
8
8
|
};
|
|
9
|
-
export declare const ClipboardWrapper: ({ mediaState, featureFlags, container
|
|
9
|
+
export declare const ClipboardWrapper: ({ mediaState, featureFlags, container }: Props) => JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -2,6 +2,6 @@ import { jsx } from '@emotion/react';
|
|
|
2
2
|
import type { IntlShape } from 'react-intl-next';
|
|
3
3
|
import type { PixelEntryProps } from './types';
|
|
4
4
|
export declare const PixelEntry: ({ width, mediaWidth, mediaHeight, onSubmit, minWidth, maxWidth, onChange, intl: { formatMessage }, showMigration, onMigrate, }: PixelEntryProps) => jsx.JSX.Element;
|
|
5
|
-
export declare const FullWidthDisplay: ({ intl: { formatMessage }
|
|
5
|
+
export declare const FullWidthDisplay: ({ intl: { formatMessage } }: {
|
|
6
6
|
intl: IntlShape;
|
|
7
7
|
}) => jsx.JSX.Element;
|