@pygmalionjs/pygmalion 0.13.0 → 0.15.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/{CameraLayer-CGW_FPQS.js → CameraLayer-CWrlA9D-.js} +10 -10
- package/dist-lib/pygmalion.js +15264 -12990
- package/dist-lib/{runtime-DkCf4iKe.js → runtime-7no5RTHJ.js} +1917 -1877
- package/dist-lib/style.css +1 -1
- package/dist-lib/testing.js +8 -8
- package/dist-lib/types/document/appearance.d.ts +5 -2
- package/dist-lib/types/document/assets.d.ts +12 -4
- package/dist-lib/types/document/imagePaintGeometry.d.ts +23 -0
- package/dist-lib/types/document/pages.d.ts +48 -0
- package/dist-lib/types/document/pagesMetadata.d.ts +16 -0
- package/dist-lib/types/lib.d.ts +3 -0
- package/dist-lib/types/workspace/contracts.d.ts +6 -0
- package/dist-lib/types/workspace/controller.d.ts +1 -0
- package/dist-lib/types/workspace/edit/AppearancePanel.d.ts +3 -1
- package/dist-lib/types/workspace/edit/ArrangeLayers.d.ts +2 -1
- package/dist-lib/types/workspace/edit/AssetsPanel.d.ts +3 -2
- package/dist-lib/types/workspace/edit/CanvasGuides.d.ts +6 -3
- package/dist-lib/types/workspace/edit/EditViewport.d.ts +31 -0
- package/dist-lib/types/workspace/edit/EditorCommandMenu.d.ts +18 -0
- package/dist-lib/types/workspace/edit/EditorToolbar.d.ts +19 -0
- package/dist-lib/types/workspace/edit/ImageCropEditor.d.ts +13 -0
- package/dist-lib/types/workspace/edit/LayerTree.d.ts +5 -1
- package/dist-lib/types/workspace/edit/LayoutPanel.d.ts +2 -1
- package/dist-lib/types/workspace/edit/NodeExportPanel.d.ts +10 -0
- package/dist-lib/types/workspace/edit/PagesPanel.d.ts +12 -0
- package/dist-lib/types/workspace/edit/PanelResizeHandle.d.ts +12 -0
- package/dist-lib/types/workspace/edit/PrototypePanel.d.ts +5 -1
- package/dist-lib/types/workspace/edit/PrototypeWiring.d.ts +18 -0
- package/dist-lib/types/workspace/edit/SelectionHandles.d.ts +8 -4
- package/dist-lib/types/workspace/edit/canvasGuideModel.d.ts +16 -0
- package/dist-lib/types/workspace/edit/clipboard.d.ts +1 -0
- package/dist-lib/types/workspace/edit/editViewportModel.d.ts +20 -0
- package/dist-lib/types/workspace/edit/editorCanvas.d.ts +27 -0
- package/dist-lib/types/workspace/edit/geometryHandles.d.ts +10 -3
- package/dist-lib/types/workspace/edit/prototypeWiringModel.d.ts +47 -0
- package/dist-lib/types/workspace/edit/rasterExport.d.ts +5 -0
- package/dist-lib/types/workspace/view/prototypeMotionInterruption.d.ts +37 -0
- package/dist-lib/types/workspace/view/prototypePlayback.d.ts +8 -0
- package/dist-lib/types/workspace/view/storyboardCanvas.d.ts +16 -1
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type RasterExportRenderer, type RasterExportRequest } from '../../document/exportSettings.js';
|
|
2
|
+
/** The same supported SVG geometry supplies browser raster output; unsupported visuals stay explicit. */
|
|
3
|
+
export declare function rasterExportSvg(request: RasterExportRequest): string;
|
|
4
|
+
/** Explicit browser renderer for supported geometry. It never captures a page or fetches external resources. */
|
|
5
|
+
export declare const renderDesignRaster: RasterExportRenderer;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { PrototypeTransition } from '../../document/prototype.js';
|
|
2
|
+
export declare const prototypeMotionProperties: readonly ["transform", "width", "height", "opacity", "backgroundColor", "borderRadius"];
|
|
3
|
+
export type PrototypeMotionProperty = typeof prototypeMotionProperties[number];
|
|
4
|
+
export type PrototypeMotionStyles = Record<PrototypeMotionProperty, string>;
|
|
5
|
+
export interface PrototypeMotionCapture {
|
|
6
|
+
styles: PrototypeMotionStyles;
|
|
7
|
+
velocity: Partial<Record<PrototypeMotionProperty, readonly number[]>>;
|
|
8
|
+
}
|
|
9
|
+
export interface PrototypeMotionRecord {
|
|
10
|
+
element: HTMLElement;
|
|
11
|
+
animation: Animation;
|
|
12
|
+
frames: readonly Keyframe[];
|
|
13
|
+
durationMs: number;
|
|
14
|
+
easing(progress: number): number;
|
|
15
|
+
}
|
|
16
|
+
/** Mirrors the bounded CSS linear() samples used by the physical spring renderer. */
|
|
17
|
+
export declare function prototypeMotionTiming(transition: PrototypeTransition, durationMs: number): (progress: number) => number;
|
|
18
|
+
/** Reads presentation once. No time seeks, inline-style writes, frame history or DOM mutations. */
|
|
19
|
+
export declare function capturePrototypeMotionStyles(elements: readonly HTMLElement[], records: readonly PrototypeMotionRecord[], drag?: {
|
|
20
|
+
progress: number;
|
|
21
|
+
velocity: number;
|
|
22
|
+
} | null): Map<HTMLElement, PrototypeMotionCapture>;
|
|
23
|
+
export interface PrototypeInterruptedTiming {
|
|
24
|
+
readonly samples: readonly {
|
|
25
|
+
offset: number;
|
|
26
|
+
progress: number;
|
|
27
|
+
velocityResponse: number;
|
|
28
|
+
}[];
|
|
29
|
+
readonly initialSlope: number;
|
|
30
|
+
}
|
|
31
|
+
/** One shared timing table per interrupted transition, never one solver per layer/channel. */
|
|
32
|
+
export declare function createPrototypeInterruptedTiming(transition: PrototypeTransition, durationMs: number): PrototypeInterruptedTiming;
|
|
33
|
+
/** Existing computed 2D/px/RGB tracks only. Unsupported values retain explicit diagnostics. */
|
|
34
|
+
export declare function createPrototypeInterruptedFrames(captured: PrototypeMotionCapture, target: Partial<PrototypeMotionStyles>, timing: PrototypeInterruptedTiming): {
|
|
35
|
+
frames: Keyframe[];
|
|
36
|
+
unsupported: PrototypeMotionProperty[];
|
|
37
|
+
};
|
|
@@ -27,9 +27,17 @@ export interface PrototypePlayerOptions extends PrototypeStartOptions {
|
|
|
27
27
|
/** Effects describe intended links and scrolling; the adapter decides how to execute them. */
|
|
28
28
|
onEffect?(effect: PrototypeEffect): void;
|
|
29
29
|
}
|
|
30
|
+
export interface PrototypeTransitionChange {
|
|
31
|
+
previous: PrototypePlayerSnapshot;
|
|
32
|
+
next: PrototypeState;
|
|
33
|
+
interrupted: boolean;
|
|
34
|
+
reset: boolean;
|
|
35
|
+
}
|
|
30
36
|
export interface PrototypePlayerController {
|
|
31
37
|
getSnapshot(): PrototypePlayerSnapshot;
|
|
32
38
|
subscribe(listener: () => void): () => void;
|
|
39
|
+
/** Capture presentation before the old scene is replaced. Exceptions become diagnostics. */
|
|
40
|
+
subscribeBeforeTransition(listener: (change: PrototypeTransitionChange) => void): () => void;
|
|
33
41
|
dispatch(event: PrototypeEvent): void;
|
|
34
42
|
beginDrag(input: Omit<PrototypeDragStartInput, 'now'>): boolean;
|
|
35
43
|
updateDrag(input: Pick<PrototypeDragStartInput, 'pointerId' | 'point'>): void;
|
|
@@ -16,14 +16,25 @@ export interface StoryboardArtboard extends StoryboardBounds {
|
|
|
16
16
|
screenId: string;
|
|
17
17
|
group: string;
|
|
18
18
|
}
|
|
19
|
+
export interface StoryboardPoint {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
}
|
|
19
23
|
export interface StoryboardConnection {
|
|
20
24
|
edge: StoryboardGraphEdge;
|
|
21
25
|
from: StoryboardArtboard;
|
|
22
26
|
to: StoryboardArtboard;
|
|
23
27
|
path: string;
|
|
28
|
+
points: readonly StoryboardPoint[];
|
|
24
29
|
labelX: number;
|
|
25
30
|
labelY: number;
|
|
26
31
|
}
|
|
32
|
+
export interface StoryboardExternalConnection {
|
|
33
|
+
edge: StoryboardGraphEdge;
|
|
34
|
+
frame: StoryboardArtboard;
|
|
35
|
+
page: PageModel;
|
|
36
|
+
direction: 'incoming' | 'outgoing';
|
|
37
|
+
}
|
|
27
38
|
export declare const storyboardFlow: (page: PageModel) => string;
|
|
28
39
|
/** Arrange source-sized screens in flow lanes; never rewrite authored page geometry. */
|
|
29
40
|
export declare function layoutStoryboard(pages: readonly PageModel[]): {
|
|
@@ -38,5 +49,9 @@ export declare function zoomStoryboard(camera: WorkspaceCamera, point: {
|
|
|
38
49
|
y: number;
|
|
39
50
|
}, requested: number): WorkspaceCamera;
|
|
40
51
|
export declare function visibleStoryboardFrames(frames: readonly StoryboardArtboard[], camera: WorkspaceCamera, viewport: StoryboardViewport): StoryboardArtboard[];
|
|
41
|
-
/** A line means an authored transition.
|
|
52
|
+
/** A line means an authored transition. Routing and proximity never create or reorder an edge. */
|
|
42
53
|
export declare function storyboardConnections(frames: readonly StoryboardArtboard[], graph: StoryboardGraph | null): StoryboardConnection[];
|
|
54
|
+
/** Portals expose real endpoints filtered from the canvas, only when available in the active catalog. */
|
|
55
|
+
export declare function storyboardExternalConnections(frames: readonly StoryboardArtboard[], graph: StoryboardGraph | null, pages: readonly PageModel[]): StoryboardExternalConnection[];
|
|
56
|
+
/** Include connector lanes in Overview without changing the authored artboard layout. */
|
|
57
|
+
export declare function storyboardConnectionBounds(bounds: StoryboardBounds, connections: readonly StoryboardConnection[]): StoryboardBounds;
|