@atlaskit/editor-plugin-show-diff 24.0.2 → 24.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-show-diff
2
2
 
3
+ ## 24.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`1b8ffa1d31cb6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1b8ffa1d31cb6) -
8
+ Treat Amplitude, Cortex, Databricks, Gemini, Manus and Slack as third-party agent brands alongside
9
+ Figma, Lovable and Replit: they resolve from the attribution agent type, share the fixed
10
+ third-party participant colour slot, and show their profile avatar in the contributor tag, like
11
+ Figma, Lovable and Replit.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 24.0.2
4
18
 
5
19
  ### Patch Changes
@@ -25,12 +25,19 @@ var SHOW_DIFF_AGENT_BRANDS = {
25
25
  'agent-brand-figma': 'figma',
26
26
  'agent-brand-lovable': 'lovable',
27
27
  'agent-brand-replit': 'replit',
28
- 'agent-brand-rovo': 'rovo'
28
+ 'agent-brand-rovo': 'rovo',
29
+ 'agent-brand-amplitude': 'amplitude',
30
+ 'agent-brand-cortex': 'cortex',
31
+ 'agent-brand-databricks': 'databricks',
32
+ 'agent-brand-gemini': 'gemini',
33
+ 'agent-brand-manus': 'manus',
34
+ 'agent-brand-slack': 'slack'
29
35
  };
30
36
 
31
37
  /**
32
38
  * Brands that prefer the account's real avatar over their fixed glyph when the invoking profile
33
- * has one. Claude/ChatGPT intentionally keep their fixed glyph always (see `AGENT_KIND_ICONS` in
39
+ * has one. Brands with a fixed glyph (Claude, ChatGPT, Amplitude, Cortex, Databricks, Gemini, Manus,
40
+ * Slack) intentionally keep it always (see `AGENT_KIND_ICONS` in
34
41
  * `contributorAvatarRenderer.ts`).
35
42
  */
36
43
  var AVATAR_ELIGIBLE_BRANDS = new Set(['figma', 'lovable', 'replit', 'rovo']);
@@ -25,7 +25,7 @@ exports.DIFF_AGENT_BRANDS = exports.ASSERT_DIFF_AGENT_BRANDS_ARE_REGISTERED = vo
25
25
 
26
26
  /** Branded agent presentations supported by contributor tags. */
27
27
 
28
- var DIFF_AGENT_BRANDS = exports.DIFF_AGENT_BRANDS = new Set(['rovo', 'claude', 'chatgpt', 'figma', 'lovable', 'replit']);
28
+ var DIFF_AGENT_BRANDS = exports.DIFF_AGENT_BRANDS = new Set(['rovo', 'claude', 'chatgpt', 'figma', 'lovable', 'replit', 'amplitude', 'cortex', 'databricks', 'gemini', 'manus', 'slack']);
29
29
 
30
30
  /** The brand id `@atlaskit/agent-color` registers each `AgentBrandColorScheme` under. */
31
31
 
@@ -67,9 +67,17 @@ var shapeStyle = (0, _lazyNodeView.convertToInlineCss)({
67
67
  aspectRatio: '1/1',
68
68
  overflow: 'hidden'
69
69
  });
70
+
71
+ /**
72
+ * The shadow's colour per theme. In the dark theme `elevation.shadow.overflow.perimeter` is
73
+ * `#010404` at 50%, which three stacked layers turn into a heavy smudge around a 16px hexagon, and
74
+ * ADS has no softer shadow token, so dark mixes the same token down to 12% of its strength (~6%
75
+ * opacity). Light keeps the token as is.
76
+ */
77
+ var agentShadowColor = "light-dark(".concat("var(--ds-shadow-overflow-perimeter, #1E1F211f)", ", color-mix(in srgb, ", "var(--ds-shadow-overflow-perimeter, #1E1F211f)", " 12%, transparent))");
70
78
  var agentShadowStyle = (0, _lazyNodeView.convertToInlineCss)({
71
79
  // No clip-path on `element`, so the blur isn't cut off.
72
- filter: "drop-shadow(0 5px 5px ".concat("var(--ds-shadow-overflow-perimeter, #1E1F211f)", ") drop-shadow(0 1px 2px ", "var(--ds-shadow-overflow-perimeter, #1E1F211f)", ") drop-shadow(0 0 2px ", "var(--ds-shadow-overflow-perimeter, #1E1F211f)", ")")
80
+ filter: "drop-shadow(0 5px 5px ".concat(agentShadowColor, ") drop-shadow(0 1px 2px ").concat(agentShadowColor, ") drop-shadow(0 0 2px ").concat(agentShadowColor, ")")
73
81
  });
