@atlaskit/editor-common 87.3.4 → 87.4.0

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 (31) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/element-browser/components/ElementList/EmptyState.js +10 -4
  3. package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +11 -4
  4. package/dist/cjs/messages/block-type.js +5 -0
  5. package/dist/cjs/messages/insert-block.js +5 -0
  6. package/dist/cjs/monitoring/error.js +1 -1
  7. package/dist/cjs/styles/shared/background-color.js +1 -17
  8. package/dist/cjs/ui/DropList/index.js +1 -1
  9. package/dist/es2019/element-browser/components/ElementList/EmptyState.js +10 -4
  10. package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +11 -4
  11. package/dist/es2019/messages/block-type.js +5 -0
  12. package/dist/es2019/messages/insert-block.js +5 -0
  13. package/dist/es2019/monitoring/error.js +1 -1
  14. package/dist/es2019/styles/shared/background-color.js +1 -17
  15. package/dist/es2019/ui/DropList/index.js +1 -1
  16. package/dist/esm/element-browser/components/ElementList/EmptyState.js +10 -4
  17. package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +11 -4
  18. package/dist/esm/messages/block-type.js +5 -0
  19. package/dist/esm/messages/insert-block.js +5 -0
  20. package/dist/esm/monitoring/error.js +1 -1
  21. package/dist/esm/styles/shared/background-color.js +1 -17
  22. package/dist/esm/ui/DropList/index.js +1 -1
  23. package/dist/types/messages/block-type.d.ts +5 -0
  24. package/dist/types/messages/insert-block.d.ts +5 -0
  25. package/dist/types/types/feature-flags.d.ts +8 -0
  26. package/dist/types/types/floating-toolbar.d.ts +4 -0
  27. package/dist/types-ts4.5/messages/block-type.d.ts +5 -0
  28. package/dist/types-ts4.5/messages/insert-block.d.ts +5 -0
  29. package/dist/types-ts4.5/types/feature-flags.d.ts +8 -0
  30. package/dist/types-ts4.5/types/floating-toolbar.d.ts +4 -0
  31. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 87.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`3ac0ae73c0d52`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3ac0ae73c0d52) -
