@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
@@ -9,9 +9,12 @@ export const QuickInsertMenuItem = ({
9
9
  isDisabled,
10
10
  onSelect,
11
11
  preview,
12
+ previewIcon,
12
13
  previewImageUrls,
13
14
  shortcut,
15
+ titleContent,
14
16
  shouldShowPreview,
17
+ shouldClampPreview,
15
18
  shouldWrapIcon,
16
19
  title
17
20
  }) => {
@@ -25,6 +28,7 @@ export const QuickInsertMenuItem = ({
25
28
  isDisabled: isDisabled,
26
29
  onSelect: onSelect,
27
30
  shortcut: shortcut,
31
+ titleContent: titleContent,
28
32
  shouldWrapIcon: shouldWrapIcon,
29
33
  title: title
30
34
  }) : /*#__PURE__*/React.createElement(CompactQuickInsertMenuItem, {
@@ -34,9 +38,12 @@ export const QuickInsertMenuItem = ({
34
38
  isDisabled: isDisabled,
35
39
  onSelect: onSelect,
36
40
  preview: preview,
41
+ previewIcon: previewIcon,
37
42
  previewImageUrls: previewImageUrls,
38
43
  shortcut: shortcut,
44
+ titleContent: titleContent,
39
45
  shouldShowPreview: shouldShowPreview,
46
+ shouldClampPreview: shouldClampPreview,
40
47
  shouldWrapIcon: shouldWrapIcon,
41
48
  title: title
42
49
  });
@@ -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,35 @@
1
+ /* SkillTag.tsx generated by @compiled/babel-plugin v3.0.2 */
2
+ import "./SkillTag.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import { cx } from '@atlaskit/css';
6
+ import { Box } from '@atlaskit/primitives/compiled/box';
7
+ import { Text } from '@atlaskit/primitives/compiled/text';
8
+ const styles = {
9
+ highlight: "_bfhki8nm _16d9qvcn _1e0c1nu9",
10
+ start: "_bozg1b66 _y4ti1b66 _mkrz1f6o",
11
+ end: "_y4ti1b66 _mkrz1gdk",
12
+ wrapping: "_1i4qfg65 _o5724jg8",
13
+ text: "_1i4qfg65"
14
+ };
15
+ export const SkillTag = ({
16
+ slug,
17
+ isDisabled = false
18
+ }) => /*#__PURE__*/React.createElement(Box, {
19
+ as: "span",
20
+ xcss: styles.wrapping
21
+ }, /*#__PURE__*/React.createElement(Text, {
22
+ color: isDisabled ? 'color.text.disabled' : 'color.text',
23
+ xcss: styles.text
24
+ }, /*#__PURE__*/React.createElement(Box, {
25
+ as: "span",
26
+ xcss: cx(styles.highlight, styles.start)
27
+ }, /*#__PURE__*/React.createElement(Text, {
28
+ color: isDisabled ? 'color.text.disabled' : 'color.text.subtle'
29
+ }, "/")), /*#__PURE__*/React.createElement(Box, {
30
+ as: "span",
31
+ xcss: styles.highlight
32
+ }, slug.slice(0, -1)), slug && /*#__PURE__*/React.createElement(Box, {
33
+ as: "span",
34
+ xcss: cx(styles.highlight, styles.end)
35
+ }, slug.slice(-1))));
@@ -39,12 +39,10 @@ css`
39
39
  *
40
40
  * If you are updating this, please also update the above files.
41
41
  *
42
- * @deprecated This Emotion-based style function is being phased out as part of the
43
- * `platform_editor_core_static_css` experiment migration to Compiled CSS. While the experiment
44
- * is running, any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
42
+ * @deprecated This Emotion-based style function is being phased out in favor of Compiled CSS.
43
+ * Any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
45
44
  * (look for `tableSharedStyle`, `tableSharedStyle_with_*`, `tableSharedStyle_without_*` entries
46
- * in the `editorContentStyles` cssMap). Failure to do so will cause visual regressions when the
47
- * compiled version is active.
45
+ * in the `editorContentStyles` cssMap) to keep the shared styles consistent.
48
46
  */
49
47
  const tableSharedStyle = () => {
50
48
  const browser = getBrowserInfo();
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags/fg';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "128.0.1";
17
+ const packageVersion = "128.1.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -19,6 +19,7 @@ export function buildMenuItem(manifest, extensionModule) {
19
19
  }
20
20
  } : {}), {}, {
21
21
  key: key,
22
+ moduleKey: extensionModule.key,
22
23
  title: title,
23
24
  extensionType: manifest.type,
24
25
  extensionKey: manifest.key,
@@ -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 = "128.0.1";
22
+ var packageVersion = "128.1.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -76,10 +76,13 @@ export var CompactQuickInsertMenuItem = function CompactQuickInsertMenuItem(_ref
76
76
  isDisabled = _ref.isDisabled,
77
77
  onSelect = _ref.onSelect,
78
78
  preview = _ref.preview,
79
+ previewIcon = _ref.previewIcon,
79
80
  previewImageUrls = _ref.previewImageUrls,
80
81
  shortcut = _ref.shortcut,
82
+ titleContent = _ref.titleContent,
81
83
  _ref$shouldShowPrevie = _ref.shouldShowPreview,
82
84
  shouldShowPreview = _ref$shouldShowPrevie === void 0 ? true : _ref$shouldShowPrevie,
85
+ shouldClampPreview = _ref.shouldClampPreview,
83
86
  _ref$shouldWrapIcon = _ref.shouldWrapIcon,
84
87
  shouldWrapIcon = _ref$shouldWrapIcon === void 0 ? true : _ref$shouldWrapIcon,
85
88
  title = _ref.title;
@@ -129,7 +132,7 @@ export var CompactQuickInsertMenuItem = function CompactQuickInsertMenuItem(_ref
129
132
  alignBlock: "center",
130
133
  spread: "space-between",
131
134
  xcss: styles.content
132
- }, /*#__PURE__*/React.createElement(Text, null, title), shortcut && /*#__PURE__*/React.createElement(Box, {
135
+ }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/React.createElement(Text, null, title), shortcut && /*#__PURE__*/React.createElement(Box, {
133
136
  as: "span",
134
137
  xcss: styles.shortcut
135
138
  }, shortcut))), shouldRenderPreview && referenceElement && /*#__PURE__*/React.createElement(QuickInsertHoverPreview, {
@@ -139,6 +142,8 @@ export var CompactQuickInsertMenuItem = function CompactQuickInsertMenuItem(_ref
139
142
  preview: resolvedPreview,
140
143
  popupsMountPoint: popupsMountPoint,
141
144
  referenceElement: referenceElement,
142
- title: title
145
+ title: title,
146
+ icon: previewIcon,
147
+ shouldClampText: shouldClampPreview
143
148
  }));
144
149
  };
@@ -107,6 +107,7 @@ export var ElementBrowserQuickInsertMenuItem = function ElementBrowserQuickInser
107
107
  isDisabled = _ref.isDisabled,
108
108
  onSelect = _ref.onSelect,
109
109
  shortcut = _ref.shortcut,
110
+ titleContent = _ref.titleContent,
110
111
  _ref$shouldWrapIcon = _ref.shouldWrapIcon,
111
112
  shouldWrapIcon = _ref$shouldWrapIcon === void 0 ? true : _ref$shouldWrapIcon,
112
113
  title = _ref.title;
@@ -147,7 +148,7 @@ export var ElementBrowserQuickInsertMenuItem = function ElementBrowserQuickInser
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,18 +1,18 @@
1
1
  /* QuickInsertHoverPreview.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./QuickInsertHoverPreview.compiled.css";
4
- import * as React from 'react';
5
4
  import { ax, ix } from "@compiled/react/runtime";
6
- import { useLayoutEffect, useState } from 'react';
5
+ import React, { useLayoutEffect, useState } from 'react';
7
6
  import { createPortal } from 'react-dom';
8
7
 
9
8
  // Viewport calculations and multiline clamping require styles outside @atlaskit/css's schema.
10
9
 
11
10
  import { bind } from 'bind-event-listener';
12
11
  import { useIntl } from 'react-intl';
13
-
14
12
  // Viewport clamping requires modifiers, which the top-layer adapter does not support.
15
13
  import { Popper } from '@atlaskit/popper/react-popper';
14
+ import { Box } from '@atlaskit/primitives/compiled/box';
15
+ import { Inline } from '@atlaskit/primitives/compiled/inline';
16
16
  import { Text } from '@atlaskit/primitives/compiled/text';
17
17
  import { useThemeObserver } from '@atlaskit/tokens/use-theme-observer';
18
18
  import { messages } from './messages';
@@ -40,26 +40,37 @@ var PREVIEW_MODIFIERS = [{
40
40
  rootBoundary: 'viewport'
41
41
  }
42
42
  }];
43
+ var layoutStyles = {
44
+ titleRow: "_1ul9idpf",
45
+ titleIcon: "_4cvr1h6o _1e0c1txw _1o9zidpf _1bah1h6o",
46
+ attributionText: "_16jlkb7n _1o9zkb7n _i0dl1wug _1ul9idpf _1i4qfg65"
47
+ };
43
48
  var styles = {
44
49
  positioner: "_c71lk6is _p12f1oec _1pby16oo",
45
50
  panel: "_2rko1qi0 _1reo15vq _18m915vq _1rjcutpp _18zrutpp _vchhusvi _bfhk1bhr _16qs130s _c71l1kw7 _p12f1osq _1bsbncxg",
46
51
  content: "_zulpu2gc _1e0c1txw _2lx21bp4",
47
- title: "_11c81qyo _1reo15vq _18m915vq _syazazsu _1i4qfg65 _1e0ccj1k _sudp1e54 _1yyjcs5v",
52
+ title: "_11c81qyo _16jlkb7n _1o9zkb7n _i0dl1wug _1reo15vq _18m915vq _syazazsu _1ul9idpf _1i4qfg65 _1e0ccj1k _sudp1e54 _1yyjcs5v",
53
+ unclampedTitle: "_11c8fhey _16jlkb7n _1o9zkb7n _i0dl1wug _syazi7uo _k48pwu06 _1ul9idpf _1i4qfg65",
48
54
  description: "_11c8fhey _1reo15vq _18m915vq _syazi7uo _1e0ccj1k _1i4qfg65 _sudp1e54 _1yyjegat",
55
+ unclampedDescription: "_11c8fhey _syazi7uo _1i4qfg65",
49
56
  imageArea: "_2rko12b0 _1reo15vq _18m915vq _bfhkhfxm _4t3i68cl _6rthu2gc _p12f1osq _1bsbp3fh",
50
57
  image: "_1e0c1ule _4t3i1osq _5ral1f51 _1bsb1osq",
51
58
  imageHidden: "_3um015vq",
52
- attribution: "_11c8wadc _zulp1b66 _4cvr1h6o _syazazsu _1e0c1txw _1i4qfg65",
59
+ attribution: "_zulp1b66 _4cvr1h6o _syazazsu _1e0c1txw _1i4qfg65",
60
+ compactAttribution: "_11c8wadc",
53
61
  attributionIcon: "_16jlidpf _1o9zidpf _i0dlexct _4cvr1h6o _1e0c1txw _4t3i7vkz _1bah1h6o _1bsb7vkz"
54
62
  };
55
63
 
56
64
  /** The selected item's description and attribution are announced through its aria-describedby. */
57
65
  export var QuickInsertHoverPreview = function QuickInsertHoverPreview(_ref) {
58
66
  var description = _ref.description,
67
+ icon = _ref.icon,
59
68
  id = _ref.id,
60
69
  preview = _ref.preview,
61
70
  popupsMountPoint = _ref.popupsMountPoint,
62
71
  referenceElement = _ref.referenceElement,
72
+ _ref$shouldClampText = _ref.shouldClampText,
73
+ shouldClampText = _ref$shouldClampText === void 0 ? true : _ref$shouldClampText,
63
74
  title = _ref.title;
64
75
  var _useThemeObserver = useThemeObserver(),
65
76
  colorMode = _useThemeObserver.colorMode;
@@ -81,11 +92,13 @@ export var QuickInsertHoverPreview = function QuickInsertHoverPreview(_ref) {
81
92
  className: ax([styles.positioner])
82
93
  }, /*#__PURE__*/React.createElement(QuickInsertPreviewPanel, {
83
94
  description: description,
95
+ icon: icon,
84
96
  id: hasAccessibleContent ? id : undefined,
85
97
  imageUrl: imageUrl,
86
98
  preview: preview,
87
99
  popupsMountPoint: popupsMountPoint,
88
100
  referenceElement: referenceElement,
101
+ shouldClampText: shouldClampText,
89
102
  title: title,
90
103
  update: update
91
104
  }));
@@ -94,11 +107,13 @@ export var QuickInsertHoverPreview = function QuickInsertHoverPreview(_ref) {
94
107
  var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
95
108
  var _preview$attribution, _preview$attribution2;
96
109
  var description = _ref3.description,
110
+ icon = _ref3.icon,
97
111
  id = _ref3.id,
98
112
  imageUrl = _ref3.imageUrl,
99
113
  preview = _ref3.preview,
100
114
  popupsMountPoint = _ref3.popupsMountPoint,
101
115
  referenceElement = _ref3.referenceElement,
116
+ shouldClampText = _ref3.shouldClampText,
102
117
  title = _ref3.title,
103
118
  update = _ref3.update;
104
119
  var _useIntl = useIntl(),
@@ -145,27 +160,37 @@ var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
145
160
  role: id ? 'tooltip' : undefined,
146
161
  "data-testid": "quick-insert-preview-panel",
147
162
  className: ax([styles.panel])
148
- }, imageUrl && /*#__PURE__*/React.createElement(PreviewImage, {
163
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, imageUrl && /*#__PURE__*/React.createElement(PreviewImage, {
149
164
  key: imageUrl,
150
165
  imageUrl: imageUrl
151
166
  }), /*#__PURE__*/React.createElement("div", {
152
167
  className: ax([styles.content])
153
- }, /*#__PURE__*/React.createElement("div", {
168
+ }, /*#__PURE__*/React.createElement(Inline, {
169
+ alignBlock: "center",
170
+ space: "space.100",
171
+ xcss: layoutStyles.titleRow,
172
+ "aria-hidden": "true"
173
+ }, icon && /*#__PURE__*/React.createElement(Box, {
174
+ as: "span",
154
175
  "aria-hidden": "true",
155
- className: ax([styles.title])
156
- }, title), description && /*#__PURE__*/React.createElement("div", {
157
- className: ax([styles.description])
176
+ xcss: layoutStyles.titleIcon
177
+ }, icon), /*#__PURE__*/React.createElement("span", {
178
+ className: ax([shouldClampText && styles.title, !shouldClampText && styles.unclampedTitle])
179
+ }, title)), description && /*#__PURE__*/React.createElement("div", {
180
+ className: ax([shouldClampText && styles.description, !shouldClampText && styles.unclampedDescription])
158
181
  }, description), preview.attribution && /*#__PURE__*/React.createElement("div", {
159
- className: ax([styles.attribution])
182
+ className: ax([styles.attribution, shouldClampText && styles.compactAttribution])
160
183
  }, AttributionIcon && /*#__PURE__*/React.createElement("span", {
161
184
  "aria-hidden": "true",
162
185
  className: ax([styles.attributionIcon])
163
- }, /*#__PURE__*/React.createElement(AttributionIcon, null)), /*#__PURE__*/React.createElement(Text, {
186
+ }, /*#__PURE__*/React.createElement(AttributionIcon, null)), /*#__PURE__*/React.createElement("span", {
187
+ className: ax([layoutStyles.attributionText])
188
+ }, /*#__PURE__*/React.createElement(Text, {
164
189
  size: "small",
165
190
  color: "color.text.subtle"
166
191
  }, AttributionIcon ? formattedAttributionName : formatMessage(messages.previewAttributionBy, {
167
192
  name: formattedAttributionName
168
- })))));
193
+ })))))));
169
194
  };
170
195
  var PreviewImage = function PreviewImage(_ref4) {
171
196
  var imageUrl = _ref4.imageUrl;
@@ -9,9 +9,12 @@ export var QuickInsertMenuItem = function QuickInsertMenuItem(_ref) {
9
9
  isDisabled = _ref.isDisabled,
10
10
  onSelect = _ref.onSelect,
11
11
  preview = _ref.preview,
12
+ previewIcon = _ref.previewIcon,
12
13
  previewImageUrls = _ref.previewImageUrls,
13
14
  shortcut = _ref.shortcut,
15
+ titleContent = _ref.titleContent,
14
16
  shouldShowPreview = _ref.shouldShowPreview,
17
+ shouldClampPreview = _ref.shouldClampPreview,
15
18
  shouldWrapIcon = _ref.shouldWrapIcon,
16
19
  title = _ref.title;
17
20
  var _useQuickInsertContex = useQuickInsertContext(),
@@ -23,6 +26,7 @@ export var QuickInsertMenuItem = function QuickInsertMenuItem(_ref) {
23
26
  isDisabled: isDisabled,
24
27
  onSelect: onSelect,
25
28
  shortcut: shortcut,
29
+ titleContent: titleContent,
26
30
  shouldWrapIcon: shouldWrapIcon,
27
31
  title: title
28
32
  }) : /*#__PURE__*/React.createElement(CompactQuickInsertMenuItem, {
@@ -32,9 +36,12 @@ export var QuickInsertMenuItem = function QuickInsertMenuItem(_ref) {
32
36
  isDisabled: isDisabled,
33
37
  onSelect: onSelect,
34
38
  preview: preview,
39
+ previewIcon: previewIcon,
35
40
  previewImageUrls: previewImageUrls,
36
41
  shortcut: shortcut,
42
+ titleContent: titleContent,
37
43
  shouldShowPreview: shouldShowPreview,
44
+ shouldClampPreview: shouldClampPreview,
38
45
  shouldWrapIcon: shouldWrapIcon,
39
46
  title: title
40
47
  });
@@ -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,37 @@
1
+ /* SkillTag.tsx generated by @compiled/babel-plugin v3.0.2 */
2
+ import "./SkillTag.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import { cx } from '@atlaskit/css';
6
+ import { Box } from '@atlaskit/primitives/compiled/box';
7
+ import { Text } from '@atlaskit/primitives/compiled/text';
8
+ var styles = {
9
+ highlight: "_bfhki8nm _16d9qvcn _1e0c1nu9",
10
+ start: "_bozg1b66 _y4ti1b66 _mkrz1f6o",
11
+ end: "_y4ti1b66 _mkrz1gdk",
12
+ wrapping: "_1i4qfg65 _o5724jg8",
13
+ text: "_1i4qfg65"
14
+ };
15
+ export var SkillTag = function SkillTag(_ref) {
16
+ var slug = _ref.slug,
17
+ _ref$isDisabled = _ref.isDisabled,
18
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled;
19
+ return /*#__PURE__*/React.createElement(Box, {
20
+ as: "span",
21
+ xcss: styles.wrapping
22
+ }, /*#__PURE__*/React.createElement(Text, {
23
+ color: isDisabled ? 'color.text.disabled' : 'color.text',
24
+ xcss: styles.text
25
+ }, /*#__PURE__*/React.createElement(Box, {
26
+ as: "span",
27
+ xcss: cx(styles.highlight, styles.start)
28
+ }, /*#__PURE__*/React.createElement(Text, {
29
+ color: isDisabled ? 'color.text.disabled' : 'color.text.subtle'
30
+ }, "/")), /*#__PURE__*/React.createElement(Box, {
31
+ as: "span",
32
+ xcss: styles.highlight
33
+ }, slug.slice(0, -1)), slug && /*#__PURE__*/React.createElement(Box, {
34
+ as: "span",
35
+ xcss: cx(styles.highlight, styles.end)
36
+ }, slug.slice(-1))));
37
+ };
@@ -39,12 +39,10 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
39
39
  *
40
40
  * If you are updating this, please also update the above files.
41
41
  *
42
- * @deprecated This Emotion-based style function is being phased out as part of the
43
- * `platform_editor_core_static_css` experiment migration to Compiled CSS. While the experiment
44
- * is running, any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
42
+ * @deprecated This Emotion-based style function is being phased out in favor of Compiled CSS.
43
+ * Any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
45
44
  * (look for `tableSharedStyle`, `tableSharedStyle_with_*`, `tableSharedStyle_without_*` entries
46
- * in the `editorContentStyles` cssMap). Failure to do so will cause visual regressions when the
47
- * compiled version is active.
45
+ * in the `editorContentStyles` cssMap) to keep the shared styles consistent.
48
46
  */
49
47
  var tableSharedStyle = function tableSharedStyle() {
50
48
  var browser = getBrowserInfo();
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags/fg';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "128.0.1";
24
+ var packageVersion = "128.1.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -15,6 +15,7 @@ export type MenuItem = {
15
15
  key: string;
16
16
  keywords: string[];
17
17
  lozenge?: ReactNode;
18
+ moduleKey?: string;
18
19
  node: ADFEntity | ExtensionModuleActionHandler;
19
20
  preview?: QuickInsertPreview;
20
21
  priority?: number;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import type { QuickInsertMenuItemProps } from './QuickInsertMenuItem';
3
- export declare const CompactQuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, preview, previewImageUrls, shortcut, shouldShowPreview, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
3
+ export declare const CompactQuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, preview, previewIcon, previewImageUrls, shortcut, titleContent, shouldShowPreview, shouldClampPreview, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
@@ -4,4 +4,4 @@
4
4
  */
5
5
  import React from 'react';
6
6
  import type { QuickInsertMenuItemProps } from './QuickInsertMenuItem';
7
- export declare const ElementBrowserQuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, shortcut, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
7
+ export declare const ElementBrowserQuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, shortcut, titleContent, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
@@ -1,10 +1,18 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ * @jsxFrag React.Fragment
5
+ */
6
+ import React, { type ReactNode } from 'react';
1
7
  import type { QuickInsertPreview } from './preview';
2
8
  /** The selected item's description and attribution are announced through its aria-describedby. */
3
- export declare const QuickInsertHoverPreview: ({ description, id, preview, popupsMountPoint, referenceElement, title, }: {
9
+ export declare const QuickInsertHoverPreview: ({ description, icon, id, preview, popupsMountPoint, referenceElement, shouldClampText, title, }: {
4
10
  description?: string;
11
+ icon?: ReactNode;
5
12
  id: string;
6
13
  preview: QuickInsertPreview;
7
14
  popupsMountPoint?: HTMLElement;
8
15
  referenceElement: HTMLElement;
16
+ shouldClampText?: boolean;
9
17
  title: string;
10
18
  }) => React.JSX.Element;
@@ -17,15 +17,21 @@ export type QuickInsertMenuItemProps = {
17
17
  onSelect: (context: OnSelectContext) => Transaction | false | void;
18
18
  /** Structured preview content for the selected item. */
19
19
  preview?: QuickInsertPreview;
20
+ /** Icon displayed beside the preview title. */
21
+ previewIcon?: React.ReactNode;
20
22
  /** Retained for existing callers; new callers should pass `preview.image`. */
21
23
  previewImageUrls?: {
22
24
  dark?: string;
23
25
  light: string;
24
26
  } | null;
25
27
  shortcut?: string;
28
+ /** Whether preview title and description are clamped to a fixed number of lines. */
29
+ shouldClampPreview?: boolean;
26
30
  /** Disable previews for navigation actions rather than insertable items. */
27
31
  shouldShowPreview?: boolean;
28
32
  shouldWrapIcon?: boolean;
29
33
  title: string;
34
+ /** Rich title content rendered in place of the menu item title. */
35
+ titleContent?: React.ReactNode;
30
36
  };
31
- export declare const QuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, preview, previewImageUrls, shortcut, shouldShowPreview, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
37
+ export declare const QuickInsertMenuItem: ({ ariaLabel, description, iconBefore, isDisabled, onSelect, preview, previewIcon, previewImageUrls, shortcut, titleContent, shouldShowPreview, shouldClampPreview, shouldWrapIcon, title, }: QuickInsertMenuItemProps) => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export type SkillTagProps = {
3
+ isDisabled?: boolean;
4
+ slug: string;
5
+ };
6
+ export declare const SkillTag: ({ slug, isDisabled }: SkillTagProps) => React.JSX.Element;
@@ -17,12 +17,10 @@ export declare const tableControlsSpacing: number;
17
17
  *
18
18
  * If you are updating this, please also update the above files.
19
19
  *
20
- * @deprecated This Emotion-based style function is being phased out as part of the
21
- * `platform_editor_core_static_css` experiment migration to Compiled CSS. While the experiment
22
- * is running, any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
20
+ * @deprecated This Emotion-based style function is being phased out in favor of Compiled CSS.
21
+ * Any changes here MUST also be reflected in `EditorContentContainer-compiled.tsx`
23
22
  * (look for `tableSharedStyle`, `tableSharedStyle_with_*`, `tableSharedStyle_without_*` entries
24
- * in the `editorContentStyles` cssMap). Failure to do so will cause visual regressions when the
25
- * compiled version is active.
23
+ * in the `editorContentStyles` cssMap) to keep the shared styles consistent.
26
24
  */
27
25
  declare const tableSharedStyle: () => SerializedStyles;
28
26
  export { tableSharedStyle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "128.1.0",
3
+ "version": "128.2.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/activity-provider": "^3.1.0",
32
32
  "@atlaskit/adf-schema": "^57.6.0",
33
33
  "@atlaskit/adf-utils": "^20.9.0",
34
- "@atlaskit/afm-i18n-platform-editor-editor-common": "2.249.0",
34
+ "@atlaskit/afm-i18n-platform-editor-editor-common": "2.270.0",
35
35
  "@atlaskit/analytics-listeners": "^11.4.0",
36
36
  "@atlaskit/analytics-namespaced-context": "^8.2.0",
37
37
  "@atlaskit/analytics-next": "^12.5.0",
@@ -50,7 +50,7 @@
50
50
  "@atlaskit/editor-toolbar": "^2.8.0",
51
51
  "@atlaskit/editor-toolbar-model": "^1.2.0",
52
52
  "@atlaskit/editor-ui-control-model": "^2.10.0",
53
- "@atlaskit/emoji": "^72.4.0",
53
+ "@atlaskit/emoji": "^72.5.0",
54
54
  "@atlaskit/feature-gate-js-client": "^7.0.0",
55
55
  "@atlaskit/icon": "^38.0.0",
56
56
  "@atlaskit/link": "^5.1.0",
@@ -58,14 +58,14 @@
58
58
  "@atlaskit/link-picker": "^6.11.0",
59
59
  "@atlaskit/logo": "^23.3.0",
60
60
  "@atlaskit/media-card": "^82.1.0",
61
- "@atlaskit/media-client": "^39.0.0",
61
+ "@atlaskit/media-client": "^39.1.0",
62
62
  "@atlaskit/media-client-react": "^7.0.0",
63
63
  "@atlaskit/media-common": "^14.6.0",
64
64
  "@atlaskit/media-file-preview": "^2.0.0",
65
65
  "@atlaskit/media-picker": "^73.0.0",
66
- "@atlaskit/media-ui": "^31.0.0",
67
- "@atlaskit/media-viewer": "^54.10.0",
68
- "@atlaskit/mention": "^30.0.0",
66
+ "@atlaskit/media-ui": "^31.2.0",
67
+ "@atlaskit/media-viewer": "^54.11.0",
68
+ "@atlaskit/mention": "^30.1.0",
69
69
  "@atlaskit/menu": "^11.0.0",
70
70
  "@atlaskit/object": "^2.3.0",
71
71
  "@atlaskit/onboarding": "^15.4.0",
@@ -82,11 +82,11 @@
82
82
  "@atlaskit/smart-card": "^46.4.0",
83
83
  "@atlaskit/smart-user-picker": "^12.2.0",
84
84
  "@atlaskit/spinner": "^20.4.0",
85
- "@atlaskit/task-decision": "^21.11.0",
85
+ "@atlaskit/task-decision": "^21.12.0",
86
86
  "@atlaskit/teams-app-config": "^3.1.0",
87
87
  "@atlaskit/textfield": "^10.2.0",
88
88
  "@atlaskit/tmp-editor-statsig": "^221.0.0",
89
- "@atlaskit/tokens": "^20.1.0",
89
+ "@atlaskit/tokens": "^20.2.0",
90
90
  "@atlaskit/tooltip": "^24.4.0",
91
91
  "@atlaskit/width-detector": "^7.2.0",
92
92
  "@babel/runtime": "^7.0.0",
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/quick-insert/skill-tag",
3
+ "main": "../../dist/cjs/quick-insert/SkillTag.js",
4
+ "module": "../../dist/esm/quick-insert/SkillTag.js",
5
+ "module:es2019": "../../dist/es2019/quick-insert/SkillTag.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/quick-insert/SkillTag.d.ts"
10
+ }