@atlaskit/editor-common 134.12.0 → 134.14.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 (99) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/credit-guard/floating-toolbar-button/package.json +10 -0
  3. package/credit-guard/floating-toolbar-item/package.json +10 -0
  4. package/dist/cjs/credit-guard/CreditCheckedFloatingToolbarButton.js +114 -0
  5. package/dist/cjs/credit-guard/CreditCheckedPopup.js +1 -1
  6. package/dist/cjs/credit-guard/getCreditCheckedFloatingToolbarItem.js +30 -0
  7. package/dist/cjs/element-browser/components/ViewMore.js +1 -1
  8. package/dist/cjs/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  9. package/dist/cjs/extensibility/GeneratedContentReveal.js +1 -1
  10. package/dist/cjs/extensions/UnknownMacroPlaceholder.js +1 -1
  11. package/dist/cjs/icons/shared/PanelErrorIcon.js +1 -1
  12. package/dist/cjs/icons/shared/PanelInfoIcon.js +1 -1
  13. package/dist/cjs/icons/shared/PanelNoteIcon.js +1 -1
  14. package/dist/cjs/icons/shared/PanelSuccessIcon.js +1 -1
  15. package/dist/cjs/icons/shared/PanelWarningIcon.js +1 -1
  16. package/dist/cjs/monitoring/error.js +1 -1
  17. package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.js +1 -1
  18. package/dist/cjs/quick-insert/ElementBrowserQuickInsertMenuItem.js +1 -1
  19. package/dist/cjs/quick-insert/QuickInsertHoverPreview.js +1 -1
  20. package/dist/cjs/quick-insert/QuickInsertPreviewContent.compiled.css +1 -0
  21. package/dist/cjs/quick-insert/QuickInsertPreviewContent.js +9 -6
  22. package/dist/cjs/quick-insert/QuickInsertShortcut.js +1 -1
  23. package/dist/cjs/quick-insert/SkillTag.js +1 -1
  24. package/dist/cjs/quick-insert/messages.js +30 -0
  25. package/dist/cjs/table/NewSortingIcon.js +1 -1
  26. package/dist/cjs/ui/DropList/index.js +1 -1
  27. package/dist/cjs/ui/FloatingToolbar/Button.js +2 -0
  28. package/dist/cjs/ui/Shortcut/index.js +1 -1
  29. package/dist/cjs/ui/Toolbar/ButtonGroup.js +1 -1
  30. package/dist/cjs/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
  31. package/dist/cjs/ui/Toolbar/DropdownWrapper.js +1 -1
  32. package/dist/cjs/ui/Toolbar/ExpandIcon.js +1 -1
  33. package/dist/cjs/ui/Toolbar/Separator.js +1 -1
  34. package/dist/es2019/credit-guard/CreditCheckedFloatingToolbarButton.js +102 -0
  35. package/dist/es2019/credit-guard/CreditCheckedPopup.js +1 -1
  36. package/dist/es2019/credit-guard/getCreditCheckedFloatingToolbarItem.js +21 -0
  37. package/dist/es2019/element-browser/components/ViewMore.js +1 -1
  38. package/dist/es2019/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  39. package/dist/es2019/extensibility/GeneratedContentReveal.js +1 -1
  40. package/dist/es2019/extensions/UnknownMacroPlaceholder.js +1 -1
  41. package/dist/es2019/icons/shared/PanelErrorIcon.js +1 -1
  42. package/dist/es2019/icons/shared/PanelInfoIcon.js +1 -1
  43. package/dist/es2019/icons/shared/PanelNoteIcon.js +1 -1
  44. package/dist/es2019/icons/shared/PanelSuccessIcon.js +1 -1
  45. package/dist/es2019/icons/shared/PanelWarningIcon.js +1 -1
  46. package/dist/es2019/monitoring/error.js +1 -1
  47. package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.js +1 -1
  48. package/dist/es2019/quick-insert/ElementBrowserQuickInsertMenuItem.js +1 -1
  49. package/dist/es2019/quick-insert/QuickInsertHoverPreview.js +1 -1
  50. package/dist/es2019/quick-insert/QuickInsertPreviewContent.compiled.css +1 -0
  51. package/dist/es2019/quick-insert/QuickInsertPreviewContent.js +9 -6
  52. package/dist/es2019/quick-insert/QuickInsertShortcut.js +1 -1
  53. package/dist/es2019/quick-insert/SkillTag.js +1 -1
  54. package/dist/es2019/quick-insert/messages.js +30 -0
  55. package/dist/es2019/table/NewSortingIcon.js +1 -1
  56. package/dist/es2019/ui/DropList/index.js +1 -1
  57. package/dist/es2019/ui/FloatingToolbar/Button.js +2 -0
  58. package/dist/es2019/ui/Shortcut/index.js +1 -1
  59. package/dist/es2019/ui/Toolbar/ButtonGroup.js +1 -1
  60. package/dist/es2019/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
  61. package/dist/es2019/ui/Toolbar/DropdownWrapper.js +1 -1
  62. package/dist/es2019/ui/Toolbar/ExpandIcon.js +1 -1
  63. package/dist/es2019/ui/Toolbar/Separator.js +1 -1
  64. package/dist/esm/credit-guard/CreditCheckedFloatingToolbarButton.js +106 -0
  65. package/dist/esm/credit-guard/CreditCheckedPopup.js +1 -1
  66. package/dist/esm/credit-guard/getCreditCheckedFloatingToolbarItem.js +24 -0
  67. package/dist/esm/element-browser/components/ViewMore.js +1 -1
  68. package/dist/esm/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  69. package/dist/esm/extensibility/GeneratedContentReveal.js +1 -1
  70. package/dist/esm/extensions/UnknownMacroPlaceholder.js +1 -1
  71. package/dist/esm/icons/shared/PanelErrorIcon.js +1 -1
  72. package/dist/esm/icons/shared/PanelInfoIcon.js +1 -1
  73. package/dist/esm/icons/shared/PanelNoteIcon.js +1 -1
  74. package/dist/esm/icons/shared/PanelSuccessIcon.js +1 -1
  75. package/dist/esm/icons/shared/PanelWarningIcon.js +1 -1
  76. package/dist/esm/monitoring/error.js +1 -1
  77. package/dist/esm/quick-insert/CompactQuickInsertMenuItem.js +1 -1
  78. package/dist/esm/quick-insert/ElementBrowserQuickInsertMenuItem.js +1 -1
  79. package/dist/esm/quick-insert/QuickInsertHoverPreview.js +1 -1
  80. package/dist/esm/quick-insert/QuickInsertPreviewContent.compiled.css +1 -0
  81. package/dist/esm/quick-insert/QuickInsertPreviewContent.js +9 -6
  82. package/dist/esm/quick-insert/QuickInsertShortcut.js +1 -1
  83. package/dist/esm/quick-insert/SkillTag.js +1 -1
  84. package/dist/esm/quick-insert/messages.js +30 -0
  85. package/dist/esm/table/NewSortingIcon.js +1 -1
  86. package/dist/esm/ui/DropList/index.js +1 -1
  87. package/dist/esm/ui/FloatingToolbar/Button.js +2 -0
  88. package/dist/esm/ui/Shortcut/index.js +1 -1
  89. package/dist/esm/ui/Toolbar/ButtonGroup.js +1 -1
  90. package/dist/esm/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
  91. package/dist/esm/ui/Toolbar/DropdownWrapper.js +1 -1
  92. package/dist/esm/ui/Toolbar/ExpandIcon.js +1 -1
  93. package/dist/esm/ui/Toolbar/Separator.js +1 -1
  94. package/dist/types/credit-guard/CreditCheckedFloatingToolbarButton.d.ts +26 -0
  95. package/dist/types/credit-guard/getCreditCheckedFloatingToolbarItem.d.ts +5 -0
  96. package/dist/types/quick-insert/messages.d.ts +1 -1
  97. package/dist/types/quick-insert/preview.d.ts +6 -0
  98. package/dist/types/ui/FloatingToolbar/Button.d.ts +1 -0
  99. package/package.json +7 -7
