@oxy.so/bloom 20.0.0 → 21.0.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/docs/adoption-matrix.mdx +6 -7
- package/docs/agent-avatar.mdx +4 -4
- package/docs/agent-creator.mdx +13 -11
- package/docs/multi-agent-chat.mdx +1 -1
- package/docs/task-catalog.json +1 -1
- package/docs/task-catalog.mdx +1 -1
- package/lib/commonjs/agent-avatar/character.js +4 -4
- package/lib/commonjs/agent-creator/AgentCreator.js +4 -0
- package/lib/commonjs/agent-creator/AgentCreator.js.map +1 -1
- package/lib/commonjs/agent-creator/AgentCreator.web.js +12 -8
- package/lib/commonjs/agent-creator/AgentCreator.web.js.map +1 -1
- package/lib/commonjs/agent-creator/AgentCreatorBase.js +93 -48
- package/lib/commonjs/agent-creator/AgentCreatorBase.js.map +1 -1
- package/lib/commonjs/agent-creator/CustomColorPicker.js +431 -0
- package/lib/commonjs/agent-creator/CustomColorPicker.js.map +1 -0
- package/lib/commonjs/agent-creator/GlossArt.js +212 -0
- package/lib/commonjs/agent-creator/GlossArt.js.map +1 -0
- package/lib/commonjs/agent-creator/context.js.map +1 -1
- package/lib/commonjs/agent-creator/messages.js +22 -1
- package/lib/commonjs/agent-creator/messages.js.map +1 -1
- package/lib/commonjs/agent-creator/paint.js +19 -7
- package/lib/commonjs/agent-creator/paint.js.map +1 -1
- package/lib/commonjs/agent-creator/rainbow-artwork.js +10 -0
- package/lib/commonjs/agent-creator/rainbow-artwork.js.map +1 -0
- package/lib/commonjs/agent-creator/shared.js +28 -0
- package/lib/commonjs/agent-creator/shared.js.map +1 -1
- package/lib/commonjs/locale/translations/ar.js +22 -1
- package/lib/commonjs/locale/translations/ar.js.map +1 -1
- package/lib/commonjs/locale/translations/bn.js +22 -1
- package/lib/commonjs/locale/translations/bn.js.map +1 -1
- package/lib/commonjs/locale/translations/ca.js +22 -1
- package/lib/commonjs/locale/translations/ca.js.map +1 -1
- package/lib/commonjs/locale/translations/de.js +22 -1
- package/lib/commonjs/locale/translations/de.js.map +1 -1
- package/lib/commonjs/locale/translations/es.js +22 -1
- package/lib/commonjs/locale/translations/es.js.map +1 -1
- package/lib/commonjs/locale/translations/fr.js +22 -1
- package/lib/commonjs/locale/translations/fr.js.map +1 -1
- package/lib/commonjs/locale/translations/hi.js +22 -1
- package/lib/commonjs/locale/translations/hi.js.map +1 -1
- package/lib/commonjs/locale/translations/id.js +22 -1
- package/lib/commonjs/locale/translations/id.js.map +1 -1
- package/lib/commonjs/locale/translations/it.js +22 -1
- package/lib/commonjs/locale/translations/it.js.map +1 -1
- package/lib/commonjs/locale/translations/ja.js +22 -1
- package/lib/commonjs/locale/translations/ja.js.map +1 -1
- package/lib/commonjs/locale/translations/pt.js +22 -1
- package/lib/commonjs/locale/translations/pt.js.map +1 -1
- package/lib/commonjs/locale/translations/ru.js +22 -1
- package/lib/commonjs/locale/translations/ru.js.map +1 -1
- package/lib/commonjs/locale/translations/tr.js +22 -1
- package/lib/commonjs/locale/translations/tr.js.map +1 -1
- package/lib/commonjs/locale/translations/zh.js +22 -1
- package/lib/commonjs/locale/translations/zh.js.map +1 -1
- package/lib/commonjs/multi-agent-chat/data.js +2 -2
- package/lib/commonjs/multi-agent-chat/data.js.map +1 -1
- package/lib/module/agent-avatar/character.js +4 -4
- package/lib/module/agent-creator/AgentCreator.js +4 -0
- package/lib/module/agent-creator/AgentCreator.js.map +1 -1
- package/lib/module/agent-creator/AgentCreator.web.js +4 -0
- package/lib/module/agent-creator/AgentCreator.web.js.map +1 -1
- package/lib/module/agent-creator/AgentCreatorBase.js +89 -44
- package/lib/module/agent-creator/AgentCreatorBase.js.map +1 -1
- package/lib/module/agent-creator/CustomColorPicker.js +426 -0
- package/lib/module/agent-creator/CustomColorPicker.js.map +1 -0
- package/lib/module/agent-creator/GlossArt.js +207 -0
- package/lib/module/agent-creator/GlossArt.js.map +1 -0
- package/lib/module/agent-creator/context.js.map +1 -1
- package/lib/module/agent-creator/messages.js +22 -1
- package/lib/module/agent-creator/messages.js.map +1 -1
- package/lib/module/agent-creator/paint.js +18 -7
- package/lib/module/agent-creator/paint.js.map +1 -1
- package/lib/module/agent-creator/rainbow-artwork.js +6 -0
- package/lib/module/agent-creator/rainbow-artwork.js.map +1 -0
- package/lib/module/agent-creator/shared.js +26 -0
- package/lib/module/agent-creator/shared.js.map +1 -1
- package/lib/module/locale/translations/ar.js +22 -1
- package/lib/module/locale/translations/ar.js.map +1 -1
- package/lib/module/locale/translations/bn.js +22 -1
- package/lib/module/locale/translations/bn.js.map +1 -1
- package/lib/module/locale/translations/ca.js +22 -1
- package/lib/module/locale/translations/ca.js.map +1 -1
- package/lib/module/locale/translations/de.js +22 -1
- package/lib/module/locale/translations/de.js.map +1 -1
- package/lib/module/locale/translations/es.js +22 -1
- package/lib/module/locale/translations/es.js.map +1 -1
- package/lib/module/locale/translations/fr.js +22 -1
- package/lib/module/locale/translations/fr.js.map +1 -1
- package/lib/module/locale/translations/hi.js +22 -1
- package/lib/module/locale/translations/hi.js.map +1 -1
- package/lib/module/locale/translations/id.js +22 -1
- package/lib/module/locale/translations/id.js.map +1 -1
- package/lib/module/locale/translations/it.js +22 -1
- package/lib/module/locale/translations/it.js.map +1 -1
- package/lib/module/locale/translations/ja.js +22 -1
- package/lib/module/locale/translations/ja.js.map +1 -1
- package/lib/module/locale/translations/pt.js +22 -1
- package/lib/module/locale/translations/pt.js.map +1 -1
- package/lib/module/locale/translations/ru.js +22 -1
- package/lib/module/locale/translations/ru.js.map +1 -1
- package/lib/module/locale/translations/tr.js +22 -1
- package/lib/module/locale/translations/tr.js.map +1 -1
- package/lib/module/locale/translations/zh.js +22 -1
- package/lib/module/locale/translations/zh.js.map +1 -1
- package/lib/module/multi-agent-chat/data.js +3 -3
- package/lib/module/multi-agent-chat/data.js.map +1 -1
- package/lib/typescript/commonjs/agent-avatar/character.d.ts +4 -4
- package/lib/typescript/commonjs/agent-creator/AgentCreator.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/AgentCreator.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/AgentCreatorBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/CustomColorPicker.d.ts +9 -0
- package/lib/typescript/commonjs/agent-creator/CustomColorPicker.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-creator/GlossArt.d.ts +9 -0
- package/lib/typescript/commonjs/agent-creator/GlossArt.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-creator/context.d.ts +13 -1
- package/lib/typescript/commonjs/agent-creator/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/messages.d.ts +11 -0
- package/lib/typescript/commonjs/agent-creator/messages.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/paint.d.ts +9 -4
- package/lib/typescript/commonjs/agent-creator/paint.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/rainbow-artwork.d.ts +3 -0
- package/lib/typescript/commonjs/agent-creator/rainbow-artwork.d.ts.map +1 -0
- package/lib/typescript/commonjs/agent-creator/shared.d.ts +7 -0
- package/lib/typescript/commonjs/agent-creator/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/agent-creator/types.d.ts +4 -7
- package/lib/typescript/commonjs/agent-creator/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/avatar/types.d.ts +1 -2
- package/lib/typescript/commonjs/avatar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ar.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/bn.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ca.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/de.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/es.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/fr.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/hi.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/id.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/it.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ja.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/pt.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ru.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/tr.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/zh.d.ts.map +1 -1
- package/lib/typescript/commonjs/multi-agent-chat/data.d.ts.map +1 -1
- package/lib/typescript/module/agent-avatar/character.d.ts +4 -4
- package/lib/typescript/module/agent-creator/AgentCreator.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/AgentCreator.web.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/AgentCreatorBase.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/CustomColorPicker.d.ts +9 -0
- package/lib/typescript/module/agent-creator/CustomColorPicker.d.ts.map +1 -0
- package/lib/typescript/module/agent-creator/GlossArt.d.ts +9 -0
- package/lib/typescript/module/agent-creator/GlossArt.d.ts.map +1 -0
- package/lib/typescript/module/agent-creator/context.d.ts +13 -1
- package/lib/typescript/module/agent-creator/context.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/messages.d.ts +11 -0
- package/lib/typescript/module/agent-creator/messages.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/paint.d.ts +9 -4
- package/lib/typescript/module/agent-creator/paint.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/rainbow-artwork.d.ts +3 -0
- package/lib/typescript/module/agent-creator/rainbow-artwork.d.ts.map +1 -0
- package/lib/typescript/module/agent-creator/shared.d.ts +7 -0
- package/lib/typescript/module/agent-creator/shared.d.ts.map +1 -1
- package/lib/typescript/module/agent-creator/types.d.ts +4 -7
- package/lib/typescript/module/agent-creator/types.d.ts.map +1 -1
- package/lib/typescript/module/avatar/types.d.ts +1 -2
- package/lib/typescript/module/avatar/types.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ar.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/bn.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ca.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/de.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/es.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/fr.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/hi.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/id.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/it.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ja.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/pt.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ru.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/tr.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/zh.d.ts.map +1 -1
- package/lib/typescript/module/multi-agent-chat/data.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/support/adoption-matrix.ts +0 -5
- package/src/agent-avatar/character.ts +4 -4
- package/src/agent-creator/AgentCreator.tsx +4 -0
- package/src/agent-creator/AgentCreator.web.tsx +4 -0
- package/src/agent-creator/AgentCreatorBase.tsx +83 -39
- package/src/agent-creator/CustomColorPicker.tsx +443 -0
- package/src/agent-creator/GlossArt.tsx +160 -0
- package/src/agent-creator/context.ts +2 -0
- package/src/agent-creator/messages.ts +37 -1
- package/src/agent-creator/paint.ts +17 -7
- package/src/agent-creator/rainbow-artwork.ts +5 -0
- package/src/agent-creator/shared.ts +27 -0
- package/src/agent-creator/types.ts +4 -7
- package/src/avatar/types.ts +1 -2
- package/src/locale/translations/ar.ts +23 -1
- package/src/locale/translations/bn.ts +23 -1
- package/src/locale/translations/ca.ts +23 -1
- package/src/locale/translations/de.ts +23 -1
- package/src/locale/translations/es.ts +23 -1
- package/src/locale/translations/fr.ts +23 -1
- package/src/locale/translations/hi.ts +23 -1
- package/src/locale/translations/id.ts +23 -1
- package/src/locale/translations/it.ts +23 -1
- package/src/locale/translations/ja.ts +23 -1
- package/src/locale/translations/pt.ts +23 -1
- package/src/locale/translations/ru.ts +23 -1
- package/src/locale/translations/tr.ts +23 -1
- package/src/locale/translations/zh.ts +23 -1
- package/src/multi-agent-chat/data.ts +5 -3
|
@@ -16,6 +16,7 @@ export interface AgentCreatorMessages {
|
|
|
16
16
|
closeEditor: string;
|
|
17
17
|
details: string;
|
|
18
18
|
color: string;
|
|
19
|
+
customColor: string;
|
|
19
20
|
name: string;
|
|
20
21
|
label: string;
|
|
21
22
|
description: string;
|
|
@@ -38,6 +39,13 @@ export interface AgentCreatorMessages {
|
|
|
38
39
|
playbackSpeed: string;
|
|
39
40
|
emotion: string;
|
|
40
41
|
shape: string;
|
|
42
|
+
hexColor: string;
|
|
43
|
+
hue: string;
|
|
44
|
+
saturationBrightness: string;
|
|
45
|
+
increaseBrightness: string;
|
|
46
|
+
decreaseBrightness: string;
|
|
47
|
+
increaseHue: string;
|
|
48
|
+
decreaseHue: string;
|
|
41
49
|
nextShape: string;
|
|
42
50
|
previousShape: string;
|
|
43
51
|
newAgent: string;
|
|
@@ -64,10 +72,16 @@ export interface AgentCreatorMessages {
|
|
|
64
72
|
'slender' | 'pocket' | 'petal' | 'flower' | 'star' | 'heart' | 'cloud' | 'diamond' | 'shield',
|
|
65
73
|
string
|
|
66
74
|
>;
|
|
75
|
+
colors: Record<
|
|
76
|
+
'Blue' | 'Teal' | 'Violet' | 'Pink' | 'Red' | 'Orange' | 'Cyan' | 'Lime' | 'Green',
|
|
77
|
+
string
|
|
78
|
+
>;
|
|
67
79
|
languages: Record<'auto' | 'en' | 'tr' | 'es' | 'fr' | 'de' | 'ja' | 'pt', string>;
|
|
80
|
+
avatarColorLabel: (name: string) => string;
|
|
68
81
|
shapeLabel: (name: string) => string;
|
|
69
82
|
silhouetteLabel: (name: string) => string;
|
|
70
83
|
livePreview: (name: string) => string;
|
|
84
|
+
saturationBrightnessValue: (s: number, v: number) => string;
|
|
71
85
|
playbackSpeedLabel: (speed: number) => string;
|
|
72
86
|
}
|
|
73
87
|
|
|
@@ -87,7 +101,8 @@ export const AGENT_CREATOR_MESSAGES: MessageCatalog<AgentCreatorMessages> =
|
|
|
87
101
|
newBot: 'New bot',
|
|
88
102
|
closeEditor: 'Close agent editor',
|
|
89
103
|
details: 'Agent appearance and details',
|
|
90
|
-
color: '
|
|
104
|
+
color: 'Avatar color',
|
|
105
|
+
customColor: 'Custom avatar color',
|
|
91
106
|
name: 'Name',
|
|
92
107
|
label: 'Label',
|
|
93
108
|
description: 'Description',
|
|
@@ -110,6 +125,13 @@ export const AGENT_CREATOR_MESSAGES: MessageCatalog<AgentCreatorMessages> =
|
|
|
110
125
|
playbackSpeed: 'Playback speed',
|
|
111
126
|
emotion: 'Agent emotion',
|
|
112
127
|
shape: 'Avatar shape',
|
|
128
|
+
hexColor: 'Hex color',
|
|
129
|
+
hue: 'Hue',
|
|
130
|
+
saturationBrightness: 'Saturation and brightness',
|
|
131
|
+
increaseBrightness: 'Increase brightness',
|
|
132
|
+
decreaseBrightness: 'Decrease brightness',
|
|
133
|
+
increaseHue: 'Increase hue',
|
|
134
|
+
decreaseHue: 'Decrease hue',
|
|
113
135
|
nextShape: 'Next shape',
|
|
114
136
|
previousShape: 'Previous shape',
|
|
115
137
|
newAgent: 'New agent',
|
|
@@ -142,6 +164,17 @@ export const AGENT_CREATOR_MESSAGES: MessageCatalog<AgentCreatorMessages> =
|
|
|
142
164
|
diamond: 'Diamond',
|
|
143
165
|
shield: 'Shield',
|
|
144
166
|
},
|
|
167
|
+
colors: {
|
|
168
|
+
Blue: 'Blue',
|
|
169
|
+
Teal: 'Teal',
|
|
170
|
+
Violet: 'Violet',
|
|
171
|
+
Pink: 'Pink',
|
|
172
|
+
Red: 'Red',
|
|
173
|
+
Orange: 'Orange',
|
|
174
|
+
Cyan: 'Cyan',
|
|
175
|
+
Lime: 'Lime',
|
|
176
|
+
Green: 'Green',
|
|
177
|
+
},
|
|
145
178
|
languages: {
|
|
146
179
|
auto: 'Auto-detect',
|
|
147
180
|
en: 'English',
|
|
@@ -152,8 +185,11 @@ export const AGENT_CREATOR_MESSAGES: MessageCatalog<AgentCreatorMessages> =
|
|
|
152
185
|
ja: 'Japanese',
|
|
153
186
|
pt: 'Portuguese',
|
|
154
187
|
},
|
|
188
|
+
avatarColorLabel: (name) => '{name} avatar'.replace('{name}', name),
|
|
155
189
|
shapeLabel: (name) => '{name} shape'.replace('{name}', name),
|
|
156
190
|
silhouetteLabel: (name) => '{name} silhouette'.replace('{name}', name),
|
|
157
191
|
livePreview: (name) => '{name}, live avatar preview'.replace('{name}', name),
|
|
192
|
+
saturationBrightnessValue: (s, v) =>
|
|
193
|
+
'saturation {s}%, brightness {v}%'.replace('{s}', String(s)).replace('{v}', String(v)),
|
|
158
194
|
playbackSpeedLabel: (speed) => '{speed} times playback speed'.replace('{speed}', String(speed)),
|
|
159
195
|
});
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
tryResolveAvatarCharacter,
|
|
5
5
|
type AvatarCharacter,
|
|
6
6
|
} from '../agent-avatar/character';
|
|
7
|
-
import {
|
|
7
|
+
import { CHARACTER_COLORS } from '../agent-avatar/character-colors';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The creator's colour is the agent's account colour (`agent.color`), never the character's: a
|
|
@@ -20,19 +20,29 @@ export function withoutPaint(character: AvatarCharacter): AvatarCharacter {
|
|
|
20
20
|
return parts;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/** What a character with no paint and no resolvable colour wears: the first named swatch. */
|
|
24
|
+
const FALLBACK_COLOR = CHARACTER_COLORS.pink;
|
|
25
|
+
|
|
23
26
|
/**
|
|
24
|
-
* The character as the creator draws it: in the agent's colour
|
|
25
|
-
* leaves the character's own paint (or its preset's); a character with
|
|
26
|
-
*
|
|
27
|
+
* The character as the creator draws it: in the agent's colour (a preset key or a `#rrggbb`). A
|
|
28
|
+
* colour Bloom cannot resolve leaves the character's own paint (or its preset's); a character with
|
|
29
|
+
* neither wears the first named swatch, so nothing it draws is undrawable.
|
|
27
30
|
*/
|
|
28
31
|
export function drawnCharacter(
|
|
29
32
|
character: AvatarCharacter,
|
|
30
33
|
color: string | null | undefined,
|
|
31
|
-
colors: readonly string[],
|
|
32
34
|
): AvatarCharacter {
|
|
33
35
|
const painted = avatarCharacterInColor(character, color);
|
|
34
36
|
if (tryResolveAvatarCharacter(painted)) return painted;
|
|
35
|
-
return avatarCharacterInColor(character,
|
|
37
|
+
return avatarCharacterInColor(character, FALLBACK_COLOR);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The body paint an account colour draws, `#rrggbb`, or `undefined` for a colour that does not
|
|
42
|
+
* resolve. Read through `avatarCharacterInColor`, the one mapping from a colour to a paint.
|
|
43
|
+
*/
|
|
44
|
+
export function accountBodyHex(color: string | null | undefined): string | undefined {
|
|
45
|
+
return avatarCharacterInColor({}, color).bodyColor;
|
|
36
46
|
}
|
|
37
47
|
|
|
38
48
|
/**
|
|
@@ -41,7 +51,7 @@ export function drawnCharacter(
|
|
|
41
51
|
*/
|
|
42
52
|
export function characterPartsKey(character: AvatarCharacter): string {
|
|
43
53
|
const parts: Partial<ReturnType<typeof resolveAvatarCharacter>> = resolveAvatarCharacter(
|
|
44
|
-
drawnCharacter(character, undefined
|
|
54
|
+
drawnCharacter(character, undefined),
|
|
45
55
|
);
|
|
46
56
|
delete parts.paint;
|
|
47
57
|
return JSON.stringify(parts);
|