@atlaskit/editor-plugin-show-diff 21.0.0 → 21.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/cjs/pm-plugins/resolveDiffContributors.js +3 -3
- package/dist/cjs/ui/ContributorTag/contributorAvatarRenderer.js +8 -9
- package/dist/cjs/ui/ContributorTag/contributorTagIcons.js +1 -8
- package/dist/es2019/pm-plugins/resolveDiffContributors.js +3 -3
- package/dist/es2019/ui/ContributorTag/contributorAvatarRenderer.js +8 -9
- package/dist/es2019/ui/ContributorTag/contributorTagIcons.js +1 -8
- package/dist/esm/pm-plugins/resolveDiffContributors.js +3 -3
- package/dist/esm/ui/ContributorTag/contributorAvatarRenderer.js +8 -9
- package/dist/esm/ui/ContributorTag/contributorTagIcons.js +1 -8
- package/dist/types/ui/ContributorTag/contributorTagIcons.d.ts +1 -4
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-show-diff
|
|
2
2
|
|
|
3
|
+
## 21.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`df1aa098e75d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/df1aa098e75d3) -
|
|
8
|
+
Contributor tags now always render Rovo's real avatar URL when available, instead of the hardcoded
|
|
9
|
+
Rovo glyph. The glyph was removed; the generic agent fallback is used when no URL is supplied or
|
|
10
|
+
it fails to load, matching Figma/Lovable/Replit.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 21.0.0
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -30,10 +30,10 @@ var SHOW_DIFF_AGENT_BRANDS = {
|
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Brands that prefer the account's real avatar over their fixed glyph when the invoking profile
|
|
33
|
-
* has one. Claude/ChatGPT
|
|
34
|
-
*
|
|
33
|
+
* has one. Claude/ChatGPT intentionally keep their fixed glyph always (see `AGENT_KIND_ICONS` in
|
|
34
|
+
* `contributorAvatarRenderer.ts`).
|
|
35
35
|
*/
|
|
36
|
-
var AVATAR_ELIGIBLE_BRANDS = new Set(['figma', 'lovable', 'replit']);
|
|
36
|
+
var AVATAR_ELIGIBLE_BRANDS = new Set(['figma', 'lovable', 'replit', 'rovo']);
|
|
37
37
|
|
|
38
38
|
/** Known external agent types emitted by Confluence's agent identification service that carry
|
|
39
39
|
* no `@atlaskit/agent-color` brand — a generic labelled fallback. */
|
|
@@ -10,25 +10,24 @@ var _default = require("@atlaskit/avatar/constants/default");
|
|
|
10
10
|
var _lazyNodeView = require("@atlaskit/editor-common/lazy-node-view");
|
|
11
11
|
var _contributorTagIcons = require("./contributorTagIcons");
|
|
12
12
|
/**
|
|
13
|
-
* Agent kinds with a custom contributor-tag icon
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* Agent kinds with a custom contributor-tag icon, used as a fallback glyph when no `avatarUrl` is
|
|
14
|
+
* available or its image fails to load (see `showContributorIcon`). Rovo/Figma/Lovable/Replit have
|
|
15
|
+
* no entry here — they fall back to the generic `aiAgent` glyph. The declared type stays the wider
|
|
16
16
|
* `TagContributor['agentKind']` so indexing below (with `'identified' | 'external'` in play too)
|
|
17
17
|
* stays safely partial.
|
|
18
18
|
*/
|
|
19
19
|
var AGENT_KIND_ICONS = {
|
|
20
20
|
claude: 'claude',
|
|
21
|
-
chatgpt: 'chatgpt'
|
|
22
|
-
rovo: 'rovoHex'
|
|
21
|
+
chatgpt: 'chatgpt'
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
/**
|
|
26
25
|
* Brands that always render their fixed glyph, even when the contributor also carries an
|
|
27
|
-
* `avatarUrl`. Figma/Lovable/Replit are excluded here and use the real avatar when
|
|
26
|
+
* `avatarUrl`. Rovo/Figma/Lovable/Replit are excluded here and use the real avatar when
|
|
28
27
|
* `resolveDiffContributors` supplies one, falling back to the generic `aiAgent` glyph on load
|
|
29
28
|
* failure.
|
|
30
29
|
*/
|
|
31
|
-
var FIXED_GLYPH_AGENT_KINDS = new Set(['claude', 'chatgpt'
|
|
30
|
+
var FIXED_GLYPH_AGENT_KINDS = new Set(['claude', 'chatgpt']);
|
|
32
31
|
|
|
33
32
|
/** The size `@atlaskit/avatar`'s `xxsmall` rendered at. */
|
|
34
33
|
var AVATAR_SIZE = _avatarSizes.AVATAR_SIZES.xxsmall;
|
|
@@ -125,8 +124,8 @@ var contributorAvatarRenderer = exports.contributorAvatarRenderer = function con
|
|
|
125
124
|
};
|
|
126
125
|
if (contributor.avatarUrl) {
|
|
127
126
|
var _contributor$agentKin2;
|
|
128
|
-
// Claude/ChatGPT
|
|
129
|
-
//
|
|
127
|
+
// Claude/ChatGPT always use their fixed glyph, even when the profile also has an avatar
|
|
128
|
+
// URL. Other agents (e.g. Rovo/Figma/Lovable/Replit) and users prefer the real avatar.
|
|
130
129
|
var usesFixedGlyph = isAgent && FIXED_GLYPH_AGENT_KINDS.has((_contributor$agentKin2 = contributor.agentKind) !== null && _contributor$agentKin2 !== void 0 ? _contributor$agentKin2 : 'external');
|
|
131
130
|
if (usesFixedGlyph) {
|
|
132
131
|
showContributorIcon();
|
|
@@ -10,9 +10,6 @@ exports.getContributorTagIcon = void 0;
|
|
|
10
10
|
* Neither `@atlaskit/icon`, `@atlaskit/icon-lab` nor `@atlaskit/logo` exposes a raw-SVG entry
|
|
11
11
|
* point, so the markup is copied here rather than kept as a React island for these glyphs. Keep in
|
|
12
12
|
* sync with the sources named on each constant.
|
|
13
|
-
*
|
|
14
|
-
* The Rovo hex is the `brand` appearance, whose `--rovo-*-color` variables resolve to `initial` in
|
|
15
|
-
* both themes — the fallbacks below are the rendered colours, so no theme observer is needed.
|
|
16
13
|
*/
|
|
17
14
|
|
|
18
15
|
/** `@atlaskit/icon/core/person`, at the 16px the avatar renders it. */
|
|
@@ -28,9 +25,6 @@ var AI_BOT_ICON_SVG = "<svg width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0
|
|
|
28
25
|
*/
|
|
29
26
|
var AI_AGENT_ICON_SVG = "<svg width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 16 16\" role=\"presentation\" style=\"display:block\"><path fill=\"currentcolor\" fill-rule=\"evenodd\" d=\"M6.971.493a2 2 0 0 1 2.058 0l5 3A2 2 0 0 1 15 5.208v5.584a2 2 0 0 1-.971 1.715l-5 3a2 2 0 0 1-2.058 0l-5-3A2 2 0 0 1 1 10.792V5.208a2 2 0 0 1 .971-1.715zm1.286 1.286a.5.5 0 0 0-.514 0l-5 3a.5.5 0 0 0-.243.429v5.584a.5.5 0 0 0 .243.429l1.098.66a4.25 4.25 0 1 1 8.318 0l1.098-.66a.5.5 0 0 0 .243-.429V5.208a.5.5 0 0 0-.243-.429zM8 8.25a2.75 2.75 0 1 0 0 5.5 2.75 2.75 0 0 0 0-5.5\" clip-rule=\"evenodd\"/></svg>";
|
|
30
27
|
|
|
31
|
-
/** `RovoHexIcon` from `@atlaskit/logo/rovo-hex/icon`, at the 16px `xxsmall` renders. */
|
|
32
|
-
var ROVO_HEX_ICON_SVG = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" role=\"presentation\" style=\"display:block\"><path fill=\"#1868db\" fill-rule=\"evenodd\" d=\"m13.227 16.789-7.154 4.169-3.403-1.96a2.72 2.72 0 0 1-1.362-2.355V7.366c0-.973.518-1.87 1.361-2.354l6.044-3.487-.038.114a3.6 3.6 0 0 0-.172 1.088v9.278c0 1.274.68 2.45 1.786 3.085z\" clip-rule=\"evenodd\"/><path fill=\"#6a9a23\" fill-rule=\"evenodd\" d=\"m11.296 15.671-7.193 4.153 6.607 3.812a2.73 2.73 0 0 0 2.676.026l.048-.033a2.73 2.73 0 0 0 1.232-1.525 2.7 2.7 0 0 0 .127-.822v-3.594z\" clip-rule=\"evenodd\"/><path fill=\"#af59e1\" fill-rule=\"evenodd\" d=\"m21.477 5.003-4.404-2.539-5.904 4.89 2.69 1.556a3.56 3.56 0 0 1 1.785 3.086v9.277a3.6 3.6 0 0 1-.21 1.202l6.044-3.486a2.71 2.71 0 0 0 1.362-2.355V7.357c0-.97-.521-1.87-1.363-2.354\" clip-rule=\"evenodd\"/><path fill=\"#fca700\" fill-rule=\"evenodd\" d=\"M12.74 8.266 9.353 6.312V2.718c0-.283.044-.56.127-.821A2.73 2.73 0 0 1 10.71.372V.37a.4.4 0 0 0 .048-.033 2.73 2.73 0 0 1 2.676.026l6.499 3.75z\" clip-rule=\"evenodd\"/></svg>";
|
|
33
|
-
|
|
34
28
|
/** Claude hexagon lockup from the brand asset: the hexagon and knot glyph both baked in. */
|
|
35
29
|
var CLAUDE_ICON_SVG = "<svg width=\"16\" height=\"18\" viewBox=\"0 0 16 18\" fill=\"none\" role=\"presentation\" style=\"display:block\"><path fill=\"#D97757\" d=\"M14.5007 3.28903L9.50384 0.402344C8.5736 -0.13506 7.42701 -0.134016 6.49774 0.405082L1.49458 3.30759C0.569434 3.8443 0 4.83297 0 5.90253V11.1804C0 12.2519 0.571497 13.2421 1.49931 13.7781L6.49931 16.6666C7.42787 17.203 8.57213 17.203 9.50069 16.6666L14.5007 13.7781C15.4285 13.2421 16 12.2519 16 11.1804V5.88671C16 4.8152 15.4285 3.82504 14.5007 3.28903Z\"/><path fill=\"#FAF9F6\" d=\"M5.19791 10.055L7.0123 9.03681L7.04267 8.94806L7.0123 8.89907H6.92357L6.62 8.88034L5.58321 8.85232L4.68418 8.815L3.81317 8.76826L3.59367 8.72158L3.38818 8.4507L3.4092 8.31526L3.59367 8.1915L3.85754 8.21485L4.44133 8.25455L5.317 8.31526L5.95216 8.35262L6.89321 8.4507H7.04267L7.06368 8.38999L7.0123 8.35262L6.97261 8.31526L6.06658 7.70112L5.08582 7.05196L4.5721 6.67834L4.29422 6.48919L4.15411 6.31172L4.09339 5.92409L4.34559 5.64621L4.68418 5.66956L4.77058 5.69291L5.11384 5.95678L5.84708 6.52422L6.80448 7.22943L6.94459 7.34618L7.00063 7.30649L7.00763 7.27846L6.94459 7.17338L6.42385 6.23233L5.86809 5.27492L5.62057 4.87795L5.55519 4.63977C5.53183 4.54169 5.51549 4.45996 5.51549 4.35956L5.80271 3.96959L5.9615 3.91821L6.34446 3.96959L6.50558 4.10969L6.74377 4.65378L7.12907 5.51077L7.72686 6.676L7.90199 7.0216L7.99539 7.34152L8.0304 7.43959H8.09113V7.38354L8.14018 6.72737L8.23124 5.92175L8.31999 4.88496L8.35032 4.59307L8.49511 4.24279L8.78232 4.05365L9.00649 4.16107L9.19098 4.42494L9.16533 4.5954L9.05555 5.30762L8.84073 6.42381L8.70062 7.17105H8.78232L8.87574 7.07764L9.25401 6.57559L9.88922 5.78165L10.1694 5.4664L10.4963 5.11847L10.7065 4.95267H11.1035L11.3953 5.38701L11.2646 5.83535L10.8559 6.35375L10.5173 6.79276L10.0316 7.4466L9.72807 7.96966L9.7561 8.0117L9.82849 8.00469L10.926 7.77118L11.5191 7.66376L12.2266 7.54233L12.5466 7.69178L12.5816 7.84356L12.4555 8.15414L11.6989 8.34095L10.8116 8.51842L9.48985 8.83136L9.4735 8.84303L9.49223 8.86637L10.0877 8.92241L10.3422 8.93639H10.9657L12.1262 9.02283L12.4298 9.2236L12.612 9.46881L12.5816 9.6556L12.1146 9.89382L11.4841 9.74434L10.013 9.3941L9.50858 9.26797H9.43849V9.31004L9.85882 9.721L10.6294 10.4169L11.5938 11.3136L11.6429 11.5354L11.5191 11.7106L11.3884 11.6918L10.5407 11.0544L10.2137 10.7672L9.4735 10.1436H9.42451V10.209L9.59495 10.4589L10.4963 11.8133L10.543 12.2289L10.4776 12.3644L10.2441 12.4461L9.98726 12.3994L9.45952 11.6592L8.91544 10.8255L8.47645 10.0783L8.42271 10.1086L8.16352 12.8991L8.04207 13.0416L7.76188 13.149L7.52837 12.9715L7.40461 12.6843L7.52837 12.1168L7.67781 11.3766L7.79925 10.7881L7.90899 10.0573L7.97438 9.81443L7.96971 9.79808L7.916 9.80507L7.36491 10.5617L6.5266 11.6942L5.86342 12.4041L5.70463 12.4671L5.42909 12.3247L5.45477 12.0702L5.60889 11.8436L6.5266 10.6761L7.08002 9.95217L7.4373 9.53421L7.43497 9.47349H7.41395L4.97607 11.0567L4.54174 11.1127L4.35493 10.9376L4.37828 10.6504L4.46702 10.557L5.20024 10.0526L5.19791 10.055Z\"/></svg>";
|
|
36
30
|
|
|
@@ -41,8 +35,7 @@ var markup = {
|
|
|
41
35
|
aiBot: AI_BOT_ICON_SVG,
|
|
42
36
|
chatgpt: CHATGPT_ICON_SVG,
|
|
43
37
|
claude: CLAUDE_ICON_SVG,
|
|
44
|
-
person: PERSON_ICON_SVG
|
|
45
|
-
rovoHex: ROVO_HEX_ICON_SVG
|
|
38
|
+
person: PERSON_ICON_SVG
|
|
46
39
|
};
|
|
47
40
|
|
|
48
41
|
/**
|
|
@@ -18,10 +18,10 @@ const SHOW_DIFF_AGENT_BRANDS = {
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Brands that prefer the account's real avatar over their fixed glyph when the invoking profile
|
|
21
|
-
* has one. Claude/ChatGPT
|
|
22
|
-
*
|
|
21
|
+
* has one. Claude/ChatGPT intentionally keep their fixed glyph always (see `AGENT_KIND_ICONS` in
|
|
22
|
+
* `contributorAvatarRenderer.ts`).
|
|
23
23
|
*/
|
|
24
|
-
const AVATAR_ELIGIBLE_BRANDS = new Set(['figma', 'lovable', 'replit']);
|
|
24
|
+
const AVATAR_ELIGIBLE_BRANDS = new Set(['figma', 'lovable', 'replit', 'rovo']);
|
|
25
25
|
|
|
26
26
|
/** Known external agent types emitted by Confluence's agent identification service that carry
|
|
27
27
|
* no `@atlaskit/agent-color` brand — a generic labelled fallback. */
|
|
@@ -5,25 +5,24 @@ import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
|
5
5
|
import { getContributorTagIcon } from './contributorTagIcons';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Agent kinds with a custom contributor-tag icon
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Agent kinds with a custom contributor-tag icon, used as a fallback glyph when no `avatarUrl` is
|
|
9
|
+
* available or its image fails to load (see `showContributorIcon`). Rovo/Figma/Lovable/Replit have
|
|
10
|
+
* no entry here — they fall back to the generic `aiAgent` glyph. The declared type stays the wider
|
|
11
11
|
* `TagContributor['agentKind']` so indexing below (with `'identified' | 'external'` in play too)
|
|
12
12
|
* stays safely partial.
|
|
13
13
|
*/
|
|
14
14
|
const AGENT_KIND_ICONS = {
|
|
15
15
|
claude: 'claude',
|
|
16
|
-
chatgpt: 'chatgpt'
|
|
17
|
-
rovo: 'rovoHex'
|
|
16
|
+
chatgpt: 'chatgpt'
|
|
18
17
|
};
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
20
|
* Brands that always render their fixed glyph, even when the contributor also carries an
|
|
22
|
-
* `avatarUrl`. Figma/Lovable/Replit are excluded here and use the real avatar when
|
|
21
|
+
* `avatarUrl`. Rovo/Figma/Lovable/Replit are excluded here and use the real avatar when
|
|
23
22
|
* `resolveDiffContributors` supplies one, falling back to the generic `aiAgent` glyph on load
|
|
24
23
|
* failure.
|
|
25
24
|
*/
|
|
26
|
-
const FIXED_GLYPH_AGENT_KINDS = new Set(['claude', 'chatgpt'
|
|
25
|
+
const FIXED_GLYPH_AGENT_KINDS = new Set(['claude', 'chatgpt']);
|
|
27
26
|
|
|
28
27
|
/** The size `@atlaskit/avatar`'s `xxsmall` rendered at. */
|
|
29
28
|
const AVATAR_SIZE = AVATAR_SIZES.xxsmall;
|
|
@@ -121,8 +120,8 @@ export const contributorAvatarRenderer = ({
|
|
|
121
120
|
};
|
|
122
121
|
if (contributor.avatarUrl) {
|
|
123
122
|
var _contributor$agentKin2;
|
|
124
|
-
// Claude/ChatGPT
|
|
125
|
-
//
|
|
123
|
+
// Claude/ChatGPT always use their fixed glyph, even when the profile also has an avatar
|
|
124
|
+
// URL. Other agents (e.g. Rovo/Figma/Lovable/Replit) and users prefer the real avatar.
|
|
126
125
|
const usesFixedGlyph = isAgent && FIXED_GLYPH_AGENT_KINDS.has((_contributor$agentKin2 = contributor.agentKind) !== null && _contributor$agentKin2 !== void 0 ? _contributor$agentKin2 : 'external');
|
|
127
126
|
if (usesFixedGlyph) {
|
|
128
127
|
showContributorIcon();
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
* Neither `@atlaskit/icon`, `@atlaskit/icon-lab` nor `@atlaskit/logo` exposes a raw-SVG entry
|
|
5
5
|
* point, so the markup is copied here rather than kept as a React island for these glyphs. Keep in
|
|
6
6
|
* sync with the sources named on each constant.
|
|
7
|
-
*
|
|
8
|
-
* The Rovo hex is the `brand` appearance, whose `--rovo-*-color` variables resolve to `initial` in
|
|
9
|
-
* both themes — the fallbacks below are the rendered colours, so no theme observer is needed.
|
|
10
7
|
*/
|
|
11
8
|
|
|
12
9
|
/** `@atlaskit/icon/core/person`, at the 16px the avatar renders it. */
|
|
@@ -22,9 +19,6 @@ const AI_BOT_ICON_SVG = `<svg width="12" height="12" fill="none" viewBox="0 0 16
|
|
|
22
19
|
*/
|
|
23
20
|
const AI_AGENT_ICON_SVG = `<svg width="12" height="12" fill="none" viewBox="0 0 16 16" role="presentation" style="display:block"><path fill="currentcolor" fill-rule="evenodd" d="M6.971.493a2 2 0 0 1 2.058 0l5 3A2 2 0 0 1 15 5.208v5.584a2 2 0 0 1-.971 1.715l-5 3a2 2 0 0 1-2.058 0l-5-3A2 2 0 0 1 1 10.792V5.208a2 2 0 0 1 .971-1.715zm1.286 1.286a.5.5 0 0 0-.514 0l-5 3a.5.5 0 0 0-.243.429v5.584a.5.5 0 0 0 .243.429l1.098.66a4.25 4.25 0 1 1 8.318 0l1.098-.66a.5.5 0 0 0 .243-.429V5.208a.5.5 0 0 0-.243-.429zM8 8.25a2.75 2.75 0 1 0 0 5.5 2.75 2.75 0 0 0 0-5.5" clip-rule="evenodd"/></svg>`;
|
|
24
21
|
|
|
25
|
-
/** `RovoHexIcon` from `@atlaskit/logo/rovo-hex/icon`, at the 16px `xxsmall` renders. */
|
|
26
|
-
const ROVO_HEX_ICON_SVG = `<svg width="16" height="16" viewBox="0 0 24 24" role="presentation" style="display:block"><path fill="#1868db" fill-rule="evenodd" d="m13.227 16.789-7.154 4.169-3.403-1.96a2.72 2.72 0 0 1-1.362-2.355V7.366c0-.973.518-1.87 1.361-2.354l6.044-3.487-.038.114a3.6 3.6 0 0 0-.172 1.088v9.278c0 1.274.68 2.45 1.786 3.085z" clip-rule="evenodd"/><path fill="#6a9a23" fill-rule="evenodd" d="m11.296 15.671-7.193 4.153 6.607 3.812a2.73 2.73 0 0 0 2.676.026l.048-.033a2.73 2.73 0 0 0 1.232-1.525 2.7 2.7 0 0 0 .127-.822v-3.594z" clip-rule="evenodd"/><path fill="#af59e1" fill-rule="evenodd" d="m21.477 5.003-4.404-2.539-5.904 4.89 2.69 1.556a3.56 3.56 0 0 1 1.785 3.086v9.277a3.6 3.6 0 0 1-.21 1.202l6.044-3.486a2.71 2.71 0 0 0 1.362-2.355V7.357c0-.97-.521-1.87-1.363-2.354" clip-rule="evenodd"/><path fill="#fca700" fill-rule="evenodd" d="M12.74 8.266 9.353 6.312V2.718c0-.283.044-.56.127-.821A2.73 2.73 0 0 1 10.71.372V.37a.4.4 0 0 0 .048-.033 2.73 2.73 0 0 1 2.676.026l6.499 3.75z" clip-rule="evenodd"/></svg>`;
|
|
27
|
-
|
|
28
22
|
/** Claude hexagon lockup from the brand asset: the hexagon and knot glyph both baked in. */
|
|
29
23
|
const CLAUDE_ICON_SVG = `<svg width="16" height="18" viewBox="0 0 16 18" fill="none" role="presentation" style="display:block"><path fill="#D97757" d="M14.5007 3.28903L9.50384 0.402344C8.5736 -0.13506 7.42701 -0.134016 6.49774 0.405082L1.49458 3.30759C0.569434 3.8443 0 4.83297 0 5.90253V11.1804C0 12.2519 0.571497 13.2421 1.49931 13.7781L6.49931 16.6666C7.42787 17.203 8.57213 17.203 9.50069 16.6666L14.5007 13.7781C15.4285 13.2421 16 12.2519 16 11.1804V5.88671C16 4.8152 15.4285 3.82504 14.5007 3.28903Z"/><path fill="#FAF9F6" d="M5.19791 10.055L7.0123 9.03681L7.04267 8.94806L7.0123 8.89907H6.92357L6.62 8.88034L5.58321 8.85232L4.68418 8.815L3.81317 8.76826L3.59367 8.72158L3.38818 8.4507L3.4092 8.31526L3.59367 8.1915L3.85754 8.21485L4.44133 8.25455L5.317 8.31526L5.95216 8.35262L6.89321 8.4507H7.04267L7.06368 8.38999L7.0123 8.35262L6.97261 8.31526L6.06658 7.70112L5.08582 7.05196L4.5721 6.67834L4.29422 6.48919L4.15411 6.31172L4.09339 5.92409L4.34559 5.64621L4.68418 5.66956L4.77058 5.69291L5.11384 5.95678L5.84708 6.52422L6.80448 7.22943L6.94459 7.34618L7.00063 7.30649L7.00763 7.27846L6.94459 7.17338L6.42385 6.23233L5.86809 5.27492L5.62057 4.87795L5.55519 4.63977C5.53183 4.54169 5.51549 4.45996 5.51549 4.35956L5.80271 3.96959L5.9615 3.91821L6.34446 3.96959L6.50558 4.10969L6.74377 4.65378L7.12907 5.51077L7.72686 6.676L7.90199 7.0216L7.99539 7.34152L8.0304 7.43959H8.09113V7.38354L8.14018 6.72737L8.23124 5.92175L8.31999 4.88496L8.35032 4.59307L8.49511 4.24279L8.78232 4.05365L9.00649 4.16107L9.19098 4.42494L9.16533 4.5954L9.05555 5.30762L8.84073 6.42381L8.70062 7.17105H8.78232L8.87574 7.07764L9.25401 6.57559L9.88922 5.78165L10.1694 5.4664L10.4963 5.11847L10.7065 4.95267H11.1035L11.3953 5.38701L11.2646 5.83535L10.8559 6.35375L10.5173 6.79276L10.0316 7.4466L9.72807 7.96966L9.7561 8.0117L9.82849 8.00469L10.926 7.77118L11.5191 7.66376L12.2266 7.54233L12.5466 7.69178L12.5816 7.84356L12.4555 8.15414L11.6989 8.34095L10.8116 8.51842L9.48985 8.83136L9.4735 8.84303L9.49223 8.86637L10.0877 8.92241L10.3422 8.93639H10.9657L12.1262 9.02283L12.4298 9.2236L12.612 9.46881L12.5816 9.6556L12.1146 9.89382L11.4841 9.74434L10.013 9.3941L9.50858 9.26797H9.43849V9.31004L9.85882 9.721L10.6294 10.4169L11.5938 11.3136L11.6429 11.5354L11.5191 11.7106L11.3884 11.6918L10.5407 11.0544L10.2137 10.7672L9.4735 10.1436H9.42451V10.209L9.59495 10.4589L10.4963 11.8133L10.543 12.2289L10.4776 12.3644L10.2441 12.4461L9.98726 12.3994L9.45952 11.6592L8.91544 10.8255L8.47645 10.0783L8.42271 10.1086L8.16352 12.8991L8.04207 13.0416L7.76188 13.149L7.52837 12.9715L7.40461 12.6843L7.52837 12.1168L7.67781 11.3766L7.79925 10.7881L7.90899 10.0573L7.97438 9.81443L7.96971 9.79808L7.916 9.80507L7.36491 10.5617L6.5266 11.6942L5.86342 12.4041L5.70463 12.4671L5.42909 12.3247L5.45477 12.0702L5.60889 11.8436L6.5266 10.6761L7.08002 9.95217L7.4373 9.53421L7.43497 9.47349H7.41395L4.97607 11.0567L4.54174 11.1127L4.35493 10.9376L4.37828 10.6504L4.46702 10.557L5.20024 10.0526L5.19791 10.055Z"/></svg>`;
|
|
30
24
|
|
|
@@ -35,8 +29,7 @@ const markup = {
|
|
|
35
29
|
aiBot: AI_BOT_ICON_SVG,
|
|
36
30
|
chatgpt: CHATGPT_ICON_SVG,
|
|
37
31
|
claude: CLAUDE_ICON_SVG,
|
|
38
|
-
person: PERSON_ICON_SVG
|
|
39
|
-
rovoHex: ROVO_HEX_ICON_SVG
|
|
32
|
+
person: PERSON_ICON_SVG
|
|
40
33
|
};
|
|
41
34
|
|
|
42
35
|
/**
|
|
@@ -24,10 +24,10 @@ var SHOW_DIFF_AGENT_BRANDS = {
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Brands that prefer the account's real avatar over their fixed glyph when the invoking profile
|
|
27
|
-
* has one. Claude/ChatGPT
|
|
28
|
-
*
|
|
27
|
+
* has one. Claude/ChatGPT intentionally keep their fixed glyph always (see `AGENT_KIND_ICONS` in
|
|
28
|
+
* `contributorAvatarRenderer.ts`).
|
|
29
29
|
*/
|
|
30
|
-
var AVATAR_ELIGIBLE_BRANDS = new Set(['figma', 'lovable', 'replit']);
|
|
30
|
+
var AVATAR_ELIGIBLE_BRANDS = new Set(['figma', 'lovable', 'replit', 'rovo']);
|
|
31
31
|
|
|
32
32
|
/** Known external agent types emitted by Confluence's agent identification service that carry
|
|
33
33
|
* no `@atlaskit/agent-color` brand — a generic labelled fallback. */
|
|
@@ -5,25 +5,24 @@ import { convertToInlineCss } from '@atlaskit/editor-common/lazy-node-view';
|
|
|
5
5
|
import { getContributorTagIcon } from './contributorTagIcons';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Agent kinds with a custom contributor-tag icon
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* Agent kinds with a custom contributor-tag icon, used as a fallback glyph when no `avatarUrl` is
|
|
9
|
+
* available or its image fails to load (see `showContributorIcon`). Rovo/Figma/Lovable/Replit have
|
|
10
|
+
* no entry here — they fall back to the generic `aiAgent` glyph. The declared type stays the wider
|
|
11
11
|
* `TagContributor['agentKind']` so indexing below (with `'identified' | 'external'` in play too)
|
|
12
12
|
* stays safely partial.
|
|
13
13
|
*/
|
|
14
14
|
var AGENT_KIND_ICONS = {
|
|
15
15
|
claude: 'claude',
|
|
16
|
-
chatgpt: 'chatgpt'
|
|
17
|
-
rovo: 'rovoHex'
|
|
16
|
+
chatgpt: 'chatgpt'
|
|
18
17
|
};
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
20
|
* Brands that always render their fixed glyph, even when the contributor also carries an
|
|
22
|
-
* `avatarUrl`. Figma/Lovable/Replit are excluded here and use the real avatar when
|
|
21
|
+
* `avatarUrl`. Rovo/Figma/Lovable/Replit are excluded here and use the real avatar when
|
|
23
22
|
* `resolveDiffContributors` supplies one, falling back to the generic `aiAgent` glyph on load
|
|
24
23
|
* failure.
|
|
25
24
|
*/
|
|
26
|
-
var FIXED_GLYPH_AGENT_KINDS = new Set(['claude', 'chatgpt'
|
|
25
|
+
var FIXED_GLYPH_AGENT_KINDS = new Set(['claude', 'chatgpt']);
|
|
27
26
|
|
|
28
27
|
/** The size `@atlaskit/avatar`'s `xxsmall` rendered at. */
|
|
29
28
|
var AVATAR_SIZE = AVATAR_SIZES.xxsmall;
|
|
@@ -120,8 +119,8 @@ export var contributorAvatarRenderer = function contributorAvatarRenderer(_ref)
|
|
|
120
119
|
};
|
|
121
120
|
if (contributor.avatarUrl) {
|
|
122
121
|
var _contributor$agentKin2;
|
|
123
|
-
// Claude/ChatGPT
|
|
124
|
-
//
|
|
122
|
+
// Claude/ChatGPT always use their fixed glyph, even when the profile also has an avatar
|
|
123
|
+
// URL. Other agents (e.g. Rovo/Figma/Lovable/Replit) and users prefer the real avatar.
|
|
125
124
|
var usesFixedGlyph = isAgent && FIXED_GLYPH_AGENT_KINDS.has((_contributor$agentKin2 = contributor.agentKind) !== null && _contributor$agentKin2 !== void 0 ? _contributor$agentKin2 : 'external');
|
|
126
125
|
if (usesFixedGlyph) {
|
|
127
126
|
showContributorIcon();
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
* Neither `@atlaskit/icon`, `@atlaskit/icon-lab` nor `@atlaskit/logo` exposes a raw-SVG entry
|
|
5
5
|
* point, so the markup is copied here rather than kept as a React island for these glyphs. Keep in
|
|
6
6
|
* sync with the sources named on each constant.
|
|
7
|
-
*
|
|
8
|
-
* The Rovo hex is the `brand` appearance, whose `--rovo-*-color` variables resolve to `initial` in
|
|
9
|
-
* both themes — the fallbacks below are the rendered colours, so no theme observer is needed.
|
|
10
7
|
*/
|
|
11
8
|
|
|
12
9
|
/** `@atlaskit/icon/core/person`, at the 16px the avatar renders it. */
|
|
@@ -22,9 +19,6 @@ var AI_BOT_ICON_SVG = "<svg width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0
|
|
|
22
19
|
*/
|
|
23
20
|
var AI_AGENT_ICON_SVG = "<svg width=\"12\" height=\"12\" fill=\"none\" viewBox=\"0 0 16 16\" role=\"presentation\" style=\"display:block\"><path fill=\"currentcolor\" fill-rule=\"evenodd\" d=\"M6.971.493a2 2 0 0 1 2.058 0l5 3A2 2 0 0 1 15 5.208v5.584a2 2 0 0 1-.971 1.715l-5 3a2 2 0 0 1-2.058 0l-5-3A2 2 0 0 1 1 10.792V5.208a2 2 0 0 1 .971-1.715zm1.286 1.286a.5.5 0 0 0-.514 0l-5 3a.5.5 0 0 0-.243.429v5.584a.5.5 0 0 0 .243.429l1.098.66a4.25 4.25 0 1 1 8.318 0l1.098-.66a.5.5 0 0 0 .243-.429V5.208a.5.5 0 0 0-.243-.429zM8 8.25a2.75 2.75 0 1 0 0 5.5 2.75 2.75 0 0 0 0-5.5\" clip-rule=\"evenodd\"/></svg>";
|
|
24
21
|
|
|
25
|
-
/** `RovoHexIcon` from `@atlaskit/logo/rovo-hex/icon`, at the 16px `xxsmall` renders. */
|
|
26
|
-
var ROVO_HEX_ICON_SVG = "<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" role=\"presentation\" style=\"display:block\"><path fill=\"#1868db\" fill-rule=\"evenodd\" d=\"m13.227 16.789-7.154 4.169-3.403-1.96a2.72 2.72 0 0 1-1.362-2.355V7.366c0-.973.518-1.87 1.361-2.354l6.044-3.487-.038.114a3.6 3.6 0 0 0-.172 1.088v9.278c0 1.274.68 2.45 1.786 3.085z\" clip-rule=\"evenodd\"/><path fill=\"#6a9a23\" fill-rule=\"evenodd\" d=\"m11.296 15.671-7.193 4.153 6.607 3.812a2.73 2.73 0 0 0 2.676.026l.048-.033a2.73 2.73 0 0 0 1.232-1.525 2.7 2.7 0 0 0 .127-.822v-3.594z\" clip-rule=\"evenodd\"/><path fill=\"#af59e1\" fill-rule=\"evenodd\" d=\"m21.477 5.003-4.404-2.539-5.904 4.89 2.69 1.556a3.56 3.56 0 0 1 1.785 3.086v9.277a3.6 3.6 0 0 1-.21 1.202l6.044-3.486a2.71 2.71 0 0 0 1.362-2.355V7.357c0-.97-.521-1.87-1.363-2.354\" clip-rule=\"evenodd\"/><path fill=\"#fca700\" fill-rule=\"evenodd\" d=\"M12.74 8.266 9.353 6.312V2.718c0-.283.044-.56.127-.821A2.73 2.73 0 0 1 10.71.372V.37a.4.4 0 0 0 .048-.033 2.73 2.73 0 0 1 2.676.026l6.499 3.75z\" clip-rule=\"evenodd\"/></svg>";
|
|
27
|
-
|
|
28
22
|
/** Claude hexagon lockup from the brand asset: the hexagon and knot glyph both baked in. */
|
|
29
23
|
var CLAUDE_ICON_SVG = "<svg width=\"16\" height=\"18\" viewBox=\"0 0 16 18\" fill=\"none\" role=\"presentation\" style=\"display:block\"><path fill=\"#D97757\" d=\"M14.5007 3.28903L9.50384 0.402344C8.5736 -0.13506 7.42701 -0.134016 6.49774 0.405082L1.49458 3.30759C0.569434 3.8443 0 4.83297 0 5.90253V11.1804C0 12.2519 0.571497 13.2421 1.49931 13.7781L6.49931 16.6666C7.42787 17.203 8.57213 17.203 9.50069 16.6666L14.5007 13.7781C15.4285 13.2421 16 12.2519 16 11.1804V5.88671C16 4.8152 15.4285 3.82504 14.5007 3.28903Z\"/><path fill=\"#FAF9F6\" d=\"M5.19791 10.055L7.0123 9.03681L7.04267 8.94806L7.0123 8.89907H6.92357L6.62 8.88034L5.58321 8.85232L4.68418 8.815L3.81317 8.76826L3.59367 8.72158L3.38818 8.4507L3.4092 8.31526L3.59367 8.1915L3.85754 8.21485L4.44133 8.25455L5.317 8.31526L5.95216 8.35262L6.89321 8.4507H7.04267L7.06368 8.38999L7.0123 8.35262L6.97261 8.31526L6.06658 7.70112L5.08582 7.05196L4.5721 6.67834L4.29422 6.48919L4.15411 6.31172L4.09339 5.92409L4.34559 5.64621L4.68418 5.66956L4.77058 5.69291L5.11384 5.95678L5.84708 6.52422L6.80448 7.22943L6.94459 7.34618L7.00063 7.30649L7.00763 7.27846L6.94459 7.17338L6.42385 6.23233L5.86809 5.27492L5.62057 4.87795L5.55519 4.63977C5.53183 4.54169 5.51549 4.45996 5.51549 4.35956L5.80271 3.96959L5.9615 3.91821L6.34446 3.96959L6.50558 4.10969L6.74377 4.65378L7.12907 5.51077L7.72686 6.676L7.90199 7.0216L7.99539 7.34152L8.0304 7.43959H8.09113V7.38354L8.14018 6.72737L8.23124 5.92175L8.31999 4.88496L8.35032 4.59307L8.49511 4.24279L8.78232 4.05365L9.00649 4.16107L9.19098 4.42494L9.16533 4.5954L9.05555 5.30762L8.84073 6.42381L8.70062 7.17105H8.78232L8.87574 7.07764L9.25401 6.57559L9.88922 5.78165L10.1694 5.4664L10.4963 5.11847L10.7065 4.95267H11.1035L11.3953 5.38701L11.2646 5.83535L10.8559 6.35375L10.5173 6.79276L10.0316 7.4466L9.72807 7.96966L9.7561 8.0117L9.82849 8.00469L10.926 7.77118L11.5191 7.66376L12.2266 7.54233L12.5466 7.69178L12.5816 7.84356L12.4555 8.15414L11.6989 8.34095L10.8116 8.51842L9.48985 8.83136L9.4735 8.84303L9.49223 8.86637L10.0877 8.92241L10.3422 8.93639H10.9657L12.1262 9.02283L12.4298 9.2236L12.612 9.46881L12.5816 9.6556L12.1146 9.89382L11.4841 9.74434L10.013 9.3941L9.50858 9.26797H9.43849V9.31004L9.85882 9.721L10.6294 10.4169L11.5938 11.3136L11.6429 11.5354L11.5191 11.7106L11.3884 11.6918L10.5407 11.0544L10.2137 10.7672L9.4735 10.1436H9.42451V10.209L9.59495 10.4589L10.4963 11.8133L10.543 12.2289L10.4776 12.3644L10.2441 12.4461L9.98726 12.3994L9.45952 11.6592L8.91544 10.8255L8.47645 10.0783L8.42271 10.1086L8.16352 12.8991L8.04207 13.0416L7.76188 13.149L7.52837 12.9715L7.40461 12.6843L7.52837 12.1168L7.67781 11.3766L7.79925 10.7881L7.90899 10.0573L7.97438 9.81443L7.96971 9.79808L7.916 9.80507L7.36491 10.5617L6.5266 11.6942L5.86342 12.4041L5.70463 12.4671L5.42909 12.3247L5.45477 12.0702L5.60889 11.8436L6.5266 10.6761L7.08002 9.95217L7.4373 9.53421L7.43497 9.47349H7.41395L4.97607 11.0567L4.54174 11.1127L4.35493 10.9376L4.37828 10.6504L4.46702 10.557L5.20024 10.0526L5.19791 10.055Z\"/></svg>";
|
|
30
24
|
|
|
@@ -35,8 +29,7 @@ var markup = {
|
|
|
35
29
|
aiBot: AI_BOT_ICON_SVG,
|
|
36
30
|
chatgpt: CHATGPT_ICON_SVG,
|
|
37
31
|
claude: CLAUDE_ICON_SVG,
|
|
38
|
-
person: PERSON_ICON_SVG
|
|
39
|
-
rovoHex: ROVO_HEX_ICON_SVG
|
|
32
|
+
person: PERSON_ICON_SVG
|
|
40
33
|
};
|
|
41
34
|
|
|
42
35
|
/**
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
* Neither `@atlaskit/icon`, `@atlaskit/icon-lab` nor `@atlaskit/logo` exposes a raw-SVG entry
|
|
5
5
|
* point, so the markup is copied here rather than kept as a React island for these glyphs. Keep in
|
|
6
6
|
* sync with the sources named on each constant.
|
|
7
|
-
*
|
|
8
|
-
* The Rovo hex is the `brand` appearance, whose `--rovo-*-color` variables resolve to `initial` in
|
|
9
|
-
* both themes — the fallbacks below are the rendered colours, so no theme observer is needed.
|
|
10
7
|
*/
|
|
11
|
-
export type ContributorTagIcon = 'aiAgent' | 'aiBot' | 'chatgpt' | 'claude' | 'person'
|
|
8
|
+
export type ContributorTagIcon = 'aiAgent' | 'aiBot' | 'chatgpt' | 'claude' | 'person';
|
|
12
9
|
export declare const getContributorTagIcon: (icon: ContributorTagIcon, doc: Document) => DocumentFragment;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-show-diff",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.1",
|
|
4
4
|
"description": "ShowDiff plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@atlaskit/adf-utils": "^20.9.0",
|
|
53
53
|
"@atlaskit/button": "^25.4.0",
|
|
54
54
|
"@atlaskit/css": "^1.1.0",
|
|
55
|
-
"@atlaskit/dropdown-menu": "^
|
|
55
|
+
"@atlaskit/dropdown-menu": "^21.0.0",
|
|
56
56
|
"@atlaskit/editor-core": "^233.0.0",
|
|
57
57
|
"@atlaskit/editor-json-transformer": "^10.0.0",
|
|
58
58
|
"@atlaskit/editor-plugins": "^16.1.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"react-intl": "^7.0.0"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@atlaskit/editor-common": "^127.
|
|
74
|
+
"@atlaskit/editor-common": "^127.1.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"
|