agent-robot-avatar 0.3.2 → 0.6.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 +209 -124
- package/LICENSE +21 -21
- package/README.md +198 -446
- package/agent-robot-avatar.js +27 -25
- package/docs/README.de.md +185 -166
- package/docs/README.es.md +185 -225
- package/docs/README.fr.md +185 -225
- package/docs/README.ja.md +185 -225
- package/docs/README.ko.md +185 -225
- package/docs/README.pt.md +185 -225
- package/docs/README.ru.md +185 -0
- package/docs/README.zh-CN.md +202 -396
- package/docs/README.zh-TW.md +185 -227
- package/index.d.ts +141 -111
- package/package.json +79 -77
- package/src/agent-robot-avatar-actions.js +403 -400
- package/src/agent-robot-avatar-antenna.js +152 -152
- package/src/agent-robot-avatar-core.js +1155 -1152
- package/src/agent-robot-avatar-extension-host.js +78 -78
- package/src/agent-robot-avatar-failure.js +131 -131
- package/src/agent-robot-avatar-geometry.js +40 -40
- package/src/agent-robot-avatar-gestures.js +170 -0
- package/src/agent-robot-avatar-head-roundness.js +103 -103
- package/src/agent-robot-avatar-inspect.js +242 -242
- package/src/agent-robot-avatar-love.js +226 -0
- package/src/agent-robot-avatar-random.js +272 -0
- package/src/agent-robot-avatar-runtime.js +948 -860
- package/src/agent-robot-avatar-version.js +3 -3
- package/src/agent-robot-avatar-waiting.js +154 -121
- package/src/agent-robot-avatar-wrap.js +66 -0
- package/src/agent-robot-avatar-antenna-flash.js +0 -127
package/index.d.ts
CHANGED
|
@@ -1,111 +1,141 @@
|
|
|
1
|
-
export type AgentRobotAvatarAction =
|
|
2
|
-
| 'idle'
|
|
3
|
-
| 'bored'
|
|
4
|
-
| 'waiting'
|
|
5
|
-
| '
|
|
6
|
-
| '
|
|
7
|
-
| '
|
|
8
|
-
| '
|
|
9
|
-
| '
|
|
10
|
-
| '
|
|
11
|
-
| '
|
|
12
|
-
| '
|
|
13
|
-
| 'inspect'
|
|
14
|
-
| '
|
|
15
|
-
| '
|
|
16
|
-
| '
|
|
17
|
-
| '
|
|
18
|
-
| '
|
|
19
|
-
| '
|
|
20
|
-
| '
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
| '
|
|
29
|
-
| '
|
|
30
|
-
| '
|
|
31
|
-
| '
|
|
32
|
-
| '
|
|
33
|
-
| '
|
|
34
|
-
| '
|
|
35
|
-
| '
|
|
36
|
-
| '
|
|
37
|
-
| 'error'
|
|
38
|
-
| '
|
|
39
|
-
| '
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
| '
|
|
44
|
-
| '
|
|
45
|
-
| '
|
|
46
|
-
| '
|
|
47
|
-
| '
|
|
48
|
-
| '
|
|
49
|
-
| '
|
|
50
|
-
| '
|
|
51
|
-
| '
|
|
52
|
-
| '
|
|
53
|
-
| '
|
|
54
|
-
| '
|
|
55
|
-
| '
|
|
56
|
-
| '
|
|
57
|
-
| '
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
export type
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
'
|
|
72
|
-
'
|
|
73
|
-
'
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
1
|
+
export type AgentRobotAvatarAction =
|
|
2
|
+
| 'idle'
|
|
3
|
+
| 'bored'
|
|
4
|
+
| 'waiting'
|
|
5
|
+
| 'waiting-spin'
|
|
6
|
+
| 'waiting-wrap'
|
|
7
|
+
| 'waiting-wave'
|
|
8
|
+
| 'input'
|
|
9
|
+
| 'affirm'
|
|
10
|
+
| 'success'
|
|
11
|
+
| 'failure'
|
|
12
|
+
| 'wary'
|
|
13
|
+
| 'inspect'
|
|
14
|
+
| 'angry'
|
|
15
|
+
| 'refuse'
|
|
16
|
+
| 'surprise'
|
|
17
|
+
| 'love'
|
|
18
|
+
| 'random'
|
|
19
|
+
| 'sleep'
|
|
20
|
+
| 'wake'
|
|
21
|
+
| AgentRobotAvatarDeprecatedAction;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Older names that still play the same action but log a one-time deprecation
|
|
25
|
+
* notice. They are removed in 1.0.
|
|
26
|
+
*/
|
|
27
|
+
export type AgentRobotAvatarDeprecatedAction =
|
|
28
|
+
| 'wait'
|
|
29
|
+
| 'send'
|
|
30
|
+
| 'failed'
|
|
31
|
+
| 'fail'
|
|
32
|
+
| 'warning'
|
|
33
|
+
| 'verify'
|
|
34
|
+
| 'review'
|
|
35
|
+
| 'blocked'
|
|
36
|
+
| 'policy-blocked'
|
|
37
|
+
| 'error'
|
|
38
|
+
| 'system-error'
|
|
39
|
+
| 'connection-error'
|
|
40
|
+
| 'slot';
|
|
41
|
+
|
|
42
|
+
export type AgentRobotAvatarState =
|
|
43
|
+
| 'idle'
|
|
44
|
+
| 'happy'
|
|
45
|
+
| 'sad'
|
|
46
|
+
| 'angry'
|
|
47
|
+
| 'sleepy'
|
|
48
|
+
| 'input'
|
|
49
|
+
| 'sleep'
|
|
50
|
+
| 'surprise'
|
|
51
|
+
| 'love'
|
|
52
|
+
| 'random'
|
|
53
|
+
| 'waiting'
|
|
54
|
+
| 'wary'
|
|
55
|
+
| 'refuse'
|
|
56
|
+
| 'inspect'
|
|
57
|
+
| 'failure'
|
|
58
|
+
| 'squeeze'
|
|
59
|
+
| 'antenna-drag';
|
|
60
|
+
|
|
61
|
+
export type AgentRobotAvatarCanonicalAction =
|
|
62
|
+
| 'idle'
|
|
63
|
+
| 'bored'
|
|
64
|
+
| 'waiting'
|
|
65
|
+
| 'input'
|
|
66
|
+
| 'affirm'
|
|
67
|
+
| 'success'
|
|
68
|
+
| 'failure'
|
|
69
|
+
| 'wary'
|
|
70
|
+
| 'inspect'
|
|
71
|
+
| 'angry'
|
|
72
|
+
| 'refuse'
|
|
73
|
+
| 'surprise'
|
|
74
|
+
| 'love'
|
|
75
|
+
| 'random'
|
|
76
|
+
| 'sleep'
|
|
77
|
+
| 'wake'
|
|
78
|
+
| 'reaction'
|
|
79
|
+
| 'squeeze'
|
|
80
|
+
| 'antenna-drag';
|
|
81
|
+
|
|
82
|
+
export type AgentRobotAvatarActionPhase = 'start' | 'end' | 'cancel';
|
|
83
|
+
export type AgentRobotAvatarActionSource = 'api' | 'interaction' | 'automatic';
|
|
84
|
+
export type AgentRobotAvatarWakeOn = 'activity' | 'interaction' | 'manual';
|
|
85
|
+
export type AgentRobotAvatarMotion = 'auto' | 'reduce' | 'full';
|
|
86
|
+
export interface AgentRobotAvatarWaitingOptions {
|
|
87
|
+
variant?: 'default' | 'spin' | 'wrap' | 'wave';
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface AgentRobotAvatarActionStateDetail {
|
|
91
|
+
action: AgentRobotAvatarCanonicalAction;
|
|
92
|
+
phase: AgentRobotAvatarActionPhase;
|
|
93
|
+
source: AgentRobotAvatarActionSource;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface AgentRobotAvatarEventMap extends HTMLElementEventMap {
|
|
97
|
+
'face-state': CustomEvent<{ state: AgentRobotAvatarState }>;
|
|
98
|
+
'action-state': CustomEvent<AgentRobotAvatarActionStateDetail>;
|
|
99
|
+
'head-roundness-change': CustomEvent<{ value: number; version: string }>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export declare class AgentRobotAvatar extends HTMLElement {
|
|
103
|
+
play(action: AgentRobotAvatarAction): this | Promise<void>;
|
|
104
|
+
reset(): this;
|
|
105
|
+
sleep(): this | Promise<void>;
|
|
106
|
+
wake(): this | Promise<void>;
|
|
107
|
+
input(active?: boolean): this | Promise<void>;
|
|
108
|
+
startWaiting(options?: AgentRobotAvatarWaitingOptions): Promise<this>;
|
|
109
|
+
stopWaiting(): this;
|
|
110
|
+
setPointerFollow(enabled?: boolean): this;
|
|
111
|
+
/** @deprecated Removed in 0.6; does nothing and logs a one-time notice. Deleted in 1.0. */
|
|
112
|
+
setAntennaFlash(enabled?: boolean): this;
|
|
113
|
+
setPressSqueeze(enabled?: boolean): this;
|
|
114
|
+
setAntennaDrag(enabled?: boolean): this;
|
|
115
|
+
setHeadRoundness(value?: number): this;
|
|
116
|
+
getHeadRoundness(): number;
|
|
117
|
+
noteActivity(wake?: boolean): void;
|
|
118
|
+
|
|
119
|
+
addEventListener<K extends keyof AgentRobotAvatarEventMap>(
|
|
120
|
+
type: K,
|
|
121
|
+
listener: (this: AgentRobotAvatar, event: AgentRobotAvatarEventMap[K]) => unknown,
|
|
122
|
+
options?: boolean | AddEventListenerOptions,
|
|
123
|
+
): void;
|
|
124
|
+
|
|
125
|
+
removeEventListener<K extends keyof AgentRobotAvatarEventMap>(
|
|
126
|
+
type: K,
|
|
127
|
+
listener: (this: AgentRobotAvatar, event: AgentRobotAvatarEventMap[K]) => unknown,
|
|
128
|
+
options?: boolean | EventListenerOptions,
|
|
129
|
+
): void;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export declare const VERSION: string;
|
|
133
|
+
|
|
134
|
+
export default AgentRobotAvatar;
|
|
135
|
+
|
|
136
|
+
declare global {
|
|
137
|
+
interface HTMLElementTagNameMap {
|
|
138
|
+
'agent-robot-avatar': AgentRobotAvatar;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
package/package.json
CHANGED
|
@@ -1,77 +1,79 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "agent-robot-avatar",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "A lightweight expressive robot avatar Web Component for AI agents and interactive applications.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./agent-robot-avatar.js",
|
|
7
|
-
"module": "./agent-robot-avatar.js",
|
|
8
|
-
"types": "./index.d.ts",
|
|
9
|
-
"browser": "./agent-robot-avatar.js",
|
|
10
|
-
"unpkg": "./agent-robot-avatar.js",
|
|
11
|
-
"jsdelivr": "./agent-robot-avatar.js",
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"types": "./index.d.ts",
|
|
15
|
-
"import": "./agent-robot-avatar.js",
|
|
16
|
-
"default": "./agent-robot-avatar.js"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
"sideEffects": true,
|
|
20
|
-
"scripts": {
|
|
21
|
-
"dev": "node scripts/serve.mjs",
|
|
22
|
-
"build:pages": "node scripts/build-pages.mjs",
|
|
23
|
-
"check": "node scripts/check-source.mjs",
|
|
24
|
-
"test": "npm run check && npm run test:types && npm run test:release && npm run test:package && npm run test:browser && npm run build:pages",
|
|
25
|
-
"release:check": "npm test && npm publish --dry-run --ignore-scripts --tag latest",
|
|
26
|
-
"prepublishOnly": "npm test && node scripts/check-publish-tag.mjs",
|
|
27
|
-
"test:types": "tsc -p tsconfig.types.json",
|
|
28
|
-
"test:release": "node --test tests/release.test.mjs",
|
|
29
|
-
"test:package": "node --test tests/package.test.mjs",
|
|
30
|
-
"test:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"svg
|
|
50
|
-
"animation",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "agent-robot-avatar",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "A lightweight expressive robot avatar Web Component for AI agents and interactive applications.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./agent-robot-avatar.js",
|
|
7
|
+
"module": "./agent-robot-avatar.js",
|
|
8
|
+
"types": "./index.d.ts",
|
|
9
|
+
"browser": "./agent-robot-avatar.js",
|
|
10
|
+
"unpkg": "./agent-robot-avatar.js",
|
|
11
|
+
"jsdelivr": "./agent-robot-avatar.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./index.d.ts",
|
|
15
|
+
"import": "./agent-robot-avatar.js",
|
|
16
|
+
"default": "./agent-robot-avatar.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"sideEffects": true,
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "node scripts/serve.mjs",
|
|
22
|
+
"build:pages": "node scripts/build-pages.mjs",
|
|
23
|
+
"check": "node scripts/check-source.mjs",
|
|
24
|
+
"test": "npm run check && npm run test:types && npm run test:release && npm run test:package && npm run test:waiting && npm run test:browser && npm run build:pages",
|
|
25
|
+
"release:check": "npm test && npm publish --dry-run --ignore-scripts --tag latest",
|
|
26
|
+
"prepublishOnly": "npm test && node scripts/check-publish-tag.mjs",
|
|
27
|
+
"test:types": "tsc -p tsconfig.types.json",
|
|
28
|
+
"test:release": "node --test tests/release.test.mjs",
|
|
29
|
+
"test:package": "node --test tests/package.test.mjs",
|
|
30
|
+
"test:waiting": "node --test tests/waiting-wave.test.mjs",
|
|
31
|
+
"test:browser": "playwright test"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"agent-robot-avatar.js",
|
|
35
|
+
"index.d.ts",
|
|
36
|
+
"src/",
|
|
37
|
+
"assets/support/",
|
|
38
|
+
"docs/",
|
|
39
|
+
"README.md",
|
|
40
|
+
"CHANGELOG.md",
|
|
41
|
+
"LICENSE"
|
|
42
|
+
],
|
|
43
|
+
"keywords": [
|
|
44
|
+
"ai",
|
|
45
|
+
"agent",
|
|
46
|
+
"robot",
|
|
47
|
+
"avatar",
|
|
48
|
+
"web-component",
|
|
49
|
+
"svg",
|
|
50
|
+
"svg-animation",
|
|
51
|
+
"animation",
|
|
52
|
+
"interactive",
|
|
53
|
+
"vanilla-javascript",
|
|
54
|
+
"ui"
|
|
55
|
+
],
|
|
56
|
+
"author": "CX ArtLab",
|
|
57
|
+
"license": "MIT",
|
|
58
|
+
"repository": {
|
|
59
|
+
"type": "git",
|
|
60
|
+
"url": "git+https://github.com/CX-ArtLab/agent-robot-avatar.git"
|
|
61
|
+
},
|
|
62
|
+
"homepage": "https://github.com/CX-ArtLab/agent-robot-avatar#readme",
|
|
63
|
+
"bugs": {
|
|
64
|
+
"url": "https://github.com/CX-ArtLab/agent-robot-avatar/issues"
|
|
65
|
+
},
|
|
66
|
+
"funding": {
|
|
67
|
+
"type": "individual",
|
|
68
|
+
"url": "https://ko-fi.com/P0E625WIOI"
|
|
69
|
+
},
|
|
70
|
+
"publishConfig": {
|
|
71
|
+
"access": "public",
|
|
72
|
+
"registry": "https://registry.npmjs.org/"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@playwright/test": "1.62.1",
|
|
76
|
+
"typescript": "7.0.2"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|