@atlaskit/editor-common 76.27.8 → 76.27.10

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 (88) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/media-inline/constants.js +21 -2
  3. package/dist/cjs/media-inline/inline-image-wrapper.js +4 -2
  4. package/dist/cjs/media-inline/media-inline-image-card.js +3 -3
  5. package/dist/cjs/media-inline/styles.js +11 -3
  6. package/dist/cjs/media-inline/views/icon-wrapper.js +1 -1
  7. package/dist/cjs/monitoring/error.js +1 -1
  8. package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +6 -1
  9. package/dist/cjs/styles/shared/annotation.js +5 -22
  10. package/dist/cjs/styles/shared/code-block.js +4 -20
  11. package/dist/cjs/styles/shared/code-mark.js +2 -6
  12. package/dist/cjs/styles/shared/panel.js +9 -62
  13. package/dist/cjs/styles/shared/rule.js +2 -8
  14. package/dist/cjs/ui/BaseTheme/index.js +8 -15
  15. package/dist/cjs/ui/DropList/index.js +4 -17
  16. package/dist/cjs/ui/Expand/index.js +13 -38
  17. package/dist/cjs/ui/Messages/index.js +6 -6
  18. package/dist/cjs/ui/PortalProvider/index.js +7 -21
  19. package/dist/cjs/ui-menu/ColorPickerButton/index.js +5 -13
  20. package/dist/cjs/ui-menu/DropdownMenu/index.js +10 -27
  21. package/dist/es2019/media-inline/constants.js +20 -1
  22. package/dist/es2019/media-inline/inline-image-wrapper.js +4 -2
  23. package/dist/es2019/media-inline/media-inline-image-card.js +3 -3
  24. package/dist/es2019/media-inline/styles.js +24 -9
  25. package/dist/es2019/media-inline/views/icon-wrapper.js +1 -1
  26. package/dist/es2019/monitoring/error.js +1 -1
  27. package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +7 -1
  28. package/dist/es2019/styles/shared/annotation.js +9 -28
  29. package/dist/es2019/styles/shared/code-block.js +11 -27
  30. package/dist/es2019/styles/shared/code-mark.js +3 -7
  31. package/dist/es2019/styles/shared/panel.js +24 -83
  32. package/dist/es2019/styles/shared/rule.js +3 -9
  33. package/dist/es2019/ui/BaseTheme/index.js +3 -11
  34. package/dist/es2019/ui/DropList/index.js +7 -17
  35. package/dist/es2019/ui/Expand/index.js +18 -44
  36. package/dist/es2019/ui/Messages/index.js +6 -6
  37. package/dist/es2019/ui/PortalProvider/index.js +7 -21
  38. package/dist/es2019/ui-menu/ColorPickerButton/index.js +7 -15
  39. package/dist/es2019/ui-menu/DropdownMenu/index.js +34 -49
  40. package/dist/esm/media-inline/constants.js +20 -1
  41. package/dist/esm/media-inline/inline-image-wrapper.js +4 -2
  42. package/dist/esm/media-inline/media-inline-image-card.js +3 -3
  43. package/dist/esm/media-inline/styles.js +11 -3
  44. package/dist/esm/media-inline/views/icon-wrapper.js +1 -1
  45. package/dist/esm/monitoring/error.js +1 -1
  46. package/dist/esm/react-node-view/getInlineNodeViewProducer.js +7 -1
  47. package/dist/esm/styles/shared/annotation.js +5 -22
  48. package/dist/esm/styles/shared/code-block.js +6 -22
  49. package/dist/esm/styles/shared/code-mark.js +3 -7
  50. package/dist/esm/styles/shared/panel.js +10 -63
  51. package/dist/esm/styles/shared/rule.js +3 -9
  52. package/dist/esm/ui/BaseTheme/index.js +9 -15
  53. package/dist/esm/ui/DropList/index.js +5 -18
  54. package/dist/esm/ui/Expand/index.js +14 -39
  55. package/dist/esm/ui/Messages/index.js +6 -6
  56. package/dist/esm/ui/PortalProvider/index.js +7 -21
  57. package/dist/esm/ui-menu/ColorPickerButton/index.js +6 -14
  58. package/dist/esm/ui-menu/DropdownMenu/index.js +11 -28
  59. package/dist/types/media-inline/constants.d.ts +18 -0
  60. package/dist/types/media-inline/styles.d.ts +6 -0
  61. package/dist/types/styles/shared/annotation.d.ts +2 -3
  62. package/dist/types/styles/shared/code-block.d.ts +1 -2
  63. package/dist/types/styles/shared/code-mark.d.ts +1 -2
  64. package/dist/types/styles/shared/panel.d.ts +4 -5
  65. package/dist/types/styles/shared/rule.d.ts +1 -2
  66. package/dist/types/ui/BaseTheme/index.d.ts +1 -1
  67. package/dist/types/ui/Expand/index.d.ts +4 -5
  68. package/dist/types/ui/Messages/index.d.ts +1 -1
  69. package/dist/types/ui/PortalProvider/index.d.ts +4 -8
  70. package/dist/types/utils/getModeFromTheme.d.ts +1 -1
  71. package/dist/types-ts4.5/media-inline/constants.d.ts +18 -0
  72. package/dist/types-ts4.5/media-inline/styles.d.ts +6 -0
  73. package/dist/types-ts4.5/styles/shared/annotation.d.ts +2 -3
  74. package/dist/types-ts4.5/styles/shared/code-block.d.ts +1 -2
  75. package/dist/types-ts4.5/styles/shared/code-mark.d.ts +1 -2
  76. package/dist/types-ts4.5/styles/shared/panel.d.ts +4 -5
  77. package/dist/types-ts4.5/styles/shared/rule.d.ts +1 -2
  78. package/dist/types-ts4.5/ui/BaseTheme/index.d.ts +1 -1
  79. package/dist/types-ts4.5/ui/Expand/index.d.ts +4 -5
  80. package/dist/types-ts4.5/ui/Messages/index.d.ts +1 -1
  81. package/dist/types-ts4.5/ui/PortalProvider/index.d.ts +4 -8
  82. package/dist/types-ts4.5/utils/getModeFromTheme.d.ts +1 -1
  83. package/package.json +2 -2
  84. package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +0 -43
  85. package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +0 -37
  86. package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +0 -36
  87. package/dist/types/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
  88. package/dist/types-ts4.5/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 76.27.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [#61676](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61676) [`765a60628f08`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/765a60628f08) - [ux] Change vertical alignment of media inline image to top
8
+ - [#62545](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/62545) [`85392e5f9be9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85392e5f9be9) - Remove legacy theming logic from the @atlaskit/editor-common package. Theming is still available via @atlaskit/tokens.
9
+ - Updated dependencies
10
+
11
+ ## 76.27.9
12
+
13
+ ### Patch Changes
14
+
15
+ - [#61048](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61048) [`f70a1b67acf4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f70a1b67acf4) - [ED-19879] Add zero width space after inline nodes to fix android bug where pressing backspace on inline nodes
16
+ in Android inserts a slice of inline node's string.
17
+
3
18
  ## 76.27.8
4
19
 
5
20
  ### Patch Changes
@@ -3,7 +3,26 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.DEFAULT_INLINE_IMAGE_ASPECT_RATIO = exports.DEFAULT_IMAGE_WIDTH = exports.DEFAULT_IMAGE_HEIGHT = void 0;
6
+ exports.referenceHeights = exports.DEFAULT_INLINE_IMAGE_ASPECT_RATIO = exports.DEFAULT_IMAGE_WIDTH = exports.DEFAULT_IMAGE_HEIGHT = void 0;
7
+ var _typography = require("@atlaskit/theme/typography");
7
8
  var DEFAULT_IMAGE_WIDTH = exports.DEFAULT_IMAGE_WIDTH = 250;
8
9
  var DEFAULT_IMAGE_HEIGHT = exports.DEFAULT_IMAGE_HEIGHT = 200;
9
- var DEFAULT_INLINE_IMAGE_ASPECT_RATIO = exports.DEFAULT_INLINE_IMAGE_ASPECT_RATIO = DEFAULT_IMAGE_WIDTH / DEFAULT_IMAGE_HEIGHT;
10
+ var DEFAULT_INLINE_IMAGE_ASPECT_RATIO = exports.DEFAULT_INLINE_IMAGE_ASPECT_RATIO = DEFAULT_IMAGE_WIDTH / DEFAULT_IMAGE_HEIGHT;
11
+ /**
12
+ * Reference Heights
13
+ *
14
+ * These heights enforce consistent sizes with media inline nodes due to
15
+ * inconsistencies with center aligned inline nodes and text.
16
+ *
17
+ * There is conversation about refactoring media inline nodes to conform to
18
+ * aligning correctly with the surrounding text.
19
+ */
20
+ var referenceHeights = exports.referenceHeights = {
21
+ p: _typography.headingSizes.h600.lineHeight - 2,
22
+ h1: _typography.headingSizes.h800.lineHeight + 4,
23
+ h2: _typography.headingSizes.h700.lineHeight + 3,
24
+ h3: _typography.headingSizes.h600.lineHeight + 1,
25
+ h4: _typography.headingSizes.h500.lineHeight + 3,
26
+ h5: _typography.headingSizes.h400.lineHeight + 4,
27
+ h6: _typography.headingSizes.h300.lineHeight + 2
28
+ };
@@ -13,8 +13,10 @@ var _styles = require("./styles");
13
13
  /** @jsx jsx */
14
14
 
15
15
  var wrapperStyle = (0, _react.css)({
16
- display: 'inline-block',
17
- verticalAlign: 'text-bottom',
16
+ display: 'inline-flex',
17
+ justifyContent: 'center',
18
+ alignItems: 'center',
19
+ verticalAlign: 'middle',
18
20
  overflow: 'hidden',
19
21
  borderRadius: "var(--ds-border-radius, 3px)",
20
22
  aspectRatio: "var(".concat(_styles.INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, ", ").concat(_constants.DEFAULT_INLINE_IMAGE_ASPECT_RATIO, ")")
@@ -10,8 +10,8 @@ var _react = require("react");
10
10
  var _react2 = require("@emotion/react");
11
11
  var _reactIntlNext = require("react-intl-next");
12
12
  var _mediaCard = require("@atlaskit/media-card");
13
- var _typography = require("@atlaskit/theme/typography");
14
13
  var _mediaInlineCard = require("../messages/media-inline-card");
14
+ var _constants = require("./constants");
15
15
  var _inlineImageWrapper = require("./inline-image-wrapper");
16
16
  var _errorView = require("./views/error-view");
17
17
  var _loadingView = require("./views/loading-view");
@@ -109,8 +109,8 @@ var MediaInlineImageCardInternal = exports.MediaInlineImageCardInternal = functi
109
109
  };
110
110
  }
111
111
  return {
112
- width: Math.round(aspectRatio * _typography.headingSizes.h800.lineHeight),
113
- height: _typography.headingSizes.h800.lineHeight
112
+ width: Math.round(aspectRatio * _constants.referenceHeights['h1']),
113
+ height: _constants.referenceHeights['h1']
114
114
  };
115
115
  }, [width, height, aspectRatio]);
116
116
  return (0, _react2.jsx)(_inlineImageWrapper.InlineImageWrapper, {
@@ -7,11 +7,19 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.mediaInlineImageStyles = exports.INLINE_IMAGE_WRAPPER_CLASS_NAME = exports.INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
9
  var _react = require("@emotion/react");
10
- var _typography = require("@atlaskit/theme/typography");
10
+ var _constants = require("./constants");
11
11
  var _templateObject, _templateObject2;
12
12
  var INLINE_IMAGE_WRAPPER_CLASS_NAME = exports.INLINE_IMAGE_WRAPPER_CLASS_NAME = 'media-inline-image-wrapper';
13
13
  var INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY = exports.INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY = '--editor-media-inline-image-aspect-ratio';
14
14
  var inlineImageHeight = function inlineImageHeight(height) {
15
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n > .", ",\n > .mediaInlineView-content-wrap\n > .", " {\n height: ", "px;\n }\n"])), INLINE_IMAGE_WRAPPER_CLASS_NAME, INLINE_IMAGE_WRAPPER_CLASS_NAME, height);
15
+ var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
16
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n > .", ",\n > .mediaInlineView-content-wrap\n > .", " {\n height: ", "px;\n transform: translateY(", "px);\n }\n"])), INLINE_IMAGE_WRAPPER_CLASS_NAME, INLINE_IMAGE_WRAPPER_CLASS_NAME, height, margin);
16
17
  };
17
- var mediaInlineImageStyles = exports.mediaInlineImageStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n // default inline image height is 24px, this includes\n // p, h3, and action items\n .", " {\n height: ", "px;\n }\n\n h1 {\n ", "\n }\n\n h2 {\n ", "\n }\n\n h4 {\n ", "\n }\n\n h5,\n h6 {\n ", "\n }\n"])), INLINE_IMAGE_WRAPPER_CLASS_NAME, _typography.headingSizes.h600.lineHeight, inlineImageHeight(_typography.headingSizes.h800.lineHeight), inlineImageHeight(_typography.headingSizes.h700.lineHeight), inlineImageHeight(_typography.headingSizes.h500.lineHeight), inlineImageHeight(_typography.headingSizes.h400.lineHeight));
18
+
19
+ /**
20
+ * Shifting the mediaInline image component (renders image) to align nicely with
21
+ * mediaInline (renders text) is a bit of a testing ground. This numbers represent
22
+ * shift in top and bottom and size adjustments to make up for lack of 1to1 size
23
+ * mapping
24
+ */
25
+ var mediaInlineImageStyles = exports.mediaInlineImageStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n // p, h3, and action items\n .", " {\n height: ", "px;\n transform: translateY(-2px);\n }\n\n h1 {\n ", "\n }\n\n h2 {\n ", "\n }\n\n h3 {\n ", "\n }\n\n h4 {\n ", "\n }\n\n h5 {\n ", "\n }\n\n h6 {\n ", "\n }\n"])), INLINE_IMAGE_WRAPPER_CLASS_NAME, _constants.referenceHeights['p'], inlineImageHeight(_constants.referenceHeights['h1'], -3), inlineImageHeight(_constants.referenceHeights['h2'], -3), inlineImageHeight(_constants.referenceHeights['h3'], -2), inlineImageHeight(_constants.referenceHeights['h4'], -2), inlineImageHeight(_constants.referenceHeights['h5'], -2), inlineImageHeight(_constants.referenceHeights['h6'], -2));
@@ -10,7 +10,7 @@ var _react = require("@emotion/react");
10
10
  var wrapperStyle = (0, _react.css)({
11
11
  display: 'flex',
12
12
  'span > svg': {
13
- verticalAlign: 'baseline'
13
+ verticalAlign: 'top'
14
14
  }
15
15
  });
16
16
  var IconWrapper = exports.IconWrapper = function IconWrapper(_ref) {
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "76.27.8";
19
+ var packageVersion = "76.27.10";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // TODO: Sanitise the URL instead of just removing it
@@ -180,7 +180,12 @@ function getPortalChildren(_ref2) {
180
180
  ,
181
181
  getPos: nodeViewParams.getPos,
182
182
  node: currentNode
183
- }, extraComponentProps)), (0, _react2.jsx)("span", {
183
+ }, extraComponentProps)), _utils.browser.android ? (0, _react2.jsx)("span", {
184
+ className: "zeroWidthSpaceContainer",
185
+ contentEditable: "false"
186
+ }, (0, _react2.jsx)("span", {
187
+ className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
188
+ }), _utils.ZERO_WIDTH_SPACE) : (0, _react2.jsx)("span", {
184
189
  className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
185
190
  }));
