@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createContext","useContext","useMemo","useMessages","AGENT_CREATOR_MESSAGES","AgentCreatorContext","AgentCreatorCopyContext","useAgentCreatorBindings","value","Error","useAgentCreatorMessages","overrides","inherited","configured","messages","locale","labels"],"sourceRoot":"../../../src","sources":["agent-creator/context.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC1D,SAASC,WAAW,QAAQ,uBAAoB;
|
|
1
|
+
{"version":3,"names":["createContext","useContext","useMemo","useMessages","AGENT_CREATOR_MESSAGES","AgentCreatorContext","AgentCreatorCopyContext","useAgentCreatorBindings","value","Error","useAgentCreatorMessages","overrides","inherited","configured","messages","locale","labels"],"sourceRoot":"../../../src","sources":["agent-creator/context.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC1D,SAASC,WAAW,QAAQ,uBAAoB;AAGhD,SAASC,sBAAsB,QAAmC,eAAY;AAe9E,OAAO,MAAMC,mBAAmB,gBAAGL,aAAa,CAA8B,IAAI,CAAC;AACnF,OAAO,MAAMM,uBAAuB,gBAAGN,aAAa,CAG1C,IAAI,CAAC;AACf,OAAO,SAASO,uBAAuBA,CAAA,EAAG;EACxC,MAAMC,KAAK,GAAGP,UAAU,CAACI,mBAAmB,CAAC;EAC7C,IAAI,CAACG,KAAK,EAAE,MAAM,IAAIC,KAAK,CAAC,6CAA6C,CAAC;EAC1E,OAAOD,KAAK;AACd;AACA,OAAO,SAASE,uBAAuBA,CAACC,SAGvC,EAAE;EACD,MAAMC,SAAS,GAAGX,UAAU,CAACK,uBAAuB,CAAC;EACrD,MAAMO,UAAU,GAAGF,SAAS,IAAIC,SAAS;EACzC,MAAM;IAAEE;EAAS,CAAC,GAAGX,WAAW,CAACC,sBAAsB,EAAES,UAAU,EAAEE,MAAM,CAAC;EAC5E,OAAOb,OAAO,CAAC,OAAO;IAAE,GAAGY,QAAQ;IAAE,GAAGD,UAAU,EAAEG;EAAO,CAAC,CAAC,EAAE,CAACF,QAAQ,EAAED,UAAU,EAAEG,MAAM,CAAC,CAAC;AAChG","ignoreList":[]}
|
|
@@ -15,7 +15,8 @@ export const AGENT_CREATOR_MESSAGES = defineMessages('AGENT_CREATOR_MESSAGES', {
|
|
|
15
15
|
newBot: 'New bot',
|
|
16
16
|
closeEditor: 'Close agent editor',
|
|
17
17
|
details: 'Agent appearance and details',
|
|
18
|
-
color: '
|
|
18
|
+
color: 'Avatar color',
|
|
19
|
+
customColor: 'Custom avatar color',
|
|
19
20
|
name: 'Name',
|
|
20
21
|
label: 'Label',
|
|
21
22
|
description: 'Description',
|
|
@@ -38,6 +39,13 @@ export const AGENT_CREATOR_MESSAGES = defineMessages('AGENT_CREATOR_MESSAGES', {
|
|
|
38
39
|
playbackSpeed: 'Playback speed',
|
|
39
40
|
emotion: 'Agent emotion',
|
|
40
41
|
shape: 'Avatar shape',
|
|
42
|
+
hexColor: 'Hex color',
|
|
43
|
+
hue: 'Hue',
|
|
44
|
+
saturationBrightness: 'Saturation and brightness',
|
|
45
|
+
increaseBrightness: 'Increase brightness',
|
|
46
|
+
decreaseBrightness: 'Decrease brightness',
|
|
47
|
+
increaseHue: 'Increase hue',
|
|
48
|
+
decreaseHue: 'Decrease hue',
|
|
41
49
|
nextShape: 'Next shape',
|
|
42
50
|
previousShape: 'Previous shape',
|
|
43
51
|
newAgent: 'New agent',
|
|
@@ -70,6 +78,17 @@ export const AGENT_CREATOR_MESSAGES = defineMessages('AGENT_CREATOR_MESSAGES', {
|
|
|
70
78
|
diamond: 'Diamond',
|
|
71
79
|
shield: 'Shield'
|
|
72
80
|
},
|
|
81
|
+
colors: {
|
|
82
|
+
Blue: 'Blue',
|
|
83
|
+
Teal: 'Teal',
|
|
84
|
+
Violet: 'Violet',
|
|
85
|
+
Pink: 'Pink',
|
|
86
|
+
Red: 'Red',
|
|
87
|
+
Orange: 'Orange',
|
|
88
|
+
Cyan: 'Cyan',
|
|
89
|
+
Lime: 'Lime',
|
|
90
|
+
Green: 'Green'
|
|
91
|
+
},
|
|
73
92
|
languages: {
|
|
74
93
|
auto: 'Auto-detect',
|
|
75
94
|
en: 'English',
|
|
@@ -80,9 +99,11 @@ export const AGENT_CREATOR_MESSAGES = defineMessages('AGENT_CREATOR_MESSAGES', {
|
|
|
80
99
|
ja: 'Japanese',
|
|
81
100
|
pt: 'Portuguese'
|
|
82
101
|
},
|
|
102
|
+
avatarColorLabel: name => '{name} avatar'.replace('{name}', name),
|
|
83
103
|
shapeLabel: name => '{name} shape'.replace('{name}', name),
|
|
84
104
|
silhouetteLabel: name => '{name} silhouette'.replace('{name}', name),
|
|
85
105
|
livePreview: name => '{name}, live avatar preview'.replace('{name}', name),
|
|
106
|
+
saturationBrightnessValue: (s, v) => 'saturation {s}%, brightness {v}%'.replace('{s}', String(s)).replace('{v}', String(v)),
|
|
86
107
|
playbackSpeedLabel: speed => '{speed} times playback speed'.replace('{speed}', String(speed))
|
|
87
108
|
});
|
|
88
109
|
//# sourceMappingURL=messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defineMessages","AGENT_CREATOR_MESSAGES","avatarHistory","undoAvatar","redoAvatar","preparingAvatar","proceduralAvatar","betaEyes","eyewear","accessory","characterOption","category","id","title","String","editor","newBot","closeEditor","details","color","name","label","description","nameInput","labelInput","descriptionInput","labelPlaceholder","descriptionPlaceholder","language","languageInput","notifications","notificationsDescription","notifyFinished","voice","voiceInput","previewVoice","savedVoice","systemVoice","off","playbackSpeed","emotion","shape","nextShape","previousShape","newAgent","emotions","neutral","happy","angry","thinking","shook","curious","wink","sleepy","sad","worried","skeptical","focused","excited","calm","shy","confused","shapes","slender","pocket","petal","flower","star","heart","cloud","diamond","shield","languages","auto","en","tr","es","fr","de","ja","pt","
|
|
1
|
+
{"version":3,"names":["defineMessages","AGENT_CREATOR_MESSAGES","avatarHistory","undoAvatar","redoAvatar","preparingAvatar","proceduralAvatar","betaEyes","eyewear","accessory","characterOption","category","id","title","String","editor","newBot","closeEditor","details","color","customColor","name","label","description","nameInput","labelInput","descriptionInput","labelPlaceholder","descriptionPlaceholder","language","languageInput","notifications","notificationsDescription","notifyFinished","voice","voiceInput","previewVoice","savedVoice","systemVoice","off","playbackSpeed","emotion","shape","hexColor","hue","saturationBrightness","increaseBrightness","decreaseBrightness","increaseHue","decreaseHue","nextShape","previousShape","newAgent","emotions","neutral","happy","angry","thinking","shook","curious","wink","sleepy","sad","worried","skeptical","focused","excited","calm","shy","confused","shapes","slender","pocket","petal","flower","star","heart","cloud","diamond","shield","colors","Blue","Teal","Violet","Pink","Red","Orange","Cyan","Lime","Green","languages","auto","en","tr","es","fr","de","ja","pt","avatarColorLabel","replace","shapeLabel","silhouetteLabel","livePreview","saturationBrightnessValue","s","v","playbackSpeedLabel","speed"],"sourceRoot":"../../../src","sources":["agent-creator/messages.ts"],"mappings":";;AAAA,SAASA,cAAc,QAA6B,uBAAoB;AAuFxE,OAAO,MAAMC,sBAA4D,GACvED,cAAc,CAAuB,wBAAwB,EAAE;EAC7DE,aAAa,EAAE,gBAAgB;EAC/BC,UAAU,EAAE,MAAM;EAClBC,UAAU,EAAE,MAAM;EAClBC,eAAe,EAAE,mBAAmB;EACpCC,gBAAgB,EAAE,gBAAgB;EAClCC,QAAQ,EAAE,WAAW;EACrBC,OAAO,EAAE,SAAS;EAClBC,SAAS,EAAE,WAAW;EACtBC,eAAe,EAAEA,CAACC,QAAQ,EAAEC,EAAE,EAAEC,KAAK,KACnCF,QAAQ,KAAK,MAAM,IAAIC,EAAE,KAAK,SAAS,GAAG,YAAY,GAAGE,MAAM,CAACD,KAAK,CAAC;EACxEE,MAAM,EAAE,cAAc;EACtBC,MAAM,EA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,IAAI,CAAC;EAC5EmF,yBAAyB,EAAEA,CAACC,CAAC,EAAEC,CAAC,KAC9B,kCAAkC,CAACN,OAAO,CAAC,KAAK,EAAEtF,MAAM,CAAC2F,CAAC,CAAC,CAAC,CAACL,OAAO,CAAC,KAAK,EAAEtF,MAAM,CAAC4F,CAAC,CAAC,CAAC;EACxFC,kBAAkB,EAAGC,KAAK,IAAK,8BAA8B,CAACR,OAAO,CAAC,SAAS,EAAEtF,MAAM,CAAC8F,KAAK,CAAC;AAChG,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { avatarCharacterInColor, resolveAvatarCharacter, tryResolveAvatarCharacter } from "../agent-avatar/character.js";
|
|
4
|
-
import {
|
|
4
|
+
import { CHARACTER_COLORS } from "../agent-avatar/character-colors.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The creator's colour is the agent's account colour (`agent.color`), never the character's: a
|
|
@@ -19,15 +19,26 @@ export function withoutPaint(character) {
|
|
|
19
19
|
return parts;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
/** What a character with no paint and no resolvable colour wears: the first named swatch. */
|
|
23
|
+
const FALLBACK_COLOR = CHARACTER_COLORS.pink;
|
|
24
|
+
|
|
22
25
|
/**
|
|
23
|
-
* The character as the creator draws it: in the agent's colour
|
|
24
|
-
* leaves the character's own paint (or its preset's); a character with
|
|
25
|
-
*
|
|
26
|
+
* The character as the creator draws it: in the agent's colour (a preset key or a `#rrggbb`). A
|
|
27
|
+
* colour Bloom cannot resolve leaves the character's own paint (or its preset's); a character with
|
|
28
|
+
* neither wears the first named swatch, so nothing it draws is undrawable.
|
|
26
29
|
*/
|
|
27
|
-
export function drawnCharacter(character, color
|
|
30
|
+
export function drawnCharacter(character, color) {
|
|
28
31
|
const painted = avatarCharacterInColor(character, color);
|
|
29
32
|
if (tryResolveAvatarCharacter(painted)) return painted;
|
|
30
|
-
return avatarCharacterInColor(character,
|
|
33
|
+
return avatarCharacterInColor(character, FALLBACK_COLOR);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The body paint an account colour draws, `#rrggbb`, or `undefined` for a colour that does not
|
|
38
|
+
* resolve. Read through `avatarCharacterInColor`, the one mapping from a colour to a paint.
|
|
39
|
+
*/
|
|
40
|
+
export function accountBodyHex(color) {
|
|
41
|
+
return avatarCharacterInColor({}, color).bodyColor;
|
|
31
42
|
}
|
|
32
43
|
|
|
33
44
|
/**
|
|
@@ -35,7 +46,7 @@ export function drawnCharacter(character, color, colors) {
|
|
|
35
46
|
* the account's). Two spellings of one character (a preset, or its parts written out) compare equal.
|
|
36
47
|
*/
|
|
37
48
|
export function characterPartsKey(character) {
|
|
38
|
-
const parts = resolveAvatarCharacter(drawnCharacter(character, undefined
|
|
49
|
+
const parts = resolveAvatarCharacter(drawnCharacter(character, undefined));
|
|
39
50
|
delete parts.paint;
|
|
40
51
|
return JSON.stringify(parts);
|
|
41
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["avatarCharacterInColor","resolveAvatarCharacter","tryResolveAvatarCharacter","
|
|
1
|
+
{"version":3,"names":["avatarCharacterInColor","resolveAvatarCharacter","tryResolveAvatarCharacter","CHARACTER_COLORS","withoutPaint","character","parts","color","bodyColor","FALLBACK_COLOR","pink","drawnCharacter","painted","accountBodyHex","characterPartsKey","undefined","paint","JSON","stringify"],"sourceRoot":"../../../src","sources":["agent-creator/paint.ts"],"mappings":";;AAAA,SACEA,sBAAsB,EACtBC,sBAAsB,EACtBC,yBAAyB,QAEpB,8BAA2B;AAClC,SAASC,gBAAgB,QAAQ,qCAAkC;;AAEnE;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,SAASC,YAAYA,CAACC,SAA0B,EAAmB;EACxE,MAAMC,KAAsB,GAAG;IAAE,GAAGD;EAAU,CAAC;EAC/C,OAAOC,KAAK,CAACC,KAAK;EAClB,OAAOD,KAAK,CAACE,SAAS;EACtB,OAAOF,KAAK;AACd;;AAEA;AACA,MAAMG,cAAc,GAAGN,gBAAgB,CAACO,IAAI;;AAE5C;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAC5BN,SAA0B,EAC1BE,KAAgC,EACf;EACjB,MAAMK,OAAO,GAAGZ,sBAAsB,CAACK,SAAS,EAAEE,KAAK,CAAC;EACxD,IAAIL,yBAAyB,CAACU,OAAO,CAAC,EAAE,OAAOA,OAAO;EACtD,OAAOZ,sBAAsB,CAACK,SAAS,EAAEI,cAAc,CAAC;AAC1D;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASI,cAAcA,CAACN,KAAgC,EAAsB;EACnF,OAAOP,sBAAsB,CAAC,CAAC,CAAC,EAAEO,KAAK,CAAC,CAACC,SAAS;AACpD;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASM,iBAAiBA,CAACT,SAA0B,EAAU;EACpE,MAAMC,KAAyD,GAAGL,sBAAsB,CACtFU,cAAc,CAACN,SAAS,EAAEU,SAAS,CACrC,CAAC;EACD,OAAOT,KAAK,CAACU,KAAK;EAClB,OAAOC,IAAI,CAACC,SAAS,CAACZ,KAAK,CAAC;AAC9B","ignoreList":[]}
|