@atlaskit/editor-common 128.1.0 → 128.2.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 (43) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/extensions/buildMenuItem.js +1 -0
  3. package/dist/cjs/monitoring/error.js +1 -1
  4. package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.js +7 -2
  5. package/dist/cjs/quick-insert/ElementBrowserQuickInsertMenuItem.js +2 -1
  6. package/dist/cjs/quick-insert/QuickInsertHoverPreview.compiled.css +5 -0
  7. package/dist/cjs/quick-insert/QuickInsertHoverPreview.js +47 -21
  8. package/dist/cjs/quick-insert/QuickInsertMenuItem.js +7 -0
  9. package/dist/cjs/quick-insert/SkillTag.compiled.css +9 -0
  10. package/dist/cjs/quick-insert/SkillTag.js +44 -0
  11. package/dist/cjs/styles/shared/table.js +3 -5
  12. package/dist/cjs/ui/DropList/index.js +1 -1
  13. package/dist/es2019/extensions/buildMenuItem.js +1 -0
  14. package/dist/es2019/monitoring/error.js +1 -1
  15. package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.js +7 -2
  16. package/dist/es2019/quick-insert/ElementBrowserQuickInsertMenuItem.js +2 -1
  17. package/dist/es2019/quick-insert/QuickInsertHoverPreview.compiled.css +5 -0
  18. package/dist/es2019/quick-insert/QuickInsertHoverPreview.js +37 -13
  19. package/dist/es2019/quick-insert/QuickInsertMenuItem.js +7 -0
  20. package/dist/es2019/quick-insert/SkillTag.compiled.css +9 -0
  21. package/dist/es2019/quick-insert/SkillTag.js +35 -0
  22. package/dist/es2019/styles/shared/table.js +3 -5
  23. package/dist/es2019/ui/DropList/index.js +1 -1
  24. package/dist/esm/extensions/buildMenuItem.js +1 -0
  25. package/dist/esm/monitoring/error.js +1 -1
  26. package/dist/esm/quick-insert/CompactQuickInsertMenuItem.js +7 -2
  27. package/dist/esm/quick-insert/ElementBrowserQuickInsertMenuItem.js +2 -1
  28. package/dist/esm/quick-insert/QuickInsertHoverPreview.compiled.css +5 -0
  29. package/dist/esm/quick-insert/QuickInsertHoverPreview.js +38 -13
  30. package/dist/esm/quick-insert/QuickInsertMenuItem.js +7 -0
  31. package/dist/esm/quick-insert/SkillTag.compiled.css +9 -0
  32. package/dist/esm/quick-insert/SkillTag.js +37 -0
  33. package/dist/esm/styles/shared/table.js +3 -5
  34. package/dist/esm/ui/DropList/index.js +1 -1
  35. package/dist/types/extensions/types/utils.d.ts +1 -0
  36. package/dist/types/quick-insert/CompactQuickInsertMenuItem.d.ts +1 -1
  37. package/dist/types/quick-insert/ElementBrowserQuickInsertMenuItem.d.ts +1 -1
  38. package/dist/types/quick-insert/QuickInsertHoverPreview.d.ts +9 -1
  39. package/dist/types/quick-insert/QuickInsertMenuItem.d.ts +7 -1
  40. package/dist/types/quick-insert/SkillTag.d.ts +6 -0
  41. package/dist/types/styles/shared/table.d.ts +3 -5
  42. package/package.json +9 -9
  43. package/quick-insert/skill-tag/package.json +10 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 128.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`ef6d325af58d6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef6d325af58d6) -
8
+ Update i18n NPM package versions for editor,editor-extensions,activity-platform,media,elements
9
+ (Group 3)
10
+ - [`375d0ca074591`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/375d0ca074591) -
11
+ Unify Rovo Skill quick-insert construction across product Editors and AI Chat behind
12
+ `platform_editor_slash_command`. Add shared menu title and preview presentation options, and reuse
13
+ existing extension metadata for Skill icons, descriptions, attribution and Beta labels. Export the
14
+ shared Editor SkillTag for reuse across menus. Preserve shared insertion and Chat-specific
15
+ behavior.
16
+
17
+ ### Patch Changes
18
+
19
+ - [`bf2f598c788f8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bf2f598c788f8) -
20
+ clean up feature flag platform_editor_core_static_css
21
+ - Updated dependencies
22
+
3
23
  ## 128.1.0
4
24
 
5
25
  ### Minor Changes
@@ -26,6 +26,7 @@ function buildMenuItem(manifest, extensionModule) {
26
26
  }
