@atlaskit/editor-common 93.4.0 → 93.4.2
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 +23 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/shared/headings.js +97 -73
- package/dist/cjs/styles/shared/paragraph.js +28 -14
- package/dist/cjs/ugc-tokens/editor-ugc-token-names.js +33 -0
- package/dist/cjs/ugc-tokens/get-editor-ugc-token.js +23 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/Layer/index.js +7 -1
- package/dist/cjs/ui/Popup/index.js +9 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/shared/headings.js +102 -73
- package/dist/es2019/styles/shared/paragraph.js +27 -14
- package/dist/es2019/ugc-tokens/editor-ugc-token-names.js +27 -0
- package/dist/es2019/ugc-tokens/get-editor-ugc-token.js +17 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/Layer/index.js +7 -1
- package/dist/es2019/ui/Popup/index.js +9 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/shared/headings.js +99 -72
- package/dist/esm/styles/shared/paragraph.js +27 -14
- package/dist/esm/ugc-tokens/editor-ugc-token-names.js +27 -0
- package/dist/esm/ugc-tokens/get-editor-ugc-token.js +17 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/Layer/index.js +7 -1
- package/dist/esm/ui/Popup/index.js +9 -1
- package/dist/types/analytics/api.d.ts +2 -1
- package/dist/types/styles/shared/headings.d.ts +1 -1
- package/dist/types/styles/shared/paragraph.d.ts +1 -1
- package/dist/types/ugc-tokens/editor-ugc-token-names.d.ts +12 -0
- package/dist/types/ugc-tokens/get-editor-ugc-token.d.ts +3 -0
- package/dist/types-ts4.5/analytics/api.d.ts +2 -1
- package/dist/types-ts4.5/styles/shared/headings.d.ts +1 -1
- package/dist/types-ts4.5/styles/shared/paragraph.d.ts +1 -1
- package/dist/types-ts4.5/ugc-tokens/editor-ugc-token-names.d.ts +12 -0
- package/dist/types-ts4.5/ugc-tokens/get-editor-ugc-token.d.ts +3 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 93.4.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#151956](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151956)
|
|
8
|
+
[`10d31e630989b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10d31e630989b) -
|
|
9
|
+
Update internal Layer component to avoid UNSAFE lifecycle method
|
|
10
|
+
- [#152099](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152099)
|
|
11
|
+
[`76e822ba23b83`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/76e822ba23b83) -
|
|
12
|
+
[ED-23460] Allow develops to specify the channel when firing events
|
|
13
|
+
- [#152019](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152019)
|
|
14
|
+
[`5f7f23dd0c612`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5f7f23dd0c612) -
|
|
15
|
+
[ux] ED-25082: Added editor custom font tokens and use them for normal texts and paragraph texts"
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
18
|
+
## 93.4.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [#151694](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151694)
|
|
23
|
+
[`69ec2bfcedd81`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/69ec2bfcedd81) -
|
|
24
|
+
Remediate usage of UNSAFE lifecycle method for Popup
|
|
25
|
+
|
|
3
26
|
## 93.4.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "93.4.
|
|
20
|
+
var packageVersion = "93.4.2";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -8,8 +8,10 @@ exports.headingsSharedStyles = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
12
|
+
var _getEditorUgcToken = _interopRequireDefault(require("../../ugc-tokens/get-editor-ugc-token"));
|
|
11
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable @atlaskit/design-system/use-tokens-space */ /* eslint-disable @atlaskit/design-system/use-tokens-typography */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */ /* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */ /* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors */ /* eslint-disable @atlaskit/design-system/use-tokens-space */ /* eslint-disable @atlaskit/design-system/use-tokens-typography */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
15
|
var headingWithAlignmentStyles = function headingWithAlignmentStyles() {
|
|
14
16
|
return (
|
|
15
17
|
// Override marginTop: 0 with default margin found in headingsSharedStyles for first heading in alignment block that is not the first child
|
|
@@ -46,76 +48,98 @@ var headingWithAlignmentStyles = function headingWithAlignmentStyles() {
|
|
|
46
48
|
|
|
47
49
|
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
48
50
|
// text sizing prototype: http://proto/fabricrender/
|
|
49
|
-
var headingsSharedStyles = exports.headingsSharedStyles = function headingsSharedStyles() {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
51
|
+
var headingsSharedStyles = exports.headingsSharedStyles = function headingsSharedStyles(typographyTheme) {
|
|
52
|
+
var isADSTokenMigrationEnabled = (0, _experiments.editorExperiment)('typography_migration_ugc', true);
|
|
53
|
+
if (isADSTokenMigrationEnabled) {
|
|
54
|
+
return (0, _react.css)(_objectSpread({
|
|
55
|
+
'& h1': {
|
|
56
|
+
font: (0, _getEditorUgcToken.default)('editor.font.heading.h1', typographyTheme),
|
|
57
|
+
marginBottom: 0,
|
|
58
|
+
marginTop: '1.667em'
|
|
59
|
+
},
|
|
60
|
+
'& h2': {
|
|
61
|
+
font: (0, _getEditorUgcToken.default)('editor.font.heading.h2', typographyTheme),
|
|
62
|
+
marginTop: '1.8em',
|
|
63
|
+
marginBottom: 0
|
|
64
|
+
},
|
|
65
|
+
'& h3': {
|
|
66
|
+
font: (0, _getEditorUgcToken.default)('editor.font.heading.h3', typographyTheme),
|
|
67
|
+
marginTop: '2em',
|
|
68
|
+
marginBottom: 0
|
|
69
|
+
},
|
|
70
|
+
'& h4': {
|
|
71
|
+
font: (0, _getEditorUgcToken.default)('editor.font.heading.h4', typographyTheme),
|
|
72
|
+
marginTop: '1.357em'
|
|
73
|
+
},
|
|
74
|
+
'& h5': {
|
|
75
|
+
font: (0, _getEditorUgcToken.default)('editor.font.heading.h5', typographyTheme),
|
|
76
|
+
textTransform: 'none'
|
|
77
|
+
},
|
|
78
|
+
'& h6': {
|
|
79
|
+
font: (0, _getEditorUgcToken.default)('editor.font.heading.h6', typographyTheme),
|
|
80
|
+
marginTop: '1.455em',
|
|
81
|
+
textTransform: 'none'
|
|
82
|
+
}
|
|
83
|
+
}, headingWithAlignmentStyles()));
|
|
84
|
+
} else {
|
|
85
|
+
return (0, _react.css)(_objectSpread({
|
|
86
|
+
'& h1': {
|
|
87
|
+
fontSize: "".concat(24 / 14, "em"),
|
|
88
|
+
fontStyle: 'inherit',
|
|
89
|
+
lineHeight: 28 / 24,
|
|
90
|
+
color: "var(--ds-text, #172B4D)",
|
|
91
|
+
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
92
|
+
letterSpacing: "-0.01em",
|
|
93
|
+
marginBottom: 0,
|
|
94
|
+
marginTop: '1.667em'
|
|
95
|
+
},
|
|
96
|
+
'& h2': {
|
|
97
|
+
fontSize: "".concat(20 / 14, "em"),
|
|
98
|
+
fontStyle: 'inherit',
|
|
99
|
+
lineHeight: 24 / 20,
|
|
100
|
+
color: "var(--ds-text, #172B4D)",
|
|
101
|
+
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
102
|
+
letterSpacing: "-0.008em",
|
|
103
|
+
marginTop: '1.8em',
|
|
104
|
+
marginBottom: 0
|
|
105
|
+
},
|
|
106
|
+
'& h3': {
|
|
107
|
+
fontSize: "".concat(16 / 14, "em"),
|
|
108
|
+
fontStyle: 'inherit',
|
|
109
|
+
lineHeight: 20 / 16,
|
|
110
|
+
color: "var(--ds-text, #172B4D)",
|
|
111
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
112
|
+
letterSpacing: "-0.006em",
|
|
113
|
+
marginTop: '2em',
|
|
114
|
+
marginBottom: 0
|
|
115
|
+
},
|
|
116
|
+
'& h4': {
|
|
117
|
+
fontSize: "".concat(14 / 14, "em"),
|
|
118
|
+
fontStyle: 'inherit',
|
|
119
|
+
lineHeight: 16 / 14,
|
|
120
|
+
color: "var(--ds-text, #172B4D)",
|
|
121
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
122
|
+
letterSpacing: "-0.003em",
|
|
123
|
+
marginTop: '1.357em'
|
|
124
|
+
},
|
|
125
|
+
'& h5': {
|
|
126
|
+
fontSize: "".concat(12 / 14, "em"),
|
|
127
|
+
fontStyle: 'inherit',
|
|
128
|
+
lineHeight: 16 / 12,
|
|
129
|
+
color: "var(--ds-text, #172B4D)",
|
|
130
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
131
|
+
marginTop: '1.667em',
|
|
132
|
+
textTransform: 'none'
|
|
133
|
+
},
|
|
134
|
+
'& h6': {
|
|
135
|
+
fontSize: "".concat(11 / 14, "em"),
|
|
136
|
+
fontStyle: 'inherit',
|
|
137
|
+
lineHeight: 16 / 11,
|
|
138
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
139
|
+
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
140
|
+
marginTop: '1.455em',
|
|
141
|
+
textTransform: 'none'
|
|
142
|
+
}
|
|
143
|
+
}, headingWithAlignmentStyles()));
|
|
144
|
+
}
|
|
121
145
|
};
|
|
@@ -1,25 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.paragraphSharedStyles = void 0;
|
|
7
8
|
var _react = require("@emotion/react");
|
|
8
9
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
10
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
11
|
+
var _getEditorUgcToken = _interopRequireDefault(require("../../ugc-tokens/get-editor-ugc-token"));
|
|
12
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-exported-styles */
|
|
13
|
+
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
14
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
15
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
9
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
17
|
|
|
11
18
|
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
var paragraphSharedStyles = exports.paragraphSharedStyles = function paragraphSharedStyles(typographyTheme) {
|
|
20
|
+
return (0, _experiments.editorExperiment)('typography_migration_ugc', true) ? (0, _react.css)({
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
22
|
+
'& p': {
|
|
23
|
+
font: (0, _getEditorUgcToken.default)('editor.font.body', typographyTheme),
|
|
24
|
+
marginTop: _editorSharedStyles.blockNodesVerticalMargin,
|
|
25
|
+
marginBottom: 0
|
|
26
|
+
}
|
|
27
|
+
}) : (0, _react.css)({
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
29
|
+
'& p': {
|
|
30
|
+
fontSize: '1em',
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
32
|
+
lineHeight: _editorSharedStyles.akEditorLineHeight,
|
|
33
|
+
fontWeight: 'normal',
|
|
34
|
+
marginTop: _editorSharedStyles.blockNodesVerticalMargin,
|
|
35
|
+
marginBottom: 0,
|
|
36
|
+
letterSpacing: '-0.005em'
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.editorUGCTokensRefreshed = exports.editorUGCTokensModernized = exports.editorUGCTokens = void 0;
|
|
7
|
+
var editorUGCTokens = exports.editorUGCTokens = {
|
|
8
|
+
'editor.font.heading.h1': 'normal 500 1.71429em/1.16667 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
9
|
+
'editor.font.heading.h2': 'normal 500 1.42857em/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
10
|
+
'editor.font.heading.h3': 'normal 600 1.14286em/1.25 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
11
|
+
'editor.font.heading.h4': 'normal 600 1em/1.14286 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
12
|
+
'editor.font.heading.h5': 'normal 600 0.857143em/1.33333 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
13
|
+
'editor.font.heading.h6': 'normal 700 0.785714em/1.45455 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
14
|
+
'editor.font.body': 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif'
|
|
15
|
+
};
|
|
16
|
+
var editorUGCTokensModernized = exports.editorUGCTokensModernized = {
|
|
17
|
+
'editor.font.heading.h1': 'normal 700 1.71429em/1.16667 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
18
|
+
'editor.font.heading.h2': 'normal 700 1.42857em/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
19
|
+
'editor.font.heading.h3': 'normal 700 1.14286em/1.25 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
20
|
+
'editor.font.heading.h4': 'normal 700 1em/1.14286 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
21
|
+
'editor.font.heading.h5': 'normal 700 0.857143em/1.33333 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
22
|
+
'editor.font.heading.h6': 'normal 700 0.785714em/1.45455 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
23
|
+
'editor.font.body': 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif'
|
|
24
|
+
};
|
|
25
|
+
var editorUGCTokensRefreshed = exports.editorUGCTokensRefreshed = {
|
|
26
|
+
'editor.font.heading.h1': 'normal 700 1.71429em/1.16667 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
27
|
+
'editor.font.heading.h2': 'normal 700 1.42857em/1.2 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
28
|
+
'editor.font.heading.h3': 'normal 7001.14286em/1.25 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
29
|
+
'editor.font.heading.h4': 'normal 700 1em/1.14286 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
30
|
+
'editor.font.heading.h5': 'normal 700 0.857143em/1.33333 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
31
|
+
'editor.font.heading.h6': 'normal 700 0.785714em/1.45455 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
|
|
32
|
+
'editor.font.body': 'normal 400 1em/1.714 "Inter Variable", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif'
|
|
33
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _editorUgcTokenNames = require("./editor-ugc-token-names");
|
|
8
|
+
function editorUGCToken(path, typographyTheme) {
|
|
9
|
+
var token;
|
|
10
|
+
switch (typographyTheme) {
|
|
11
|
+
case 'typography-modernized':
|
|
12
|
+
token = _editorUgcTokenNames.editorUGCTokensModernized[path];
|
|
13
|
+
break;
|
|
14
|
+
case 'typography-refreshed':
|
|
15
|
+
token = _editorUgcTokenNames.editorUGCTokensRefreshed[path];
|
|
16
|
+
break;
|
|
17
|
+
default:
|
|
18
|
+
token = _editorUgcTokenNames.editorUGCTokens[path];
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
return token;
|
|
22
|
+
}
|
|
23
|
+
var _default = exports.default = editorUGCToken;
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "93.4.
|
|
27
|
+
var packageVersion = "93.4.2";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -16,6 +16,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
var _popper = _interopRequireDefault(require("popper.js"));
|
|
18
18
|
var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
19
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
19
20
|
var _helpers = require("./internal/helpers");
|
|
20
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
21
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -78,13 +79,18 @@ var Layer = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
78
79
|
}, {
|
|
79
80
|
key: "UNSAFE_componentWillReceiveProps",
|
|
80
81
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
81
|
-
|
|
82
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_react18_phase2')) {
|
|
83
|
+
this.applyPopper(nextProps);
|
|
84
|
+
}
|
|
82
85
|
}
|
|
83
86
|
}, {
|
|
84
87
|
key: "componentDidUpdate",
|
|
85
88
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
86
89
|
var onPositioned = this.props.onPositioned;
|
|
87
90
|
var hasExtractedStyles = this.state.hasExtractedStyles;
|
|
91
|
+
if (this.props !== prevProps && (0, _platformFeatureFlags.fg)('platform_editor_react18_phase2')) {
|
|
92
|
+
this.applyPopper(this.props);
|
|
93
|
+
}
|
|
88
94
|
|
|
89
95
|
// This flag is set the first time the position is calculated from Popper and applied to the content
|
|
90
96
|
if (!prevState.hasExtractedStyles && hasExtractedStyles && onPositioned) {
|
|
@@ -23,6 +23,7 @@ var _focusTrap = _interopRequireDefault(require("focus-trap"));
|
|
|
23
23
|
var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
24
24
|
var _reactDom = require("react-dom");
|
|
25
25
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
26
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
26
27
|
var _utils = require("./utils");
|
|
27
28
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28
29
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -207,7 +208,9 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
207
208
|
value: function UNSAFE_componentWillReceiveProps(newProps) {
|
|
208
209
|
// We are delaying `updatePosition` otherwise it happens before the children
|
|
209
210
|
// get rendered and we end up with a wrong position
|
|
210
|
-
|
|
211
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_react18_phase2')) {
|
|
212
|
+
this.scheduledUpdatePosition(newProps);
|
|
213
|
+
}
|
|
211
214
|
}
|
|
212
215
|
}, {
|
|
213
216
|
key: "destroyFocusTrap",
|
|
@@ -248,6 +251,11 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
248
251
|
key: "componentDidUpdate",
|
|
249
252
|
value: function componentDidUpdate(prevProps) {
|
|
250
253
|
this.handleChangedFocusTrapProp(prevProps);
|
|
254
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_react18_phase2')) {
|
|
255
|
+
if (this.props !== prevProps) {
|
|
256
|
+
this.scheduledUpdatePosition(prevProps);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
251
259
|
}
|
|
252
260
|
}, {
|
|
253
261
|
key: "componentDidMount",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "93.4.
|
|
4
|
+
const packageVersion = "93.4.2";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
|
|
2
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
|
|
3
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors */
|
|
1
4
|
/* eslint-disable @atlaskit/design-system/use-tokens-space */
|
|
2
5
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
3
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
7
|
import { css } from '@emotion/react';
|
|
5
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
|
+
import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
|
|
6
11
|
const headingWithAlignmentStyles = () =>
|
|
7
12
|
// Override marginTop: 0 with default margin found in headingsSharedStyles for first heading in alignment block that is not the first child
|
|
8
13
|
fg('platform_editor_heading_margin_fix') ? {
|
|
@@ -36,76 +41,100 @@ fg('platform_editor_heading_margin_fix') ? {
|
|
|
36
41
|
|
|
37
42
|
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
38
43
|
// text sizing prototype: http://proto/fabricrender/
|
|
39
|
-
export const headingsSharedStyles =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
44
|
+
export const headingsSharedStyles = typographyTheme => {
|
|
45
|
+
const isADSTokenMigrationEnabled = editorExperiment('typography_migration_ugc', true);
|
|
46
|
+
if (isADSTokenMigrationEnabled) {
|
|
47
|
+
return css({
|
|
48
|
+
'& h1': {
|
|
49
|
+
font: editorUGCToken('editor.font.heading.h1', typographyTheme),
|
|
50
|
+
marginBottom: 0,
|
|
51
|
+
marginTop: '1.667em'
|
|
52
|
+
},
|
|
53
|
+
'& h2': {
|
|
54
|
+
font: editorUGCToken('editor.font.heading.h2', typographyTheme),
|
|
55
|
+
marginTop: '1.8em',
|
|
56
|
+
marginBottom: 0
|
|
57
|
+
},
|
|
58
|
+
'& h3': {
|
|
59
|
+
font: editorUGCToken('editor.font.heading.h3', typographyTheme),
|
|
60
|
+
marginTop: '2em',
|
|
61
|
+
marginBottom: 0
|
|
62
|
+
},
|
|
63
|
+
'& h4': {
|
|
64
|
+
font: editorUGCToken('editor.font.heading.h4', typographyTheme),
|
|
65
|
+
marginTop: '1.357em'
|
|
66
|
+
},
|
|
67
|
+
'& h5': {
|
|
68
|
+
font: editorUGCToken('editor.font.heading.h5', typographyTheme),
|
|
69
|
+
textTransform: 'none'
|
|
70
|
+
},
|
|
71
|
+
'& h6': {
|
|
72
|
+
font: editorUGCToken('editor.font.heading.h6', typographyTheme),
|
|
73
|
+
marginTop: '1.455em',
|
|
74
|
+
textTransform: 'none'
|
|
75
|
+
},
|
|
76
|
+
...headingWithAlignmentStyles()
|
|
77
|
+
});
|
|
78
|
+
} else {
|
|
79
|
+
return css({
|
|
80
|
+
'& h1': {
|
|
81
|
+
fontSize: `${24 / 14}em`,
|
|
82
|
+
fontStyle: 'inherit',
|
|
83
|
+
lineHeight: 28 / 24,
|
|
84
|
+
color: "var(--ds-text, #172B4D)",
|
|
85
|
+
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
86
|
+
letterSpacing: `-0.01em`,
|
|
87
|
+
marginBottom: 0,
|
|
88
|
+
marginTop: '1.667em'
|
|
89
|
+
},
|
|
90
|
+
'& h2': {
|
|
91
|
+
fontSize: `${20 / 14}em`,
|
|
92
|
+
fontStyle: 'inherit',
|
|
93
|
+
lineHeight: 24 / 20,
|
|
94
|
+
color: "var(--ds-text, #172B4D)",
|
|
95
|
+
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
96
|
+
letterSpacing: `-0.008em`,
|
|
97
|
+
marginTop: '1.8em',
|
|
98
|
+
marginBottom: 0
|
|
99
|
+
},
|
|
100
|
+
'& h3': {
|
|
101
|
+
fontSize: `${16 / 14}em`,
|
|
102
|
+
fontStyle: 'inherit',
|
|
103
|
+
lineHeight: 20 / 16,
|
|
104
|
+
color: "var(--ds-text, #172B4D)",
|
|
105
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
106
|
+
letterSpacing: `-0.006em`,
|
|
107
|
+
marginTop: '2em',
|
|
108
|
+
marginBottom: 0
|
|
109
|
+
},
|
|
110
|
+
'& h4': {
|
|
111
|
+
fontSize: `${14 / 14}em`,
|
|
112
|
+
fontStyle: 'inherit',
|
|
113
|
+
lineHeight: 16 / 14,
|
|
114
|
+
color: "var(--ds-text, #172B4D)",
|
|
115
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
116
|
+
letterSpacing: `-0.003em`,
|
|
117
|
+
marginTop: '1.357em'
|
|
118
|
+
},
|
|
119
|
+
'& h5': {
|
|
120
|
+
fontSize: `${12 / 14}em`,
|
|
121
|
+
fontStyle: 'inherit',
|
|
122
|
+
lineHeight: 16 / 12,
|
|
123
|
+
color: "var(--ds-text, #172B4D)",
|
|
124
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
125
|
+
marginTop: '1.667em',
|
|
126
|
+
textTransform: 'none'
|
|
127
|
+
},
|
|
128
|
+
'& h6': {
|
|
129
|
+
fontSize: `${11 / 14}em`,
|
|
130
|
+
fontStyle: 'inherit',
|
|
131
|
+
lineHeight: 16 / 11,
|
|
132
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
133
|
+
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
134
|
+
marginTop: '1.455em',
|
|
135
|
+
textTransform: 'none'
|
|
136
|
+
},
|
|
137
|
+
...headingWithAlignmentStyles()
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
};
|