@@ -1,4 +1,4 @@
1
- /* ViewMore.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* ViewMore.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./ViewMore.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* ExtensionFloatingLabel.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* ExtensionFloatingLabel.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./ExtensionFloatingLabel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* GeneratedContentReveal.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* GeneratedContentReveal.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./GeneratedContentReveal.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useCallback, useEffect, useState } from 'react';
@@ -1,4 +1,4 @@
1
- /* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./UnknownMacroPlaceholder.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelErrorIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* PanelErrorIcon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./PanelErrorIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelInfoIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* PanelInfoIcon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./PanelInfoIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelNoteIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* PanelNoteIcon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./PanelNoteIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelSuccessIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* PanelSuccessIcon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./PanelSuccessIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelWarningIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* PanelWarningIcon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./PanelWarningIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
13
13
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
14
14
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
15
15
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
16
- const packageVersion = "134.11.2";
16
+ const packageVersion = "134.14.0";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -1,4 +1,4 @@
1
- /* CompactQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* CompactQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./CompactQuickInsertMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useId, useMemo, useState } from 'react';
@@ -1,4 +1,4 @@
1
- /* ElementBrowserQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* ElementBrowserQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./ElementBrowserQuickInsertMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useId, useMemo } from 'react';
@@ -1,4 +1,4 @@
1
- /* QuickInsertHoverPreview.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* QuickInsertHoverPreview.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./QuickInsertHoverPreview.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useLayoutEffect, useState } from 'react';
@@ -27,6 +27,7 @@
27
27
  ._4t3i1osq{height:100%}
28
28
  ._4t3i68cl{height:90pt}
29
29
  ._4t3i7vkz{height:1pc}
30
+ ._5ral1dfr{object-fit:cover}
30
31
  ._5ral1f51{object-fit:contain}
31
32
  ._6rthu2gc{margin-block-end:var(--ds-space-100,8px)}
32
33
  ._bfhkhfxm{background-color:var(--ds-surface-sunken,#f8f8f8)}
@@ -1,4 +1,4 @@
1
- /* QuickInsertPreviewContent.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* QuickInsertPreviewContent.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./QuickInsertPreviewContent.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useState } from 'react';
@@ -20,13 +20,14 @@ const layoutStyles = {
20
20
  const styles = {
21
21
  root: "_1e0c1txw _2lx21bp4 _16jlkb7n _1ul9idpf",
22
22
  content: "_zulpu2gc _1e0c1txw _2lx21bp4 _16jlkb7n",
23
- title: "_11c81qyo _16jlidpf _1o9zkb7n _i0dl1wug _syazazsu _1ul9idpf _1i4qfg65",
23
+ title: "_11c81qyo _16jlidpf _1o9zkb7n _i0dl1wug _syazi7uo _1ul9idpf _1i4qfg65",
24
24
  clampedTitle: "_1reo15vq _18m915vq _1e0ccj1k _sudp1e54 _1yyjcs5v",
25
25
  description: "_11c8fhey _1reo15vq _18m915vq _syazi7uo _1e0ccj1k _1i4qfg65 _sudp1e54 _1yyjegat",
26
26
  unclampedDescription: "_11c8fhey _syazi7uo _1i4qfg65",
27
27
  disabledText: "_syaz1gmx",
28
28
  imageArea: "_2rko12b0 _1reo15vq _18m915vq _bfhkhfxm _4t3i68cl _6rthu2gc _1bsb1osq",
29
29
  image: "_1e0c1ule _4t3i1osq _5ral1f51 _1bsb1osq",
30
+ imageCover: "_5ral1dfr",
30
31
  imageHidden: "_3um015vq",
31
32
  attribution: "_zulp1b66 _4cvr1h6o _syazazsu _1e0c1txw _1pfh1wug _1i4qfg65",
32
33
  compactAttribution: "_11c8wadc",
@@ -48,7 +49,7 @@ export const QuickInsertPreviewContent = ({
48
49
  shouldClampText = true,
49
50
  title
50
51
  }) => {
51
- var _preview$attribution, _preview$attribution2;
52
+ var _preview$attribution, _preview$attribution2, _preview$image;
52
53
  const {
53
54
  formatMessage
54
55
  } = useIntl();
@@ -76,7 +77,8 @@ export const QuickInsertPreviewContent = ({
76
77
  className: ax([styles.root])
77
78
  }, imageUrl && /*#__PURE__*/React.createElement(PreviewImage, {
78
79
  key: imageUrl,
79
- imageUrl: imageUrl
80
+ imageUrl: imageUrl,
81
+ objectFit: (_preview$image = preview.image) === null || _preview$image === void 0 ? void 0 : _preview$image.objectFit
80
82
  }), /*#__PURE__*/React.createElement("div", {
81
83
  className: ax([styles.content])
82
84
  }, shortcut ? /*#__PURE__*/React.createElement(Inline, {
@@ -103,7 +105,8 @@ export const QuickInsertPreviewContent = ({
103
105
  }))))));
