@atlaskit/editor-common 93.4.1 → 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.
Files changed (33) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/monitoring/error.js +1 -1
  3. package/dist/cjs/styles/shared/headings.js +97 -73
  4. package/dist/cjs/styles/shared/paragraph.js +28 -14
  5. package/dist/cjs/ugc-tokens/editor-ugc-token-names.js +33 -0
  6. package/dist/cjs/ugc-tokens/get-editor-ugc-token.js +23 -0
  7. package/dist/cjs/ui/DropList/index.js +1 -1
  8. package/dist/cjs/ui/Layer/index.js +7 -1
  9. package/dist/es2019/monitoring/error.js +1 -1
  10. package/dist/es2019/styles/shared/headings.js +102 -73
  11. package/dist/es2019/styles/shared/paragraph.js +27 -14
  12. package/dist/es2019/ugc-tokens/editor-ugc-token-names.js +27 -0
  13. package/dist/es2019/ugc-tokens/get-editor-ugc-token.js +17 -0
  14. package/dist/es2019/ui/DropList/index.js +1 -1
  15. package/dist/es2019/ui/Layer/index.js +7 -1
  16. package/dist/esm/monitoring/error.js +1 -1
  17. package/dist/esm/styles/shared/headings.js +99 -72
  18. package/dist/esm/styles/shared/paragraph.js +27 -14
  19. package/dist/esm/ugc-tokens/editor-ugc-token-names.js +27 -0
  20. package/dist/esm/ugc-tokens/get-editor-ugc-token.js +17 -0
  21. package/dist/esm/ui/DropList/index.js +1 -1
  22. package/dist/esm/ui/Layer/index.js +7 -1
  23. package/dist/types/analytics/api.d.ts +2 -1
  24. package/dist/types/styles/shared/headings.d.ts +1 -1
  25. package/dist/types/styles/shared/paragraph.d.ts +1 -1
  26. package/dist/types/ugc-tokens/editor-ugc-token-names.d.ts +12 -0
  27. package/dist/types/ugc-tokens/get-editor-ugc-token.d.ts +3 -0
  28. package/dist/types-ts4.5/analytics/api.d.ts +2 -1
  29. package/dist/types-ts4.5/styles/shared/headings.d.ts +1 -1
  30. package/dist/types-ts4.5/styles/shared/paragraph.d.ts +1 -1
  31. package/dist/types-ts4.5/ugc-tokens/editor-ugc-token-names.d.ts +12 -0
  32. package/dist/types-ts4.5/ugc-tokens/get-editor-ugc-token.d.ts +3 -0
  33. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
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
+
3
18
  ## 93.4.1
4
19
 
