@atlaskit/editor-shared-styles 3.2.2 → 3.2.4
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 +12 -0
- package/dist/cjs/consts/consts.js +1 -1
- package/dist/es2019/consts/consts.js +1 -1
- package/dist/esm/consts/consts.js +1 -1
- package/dist/types/consts/consts.d.ts +1 -1
- package/dist/types-ts4.5/consts/consts.d.ts +1 -1
- package/package.json +6 -3
- package/src/consts/consts.test.ts +2 -0
- package/src/consts/consts.ts +2 -1
- package/src/selection/__tests__/unit/utils.ts +8 -0
- package/tsconfig.app.json +0 -1
- package/tsconfig.dev.json +0 -1
- package/tsconfig.json +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -102,7 +102,7 @@ var MAX_BROWSER_SCROLLBAR_HEIGHT = exports.MAX_BROWSER_SCROLLBAR_HEIGHT = 20;
|
|
|
102
102
|
var ATLASSIAN_NAVIGATION_HEIGHT = exports.ATLASSIAN_NAVIGATION_HEIGHT = '56px';
|
|
103
103
|
var DEFAULT_FONT_SIZE = 14;
|
|
104
104
|
var FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = exports.FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = function FULL_PAGE_EDITOR_TOOLBAR_HEIGHT() {
|
|
105
|
-
return "var(--ds-space-500, 40px)";
|
|
105
|
+
return (0, _platformFeatureFlags.fg)('live_pages_content_jump_mitigation') ? '2.188rem' : "var(--ds-space-500, 40px)";
|
|
106
106
|
};
|
|
107
107
|
var akEditorSelectedNodeClassName = exports.akEditorSelectedNodeClassName = 'ak-editor-selected-node';
|
|
108
108
|
var editorFontSize = exports.editorFontSize = function editorFontSize(_ref) {
|
|
@@ -89,7 +89,7 @@ export const MAX_BROWSER_SCROLLBAR_HEIGHT = 20;
|
|
|
89
89
|
// @deprecated
|
|
90
90
|
export const ATLASSIAN_NAVIGATION_HEIGHT = '56px';
|
|
91
91
|
const DEFAULT_FONT_SIZE = 14;
|
|
92
|
-
export const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = () => "var(--ds-space-500, 40px)";
|
|
92
|
+
export const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = () => fg('live_pages_content_jump_mitigation') ? '2.188rem' : "var(--ds-space-500, 40px)";
|
|
93
93
|
export const akEditorSelectedNodeClassName = 'ak-editor-selected-node';
|
|
94
94
|
export const editorFontSize = ({
|
|
95
95
|
theme
|
|
@@ -93,7 +93,7 @@ export var MAX_BROWSER_SCROLLBAR_HEIGHT = 20;
|
|
|
93
93
|
export var ATLASSIAN_NAVIGATION_HEIGHT = '56px';
|
|
94
94
|
var DEFAULT_FONT_SIZE = 14;
|
|
95
95
|
export var FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = function FULL_PAGE_EDITOR_TOOLBAR_HEIGHT() {
|
|
96
|
-
return "var(--ds-space-500, 40px)";
|
|
96
|
+
return fg('live_pages_content_jump_mitigation') ? '2.188rem' : "var(--ds-space-500, 40px)";
|
|
97
97
|
};
|
|
98
98
|
export var akEditorSelectedNodeClassName = 'ak-editor-selected-node';
|
|
99
99
|
export var editorFontSize = function editorFontSize(_ref) {
|
|
@@ -73,7 +73,7 @@ export declare const DEFAULT_EMBED_CARD_WIDTH = 680;
|
|
|
73
73
|
export declare const DEFAULT_EMBED_CARD_HEIGHT = 480;
|
|
74
74
|
export declare const MAX_BROWSER_SCROLLBAR_HEIGHT = 20;
|
|
75
75
|
export declare const ATLASSIAN_NAVIGATION_HEIGHT = "56px";
|
|
76
|
-
export declare const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT: () => "var(--ds-space-500)";
|
|
76
|
+
export declare const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT: () => "var(--ds-space-500)" | "2.188rem";
|
|
77
77
|
export declare const akEditorSelectedNodeClassName = "ak-editor-selected-node";
|
|
78
78
|
export declare const editorFontSize: ({ theme }: {
|
|
79
79
|
theme: {
|
|
@@ -73,7 +73,7 @@ export declare const DEFAULT_EMBED_CARD_WIDTH = 680;
|
|
|
73
73
|
export declare const DEFAULT_EMBED_CARD_HEIGHT = 480;
|
|
74
74
|
export declare const MAX_BROWSER_SCROLLBAR_HEIGHT = 20;
|
|
75
75
|
export declare const ATLASSIAN_NAVIGATION_HEIGHT = "56px";
|
|
76
|
-
export declare const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT: () => "var(--ds-space-500)";
|
|
76
|
+
export declare const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT: () => "var(--ds-space-500)" | "2.188rem";
|
|
77
77
|
export declare const akEditorSelectedNodeClassName = "ak-editor-selected-node";
|
|
78
78
|
export declare const editorFontSize: ({ theme }: {
|
|
79
79
|
theme: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-shared-styles",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.4",
|
|
4
4
|
"description": "Style values used in the editor/renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,6 +28,9 @@
|
|
|
28
28
|
"platform-feature-flags": {
|
|
29
29
|
"platform_editor_core_increase_full_page_guttering": {
|
|
30
30
|
"type": "boolean"
|
|
31
|
+
},
|
|
32
|
+
"live_pages_content_jump_mitigation": {
|
|
33
|
+
"type": "boolean"
|
|
31
34
|
}
|
|
32
35
|
},
|
|
33
36
|
"af:exports": {
|
|
@@ -38,8 +41,8 @@
|
|
|
38
41
|
".": "./src/index.ts"
|
|
39
42
|
},
|
|
40
43
|
"dependencies": {
|
|
41
|
-
"@atlaskit/platform-feature-flags": "^0.
|
|
42
|
-
"@atlaskit/tokens": "^
|
|
44
|
+
"@atlaskit/platform-feature-flags": "^1.0.0",
|
|
45
|
+
"@atlaskit/tokens": "^3.3.0",
|
|
43
46
|
"@babel/runtime": "^7.0.0",
|
|
44
47
|
"@emotion/react": "^11.7.1"
|
|
45
48
|
},
|
|
@@ -17,6 +17,8 @@ describe('consts', () => {
|
|
|
17
17
|
it('relativeFontSizeToBase16 should return 0.875rem with a base font size (string) of 14px', () => {
|
|
18
18
|
expect(relativeFontSizeToBase16('14')).toBe('0.875rem');
|
|
19
19
|
});
|
|
20
|
+
// Ignored via go/ees005
|
|
21
|
+
// eslint-disable-next-line jest/no-identical-title
|
|
20
22
|
it('relativeFontSizeToBase16 should return 0.875rem with a base font size (string) of 14px', () => {
|
|
21
23
|
expect(relativeFontSizeToBase16('14px')).toBe('0.875rem');
|
|
22
24
|
});
|
package/src/consts/consts.ts
CHANGED
|
@@ -102,7 +102,8 @@ export const ATLASSIAN_NAVIGATION_HEIGHT = '56px';
|
|
|
102
102
|
|
|
103
103
|
const DEFAULT_FONT_SIZE = 14;
|
|
104
104
|
|
|
105
|
-
export const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = () =>
|
|
105
|
+
export const FULL_PAGE_EDITOR_TOOLBAR_HEIGHT = () =>
|
|
106
|
+
fg('live_pages_content_jump_mitigation') ? '2.188rem' : token('space.500', '40px');
|
|
106
107
|
|
|
107
108
|
export const akEditorSelectedNodeClassName = 'ak-editor-selected-node';
|
|
108
109
|
|
|
@@ -4,17 +4,25 @@ import { getSelectionStyles } from '../../utils';
|
|
|
4
4
|
describe('selection plugin: utils', () => {
|
|
5
5
|
describe('getSelectionStyles', () => {
|
|
6
6
|
const selectionStyles = [
|
|
7
|
+
// Ignored via go/ees005
|
|
8
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
7
9
|
{ name: 'border', style: SelectionStyle.Border, regex: /border\:/ },
|
|
8
10
|
{
|
|
9
11
|
name: 'box-shadow',
|
|
10
12
|
style: SelectionStyle.BoxShadow,
|
|
13
|
+
// Ignored via go/ees005
|
|
14
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
11
15
|
regex: /box\-shadow\:/,
|
|
12
16
|
},
|
|
13
17
|
{
|
|
14
18
|
name: 'background',
|
|
15
19
|
style: SelectionStyle.Background,
|
|
20
|
+
// Ignored via go/ees005
|
|
21
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
16
22
|
regex: /background\-color\:/,
|
|
17
23
|
},
|
|
24
|
+
// Ignored via go/ees005
|
|
25
|
+
// eslint-disable-next-line require-unicode-regexp
|
|
18
26
|
{ name: 'blanket', style: SelectionStyle.Blanket, regex: /\:\:before/ },
|
|
19
27
|
];
|
|
20
28
|
|
package/tsconfig.app.json
CHANGED
package/tsconfig.dev.json
CHANGED