74
82
  var imageStyle = (0, _lazyNodeView.convertToInlineCss)({
75
83
  display: 'block',
@@ -139,7 +147,7 @@ var contributorAvatarRenderer = exports.contributorAvatarRenderer = function con
139
147
  if (contributor.avatarUrl) {
140
148
  var _contributor$agentKin2;
141
149
  // Claude/ChatGPT always use their fixed glyph, even when the profile also has an avatar
142
- // URL. Other agents (e.g. Rovo/Figma/Lovable/Replit) and users prefer the real avatar.
150
+ // URL. Other agents (e.g. Rovo/Figma/Lovable/Replit/Slack) and users prefer the real avatar.
143
151
  var usesFixedGlyph = isAgent && FIXED_GLYPH_AGENT_KINDS.has((_contributor$agentKin2 = contributor.agentKind) !== null && _contributor$agentKin2 !== void 0 ? _contributor$agentKin2 : 'external');
144
152
  if (usesFixedGlyph) {
145
153
  showContributorIcon();
@@ -32,47 +32,13 @@ var getTagAccent = function getTagAccent(_ref) {
32
32
  return (0, _factory.getAccentTokens)(accent);
33
33
  };
34
34
 
35
- /** ChatGPT's own brand colour, resolved from the shared `@atlaskit/agent-color` registry. */
36
- var chatgptBrandColor = (0, _getThirdPartyAgentColor.getThirdPartyAgentColor)({
37
- agentName: 'chatgpt'
38
- });
39
- var figmaBrandColor = (0, _getThirdPartyAgentColor.getThirdPartyAgentColor)({
40
- agentName: 'figma'
41
- });
42
- var lovableBrandColor = (0, _getThirdPartyAgentColor.getThirdPartyAgentColor)({
43
- agentName: 'lovable'
44
- });
45
- var replitBrandColor = (0, _getThirdPartyAgentColor.getThirdPartyAgentColor)({
46
- agentName: 'replit'
47
- });
48
-
49
- /** Brand accents for agent kinds with no ADS token match. New agents opt in by adding an entry. */
50
- var AGENT_KIND_ACCENT_OVERRIDES = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
35
+ /** Bespoke accents for agent kinds that use standard ADS tokens rather than the agent-color registry. */
36
+ var BESPOKE_AGENT_ACCENTS = {
51
37
  rovo: {
52
38
  background: "var(--ds-background-neutral-bold, #292A2E)",
53
39
  text: "var(--ds-text-inverse, #FFFFFF)"
54
40
  }
55
- }, chatgptBrandColor ? {
56
- chatgpt: {
57
- background: chatgptBrandColor.bold,
58
- text: chatgptBrandColor.boldText
59
- }
60
- } : {}), figmaBrandColor ? {
61
- figma: {
62
- background: figmaBrandColor.bold,
63
- text: figmaBrandColor.boldText
64
- }
65
- } : {}), lovableBrandColor ? {
66
- lovable: {
67
- background: lovableBrandColor.bold,
68
- text: lovableBrandColor.boldText
69
- }
70
- } : {}), replitBrandColor ? {
71
- replit: {
72
- background: replitBrandColor.bold,
73
- text: replitBrandColor.boldText
74
- }
75
- } : {});
41
+ };
76
42
 
77
43
  /**
78
44
  * Keyboard focus, as a member of `revealSources` alongside the elements the pointer can be over. It
@@ -427,8 +393,23 @@ var ContributorTagController = exports.ContributorTagController = /*#__PURE__*/f
427
393
  isInserted: (_model$isInserted = model.isInserted) !== null && _model$isInserted !== void 0 ? _model$isInserted : true