27
27
  } : {}), {}, {
28
28
  key: key,
29
+ moduleKey: extensionModule.key,
29
30
  title: title,
30
31
  extensionType: manifest.type,
31
32
  extensionKey: manifest.key,
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
27
27
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
28
28
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
29
29
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
30
- var packageVersion = "128.0.1";
30
+ var packageVersion = "128.1.0";
31
31
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
32
32
  // Remove URL as it has UGC
33
33
  // Ignored via go/ees007
@@ -85,10 +85,13 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
85
85
  isDisabled = _ref.isDisabled,
86
86
  onSelect = _ref.onSelect,
87
87
  preview = _ref.preview,
88
+ previewIcon = _ref.previewIcon,
88
89
  previewImageUrls = _ref.previewImageUrls,
89
90
  shortcut = _ref.shortcut,
91
+ titleContent = _ref.titleContent,
90
92
  _ref$shouldShowPrevie = _ref.shouldShowPreview,
91
93
  shouldShowPreview = _ref$shouldShowPrevie === void 0 ? true : _ref$shouldShowPrevie,
94
+ shouldClampPreview = _ref.shouldClampPreview,
92
95
  _ref$shouldWrapIcon = _ref.shouldWrapIcon,
93
96
  shouldWrapIcon = _ref$shouldWrapIcon === void 0 ? true : _ref$shouldWrapIcon,
94
97
  title = _ref.title;
@@ -138,7 +141,7 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
138
141
  alignBlock: "center",
139
142
  spread: "space-between",
140
143
  xcss: styles.content
141
- }, /*#__PURE__*/_react.default.createElement(_compiled.Text, null, title), shortcut && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
144
+ }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/_react.default.createElement(_compiled.Text, null, title), shortcut && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
142
145
  as: "span",
143
146
  xcss: styles.shortcut
144
147
  }, shortcut))), shouldRenderPreview && referenceElement && /*#__PURE__*/_react.default.createElement(_QuickInsertHoverPreview.QuickInsertHoverPreview, {
@@ -148,6 +151,8 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
148
151
  preview: resolvedPreview,
149
152
  popupsMountPoint: popupsMountPoint,
150
153
  referenceElement: referenceElement,
151
- title: title
154
+ title: title,
155
+ icon: previewIcon,
156
+ shouldClampText: shouldClampPreview
152
157
  }));
153
158
  };
@@ -115,6 +115,7 @@ var ElementBrowserQuickInsertMenuItem = exports.ElementBrowserQuickInsertMenuIte
115
115
  isDisabled = _ref.isDisabled,
116
116
  onSelect = _ref.onSelect,
117
117
  shortcut = _ref.shortcut,
118
+ titleContent = _ref.titleContent,
118
119
  _ref$shouldWrapIcon = _ref.shouldWrapIcon,
119
120
  shouldWrapIcon = _ref$shouldWrapIcon === void 0 ? true : _ref$shouldWrapIcon,
120
121
  title = _ref.title;
@@ -155,7 +156,7 @@ var ElementBrowserQuickInsertMenuItem = exports.ElementBrowserQuickInsertMenuIte
155
156
  alignBlock: "center",
156
157
  spread: "space-between",
157
158
  space: "space.100"
