@atlaskit/editor-common 131.1.1 → 131.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/extensions/buildMenuItem.js +3 -1
  3. package/dist/cjs/monitoring/error.js +1 -1
  4. package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.js +9 -3
  5. package/dist/cjs/quick-insert/ElementBrowserQuickInsertMenuItem.js +11 -6
  6. package/dist/cjs/quick-insert/QuickInsertHoverPreview.js +5 -2
  7. package/dist/cjs/quick-insert/QuickInsertMenuItem.js +3 -0
  8. package/dist/cjs/quick-insert/SkillTag.compiled.css +28 -4
  9. package/dist/cjs/quick-insert/SkillTag.js +98 -29
  10. package/dist/cjs/quick-insert/attribution-icons/assets.js +18 -0
  11. package/dist/cjs/quick-insert/attribution-icons/feedback.js +18 -0
  12. package/dist/cjs/quick-insert/attribution-icons/focus.js +18 -0
  13. package/dist/cjs/quick-insert/attribution-icons/studio.js +18 -0
  14. package/dist/cjs/quick-insert/attribution-icons/talent.js +18 -0
  15. package/dist/cjs/quick-insert/attribution-icons/trello.js +18 -0
  16. package/dist/cjs/quick-insert/messages.js +25 -0
  17. package/dist/cjs/ui/DropList/index.js +1 -1
  18. package/dist/es2019/extensions/buildMenuItem.js +3 -0
  19. package/dist/es2019/monitoring/error.js +1 -1
  20. package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.js +9 -3
  21. package/dist/es2019/quick-insert/ElementBrowserQuickInsertMenuItem.js +11 -6
  22. package/dist/es2019/quick-insert/QuickInsertHoverPreview.js +5 -2
  23. package/dist/es2019/quick-insert/QuickInsertMenuItem.js +3 -0
  24. package/dist/es2019/quick-insert/SkillTag.compiled.css +28 -4
  25. package/dist/es2019/quick-insert/SkillTag.js +93 -25
  26. package/dist/es2019/quick-insert/attribution-icons/assets.js +10 -0
  27. package/dist/es2019/quick-insert/attribution-icons/feedback.js +10 -0
  28. package/dist/es2019/quick-insert/attribution-icons/focus.js +10 -0
  29. package/dist/es2019/quick-insert/attribution-icons/studio.js +10 -0
  30. package/dist/es2019/quick-insert/attribution-icons/talent.js +10 -0
  31. package/dist/es2019/quick-insert/attribution-icons/trello.js +10 -0
  32. package/dist/es2019/quick-insert/messages.js +25 -0
  33. package/dist/es2019/ui/DropList/index.js +1 -1
  34. package/dist/esm/extensions/buildMenuItem.js +3 -1
  35. package/dist/esm/monitoring/error.js +1 -1
  36. package/dist/esm/quick-insert/CompactQuickInsertMenuItem.js +9 -3
  37. package/dist/esm/quick-insert/ElementBrowserQuickInsertMenuItem.js +11 -6
  38. package/dist/esm/quick-insert/QuickInsertHoverPreview.js +5 -2
  39. package/dist/esm/quick-insert/QuickInsertMenuItem.js +3 -0
  40. package/dist/esm/quick-insert/SkillTag.compiled.css +28 -4
  41. package/dist/esm/quick-insert/SkillTag.js +99 -29
  42. package/dist/esm/quick-insert/attribution-icons/assets.js +12 -0
  43. package/dist/esm/quick-insert/attribution-icons/feedback.js +12 -0
  44. package/dist/esm/quick-insert/attribution-icons/focus.js +12 -0
  45. package/dist/esm/quick-insert/attribution-icons/studio.js +12 -0
  46. package/dist/esm/quick-insert/attribution-icons/talent.js +12 -0
  47. package/dist/esm/quick-insert/attribution-icons/trello.js +12 -0
  48. package/dist/esm/quick-insert/messages.js +25 -0
  49. package/dist/esm/ui/DropList/index.js +1 -1
  50. package/dist/types/extensions/types/extension-manifest.d.ts +1 -0
  51. package/dist/types/extensions/types/utils.d.ts +3 -0
  52. package/dist/types/quick-insert/CompactQuickInsertMenuItem.d.ts +1 -1
  53. package/dist/types/quick-insert/ElementBrowserQuickInsertMenuItem.d.ts +1 -1
  54. package/dist/types/quick-insert/QuickInsertHoverPreview.d.ts +4 -2
  55. package/dist/types/quick-insert/QuickInsertMenuItem.d.ts +4 -2
  56. package/dist/types/quick-insert/SkillTag.d.ts +10 -1
  57. package/dist/types/quick-insert/attribution-icons/assets.d.ts +3 -0
  58. package/dist/types/quick-insert/attribution-icons/feedback.d.ts +3 -0
  59. package/dist/types/quick-insert/attribution-icons/focus.d.ts +3 -0
  60. package/dist/types/quick-insert/attribution-icons/studio.d.ts +3 -0
  61. package/dist/types/quick-insert/attribution-icons/talent.d.ts +3 -0
  62. package/dist/types/quick-insert/attribution-icons/trello.d.ts +3 -0
  63. package/dist/types/quick-insert/messages.d.ts +1 -1
  64. package/package.json +3 -3
  65. package/quick-insert/assets-attribution-icon/package.json +10 -0
  66. package/quick-insert/confluence-attribution-icon/package.json +4 -4
  67. package/quick-insert/feedback-attribution-icon/package.json +10 -0
  68. package/quick-insert/focus-attribution-icon/package.json +10 -0
  69. package/quick-insert/jira-attribution-icon/package.json +4 -4
  70. package/quick-insert/jira-service-management-attribution-icon/package.json +4 -4
  71. package/quick-insert/studio-attribution-icon/package.json +10 -0
  72. package/quick-insert/talent-attribution-icon/package.json +10 -0
  73. package/quick-insert/trello-attribution-icon/package.json +10 -0
  74. /package/dist/cjs/quick-insert/{confluence-attribution-icon.js → attribution-icons/confluence.js} +0 -0
  75. /package/dist/cjs/quick-insert/{jira-service-management-attribution-icon.js → attribution-icons/jira-service-management.js} +0 -0
  76. /package/dist/cjs/quick-insert/{jira-attribution-icon.js → attribution-icons/jira.js} +0 -0
  77. /package/dist/es2019/quick-insert/{confluence-attribution-icon.js → attribution-icons/confluence.js} +0 -0
  78. /package/dist/es2019/quick-insert/{jira-service-management-attribution-icon.js → attribution-icons/jira-service-management.js} +0 -0
  79. /package/dist/es2019/quick-insert/{jira-attribution-icon.js → attribution-icons/jira.js} +0 -0
  80. /package/dist/esm/quick-insert/{confluence-attribution-icon.js → attribution-icons/confluence.js} +0 -0
  81. /package/dist/esm/quick-insert/{jira-service-management-attribution-icon.js → attribution-icons/jira-service-management.js} +0 -0
  82. /package/dist/esm/quick-insert/{jira-attribution-icon.js → attribution-icons/jira.js} +0 -0
  83. /package/dist/types/quick-insert/{confluence-attribution-icon.d.ts → attribution-icons/confluence.d.ts} +0 -0
  84. /package/dist/types/quick-insert/{jira-service-management-attribution-icon.d.ts → attribution-icons/jira-service-management.d.ts} +0 -0
  85. /package/dist/types/quick-insert/{jira-attribution-icon.d.ts → attribution-icons/jira.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 131.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 131.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`60b0351aac27d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/60b0351aac27d) -
14
+ Standardise Rovo Skill tags in the slash command menu behind platform_editor_slash_command:
15
+ rebuild SkillTag to the Skill Tag design with a skill-coloured slash, add a SkillTag color prop,
16
+ copy quick insert module parameters onto menu items, add a lozenge prop for Quick Insert menu
17
+ items, and add Talent, Studio, Assets, Focus, Trello and Feedback attribution icons.
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 131.1.1
4
24
 
5
25
  ### Patch Changes
@@ -20,7 +20,7 @@ function buildMenuItem(manifest, extensionModule) {
20
20
  if (!node) {
21
21
  throw new Error("Couldn't find any action for ".concat(title, " (").concat(key, ")"));
22
22
  }
23
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
23
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
24
24
  app: (_ref = (_extensionModule$app = extensionModule.app) !== null && _extensionModule$app !== void 0 ? _extensionModule$app : manifest.app) !== null && _ref !== void 0 ? _ref : {
25
25
  key: manifest.key
26
26
  },
@@ -43,6 +43,8 @@ function buildMenuItem(manifest, extensionModule) {
43
43
  preview: preview
44
44
  }), extensionModule.lozenge != null && {
45
45
  lozenge: extensionModule.lozenge
46
+ }), extensionModule.parameters && {
47
+ parameters: extensionModule.parameters
46
48
  }), {}, {
47
49
  icon: extensionModule.icon || manifest.icons['48']
48
50
  }, extensionModule.isHidden ? {
@@ -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 = "131.1.0";
30
+ var packageVersion = "131.2.0";
31
31
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
32
32
  // Remove URL as it has UGC
33
33
  // Ignored via go/ees007
@@ -98,6 +98,7 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
98
98
  description = _ref.description,
99
99
  iconBefore = _ref.iconBefore,
100
100
  isDisabled = _ref.isDisabled,
101
+ lozenge = _ref.lozenge,
101
102
  onSelect = _ref.onSelect,
102
103
  preview = _ref.preview,
103
104
  previewIcon = _ref.previewIcon,
@@ -137,6 +138,9 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
137
138
  var hasAccessiblePreview = Boolean(resolvedDescription || (resolvedPreview === null || resolvedPreview === void 0 ? void 0 : resolvedPreview.attribution));
138
139
  var previewAttributionName = (_resolvedPreview$attr = resolvedPreview.attribution) === null || _resolvedPreview$attr === void 0 ? void 0 : _resolvedPreview$attr.name;
139
140
  var previewAttributionKey = typeof previewAttributionName === 'string' ? previewAttributionName : previewAttributionName === null || previewAttributionName === void 0 ? void 0 : previewAttributionName.id;
141
+ var rowTitle = titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/_react.default.createElement(_text.Text, {
142
+ color: isDisabled ? 'color.text.disabled' : 'color.text'
143
+ }, title);
140
144
  var wrappedIcon = iconBefore && shouldWrapIcon ? /*#__PURE__*/_react.default.createElement(_box.Box, {
141
145
  xcss: styles.iconLarge
142
146
  }, iconBefore) : iconBefore;
@@ -158,9 +162,10 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
158
162
  alignBlock: "center",
159
163
  spread: "space-between",
160
164
  xcss: styles.content
161
- }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/_react.default.createElement(_text.Text, {
162
- color: isDisabled ? 'color.text.disabled' : 'color.text'
163
- }, title), shortcut && /*#__PURE__*/_react.default.createElement(_box.Box, {
165
+ }, lozenge ? /*#__PURE__*/_react.default.createElement(_inline.Inline, {
166
+ alignBlock: "center",
167
+ space: "space.100"
168
+ }, rowTitle, lozenge) : rowTitle, shortcut && /*#__PURE__*/_react.default.createElement(_box.Box, {
164
169
  as: "span",
165
170
  xcss: styles.shortcut
166
171
  }, shortcut))), shouldRenderPreview && referenceElement && /*#__PURE__*/_react.default.createElement(_QuickInsertHoverPreview.QuickInsertHoverPreview, {
@@ -171,6 +176,7 @@ var CompactQuickInsertMenuItem = exports.CompactQuickInsertMenuItem = function C
171
176
  popupsMountPoint: popupsMountPoint,
172
177
  referenceElement: referenceElement,
173
178
  title: title,
179
+ titleContent: titleContent,
174
180
  icon: previewIcon,
175
181
  shouldClampText: shouldClampPreview
176
182
  }));
@@ -128,6 +128,7 @@ var ElementBrowserQuickInsertMenuItem = exports.ElementBrowserQuickInsertMenuIte
128
128
  description = _ref.description,
129
129
  iconBefore = _ref.iconBefore,
130
130
  isDisabled = _ref.isDisabled,
131
+ lozenge = _ref.lozenge,
131
132
  onSelect = _ref.onSelect,
132
133
  shortcut = _ref.shortcut,
133
134
  titleContent = _ref.titleContent,
@@ -147,6 +148,12 @@ var ElementBrowserQuickInsertMenuItem = exports.ElementBrowserQuickInsertMenuIte
147
148
  var itemStyles = (0, _react.useMemo)(function () {
148
149
  return [isDisabled ? borderlessDisabledItemStyles : isSelected ? borderlessSelectedItemStyles : borderlessItemStyles, (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_command') && !isDisabled && !isSelected && hoveredItemStyles];
149
150
  }, [isDisabled, isSelected]);
151
+ var itemTitle = titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/_react.default.createElement(_text.Text, {
152
+ color: isDisabled ? 'color.text.disabled' : 'color.text',
153
+ maxLines: 1,
154
+ size: "medium",
155
+ weight: "medium"
156
+ }, title);
150
157
 
151
158
  // Disabled items keep the dimmed colour inherited from the item.
152
159
  var icon = iconBefore ? /*#__PURE__*/_react.default.createElement("span", {
@@ -172,12 +179,10 @@ var ElementBrowserQuickInsertMenuItem = exports.ElementBrowserQuickInsertMenuIte
172
179
  alignBlock: "center",
173
180
  spread: "space-between",
174
181
  space: "space.100"
175
- }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/_react.default.createElement(_text.Text, {
176
- color: isDisabled ? 'color.text.disabled' : 'color.text',
177
- maxLines: 1,
178
- size: "medium",
179
- weight: "medium"
180
- }, title), shortcut && /*#__PURE__*/_react.default.createElement(_box.Box, {
182
+ }, lozenge ? /*#__PURE__*/_react.default.createElement(_inline.Inline, {
183
+ alignBlock: "center",
184
+ space: "space.100"
185
+ }, itemTitle, lozenge) : itemTitle, shortcut && /*#__PURE__*/_react.default.createElement(_box.Box, {
181
186
  as: "span",
182
187
  xcss: shortcutStyles
183
188
  }, shortcut)), itemDescription && /*#__PURE__*/_react.default.createElement(_text.Text, {
@@ -78,7 +78,8 @@ var QuickInsertHoverPreview = exports.QuickInsertHoverPreview = function QuickIn
78
78
  referenceElement = _ref.referenceElement,
79
79
  _ref$shouldClampText = _ref.shouldClampText,
80
80
  shouldClampText = _ref$shouldClampText === void 0 ? true : _ref$shouldClampText,
81
- title = _ref.title;
81
+ title = _ref.title,
82
+ titleContent = _ref.titleContent;
82
83
  var _useThemeObserver = (0, _useThemeObserver2.useThemeObserver)(),
83
84
  colorMode = _useThemeObserver.colorMode;
84
85
  var imageUrl = preview.image ? colorMode === 'dark' && preview.image.dark ? preview.image.dark : preview.image.light : undefined;
@@ -107,6 +108,7 @@ var QuickInsertHoverPreview = exports.QuickInsertHoverPreview = function QuickIn
107
108
  referenceElement: referenceElement,
108
109
  shouldClampText: shouldClampText,
109
110
  title: title,
111
+ titleContent: titleContent,
110
112
  update: update
111
113
  }));
112
114
  }), portalTarget);
@@ -122,6 +124,7 @@ var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
122
124
  referenceElement = _ref3.referenceElement,
123
125
  shouldClampText = _ref3.shouldClampText,
124
126
  title = _ref3.title,
127
+ titleContent = _ref3.titleContent,
125
128
  update = _ref3.update;
126
129
  var _useIntl = (0, _reactIntl.useIntl)(),
127
130
  formatMessage = _useIntl.formatMessage;
@@ -183,7 +186,7 @@ var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
183
186
  xcss: layoutStyles.titleIcon
184
187
  }, icon), /*#__PURE__*/_react.default.createElement("span", {
185
188
  className: (0, _runtime.ax)([shouldClampText && styles.title, !shouldClampText && styles.unclampedTitle])
186
- }, title)), description && /*#__PURE__*/_react.default.createElement("div", {
189
+ }, titleContent !== null && titleContent !== void 0 ? titleContent : title)), description && /*#__PURE__*/_react.default.createElement("div", {
187
190
  className: (0, _runtime.ax)([shouldClampText && styles.description, !shouldClampText && styles.unclampedDescription])
188
191
  }, description), preview.attribution && /*#__PURE__*/_react.default.createElement("div", {
189
192
  className: (0, _runtime.ax)([styles.attribution, shouldClampText && styles.compactAttribution])
@@ -14,6 +14,7 @@ var QuickInsertMenuItem = exports.QuickInsertMenuItem = function QuickInsertMenu
14
14
  description = _ref.description,
15
15
  iconBefore = _ref.iconBefore,
16
16
  isDisabled = _ref.isDisabled,
17
+ lozenge = _ref.lozenge,
17
18
  onSelect = _ref.onSelect,
18
19
  preview = _ref.preview,
19
20
  previewIcon = _ref.previewIcon,
@@ -31,6 +32,7 @@ var QuickInsertMenuItem = exports.QuickInsertMenuItem = function QuickInsertMenu
31
32
  description: description,
32
33
  iconBefore: iconBefore,
33
34
  isDisabled: isDisabled,
35
+ lozenge: lozenge,
34
36
  onSelect: onSelect,
35
37
  shortcut: shortcut,
36
38
  titleContent: titleContent,
@@ -41,6 +43,7 @@ var QuickInsertMenuItem = exports.QuickInsertMenuItem = function QuickInsertMenu
41
43
  description: description,
42
44
  iconBefore: iconBefore,
43
45
  isDisabled: isDisabled,
46
+ lozenge: lozenge,
44
47
  onSelect: onSelect,
45
48
  preview: preview,
46
49
  previewIcon: previewIcon,
@@ -1,9 +1,33 @@
1
+ ._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
+ ._152tze3t{inset-block-start:var(--ds-space-0,0)}
1
3
  ._16d9qvcn{-webkit-box-decoration-break:clone;box-decoration-break:clone}
4
+ ._1bsb1osq{width:100%}
5
+ ._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
2
6
  ._1e0c1nu9{display:inline}
3
7
  ._1i4qfg65{overflow-wrap:anywhere}
8
+ ._4t3i1osq{height:100%}
9
+ ._bfhk187o{background-color:var(--ds-background-disabled,#0515240f)}
4
10
  ._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%)}
11
+ ._bozgu2gc{padding-inline-start:var(--ds-space-100,8px)}
12
+ ._bozgv77o{padding-inline-start:var(--ds-space-025,2px)}
13
+ ._kqswh2mm{position:relative}
14
+ ._kqswstnw{position:absolute}
15
+ ._lswu16y8{fill:var(--ds-border-accent-red,#e2483d)}
16
+ ._lswu187o{fill:var(--ds-background-disabled,#0515240f)}
17
+ ._lswu1b2s{fill:var(--ds-border-accent-orange,#e06c00)}
18
+ ._lswu1crs{fill:var(--ds-border-accent-green,#22a06b)}
19
+ ._lswu1h3o{fill:var(--ds-border-accent-teal,#2898bd)}
20
+ ._lswu1hqq{fill:var(--ds-border-accent-purple,#af59e1)}
21
+ ._lswu1l7x{fill:var(--ds-border,#0b120e24)}
22
+ ._lswu1w55{fill:var(--ds-border-accent-blue,#357de8)}
23
+ ._lswu8yml{fill:var(--ds-border-accent-gray,#7d818a)}
24
+ ._lswubk0g{fill:var(--ds-border-disabled,#0515240f)}
25
+ ._lswufeiv{fill:var(--ds-border-accent-yellow,#b38600)}
26
+ ._lswui8nm{fill:var(--ds-background-neutral,#0515240f)}
27
+ ._lswunf89{fill:var(--ds-border-accent-lime,#6a9a23)}
28
+ ._lswuuwd0{fill:var(--ds-border-accent-magenta,#cd519d)}
29
+ ._o5721q9c{white-space:nowrap}
8
30
  ._o5724jg8{white-space:normal}
9
- ._y4ti1b66{padding-inline-end:var(--ds-space-050,4px)}
31
+ ._syaz1gmx{color:var(--ds-text-disabled,#080f214a)}
32
+ ._syazi7uo{color:var(--ds-text,#292a2e)}
33
+ ._y4tiv77o{padding-inline-end:var(--ds-space-025,2px)}
@@ -9,36 +9,105 @@ exports.SkillTag = void 0;
9
9
  require("./SkillTag.compiled.css");
10
10
  var _runtime = require("@compiled/react/runtime");
11
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");
12
+ // SVG fills use background and border colour tokens, which @atlaskit/css's schema does not allow for `fill`.
13
+
14
+ // The edges fill the tag background, and the slash is a coloured stripe over the start edge.
15
+ var START_EDGE_PATH = 'M4.88566 1.4253C5.13945 0.579336 5.91809 0 6.80131 0H7.31325V20H2.00131C0.661586 20 -0.299308 18.7085 0.0856588 17.4253L4.88566 1.4253Z';
16
+ var END_EDGE_PATH = 'M4.39518 1.91565C4.73628 0.778646 5.78281 0 6.96988 0V20H3.00197C0.99238 20 -0.448963 18.0628 0.128488 16.138L4.39518 1.91565Z';
17
+ var SLASH_PATH = 'M5.06145 1.4253C5.31524 0.579336 6.09388 0 6.9771 0H7.48904L1.48904 20C0.49224 20 -0.222695 19.0391 0.0637328 18.0843L5.06145 1.4253Z';
15
18
  var styles = {
19
+ tag: "_1e0c1nu9 _1i4qfg65 _o5724jg8",
20
+ text: "_11c8fhey _syazi7uo",
21
+ textDisabled: "_syaz1gmx",
22
+ noWrap: "_o5721q9c",
16
23
  highlight: "_bfhki8nm _16d9qvcn _1e0c1nu9",
17
- start: "_bozg1b66 _y4ti1b66 _mkrz1f6o",
18
- end: "_y4ti1b66 _mkrz1gdk",
19
- wrapping: "_1i4qfg65 _o5724jg8",
20
- text: "_1i4qfg65"
24
+ highlightDisabled: "_bfhk187o",
25
+ highlightStart: "_bozgv77o",
26
+ highlightEnd: "_y4tiv77o",
27
+ edge: "_1e0c1nu9 _bozgu2gc _kqswh2mm",
28
+ edgeShape: "_4t3i1osq _152tze3t _1e02ze3t _kqswstnw _1bsb1osq"
29
+ };
30
+ var fillStyles = {
31
+ edge: "_lswui8nm",
32
+ edgeDisabled: "_lswu187o",
33
+ slashDisabled: "_lswubk0g"
34
+ };
35
+ var slashColorStyles = {
36
+ LIME: "_lswunf89",
37
+ RED: "_lswu16y8",
38
+ ORANGE: "_lswu1b2s",
39
+ YELLOW: "_lswufeiv",
40
+ GREEN: "_lswu1crs",
41
+ TEAL: "_lswu1h3o",
42
+ BLUE: "_lswu1w55",
43
+ PURPLE: "_lswu1hqq",
44
+ MAGENTA: "_lswuuwd0",
45
+ GRAY: "_lswu8yml",
46
+ DEFAULT: "_lswu1l7x"
47
+ };
48
+ var SKILL_TAG_COLORS = ['LIME', 'RED', 'ORANGE', 'YELLOW', 'GREEN', 'TEAL', 'BLUE', 'PURPLE', 'MAGENTA', 'GRAY', 'DEFAULT'];
49
+ var isSkillTagColor = function isSkillTagColor(color) {
50
+ return SKILL_TAG_COLORS.includes(color);
51
+ };
52
+ var Edge = function Edge(_ref) {
53
+ var children = _ref.children,
54
+ isDisabled = _ref.isDisabled;
55
+ return /*#__PURE__*/_react.default.createElement("span", {
56
+ "aria-hidden": "true",
57
+ className: (0, _runtime.ax)([styles.edge])
58
+ }, /*#__PURE__*/_react.default.createElement("svg", {
59
+ focusable: "false",
60
+ preserveAspectRatio: "none",
61
+ viewBox: "0 0 8 20",
62
+ className: (0, _runtime.ax)([styles.edgeShape, fillStyles.edge, isDisabled && fillStyles.edgeDisabled])
63
+ }, children));
64
+ };
65
+ var Highlight = function Highlight(_ref2) {
66
+ var children = _ref2.children,
67
+ isDisabled = _ref2.isDisabled,
68
+ side = _ref2.side;
69
+ return /*#__PURE__*/_react.default.createElement("span", {
70
+ className: (0, _runtime.ax)([styles.highlight, isDisabled && styles.highlightDisabled, side === 'start' && styles.highlightStart, side === 'end' && styles.highlightEnd])
71
+ }, children);
21
72
  };
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))));
73
+ var SkillTag = exports.SkillTag = function SkillTag(_ref3) {
74
+ var color = _ref3.color,
75
+ slug = _ref3.slug,
76
+ _ref3$isDisabled = _ref3.isDisabled,
77
+ isDisabled = _ref3$isDisabled === void 0 ? false : _ref3$isDisabled;
78
+ var slashColor = isSkillTagColor(color) ? color : 'DEFAULT';
79
+ // The first and last characters share a no-wrap span with the edge beside them, so a long slug
80
+ // can wrap without leaving an edge alone at the start or end of a line.
81
+ var firstCharacter = slug.slice(0, 1);
82
+ var middleCharacters = slug.slice(1, -1);
83
+ var lastCharacter = slug.slice(1).slice(-1);
84
+ return /*#__PURE__*/_react.default.createElement("span", {
85
+ className: (0, _runtime.ax)([styles.tag, styles.text, isDisabled && styles.textDisabled])
86
+ }, /*#__PURE__*/_react.default.createElement("span", {
87
+ className: (0, _runtime.ax)([styles.noWrap])
88
+ }, /*#__PURE__*/_react.default.createElement(Edge, {
89
+ isDisabled: isDisabled
90
+ }, /*#__PURE__*/_react.default.createElement("path", {
91
+ d: START_EDGE_PATH,
92
+ transform: "translate(0.686 0)"
93
+ }), /*#__PURE__*/_react.default.createElement("path", {
94
+ d: SLASH_PATH,
95
+ transform: "translate(0.511 0)",
96
+ className: (0, _runtime.ax)([slashColorStyles[slashColor], isDisabled && fillStyles.slashDisabled])
97
+ })), /*#__PURE__*/_react.default.createElement(Highlight, {
98
+ isDisabled: isDisabled,
99
+ side: "start"
100
+ }, firstCharacter)), middleCharacters && /*#__PURE__*/_react.default.createElement(Highlight, {
101
+ isDisabled: isDisabled
102
+ }, middleCharacters), /*#__PURE__*/_react.default.createElement("span", {
103
+ className: (0, _runtime.ax)([styles.noWrap])
104
+ }, /*#__PURE__*/_react.default.createElement(Highlight, {
105
+ isDisabled: isDisabled,
106
+ side: "end"
107
+ }, lastCharacter), /*#__PURE__*/_react.default.createElement(Edge, {
108
+ isDisabled: isDisabled
109
+ }, /*#__PURE__*/_react.default.createElement("path", {
110
+ d: END_EDGE_PATH,
111
+ transform: "rotate(180 4 10) translate(1.03 0)"
112
+ }))));
44
113
  };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.AssetsAttributionIcon = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _rawIcons = require("@atlaskit/logo/raw-icons");
10
+ /** Decorative product icon accompanying the localized Assets attribution name. */
11
+ var AssetsAttributionIcon = exports.AssetsAttributionIcon = function AssetsAttributionIcon() {
12
+ return /*#__PURE__*/_react.default.createElement("img", {
13
+ src: _rawIcons.assetsIcon,
14
+ alt: "",
15
+ width: 16,
16
+ height: 16
17
+ });
18
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.FeedbackAttributionIcon = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _rawIcons = require("@atlaskit/logo/raw-icons");
10
+ /** Decorative product icon accompanying the localized Feedback attribution name. */
11
+ var FeedbackAttributionIcon = exports.FeedbackAttributionIcon = function FeedbackAttributionIcon() {
12
+ return /*#__PURE__*/_react.default.createElement("img", {
13
+ src: _rawIcons.feedbackIcon,
14
+ alt: "",
15
+ width: 16,
16
+ height: 16
17
+ });
18
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.FocusAttributionIcon = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _rawIcons = require("@atlaskit/logo/raw-icons");
10
+ /** Decorative product icon accompanying the localized Focus attribution name. */
11
+ var FocusAttributionIcon = exports.FocusAttributionIcon = function FocusAttributionIcon() {
12
+ return /*#__PURE__*/_react.default.createElement("img", {
13
+ src: _rawIcons.focusIcon,
14
+ alt: "",
15
+ width: 16,
16
+ height: 16
17
+ });
18
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.StudioAttributionIcon = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _rawIcons = require("@atlaskit/logo/raw-icons");
10
+ /** Decorative product icon accompanying the localized Studio attribution name. */
11
+ var StudioAttributionIcon = exports.StudioAttributionIcon = function StudioAttributionIcon() {
12
+ return /*#__PURE__*/_react.default.createElement("img", {
13
+ src: _rawIcons.studioIcon,
14
+ alt: "",
15
+ width: 16,
16
+ height: 16
17
+ });
18
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.TalentAttributionIcon = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _rawIcons = require("@atlaskit/logo/raw-icons");
10
+ /** Decorative product icon accompanying the localized Talent attribution name. */
11
+ var TalentAttributionIcon = exports.TalentAttributionIcon = function TalentAttributionIcon() {
12
+ return /*#__PURE__*/_react.default.createElement("img", {
13
+ src: _rawIcons.talentIcon,
14
+ alt: "",
15
+ width: 16,
16
+ height: 16
17
+ });
18
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.TrelloAttributionIcon = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _rawIcons = require("@atlaskit/logo/raw-icons");
10
+ /** Decorative product icon accompanying the localized Trello attribution name. */
11
+ var TrelloAttributionIcon = exports.TrelloAttributionIcon = function TrelloAttributionIcon() {
12
+ return /*#__PURE__*/_react.default.createElement("img", {
13
+ src: _rawIcons.trelloIcon,
14
+ alt: "",
15
+ width: 16,
16
+ height: 16
17
+ });
18
+ };
@@ -176,6 +176,31 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
176
176
  defaultMessage: 'Jira Service Management',
177
177
  description: 'Jira Service Management product name shown as the creator in a slash-command preview attribution.'
178
178
  },
179
+ previewAttributionTalent: {
180
+ id: 'editor-common.quick-insert.previewAttributionTalent.ai-non-final',
181
+ defaultMessage: 'Talent',
182
+ description: 'Talent product name shown as the creator in a slash-command preview attribution.'
183
+ },
184
+ previewAttributionStudio: {
185
+ id: 'editor-common.quick-insert.previewAttributionStudio.ai-non-final',
186
+ defaultMessage: 'Studio',
187
+ description: 'Studio product name shown as the creator in a slash-command preview attribution.'
188
+ },
189
+ previewAttributionFocus: {
190
+ id: 'editor-common.quick-insert.previewAttributionFocus.ai-non-final',
191
+ defaultMessage: 'Focus',
192
+ description: 'Focus product name shown as the creator in a slash-command preview attribution.'
193
+ },
194
+ previewAttributionTrello: {
195
+ id: 'editor-common.quick-insert.previewAttributionTrello.ai-non-final',
196
+ defaultMessage: 'Trello',
197
+ description: 'Trello product name shown as the creator in a slash-command preview attribution.'
198
+ },
199
+ previewAttributionFeedback: {
200
+ id: 'editor-common.quick-insert.previewAttributionFeedback.ai-non-final',
201
+ defaultMessage: 'Feedback',
202
+ description: 'Feedback product name shown as the creator in a slash-command preview attribution.'
203
+ },
179
204
  previewAttributionMicrosoft: {
180
205
  id: 'editor-common.quick-insert.previewAttributionMicrosoft.ai-non-final',
181
206
  defaultMessage: 'Microsoft',
@@ -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 = "131.1.0";
27
+ var packageVersion = "131.2.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -37,6 +37,9 @@ export function buildMenuItem(manifest, extensionModule) {
37
37
  ...(extensionModule.lozenge != null && {
38
38
  lozenge: extensionModule.lozenge
39
39
  }),
40
+ ...(extensionModule.parameters && {
41
+ parameters: extensionModule.parameters
42
+ }),
40
43
  icon: extensionModule.icon || manifest.icons['48'],
41
44
  ...(extensionModule.isHidden ? {
42
45
  isHidden: extensionModule.isHidden
@@ -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 = "131.1.0";
16
+ const packageVersion = "131.2.0";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -87,6 +87,7 @@ export const CompactQuickInsertMenuItem = ({
87
87
  description,
88
88
  iconBefore,
89
89
  isDisabled,
90
+ lozenge,
90
91
  onSelect,
91
92
  preview,
92
93
  previewIcon,
@@ -123,6 +124,9 @@ export const CompactQuickInsertMenuItem = ({
123
124
  const hasAccessiblePreview = Boolean(resolvedDescription || (resolvedPreview === null || resolvedPreview === void 0 ? void 0 : resolvedPreview.attribution));
124
125
  const previewAttributionName = (_resolvedPreview$attr = resolvedPreview.attribution) === null || _resolvedPreview$attr === void 0 ? void 0 : _resolvedPreview$attr.name;
125
126
  const previewAttributionKey = typeof previewAttributionName === 'string' ? previewAttributionName : previewAttributionName === null || previewAttributionName === void 0 ? void 0 : previewAttributionName.id;
127
+ const rowTitle = titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/React.createElement(Text, {
128
+ color: isDisabled ? 'color.text.disabled' : 'color.text'
129
+ }, title);
126
130
  const wrappedIcon = iconBefore && shouldWrapIcon ? /*#__PURE__*/React.createElement(Box, {
127
131
  xcss: styles.iconLarge
128
132
  }, iconBefore) : iconBefore;
@@ -144,9 +148,10 @@ export const CompactQuickInsertMenuItem = ({
144
148
  alignBlock: "center",
145
149
  spread: "space-between",
146
150
  xcss: styles.content
147
- }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/React.createElement(Text, {
148
- color: isDisabled ? 'color.text.disabled' : 'color.text'
149
- }, title), shortcut && /*#__PURE__*/React.createElement(Box, {
151
+ }, lozenge ? /*#__PURE__*/React.createElement(Inline, {
152
+ alignBlock: "center",
153
+ space: "space.100"
154
+ }, rowTitle, lozenge) : rowTitle, shortcut && /*#__PURE__*/React.createElement(Box, {
150
155
  as: "span",
151
156
  xcss: styles.shortcut
152
157
  }, shortcut))), shouldRenderPreview && referenceElement && /*#__PURE__*/React.createElement(QuickInsertHoverPreview, {
@@ -157,6 +162,7 @@ export const CompactQuickInsertMenuItem = ({
157
162
  popupsMountPoint: popupsMountPoint,
158
163
  referenceElement: referenceElement,
159
164
  title: title,
165
+ titleContent: titleContent,
160
166
  icon: previewIcon,
161
167
  shouldClampText: shouldClampPreview
162
168
  }));
@@ -120,6 +120,7 @@ export const ElementBrowserQuickInsertMenuItem = ({
120
120
  description,
121
121
  iconBefore,
122
122
  isDisabled,
123
+ lozenge,
123
124
  onSelect,
124
125
  shortcut,
125
126
  titleContent,
@@ -139,6 +140,12 @@ export const ElementBrowserQuickInsertMenuItem = ({
139
140
  const itemDescription = description !== null && description !== void 0 ? description : item === null || item === void 0 ? void 0 : item.description;
140
141
  const handleClick = useQuickInsertMenuItemSelection(onSelect);
141
142
  const itemStyles = useMemo(() => [isDisabled ? borderlessDisabledItemStyles : isSelected ? borderlessSelectedItemStyles : borderlessItemStyles, isExperimentEnabled('platform_editor_slash_command') && !isDisabled && !isSelected && hoveredItemStyles], [isDisabled, isSelected]);
143
+ const itemTitle = titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/React.createElement(Text, {
144
+ color: isDisabled ? 'color.text.disabled' : 'color.text',
145
+ maxLines: 1,
146
+ size: "medium",
147
+ weight: "medium"
148
+ }, title);
142
149
 
143
150
  // Disabled items keep the dimmed colour inherited from the item.
144
151
  const icon = iconBefore ? /*#__PURE__*/React.createElement("span", {
@@ -164,12 +171,10 @@ export const ElementBrowserQuickInsertMenuItem = ({
164
171
  alignBlock: "center",
165
172
  spread: "space-between",
166
173
  space: "space.100"
167
- }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/React.createElement(Text, {
168
- color: isDisabled ? 'color.text.disabled' : 'color.text',
169
- maxLines: 1,
170
- size: "medium",
171
- weight: "medium"
172
- }, title), shortcut && /*#__PURE__*/React.createElement(Box, {
174
+ }, lozenge ? /*#__PURE__*/React.createElement(Inline, {
175
+ alignBlock: "center",
176
+ space: "space.100"
177
+ }, itemTitle, lozenge) : itemTitle, shortcut && /*#__PURE__*/React.createElement(Box, {
173
178
  as: "span",
174
179
  xcss: shortcutStyles
175
180
  }, shortcut)), itemDescription && /*#__PURE__*/React.createElement(Text, {