exodeui-vanilla 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.
@@ -0,0 +1,2077 @@
1
+ export declare interface Adjustments {
2
+ exposure?: number;
3
+ contrast?: number;
4
+ saturation?: number;
5
+ hue?: number;
6
+ negative?: number;
7
+ temperature?: number;
8
+ tint?: number;
9
+ highlights?: number;
10
+ shadows?: number;
11
+ blur?: number;
12
+ }
13
+
14
+ export declare type AlignContent = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'stretch';
15
+
16
+ export declare type AlignItems = 'flex-start' | 'center' | 'flex-end' | 'stretch';
17
+
18
+ export declare type Alignment = 'Center' | 'TopLeft' | 'TopCenter' | 'TopRight' | 'CenterLeft' | 'CenterRight' | 'BottomLeft' | 'BottomCenter' | 'BottomRight';
19
+
20
+ export declare interface AnalyticsConfig {
21
+ isEnabled: boolean;
22
+ eventName: string;
23
+ triggerType: 'click' | 'hover' | 'visible';
24
+ platforms: {
25
+ ga4: boolean;
26
+ meta: boolean;
27
+ mixpanel: boolean;
28
+ };
29
+ parameters: AnalyticsParameter[];
30
+ }
31
+
32
+ export declare interface AnalyticsParameter {
33
+ key: string;
34
+ value: string;
35
+ type: 'literal' | 'variable';
36
+ }
37
+
38
+ declare interface Animation_2 {
39
+ id: string;
40
+ name: string;
41
+ duration: number;
42
+ tracks: Track[];
43
+ playInstances?: PlayInstance[];
44
+ }
45
+ export { Animation_2 as Animation }
46
+
47
+ export declare interface AnimationFlowRule {
48
+ id: string;
49
+ trigger: 'on_load' | 'after_delay' | 'after_anim' | 'on_scroll' | 'manual' | 'variable';
50
+ targetAnimationId: string;
51
+ delay?: number;
52
+ afterAnim?: string;
53
+ conditions?: {
54
+ variable: string;
55
+ operator: string;
56
+ value: any;
57
+ }[];
58
+ subAnimationIds?: string[];
59
+ loop?: boolean;
60
+ conditionVariableId?: string;
61
+ conditionOperator?: string;
62
+ conditionValue?: any;
63
+ }
64
+
65
+ declare interface ApiAuthConfig {
66
+ type: ApiAuthType;
67
+ /** bearer token */
68
+ token?: string;
69
+ /** basic auth */
70
+ username?: string;
71
+ password?: string;
72
+ /** for 'header' | 'query' — the name to send the credential under */
73
+ keyName?: string;
74
+ secret?: boolean;
75
+ }
76
+
77
+ declare type ApiAuthType = 'none' | 'bearer' | 'basic' | 'header' | 'query';
78
+
79
+ /**
80
+ * API Variable core.
81
+ *
82
+ * Backs the `Api` state-machine input type: a variable whose value is pulled
83
+ * directly from a URL on an interval, like a normal API caller.
84
+ *
85
+ * This module is deliberately framework-agnostic and dependency-free so the
86
+ * exact same file can be dropped into the editor and every framework runtime
87
+ * (React / Vue / Svelte / Solid / Angular / RN / Vanilla).
88
+ *
89
+ * Security model:
90
+ * - https-only by default, credentials-in-URL rejected, private/loopback/
91
+ * link-local hosts blocked (anti-SSRF).
92
+ * - hard timeout + response-size cap, one in-flight request at a time.
93
+ * - secrets are flagged and can be redacted before a project is exported.
94
+ */
95
+ declare type ApiHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
96
+
97
+ /** A single query param or header row. */
98
+ declare interface ApiKeyValue {
99
+ id: string;
100
+ key: string;
101
+ value: string;
102
+ /** Masked in the UI and flagged on export. */
103
+ secret?: boolean;
104
+ enabled?: boolean;
105
+ }
106
+
107
+ declare type ApiResultType = 'auto' | 'number' | 'string' | 'boolean' | 'array';
108
+
109
+ declare interface ApiVariableConfig {
110
+ url: string;
111
+ method?: ApiHttpMethod;
112
+ query?: ApiKeyValue[];
113
+ headers?: ApiKeyValue[];
114
+ /** Raw request body (JSON string) for POST/PUT/PATCH. */
115
+ body?: string;
116
+ auth?: ApiAuthConfig;
117
+ /** Dot/bracket path into the JSON response, e.g. `$.data.items[0].price`. Empty = whole payload. */
118
+ path?: string;
119
+ resultType?: ApiResultType;
120
+ /** Poll interval in ms. 0/undefined = manual refresh only. */
121
+ intervalMs?: number;
122
+ /** Request timeout in ms (default 10_000). */
123
+ timeoutMs?: number;
124
+ /** Start polling when the project loads/plays (default true). */
125
+ startOnLoad?: boolean;
126
+ }
127
+
128
+ export declare interface Artboard {
129
+ id?: string;
130
+ name: string;
131
+ width: number;
132
+ height: number;
133
+ backgroundColor: string;
134
+ backgroundVisible?: boolean;
135
+ backgroundImage?: string;
136
+ backgroundOpacity?: number;
137
+ opacity?: number;
138
+ x?: number;
139
+ y?: number;
140
+ objects: (ShapeObject | any)[];
141
+ animations: Animation_2[];
142
+ stateMachine?: StateMachine;
143
+ tokens?: DesignTokens;
144
+ physics?: {
145
+ enabled?: boolean;
146
+ gravity?: {
147
+ x: number;
148
+ y: number;
149
+ };
150
+ wind?: {
151
+ x: number;
152
+ y: number;
153
+ };
154
+ timeScale?: number;
155
+ collideWithBounds?: boolean;
156
+ joints?: any[];
157
+ /** Physics Effects for every falling body (see physicsEffects.ts). */
158
+ effects?: PhysicsEffectsConfig;
159
+ };
160
+ layoutProps?: LayoutProps;
161
+ layoutScaleFactor?: number;
162
+ baseWidth?: number;
163
+ baseHeight?: number;
164
+ seo?: SEOConfig;
165
+ startupAnimationId?: string;
166
+ startupSubAnimationIds?: string[];
167
+ animationFlow?: AnimationFlowRule[];
168
+ /** Screen-to-Screen navigation rules (see NavigationRule). */
169
+ navigation?: NavigationRule[];
170
+ stateVariables?: {
171
+ id: string;
172
+ name: string;
173
+ type: 'Boolean' | 'Number' | 'Trigger' | 'RandomNumber' | 'RandomColor';
174
+ value: any;
175
+ min?: number;
176
+ max?: number;
177
+ minAlpha?: number;
178
+ maxAlpha?: number;
179
+ }[];
180
+ lastModified?: number;
181
+ responsive?: ResponsiveConfig;
182
+ }
183
+
184
+ export declare interface ArtEffectConfig {
185
+ enabled: boolean;
186
+ type: ArtEffectType;
187
+ intensity: number;
188
+ speed?: number;
189
+ scale?: number;
190
+ color1?: string;
191
+ color2?: string;
192
+ chaosEnabled?: boolean;
193
+ chaosAmount?: number;
194
+ }
195
+
196
+ /**
197
+ * Gen Z Art Effects - Inspired by modern design trends
198
+ */
199
+ export declare type ArtEffectType = 'glitch' | 'halftone' | 'pixelate' | 'noise' | 'acid_gradient' | 'acid_rave' | 'shimmer';
200
+
201
+ export declare const BAR_STYLE_PRESETS: Record<string, {
202
+ label: string;
203
+ colors: string[];
204
+ cardBackground: string;
205
+ cardBorderColor: string;
206
+ gridColor: string;
207
+ axisLabelColor: string;
208
+ legendColor: string;
209
+ barGradient: boolean;
210
+ }>;
211
+
212
+ export declare interface Behavior {
213
+ id: string;
214
+ type: BehaviorType;
215
+ enabled: boolean;
216
+ sensors: BehaviorSensor[];
217
+ settings?: Record<string, any>;
218
+ startTime?: number;
219
+ endTime?: number;
220
+ }
221
+
222
+ export declare enum BehaviorSensor {
223
+ Scale = "Scale",
224
+ Opacity = "Opacity",
225
+ RotateZ = "RotateZ",
226
+ RotateX = "RotateX",
227
+ RotateY = "RotateY",
228
+ PositionX = "PositionX",
229
+ PositionY = "PositionY",
230
+ SkewX = "SkewX",
231
+ Blur = "Blur",
232
+ Exposure = "Exposure",
233
+ HueShift = "HueShift",
234
+ Negative = "Negative",
235
+ CornerRadius = "CornerRadius",
236
+ StrokeWidth = "StrokeWidth",
237
+ BoxShadow = "BoxShadow",
238
+ FontSize = "FontSize",
239
+ LetterSpacing = "LetterSpacing"
240
+ }
241
+
242
+ export declare enum BehaviorType {
243
+ Proximity = "Proximity",
244
+ Magnetic = "Magnetic",
245
+ Repel = "Repel",
246
+ Orbit = "Orbit",
247
+ Vortex = "Vortex",
248
+ Fluid = "Fluid",
249
+ Elastic = "Elastic",
250
+ Holographic = "Holographic",
251
+ Sticky = "Sticky",
252
+ Dilation = "Dilation",
253
+ Parallax = "Parallax",
254
+ Noise = "Noise",
255
+ Float = "Float",
256
+ Pulse = "Pulse",
257
+ Draggable = "Draggable",
258
+ Scroll = "Scroll",
259
+ LookAt = "LookAt",
260
+ Glint = "Glint",
261
+ Scan = "Scan",
262
+ Ratchet = "Ratchet",
263
+ Jitter = "Jitter",
264
+ Follower = "Follower",
265
+ Wrap = "Wrap",
266
+ Typewriter = "Typewriter",
267
+ Scramble = "Scramble",
268
+ Wave = "Wave",
269
+ Bounce = "Bounce",
270
+ TextTrail = "TextTrail",
271
+ Reveal3D = "Reveal3D",
272
+ RevealSlide = "RevealSlide",
273
+ RevealBlur = "RevealBlur",
274
+ TextLiquid = "TextLiquid",
275
+ TextVortex = "TextVortex",
276
+ TextExplosion = "TextExplosion",
277
+ TextRain = "TextRain",
278
+ TextGravity = "TextGravity",
279
+ TextMatrix = "TextMatrix",
280
+ TextNeon = "TextNeon",
281
+ TextDissolve = "TextDissolve",
282
+ TextOrganic = "TextOrganic",
283
+ TextBreathe = "TextBreathe",
284
+ TextSpin = "TextSpin",
285
+ TextMagnet = "TextMagnet",
286
+ TextPerspective = "TextPerspective",
287
+ TextMirror = "TextMirror",
288
+ TextFloral = "TextFloral",
289
+ TextSmoke = "TextSmoke",
290
+ TextVariable = "TextVariable",
291
+ TextZing = "TextZing",
292
+ TextElastic = "TextElastic",
293
+ TextGlitch3D = "TextGlitch3D",
294
+ GlitchText = "GlitchText",
295
+ TextCounter = "TextCounter",
296
+ Squash = "Squash",
297
+ Spotlight = "Spotlight",
298
+ Lens = "Lens",
299
+ Gravity = "Gravity",
300
+ Velocity = "Velocity",
301
+ Shear = "Shear",
302
+ LayoutAnimation = "LayoutAnimation",
303
+ SpringChain = "SpringChain",
304
+ ParticleEmitter = "ParticleEmitter",
305
+ StateReactive = "StateReactive",
306
+ Fold = "Fold",
307
+ Crumple = "Crumple"
308
+ }
309
+
310
+ export declare interface BlendAnimation {
311
+ animationId: string;
312
+ position: [number, number];
313
+ }
314
+
315
+ export declare interface Blur {
316
+ amount: number;
317
+ }
318
+
319
+ export declare interface BoneIKConfig {
320
+ boneCount: number;
321
+ solver: 'analytic-2bone' | 'ccd';
322
+ }
323
+
324
+ export declare type BoneMode = 'fk' | 'ik' | 'spline';
325
+
326
+ export declare interface BoneObject {
327
+ type: 'Bone';
328
+ id: string;
329
+ name: string;
330
+ transform: Transform;
331
+ geometry: {
332
+ type: 'Bone';
333
+ length: number;
334
+ isTip?: boolean;
335
+ };
336
+ style: Style;
337
+ mode?: BoneMode;
338
+ ikConfig?: BoneIKConfig;
339
+ splineConfig?: BoneSplineConfig;
340
+ opacity?: number;
341
+ visible?: boolean;
342
+ isVisible?: boolean;
343
+ parentId?: string;
344
+ children?: string[];
345
+ options?: any;
346
+ triggers?: Trigger[];
347
+ interactions?: Interaction[];
348
+ constraints?: Constraint[];
349
+ physics?: Physics;
350
+ behaviors?: Behavior[];
351
+ masks?: any[];
352
+ }
353
+
354
+ export declare interface BoneSplineConfig {
355
+ points: {
356
+ x: number;
357
+ y: number;
358
+ }[];
359
+ tension: number;
360
+ }
361
+
362
+ export declare function calculateGridLayout(frame: any, children: any[], getObjectState?: (id: string) => any): LayoutResult;
363
+
364
+ export declare function calculateLayout(frame: {
365
+ width?: number;
366
+ height?: number;
367
+ layoutProps?: LayoutProps;
368
+ } | any, children: ShapeObject[], getObjectState?: (id: string) => any, context?: LayoutContext): LayoutResult;
369
+
370
+ export declare function calculateLinearLayout(frame: any, children: any[], getObjectState?: (id: string) => any): LayoutResult;
371
+
372
+ /**
373
+ * Calculates responsive position and size updates for an object with spatial constraints
374
+ * (e.g. pinned to Left, Right, Top, Bottom, Center, or Stretched).
375
+ */
376
+ export declare function calculateSpatialConstraint(obj: ShapeObject, currentW: number, currentH: number, baseW: number, baseH: number, baseTransform: {
377
+ x: number;
378
+ y: number;
379
+ scale_x?: number;
380
+ scale_y?: number;
381
+ }): {
382
+ x: number;
383
+ y: number;
384
+ width?: number;
385
+ height?: number;
386
+ } | null;
387
+
388
+ export declare interface ComponentEvent {
389
+ objectId: string;
390
+ componentName: string;
391
+ variant: string;
392
+ property: string;
393
+ value: any;
394
+ }
395
+
396
+ export declare interface Condition {
397
+ inputId: string;
398
+ op: ConditionOp;
399
+ value?: number | boolean;
400
+ }
401
+
402
+ export declare enum ConditionOp {
403
+ Equal = "Equal",
404
+ NotEqual = "NotEqual",
405
+ GreaterThan = "GreaterThan",
406
+ LessThan = "LessThan",
407
+ GreaterEqual = "GreaterEqual",
408
+ LessEqual = "LessEqual",
409
+ IsTrue = "IsTrue",
410
+ IsFalse = "IsFalse"
411
+ }
412
+
413
+ export declare interface Constraint {
414
+ id?: string;
415
+ type: 'Translation' | 'Rotation' | 'Scale' | 'Transform' | 'Distance' | 'IK' | 'FollowPath' | 'FollowPointer';
416
+ targetId: string;
417
+ strength: number;
418
+ copyX?: boolean;
419
+ copyY?: boolean;
420
+ limitX?: {
421
+ enabled: boolean;
422
+ min: number;
423
+ max: number;
424
+ };
425
+ limitY?: {
426
+ enabled: boolean;
427
+ min: number;
428
+ max: number;
429
+ };
430
+ distance?: number;
431
+ mode?: 'clamped' | 'exact' | 'minimum' | 'maximum';
432
+ orient?: boolean;
433
+ offsetRotation?: number;
434
+ offsetX?: number;
435
+ offsetY?: number;
436
+ useSpring?: boolean;
437
+ stiffness?: number;
438
+ damping?: number;
439
+ mass?: number;
440
+ }
441
+
442
+ export declare interface DesignTokens {
443
+ colors: Record<string, string>;
444
+ typography: Record<string, {
445
+ fontFamily: string;
446
+ fontSize: number;
447
+ fontWeight: string | number;
448
+ lineHeight?: number;
449
+ }>;
450
+ spacing: Record<string, number>;
451
+ effects: Record<string, any>;
452
+ radii?: Record<string, number>;
453
+ opacities?: Record<string, number>;
454
+ }
455
+
456
+ declare interface EventListener_2 {
457
+ id: string;
458
+ objectId: string;
459
+ eventType: string;
460
+ name: string;
461
+ }
462
+ export { EventListener_2 as EventListener }
463
+
464
+ /** Callbacks every framework wrapper can forward to its framework-idiomatic handlers. */
465
+ export declare interface ExodeCanvasCallbacks {
466
+ onReady?: (engine: ExodeUIEngine) => void;
467
+ onTrigger?: (triggerId: string, metadata?: any) => void;
468
+ onInputUpdate?: (inputs: Record<string, any>) => void;
469
+ onComponentChange?: (event: ComponentEvent) => void;
470
+ onToggle?: (id: string, active: boolean) => void;
471
+ onInputChange?: (id: string, value: string) => void;
472
+ onInputFocus?: (id: string) => void;
473
+ onInputBlur?: (id: string) => void;
474
+ onButtonClick?: (id: string, objectId?: string) => void;
475
+ onGraphPointClick?: (graphId: string, point: any) => void;
476
+ onNavigation?: (event: ExodeNavigationEvent) => void;
477
+ onLog?: (message: string, level: 'info' | 'warn' | 'error') => void;
478
+ onLogicUpdate?: (state: any) => void;
479
+ onFPSUpdate?: (fps: number) => void;
480
+ /** Named callbacks matching listeners configured in the Exode editor. */
481
+ callbacks?: Record<string, (...args: any[]) => void>;
482
+ }
483
+
484
+ export declare interface ExodeCanvasOptions extends ExodeCanvasCallbacks {
485
+ artboard?: Artboard;
486
+ /** URL to an `.exode` / `.bexode` file, or a JSON string. */
487
+ src?: string;
488
+ /** Pre-read `.bexode` buffer. */
489
+ buffer?: ArrayBuffer | Uint8Array;
490
+ /** Bump to force a reload of the same artboard. */
491
+ revision?: number;
492
+ fit?: Fit;
493
+ alignment?: Alignment;
494
+ layoutScaleFactor?: number;
495
+ autoPlay?: boolean;
496
+ interactive?: boolean;
497
+ preventScroll?: boolean;
498
+ highRefreshRate?: boolean;
499
+ currentTime?: number;
500
+ scrollX?: number;
501
+ scrollY?: number;
502
+ viewportScrollX?: number;
503
+ viewportScrollY?: number;
504
+ mouseX?: number;
505
+ mouseY?: number;
506
+ isMouseDown?: boolean;
507
+ inputs?: Record<string, any>;
508
+ }
509
+
510
+ /**
511
+ * ExodeCanvasRuntime owns the engine, the render loop and all DOM listeners for a
512
+ * single canvas element. Every framework package (vanilla, Vue, Solid, Svelte,
513
+ * Angular) drives one of these so behaviour stays identical across frameworks.
514
+ */
515
+ export declare class ExodeCanvasRuntime {
516
+ readonly engine: ExodeUIEngine;
517
+ private canvas;
518
+ private ctx;
519
+ private opts;
520
+ private rafId;
521
+ private subFrameTimer;
522
+ private lastTime;
523
+ private lastRenderMs;
524
+ private fpsFrames;
525
+ private fpsLastTime;
526
+ private destroyed;
527
+ private eventsAttached;
528
+ private resizeObserver;
529
+ private canvasRect;
530
+ private lastLoadedId;
531
+ private lastRevision;
532
+ private loadToken;
533
+ private artboardState;
534
+ constructor(canvas: HTMLCanvasElement, options?: ExodeCanvasOptions);
535
+ /** Merge new options and apply whichever ones affect the running engine. */
536
+ setOptions(patch: Partial<ExodeCanvasOptions>): void;
537
+ /** Load the artboard from `artboard`, `buffer` or `src`. Safe to call repeatedly. */
538
+ loadArtboard(force?: boolean): Promise<void>;
539
+ /** Start the animation loop. */
540
+ play(): void;
541
+ /** Stop the animation loop (the last frame stays on screen). */
542
+ pause(): void;
543
+ /** Seek to a time in seconds and render that frame immediately. */
544
+ seek(time: number): void;
545
+ /** Recompute the backing buffer size from the canvas CSS size. */
546
+ resize(): void;
547
+ /** Current artboard data, if one has been loaded. */
548
+ getArtboard(): Artboard | null;
549
+ /** Remove every listener and stop the loop. */
550
+ destroy(): void;
551
+ private get interactive();
552
+ private set interactive(value);
553
+ private get listeners();
554
+ private log;
555
+ private invokeNamedListeners;
556
+ private registerCallbacks;
557
+ private applyLayout;
558
+ private applySensors;
559
+ private watchResize;
560
+ private onWindowResize;
561
+ /**
562
+ * Size the backing buffer from the unscaled CSS layout box so ancestor CSS
563
+ * transforms don't shrink the render resolution, while keeping pointer mapping
564
+ * based on the on-screen (possibly scaled) rect.
565
+ */
566
+ private syncSize;
567
+ private context;
568
+ private renderFrame;
569
+ private tick;
570
+ private loop;
571
+ private toCanvas;
572
+ private pointer;
573
+ private onPointerDown;
574
+ private onPointerMove;
575
+ private onPointerUp;
576
+ private onPointerLeave;
577
+ private onClick;
578
+ private onWheel;
579
+ private onKeyDown;
580
+ private onKeyUp;
581
+ private onWindowKeyDown;
582
+ private onWindowKeyUp;
583
+ private onWindowBlur;
584
+ private onWindowScroll;
585
+ private attachEvents;
586
+ private detachEvents;
587
+ }
588
+
589
+ export declare interface ExodeListener {
590
+ objectId: string;
591
+ eventType: string;
592
+ name: string;
593
+ }
594
+
595
+ export declare interface ExodeNavigationEvent {
596
+ type: 'artboard' | 'url' | 'back' | 'next';
597
+ value: string;
598
+ }
599
+
600
+ /**
601
+ * ExodeUICanvas — Vanilla JS class-based wrapper around ExodeUIEngine.
602
+ *
603
+ * Usage:
604
+ * ```js
605
+ * const player = new ExodeUICanvas({
606
+ * element: '#my-canvas',
607
+ * onReady: (engine) => engine.setInputBool('isPlaying', true)
608
+ * });
609
+ * await player.load(artboardJSON);
610
+ * player.play();
611
+ * ```
612
+ */
613
+ export declare class ExodeUICanvas {
614
+ readonly engine: ExodeUIEngine;
615
+ private runtime;
616
+ private _opts;
617
+ private _destroyed;
618
+ constructor(options: ExodeUICanvasOptions);
619
+ /** Load an artboard JSON object, a `.exode` URL/JSON string, or a `.bexode` buffer. */
620
+ load(data?: Artboard | string | ArrayBuffer | Uint8Array): Promise<void>;
621
+ /** Start/resume the animation loop */
622
+ play(): void;
623
+ /** Pause the animation loop */
624
+ pause(): void;
625
+ /** Seek to a specific time (seconds) without playing */
626
+ seek(time: number): void;
627
+ /** Resize the canvas backing buffer to match its CSS size */
628
+ resize(): void;
629
+ /** Update runtime layout fit, alignment, and scale factor */
630
+ setLayout(fit: Fit, alignment?: Alignment, layoutScaleFactor?: number): void;
631
+ /** Update any runtime option after construction (sensors, layout, callbacks, …). */
632
+ setOptions(options: Partial<ExodeUICanvasOptions>): void;
633
+ /** Update a named input value */
634
+ setInput(name: string, value: any): void;
635
+ updateInput(name: string, value: any): void;
636
+ setInputBool(name: string, value: boolean): void;
637
+ setInputNumber(name: string, value: number): void;
638
+ setInputText(name: string, value: string): void;
639
+ setInputStringArray(name: string, value: string[]): void;
640
+ setInputNumberArray(name: string, value: number[]): void;
641
+ fireTrigger(name: string): void;
642
+ updateObjectOptions(id: string, opts: any): void;
643
+ updateConstraint(id: string, index: number, props: any): void;
644
+ updateGraphData(nameOrId: string, data: number[] | number[][], categories?: string[]): void;
645
+ updateBarChartData(nameOrId: string, datasets: (number[] | {
646
+ id?: string;
647
+ label?: string;
648
+ data: number[];
649
+ color?: string;
650
+ })[], categories?: string[]): void;
651
+ updatePieChartData(nameOrId: string, slices: (number | {
652
+ id?: string;
653
+ label?: string;
654
+ value: number;
655
+ color?: string;
656
+ })[]): void;
657
+ setDropdownOptions(nameOrId: string, options: string[]): void;
658
+ getInputValue(nameOrId: string): any;
659
+ /** Feed external scroll offset */
660
+ handleScroll(x: number, y: number): void;
661
+ setViewportScroll(x: number, y: number): void;
662
+ /** The loaded artboard, if any. */
663
+ getArtboard(): Artboard | null;
664
+ /** Destroy the canvas player and clean up all listeners */
665
+ destroy(): void;
666
+ private applyOptions;
667
+ private toRuntimeOptions;
668
+ }
669
+
670
+ export declare interface ExodeUICanvasOptions extends Omit<ExodeCanvasOptions, 'onInputUpdate' | 'onButtonClick' | 'onLog'> {
671
+ /** CSS selector string or HTMLCanvasElement */
672
+ element: string | HTMLCanvasElement;
673
+ onReady?: (engine: ExodeUIEngine) => void;
674
+ onTrigger?: (triggerName: string, animationName: string) => void;
675
+ onInputUpdate?: (id: string, value: any) => void;
676
+ onComponentChange?: (event: ComponentEvent) => void;
677
+ onToggle?: (name: string, checked: boolean) => void;
678
+ onInputChange?: (name: string, text: string) => void;
679
+ onInputFocus?: (name: string) => void;
680
+ onInputBlur?: (name: string) => void;
681
+ onButtonClick?: (name: string, objectId: string) => void;
682
+ onNavigation?: (event: ExodeNavigationEvent) => void;
683
+ onLog?: (msg: string) => void;
684
+ }
685
+
686
+ export declare class ExodeUIEngine {
687
+ private artboard;
688
+ private objectStates;
689
+ private trailHistories;
690
+ private physicsEngine;
691
+ private physicsFx;
692
+ private physicsFields;
693
+ private activeStateMachine;
694
+ private inputs;
695
+ viewportScrollX: number;
696
+ viewportScrollY: number;
697
+ setViewportScroll(x: number, y: number): void;
698
+ getInputValue(nameOrId: string): any;
699
+ getInput(nameOrId: string): any;
700
+ private inputNameMap;
701
+ private layerStates;
702
+ private pretextCache;
703
+ private pointerHistory;
704
+ private readonly MAX_HISTORY;
705
+ private imageCache;
706
+ private lastValidSvgImgMap;
707
+ private renderFunctionCache;
708
+ private scriptUpdateCache;
709
+ private scriptEffects;
710
+ private sceneApi;
711
+ private animationCodeFunctionCache;
712
+ private maskBuffer;
713
+ private maskCtx;
714
+ private lumaBuffer;
715
+ private lumaCtx;
716
+ private _noiseTileCanvas;
717
+ private layout;
718
+ private onTrigger?;
719
+ private onInputUpdate?;
720
+ private onComponentChange?;
721
+ private onToggle?;
722
+ private onInputChange?;
723
+ private onInputFocus?;
724
+ private onInputBlur?;
725
+ private onLog?;
726
+ private onButtonClick?;
727
+ private onGraphPointClick?;
728
+ private justFiredTriggers;
729
+ private rootTransform;
730
+ private canvasWidth;
731
+ private canvasHeight;
732
+ /** Backing pixels per layout pixel. Set by the host when the canvas is CSS-scaled
733
+ * (e.g. a preview shrunk to fit) so it can render at its on-screen density. */
734
+ pixelRatio: number | null;
735
+ private getPixelRatio;
736
+ private lastHoveredObjectId;
737
+ private _lastPointerPos;
738
+ private _prevPointerPos;
739
+ private _mouseDelta;
740
+ private _hasSpatialConstraintsApplied;
741
+ private focusedId;
742
+ private draggingSliderId;
743
+ private draggingJoystickId;
744
+ /** Per-pointer joystick drags for multi-touch (pointerId -> joystickId). */
745
+ private joystickPointerMap;
746
+ /** Joysticks currently released with spring return — animated back in processJoysticks. */
747
+ private springingJoysticks;
748
+ private activeDropdownId;
749
+ private activeObjectId;
750
+ private draggingListViewId;
751
+ private draggingListViewIsScrollbar;
752
+ scrollOffset: {
753
+ x: number;
754
+ y: number;
755
+ };
756
+ private _totalScroll;
757
+ private draggingBehaviors;
758
+ private dragStartPointer;
759
+ private dragStartPositions;
760
+ private isMouseDown;
761
+ private activeKeys;
762
+ private pressedKeys;
763
+ private graphHoverStates;
764
+ private barChartRenderedBars;
765
+ private pieChartRenderedSlices;
766
+ private _layoutAnimCache;
767
+ private _springChainState;
768
+ private _emitterPools;
769
+ private _cachedObjectMap;
770
+ private _cachedRootObjects;
771
+ private _cachedObjectMapArtboard;
772
+ private _cachedObjectMapCount;
773
+ private objectVelocities;
774
+ private currentTime;
775
+ private frameCount;
776
+ private entranceStartTimes;
777
+ private fontLeadingFactors;
778
+ private onLogicUpdate?;
779
+ private logicNodeValues;
780
+ private logicNodeState;
781
+ private pointerDownTimes;
782
+ private activeHoverIds;
783
+ private onNavigation?;
784
+ private periodicTriggerTimes;
785
+ private wasInView;
786
+ private scrollProgressLastValue;
787
+ setTriggerCallback(cb: (triggerName: string, animationName: string) => void): void;
788
+ /**
789
+ * Bridge handed to custom effects as env.input / env.setInput / env.emit, so
790
+ * code-drawn elements (e.g. items inside a liquid menu) can read state, drive
791
+ * the state machine and report clicks to the app like native objects do.
792
+ * Created once and reused every frame.
793
+ */
794
+ /**
795
+ * Scene access for effect scripts: keys held, object state, triggers and
796
+ * screen navigation. A CustomEffect whose code defines
797
+ * function update(env, dt) { … }
798
+ * is called every frame with env = { inputs, input, setInput, emit, params,
799
+ * time, state, scene }. env.state is a plain object kept until the next load.
800
+ */
801
+ private getSceneApi;
802
+ private getLocalPointer;
803
+ private runEffectScripts;
804
+ private getCustomEffectBridge;
805
+ setInputUpdateCallback(cb: (nameOrId: string, value: any) => void): void;
806
+ setComponentChangeCallback(cb: (event: ComponentEvent) => void): void;
807
+ setToggleCallback(cb: (name: string, checked: boolean) => void): void;
808
+ setLogicUpdateCallback(cb: (values: Record<string, any>) => void): void;
809
+ setInputChangeCallback(cb: (name: string, text: string) => void): void;
810
+ setButtonClickCallback(cb: (name: string, objectId: string) => void): void;
811
+ setGraphPointClickCallback(cb: (event: {
812
+ objectId: string;
813
+ componentName: string;
814
+ datasetIndex: number;
815
+ pointIndex: number;
816
+ value: number;
817
+ label: string;
818
+ }) => void): void;
819
+ setNavigationCallback(cb: (target: {
820
+ type: 'artboard' | 'url' | 'back' | 'next';
821
+ value: string;
822
+ }) => void): void;
823
+ private ensurePathPoints;
824
+ private static pathParseCache;
825
+ private svgPathToPoints;
826
+ private parseSvgPath;
827
+ setOnLogCallback(cb: (msg: string) => void): void;
828
+ private debugLog;
829
+ setInputFocusCallback(cb: (name: string) => void): void;
830
+ setInputBlurCallback(cb: (name: string) => void): void;
831
+ updateConstraint(objectId: string, index: number, properties: Partial<Constraint>): void;
832
+ private debug_objectsRendered;
833
+ private debug_objectsTotal;
834
+ private lastRenderTime;
835
+ debugMode: boolean;
836
+ private log;
837
+ private warn;
838
+ constructor();
839
+ private setInternalInput;
840
+ setLayout(fit: Fit, alignment: Alignment, layoutScaleFactor?: number): void;
841
+ getActiveStateIds(layerName?: string): string[];
842
+ getObjectState(id: string): any;
843
+ updateObjectOptions(id: string, newOptions: any): void;
844
+ updateGraphData(nameOrId: string, data: number[] | number[][], categories?: string[]): void;
845
+ updateBarChartData(nameOrId: string, datasets: (number[] | {
846
+ id?: string;
847
+ label?: string;
848
+ data: number[];
849
+ color?: string;
850
+ })[], categories?: string[]): void;
851
+ updatePieChartData(nameOrId: string, slices: (number | {
852
+ id?: string;
853
+ label?: string;
854
+ value: number;
855
+ color?: string;
856
+ })[]): void;
857
+ setDropdownOptions(nameOrId: string, options: string[]): void;
858
+ load(data: Artboard): void;
859
+ /**
860
+ * Pre-loads all images found in the artboard into the image cache.
861
+ * This ensures base64 images from Figma exports are decoded before the first render frame.
862
+ */
863
+ private preloadImages;
864
+ /**
865
+ * Decompresses strings that were compressed during export.
866
+ * Matches the Editor's optimization pipeline.
867
+ */
868
+ private decompressStrings;
869
+ /** [API Variables] Live URL-backed inputs, polled on an interval. */
870
+ private apiPollers;
871
+ private startApiPollers;
872
+ private stopApiPollers;
873
+ /** Manually refresh one API variable by id or name. */
874
+ refreshApiVariable(nameOrId: string): void;
875
+ reset(): void;
876
+ private updateAutoLayout;
877
+ private updateViewportInputs;
878
+ /**
879
+ * Per-breakpoint geometry (`object.breakpointGeometry[breakpointId]`): when the
880
+ * artboard width enters another breakpoint, every object takes that
881
+ * breakpoint's position/size/visibility/type, its position keyframes and
882
+ * interaction targets move by the same delta, and spatial constraints measure
883
+ * from that breakpoint's design width. Captured from real layouts (e.g. the
884
+ * HTML converter rendering a page at each width), so each breakpoint matches.
885
+ */
886
+ private activeGeometryBreakpoint;
887
+ private applyBreakpointGeometry;
888
+ private solveSpatialConstraints;
889
+ private loadFonts;
890
+ private enterStates;
891
+ setInputBool(nameOrId: string, value: boolean): void;
892
+ setInputNumber(nameOrId: string, value: number): void;
893
+ fireTrigger(nameOrId: string): void;
894
+ setInputText(nameOrId: string, value: string): void;
895
+ setInputNumberArray(nameOrId: string, value: number[]): void;
896
+ setInputStringArray(nameOrId: string, value: string[]): void;
897
+ /** Active property tweens and persistent overrides from `applyState` interactions. */
898
+ private interactionTweens;
899
+ private interactionOverrides;
900
+ private readObjectProperty;
901
+ /**
902
+ * `applyState` interaction: optionally set an input, then move a set of object
903
+ * properties to target values over `duration` seconds with `easing`.
904
+ * { action: 'applyState', setInput?: { inputId, value }, duration?, easing?,
905
+ * properties: [{ objectId, property, value }] }
906
+ */
907
+ private applyInteractionState;
908
+ private stepInteractionStates;
909
+ /** Like updateObjectProperty, but seeds nested containers from the authored object. */
910
+ private writeInteractionProperty;
911
+ updateObjectProperty(id: string, property: string, value: any): void;
912
+ updateInput(nameOrId: string, value: any): void;
913
+ /** Last result per variable-triggered flow rule, for rising-edge firing. */
914
+ private variableRulePassing;
915
+ private evaluateVariableTriggers;
916
+ private evaluateTransitions;
917
+ /**
918
+ * Find a global transition from any state in the layer whose conditions are met.
919
+ * This allows inputs to act as "global listeners" that can trigger state changes
920
+ * from any state, not just the current state.
921
+ *
922
+ * @param layer - The state machine layer to search
923
+ * @param currentStateIds - The currently active state IDs (to skip)
924
+ * @returns The first matching transition, or null if none found
925
+ */
926
+ private findGlobalTransition;
927
+ private checkConditions;
928
+ private evaluateLogicTree;
929
+ private runLogicNodes;
930
+ private resolvePath;
931
+ /**
932
+ * Evaluate a logic-property formula the way the editor does: variable names
933
+ * (project variables and state-machine inputs, `name` or `$name`) are replaced
934
+ * by their live values, then the arithmetic/boolean expression is evaluated.
935
+ */
936
+ private logicFormulaCache;
937
+ private evaluateLogicFormula;
938
+ private processLogicProperties;
939
+ private activeTriggers;
940
+ seek(time: number): void;
941
+ private _pointerSprings;
942
+ private feedPointerInputs;
943
+ private stepPointerSprings;
944
+ advance(dt: number): void;
945
+ private evaluateCodeAnimations;
946
+ private navigationHistory;
947
+ private navigationFiredAt;
948
+ private navigationSnapshot;
949
+ private navigationDepth;
950
+ private navigationPendingLoad;
951
+ private handlingScreenExit;
952
+ private navigationIntent;
953
+ /** Pointer-down position + latest drag delta, used to resolve swipe directions. */
954
+ private navigationGestureStart;
955
+ private navigationGesture;
956
+ private navigationSwipeThreshold;
957
+ /** Rules attached to a layer (`object`) or to the Screen itself (`screen`). */
958
+ private navigationRulesFor;
959
+ private navigationConditionsPass;
960
+ private navigationEventMatches;
961
+ /**
962
+ * Swipe rules only fire when the drag actually moved far enough in the
963
+ * matching direction. Without gesture data (e.g. a programmatic 'Drag'
964
+ * event) the rule stays permissive so existing behaviour is preserved.
965
+ */
966
+ private navigationSwipeMatches;
967
+ private fireNavigation;
968
+ /** Run the first matching rule (rules are ordered; one navigation per event). */
969
+ private runNavigationRules;
970
+ private readNavigationProperty;
971
+ /** Time- and data-driven rules: delay, interval, variable, property change. */
972
+ private evaluateContinuousNavigation;
973
+ private evaluateContinuousInteractions;
974
+ private solveConstraints;
975
+ private getGlobalTransform;
976
+ private globalToLocal;
977
+ private solveIK;
978
+ private computeSpring;
979
+ handlePointerInput(type: string, canvasX: number, canvasY: number, canvasWidth: number, canvasHeight: number, pointerId?: number): void;
980
+ handleScroll(x: number, y: number): void;
981
+ isListViewObject(obj: any): boolean;
982
+ isLineGraphObject(obj: any): boolean;
983
+ isBarChartObject(obj: any): boolean;
984
+ isPieChartObject(obj: any): boolean;
985
+ isGraphObject(obj: any): boolean;
986
+ isInputBoxObject(obj: any): boolean;
987
+ isClickableObject(obj: any): boolean;
988
+ getLastHoveredObject(): any;
989
+ clearAllGraphHover(): void;
990
+ private getLocalCoords;
991
+ private updateGraphHoverFromPointer;
992
+ getGraphHoverState(id: string): any;
993
+ getResolvedListViewItems(obj: any, opts?: any): any[];
994
+ getResolvedDropdownOptions(obj: any, opts?: any): string[];
995
+ handleWheel(deltaX: number, deltaY: number, canvasX?: number, canvasY?: number, canvasWidth?: number, canvasHeight?: number): void;
996
+ private handlePointerEvent;
997
+ handleKeyDown(e: KeyboardEvent): void;
998
+ handleKeyUp(e: KeyboardEvent): void;
999
+ /** Forget held keys: after the window loses focus their keyups never arrive. */
1000
+ releaseKeys(): void;
1001
+ private hasDragInteraction;
1002
+ private clampDragToBounds;
1003
+ /** Change a body's physics settings at runtime: buoyancy, tags, orbit, gravityScale, lockRotation… */
1004
+ setPhysicsProps(id: string, props: Record<string, any>): void;
1005
+ /** Change a field on an object at runtime, e.g. physicsAttractor or physicsFluid. */
1006
+ setObjectField(id: string, key: string, value: any): void;
1007
+ /** Resize an object and rebuild its physics body in place (for weights that grow with data). */
1008
+ resizeBody(id: string, width: number, height: number): void;
1009
+ private fireEventForObject;
1010
+ private fireAnalyticsEvent;
1011
+ private getAnimationDuration;
1012
+ private initGlobalAnimationTriggers;
1013
+ private resolveInteractionDuration;
1014
+ private triggerGlobalAnimation;
1015
+ private handleAnimationFinished;
1016
+ private getEntranceProgress;
1017
+ private getWorldTransform;
1018
+ private hitTest;
1019
+ private updateSliderValueFromPointer;
1020
+ /** Clamp a normalized handle value (-1..1) to the joystick's bounds shape. */
1021
+ private clampJoystickToBounds;
1022
+ /**
1023
+ * Snap a normalized handle value to the nearest of 4 or 8 directions (Rive's
1024
+ * "Joy 4-Way" / "Joy 8-Way"). Values below the snap threshold are untouched
1025
+ * so the stick can still rest near the centre.
1026
+ */
1027
+ private snapJoystickDirection;
1028
+ /** Apply deadzone + per-axis step snapping to a normalized handle value. */
1029
+ private applyJoystickConstraints;
1030
+ /**
1031
+ * Animate the handle towards (0,0) instead of snapping. Called when an input
1032
+ * source stops driving the stick (release, key up, spring return).
1033
+ */
1034
+ private springJoystickBack;
1035
+ /**
1036
+ * Read the currently connected Gamepad (if any) and return normalized axis
1037
+ * values for the configured stick, or null when no pad / no input.
1038
+ */
1039
+ private readGamepadStick;
1040
+ /**
1041
+ * Apply a joystick's rigging animations (xAnimationId / yAnimationId): the
1042
+ * handle position scrubs the timeline of the assigned animation, matching the
1043
+ * editor preview exactly (delta-from-midpoint so the animation's rest pose at
1044
+ * t=duration/2 is the un-deflected result).
1045
+ */
1046
+ private applyJoystickRigging;
1047
+ /**
1048
+ * Detect bindings that were applied on a previous frame but have since been
1049
+ * removed from the joystick, and restore each target object to the value it
1050
+ * had before the binding started driving it.
1051
+ */
1052
+ private reconcileJoystickBindings;
1053
+ /**
1054
+ * Put a bound target back at its base value (the value the binding reads as
1055
+ * its origin) and drop the velocity/smoothing integration caches so a later
1056
+ * re-bind starts cleanly instead of continuing from a stale offset.
1057
+ */
1058
+ private restoreJoystickBindingTarget;
1059
+ private updateJoystickValueFromPointer;
1060
+ private processJoysticks;
1061
+ private _index;
1062
+ private lookupIndex;
1063
+ private objById;
1064
+ private animById;
1065
+ applyBlendState(state: any, time: number): void;
1066
+ applyAnimation(anim: Animation_2, time: number, filterObjectId?: string | string[]): void;
1067
+ private interpolate;
1068
+ private interpolateValue;
1069
+ private interpolateColor;
1070
+ private interpolateStops;
1071
+ private interpolateFill;
1072
+ private interpolateStroke;
1073
+ render(ctx: CanvasRenderingContext2D, width: number, height: number): void;
1074
+ private isObjectInView;
1075
+ private calculateTransform;
1076
+ private mapFontWeight;
1077
+ private drawTextDecoration;
1078
+ private renderObject;
1079
+ private applyLightTrailUnderlay;
1080
+ private applyOuterGlowUnderlay;
1081
+ private _renderText;
1082
+ private applyStrokeAlignment;
1083
+ private getPerimeter;
1084
+ private getBezierLength;
1085
+ private getBezierTAtLength;
1086
+ private getPointOnPath;
1087
+ private getBezierPointAndAngle;
1088
+ private applyAbsoluteTransform;
1089
+ private applyObjectTransform;
1090
+ private applyCustomEffect;
1091
+ private applyPatternGrid;
1092
+ private applyInnerGlowOverlay;
1093
+ private applyArtEffectOverlay;
1094
+ /** Helper: shift the hue of a hex/hsl color by degrees, return as hsla */
1095
+ private _shiftHue;
1096
+ /**
1097
+ * Simulate CSS `backdrop-filter: blur()` + glass overlay on Canvas2D.
1098
+ * Since real backdrop-filter is not available in canvas, we:
1099
+ * 1. Sample the canvas pixels behind this object's bounding box
1100
+ * 2. Draw them into an offscreen canvas and apply a blur filter
1101
+ * 3. Clip to the object shape and paint the blurred backdrop
1102
+ * 4. Apply the overlay color tint, sheen highlight, noise grain, and glass border
1103
+ */
1104
+ private applyBackgroundBlurGlass;
1105
+ /**
1106
+ * Paint a mask source into the context preserving its real alpha.
1107
+ *
1108
+ * The caller composites this with destination-in / destination-out, so only the
1109
+ * alpha channel matters and the source has to be drawn the way it actually
1110
+ * renders: fill *and* stroke (a Line or a fill:None shape has no fillable area
1111
+ * and used to erase the masked layer), real bitmap alpha for images, glyphs for
1112
+ * text, artwork for SVG and the union of a group's children.
1113
+ *
1114
+ * The node's own transform is applied here, so the caller must already have
1115
+ * applied the node's ancestors; that nesting is what keeps the children of a
1116
+ * group mask from being transformed twice.
1117
+ */
1118
+ private paintMaskSource;
1119
+ private applyPath;
1120
+ private _tracePath;
1121
+ private renderInputBox;
1122
+ private renderSlider;
1123
+ private renderDropdown;
1124
+ private renderButton;
1125
+ private drawButtonIcon;
1126
+ private renderToggleButton;
1127
+ private renderToggle;
1128
+ private renderCheckbox;
1129
+ private renderRadioGroup;
1130
+ private renderBarChart;
1131
+ private renderPieChart;
1132
+ private renderJoystick;
1133
+ private getRadioGroupItemIndexAtPointer;
1134
+ private renderLineGraph;
1135
+ private _catmullRom;
1136
+ private normalizeOpacity;
1137
+ private createCanvasFill;
1138
+ private drawRoundRect;
1139
+ private renderListView;
1140
+ private drawCustomShape;
1141
+ private updateListViewScrollFromPointer;
1142
+ private updateListViewHoverFromPointer;
1143
+ private getListViewItemIndexAtPointer;
1144
+ private drawListViewRect;
1145
+ private solveBehaviors;
1146
+ private applyBehaviorSensor;
1147
+ private getObjectProperty;
1148
+ private setObjectProperty;
1149
+ private applyEasing;
1150
+ private lerp;
1151
+ private deepMerge;
1152
+ private processFabricAdjustmentsCanvas;
1153
+ private renderFittedImage;
1154
+ }
1155
+
1156
+ export declare interface Fill {
1157
+ type: 'Solid' | 'LinearGradient' | 'RadialGradient' | 'AngularGradient' | 'DiamondGradient' | 'Pattern' | 'None';
1158
+ color?: string;
1159
+ opacity: number;
1160
+ stops?: {
1161
+ offset: number;
1162
+ color: string;
1163
+ opacity?: number;
1164
+ }[];
1165
+ start?: [number, number];
1166
+ end?: [number, number];
1167
+ center?: [number, number];
1168
+ radius?: number;
1169
+ url?: string;
1170
+ scaleX?: number;
1171
+ scaleY?: number;
1172
+ offsetX?: number;
1173
+ offsetY?: number;
1174
+ rotation?: number;
1175
+ gradientTransform?: number[];
1176
+ }
1177
+
1178
+ export declare type Fit = 'Cover' | 'Contain' | 'Fill' | 'FitWidth' | 'FitHeight' | 'None' | 'ScaleDown' | 'Layout';
1179
+
1180
+ export declare type Geometry = {
1181
+ type: 'Rectangle';
1182
+ width: number;
1183
+ height: number;
1184
+ corner_radius?: number | [number, number, number, number] | {
1185
+ tl?: number;
1186
+ tr?: number;
1187
+ br?: number;
1188
+ bl?: number;
1189
+ };
1190
+ cornerRadius?: number | [number, number, number, number] | {
1191
+ tl?: number;
1192
+ tr?: number;
1193
+ br?: number;
1194
+ bl?: number;
1195
+ };
1196
+ isMask?: boolean;
1197
+ } | {
1198
+ type: 'Ellipse';
1199
+ width: number;
1200
+ height: number;
1201
+ startAngle?: number;
1202
+ sweepAngle?: number;
1203
+ ratio?: number;
1204
+ isMask?: boolean;
1205
+ } | {
1206
+ type: 'Text';
1207
+ text: string;
1208
+ fontSize: number;
1209
+ fontFamily: string;
1210
+ fontWeight?: string | number;
1211
+ textAlign?: 'left' | 'center' | 'right' | 'justify';
1212
+ textVerticalAlign?: 'top' | 'middle' | 'center' | 'bottom';
1213
+ width?: number;
1214
+ height?: number;
1215
+ lineHeight?: number;
1216
+ letterSpacing?: number;
1217
+ textDecoration?: 'none' | 'underline' | 'line-through';
1218
+ textCase?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';
1219
+ paragraphSpacing?: number;
1220
+ paragraphIndent?: number;
1221
+ textInputId?: string;
1222
+ segments?: {
1223
+ text: string;
1224
+ fill: Fill;
1225
+ fontSize?: number;
1226
+ fontFamily?: string;
1227
+ fontWeight?: string | number;
1228
+ fontStyle?: 'normal' | 'italic';
1229
+ textDecoration?: 'none' | 'underline' | 'line-through';
1230
+ }[];
1231
+ enableSegments?: boolean;
1232
+ isMask?: boolean;
1233
+ textPre?: string;
1234
+ textPost?: string;
1235
+ isTextVarEnabled?: boolean;
1236
+ pathId?: string;
1237
+ pathOffset?: number;
1238
+ pathOffsetY?: number;
1239
+ pathAlign?: 'baseline' | 'top' | 'bottom' | 'center';
1240
+ pathSide?: 'left' | 'right';
1241
+ typewriter?: {
1242
+ options: {
1243
+ speed: number;
1244
+ loop: boolean;
1245
+ };
1246
+ isEnabled: boolean;
1247
+ };
1248
+ fontStyle?: 'normal' | 'italic';
1249
+ isPointText?: boolean;
1250
+ autoHeight?: boolean;
1251
+ padding?: {
1252
+ top?: number;
1253
+ right?: number;
1254
+ bottom?: number;
1255
+ left?: number;
1256
+ };
1257
+ smallCaps?: boolean;
1258
+ baselineShift?: number;
1259
+ hyphenation?: boolean;
1260
+ composer?: 'single-line' | 'every-line';
1261
+ balanceRaggedLines?: boolean;
1262
+ kerning?: 'auto' | 'optical' | 'manual' | 'none';
1263
+ kerningValue?: number;
1264
+ justifyMinWordSpacing?: number;
1265
+ justifyMaxWordSpacing?: number;
1266
+ justifyMinLetterSpacing?: number;
1267
+ justifyMaxLetterSpacing?: number;
1268
+ paragraphRule?: {
1269
+ top?: {
1270
+ width: number;
1271
+ color: string;
1272
+ offset: number;
1273
+ };
1274
+ bottom?: {
1275
+ width: number;
1276
+ color: string;
1277
+ offset: number;
1278
+ };
1279
+ };
1280
+ pathFlip?: boolean;
1281
+ } | {
1282
+ type: 'Triangle';
1283
+ width: number;
1284
+ height: number;
1285
+ isMask?: boolean;
1286
+ } | {
1287
+ type: 'Polygon';
1288
+ radius: number;
1289
+ sides: number;
1290
+ isMask?: boolean;
1291
+ } | {
1292
+ type: 'Star';
1293
+ inner_radius: number;
1294
+ outer_radius: number;
1295
+ points: number;
1296
+ isMask?: boolean;
1297
+ } | {
1298
+ type: 'Line';
1299
+ length: number;
1300
+ isMask?: boolean;
1301
+ } | {
1302
+ type: 'SVG';
1303
+ svgContent: string;
1304
+ width: number;
1305
+ height: number;
1306
+ preserveAspectRatio: boolean;
1307
+ colors: string[];
1308
+ } | {
1309
+ type: 'Image';
1310
+ src: string;
1311
+ width: number;
1312
+ height: number;
1313
+ adjustments?: Adjustments;
1314
+ } | {
1315
+ type: 'Joystick';
1316
+ width: number;
1317
+ height: number;
1318
+ isMask?: boolean;
1319
+ stepX?: number;
1320
+ stepY?: number;
1321
+ deadzone?: number;
1322
+ boundsShape?: 'circle' | 'square';
1323
+ handleOrigin?: 'center' | 'top-left' | 'bottom-right';
1324
+ options?: any;
1325
+ } | {
1326
+ type: "LineGraph";
1327
+ datasets?: LineDataset[];
1328
+ data?: number[];
1329
+ width: number;
1330
+ height: number;
1331
+ lineColor?: string;
1332
+ lineWidth?: number;
1333
+ showArea?: boolean;
1334
+ areaColor?: string;
1335
+ smoothing?: boolean;
1336
+ showPoints?: boolean;
1337
+ pointSize?: number;
1338
+ pointFill?: string;
1339
+ pointStrokeColor?: string;
1340
+ pointStrokeWidth?: number;
1341
+ showXAxis?: boolean;
1342
+ showYAxis?: boolean;
1343
+ xAxisColor?: string;
1344
+ yAxisColor?: string;
1345
+ showXLabels?: boolean;
1346
+ showYLabels?: boolean;
1347
+ axisLabelColor?: string;
1348
+ axisLabelFontSize?: number;
1349
+ showLegend?: boolean;
1350
+ legendColor?: string;
1351
+ legendFontSize?: number;
1352
+ areaOpacity?: number;
1353
+ } | {
1354
+ type: 'Component';
1355
+ variant: string;
1356
+ width: number;
1357
+ height: number;
1358
+ } | {
1359
+ type: 'Path';
1360
+ points: (any & {
1361
+ moveTo?: boolean;
1362
+ })[];
1363
+ isMask?: boolean;
1364
+ isClosed?: boolean;
1365
+ is_closed?: boolean;
1366
+ };
1367
+
1368
+ export declare const getToggleSvgPathBounds: (d: string) => {
1369
+ minX: number;
1370
+ minY: number;
1371
+ maxX: number;
1372
+ maxY: number;
1373
+ width: number;
1374
+ height: number;
1375
+ cx: number;
1376
+ cy: number;
1377
+ };
1378
+
1379
+ export declare interface Input {
1380
+ id: string;
1381
+ name: string;
1382
+ value: InputValue;
1383
+ x?: number;
1384
+ y?: number;
1385
+ nodes?: InputNodePosition[];
1386
+ sourceId?: string;
1387
+ sourceHandleId?: string;
1388
+ }
1389
+
1390
+ export declare interface InputNodePosition {
1391
+ id: string;
1392
+ x: number;
1393
+ y: number;
1394
+ }
1395
+
1396
+ export declare type InputValue = {
1397
+ type: 'Boolean';
1398
+ value: boolean;
1399
+ } | {
1400
+ type: 'Number';
1401
+ value: number;
1402
+ } | {
1403
+ type: 'Trigger';
1404
+ value: boolean;
1405
+ } | {
1406
+ type: 'Text';
1407
+ value: string;
1408
+ } | {
1409
+ type: 'Object';
1410
+ value: string;
1411
+ } | {
1412
+ type: 'Api';
1413
+ value: any;
1414
+ api: ApiVariableConfig;
1415
+ };
1416
+
1417
+ export declare interface Interaction {
1418
+ id: string;
1419
+ event: 'onClick' | 'onHold' | 'pointerDown' | 'pointerUp' | 'hover' | string;
1420
+ action: 'setInput' | 'fireTrigger' | 'setProperty' | 'Navigate Artboard' | 'Navigate URL' | 'navigate' | 'Play Animation' | 'Stop Animation' | 'Pause Animation' | 'Switch to State' | 'Toggle Boolean' | string;
1421
+ targetInputId?: string;
1422
+ targetProperty?: string;
1423
+ targetObjectId?: string;
1424
+ targetArtboard?: string;
1425
+ targetState?: string;
1426
+ navigateUrl?: string;
1427
+ value?: any;
1428
+ targetAnimationId?: string;
1429
+ /** Number input that supplies the requested playback duration in milliseconds. */
1430
+ transitionDurationInputId?: string;
1431
+ /** Literal playback duration in milliseconds when no input is bound. */
1432
+ transitionDuration?: number;
1433
+ easingCurve?: string;
1434
+ subAnimationIds?: string[];
1435
+ playMode?: 'single' | 'all' | 'custom';
1436
+ triggers?: string[];
1437
+ triggerLogic?: 'OR' | 'AND';
1438
+ conditions?: Condition[];
1439
+ delayValue?: number;
1440
+ intervalValue?: number;
1441
+ }
1442
+
1443
+ /**
1444
+ * Absolutely positioned children (`layoutProps.positioning === 'absolute'`) stay
1445
+ * out of the flow, like CSS `position: absolute` / Figma "absolute position":
1446
+ * they keep their own position inside the container and take no space.
1447
+ */
1448
+ export declare function isAbsolutelyPositioned(child: any): boolean;
1449
+
1450
+ /** JSDOM/happy-dom friendly guard so tests can construct a runtime safely. */
1451
+ export declare function isCanvasElement(el: unknown): el is HTMLCanvasElement;
1452
+
1453
+ /**
1454
+ * Is this object a layout container? Layout is a property, not a feature, so
1455
+ * there is no on/off flag: `layoutProps.mode` carries it — `'linear'` (flexbox)
1456
+ * or `'grid'`. Anything else (absent, `'none'`) leaves children at their
1457
+ * authored positions.
1458
+ */
1459
+ export declare function isLayoutContainer(obj: any): boolean;
1460
+
1461
+ /**
1462
+ * Validates that property paths do not contain prototype pollution vectors (__proto__, constructor, prototype).
1463
+ */
1464
+ export declare function isSafePropertyPath(path: string | undefined | null): boolean;
1465
+
1466
+ /**
1467
+ * Validates that URLs do not use dangerous schemes like javascript:, vbscript:, or data:
1468
+ */
1469
+ export declare function isSafeUrl(url: string | undefined | null): boolean;
1470
+
1471
+ export declare type JustifyContent = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
1472
+
1473
+ declare interface Keyframe_2 {
1474
+ time: number;
1475
+ value: number | string;
1476
+ easing: string;
1477
+ }
1478
+ export { Keyframe_2 as Keyframe }
1479
+
1480
+ export declare interface Layer {
1481
+ name: string;
1482
+ entryStateId: string;
1483
+ entryConditions?: Condition[];
1484
+ states: State[];
1485
+ }
1486
+
1487
+ export declare interface Layout {
1488
+ fit: Fit;
1489
+ alignment: Alignment;
1490
+ layoutScaleFactor?: number;
1491
+ }
1492
+
1493
+ export declare type LayoutAlign = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
1494
+
1495
+ export declare interface LayoutBreakpoint {
1496
+ id: string;
1497
+ /** Human label, e.g. "Mobile" / "Tablet" / "Desktop". */
1498
+ name: string;
1499
+ /** Inclusive lower bound of the device width (px) this breakpoint starts at. */
1500
+ minWidth: number;
1501
+ /** Optional inclusive upper bound. Omitted means "and wider". */
1502
+ maxWidth?: number;
1503
+ /**
1504
+ * @deprecated Inline overrides on a per-container definition. Overrides now
1505
+ * live on `layoutProps.responsive[id]`. Still honoured for older documents.
1506
+ */
1507
+ props?: Partial<Omit<LayoutProps, 'breakpoints' | 'responsive'>>;
1508
+ }
1509
+
1510
+ /** Context passed down by the engine so breakpoints resolve document-wide. */
1511
+ export declare interface LayoutContext {
1512
+ /** The shared breakpoint set, usually `artboard.responsive.breakpoints`. */
1513
+ breakpoints?: LayoutBreakpoint[];
1514
+ /** The device width to resolve against. Defaults to the frame's own width. */
1515
+ width?: number;
1516
+ }
1517
+
1518
+ export declare type LayoutDirection = 'horizontal' | 'vertical' | 'horizontal-reverse' | 'vertical-reverse';
1519
+
1520
+ export declare type LayoutMode = 'none' | 'linear' | 'grid' | 'stack' | 'frame' | 'flow' | 'masonry' | 'anchor';
1521
+
1522
+ export declare interface LayoutProps {
1523
+ width?: ResizingMode;
1524
+ height?: ResizingMode;
1525
+ layoutSizingHorizontal?: ResizingMode;
1526
+ layoutSizingVertical?: ResizingMode;
1527
+ minWidth?: number;
1528
+ minHeight?: number;
1529
+ maxWidth?: number;
1530
+ maxHeight?: number;
1531
+ gridArea?: string;
1532
+ /** Flexbox grow factor. `fill` sizing implies 1 when this is unset. */
1533
+ flexGrow?: number;
1534
+ /** Flexbox shrink factor. `fill` sizing implies 1 when this is unset. */
1535
+ flexShrink?: number;
1536
+ /** Flexbox base size along the main axis. */
1537
+ flexBasis?: number;
1538
+ /** Per-item cross-axis alignment, overriding the container's alignItems. */
1539
+ alignSelf?: AlignItems;
1540
+ /**
1541
+ * How this object lays out its children. Absent or `'none'` leaves children
1542
+ * at their authored positions; `'linear'` is flexbox, `'grid'` is the track
1543
+ * grid. There is no separate on/off flag — layout is just a property.
1544
+ */
1545
+ mode?: LayoutMode;
1546
+ direction?: LayoutDirection;
1547
+ /** @deprecated Use `gap` (or rowGap/columnGap) instead. */
1548
+ spacing?: number | 'auto';
1549
+ /** Gap between items on the main axis; falls back to rowGap/columnGap, then spacing. */
1550
+ gap?: number | 'auto';
1551
+ columnGap?: number;
1552
+ rowGap?: number;
1553
+ gridColumns?: string;
1554
+ gridRows?: string;
1555
+ padding?: {
1556
+ top: number;
1557
+ right: number;
1558
+ bottom: number;
1559
+ left: number;
1560
+ };
1561
+ /** @deprecated Use justifyContent/alignItems instead. */
1562
+ align?: LayoutAlign;
1563
+ justifyContent?: JustifyContent;
1564
+ alignItems?: AlignItems;
1565
+ alignContent?: AlignContent;
1566
+ wrap?: boolean;
1567
+ /**
1568
+ * @deprecated Legacy inline breakpoint *definitions* on a container. The
1569
+ * shared set now lives on `artboard.responsive.breakpoints`; this is still
1570
+ * honoured so older documents keep rendering.
1571
+ */
1572
+ breakpoints?: LayoutBreakpoint[];
1573
+ /**
1574
+ * Per-breakpoint overrides, keyed by the shared breakpoint id. Resolved
1575
+ * against the device (artboard) width, so every container switches its
1576
+ * layout at the same breakpoints.
1577
+ */
1578
+ responsive?: Record<string, Partial<Omit<LayoutProps, 'breakpoints' | 'responsive' | 'padding'>> & {
1579
+ /** Padding overrides merge per side — set only the edges you change. */
1580
+ padding?: Partial<NonNullable<LayoutProps['padding']>>;
1581
+ }>;
1582
+ }
1583
+
1584
+ export declare interface LayoutResult {
1585
+ frameWidth?: number;
1586
+ frameHeight?: number;
1587
+ childUpdates: {
1588
+ id: string;
1589
+ x: number;
1590
+ y: number;
1591
+ width?: number;
1592
+ height?: number;
1593
+ }[];
1594
+ }
1595
+
1596
+ export declare interface LineDataset {
1597
+ id: string;
1598
+ label: string;
1599
+ data: number[];
1600
+ lineColor: string;
1601
+ lineWidth: number;
1602
+ showArea: boolean;
1603
+ areaColor: string;
1604
+ smoothing: boolean;
1605
+ showPoints: boolean;
1606
+ pointSize: number;
1607
+ pointFill: string;
1608
+ pointStrokeColor: string;
1609
+ pointStrokeWidth: number;
1610
+ inputId?: string;
1611
+ isVarEnabled?: boolean;
1612
+ }
1613
+
1614
+ /**
1615
+ * Liquid Fill - Shapes that fill like pouring liquid
1616
+ */
1617
+ export declare interface LiquidFillConfig {
1618
+ enabled: boolean;
1619
+ fillLevel: number;
1620
+ waveAmplitude: number;
1621
+ waveFrequency: number;
1622
+ color: string;
1623
+ opacity: number;
1624
+ direction?: 'up' | 'down' | 'left' | 'right';
1625
+ }
1626
+
1627
+ /**
1628
+ * Liquid Morphing - Blob-like deformations for shapes
1629
+ */
1630
+ export declare interface LiquidMorphConfig {
1631
+ enabled: boolean;
1632
+ blobStrength: number;
1633
+ frequency: number;
1634
+ amplitude?: number;
1635
+ seed?: number;
1636
+ }
1637
+
1638
+ export declare interface LogicNode {
1639
+ id: string;
1640
+ name: string;
1641
+ op: LogicOp;
1642
+ x: number;
1643
+ y: number;
1644
+ inputs: {
1645
+ id: string;
1646
+ sourceId?: string;
1647
+ sourceHandleId?: string;
1648
+ value?: any;
1649
+ }[];
1650
+ value?: any;
1651
+ label?: string;
1652
+ }
1653
+
1654
+ export declare enum LogicOp {
1655
+ AND = "AND",
1656
+ OR = "OR",
1657
+ NOT = "NOT",
1658
+ XOR = "XOR",
1659
+ OBJECT = "OBJECT",
1660
+ PROPERTY = "PROPERTY",
1661
+ GET_PROPERTY = "GET_PROPERTY",
1662
+ SET_PROPERTY = "SET_PROPERTY",
1663
+ ADD = "ADD",
1664
+ SUB = "SUB",
1665
+ MUL = "MUL",
1666
+ DIV = "DIV",
1667
+ MOD = "MOD",
1668
+ POW = "POW",
1669
+ ABS = "ABS",
1670
+ ROUND = "ROUND",
1671
+ FLOOR = "FLOOR",
1672
+ CEIL = "CEIL",
1673
+ SIN = "SIN",
1674
+ COS = "COS",
1675
+ TAN = "TAN",
1676
+ CLAMP = "CLAMP",
1677
+ REMAP = "REMAP",
1678
+ EQ = "EQ",
1679
+ NEQ = "NEQ",
1680
+ GT = "GT",
1681
+ LT = "LT",
1682
+ GTE = "GTE",
1683
+ LTE = "LTE",
1684
+ IF_ELSE = "IF_ELSE",
1685
+ VALUE = "VALUE",
1686
+ INPUT = "INPUT",
1687
+ LOG = "LOG",
1688
+ SCROLL_X = "SCROLL_X",
1689
+ SCROLL_Y = "SCROLL_Y",
1690
+ MOUSE_X = "MOUSE_X",
1691
+ MOUSE_Y = "MOUSE_Y",
1692
+ IS_MOUSE_DOWN = "IS_MOUSE_DOWN",
1693
+ EFFECTOR = "EFFECTOR",
1694
+ MONITOR = "MONITOR",
1695
+ DELAY = "DELAY",
1696
+ SPRING_PULL = "SPRING_PULL",
1697
+ SPRING_SETTLE = "SPRING_SETTLE",
1698
+ EMIT = "EMIT"
1699
+ }
1700
+
1701
+ export declare interface LogicProperty {
1702
+ id: string;
1703
+ name: string;
1704
+ valueType: 'variable' | 'constant' | 'expression';
1705
+ variableId?: string;
1706
+ value?: any;
1707
+ }
1708
+
1709
+ export declare interface NavigationCondition {
1710
+ inputId: string;
1711
+ operator: '==' | '!=' | '>' | '<' | '>=' | '<=';
1712
+ value: any;
1713
+ }
1714
+
1715
+ /**
1716
+ * A Screen-to-Screen navigation rule.
1717
+ *
1718
+ * Rules live on the Screen (`artboard.navigation`) and are either attached to an
1719
+ * object (`objectId` set) or screen-level (`objectId` null: load/exit/timing/data).
1720
+ */
1721
+ export declare interface NavigationRule {
1722
+ id: string;
1723
+ name?: string;
1724
+ enabled?: boolean;
1725
+ trigger: NavigationTriggerType;
1726
+ objectId?: string | null;
1727
+ conditions?: NavigationCondition[];
1728
+ conditionLogic?: 'AND' | 'OR';
1729
+ property?: string;
1730
+ delayMs?: number;
1731
+ intervalMs?: number;
1732
+ target: NavigationTarget;
1733
+ targetScreenId?: string | null;
1734
+ url?: string;
1735
+ transition?: NavigationTransition;
1736
+ duration?: number;
1737
+ }
1738
+
1739
+ /** Where a navigation rule goes. */
1740
+ export declare type NavigationTarget = 'screen' | 'back' | 'next' | 'url';
1741
+
1742
+ export declare type NavigationTransition = 'none' | 'fade' | 'slideLeft' | 'slideRight' | 'slideUp' | 'slideDown' | 'zoom';
1743
+
1744
+ /** What starts a navigation rule (mirrors the editor's NavigationRule.trigger). */
1745
+ export declare type NavigationTriggerType = 'click' | 'doubleClick' | 'rightClick' | 'hover' | 'hoverOut' | 'press' | 'release' | 'longPress' | 'swipeLeft' | 'swipeRight' | 'swipeUp' | 'swipeDown' | 'scrollIntoView' | 'variable' | 'propertyChange' | 'visible' | 'hidden' | 'toggle' | 'delay' | 'interval' | 'screenLoad' | 'screenExit' | 'animationEnd' | 'stateEnter';
1746
+
1747
+ export declare interface Physics {
1748
+ enabled: boolean;
1749
+ bodyType: 'Dynamic' | 'Static';
1750
+ mass: number;
1751
+ density: number;
1752
+ friction: number;
1753
+ restitution: number;
1754
+ frictionAir: number;
1755
+ isSensor: boolean;
1756
+ }
1757
+
1758
+ /**
1759
+ * Physics Effects — visual effects driven by the physics simulation.
1760
+ *
1761
+ * Turn them on for every falling body with `artboard.physics.effects`, and override or opt out
1762
+ * per object with `object.physicsEffects` (an object to override, `false` to disable):
1763
+ *
1764
+ * physics.effects = {
1765
+ * squash: { amount: 1 }, // stretch along motion, squash on impact
1766
+ * trail: { length: 6, opacity: 0.3 }, // afterimages behind fast bodies
1767
+ * impact: { color: '#FFFFFF', size: 1 }, // shockwave ring where a body hits
1768
+ * dust: { color: '#CFC8BE', count: 10 }, // particles on hard landings
1769
+ * heat: { color: '#FF6B3D', maxSpeed: 1600 }, // glow that grows with speed
1770
+ * shadow: { opacity: 0.35, groundY: 820 }, // contact shadow on the ground
1771
+ * shake: { amount: 1 }, // artboard shake on heavy impacts
1772
+ * }
1773
+ *
1774
+ * Each effect is on when its key is present (set `enabled: false` to switch one off).
1775
+ * Impacts are detected from sudden velocity changes, so no collision setup is needed.
1776
+ */
1777
+ declare interface PhysicsEffectsConfig {
1778
+ squash?: {
1779
+ enabled?: boolean;
1780
+ amount?: number;
1781
+ };
1782
+ trail?: {
1783
+ enabled?: boolean;
1784
+ length?: number;
1785
+ opacity?: number;
1786
+ minSpeed?: number;
1787
+ };
1788
+ impact?: {
1789
+ enabled?: boolean;
1790
+ color?: string;
1791
+ size?: number;
1792
+ minSpeed?: number;
1793
+ };
1794
+ dust?: {
1795
+ enabled?: boolean;
1796
+ color?: string;
1797
+ count?: number;
1798
+ minSpeed?: number;
1799
+ };
1800
+ heat?: {
1801
+ enabled?: boolean;
1802
+ color?: string;
1803
+ maxSpeed?: number;
1804
+ blur?: number;
1805
+ };
1806
+ shadow?: {
1807
+ enabled?: boolean;
1808
+ opacity?: number;
1809
+ groundY?: number;
1810
+ color?: string;
1811
+ };
1812
+ shake?: {
1813
+ enabled?: boolean;
1814
+ amount?: number;
1815
+ };
1816
+ }
1817
+
1818
+ export declare interface PlayInstance {
1819
+ id: string;
1820
+ trigger: 'on_load' | 'after_delay' | 'after_anim' | 'on_scroll' | 'manual';
1821
+ delay?: number;
1822
+ afterAnim?: string;
1823
+ conditions?: {
1824
+ variable: string;
1825
+ operator: string;
1826
+ value: any;
1827
+ }[];
1828
+ subAnimationIds?: string[];
1829
+ loop?: boolean;
1830
+ }
1831
+
1832
+ export declare interface RepeaterConfig {
1833
+ isEnabled: boolean;
1834
+ type: 'Linear' | 'Grid' | 'Radial';
1835
+ count: number;
1836
+ offsetX?: number;
1837
+ offsetY?: number;
1838
+ rotation?: number;
1839
+ scale?: number;
1840
+ cols?: number;
1841
+ gapX?: number;
1842
+ gapY?: number;
1843
+ radius?: number;
1844
+ startAngle?: number;
1845
+ endAngle?: number;
1846
+ }
1847
+
1848
+ export declare type ResizingMode = 'fixed' | 'hug' | 'fill';
1849
+
1850
+ export declare function resolveLayoutAtWidth(layoutProps: LayoutProps | undefined | null, width: number, breakpoints?: LayoutBreakpoint[] | null): LayoutProps;
1851
+
1852
+ export declare interface ResponsiveConfig {
1853
+ enabled: boolean;
1854
+ mode: 'fixed' | 'hug' | 'fill' | 'constraint';
1855
+ width?: {
1856
+ min?: number;
1857
+ max?: number;
1858
+ type: 'percentage' | 'fixed';
1859
+ };
1860
+ height?: {
1861
+ min?: number;
1862
+ max?: number;
1863
+ type: 'percentage' | 'fixed';
1864
+ };
1865
+ maintainAspectRatio: boolean;
1866
+ scaleObjects: boolean;
1867
+ /** The document-wide breakpoint set, shared by every container. */
1868
+ breakpoints?: LayoutBreakpoint[];
1869
+ }
1870
+
1871
+ export declare interface SEOConfig {
1872
+ title?: string;
1873
+ description?: string;
1874
+ keywords?: string[];
1875
+ ogImage?: string;
1876
+ jsonLd?: any;
1877
+ /**
1878
+ * By default, we extract all text objects for semantic HTML.
1879
+ * Set this to false to only use explicitly provided metadata.
1880
+ */
1881
+ enableSmartExtraction?: boolean;
1882
+ }
1883
+
1884
+ export declare interface Shadow {
1885
+ color: string;
1886
+ blur: number;
1887
+ offsetX: number;
1888
+ offsetY: number;
1889
+ opacity: number;
1890
+ isEnabled?: boolean;
1891
+ spread?: number;
1892
+ }
1893
+
1894
+ export declare interface ShapeObject {
1895
+ type: 'Shape' | 'Group' | 'Component' | 'Button' | 'Bone' | 'Toggle' | 'Slider' | 'Dropdown' | 'ListView' | 'Checkbox' | 'RadioGroup' | 'BarChart' | 'PieChart';
1896
+ id: string;
1897
+ name: string;
1898
+ transform: Transform;
1899
+ geometry?: Geometry;
1900
+ style: Style;
1901
+ parentId?: string;
1902
+ children?: string[];
1903
+ triggers?: Trigger[];
1904
+ interactions?: Interaction[];
1905
+ constraints?: Constraint[];
1906
+ spatialConstraints?: SpatialConstraint;
1907
+ physics?: Physics;
1908
+ renderAsGroup?: boolean;
1909
+ opacity?: number;
1910
+ visible?: boolean;
1911
+ isVisible?: boolean;
1912
+ blendMode?: string;
1913
+ compositeOperation?: string;
1914
+ options?: any;
1915
+ inputId?: string;
1916
+ maskedBy?: string;
1917
+ maskInverted?: boolean;
1918
+ maskOpacity?: number;
1919
+ maskFeather?: number;
1920
+ maskType?: 'alpha' | 'luma';
1921
+ maskBlendMode?: string;
1922
+ behaviors?: Behavior[];
1923
+ liquidMorph?: LiquidMorphConfig;
1924
+ liquidFill?: LiquidFillConfig;
1925
+ artEffect?: ArtEffectConfig;
1926
+ width?: number;
1927
+ height?: number;
1928
+ cornerRadius?: number | [number, number, number, number];
1929
+ clipContent?: boolean;
1930
+ layoutProps?: LayoutProps;
1931
+ altText?: string;
1932
+ repeaterConfig?: RepeaterConfig;
1933
+ weights?: {
1934
+ [vertexIndex: string | number]: {
1935
+ boneId: string;
1936
+ amount: number;
1937
+ }[];
1938
+ };
1939
+ bindMatrices?: {
1940
+ [boneId: string]: number[];
1941
+ };
1942
+ logicProperties?: LogicProperty[];
1943
+ codeAnimation?: any;
1944
+ codeAnimations?: any[];
1945
+ data?: any;
1946
+ }
1947
+
1948
+ /**
1949
+ * ExodeUI Auto Layout — flexbox semantics.
1950
+ *
1951
+ * This is the single source of truth for linear (flex) auto layout. The same
1952
+ * body is mirrored into the other runtime packages and into
1953
+ * `editor/src/utils/layoutEngine.ts`; `__tests__/flexbox.test.ts` and the
1954
+ * editor's parity test keep the copies honest.
1955
+ *
1956
+ * Supported: direction (incl. `-reverse`), gap / rowGap / columnGap, padding,
1957
+ * justifyContent, alignItems (incl. stretch), alignContent, wrap,
1958
+ * fixed / hug / fill sizing, flexGrow, flexShrink, flexBasis, alignSelf,
1959
+ * and min/max clamping.
1960
+ */
1961
+ export declare type SizingMode = 'fixed' | 'hug' | 'fill';
1962
+
1963
+ export declare interface SpatialConstraint {
1964
+ horizontal?: 'left' | 'right' | 'left-right' | 'center' | 'scale';
1965
+ vertical?: 'top' | 'bottom' | 'top-bottom' | 'center' | 'scale';
1966
+ relativeTo?: string;
1967
+ offsetX?: number;
1968
+ offsetY?: number;
1969
+ minWidth?: number;
1970
+ maxWidth?: number;
1971
+ minHeight?: number;
1972
+ maxHeight?: number;
1973
+ lockAspectRatio?: boolean;
1974
+ }
1975
+
1976
+ export declare interface State {
1977
+ id: string;
1978
+ name: string;
1979
+ x: number;
1980
+ y: number;
1981
+ transitions: Transition[];
1982
+ animationId?: string | null;
1983
+ loop?: boolean;
1984
+ isBlendState?: boolean;
1985
+ blendType?: '1D' | '2D';
1986
+ blendAnimations?: BlendAnimation[];
1987
+ blendInputX?: string;
1988
+ blendInputY?: string;
1989
+ speed?: number;
1990
+ onEntry?: StateAction[];
1991
+ onExit?: StateAction[];
1992
+ }
1993
+
1994
+ export declare interface StateAction {
1995
+ type: 'SetInput' | 'FireTrigger';
1996
+ inputId: string;
1997
+ value?: boolean | number;
1998
+ }
1999
+
2000
+ export declare interface StateMachine {
2001
+ inputs: Input[];
2002
+ layers: Layer[];
2003
+ logicNodes?: LogicNode[];
2004
+ listeners?: EventListener_2[];
2005
+ }
2006
+
2007
+ export declare interface Style {
2008
+ fill?: Fill;
2009
+ stroke?: {
2010
+ color?: string;
2011
+ fill?: Fill;
2012
+ width: number;
2013
+ opacity: number;
2014
+ alignment?: 'center' | 'inside' | 'outside';
2015
+ lineCap?: 'butt' | 'round' | 'square';
2016
+ lineJoin?: 'miter' | 'round' | 'bevel';
2017
+ miterLimit?: number;
2018
+ dashArray?: number[];
2019
+ dashOffset?: number;
2020
+ trimStart?: number;
2021
+ trimEnd?: number;
2022
+ trimOffset?: number;
2023
+ isEnabled?: boolean;
2024
+ };
2025
+ shadow?: Shadow;
2026
+ blur?: Blur;
2027
+ adjustments?: Adjustments;
2028
+ liquidMorph?: LiquidMorphConfig;
2029
+ liquidFill?: LiquidFillConfig;
2030
+ artEffect?: ArtEffectConfig;
2031
+ palette?: string[];
2032
+ analytics?: AnalyticsConfig;
2033
+ compositeOperation?: GlobalCompositeOperation | string;
2034
+ }
2035
+
2036
+ export declare const TOGGLE_SHAPE_NAME_MAP: Record<string, string>;
2037
+
2038
+ export declare interface Track {
2039
+ object_id: string;
2040
+ property: string;
2041
+ keyframes: Keyframe_2[];
2042
+ }
2043
+
2044
+ export declare interface Transform {
2045
+ x: number;
2046
+ y: number;
2047
+ rotation: number;
2048
+ scale_x: number;
2049
+ scale_y: number;
2050
+ opacity?: number;
2051
+ skew_x?: number;
2052
+ skew_y?: number;
2053
+ flip_x?: boolean;
2054
+ flip_y?: boolean;
2055
+ }
2056
+
2057
+ export declare interface Transition {
2058
+ id: string;
2059
+ targetStateId: string;
2060
+ duration: number;
2061
+ delay?: number;
2062
+ conditions: Condition[];
2063
+ }
2064
+
2065
+ export declare interface Trigger {
2066
+ id: string;
2067
+ name: string;
2068
+ eventType: 'onClick' | 'onHold' | 'pointerDown' | 'pointerUp' | 'hover';
2069
+ entryAnimationId?: string | null;
2070
+ exitAnimationId?: string | null;
2071
+ targetObjectId?: string | null;
2072
+ duration?: number;
2073
+ loop?: boolean;
2074
+ conditions?: Condition[];
2075
+ }
2076
+
2077
+ export { }