exodeui-vue 0.0.0-stage → 1.0.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/README.md CHANGED
@@ -1,3 +1,196 @@
1
- # Temporary Holding Version
1
+ # ExodeUI Vue
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
+ **Vue 3 runtime for the [ExodeUI](https://exodeui.com/?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-vue) motion engine.** Render interactive, physics-driven UI animation exported from the ExodeUI editor directly inside Vue components, with props, events and a composable that match Vue conventions.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/exodeui-vue.svg)](https://www.npmjs.com/package/exodeui-vue)
6
+ [![license](https://img.shields.io/npm/l/exodeui-vue.svg)](https://www.npmjs.com/package/exodeui-vue)
7
+ [![website](https://img.shields.io/badge/docs-exodeui.com-0f172a)](https://exodeui.com/docs?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-vue)
8
+
9
+ ExodeUI is an AI-native **motion design environment (MDE)**: design on one canvas, animate with a timeline and physics, wire logic with a state machine, then export a portable `.exode` artboard. This package plays those artboards in Vue 3 — Canvas 2D rendering, gestures, physics and data-driven charts included.
10
+
11
+ ---
12
+
13
+ ## Why use it
14
+
15
+ - **Vue-idiomatic.** `<ExodeUICanvas>` with typed props, reactive `v-model`-style sensor inputs and `@` events, plus a `useExodeUI()` composable.
16
+ - **Real interactivity, not a video.** State machines, triggers, drag, hover, keyboard and gamepad bindings run natively.
17
+ - **Ships as data.** Artboards are JSON/`.bexode`, so marketing can update motion without shipping a Vue build.
18
+ - **Same runtime as every other framework.** Identical behaviour to the [React](https://www.npmjs.com/package/exodeui), [Svelte](https://www.npmjs.com/package/exodeui-svelte), [Solid](https://www.npmjs.com/package/exodeui-solid), [Angular](https://www.npmjs.com/package/exodeui-angular) and [vanilla](https://www.npmjs.com/package/exodeui-vanilla) players.
19
+ - **Production details handled.** DPR scaling, `ResizeObserver` sizing, 120Hz pacing, pointer capture, prevented page scroll and cleanup on unmount.
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ npm install exodeui-vue
25
+ # or
26
+ pnpm add exodeui-vue
27
+ # or
28
+ yarn add exodeui-vue
29
+ ```
30
+
31
+ Requires Vue `>= 3.3`.
32
+
33
+ ## Quick start
34
+
35
+ ```vue
36
+ <template>
37
+ <div style="width: 800px; height: 600px">
38
+ <ExodeUICanvas
39
+ :artboard="artboard"
40
+ fit="Contain"
41
+ alignment="Center"
42
+ @ready="onReady"
43
+ @trigger="onTrigger"
44
+ @navigation="onNavigation"
45
+ />
46
+ </div>
47
+ </template>
48
+
49
+ <script setup lang="ts">
50
+ import { ref } from 'vue';
51
+ import { ExodeUICanvas, useExodeUI } from 'exodeui-vue';
52
+ import artboardData from './hero.exode?raw';
53
+
54
+ const artboard = ref(JSON.parse(artboardData));
55
+ const { setEngine, setInputBool, fireTrigger, getInputValue } = useExodeUI();
56
+
57
+ function onReady(engine: any) {
58
+ setEngine(engine);
59
+ setInputBool('isPlaying', true);
60
+ }
61
+
62
+ function onTrigger(name: string, animation: string) {
63
+ console.log('trigger', name, animation);
64
+ }
65
+
66
+ function onNavigation({ type, value }: { type: string; value: string }) {
67
+ if (type === 'url') window.location.href = value;
68
+ }
69
+ </script>
70
+ ```
71
+
72
+ ### Drive motion from your own UI
73
+
74
+ ```vue
75
+ <script setup lang="ts">
76
+ import { ref } from 'vue';
77
+ import { ExodeUICanvas } from 'exodeui-vue';
78
+
79
+ const canvas = ref<InstanceType<typeof ExodeUICanvas> | null>(null);
80
+ const tab = ref(0);
81
+
82
+ function selectTab(index: number) {
83
+ tab.value = index;
84
+ canvas.value?.engine?.updateInput('activeTab', index);
85
+ canvas.value?.engine?.fireTrigger('TabChange');
86
+ }
87
+ </script>
88
+
89
+ <template>
90
+ <ExodeUICanvas ref="canvas" src="/animations/tabs.exode" />
91
+ <button v-for="(label, i) in ['Overview', 'Motion', 'Physics']" :key="label" @click="selectTab(i)">
92
+ {{ label }}
93
+ </button>
94
+ </template>
95
+ ```
96
+
97
+ ### Static preview / scrubbing
98
+
99
+ ```vue
100
+ <ExodeUICanvas :artboard="artboard" :auto-play="false" :current-time="1.25" />
101
+ ```
102
+
103
+ ## Supported features
104
+
105
+ | Capability | Included |
106
+ | --- | --- |
107
+ | Canvas 2D renderer with DPR-aware scaling | ✅ |
108
+ | State machine + logic nodes (AND / OR / XOR / NOT) | ✅ |
109
+ | Boolean, number, text, trigger, array, random inputs | ✅ |
110
+ | 2D physics (Rapier): dynamic, static, kinematic bodies | ✅ |
111
+ | Spring, drag, joystick, pointer and keyboard sensors | ✅ |
112
+ | Responsive layouts, breakpoints and spatial constraints | ✅ |
113
+ | Line graphs, bar charts and pie charts with live data | ✅ |
114
+ | Text inputs, toggles, dropdowns, sliders and list views | ✅ |
115
+ | Scroll-linked and viewport-driven animation | ✅ |
116
+ | `.exode` JSON and compressed `.bexode` loading | ✅ |
117
+ | Glow, light trails, pattern grids, masks | ✅ |
118
+ | Custom effect scripts with `update(env, dt)` hooks | ✅ |
119
+
120
+ ## API
121
+
122
+ ### `<ExodeUICanvas>` props
123
+
124
+ | Prop | Type | Default | Description |
125
+ | --- | --- | --- | --- |
126
+ | `artboard` | `Artboard` | — | Parsed artboard JSON |
127
+ | `src` | `string` | — | `.exode` / `.bexode` URL or JSON string |
128
+ | `buffer` | `ArrayBuffer \| Uint8Array` | — | Pre-read `.bexode` buffer |
129
+ | `revision` | `number` | `0` | Bump to force a reload |
130
+ | `fit` | `Fit` | `'Contain'` | Fit mode |
131
+ | `alignment` | `Alignment` | `'Center'` | Alignment |
132
+ | `layoutScaleFactor` | `number` | — | Extra scale for `Fit: 'Layout'` |
133
+ | `autoPlay` | `boolean` | `true` | Auto-start the loop |
134
+ | `interactive` | `boolean` | `true` | Enable input handling |
135
+ | `preventScroll` | `boolean` | `true` | Block page scroll on wheel/touch |
136
+ | `highRefreshRate` | `boolean` | `true` | Sub-frame pacing on 120Hz displays |
137
+ | `currentTime` | `number` | — | Render a fixed time when `autoPlay` is false |
138
+ | `scrollX/Y`, `viewportScrollX/Y` | `number` | — | External scroll sensors |
139
+ | `mouseX/Y`, `isMouseDown` | `number \| boolean` | — | External pointer sensors |
140
+ | `inputs` | `Record<string, any>` | — | Inputs applied on load |
141
+ | `callbacks` | `Record<string, Function>` | — | Named listeners from the editor |
142
+
143
+ ### Events
144
+
145
+ `@ready`, `@trigger`, `@inputUpdate`, `@componentChange`, `@toggle`, `@inputChange`, `@inputFocus`, `@inputBlur`, `@buttonClick`, `@navigation`, `@graphPointClick`, `@log`, `@logicUpdate`, `@fpsUpdate`
146
+
147
+ ### Exposed on the component ref
148
+
149
+ `engine`, `play()`, `pause()`, `seek(time)`, `resize()`, `setOptions(options)`, `getArtboard()`
150
+
151
+ ### `useExodeUI()`
152
+
153
+ | Member | Description |
154
+ | --- | --- |
155
+ | `engine`, `setEngine` | Hold the engine from `@ready` |
156
+ | `updateInput`, `setInputValue` | Set any input by name or id |
157
+ | `setInputBool`, `setInputNumber`, `setInputText` | Scalar inputs |
158
+ | `setInputNumberArray`, `setInputStringArray` | Array inputs |
159
+ | `fireTrigger` | Pulse a trigger |
160
+ | `updateObjectOptions` | Replace dropdown / list options |
161
+ | `updateConstraint` | Edit a spatial constraint |
162
+ | `updateGraphData`, `updateBarChartData`, `updatePieChartData` | Live chart data |
163
+ | `setDropdownOptions` | Change dropdown items |
164
+ | `getInputValue` | Read a resolved input (including random variables) |
165
+
166
+ ## FAQ
167
+
168
+ **Can I use ExodeUI motion inside an existing Vue design system?** Yes — the canvas fills its parent, so grid, aspect-ratio or fixed sizing stays in your control, and inputs can be bound to any Vue state.
169
+
170
+ **Does it work with Nuxt?** Yes. The component touches `window`/`document` only after mount, so it is SSR-safe.
171
+
172
+ **Is ExodeUI a Rive or Lottie alternative?** It targets interactive UI rather than linear playback. See the [comparison](https://exodeui.com/alternatives/rive/?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-vue).
173
+
174
+ **What is a `.exode` file?** The portable artboard format exported by the ExodeUI editor — open JSON, or a compressed `.bexode` variant.
175
+
176
+ **How do I keep bundle size down?** Import only from `exodeui-vue`; the package is tree-shakable and the engine is a single ESM module.
177
+
178
+ ## Related packages
179
+
180
+ - [exodeui](https://www.npmjs.com/package/exodeui) — React runtime and Vite plugin
181
+ - [exodeui-vanilla](https://www.npmjs.com/package/exodeui-vanilla) — framework-free runtime
182
+ - [exodeui-svelte](https://www.npmjs.com/package/exodeui-svelte) — Svelte 5 runtime
183
+ - [exodeui-solid](https://www.npmjs.com/package/exodeui-solid) — SolidJS runtime
184
+ - [exodeui-angular](https://www.npmjs.com/package/exodeui-angular) — Angular 17+ runtime
185
+
186
+ ## Learn more
187
+
188
+ - [Documentation](https://exodeui.com/docs?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-vue)
189
+ - [Examples and templates](https://exodeui.com/examples?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-vue)
190
+ - [Component gallery](https://exodeui.com/components?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-vue)
191
+ - [Use cases](https://exodeui.com/use-cases?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-vue)
192
+ - [Learn motion design](https://exodeui.com/learn?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-vue)
193
+
194
+ ## License
195
+
196
+ MIT © ExodeUI