186
191
  };
@@ -8,7 +8,6 @@ exports.annotationSharedStyles = exports.annotationPrefix = exports.AnnotationSh
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
9
  var _react = require("@emotion/react");
10
10
  var _colors = require("@atlaskit/theme/colors");
11
- var _components = require("@atlaskit/theme/components");
12
11
  var _templateObject, _templateObject2, _templateObject3;
13
12
  var annotationPrefix = exports.annotationPrefix = 'ak-editor-annotation';
14
13
  var AnnotationSharedClassNames = exports.AnnotationSharedClassNames = {
@@ -16,30 +15,14 @@ var AnnotationSharedClassNames = exports.AnnotationSharedClassNames = {
16
15
  blur: "".concat(annotationPrefix, "-blur"),
17
16
  draft: "".concat(annotationPrefix, "-draft")
18
17
  };
19
- var DY75 = 'rgb(111, 92, 37)';
20
- var DY300 = '#ffd557';
21
18
  var Y75a = 'rgba(255, 240, 179, 0.5)';
22
19
  var Y200a = 'rgba(255, 196, 0, 0.82)';
23
- var DY75a = 'rgba(111, 92, 37, 0.5)';
24
- var DY200 = '#82641c';
25
- var AnnotationSharedCSSByState = exports.AnnotationSharedCSSByState = function AnnotationSharedCSSByState(props) {
20
+ var AnnotationSharedCSSByState = exports.AnnotationSharedCSSByState = function AnnotationSharedCSSByState() {
26
21
  return {
27
- focus: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n // Background is not coming through in confluence, suspecting to be caused by some specific combination of\n // emotion and token look up\n\n background: ", ";\n border-bottom: 2px solid\n ", ";\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4147\n box-shadow: ", ";\n cursor: pointer;\n "])), (0, _components.themed)({
28
- light: "var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y75, ")"),
29
- dark: "var(--ds-background-accent-yellow-subtler, ".concat(DY75, ")")
30
- })(props), (0, _components.themed)({
31
- light: "var(--ds-border-accent-yellow, ".concat(_colors.Y300, ")"),
32
- dark: "var(--ds-border-accent-yellow, ".concat(DY300, ")")
33
- })(props), "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(_colors.N60A, ", -1px 2px 3px ").concat(_colors.N60A), ")")),
34
- blur: (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-bottom: 2px solid\n ", ";\n cursor: pointer;\n "])), (0, _components.themed)({
35
- light: "var(--ds-background-accent-yellow-subtlest, ".concat(Y75a, ")"),
36
- dark: "var(--ds-background-accent-yellow-subtlest, ".concat(DY75a, ")")
37
- })(props), (0, _components.themed)({
38
- light: "var(--ds-border-accent-yellow, ".concat(Y200a, ")"),
39
- dark: "var(--ds-border-accent-yellow, ".concat(DY200, ")")
40
- })(props))
22
+ focus: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n // Background is not coming through in confluence, suspecting to be caused by some specific combination of\n // emotion and token look up\n\n background: ", ";\n border-bottom: 2px solid ", ";\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4147\n box-shadow: ", ";\n cursor: pointer;\n "])), "var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y75, ")"), "var(--ds-border-accent-yellow, ".concat(_colors.Y300, ")"), "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(_colors.N60A, ", -1px 2px 3px ").concat(_colors.N60A), ")")),
23
+ blur: (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-bottom: 2px solid ", ";\n cursor: pointer;\n "])), "var(--ds-background-accent-yellow-subtlest, ".concat(Y75a, ")"), "var(--ds-border-accent-yellow, ".concat(Y200a, ")"))
41
24
  };
