@atlaskit/editor-plugin-help-dialog 1.8.11 → 1.8.13
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/formatting.js +223 -130
- package/dist/cjs/ui/styles.js +1 -37
- package/dist/cjs/ui/utils.js +50 -22
- package/dist/es2019/ui/formatting.js +224 -131
- package/dist/es2019/ui/styles.js +0 -36
- package/dist/es2019/ui/utils.js +51 -23
- package/dist/esm/ui/formatting.js +224 -131
- package/dist/esm/ui/styles.js +0 -36
- package/dist/esm/ui/utils.js +51 -23
- package/dist/types/ui/styles.d.ts +0 -3
- package/dist/types-ts4.5/ui/styles.d.ts +0 -3
- package/package.json +5 -5
package/dist/esm/ui/utils.js
CHANGED
|
@@ -5,7 +5,35 @@
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
7
7
|
import { browser } from '@atlaskit/editor-common/browser';
|
|
8
|
-
import {
|
|
8
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
9
|
+
import { componentFromKeymapWrapperStyles } from './styles';
|
|
10
|
+
var codeLg = xcss({
|
|
11
|
+
borderRadius: 'border.radius',
|
|
12
|
+
display: 'inline-block',
|
|
13
|
+
height: "var(--ds-space-300, 24px)",
|
|
14
|
+
lineHeight: "var(--ds-space-300, 24px)",
|
|
15
|
+
textAlign: 'center',
|
|
16
|
+
paddingInline: 'space.150',
|
|
17
|
+
backgroundColor: 'color.background.neutral'
|
|
18
|
+
});
|
|
19
|
+
var codeMd = xcss({
|
|
20
|
+
backgroundColor: 'color.background.neutral',
|
|
21
|
+
borderRadius: 'border.radius',
|
|
22
|
+
display: 'inline-block',
|
|
23
|
+
height: "var(--ds-space-300, 24px)",
|
|
24
|
+
lineHeight: "var(--ds-space-300, 24px)",
|
|
25
|
+
width: '50px',
|
|
26
|
+
textAlign: 'center'
|
|
27
|
+
});
|
|
28
|
+
var codeSm = xcss({
|
|
29
|
+
backgroundColor: 'color.background.neutral',
|
|
30
|
+
borderRadius: 'border.radius',
|
|
31
|
+
width: "var(--ds-space-300, 24px)",
|
|
32
|
+
display: 'inline-block',
|
|
33
|
+
height: "var(--ds-space-300, 24px)",
|
|
34
|
+
lineHeight: "var(--ds-space-300, 24px)",
|
|
35
|
+
textAlign: 'center'
|
|
36
|
+
});
|
|
9
37
|
var getKeyParts = function getKeyParts(keymap) {
|
|
10
38
|
var shortcut = keymap[browser.mac ? 'mac' : 'windows'];
|
|
11
39
|
if (browser.mac) {
|
|
@@ -22,47 +50,47 @@ export var getComponentFromKeymap = function getComponentFromKeymap(keymap) {
|
|
|
22
50
|
css: componentFromKeymapWrapperStyles
|
|
23
51
|
}, keyParts.map(function (part, index) {
|
|
24
52
|
if (part === '+') {
|
|
25
|
-
return jsx(
|
|
53
|
+
return jsx(Box, {
|
|
54
|
+
as: "span",
|
|
26
55
|
key: "".concat(keyParts, "-").concat(index)
|
|
27
56
|
}, ' + ');
|
|
28
57
|
} else if (part === 'Cmd') {
|
|
29
|
-
return (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}, "\u2318")
|
|
35
|
-
);
|
|
58
|
+
return jsx(Box, {
|
|
59
|
+
as: "span",
|
|
60
|
+
xcss: codeSm,
|
|
61
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
62
|
+
}, "\u2318");
|
|
36
63
|
} else if (['ctrl', 'alt', 'opt', 'shift'].indexOf(part.toLowerCase()) >= 0) {
|
|
37
64
|
return (
|
|
38
65
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
39
|
-
jsx(
|
|
40
|
-
|
|
66
|
+
jsx(Box, {
|
|
67
|
+
as: "span",
|
|
68
|
+
xcss: codeMd,
|
|
41
69
|
key: "".concat(keyParts, "-").concat(index)
|
|
42
70
|
}, part)
|
|
43
71
|
);
|
|
44
72
|
} else if (['f9', 'f10'].indexOf(part.toLowerCase()) >= 0) {
|
|
45
73
|
return (
|
|
46
74
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
47
|
-
jsx(
|
|
48
|
-
|
|
75
|
+
jsx(Box, {
|
|
76
|
+
as: "span",
|
|
77
|
+
xcss: codeLg,
|
|
49
78
|
key: "".concat(keyParts, "-").concat(index)
|
|
50
79
|
}, part)
|
|
51
80
|
);
|
|
52
81
|
} else if (part.toLowerCase() === 'enter') {
|
|
53
|
-
return (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, '⏎')
|
|
60
|
-
);
|
|
82
|
+
return jsx(Box, {
|
|
83
|
+
as: "span",
|
|
84
|
+
"data-editor-help-dialog-enter-keymap": "true",
|
|
85
|
+
xcss: codeSm,
|
|
86
|
+
key: "".concat(keyParts, "-").concat(index)
|
|
87
|
+
}, '⏎');
|
|
61
88
|
}
|
|
62
89
|
return (
|
|
63
90
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
64
|
-
jsx(
|
|
65
|
-
|
|
91
|
+
jsx(Box, {
|
|
92
|
+
as: "span",
|
|
93
|
+
xcss: codeSm,
|
|
66
94
|
key: "".concat(keyParts, "-").concat(index)
|
|
67
95
|
}, part.toUpperCase())
|
|
68
96
|
);
|
|
@@ -19,9 +19,6 @@ export declare const dialogHeader: {
|
|
|
19
19
|
lineHeight: number;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
export declare const codeSm: import("@emotion/react").SerializedStyles;
|
|
23
|
-
export declare const codeMd: import("@emotion/react").SerializedStyles;
|
|
24
|
-
export declare const codeLg: import("@emotion/react").SerializedStyles;
|
|
25
22
|
export declare const shortcutsArray: import("@emotion/react").SerializedStyles;
|
|
26
23
|
export declare const componentFromKeymapWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
27
24
|
export declare const toolbarButton: import("@emotion/react").SerializedStyles;
|
|
@@ -19,9 +19,6 @@ export declare const dialogHeader: {
|
|
|
19
19
|
lineHeight: number;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
export declare const codeSm: import("@emotion/react").SerializedStyles;
|
|
23
|
-
export declare const codeMd: import("@emotion/react").SerializedStyles;
|
|
24
|
-
export declare const codeLg: import("@emotion/react").SerializedStyles;
|
|
25
22
|
export declare const shortcutsArray: import("@emotion/react").SerializedStyles;
|
|
26
23
|
export declare const componentFromKeymapWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
27
24
|
export declare const toolbarButton: import("@emotion/react").SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-help-dialog",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.13",
|
|
4
4
|
"description": "Help Dialog plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^93.
|
|
35
|
-
"@atlaskit/editor-plugin-analytics": "^1.
|
|
34
|
+
"@atlaskit/editor-common": "^93.6.0",
|
|
35
|
+
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
36
36
|
"@atlaskit/editor-plugin-quick-insert": "^1.4.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "6.0.0",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^3.0.0",
|
|
39
39
|
"@atlaskit/heading": "^2.4.0",
|
|
40
|
-
"@atlaskit/icon": "^22.
|
|
40
|
+
"@atlaskit/icon": "^22.22.0",
|
|
41
41
|
"@atlaskit/modal-dialog": "^12.17.0",
|
|
42
42
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
43
43
|
"@atlaskit/primitives": "^12.2.0",
|
|
44
|
-
"@atlaskit/theme": "^
|
|
44
|
+
"@atlaskit/theme": "^14.0.0",
|
|
45
45
|
"@atlaskit/tokens": "^2.0.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|
|
47
47
|
"@emotion/react": "^11.7.1",
|