@atlaskit/editor-common 93.4.1 → 93.4.3

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 (45) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/cjs/analytics/types/enums.js +4 -0
  3. package/dist/cjs/analytics/types/mention-events.js +5 -0
  4. package/dist/cjs/monitoring/error.js +1 -1
  5. package/dist/cjs/styles/shared/headings.js +97 -73
  6. package/dist/cjs/styles/shared/paragraph.js +28 -14
  7. package/dist/cjs/ugc-tokens/editor-ugc-token-names.js +33 -0
  8. package/dist/cjs/ugc-tokens/get-editor-ugc-token.js +23 -0
  9. package/dist/cjs/ui/DropList/index.js +1 -1
  10. package/dist/cjs/ui/Layer/index.js +7 -1
  11. package/dist/es2019/analytics/types/enums.js +4 -0
  12. package/dist/es2019/analytics/types/mention-events.js +1 -0
  13. package/dist/es2019/monitoring/error.js +1 -1
  14. package/dist/es2019/styles/shared/headings.js +102 -73
  15. package/dist/es2019/styles/shared/paragraph.js +27 -14
  16. package/dist/es2019/ugc-tokens/editor-ugc-token-names.js +27 -0
  17. package/dist/es2019/ugc-tokens/get-editor-ugc-token.js +17 -0
  18. package/dist/es2019/ui/DropList/index.js +1 -1
  19. package/dist/es2019/ui/Layer/index.js +7 -1
  20. package/dist/esm/analytics/types/enums.js +4 -0
  21. package/dist/esm/analytics/types/mention-events.js +1 -0
  22. package/dist/esm/monitoring/error.js +1 -1
  23. package/dist/esm/styles/shared/headings.js +99 -72
  24. package/dist/esm/styles/shared/paragraph.js +27 -14
  25. package/dist/esm/ugc-tokens/editor-ugc-token-names.js +27 -0
  26. package/dist/esm/ugc-tokens/get-editor-ugc-token.js +17 -0
  27. package/dist/esm/ui/DropList/index.js +1 -1
  28. package/dist/esm/ui/Layer/index.js +7 -1
  29. package/dist/types/analytics/api.d.ts +2 -1
  30. package/dist/types/analytics/types/enums.d.ts +4 -0
  31. package/dist/types/analytics/types/events.d.ts +2 -1
  32. package/dist/types/analytics/types/mention-events.d.ts +80 -0
  33. package/dist/types/styles/shared/headings.d.ts +1 -1
  34. package/dist/types/styles/shared/paragraph.d.ts +1 -1
  35. package/dist/types/ugc-tokens/editor-ugc-token-names.d.ts +12 -0
  36. package/dist/types/ugc-tokens/get-editor-ugc-token.d.ts +3 -0
  37. package/dist/types-ts4.5/analytics/api.d.ts +2 -1
  38. package/dist/types-ts4.5/analytics/types/enums.d.ts +4 -0
  39. package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
  40. package/dist/types-ts4.5/analytics/types/mention-events.d.ts +80 -0
  41. package/dist/types-ts4.5/styles/shared/headings.d.ts +1 -1
  42. package/dist/types-ts4.5/styles/shared/paragraph.d.ts +1 -1
  43. package/dist/types-ts4.5/ugc-tokens/editor-ugc-token-names.d.ts +12 -0
  44. package/dist/types-ts4.5/ugc-tokens/get-editor-ugc-token.d.ts +3 -0
  45. package/package.json +3 -3
@@ -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.3";
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) {
@@ -77,6 +77,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
77
77
  ACTION["PASTED"] = "pasted";
78
78
  ACTION["PASTED_AS_PLAIN"] = "pastedAsPlain";
79
79
  ACTION["PASTED_TIMED"] = "pastedTimed";
80
+ ACTION["PRESSED"] = "pressed";
80
81
  ACTION["PROSEMIRROR_RENDERED"] = "proseMirrorRendered";
81
82
  ACTION["REACT_NODEVIEW_RENDERED"] = "reactNodeViewRendered";
82
83
  ACTION["REPLACED_ALL"] = "replacedAll";
@@ -215,11 +216,13 @@ export var ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
215
216
  ACTION_SUBJECT["FLOATING_CONTEXTUAL_BUTTON"] = "floatingContextualButton";
216
217
  ACTION_SUBJECT["FLOATING_TOOLBAR_PLUGIN"] = "floatingToolbarPlugin";
217
218
  ACTION_SUBJECT["HELP"] = "help";
219
+ ACTION_SUBJECT["INVITE_ITEM"] = "inviteItem";
218
220
  ACTION_SUBJECT["LAYOUT"] = "layout";
219
221
  ACTION_SUBJECT["LIST"] = "list";
220
222
  ACTION_SUBJECT["MEDIA"] = "media";
221
223
  ACTION_SUBJECT["MEDIA_SINGLE"] = "mediaSingle";
222
224
  ACTION_SUBJECT["MENTION"] = "mention";
225
+ ACTION_SUBJECT["MENTION_TYPEAHEAD"] = "mentionTypeahead";
223
226
  ACTION_SUBJECT["NESTED_EXPAND"] = "nestedExpand";
224
227
  ACTION_SUBJECT["PANEL"] = "panel";
225
228
  ACTION_SUBJECT["PICKER"] = "picker";
@@ -232,6 +235,7 @@ export var ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
232
235
  ACTION_SUBJECT["HYPERLINK"] = "hyperlink";
233
236
  ACTION_SUBJECT["TABLE"] = "table";
234
237
  ACTION_SUBJECT["TABLES_PLUGIN"] = "tablesPlugin";
238
+ ACTION_SUBJECT["TEAM_MENTION_TYPEAHEAD"] = "teamMentionTypeahead";
235
239
  ACTION_SUBJECT["TEXT"] = "text";
236
240
  ACTION_SUBJECT["TOOLBAR"] = "toolbar";
237
241
  ACTION_SUBJECT["TYPEAHEAD"] = "typeAhead";
@@ -0,0 +1 @@
1
+ export {};
@@ -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.3";
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
+ };