42
25
  };
43
- var annotationSharedStyles = exports.annotationSharedStyles = function annotationSharedStyles(props) {
44
- return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState(props).focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState(props).focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState(props).blur);
26
+ var annotationSharedStyles = exports.annotationSharedStyles = function annotationSharedStyles() {
27
+ return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur);
45
28
  };
@@ -9,7 +9,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _react = require("@emotion/react");
10
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
11
  var _colors = require("@atlaskit/theme/colors");
12
- var _components = require("@atlaskit/theme/components");
13
12
  var _constants = require("@atlaskit/theme/constants");
14
13
  var _templateObject, _templateObject2;
15
14
  var CodeBlockSharedCssClassName = exports.CodeBlockSharedCssClassName = {
@@ -21,25 +20,10 @@ var CodeBlockSharedCssClassName = exports.CodeBlockSharedCssClassName = {
21
20
  CODEBLOCK_CONTENT: 'code-content',
22
21
  DS_CODEBLOCK: '[data-ds--code--code-block]'
23
22
  };
24
- var codeBlockSharedStyles = exports.codeBlockSharedStyles = function codeBlockSharedStyles(props) {
25
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: relative;\n background-color: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n font-family: ", ";\n min-width: ", "px;\n cursor: pointer;\n\n --ds--code--bg-color: transparent;\n\n /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n white-space: normal;\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n top: 0px;\n left: 0px;\n }\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n bottom: 0px;\n right: 0px;\n }\n\n .", " {\n background-color: ", ";\n display: flex;\n border-radius: ", "px;\n width: 100%;\n counter-reset: line;\n overflow-x: auto;\n\n background-image: ", ";\n\n background-repeat: no-repeat;\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-size: ", " 100%,\n ", " 100%, ", " 100%,\n ", " 100%, ", " 100%,\n 1px 100%, ", " 100%, 1px 100%;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n\n /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n overflow-y: hidden;\n }\n\n .", " {\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", ";\n position: relative;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n ::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n color: ", ";\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n color: ", ";\n border-radius: ", "px;\n margin: ", ";\n white-space: pre;\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, transparent)", (0, _constants.borderRadius)(), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorCodeFontFamily, _editorSharedStyles.akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, (0, _components.themed)({
26
- light: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
27
- dark: "var(--ds-background-neutral, ".concat(_colors.DN50, ")")
28
- })(props), (0, _constants.borderRadius)(), (0, _editorSharedStyles.overflowShadow)({
29
- background: (0, _components.themed)({
30
- light: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
31
- dark: "var(--ds-background-neutral, ".concat(_colors.DN50, ")")
32
- })(props),
23
+ var codeBlockSharedStyles = exports.codeBlockSharedStyles = function codeBlockSharedStyles() {
24
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n position: relative;\n background-color: ", ";\n border-radius: ", ";\n margin: ", " 0 0 0;\n font-family: ", ";\n min-width: ", "px;\n cursor: pointer;\n\n --ds--code--bg-color: transparent;\n\n /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n white-space: normal;\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n top: 0px;\n left: 0px;\n }\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n bottom: 0px;\n right: 0px;\n }\n\n .", " {\n background-color: ", ";\n display: flex;\n border-radius: ", ";\n width: 100%;\n counter-reset: line;\n overflow-x: auto;\n\n background-image: ", ";\n\n background-repeat: no-repeat;\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-size: ", " 100%,\n ", " 100%, ", " 100%,\n ", " 100%, ", " 100%,\n 1px 100%, ", " 100%, 1px 100%;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n\n /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n overflow-y: hidden;\n }\n\n .", " {\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", ";\n position: relative;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n ::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n color: ", ";\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n color: ", ";\n border-radius: ", ";\n margin: ", ";\n white-space: pre;\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, transparent)", "var(--ds-border-radius, 3px)", _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorCodeFontFamily, _editorSharedStyles.akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, "var(--ds-background-neutral, ".concat(_colors.N20, ")"), "var(--ds-border-radius, 3px)", (0, _editorSharedStyles.overflowShadow)({
25
+ background: "var(--ds-background-neutral, ".concat(_colors.N20, ")"),
33
26
  leftCoverWidth: "var(--ds-space-300, 24px)"
34
- }), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, (0, _components.themed)({
35
- light: "var(--ds-background-neutral, ".concat(_colors.N30, ")"),
36
- dark: "var(--ds-background-neutral, ".concat(_colors.DN20, ")")
37
- })(props), "var(--ds-space-100, 8px)", (0, _components.themed)({
38
- light: "var(--ds-text-subtlest, ".concat(_colors.N400, ")"),
39
- dark: "var(--ds-text-subtlest, ".concat(_colors.DN400, ")")
40
- })(props), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, (0, _components.themed)({
41
- light: "var(--ds-text, ".concat(_colors.N800, ")"),
42
- dark: "var(--ds-text, ".concat(_colors.DN800, ")")
43
- })(props), (0, _constants.borderRadius)(), "var(--ds-space-100, 8px)", (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()));
27
+ }), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, ".concat(_colors.N30, ")"), "var(--ds-space-100, 8px)", "var(--ds-text-subtlest, ".concat(_colors.N400, ")"), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-text, ".concat(_colors.N800, ")"), "var(--ds-border-radius, 3px)", "var(--ds-space-100, 8px)", (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()));
44
28
  };
