@pygmalionjs/pygmalion 0.11.1 → 0.12.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/dist-lib/pygmalion.js +10525 -9988
- package/dist-lib/style.css +1 -1
- package/dist-lib/types/document/prototype.d.ts +32 -2
- package/dist-lib/types/document/prototypeDrag.d.ts +43 -0
- package/dist-lib/types/document/prototypeEasing.d.ts +3 -0
- package/dist-lib/types/document/prototypeMotion.d.ts +25 -0
- package/dist-lib/types/document/prototypeMotionContracts.d.ts +30 -0
- package/dist-lib/types/document/prototypeSpring.d.ts +28 -0
- package/dist-lib/types/lib.d.ts +5 -0
- package/dist-lib/types/workspace/edit/projection.d.ts +2 -0
- package/dist-lib/types/workspace/view/prototypeMotionDom.d.ts +5 -0
- package/dist-lib/types/workspace/view/prototypePlayback.d.ts +11 -0
- package/package.json +1 -1
|
@@ -4,6 +4,8 @@ import type { DesignDocument, DocumentNode, DocumentResolveOptions } from '../..
|
|
|
4
4
|
export interface ProjectedDocumentNode {
|
|
5
5
|
sourceNodeId: string;
|
|
6
6
|
instanceId?: string;
|
|
7
|
+
/** Runtime presentation may attach the canonical enclosing instance path. */
|
|
8
|
+
instancePath?: readonly string[];
|
|
7
9
|
rowPath: BindingRuntimeScope['rowPath'];
|
|
8
10
|
node: DocumentNode;
|
|
9
11
|
children: ProjectedDocumentNode[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PrototypeMotionLayer } from '../../document/prototypeMotion.js';
|
|
2
|
+
/** Collect both incoming and inert outgoing scenes without traversing outside the supplied scene.
|
|
3
|
+
* Legacy renderers can recover kinds from their source document. Unresolved or malformed
|
|
4
|
+
* identities remain invalid descriptors so they crossfade without being paired. */
|
|
5
|
+
export declare function collectPrototypeMotionLayers(scene: HTMLElement, resolveKind?: (sourceNodeId: string) => string | undefined): PrototypeMotionLayer<HTMLElement>[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { DesignDocument, DocumentNode, ResolvedDocumentNode } from '../../document/contracts.js';
|
|
2
2
|
import { type PrototypeEffect, type PrototypeEvent, type PrototypeRuntimeContext, type PrototypeStartOptions, type PrototypeState } from '../../document/prototype.js';
|
|
3
|
+
import { type PrototypeDragFinishInput, type PrototypeDragStartInput } from '../../document/prototypeDrag.js';
|
|
3
4
|
export interface PrototypeClock {
|
|
4
5
|
now(): number;
|
|
5
6
|
schedule(callback: () => void, delayMs: number): unknown;
|
|
@@ -10,6 +11,13 @@ export interface PrototypePlayerSnapshot {
|
|
|
10
11
|
previous: PrototypeState | null;
|
|
11
12
|
effects: readonly PrototypeEffect[];
|
|
12
13
|
playing: boolean;
|
|
14
|
+
drag: {
|
|
15
|
+
id: number;
|
|
16
|
+
phase: 'dragging' | 'settling';
|
|
17
|
+
progress: number;
|
|
18
|
+
velocity: number;
|
|
19
|
+
outcome: 'commit' | 'cancel' | null;
|
|
20
|
+
} | null;
|
|
13
21
|
}
|
|
14
22
|
export interface PrototypePlayerOptions extends PrototypeStartOptions {
|
|
15
23
|
clock: PrototypeClock;
|
|
@@ -20,6 +28,9 @@ export interface PrototypePlayerController {
|
|
|
20
28
|
getSnapshot(): PrototypePlayerSnapshot;
|
|
21
29
|
subscribe(listener: () => void): () => void;
|
|
22
30
|
dispatch(event: PrototypeEvent): void;
|
|
31
|
+
beginDrag(input: Omit<PrototypeDragStartInput, 'now'>): boolean;
|
|
32
|
+
updateDrag(input: Pick<PrototypeDragStartInput, 'pointerId' | 'point'>): void;
|
|
33
|
+
endDrag(input: Omit<PrototypeDragFinishInput, 'now'>): void;
|
|
23
34
|
pause(): void;
|
|
24
35
|
resume(): void;
|
|
25
36
|
dispose(): void;
|