exodeui-angular 0.0.0-stage → 1.0.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/README.md CHANGED
@@ -1,3 +1,170 @@
1
- # Temporary Holding Version
1
+ # ExodeUI Angular
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
+ **Angular runtime for the [ExodeUI](https://exodeui.com/?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-angular) motion engine.** Use `<exodeui-canvas>` to play interactive, physics-driven UI animation designed in ExodeUI inside standalone Angular components — with `@Input`/`@Output` bindings and a service for imperative control.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/exodeui-angular.svg)](https://www.npmjs.com/package/exodeui-angular)
6
+ [![license](https://img.shields.io/npm/l/exodeui-angular.svg)](https://www.npmjs.com/package/exodeui-angular)
7
+ [![website](https://img.shields.io/badge/docs-exodeui.com-0f172a)](https://exodeui.com/docs?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-angular)
8
+
9
+ ExodeUI is an AI-native **motion development environment (MDE)**: vector design, timeline animation, Rapier physics and state-machine logic on a single canvas, exported as portable `.exode` artboards. This package renders those artboards with the same Canvas 2D engine used by every ExodeUI framework runtime.
10
+
11
+ ---
12
+
13
+ ## Highlights
14
+
15
+ - **Angular 17+ standalone component.** Drop it into any feature module or standalone app, `OnPush` by default.
16
+ - **Zone-safe performance.** The render loop runs outside `NgZone`, so 60/120fps animation never triggers change detection; outputs re-enter the zone only when they fire.
17
+ - **Typed inputs and outputs.** Every sensor, layout and callback is an `@Input`/`@Output`.
18
+ - **Service for imperative control.** Inject `ExodeUIService`, register the engine once, and drive inputs from anywhere.
19
+ - **Behaviour parity.** Matches the [React](https://www.npmjs.com/package/exodeui), [Vue](https://www.npmjs.com/package/exodeui-vue), [Svelte](https://www.npmjs.com/package/exodeui-svelte), [Solid](https://www.npmjs.com/package/exodeui-solid) and [vanilla](https://www.npmjs.com/package/exodeui-vanilla) runtimes.
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ npm install exodeui-angular
25
+ # or
26
+ pnpm add exodeui-angular
27
+ ```
28
+
29
+ Requires `@angular/core` and `@angular/common` `>= 17`.
30
+
31
+ ## Quick start
32
+
33
+ ### `app.component.html`
34
+
35
+ ```html
36
+ <div style="width: 800px; height: 600px;">
37
+ <exodeui-canvas
38
+ [artboard]="artboard"
39
+ fit="Contain"
40
+ alignment="Center"
41
+ (ready)="exoService.register($event)"
42
+ (trigger)="onTrigger($event)"
43
+ (navigation)="onNavigation($event)"
44
+ ></exodeui-canvas>
45
+ </div>
46
+ ```
47
+
48
+ ### `app.component.ts`
49
+
50
+ ```ts
51
+ import { Component, inject } from '@angular/core';
52
+ import { ExodeUICanvasComponent, ExodeUIService } from 'exodeui-angular';
53
+
54
+ @Component({
55
+ selector: 'app-root',
56
+ standalone: true,
57
+ imports: [ExodeUICanvasComponent],
58
+ templateUrl: './app.component.html',
59
+ })
60
+ export class AppComponent {
61
+ exoService = inject(ExodeUIService);
62
+ artboard = /* parsed .exode JSON */;
63
+
64
+ onTrigger({ name, anim }: { name: string; anim: string }) {
65
+ console.log('trigger', name, anim);
66
+ }
67
+
68
+ onNavigation({ type, value }: { type: string; value: string }) {
69
+ if (type === 'url') window.location.href = value;
70
+ }
71
+ }
72
+ ```
73
+
74
+ ### Drive motion from your own UI
75
+
76
+ ```ts
77
+ selectTab(index: number) {
78
+ this.exoService.updateInput('activeTab', index);
79
+ this.exoService.fireTrigger('TabChange');
80
+ }
81
+ ```
82
+
83
+ ### Static frame
84
+
85
+ ```html
86
+ <exodeui-canvas [artboard]="artboard" [autoPlay]="false" [currentTime]="1.25" />
87
+ ```
88
+
89
+ ## Supported features
90
+
91
+ | Capability | Included |
92
+ | --- | --- |
93
+ | Canvas 2D renderer with DPR-aware scaling | ✅ |
94
+ | State machine + logic nodes (AND / OR / XOR / NOT) | ✅ |
95
+ | Boolean, number, text, trigger, array, random inputs | ✅ |
96
+ | 2D physics (Rapier): dynamic, static, kinematic bodies | ✅ |
97
+ | Spring, drag, joystick, pointer and keyboard sensors | ✅ |
98
+ | Responsive layouts, breakpoints and spatial constraints | ✅ |
99
+ | Line graphs, bar charts and pie charts with live data | ✅ |
100
+ | Text inputs, toggles, dropdowns, sliders and list views | ✅ |
101
+ | Scroll-linked and viewport-driven animation | ✅ |
102
+ | `.exode` JSON and compressed `.bexode` loading | ✅ |
103
+ | Glow, light trails, pattern grids, masks | ✅ |
104
+
105
+ ## API
106
+
107
+ ### `<exodeui-canvas>` inputs
108
+
109
+ | Input | Type | Default | Description |
110
+ | --- | --- | --- | --- |
111
+ | `artboard` | `Artboard` | — | Parsed artboard JSON |
112
+ | `src` | `string` | — | `.exode` / `.bexode` URL or JSON string |
113
+ | `buffer` | `ArrayBuffer \| Uint8Array` | — | Pre-read `.bexode` buffer |
114
+ | `revision` | `number` | `0` | Bump to force a reload |
115
+ | `fit` | `Fit` | `'Contain'` | Fit mode |
116
+ | `alignment` | `Alignment` | `'Center'` | Alignment |
117
+ | `layoutScaleFactor` | `number` | — | Extra scale for `Fit: 'Layout'` |
118
+ | `autoPlay` | `boolean` | `true` | Auto-start the loop |
119
+ | `interactive` | `boolean` | `true` | Enable input handling |
120
+ | `preventScroll` | `boolean` | `true` | Block page scroll on wheel/touch |
121
+ | `highRefreshRate` | `boolean` | `true` | Sub-frame pacing on 120Hz displays |
122
+ | `currentTime` | `number` | — | Render a fixed time when `autoPlay` is false |
123
+ | `scrollX/Y`, `viewportScrollX/Y` | `number` | — | External scroll sensors |
124
+ | `mouseX/Y`, `isMouseDown` | `number \| boolean` | — | External pointer sensors |
125
+ | `inputs` | `Record<string, any>` | — | Inputs applied on load |
126
+ | `callbacks` | `Record<string, Function>` | — | Named listeners from the editor |
127
+
128
+ ### Outputs
129
+
130
+ `(ready)`, `(trigger)`, `(inputUpdate)`, `(componentChange)`, `(toggle)`, `(inputChange)`, `(inputFocus)`, `(inputBlur)`, `(navigation)`, `(buttonClick)`, `(graphPointClick)`, `(log)`, `(logicUpdate)`, `(fpsUpdate)`
131
+
132
+ ### Component methods
133
+
134
+ `getEngine()`, `play()`, `pause()`, `seek(time)`, `resize()`, `setLayout(fit, alignment?, scale?)`, `setOptions(options)`, `setInputBool/Number/Text`, `fireTrigger`, `updateInput`, `updateGraphData`, `getInputValue`
135
+
136
+ ### `ExodeUIService`
137
+
138
+ `register(engine)`, `updateInput`, `setInputBool`, `setInputNumber`, `setInputText`, `fireTrigger`, `updateObjectOptions`, `updateConstraint`, `updateGraphData`, `updateObjectProperty`, `setDropdownOptions`, `getInputValue`
139
+
140
+ ## FAQ
141
+
142
+ **Does it break zone stability?** No — animation and pointer handling run outside `NgZone`; only emitted events re-enter it.
143
+
144
+ **Does it work with Angular Universal / SSR?** Yes, the canvas initialises after `ngAfterViewInit`.
145
+
146
+ **Is ExodeUI a Rive or Lottie alternative?** It targets interactive UI, not linear playback — see the [Rive comparison](https://exodeui.com/alternatives/rive/?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-angular).
147
+
148
+ **How do I update chart data?** Call `updateGraphData`, `updateBarChartData` or `updatePieChartData` on the service or component.
149
+
150
+ **What is a `.exode` file?** The portable artboard exported by the ExodeUI editor — plain JSON, or compressed `.bexode`.
151
+
152
+ ## Related packages
153
+
154
+ - [exodeui](https://www.npmjs.com/package/exodeui) — React runtime and Vite plugin
155
+ - [exodeui-vanilla](https://www.npmjs.com/package/exodeui-vanilla) — framework-free runtime
156
+ - [exodeui-vue](https://www.npmjs.com/package/exodeui-vue) — Vue 3 runtime
157
+ - [exodeui-svelte](https://www.npmjs.com/package/exodeui-svelte) — Svelte 5 runtime
158
+ - [exodeui-solid](https://www.npmjs.com/package/exodeui-solid) — SolidJS runtime
159
+
160
+ ## Learn more
161
+
162
+ - [Documentation](https://exodeui.com/docs?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-angular)
163
+ - [Examples and templates](https://exodeui.com/examples?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-angular)
164
+ - [Component gallery](https://exodeui.com/components?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-angular)
165
+ - [For teams](https://exodeui.com/for/teams?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-angular)
166
+ - [Glossary](https://exodeui.com/glossary?utm_source=npm&utm_medium=readme&utm_campaign=exodeui-angular)
167
+
168
+ ## License
169
+
170
+ MIT © ExodeUI