158
- }, /*#__PURE__*/_react.default.createElement(_primitives.Text, {
159
+ }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/_react.default.createElement(_primitives.Text, {
159
160
  color: "color.text",
160
161
  maxLines: 1,
161
162
  size: "medium",
@@ -8,6 +8,7 @@
8
8
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
9
9
  ._1rjcutpp{padding-block:var(--ds-space-150,9pt)}
10
10
  ._16jlidpf{flex-grow:0}
11
+ ._16jlkb7n{flex-grow:1}
11
12
  ._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
12
13
  ._18m915vq{overflow-y:hidden}
13
14
  ._1bah1h6o{justify-content:center}
@@ -20,8 +21,10 @@
20
21
  ._1e0ccj1k{display:-webkit-box}
21
22
  ._1i4qfg65{overflow-wrap:anywhere}
22
23
  ._1o9zidpf{flex-shrink:0}
24
+ ._1o9zkb7n{flex-shrink:1}
23
25
  ._1pby16oo{z-index:510}
24
26
  ._1reo15vq{overflow-x:hidden}
27
+ ._1ul9idpf{min-width:0}
25
28
  ._1yyjcs5v{-webkit-line-clamp:2}
26
29
  ._1yyjegat{-webkit-line-clamp:4}
27
30
  ._2lx21bp4{flex-direction:column}
@@ -36,7 +39,9 @@
36
39
  ._bfhkhfxm{background-color:var(--ds-surface-sunken,#f8f8f8)}
37
40
  ._c71l1kw7{max-height:inherit}
38
41
  ._c71lk6is{max-height:calc(100vh - 1pc)}
42
+ ._i0dl1wug{flex-basis:auto}
39
43
  ._i0dlexct{flex-basis:16px}
44
+ ._k48pwu06{font-weight:var(--ds-font-weight-bold,653)}
40
45
  ._p12f1oec{max-width:calc(100vw - 1pc)}
41
46
  ._p12f1osq{max-width:100%}
42
47
  ._sudp1e54{-webkit-box-orient:vertical}
@@ -8,14 +8,15 @@ Object.defineProperty(exports, "__esModule", {
8
8
  });
9
9
  exports.QuickInsertHoverPreview = void 0;
10
10
  require("./QuickInsertHoverPreview.compiled.css");
11
- var _react = _interopRequireWildcard(require("react"));
12
- var React = _react;
13
11
  var _runtime = require("@compiled/react/runtime");
14
12
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+ var _react = _interopRequireWildcard(require("react"));
15
14
  var _reactDom = require("react-dom");
16
15
  var _bindEventListener = require("bind-event-listener");
17
16
  var _reactIntl = require("react-intl");
18
17
  var _reactPopper = require("@atlaskit/popper/react-popper");
18
+ var _box = require("@atlaskit/primitives/compiled/box");
19
+ var _inline = require("@atlaskit/primitives/compiled/inline");
19
20
  var _text = require("@atlaskit/primitives/compiled/text");
20
21
  var _useThemeObserver2 = require("@atlaskit/tokens/use-theme-observer");
21
22
  var _messages = require("./messages");
@@ -46,33 +47,44 @@ var PREVIEW_MODIFIERS = [{
46
47
  rootBoundary: 'viewport'
47
48
  }
48
49
  }];
50
+ var layoutStyles = {
51
+ titleRow: "_1ul9idpf",
52
+ titleIcon: "_4cvr1h6o _1e0c1txw _1o9zidpf _1bah1h6o",
53
+ attributionText: "_16jlkb7n _1o9zkb7n _i0dl1wug _1ul9idpf _1i4qfg65"
54
+ };
49
55
  var styles = {
50
56
  positioner: "_c71lk6is _p12f1oec _1pby16oo",
51
57
  panel: "_2rko1qi0 _1reo15vq _18m915vq _1rjcutpp _18zrutpp _vchhusvi _bfhk1bhr _16qs130s _c71l1kw7 _p12f1osq _1bsbncxg",
52
58
  content: "_zulpu2gc _1e0c1txw _2lx21bp4",
53
- title: "_11c81qyo _1reo15vq _18m915vq _syazazsu _1i4qfg65 _1e0ccj1k _sudp1e54 _1yyjcs5v",
59
+ title: "_11c81qyo _16jlkb7n _1o9zkb7n _i0dl1wug _1reo15vq _18m915vq _syazazsu _1ul9idpf _1i4qfg65 _1e0ccj1k _sudp1e54 _1yyjcs5v",
60
+ unclampedTitle: "_11c8fhey _16jlkb7n _1o9zkb7n _i0dl1wug _syazi7uo _k48pwu06 _1ul9idpf _1i4qfg65",
54
61
  description: "_11c8fhey _1reo15vq _18m915vq _syazi7uo _1e0ccj1k _1i4qfg65 _sudp1e54 _1yyjegat",
62
+ unclampedDescription: "_11c8fhey _syazi7uo _1i4qfg65",
55
63
  imageArea: "_2rko12b0 _1reo15vq _18m915vq _bfhkhfxm _4t3i68cl _6rthu2gc _p12f1osq _1bsbp3fh",
56
64
  image: "_1e0c1ule _4t3i1osq _5ral1f51 _1bsb1osq",
57
65
  imageHidden: "_3um015vq",
58
- attribution: "_11c8wadc _zulp1b66 _4cvr1h6o _syazazsu _1e0c1txw _1i4qfg65",
66
+ attribution: "_zulp1b66 _4cvr1h6o _syazazsu _1e0c1txw _1i4qfg65",
67
+ compactAttribution: "_11c8wadc",
59
68
  attributionIcon: "_16jlidpf _1o9zidpf _i0dlexct _4cvr1h6o _1e0c1txw _4t3i7vkz _1bah1h6o _1bsb7vkz"
60
69
  };
61
70
 
62
71
  /** The selected item's description and attribution are announced through its aria-describedby. */
63
72
  var QuickInsertHoverPreview = exports.QuickInsertHoverPreview = function QuickInsertHoverPreview(_ref) {
64
73
  var description = _ref.description,
74
+ icon = _ref.icon,
65
75
  id = _ref.id,
66
76
  preview = _ref.preview,
67
77
  popupsMountPoint = _ref.popupsMountPoint,
68
78
  referenceElement = _ref.referenceElement,
79
+ _ref$shouldClampText = _ref.shouldClampText,
80
+ shouldClampText = _ref$shouldClampText === void 0 ? true : _ref$shouldClampText,
69
81
  title = _ref.title;
70
82
  var _useThemeObserver = (0, _useThemeObserver2.useThemeObserver)(),
71
83
  colorMode = _useThemeObserver.colorMode;
72
84
  var imageUrl = preview.image ? colorMode === 'dark' && preview.image.dark ? preview.image.dark : preview.image.light : undefined;
73
85
  var hasAccessibleContent = Boolean(description || preview.attribution);
74
86
  var portalTarget = popupsMountPoint !== null && popupsMountPoint !== void 0 ? popupsMountPoint : referenceElement.ownerDocument.body;
75
- return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/React.createElement(_reactPopper.Popper, {
87
+ return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react.default.createElement(_reactPopper.Popper, {
76
88
  placement: "right-start",
77
89
  referenceElement: referenceElement,
78
90
  strategy: popupsMountPoint ? 'absolute' : 'fixed',
@@ -81,17 +93,19 @@ var QuickInsertHoverPreview = exports.QuickInsertHoverPreview = function QuickIn
81
93
  var ref = _ref2.ref,
82
94
  style = _ref2.style,
83
95
  update = _ref2.update;
84
- return /*#__PURE__*/React.createElement("div", {
96
+ return /*#__PURE__*/_react.default.createElement("div", {
85
97
  ref: ref,
86
98
  style: style,
87
99
  className: (0, _runtime.ax)([styles.positioner])
88
- }, /*#__PURE__*/React.createElement(QuickInsertPreviewPanel, {
100
+ }, /*#__PURE__*/_react.default.createElement(QuickInsertPreviewPanel, {
89
101
  description: description,
102
+ icon: icon,
90
103
  id: hasAccessibleContent ? id : undefined,
91
104
  imageUrl: imageUrl,
92
105
  preview: preview,
93
106
  popupsMountPoint: popupsMountPoint,
94
107
  referenceElement: referenceElement,
108
+ shouldClampText: shouldClampText,
95
109
  title: title,
96
110
  update: update
97
111
  }));
@@ -100,11 +114,13 @@ var QuickInsertHoverPreview = exports.QuickInsertHoverPreview = function QuickIn
100
114
  var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
101
115
  var _preview$attribution, _preview$attribution2;
102
116
  var description = _ref3.description,
117
+ icon = _ref3.icon,
103
118
  id = _ref3.id,
104
119
  imageUrl = _ref3.imageUrl,
105
120
  preview = _ref3.preview,
106
121
  popupsMountPoint = _ref3.popupsMountPoint,
107
122
  referenceElement = _ref3.referenceElement,
123
+ shouldClampText = _ref3.shouldClampText,
108
124
  title = _ref3.title,
109
125
  update = _ref3.update;
110
126
  var _useIntl = (0, _reactIntl.useIntl)(),
@@ -145,33 +161,43 @@ var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
145
161
  observer.disconnect();
146
162
  };
147
163
  }, [panelElement, popupsMountPoint, referenceElement, update]);
148
- return /*#__PURE__*/React.createElement("div", {
164
+ return /*#__PURE__*/_react.default.createElement("div", {
149
165
  ref: setPanelElement,
150
166
  id: id,
151
167
  role: id ? 'tooltip' : undefined,
152
168
  "data-testid": "quick-insert-preview-panel",
153
169
  className: (0, _runtime.ax)([styles.panel])
154
- }, imageUrl && /*#__PURE__*/React.createElement(PreviewImage, {
170
+ }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, imageUrl && /*#__PURE__*/_react.default.createElement(PreviewImage, {
155
171
  key: imageUrl,
156
172
  imageUrl: imageUrl
157
- }), /*#__PURE__*/React.createElement("div", {
173
+ }), /*#__PURE__*/_react.default.createElement("div", {
158
174
  className: (0, _runtime.ax)([styles.content])
159
- }, /*#__PURE__*/React.createElement("div", {
175
+ }, /*#__PURE__*/_react.default.createElement(_inline.Inline, {
176
+ alignBlock: "center",
177
+ space: "space.100",
178
+ xcss: layoutStyles.titleRow,
179
+ "aria-hidden": "true"
180
+ }, icon && /*#__PURE__*/_react.default.createElement(_box.Box, {
181
+ as: "span",
160
182
  "aria-hidden": "true",
161
- className: (0, _runtime.ax)([styles.title])
162
- }, title), description && /*#__PURE__*/React.createElement("div", {
163
- className: (0, _runtime.ax)([styles.description])
164
- }, description), preview.attribution && /*#__PURE__*/React.createElement("div", {
165
- className: (0, _runtime.ax)([styles.attribution])
166
- }, AttributionIcon && /*#__PURE__*/React.createElement("span", {
183
+ xcss: layoutStyles.titleIcon
184
+ }, icon), /*#__PURE__*/_react.default.createElement("span", {
185
+ className: (0, _runtime.ax)([shouldClampText && styles.title, !shouldClampText && styles.unclampedTitle])
186
+ }, title)), description && /*#__PURE__*/_react.default.createElement("div", {
187
+ className: (0, _runtime.ax)([shouldClampText && styles.description, !shouldClampText && styles.unclampedDescription])
188
+ }, description), preview.attribution && /*#__PURE__*/_react.default.createElement("div", {
189
+ className: (0, _runtime.ax)([styles.attribution, shouldClampText && styles.compactAttribution])
190
+ }, AttributionIcon && /*#__PURE__*/_react.default.createElement("span", {
167
191
  "aria-hidden": "true",
168
192
  className: (0, _runtime.ax)([styles.attributionIcon])
169
- }, /*#__PURE__*/React.createElement(AttributionIcon, null)), /*#__PURE__*/React.createElement(_text.Text, {
193
+ }, /*#__PURE__*/_react.default.createElement(AttributionIcon, null)), /*#__PURE__*/_react.default.createElement("span", {
194
+ className: (0, _runtime.ax)([layoutStyles.attributionText])
195
+ }, /*#__PURE__*/_react.default.createElement(_text.Text, {
170
196
  size: "small",
171
197
  color: "color.text.subtle"
172
198
  }, AttributionIcon ? formattedAttributionName : formatMessage(_messages.messages.previewAttributionBy, {
173
199
  name: formattedAttributionName
174
- })))));
200
+ })))))));
175
201
  };
176
202
  var PreviewImage = function PreviewImage(_ref4) {
177
203
  var imageUrl = _ref4.imageUrl;
@@ -183,11 +209,11 @@ var PreviewImage = function PreviewImage(_ref4) {
183
209
  _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
184
210
  hasLoaded = _useState6[0],
185
211
  setHasLoaded = _useState6[1];
186
- return /*#__PURE__*/React.createElement("div", {
212
+ return /*#__PURE__*/_react.default.createElement("div", {
187
213
  "aria-hidden": "true",
188
214
  "data-testid": "quick-insert-preview-image-area",
189
215
  className: (0, _runtime.ax)([styles.imageArea])
190
- }, !hasFailed && /*#__PURE__*/React.createElement("img", {
216
+ }, !hasFailed && /*#__PURE__*/_react.default.createElement("img", {
191
217
  "aria-hidden": "true",
192
218
  "data-testid": "quick-insert-hover-preview",
193
219
  src: imageUrl,
@@ -16,9 +16,12 @@ var QuickInsertMenuItem = exports.QuickInsertMenuItem = function QuickInsertMenu
16
16
  isDisabled = _ref.isDisabled,
17
17
  onSelect = _ref.onSelect,
18
18
  preview = _ref.preview,
19
+ previewIcon = _ref.previewIcon,
19
20
  previewImageUrls = _ref.previewImageUrls,
20
21
  shortcut = _ref.shortcut,
22
+ titleContent = _ref.titleContent,
21
23
  shouldShowPreview = _ref.shouldShowPreview,
24
+ shouldClampPreview = _ref.shouldClampPreview,
22
25
  shouldWrapIcon = _ref.shouldWrapIcon,
23
26
  title = _ref.title;
24
27
  var _useQuickInsertContex = (0, _useQuickInsertContext.useQuickInsertContext)(),
@@ -30,6 +33,7 @@ var QuickInsertMenuItem = exports.QuickInsertMenuItem = function QuickInsertMenu
30
33
  isDisabled: isDisabled,
31
34
  onSelect: onSelect,
32
35
  shortcut: shortcut,
36
+ titleContent: titleContent,
33
37
  shouldWrapIcon: shouldWrapIcon,
34
38
  title: title
35
39
  }) : /*#__PURE__*/_react.default.createElement(_CompactQuickInsertMenuItem.CompactQuickInsertMenuItem, {
@@ -39,9 +43,12 @@ var QuickInsertMenuItem = exports.QuickInsertMenuItem = function QuickInsertMenu
39
43
  isDisabled: isDisabled,
40
44
  onSelect: onSelect,
41
45
  preview: preview,
46
+ previewIcon: previewIcon,
42
47
  previewImageUrls: previewImageUrls,
43
48
  shortcut: shortcut,
49
+ titleContent: titleContent,
44
50
  shouldShowPreview: shouldShowPreview,
51
+ shouldClampPreview: shouldClampPreview,
45
52
  shouldWrapIcon: shouldWrapIcon,
46
53
  title: title
47
54
  });
@@ -0,0 +1,9 @@
1
+ ._16d9qvcn{-webkit-box-decoration-break:clone;box-decoration-break:clone}
2
+ ._1e0c1nu9{display:inline}
3
+ ._1i4qfg65{overflow-wrap:anywhere}
4
+ ._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
5
+ ._bozg1b66{padding-inline-start:var(--ds-space-050,4px)}
6
+ ._mkrz1f6o{clip-path:polygon(20% 0,100% 0,100% 100%,0 100%)}
7
+ ._mkrz1gdk{clip-path:polygon(0 0,100% 0,80% 100%,0 100%)}
8
+ ._o5724jg8{white-space:normal}
9
+ ._y4ti1b66{padding-inline-end:var(--ds-space-050,4px)}
@@ -0,0 +1,44 @@
1
+ /* SkillTag.tsx generated by @compiled/babel-plugin v3.0.2 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.SkillTag = void 0;
9
+ require("./SkillTag.compiled.css");
10
+ var _runtime = require("@compiled/react/runtime");
11
+ var _react = _interopRequireDefault(require("react"));
12
+ var _css = require("@atlaskit/css");
13
+ var _box = require("@atlaskit/primitives/compiled/box");
14
+ var _text = require("@atlaskit/primitives/compiled/text");
15
+ var styles = {
16
+ highlight: "_bfhki8nm _16d9qvcn _1e0c1nu9",
17
+ start: "_bozg1b66 _y4ti1b66 _mkrz1f6o",
18
+ end: "_y4ti1b66 _mkrz1gdk",
19
+ wrapping: "_1i4qfg65 _o5724jg8",
20
+ text: "_1i4qfg65"
21
+ };
22
+ var SkillTag = exports.SkillTag = function SkillTag(_ref) {
23
+ var slug = _ref.slug,
24
+ _ref$isDisabled = _ref.isDisabled,
25
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
26
+ return /*#__PURE__*/_react.default.createElement(_box.Box, {
27
+ as: "span",
28
+ xcss: styles.wrapping
29
+ }, /*#__PURE__*/_react.default.createElement(_text.Text, {
30
+ color: isDisabled ? 'color.text.disabled' : 'color.text',
31
+ xcss: styles.text
32
+ }, /*#__PURE__*/_react.default.createElement(_box.Box, {
33
+ as: "span",
34
+ xcss: (0, _css.cx)(styles.highlight, styles.start)
35
+ }, /*#__PURE__*/_react.default.createElement(_text.Text, {
36
+ color: isDisabled ? 'color.text.disabled' : 'color.text.subtle'
37
+ }, "/")), /*#__PURE__*/_react.default.createElement(_box.Box, {
38
+ as: "span",
39
+ xcss: styles.highlight
40
+ }, slug.slice(0, -1)), slug && /*#__PURE__*/_react.default.createElement(_box.Box, {
41
+ as: "span",
42
+ xcss: (0, _css.cx)(styles.highlight, styles.end)
43
+ }, slug.slice(-1))));
44
+ };
@@ -59,12 +59,10 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
59
59
  *
60
60
  * If you are updating this, please also update the above files.
61
61
  *
62
- * @deprecated This Emotion-based style function is being phased out as part of the
63
- * `platform_editor_core_static_css` experiment migration to Compiled CSS. While the experiment
64
- * is running, any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
62
+ * @deprecated This Emotion-based style function is being phased out in favor of Compiled CSS.
63
+ * Any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
65
64
  * (look for `tableSharedStyle`, `tableSharedStyle_with_*`, `tableSharedStyle_without_*` entries
66
- * in the `editorContentStyles` cssMap). Failure to do so will cause visual regressions when the
67
- * compiled version is active.
65
+ * in the `editorContentStyles` cssMap) to keep the shared styles consistent.
68
66
  */
69
67
  var tableSharedStyle = exports.tableSharedStyle = function tableSharedStyle() {
70
68
  var browser = (0, _browser.getBrowserInfo)();
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "128.0.1";
27
+ var packageVersion = "128.1.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -17,6 +17,7 @@ export function buildMenuItem(manifest, extensionModule) {
17
17
  }
18
18
  } : {}),
19
19
  key,
20
+ moduleKey: extensionModule.key,
20
21
  title,
21
22
  extensionType: manifest.type,
22
23
  extensionKey: manifest.key,
@@ -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 = "128.0.1";
16
+ const packageVersion = "128.1.0";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -74,9 +74,12 @@ export const CompactQuickInsertMenuItem = ({
74
74
  isDisabled,
75
75
  onSelect,
76
76
  preview,
77
+ previewIcon,
77
78
  previewImageUrls,
78
79
  shortcut,
80
+ titleContent,
79
81
  shouldShowPreview = true,
82
+ shouldClampPreview,
80
83
  shouldWrapIcon = true,
81
84
  title
82
85
  }) => {
@@ -124,7 +127,7 @@ export const CompactQuickInsertMenuItem = ({
124
127
  alignBlock: "center",
125
128
  spread: "space-between",
126
129
  xcss: styles.content
127
- }, /*#__PURE__*/React.createElement(Text, null, title), shortcut && /*#__PURE__*/React.createElement(Box, {
130
+ }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/React.createElement(Text, null, title), shortcut && /*#__PURE__*/React.createElement(Box, {
128
131
  as: "span",
129
132
  xcss: styles.shortcut
130
133
  }, shortcut))), shouldRenderPreview && referenceElement && /*#__PURE__*/React.createElement(QuickInsertHoverPreview, {
@@ -134,6 +137,8 @@ export const CompactQuickInsertMenuItem = ({
134
137
  preview: resolvedPreview,
135
138
  popupsMountPoint: popupsMountPoint,
136
139
  referenceElement: referenceElement,
137
- title: title
140
+ title: title,
141
+ icon: previewIcon,
142
+ shouldClampText: shouldClampPreview
138
143
  }));
139
144
  };
@@ -107,6 +107,7 @@ export const ElementBrowserQuickInsertMenuItem = ({
107
107
  isDisabled,
108
108
  onSelect,
109
109
  shortcut,
110
+ titleContent,
110
111
  shouldWrapIcon = true,
111
112
  title
112
113
  }) => {
@@ -147,7 +148,7 @@ export const ElementBrowserQuickInsertMenuItem = ({
147
148
  alignBlock: "center",
148
149
  spread: "space-between",
149
150
  space: "space.100"
150
- }, /*#__PURE__*/React.createElement(Text, {
151
+ }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/React.createElement(Text, {
151
152
  color: "color.text",
152
153
  maxLines: 1,
153
154
  size: "medium",
@@ -8,6 +8,7 @@
8
8
  ._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
9
9
  ._1rjcutpp{padding-block:var(--ds-space-150,9pt)}
10
10
  ._16jlidpf{flex-grow:0}
11
+ ._16jlkb7n{flex-grow:1}
11
12
  ._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
12
13
  ._18m915vq{overflow-y:hidden}
13
14
  ._1bah1h6o{justify-content:center}
@@ -20,8 +21,10 @@
20
21
  ._1e0ccj1k{display:-webkit-box}
21
22
  ._1i4qfg65{overflow-wrap:anywhere}
22
23
  ._1o9zidpf{flex-shrink:0}
24
+ ._1o9zkb7n{flex-shrink:1}
23
25
  ._1pby16oo{z-index:510}
24
26
  ._1reo15vq{overflow-x:hidden}
27
+ ._1ul9idpf{min-width:0}
25
28
  ._1yyjcs5v{-webkit-line-clamp:2}
26
29
  ._1yyjegat{-webkit-line-clamp:4}
27
30
  ._2lx21bp4{flex-direction:column}
@@ -36,7 +39,9 @@
36
39
  ._bfhkhfxm{background-color:var(--ds-surface-sunken,#f8f8f8)}
37
40
  ._c71l1kw7{max-height:inherit}
38
41
  ._c71lk6is{max-height:calc(100vh - 1pc)}
42
+ ._i0dl1wug{flex-basis:auto}
39
43
  ._i0dlexct{flex-basis:16px}
44
+ ._k48pwu06{font-weight:var(--ds-font-weight-bold,653)}
40
45
  ._p12f1oec{max-width:calc(100vw - 1pc)}
41
46
  ._p12f1osq{max-width:100%}
42
47
  ._sudp1e54{-webkit-box-orient:vertical}
@@ -1,17 +1,17 @@
1
1
  /* QuickInsertHoverPreview.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./QuickInsertHoverPreview.compiled.css";
3
- import * as React from 'react';
4
3
  import { ax, ix } from "@compiled/react/runtime";
5
- import { useLayoutEffect, useState } from 'react';
4
+ import React, { useLayoutEffect, useState } from 'react';
6
5
  import { createPortal } from 'react-dom';
7
6
 
8
7
  // Viewport calculations and multiline clamping require styles outside @atlaskit/css's schema.
9
8
 
10
9
  import { bind } from 'bind-event-listener';
11
10
  import { useIntl } from 'react-intl';
12
-
13
11
  // Viewport clamping requires modifiers, which the top-layer adapter does not support.
14
12
  import { Popper } from '@atlaskit/popper/react-popper';
13
+ import { Box } from '@atlaskit/primitives/compiled/box';
14
+ import { Inline } from '@atlaskit/primitives/compiled/inline';
15
15
  import { Text } from '@atlaskit/primitives/compiled/text';
16
16
  import { useThemeObserver } from '@atlaskit/tokens/use-theme-observer';
17
17
  import { messages } from './messages';
@@ -39,26 +39,36 @@ const PREVIEW_MODIFIERS = [{
39
39
  rootBoundary: 'viewport'
40
40
  }
41
41
  }];
42
+ const layoutStyles = {
43
+ titleRow: "_1ul9idpf",
44
+ titleIcon: "_4cvr1h6o _1e0c1txw _1o9zidpf _1bah1h6o",
45
+ attributionText: "_16jlkb7n _1o9zkb7n _i0dl1wug _1ul9idpf _1i4qfg65"
46
+ };
42
47
  const styles = {
43
48
  positioner: "_c71lk6is _p12f1oec _1pby16oo",
44
49
  panel: "_2rko1qi0 _1reo15vq _18m915vq _1rjcutpp _18zrutpp _vchhusvi _bfhk1bhr _16qs130s _c71l1kw7 _p12f1osq _1bsbncxg",
45
50
  content: "_zulpu2gc _1e0c1txw _2lx21bp4",
46
- title: "_11c81qyo _1reo15vq _18m915vq _syazazsu _1i4qfg65 _1e0ccj1k _sudp1e54 _1yyjcs5v",
51
+ title: "_11c81qyo _16jlkb7n _1o9zkb7n _i0dl1wug _1reo15vq _18m915vq _syazazsu _1ul9idpf _1i4qfg65 _1e0ccj1k _sudp1e54 _1yyjcs5v",
52
+ unclampedTitle: "_11c8fhey _16jlkb7n _1o9zkb7n _i0dl1wug _syazi7uo _k48pwu06 _1ul9idpf _1i4qfg65",
47
53
  description: "_11c8fhey _1reo15vq _18m915vq _syazi7uo _1e0ccj1k _1i4qfg65 _sudp1e54 _1yyjegat",
54
+ unclampedDescription: "_11c8fhey _syazi7uo _1i4qfg65",
48
55
  imageArea: "_2rko12b0 _1reo15vq _18m915vq _bfhkhfxm _4t3i68cl _6rthu2gc _p12f1osq _1bsbp3fh",
49
56
  image: "_1e0c1ule _4t3i1osq _5ral1f51 _1bsb1osq",
50
57
  imageHidden: "_3um015vq",
51
- attribution: "_11c8wadc _zulp1b66 _4cvr1h6o _syazazsu _1e0c1txw _1i4qfg65",
58
+ attribution: "_zulp1b66 _4cvr1h6o _syazazsu _1e0c1txw _1i4qfg65",
59
+ compactAttribution: "_11c8wadc",
52
60
  attributionIcon: "_16jlidpf _1o9zidpf _i0dlexct _4cvr1h6o _1e0c1txw _4t3i7vkz _1bah1h6o _1bsb7vkz"
53
61
  };
54
62
 
55
63
  /** The selected item's description and attribution are announced through its aria-describedby. */
56
64
  export const QuickInsertHoverPreview = ({
57
65
  description,
66
+ icon,
58
67
  id,
59
68
  preview,
60
69
  popupsMountPoint,
61
70
  referenceElement,
71
+ shouldClampText = true,
62
72
  title
63
73
  }) => {
64
74
  const {
@@ -82,22 +92,26 @@ export const QuickInsertHoverPreview = ({
82
92
  className: ax([styles.positioner])
83
93
  }, /*#__PURE__*/React.createElement(QuickInsertPreviewPanel, {
84
94
  description: description,
95
+ icon: icon,
85
96
  id: hasAccessibleContent ? id : undefined,
86
97
  imageUrl: imageUrl,
87
98
  preview: preview,
88
99
  popupsMountPoint: popupsMountPoint,
89
100
  referenceElement: referenceElement,
101
+ shouldClampText: shouldClampText,
90
102
  title: title,
91
103
  update: update
92
104
  }))), portalTarget);
93
105
  };
94
106
  const QuickInsertPreviewPanel = ({
95
107
  description,
108
+ icon,
96
109
  id,
97
110
  imageUrl,
98
111
  preview,
99
112
  popupsMountPoint,
100
113
  referenceElement,
114
+ shouldClampText,
101
115
  title,
102
116
  update
103
117
  }) => {
@@ -142,27 +156,37 @@ const QuickInsertPreviewPanel = ({
142
156
  role: id ? 'tooltip' : undefined,
143
157
  "data-testid": "quick-insert-preview-panel",
144
158
  className: ax([styles.panel])
145
- }, imageUrl && /*#__PURE__*/React.createElement(PreviewImage, {
159
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, imageUrl && /*#__PURE__*/React.createElement(PreviewImage, {
146
160
  key: imageUrl,
147
161
  imageUrl: imageUrl
148
162
  }), /*#__PURE__*/React.createElement("div", {
149
163
  className: ax([styles.content])
150
- }, /*#__PURE__*/React.createElement("div", {
164
+ }, /*#__PURE__*/React.createElement(Inline, {
165
+ alignBlock: "center",
166
+ space: "space.100",
167
+ xcss: layoutStyles.titleRow,
168
+ "aria-hidden": "true"
169
+ }, icon && /*#__PURE__*/React.createElement(Box, {
170
+ as: "span",
151
171
  "aria-hidden": "true",
152
- className: ax([styles.title])
153
- }, title), description && /*#__PURE__*/React.createElement("div", {
154
- className: ax([styles.description])
172
+ xcss: layoutStyles.titleIcon
173
+ }, icon), /*#__PURE__*/React.createElement("span", {
174
+ className: ax([shouldClampText && styles.title, !shouldClampText && styles.unclampedTitle])
175
+ }, title)), description && /*#__PURE__*/React.createElement("div", {
176
+ className: ax([shouldClampText && styles.description, !shouldClampText && styles.unclampedDescription])
155
177
  }, description), preview.attribution && /*#__PURE__*/React.createElement("div", {
156
- className: ax([styles.attribution])
178
+ className: ax([styles.attribution, shouldClampText && styles.compactAttribution])
157
179
  }, AttributionIcon && /*#__PURE__*/React.createElement("span", {
158
180
  "aria-hidden": "true",
159
181
  className: ax([styles.attributionIcon])
160
- }, /*#__PURE__*/React.createElement(AttributionIcon, null)), /*#__PURE__*/React.createElement(Text, {
182
+ }, /*#__PURE__*/React.createElement(AttributionIcon, null)), /*#__PURE__*/React.createElement("span", {
183
+ className: ax([layoutStyles.attributionText])
184
+ }, /*#__PURE__*/React.createElement(Text, {
161
185
  size: "small",
162
186
  color: "color.text.subtle"
163
187
  }, AttributionIcon ? formattedAttributionName : formatMessage(messages.previewAttributionBy, {
164
188
  name: formattedAttributionName
165
- })))));
189
+ })))))));
166
190
  };
167
191
  const PreviewImage = ({
168
192
  imageUrl