@hyperframes/parsers 0.7.59 → 0.7.61
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/assetResolution.d.ts +19 -0
- package/dist/assetResolution.js +87 -0
- package/dist/assetResolution.js.map +1 -0
- package/dist/composition.d.ts +3 -2
- package/dist/composition.js +299 -1
- package/dist/composition.js.map +1 -1
- package/dist/compositionContract.d.ts +77 -0
- package/dist/compositionContract.js +282 -0
- package/dist/compositionContract.js.map +1 -0
- package/dist/ffBinaries.d.ts +30 -0
- package/dist/ffBinaries.js +98 -0
- package/dist/ffBinaries.js.map +1 -0
- package/dist/gsapParser.d.ts +3 -3
- package/dist/gsapParserAcorn.d.ts +3 -3
- package/dist/gsapParserExports.d.ts +2 -2
- package/dist/{gsapSerialize-CTPaxKTV.d.ts → gsapSerialize-cLD37cjI.d.ts} +1 -1
- package/dist/gsapWriterAcorn.d.ts +2 -2
- package/dist/index.d.ts +21 -4
- package/dist/index.js +338 -28
- package/dist/index.js.map +1 -1
- package/dist/{types-CaeOJXdW.d.ts → types-ewozML_N.d.ts} +43 -1
- package/package.json +14 -2
|
@@ -42,6 +42,48 @@ declare const VALID_CANVAS_RESOLUTIONS: readonly CanvasResolution[];
|
|
|
42
42
|
* can produce their own "invalid" UX (CLI exit, route validation, etc.).
|
|
43
43
|
*/
|
|
44
44
|
declare function normalizeResolutionFlag(input: string | undefined): CanvasResolution | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* True when `input` names a resolution *tier* without nailing an orientation
|
|
47
|
+
* (`1080p`, `hd`, `4k`, `uhd`). Case-insensitive.
|
|
48
|
+
*
|
|
49
|
+
* The `--resolution` CLI flag treats these as "target this size; keep the
|
|
50
|
+
* composition's orientation" — a portrait 1080×1920 comp with `--resolution
|
|
51
|
+
* 1080p` should land at 1080×1920, not blow up on aspect mismatch. Explicit
|
|
52
|
+
* canonical presets (`landscape`, `portrait`, …) and orientation-suffixed
|
|
53
|
+
* aliases (`1080p-portrait`) stay strict — the user picked an orientation.
|
|
54
|
+
*
|
|
55
|
+
* Consumers pair this signal with the composition's dimensions (in a
|
|
56
|
+
* follow-up pass after HTML parse) to pick the right preset via
|
|
57
|
+
* `suggestMatchingPreset` — see `adaptAspectAgnosticResolution` in the
|
|
58
|
+
* compile stage (`@hyperframes/producer`) for the canonical remap.
|
|
59
|
+
*/
|
|
60
|
+
declare function isAspectAgnosticResolutionAlias(input: string | undefined): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Public-boundary helper: given a raw `--resolution` / `--output-resolution`
|
|
63
|
+
* flag value, return the pair every distributed render entrypoint needs to
|
|
64
|
+
* forward end-to-end so the compile stage can adapt aspect-agnostic aliases
|
|
65
|
+
* to the composition's orientation:
|
|
66
|
+
*
|
|
67
|
+
* - `outputResolution`: normalized {@link CanvasResolution} (or `undefined`
|
|
68
|
+
* for unknown values — callers own their invalid-input UX).
|
|
69
|
+
* - `outputResolutionAspectAgnostic`: `true` when the raw input was a
|
|
70
|
+
* tier-only alias (`1080p` / `hd` / `4k` / `uhd`). Passes through to
|
|
71
|
+
* `DistributedRenderConfig.outputResolutionAspectAgnostic` so the compile
|
|
72
|
+
* stage remaps `landscape` → `portrait` / `square` when the composition
|
|
73
|
+
* dimensions demand it.
|
|
74
|
+
*
|
|
75
|
+
* Exported to centralize the two-step pattern (`normalizeResolutionFlag` +
|
|
76
|
+
* `isAspectAgnosticResolutionAlias`) that would otherwise be duplicated at
|
|
77
|
+
* every entrypoint that emits a `DistributedRenderConfig` (`hyperframes
|
|
78
|
+
* cloudrun render`, `hyperframes lambda render` / `render-batch`, the local
|
|
79
|
+
* CLI). Divergence between those callers is what shipped the portrait-1080p
|
|
80
|
+
* regression this helper prevents from recurring.
|
|
81
|
+
*/
|
|
82
|
+
interface ResolvedResolutionFlag {
|
|
83
|
+
outputResolution: CanvasResolution | undefined;
|
|
84
|
+
outputResolutionAspectAgnostic: boolean;
|
|
85
|
+
}
|
|
86
|
+
declare function resolveResolutionFlagPair(input: string | undefined): ResolvedResolutionFlag;
|
|
45
87
|
interface TimelineElementBase {
|
|
46
88
|
id: string;
|
|
47
89
|
type: TimelineElementType;
|
|
@@ -370,4 +412,4 @@ interface StageZoomKeyframe {
|
|
|
370
412
|
}
|
|
371
413
|
declare function getDefaultStageZoom(resolution: CanvasResolution): StageZoom;
|
|
372
414
|
|
|
373
|
-
export { type AddElementData as A, type BooleanVariable as B, type CompositionVariable as C, DEFAULT_DURATIONS as D, type ElementKeyframes as E, type FontVariable as F,
|
|
415
|
+
export { type AddElementData as A, type BooleanVariable as B, type CompositionVariable as C, DEFAULT_DURATIONS as D, type ElementKeyframes as E, type FontVariable as F, isTextElement as G, normalizeResolutionFlag as H, type ImageVariable as I, resolveResolutionFlagPair as J, type Keyframe as K, type MediaElementType as M, type NumberVariable as N, type PlayerAPI as P, type ResolvedResolutionFlag as R, type StageZoomKeyframe as S, type TimelineElement as T, type ValidationResult as V, type WaveformData as W, type CanvasResolution as a, type Asset as b, CANVAS_DIMENSIONS as c, COMPOSITION_VARIABLE_TYPES as d, type ColorVariable as e, type CompositionAPI as f, type CompositionAsset as g, type CompositionSpec as h, type CompositionVariableBase as i, type CompositionVariableType as j, type EnumVariable as k, type KeyframeProperties as l, type MediaFile as m, type StageZoom as n, type StringVariable as o, TIMELINE_COLORS as p, type TimelineCompositionElement as q, type TimelineElementBase as r, type TimelineElementType as s, type TimelineMediaElement as t, type TimelineTextElement as u, VALID_CANVAS_RESOLUTIONS as v, getDefaultStageZoom as w, isAspectAgnosticResolutionAlias as x, isCompositionElement as y, isMediaElement as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/parsers",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.61",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/heygen-com/hyperframes",
|
|
@@ -60,9 +60,21 @@
|
|
|
60
60
|
"import": "./dist/composition.js",
|
|
61
61
|
"types": "./dist/composition.d.ts"
|
|
62
62
|
},
|
|
63
|
+
"./composition-contract": {
|
|
64
|
+
"import": "./dist/compositionContract.js",
|
|
65
|
+
"types": "./dist/compositionContract.d.ts"
|
|
66
|
+
},
|
|
63
67
|
"./sub-composition-validity": {
|
|
64
68
|
"import": "./dist/subCompositionValidity.js",
|
|
65
69
|
"types": "./dist/subCompositionValidity.d.ts"
|
|
70
|
+
},
|
|
71
|
+
"./ff-binaries": {
|
|
72
|
+
"import": "./dist/ffBinaries.js",
|
|
73
|
+
"types": "./dist/ffBinaries.d.ts"
|
|
74
|
+
},
|
|
75
|
+
"./asset-resolution": {
|
|
76
|
+
"import": "./dist/assetResolution.js",
|
|
77
|
+
"types": "./dist/assetResolution.d.ts"
|
|
66
78
|
}
|
|
67
79
|
},
|
|
68
80
|
"publishConfig": {
|
|
@@ -82,7 +94,7 @@
|
|
|
82
94
|
"tsx": "^4.21.0",
|
|
83
95
|
"typescript": "^5.0.0",
|
|
84
96
|
"vitest": "^3.2.4",
|
|
85
|
-
"@hyperframes/core": "0.7.
|
|
97
|
+
"@hyperframes/core": "0.7.61"
|
|
86
98
|
},
|
|
87
99
|
"scripts": {
|
|
88
100
|
"build": "tsup",
|