@atlaskit/editor-common 78.29.3 → 78.30.1

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 (92) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/analytics/fire-analytics-event.js +5 -16
  3. package/dist/cjs/card/LinkToolbarButtonGroup.js +12 -6
  4. package/dist/cjs/element-browser/ViewMore.js +13 -5
  5. package/dist/cjs/element-browser/components/ElementBrowserLoader.js +9 -6
  6. package/dist/cjs/element-browser/components/ElementList/NotFoundIllustration.js +6 -4
  7. package/dist/cjs/element-browser/hooks/use-container-width.js +5 -4
  8. package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +38 -11
  9. package/dist/cjs/monitoring/error.js +1 -1
  10. package/dist/cjs/react-node-view/generateUniqueNodeKey.js +11 -0
  11. package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +4 -2
  12. package/dist/cjs/react-node-view/index.js +4 -2
  13. package/dist/cjs/ui/Caption/index.js +13 -6
  14. package/dist/cjs/ui/DropList/index.js +23 -6
  15. package/dist/cjs/ui/Expand/index.js +81 -9
  16. package/dist/cjs/ui/FloatingToolbar/Separator.js +8 -4
  17. package/dist/cjs/ui/FloatingToolbar/SmallerEditIcon.js +4 -3
  18. package/dist/cjs/ui/MediaSingle/link.js +11 -4
  19. package/dist/cjs/ui/Messages/index.js +18 -6
  20. package/dist/cjs/ui/PanelTextInput/styles.js +30 -5
  21. package/dist/cjs/ui/PortalProvider/index.js +5 -4
  22. package/dist/cjs/ui/UnsupportedBlock/index.js +19 -4
  23. package/dist/cjs/ui/WidthProvider/index.js +7 -4
  24. package/dist/cjs/ui-color/ColorPalette/styles.js +5 -4
  25. package/dist/cjs/ui-menu/DropdownMenu/index.js +15 -5
  26. package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +8 -6
  27. package/dist/cjs/ui-menu/ToolbarButton/index.js +8 -7
  28. package/dist/es2019/analytics/fire-analytics-event.js +5 -16
  29. package/dist/es2019/card/LinkToolbarButtonGroup.js +12 -12
  30. package/dist/es2019/element-browser/ViewMore.js +12 -12
  31. package/dist/es2019/element-browser/components/ElementBrowserLoader.js +7 -7
  32. package/dist/es2019/element-browser/components/ElementList/NotFoundIllustration.js +5 -5
  33. package/dist/es2019/element-browser/hooks/use-container-width.js +3 -3
  34. package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +37 -37
  35. package/dist/es2019/monitoring/error.js +1 -1
  36. package/dist/es2019/react-node-view/generateUniqueNodeKey.js +4 -0
  37. package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +4 -2
  38. package/dist/es2019/react-node-view/index.js +4 -2
  39. package/dist/es2019/ui/Caption/index.js +12 -12
  40. package/dist/es2019/ui/DropList/index.js +23 -21
  41. package/dist/es2019/ui/Expand/index.js +71 -78
  42. package/dist/es2019/ui/FloatingToolbar/Separator.js +7 -7
  43. package/dist/es2019/ui/FloatingToolbar/SmallerEditIcon.js +3 -3
  44. package/dist/es2019/ui/MediaSingle/link.js +11 -11
  45. package/dist/es2019/ui/Messages/index.js +17 -17
  46. package/dist/es2019/ui/PanelTextInput/styles.js +26 -30
  47. package/dist/es2019/ui/PortalProvider/index.js +4 -3
  48. package/dist/es2019/ui/UnsupportedBlock/index.js +17 -17
  49. package/dist/es2019/ui/WidthProvider/index.js +5 -4
  50. package/dist/es2019/ui-color/ColorPalette/styles.js +4 -4
  51. package/dist/es2019/ui-menu/DropdownMenu/index.js +10 -8
  52. package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +5 -5
  53. package/dist/es2019/ui-menu/ToolbarButton/index.js +4 -4
  54. package/dist/esm/analytics/fire-analytics-event.js +5 -16
  55. package/dist/esm/card/LinkToolbarButtonGroup.js +12 -6
  56. package/dist/esm/element-browser/ViewMore.js +12 -4
  57. package/dist/esm/element-browser/components/ElementBrowserLoader.js +7 -3
  58. package/dist/esm/element-browser/components/ElementList/NotFoundIllustration.js +5 -3
  59. package/dist/esm/element-browser/hooks/use-container-width.js +3 -3
  60. package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +37 -9
  61. package/dist/esm/monitoring/error.js +1 -1
  62. package/dist/esm/react-node-view/generateUniqueNodeKey.js +4 -0
  63. package/dist/esm/react-node-view/getInlineNodeViewProducer.js +4 -2
  64. package/dist/esm/react-node-view/index.js +4 -2
  65. package/dist/esm/ui/Caption/index.js +12 -4
  66. package/dist/esm/ui/DropList/index.js +23 -6
  67. package/dist/esm/ui/Expand/index.js +81 -9
  68. package/dist/esm/ui/FloatingToolbar/Separator.js +7 -3
  69. package/dist/esm/ui/FloatingToolbar/SmallerEditIcon.js +3 -3
  70. package/dist/esm/ui/MediaSingle/link.js +11 -3
  71. package/dist/esm/ui/Messages/index.js +17 -6
  72. package/dist/esm/ui/PanelTextInput/styles.js +30 -4
  73. package/dist/esm/ui/PortalProvider/index.js +5 -4
  74. package/dist/esm/ui/UnsupportedBlock/index.js +17 -3
  75. package/dist/esm/ui/WidthProvider/index.js +5 -3
  76. package/dist/esm/ui-color/ColorPalette/styles.js +5 -3
  77. package/dist/esm/ui-menu/DropdownMenu/index.js +15 -5
  78. package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +5 -3
  79. package/dist/esm/ui-menu/ToolbarButton/index.js +4 -3
  80. package/dist/types/react-node-view/generateUniqueNodeKey.d.ts +1 -0
  81. package/dist/types/react-node-view/index.d.ts +1 -0
  82. package/dist/types/types/feature-flags.d.ts +2 -0
  83. package/dist/types/ui/Caption/index.d.ts +1 -1
  84. package/dist/types/ui/PortalProvider/index.d.ts +3 -2
  85. package/dist/types/ui/UnsupportedBlock/index.d.ts +3 -3
  86. package/dist/types-ts4.5/react-node-view/generateUniqueNodeKey.d.ts +1 -0
  87. package/dist/types-ts4.5/react-node-view/index.d.ts +1 -0
  88. package/dist/types-ts4.5/types/feature-flags.d.ts +2 -0
  89. package/dist/types-ts4.5/ui/Caption/index.d.ts +1 -1
  90. package/dist/types-ts4.5/ui/PortalProvider/index.d.ts +3 -2
  91. package/dist/types-ts4.5/ui/UnsupportedBlock/index.d.ts +3 -3
  92. package/package.json +3 -2
