@atlaskit/editor-common 131.1.1 → 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 (85) hide show
  1. package/CHANGELOG.md +14 -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 +2 -2
  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
@@ -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.1.0";
17
+ const packageVersion = "131.1.1";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -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.1.0";
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
@@ -89,6 +89,7 @@ export var CompactQuickInsertMenuItem = function CompactQuickInsertMenuItem(_ref
89
89
  description = _ref.description,
90
90
  iconBefore = _ref.iconBefore,
91
91
  isDisabled = _ref.isDisabled,
92
+ lozenge = _ref.lozenge,
92
93
  onSelect = _ref.onSelect,
93
94
  preview = _ref.preview,
94
95
  previewIcon = _ref.previewIcon,
@@ -128,6 +129,9 @@ export var CompactQuickInsertMenuItem = function CompactQuickInsertMenuItem(_ref
128
129
  var hasAccessiblePreview = Boolean(resolvedDescription || (resolvedPreview === null || resolvedPreview === void 0 ? void 0 : resolvedPreview.attribution));
129
130
  var previewAttributionName = (_resolvedPreview$attr = resolvedPreview.attribution) === null || _resolvedPreview$attr === void 0 ? void 0 : _resolvedPreview$attr.name;
130
131
  var previewAttributionKey = typeof previewAttributionName === 'string' ? previewAttributionName : previewAttributionName === null || previewAttributionName === void 0 ? void 0 : previewAttributionName.id;
132
+ var rowTitle = titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/React.createElement(Text, {
133
+ color: isDisabled ? 'color.text.disabled' : 'color.text'
134
+ }, title);
131
135
  var wrappedIcon = iconBefore && shouldWrapIcon ? /*#__PURE__*/React.createElement(Box, {
132
136
  xcss: styles.iconLarge
133
137
  }, iconBefore) : iconBefore;
@@ -149,9 +153,10 @@ export var CompactQuickInsertMenuItem = function CompactQuickInsertMenuItem(_ref
149
153
  alignBlock: "center",
150
154
  spread: "space-between",
151
155
  xcss: styles.content
152
- }, titleContent !== null && titleContent !== void 0 ? titleContent : /*#__PURE__*/React.createElement(Text, {
153
- color: isDisabled ? 'color.text.disabled' : 'color.text'
154
- }, title), shortcut && /*#__PURE__*/React.createElement(Box, {
156
+ }, lozenge ? /*#__PURE__*/React.createElement(Inline, {
157
+ alignBlock: "center",
158
+ space: "space.100"
159
+ }, rowTitle, lozenge) : rowTitle, shortcut && /*#__PURE__*/React.createElement(Box, {
155
160
  as: "span",
156
161
  xcss: styles.shortcut
157
162
  }, shortcut))), shouldRenderPreview && referenceElement && /*#__PURE__*/React.createElement(QuickInsertHoverPreview, {
@@ -162,6 +167,7 @@ export var CompactQuickInsertMenuItem = function CompactQuickInsertMenuItem(_ref
162
167
  popupsMountPoint: popupsMountPoint,
163
168
  referenceElement: referenceElement,
164
169
  title: title,
170
+ titleContent: titleContent,
165
171
  icon: previewIcon,
166
172
  shouldClampText: shouldClampPreview
167
173
  }));
@@ -120,6 +120,7 @@ export var ElementBrowserQuickInsertMenuItem = function ElementBrowserQuickInser
120
120
  description = _ref.description,
121
121
  iconBefore = _ref.iconBefore,
122
122
  isDisabled = _ref.isDisabled,
123
+ lozenge = _ref.lozenge,
123
124
  onSelect = _ref.onSelect,
124
125
  shortcut = _ref.shortcut,
125
126
  titleContent = _ref.titleContent,
@@ -139,6 +140,12 @@ export var ElementBrowserQuickInsertMenuItem = function ElementBrowserQuickInser
139
140
  var itemStyles = useMemo(function () {
140
141
  return [isDisabled ? borderlessDisabledItemStyles : isSelected ? borderlessSelectedItemStyles : borderlessItemStyles, isExperimentEnabled('platform_editor_slash_command') && !isDisabled && !isSelected && hoveredItemStyles];
141
142
  }, [isDisabled, isSelected]);
143
+ var 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
  var icon = iconBefore ? /*#__PURE__*/React.createElement("span", {
@@ -164,12 +171,10 @@ export var ElementBrowserQuickInsertMenuItem = function ElementBrowserQuickInser
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, {
@@ -71,7 +71,8 @@ export var QuickInsertHoverPreview = function QuickInsertHoverPreview(_ref) {
71
71
  referenceElement = _ref.referenceElement,
72
72
  _ref$shouldClampText = _ref.shouldClampText,
73
73
  shouldClampText = _ref$shouldClampText === void 0 ? true : _ref$shouldClampText,
74
- title = _ref.title;
74
+ title = _ref.title,
75
+ titleContent = _ref.titleContent;
75
76
  var _useThemeObserver = useThemeObserver(),
76
77
  colorMode = _useThemeObserver.colorMode;
77
78
  var imageUrl = preview.image ? colorMode === 'dark' && preview.image.dark ? preview.image.dark : preview.image.light : undefined;
@@ -100,6 +101,7 @@ export var QuickInsertHoverPreview = function QuickInsertHoverPreview(_ref) {
100
101
  referenceElement: referenceElement,
101
102
  shouldClampText: shouldClampText,
102
103
  title: title,
104
+ titleContent: titleContent,
103
105
  update: update
104
106
  }));
105
107
  }), portalTarget);