45
29
  var codeBlockInListSafariFix = exports.codeBlockInListSafariFix = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ::before {\n content: ' ';\n line-height: ", ";\n }\n\n > p:first-child,\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: -", "em !important;\n }\n"])), _editorSharedStyles.akEditorLineHeight, _editorSharedStyles.akEditorLineHeight);
@@ -9,11 +9,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _react = require("@emotion/react");
10
10
  var _inline = require("@atlaskit/code/inline");
11
11
  var _colors = require("@atlaskit/theme/colors");
12
- var _components = require("@atlaskit/theme/components");
13
12
  var _templateObject;
14
- var codeMarkSharedStyles = exports.codeMarkSharedStyles = function codeMarkSharedStyles(props) {
15
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .code {\n --ds--code--bg-color: ", ";\n ", "\n }\n "])), (0, _components.themed)({
16
- light: "var(--ds-background-neutral, ".concat(_colors.N30A, ")"),
17
- dark: "var(--ds-background-neutral, ".concat(_colors.DN70, ")")
18
- })(props), (0, _inline.getCodeStyles)());
13
+ var codeMarkSharedStyles = exports.codeMarkSharedStyles = function codeMarkSharedStyles() {
14
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .code {\n --ds--code--bg-color: ", ";\n ", "\n }\n "])), "var(--ds-background-neutral, ".concat(_colors.N30A, ")"), (0, _inline.getCodeStyles)());
19
15
  };
