@atlaskit/editor-plugin-floating-toolbar 0.7.19 → 0.7.21
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 +14 -0
- package/dist/cjs/ui/Toolbar.js +4 -14
- package/dist/es2019/ui/Toolbar.js +4 -14
- package/dist/esm/ui/Toolbar.js +4 -14
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.7.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#65031](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65031) [`a00094111b5a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a00094111b5a) - ED-21609 Update adf-schema to 35.3.0
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 0.7.20
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#61923](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61923) [`04e38cfe9e90`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/04e38cfe9e90) - Remove legacy theming logic from all Editor plugin packages. Theming is still available via the @atlaskit/tokens package.
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 0.7.19
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -25,9 +25,6 @@ var _uiColor = require("@atlaskit/editor-common/ui-color");
|
|
|
25
25
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
26
26
|
var _editorPalette = require("@atlaskit/editor-palette");
|
|
27
27
|
var _commands = require("@atlaskit/editor-plugin-table/commands");
|
|
28
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
29
|
-
var _components = require("@atlaskit/theme/components");
|
|
30
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
31
28
|
var _forceFocus = require("../pm-plugins/force-focus");
|
|
32
29
|
var _commands2 = require("../pm-plugins/toolbar-data/commands");
|
|
33
30
|
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
@@ -40,8 +37,6 @@ var _Select = _interopRequireDefault(require("./Select"));
|
|
|
40
37
|
var _Separator = _interopRequireDefault(require("./Separator"));
|
|
41
38
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
|
42
39
|
/** @jsx jsx */
|
|
43
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
44
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
45
40
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
46
41
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
47
42
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
@@ -251,11 +246,8 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
251
246
|
});
|
|
252
247
|
|
|
253
248
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
254
|
-
var toolbarContainer = function toolbarContainer(
|
|
255
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "
|
|
256
|
-
light: "var(--ds-surface-overlay, white)",
|
|
257
|
-
dark: "var(--ds-surface-overlay, ".concat(_colors.DN70, ")")
|
|
258
|
-
})(theme), (0, _constants.borderRadius)(), "var(--ds-shadow-overlay, ".concat("0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)", ")"), scrollable ? (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n overflow: hidden;\n "])), hasSelect ? (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n height: 40px;\n "]))) : (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n height: 32px;\n "])))) : (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", " ", ";\n ", "\n "])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", firstElementIsSelect && (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: ", ";\n "])), "var(--ds-space-050, 4px)")));
|
|
249
|
+
var toolbarContainer = function toolbarContainer(scrollable, hasSelect, firstElementIsSelect) {
|
|
250
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n display: flex;\n line-height: 1;\n box-sizing: border-box;\n\n & > div > div {\n align-items: center;\n }\n ", "\n"])), "var(--ds-surface-overlay, white)", "var(--ds-border-radius, 3px)", "var(--ds-shadow-overlay, ".concat("0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)", ")"), scrollable ? (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n overflow: hidden;\n "])), hasSelect ? (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n height: 40px;\n "]))) : (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n height: 32px;\n "])))) : (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", " ", ";\n ", "\n "])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", firstElementIsSelect && (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: ", ";\n "])), "var(--ds-space-050, 4px)")));
|
|
259
251
|
};
|
|
260
252
|
|
|
261
253
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -399,10 +391,8 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
399
391
|
intl: intl
|
|
400
392
|
}, (0, _react2.jsx)("div", {
|
|
401
393
|
ref: this.toolbarContainerRef,
|
|
402
|
-
css: function css(
|
|
403
|
-
return [toolbarContainer(
|
|
404
|
-
theme: theme
|
|
405
|
-
}, scrollable, hasSelect !== undefined, firstElementIsSelect)];
|
|
394
|
+
css: function css() {
|
|
395
|
+
return [toolbarContainer(scrollable, hasSelect !== undefined, firstElementIsSelect)];
|
|
406
396
|
},
|
|
407
397
|
"aria-label": intl.formatMessage(_messages.default.floatingToolbarAriaLabel),
|
|
408
398
|
role: "toolbar",
|
|
@@ -12,11 +12,6 @@ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-me
|
|
|
12
12
|
import { ColorPickerButton } from '@atlaskit/editor-common/ui-menu';
|
|
13
13
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
14
14
|
import { clearHoverSelection } from '@atlaskit/editor-plugin-table/commands';
|
|
15
|
-
import { DN70 } from '@atlaskit/theme/colors';
|
|
16
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
17
|
-
import { themed } from '@atlaskit/theme/components';
|
|
18
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
19
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
20
15
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
21
16
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
22
17
|
import Dropdown from './Dropdown';
|
|
@@ -216,12 +211,9 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
|
216
211
|
});
|
|
217
212
|
|
|
218
213
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
219
|
-
const toolbarContainer = (
|
|
220
|
-
background-color: ${
|
|
221
|
-
|
|
222
|
-
dark: `var(--ds-surface-overlay, ${DN70})`
|
|
223
|
-
})(theme)};
|
|
224
|
-
border-radius: ${borderRadius()}px;
|
|
214
|
+
const toolbarContainer = (scrollable, hasSelect, firstElementIsSelect) => css`
|
|
215
|
+
background-color: ${"var(--ds-surface-overlay, white)"};
|
|
216
|
+
border-radius: ${"var(--ds-border-radius, 3px)"};
|
|
225
217
|
box-shadow: ${`var(--ds-shadow-overlay, ${`0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)`})`};
|
|
226
218
|
display: flex;
|
|
227
219
|
line-height: 1;
|
|
@@ -396,9 +388,7 @@ class Toolbar extends Component {
|
|
|
396
388
|
intl: intl
|
|
397
389
|
}, jsx("div", {
|
|
398
390
|
ref: this.toolbarContainerRef,
|
|
399
|
-
css:
|
|
400
|
-
theme
|
|
401
|
-
}, scrollable, hasSelect !== undefined, firstElementIsSelect)],
|
|
391
|
+
css: () => [toolbarContainer(scrollable, hasSelect !== undefined, firstElementIsSelect)],
|
|
402
392
|
"aria-label": intl.formatMessage(messages.floatingToolbarAriaLabel),
|
|
403
393
|
role: "toolbar",
|
|
404
394
|
"data-testid": "editor-floating-toolbar",
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -22,11 +22,6 @@ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-me
|
|
|
22
22
|
import { ColorPickerButton } from '@atlaskit/editor-common/ui-menu';
|
|
23
23
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
24
24
|
import { clearHoverSelection } from '@atlaskit/editor-plugin-table/commands';
|
|
25
|
-
import { DN70 } from '@atlaskit/theme/colors';
|
|
26
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
27
|
-
import { themed } from '@atlaskit/theme/components';
|
|
28
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
29
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
30
25
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
31
26
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
32
27
|
import Dropdown from './Dropdown';
|
|
@@ -242,11 +237,8 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
242
237
|
});
|
|
243
238
|
|
|
244
239
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
245
|
-
var toolbarContainer = function toolbarContainer(
|
|
246
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "
|
|
247
|
-
light: "var(--ds-surface-overlay, white)",
|
|
248
|
-
dark: "var(--ds-surface-overlay, ".concat(DN70, ")")
|
|
249
|
-
})(theme), borderRadius(), "var(--ds-shadow-overlay, ".concat("0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)", ")"), scrollable ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n overflow: hidden;\n "])), hasSelect ? css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 40px;\n "]))) : css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 32px;\n "])))) : css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n ", "\n "])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", firstElementIsSelect && css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding-left: ", ";\n "])), "var(--ds-space-050, 4px)")));
|
|
240
|
+
var toolbarContainer = function toolbarContainer(scrollable, hasSelect, firstElementIsSelect) {
|
|
241
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n display: flex;\n line-height: 1;\n box-sizing: border-box;\n\n & > div > div {\n align-items: center;\n }\n ", "\n"])), "var(--ds-surface-overlay, white)", "var(--ds-border-radius, 3px)", "var(--ds-shadow-overlay, ".concat("0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)", ")"), scrollable ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n overflow: hidden;\n "])), hasSelect ? css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 40px;\n "]))) : css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 32px;\n "])))) : css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n ", "\n "])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", firstElementIsSelect && css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding-left: ", ";\n "])), "var(--ds-space-050, 4px)")));
|
|
250
242
|
};
|
|
251
243
|
|
|
252
244
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -390,10 +382,8 @@ var Toolbar = /*#__PURE__*/function (_Component) {
|
|
|
390
382
|
intl: intl
|
|
391
383
|
}, jsx("div", {
|
|
392
384
|
ref: this.toolbarContainerRef,
|
|
393
|
-
css: function css(
|
|
394
|
-
return [toolbarContainer(
|
|
395
|
-
theme: theme
|
|
396
|
-
}, scrollable, hasSelect !== undefined, firstElementIsSelect)];
|
|
385
|
+
css: function css() {
|
|
386
|
+
return [toolbarContainer(scrollable, hasSelect !== undefined, firstElementIsSelect)];
|
|
397
387
|
},
|
|
398
388
|
"aria-label": intl.formatMessage(messages.floatingToolbarAriaLabel),
|
|
399
389
|
role: "toolbar",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.21",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"atlassian": {
|
|
11
11
|
"team": "Editor: Lego",
|
|
12
12
|
"singleton": true,
|
|
13
|
-
"releaseModel": "continuous"
|
|
13
|
+
"releaseModel": "continuous",
|
|
14
|
+
"runReact18": false
|
|
14
15
|
},
|
|
15
16
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
16
17
|
"main": "dist/cjs/index.js",
|
|
@@ -23,11 +24,11 @@
|
|
|
23
24
|
".": "./src/index.ts"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
26
|
-
"@atlaskit/adf-schema": "^35.
|
|
27
|
+
"@atlaskit/adf-schema": "^35.3.0",
|
|
27
28
|
"@atlaskit/adf-utils": "^19.0.0",
|
|
28
|
-
"@atlaskit/button": "^17.
|
|
29
|
+
"@atlaskit/button": "^17.2.0",
|
|
29
30
|
"@atlaskit/checkbox": "^13.0.0",
|
|
30
|
-
"@atlaskit/editor-common": "^76.
|
|
31
|
+
"@atlaskit/editor-common": "^76.35.0",
|
|
31
32
|
"@atlaskit/editor-palette": "1.5.2",
|
|
32
33
|
"@atlaskit/editor-plugin-context-panel": "^0.2.0",
|
|
33
34
|
"@atlaskit/editor-plugin-copy-button": "^1.0.0",
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
"@atlaskit/editor-plugin-editor-disabled": "^0.2.0",
|
|
36
37
|
"@atlaskit/editor-plugin-extension": "^0.4.0",
|
|
37
38
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
38
|
-
"@atlaskit/editor-plugin-table": "^5.
|
|
39
|
+
"@atlaskit/editor-plugin-table": "^5.7.0",
|
|
39
40
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
40
41
|
"@atlaskit/emoji": "^67.6.0",
|
|
41
42
|
"@atlaskit/icon": "^22.0.0",
|
|
@@ -43,8 +44,8 @@
|
|
|
43
44
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
44
45
|
"@atlaskit/select": "^17.0.3",
|
|
45
46
|
"@atlaskit/theme": "^12.6.0",
|
|
46
|
-
"@atlaskit/tokens": "^1.
|
|
47
|
-
"@atlaskit/tooltip": "^18.
|
|
47
|
+
"@atlaskit/tokens": "^1.33.0",
|
|
48
|
+
"@atlaskit/tooltip": "^18.1.0",
|
|
48
49
|
"@babel/runtime": "^7.0.0",
|
|
49
50
|
"@emotion/react": "^11.7.1",
|
|
50
51
|
"lodash": "^4.17.21",
|