@framefields/compositions 0.0.0-stage → 2.0.3

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,2 @@
1
+ import { a as isStaticVisualMedia, c as RenderParams, i as calculateLayerTransform, l as computeRenderParams, n as framesToSeconds, o as resolveLayerDuration, r as secondsToFrames, s as CropRegion, t as formatTimecode, u as getFontUrl } from "./timing-CHy-6wsp.mjs";
2
+ export { CropRegion, RenderParams, calculateLayerTransform, computeRenderParams, formatTimecode, framesToSeconds, getFontUrl, isStaticVisualMedia, resolveLayerDuration, secondsToFrames };
@@ -0,0 +1,3 @@
1
+ import { a as framesToSeconds, c as getFontUrl, i as formatTimecode, n as isStaticVisualMedia, o as secondsToFrames, r as resolveLayerDuration, s as computeRenderParams, t as calculateLayerTransform } from "./layer-logic-DBs4NHoi.mjs";
2
+
3
+ export { calculateLayerTransform, computeRenderParams, formatTimecode, framesToSeconds, getFontUrl, isStaticVisualMedia, resolveLayerDuration, secondsToFrames };
@@ -0,0 +1,53 @@
1
+ import { ExtendedLayer, VirtualMediaData } from "@framefields/core";
2
+
3
+ //#region src/utils/apply-operations.d.ts
4
+ type CropRegion = {
5
+ leftPct: number;
6
+ topPct: number;
7
+ widthPct: number;
8
+ heightPct: number;
9
+ };
10
+ type RenderParams = {
11
+ sourceUrl: string | undefined;
12
+ trimStartSec: number;
13
+ trimEndSec: number | null;
14
+ speed: number;
15
+ cropRegion: CropRegion | null;
16
+ flipH: boolean;
17
+ flipV: boolean;
18
+ rotation: number;
19
+ effectiveDurationSec: number;
20
+ mimeType: string | null;
21
+ };
22
+ declare function getFontUrl(name: string): string;
23
+ /**
24
+ * Compute render parameters for the CURRENT node only — does NOT recurse into
25
+ * children. Each node in the VirtualMedia tree is responsible for exactly its
26
+ * own operation; `SingleClipComposition` drives traversal via React recursion.
27
+ *
28
+ * This is the correct function to use inside the renderer.
29
+ */
30
+ declare function computeRenderParams(vv: VirtualMediaData): RenderParams;
31
+ //#endregion
32
+ //#region src/utils/layer-logic.d.ts
33
+ declare const isStaticVisualMedia: (type?: string) => boolean;
34
+ declare const resolveLayerDuration: (layerDurationInMS?: number, metaDurationMs?: number, defaultDuration?: number, type?: string) => number;
35
+ declare const calculateLayerTransform: (layer: ExtendedLayer, frame: number, fps: number, viewport: {
36
+ w: number;
37
+ h: number;
38
+ }) => {
39
+ x: number;
40
+ y: number;
41
+ scale: number;
42
+ rotation: number;
43
+ opacity: number;
44
+ volume: number;
45
+ };
46
+ //#endregion
47
+ //#region src/utils/timing.d.ts
48
+ declare function framesToSeconds(frames: number, fps: number): number;
49
+ declare function secondsToFrames(seconds: number, fps: number): number;
50
+ declare function formatTimecode(seconds: number): string;
51
+ //#endregion
52
+ export { isStaticVisualMedia as a, RenderParams as c, calculateLayerTransform as i, computeRenderParams as l, framesToSeconds as n, resolveLayerDuration as o, secondsToFrames as r, CropRegion as s, formatTimecode as t, getFontUrl as u };
53
+ //# sourceMappingURL=timing-CHy-6wsp.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timing-CHy-6wsp.d.mts","names":[],"sources":["../src/utils/apply-operations.ts","../src/utils/layer-logic.ts","../src/utils/timing.ts"],"sourcesContent":[],"mappings":";;;KAOY,UAAA;;EAAA,MAAA,EAAA,MAAU;EAOV,QAAA,EAAA,MAAY;EAgBR,SAAA,EAAA,MAAU;AAc1B,CAAA;KA9BY,YAAA;;;ECVC,UAAA,EAAA,MAAA,GAAA,IACyC;EAEzC,KAAA,EAAA,MAAA;EAoBA,UAAA,EDRA,UCQA,GAAA,IA+FZ;;;;EC1He,oBAAe,EAAA,MAAA;EAIf,QAAA,EAAA,MAAA,GAAe,IAAA;AAI/B,CAAA;iBFsBgB,UAAA;;;;;;;;iBAcA,mBAAA,KAAwB,mBAAmB;;;cCxC9C;cAGA;ADAD,cCoBC,uBDpBS,EAAA,CAAA,KAAA,ECqBd,aDrBc,EAAA,KAAA,EAAA,MAAA,EAAA,GAAA,EAAA,MAAA,EAAA,QAAA,EAAA;EAOV,CAAA,EAAA,MAAA;EAgBI,CAAA,EAAA,MAAA;AAchB,CAAA,EAAA,GAAgB;;;;ECxCH,QAAA,EAAA,MAAA;EAGA,OAAA,EAAA,MAAA;EAoBA,MAAA,EAAA,MAAA;;;;iBC3BG,eAAA;iBAIA,eAAA;iBAIA,cAAA"}
package/package.json CHANGED
@@ -1,6 +1,66 @@
1
1
  {
2
2
  "name": "@framefields/compositions",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "2.0.3",
4
+ "private": false,
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "license": "Apache-2.0",
8
+ "module": "./dist/index.mjs",
9
+ "types": "./dist/index.d.mts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.mts",
13
+ "development": "./src/index.ts",
14
+ "import": "./dist/index.mjs",
15
+ "default": "./dist/index.mjs"
16
+ },
17
+ "./program": {
18
+ "types": "./dist/program/index.d.mts",
19
+ "development": "./src/program/index.ts",
20
+ "import": "./dist/program/index.mjs",
21
+ "default": "./dist/program/index.mjs"
22
+ },
23
+ "./server": {
24
+ "types": "./dist/server.d.mts",
25
+ "development": "./src/server.ts",
26
+ "import": "./dist/server.mjs",
27
+ "default": "./dist/server.mjs"
28
+ }
29
+ },
30
+ "files": [
31
+ "dist/**"
32
+ ],
33
+ "devDependencies": {
34
+ "@webgpu/types": "^0.1.70",
35
+ "dotenv": "^16.4.5",
36
+ "tsdown": "^0.19.0",
37
+ "tsx": "^4.20.3",
38
+ "typescript": "^5.8.3",
39
+ "vitest": "^4.1.5",
40
+ "webgpu": "^0.4.0",
41
+ "@framefields/core": "2.0.3",
42
+ "@framefields/client-utils": "2.0.3",
43
+ "@framefields/tsconfig": "2.0.3",
44
+ "@framefields/server-utils": "2.0.3"
45
+ },
46
+ "peerDependencies": {
47
+ "mediabunny": "*",
48
+ "zod": "^4.3.6"
49
+ },
50
+ "dependencies": {
51
+ "@mediabunny/mp3-encoder": "^1.51.0",
52
+ "yoga-layout": "^3.2.1",
53
+ "@framefields/node-sdk": "2.0.3",
54
+ "@framefields/webgpu-renderers": "2.0.3",
55
+ "@framefields/renderers": "2.0.3"
56
+ },
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
60
+ "scripts": {
61
+ "build": "tsdown",
62
+ "dev": "tsdown --watch",
63
+ "test": "vitest run",
64
+ "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
65
+ }
6
66
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
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.