104
106
  };
105
107
  const PreviewImage = ({
106
- imageUrl
108
+ imageUrl,
109
+ objectFit
107
110
  }) => {
108
111
  const [hasFailed, setHasFailed] = useState(false);
109
112
  const [hasLoaded, setHasLoaded] = useState(false);
@@ -121,6 +124,6 @@ const PreviewImage = ({
121
124
  alt: "",
122
125
  onLoad: () => setHasLoaded(true),
123
126
  onError: () => setHasFailed(true),
124
- className: ax([styles.image, !hasLoaded && styles.imageHidden])
127
+ className: ax([styles.image, objectFit === 'cover' && styles.imageCover, !hasLoaded && styles.imageHidden])
125
128
  }));
126
129
  };
@@ -1,4 +1,4 @@
1
- /* QuickInsertShortcut.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* QuickInsertShortcut.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./QuickInsertShortcut.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* SkillTag.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* SkillTag.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./SkillTag.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -204,5 +204,35 @@ export const messages = defineMessages({
204
204
  id: 'editor-common.quick-insert.previewAttributionMicrosoft.ai-non-final',
205
205
  defaultMessage: 'Microsoft',
206
206
  description: 'Microsoft company name shown as the creator in a slash-command preview attribution.'
207
+ },
208
+ elementBrowserAllElements: {
209
+ id: 'editor.quick-insert.all-elements',
210
+ defaultMessage: 'All elements',
211
+ description: 'Heading above the remaining elements in the element browser All category, shown below the Recommended elements.'
212
+ },
213
+ elementBrowserCategoriesLabel: {
214
+ id: 'editor.quick-insert.categories-label',
215
+ defaultMessage: 'Element categories',
216
+ description: 'Accessible label for the group of category buttons in the element browser sidebar, read by screen readers.'
217
+ },
218
+ elementBrowserResultsAvailable: {
219
+ id: 'editor.quick-insert.results-available',
220
+ defaultMessage: '{count, plural, one {# result available} other {# results available}}',
221
+ description: 'Shown in the element browser footer. Tells the user how many elements match the current search and category.'
222
+ },
223
+ elementBrowserResultsLabel: {
224
+ id: 'editor.quick-insert.results-label',
225
+ defaultMessage: 'Element results',
226
+ description: 'Accessible label for the list of elements in the element browser, read by screen readers.'
227
+ },
228
+ elementBrowserSearch: {
229
+ id: 'editor.quick-insert.search',
230
+ defaultMessage: 'Search elements',
231
+ description: 'Accessible label for the search field at the top of the element browser, used to filter the elements that can be inserted.'
232
+ },
233
+ elementBrowserTitle: {
234
+ id: 'editor.quick-insert.title',
235
+ defaultMessage: 'Insert elements',
236
+ description: 'Title of the element browser dialog, where users browse and insert elements such as tables, panels and macros.'
207
237
  }
208
238
  });
@@ -1,4 +1,4 @@
1
- /* NewSortingIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* NewSortingIcon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./NewSortingIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "134.11.2";
16
+ const packageVersion = "134.14.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -12,6 +12,7 @@ const FloatingToolbarButton = ({
12
12
  title,
13
13
  icon,
14
14
  iconAfter,
15
+ id,
15
16
  onClick,
16
17
  onKeyDown,
17
18
  onMouseEnter,
@@ -107,6 +108,7 @@ const FloatingToolbarButton = ({
107
108
  ...rest
108
109
  };
109
110
  },
111
+ id: id,
110
112
  "aria-label": ariaLabel || title,
111
113
  "aria-pressed": ariaPressed,
112
114
  "aria-checked": ariaChecked,
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* ButtonGroup.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* ButtonGroup.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./ButtonGroup.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./DropdownTriggerWrapper.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* DropdownWrapper.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* DropdownWrapper.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./DropdownWrapper.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* ExpandIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* ExpandIcon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./ExpandIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* Separator.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* Separator.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./Separator.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -0,0 +1,106 @@
1
+ import React, { useCallback } from 'react';
2
+ import FloatingToolbarButtonComponent from '../ui/FloatingToolbar/Button';
3
+ import { CreditCheckedPopup } from './CreditCheckedPopup';
4
+
5
+ /**
6
+ * A confirm dialog needs the floating toolbar's own state, and a link would navigate before the
7
+ * credit check, so neither can be credit checked.
8
+ */
9
+
10
+ /**
11
+ * A floating toolbar button that checks AI credits before running its action, and anchors the
12
+ * product's credits popup to itself when credits are blocked. Matches the floating toolbar's own buttons.
13
+ */
14
+ export var CreditCheckedFloatingToolbarButton = function CreditCheckedFloatingToolbarButton(_ref) {
15
+ var areAnyNewToolbarFlagsEnabled = _ref.areAnyNewToolbarFlagsEnabled,
16
+ button = _ref.button,
17
+ creditCheck = _ref.creditCheck,
18
+ getAICreditStatus = _ref.getAICreditStatus,
19
+ view = _ref.view;
20
+ var runCommand = useCallback(function (command) {
21
+ if (view && command) {
22
+ command(view.state, view.dispatch, view);
23
+ }
24
+ }, [view]);
25
+ var focusEditoronEnter = button.focusEditoronEnter,
26
+ onClick = button.onClick;
27
+ var runAction = useCallback(function () {
28
+ runCommand(onClick);
29
+ if (focusEditoronEnter && !(view !== null && view !== void 0 && view.hasFocus())) {
30
+ view === null || view === void 0 || view.focus();
31
+ }
32
+ }, [runCommand, onClick, focusEditoronEnter, view]);
33
+ var renderTrigger = useCallback(function (triggerProps) {
34
+ var _button$disabled = button.disabled,
35
+ disabled = _button$disabled === void 0 ? false : _button$disabled,
36
+ showTitle = button.showTitle,
37
+ title = button.title;
38
+ var selected = Boolean(button.selected) || triggerProps.isSelected;
39
+ // Ignored via go/ees005
40
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
+ var ButtonIcon = button.icon;
42
+ var IconAfter = button.iconAfter;
43
+ return /*#__PURE__*/React.createElement(FloatingToolbarButtonComponent, {
44
+ ref: triggerProps.ref,
45
+ id: triggerProps.id
46
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Matches the floating toolbar's own buttons
47
+ ,
48
+ className: button.className,
49
+ title: title,
50
+ ariaLabel: button.ariaLabel,
51
+ icon: ButtonIcon ? /*#__PURE__*/React.createElement(ButtonIcon, {
52
+ color: disabled ? "var(--ds-icon-disabled, #080F214A)" : selected ? "var(--ds-icon-selected, #1868DB)" : 'currentColor',
53
+ spacing: "spacious",
54
+ label: undefined,
55
+ "aria-hidden": true
56
+ }) : undefined,
57
+ iconAfter: IconAfter ? /*#__PURE__*/React.createElement(IconAfter, {
58
+ label: ""
59
+ }) : undefined,
60
+ appearance: button.appearance,
61
+ onClick: triggerProps.onClick
62
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Matches the floating toolbar's own buttons
63
+ ,
64
+ onMouseEnter: function onMouseEnter() {
65
+ return runCommand(button.onMouseEnter);
66
+ }
67
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Matches the floating toolbar's own buttons
68
+ ,
69
+ onMouseLeave: function onMouseLeave() {
70
+ return runCommand(button.onMouseLeave);
71
+ }
72
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Matches the floating toolbar's own buttons
73
+ ,
74
+ onFocus: function onFocus() {
75
+ return runCommand(button.onFocus);
76
+ }
77
+ // eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Matches the floating toolbar's own buttons
78
+ ,
79
+ onBlur: function onBlur() {
80
+ return runCommand(button.onBlur);
81
+ },
82
+ onMount: button.onMount,
83
+ onUnmount: button.onUnmount,
84
+ selected: selected,
85
+ disabled: disabled,
86
+ tooltipContent: button.tooltipContent,
87
+ hideTooltipOnClick: button.hideTooltipOnClick,
88
+ hasNewContentOnTriggerClick: button.hasNewContentOnTriggerClick,
89
+ ariaHasPopup: triggerProps['aria-haspopup'],
90
+ areaControls: triggerProps['aria-controls'],
91
+ tabIndex: button.tabIndex,
92
+ isRadioButton: button.isRadioButton,
93
+ pulse: button.pulse,
94
+ testId: button.testId,
95
+ interactionName: button.interactionName,
96
+ areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled
97
+ }, showTitle && title);
98
+ }, [areAnyNewToolbarFlagsEnabled, button, runCommand]);
99
+ return /*#__PURE__*/React.createElement(CreditCheckedPopup, {
100
+ creditCheck: creditCheck,
101
+ getAICreditStatus: getAICreditStatus,
102
+ onAllowed: runAction,
103
+ placement: "bottom-start",
104
+ renderTrigger: renderTrigger
105
+ });
106
+ };
@@ -1,4 +1,4 @@
1
- /* CreditCheckedPopup.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* CreditCheckedPopup.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import "./CreditCheckedPopup.compiled.css";
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { CreditCheckedFloatingToolbarButton } from './CreditCheckedFloatingToolbarButton';
3
+
4
+ /** Wraps a floating toolbar button so it is credit checked, keeping its own appearance and handlers. */
5
+ export var getCreditCheckedFloatingToolbarItem = function getCreditCheckedFloatingToolbarItem(_ref) {
6
+ var areAnyNewToolbarFlagsEnabled = _ref.areAnyNewToolbarFlagsEnabled,
7
+ button = _ref.button,
8
+ creditCheck = _ref.creditCheck,
9
+ getAICreditStatus = _ref.getAICreditStatus;
10
+ return {
11
+ type: 'custom',
12
+ fallback: [],
13
+ render: function render(view, idx) {
14
+ return /*#__PURE__*/React.createElement(CreditCheckedFloatingToolbarButton, {
15
+ key: idx,
16
+ areAnyNewToolbarFlagsEnabled: areAnyNewToolbarFlagsEnabled,
17
+ button: button,
18
+ creditCheck: creditCheck,
19
+ getAICreditStatus: getAICreditStatus,
20
+ view: view
21
+ });
22
+ }
23
+ };
24
+ };
@@ -1,4 +1,4 @@
1
- /* ViewMore.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* ViewMore.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./ViewMore.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* ExtensionFloatingLabel.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* ExtensionFloatingLabel.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./ExtensionFloatingLabel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* GeneratedContentReveal.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* GeneratedContentReveal.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./GeneratedContentReveal.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./UnknownMacroPlaceholder.compiled.css";
4
4
  import * as React from 'react';
@@ -1,4 +1,4 @@
1
- /* PanelErrorIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* PanelErrorIcon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./PanelErrorIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelInfoIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* PanelInfoIcon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./PanelInfoIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelNoteIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* PanelNoteIcon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./PanelNoteIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelSuccessIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* PanelSuccessIcon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./PanelSuccessIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelWarningIcon.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* PanelWarningIcon.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./PanelWarningIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
19
19
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "134.11.2";
22
+ var packageVersion = "134.14.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -1,4 +1,4 @@
1
- /* CompactQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* CompactQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./CompactQuickInsertMenuItem.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* ElementBrowserQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* ElementBrowserQuickInsertMenuItem.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./ElementBrowserQuickInsertMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useId, useMemo } from 'react';
@@ -1,4 +1,4 @@
1
- /* QuickInsertHoverPreview.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* QuickInsertHoverPreview.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./QuickInsertHoverPreview.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -27,6 +27,7 @@
27
27
  ._4t3i1osq{height:100%}
28
28
  ._4t3i68cl{height:90pt}
29
29
  ._4t3i7vkz{height:1pc}
30
+ ._5ral1dfr{object-fit:cover}
30
31
  ._5ral1f51{object-fit:contain}
31
32
  ._6rthu2gc{margin-block-end:var(--ds-space-100,8px)}
32
33
  ._bfhkhfxm{background-color:var(--ds-surface-sunken,#f8f8f8)}
@@ -1,4 +1,4 @@
1
- /* QuickInsertPreviewContent.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* QuickInsertPreviewContent.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./QuickInsertPreviewContent.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -21,13 +21,14 @@ var layoutStyles = {
21
21
  var styles = {
22
22
  root: "_1e0c1txw _2lx21bp4 _16jlkb7n _1ul9idpf",
23
23
  content: "_zulpu2gc _1e0c1txw _2lx21bp4 _16jlkb7n",
24
- title: "_11c81qyo _16jlidpf _1o9zkb7n _i0dl1wug _syazazsu _1ul9idpf _1i4qfg65",
24
+ title: "_11c81qyo _16jlidpf _1o9zkb7n _i0dl1wug _syazi7uo _1ul9idpf _1i4qfg65",
25
25
  clampedTitle: "_1reo15vq _18m915vq _1e0ccj1k _sudp1e54 _1yyjcs5v",
26
26
  description: "_11c8fhey _1reo15vq _18m915vq _syazi7uo _1e0ccj1k _1i4qfg65 _sudp1e54 _1yyjegat",
27
27
  unclampedDescription: "_11c8fhey _syazi7uo _1i4qfg65",
28
28
  disabledText: "_syaz1gmx",
29
29
  imageArea: "_2rko12b0 _1reo15vq _18m915vq _bfhkhfxm _4t3i68cl _6rthu2gc _1bsb1osq",
30
30
  image: "_1e0c1ule _4t3i1osq _5ral1f51 _1bsb1osq",
31
+ imageCover: "_5ral1dfr",
31
32
  imageHidden: "_3um015vq",
32
33
  attribution: "_zulp1b66 _4cvr1h6o _syazazsu _1e0c1txw _1pfh1wug _1i4qfg65",
33
34
  compactAttribution: "_11c8wadc",
@@ -39,7 +40,7 @@ var styles = {
39
40
  * Element Browser tiles. It fills its container; callers own its width and accessible name.
40
41
  */
