@atlaskit/editor-common 90.1.0 → 91.0.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 +30 -0
- package/dist/cjs/messages/insert-block.js +0 -10
- package/dist/cjs/messages/media-insert.js +1 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/shared/panel.js +4 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui-menu/ToolbarButton/index.js +14 -2
- package/dist/es2019/messages/insert-block.js +0 -10
- package/dist/es2019/messages/media-insert.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/shared/panel.js +8 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui-menu/ToolbarButton/index.js +14 -2
- package/dist/esm/messages/insert-block.js +0 -10
- package/dist/esm/messages/media-insert.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/shared/panel.js +4 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui-menu/ToolbarButton/index.js +14 -2
- package/dist/types/messages/insert-block.d.ts +0 -10
- package/dist/types/styles/shared/panel.d.ts +1 -0
- package/dist/types/ui-menu/DropdownMenu/types.d.ts +1 -2
- package/dist/types/ui-menu/ToolbarButton/index.d.ts +4 -2
- package/dist/types-ts4.5/messages/insert-block.d.ts +0 -10
- package/dist/types-ts4.5/styles/shared/panel.d.ts +1 -0
- package/dist/types-ts4.5/ui-menu/DropdownMenu/types.d.ts +1 -2
- package/dist/types-ts4.5/ui-menu/ToolbarButton/index.d.ts +4 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 91.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#143799](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/143799)
|
|
8
|
+
[`28c4ecb75a634`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/28c4ecb75a634) -
|
|
9
|
+
removed editorActions from onClick in Props, updated toolbar reference to it
|
|
10
|
+
|
|
11
|
+
## 90.2.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#143146](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/143146)
|
|
16
|
+
[`8f698f1278514`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8f698f1278514) -
|
|
17
|
+
[ux] [ED-24905] Main change: make loom plugin config, loomProvider, optional, and add optional
|
|
18
|
+
config, renderButton, to support customising loom button, e.g. adding pulse, spotlight. This
|
|
19
|
+
change is required to support loom cross-sell flow. In this flow, loom SDK will not be initialised
|
|
20
|
+
unless loomProvider is passed in. Once loomProvider is ready, `initLoom` action can be used to
|
|
21
|
+
initialise SDK. This change should be backwards compatible and will not impact the existing flow.
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [#143310](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/143310)
|
|
26
|
+
[`f55df006dcd59`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f55df006dcd59) -
|
|
27
|
+
ED-24822 - Add padding to panels with no icon and unhide drag handle in first bodied node
|
|
28
|
+
- [#143644](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/143644)
|
|
29
|
+
[`b5352e3195293`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b5352e3195293) -
|
|
30
|
+
[ux] [ED-24327] Integrate new media popup into toolbar and quick action
|
|
31
|
+
- Updated dependencies
|
|
32
|
+
|
|
3
33
|
## 90.1.0
|
|
4
34
|
|
|
5
35
|
### Minor Changes
|
|
@@ -46,16 +46,6 @@ var toolbarInsertBlockMessages = exports.toolbarInsertBlockMessages = (0, _react
|
|
|
46
46
|
defaultMessage: 'Insert',
|
|
47
47
|
description: 'Insert a node into the document'
|
|
48
48
|
},
|
|
49
|
-
insertMediaFromUrl: {
|
|
50
|
-
id: 'fabric.editor.insertMediaFromUrl',
|
|
51
|
-
defaultMessage: 'Image from link',
|
|
52
|
-
description: 'Upload image from URL'
|
|
53
|
-
},
|
|
54
|
-
insertMediaFromUrlDescription: {
|
|
55
|
-
id: 'fabric.editor.insertMediaFromUrlDescription',
|
|
56
|
-
defaultMessage: 'Add an image or video from a link',
|
|
57
|
-
description: 'Upload a image to your page from external URL'
|
|
58
|
-
},
|
|
59
49
|
mediaFilesDescription: {
|
|
60
50
|
id: 'fabric.editor.mediaFiles.description',
|
|
61
51
|
defaultMessage: 'Add images and other files to your page',
|
|
@@ -32,7 +32,7 @@ var mediaInsertMessages = exports.mediaInsertMessages = (0, _reactIntlNext.defin
|
|
|
32
32
|
description: 'Error message displayed when a user tries to insert an image from a URL that cannot be loaded. This may be because the URL is invalid, there is a network error or any other reason the preview upload does not succeed. When this occurs the suggestion is to attempt downloading the linked file manually and using a local upload instead.'
|
|
33
33
|
},
|
|
34
34
|
fromUrlWarning: {
|
|
35
|
-
id: 'fabric.editor.media.insert.
|
|
35
|
+
id: 'fabric.editor.media.insert.fromUrlWarning',
|
|
36
36
|
defaultMessage: 'This image might not be visible to others due to source restrictions. Consider uploading the file instead.',
|
|
37
37
|
description: 'Warning message displayed when a user tries to insert an image from a URL that may not be visible to others due to source restrictions such as not having permissions/authentication to load the image. The suggestion is to upload the file instead.'
|
|
38
38
|
},
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "
|
|
20
|
+
var packageVersion = "91.0.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -17,6 +17,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
17
17
|
var _consts = require("@atlaskit/editor-shared-styles/consts");
|
|
18
18
|
var _emoji = require("@atlaskit/emoji");
|
|
19
19
|
var _colors = require("@atlaskit/theme/colors");
|
|
20
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
20
21
|
var _templateObject;
|
|
21
22
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
22
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -129,7 +130,8 @@ var prefix = 'ak-editor-panel';
|
|
|
129
130
|
var PanelSharedCssClassName = exports.PanelSharedCssClassName = {
|
|
130
131
|
prefix: prefix,
|
|
131
132
|
content: "".concat(prefix, "__content"),
|
|
132
|
-
icon: "".concat(prefix, "__icon")
|
|
133
|
+
icon: "".concat(prefix, "__icon"),
|
|
134
|
+
noIcon: "".concat(prefix, "__no-icon")
|
|
133
135
|
};
|
|
134
136
|
var PanelSharedSelectors = exports.PanelSharedSelectors = {
|
|
135
137
|
infoPanel: ".".concat(prefix, "[data-panel-type=").concat(_adfSchema.PanelType.INFO, "]"),
|
|
@@ -171,7 +173,7 @@ var mainDynamicStyles = function mainDynamicStyles(panelType) {
|
|
|
171
173
|
|
|
172
174
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Safe to autofix with a tiny tweak to `mainDynamicStyles` being an object, but holding off…
|
|
173
175
|
var panelSharedStylesWithoutPrefix = exports.panelSharedStylesWithoutPrefix = function panelSharedStylesWithoutPrefix() {
|
|
174
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tborder-radius: ", ";\n\tmargin: ", " 0 0;\n\tpadding-top: ", ";\n\tpadding-right: ", ";\n\tpadding-bottom: ", ";\n\tpadding-left: ", ";\n\tmin-width: ", "px;\n\tdisplay: flex;\n\tposition: relative;\n\talign-items: normal;\n\tword-break: break-word;\n\n\t", "\n\n\t.", " {\n\t\tflex-shrink: 0;\n\t\theight: ", ";\n\t\twidth: ", ";\n\t\tbox-sizing: content-box;\n\t\tpadding-right: ", ";\n\t\ttext-align: center;\n\t\tuser-select: none;\n\t\t-moz-user-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t\tmargin-top: 0.1em;\n\t\t", "\n\n\t\t> span {\n\t\t\tvertical-align: middle;\n\t\t\tdisplay: inline-flex;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\n\t\t\t// Vertical align only works for inline-block elements in Firefox\n\t\t\t@-moz-document url-prefix() {\n\t\t\t\timg {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.ak-editor-panel__content {\n\t\tmargin: ", " 0 ", ";\n\t\tflex: 1 0 0;\n\t\t/*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n\t\tmin-width: 0;\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n"])), "var(--ds-border-radius, 3px)", _editorSharedStyles.blockNodesVerticalMargin, "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", _editorSharedStyles.akEditorTableCellMinWidth, mainDynamicStyles(_adfSchema.PanelType.INFO), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", iconDynamicStyles(_adfSchema.PanelType.INFO), _emoji.emojiSprite, panelEmojiSpriteVerticalAlignment, _emoji.emojiImage, panelEmojiImageVerticalAlignment, "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", _adfSchema.PanelType.NOTE, mainDynamicStyles(_adfSchema.PanelType.NOTE), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.NOTE), _adfSchema.PanelType.TIP, mainDynamicStyles(_adfSchema.PanelType.TIP), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.TIP), _adfSchema.PanelType.WARNING, mainDynamicStyles(_adfSchema.PanelType.WARNING), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.WARNING), _adfSchema.PanelType.ERROR, mainDynamicStyles(_adfSchema.PanelType.ERROR), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.ERROR), _adfSchema.PanelType.SUCCESS, mainDynamicStyles(_adfSchema.PanelType.SUCCESS), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.SUCCESS));
|
|
176
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tborder-radius: ", ";\n\tmargin: ", " 0 0;\n\tpadding-top: ", ";\n\tpadding-right: ", ";\n\tpadding-bottom: ", ";\n\tpadding-left: ", ";\n\tmin-width: ", "px;\n\tdisplay: flex;\n\tposition: relative;\n\talign-items: normal;\n\tword-break: break-word;\n\n\t", "\n\n\t.", " {\n\t\tflex-shrink: 0;\n\t\theight: ", ";\n\t\twidth: ", ";\n\t\tbox-sizing: content-box;\n\t\tpadding-right: ", ";\n\t\ttext-align: center;\n\t\tuser-select: none;\n\t\t-moz-user-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t\tmargin-top: 0.1em;\n\t\t", "\n\n\t\t> span {\n\t\t\tvertical-align: middle;\n\t\t\tdisplay: inline-flex;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\n\t\t\t// Vertical align only works for inline-block elements in Firefox\n\t\t\t@-moz-document url-prefix() {\n\t\t\t\timg {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.ak-editor-panel__content {\n\t\tmargin: ", " 0 ", ";\n\t\tflex: 1 0 0;\n\t\t/*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n\t\tmin-width: 0;\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n"])), "var(--ds-border-radius, 3px)", _editorSharedStyles.blockNodesVerticalMargin, "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", _editorSharedStyles.akEditorTableCellMinWidth, mainDynamicStyles(_adfSchema.PanelType.INFO), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", iconDynamicStyles(_adfSchema.PanelType.INFO), _emoji.emojiSprite, panelEmojiSpriteVerticalAlignment, _emoji.emojiImage, panelEmojiImageVerticalAlignment, "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", _adfSchema.PanelType.NOTE, mainDynamicStyles(_adfSchema.PanelType.NOTE), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.NOTE), _adfSchema.PanelType.TIP, mainDynamicStyles(_adfSchema.PanelType.TIP), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.TIP), _adfSchema.PanelType.WARNING, mainDynamicStyles(_adfSchema.PanelType.WARNING), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.WARNING), _adfSchema.PanelType.ERROR, mainDynamicStyles(_adfSchema.PanelType.ERROR), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.ERROR), _adfSchema.PanelType.SUCCESS, mainDynamicStyles(_adfSchema.PanelType.SUCCESS), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.SUCCESS), (0, _experiments.editorExperiment)('nested-dnd', true) && "&.".concat(PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t\tpadding-left: ", "var(--ds-space-150, 12px)", ";\n\t\t}"));
|
|
175
177
|
};
|
|
176
178
|
var panelSharedStyles = exports.panelSharedStyles = function panelSharedStyles() {
|
|
177
179
|
return (0, _react.css)((0, _defineProperty2.default)({}, ".".concat(PanelSharedCssClassName.prefix), panelSharedStylesWithoutPrefix()));
|
|
@@ -25,7 +25,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
25
25
|
* @jsx jsx
|
|
26
26
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
27
27
|
var packageName = "@atlaskit/editor-common";
|
|
28
|
-
var packageVersion = "
|
|
28
|
+
var packageVersion = "91.0.0";
|
|
29
29
|
var halfFocusRing = 1;
|
|
30
30
|
var dropOffset = '0, 8';
|
|
31
31
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -53,9 +53,15 @@ var ToolbarButton = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
53
53
|
ariaExpanded = props['aria-expanded'],
|
|
54
54
|
ariaPressed = props['aria-pressed'],
|
|
55
55
|
ariaKeyShortcuts = props['aria-keyshortcuts'],
|
|
56
|
+
ariaControls = props['aria-controls'],
|
|
57
|
+
dataDsLevel = props['data-ds--level'],
|
|
56
58
|
onClick = props.onClick,
|
|
57
59
|
onKeyDown = props.onKeyDown,
|
|
58
|
-
onItemClick = props.onItemClick
|
|
60
|
+
onItemClick = props.onItemClick,
|
|
61
|
+
onFocus = props.onFocus,
|
|
62
|
+
onBlur = props.onBlur,
|
|
63
|
+
onMouseEnter = props.onMouseEnter,
|
|
64
|
+
onMouseLeave = props.onMouseLeave;
|
|
59
65
|
var handleClick = (0, _react.useCallback)(function (event, analyticsEvent) {
|
|
60
66
|
if (disabled) {
|
|
61
67
|
return;
|
|
@@ -94,11 +100,17 @@ var ToolbarButton = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
94
100
|
target: target,
|
|
95
101
|
shouldFitContainer: true,
|
|
96
102
|
"aria-expanded": ariaExpanded,
|
|
103
|
+
"aria-controls": ariaControls,
|
|
97
104
|
"aria-haspopup": ariaHasPopup,
|
|
98
105
|
"aria-label": ariaLabel,
|
|
99
106
|
"aria-pressed": ariaPressed,
|
|
100
107
|
"aria-keyshortcuts": ariaKeyShortcuts,
|
|
101
|
-
onKeyDown: onKeyDown
|
|
108
|
+
onKeyDown: onKeyDown,
|
|
109
|
+
onFocus: onFocus,
|
|
110
|
+
onBlur: onBlur,
|
|
111
|
+
onMouseEnter: onMouseEnter,
|
|
112
|
+
onMouseLeave: onMouseLeave,
|
|
113
|
+
"data-ds--level": dataDsLevel
|
|
102
114
|
}, children);
|
|
103
115
|
if (!title) {
|
|
104
116
|
return button;
|
|
@@ -40,16 +40,6 @@ export const toolbarInsertBlockMessages = defineMessages({
|
|
|
40
40
|
defaultMessage: 'Insert',
|
|
41
41
|
description: 'Insert a node into the document'
|
|
42
42
|
},
|
|
43
|
-
insertMediaFromUrl: {
|
|
44
|
-
id: 'fabric.editor.insertMediaFromUrl',
|
|
45
|
-
defaultMessage: 'Image from link',
|
|
46
|
-
description: 'Upload image from URL'
|
|
47
|
-
},
|
|
48
|
-
insertMediaFromUrlDescription: {
|
|
49
|
-
id: 'fabric.editor.insertMediaFromUrlDescription',
|
|
50
|
-
defaultMessage: 'Add an image or video from a link',
|
|
51
|
-
description: 'Upload a image to your page from external URL'
|
|
52
|
-
},
|
|
53
43
|
mediaFilesDescription: {
|
|
54
44
|
id: 'fabric.editor.mediaFiles.description',
|
|
55
45
|
defaultMessage: 'Add images and other files to your page',
|
|
@@ -26,7 +26,7 @@ export const mediaInsertMessages = defineMessages({
|
|
|
26
26
|
description: 'Error message displayed when a user tries to insert an image from a URL that cannot be loaded. This may be because the URL is invalid, there is a network error or any other reason the preview upload does not succeed. When this occurs the suggestion is to attempt downloading the linked file manually and using a local upload instead.'
|
|
27
27
|
},
|
|
28
28
|
fromUrlWarning: {
|
|
29
|
-
id: 'fabric.editor.media.insert.
|
|
29
|
+
id: 'fabric.editor.media.insert.fromUrlWarning',
|
|
30
30
|
defaultMessage: 'This image might not be visible to others due to source restrictions. Consider uploading the file instead.',
|
|
31
31
|
description: 'Warning message displayed when a user tries to insert an image from a URL that may not be visible to others due to source restrictions such as not having permissions/authentication to load the image. The suggestion is to upload the file instead.'
|
|
32
32
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "
|
|
4
|
+
const packageVersion = "91.0.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -7,6 +7,7 @@ import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/e
|
|
|
7
7
|
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
8
8
|
import { emojiImage, emojiSprite } from '@atlaskit/emoji';
|
|
9
9
|
import { B100, B400, B50, B75, G200, G400, G50, G75, N0, N20, N60, P100, P400, P50, P75, R100, R400, R50, R75, T100, T50, T75, Y200, Y400, Y50, Y75 } from '@atlaskit/theme/colors';
|
|
10
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
11
|
const lightPanelColors = {
|
|
11
12
|
info: B50,
|
|
12
13
|
note: P50,
|
|
@@ -114,7 +115,8 @@ const prefix = 'ak-editor-panel';
|
|
|
114
115
|
export const PanelSharedCssClassName = {
|
|
115
116
|
prefix,
|
|
116
117
|
content: `${prefix}__content`,
|
|
117
|
-
icon: `${prefix}__icon
|
|
118
|
+
icon: `${prefix}__icon`,
|
|
119
|
+
noIcon: `${prefix}__no-icon`
|
|
118
120
|
};
|
|
119
121
|
export const PanelSharedSelectors = {
|
|
120
122
|
infoPanel: `.${prefix}[data-panel-type=${PanelType.INFO}]`,
|
|
@@ -251,6 +253,11 @@ export const panelSharedStylesWithoutPrefix = () => css`
|
|
|
251
253
|
${iconDynamicStyles(PanelType.SUCCESS)}
|
|
252
254
|
}
|
|
253
255
|
}
|
|
256
|
+
|
|
257
|
+
${editorExperiment('nested-dnd', true) && `&.${PanelSharedCssClassName.noIcon} {
|
|
258
|
+
padding-right: ${"var(--ds-space-150, 12px)"};
|
|
259
|
+
padding-left: ${"var(--ds-space-150, 12px)"};
|
|
260
|
+
}`}
|
|
254
261
|
`;
|
|
255
262
|
export const panelSharedStyles = () => css({
|
|
256
263
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "
|
|
17
|
+
const packageVersion = "91.0.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
class DropList extends Component {
|
|
@@ -42,9 +42,15 @@ const ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
42
42
|
'aria-expanded': ariaExpanded,
|
|
43
43
|
'aria-pressed': ariaPressed,
|
|
44
44
|
'aria-keyshortcuts': ariaKeyShortcuts,
|
|
45
|
+
'aria-controls': ariaControls,
|
|
46
|
+
'data-ds--level': dataDsLevel,
|
|
45
47
|
onClick,
|
|
46
48
|
onKeyDown,
|
|
47
|
-
onItemClick
|
|
49
|
+
onItemClick,
|
|
50
|
+
onFocus,
|
|
51
|
+
onBlur,
|
|
52
|
+
onMouseEnter,
|
|
53
|
+
onMouseLeave
|
|
48
54
|
} = props;
|
|
49
55
|
const handleClick = useCallback((event, analyticsEvent) => {
|
|
50
56
|
if (disabled) {
|
|
@@ -83,11 +89,17 @@ const ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
83
89
|
target: target,
|
|
84
90
|
shouldFitContainer: true,
|
|
85
91
|
"aria-expanded": ariaExpanded,
|
|
92
|
+
"aria-controls": ariaControls,
|
|
86
93
|
"aria-haspopup": ariaHasPopup,
|
|
87
94
|
"aria-label": ariaLabel,
|
|
88
95
|
"aria-pressed": ariaPressed,
|
|
89
96
|
"aria-keyshortcuts": ariaKeyShortcuts,
|
|
90
|
-
onKeyDown: onKeyDown
|
|
97
|
+
onKeyDown: onKeyDown,
|
|
98
|
+
onFocus: onFocus,
|
|
99
|
+
onBlur: onBlur,
|
|
100
|
+
onMouseEnter: onMouseEnter,
|
|
101
|
+
onMouseLeave: onMouseLeave,
|
|
102
|
+
"data-ds--level": dataDsLevel
|
|
91
103
|
}, children);
|
|
92
104
|
if (!title) {
|
|
93
105
|
return button;
|
|
@@ -40,16 +40,6 @@ export var toolbarInsertBlockMessages = defineMessages({
|
|
|
40
40
|
defaultMessage: 'Insert',
|
|
41
41
|
description: 'Insert a node into the document'
|
|
42
42
|
},
|
|
43
|
-
insertMediaFromUrl: {
|
|
44
|
-
id: 'fabric.editor.insertMediaFromUrl',
|
|
45
|
-
defaultMessage: 'Image from link',
|
|
46
|
-
description: 'Upload image from URL'
|
|
47
|
-
},
|
|
48
|
-
insertMediaFromUrlDescription: {
|
|
49
|
-
id: 'fabric.editor.insertMediaFromUrlDescription',
|
|
50
|
-
defaultMessage: 'Add an image or video from a link',
|
|
51
|
-
description: 'Upload a image to your page from external URL'
|
|
52
|
-
},
|
|
53
43
|
mediaFilesDescription: {
|
|
54
44
|
id: 'fabric.editor.mediaFiles.description',
|
|
55
45
|
defaultMessage: 'Add images and other files to your page',
|
|
@@ -26,7 +26,7 @@ export var mediaInsertMessages = defineMessages({
|
|
|
26
26
|
description: 'Error message displayed when a user tries to insert an image from a URL that cannot be loaded. This may be because the URL is invalid, there is a network error or any other reason the preview upload does not succeed. When this occurs the suggestion is to attempt downloading the linked file manually and using a local upload instead.'
|
|
27
27
|
},
|
|
28
28
|
fromUrlWarning: {
|
|
29
|
-
id: 'fabric.editor.media.insert.
|
|
29
|
+
id: 'fabric.editor.media.insert.fromUrlWarning',
|
|
30
30
|
defaultMessage: 'This image might not be visible to others due to source restrictions. Consider uploading the file instead.',
|
|
31
31
|
description: 'Warning message displayed when a user tries to insert an image from a URL that may not be visible to others due to source restrictions such as not having permissions/authentication to load the image. The suggestion is to upload the file instead.'
|
|
32
32
|
},
|
|
@@ -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 = "
|
|
10
|
+
var packageVersion = "91.0.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
|
|
@@ -11,6 +11,7 @@ import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/e
|
|
|
11
11
|
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
12
12
|
import { emojiImage, emojiSprite } from '@atlaskit/emoji';
|
|
13
13
|
import { B100, B400, B50, B75, G200, G400, G50, G75, N0, N20, N60, P100, P400, P50, P75, R100, R400, R50, R75, T100, T50, T75, Y200, Y400, Y50, Y75 } from '@atlaskit/theme/colors';
|
|
14
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
14
15
|
var lightPanelColors = {
|
|
15
16
|
info: B50,
|
|
16
17
|
note: P50,
|
|
@@ -120,7 +121,8 @@ var prefix = 'ak-editor-panel';
|
|
|
120
121
|
export var PanelSharedCssClassName = {
|
|
121
122
|
prefix: prefix,
|
|
122
123
|
content: "".concat(prefix, "__content"),
|
|
123
|
-
icon: "".concat(prefix, "__icon")
|
|
124
|
+
icon: "".concat(prefix, "__icon"),
|
|
125
|
+
noIcon: "".concat(prefix, "__no-icon")
|
|
124
126
|
};
|
|
125
127
|
export var PanelSharedSelectors = {
|
|
126
128
|
infoPanel: ".".concat(prefix, "[data-panel-type=").concat(PanelType.INFO, "]"),
|
|
@@ -162,7 +164,7 @@ var mainDynamicStyles = function mainDynamicStyles(panelType) {
|
|
|
162
164
|
|
|
163
165
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Safe to autofix with a tiny tweak to `mainDynamicStyles` being an object, but holding off…
|
|
164
166
|
export var panelSharedStylesWithoutPrefix = function panelSharedStylesWithoutPrefix() {
|
|
165
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tborder-radius: ", ";\n\tmargin: ", " 0 0;\n\tpadding-top: ", ";\n\tpadding-right: ", ";\n\tpadding-bottom: ", ";\n\tpadding-left: ", ";\n\tmin-width: ", "px;\n\tdisplay: flex;\n\tposition: relative;\n\talign-items: normal;\n\tword-break: break-word;\n\n\t", "\n\n\t.", " {\n\t\tflex-shrink: 0;\n\t\theight: ", ";\n\t\twidth: ", ";\n\t\tbox-sizing: content-box;\n\t\tpadding-right: ", ";\n\t\ttext-align: center;\n\t\tuser-select: none;\n\t\t-moz-user-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t\tmargin-top: 0.1em;\n\t\t", "\n\n\t\t> span {\n\t\t\tvertical-align: middle;\n\t\t\tdisplay: inline-flex;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\n\t\t\t// Vertical align only works for inline-block elements in Firefox\n\t\t\t@-moz-document url-prefix() {\n\t\t\t\timg {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.ak-editor-panel__content {\n\t\tmargin: ", " 0 ", ";\n\t\tflex: 1 0 0;\n\t\t/*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n\t\tmin-width: 0;\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n"])), "var(--ds-border-radius, 3px)", blockNodesVerticalMargin, "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", akEditorTableCellMinWidth, mainDynamicStyles(PanelType.INFO), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", iconDynamicStyles(PanelType.INFO), emojiSprite, panelEmojiSpriteVerticalAlignment, emojiImage, panelEmojiImageVerticalAlignment, "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", PanelType.NOTE, mainDynamicStyles(PanelType.NOTE), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.NOTE), PanelType.TIP, mainDynamicStyles(PanelType.TIP), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.TIP), PanelType.WARNING, mainDynamicStyles(PanelType.WARNING), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.WARNING), PanelType.ERROR, mainDynamicStyles(PanelType.ERROR), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.ERROR), PanelType.SUCCESS, mainDynamicStyles(PanelType.SUCCESS), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.SUCCESS));
|
|
167
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tborder-radius: ", ";\n\tmargin: ", " 0 0;\n\tpadding-top: ", ";\n\tpadding-right: ", ";\n\tpadding-bottom: ", ";\n\tpadding-left: ", ";\n\tmin-width: ", "px;\n\tdisplay: flex;\n\tposition: relative;\n\talign-items: normal;\n\tword-break: break-word;\n\n\t", "\n\n\t.", " {\n\t\tflex-shrink: 0;\n\t\theight: ", ";\n\t\twidth: ", ";\n\t\tbox-sizing: content-box;\n\t\tpadding-right: ", ";\n\t\ttext-align: center;\n\t\tuser-select: none;\n\t\t-moz-user-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t\tmargin-top: 0.1em;\n\t\t", "\n\n\t\t> span {\n\t\t\tvertical-align: middle;\n\t\t\tdisplay: inline-flex;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\t\t}\n\n\t\t.", " {\n\t\t\tvertical-align: ", "px;\n\n\t\t\t// Vertical align only works for inline-block elements in Firefox\n\t\t\t@-moz-document url-prefix() {\n\t\t\t\timg {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.ak-editor-panel__content {\n\t\tmargin: ", " 0 ", ";\n\t\tflex: 1 0 0;\n\t\t/*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n\t\tmin-width: 0;\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&[data-panel-type='", "'] {\n\t\t", "\n\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n"])), "var(--ds-border-radius, 3px)", blockNodesVerticalMargin, "var(--ds-space-100, 8px)", "var(--ds-space-200, 16px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", akEditorTableCellMinWidth, mainDynamicStyles(PanelType.INFO), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", iconDynamicStyles(PanelType.INFO), emojiSprite, panelEmojiSpriteVerticalAlignment, emojiImage, panelEmojiImageVerticalAlignment, "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", PanelType.NOTE, mainDynamicStyles(PanelType.NOTE), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.NOTE), PanelType.TIP, mainDynamicStyles(PanelType.TIP), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.TIP), PanelType.WARNING, mainDynamicStyles(PanelType.WARNING), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.WARNING), PanelType.ERROR, mainDynamicStyles(PanelType.ERROR), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.ERROR), PanelType.SUCCESS, mainDynamicStyles(PanelType.SUCCESS), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.SUCCESS), editorExperiment('nested-dnd', true) && "&.".concat(PanelSharedCssClassName.noIcon, " {\n\t\t\tpadding-right: ", "var(--ds-space-150, 12px)", ";\n\t\t\tpadding-left: ", "var(--ds-space-150, 12px)", ";\n\t\t}"));
|
|
166
168
|
};
|
|
167
169
|
export var panelSharedStyles = function panelSharedStyles() {
|
|
168
170
|
return css(_defineProperty({}, ".".concat(PanelSharedCssClassName.prefix), panelSharedStylesWithoutPrefix()));
|
|
@@ -22,7 +22,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
22
22
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
23
23
|
import Layer from '../Layer';
|
|
24
24
|
var packageName = "@atlaskit/editor-common";
|
|
25
|
-
var packageVersion = "
|
|
25
|
+
var packageVersion = "91.0.0";
|
|
26
26
|
var halfFocusRing = 1;
|
|
27
27
|
var dropOffset = '0, 8';
|
|
28
28
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -46,9 +46,15 @@ var ToolbarButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
46
46
|
ariaExpanded = props['aria-expanded'],
|
|
47
47
|
ariaPressed = props['aria-pressed'],
|
|
48
48
|
ariaKeyShortcuts = props['aria-keyshortcuts'],
|
|
49
|
+
ariaControls = props['aria-controls'],
|
|
50
|
+
dataDsLevel = props['data-ds--level'],
|
|
49
51
|
onClick = props.onClick,
|
|
50
52
|
onKeyDown = props.onKeyDown,
|
|
51
|
-
onItemClick = props.onItemClick
|
|
53
|
+
onItemClick = props.onItemClick,
|
|
54
|
+
onFocus = props.onFocus,
|
|
55
|
+
onBlur = props.onBlur,
|
|
56
|
+
onMouseEnter = props.onMouseEnter,
|
|
57
|
+
onMouseLeave = props.onMouseLeave;
|
|
52
58
|
var handleClick = useCallback(function (event, analyticsEvent) {
|
|
53
59
|
if (disabled) {
|
|
54
60
|
return;
|
|
@@ -87,11 +93,17 @@ var ToolbarButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
87
93
|
target: target,
|
|
88
94
|
shouldFitContainer: true,
|
|
89
95
|
"aria-expanded": ariaExpanded,
|
|
96
|
+
"aria-controls": ariaControls,
|
|
90
97
|
"aria-haspopup": ariaHasPopup,
|
|
91
98
|
"aria-label": ariaLabel,
|
|
92
99
|
"aria-pressed": ariaPressed,
|
|
93
100
|
"aria-keyshortcuts": ariaKeyShortcuts,
|
|
94
|
-
onKeyDown: onKeyDown
|
|
101
|
+
onKeyDown: onKeyDown,
|
|
102
|
+
onFocus: onFocus,
|
|
103
|
+
onBlur: onBlur,
|
|
104
|
+
onMouseEnter: onMouseEnter,
|
|
105
|
+
onMouseLeave: onMouseLeave,
|
|
106
|
+
"data-ds--level": dataDsLevel
|
|
95
107
|
}, children);
|
|
96
108
|
if (!title) {
|
|
97
109
|
return button;
|
|
@@ -39,16 +39,6 @@ export declare const toolbarInsertBlockMessages: {
|
|
|
39
39
|
defaultMessage: string;
|
|
40
40
|
description: string;
|
|
41
41
|
};
|
|
42
|
-
insertMediaFromUrl: {
|
|
43
|
-
id: string;
|
|
44
|
-
defaultMessage: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
insertMediaFromUrlDescription: {
|
|
48
|
-
id: string;
|
|
49
|
-
defaultMessage: string;
|
|
50
|
-
description: string;
|
|
51
|
-
};
|
|
52
42
|
mediaFilesDescription: {
|
|
53
43
|
id: string;
|
|
54
44
|
defaultMessage: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { EditorActionsOptions as EditorActions } from '../../types';
|
|
3
2
|
import type { ArrowKeyNavigationProviderOptions } from '../ArrowKeyNavigationProvider/types';
|
|
4
3
|
type SectionOptions = {
|
|
5
4
|
hasSeparator?: boolean;
|
|
@@ -52,7 +51,7 @@ export interface MenuItem {
|
|
|
52
51
|
'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
|
|
53
52
|
'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
|
|
54
53
|
'data-testid'?: string;
|
|
55
|
-
onClick?: (
|
|
54
|
+
onClick?: () => void;
|
|
56
55
|
'aria-expanded'?: React.AriaAttributes['aria-expanded'];
|
|
57
56
|
wrapperTabIndex?: number | null;
|
|
58
57
|
}
|
|
@@ -33,7 +33,8 @@ export type Props = {
|
|
|
33
33
|
'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
|
|
34
34
|
'aria-pressed'?: React.AriaAttributes['aria-pressed'];
|
|
35
35
|
'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
|
|
36
|
-
|
|
36
|
+
'data-ds--level'?: string;
|
|
37
|
+
} & Pick<ButtonProps, 'aria-label' | 'children' | 'onFocus' | 'onBlur' | 'onMouseEnter' | 'onMouseLeave' | 'aria-controls'>;
|
|
37
38
|
export type ToolbarButtonRef = HTMLElement;
|
|
38
39
|
declare const ToolbarButton: React.ForwardRefExoticComponent<{
|
|
39
40
|
buttonId?: TOOLBAR_ACTION_SUBJECT_ID | undefined;
|
|
@@ -59,5 +60,6 @@ declare const ToolbarButton: React.ForwardRefExoticComponent<{
|
|
|
59
60
|
'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
|
|
60
61
|
'aria-pressed'?: React.AriaAttributes['aria-pressed'];
|
|
61
62
|
'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
|
|
62
|
-
|
|
63
|
+
'data-ds--level'?: string | undefined;
|
|
64
|
+
} & Pick<ButtonProps, "onFocus" | "onBlur" | "children" | "aria-controls" | "aria-label" | "onMouseEnter" | "onMouseLeave"> & React.RefAttributes<HTMLElement>>;
|
|
63
65
|
export default ToolbarButton;
|
|
@@ -39,16 +39,6 @@ export declare const toolbarInsertBlockMessages: {
|
|
|
39
39
|
defaultMessage: string;
|
|
40
40
|
description: string;
|
|
41
41
|
};
|
|
42
|
-
insertMediaFromUrl: {
|
|
43
|
-
id: string;
|
|
44
|
-
defaultMessage: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
insertMediaFromUrlDescription: {
|
|
48
|
-
id: string;
|
|
49
|
-
defaultMessage: string;
|
|
50
|
-
description: string;
|
|
51
|
-
};
|
|
52
42
|
mediaFilesDescription: {
|
|
53
43
|
id: string;
|
|
54
44
|
defaultMessage: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { EditorActionsOptions as EditorActions } from '../../types';
|
|
3
2
|
import type { ArrowKeyNavigationProviderOptions } from '../ArrowKeyNavigationProvider/types';
|
|
4
3
|
type SectionOptions = {
|
|
5
4
|
hasSeparator?: boolean;
|
|
@@ -52,7 +51,7 @@ export interface MenuItem {
|
|
|
52
51
|
'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
|
|
53
52
|
'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
|
|
54
53
|
'data-testid'?: string;
|
|
55
|
-
onClick?: (
|
|
54
|
+
onClick?: () => void;
|
|
56
55
|
'aria-expanded'?: React.AriaAttributes['aria-expanded'];
|
|
57
56
|
wrapperTabIndex?: number | null;
|
|
58
57
|
}
|
|
@@ -33,7 +33,8 @@ export type Props = {
|
|
|
33
33
|
'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
|
|
34
34
|
'aria-pressed'?: React.AriaAttributes['aria-pressed'];
|
|
35
35
|
'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
|
|
36
|
-
|
|
36
|
+
'data-ds--level'?: string;
|
|
37
|
+
} & Pick<ButtonProps, 'aria-label' | 'children' | 'onFocus' | 'onBlur' | 'onMouseEnter' | 'onMouseLeave' | 'aria-controls'>;
|
|
37
38
|
export type ToolbarButtonRef = HTMLElement;
|
|
38
39
|
declare const ToolbarButton: React.ForwardRefExoticComponent<{
|
|
39
40
|
buttonId?: TOOLBAR_ACTION_SUBJECT_ID | undefined;
|
|
@@ -59,5 +60,6 @@ declare const ToolbarButton: React.ForwardRefExoticComponent<{
|
|
|
59
60
|
'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
|
|
60
61
|
'aria-pressed'?: React.AriaAttributes['aria-pressed'];
|
|
61
62
|
'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
|
|
62
|
-
|
|
63
|
+
'data-ds--level'?: string | undefined;
|
|
64
|
+
} & Pick<ButtonProps, "onFocus" | "onBlur" | "children" | "aria-controls" | "aria-label" | "onMouseEnter" | "onMouseLeave"> & React.RefAttributes<HTMLElement>>;
|
|
63
65
|
export default ToolbarButton;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "91.0.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"@atlaskit/textfield": "^6.5.0",
|
|
151
151
|
"@atlaskit/theme": "^13.0.0",
|
|
152
152
|
"@atlaskit/tmp-editor-statsig": "*",
|
|
153
|
-
"@atlaskit/tokens": "^1.
|
|
153
|
+
"@atlaskit/tokens": "^1.61.0",
|
|
154
154
|
"@atlaskit/tooltip": "^18.7.0",
|
|
155
155
|
"@atlaskit/ufo": "^0.3.0",
|
|
156
156
|
"@atlaskit/width-detector": "^4.3.0",
|