@it-compiles/anima 0.1.3 → 0.1.4
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/dist/core/types.d.ts +21 -15
- package/dist/index.d.ts +1 -1
- package/dist/video-renderer-Buv1c43x.js.map +1 -1
- package/package.json +1 -1
package/dist/core/types.d.ts
CHANGED
|
@@ -156,27 +156,33 @@ export type Padding = number | {
|
|
|
156
156
|
bottom?: number;
|
|
157
157
|
left?: number;
|
|
158
158
|
};
|
|
159
|
-
/**
|
|
159
|
+
/** Lazy function that evaluates Vec2 from resolved context (always callable) */
|
|
160
|
+
export type Vec2Fn = (ctx: ResolvedCtx) => Vec2;
|
|
161
|
+
/** Lazy function that evaluates number from resolved context (always callable) */
|
|
162
|
+
export type NumFn = (ctx: ResolvedCtx) => number;
|
|
163
|
+
/** Lazy function that evaluates Rect from resolved context (always callable) */
|
|
164
|
+
export type RectFn = (ctx: ResolvedCtx) => Rect;
|
|
165
|
+
/** Handle for measured bounding box - returns lazy expressions that are always callable */
|
|
160
166
|
export interface BBoxHandle {
|
|
161
167
|
/** Add uniform or per-side padding */
|
|
162
168
|
pad(p: Padding): BBoxHandle;
|
|
163
|
-
/** Get size as [width, height] */
|
|
164
|
-
size():
|
|
165
|
-
/** Get width in pixels */
|
|
166
|
-
width():
|
|
167
|
-
/** Get height in pixels */
|
|
168
|
-
height():
|
|
169
|
+
/** Get size as [width, height] - always returns a callable function */
|
|
170
|
+
size(): Vec2Fn;
|
|
171
|
+
/** Get width in pixels - always returns a callable function */
|
|
172
|
+
width(): NumFn;
|
|
173
|
+
/** Get height in pixels - always returns a callable function */
|
|
174
|
+
height(): NumFn;
|
|
169
175
|
/** Get { width, height } for use with resize().to() */
|
|
170
176
|
whSize(): {
|
|
171
|
-
width:
|
|
172
|
-
height:
|
|
177
|
+
width: NumFn;
|
|
178
|
+
height: NumFn;
|
|
173
179
|
};
|
|
174
|
-
/** Get center point */
|
|
175
|
-
center():
|
|
176
|
-
/** Get position of any anchor on the bbox */
|
|
177
|
-
anchor(a: Anchor):
|
|
178
|
-
/** Get the raw rect */
|
|
179
|
-
toRect():
|
|
180
|
+
/** Get center point - always returns a callable function */
|
|
181
|
+
center(): Vec2Fn;
|
|
182
|
+
/** Get position of any anchor on the bbox - always returns a callable function */
|
|
183
|
+
anchor(a: Anchor): Vec2Fn;
|
|
184
|
+
/** Get the raw rect - always returns a callable function */
|
|
185
|
+
toRect(): RectFn;
|
|
180
186
|
}
|
|
181
187
|
export interface PinMethods {
|
|
182
188
|
to(pos: Vec2Expr, u: number): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { Vec2, Vec2Expr, NumExpr, RectExpr, Anchor, SceneObject, GroupObject, ObjRef, Scene, Timeline, TimelineAPI, AnimCtx, EaseFn, Transform, Rect, TextOpts, RectOpts, ImageOpts, ImageSource, LayoutOpts, AlignOpts, Padding, PinMethods, TransformMethods, ResizeMethods, FitMethods, BBoxHandle, GroupBuilder, LayoutBuilder, ResolvedCtx, } from './core';
|
|
1
|
+
export type { Vec2, Vec2Expr, NumExpr, RectExpr, Vec2Fn, NumFn, RectFn, Anchor, SceneObject, GroupObject, ObjRef, Scene, Timeline, TimelineAPI, AnimCtx, EaseFn, Transform, Rect, TextOpts, RectOpts, ImageOpts, ImageSource, LayoutOpts, AlignOpts, Padding, PinMethods, TransformMethods, ResizeMethods, FitMethods, BBoxHandle, GroupBuilder, LayoutBuilder, ResolvedCtx, } from './core';
|
|
2
2
|
export { isGroup, isExpr } from './core';
|
|
3
3
|
export { makeScene } from './core';
|
|
4
4
|
export { timeline } from './core';
|