wobnimo 0.0.0-stage → 0.1.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/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@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.
@@ -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';