@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 93.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#152012](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152012)
8
+ [`30a69f02904da`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/30a69f02904da) -
9
+ [ED-23460] Make sure that error analytics in editor-plugin-mentions can fire by using actions from
10
+ editor-plugin-analytics
11
+
12
+ - **@atlaskit/editor-common**: Add types for `@atlaskit/editor-plugin-mentions` analytics
13
+ - **@atlaskit/editor-plugin-mentions**: Switch to using `@atlaskit/editor-plugin-analytics`
14
+ actions so that error events can be queued and fired consistently
15
+ - **@atlaskit/mention**: Move some enums to the types file and export them so they can be used to
16
+ type analytics events
17
+
18
+ ## 93.4.2
19
+
20
+ ### Patch Changes
21
+
22
+ - [#151956](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/151956)
23
+ [`10d31e630989b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10d31e630989b) -
24
+ Update internal Layer component to avoid UNSAFE lifecycle method
25
+ - [#152099](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152099)
26
+ [`76e822ba23b83`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/76e822ba23b83) -
27
+ [ED-23460] Allow develops to specify the channel when firing events
28
+ - [#152019](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/152019)
29
+ [`5f7f23dd0c612`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5f7f23dd0c612) -
30
+ [ux] ED-25082: Added editor custom font tokens and use them for normal texts and paragraph texts"
31
+ - Updated dependencies
32
+
3
33
  ## 93.4.1
4
34
 
5
35
  ### Patch Changes
@@ -83,6 +83,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
83
83
  ACTION["PASTED"] = "pasted";
84
84
  ACTION["PASTED_AS_PLAIN"] = "pastedAsPlain";
85
85
  ACTION["PASTED_TIMED"] = "pastedTimed";
86
+ ACTION["PRESSED"] = "pressed";
86
87
  ACTION["PROSEMIRROR_RENDERED"] = "proseMirrorRendered";
87
88
  ACTION["REACT_NODEVIEW_RENDERED"] = "reactNodeViewRendered";
88
89
  ACTION["REPLACED_ALL"] = "replacedAll";
@@ -221,11 +222,13 @@ var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJ
221
222
  ACTION_SUBJECT["FLOATING_CONTEXTUAL_BUTTON"] = "floatingContextualButton";
222
223
  ACTION_SUBJECT["FLOATING_TOOLBAR_PLUGIN"] = "floatingToolbarPlugin";
223
224
  ACTION_SUBJECT["HELP"] = "help";
225
+ ACTION_SUBJECT["INVITE_ITEM"] = "inviteItem";
224
226
  ACTION_SUBJECT["LAYOUT"] = "layout";
225
227
  ACTION_SUBJECT["LIST"] = "list";
226
228
  ACTION_SUBJECT["MEDIA"] = "media";
227
229
  ACTION_SUBJECT["MEDIA_SINGLE"] = "mediaSingle";
228
230
  ACTION_SUBJECT["MENTION"] = "mention";
231
+ ACTION_SUBJECT["MENTION_TYPEAHEAD"] = "mentionTypeahead";
229
232
  ACTION_SUBJECT["NESTED_EXPAND"] = "nestedExpand";
230
233
  ACTION_SUBJECT["PANEL"] = "panel";
231
234
  ACTION_SUBJECT["PICKER"] = "picker";
@@ -238,6 +241,7 @@ var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJ
238
241
  ACTION_SUBJECT["HYPERLINK"] = "hyperlink";
239
242
  ACTION_SUBJECT["TABLE"] = "table";
240
243
  ACTION_SUBJECT["TABLES_PLUGIN"] = "tablesPlugin";
244
+ ACTION_SUBJECT["TEAM_MENTION_TYPEAHEAD"] = "teamMentionTypeahead";
241
245
  ACTION_SUBJECT["TEXT"] = "text";
242
246
  ACTION_SUBJECT["TOOLBAR"] = "toolbar";
243
247
  ACTION_SUBJECT["TYPEAHEAD"] = "typeAhead";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -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.3";
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.3";
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) {
@@ -77,6 +77,7 @@ export let 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 let 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 let 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 {};
@@ -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.3";
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