428
394
  });
429
395
  var agentKind = (_model$contributor$ag = model.contributor.agentKind) !== null && _model$contributor$ag !== void 0 ? _model$contributor$ag : (_model$connectedContr = model.connectedContributor) === null || _model$connectedContr === void 0 ? void 0 : _model$connectedContr.agentKind;
430
- var override = agentKind && AGENT_KIND_ACCENT_OVERRIDES[agentKind];
431
- return override ? _objectSpread(_objectSpread({}, accent), override) : accent;
396
+ if (!agentKind) {
397
+ return accent;
398
+ }
399
+ var bespoke = BESPOKE_AGENT_ACCENTS[agentKind];
400
+ if (bespoke) {
401
+ return _objectSpread(_objectSpread({}, accent), bespoke);
402
+ }
403
+
404
+ // The attribution colour map shares one palette slot between most brands, so the scheme alone
405
+ // cannot tell them apart; the registry holds each brand's own pair.
406
+ var brandColor = (0, _getThirdPartyAgentColor.getThirdPartyAgentColor)({
407
+ agentName: agentKind
408
+ });
409
+ return brandColor ? _objectSpread(_objectSpread({}, accent), {}, {
410
+ background: brandColor.bold,
411
+ text: brandColor.boldText
412
+ }) : accent;
432
413
  }
