wobnimo 0.0.0-stage → 0.1.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/AGENTS.md ADDED
@@ -0,0 +1,84 @@
1
+ # Wobnimo — guide for AI agents
2
+
3
+ Wobnimo renders animated mascots in a web app. One engine, ten characters, ten
4
+ emotional states. Use this file to add or wire up a mascot correctly.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ npm i wobnimo
10
+ ```
11
+
12
+ No build step? Add one tag instead:
13
+
14
+ ```html
15
+ <script type="module" src="https://cdn.jsdelivr.net/npm/wobnimo@0.1/dist/wobnimo.js"></script>
16
+ ```
17
+
18
+ ## Render it
19
+
20
+ React / Next.js (add `"use client"` in app-router files):
21
+
22
+ ```tsx
23
+ import { Mascot } from 'wobnimo/react';
24
+ <Mascot character="mochi" state="thinking" style={{ width: 160, height: 160 }} />
25
+ ```
26
+
27
+ Anything else (Vue, Svelte, plain HTML):
28
+
29
+ ```html
30
+ <wobnimo-mascot character="mochi" state="idle"></wobnimo-mascot>
31
+ ```
32
+
33
+ Size it 96–160 px square. Put it where the assistant or chat lives.
34
+
35
+ ## Characters
36
+
37
+ `volt` (robot), `pip` (songbird), `mochi` (jelly), `boo` (ghost), `inky` (octopus),
38
+ `miso` (plush cat), `tad` (tree frog), `pebble` (penguin), `rex` (baby dino),
39
+ `microduck` (robot duck). Import one to ship only its ~1.2 KB of data:
40
+ `import { mochi } from 'wobnimo/characters/mochi'`.
41
+
42
+ ## States — the whole point
43
+
44
+ Drive the state from what the app is doing. The ten states and when to use each:
45
+
46
+ | State | Use it when |
47
+ | --- | --- |
48
+ | `idle` | waiting for the user |
49
+ | `listening` | the user is typing or talking |
50
+ | `thinking` | a request is sent, no reply yet |
51
+ | `speaking` | a reply is streaming in |
52
+ | `working` | running a tool, a build, a long task |
53
+ | `error` | something failed |
54
+ | `celebrating` | a task finished, tests passed |
55
+ | `surprised` | an unexpected event |
56
+ | `sad` | it could not help |
57
+ | `sleeping` | idle for a couple of minutes |
58
+
59
+ Set the state through the `state` prop/attribute, or `mascot.setState('thinking')`.
60
+
61
+ ## AI chat, one line
62
+
63
+ Using the Vercel AI SDK? Pass `useChat`'s `status` straight in; the mascot thinks,
64
+ speaks, celebrates and shows errors for you:
65
+
66
+ ```tsx
67
+ const { status } = useChat();
68
+ <Mascot character="mochi" status={status} />
69
+ ```
70
+
71
+ Plain JS with the element: set the `status` attribute to `submitted`, `streaming`,
72
+ `ready` or `error`.
73
+
74
+ ## Rules
75
+
76
+ - Prefer the `status` prop for chat UIs; otherwise map the app's real events to the
77
+ states above. Don't leave a mascot stuck on `idle`.
78
+ - Unknown character or state names throw at runtime and name the valid ones — read
79
+ the console if a mascot doesn't appear.
80
+ - Recolour with `palette`, e.g. `palette={{ shell: '#e0457b' }}`; material names are
81
+ per character.
82
+ - Verify: run the app and confirm the mascot renders and changes state during one chat turn.
83
+
84
+ Full reference: https://pouryaak.github.io/wobnimo/llms.txt
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pourya Akhbari
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.
package/README.md CHANGED
@@ -1,3 +1,150 @@
1
- # Temporary Holding Version
1
+ <div align="center">
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <a href="https://pouryaak.github.io/wobnimo/">
4
+ <picture>
5
+ <source srcset="https://pouryaak.github.io/wobnimo/media/team.webp" type="image/webp">
6
+ <img src="https://pouryaak.github.io/wobnimo/media/team.gif" alt="The Wobnimo team: ten animated mascots lined up like a team photo, celebrating in a wave" width="900">
7
+ </picture>
8
+ </a>
9
+
10
+ # wobnimo
11
+
12
+ ### Give your app a face.
13
+
14
+ Ten living mascots on one featherweight animation engine for the web.
15
+ Real 3D, every mood, ~25&nbsp;KB, zero dependencies — and built so an AI agent can wire it up for you.
16
+
17
+ [![npm](https://img.shields.io/npm/v/wobnimo?color=d9f55c&labelColor=16181d)](https://www.npmjs.com/package/wobnimo)
18
+ [![gzip](https://img.shields.io/badge/one%20mascot-~25%20KB%20gzip-d9f55c?labelColor=16181d)](https://pouryaak.github.io/wobnimo/)
19
+ [![zero deps](https://img.shields.io/badge/dependencies-0-d9f55c?labelColor=16181d)](https://www.npmjs.com/package/wobnimo?activeTab=dependencies)
20
+ [![license](https://img.shields.io/npm/l/wobnimo?color=d9f55c&labelColor=16181d)](./LICENSE)
21
+
22
+ **[▶ Live playground](https://pouryaak.github.io/wobnimo/)** · **[Quickstart](#add-one-in-10-seconds)** · **[For AI agents](#for-ai-agents)**
23
+
24
+ </div>
25
+
26
+ ---
27
+
28
+ Chatbots, copilots and apps feel alive when something on screen reacts. Wobnimo gives you a
29
+ character that **thinks while it works, talks while it streams, and celebrates when it's done** —
30
+ in a tag you drop anywhere, with no build step and nothing to configure.
31
+
32
+ ## Add one in 10 seconds
33
+
34
+ No build, no npm, no framework. Two lines in any HTML page:
35
+
36
+ ```html
37
+ <script type="module" src="https://cdn.jsdelivr.net/npm/wobnimo@0.1/dist/wobnimo.js"></script>
38
+
39
+ <wobnimo-mascot character="mochi" state="thinking"></wobnimo-mascot>
40
+ ```
41
+
42
+ That's it — a living mascot is on your page. [Try every character and mood in the playground →](https://pouryaak.github.io/wobnimo/)
43
+
44
+ ## Meet the team
45
+
46
+ **Volt** the LED robot · **Pip** the songbird · **Mochi** the jelly · **Boo** the ghost · **Inky** the octopus ·
47
+ **Miso** the plush cat · **Tad** the tree frog · **Pebble** the penguin · **Rex** the baby dino · **Microduck** the robot duck.
48
+
49
+ Each has its own body, surface and personality, and every one of them plays all ten moods.
50
+ Recolour any of them to match your brand, or write your own as plain data.
51
+
52
+ ## Give your AI a face
53
+
54
+ This is the part that matters. An assistant that just spins a loader feels like a machine.
55
+ Wire a mascot to what your app is doing and it feels like someone is in there.
56
+
57
+ <div align="center">
58
+ <img src="https://pouryaak.github.io/wobnimo/media/moods.png" alt="Mochi in six moods: listening, thinking, speaking, working, celebrating, sleeping" width="900">
59
+ </div>
60
+
61
+ Using the [Vercel AI SDK](https://ai-sdk.dev)? It's **one prop** — the mascot thinks, speaks,
62
+ celebrates and shows errors for you:
63
+
64
+ ```tsx
65
+ import { Mascot } from 'wobnimo/react';
66
+
67
+ const { status } = useChat();
68
+
69
+ <Mascot character="mochi" status={status} />
70
+ ```
71
+
72
+ The ten states map straight onto what an app or agent actually does:
73
+
74
+ | State | Show it when | | State | Show it when |
75
+ | --- | --- | --- | --- | --- |
76
+ | `idle` | waiting for the user | | `working` | running a tool or long task |
77
+ | `listening` | the user is typing | | `error` | something failed |
78
+ | `thinking` | request sent, no reply yet | | `celebrating` | a task finished |
79
+ | `speaking` | a reply is streaming | | `surprised` | an unexpected event |
80
+ | `sleeping` | idle for a while | | `sad` | it couldn't help |
81
+
82
+ ## For AI agents
83
+
84
+ Wobnimo is built to be installed *by* an agent. On the [playground](https://pouryaak.github.io/wobnimo/),
85
+ every character has a **Copy for agent** button: it copies one self-contained prompt that tells any
86
+ agent (Claude Code, Cursor, Copilot, v0…) exactly what to install and how to wire the mascot to your
87
+ app's real events. Paste it, and it's done.
88
+
89
+ Prefer to point your agent at the docs? Everything is at
90
+ **[pouryaak.github.io/wobnimo/llms.txt](https://pouryaak.github.io/wobnimo/llms.txt)**, and the package
91
+ ships an `AGENTS.md` so an agent inspecting `node_modules/wobnimo` already knows the rules.
92
+
93
+ ## Use it with a bundler
94
+
95
+ ```bash
96
+ npm i wobnimo
97
+ ```
98
+
99
+ **React / Next.js** (`"use client"` in app-router files):
100
+
101
+ ```tsx
102
+ import { Mascot } from 'wobnimo/react';
103
+
104
+ <Mascot character="volt" state="thinking" style={{ width: 160, height: 160 }} />
105
+ ```
106
+
107
+ **Vanilla JS, Vue, Svelte, anything** — register the element once, then use the tag:
108
+
109
+ ```ts
110
+ import 'wobnimo/element';
111
+ // <wobnimo-mascot character="pip" state="speaking"></wobnimo-mascot>
112
+ ```
113
+
114
+ **Control it in code:**
115
+
116
+ ```ts
117
+ import { mount } from 'wobnimo';
118
+ import { mochi } from 'wobnimo/characters/mochi';
119
+
120
+ const mascot = mount(document.querySelector('#mascot'), mochi);
121
+ agent.on('status', (s) => mascot.setState(s)); // idle · thinking · speaking · …
122
+ mascot.setPalette({ jelly: '#ff5d8f' }); // recolour live, no rebuild
123
+ ```
124
+
125
+ Import one character (`wobnimo/characters/mochi`, ~1.2 KB) or the whole cast (`wobnimo/characters`) —
126
+ you only ship what you use.
127
+
128
+ ## Why Wobnimo
129
+
130
+ - **Tiny.** One mascot is ~25 KB gzipped, the whole thing has **zero dependencies**, and no Three.js.
131
+ - **Real, not a sprite.** Characters are signed-distance 3D with studio lighting, so they're crisp at any size and animate from springs, not canned clips.
132
+ - **Characters are data.** A character is plain JSON — parts, materials, bones. Recolour, remix with `variant()`, or write your own.
133
+ - **Drops in anywhere.** A web component for every framework, a first-class React wrapper, and a CDN tag for no-build pages.
134
+ - **Respectful.** Honours `prefers-reduced-motion`, sleeps when off-screen, and shares one WebGL context so a page can hold a whole cast.
135
+
136
+ ## Links
137
+
138
+ - 🎨 **[Live playground](https://pouryaak.github.io/wobnimo/)** — every character, every mood, copy-paste install
139
+ - 📦 **[npm](https://www.npmjs.com/package/wobnimo)**
140
+ - 🤖 **[llms.txt](https://pouryaak.github.io/wobnimo/llms.txt)** — the whole API for agents
141
+
142
+ ---
143
+
144
+ <div align="center">
145
+
146
+ If Wobnimo makes your app smile, **drop a ⭐** — it genuinely helps other people find it.
147
+
148
+ Built with care. MIT licensed. · Next: a WebGPU renderer, a Rust + WebAssembly core, a visual editor.
149
+
150
+ </div>
@@ -0,0 +1,6 @@
1
+ import { C as CharacterSpec } from '../types-PAZ6PnKv.js';
2
+
3
+ /** A floating ghost with a rippling hem and little arms. */
4
+ declare const boo: CharacterSpec;
5
+
6
+ export { boo };
@@ -0,0 +1 @@
1
+ var r={id:"boo",name:"Boo",tagline:"Floats, glows from inside, trails motes, a hem that ripples",accent:"#8a6cf0",frame:{target:.78,radius:.92},bound:{y:.72,radius:.72},motion:{float:.22,hop:.12,squash:.8,snap:.8,talkSquash:.6},glowPool:.55,materials:{ghost:{color:"#eceaff",f0:.04,spec:.5,shininess:30,rim:1.4,sss:.4,sssColor:"#b9a4ff",emit:"#6f52d9",emitStrength:.06},bead:{color:"#1b1430",f0:.06,spec:2.2,shininess:400,rim:.2,gloss:1}},bones:[{name:"body",pivot:[0,0,0],drive:{rx:[["pitch",-0.5]],ry:[["yaw",.7]],rz:[["roll",.6]]},wave:{rz:[.03,.45,0]}},{name:"armL",parent:"body",pivot:[-0.36,.74,.04],drive:{rz:[["flap",-1.2]]},wave:{rz:[.08,.7,0]},jiggle:{axis:[-0.8,-0.6,0],length:.15,freq:2,damping:.2,maxAngle:.7}},{name:"armR",parent:"body",pivot:[.36,.74,.04],drive:{rz:[["flap",1.2]]},wave:{rz:[-0.08,.7,1.6]},jiggle:{axis:[.8,-0.6,0],length:.15,freq:2,damping:.2,maxAngle:.7}}],parts:[{bone:"body",shape:"sphere",at:[0,.88,0],radius:.4,material:"ghost"},{bone:"body",shape:"roundCone",from:[0,.88,0],to:[0,.4,0],r1:.4,r2:.47,material:"ghost"},{bone:"body",shape:"hem",y:.34,amplitude:.045,waves:6,speed:2.4,blend:.05,material:"ghost"},{bone:"armL",shape:"capsule",from:[0,0,0],to:[-0.12,-0.09,.02],radius:.07,blend:.08,material:"ghost"},{bone:"armR",shape:"capsule",from:[0,0,0],to:[.12,-0.09,.02],radius:.07,blend:.08,material:"ghost"}],paints:[{bone:"body",on:["ghost"],kind:"sphere",at:[-0.24,.78,.31],radius:.07,color:"#ffa3c4",soft:.6,opacity:.7},{bone:"body",on:["ghost"],kind:"sphere",at:[.24,.78,.31],radius:.07,color:"#ffa3c4",soft:.6,opacity:.7}],eyes:{kind:"bead",bone:"body",at:[[-0.135,.9,.375],[.135,.9,.375]],radii:[.048,.072,.03],material:"bead"},face:{kind:"mouth",bone:"body",on:["ghost"],at:[0,.77,.38],width:.075,color:"#2a1a4a",tongue:"#ff7fa6"},anchors:{top:{bone:"body",at:[.16,1.2,.1]},mouth:{bone:"body",at:[0,.77,.4]},ear:{bone:"body",at:[-0.42,.92,0]},center:{bone:"body",at:[0,.8,0]}},acting:{idle:{armL:{rz:[0,.1,.7,0]},armR:{rz:[0,.1,.7,1.3]}},thinking:{armR:{ry:-1.1,rz:.9},armL:{rz:.25}},listening:{armL:{rz:-1,rx:-0.35}},speaking:{armL:{rz:[-0.3,.3,1.2,0],rx:[-0.3,.2,.9,0]},armR:{rz:[.3,.3,1.2,1.7],rx:[-0.3,.2,.9,2.2]}},sleeping:{armL:{rz:.4},armR:{rz:-0.4},body:{rz:.08}},working:{armL:{rx:[-0.6,.15,6,0],rz:-0.3},armR:{rx:[-0.6,.15,6,Math.PI],rz:.3}},error:{armL:{rz:[-1,.25,10,0]},armR:{rz:[1,.25,10,1]}},surprised:{armL:{rz:-1.4,rx:-0.4},armR:{rz:1.4,rx:-0.4}},celebrating:{armL:{rz:[-1.6,.3,4,0]},armR:{rz:[1.6,.3,4,Math.PI]}},sad:{armL:{rz:.5},armR:{rz:-0.5},body:{rz:.05}},happy:{armL:{rz:[-1.3,.35,3,0]},armR:{rz:[1.3,.35,3,1.2]}}},fx:{ambient:[{glyph:"mote",anchor:"center",rate:1.3,spread:.5,velocity:[0,.07,0],jitter:.06,wobble:.09,life:[2.2,3.2],size:[.04,.02],color:"#b49cff",glow:true}],happy:[{glyph:"heart",anchor:"top",rate:1.2,spread:.2,velocity:[0,.22,.05],jitter:.12,wobble:.06,life:[1,1.3],size:[.04,.07],color:"#ff86b0"}]}};export{r as boo};
@@ -0,0 +1,12 @@
1
+ export { c as characters, d as defineWobnimoElement } from '../element-DRDEWSGV.js';
2
+ export { boo } from './boo.js';
3
+ export { inky } from './inky.js';
4
+ export { microduck } from './microduck.js';
5
+ export { miso } from './miso.js';
6
+ export { mochi } from './mochi.js';
7
+ export { pebble } from './pebble.js';
8
+ export { pip } from './pip.js';
9
+ export { rex } from './rex.js';
10
+ export { tad } from './tad.js';
11
+ export { volt } from './volt.js';
12
+ import '../types-PAZ6PnKv.js';