@hyperframes/core 0.8.160 → 0.8.162

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.
Files changed (52) hide show
  1. package/dist/adapters/gsap.d.ts +1 -1
  2. package/dist/adapters/index.d.ts +3 -3
  3. package/dist/audioAnalysis.d.ts +7 -5
  4. package/dist/audioAnalysis.js +1 -1
  5. package/dist/audioResample.d.ts +2 -0
  6. package/dist/audioResample.js +37 -0
  7. package/dist/audioRhythm.d.ts +7 -9
  8. package/dist/audioRhythm.js +145 -49
  9. package/dist/audioSections.d.ts +3 -3
  10. package/dist/audioSections.js +14 -6
  11. package/dist/beats/beatDetection.d.ts +6 -8
  12. package/dist/beats/beatDetection.js +25 -217
  13. package/dist/colorGrading.d.ts +3 -3
  14. package/dist/compiler/htmlBundler.d.ts +2 -2
  15. package/dist/compiler/index.d.ts +19 -19
  16. package/dist/compiler/inlineSubCompositions.d.ts +4 -4
  17. package/dist/compiler/svgIdNamespacing.d.ts +1 -1
  18. package/dist/figma/assetSnippet.d.ts +1 -1
  19. package/dist/figma/client.d.ts +1 -1
  20. package/dist/figma/emitTimelineScript.d.ts +1 -1
  21. package/dist/figma/index.d.ts +22 -22
  22. package/dist/figma/manifest.d.ts +1 -1
  23. package/dist/figma/motionContextToDocs.d.ts +1 -1
  24. package/dist/figma/motionEase.d.ts +1 -1
  25. package/dist/figma/motionToGsap.d.ts +1 -1
  26. package/dist/figma/nodeDocument.d.ts +1 -1
  27. package/dist/figma/nodeToHtml.d.ts +3 -3
  28. package/dist/figma/parseFigmaRef.d.ts +1 -1
  29. package/dist/figma/resolveBindings.d.ts +2 -2
  30. package/dist/figma/tokensToVariables.d.ts +2 -2
  31. package/dist/generators/hyperframes.d.ts +1 -1
  32. package/dist/index.d.ts +37 -37
  33. package/dist/inline-scripts/hyperframe.d.ts +1 -1
  34. package/dist/projects.d.ts +1 -1
  35. package/dist/runtime/bridge.d.ts +2 -2
  36. package/dist/runtime/clipTree.d.ts +1 -1
  37. package/dist/runtime/compositionLength.d.ts +2 -2
  38. package/dist/runtime/mediaVolumeEnvelope.d.ts +1 -1
  39. package/dist/runtime/playbackRate.d.ts +1 -1
  40. package/dist/runtime/startResolver.d.ts +3 -3
  41. package/dist/runtime/state.d.ts +3 -3
  42. package/dist/runtime/timeline.d.ts +2 -2
  43. package/dist/runtime/timelineDuration.d.ts +1 -1
  44. package/dist/runtime/types.d.ts +2 -2
  45. package/dist/runtime/validateVariables.d.ts +1 -1
  46. package/dist/templates/base.d.ts +1 -1
  47. package/dist/vfx/refs/displacementMap.d.ts +1 -1
  48. package/dist/vfx/refs/fractalNoise.d.ts +1 -1
  49. package/dist/vfx/refs/lumaMatte.d.ts +1 -1
  50. package/dist/vfx/refs/noise.d.ts +1 -1
  51. package/dist/vfx/refs/waveWarp.d.ts +1 -1
  52. package/package.json +5 -6
@@ -1,28 +1,5 @@
1
- let bpmDetectivePromise = null;
2
- const defaultBpmDetectiveImport = () =>
3
- // @ts-ignore -- no type declarations for bpm-detective
4
- import("bpm-detective");
5
- export function loadBpmDetective(importFn = defaultBpmDetectiveImport) {
6
- const useCache = importFn === defaultBpmDetectiveImport;
7
- if (useCache && bpmDetectivePromise) {
8
- return bpmDetectivePromise;
9
- }
10
- const promise = importFn()
11
- .then((m) => (m.default ?? m) || null)
12
- .catch(() => {
13
- // Reset the cached promise so a transient import failure can be retried
14
- // on the next call instead of being cached as null for the session.
15
- if (useCache)
16
- bpmDetectivePromise = null;
17
- return null;
18
- });
19
- if (useCache) {
20
- bpmDetectivePromise = promise;
21
- }
22
- return promise;
23
- }
24
- const WINDOW_SIZE = 1024;
25
- const HOP_SIZE = 512;
1
+ import { energyMix } from "../audioAnalysis.js";
2
+ import { bandFramesOf, rhythm, tempoOf } from "../audioRhythm.js";
26
3
  const STRENGTH_WINDOW_S = 0.05; // ±50ms RMS window
27
4
  /** Local RMS amplitude at a given audio-file time. */