433
414
  }, {
434
415
  key: "applyAccent",
@@ -13,12 +13,19 @@ const SHOW_DIFF_AGENT_BRANDS = {
13
13
  'agent-brand-figma': 'figma',
14
14
  'agent-brand-lovable': 'lovable',
15
15
  'agent-brand-replit': 'replit',
16
- 'agent-brand-rovo': 'rovo'
16
+ 'agent-brand-rovo': 'rovo',
17
+ 'agent-brand-amplitude': 'amplitude',
18
+ 'agent-brand-cortex': 'cortex',
19
+ 'agent-brand-databricks': 'databricks',
20
+ 'agent-brand-gemini': 'gemini',
21
+ 'agent-brand-manus': 'manus',
22
+ 'agent-brand-slack': 'slack'
17
23
  };
18
24
 
19
25
  /**
20
26
  * Brands that prefer the account's real avatar over their fixed glyph when the invoking profile
21
- * has one. Claude/ChatGPT intentionally keep their fixed glyph always (see `AGENT_KIND_ICONS` in
27
+ * has one. Brands with a fixed glyph (Claude, ChatGPT, Amplitude, Cortex, Databricks, Gemini, Manus,
28
+ * Slack) intentionally keep it always (see `AGENT_KIND_ICONS` in
22
29
  * `contributorAvatarRenderer.ts`).
23
30
  */
24
31
  const AVATAR_ELIGIBLE_BRANDS = new Set(['figma', 'lovable', 'replit', 'rovo']);
@@ -19,7 +19,7 @@
19
19
 
20
20
  /** Branded agent presentations supported by contributor tags. */
21
21
 
22
- export const DIFF_AGENT_BRANDS = new Set(['rovo', 'claude', 'chatgpt', 'figma', 'lovable', 'replit']);
22
+ export const DIFF_AGENT_BRANDS = new Set(['rovo', 'claude', 'chatgpt', 'figma', 'lovable', 'replit', 'amplitude', 'cortex', 'databricks', 'gemini', 'manus', 'slack']);
23
23
 
24
24
  /** The brand id `@atlaskit/agent-color` registers each `AgentBrandColorScheme` under. */
25
25
 
@@ -62,9 +62,17 @@ const shapeStyle = convertToInlineCss({
62
62
  aspectRatio: '1/1',
63
63
  overflow: 'hidden'
64
64
  });
65
+
66
+ /**
67
+ * The shadow's colour per theme. In the dark theme `elevation.shadow.overflow.perimeter` is
68
+ * `#010404` at 50%, which three stacked layers turn into a heavy smudge around a 16px hexagon, and
69
+ * ADS has no softer shadow token, so dark mixes the same token down to 12% of its strength (~6%
70
+ * opacity). Light keeps the token as is.
71
+ */
72
+ const agentShadowColor = `light-dark(${"var(--ds-shadow-overflow-perimeter, #1E1F211f)"}, color-mix(in srgb, ${"var(--ds-shadow-overflow-perimeter, #1E1F211f)"} 12%, transparent))`;
65
73
  const agentShadowStyle = convertToInlineCss({
66
74
  // No clip-path on `element`, so the blur isn't cut off.
67
- filter: `drop-shadow(0 5px 5px ${"var(--ds-shadow-overflow-perimeter, #1E1F211f)"}) drop-shadow(0 1px 2px ${"var(--ds-shadow-overflow-perimeter, #1E1F211f)"}) drop-shadow(0 0 2px ${"var(--ds-shadow-overflow-perimeter, #1E1F211f)"})`
75
+ filter: `drop-shadow(0 5px 5px ${agentShadowColor}) drop-shadow(0 1px 2px ${agentShadowColor}) drop-shadow(0 0 2px ${agentShadowColor})`
68
76
  });
69
77
  const imageStyle = convertToInlineCss({
70
78
  display: 'block',
@@ -135,7 +143,7 @@ export const contributorAvatarRenderer = ({
135
143
  if (contributor.avatarUrl) {
136
144
  var _contributor$agentKin2;
137
145
  // Claude/ChatGPT always use their fixed glyph, even when the profile also has an avatar
138
- // URL. Other agents (e.g. Rovo/Figma/Lovable/Replit) and users prefer the real avatar.
146
+ // URL. Other agents (e.g. Rovo/Figma/Lovable/Replit/Slack) and users prefer the real avatar.
139
147
  const usesFixedGlyph = isAgent && FIXED_GLYPH_AGENT_KINDS.has((_contributor$agentKin2 = contributor.agentKind) !== null && _contributor$agentKin2 !== void 0 ? _contributor$agentKin2 : 'external');
140
148
  if (usesFixedGlyph) {
141
149
  showContributorIcon();
@@ -21,50 +21,12 @@ const getTagAccent = ({
21
21
  return getAccentTokens(accent);
22
22
  };
23
23
 
24
- /** ChatGPT's own brand colour, resolved from the shared `@atlaskit/agent-color` registry. */
25
- const chatgptBrandColor = getThirdPartyAgentColor({
26
- agentName: 'chatgpt'
27
- });
28
- const figmaBrandColor = getThirdPartyAgentColor({
29
- agentName: 'figma'
30
- });
31
- const lovableBrandColor = getThirdPartyAgentColor({
32
- agentName: 'lovable'
33
- });
34
- const replitBrandColor = getThirdPartyAgentColor({
35
- agentName: 'replit'
36
- });
37
-
38
- /** Brand accents for agent kinds with no ADS token match. New agents opt in by adding an entry. */
39
- const AGENT_KIND_ACCENT_OVERRIDES = {
24
+ /** Bespoke accents for agent kinds that use standard ADS tokens rather than the agent-color registry. */
25
+ const BESPOKE_AGENT_ACCENTS = {
40
26
  rovo: {
41
27
  background: "var(--ds-background-neutral-bold, #292A2E)",
42
28
  text: "var(--ds-text-inverse, #FFFFFF)"
43
- },
44
- ...(chatgptBrandColor ? {
45
- chatgpt: {
46
- background: chatgptBrandColor.bold,
47
- text: chatgptBrandColor.boldText
48
- }
49
- } : {}),
50
- ...(figmaBrandColor ? {
51
- figma: {
52
- background: figmaBrandColor.bold,
53
- text: figmaBrandColor.boldText
54
- }
55
- } : {}),
56
- ...(lovableBrandColor ? {
57
- lovable: {
58
- background: lovableBrandColor.bold,
59
- text: lovableBrandColor.boldText
60
- }
61
- } : {}),
62
- ...(replitBrandColor ? {
63
- replit: {
64
- background: replitBrandColor.bold,
65
- text: replitBrandColor.boldText
66
- }
67
- } : {})
29
+ }
68
30
  };
69
31
 
70
32
  /**
@@ -385,10 +347,26 @@ export class ContributorTagController {
385
347
  isInserted: (_model$isInserted = model.isInserted) !== null && _model$isInserted !== void 0 ? _model$isInserted : true
386
348
  });
387
349
  const agentKind = (_model$contributor$ag = model.contributor.agentKind) !== null && _model$contributor$ag !== void 0 ? _model$contributor$ag : (_model$connectedContr = model.connectedContributor) === null || _model$connectedContr === void 0 ? void 0 : _model$connectedContr.agentKind;
388
- const override = agentKind && AGENT_KIND_ACCENT_OVERRIDES[agentKind];
389
- return override ? {
350
+ if (!agentKind) {
351
+ return accent;
352
+ }
353
+ const bespoke = BESPOKE_AGENT_ACCENTS[agentKind];
354
+ if (bespoke) {
355
+ return {
356
+ ...accent,
357
+ ...bespoke
358
+ };
359
+ }
360
+
361
+ // The attribution colour map shares one palette slot between most brands, so the scheme alone
362
+ // cannot tell them apart; the registry holds each brand's own pair.
363
+ const brandColor = getThirdPartyAgentColor({
364
+ agentName: agentKind
365
+ });
366
+ return brandColor ? {
390
367
  ...accent,
391
- ...override
368
+ background: brandColor.bold,
369
+ text: brandColor.boldText
392
370
  } : accent;
393
371
  }
394
372
  applyAccent(model) {
@@ -19,12 +19,19 @@ var SHOW_DIFF_AGENT_BRANDS = {
19
19
  'agent-brand-figma': 'figma',
20
20
  'agent-brand-lovable': 'lovable',
21
21
  'agent-brand-replit': 'replit',
22
- 'agent-brand-rovo': 'rovo'
22
+ 'agent-brand-rovo': 'rovo',
23
+ 'agent-brand-amplitude': 'amplitude',
24
+ 'agent-brand-cortex': 'cortex',
25
+ 'agent-brand-databricks': 'databricks',
26
+ 'agent-brand-gemini': 'gemini',
27
+ 'agent-brand-manus': 'manus',
28
+ 'agent-brand-slack': 'slack'
23
29
  };
24
30
 
25
31
  /**
26
32
  * Brands that prefer the account's real avatar over their fixed glyph when the invoking profile
27
- * has one. Claude/ChatGPT intentionally keep their fixed glyph always (see `AGENT_KIND_ICONS` in
33
+ * has one. Brands with a fixed glyph (Claude, ChatGPT, Amplitude, Cortex, Databricks, Gemini, Manus,
34
+ * Slack) intentionally keep it always (see `AGENT_KIND_ICONS` in
28
35
  * `contributorAvatarRenderer.ts`).
29
36
  */
30
37
  var AVATAR_ELIGIBLE_BRANDS = new Set(['figma', 'lovable', 'replit', 'rovo']);
@@ -19,7 +19,7 @@
19
19
 
20
20
  /** Branded agent presentations supported by contributor tags. */
21
21
 
22
- export var DIFF_AGENT_BRANDS = new Set(['rovo', 'claude', 'chatgpt', 'figma', 'lovable', 'replit']);
22
+ export var DIFF_AGENT_BRANDS = new Set(['rovo', 'claude', 'chatgpt', 'figma', 'lovable', 'replit', 'amplitude', 'cortex', 'databricks', 'gemini', 'manus', 'slack']);
23
23
 
24
24
  /** The brand id `@atlaskit/agent-color` registers each `AgentBrandColorScheme` under. */
25
25
 
@@ -62,9 +62,17 @@ var shapeStyle = convertToInlineCss({
62
62
  aspectRatio: '1/1',
63
63
  overflow: 'hidden'
64
64
  });
65
+
66
+ /**
67
+ * The shadow's colour per theme. In the dark theme `elevation.shadow.overflow.perimeter` is
68
+ * `#010404` at 50%, which three stacked layers turn into a heavy smudge around a 16px hexagon, and
69
+ * ADS has no softer shadow token, so dark mixes the same token down to 12% of its strength (~6%
70
+ * opacity). Light keeps the token as is.
71
+ */
72
+ var agentShadowColor = "light-dark(".concat("var(--ds-shadow-overflow-perimeter, #1E1F211f)", ", color-mix(in srgb, ", "var(--ds-shadow-overflow-perimeter, #1E1F211f)", " 12%, transparent))");
65
73
  var agentShadowStyle = convertToInlineCss({
66
74
  // No clip-path on `element`, so the blur isn't cut off.
67
- filter: "drop-shadow(0 5px 5px ".concat("var(--ds-shadow-overflow-perimeter, #1E1F211f)", ") drop-shadow(0 1px 2px ", "var(--ds-shadow-overflow-perimeter, #1E1F211f)", ") drop-shadow(0 0 2px ", "var(--ds-shadow-overflow-perimeter, #1E1F211f)", ")")
75
+ filter: "drop-shadow(0 5px 5px ".concat(agentShadowColor, ") drop-shadow(0 1px 2px ").concat(agentShadowColor, ") drop-shadow(0 0 2px ").concat(agentShadowColor, ")")
68
76
  });
69
77
  var imageStyle = convertToInlineCss({
70
78
  display: 'block',
@@ -134,7 +142,7 @@ export var contributorAvatarRenderer = function contributorAvatarRenderer(_ref)
134
142
  if (contributor.avatarUrl) {
135
143
  var _contributor$agentKin2;
136
144
  // Claude/ChatGPT always use their fixed glyph, even when the profile also has an avatar
137
- // URL. Other agents (e.g. Rovo/Figma/Lovable/Replit) and users prefer the real avatar.
145
+ // URL. Other agents (e.g. Rovo/Figma/Lovable/Replit/Slack) and users prefer the real avatar.
138
146
  var usesFixedGlyph = isAgent && FIXED_GLYPH_AGENT_KINDS.has((_contributor$agentKin2 = contributor.agentKind) !== null && _contributor$agentKin2 !== void 0 ? _contributor$agentKin2 : 'external');
139
147
  if (usesFixedGlyph) {
140
148
  showContributorIcon();
@@ -25,47 +25,13 @@ var getTagAccent = function getTagAccent(_ref) {
25
25
  return getAccentTokens(accent);
26
26
  };
27
27
 
28
- /** ChatGPT's own brand colour, resolved from the shared `@atlaskit/agent-color` registry. */
29
- var chatgptBrandColor = getThirdPartyAgentColor({
30
- agentName: 'chatgpt'
31
- });
32
- var figmaBrandColor = getThirdPartyAgentColor({
33
- agentName: 'figma'
34
- });
35
- var lovableBrandColor = getThirdPartyAgentColor({
36
- agentName: 'lovable'
37
- });
38
- var replitBrandColor = getThirdPartyAgentColor({
39
- agentName: 'replit'
40
- });
41
-
42
- /** Brand accents for agent kinds with no ADS token match. New agents opt in by adding an entry. */
43
- var AGENT_KIND_ACCENT_OVERRIDES = _objectSpread(_objectSpread(_objectSpread(_objectSpread({
28
+ /** Bespoke accents for agent kinds that use standard ADS tokens rather than the agent-color registry. */
29
+ var BESPOKE_AGENT_ACCENTS = {
44
30
  rovo: {
45
31
  background: "var(--ds-background-neutral-bold, #292A2E)",
46
32
  text: "var(--ds-text-inverse, #FFFFFF)"
47
33
  }
48
- }, chatgptBrandColor ? {
49
- chatgpt: {
50
- background: chatgptBrandColor.bold,
51
- text: chatgptBrandColor.boldText
52
- }
53
- } : {}), figmaBrandColor ? {
54
- figma: {
55
- background: figmaBrandColor.bold,
56
- text: figmaBrandColor.boldText
57
- }
58
- } : {}), lovableBrandColor ? {
59
- lovable: {
60
- background: lovableBrandColor.bold,
61
- text: lovableBrandColor.boldText
62
- }
63
- } : {}), replitBrandColor ? {
64
- replit: {
65
- background: replitBrandColor.bold,
66
- text: replitBrandColor.boldText
67
- }
68
- } : {});
34
+ };
69
35
 
70
36
  /**
71
37
  * Keyboard focus, as a member of `revealSources` alongside the elements the pointer can be over. It
@@ -420,8 +386,23 @@ export var ContributorTagController = /*#__PURE__*/function () {
420
386
  isInserted: (_model$isInserted = model.isInserted) !== null && _model$isInserted !== void 0 ? _model$isInserted : true
421
387
  });
422
388
  var agentKind = (_model$contributor$ag = model.contributor.agentKind) !== null && _model$contributor$ag !== void 0 ? _model$contributor$ag : (_model$connectedContr = model.connectedContributor) === null || _model$connectedContr === void 0 ? void 0 : _model$connectedContr.agentKind;
423
- var override = agentKind && AGENT_KIND_ACCENT_OVERRIDES[agentKind];
424
- return override ? _objectSpread(_objectSpread({}, accent), override) : accent;
389
+ if (!agentKind) {
390
+ return accent;
391
+ }
392
+ var bespoke = BESPOKE_AGENT_ACCENTS[agentKind];
393
+ if (bespoke) {
394
+ return _objectSpread(_objectSpread({}, accent), bespoke);
395
+ }
396
+
397
+ // The attribution colour map shares one palette slot between most brands, so the scheme alone
398
+ // cannot tell them apart; the registry holds each brand's own pair.
399
+ var brandColor = getThirdPartyAgentColor({
400
+ agentName: agentKind
401
+ });
402
+ return brandColor ? _objectSpread(_objectSpread({}, accent), {}, {
403
+ background: brandColor.bold,
404
+ text: brandColor.boldText
405
+ }) : accent;
425
406
  }
426
407
  }, {
427
408
  key: "applyAccent",
@@ -39,7 +39,7 @@ export type StepWithAttribution<TStep> = {
39
39
  stepAttribution?: DiffStepAttribution;
40
40
  };
41
41
  /** Branded agent presentations supported by contributor tags. */
42
- export type DiffAgentBrand = 'rovo' | 'claude' | 'chatgpt' | 'figma' | 'lovable' | 'replit';
42
+ export type DiffAgentBrand = 'rovo' | 'claude' | 'chatgpt' | 'figma' | 'lovable' | 'replit' | 'amplitude' | 'cortex' | 'databricks' | 'gemini' | 'manus' | 'slack';
43
43
  export declare const DIFF_AGENT_BRANDS: ReadonlySet<DiffAgentBrand>;
44
44
  /** The brand id `@atlaskit/agent-color` registers each `AgentBrandColorScheme` under. */
45
45
  type AgentColorBrandId = AgentBrandColorScheme extends `agent-brand-${infer BrandId}` ? BrandId : never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-show-diff",
3
- "version": "24.0.2",
3
+ "version": "24.1.0",
4
4
  "description": "ShowDiff plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -34,7 +34,7 @@
34
34
  "@atlaskit/editor-plugin-limited-mode": "^23.0.0",
35
35
  "@atlaskit/editor-plugin-user-intent": "^24.0.0",
36
36
  "@atlaskit/editor-prosemirror": "^9.0.0",
37
- "@atlaskit/editor-shared-styles": "^4.3.0",
37
+ "@atlaskit/editor-shared-styles": "^4.4.0",
38
38
  "@atlaskit/editor-tables": "^3.2.0",
39
39
  "@atlaskit/platform-feature-experiments": "^0.3.0",
40
40
  "@atlaskit/platform-feature-flags": "^2.2.0",
@@ -71,7 +71,7 @@
71
71
  "react-intl": "^7.0.0"
72
72
  },
73
73
  "peerDependencies": {
74
- "@atlaskit/editor-common": "^130.1.0",
74
+ "@atlaskit/editor-common": "^130.2.0",
75
75
  "react": "^18.2.0 || ^19.2.0",
76
76
  "react-dom": "^18.2.0 || ^19.2.0",
77
77
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"