@@ -115,6 +117,7 @@ var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
115
117
  referenceElement = _ref3.referenceElement,
116
118
  shouldClampText = _ref3.shouldClampText,
117
119
  title = _ref3.title,
120
+ titleContent = _ref3.titleContent,
118
121
  update = _ref3.update;
119
122
  var _useIntl = useIntl(),
120
123
  formatMessage = _useIntl.formatMessage;
@@ -176,7 +179,7 @@ var QuickInsertPreviewPanel = function QuickInsertPreviewPanel(_ref3) {
176
179
  xcss: layoutStyles.titleIcon
177
180
  }, icon), /*#__PURE__*/React.createElement("span", {
178
181
  className: ax([shouldClampText && styles.title, !shouldClampText && styles.unclampedTitle])
179
- }, title)), description && /*#__PURE__*/React.createElement("div", {
182
+ }, titleContent !== null && titleContent !== void 0 ? titleContent : title)), description && /*#__PURE__*/React.createElement("div", {
180
183
  className: ax([shouldClampText && styles.description, !shouldClampText && styles.unclampedDescription])
181
184
  }, description), preview.attribution && /*#__PURE__*/React.createElement("div", {
182
185
  className: ax([styles.attribution, shouldClampText && styles.compactAttribution])
@@ -7,6 +7,7 @@ export var QuickInsertMenuItem = function QuickInsertMenuItem(_ref) {
7
7
  description = _ref.description,
8
8
  iconBefore = _ref.iconBefore,
9
9
  isDisabled = _ref.isDisabled,
10
+ lozenge = _ref.lozenge,
10
11
  onSelect = _ref.onSelect,
11
12
  preview = _ref.preview,
12
13
  previewIcon = _ref.previewIcon,
@@ -24,6 +25,7 @@ export var QuickInsertMenuItem = function QuickInsertMenuItem(_ref) {
24
25
  description: description,
25
26
  iconBefore: iconBefore,
26
27
  isDisabled: isDisabled,
28
+ lozenge: lozenge,
27
29
  onSelect: onSelect,
28
30
  shortcut: shortcut,
29
31
  titleContent: titleContent,
@@ -34,6 +36,7 @@ export var QuickInsertMenuItem = function QuickInsertMenuItem(_ref) {
34
36
  description: description,
35
37
  iconBefore: iconBefore,
36
38
  isDisabled: isDisabled,
39
+ lozenge: lozenge,
37
40
  onSelect: onSelect,
38
41
  preview: preview,
39
42
  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)}