@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
@@ -9,7 +9,6 @@ import React, { Fragment, useCallback, useState } from 'react';
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import classnames from 'classnames';
12
- import memoizeOne from 'memoize-one';
13
12
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
14
13
  import { fg } from '@atlaskit/platform-feature-flags/fg';
15
14
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -31,12 +30,6 @@ const hoverStyles = css({
31
30
  const containerStyle = css({
32
31
  containerType: 'inline-size'
33
32
  });
34
- const isCssScrollTimelineSupported = memoizeOne(css => {
35
- if (!css || typeof css.supports !== 'function') {
36
- return false;
37
- }
38
- 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%');
39
- });
40
33
  function ExtensionWithPluginState(props) {
41
34
  var _node$attrs, _node$attrs$parameter, _node$attrs$parameter2, _node$attrs$parameter3;
42
35
  const {
@@ -110,7 +103,6 @@ function ExtensionWithPluginState(props) {
110
103
  [widerLayoutClassName]: shouldBreakout
111
104
  });
112
105
  const overflowClassNames = classnames('extension-overflow-wrapper', {
113
- 'extension-scroll-inline-shadow': isExperimentEnabled('platform_editor_reduce_forced_layout_2'),
114
106
  'with-body': hasBody,
115
107
  'with-margin-styles': showMacroInteractionDesignUpdates && !isNodeNested && !showBodiedExtensionRendererView,
116
108
  // Adding extra padding for renderer view so users can have a touch target to click on the extension
@@ -232,17 +224,7 @@ function ExtensionWithPluginState(props) {
232
224
  className: contentClassNames
233
225
  }, jsx(NodeViewContentHole, {
234
226
  ref: handleContentDOMRef
235
- })))), isExperimentEnabled('platform_editor_reduce_forced_layout_2') && jsx(Fragment, null, jsx("div", {
236
- contentEditable: false,
237
- "aria-hidden": "true",
238
- "data-vc-nvs": "true",
239
- "data-extension-overflow-shadow": "start"
240
- }), jsx("div", {
241
- contentEditable: false,
242
- "aria-hidden": "true",
243
- "data-vc-nvs": "true",
244
- "data-extension-overflow-shadow": "end"
245
- })), fg('cc_maui_annotations_on_extensions') && node.type.name === 'extension' && container && (pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.annotation) && jsx(ExtensionCommentBadge, {
227
+ })))), fg('cc_maui_annotations_on_extensions') && node.type.name === 'extension' && container && (pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.annotation) && jsx(ExtensionCommentBadge, {
246
228
  api: pluginInjectionApi,
247
229
  node: node,
248
230
  getPos: getPos,
@@ -280,7 +262,6 @@ const Extension = props => {
280
262
  }, props));
281
263
  };
282
264
  const _default_1 = overflowShadow(Extension, {
283
- overflowSelector: '.extension-overflow-wrapper',
284
- isDisabled: () => isExperimentEnabled('platform_editor_reduce_forced_layout_2') && isCssScrollTimelineSupported(globalThis.CSS)
265
+ overflowSelector: '.extension-overflow-wrapper'
285
266
  });
286
267
  export default _default_1;
@@ -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.0.1";
16
+ const packageVersion = "131.1.1";
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, {
@@ -69,7 +69,8 @@ export const QuickInsertHoverPreview = ({
69
69
  popupsMountPoint,
70
70
  referenceElement,
71
71
  shouldClampText = true,
72
- title
72
+ title,
73
+ titleContent
73
74
  }) => {
74
75
  const {
75
76
  colorMode
@@ -100,6 +101,7 @@ export const QuickInsertHoverPreview = ({
100
101
  referenceElement: referenceElement,
101
102
  shouldClampText: shouldClampText,
102
103
  title: title,
104
+ titleContent: titleContent,
103
105
  update: update
104
106
  }))), portalTarget);
105
107
  };