41
42
  export var QuickInsertPreviewContent = function QuickInsertPreviewContent(_ref) {
42
- var _preview$attribution, _preview$attribution2;
43
+ var _preview$attribution, _preview$attribution2, _preview$image;
43
44
  var description = _ref.description,
44
45
  icon = _ref.icon,
45
46
  id = _ref.id,
@@ -76,7 +77,8 @@ export var QuickInsertPreviewContent = function QuickInsertPreviewContent(_ref)
76
77
  className: ax([styles.root])
77
78
  }, imageUrl && /*#__PURE__*/React.createElement(PreviewImage, {
78
79
  key: imageUrl,
79
- imageUrl: imageUrl
80
+ imageUrl: imageUrl,
81
+ objectFit: (_preview$image = preview.image) === null || _preview$image === void 0 ? void 0 : _preview$image.objectFit
80
82
  }), /*#__PURE__*/React.createElement("div", {
81
83
  className: ax([styles.content])
82
84
  }, shortcut ? /*#__PURE__*/React.createElement(Inline, {
@@ -103,7 +105,8 @@ export var QuickInsertPreviewContent = function QuickInsertPreviewContent(_ref)
103
105
  }))))));
104
106
  };
105
107
  var PreviewImage = function PreviewImage(_ref2) {
106
- var imageUrl = _ref2.imageUrl;
108
+ var imageUrl = _ref2.imageUrl,
109
+ objectFit = _ref2.objectFit;
107
110
  var _useState = useState(false),
108
111
  _useState2 = _slicedToArray(_useState, 2),
109
112
  hasFailed = _useState2[0],
@@ -130,6 +133,6 @@ var PreviewImage = function PreviewImage(_ref2) {
130
133
  onError: function onError() {
131
134
  return setHasFailed(true);
132
135
  },
133
- className: ax([styles.image, !hasLoaded && styles.imageHidden])
136
+ className: ax([styles.image, objectFit === 'cover' && styles.imageCover, !hasLoaded && styles.imageHidden])
134
137
  }));
135
138
  };
@@ -1,4 +1,4 @@
1
- /* QuickInsertShortcut.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* QuickInsertShortcut.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./QuickInsertShortcut.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* SkillTag.tsx generated by @compiled/babel-plugin v3.0.2 */
1
+ /* SkillTag.tsx generated by @compiled/babel-plugin v3.0.4 */
2
2
  import "./SkillTag.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';