@atlaskit/editor-common 131.1.0 → 131.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 (92) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/extensibility/Extension/Extension/index.js +2 -23
  3. package/dist/cjs/extensions/buildMenuItem.js +3 -1
  4. package/dist/cjs/monitoring/error.js +1 -1
  5. package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.js +9 -3
  6. package/dist/cjs/quick-insert/ElementBrowserQuickInsertMenuItem.js +11 -6
  7. package/dist/cjs/quick-insert/QuickInsertHoverPreview.js +5 -2
  8. package/dist/cjs/quick-insert/QuickInsertMenuItem.js +3 -0
  9. package/dist/cjs/quick-insert/SkillTag.compiled.css +28 -4
  10. package/dist/cjs/quick-insert/SkillTag.js +98 -29
  11. package/dist/cjs/quick-insert/attribution-icons/assets.js +18 -0
  12. package/dist/cjs/quick-insert/attribution-icons/feedback.js +18 -0
  13. package/dist/cjs/quick-insert/attribution-icons/focus.js +18 -0
  14. package/dist/cjs/quick-insert/attribution-icons/studio.js +18 -0
  15. package/dist/cjs/quick-insert/attribution-icons/talent.js +18 -0
  16. package/dist/cjs/quick-insert/attribution-icons/trello.js +18 -0
  17. package/dist/cjs/quick-insert/messages.js +25 -0
  18. package/dist/cjs/ui/DropList/index.js +1 -1
  19. package/dist/cjs/ui/OverflowShadow/index.js +2 -14
  20. package/dist/es2019/extensibility/Extension/Extension/index.js +2 -21
  21. package/dist/es2019/extensions/buildMenuItem.js +3 -0
  22. package/dist/es2019/monitoring/error.js +1 -1
  23. package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.js +9 -3
  24. package/dist/es2019/quick-insert/ElementBrowserQuickInsertMenuItem.js +11 -6
  25. package/dist/es2019/quick-insert/QuickInsertHoverPreview.js +5 -2
  26. package/dist/es2019/quick-insert/QuickInsertMenuItem.js +3 -0
  27. package/dist/es2019/quick-insert/SkillTag.compiled.css +28 -4
  28. package/dist/es2019/quick-insert/SkillTag.js +93 -25
  29. package/dist/es2019/quick-insert/attribution-icons/assets.js +10 -0
  30. package/dist/es2019/quick-insert/attribution-icons/feedback.js +10 -0
  31. package/dist/es2019/quick-insert/attribution-icons/focus.js +10 -0
  32. package/dist/es2019/quick-insert/attribution-icons/studio.js +10 -0
  33. package/dist/es2019/quick-insert/attribution-icons/talent.js +10 -0
  34. package/dist/es2019/quick-insert/attribution-icons/trello.js +10 -0
  35. package/dist/es2019/quick-insert/messages.js +25 -0
  36. package/dist/es2019/ui/DropList/index.js +1 -1
  37. package/dist/es2019/ui/OverflowShadow/index.js +2 -12
  38. package/dist/esm/extensibility/Extension/Extension/index.js +2 -23
  39. package/dist/esm/extensions/buildMenuItem.js +3 -1
  40. package/dist/esm/monitoring/error.js +1 -1
  41. package/dist/esm/quick-insert/CompactQuickInsertMenuItem.js +9 -3
  42. package/dist/esm/quick-insert/ElementBrowserQuickInsertMenuItem.js +11 -6
  43. package/dist/esm/quick-insert/QuickInsertHoverPreview.js +5 -2
  44. package/dist/esm/quick-insert/QuickInsertMenuItem.js +3 -0
  45. package/dist/esm/quick-insert/SkillTag.compiled.css +28 -4
  46. package/dist/esm/quick-insert/SkillTag.js +99 -29
  47. package/dist/esm/quick-insert/attribution-icons/assets.js +12 -0
  48. package/dist/esm/quick-insert/attribution-icons/feedback.js +12 -0
  49. package/dist/esm/quick-insert/attribution-icons/focus.js +12 -0
  50. package/dist/esm/quick-insert/attribution-icons/studio.js +12 -0
  51. package/dist/esm/quick-insert/attribution-icons/talent.js +12 -0
  52. package/dist/esm/quick-insert/attribution-icons/trello.js +12 -0
  53. package/dist/esm/quick-insert/messages.js +25 -0
  54. package/dist/esm/ui/DropList/index.js +1 -1
  55. package/dist/esm/ui/OverflowShadow/index.js +2 -14
  56. package/dist/types/extensions/types/extension-manifest.d.ts +1 -0
  57. package/dist/types/extensions/types/utils.d.ts +3 -0
  58. package/dist/types/quick-insert/CompactQuickInsertMenuItem.d.ts +1 -1
  59. package/dist/types/quick-insert/ElementBrowserQuickInsertMenuItem.d.ts +1 -1
  60. package/dist/types/quick-insert/QuickInsertHoverPreview.d.ts +4 -2
  61. package/dist/types/quick-insert/QuickInsertMenuItem.d.ts +4 -2
  62. package/dist/types/quick-insert/SkillTag.d.ts +10 -1
  63. package/dist/types/quick-insert/attribution-icons/assets.d.ts +3 -0
  64. package/dist/types/quick-insert/attribution-icons/feedback.d.ts +3 -0
  65. package/dist/types/quick-insert/attribution-icons/focus.d.ts +3 -0
  66. package/dist/types/quick-insert/attribution-icons/studio.d.ts +3 -0
  67. package/dist/types/quick-insert/attribution-icons/talent.d.ts +3 -0
  68. package/dist/types/quick-insert/attribution-icons/trello.d.ts +3 -0
  69. package/dist/types/quick-insert/messages.d.ts +1 -1
  70. package/dist/types/ui/OverflowShadow/index.d.ts +0 -5
  71. package/package.json +2 -2
  72. package/quick-insert/assets-attribution-icon/package.json +10 -0
  73. package/quick-insert/confluence-attribution-icon/package.json +4 -4
  74. package/quick-insert/feedback-attribution-icon/package.json +10 -0
  75. package/quick-insert/focus-attribution-icon/package.json +10 -0
  76. package/quick-insert/jira-attribution-icon/package.json +4 -4
  77. package/quick-insert/jira-service-management-attribution-icon/package.json +4 -4
  78. package/quick-insert/studio-attribution-icon/package.json +10 -0
  79. package/quick-insert/talent-attribution-icon/package.json +10 -0
  80. package/quick-insert/trello-attribution-icon/package.json +10 -0
  81. /package/dist/cjs/quick-insert/{confluence-attribution-icon.js → attribution-icons/confluence.js} +0 -0
  82. /package/dist/cjs/quick-insert/{jira-service-management-attribution-icon.js → attribution-icons/jira-service-management.js} +0 -0
  83. /package/dist/cjs/quick-insert/{jira-attribution-icon.js → attribution-icons/jira.js} +0 -0
  84. /package/dist/es2019/quick-insert/{confluence-attribution-icon.js → attribution-icons/confluence.js} +0 -0
  85. /package/dist/es2019/quick-insert/{jira-service-management-attribution-icon.js → attribution-icons/jira-service-management.js} +0 -0
  86. /package/dist/es2019/quick-insert/{jira-attribution-icon.js → attribution-icons/jira.js} +0 -0
  87. /package/dist/esm/quick-insert/{confluence-attribution-icon.js → attribution-icons/confluence.js} +0 -0
  88. /package/dist/esm/quick-insert/{jira-service-management-attribution-icon.js → attribution-icons/jira-service-management.js} +0 -0
  89. /package/dist/esm/quick-insert/{jira-attribution-icon.js → attribution-icons/jira.js} +0 -0
  90. /package/dist/types/quick-insert/{confluence-attribution-icon.d.ts → attribution-icons/confluence.d.ts} +0 -0
  91. /package/dist/types/quick-insert/{jira-service-management-attribution-icon.d.ts → attribution-icons/jira-service-management.d.ts} +0 -0
  92. /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.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`60b0351aac27d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/60b0351aac27d) -
8
+ Standardise Rovo Skill tags in the slash command menu behind platform_editor_slash_command:
9
+ rebuild SkillTag to the Skill Tag design with a skill-coloured slash, add a SkillTag color prop,
10
+ copy quick insert module parameters onto menu items, add a lozenge prop for Quick Insert menu
11
+ items, and add Talent, Studio, Assets, Focus, Trello and Feedback attribution icons.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
17
+ ## 131.1.1
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 131.1.0
4
24
 
5
25
  ### Minor Changes
@@ -13,7 +13,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
13
13
  var _react = _interopRequireWildcard(require("react"));
14
14
  var _react2 = require("@emotion/react");
15
15
  var _classnames2 = _interopRequireDefault(require("classnames"));
16
- var _memoizeOne = _interopRequireDefault(require("memoize-one"));
17
16
  var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
18
17
  var _fg = require("@atlaskit/platform-feature-flags/fg");
19
18
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
@@ -44,12 +43,6 @@ var hoverStyles = (0, _react2.css)({
44
43
  var containerStyle = (0, _react2.css)({
45
44
  containerType: 'inline-size'
46
45
  });
47
- var isCssScrollTimelineSupported = (0, _memoizeOne.default)(function (css) {
48
- if (!css || typeof css.supports !== 'function') {
49
- return false;
50
- }
51
- return css.supports('animation-timeline', '--test-timeline') && css.supports('scroll-timeline-name', '--test-timeline') && css.supports('timeline-scope', '--test-timeline') && css.supports('animation-range', '0% 101%');
52
- });
53
46
  function ExtensionWithPluginState(props) {
54
47
  var _node$attrs;
55
48
  var node = props.node,
@@ -120,7 +113,6 @@ function ExtensionWithPluginState(props) {
120
113
  'without-frame': removeBorder
121
114
  }, _styles2.widerLayoutClassName, shouldBreakout));
122
115
  var overflowClassNames = (0, _classnames2.default)('extension-overflow-wrapper', {
123
- 'extension-scroll-inline-shadow': (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_reduce_forced_layout_2'),
124
116
  'with-body': hasBody,
125
117
  'with-margin-styles': showMacroInteractionDesignUpdates && !isNodeNested && !showBodiedExtensionRendererView,
126
118
  // Adding extra padding for renderer view so users can have a touch target to click on the extension
@@ -240,17 +232,7 @@ function ExtensionWithPluginState(props) {
240
232
  className: contentClassNames
241
233
  }, (0, _react2.jsx)(_NodeViewContentHole.NodeViewContentHole, {
242
234
  ref: handleContentDOMRef
243
- })))), (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_reduce_forced_layout_2') && (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
244
- contentEditable: false,
245
- "aria-hidden": "true",
246
- "data-vc-nvs": "true",
247
- "data-extension-overflow-shadow": "start"
248
- }), (0, _react2.jsx)("div", {
249
- contentEditable: false,
250
- "aria-hidden": "true",
251
- "data-vc-nvs": "true",
252
- "data-extension-overflow-shadow": "end"
253
- })), (0, _fg.fg)('cc_maui_annotations_on_extensions') && node.type.name === 'extension' && container && (pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.annotation) && (0, _react2.jsx)(_ExtensionCommentBadge.ExtensionCommentBadge, {
235
+ })))), (0, _fg.fg)('cc_maui_annotations_on_extensions') && node.type.name === 'extension' && container && (pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.annotation) && (0, _react2.jsx)(_ExtensionCommentBadge.ExtensionCommentBadge, {
254
236
  api: pluginInjectionApi,
255
237
  node: node,
256
238
  getPos: getPos,
@@ -287,9 +269,6 @@ var Extension = function Extension(props) {
287
269
  }, props));
288
270
  };
289
271
  var _default_1 = (0, _ui.overflowShadow)(Extension, {
290
- overflowSelector: '.extension-overflow-wrapper',
291
- isDisabled: function isDisabled() {
292
- return (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_reduce_forced_layout_2') && isCssScrollTimelineSupported(globalThis.CSS);
293
- }
272
+ overflowSelector: '.extension-overflow-wrapper'
294
273
  });
295
274
  var _default = exports.default = _default_1;
@@ -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.0.1";
30
+ var packageVersion = "131.1.1";
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.0.1";
27
+ var packageVersion = "131.1.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -44,7 +44,7 @@ function overflowShadow(Component, options) {
44
44
  _this.updateShadows();
45
45
  });
46
46
  (0, _defineProperty2.default)(_this, "updateShadows", function () {
47
- if (_this.isDisabled || options.useShadowObserver) {
47
+ if (options.useShadowObserver) {
48
48
  return;
49
49
  }
50
50
  _this.setState(function (prevState) {
@@ -98,9 +98,6 @@ function overflowShadow(Component, options) {
98
98
  if (!_this.overflowContainer) {
99
99
  _this.overflowContainer = container;
100
100
  }
101
- if (_this.isDisabled) {
102
- return;
103
- }
104
101
  if (options.useShadowObserver) {
105
102
  _this.initShadowObserver();
106
103
  return;
@@ -114,15 +111,6 @@ function overflowShadow(Component, options) {
114
111
  }
115
112
  (0, _inherits2.default)(OverflowShadow, _React$Component);
116
113
  return (0, _createClass2.default)(OverflowShadow, [{
117
- key: "isDisabled",
118
- get: function get() {
119
- if (this.disabled === undefined) {
120
- var _options$isDisabled, _options$isDisabled2;
121
- this.disabled = (_options$isDisabled = (_options$isDisabled2 = options.isDisabled) === null || _options$isDisabled2 === void 0 ? void 0 : _options$isDisabled2.call(options)) !== null && _options$isDisabled !== void 0 ? _options$isDisabled : false;
122
- }
123
- return this.disabled;
124
- }
125
- }, {
126
114
  key: "componentWillUnmount",
127
115
  value: function componentWillUnmount() {
128
116
  if (options.useShadowObserver) {
@@ -173,7 +161,7 @@ function overflowShadow(Component, options) {
173
161
  var _this$state = this.state,
174
162
  showLeftShadow = _this$state.showLeftShadow,
175
163
  showRightShadow = _this$state.showRightShadow;
176
- var classNames = this.isDisabled ? '' : [!((_this$props = this.props) !== null && _this$props !== void 0 && _this$props.disableTableOverflowShadow) && showRightShadow && shadowClassNames.RIGHT_SHADOW, !((_this$props2 = this.props) !== null && _this$props2 !== void 0 && _this$props2.disableTableOverflowShadow) && showLeftShadow && shadowClassNames.LEFT_SHADOW, options.useShadowObserver && _shadowObserverClassNames.shadowObserverClassNames.SHADOW_CONTAINER].filter(Boolean).join(' ');
164
+ var classNames = [!((_this$props = this.props) !== null && _this$props !== void 0 && _this$props.disableTableOverflowShadow) && showRightShadow && shadowClassNames.RIGHT_SHADOW, !((_this$props2 = this.props) !== null && _this$props2 !== void 0 && _this$props2.disableTableOverflowShadow) && showLeftShadow && shadowClassNames.LEFT_SHADOW, options.useShadowObserver && _shadowObserverClassNames.shadowObserverClassNames.SHADOW_CONTAINER].filter(Boolean).join(' ');
177
165
 
178
166
  /**
179
167
  * The widths have already been calculated to determine