@@ -16,11 +16,8 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
16
16
  var _consts = require("@atlaskit/editor-shared-styles/consts");
17
17
  var _emoji = require("@atlaskit/emoji");
18
18
  var _colors = require("@atlaskit/theme/colors");
19
- var _components = require("@atlaskit/theme/components");
20
- var _constants = require("@atlaskit/theme/constants");
21
19
  var _templateObject, _templateObject2;
22
20
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
23
- // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
24
21
  var lightPanelColors = {
25
22
  info: _colors.B50,
26
23
  note: _colors.P50,
@@ -99,28 +96,10 @@ var lightIconColor = {
99
96
  warning: "var(--ds-icon-warning, ".concat(_colors.Y400, ")"),
100
97
  error: "var(--ds-icon-danger, ".concat(_colors.R400, ")")
101
98
  };
102
- var darkIconColor = {
103
- info: "var(--ds-icon-information, ".concat(_colors.B100, ")"),
104
- note: "var(--ds-icon-discovery, ".concat(_colors.P100, ")"),
105
- tip: "var(--ds-icon-success, ".concat(_colors.G200, ")"),
106
- success: "var(--ds-icon-success, ".concat(_colors.G200, ")"),
107
- warning: "var(--ds-icon-warning, ".concat(_colors.Y100, ")"),
108
- error: "var(--ds-icon-danger, ".concat(_colors.R200, ")")
109
- };
110
- var tokenDarkPanelColors = {
111
- info: "var(--ds-background-information, ".concat(darkPanelColors['info'], ")"),
112
- note: "var(--ds-background-discovery, ".concat(darkPanelColors['note'], ")"),
113
- tip: "var(--ds-background-success, ".concat(darkPanelColors['tip'], ")"),
114
- success: "var(--ds-background-success, ".concat(darkPanelColors['success'], ")"),
115
- warning: "var(--ds-background-warning, ".concat(darkPanelColors['warning'], ")"),
116
- error: "var(--ds-background-danger, ".concat(darkPanelColors['error'], ")")
117
- };
118
99
 
119
- // TODO: Migrate away from gridSize
120
- // Recommendation: Replace gridSize with 8
121
100
  // New custom icons are a little smaller than predefined icons.
122
101
  // To fix alignment issues with custom icons, vertical alignment is updated.
123
- var panelEmojiSpriteVerticalAlignment = -((0, _constants.gridSize)() * 3 - _consts.akEditorCustomIconSize) / 2;
102
+ var panelEmojiSpriteVerticalAlignment = -(8 * 3 - _consts.akEditorCustomIconSize) / 2;
124
103
  var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
125
104
 
126
105
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4066
@@ -174,54 +153,22 @@ var PanelSharedSelectors = exports.PanelSharedSelectors = {
174
153
  copyButton: "button[aria-label=\"Copy\"]"
175
154
  };
176
155
  var iconDynamicStyles = function iconDynamicStyles(panelType) {
177
- return function (props) {
178
- var light = lightIconColor[panelType];
179
- var dark = darkIconColor[panelType];
180
- var color = (0, _components.themed)({
181
- light: light,
182
- dark: dark
183
- })(props);
184
- return "\n color: ".concat(color, ";\n ");
185
- };
156
+ return "color: ".concat(lightIconColor[panelType], ";");
186
157
  };
187
158
 
188
159
  // Provides the color without tokens, used when converting to a custom panel
189
160
  var getPanelTypeBackgroundNoTokens = exports.getPanelTypeBackgroundNoTokens = function getPanelTypeBackgroundNoTokens(panelType) {
190
- var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
191
- var light = lightPanelColors[panelType];
192
- var dark = darkPanelColors[panelType];
193
- var background = (0, _components.themed)({
194
- light: light,
195
- dark: dark
196
- })(props);
197
- return background || 'none';
161
+ return lightPanelColors[panelType] || 'none';
198
162
  };
199
163
  var getPanelTypeBackground = exports.getPanelTypeBackground = function getPanelTypeBackground(panelType) {
200
- var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
201
- var light = (0, _editorPalette.hexToEditorBackgroundPaletteColor)(lightPanelColors[panelType]);
202
- // hexToEditorBackgroundPaletteColor has a light mode as a fallback color - for legacy dark mode we define the tokens locally
203
- var dark = tokenDarkPanelColors[panelType];
204
- var background = (0, _components.themed)({
205
- light: light,
206
- dark: dark
207
- })(props);
208
- return background || 'none';
164
+ return (0, _editorPalette.hexToEditorBackgroundPaletteColor)(lightPanelColors[panelType]) || 'none';
209
165
  };
210
166
  var mainDynamicStyles = function mainDynamicStyles(panelType) {
211
- return function (props) {
212
- var background = getPanelTypeBackground(panelType, props);
213
- var text = (0, _components.themed)({
214
- light: 'inherit',
215
- dark: darkPanelColors.TextColor
216
- })(props);
217
- return "\n background-color: ".concat(background, ";\n color: ").concat(text, ";\n ");
218
- };
167
+ return "\n background-color: ".concat(getPanelTypeBackground(panelType), ";\n color: inherit;\n ");
219
168
  };
220
- var panelSharedStylesWithoutPrefix = exports.panelSharedStylesWithoutPrefix = function panelSharedStylesWithoutPrefix(props) {
221
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", "px;\n margin: ", " 0 0;\n padding: ", ";\n min-width: ", "px;\n display: flex;\n position: relative;\n align-items: baseline;\n word-break: break-word;\n\n ", "\n\n .", " {\n flex-shrink: 0;\n height: ", ";\n width: ", ";\n box-sizing: content-box;\n padding-right: ", ";\n text-align: center;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n ", "\n\n > span {\n vertical-align: middle;\n display: inline-flex;\n }\n\n .", " {\n vertical-align: ", "px;\n }\n\n .", " {\n vertical-align: ", "px;\n\n // Vertical align only works for inline-block elements in Firefox\n @-moz-document url-prefix() {\n img {\n display: inline-block;\n }\n }\n }\n }\n\n .ak-editor-panel__content {\n margin: 1px 0 1px;\n flex: 1 0 0;\n /*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n min-width: 0;\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", ";\n }\n"])), (0, _constants.borderRadius)(), _editorSharedStyles.blockNodesVerticalMargin, "var(--ds-space-100, 8px)", _editorSharedStyles.akEditorTableCellMinWidth, mainDynamicStyles(_adfSchema.PanelType.INFO)(props), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", iconDynamicStyles(_adfSchema.PanelType.INFO)(props), _emoji.emojiSprite, panelEmojiSpriteVerticalAlignment, _emoji.emojiImage, panelEmojiImageVerticalAlignment, _adfSchema.PanelType.NOTE, mainDynamicStyles(_adfSchema.PanelType.NOTE)(props), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.NOTE)(props), _adfSchema.PanelType.TIP, mainDynamicStyles(_adfSchema.PanelType.TIP)(props), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.TIP)(props), _adfSchema.PanelType.WARNING, mainDynamicStyles(_adfSchema.PanelType.WARNING)(props), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.WARNING)(props), _adfSchema.PanelType.ERROR, mainDynamicStyles(_adfSchema.PanelType.ERROR)(props), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.ERROR)(props), _adfSchema.PanelType.SUCCESS, mainDynamicStyles(_adfSchema.PanelType.SUCCESS)(props), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.SUCCESS)(props), _adfSchema.PanelType.CUSTOM, (0, _components.themed)({
222
- dark: getPanelBackgroundDarkModeColors
223
- })(props));
169
+ var panelSharedStylesWithoutPrefix = exports.panelSharedStylesWithoutPrefix = function panelSharedStylesWithoutPrefix() {
170
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", ";\n margin: ", " 0 0;\n padding: ", ";\n min-width: ", "px;\n display: flex;\n position: relative;\n align-items: baseline;\n word-break: break-word;\n\n ", "\n\n .", " {\n flex-shrink: 0;\n height: ", ";\n width: ", ";\n box-sizing: content-box;\n padding-right: ", ";\n text-align: center;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n ", "\n\n > span {\n vertical-align: middle;\n display: inline-flex;\n }\n\n .", " {\n vertical-align: ", "px;\n }\n\n .", " {\n vertical-align: ", "px;\n\n // Vertical align only works for inline-block elements in Firefox\n @-moz-document url-prefix() {\n img {\n display: inline-block;\n }\n }\n }\n }\n\n .ak-editor-panel__content {\n margin: 1px 0 1px;\n flex: 1 0 0;\n /*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n min-width: 0;\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n"])), "var(--ds-border-radius, 3px)", _editorSharedStyles.blockNodesVerticalMargin, "var(--ds-space-100, 8px)", _editorSharedStyles.akEditorTableCellMinWidth, mainDynamicStyles(_adfSchema.PanelType.INFO), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", iconDynamicStyles(_adfSchema.PanelType.INFO), _emoji.emojiSprite, panelEmojiSpriteVerticalAlignment, _emoji.emojiImage, panelEmojiImageVerticalAlignment, _adfSchema.PanelType.NOTE, mainDynamicStyles(_adfSchema.PanelType.NOTE), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.NOTE), _adfSchema.PanelType.TIP, mainDynamicStyles(_adfSchema.PanelType.TIP), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.TIP), _adfSchema.PanelType.WARNING, mainDynamicStyles(_adfSchema.PanelType.WARNING), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.WARNING), _adfSchema.PanelType.ERROR, mainDynamicStyles(_adfSchema.PanelType.ERROR), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.ERROR), _adfSchema.PanelType.SUCCESS, mainDynamicStyles(_adfSchema.PanelType.SUCCESS), PanelSharedCssClassName.icon, iconDynamicStyles(_adfSchema.PanelType.SUCCESS));
224
171
  };
225
- var panelSharedStyles = exports.panelSharedStyles = function panelSharedStyles(props) {
226
- return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n ", "\n }\n"])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix(props));
172
+ var panelSharedStyles = exports.panelSharedStyles = function panelSharedStyles() {
173
+ return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n ", "\n }\n"])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix());
227
174
  };
@@ -9,14 +9,8 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _react = require("@emotion/react");
10
10
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
11
11
  var _colors = require("@atlaskit/theme/colors");
12
- var _components = require("@atlaskit/theme/components");
13
12
  var _templateObject;
14
- var divider = (0, _components.themed)({
15
- light: "var(--ds-border, ".concat(_colors.N30A, ")"),
16
- dark: "var(--ds-border, ".concat(_colors.DN50, ")")
17
- });
18
-
19
13
  // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
20
- var ruleSharedStyles = exports.ruleSharedStyles = function ruleSharedStyles(props) {
21
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & hr {\n border: none;\n background-color: ", ";\n margin: ", "em 0;\n height: 2px;\n border-radius: 1px;\n }\n"])), divider(props), _editorSharedStyles.akEditorLineHeight);
14
+ var ruleSharedStyles = exports.ruleSharedStyles = function ruleSharedStyles() {
15
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & hr {\n border: none;\n background-color: ", ";\n margin: ", "em 0;\n height: 2px;\n border-radius: 1px;\n }\n"])), "var(--ds-border, ".concat(_colors.N30A, ")"), _editorSharedStyles.akEditorLineHeight);
22
16
  };
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  var _typeof = require("@babel/runtime/helpers/typeof");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
@@ -8,11 +7,9 @@ Object.defineProperty(exports, "__esModule", {
8
7
  exports.BaseTheme = BaseTheme;
9
8
  exports.BaseThemeWrapper = BaseThemeWrapper;
10
9
  exports.mapBreakpointToLayoutMaxWidth = mapBreakpointToLayoutMaxWidth;
11
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
10
  var _react = _interopRequireWildcard(require("react"));
13
11
  var _react2 = require("@emotion/react");
14
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
15
- var _components = require("@atlaskit/theme/components");
16
13
  var _constants = require("@atlaskit/theme/constants");
17
14
  var _WidthProvider = require("../WidthProvider");
18
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -29,25 +26,21 @@ function mapBreakpointToLayoutMaxWidth(breakpoint) {
29
26
  function BaseThemeWrapper(_ref) {
30
27
  var baseFontSize = _ref.baseFontSize,
31
28
  children = _ref.children;
32
- var _useGlobalTheme = (0, _components.useGlobalTheme)(),
33
- mode = _useGlobalTheme.mode;
34
29
  var memoizedTheme = (0, _react.useMemo)(function () {
35
- return (0, _defineProperty2.default)({
30
+ return {
36
31
  baseFontSize: baseFontSize || (0, _constants.fontSize)(),
37
32
  layoutMaxWidth: _editorSharedStyles.akEditorDefaultLayoutWidth
38
- }, _constants.CHANNEL, {
39
- mode: mode
40
- });
41
- }, [baseFontSize, mode]);
33
+ };
34
+ }, [baseFontSize]);
42
35
  return /*#__PURE__*/_react.default.createElement(_react2.ThemeProvider, {
43
36
  theme: memoizedTheme
44
37
  }, children);
45
38
  }
46
- function BaseTheme(_ref3) {
47
- var children = _ref3.children,
48
- baseFontSize = _ref3.baseFontSize;
49
- return /*#__PURE__*/_react.default.createElement(_WidthProvider.WidthConsumer, null, function (_ref4) {
50
- var breakpoint = _ref4.breakpoint;
39
+ function BaseTheme(_ref2) {
40
+ var children = _ref2.children,
41
+ baseFontSize = _ref2.baseFontSize;
42
+ return /*#__PURE__*/_react.default.createElement(_WidthProvider.WidthConsumer, null, function (_ref3) {
43
+ var breakpoint = _ref3.breakpoint;
51
44
  return /*#__PURE__*/_react.default.createElement(BaseThemeWrapper, {
52
45
  breakpoint: breakpoint,
53
46
  baseFontSize: baseFontSize
@@ -17,14 +17,12 @@ var _react = require("react");
17
17
  var _react2 = require("@emotion/react");
18
18
  var _analyticsNext = require("@atlaskit/analytics-next");
19
19
  var _colors = require("@atlaskit/theme/colors");
20
- var _components = require("@atlaskit/theme/components");
21
- var _constants = require("@atlaskit/theme/constants");
22
20
  var _Layer = _interopRequireDefault(require("../Layer"));
23
21
  var _templateObject, _templateObject2, _templateObject3;
24
22
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
25
23
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
26
24
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "76.27.8";
25
+ var packageVersion = "76.27.10";
28
26
  var halfFocusRing = 1;
29
27
  var dropOffset = '0, 8';
30
28
  var DropList = /*#__PURE__*/function (_Component) {
@@ -40,14 +38,8 @@ var DropList = /*#__PURE__*/function (_Component) {
40
38
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "wrapperStyles", (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n transition-duration: 0.2s;\n transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\n "])), _this.props.shouldFitContainer ? 'display: block; flex: 1 1 auto;' : 'display: inline-flex;'));
41
39
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "triggerStyles", (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n transition-duration: 0.2s;\n transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\n ", "\n "])), _this.props.shouldFitContainer ? 'display: block; box-sizing: border-box;' : 'display: inline-flex;'));
42
40
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
43
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "menuWrapper", function (theme) {
44
- return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n box-sizing: border-box;\n overflow: auto;\n padding: ", " 0;\n max-height: 90vh;\n "])), (0, _components.themed)({
45
- light: "var(--ds-text, ".concat(_colors.N900, ")"),
46
- dark: "var(--ds-text, ".concat(_colors.DN600, ")")
47
- })(theme), (0, _components.themed)({
48
- light: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
49
- dark: "var(--ds-surface-overlay, ".concat(_colors.DN50, ")")
50
- })(theme), (0, _constants.borderRadius)(), "var(--ds-shadow-overlay, ".concat("0 4px 8px calc(-1 * 2px) ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")"), "var(--ds-space-050, 4px)");
41
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "menuWrapper", function () {
42
+ return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n box-sizing: border-box;\n overflow: auto;\n padding: ", " 0;\n max-height: 90vh;\n "])), "var(--ds-text, ".concat(_colors.N900, ")"), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), "var(--ds-border-radius, 3px)", "var(--ds-shadow-overlay, ".concat("0 4px 8px calc(-1 * 2px) ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")"), "var(--ds-space-050, 4px)");
51
43
  });
52
44
  /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
53
45
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "componentDidMount", function () {
@@ -123,7 +115,6 @@ var DropList = /*#__PURE__*/function (_Component) {
123
115
  (0, _createClass2.default)(DropList, [{
124
116
  key: "render",
125
117
  value: function render() {
126
- var _this2 = this;
127
118
  var _this$props = this.props,
128
119
  children = _this$props.children,
129
120
  isOpen = _this$props.isOpen,
@@ -133,11 +124,7 @@ var DropList = /*#__PURE__*/function (_Component) {
133
124
  testId = _this$props.testId,
134
125
  id = _this$props.id;
135
126
  var layerContent = isOpen ? (0, _react2.jsx)("div", {
136
- css: function css(theme) {
137
- return _this2.menuWrapper({
138
- theme: theme
139
- });
140
- },
127
+ css: this.menuWrapper,
141
128
  "data-role": "droplistContent",
142
129
  "data-testid": testId && "".concat(testId, "--content"),
143
130
  ref: this.handleContentRef,