@atlaskit/editor-shared-styles 3.3.1 → 3.4.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 +8 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +3 -0
- package/afm-post-office/tsconfig.json +3 -0
- package/dist/cjs/consts/consts.js +10 -1
- package/dist/cjs/shortcut/shortcut.js +4 -0
- package/dist/es2019/consts/consts.js +12 -1
- package/dist/es2019/shortcut/shortcut.js +4 -0
- package/dist/esm/consts/consts.js +10 -1
- package/dist/esm/shortcut/shortcut.js +4 -0
- package/dist/types/shortcut/shortcut.d.ts +4 -0
- package/dist/types-ts4.5/shortcut/shortcut.d.ts +4 -0
- package/package.json +3 -2
- package/src/consts/consts.ts +10 -2
- package/src/shortcut/shortcut.ts +4 -0
- package/tsconfig.app.json +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-shared-styles
|
|
2
2
|
|
|
3
|
+
## 3.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#117777](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/117777)
|
|
8
|
+
[`6d31e7761757c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6d31e7761757c) -
|
|
9
|
+
[ux] ED-26722 Update header area spacing to avoid layout shift when hiding top toolbar
|
|
10
|
+
|
|
3
11
|
## 3.3.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
package/afm-jira/tsconfig.json
CHANGED
|
@@ -9,6 +9,7 @@ exports.getTableCellBackgroundDarkModeColorCSS = getTableCellBackgroundDarkModeC
|
|
|
9
9
|
exports.relativeSize = exports.relativeFontSizeToBase16 = exports.participantColors = exports.layoutBreakpointWidth = exports.gridMediumMaxWidth = exports.getTableCellBackgroundDarkModeColors = void 0;
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
12
13
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
13
14
|
|
|
14
15
|
var akEditorFullPageDefaultFontSize = exports.akEditorFullPageDefaultFontSize = 16;
|
|
@@ -102,7 +103,15 @@ var MAX_BROWSER_SCROLLBAR_HEIGHT = exports.MAX_BROWSER_SCROLLBAR_HEIGHT = 20;
|
|
|
102
103
|
var ATLASSIAN_NAVIGATION_HEIGHT = exports.ATLASSIAN_NAVIGATION_HEIGHT = '56px';
|
|
103
104
|
var DEFAULT_FONT_SIZE = 14;
|
|
104
105
|
var FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = exports.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = function FULL_PAGE_EDITOR_TOOLBAR_HEIGHT() {
|
|
105
|
-
|
|
106
|
+
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'variant1', {
|
|
107
|
+
exposure: true
|
|
108
|
+
})) {
|
|
109
|
+
return "var(--ds-space-500, 40px)";
|
|
110
|
+
}
|
|
111
|
+
if ((0, _platformFeatureFlags.fg)('live_pages_content_jump_mitigation')) {
|
|
112
|
+
return '2.188rem';
|
|
113
|
+
}
|
|
114
|
+
return "var(--ds-space-500, 40px)";
|
|
106
115
|
};
|
|
107
116
|
var akEditorSelectedNodeClassName = exports.akEditorSelectedNodeClassName = 'ak-editor-selected-node';
|
|
108
117
|
var editorFontSize = exports.editorFontSize = function editorFontSize(_ref) {
|
|
@@ -9,5 +9,9 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _consts = require("../consts");
|
|
11
11
|
var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
|
+
/**
|
|
13
|
+
* @private
|
|
14
|
+
* @deprecated use `import { Shortcut } from '@atlaskit/editor-common/ui';` instead
|
|
15
|
+
*/
|
|
12
16
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
13
17
|
var shortcutStyle = exports.shortcutStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tbackground-color: ", ";\n\tcolor: ", ";\n\tborder-radius: ", ";\n\tpadding: ", ";\n\tline-height: 12px;\n\tfont-size: ", ";\n\talign-self: flex-end;\n\t@media (max-width: ", "px) {\n\t\tdisplay: none;\n\t}\n"])), "var(--ds-background-neutral, #091E420F)", "var(--ds-text-subtle, #44546F)", "var(--ds-border-radius, 3px)", "var(--ds-space-050, 4px)", (0, _consts.relativeFontSizeToBase16)(11.67), _consts.akEditorMobileMaxWidth);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
2
3
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
3
4
|
|
|
4
5
|
export const akEditorFullPageDefaultFontSize = 16;
|
|
@@ -89,7 +90,17 @@ export const MAX_BROWSER_SCROLLBAR_HEIGHT = 20;
|
|
|
89
90
|
// @deprecated
|
|
90
91
|
export const ATLASSIAN_NAVIGATION_HEIGHT = '56px';
|
|
91
92
|
const DEFAULT_FONT_SIZE = 14;
|
|
92
|
-
export const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = () =>
|
|
93
|
+
export const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = () => {
|
|
94
|
+
if (editorExperiment('platform_editor_controls', 'variant1', {
|
|
95
|
+
exposure: true
|
|
96
|
+
})) {
|
|
97
|
+
return "var(--ds-space-500, 40px)";
|
|
98
|
+
}
|
|
99
|
+
if (fg('live_pages_content_jump_mitigation')) {
|
|
100
|
+
return '2.188rem';
|
|
101
|
+
}
|
|
102
|
+
return "var(--ds-space-500, 40px)";
|
|
103
|
+
};
|
|
93
104
|
export const akEditorSelectedNodeClassName = 'ak-editor-selected-node';
|
|
94
105
|
export const editorFontSize = ({
|
|
95
106
|
theme
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { akEditorMobileMaxWidth, relativeFontSizeToBase16 } from '../consts';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @private
|
|
7
|
+
* @deprecated use `import { Shortcut } from '@atlaskit/editor-common/ui';` instead
|
|
8
|
+
*/
|
|
5
9
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
6
10
|
export const shortcutStyle = css`
|
|
7
11
|
background-color: ${"var(--ds-background-neutral, #091E420F)"};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
4
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
5
|
|
|
5
6
|
export var akEditorFullPageDefaultFontSize = 16;
|
|
@@ -93,7 +94,15 @@ export var MAX_BROWSER_SCROLLBAR_HEIGHT = 20;
|
|
|
93
94
|
export var ATLASSIAN_NAVIGATION_HEIGHT = '56px';
|
|
94
95
|
var DEFAULT_FONT_SIZE = 14;
|
|
95
96
|
export var FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = function FULL_PAGE_EDITOR_TOOLBAR_HEIGHT() {
|
|
96
|
-
|
|
97
|
+
if (editorExperiment('platform_editor_controls', 'variant1', {
|
|
98
|
+
exposure: true
|
|
99
|
+
})) {
|
|
100
|
+
return "var(--ds-space-500, 40px)";
|
|
101
|
+
}
|
|
102
|
+
if (fg('live_pages_content_jump_mitigation')) {
|
|
103
|
+
return '2.188rem';
|
|
104
|
+
}
|
|
105
|
+
return "var(--ds-space-500, 40px)";
|
|
97
106
|
};
|
|
98
107
|
export var akEditorSelectedNodeClassName = 'ak-editor-selected-node';
|
|
99
108
|
export var editorFontSize = function editorFontSize(_ref) {
|
|
@@ -4,5 +4,9 @@ var _templateObject;
|
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
5
|
import { akEditorMobileMaxWidth, relativeFontSizeToBase16 } from '../consts';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* @private
|
|
9
|
+
* @deprecated use `import { Shortcut } from '@atlaskit/editor-common/ui';` instead
|
|
10
|
+
*/
|
|
7
11
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
8
12
|
export var shortcutStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tbackground-color: ", ";\n\tcolor: ", ";\n\tborder-radius: ", ";\n\tpadding: ", ";\n\tline-height: 12px;\n\tfont-size: ", ";\n\talign-self: flex-end;\n\t@media (max-width: ", "px) {\n\t\tdisplay: none;\n\t}\n"])), "var(--ds-background-neutral, #091E420F)", "var(--ds-text-subtle, #44546F)", "var(--ds-border-radius, 3px)", "var(--ds-space-050, 4px)", relativeFontSizeToBase16(11.67), akEditorMobileMaxWidth);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-shared-styles",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Style values used in the editor/renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
45
|
-
"@atlaskit/
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^3.2.0",
|
|
46
|
+
"@atlaskit/tokens": "^4.2.0",
|
|
46
47
|
"@babel/runtime": "^7.0.0",
|
|
47
48
|
"@emotion/react": "^11.7.1"
|
|
48
49
|
},
|
package/src/consts/consts.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
2
3
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
3
4
|
import { token } from '@atlaskit/tokens';
|
|
4
5
|
|
|
@@ -103,8 +104,15 @@ export const ATLASSIAN_NAVIGATION_HEIGHT = '56px';
|
|
|
103
104
|
|
|
104
105
|
const DEFAULT_FONT_SIZE = 14;
|
|
105
106
|
|
|
106
|
-
export const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = () =>
|
|
107
|
-
|
|
107
|
+
export const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = () => {
|
|
108
|
+
if (editorExperiment('platform_editor_controls', 'variant1', { exposure: true })) {
|
|
109
|
+
return token('space.500', '40px');
|
|
110
|
+
}
|
|
111
|
+
if (fg('live_pages_content_jump_mitigation')) {
|
|
112
|
+
return '2.188rem';
|
|
113
|
+
}
|
|
114
|
+
return token('space.500', '40px');
|
|
115
|
+
};
|
|
108
116
|
|
|
109
117
|
export const akEditorSelectedNodeClassName = 'ak-editor-selected-node';
|
|
110
118
|
|
package/src/shortcut/shortcut.ts
CHANGED
|
@@ -5,6 +5,10 @@ import { token } from '@atlaskit/tokens';
|
|
|
5
5
|
|
|
6
6
|
import { akEditorMobileMaxWidth, relativeFontSizeToBase16 } from '../consts';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @private
|
|
10
|
+
* @deprecated use `import { Shortcut } from '@atlaskit/editor-common/ui';` instead
|
|
11
|
+
*/
|
|
8
12
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
9
13
|
export const shortcutStyle = css`
|
|
10
14
|
background-color: ${token('color.background.neutral')};
|