28
5
  export function computeRmsAt(channelData, sampleRate, time) {
@@ -43,208 +20,39 @@ export function strengthAtTime(analysis, time) {
43
20
  return 0.5;
44
21
  return Math.min(1, computeRmsAt(analysis.channelData, analysis.sampleRate, time) / analysis.peak);
45
22
  }
46
- // fallow-ignore-next-line complexity
47
- export async function detectBeats(audioBuffer) {
48
- const channelData = audioBuffer.getChannelData(0);
49
- const sampleRate = audioBuffer.sampleRate;
50
- const energies = [];
51
- for (let i = 0; i < channelData.length - WINDOW_SIZE; i += HOP_SIZE) {
52
- let sum = 0;
53
- for (let j = 0; j < WINDOW_SIZE; j++) {
54
- const sample = channelData[i + j];
55
- sum += sample * sample;
56
- }
57
- energies.push(sum / WINDOW_SIZE);
58
- }
59
- const beats = [];
60
- const localWindowSize = 20;
61
- for (let i = localWindowSize; i < energies.length - localWindowSize; i++) {
62
- let localMean = 0;
63
- for (let j = i - localWindowSize; j < i + localWindowSize; j++) {
64
- localMean += energies[j];
65
- }
66
- localMean /= localWindowSize * 2;
67
- const threshold = localMean * 1.5;
68
- const current = energies[i];
69
- if (current > threshold &&
70
- current > (energies[i - 1] ?? 0) &&
71
- current > (energies[i + 1] ?? 0)) {
72
- const timeInSeconds = (i * HOP_SIZE) / sampleRate;
73
- if (beats.length === 0 || timeInSeconds - beats[beats.length - 1] > 0.1) {
74
- beats.push(Math.round(timeInSeconds * 1000) / 1000);
75
- }
76
- }
77
- }
78
- return beats;
79
- }
80
- function computeBpmFromBeats(beatTimes) {
81
- if (beatTimes.length < 4)
82
- return null;
83
- const iois = [];
84
- for (let i = 1; i < beatTimes.length; i++) {
85
- iois.push(beatTimes[i] - beatTimes[i - 1]);
86
- }
87
- const sorted = [...iois].sort((a, b) => a - b);
88
- const mid = Math.floor(sorted.length / 2);
89
- const medianIoi = sorted.length % 2 === 0 ? (sorted[mid - 1] + sorted[mid]) / 2 : sorted[mid];
90
- if (medianIoi <= 0)
91
- return null;
92
- return Math.round((60 / medianIoi) * 10) / 10;
93
- }
94
- // Fold into 60–120 for octave-safe BPM comparison
95
- function canonicalizeBpm(bpm) {
96
- let b = bpm;
97
- while (b > 120)
98
- b /= 2;
99
- while (b < 60)
100
- b *= 2;
101
- return b;
102
- }
103
- // Pick the *2/÷2 octave of `bpm` whose beat interval is closest to the onset
104
- // pulse, so a half-time detective reading (e.g. 174 for an 87bpm song) doesn't
105
- // produce a double-density grid.
106
- function octaveAlignBpm(bpm, reference) {
107
- const candidates = [bpm / 2, bpm, bpm * 2];
108
- let best = bpm;
109
- let bestDist = Number.POSITIVE_INFINITY;
110
- for (const c of candidates) {
111
- if (c <= 0)
112
- continue;
113
- const dist = Math.abs(c - reference);
114
- if (dist < bestDist) {
115
- bestDist = dist;
116
- best = c;
117
- }
118
- }
119
- return best;
120
- }
121
- // fallow-ignore-next-line complexity
122
- function regularizeBeats(rawBeats, bpm, duration) {
123
- if (rawBeats.length === 0 || bpm <= 0 || duration <= 0)
124
- return rawBeats;
125
- const beatInterval = 60 / bpm;
126
- // Guard against a pathological (octave-misread) tempo producing a millisecond
127
- // interval → tens of thousands of grid beats that freeze the timeline. 480 BPM
128
- // (0.125s) is well above any real music tempo; bail to the raw onsets instead.
129
- if (beatInterval < 0.125)
130
- return rawBeats;
131
- const threshold = beatInterval * 0.25;
132
- // Find phase offset that maximally aligns with raw onsets
133
- let bestOffset = 0;
134
- let bestScore = -1;
135
- for (const anchor of rawBeats.slice(0, 10)) {
136
- const offset = ((anchor % beatInterval) + beatInterval) % beatInterval;
137
- let score = 0;
138
- for (const rb of rawBeats) {
139
- const phase = ((rb % beatInterval) + beatInterval) % beatInterval;
140
- const dist = Math.min(Math.abs(phase - offset), beatInterval - Math.abs(phase - offset));
141
- if (dist < threshold)
142
- score++;
143
- }
144
- if (score > bestScore) {
145
- bestScore = score;
146
- bestOffset = offset;
147
- }
148
- }
149
- const beats = [];
150
- for (let t = bestOffset; t <= duration + 0.001; t += beatInterval) {
151
- beats.push(Math.round(t * 1000) / 1000);
152
- }
153
- return beats;
154
- }
155
- // Drop beats that fall in silent/near-silent regions (e.g. intro/outro) and
156
- // score each surviving beat's loudness (local RMS / peak) for brightness.
157
- function gateBeatsBySilence(beats, channelData, sampleRate) {
158
- if (beats.length === 0)
159
- return { times: beats, strengths: [], peak: 1e-6 };
160
- const energies = beats.map((t) => computeRmsAt(channelData, sampleRate, t));
23
+ /** At or above this the tempo is reported as "high" confidence. */
24
+ const HIGH_CONFIDENCE = 0.35;
25
+ /** Each beat's local RMS against the loudest beat's, and that loudest RMS. */
26
+ function beatStrengths(beats, levels, sampleRate) {
27
+ const energies = beats.map((t) => computeRmsAt(levels, sampleRate, t));
161
28
  const peak = Math.max(...energies, 1e-6);
162
- const threshold = peak * 0.12;
163
- const times = [];
164
- const strengths = [];
165
- for (let i = 0; i < beats.length; i++) {
166
- if (energies[i] >= threshold) {
167
- times.push(beats[i]);
168
- strengths.push(Math.min(1, energies[i] / peak));
169
- }
170
- }
171
- return { times, strengths, peak };
29
+ return { strengths: energies.map((e) => Math.min(1, e / peak)), peak };
172
30
  }
173
- // fallow-ignore-next-line complexity
174
- export async function analyzeMusicFromBuffer(audioBuffer, { pause } = {}) {
175
- const channelData = audioBuffer.getChannelData(0);
176
- const sampleRate = audioBuffer.sampleRate;
177
- const duration = audioBuffer.duration;
31
+ /** Beats, tempo and per-beat strength of decoded audio; no beats and a null bpm when it has no steady beat. */
32
+ export async function analyzeMusicFromSignal(signal, { pause } = {}) {
178
33
  await pause?.();
179
- const rawBeats = await detectBeats(audioBuffer);
180
- const onsetBpm = computeBpmFromBeats(rawBeats);
181
- let detectiveBpm = null;
182
- const detect = await loadBpmDetective();
34
+ bandFramesOf(signal);
183
35
  await pause?.();
184
- try {
185
- if (detect)
186
- detectiveBpm = detect(audioBuffer);
187
- }
188
- catch {
189
- // Not enough peaks or browser context unavailable
190
- }
191
- let bpm = onsetBpm;
192
- let confidence = "uncertain";
193
- let regularizeBpm = null;
194
- if (onsetBpm !== null && detectiveBpm !== null) {
195
- const pctDiff = Math.abs(canonicalizeBpm(onsetBpm) - canonicalizeBpm(detectiveBpm)) /
196
- canonicalizeBpm(detectiveBpm);
197
- if (pctDiff < 0.05) {
198
- // Detective folds tempo into 90–180; re-pick the octave nearest the onset
199
- // pulse so a half-time track isn't gridded at double density.
200
- bpm = octaveAlignBpm(detectiveBpm, onsetBpm);
201
- confidence = "high";
202
- regularizeBpm = bpm;
203
- }
204
- else if (pctDiff < 0.1) {
205
- bpm = Math.round((onsetBpm + detectiveBpm) / 2);
206
- confidence = "low";
207
- regularizeBpm = bpm;
208
- }
209
- else {
210
- bpm = onsetBpm;
211
- confidence = "uncertain";
212
- }
213
- }
214
- else if (onsetBpm !== null) {
215
- bpm = onsetBpm;
216
- confidence = "low";
217
- regularizeBpm = onsetBpm;
218
- }
219
- else if (detectiveBpm !== null) {
220
- bpm = detectiveBpm;
221
- confidence = "low";
222
- regularizeBpm = detectiveBpm;
223
- }
36
+ const { beats } = rhythm(signal);
224
37
  await pause?.();
225
- const gridBeats = regularizeBpm !== null ? regularizeBeats(rawBeats, regularizeBpm, duration) : rawBeats;
226
- const gated = gateBeatsBySilence(gridBeats, channelData, sampleRate);
38
+ const channelData = energyMix(signal);
39
+ const confidence = beats.confidence ?? 0;
40
+ const times = beats.times;
41
+ const { strengths, peak } = beatStrengths(times, channelData, signal.sampleRate);
42
+ const bpm = tempoOf(times).value;
227
43
  return {
228
- beatTimes: gated.times,
229
- beatStrengths: gated.strengths,
44
+ beatTimes: times,
45
+ beatStrengths: strengths,
230
46
  bpm,
231
- bpmConfidence: confidence,
47
+ bpmConfidence: bpm === null ? "uncertain" : confidence >= HIGH_CONFIDENCE ? "high" : "low",
232
48
  channelData,
233
- sampleRate,
234
- peak: gated.peak,
49
+ sampleRate: signal.sampleRate,
50
+ peak,
235
51
  };
236
52
  }
237
- export async function detectBeatsFromUrl(url) {
238
- const audioContext = new AudioContext();
239
- try {
240
- const response = await fetch(url);
241
- const arrayBuffer = await response.arrayBuffer();
242
- const audioBuffer = await audioContext.decodeAudioData(arrayBuffer);
243
- return detectBeats(audioBuffer);
244
- }
245
- finally {
246
- await audioContext.close();
247
- }
53
+ export function analyzeMusicFromBuffer(audioBuffer, options = {}) {
54
+ const channels = Array.from({ length: audioBuffer.numberOfChannels }, (_, c) => audioBuffer.getChannelData(c));
55
+ return analyzeMusicFromSignal({ sampleRate: audioBuffer.sampleRate, channels }, options);
248
56
  }
249
57
  export async function analyzeMusicFromUrl(url, options = {}) {
250
58
  const audioContext = new AudioContext();
@@ -1,7 +1,7 @@
1
- import type { HfColorCurvePoint, HfHueCurvePoint } from "./colorGradingCurves";
1
+ import type { HfColorCurvePoint, HfHueCurvePoint } from "./colorGradingCurves.js";
2
2
  import { COLOR_GRADING_ADJUST_KEYS, COLOR_GRADING_CURVE_KEYS, COLOR_GRADING_DETAIL_KEYS, COLOR_GRADING_EFFECT_KEYS, COLOR_GRADING_HUE_CURVE_KEYS, COLOR_GRADING_WHEEL_KEYS } from "@hyperframes/parsers/color-grading-contract";
3
- export type { HfColorCurvePoint, HfHueCurvePoint } from "./colorGradingCurves";
4
- export { compileHfColorCurve, compileHfHueCurve, HF_COLOR_CURVE_MAX_POINTS, } from "./colorGradingCurves";
3
+ export type { HfColorCurvePoint, HfHueCurvePoint } from "./colorGradingCurves.js";
4
+ export { compileHfColorCurve, compileHfHueCurve, HF_COLOR_CURVE_MAX_POINTS, } from "./colorGradingCurves.js";
5
5
  export declare const HF_COLOR_GRADING_ATTR = "data-color-grading";
6
6
  /** Set on a graded source while its pixels render on the grading canvas. */
7
7
  export declare const COLOR_GRADING_SOURCE_HIDDEN_ATTR = "data-hf-color-grading-source-hidden";
@@ -1,5 +1,5 @@
1
- export { FLATTENED_INNER_ROOT_STRIP_ATTRS } from "../runtime/flattenedRoot";
2
- import { type MediaDurationProber } from "./htmlCompiler";
1
+ export { FLATTENED_INNER_ROOT_STRIP_ATTRS } from "../runtime/flattenedRoot.js";
2
+ import { type MediaDurationProber } from "./htmlCompiler.js";
3
3
  export type BundledHostCompositionIdentity = {
4
4
  authoredCompositionId: string | null;
5
5
  runtimeCompositionId: string | null;
@@ -1,19 +1,19 @@
1
- export { resolveTimings, type WordTiming, type ElementAnchor, type AuthoredTiming, type ResolvedTiming, type ResolveTimingsInput, type ResolveTimingsResult, } from "./timingResolver";
2
- export { compileTimingAttrs, injectDurations, extractResolvedMedia, clampDurations, shouldClampMediaDuration, shouldClampResolvedMediaDuration, type UnresolvedElement, type ResolvedDuration, type ResolvedMediaElement, type CompilationResult, } from "./timingCompiler";
3
- export { compileHtml, type MediaDurationProber } from "./htmlCompiler";
4
- export { assignBundledRuntimeCompositionIds, type BundledHostCompositionIdentity, bundleToSingleHtml, type BundleOptions, type BundleScriptProvenance, prepareFlattenedInnerRoot, FLATTENED_INNER_ROOT_STRIP_ATTRS, emitRootCompositionVariableStyles, parsesAsScript, } from "./htmlBundler";
5
- export { readDeclaredDefaults, parseHostVariableValues } from "../runtime/getVariables";
6
- export { extractCompiledHtmlParityContract, type CompiledHtmlParityContract, type HtmlParityComposition, type HtmlParityResource, type HtmlParityTimedElement, } from "./htmlParityContract";
7
- export { RUNTIME_BOOTSTRAP_ATTR, injectScriptsAtHeadStart, injectTagsAtHeadStart, injectScriptsIntoHtml, insertBeforeCloseTag, insertRuntimeTag, isRuntimeFileUrl, parseHTMLContent, stripEmbeddedRuntimeScripts, } from "./htmlDocument";
8
- export { addScenePartsManifest } from "./scenePartsManifest";
9
- export { AFTER_FONTS_SCRIPT_TYPE, compositionStyle, cssStyleMergeKey, deferScriptsUntilFonts, headStyleRuns, inlineScriptRuns, styleElementsFor, type CompositionStyle, type InlineScriptRun, } from "./scriptRuns";
10
- export { isJavaScriptType } from "./compositionAssembly";
11
- export { validateHyperframeHtmlContract, type HyperframeStaticFailureReason, type HyperframeStaticGuardResult, } from "./staticGuard";
12
- export { buildVariablesByCompScript, scopeCssToComposition, wrapScopedCompositionScript, } from "./compositionScoping";
13
- export { ensureExternalLinkTag, inlineSubCompositions, type InlineSubCompositionsOptions, type InlineSubCompositionsResult, } from "./inlineSubCompositions";
14
- export { extractStandaloneEntryFromIndex, isTemplateEntry } from "./standaloneEntry";
15
- export { checkSubCompositionUsability, type ParsableDocumentLike, type SubCompositionValidity, type SubCompositionValidityReason, } from "./subCompositionValidity";
16
- export { CSS_URL_RE, PATH_ATTRS, isNonRelativeUrl, isPathInside } from "./assetPaths";
17
- export { AUDIO_GROUP_RENDER_ID_ATTR, MEDIA_RENDER_ID_ATTR, assignMediaRenderIds, } from "./mediaRenderIds";
18
- export { ensureExternalScriptTag } from "./externalScripts";
19
- export { emitMountedModuleScripts } from "./importMaps";
1
+ export { resolveTimings, type WordTiming, type ElementAnchor, type AuthoredTiming, type ResolvedTiming, type ResolveTimingsInput, type ResolveTimingsResult, } from "./timingResolver.js";
2
+ export { compileTimingAttrs, injectDurations, extractResolvedMedia, clampDurations, shouldClampMediaDuration, shouldClampResolvedMediaDuration, type UnresolvedElement, type ResolvedDuration, type ResolvedMediaElement, type CompilationResult, } from "./timingCompiler.js";
3
+ export { compileHtml, type MediaDurationProber } from "./htmlCompiler.js";
4
+ export { assignBundledRuntimeCompositionIds, type BundledHostCompositionIdentity, bundleToSingleHtml, type BundleOptions, type BundleScriptProvenance, prepareFlattenedInnerRoot, FLATTENED_INNER_ROOT_STRIP_ATTRS, emitRootCompositionVariableStyles, parsesAsScript, } from "./htmlBundler.js";
5
+ export { readDeclaredDefaults, parseHostVariableValues } from "../runtime/getVariables.js";
6
+ export { extractCompiledHtmlParityContract, type CompiledHtmlParityContract, type HtmlParityComposition, type HtmlParityResource, type HtmlParityTimedElement, } from "./htmlParityContract.js";
7
+ export { RUNTIME_BOOTSTRAP_ATTR, injectScriptsAtHeadStart, injectTagsAtHeadStart, injectScriptsIntoHtml, insertBeforeCloseTag, insertRuntimeTag, isRuntimeFileUrl, parseHTMLContent, stripEmbeddedRuntimeScripts, } from "./htmlDocument.js";
8
+ export { addScenePartsManifest } from "./scenePartsManifest.js";
9
+ export { AFTER_FONTS_SCRIPT_TYPE, compositionStyle, cssStyleMergeKey, deferScriptsUntilFonts, headStyleRuns, inlineScriptRuns, styleElementsFor, type CompositionStyle, type InlineScriptRun, } from "./scriptRuns.js";
10
+ export { isJavaScriptType } from "./compositionAssembly.js";
11
+ export { validateHyperframeHtmlContract, type HyperframeStaticFailureReason, type HyperframeStaticGuardResult, } from "./staticGuard.js";
12
+ export { buildVariablesByCompScript, scopeCssToComposition, wrapScopedCompositionScript, } from "./compositionScoping.js";
13
+ export { ensureExternalLinkTag, inlineSubCompositions, type InlineSubCompositionsOptions, type InlineSubCompositionsResult, } from "./inlineSubCompositions.js";
14
+ export { extractStandaloneEntryFromIndex, isTemplateEntry } from "./standaloneEntry.js";
15
+ export { checkSubCompositionUsability, type ParsableDocumentLike, type SubCompositionValidity, type SubCompositionValidityReason, } from "./subCompositionValidity.js";
16
+ export { CSS_URL_RE, PATH_ATTRS, isNonRelativeUrl, isPathInside } from "./assetPaths.js";
17
+ export { AUDIO_GROUP_RENDER_ID_ATTR, MEDIA_RENDER_ID_ATTR, assignMediaRenderIds, } from "./mediaRenderIds.js";
18
+ export { ensureExternalScriptTag } from "./externalScripts.js";
19
+ export { emitMountedModuleScripts } from "./importMaps.js";
@@ -1,6 +1,6 @@
1
- import { type ExternalScriptAttributes } from "./externalScripts";
2
- import { type ImportMap } from "./importMaps";
3
- import { type CompositionStyle } from "./scriptRuns";
1
+ import { type ExternalScriptAttributes } from "./externalScripts.js";
2
+ import { type ImportMap } from "./importMaps.js";
3
+ import { type CompositionStyle } from "./scriptRuns.js";
4
4
  /**
5
5
  * Shared sub-composition inlining logic.
6
6
  *
@@ -10,7 +10,7 @@ import { type CompositionStyle } from "./scriptRuns";
10
10
  * divergence that previously caused bugs (e.g. producer not setting
11
11
  * `data-composition-file`).
12
12
  */
13
- import { type AssetExists } from "./rewriteSubCompPaths";
13
+ import { type AssetExists } from "./rewriteSubCompPaths.js";
14
14
  /** Marks each scene whose nodes a script outside it names by selector, id or class: a swap would strand it. */
15
15
  export declare function refuseSwapsReachedByRootScripts(document: Document, rootScripts: string[]): void;
16
16
  export interface InlineSubCompositionsOptions {
@@ -5,7 +5,7 @@
5
5
  * keeps the authored id (otherwise the first element does). Renamed elements retain
6
6
  * data-hf-authored-id for script lookup compatibility.
7
7
  */
8
- import { type SvgReferenceAlias } from "./svgSelectorAliases";
8
+ import { type SvgReferenceAlias } from "./svgSelectorAliases.js";
9
9
  /** Reused from `compositionScoping.ts`'s `AUTHORED_ROOT_ID_ATTR` in spirit —
10
10
  * same purpose (let a renamed id still resolve by its authored name), now
11
11
  * generalized from "the composition root" to any renamed descendant. */
@@ -1,2 +1,2 @@
1
- import type { AssetSnippet, FigmaManifestRecord } from "./types";
1
+ import type { AssetSnippet, FigmaManifestRecord } from "./types.js";
2
2
  export declare function buildAssetSnippet(record: FigmaManifestRecord): AssetSnippet;
@@ -1,4 +1,4 @@
1
- import type { FigmaAssetFormat, FigmaRef } from "./types";
1
+ import type { FigmaAssetFormat, FigmaRef } from "./types.js";
2
2
  /** Typed capability/transport failures per design spec §4.4. */
3
3
  export type FigmaClientErrorCode = "NO_TOKEN" | "BAD_TOKEN" | "FORBIDDEN" | "REQUIRES_ENTERPRISE" | "RATE_LIMITED" | "RENDER_FAILED" | "NODE_NOT_FOUND" | "HTTP_ERROR";
4
4
  export declare class FigmaClientError extends Error {
@@ -1,2 +1,2 @@
1
- import type { TimelineSpec } from "./types";
1
+ import type { TimelineSpec } from "./types.js";
2
2
  export declare function emitTimelineScript(spec: TimelineSpec): string;
@@ -1,22 +1,22 @@
1
- export type * from "./types";
2
- export { createFigmaClient, FigmaClientError } from "./client";
3
- export type { FigmaClient, FigmaClientErrorCode, FigmaClientOptions, FigmaFetch, FigmaFileVersion, FigmaNodeDocument, FigmaStyleMeta, FigmaVariablePayload, FigmaVariablesResult, RenderedNode, RenderNodeOptions, } from "./client";
4
- export { parseFigmaRef } from "./parseFigmaRef";
5
- export { MAX_FREEZE_BYTES, exceedsFreezeCap, freezeBytes, freezeUrl, freezeLocalFile, } from "./freeze";
6
- export { mediaDir, manifestPath, typeDirPath, updateRecord, isFigmaManifestRecord, readManifest, appendRecord, findAllByFigmaNode, findByFigmaNode, nextId, } from "./manifest";
7
- export { regenerateIndex } from "./mediaIndex";
8
- export { buildAssetSnippet } from "./assetSnippet";
9
- export { sanitizeSvg } from "./sanitizeSvg";
10
- export { appendBinding, upsertBindings, findBindingByFigmaId, readBindings, readLibraryMap, recordLibraryFile, } from "./bindings";
11
- export type { FigmaBindingRecord } from "./bindings";
12
- export { figmaColorToCss } from "./color";
13
- export { resolveBindings } from "./resolveBindings";
14
- export type { BindingSite, ResolvedBindingSite, ResolveBindingsResult } from "./resolveBindings";
15
- export { nodeToHtml, slugify } from "./nodeToHtml";
16
- export type { NodeToHtmlResult, RasterizeRequest } from "./nodeToHtml";
17
- export { tokensToVariables } from "./tokensToVariables";
18
- export type { CompositionVariableEntry, FigmaTokenSidecarEntry, FigmaTokensSidecar, TokenSource, TokensToVariablesResult, } from "./tokensToVariables";
19
- export { mapEase } from "./motionEase";
20
- export { motionContextToDocs, type MotionContextResponse, type MotionContextNode, type MotionContextToDocsOptions, } from "./motionContextToDocs";
21
- export { motionToGsap } from "./motionToGsap";
22
- export { emitTimelineScript } from "./emitTimelineScript";
1
+ export type * from "./types.js";
2
+ export { createFigmaClient, FigmaClientError } from "./client.js";
3
+ export type { FigmaClient, FigmaClientErrorCode, FigmaClientOptions, FigmaFetch, FigmaFileVersion, FigmaNodeDocument, FigmaStyleMeta, FigmaVariablePayload, FigmaVariablesResult, RenderedNode, RenderNodeOptions, } from "./client.js";
4
+ export { parseFigmaRef } from "./parseFigmaRef.js";
5
+ export { MAX_FREEZE_BYTES, exceedsFreezeCap, freezeBytes, freezeUrl, freezeLocalFile, } from "./freeze.js";
6
+ export { mediaDir, manifestPath, typeDirPath, updateRecord, isFigmaManifestRecord, readManifest, appendRecord, findAllByFigmaNode, findByFigmaNode, nextId, } from "./manifest.js";
7
+ export { regenerateIndex } from "./mediaIndex.js";
8
+ export { buildAssetSnippet } from "./assetSnippet.js";
9
+ export { sanitizeSvg } from "./sanitizeSvg.js";
10
+ export { appendBinding, upsertBindings, findBindingByFigmaId, readBindings, readLibraryMap, recordLibraryFile, } from "./bindings.js";
11
+ export type { FigmaBindingRecord } from "./bindings.js";
12
+ export { figmaColorToCss } from "./color.js";
13
+ export { resolveBindings } from "./resolveBindings.js";
14
+ export type { BindingSite, ResolvedBindingSite, ResolveBindingsResult } from "./resolveBindings.js";
15
+ export { nodeToHtml, slugify } from "./nodeToHtml.js";
16
+ export type { NodeToHtmlResult, RasterizeRequest } from "./nodeToHtml.js";
17
+ export { tokensToVariables } from "./tokensToVariables.js";
18
+ export type { CompositionVariableEntry, FigmaTokenSidecarEntry, FigmaTokensSidecar, TokenSource, TokensToVariablesResult, } from "./tokensToVariables.js";
19
+ export { mapEase } from "./motionEase.js";
20
+ export { motionContextToDocs, type MotionContextResponse, type MotionContextNode, type MotionContextToDocsOptions, } from "./motionContextToDocs.js";
21
+ export { motionToGsap } from "./motionToGsap.js";
22
+ export { emitTimelineScript } from "./emitTimelineScript.js";
@@ -1,4 +1,4 @@
1
- import type { FigmaManifestRecord } from "./types";
1
+ import type { FigmaManifestRecord } from "./types.js";
2
2
  export declare function mediaDir(projectDir: string): string;
3
3
  export declare function manifestPath(projectDir: string): string;
4
4
  export declare function typeDirPath(projectDir: string, type: FigmaManifestRecord["type"]): string;
@@ -20,7 +20,7 @@
20
20
  * Verification is still mandatory: render and compare against
21
21
  * `export_video` ground truth with skills/figma/scripts/verify-motion.mjs.
22
22
  */
23
- import type { MotionDoc } from "./types";
23
+ import type { MotionDoc } from "./types.js";
24
24
  export interface MotionContextNode {
25
25
  nodeId: string;
26
26
  nodeName: string;
@@ -1,2 +1,2 @@
1
- import type { MappedEase, MotionEase } from "./types";
1
+ import type { MappedEase, MotionEase } from "./types.js";
2
2
  export declare function mapEase(ease: MotionEase): MappedEase;
@@ -1,2 +1,2 @@
1
- import type { MotionDoc, TimelineSpec } from "./types";
1
+ import type { MotionDoc, TimelineSpec } from "./types.js";
2
2
  export declare function motionToGsap(doc: MotionDoc): TimelineSpec;
@@ -1,3 +1,3 @@
1
- import type { FigmaNodeDocument } from "./client";
1
+ import type { FigmaNodeDocument } from "./client.js";
2
2
  /** Typed children of a node document (unknown-shaped entries skipped). */
3
3
  export declare function childDocuments(node: FigmaNodeDocument): FigmaNodeDocument[];
@@ -18,8 +18,8 @@
18
18
  * - visible:false nodes and fills are skipped — figma's own renderer
19
19
  * semantics, not ours.
20
20
  */
21
- import type { FigmaNodeDocument } from "./client";
22
- import type { ResolveBindingsResult } from "./resolveBindings";
21
+ import type { FigmaNodeDocument } from "./client.js";
22
+ import type { ResolveBindingsResult } from "./resolveBindings.js";
23
23
  export interface RasterizeRequest {
24
24
  nodeId: string;
25
25
  name: string;
@@ -29,7 +29,7 @@ export interface NodeToHtmlResult {
29
29
  html: string;
30
30
  rasterize: RasterizeRequest[];
31
31
  }
32
- export { slugify } from "../tokenSlug";
32
+ export { slugify } from "../tokenSlug.js";
33
33
  export interface NodeToHtmlOptions {
34
34
  /** override for the ROOT element's slug/id — variant frames are often all
35
35
  * named "Platform=Desktop", so the caller's --name must reach the DOM id,
@@ -1,2 +1,2 @@
1
- import type { FigmaRef } from "./types";
1
+ import type { FigmaRef } from "./types.js";
2
2
  export declare function parseFigmaRef(input: string): FigmaRef;
@@ -12,8 +12,8 @@
12
12
  * and arrays of alias objects both count; unknown shapes are ignored rather
13
13
  * than guessed at.
14
14
  */
15
- import type { FigmaBindingRecord } from "./bindings";
16
- import type { FigmaNodeDocument } from "./client";
15
+ import type { FigmaBindingRecord } from "./bindings.js";
16
+ import type { FigmaNodeDocument } from "./client.js";
17
17
  export interface BindingSite {
18
18
  nodeId: string;
19
19
  /** boundVariables property ("fills") or style slot prefixed "style:" ("style:text") */
@@ -6,8 +6,8 @@
6
6
  * value (cycle-safe) but the binding records the semantic id the designer
7
7
  * bound, so a swapped primitive doesn't orphan the link.
8
8
  */
9
- import type { FigmaVariablesResult } from "./client";
10
- import type { FigmaBindingRecord } from "./bindings";
9
+ import type { FigmaVariablesResult } from "./client.js";
10
+ import type { FigmaBindingRecord } from "./bindings.js";
11
11
  /** data-composition-variables entry (runtime getVariables contract). */
12
12
  export interface CompositionVariableEntry {
13
13
  id: string;
@@ -1,4 +1,4 @@
1
- import type { TimelineElement, CanvasResolution, Keyframe, StageZoomKeyframe } from "../core.types";
1
+ import type { TimelineElement, CanvasResolution, Keyframe, StageZoomKeyframe } from "../core.types.js";
2
2
  import type { GsapAnimation } from "@hyperframes/parsers";
3
3
  export interface SerializeOptions {
4
4
  /** Trusted animations: __raw: values are emitted as executable JavaScript. */
package/dist/index.d.ts CHANGED
@@ -1,49 +1,49 @@
1
1
  export type { RuntimeTimelineClipIdentity } from "./runtime/types.js";
2
- export type { ExecutionMode, Orientation, Asset, TimelineElement, TimelineElementBase, TimelineMediaElement, TimelineTextElement, TimelineCompositionElement, TimelineElementType, MediaElementType, CanvasResolution, Fps, FpsInput, FpsParseResult, MediaFile, CompositionAPI, PlayerAPI, AddElementData, ValidationResult, CompositionAsset, Keyframe, KeyframeProperties, ElementKeyframes, StageZoom, StageZoomKeyframe, CompositionVariableType, CompositionVariableBase, StringVariable, NumberVariable, ColorVariable, BooleanVariable, EnumVariable, CompositionVariable, CompositionSpec, WaveformData, OutputResolutionCompatibility, OutputResolutionIssueKind, } from "./core.types";
2
+ export type { ExecutionMode, Orientation, Asset, TimelineElement, TimelineElementBase, TimelineMediaElement, TimelineTextElement, TimelineCompositionElement, TimelineElementType, MediaElementType, CanvasResolution, Fps, FpsInput, FpsParseResult, MediaFile, CompositionAPI, PlayerAPI, AddElementData, ValidationResult, CompositionAsset, Keyframe, KeyframeProperties, ElementKeyframes, StageZoom, StageZoomKeyframe, CompositionVariableType, CompositionVariableBase, StringVariable, NumberVariable, ColorVariable, BooleanVariable, EnumVariable, CompositionVariable, CompositionSpec, WaveformData, OutputResolutionCompatibility, OutputResolutionIssueKind, } from "./core.types.js";
3
3
  export type { SlideshowManifest, SlideRef, SlideHotspot, SlideSequence, ResolvedSlide, ResolvedSlideSequence, ResolvedSlideshow, } from "./slideshow/index.js";
4
4
  export { parseSlideshowManifest, resolveSlideshow } from "./slideshow/index.js";
5
5
  export type { AuthoredTimingValue, RawAuthoredTiming, AuthoredTimingWindow, } from "./runtime/authoredTiming.js";
6
6
  export { resolveAuthoredTimingWindow } from "./runtime/authoredTiming.js";
7
- export { CANVAS_DIMENSIONS, VALID_CANVAS_RESOLUTIONS, normalizeResolutionFlag, isAspectAgnosticResolutionAlias, resolveResolutionFlagPair, checkOutputResolutionCompatibility, suggestMatchingPreset, parseFps, parseFpsWithDefault, toFps, fpsToNumber, fpsToFfmpegArg, TIMELINE_COLORS, DEFAULT_DURATIONS, COMPOSITION_VARIABLE_TYPES, isTextElement, isMediaElement, isCompositionElement, getDefaultStageZoom, } from "./core.types";
8
- export { generateBaseHtml, getStageStyles } from "./templates/base";
9
- export { GSAP_CDN, BASE_STYLES, ELEMENT_BASE_STYLES, MEDIA_STYLES, TEXT_STYLES, ZOOM_CONTAINER_STYLES, } from "./templates/constants";
7
+ export { CANVAS_DIMENSIONS, VALID_CANVAS_RESOLUTIONS, normalizeResolutionFlag, isAspectAgnosticResolutionAlias, resolveResolutionFlagPair, checkOutputResolutionCompatibility, suggestMatchingPreset, parseFps, parseFpsWithDefault, toFps, fpsToNumber, fpsToFfmpegArg, TIMELINE_COLORS, DEFAULT_DURATIONS, COMPOSITION_VARIABLE_TYPES, isTextElement, isMediaElement, isCompositionElement, getDefaultStageZoom, } from "./core.types.js";
8
+ export { generateBaseHtml, getStageStyles } from "./templates/base.js";
9
+ export { GSAP_CDN, BASE_STYLES, ELEMENT_BASE_STYLES, MEDIA_STYLES, TEXT_STYLES, ZOOM_CONTAINER_STYLES, } from "./templates/constants.js";
10
10
  export type { GsapAnimation, GsapMethod, ParsedGsap } from "@hyperframes/parsers";
11
11
  export { serializeGsapAnimations, getAnimationsForElementId, validateCompositionGsap, keyframesToGsapAnimations, gsapAnimationsToKeyframes, } from "@hyperframes/parsers";
12
12
  export type { ParsedHtml, CompositionMetadata } from "@hyperframes/parsers";
13
13
  export { parseHtml, updateElementInHtml, addElementToHtml, removeElementFromHtml, validateCompositionHtml, extractCompositionMetadata, } from "@hyperframes/parsers";
14
- export type { SerializeOptions } from "./generators/hyperframes";
15
- export { generateHyperframesHtml, generateGsapTimelineScript, generateHyperframesStyles, } from "./generators/hyperframes";
16
- export type { UnresolvedElement, ResolvedDuration, ResolvedMediaElement, CompilationResult, } from "./compiler/timingCompiler";
17
- export type { WordTiming, ElementAnchor, AuthoredTiming, ResolvedTiming, ResolveTimingsInput, ResolveTimingsResult, } from "./compiler/timingResolver";
18
- export { resolveTimings } from "./compiler/timingResolver";
19
- export { compileTimingAttrs, injectDurations, extractResolvedMedia, clampDurations, shouldClampMediaDuration, shouldClampResolvedMediaDuration, MEDIA_DURATION_CLAMP_EPSILON_SECONDS, } from "./compiler/timingCompiler";
20
- export { AUDIO_GROUP_RENDER_ID_ATTR, MEDIA_RENDER_ID_ATTR, assignMediaRenderIds, } from "./compiler/mediaRenderIds";
21
- export { RENDER_FRAME_ID_PREFIX, RENDER_FRAME_ID_SUFFIX, renderFrameIdForRenderId, } from "./runtime/renderFrameSibling";
22
- export { rewriteAssetPaths, rewriteAssetPath, rewriteCssAssetUrls, rewriteInlineStyleAssetUrls, } from "./compiler/rewriteSubCompPaths";
23
- export { CSS_URL_RE, isNonRelativeUrl, isPathInside } from "./compiler/assetPaths";
24
- export { checkSubCompositionUsability, type ParsableDocumentLike, type SubCompositionValidity, type SubCompositionValidityReason, } from "./compiler/subCompositionValidity";
25
- export { RUNTIME_BOOTSTRAP_ATTR, stripEmbeddedRuntimeScripts } from "./compiler/htmlDocument";
26
- export { COMPOSITION_SOURCE_URL } from "./compiler/scriptRuns";
27
- export { queryByAttr } from "./utils/cssSelector";
28
- export { AUDIBLE_MEDIA_SELECTOR, audibleVideoNeedsWebAudio, isAudibleVideoElement, } from "./audibleVideo";
29
- export { decodeUrlPathVariants } from "./utils/urlPath";
30
- export { clearGifFramesBeforeNext, gifClearsAfterLeavingFrameInPlace, parseAnimatedGifMetadata, type AnimatedGifMetadata, } from "./media/gif";
31
- export { HF_COLOR_GRADING_ATTR, HF_COLOR_GRADING_ADJUST_KEYS, HF_COLOR_GRADING_ACTIVE_EFFECT_KEYS, HF_COLOR_GRADING_ANIMATABLE_PROPERTIES, HF_COLOR_GRADING_CANVAS_ID_PREFIX, HF_COLOR_GRADING_COLOR_SPACE, HF_COLOR_GRADING_CURVE_KEYS, HF_COLOR_GRADING_DETAIL_KEYS, HF_COLOR_GRADING_EFFECT_APPLY_DEFAULTS, HF_COLOR_GRADING_EFFECT_KEYS, HF_COLOR_GRADING_EFFECT_PRESETS, HF_COLOR_GRADING_GRADE_PRESETS, HF_COLOR_GRADING_HUE_CURVE_KEYS, HF_COLOR_GRADING_LUT_KEYS, HF_COLOR_GRADING_PALETTES, HF_COLOR_GRADING_PRESETS, HF_COLOR_GRADING_TOP_LEVEL_KEYS, HF_COLOR_GRADING_WHEEL_KEYS, getHfColorGradingCapabilities, hasHfColorGradingAuthoredValues, isHfColorGradingActive, normalizeHfColorGrading, normalizeHfColorGradingWithVariables, resolveHfColorGradingVariables, serializeHfColorGrading, type HfColorGrading, type HfColorGradingAdjust, type HfColorGradingAdjustKey, type HfColorGradingAnimatablePath, type HfColorGradingActiveEffectKey, type HfColorGradingDetailKey, type HfColorGradingDetails, type HfColorGradingEffectKey, type HfColorGradingEffects, type HfColorGradingLutRef, type HfColorGradingPreset, type HfColorGradingPresetId, type HfColorGradingTarget, type HfColorGradingVariableMap, type HfColorGradingCapabilities, type HfColorGradingCurveKey, type HfColorGradingCurves, type HfColorGradingHueCurveKey, type HfColorGradingHueCurves, type HfColorGradingHueRange, type HfColorGradingSecondary, type HfColorGradingSecondaryCorrection, type HfColorGradingSoftRange, type HfColorGradingTonalWheel, type HfColorGradingWheelKey, type HfColorGradingWheels, type HfColorCurvePoint, type HfHueCurvePoint, type NormalizedHfColorGrading, type NormalizedHfColorGradingCurves, type NormalizedHfColorGradingHueCurves, type NormalizedHfColorGradingSecondary, type NormalizedHfColorGradingWheels, type ResolvedHfColorGrading, } from "./colorGrading";
32
- export { parseCubeLut, CubeLutParseError, type ParseCubeLutOptions } from "./colorLuts";
33
- export { firstFrameColourArgs, hdrToSdrToneMapFilter, parseFirstFrameColour, type ToneMapSourceColour, } from "./hdrToneMap";
34
- export { PREVIEW_PROXY_BOX_PARAM, formatPreviewProxyBox, parsePreviewProxyBox, type PreviewProxyBox, } from "./previewProxyBox";
35
- export { HYPERFRAME_RUNTIME_ARTIFACTS, HYPERFRAME_RUNTIME_CONTRACT, loadHyperframeRuntimeSource, type HyperframeRuntimeContract, } from "./inline-scripts/hyperframe";
36
- export { HYPERFRAME_RUNTIME_GLOBALS, HYPERFRAME_BRIDGE_SOURCES, HYPERFRAME_CONTROL_ACTIONS, type HyperframeControlAction, } from "./inline-scripts/runtimeContract";
37
- export { getHyperframeRuntimeScript } from "./generated/runtime-inline";
38
- export { buildHyperframesRuntimeScript, type HyperframesRuntimeBuildOptions, } from "./inline-scripts/hyperframesRuntime.engine";
39
- export { MEDIA_VISUAL_STYLE_PROPERTIES, copyMediaVisualStyles, exportClipWindow, quantizeSeekTime, quantizeTimeToFrame, type MediaVisualStyleProperty, } from "./inline-scripts/parityContract";
40
- export { redactKnownPaths, redactTelemetryString } from "./telemetryRedaction";
41
- export { folderGone, isProjectRootMissing, isSafePath, mkdirWithinProject, ProjectRootMissingError, realpath, realProjectRoot, resolveWithinProject, } from "./safePath";
42
- export { isHyperframesProject, PROJECT_MARKER_FILES } from "./projectRule";
43
- export type { HyperframePickerApi, HyperframePickerBoundingBox, HyperframePickerElementInfo, } from "./inline-scripts/pickerApi";
44
- export type { FrameAdapter, FrameAdapterContext } from "./adapters/types";
45
- export type { GSAPTimelineLike, CreateGSAPFrameAdapterOptions } from "./adapters/gsap";
46
- export { createGSAPFrameAdapter } from "./adapters/gsap";
14
+ export type { SerializeOptions } from "./generators/hyperframes.js";
15
+ export { generateHyperframesHtml, generateGsapTimelineScript, generateHyperframesStyles, } from "./generators/hyperframes.js";
16
+ export type { UnresolvedElement, ResolvedDuration, ResolvedMediaElement, CompilationResult, } from "./compiler/timingCompiler.js";
17
+ export type { WordTiming, ElementAnchor, AuthoredTiming, ResolvedTiming, ResolveTimingsInput, ResolveTimingsResult, } from "./compiler/timingResolver.js";
18
+ export { resolveTimings } from "./compiler/timingResolver.js";
19
+ export { compileTimingAttrs, injectDurations, extractResolvedMedia, clampDurations, shouldClampMediaDuration, shouldClampResolvedMediaDuration, MEDIA_DURATION_CLAMP_EPSILON_SECONDS, } from "./compiler/timingCompiler.js";
20
+ export { AUDIO_GROUP_RENDER_ID_ATTR, MEDIA_RENDER_ID_ATTR, assignMediaRenderIds, } from "./compiler/mediaRenderIds.js";
21
+ export { RENDER_FRAME_ID_PREFIX, RENDER_FRAME_ID_SUFFIX, renderFrameIdForRenderId, } from "./runtime/renderFrameSibling.js";
22
+ export { rewriteAssetPaths, rewriteAssetPath, rewriteCssAssetUrls, rewriteInlineStyleAssetUrls, } from "./compiler/rewriteSubCompPaths.js";
23
+ export { CSS_URL_RE, isNonRelativeUrl, isPathInside } from "./compiler/assetPaths.js";
24
+ export { checkSubCompositionUsability, type ParsableDocumentLike, type SubCompositionValidity, type SubCompositionValidityReason, } from "./compiler/subCompositionValidity.js";
25
+ export { RUNTIME_BOOTSTRAP_ATTR, stripEmbeddedRuntimeScripts } from "./compiler/htmlDocument.js";
26
+ export { COMPOSITION_SOURCE_URL } from "./compiler/scriptRuns.js";
27
+ export { queryByAttr } from "./utils/cssSelector.js";
28
+ export { AUDIBLE_MEDIA_SELECTOR, audibleVideoNeedsWebAudio, isAudibleVideoElement, } from "./audibleVideo.js";
29
+ export { decodeUrlPathVariants } from "./utils/urlPath.js";
30
+ export { clearGifFramesBeforeNext, gifClearsAfterLeavingFrameInPlace, parseAnimatedGifMetadata, type AnimatedGifMetadata, } from "./media/gif.js";
31
+ export { HF_COLOR_GRADING_ATTR, HF_COLOR_GRADING_ADJUST_KEYS, HF_COLOR_GRADING_ACTIVE_EFFECT_KEYS, HF_COLOR_GRADING_ANIMATABLE_PROPERTIES, HF_COLOR_GRADING_CANVAS_ID_PREFIX, HF_COLOR_GRADING_COLOR_SPACE, HF_COLOR_GRADING_CURVE_KEYS, HF_COLOR_GRADING_DETAIL_KEYS, HF_COLOR_GRADING_EFFECT_APPLY_DEFAULTS, HF_COLOR_GRADING_EFFECT_KEYS, HF_COLOR_GRADING_EFFECT_PRESETS, HF_COLOR_GRADING_GRADE_PRESETS, HF_COLOR_GRADING_HUE_CURVE_KEYS, HF_COLOR_GRADING_LUT_KEYS, HF_COLOR_GRADING_PALETTES, HF_COLOR_GRADING_PRESETS, HF_COLOR_GRADING_TOP_LEVEL_KEYS, HF_COLOR_GRADING_WHEEL_KEYS, getHfColorGradingCapabilities, hasHfColorGradingAuthoredValues, isHfColorGradingActive, normalizeHfColorGrading, normalizeHfColorGradingWithVariables, resolveHfColorGradingVariables, serializeHfColorGrading, type HfColorGrading, type HfColorGradingAdjust, type HfColorGradingAdjustKey, type HfColorGradingAnimatablePath, type HfColorGradingActiveEffectKey, type HfColorGradingDetailKey, type HfColorGradingDetails, type HfColorGradingEffectKey, type HfColorGradingEffects, type HfColorGradingLutRef, type HfColorGradingPreset, type HfColorGradingPresetId, type HfColorGradingTarget, type HfColorGradingVariableMap, type HfColorGradingCapabilities, type HfColorGradingCurveKey, type HfColorGradingCurves, type HfColorGradingHueCurveKey, type HfColorGradingHueCurves, type HfColorGradingHueRange, type HfColorGradingSecondary, type HfColorGradingSecondaryCorrection, type HfColorGradingSoftRange, type HfColorGradingTonalWheel, type HfColorGradingWheelKey, type HfColorGradingWheels, type HfColorCurvePoint, type HfHueCurvePoint, type NormalizedHfColorGrading, type NormalizedHfColorGradingCurves, type NormalizedHfColorGradingHueCurves, type NormalizedHfColorGradingSecondary, type NormalizedHfColorGradingWheels, type ResolvedHfColorGrading, } from "./colorGrading.js";
32
+ export { parseCubeLut, CubeLutParseError, type ParseCubeLutOptions } from "./colorLuts.js";
33
+ export { firstFrameColourArgs, hdrToSdrToneMapFilter, parseFirstFrameColour, type ToneMapSourceColour, } from "./hdrToneMap.js";
34
+ export { PREVIEW_PROXY_BOX_PARAM, formatPreviewProxyBox, parsePreviewProxyBox, type PreviewProxyBox, } from "./previewProxyBox.js";
35
+ export { HYPERFRAME_RUNTIME_ARTIFACTS, HYPERFRAME_RUNTIME_CONTRACT, loadHyperframeRuntimeSource, type HyperframeRuntimeContract, } from "./inline-scripts/hyperframe.js";
36
+ export { HYPERFRAME_RUNTIME_GLOBALS, HYPERFRAME_BRIDGE_SOURCES, HYPERFRAME_CONTROL_ACTIONS, type HyperframeControlAction, } from "./inline-scripts/runtimeContract.js";
37
+ export { getHyperframeRuntimeScript } from "./generated/runtime-inline.js";
38
+ export { buildHyperframesRuntimeScript, type HyperframesRuntimeBuildOptions, } from "./inline-scripts/hyperframesRuntime.engine.js";
39
+ export { MEDIA_VISUAL_STYLE_PROPERTIES, copyMediaVisualStyles, exportClipWindow, quantizeSeekTime, quantizeTimeToFrame, type MediaVisualStyleProperty, } from "./inline-scripts/parityContract.js";
40
+ export { redactKnownPaths, redactTelemetryString } from "./telemetryRedaction.js";
41
+ export { folderGone, isProjectRootMissing, isSafePath, mkdirWithinProject, ProjectRootMissingError, realpath, realProjectRoot, resolveWithinProject, } from "./safePath.js";
42
+ export { isHyperframesProject, PROJECT_MARKER_FILES } from "./projectRule.js";
43
+ export type { HyperframePickerApi, HyperframePickerBoundingBox, HyperframePickerElementInfo, } from "./inline-scripts/pickerApi.js";
44
+ export type { FrameAdapter, FrameAdapterContext } from "./adapters/types.js";
45
+ export type { GSAPTimelineLike, CreateGSAPFrameAdapterOptions } from "./adapters/gsap.js";
46
+ export { createGSAPFrameAdapter } from "./adapters/gsap.js";
47
47
  export { fitTextFontSize } from "./text/index.js";
48
48
  export type { FitTextOptions, FitTextResult } from "./text/index.js";
49
49
  export { formatRenderOutputTimestamp } from "./utils/renderOutputTimestamp.js";