@@ -11,23 +11,23 @@ import { ACTION_SUBJECT_ID } from '../../analytics';
11
11
  import { unsupportedContentMessages } from '../../messages/unsupportedContent';
12
12
  import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
13
13
  import { getUnsupportedContent } from '../unsupported-content-helper';
14
- const blockNodeStyle = css`
15
- background: ${`var(--ds-background-disabled, ${N30})`};
16
- border: 1px dashed ${`var(--ds-border-disabled, ${N50})`};
17
- border-radius: ${borderRadius()}px;
18
- box-sizing: border-box;
19
- cursor: default;
20
- display: flex;
21
- font-size: ${relativeFontSizeToBase16(fontSize())};
22
- margin: ${"var(--ds-space-100, 8px)"} 0;
23
- min-height: 24px;
24
- padding: ${"var(--ds-space-150, 12px)"};
25
- text-align: center;
26
- vertical-align: text-bottom;
27
- min-width: 120px;
28
- align-items: center;
29
- justify-content: center;
30
- `;
14
+ const blockNodeStyle = css({
15
+ background: `var(--ds-background-disabled, ${N30})`,
16
+ border: `1px dashed ${`var(--ds-border-disabled, ${N50})`}`,
17
+ borderRadius: `${borderRadius()}px`,
18
+ boxSizing: 'border-box',
19
+ cursor: 'default',
20
+ display: 'flex',
21
+ fontSize: relativeFontSizeToBase16(fontSize()),
22
+ margin: `${"var(--ds-space-100, 8px)"} 0`,
23
+ minHeight: '24px',
24
+ padding: "var(--ds-space-150, 12px)",
25
+ textAlign: 'center',
26
+ verticalAlign: 'text-bottom',
27
+ minWidth: '120px',
28
+ alignItems: 'center',
29
+ justifyContent: 'center'
30
+ });
31
31
  const UnsupportedBlockNode = ({
32
32
  node,
33
33
  intl,
@@ -3,6 +3,10 @@ import React, { Fragment } from 'react';
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import rafSchedule from 'raf-schd';
5
5
  import { WidthObserver } from '@atlaskit/width-detector';
6
+ const styles = css({
7
+ position: 'relative',
8
+ width: '100%'
9
+ });
6
10
  const SCROLLBAR_WIDTH = 30;
7
11
  export function getBreakpoint(width = 0) {
8
12
  const MAX_S = 1266;
@@ -42,10 +46,7 @@ export const WidthProvider = ({
42
46
  });
43
47
  const skipWidthDetection = shouldCheckExistingValue && existingContextValue.width > 0;
44
48
  return jsx("div", {
45
- css: css`
46
- position: relative;
47
- width: 100%;
48
- `,
49
+ css: styles,
49
50
  className: className
50
51
  }, !skipWidthDetection && jsx(Fragment, null, jsx(WidthObserver, {
51
52
  setWidth: updateWidth,
@@ -1,6 +1,6 @@
1
1
  import { css } from '@emotion/react';
2
- export const colorPaletteWrapper = css`
3
- padding: 0 ${"var(--ds-space-100, 8px)"};
2
+ export const colorPaletteWrapper = css({
3
+ padding: `0 ${"var(--ds-space-100, 8px)"}`,
4
4
  /* Firefox bug fix: https://product-fabric.atlassian.net/browse/ED-1789 */
5
- display: flex;
6
- `;
5
+ display: 'flex'
6
+ });
@@ -16,21 +16,22 @@ import DropList from '../../ui/DropList';
16
16
  import Popup from '../../ui/Popup';
17
17
  import { ArrowKeyNavigationProvider } from '../ArrowKeyNavigationProvider';
18
18
  import { ArrowKeyNavigationType } from '../ArrowKeyNavigationProvider/types';
19
- const wrapper = css`
19
+ const wrapper = css({
20
20
  /* tooltip in ToolbarButton is display:block */
21
- & > div > div {
22
- display: flex;
21
+ '& > div > div': {
22
+ display: 'flex'
23
23
  }
24
- `;
25
- const focusedMenuItemStyle = css`
26
- box-shadow: inset 0px 0px 0px 2px ${`var(--ds-border-focused, ${B100})`};
27
- outline: none;
28
- `;
24
+ });
25
+ const focusedMenuItemStyle = css({
26
+ boxShadow: `inset 0px 0px 0px 2px ${`var(--ds-border-focused, ${B100})`}`,
27
+ outline: 'none'
28
+ });
29
29
  const buttonStyles = (isActive, submenuActive) => {
30
30
  if (isActive) {
31
31
  /**
32
32
  * Hack for item to imitate old dropdown-menu selected styles
33
33
  */
34
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
34
35
  return css`
35
36
  > span,
36
37
  > span:hover,
@@ -47,6 +48,7 @@ const buttonStyles = (isActive, submenuActive) => {
47
48
  }
48
49
  `;
49
50
  } else {
51
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
50
52
  return css`
51
53
  > span:hover[aria-disabled='false'] {
52
54
  color: ${`var(--ds-text, ${N900})`};
@@ -15,11 +15,11 @@ export const KeyDownHandlerContext = /*#__PURE__*/React.createContext({
15
15
  handleArrowRight: () => {},
16
16
  handleTab: () => {}
17
17
  });
18
- const centeredToolbarContainer = css`
19
- display: flex;
20
- width: 100%;
21
- align-items: center;
22
- `;
18
+ const centeredToolbarContainer = css({
19
+ display: 'flex',
20
+ width: '100%',
21
+ alignItems: 'center'
22
+ });
23
23
 
24
24
  /**
25
25
  * This component is a wrapper of main toolbar which listens to keydown events of children
@@ -9,10 +9,10 @@ import Tooltip from '@atlaskit/tooltip';
9
9
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TOOLBAR_ACTION_SUBJECT_ID } from '../../analytics';
10
10
  import Button from './styles';
11
11
  export const TOOLBAR_BUTTON = TOOLBAR_ACTION_SUBJECT_ID;
12
- const buttonWrapper = css`
13
- display: flex;
14
- height: 100%;
15
- `;
12
+ const buttonWrapper = css({
13
+ display: 'flex',
14
+ height: '100%'
15
+ });
16
16
  const ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
17
17
  const {
18
18
  buttonId,
@@ -9,21 +9,10 @@ export var fireAnalyticsEvent = function fireAnalyticsEvent(createAnalyticsEvent
9
9
  if (!createAnalyticsEvent) {
10
10
  return;
11
11
  }
12
-
13
- // START TEMPORARY CODE ED-10584
14
- // __queueAnalytics property set in ReactEditorView based on featureFlags.queueAnalytics
15
- var queueAnalytics = Boolean(createAnalyticsEvent.__queueAnalytics);
16
- // END TEMPORARY CODE ED-10584
17
-
18
- if (queueAnalytics) {
19
- var queue = AnalyticsQueue.get();
20
- queue.schedule(function () {
21
- var _createAnalyticsEvent;
22
- return (_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 ? void 0 : _createAnalyticsEvent.fire(channel);
23
- });
24
- } else {
25
- var _createAnalyticsEvent2;
26
- (_createAnalyticsEvent2 = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent2 === void 0 || _createAnalyticsEvent2.fire(channel);
27
- }
12
+ var queue = AnalyticsQueue.get();
13
+ queue.schedule(function () {
14
+ var _createAnalyticsEvent;
15
+ return (_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 ? void 0 : _createAnalyticsEvent.fire(channel);
16
+ });
28
17
  };
29
18
  };
@@ -1,7 +1,5 @@
1
1
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
2
  var _excluded = ["disabled"];
4
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
5
3
  /** @jsx jsx */
6
4
  import React from 'react';
7
5
  import { css, jsx } from '@emotion/react';
@@ -11,8 +9,12 @@ import { FloatingToolbarButton as Button } from '../ui';
11
9
  /**
12
10
  * Applying `pointer-events: none;` when disabled allows the Tooltip to be displayed
13
11
  */
14
- var buttonStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n pointer-events: auto;\n"])));
15
- var buttonStyleNoneEvent = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n pointer-events: none;\n"])));
12
+ var buttonStyle = css({
13
+ pointerEvents: 'auto'
14
+ });
15
+ var buttonStyleNoneEvent = css({
16
+ pointerEvents: 'none'
17
+ });
16
18
  var DisallowedWrapper = function DisallowedWrapper(_ref) {
17
19
  var disabled = _ref.disabled,
18
20
  props = _objectWithoutProperties(_ref, _excluded);
@@ -23,8 +25,12 @@ var DisallowedWrapper = function DisallowedWrapper(_ref) {
23
25
  * The button requires `pointer-events: none;` in order to fix the tooltip, hence
24
26
  * leaving us without a disabled cursor, the following fixes this:
25
27
  */
26
- var defaultWrapperStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n cursor: pointer;\n"])));
27
- var disallowedWrapperStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n"])));
28
+ var defaultWrapperStyle = css({
29
+ cursor: 'pointer'
30
+ });
31
+ var disallowedWrapperStyle = css({
32
+ cursor: 'not-allowed'
33
+ });
28
34
  export var LinkToolbarButtonGroup = function LinkToolbarButtonGroup(_ref2) {
29
35
  var options = _ref2.options;
30
36
  return jsx(ButtonGroup, null, options.map(function (_ref3) {
@@ -1,10 +1,16 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2;
3
1
  /** @jsx jsx */
4
2
  import { useEffect, useRef } from 'react';
5
3
  import { css, jsx } from '@emotion/react';
6
4
  import { ButtonItem, Section } from '@atlaskit/menu';
7
- var itemBefore = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 40px;\n height: 40px;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ", ";\n"])), "var(--ds-space-050, 4px)");
5
+ var itemBefore = css({
6
+ width: '40px',
7
+ height: '40px',
8
+ boxSizing: 'border-box',
9
+ display: 'flex',
10
+ justifyContent: 'center',
11
+ alignItems: 'center',
12
+ marginRight: "var(--ds-space-050, 4px)"
13
+ });
8
14
  export var ViewMore = function ViewMore(_ref) {
9
15
  var item = _ref.item,
10
16
  focus = _ref.focus;
@@ -25,7 +31,9 @@ export var ViewMore = function ViewMore(_ref) {
25
31
  "data-testid": "view-more-elements-item"
26
32
  // @ts-ignore Overriding Menu styles is not supported
27
33
  ,
28
- css: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 0px ", ";\n "])), "var(--ds-space-150, 12px)"),
34
+ css: css({
35
+ padding: "0px ".concat("var(--ds-space-150, 12px)")
36
+ }),
29
37
  ref: ref
30
38
  }, item.title));
31
39
  };
@@ -1,11 +1,15 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
3
1
  /** @jsx jsx */
4
2
  import React from 'react';
5
3
  import { css, jsx } from '@emotion/react';
6
4
  import Loadable from 'react-loadable';
7
5
  import Spinner from '@atlaskit/spinner';
8
- var spinnerContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n"])));
6
+ var spinnerContainer = css({
7
+ display: 'flex',
8
+ alignItems: 'center',
9
+ justifyContent: 'center',
10
+ height: '100%',
11
+ width: '100%'
12
+ });
9
13
  var ElementBrowserLoader = Loadable({
10
14
  loader: function loader() {
11
15
  return import( /* webpackChunkName: "@atlaskit-internal_editor-element-browser" */'../ElementBrowser').then(function (module) {
@@ -1,8 +1,10 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
3
1
  /** @jsx jsx */
4
2
  import { css, jsx } from '@emotion/react';
5
- var imageContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 120px;\n height: 111px;\n margin-top: ", ";\n"])), "var(--ds-space-600, 48px)");
3
+ var imageContainer = css({
4
+ width: '120px',
5
+ height: '111px',
6
+ marginTop: "var(--ds-space-600, 48px)"
7
+ });
6
8
 
7
9
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
8
10
  export default function NotFoundIllustration() {
@@ -1,6 +1,4 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
- var _templateObject;
4
2
  /** @jsx jsx */
5
3
  import React, { memo, useEffect, useRef, useState } from 'react';
6
4
  import { css, jsx } from '@emotion/react';
@@ -32,7 +30,9 @@ import { WidthObserver } from '@atlaskit/width-detector';
32
30
  *
33
31
  */
34
32
 
35
- var widthObserverWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n"])));
33
+ var widthObserverWrapper = css({
34
+ position: 'relative'
35
+ });
36
36
  export default function useContainerWidth() {
37
37
  var _useState = useState(0),
38
38
  _useState2 = _slicedToArray(_useState, 2),
@@ -8,8 +8,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
8
8
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
9
9
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
10
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
11
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
12
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
13
11
  import _regeneratorRuntime from "@babel/runtime/regenerator";
14
12
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
15
13
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
@@ -39,14 +37,44 @@ import { filterUniqueItems, mapContentTypeToIcon, sha1, wordCount } from './util
39
37
  * Visible only to screenreaders. Use when there is a need
40
38
  * to provide more context to a non-sighted user.
41
39
  */
42
- export var visuallyHiddenStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n clip: rect(1px, 1px, 1px, 1px);\n clip-path: inset(50%);\n height: 1px;\n width: 1px;\n margin: ", ";\n overflow: hidden;\n padding: 0;\n position: absolute;\n"])), "var(--ds-space-negative-025, -2px)");
40
+ export var visuallyHiddenStyles = css({
41
+ clip: 'rect(1px, 1px, 1px, 1px)',
42
+ clipPath: 'inset(50%)',
43
+ height: '1px',
44
+ width: '1px',
45
+ margin: "var(--ds-space-negative-025, -2px)",
46
+ overflow: 'hidden',
47
+ padding: 0,
48
+ position: 'absolute'
49
+ });
43
50
  export var RECENT_SEARCH_LIST_SIZE = 5;
44
- var clearText = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: pointer;\n padding: 0;\n margin-right: ", ";\n color: ", ";\n background: transparent;\n border: none;\n"])), "var(--ds-space-100, 8px)", "var(--ds-icon-subtle, ".concat(N90, ")"));
45
- var clearTextWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n right: 0;\n"])));
46
- var containerPadding = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n"])), "var(--ds-space-150, 12px)", "var(--ds-space-100, 8px)");
47
- var textLabelMargin = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-top: ", ";\n"])), "var(--ds-space-150, 12px)");
48
- var inputLabel = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n font-size: ", "px;\n color: ", ";\n font-weight: 500;\n padding-bottom: ", ";\n"])), fontSizeSmall(), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-space-050, 4px)");
49
- var inputWrapperPosition = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n position: relative;\n"])));
51
+ var clearText = css({
52
+ cursor: 'pointer',
53
+ padding: 0,
54
+ marginRight: "var(--ds-space-100, 8px)",
55
+ color: "var(--ds-icon-subtle, ".concat(N90, ")"),
56
+ background: 'transparent',
57
+ border: 'none'
58
+ });
59
+ var clearTextWrapper = css({
60
+ position: 'absolute',
61
+ right: 0
62
+ });
63
+ var containerPadding = css({
64
+ padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-100, 8px)")
65
+ });
66
+ var textLabelMargin = css({
67
+ marginTop: "var(--ds-space-150, 12px)"
68
+ });
69
+ var inputLabel = css({
70
+ fontSize: "".concat(fontSizeSmall(), "px"),
71
+ color: "var(--ds-text-subtlest, ".concat(N200, ")"),
72
+ fontWeight: 500,
73
+ paddingBottom: "var(--ds-space-050, 4px)"
74
+ });
75
+ var inputWrapperPosition = css({
76
+ position: 'relative'
77
+ });
50
78
  export var messages = defineMessages({
51
79
  displayText: {
52
80
  id: 'fabric.editor.displayText',
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "78.29.3";
9
+ var packageVersion = "78.30.1";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -0,0 +1,4 @@
1
+ import uuid from 'uuid/v4';
2
+ export var generateUniqueNodeKey = function generateUniqueNodeKey() {
3
+ return uuid();
4
+ };
@@ -6,6 +6,7 @@ import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
6
6
  import { ErrorBoundary } from '../ui/ErrorBoundary';
7
7
  import { browser } from '../utils';
8
8
  import { analyticsEventKey, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered, ZERO_WIDTH_SPACE } from '../utils';
9
+ import { generateUniqueNodeKey } from './generateUniqueNodeKey';
9
10
  export var inlineNodeViewClassname = 'inlineNodeView';
10
11
  function createNodeView(_ref) {
11
12
  var nodeViewParams = _ref.nodeViewParams,
@@ -16,6 +17,7 @@ function createNodeView(_ref) {
16
17
  // used for comparisions when doing updates, before being
17
18
  // overwritten to the updated node.
18
19
  var currentNode = nodeViewParams.node;
20
+ var key = generateUniqueNodeKey();
19
21
 
20
22
  // First we setup the dom element which will be rendered and "tracked" by prosemirror
21
23
  // and also used as a "editor portal" (not react portal) target by the editor
@@ -52,7 +54,7 @@ function createNodeView(_ref) {
52
54
  nodeViewParams: nodeViewParams,
53
55
  Component: Component,
54
56
  extraComponentProps: extraComponentProps
55
- }), domRef, false,
57
+ }), domRef, key, false,
56
58
  // node views should be rendered with intl context
57
59
  true);
58
60
  }
@@ -110,7 +112,7 @@ function createNodeView(_ref) {
110
112
  // When prosemirror destroys the node view, we need to clean up
111
113
  // what we have previously rendered using the editor portal
112
114
  // provider api.
113
- pmPluginFactoryParams.portalProviderAPI.remove(domRef);
115
+ pmPluginFactoryParams.portalProviderAPI.remove(key, domRef);
114
116
  // @ts-expect-error Expect an error as domRef is expected to be
115
117
  // of HTMLSpanElement type however once the node view has
116
118
  // been destroyed no other consumers should still be using it.
@@ -8,6 +8,7 @@ import { createDispatch } from '../event-dispatcher';
8
8
  import { ErrorBoundary } from '../ui/ErrorBoundary';
9
9
  import { getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
10
10
  import { analyticsEventKey } from '../utils/analytics';
11
+ import { generateUniqueNodeKey } from './generateUniqueNodeKey';
11
12
  export { getInlineNodeViewProducer, inlineNodeViewClassname } from './getInlineNodeViewProducer';
12
13
  var ReactNodeView = /*#__PURE__*/function () {
13
14
  function ReactNodeView(_node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent) {
@@ -38,6 +39,7 @@ var ReactNodeView = /*#__PURE__*/function () {
38
39
  this._viewShouldUpdate = viewShouldUpdate;
39
40
  this.eventDispatcher = eventDispatcher;
40
41
  this.hasIntlContext = hasIntlContext;
42
+ this.key = generateUniqueNodeKey();
41
43
  }
42
44
 
43
45
  /**
@@ -105,7 +107,7 @@ var ReactNodeView = /*#__PURE__*/function () {
105
107
  dispatchAnalyticsEvent: _this3.dispatchAnalyticsEvent
106
108
  }, component());
107
109
  };
108
- this.portalProviderAPI.render(componentWithErrorBoundary, this.domRef, this.hasAnalyticsContext, this.hasIntlContext);
110
+ this.portalProviderAPI.render(componentWithErrorBoundary, this.domRef, this.key, this.hasAnalyticsContext, this.hasIntlContext);
109
111
  }
110
112
  }, {
111
113
  key: "createDomRef",
@@ -202,7 +204,7 @@ var ReactNodeView = /*#__PURE__*/function () {
202
204
  if (!this.domRef) {
203
205
  return;
204
206
  }
205
- this.portalProviderAPI.remove(this.domRef);
207
+ this.portalProviderAPI.remove(this.key, this.domRef);
206
208
  this.domRef = undefined;
207
209
  this.contentDOM = undefined;
208
210
  }
@@ -4,8 +4,6 @@ import _createClass from "@babel/runtime/helpers/createClass";
4
4
  import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
8
- var _templateObject, _templateObject2;
9
7
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
9
  /** @jsx jsx */
@@ -14,8 +12,18 @@ import { css, jsx } from '@emotion/react';
14
12
  import { injectIntl } from 'react-intl-next';
15
13
  import { N200, N400 } from '@atlaskit/theme/colors';
16
14
  import { messages } from './messages';
17
- var captionWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: ", ";\n text-align: center;\n position: relative;\n color: ", ";\n"])), "var(--ds-space-100, 8px)", "var(--ds-text-subtle, ".concat(N400, ")"));
18
- var placeholderStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n position: absolute;\n top: 0;\n width: 100%;\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"));
15
+ var captionWrapperStyle = css({
16
+ marginTop: "var(--ds-space-100, 8px)",
17
+ textAlign: 'center',
18
+ position: 'relative',
19
+ color: "var(--ds-text-subtle, ".concat(N400, ")")
20
+ });
21
+ var placeholderStyle = css({
22
+ color: "var(--ds-text-subtlest, ".concat(N200, ")"),
23
+ position: 'absolute',
24
+ top: 0,
25
+ width: '100%'
26
+ });
19
27
  export var CaptionComponent = /*#__PURE__*/function (_React$Component) {
20
28
  _inherits(CaptionComponent, _React$Component);
21
29
  var _super = _createSuper(CaptionComponent);
@@ -1,4 +1,3 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
2
  import _createClass from "@babel/runtime/helpers/createClass";
4
3
  import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
@@ -6,7 +5,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
7
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- var _templateObject, _templateObject2, _templateObject3;
10
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
10
  /** @jsx jsx */
@@ -17,7 +15,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
17
15
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
18
16
  import Layer from '../Layer';
19
17
  var packageName = "@atlaskit/editor-common";
20
- var packageVersion = "78.29.3";
18
+ var packageVersion = "78.30.1";
21
19
  var halfFocusRing = 1;
22
20
  var dropOffset = '0, 8';
23
21
  var DropList = /*#__PURE__*/function (_Component) {
@@ -30,11 +28,30 @@ var DropList = /*#__PURE__*/function (_Component) {
30
28
  args[_key] = arguments[_key];
31
29
  }
32
30
  _this = _super.call.apply(_super, [this].concat(args));
33
- _defineProperty(_assertThisInitialized(_this), "wrapperStyles", css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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;'));
34
- _defineProperty(_assertThisInitialized(_this), "triggerStyles", css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\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;'));
31
+ _defineProperty(_assertThisInitialized(_this), "wrapperStyles", css({
32
+ display: _this.props.shouldFitContainer ? 'block' : 'inline-flex',
33
+ flex: _this.props.shouldFitContainer ? '1 1 auto' : undefined,
34
+ transitionDuration: '0.2s',
35
+ transition: 'box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)'
36
+ }));
37
+ _defineProperty(_assertThisInitialized(_this), "triggerStyles", css({
38
+ transitionDuration: '0.2s',
39
+ transition: 'box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)',
40
+ display: _this.props.shouldFitContainer ? 'block' : 'inline-flex',
41
+ boxSizing: _this.props.shouldFitContainer ? 'border-box' : undefined
42
+ }));
35
43
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
36
44
  _defineProperty(_assertThisInitialized(_this), "menuWrapper", function () {
37
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\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(N900, ")"), "var(--ds-surface-overlay, ".concat(N0, ")"), "var(--ds-border-radius, 3px)", "var(--ds-shadow-overlay, ".concat("0 4px 8px calc(-1 * 2px) ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"), "var(--ds-space-050, 4px)");
45
+ return css({
46
+ color: "var(--ds-text, ".concat(N900, ")"),
47
+ backgroundColor: "var(--ds-surface-overlay, ".concat(N0, ")"),
48
+ borderRadius: "var(--ds-border-radius, 3px)",
49
+ boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px calc(-1 * 2px) ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"),
50
+ boxSizing: 'border-box',
51
+ overflow: 'auto',
52
+ padding: "var(--ds-space-050, 4px)".concat(" 0"),
53
+ maxHeight: '90vh'
54
+ });
38
55
  });
39
56
  /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
40
57
  _defineProperty(_assertThisInitialized(_this), "componentDidMount", function () {