5
20
  ### Patch 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.1";
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
- return (0, _react.css)(_objectSpread({
51
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
52
- '& h1': {
53
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
54
- fontSize: "".concat(24 / 14, "em"),
55
- fontStyle: 'inherit',
56
- lineHeight: 28 / 24,
57
- color: "var(--ds-text, #172B4D)",
58
- fontWeight: "var(--ds-font-weight-medium, 500)",
59
- letterSpacing: "-0.01em",
60
- marginBottom: 0,
61
- marginTop: '1.667em'
62
- },
63
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
64
- '& h2': {
65
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
66
- fontSize: "".concat(20 / 14, "em"),
67
- fontStyle: 'inherit',
68
- lineHeight: 24 / 20,
69
- color: "var(--ds-text, #172B4D)",
70
- fontWeight: "var(--ds-font-weight-medium, 500)",
71
- letterSpacing: "-0.008em",
72
- marginTop: '1.8em',
73
- marginBottom: 0
74
- },
75
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
76
- '& h3': {
77
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
78
- fontSize: "".concat(16 / 14, "em"),
79
- fontStyle: 'inherit',
80
- lineHeight: 20 / 16,
81
- color: "var(--ds-text, #172B4D)",
82
- fontWeight: "var(--ds-font-weight-semibold, 600)",
83
- letterSpacing: "-0.006em",
84
- marginTop: '2em',
85
- marginBottom: 0
86
- },
87
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
88
- '& h4': {
89
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
90
- fontSize: "".concat(14 / 14, "em"),
91
- fontStyle: 'inherit',
92
- lineHeight: 16 / 14,
93
- color: "var(--ds-text, #172B4D)",
94
- fontWeight: "var(--ds-font-weight-semibold, 600)",
95
- letterSpacing: "-0.003em",
96
- marginTop: '1.357em'
97
- },
98
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
99
- '& h5': {
100
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
101
- fontSize: "".concat(12 / 14, "em"),
102
- fontStyle: 'inherit',
103
- lineHeight: 16 / 12,
104
- color: "var(--ds-text, #172B4D)",
105
- fontWeight: "var(--ds-font-weight-semibold, 600)",
106
- marginTop: '1.667em',
107
- textTransform: 'none'
108
- },
109
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
110
- '& h6': {
111
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
112
- fontSize: "".concat(11 / 14, "em"),
113
- fontStyle: 'inherit',
114
- lineHeight: 16 / 11,
115
- color: "var(--ds-text-subtlest, #626F86)",
116
- fontWeight: "var(--ds-font-weight-bold, 700)",
117
- marginTop: '1.455em',
118
- textTransform: 'none'
119
- }
120
- }, headingWithAlignmentStyles()));
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
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
13
- var paragraphSharedStyles = exports.paragraphSharedStyles = (0, _react.css)({
14
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
15
- '& p': {
16
- fontSize: '1em',
17
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
18
- lineHeight: _editorSharedStyles.akEditorLineHeight,
19
- fontWeight: 'normal',
20
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
21
- marginTop: _editorSharedStyles.blockNodesVerticalMargin,
22
- marginBottom: 0,
23
- letterSpacing: '-0.005em'
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.1";
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
- this.applyPopper(nextProps);
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) {
@@ -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.1";
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 = () => css({
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
41
- '& h1': {
42
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
43
- fontSize: `${24 / 14}em`,
44
- fontStyle: 'inherit',
45
- lineHeight: 28 / 24,
46
- color: "var(--ds-text, #172B4D)",
47
- fontWeight: "var(--ds-font-weight-medium, 500)",
48
- letterSpacing: `-0.01em`,
49
- marginBottom: 0,
50
- marginTop: '1.667em'
51
- },
52
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
53
- '& h2': {
54
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
55
- fontSize: `${20 / 14}em`,
56
- fontStyle: 'inherit',
57
- lineHeight: 24 / 20,
58
- color: "var(--ds-text, #172B4D)",
59
- fontWeight: "var(--ds-font-weight-medium, 500)",
60
- letterSpacing: `-0.008em`,
61
- marginTop: '1.8em',
62
- marginBottom: 0
63
- },
64
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
65
- '& h3': {
66
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
67
- fontSize: `${16 / 14}em`,
68
- fontStyle: 'inherit',
69
- lineHeight: 20 / 16,
70
- color: "var(--ds-text, #172B4D)",
71
- fontWeight: "var(--ds-font-weight-semibold, 600)",
72
- letterSpacing: `-0.006em`,
73
- marginTop: '2em',
74
- marginBottom: 0
75
- },
76
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
77
- '& h4': {
78
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
79
- fontSize: `${14 / 14}em`,
80
- fontStyle: 'inherit',
81
- lineHeight: 16 / 14,
82
- color: "var(--ds-text, #172B4D)",
83
- fontWeight: "var(--ds-font-weight-semibold, 600)",
84
- letterSpacing: `-0.003em`,
85
- marginTop: '1.357em'
86
- },
87
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
88
- '& h5': {
89
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
90
- fontSize: `${12 / 14}em`,
91
- fontStyle: 'inherit',
92
- lineHeight: 16 / 12,
93
- color: "var(--ds-text, #172B4D)",
94
- fontWeight: "var(--ds-font-weight-semibold, 600)",
95
- marginTop: '1.667em',
96
- textTransform: 'none'
97
- },
98
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
99
- '& h6': {
100
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
101
- fontSize: `${11 / 14}em`,
102
- fontStyle: 'inherit',
103
- lineHeight: 16 / 11,
104
- color: "var(--ds-text-subtlest, #626F86)",
105
- fontWeight: "var(--ds-font-weight-bold, 700)",
106
- marginTop: '1.455em',
107
- textTransform: 'none'
108
- },
109
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
110
- ...headingWithAlignmentStyles()
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
+ };
@@ -1,19 +1,32 @@
1
+ /* eslint-disable @atlaskit/ui-styling-standard/no-exported-styles */
2
+ /* eslint-disable @atlaskit/design-system/use-tokens-typography */
3
+ /* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
4
+ /* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
1
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
6
  import { css } from '@emotion/react';
3
7
  import { akEditorLineHeight, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
8
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
+ import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
4
10
 
5
11
  // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
7
- export const paragraphSharedStyles = css({
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
9
- '& p': {
10
- fontSize: '1em',
11
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
12
- lineHeight: akEditorLineHeight,
13
- fontWeight: 'normal',
14
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
15
- marginTop: blockNodesVerticalMargin,
16
- marginBottom: 0,
17
- letterSpacing: '-0.005em'
18
- }
19
- });
12
+ export const paragraphSharedStyles = typographyTheme => {
13
+ return editorExperiment('typography_migration_ugc', true) ? css({
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
15
+ '& p': {
16
+ font: editorUGCToken('editor.font.body', typographyTheme),
17
+ marginTop: blockNodesVerticalMargin,
18
+ marginBottom: 0
19
+ }
20
+ }) : css({
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
22
+ '& p': {
23
+ fontSize: '1em',
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
+ lineHeight: akEditorLineHeight,
26
+ fontWeight: 'normal',
27
+ marginTop: blockNodesVerticalMargin,
28
+ marginBottom: 0,
29
+ letterSpacing: '-0.005em'
30
+ }
31
+ });
32
+ };
@@ -0,0 +1,27 @@
1
+ export const editorUGCTokens = {
2
+ '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',
3
+ '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',
4
+ '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',
5
+ 'editor.font.heading.h4': 'normal 600 1em/1.14286 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
6
+ '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',
7
+ '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',
8
+ 'editor.font.body': 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif'
9
+ };
10
+ export const editorUGCTokensModernized = {
11
+ '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',
12
+ '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',
13
+ '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',
14
+ 'editor.font.heading.h4': 'normal 700 1em/1.14286 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
15
+ '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',
16
+ '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',
17
+ 'editor.font.body': 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif'
18
+ };
19
+ export const editorUGCTokensRefreshed = {
20
+ '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',
21
+ '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',
22
+ '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',
23
+ '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',
24
+ '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',
25
+ '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',
26
+ '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'
27
+ };
@@ -0,0 +1,17 @@
1
+ import { editorUGCTokens, editorUGCTokensModernized, editorUGCTokensRefreshed } from './editor-ugc-token-names';
2
+ function editorUGCToken(path, typographyTheme) {
3
+ let token;
4
+ switch (typographyTheme) {
5
+ case 'typography-modernized':
6
+ token = editorUGCTokensModernized[path];
7
+ break;
8
+ case 'typography-refreshed':
9
+ token = editorUGCTokensRefreshed[path];
10
+ break;
11
+ default:
12
+ token = editorUGCTokens[path];
13
+ break;
14
+ }
15
+ return token;
16
+ }
17
+ export default editorUGCToken;
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "93.4.1";
16
+ const packageVersion = "93.4.2";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  class DropList extends Component {
@@ -2,6 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React, { Component } from 'react';
3
3
  import Popper from 'popper.js'; // eslint-disable-line import/extensions
4
4
  import rafSchedule from 'raf-schd';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  import { positionPropToPopperPosition } from './internal/helpers';
6
7
  const defaultState = {
7
8
  hasExtractedStyles: false,
@@ -49,7 +50,9 @@ export default class Layer extends Component {
49
50
  this.applyPopper(this.props);
50
51
  }
51
52
  UNSAFE_componentWillReceiveProps(nextProps) {
52
- this.applyPopper(nextProps);
53
+ if (!fg('platform_editor_react18_phase2')) {
54
+ this.applyPopper(nextProps);
55
+ }
53
56
  }
54
57
  componentDidUpdate(prevProps, prevState) {
55
58
  const {
@@ -58,6 +61,9 @@ export default class Layer extends Component {
58
61
  const {
59
62
  hasExtractedStyles
60
63
  } = this.state;
64
+ if (this.props !== prevProps && fg('platform_editor_react18_phase2')) {
65
+ this.applyPopper(this.props);
66
+ }
61
67
 
62
68
  // This flag is set the first time the position is calculated from Popper and applied to the content
63
69
  if (!prevState.hasExtractedStyles && hasExtractedStyles && onPositioned) {
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "93.4.1";
10
+ var packageVersion = "93.4.2";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -1,11 +1,16 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  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; }
3
3
  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) { _defineProperty(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; }
4
+ /* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
5
+ /* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
6
+ /* eslint-disable @atlaskit/ui-styling-standard/no-nested-selectors */
4
7
  /* eslint-disable @atlaskit/design-system/use-tokens-space */
5
8
  /* eslint-disable @atlaskit/design-system/use-tokens-typography */
6
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
10
  import { css } from '@emotion/react';
8
11
  import { fg } from '@atlaskit/platform-feature-flags';
12
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
+ import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
9
14
  var headingWithAlignmentStyles = function headingWithAlignmentStyles() {
10
15
  return (
11
16
  // Override marginTop: 0 with default margin found in headingsSharedStyles for first heading in alignment block that is not the first child
@@ -42,76 +47,98 @@ var headingWithAlignmentStyles = function headingWithAlignmentStyles() {
42
47
 
43
48
  // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
44
49
  // text sizing prototype: http://proto/fabricrender/
45
- export var headingsSharedStyles = function headingsSharedStyles() {
46
- return css(_objectSpread({
47
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
48
- '& h1': {
49
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
50
- fontSize: "".concat(24 / 14, "em"),
51
- fontStyle: 'inherit',
52
- lineHeight: 28 / 24,
53
- color: "var(--ds-text, #172B4D)",
54
- fontWeight: "var(--ds-font-weight-medium, 500)",
55
- letterSpacing: "-0.01em",
56
- marginBottom: 0,
57
- marginTop: '1.667em'
58
- },
59
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
60
- '& h2': {
61
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
62
- fontSize: "".concat(20 / 14, "em"),
63
- fontStyle: 'inherit',
64
- lineHeight: 24 / 20,
65
- color: "var(--ds-text, #172B4D)",
66
- fontWeight: "var(--ds-font-weight-medium, 500)",
67
- letterSpacing: "-0.008em",
68
- marginTop: '1.8em',
69
- marginBottom: 0
70
- },
71
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
72
- '& h3': {
73
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
74
- fontSize: "".concat(16 / 14, "em"),
75
- fontStyle: 'inherit',
76
- lineHeight: 20 / 16,
77
- color: "var(--ds-text, #172B4D)",
78
- fontWeight: "var(--ds-font-weight-semibold, 600)",
79
- letterSpacing: "-0.006em",
80
- marginTop: '2em',
81
- marginBottom: 0
82
- },
83
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
84
- '& h4': {
85
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
86
- fontSize: "".concat(14 / 14, "em"),
87
- fontStyle: 'inherit',
88
- lineHeight: 16 / 14,
89
- color: "var(--ds-text, #172B4D)",
90
- fontWeight: "var(--ds-font-weight-semibold, 600)",
91
- letterSpacing: "-0.003em",
92
- marginTop: '1.357em'
93
- },
94
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
95
- '& h5': {
96
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
97
- fontSize: "".concat(12 / 14, "em"),
98
- fontStyle: 'inherit',
99
- lineHeight: 16 / 12,
100
- color: "var(--ds-text, #172B4D)",
101
- fontWeight: "var(--ds-font-weight-semibold, 600)",
102
- marginTop: '1.667em',
103
- textTransform: 'none'
104
- },
105
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
106
- '& h6': {
107
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
108
- fontSize: "".concat(11 / 14, "em"),
109
- fontStyle: 'inherit',
110
- lineHeight: 16 / 11,
111
- color: "var(--ds-text-subtlest, #626F86)",
112
- fontWeight: "var(--ds-font-weight-bold, 700)",
113
- marginTop: '1.455em',
114
- textTransform: 'none'
115
- }
116
- }, headingWithAlignmentStyles()));
50
+ export var headingsSharedStyles = function headingsSharedStyles(typographyTheme) {
51
+ var isADSTokenMigrationEnabled = editorExperiment('typography_migration_ugc', true);
52
+ if (isADSTokenMigrationEnabled) {
53
+ return css(_objectSpread({
54
+ '& h1': {
55
+ font: editorUGCToken('editor.font.heading.h1', typographyTheme),
56
+ marginBottom: 0,
57
+ marginTop: '1.667em'
58
+ },
59
+ '& h2': {
60
+ font: editorUGCToken('editor.font.heading.h2', typographyTheme),
61
+ marginTop: '1.8em',
62
+ marginBottom: 0
63
+ },
64
+ '& h3': {
65
+ font: editorUGCToken('editor.font.heading.h3', typographyTheme),
66
+ marginTop: '2em',
67
+ marginBottom: 0
68
+ },
69
+ '& h4': {
70
+ font: editorUGCToken('editor.font.heading.h4', typographyTheme),
71
+ marginTop: '1.357em'
72
+ },
73
+ '& h5': {
74
+ font: editorUGCToken('editor.font.heading.h5', typographyTheme),
75
+ textTransform: 'none'
76
+ },
77
+ '& h6': {
78
+ font: editorUGCToken('editor.font.heading.h6', typographyTheme),
79
+ marginTop: '1.455em',
80
+ textTransform: 'none'
81
+ }
82
+ }, headingWithAlignmentStyles()));
83
+ } else {
84
+ return css(_objectSpread({
85
+ '& h1': {
86
+ fontSize: "".concat(24 / 14, "em"),
87
+ fontStyle: 'inherit',
88
+ lineHeight: 28 / 24,
89
+ color: "var(--ds-text, #172B4D)",
90
+ fontWeight: "var(--ds-font-weight-medium, 500)",
91
+ letterSpacing: "-0.01em",
92
+ marginBottom: 0,
93
+ marginTop: '1.667em'
94
+ },
95
+ '& h2': {
96
+ fontSize: "".concat(20 / 14, "em"),
97
+ fontStyle: 'inherit',
98
+ lineHeight: 24 / 20,
99
+ color: "var(--ds-text, #172B4D)",
100
+ fontWeight: "var(--ds-font-weight-medium, 500)",
101
+ letterSpacing: "-0.008em",
102
+ marginTop: '1.8em',
103
+ marginBottom: 0
104
+ },
105
+ '& h3': {
106
+ fontSize: "".concat(16 / 14, "em"),
107
+ fontStyle: 'inherit',
108
+ lineHeight: 20 / 16,
109
+ color: "var(--ds-text, #172B4D)",
110
+ fontWeight: "var(--ds-font-weight-semibold, 600)",
111
+ letterSpacing: "-0.006em",
112
+ marginTop: '2em',
113
+ marginBottom: 0
114
+ },
115
+ '& h4': {
116
+ fontSize: "".concat(14 / 14, "em"),
117
+ fontStyle: 'inherit',
118
+ lineHeight: 16 / 14,
119
+ color: "var(--ds-text, #172B4D)",
120
+ fontWeight: "var(--ds-font-weight-semibold, 600)",
121
+ letterSpacing: "-0.003em",
122
+ marginTop: '1.357em'
123
+ },
124
+ '& h5': {
125
+ fontSize: "".concat(12 / 14, "em"),
126
+ fontStyle: 'inherit',
127
+ lineHeight: 16 / 12,
128
+ color: "var(--ds-text, #172B4D)",
129
+ fontWeight: "var(--ds-font-weight-semibold, 600)",
130
+ marginTop: '1.667em',
131
+ textTransform: 'none'
132
+ },
133
+ '& h6': {
134
+ fontSize: "".concat(11 / 14, "em"),
135
+ fontStyle: 'inherit',
136
+ lineHeight: 16 / 11,
137
+ color: "var(--ds-text-subtlest, #626F86)",
138
+ fontWeight: "var(--ds-font-weight-bold, 700)",
139
+ marginTop: '1.455em',
140
+ textTransform: 'none'
141
+ }
142
+ }, headingWithAlignmentStyles()));
143
+ }
117
144
  };
@@ -1,19 +1,32 @@
1
+ /* eslint-disable @atlaskit/ui-styling-standard/no-exported-styles */
2
+ /* eslint-disable @atlaskit/design-system/use-tokens-typography */
3
+ /* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-values */
4
+ /* eslint-disable @atlaskit/ui-styling-standard/no-imported-style-values */
1
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
6
  import { css } from '@emotion/react';
3
7
  import { akEditorLineHeight, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
8
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
+ import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
4
10
 
5
11
  // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
7
- export var paragraphSharedStyles = css({
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
9
- '& p': {
10
- fontSize: '1em',
11
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
12
- lineHeight: akEditorLineHeight,
13
- fontWeight: 'normal',
14
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
15
- marginTop: blockNodesVerticalMargin,
16
- marginBottom: 0,
17
- letterSpacing: '-0.005em'
18
- }
19
- });
12
+ export var paragraphSharedStyles = function paragraphSharedStyles(typographyTheme) {
13
+ return editorExperiment('typography_migration_ugc', true) ? css({
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
15
+ '& p': {
16
+ font: editorUGCToken('editor.font.body', typographyTheme),
17
+ marginTop: blockNodesVerticalMargin,
18
+ marginBottom: 0
19
+ }
20
+ }) : css({
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
22
+ '& p': {
23
+ fontSize: '1em',
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
+ lineHeight: akEditorLineHeight,
26
+ fontWeight: 'normal',
27
+ marginTop: blockNodesVerticalMargin,
28
+ marginBottom: 0,
29
+ letterSpacing: '-0.005em'
30
+ }
31
+ });
32
+ };
@@ -0,0 +1,27 @@
1
+ export var editorUGCTokens = {
2
+ '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',
3
+ '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',
4
+ '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',
5
+ 'editor.font.heading.h4': 'normal 600 1em/1.14286 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
6
+ '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',
7
+ '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',
8
+ 'editor.font.body': 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif'
9
+ };
10
+ export var editorUGCTokensModernized = {
11
+ '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',
12
+ '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',
13
+ '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',
14
+ 'editor.font.heading.h4': 'normal 700 1em/1.14286 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif',
15
+ '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',
16
+ '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',
17
+ 'editor.font.body': 'normal 400 1em/1.714 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, system-ui, "Helvetica Neue", sans-serif'
18
+ };
19
+ export var editorUGCTokensRefreshed = {
20
+ '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',
21
+ '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',
22
+ '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',
23
+ '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',
24
+ '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',
25
+ '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',
26
+ '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'
27
+ };
@@ -0,0 +1,17 @@
1
+ import { editorUGCTokens, editorUGCTokensModernized, editorUGCTokensRefreshed } from './editor-ugc-token-names';
2
+ function editorUGCToken(path, typographyTheme) {
3
+ var token;
4
+ switch (typographyTheme) {
5
+ case 'typography-modernized':
6
+ token = editorUGCTokensModernized[path];
7
+ break;
8
+ case 'typography-refreshed':
9
+ token = editorUGCTokensRefreshed[path];
10
+ break;
11
+ default:
12
+ token = editorUGCTokens[path];
13
+ break;
14
+ }
15
+ return token;
16
+ }
17
+ export default editorUGCToken;
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
21
21
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "93.4.1";
24
+ var packageVersion = "93.4.2";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var DropList = /*#__PURE__*/function (_Component) {
@@ -12,6 +12,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
12
12
  import React, { Component } from 'react';
13
13
  import Popper from 'popper.js'; // eslint-disable-line import/extensions
14
14
  import rafSchedule from 'raf-schd';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
15
16
  import { positionPropToPopperPosition } from './internal/helpers';
16
17
  var defaultState = {
17
18
  hasExtractedStyles: false,
@@ -68,13 +69,18 @@ var Layer = /*#__PURE__*/function (_Component) {
68
69
  }, {
69
70
  key: "UNSAFE_componentWillReceiveProps",
70
71
  value: function UNSAFE_componentWillReceiveProps(nextProps) {
71
- this.applyPopper(nextProps);
72
+ if (!fg('platform_editor_react18_phase2')) {
73
+ this.applyPopper(nextProps);
74
+ }
72
75
  }
73
76
  }, {
74
77
  key: "componentDidUpdate",
75
78
  value: function componentDidUpdate(prevProps, prevState) {
76
79
  var onPositioned = this.props.onPositioned;
77
80
  var hasExtractedStyles = this.state.hasExtractedStyles;
81
+ if (this.props !== prevProps && fg('platform_editor_react18_phase2')) {
82
+ this.applyPopper(this.props);
83
+ }
78
84
 
79
85
  // This flag is set the first time the position is calculated from Popper and applied to the content
80
86
  if (!prevState.hasExtractedStyles && hasExtractedStyles && onPositioned) {
@@ -14,6 +14,7 @@ export type EditorAnalyticsAPI = {
14
14
  * fireAnalyticsEvent is used to fire an analytics payloads directly
15
15
  *
16
16
  * @param {AnalyticsEventPayload} payload - analytics payload
17
+ * @param {string} [channel="editor"] - optional channel identifier
17
18
  */
18
- fireAnalyticsEvent: (payload: AnalyticsEventPayload) => void | undefined;
19
+ fireAnalyticsEvent: (payload: AnalyticsEventPayload, channel?: string) => void | undefined;
19
20
  };
@@ -1 +1 @@
1
- export declare const headingsSharedStyles: () => import("@emotion/react").SerializedStyles;
1
+ export declare const headingsSharedStyles: (typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed') => import("@emotion/react").SerializedStyles;
@@ -1 +1 @@
1
- export declare const paragraphSharedStyles: import("@emotion/react").SerializedStyles;
1
+ export declare const paragraphSharedStyles: (typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed') => import("@emotion/react").SerializedStyles;
@@ -0,0 +1,12 @@
1
+ export type EditorUGCTokens = {
2
+ 'editor.font.heading.h1': string;
3
+ 'editor.font.heading.h2': string;
4
+ 'editor.font.heading.h3': string;
5
+ 'editor.font.heading.h4': string;
6
+ 'editor.font.heading.h5': string;
7
+ 'editor.font.heading.h6': string;
8
+ 'editor.font.body': string;
9
+ };
10
+ export declare const editorUGCTokens: EditorUGCTokens;
11
+ export declare const editorUGCTokensModernized: EditorUGCTokens;
12
+ export declare const editorUGCTokensRefreshed: EditorUGCTokens;
@@ -0,0 +1,3 @@
1
+ import { type EditorUGCTokens } from './editor-ugc-token-names';
2
+ declare function editorUGCToken<T extends keyof EditorUGCTokens>(path: T, typographyTheme: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed' | undefined): string;
3
+ export default editorUGCToken;
@@ -14,6 +14,7 @@ export type EditorAnalyticsAPI = {
14
14
  * fireAnalyticsEvent is used to fire an analytics payloads directly
15
15
  *
16
16
  * @param {AnalyticsEventPayload} payload - analytics payload
17
+ * @param {string} [channel="editor"] - optional channel identifier
17
18
  */
18
- fireAnalyticsEvent: (payload: AnalyticsEventPayload) => void | undefined;
19
+ fireAnalyticsEvent: (payload: AnalyticsEventPayload, channel?: string) => void | undefined;
19
20
  };
@@ -1 +1 @@
1
- export declare const headingsSharedStyles: () => import("@emotion/react").SerializedStyles;
1
+ export declare const headingsSharedStyles: (typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed') => import("@emotion/react").SerializedStyles;
@@ -1 +1 @@
1
- export declare const paragraphSharedStyles: import("@emotion/react").SerializedStyles;
1
+ export declare const paragraphSharedStyles: (typographyTheme?: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed') => import("@emotion/react").SerializedStyles;
@@ -0,0 +1,12 @@
1
+ export type EditorUGCTokens = {
2
+ 'editor.font.heading.h1': string;
3
+ 'editor.font.heading.h2': string;
4
+ 'editor.font.heading.h3': string;
5
+ 'editor.font.heading.h4': string;
6
+ 'editor.font.heading.h5': string;
7
+ 'editor.font.heading.h6': string;
8
+ 'editor.font.body': string;
9
+ };
10
+ export declare const editorUGCTokens: EditorUGCTokens;
11
+ export declare const editorUGCTokensModernized: EditorUGCTokens;
12
+ export declare const editorUGCTokensRefreshed: EditorUGCTokens;
@@ -0,0 +1,3 @@
1
+ import { type EditorUGCTokens } from './editor-ugc-token-names';
2
+ declare function editorUGCToken<T extends keyof EditorUGCTokens>(path: T, typographyTheme: 'typography' | 'typography-adg3' | 'typography-modernized' | 'typography-refreshed' | undefined): string;
3
+ export default editorUGCToken;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "93.4.1",
3
+ "version": "93.4.2",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -130,7 +130,7 @@
130
130
  "@atlaskit/icon-object": "^6.5.0",
131
131
  "@atlaskit/link-datasource": "^3.6.0",
132
132
  "@atlaskit/link-picker": "^1.47.0",
133
- "@atlaskit/media-card": "^78.5.0",
133
+ "@atlaskit/media-card": "^78.6.0",
134
134
  "@atlaskit/media-client": "^28.0.0",
135
135
  "@atlaskit/media-client-react": "^2.2.0",
136
136
  "@atlaskit/media-common": "^11.6.0",
@@ -150,7 +150,7 @@
150
150
  "@atlaskit/spinner": "^16.3.0",
151
151
  "@atlaskit/task-decision": "^17.11.0",
152
152
  "@atlaskit/textfield": "^6.5.0",
153
- "@atlaskit/tmp-editor-statsig": "^2.2.0",
153
+ "@atlaskit/tmp-editor-statsig": "^2.4.0",
154
154
  "@atlaskit/tokens": "^2.0.0",
155
155
  "@atlaskit/tooltip": "^18.8.0",
156
156
  "@atlaskit/ufo": "^0.3.0",