@atlaskit/editor-common 116.27.1 → 116.28.1
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 +28 -0
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +30 -97
- package/dist/cjs/link/utils.js +2 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/shared/headings.js +47 -110
- package/dist/cjs/ugc-tokens/editor-ugc-token-names.js +1 -34
- package/dist/cjs/ugc-tokens/get-editor-ugc-token.js +1 -8
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +30 -97
- package/dist/es2019/link/utils.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/shared/headings.js +50 -114
- package/dist/es2019/ugc-tokens/editor-ugc-token-names.js +0 -33
- package/dist/es2019/ugc-tokens/get-editor-ugc-token.js +2 -9
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/element-browser/components/ElementList/ElementList.js +30 -97
- package/dist/esm/link/utils.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/shared/headings.js +47 -110
- package/dist/esm/ugc-tokens/editor-ugc-token-names.js +0 -33
- package/dist/esm/ugc-tokens/get-editor-ugc-token.js +2 -9
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/ugc-tokens/editor-ugc-token-names.d.ts +0 -2
- package/package.json +4 -7
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css } from '@emotion/react';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
|
|
11
10
|
const headingWithAlignmentStyles = () => (
|
|
12
11
|
// Override marginTop: 0 with default margin found in headingsSharedStyles for first heading in alignment block that is not the first child
|
|
@@ -42,118 +41,55 @@ const headingWithAlignmentStyles = () => (
|
|
|
42
41
|
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
43
42
|
// text sizing prototype: http://proto/fabricrender/
|
|
44
43
|
export const headingsSharedStyles = _typographyTheme => {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
'
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
53
|
-
},
|
|
54
|
-
'&::before': {}
|
|
44
|
+
return css({
|
|
45
|
+
'& h1': {
|
|
46
|
+
font: editorUGCToken('editor.font.heading.h1'),
|
|
47
|
+
marginBottom: 0,
|
|
48
|
+
marginTop: '1.45833em',
|
|
49
|
+
'& strong': {
|
|
50
|
+
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
55
51
|
},
|
|
56
|
-
'
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
'& h1': {
|
|
100
|
-
fontSize: `${24 / 14}em`,
|
|
101
|
-
fontStyle: 'inherit',
|
|
102
|
-
lineHeight: 28 / 24,
|
|
103
|
-
color: "var(--ds-text, #292A2E)",
|
|
104
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
105
|
-
letterSpacing: `-0.01em`,
|
|
106
|
-
marginBottom: 0,
|
|
107
|
-
marginTop: '1.667em'
|
|
108
|
-
},
|
|
109
|
-
'& h2': {
|
|
110
|
-
fontSize: `${20 / 14}em`,
|
|
111
|
-
fontStyle: 'inherit',
|
|
112
|
-
lineHeight: 24 / 20,
|
|
113
|
-
color: "var(--ds-text, #292A2E)",
|
|
114
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
115
|
-
letterSpacing: `-0.008em`,
|
|
116
|
-
marginTop: '1.8em',
|
|
117
|
-
marginBottom: 0
|
|
118
|
-
},
|
|
119
|
-
'& h3': {
|
|
120
|
-
fontSize: `${16 / 14}em`,
|
|
121
|
-
fontStyle: 'inherit',
|
|
122
|
-
lineHeight: 20 / 16,
|
|
123
|
-
color: "var(--ds-text, #292A2E)",
|
|
124
|
-
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
125
|
-
letterSpacing: `-0.006em`,
|
|
126
|
-
marginTop: '2em',
|
|
127
|
-
marginBottom: 0
|
|
128
|
-
},
|
|
129
|
-
'& h4': {
|
|
130
|
-
fontSize: `${14 / 14}em`,
|
|
131
|
-
fontStyle: 'inherit',
|
|
132
|
-
lineHeight: 16 / 14,
|
|
133
|
-
color: "var(--ds-text, #292A2E)",
|
|
134
|
-
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
135
|
-
letterSpacing: `-0.003em`,
|
|
136
|
-
marginTop: '1.357em'
|
|
137
|
-
},
|
|
138
|
-
'& h5': {
|
|
139
|
-
fontSize: `${12 / 14}em`,
|
|
140
|
-
fontStyle: 'inherit',
|
|
141
|
-
lineHeight: 16 / 12,
|
|
142
|
-
color: "var(--ds-text, #292A2E)",
|
|
143
|
-
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
144
|
-
marginTop: '1.667em',
|
|
145
|
-
textTransform: 'none'
|
|
146
|
-
},
|
|
147
|
-
'& h6': {
|
|
148
|
-
fontSize: `${11 / 14}em`,
|
|
149
|
-
fontStyle: 'inherit',
|
|
150
|
-
lineHeight: 16 / 11,
|
|
151
|
-
color: "var(--ds-text-subtlest, #6B6E76)",
|
|
152
|
-
fontWeight: "var(--ds-font-weight-bold, 653)",
|
|
153
|
-
marginTop: '1.455em',
|
|
154
|
-
textTransform: 'none'
|
|
155
|
-
},
|
|
156
|
-
...headingWithAlignmentStyles()
|
|
157
|
-
});
|
|
158
|
-
}
|
|
52
|
+
'&::before': {}
|
|
53
|
+
},
|
|
54
|
+
'& h2': {
|
|
55
|
+
font: editorUGCToken('editor.font.heading.h2'),
|
|
56
|
+
marginTop: '1.4em',
|
|
57
|
+
marginBottom: 0,
|
|
58
|
+
'& strong': {
|
|
59
|
+
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
'& h3': {
|
|
63
|
+
font: editorUGCToken('editor.font.heading.h3'),
|
|
64
|
+
marginTop: '1.31249em',
|
|
65
|
+
marginBottom: 0,
|
|
66
|
+
'& strong': {
|
|
67
|
+
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
'& h4': {
|
|
71
|
+
font: editorUGCToken('editor.font.heading.h4'),
|
|
72
|
+
marginTop: '1.25em',
|
|
73
|
+
'& strong': {
|
|
74
|
+
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
'& h5': {
|
|
78
|
+
font: editorUGCToken('editor.font.heading.h5'),
|
|
79
|
+
marginTop: '1.45833em',
|
|
80
|
+
textTransform: 'none',
|
|
81
|
+
'& strong': {
|
|
82
|
+
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
'& h6': {
|
|
86
|
+
font: editorUGCToken('editor.font.heading.h6'),
|
|
87
|
+
marginTop: '1.59091em',
|
|
88
|
+
textTransform: 'none',
|
|
89
|
+
'& strong': {
|
|
90
|
+
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
...headingWithAlignmentStyles()
|
|
94
|
+
});
|
|
159
95
|
};
|
|
@@ -1,36 +1,3 @@
|
|
|
1
|
-
export const editorUGCTokens = {
|
|
2
|
-
'editor.font.heading.h1': 'normal 500 1.71429em/1.16667 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
3
|
-
'editor.font.heading.h2': 'normal 500 1.42857em/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
4
|
-
'editor.font.heading.h3': 'normal 600 1.14286em/1.25 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
5
|
-
'editor.font.heading.h4': 'normal 600 1em/1.14286 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
6
|
-
'editor.font.heading.h5': 'normal 600 0.857143em/1.33333 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
7
|
-
'editor.font.heading.h6': 'normal 700 0.785714em/1.45455 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
8
|
-
'editor.font.body': 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
9
|
-
'editor.font.weight.heading.h1.bold': '700',
|
|
10
|
-
'editor.font.weight.heading.h2.bold': '700',
|
|
11
|
-
'editor.font.weight.heading.h3.bold': '700',
|
|
12
|
-
'editor.font.weight.heading.h4.bold': '700',
|
|
13
|
-
'editor.font.weight.heading.h5.bold': '700',
|
|
14
|
-
'editor.font.weight.heading.h6.bold': '700'
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
18
|
-
export const editorUGCTokensModernized = {
|
|
19
|
-
'editor.font.heading.h1': 'normal 600 1.71429em/1.16667 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
20
|
-
'editor.font.heading.h2': 'normal 600 1.42857em/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
21
|
-
'editor.font.heading.h3': 'normal 600 1.14286em/1.25 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
22
|
-
'editor.font.heading.h4': 'normal 600 1em/1.14286 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
23
|
-
'editor.font.heading.h5': 'normal 600 0.857143em/1.33333 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
24
|
-
'editor.font.heading.h6': 'normal 600 0.785714em/1.45455 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
25
|
-
'editor.font.body': 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
26
|
-
'editor.font.weight.heading.h1.bold': '700',
|
|
27
|
-
'editor.font.weight.heading.h2.bold': '700',
|
|
28
|
-
'editor.font.weight.heading.h3.bold': '700',
|
|
29
|
-
'editor.font.weight.heading.h4.bold': '700',
|
|
30
|
-
'editor.font.weight.heading.h5.bold': '700',
|
|
31
|
-
'editor.font.weight.heading.h6.bold': '700'
|
|
32
|
-
};
|
|
33
|
-
|
|
34
1
|
/**
|
|
35
2
|
* These styles are duplicated in packages/editor/editor-plugin-block-type/src/pm-plugins/ui/ToolbarBlockType/HeadingButton.tsx
|
|
36
3
|
*/
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { editorUGCTokens, editorUGCTokensRefreshed } from './editor-ugc-token-names';
|
|
1
|
+
import { editorUGCTokensRefreshed } from './editor-ugc-token-names';
|
|
3
2
|
function editorUGCToken(path) {
|
|
4
|
-
|
|
5
|
-
if (fg('platform_editor_typography_ugc')) {
|
|
6
|
-
tokens = editorUGCTokensRefreshed;
|
|
7
|
-
} else {
|
|
8
|
-
tokens = editorUGCTokens;
|
|
9
|
-
}
|
|
10
|
-
return tokens[path];
|
|
3
|
+
return editorUGCTokensRefreshed[path];
|
|
11
4
|
}
|
|
12
5
|
export default editorUGCToken;
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "116.
|
|
17
|
+
const packageVersion = "116.28.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -14,10 +14,8 @@ import { Grid, List } from 'react-virtualized';
|
|
|
14
14
|
import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
|
|
15
15
|
import { CellMeasurer, CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';
|
|
16
16
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
17
|
-
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
18
17
|
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
19
18
|
import { ButtonItem } from '@atlaskit/menu';
|
|
20
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
19
|
import { Flex, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
22
20
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
23
21
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -460,60 +458,36 @@ var ItemContent = /*#__PURE__*/memo(function (_ref8) {
|
|
|
460
458
|
keyshortcut = _ref8.keyshortcut,
|
|
461
459
|
lozenge = _ref8.lozenge,
|
|
462
460
|
isDisabled = _ref8.isDisabled;
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
);
|
|
494
|
-
} else {
|
|
495
|
-
return (
|
|
496
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
497
|
-
jsx("div", {
|
|
498
|
-
css: itemBody,
|
|
499
|
-
className: "item-body"
|
|
500
|
-
}, jsx("div", {
|
|
501
|
-
css: itemText
|
|
502
|
-
}, jsx("div", {
|
|
503
|
-
css: itemTitleWrapper
|
|
504
|
-
}, jsx("p", {
|
|
505
|
-
css: isDisabled ? itemTitleDisabled : itemTitle
|
|
506
|
-
}, title), jsx("div", {
|
|
507
|
-
css: itemAfter
|
|
508
|
-
}, keyshortcut && jsx("div", {
|
|
509
|
-
css: shortcutStyle
|
|
510
|
-
}, keyshortcut))), description &&
|
|
511
|
-
// eslint-disable-next-line @atlaskit/design-system/use-primitives-text
|
|
512
|
-
jsx("p", {
|
|
513
|
-
css: isDisabled ? itemDescriptionDisabled : itemDescription
|
|
514
|
-
}, description)))
|
|
515
|
-
);
|
|
516
|
-
}
|
|
461
|
+
return (
|
|
462
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
463
|
+
jsx("div", {
|
|
464
|
+
css: itemBody,
|
|
465
|
+
className: "item-body"
|
|
466
|
+
}, jsx("div", {
|
|
467
|
+
css: itemText
|
|
468
|
+
}, jsx(Stack, {
|
|
469
|
+
space: "space.025"
|
|
470
|
+
}, jsx("div", {
|
|
471
|
+
css: itemTitleWrapper
|
|
472
|
+
}, editorExperiment('platform_synced_block', true) || lozenge ? jsx(Flex, {
|
|
473
|
+
alignItems: "center",
|
|
474
|
+
gap: "space.050"
|
|
475
|
+
}, jsx(Text, {
|
|
476
|
+
color: isDisabled ? 'color.text.disabled' : undefined,
|
|
477
|
+
maxLines: 1
|
|
478
|
+
}, title), lozenge) : jsx(Text, {
|
|
479
|
+
color: isDisabled ? 'color.text.disabled' : undefined,
|
|
480
|
+
maxLines: 1
|
|
481
|
+
}, title), jsx("div", {
|
|
482
|
+
css: itemAfter
|
|
483
|
+
}, keyshortcut && jsx("div", {
|
|
484
|
+
css: shortcutStyle
|
|
485
|
+
}, keyshortcut))), description && jsx(Text, {
|
|
486
|
+
color: isDisabled ? 'color.text.disabled' : 'color.text.subtle',
|
|
487
|
+
size: "small",
|
|
488
|
+
maxLines: 2
|
|
489
|
+
}, description))))
|
|
490
|
+
);
|
|
517
491
|
});
|
|
518
492
|
var elementItemsWrapper = css({
|
|
519
493
|
flex: 1,
|
|
@@ -572,34 +546,6 @@ var itemBody = css({
|
|
|
572
546
|
width: '100%',
|
|
573
547
|
marginTop: "var(--ds-space-negative-025, -2px)"
|
|
574
548
|
});
|
|
575
|
-
|
|
576
|
-
/*
|
|
577
|
-
* -webkit-line-clamp is also supported by firefox 🎉
|
|
578
|
-
* https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/68#CSS
|
|
579
|
-
*/
|
|
580
|
-
var multilineStyle = css({
|
|
581
|
-
display: '-webkit-box',
|
|
582
|
-
WebkitLineClamp: 2,
|
|
583
|
-
WebkitBoxOrient: 'vertical'
|
|
584
|
-
});
|
|
585
|
-
|
|
586
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
587
|
-
var itemDescription = css(multilineStyle, {
|
|
588
|
-
overflow: 'hidden',
|
|
589
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
590
|
-
fontSize: relativeFontSizeToBase16(11.67),
|
|
591
|
-
color: "var(--ds-text-subtle, #505258)",
|
|
592
|
-
marginTop: "var(--ds-space-025, 2px)"
|
|
593
|
-
});
|
|
594
|
-
|
|
595
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
596
|
-
var itemDescriptionDisabled = css(multilineStyle, {
|
|
597
|
-
overflow: 'hidden',
|
|
598
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
599
|
-
fontSize: relativeFontSizeToBase16(11.67),
|
|
600
|
-
color: "var(--ds-text-disabled, #080F214A)",
|
|
601
|
-
marginTop: "var(--ds-space-025, 2px)"
|
|
602
|
-
});
|
|
603
549
|
var itemText = css({
|
|
604
550
|
width: 'inherit',
|
|
605
551
|
whiteSpace: 'initial'
|
|
@@ -608,19 +554,6 @@ var itemTitleWrapper = css({
|
|
|
608
554
|
display: 'flex',
|
|
609
555
|
justifyContent: 'space-between'
|
|
610
556
|
});
|
|
611
|
-
var itemTitle = css({
|
|
612
|
-
width: '100%',
|
|
613
|
-
overflow: 'hidden',
|
|
614
|
-
whiteSpace: 'nowrap',
|
|
615
|
-
textOverflow: 'ellipsis'
|
|
616
|
-
});
|
|
617
|
-
var itemTitleDisabled = css({
|
|
618
|
-
width: '100%',
|
|
619
|
-
overflow: 'hidden',
|
|
620
|
-
whiteSpace: 'nowrap',
|
|
621
|
-
textOverflow: 'ellipsis',
|
|
622
|
-
color: "var(--ds-text-disabled, #080F214A)"
|
|
623
|
-
});
|
|
624
557
|
var itemAfter = css({
|
|
625
558
|
flex: '0 0 auto',
|
|
626
559
|
paddingTop: "var(--ds-space-025, 2px)",
|
package/dist/esm/link/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getUrlForDomainInContext } from '@atlaskit/atlassian-context';
|
|
1
|
+
import { getUrlForDomainInContext } from '@atlaskit/atlassian-context/get-url-for-domain-in-context';
|
|
2
2
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
3
|
import { linkPreferencesPath } from './constants';
|
|
4
4
|
var STAGING = 'staging';
|
|
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
20
20
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
21
21
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
22
22
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
23
|
-
var packageVersion = "116.
|
|
23
|
+
var packageVersion = "116.28.0";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -9,7 +9,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
9
9
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
10
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
11
|
import { css } from '@emotion/react';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
12
|
import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
|
|
14
13
|
var headingWithAlignmentStyles = function headingWithAlignmentStyles() {
|
|
15
14
|
return (
|
|
@@ -48,116 +47,54 @@ var headingWithAlignmentStyles = function headingWithAlignmentStyles() {
|
|
|
48
47
|
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
49
48
|
// text sizing prototype: http://proto/fabricrender/
|
|
50
49
|
export var headingsSharedStyles = function headingsSharedStyles(_typographyTheme) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
'
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
59
|
-
},
|
|
60
|
-
'&::before': {}
|
|
61
|
-
},
|
|
62
|
-
'& h2': {
|
|
63
|
-
font: editorUGCToken('editor.font.heading.h2'),
|
|
64
|
-
marginTop: '1.4em',
|
|
65
|
-
marginBottom: 0,
|
|
66
|
-
'& strong': {
|
|
67
|
-
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
'& h3': {
|
|
71
|
-
font: editorUGCToken('editor.font.heading.h3'),
|
|
72
|
-
marginTop: '1.31249em',
|
|
73
|
-
marginBottom: 0,
|
|
74
|
-
'& strong': {
|
|
75
|
-
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
76
|
-
}
|
|
50
|
+
return css(_objectSpread({
|
|
51
|
+
'& h1': {
|
|
52
|
+
font: editorUGCToken('editor.font.heading.h1'),
|
|
53
|
+
marginBottom: 0,
|
|
54
|
+
marginTop: '1.45833em',
|
|
55
|
+
'& strong': {
|
|
56
|
+
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
77
57
|
},
|
|
78
|
-
'
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
font: editorUGCToken('editor.font.heading.h5'),
|
|
87
|
-
marginTop: '1.45833em',
|
|
88
|
-
textTransform: 'none',
|
|
89
|
-
'& strong': {
|
|
90
|
-
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
'& h6': {
|
|
94
|
-
font: editorUGCToken('editor.font.heading.h6'),
|
|
95
|
-
marginTop: '1.59091em',
|
|
96
|
-
textTransform: 'none',
|
|
97
|
-
'& strong': {
|
|
98
|
-
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
99
|
-
}
|
|
58
|
+
'&::before': {}
|
|
59
|
+
},
|
|
60
|
+
'& h2': {
|
|
61
|
+
font: editorUGCToken('editor.font.heading.h2'),
|
|
62
|
+
marginTop: '1.4em',
|
|
63
|
+
marginBottom: 0,
|
|
64
|
+
'& strong': {
|
|
65
|
+
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
100
66
|
}
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
color: "var(--ds-text, #292A2E)",
|
|
109
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
110
|
-
letterSpacing: "-0.01em",
|
|
111
|
-
marginBottom: 0,
|
|
112
|
-
marginTop: '1.667em'
|
|
113
|
-
},
|
|
114
|
-
'& h2': {
|
|
115
|
-
fontSize: "".concat(20 / 14, "em"),
|
|
116
|
-
fontStyle: 'inherit',
|
|
117
|
-
lineHeight: 24 / 20,
|
|
118
|
-
color: "var(--ds-text, #292A2E)",
|
|
119
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
120
|
-
letterSpacing: "-0.008em",
|
|
121
|
-
marginTop: '1.8em',
|
|
122
|
-
marginBottom: 0
|
|
123
|
-
},
|
|
124
|
-
'& h3': {
|
|
125
|
-
fontSize: "".concat(16 / 14, "em"),
|
|
126
|
-
fontStyle: 'inherit',
|
|
127
|
-
lineHeight: 20 / 16,
|
|
128
|
-
color: "var(--ds-text, #292A2E)",
|
|
129
|
-
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
130
|
-
letterSpacing: "-0.006em",
|
|
131
|
-
marginTop: '2em',
|
|
132
|
-
marginBottom: 0
|
|
133
|
-
},
|
|
134
|
-
'& h4': {
|
|
135
|
-
fontSize: "".concat(14 / 14, "em"),
|
|
136
|
-
fontStyle: 'inherit',
|
|
137
|
-
lineHeight: 16 / 14,
|
|
138
|
-
color: "var(--ds-text, #292A2E)",
|
|
139
|
-
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
140
|
-
letterSpacing: "-0.003em",
|
|
141
|
-
marginTop: '1.357em'
|
|
142
|
-
},
|
|
143
|
-
'& h5': {
|
|
144
|
-
fontSize: "".concat(12 / 14, "em"),
|
|
145
|
-
fontStyle: 'inherit',
|
|
146
|
-
lineHeight: 16 / 12,
|
|
147
|
-
color: "var(--ds-text, #292A2E)",
|
|
148
|
-
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
149
|
-
marginTop: '1.667em',
|
|
150
|
-
textTransform: 'none'
|
|
151
|
-
},
|
|
152
|
-
'& h6': {
|
|
153
|
-
fontSize: "".concat(11 / 14, "em"),
|
|
154
|
-
fontStyle: 'inherit',
|
|
155
|
-
lineHeight: 16 / 11,
|
|
156
|
-
color: "var(--ds-text-subtlest, #6B6E76)",
|
|
157
|
-
fontWeight: "var(--ds-font-weight-bold, 653)",
|
|
158
|
-
marginTop: '1.455em',
|
|
159
|
-
textTransform: 'none'
|
|
67
|
+
},
|
|
68
|
+
'& h3': {
|
|
69
|
+
font: editorUGCToken('editor.font.heading.h3'),
|
|
70
|
+
marginTop: '1.31249em',
|
|
71
|
+
marginBottom: 0,
|
|
72
|
+
'& strong': {
|
|
73
|
+
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
160
74
|
}
|
|
161
|
-
},
|
|
162
|
-
|
|
75
|
+
},
|
|
76
|
+
'& h4': {
|
|
77
|
+
font: editorUGCToken('editor.font.heading.h4'),
|
|
78
|
+
marginTop: '1.25em',
|
|
79
|
+
'& strong': {
|
|
80
|
+
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
'& h5': {
|
|
84
|
+
font: editorUGCToken('editor.font.heading.h5'),
|
|
85
|
+
marginTop: '1.45833em',
|
|
86
|
+
textTransform: 'none',
|
|
87
|
+
'& strong': {
|
|
88
|
+
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
'& h6': {
|
|
92
|
+
font: editorUGCToken('editor.font.heading.h6'),
|
|
93
|
+
marginTop: '1.59091em',
|
|
94
|
+
textTransform: 'none',
|
|
95
|
+
'& strong': {
|
|
96
|
+
fontWeight: editorUGCToken('editor.font.weight.heading.h1.bold')
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}, headingWithAlignmentStyles()));
|
|
163
100
|
};
|
|
@@ -1,36 +1,3 @@
|
|
|
1
|
-
export var editorUGCTokens = {
|
|
2
|
-
'editor.font.heading.h1': 'normal 500 1.71429em/1.16667 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
3
|
-
'editor.font.heading.h2': 'normal 500 1.42857em/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
4
|
-
'editor.font.heading.h3': 'normal 600 1.14286em/1.25 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
5
|
-
'editor.font.heading.h4': 'normal 600 1em/1.14286 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
6
|
-
'editor.font.heading.h5': 'normal 600 0.857143em/1.33333 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
7
|
-
'editor.font.heading.h6': 'normal 700 0.785714em/1.45455 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
8
|
-
'editor.font.body': 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
9
|
-
'editor.font.weight.heading.h1.bold': '700',
|
|
10
|
-
'editor.font.weight.heading.h2.bold': '700',
|
|
11
|
-
'editor.font.weight.heading.h3.bold': '700',
|
|
12
|
-
'editor.font.weight.heading.h4.bold': '700',
|
|
13
|
-
'editor.font.weight.heading.h5.bold': '700',
|
|
14
|
-
'editor.font.weight.heading.h6.bold': '700'
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
18
|
-
export var editorUGCTokensModernized = {
|
|
19
|
-
'editor.font.heading.h1': 'normal 600 1.71429em/1.16667 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
20
|
-
'editor.font.heading.h2': 'normal 600 1.42857em/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
21
|
-
'editor.font.heading.h3': 'normal 600 1.14286em/1.25 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
22
|
-
'editor.font.heading.h4': 'normal 600 1em/1.14286 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
23
|
-
'editor.font.heading.h5': 'normal 600 0.857143em/1.33333 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
24
|
-
'editor.font.heading.h6': 'normal 600 0.785714em/1.45455 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
25
|
-
'editor.font.body': 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, "Helvetica Neue", sans-serif',
|
|
26
|
-
'editor.font.weight.heading.h1.bold': '700',
|
|
27
|
-
'editor.font.weight.heading.h2.bold': '700',
|
|
28
|
-
'editor.font.weight.heading.h3.bold': '700',
|
|
29
|
-
'editor.font.weight.heading.h4.bold': '700',
|
|
30
|
-
'editor.font.weight.heading.h5.bold': '700',
|
|
31
|
-
'editor.font.weight.heading.h6.bold': '700'
|
|
32
|
-
};
|
|
33
|
-
|
|
34
1
|
/**
|
|
35
2
|
* These styles are duplicated in packages/editor/editor-plugin-block-type/src/pm-plugins/ui/ToolbarBlockType/HeadingButton.tsx
|
|
36
3
|
*/
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { editorUGCTokens, editorUGCTokensRefreshed } from './editor-ugc-token-names';
|
|
1
|
+
import { editorUGCTokensRefreshed } from './editor-ugc-token-names';
|
|
3
2
|
function editorUGCToken(path) {
|
|
4
|
-
|
|
5
|
-
if (fg('platform_editor_typography_ugc')) {
|
|
6
|
-
tokens = editorUGCTokensRefreshed;
|
|
7
|
-
} else {
|
|
8
|
-
tokens = editorUGCTokens;
|
|
9
|
-
}
|
|
10
|
-
return tokens[path];
|
|
3
|
+
return editorUGCTokensRefreshed[path];
|
|
11
4
|
}
|
|
12
5
|
export default editorUGCToken;
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "116.
|
|
24
|
+
var packageVersion = "116.28.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|