8
+ [ED-24499] Add Turn into dropdown button to text selection toolbar for
9
+ platform_editor_basic_text_transformations experiment. This button will be used to provide options
10
+ to transform selected texts/inline nodes into other elements (e.g. expand) containing the content.
11
+
12
+ ### Patch Changes
13
+
14
+ - [#126418](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126418)
15
+ [`dc10688cd20b6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/dc10688cd20b6) -
16
+ [ux] Migrate typography with new ADS token and primitive
17
+ - Updated dependencies
18
+
19
+ ## 87.3.5
20
+
21
+ ### Patch Changes
22
+
23
+ - [#126974](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126974)
24
+ [`8730c454c41f7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8730c454c41f7) -
25
+ [ux] [ED-24386] Clean up FF platform.editor.review-text-highlighting-styling
26
+
3
27
  ## 87.3.4
4
28
 
5
29
  ### Patch Changes
@@ -8,6 +8,7 @@ exports.default = EmptyState;
8
8
  var _react = require("@emotion/react");
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  var _new = require("@atlaskit/button/new");
11
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
12
  var _primitives = require("@atlaskit/primitives");
12
13
  var _NotFoundIllustration = _interopRequireDefault(require("./NotFoundIllustration"));
13
14
  /**
@@ -22,7 +23,7 @@ function EmptyState(_ref) {
22
23
  css: emptyStateWrapper,
23
24
  "data-testid": "empty-state-wrapper"
24
25
  }, (0, _react.jsx)(_NotFoundIllustration.default, null), (0, _react.jsx)("div", {
25
- css: emptyStateHeading
26
+ css: [emptyStateHeading, (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? emptyStateHeadingFontToken : emptyStateHeadingFont]
26
27
  }, (0, _react.jsx)(_reactIntlNext.FormattedMessage, {
27
28
  id: "fabric.editor.elementbrowser.search.empty-state.heading",
28
29
  defaultMessage: "Nothing matches your search",
@@ -46,12 +47,17 @@ function EmptyState(_ref) {
46
47
  description: "Empty state sub-heading external link"
47
48
  })))));
48
49
  }
49
- var emptyStateHeading = (0, _react.css)({
50
+ var emptyStateHeadingFontToken = (0, _react.css)({
51
+ font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
52
+ });
53
+ var emptyStateHeadingFont = (0, _react.css)({
50
54
  fontSize: '1.42857em',
51
55
  lineHeight: 1.2,
52
- color: "var(--ds-text, rgb(23, 43, 77))",
53
56
  fontWeight: 500,
54
- letterSpacing: '-0.008em',
57
+ letterSpacing: '-0.008em'
58
+ });
59
+ var emptyStateHeading = (0, _react.css)({
60
+ color: "var(--ds-text, rgb(23, 43, 77))",
55
61
  marginTop: "var(--ds-space-300, 24px)"
56
62
  });
57
63
  var emptyStateSubHeading = (0, _react.css)({
@@ -26,6 +26,7 @@ var _adfSchema = require("@atlaskit/adf-schema");
26
26
  var _analyticsNext = require("@atlaskit/analytics-next");
27
27
  var _ = _interopRequireDefault(require("@atlaskit/icon-object/glyph/page/16"));
28
28
  var _crossCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/cross-circle"));
29
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
29
30
  var _primitives = require("@atlaskit/primitives");
30
31
  var _colors = require("@atlaskit/theme/colors");
31
32
  var _constants = require("@atlaskit/theme/constants");
@@ -76,10 +77,16 @@ var containerPadding = (0, _react2.css)({
76
77
  var textLabelMargin = (0, _react2.css)({
77
78
  marginTop: "var(--ds-space-150, 12px)"
78
79
  });
79
- var inputLabel = (0, _react2.css)({
80
+ var inputLabelFontToken = (0, _react2.css)({
81
+ font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
82
+ fontWeight: "var(--ds-font-weight-medium, 500)"
83
+ });
84
+ var inputLabelFont = (0, _react2.css)({
80
85
  fontSize: "".concat((0, _constants.fontSizeSmall)(), "px"),
86
+ fontWeight: 500
87
+ });
88
+ var inputLabel = (0, _react2.css)({
81
89
  color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
82
- fontWeight: 500,
83
90
  paddingBottom: "var(--ds-space-050, 4px)"
84
91
  });
85
92
  var inputWrapperPosition = (0, _react2.css)({
@@ -854,7 +861,7 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
854
861
  ref: this.wrapperRef
855
862
  }, (0, _react2.jsx)("label", {
856
863
  htmlFor: linkSearchInputId,
857
- css: inputLabel
864
+ css: [inputLabel, (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? inputLabelFontToken : inputLabelFont]
858
865
  }, formatMessage(messages.linkVisibleLabel)), (0, _react2.jsx)("div", {
859
866
  css: [_ToolbarComponents.inputWrapper, inputWrapperPosition]
860
867
  }, screenReaderText && (0, _react2.jsx)(_ui.Announcer, {
@@ -898,7 +905,7 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
898
905
  primaryColor: "var(--ds-icon-subtle, #626F86)"
899
906
  }))))), (0, _react2.jsx)("label", {
900
907
  htmlFor: displayTextInputId,
901
- css: [inputLabel, textLabelMargin]
908
+ css: [inputLabel, textLabelMargin, (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? inputLabelFontToken : inputLabelFont]
902
909
  }, formatMessage(messages.textVisibleLabel)), (0, _react2.jsx)("div", {
903
910
  css: [_ToolbarComponents.inputWrapper, inputWrapperPosition]
904
911
  }, (0, _react2.jsx)(_ui.PanelTextInput, {
@@ -151,6 +151,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
151
151
  defaultMessage: 'Add a note with an emoji and colored background',
152
152
  description: 'Visually distinguishes your panel by adding a emoji icon and background color '
153
153
  },
154
+ panel: {
155
+ id: 'fabric.editor.panel',
156
+ defaultMessage: 'Panel',
157
+ description: 'Visually distinguishes your text by adding a panel'
158
+ },
154
159
  other: {
155
160
  id: 'fabric.editor.other',
156
161
  defaultMessage: 'Others...',
@@ -230,5 +230,10 @@ var toolbarInsertBlockMessages = exports.toolbarInsertBlockMessages = (0, _react
230
230
  id: 'fabric.editor.recordLoomShortTitle',
231
231
  defaultMessage: 'Record',
232
232
  description: 'Record'
233
+ },
234
+ turnInto: {
235
+ id: 'fabric.editor.turnInto',
236
+ defaultMessage: 'Turn into',
237
+ description: 'Turn selected texts into another element containing those texts'
233
238
  }
234
239
  });
@@ -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 && Object.prototype.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 = "87.3.4";
20
+ var packageVersion = "87.4.0";
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
@@ -5,12 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.backgroundColorStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
9
 
11
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
12
11
  var backgroundColorStyles = exports.backgroundColorStyles = function backgroundColorStyles() {
13
- return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.review-text-highlighting-styling') ? (0, _react.css)({
12
+ return (0, _react.css)({
14
13
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
15
14
  '.fabric-background-color-mark': {
16
15
  backgroundColor: 'var(--custom-palette-color, inherit)',
@@ -31,20 +30,5 @@ var backgroundColorStyles = exports.backgroundColorStyles = function backgroundC
31
30
  '.fabric-background-color-mark .ak-editor-annotation': {
32
31
  backgroundColor: 'unset'
33
32
  }
34
- }) : (0, _react.css)({
35
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
36
- '.fabric-background-color-mark': {
37
- backgroundColor: 'var(--custom-palette-color, inherit)'
38
- },
39
- // Don't show text highlight styling when there is a hyperlink
40
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
41
- 'a .fabric-background-color-mark': {
42
- backgroundColor: 'unset'
43
- },
44
- // Don't show text highlight styling when there is an inline comment
45
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
46
- '.fabric-background-color-mark .ak-editor-annotation': {
47
- backgroundColor: 'unset'
48
- }
49
33
  });
50
34
  };
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "87.3.4";
26
+ var packageVersion = "87.4.0";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  var DropList = /*#__PURE__*/function (_Component) {
@@ -6,6 +6,7 @@
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import { FormattedMessage } from 'react-intl-next';
8
8
  import { LinkButton } from '@atlaskit/button/new';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import { Box, xcss } from '@atlaskit/primitives';
10
11
  import NotFoundIllustration from './NotFoundIllustration';
11
12
  export default function EmptyState({
@@ -15,7 +16,7 @@ export default function EmptyState({
15
16
  css: emptyStateWrapper,
16
17
  "data-testid": "empty-state-wrapper"
17
18
  }, jsx(NotFoundIllustration, null), jsx("div", {
18
- css: emptyStateHeading
19
+ css: [emptyStateHeading, fg('platform_editor_migration_icon_and_typography') ? emptyStateHeadingFontToken : emptyStateHeadingFont]
19
20
  }, jsx(FormattedMessage, {
20
21
  id: "fabric.editor.elementbrowser.search.empty-state.heading",
21
22
  defaultMessage: "Nothing matches your search",
@@ -39,12 +40,17 @@ export default function EmptyState({
39
40
  description: "Empty state sub-heading external link"
40
41
  })))));
41
42
  }
42
- const emptyStateHeading = css({
43
+ const emptyStateHeadingFontToken = css({
44
+ font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
45
+ });
46
+ const emptyStateHeadingFont = css({
43
47
  fontSize: '1.42857em',
44
48
  lineHeight: 1.2,
45
- color: "var(--ds-text, rgb(23, 43, 77))",
46
49
  fontWeight: 500,
47
- letterSpacing: '-0.008em',
50
+ letterSpacing: '-0.008em'
51
+ });
52
+ const emptyStateHeading = css({
53
+ color: "var(--ds-text, rgb(23, 43, 77))",
48
54
  marginTop: "var(--ds-space-300, 24px)"
49
55
  });
50
56
  const emptyStateSubHeading = css({
@@ -15,6 +15,7 @@ import { isSafeUrl } from '@atlaskit/adf-schema';
15
15
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
16
16
  import Page16Icon from '@atlaskit/icon-object/glyph/page/16';
17
17
  import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
18
+ import { fg } from '@atlaskit/platform-feature-flags';
18
19
  import { Pressable, xcss } from '@atlaskit/primitives';
19
20
  import { N200 } from '@atlaskit/theme/colors';
20
21
  import { fontSizeSmall } from '@atlaskit/theme/constants';
@@ -59,10 +60,16 @@ const containerPadding = css({
59
60
  const textLabelMargin = css({
60
61
  marginTop: "var(--ds-space-150, 12px)"
61
62
  });
62
- const inputLabel = css({
63
+ const inputLabelFontToken = css({
64
+ font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
65
+ fontWeight: "var(--ds-font-weight-medium, 500)"
66
+ });
67
+ const inputLabelFont = css({
63
68
  fontSize: `${fontSizeSmall()}px`,
69
+ fontWeight: 500
70
+ });
71
+ const inputLabel = css({
64
72
  color: `var(--ds-text-subtlest, ${N200})`,
65
- fontWeight: 500,
66
73
  paddingBottom: "var(--ds-space-050, 4px)"
67
74
  });
68
75
  const inputWrapperPosition = css({
@@ -696,7 +703,7 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
696
703
  ref: this.wrapperRef
697
704
  }, jsx("label", {
698
705
  htmlFor: linkSearchInputId,
699
- css: inputLabel
706
+ css: [inputLabel, fg('platform_editor_migration_icon_and_typography') ? inputLabelFontToken : inputLabelFont]
700
707
  }, formatMessage(messages.linkVisibleLabel)), jsx("div", {
701
708
  css: [inputWrapper, inputWrapperPosition]
702
709
  }, screenReaderText && jsx(Announcer, {
@@ -738,7 +745,7 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
738
745
  primaryColor: "var(--ds-icon-subtle, #626F86)"
739
746
  }))))), jsx("label", {
740
747
  htmlFor: displayTextInputId,
741
- css: [inputLabel, textLabelMargin]
748
+ css: [inputLabel, textLabelMargin, fg('platform_editor_migration_icon_and_typography') ? inputLabelFontToken : inputLabelFont]
742
749
  }, formatMessage(messages.textVisibleLabel)), jsx("div", {
743
750
  css: [inputWrapper, inputWrapperPosition]
744
751
  }, jsx(PanelTextInput, {
@@ -145,6 +145,11 @@ export const messages = defineMessages({
145
145
  defaultMessage: 'Add a note with an emoji and colored background',
146
146
  description: 'Visually distinguishes your panel by adding a emoji icon and background color '
147
147
  },
148
+ panel: {
149
+ id: 'fabric.editor.panel',
150
+ defaultMessage: 'Panel',
151
+ description: 'Visually distinguishes your text by adding a panel'
152
+ },
148
153
  other: {
149
154
  id: 'fabric.editor.other',
150
155
  defaultMessage: 'Others...',
@@ -224,5 +224,10 @@ export const toolbarInsertBlockMessages = defineMessages({
224
224
  id: 'fabric.editor.recordLoomShortTitle',
225
225
  defaultMessage: 'Record',
226
226
  description: 'Record'
227
+ },
228
+ turnInto: {
229
+ id: 'fabric.editor.turnInto',
230
+ defaultMessage: 'Turn into',
231
+ description: 'Turn selected texts into another element containing those texts'
227
232
  }
228
233
  });
@@ -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 = "87.3.4";
4
+ const packageVersion = "87.4.0";
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,10 +1,9 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import { css } from '@emotion/react';
3
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
3
 
5
4
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
6
5
  export const backgroundColorStyles = () => {
7
- return getBooleanFF('platform.editor.review-text-highlighting-styling') ? css({
6
+ return css({
8
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
9
8
  '.fabric-background-color-mark': {
10
9
  backgroundColor: 'var(--custom-palette-color, inherit)',
@@ -25,20 +24,5 @@ export const backgroundColorStyles = () => {
25
24
  '.fabric-background-color-mark .ak-editor-annotation': {
26
25
  backgroundColor: 'unset'
27
26
  }
28
- }) : css({
29
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
30
- '.fabric-background-color-mark': {
31
- backgroundColor: 'var(--custom-palette-color, inherit)'
32
- },
33
- // Don't show text highlight styling when there is a hyperlink
34
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
35
- 'a .fabric-background-color-mark': {
36
- backgroundColor: 'unset'
37
- },
38
- // Don't show text highlight styling when there is an inline comment
39
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
40
- '.fabric-background-color-mark .ak-editor-annotation': {
41
- backgroundColor: 'unset'
42
- }
43
27
  });
44
28
  };
@@ -12,7 +12,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
12
12
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
13
13
  import Layer from '../Layer';
14
14
  const packageName = "@atlaskit/editor-common";
15
- const packageVersion = "87.3.4";
15
+ const packageVersion = "87.4.0";
16
16
  const halfFocusRing = 1;
17
17
  const dropOffset = '0, 8';
18
18
  class DropList extends Component {
@@ -6,6 +6,7 @@
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import { FormattedMessage } from 'react-intl-next';
8
8
  import { LinkButton } from '@atlaskit/button/new';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import { Box, xcss } from '@atlaskit/primitives';
10
11
  import NotFoundIllustration from './NotFoundIllustration';
11
12
  export default function EmptyState(_ref) {
@@ -14,7 +15,7 @@ export default function EmptyState(_ref) {
14
15
  css: emptyStateWrapper,
15
16
  "data-testid": "empty-state-wrapper"
16
17
  }, jsx(NotFoundIllustration, null), jsx("div", {
17
- css: emptyStateHeading
18
+ css: [emptyStateHeading, fg('platform_editor_migration_icon_and_typography') ? emptyStateHeadingFontToken : emptyStateHeadingFont]
18
19
  }, jsx(FormattedMessage, {
19
20
  id: "fabric.editor.elementbrowser.search.empty-state.heading",
20
21
  defaultMessage: "Nothing matches your search",
@@ -38,12 +39,17 @@ export default function EmptyState(_ref) {
38
39
  description: "Empty state sub-heading external link"
39
40
  })))));
40
41
  }
41
- var emptyStateHeading = css({
42
+ var emptyStateHeadingFontToken = css({
43
+ font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
44
+ });
45
+ var emptyStateHeadingFont = css({
42
46
  fontSize: '1.42857em',
43
47
  lineHeight: 1.2,
44
- color: "var(--ds-text, rgb(23, 43, 77))",
45
48
  fontWeight: 500,
46
- letterSpacing: '-0.008em',
49
+ letterSpacing: '-0.008em'
50
+ });
51
+ var emptyStateHeading = css({
52
+ color: "var(--ds-text, rgb(23, 43, 77))",
47
53
  marginTop: "var(--ds-space-300, 24px)"
48
54
  });
49
55
  var emptyStateSubHeading = css({
@@ -27,6 +27,7 @@ import { isSafeUrl } from '@atlaskit/adf-schema';
27
27
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
28
28
  import Page16Icon from '@atlaskit/icon-object/glyph/page/16';
29
29
  import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
30
+ import { fg } from '@atlaskit/platform-feature-flags';
30
31
  import { Pressable, xcss } from '@atlaskit/primitives';
31
32
  import { N200 } from '@atlaskit/theme/colors';
32
33
  import { fontSizeSmall } from '@atlaskit/theme/constants';
@@ -71,10 +72,16 @@ var containerPadding = css({
71
72
  var textLabelMargin = css({
72
73
  marginTop: "var(--ds-space-150, 12px)"
73
74
  });
74
- var inputLabel = css({
75
+ var inputLabelFontToken = css({
76
+ font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
77
+ fontWeight: "var(--ds-font-weight-medium, 500)"
78
+ });
79
+ var inputLabelFont = css({
75
80
  fontSize: "".concat(fontSizeSmall(), "px"),
81
+ fontWeight: 500
82
+ });
83
+ var inputLabel = css({
76
84
  color: "var(--ds-text-subtlest, ".concat(N200, ")"),
77
- fontWeight: 500,
78
85
  paddingBottom: "var(--ds-space-050, 4px)"
79
86
  });
80
87
  var inputWrapperPosition = css({
@@ -849,7 +856,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
849
856
  ref: this.wrapperRef
850
857
  }, jsx("label", {
851
858
  htmlFor: linkSearchInputId,
852
- css: inputLabel
859
+ css: [inputLabel, fg('platform_editor_migration_icon_and_typography') ? inputLabelFontToken : inputLabelFont]
853
860
  }, formatMessage(messages.linkVisibleLabel)), jsx("div", {
854
861
  css: [inputWrapper, inputWrapperPosition]
855
862
  }, screenReaderText && jsx(Announcer, {
@@ -893,7 +900,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
893
900
  primaryColor: "var(--ds-icon-subtle, #626F86)"
894
901
  }))))), jsx("label", {
895
902
  htmlFor: displayTextInputId,
896
- css: [inputLabel, textLabelMargin]
903
+ css: [inputLabel, textLabelMargin, fg('platform_editor_migration_icon_and_typography') ? inputLabelFontToken : inputLabelFont]
897
904
  }, formatMessage(messages.textVisibleLabel)), jsx("div", {
898
905
  css: [inputWrapper, inputWrapperPosition]
899
906
  }, jsx(PanelTextInput, {
@@ -145,6 +145,11 @@ export var messages = defineMessages({
145
145
  defaultMessage: 'Add a note with an emoji and colored background',
146
146
  description: 'Visually distinguishes your panel by adding a emoji icon and background color '
147
147
  },
148
+ panel: {
149
+ id: 'fabric.editor.panel',
150
+ defaultMessage: 'Panel',
151
+ description: 'Visually distinguishes your text by adding a panel'
152
+ },
148
153
  other: {
149
154
  id: 'fabric.editor.other',
150
155
  defaultMessage: 'Others...',
@@ -224,5 +224,10 @@ export var toolbarInsertBlockMessages = defineMessages({
224
224
  id: 'fabric.editor.recordLoomShortTitle',
225
225
  defaultMessage: 'Record',
226
226
  description: 'Record'
227
+ },
228
+ turnInto: {
229
+ id: 'fabric.editor.turnInto',
230
+ defaultMessage: 'Turn into',
231
+ description: 'Turn selected texts into another element containing those texts'
227
232
  }
228
233
  });
@@ -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 = "87.3.4";
10
+ var packageVersion = "87.4.0";
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,10 +1,9 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import { css } from '@emotion/react';
3
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
3
 
5
4
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
6
5
  export var backgroundColorStyles = function backgroundColorStyles() {
7
- return getBooleanFF('platform.editor.review-text-highlighting-styling') ? css({
6
+ return css({
8
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
9
8
  '.fabric-background-color-mark': {
10
9
  backgroundColor: 'var(--custom-palette-color, inherit)',
@@ -25,20 +24,5 @@ export var backgroundColorStyles = function backgroundColorStyles() {
25
24
  '.fabric-background-color-mark .ak-editor-annotation': {
26
25
  backgroundColor: 'unset'
27
26
  }
28
- }) : css({
29
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
30
- '.fabric-background-color-mark': {
31
- backgroundColor: 'var(--custom-palette-color, inherit)'
32
- },
33
- // Don't show text highlight styling when there is a hyperlink
34
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
35
- 'a .fabric-background-color-mark': {
36
- backgroundColor: 'unset'
37
- },
38
- // Don't show text highlight styling when there is an inline comment
39
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
40
- '.fabric-background-color-mark .ak-editor-annotation': {
41
- backgroundColor: 'unset'
42
- }
43
27
  });
44
28
  };
@@ -20,7 +20,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
20
20
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "87.3.4";
23
+ var packageVersion = "87.4.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  var DropList = /*#__PURE__*/function (_Component) {
@@ -144,6 +144,11 @@ export declare const messages: {
144
144
  defaultMessage: string;
145
145
  description: string;
146
146
  };
147
+ panel: {
148
+ id: string;
149
+ defaultMessage: string;
150
+ description: string;
151
+ };
147
152
  other: {
148
153
  id: string;
149
154
  defaultMessage: string;
@@ -224,4 +224,9 @@ export declare const toolbarInsertBlockMessages: {
224
224
  defaultMessage: string;
225
225
  description: string;
226
226
  };
227
+ turnInto: {
228
+ id: string;
229
+ defaultMessage: string;
230
+ description: string;
231
+ };
227
232
  };
@@ -327,6 +327,14 @@ export type FeatureFlags = {
327
327
 
328
328
  */
329
329
  moreElementsInQuickInsertView?: boolean;
330
+ /**
331
+ * @description
332
+ * Enables basic text transformations options in floating toolbar
333
+ *
334
+ * @see https://product-fabric.atlassian.net/browse/ED-24447
335
+ * @default false
336
+ */
337
+ basicTextTransformations?: boolean;
330
338
  };
331
339
  export type FeatureFlagKey = keyof FeatureFlags;
332
340
  export type GetEditorFeatureFlags = () => FeatureFlags;
@@ -202,6 +202,10 @@ export type FloatingToolbarDropdown<T extends {}> = {
202
202
  type: 'dropdown';
203
203
  title: string;
204
204
  icon?: Icon;
205
+ /**
206
+ * Places an icon before the title as a representation
207
+ */
208
+ iconBefore?: Icon;
205
209
  options: DropdownOptions<T>;
206
210
  hidden?: boolean;
207
211
  hideExpandIcon?: boolean;
@@ -144,6 +144,11 @@ export declare const messages: {
144
144
  defaultMessage: string;
145
145
  description: string;
146
146
  };
147
+ panel: {
148
+ id: string;
149
+ defaultMessage: string;
150
+ description: string;
151
+ };
147
152
  other: {
148
153
  id: string;
149
154
  defaultMessage: string;
@@ -224,4 +224,9 @@ export declare const toolbarInsertBlockMessages: {
224
224
  defaultMessage: string;
225
225
  description: string;
226
226
  };
227
+ turnInto: {
228
+ id: string;
229
+ defaultMessage: string;
230
+ description: string;
231
+ };
227
232
  };
@@ -327,6 +327,14 @@ export type FeatureFlags = {
327
327
 
328
328
  */
329
329
  moreElementsInQuickInsertView?: boolean;
330
+ /**
331
+ * @description
332
+ * Enables basic text transformations options in floating toolbar
333
+ *
334
+ * @see https://product-fabric.atlassian.net/browse/ED-24447
335
+ * @default false
336
+ */
337
+ basicTextTransformations?: boolean;
330
338
  };
331
339
  export type FeatureFlagKey = keyof FeatureFlags;
332
340
  export type GetEditorFeatureFlags = () => FeatureFlags;
@@ -202,6 +202,10 @@ export type FloatingToolbarDropdown<T extends {}> = {
202
202
  type: 'dropdown';
203
203
  title: string;
204
204
  icon?: Icon;
205
+ /**
206
+ * Places an icon before the title as a representation
207
+ */
208
+ iconBefore?: Icon;
205
209
  options: DropdownOptions<T>;
206
210
  hidden?: boolean;
207
211
  hideExpandIcon?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "87.3.4",
3
+ "version": "87.4.0",
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/"
@@ -134,7 +134,7 @@
134
134
  "@atlaskit/primitives": "^11.1.0",
135
135
  "@atlaskit/profilecard": "^19.17.0",
136
136
  "@atlaskit/section-message": "^6.5.0",
137
- "@atlaskit/smart-card": "^27.12.0",
137
+ "@atlaskit/smart-card": "^27.13.0",
138
138
  "@atlaskit/smart-user-picker": "^6.10.0",
139
139
  "@atlaskit/spinner": "^16.2.0",
140
140
  "@atlaskit/task-decision": "^17.10.0",
@@ -254,9 +254,6 @@
254
254
  "platform_editor_a11y_table_context_menu": {
255
255
  "type": "boolean"
256
256
  },
257
- "platform.editor.review-text-highlighting-styling": {
258
- "type": "boolean"
259
- },
260
257
  "react_18_color_picker_concurrent_mode": {
261
258
  "type": "boolean"
262
259
  },
@@ -268,6 +265,9 @@
268
265
  },
269
266
  "editor_support_code_block_wrapping": {
270
267
  "type": "boolean"
268
+ },
269
+ "platform_editor_migration_icon_and_typography": {
270
+ "type": "boolean"
271
271
  }
272
272
  }
273
273
  }