agent-robot-avatar 0.3.2 → 0.5.2

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,124 +1,170 @@
1
- # Changelog
2
-
3
- All notable user-facing changes to Agent Robot Avatar are documented here.
4
-
5
- The project follows Semantic Versioning for public releases. Internal development build numbers are not part of the public version history.
6
-
7
- ## [Unreleased]
8
-
9
- ## [0.3.2] - 2026-09-10
10
-
11
- ### Fixed
12
-
13
- - Unified synchronous `size` attribute parsing so numeric and `px` values use the same validation immediately, without a transient fallback before runtime observers run.
14
- - Added the existing public `sleep()`, `wake()`, and `input()` convenience methods to the TypeScript declaration surface and type checks.
15
- - Stabilized request-replacement race tests by ordering competing clicks in the same browser task instead of depending on an 80 ms wall-clock window.
16
- - Expanded package integrity coverage to require the runtime and geometry modules explicitly.
17
-
18
- - Prevented the accessible request lifecycle example's delayed replacement step from starting after cancellation, a newer user request, or a newer replacement flow has invalidated it.
19
- - Made the example's business status the only automatic live region; the visible request debug log remains available for deliberate reading without `role="log"` live semantics or whole-log text rewrites.
20
-
21
- ## [0.3.1] - 2026-09-10
22
-
23
- ### Fixed
24
-
25
- - Prevented disconnect cleanup from recreating per-instance media-query listeners and observers; reattaching now initializes connected runtime resources once without emitting cleanup-only lifecycle events.
26
- - Decoupled automatic sleep timing from frame rendering so `motion="reduce"` can pause continuous drawing without disabling `auto-sleep`, while active waiting/input continue to take priority.
27
- - Ensured reduced-motion state changes commit their final static SVG before rendering pauses, including the fully closed sleep pose.
28
- - Made `stopWaiting()` terminate the action it actually resets: waiting ends normally, other active program actions are cancelled once, and idle calls emit no false terminal event.
29
- - Separated explicit `noteActivity()` calls from ambient DOM activity so host calls inside real event handlers keep API semantics while automatic wakeups continue to obey `wake-on`.
30
- - Restricted action alias lookup to declared keys so prototype-like names such as `constructor` and `__proto__` fail before changing waiting/action state.
31
-
32
- ## [0.3.0] - 2026-09-10
33
-
34
- ### Added
35
-
36
- - Added `wake-on="activity|interaction|manual"` to control automatic wake behavior while preserving `activity` as the default.
37
- - Added `motion="auto|reduce|full"`; `auto` follows `prefers-reduced-motion` and updates when the system preference changes.
38
- - Added the semantic `action-state` event with `{ action, phase, source }` lifecycle data for host integrations and accessible status messaging.
39
- - Added explicit `px` support for `size`, alongside existing numeric pixel values.
40
- - Added Chromium, Firefox, and WebKit browser validation, including trusted Chromium touch-cancellation coverage.
41
-
42
- ### Changed
43
-
44
- - Unified program-action and drag cancellation so reset, replacement actions, disconnect, and pointer cancellation cannot leave delayed drag reactions behind.
45
- - Program-controlled actions such as waiting and input now keep ownership of their expression while drag deformation remains available; suppressed drag reactions are discarded rather than replayed.
46
- - Invalid/no-op actions are validated before destructive extension cleanup, so an invalid `wake` or unknown action cannot tear down a running action.
47
- - Touch interaction uses `touch-action: pinch-zoom` on the avatar interaction region so single-pointer dragging remains available while page scrolling outside the avatar is unaffected and two-finger zoom remains possible.
48
- - Reduced-motion mode removes continuous decorative motion while preserving distinct static states and semantic action lifecycles.
49
- - Avatars pause sustained frame rendering when hidden, without layout, or outside the viewport, then resume the current state when visible again.
50
- - High-frequency pointer updates are coalesced to the latest update per animation frame.
51
- - Shared the head-flattening geometry used by the antenna and roundness modules.
52
-
53
- ### Fixed
54
-
55
- - Preserved valid `window.AgentRobotAvatarInspectConfig` values supplied before module loading and normalized missing, invalid, and out-of-range values deterministically.
56
- - Distinguished `pointercancel` from a normal release so cancelled touch gestures recover without success/angry feedback.
57
- - Tightened `size` parsing so unsupported units, malformed values, zero, negative, and non-finite input use the default size instead of being partially parsed as pixels.
58
-
59
- ## [0.2.1] - 2026-09-05
60
-
61
- ### Fixed
62
-
63
- - Fixed dynamic custom-element creation failing because the constructor added a host style attribute; preserved default and explicit sizing.
64
- - Prevented interrupted expression continuations and animation callbacks from overriding resets or newer actions.
65
- - Fixed automatic sleep repeatedly restarting its own preparation instead of reaching sleep.
66
- - Synchronized dynamic head colors with the eye masks and antenna, including while sleep rendering is paused.
67
- - Cancelled pending timers, animations, waiting, and drag feedback on disconnect; reattached avatars start idle with their settings preserved.
68
-
69
- ## [0.2.0] - 2026-09-04
70
-
71
- First stable release of the backward-compatible 0.2 series.
72
-
73
- ### Added
74
-
75
- - Added Traditional Chinese, Japanese, Korean, Spanish, Portuguese, German, and French documentation.
76
- - Added package, installation, server-import, and real-browser smoke tests.
77
- - Added `setAntennaFlash(enabled)` for per-avatar antenna flashing.
78
- - Added built-in TypeScript declarations for actions, events, and public methods.
79
-
80
- ### Changed
81
-
82
- - Added a lightweight animated GIF preview for the README documentation.
83
- - Moved localized README files into the `docs/` directory and added a unified language selector.
84
- - Moved the interactive Demo and Windows launcher into the `demo/` directory.
85
- - Removed runtime Demo badge logic and cache-busting query strings from internal module imports.
86
- - Made the package safe to import in server-side JavaScript without browser globals.
87
- - Corrected package side-effect metadata so bundlers preserve custom-element registration.
88
- - Added typed package exports and automated declaration checks for npm consumers.
89
- - Added an npm release rehearsal command and forced publishing to the official npm registry.
90
- - Replaced four layers of runtime method wrapping with a shared extension registry.
91
- - Routed built-in actions and antenna drawing through the same registry, leaving one lifecycle entry point.
92
- - Shared global input listeners across avatar instances and paused frame rendering after sleep animations settle.
93
-
94
- ## [0.1.0] - 2026-09-02
95
-
96
- First public release.
97
-
98
- ### Added
99
-
100
- - Reusable `<agent-robot-avatar>` Web Component built with SVG and vanilla JavaScript
101
- - Public `play(name)` and `reset()` APIs
102
- - Idle gaze, automatic blinking, pointer following, and inertial head movement
103
- - Jelly-style local drag deformation with elastic recovery
104
- - `idle`, `bored`, `waiting`, `input`, `send`, `success`, `failure`, `warning`, `inspect`, `angry`, `error`, `surprise`, `sleep`, and `wake` states
105
- - Dedicated `startWaiting()` and `stopWaiting()` lifecycle for pending Agent requests
106
- - Distinct semantics for task failure, system error, blocked content, warning confirmation, and result inspection
107
- - Semantic aliases for failure, review / verification, blocked-content, and system / connection-error states
108
- - `face-state` event for host application synchronization
109
- - `setPointerFollow(enabled)` API
110
- - Adjustable head shape with `setHeadRoundness(value)` and `getHeadRoundness()`
111
- - `head-roundness-change` event
112
- - Optional `size`, `color`, and `auto-sleep` attributes
113
- - Floating antenna with optional status flashing, disabled by default
114
- - Full interactive Demo and a minimal integration example
115
- - English and Simplified Chinese documentation
116
- - npm-compatible package metadata for later package publication
117
- - Contribution guide, issue templates, pull request template, MIT License, and Ko-fi funding metadata
118
-
119
- [0.3.2]: https://github.com/CX-ArtLab/agent-robot-avatar/releases/tag/v0.3.2
120
- [0.3.1]: https://github.com/CX-ArtLab/agent-robot-avatar/releases/tag/v0.3.1
121
- [0.3.0]: https://github.com/CX-ArtLab/agent-robot-avatar/releases/tag/v0.3.0
122
- [0.2.1]: https://github.com/CX-ArtLab/agent-robot-avatar/releases/tag/v0.2.1
123
- [0.2.0]: https://github.com/CX-ARTLab/agent-robot-avatar/releases/tag/v0.2.0
124
- [0.1.0]: https://github.com/CX-ARTLab/agent-robot-avatar/releases/tag/v0.1.0
1
+ # Changelog
2
+
3
+ All notable user-facing changes to Agent Robot Avatar are documented here.
4
+
5
+ The project follows Semantic Versioning for public releases. Internal development build numbers are not part of the public version history.
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.5.2] - 2026-10-06
10
+
11
+ ### Fixed
12
+
13
+ - Corrected the repository URL case in `package.json` so npm provenance publishing succeeds.
14
+
15
+ ## [0.5.1] - 2026-10-05
16
+
17
+ ### Fixed
18
+
19
+ - `love` now shows the full heart under reduced motion, and `love` and `random` follow motion preference changes while they play.
20
+
21
+ ## [0.5.0] - 2026-10-05
22
+
23
+ ### Added
24
+
25
+ - Added the `love` action: the eyes lean together into a heart, beat three times, then return.
26
+ - Added the `random` action (alias `slot`): the eyes roll like slot-machine reels, then settle with a bounce.
27
+
28
+ ## [0.4.3] - 2026-09-22
29
+
30
+ ### Fixed
31
+
32
+ - Restored the existing head-drag, waiting, sleep-wake, and touch-cancel behavior alongside press-and-hold squeezing by deferring squeeze activation until the hold is confirmed.
33
+ - Refined the wrap waiting animation with shared rotational projection, optical height compensation, and edge contact so the eyes turn around the head without overlapping, clipping, or using transparency.
34
+
35
+ ## [0.4.2] - 2026-09-21
36
+
37
+ ### Added
38
+
39
+ - Added a second waiting choice, `startWaiting({ variant: 'wrap' })`, with the approved 2.4-second left-out/right-in eye turn and custom easing. `play('waiting-wrap')` plays one cycle; the original waiting remains available and is the default.
40
+ - Added center press-and-hold squeezing, sustained compression tremor, and spring/jelly release. Moving more than 4 CSS pixels transfers the gesture to the existing head drag.
41
+ - Added antenna dragging with the head drag's 25-unit pull cap, a localized head deformation, a firmer spring return, and the existing angry reaction after recovery.
42
+ - Added `setPressSqueeze()` and `setAntennaDrag()` opt-outs, interaction state events, and reduced-motion behavior.
43
+ - Added localized “Try” tags below the Demo status for double-clicking, head dragging, center press-and-hold squeezing, and antenna dragging.
44
+
45
+ ### Changed
46
+
47
+ - Renamed and repositioned the Demo action as “Waiting · Wrap” directly after the original waiting action.
48
+
49
+ ### Fixed
50
+
51
+ - Kept both eyes looking at the live pointer position throughout antenna dragging instead of returning them to center when the drag begins.
52
+
53
+ ## [0.3.2] - 2026-09-10
54
+
55
+ ### Fixed
56
+
57
+ - Unified synchronous `size` attribute parsing so numeric and `px` values use the same validation immediately, without a transient fallback before runtime observers run.
58
+ - Added the existing public `sleep()`, `wake()`, and `input()` convenience methods to the TypeScript declaration surface and type checks.
59
+ - Stabilized request-replacement race tests by ordering competing clicks in the same browser task instead of depending on an 80 ms wall-clock window.
60
+ - Expanded package integrity coverage to require the runtime and geometry modules explicitly.
61
+
62
+ - Prevented the accessible request lifecycle example's delayed replacement step from starting after cancellation, a newer user request, or a newer replacement flow has invalidated it.
63
+ - Made the example's business status the only automatic live region; the visible request debug log remains available for deliberate reading without `role="log"` live semantics or whole-log text rewrites.
64
+
65
+ ## [0.3.1] - 2026-09-10
66
+
67
+ ### Fixed
68
+
69
+ - Prevented disconnect cleanup from recreating per-instance media-query listeners and observers; reattaching now initializes connected runtime resources once without emitting cleanup-only lifecycle events.
70
+ - Decoupled automatic sleep timing from frame rendering so `motion="reduce"` can pause continuous drawing without disabling `auto-sleep`, while active waiting/input continue to take priority.
71
+ - Ensured reduced-motion state changes commit their final static SVG before rendering pauses, including the fully closed sleep pose.
72
+ - Made `stopWaiting()` terminate the action it actually resets: waiting ends normally, other active program actions are cancelled once, and idle calls emit no false terminal event.
73
+ - Separated explicit `noteActivity()` calls from ambient DOM activity so host calls inside real event handlers keep API semantics while automatic wakeups continue to obey `wake-on`.
74
+ - Restricted action alias lookup to declared keys so prototype-like names such as `constructor` and `__proto__` fail before changing waiting/action state.
75
+
76
+ ## [0.3.0] - 2026-09-10
77
+
78
+ ### Added
79
+
80
+ - Added `wake-on="activity|interaction|manual"` to control automatic wake behavior while preserving `activity` as the default.
81
+ - Added `motion="auto|reduce|full"`; `auto` follows `prefers-reduced-motion` and updates when the system preference changes.
82
+ - Added the semantic `action-state` event with `{ action, phase, source }` lifecycle data for host integrations and accessible status messaging.
83
+ - Added explicit `px` support for `size`, alongside existing numeric pixel values.
84
+ - Added Chromium, Firefox, and WebKit browser validation, including trusted Chromium touch-cancellation coverage.
85
+
86
+ ### Changed
87
+
88
+ - Unified program-action and drag cancellation so reset, replacement actions, disconnect, and pointer cancellation cannot leave delayed drag reactions behind.
89
+ - Program-controlled actions such as waiting and input now keep ownership of their expression while drag deformation remains available; suppressed drag reactions are discarded rather than replayed.
90
+ - Invalid/no-op actions are validated before destructive extension cleanup, so an invalid `wake` or unknown action cannot tear down a running action.
91
+ - Touch interaction uses `touch-action: pinch-zoom` on the avatar interaction region so single-pointer dragging remains available while page scrolling outside the avatar is unaffected and two-finger zoom remains possible.
92
+ - Reduced-motion mode removes continuous decorative motion while preserving distinct static states and semantic action lifecycles.
93
+ - Avatars pause sustained frame rendering when hidden, without layout, or outside the viewport, then resume the current state when visible again.
94
+ - High-frequency pointer updates are coalesced to the latest update per animation frame.
95
+ - Shared the head-flattening geometry used by the antenna and roundness modules.
96
+
97
+ ### Fixed
98
+
99
+ - Preserved valid `window.AgentRobotAvatarInspectConfig` values supplied before module loading and normalized missing, invalid, and out-of-range values deterministically.
100
+ - Distinguished `pointercancel` from a normal release so cancelled touch gestures recover without success/angry feedback.
101
+ - Tightened `size` parsing so unsupported units, malformed values, zero, negative, and non-finite input use the default size instead of being partially parsed as pixels.
102
+
103
+ ## [0.2.1] - 2026-09-05
104
+
105
+ ### Fixed
106
+
107
+ - Fixed dynamic custom-element creation failing because the constructor added a host style attribute; preserved default and explicit sizing.
108
+ - Prevented interrupted expression continuations and animation callbacks from overriding resets or newer actions.
109
+ - Fixed automatic sleep repeatedly restarting its own preparation instead of reaching sleep.
110
+ - Synchronized dynamic head colors with the eye masks and antenna, including while sleep rendering is paused.
111
+ - Cancelled pending timers, animations, waiting, and drag feedback on disconnect; reattached avatars start idle with their settings preserved.
112
+
113
+ ## [0.2.0] - 2026-09-04
114
+
115
+ First stable release of the backward-compatible 0.2 series.
116
+
117
+ ### Added
118
+
119
+ - Added Traditional Chinese, Japanese, Korean, Spanish, Portuguese, German, and French documentation.
120
+ - Added package, installation, server-import, and real-browser smoke tests.
121
+ - Added `setAntennaFlash(enabled)` for per-avatar antenna flashing.
122
+ - Added built-in TypeScript declarations for actions, events, and public methods.
123
+
124
+ ### Changed
125
+
126
+ - Added a lightweight animated GIF preview for the README documentation.
127
+ - Moved localized README files into the `docs/` directory and added a unified language selector.
128
+ - Moved the interactive Demo and Windows launcher into the `demo/` directory.
129
+ - Removed runtime Demo badge logic and cache-busting query strings from internal module imports.
130
+ - Made the package safe to import in server-side JavaScript without browser globals.
131
+ - Corrected package side-effect metadata so bundlers preserve custom-element registration.
132
+ - Added typed package exports and automated declaration checks for npm consumers.
133
+ - Added an npm release rehearsal command and forced publishing to the official npm registry.
134
+ - Replaced four layers of runtime method wrapping with a shared extension registry.
135
+ - Routed built-in actions and antenna drawing through the same registry, leaving one lifecycle entry point.
136
+ - Shared global input listeners across avatar instances and paused frame rendering after sleep animations settle.
137
+
138
+ ## [0.1.0] - 2026-09-02
139
+
140
+ First public release.
141
+
142
+ ### Added
143
+
144
+ - Reusable `<agent-robot-avatar>` Web Component built with SVG and vanilla JavaScript
145
+ - Public `play(name)` and `reset()` APIs
146
+ - Idle gaze, automatic blinking, pointer following, and inertial head movement
147
+ - Jelly-style local drag deformation with elastic recovery
148
+ - `idle`, `bored`, `waiting`, `input`, `send`, `success`, `failure`, `warning`, `inspect`, `angry`, `error`, `surprise`, `sleep`, and `wake` states
149
+ - Dedicated `startWaiting()` and `stopWaiting()` lifecycle for pending Agent requests
150
+ - Distinct semantics for task failure, system error, blocked content, warning confirmation, and result inspection
151
+ - Semantic aliases for failure, review / verification, blocked-content, and system / connection-error states
152
+ - `face-state` event for host application synchronization
153
+ - `setPointerFollow(enabled)` API
154
+ - Adjustable head shape with `setHeadRoundness(value)` and `getHeadRoundness()`
155
+ - `head-roundness-change` event
156
+ - Optional `size`, `color`, and `auto-sleep` attributes
157
+ - Floating antenna with optional status flashing, disabled by default
158
+ - Full interactive Demo and a minimal integration example
159
+ - English and Simplified Chinese documentation
160
+ - npm-compatible package metadata for later package publication
161
+ - Contribution guide, issue templates, pull request template, MIT License, and Ko-fi funding metadata
162
+
163
+ [0.4.3]: https://github.com/CX-ArtLab/agent-robot-avatar/releases/tag/v0.4.3
164
+ [0.4.2]: https://github.com/CX-ArtLab/agent-robot-avatar/releases/tag/v0.4.2
165
+ [0.3.2]: https://github.com/CX-ArtLab/agent-robot-avatar/releases/tag/v0.3.2
166
+ [0.3.1]: https://github.com/CX-ArtLab/agent-robot-avatar/releases/tag/v0.3.1
167
+ [0.3.0]: https://github.com/CX-ArtLab/agent-robot-avatar/releases/tag/v0.3.0
168
+ [0.2.1]: https://github.com/CX-ArtLab/agent-robot-avatar/releases/tag/v0.2.1
169
+ [0.2.0]: https://github.com/CX-ARTLab/agent-robot-avatar/releases/tag/v0.2.0
170
+ [0.1.0]: https://github.com/CX-ARTLab/agent-robot-avatar/releases/tag/v0.1.0
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 CX ART Lab
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CX ART Lab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.