@@ -113,6 +115,7 @@ const QuickInsertPreviewPanel = ({
113
115
  referenceElement,
114
116
  shouldClampText,
115
117
  title,
118
+ titleContent,
116
119
  update
117
120
  }) => {
118
121
  var _preview$attribution, _preview$attribution2;
@@ -172,7 +175,7 @@ const QuickInsertPreviewPanel = ({
172
175
  xcss: layoutStyles.titleIcon
173
176
  }, icon), /*#__PURE__*/React.createElement("span", {
174
177
  className: ax([shouldClampText && styles.title, !shouldClampText && styles.unclampedTitle])
175
- }, title)), description && /*#__PURE__*/React.createElement("div", {
178
+ }, titleContent !== null && titleContent !== void 0 ? titleContent : title)), description && /*#__PURE__*/React.createElement("div", {
176
179
  className: ax([shouldClampText && styles.description, !shouldClampText && styles.unclampedDescription])
177
180
  }, description), preview.attribution && /*#__PURE__*/React.createElement("div", {
178
181
  className: ax([styles.attribution, shouldClampText && styles.compactAttribution])
@@ -7,6 +7,7 @@ export const QuickInsertMenuItem = ({
7
7
  description,
8
8
  iconBefore,
9
9
  isDisabled,
10
+ lozenge,
10
11
  onSelect,
11
12
  preview,
12
13
  previewIcon,
@@ -26,6 +27,7 @@ export const QuickInsertMenuItem = ({
26
27
  description: description,
27
28
  iconBefore: iconBefore,
28
29
  isDisabled: isDisabled,
30
+ lozenge: lozenge,
29
31
  onSelect: onSelect,
30
32
  shortcut: shortcut,
31
33
  titleContent: titleContent,
@@ -36,6 +38,7 @@ export const QuickInsertMenuItem = ({
36
38
  description: description,
37
39
  iconBefore: iconBefore,
38
40
  isDisabled: isDisabled,
41
+ lozenge: lozenge,
39
42
  onSelect: onSelect,
40
43
  preview: preview,
41
44
  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)}
@@ -2,34 +2,102 @@
2
2
  import "./SkillTag.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
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';
5
+
6
+ // SVG fills use background and border colour tokens, which @atlaskit/css's schema does not allow for `fill`.
7
+
8
+ // The edges fill the tag background, and the slash is a coloured stripe over the start edge.
9
+ const 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';
10
+ const 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';
11
+ const 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';
8
12
  const styles = {
13
+ tag: "_1e0c1nu9 _1i4qfg65 _o5724jg8",
14
+ text: "_11c8fhey _syazi7uo",
15
+ textDisabled: "_syaz1gmx",
16
+ noWrap: "_o5721q9c",
9
17
  highlight: "_bfhki8nm _16d9qvcn _1e0c1nu9",
10
- start: "_bozg1b66 _y4ti1b66 _mkrz1f6o",
11
- end: "_y4ti1b66 _mkrz1gdk",
12
- wrapping: "_1i4qfg65 _o5724jg8",
13
- text: "_1i4qfg65"
18
+ highlightDisabled: "_bfhk187o",
19
+ highlightStart: "_bozgv77o",
20
+ highlightEnd: "_y4tiv77o",
21
+ edge: "_1e0c1nu9 _bozgu2gc _kqswh2mm",
22
+ edgeShape: "_4t3i1osq _152tze3t _1e02ze3t _kqswstnw _1bsb1osq"
14
23
  };
24
+ const fillStyles = {
25
+ edge: "_lswui8nm",
26
+ edgeDisabled: "_lswu187o",
27
+ slashDisabled: "_lswubk0g"
28
+ };
29
+ const slashColorStyles = {
30
+ LIME: "_lswunf89",
31
+ RED: "_lswu16y8",
32
+ ORANGE: "_lswu1b2s",
33
+ YELLOW: "_lswufeiv",
34
+ GREEN: "_lswu1crs",
35
+ TEAL: "_lswu1h3o",
36
+ BLUE: "_lswu1w55",
37
+ PURPLE: "_lswu1hqq",
38
+ MAGENTA: "_lswuuwd0",
39
+ GRAY: "_lswu8yml",
40
+ DEFAULT: "_lswu1l7x"
41
+ };
42
+ const SKILL_TAG_COLORS = ['LIME', 'RED', 'ORANGE', 'YELLOW', 'GREEN', 'TEAL', 'BLUE', 'PURPLE', 'MAGENTA', 'GRAY', 'DEFAULT'];
43
+ const isSkillTagColor = color => SKILL_TAG_COLORS.includes(color);
44
+ const Edge = ({
45
+ children,
46
+ isDisabled
47
+ }) => /*#__PURE__*/React.createElement("span", {
48
+ "aria-hidden": "true",
49
+ className: ax([styles.edge])
50
+ }, /*#__PURE__*/React.createElement("svg", {
51
+ focusable: "false",
52
+ preserveAspectRatio: "none",
53
+ viewBox: "0 0 8 20",
54
+ className: ax([styles.edgeShape, fillStyles.edge, isDisabled && fillStyles.edgeDisabled])
55
+ }, children));
56
+ const Highlight = ({
57
+ children,
58
+ isDisabled,
59
+ side
60
+ }) => /*#__PURE__*/React.createElement("span", {
61
+ className: ax([styles.highlight, isDisabled && styles.highlightDisabled, side === 'start' && styles.highlightStart, side === 'end' && styles.highlightEnd])
62
+ }, children);
15
63
  export const SkillTag = ({
64
+ color,
16
65
  slug,
17
66
  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))));
67
+ }) => {
68
+ const slashColor = isSkillTagColor(color) ? color : 'DEFAULT';
69
+ // The first and last characters share a no-wrap span with the edge beside them, so a long slug
70
+ // can wrap without leaving an edge alone at the start or end of a line.
71
+ const firstCharacter = slug.slice(0, 1);
72
+ const middleCharacters = slug.slice(1, -1);
73
+ const lastCharacter = slug.slice(1).slice(-1);
74
+ return /*#__PURE__*/React.createElement("span", {
75
+ className: ax([styles.tag, styles.text, isDisabled && styles.textDisabled])
76
+ }, /*#__PURE__*/React.createElement("span", {
77
+ className: ax([styles.noWrap])
78
+ }, /*#__PURE__*/React.createElement(Edge, {
79
+ isDisabled: isDisabled
80
+ }, /*#__PURE__*/React.createElement("path", {
81
+ d: START_EDGE_PATH,
82
+ transform: "translate(0.686 0)"
83
+ }), /*#__PURE__*/React.createElement("path", {
84
+ d: SLASH_PATH,
85
+ transform: "translate(0.511 0)",
86
+ className: ax([slashColorStyles[slashColor], isDisabled && fillStyles.slashDisabled])
87
+ })), /*#__PURE__*/React.createElement(Highlight, {
88
+ isDisabled: isDisabled,
89
+ side: "start"
90
+ }, firstCharacter)), middleCharacters && /*#__PURE__*/React.createElement(Highlight, {
91
+ isDisabled: isDisabled
92
+ }, middleCharacters), /*#__PURE__*/React.createElement("span", {
93
+ className: ax([styles.noWrap])
94
+ }, /*#__PURE__*/React.createElement(Highlight, {
95
+ isDisabled: isDisabled,
96
+ side: "end"
97
+ }, lastCharacter), /*#__PURE__*/React.createElement(Edge, {
98
+ isDisabled: isDisabled
99
+ }, /*#__PURE__*/React.createElement("path", {
100
+ d: END_EDGE_PATH,
101
+ transform: "rotate(180 4 10) translate(1.03 0)"
102
+ }))));
103
+ };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { assetsIcon } from '@atlaskit/logo/raw-icons';
3
+
4
+ /** Decorative product icon accompanying the localized Assets attribution name. */
5
+ export const AssetsAttributionIcon = () => /*#__PURE__*/React.createElement("img", {
6
+ src: assetsIcon,
7
+ alt: "",
8
+ width: 16,
9
+ height: 16
10
+ });
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { feedbackIcon } from '@atlaskit/logo/raw-icons';
3
+
4
+ /** Decorative product icon accompanying the localized Feedback attribution name. */
5
+ export const FeedbackAttributionIcon = () => /*#__PURE__*/React.createElement("img", {
6
+ src: feedbackIcon,
7
+ alt: "",
8
+ width: 16,
9
+ height: 16
10
+ });
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { focusIcon } from '@atlaskit/logo/raw-icons';
3
+
4
+ /** Decorative product icon accompanying the localized Focus attribution name. */
5
+ export const FocusAttributionIcon = () => /*#__PURE__*/React.createElement("img", {
6
+ src: focusIcon,
7
+ alt: "",
8
+ width: 16,
9
+ height: 16
10
+ });
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { studioIcon } from '@atlaskit/logo/raw-icons';
3
+
4
+ /** Decorative product icon accompanying the localized Studio attribution name. */
5
+ export const StudioAttributionIcon = () => /*#__PURE__*/React.createElement("img", {
6
+ src: studioIcon,
7
+ alt: "",
8
+ width: 16,
9
+ height: 16
10
+ });
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { talentIcon } from '@atlaskit/logo/raw-icons';
3
+
4
+ /** Decorative product icon accompanying the localized Talent attribution name. */
5
+ export const TalentAttributionIcon = () => /*#__PURE__*/React.createElement("img", {
6
+ src: talentIcon,
7
+ alt: "",
8
+ width: 16,
9
+ height: 16
10
+ });
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { trelloIcon } from '@atlaskit/logo/raw-icons';
3
+
4
+ /** Decorative product icon accompanying the localized Trello attribution name. */
5
+ export const TrelloAttributionIcon = () => /*#__PURE__*/React.createElement("img", {
6
+ src: trelloIcon,
7
+ alt: "",
8
+ width: 16,
9
+ height: 16
10
+ });
@@ -170,6 +170,31 @@ export const messages = defineMessages({
170
170
  defaultMessage: 'Jira Service Management',
171
171
  description: 'Jira Service Management product name shown as the creator in a slash-command preview attribution.'
172
172
  },
173
+ previewAttributionTalent: {
174
+ id: 'editor-common.quick-insert.previewAttributionTalent.ai-non-final',
175
+ defaultMessage: 'Talent',
176
+ description: 'Talent product name shown as the creator in a slash-command preview attribution.'
177
+ },
178
+ previewAttributionStudio: {
179
+ id: 'editor-common.quick-insert.previewAttributionStudio.ai-non-final',
180
+ defaultMessage: 'Studio',
181
+ description: 'Studio product name shown as the creator in a slash-command preview attribution.'
182
+ },
183
+ previewAttributionFocus: {
184
+ id: 'editor-common.quick-insert.previewAttributionFocus.ai-non-final',
185
+ defaultMessage: 'Focus',
186
+ description: 'Focus product name shown as the creator in a slash-command preview attribution.'
187
+ },
188
+ previewAttributionTrello: {
189
+ id: 'editor-common.quick-insert.previewAttributionTrello.ai-non-final',
190
+ defaultMessage: 'Trello',
191
+ description: 'Trello product name shown as the creator in a slash-command preview attribution.'
192
+ },
193
+ previewAttributionFeedback: {
194
+ id: 'editor-common.quick-insert.previewAttributionFeedback.ai-non-final',
195
+ defaultMessage: 'Feedback',
196
+ description: 'Feedback product name shown as the creator in a slash-command preview attribution.'
197
+ },
173
198
  previewAttributionMicrosoft: {
174
199
  id: 'editor-common.quick-insert.previewAttributionMicrosoft.ai-non-final',
175
200
  defaultMessage: 'Microsoft',
@@ -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 = "131.0.1";
17
+ const packageVersion = "131.1.1";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -24,7 +24,7 @@ export default function overflowShadow(Component, options) {
24
24
  this.updateShadows();
25
25
  });
26
26
  _defineProperty(this, "updateShadows", () => {
27
- if (this.isDisabled || options.useShadowObserver) {
27
+ if (options.useShadowObserver) {
28
28
  return;
29
29
  }
30
30
  this.setState(prevState => {
@@ -78,9 +78,6 @@ export default function overflowShadow(Component, options) {
78
78
  if (!this.overflowContainer) {
79
79
  this.overflowContainer = container;
80
80
  }
81
- if (this.isDisabled) {
82
- return;
83
- }
84
81
  if (options.useShadowObserver) {
85
82
  this.initShadowObserver();
86
83
  return;
@@ -91,13 +88,6 @@ export default function overflowShadow(Component, options) {
91
88
  this.overflowContainer.addEventListener('scroll', this.handleScroll);
92
89
  });
93
90
  }
94
- get isDisabled() {
95
- if (this.disabled === undefined) {
96
- var _options$isDisabled, _options$isDisabled2;
97
- 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;
98
- }
99
- return this.disabled;
100
- }
101
91
  componentWillUnmount() {
102
92
  if (options.useShadowObserver) {
103
93
  return this.shadowObserver && this.shadowObserver.dispose();
@@ -143,7 +133,7 @@ export default function overflowShadow(Component, options) {
143
133
  showLeftShadow,
144
134
  showRightShadow
145
135
  } = this.state;
146
- const 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.SHADOW_CONTAINER].filter(Boolean).join(' ');
136
+ const 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.SHADOW_CONTAINER].filter(Boolean).join(' ');
147
137
 
148
138
  /**
149
139
  * The widths have already been calculated to determine
@@ -15,7 +15,6 @@ import React, { Fragment, useCallback, useState } from 'react';
15
15
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
16
16
  import { css, jsx } from '@emotion/react';
17
17
  import classnames from 'classnames';
18
- import memoizeOne from 'memoize-one';
19
18
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
20
19
  import { fg } from '@atlaskit/platform-feature-flags/fg';
21
20
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -37,12 +36,6 @@ var hoverStyles = css({
37
36
  var containerStyle = css({
38
37
  containerType: 'inline-size'
39
38
  });
40
- var isCssScrollTimelineSupported = memoizeOne(function (css) {
41
- if (!css || typeof css.supports !== 'function') {
42
- return false;
43
- }
44
- 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%');
45
- });
46
39
  function ExtensionWithPluginState(props) {
47
40
  var _node$attrs;
48
41
  var node = props.node,
@@ -113,7 +106,6 @@ function ExtensionWithPluginState(props) {
113
106
  'without-frame': removeBorder
114
107
  }, widerLayoutClassName, shouldBreakout));
115
108
  var overflowClassNames = classnames('extension-overflow-wrapper', {
116
- 'extension-scroll-inline-shadow': isExperimentEnabled('platform_editor_reduce_forced_layout_2'),
117
109
  'with-body': hasBody,
118
110
  'with-margin-styles': showMacroInteractionDesignUpdates && !isNodeNested && !showBodiedExtensionRendererView,
119
111
  // Adding extra padding for renderer view so users can have a touch target to click on the extension
@@ -233,17 +225,7 @@ function ExtensionWithPluginState(props) {
233
225
  className: contentClassNames
234
226
  }, jsx(NodeViewContentHole, {
235
227
  ref: handleContentDOMRef
236
- })))), isExperimentEnabled('platform_editor_reduce_forced_layout_2') && jsx(Fragment, null, jsx("div", {
237
- contentEditable: false,
238
- "aria-hidden": "true",
239
- "data-vc-nvs": "true",
240
- "data-extension-overflow-shadow": "start"
241
- }), jsx("div", {
242
- contentEditable: false,
243
- "aria-hidden": "true",
244
- "data-vc-nvs": "true",
245
- "data-extension-overflow-shadow": "end"
246
- })), fg('cc_maui_annotations_on_extensions') && node.type.name === 'extension' && container && (pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.annotation) && jsx(ExtensionCommentBadge, {
228
+ })))), fg('cc_maui_annotations_on_extensions') && node.type.name === 'extension' && container && (pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : pluginInjectionApi.annotation) && jsx(ExtensionCommentBadge, {
247
229
  api: pluginInjectionApi,
248
230
  node: node,
249
231
  getPos: getPos,
@@ -280,9 +262,6 @@ var Extension = function Extension(props) {
280
262
  }, props));
281
263
  };
282
264
  var _default_1 = overflowShadow(Extension, {
283
- overflowSelector: '.extension-overflow-wrapper',
284
- isDisabled: function isDisabled() {
285
- return isExperimentEnabled('platform_editor_reduce_forced_layout_2') && isCssScrollTimelineSupported(globalThis.CSS);
286
- }
265
+ overflowSelector: '.extension-overflow-wrapper'
287
266
  });
288
267
  export default _default_1;
@@ -13,7 +13,7 @@ export function buildMenuItem(manifest, extensionModule) {
13
13
  if (!node) {
14
14
  throw new Error("Couldn't find any action for ".concat(title, " (").concat(key, ")"));
15
15
  }
16
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
16
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
17
17
  app: (_ref = (_extensionModule$app = extensionModule.app) !== null && _extensionModule$app !== void 0 ? _extensionModule$app : manifest.app) !== null && _ref !== void 0 ? _ref : {
18
18
  key: manifest.key
19
19
  },
@@ -36,6 +36,8 @@ export function buildMenuItem(manifest, extensionModule) {
36
36
  preview: preview
37
37
  }), extensionModule.lozenge != null && {
38
38
  lozenge: extensionModule.lozenge
39
+ }), extensionModule.parameters && {
40
+ parameters: extensionModule.parameters
39
41
  }), {}, {
40
42
  icon: extensionModule.icon || manifest.icons['48']
41
43
  }, extensionModule.isHidden ? {
@@ -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 = "131.0.1";
22
+ var packageVersion = "131.1.1";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007