@hyperframes/core 0.9.16 → 0.9.17
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/compiler/inlineSubCompositions.js +9 -2
- package/dist/compiler/staticGuard.js +2 -4
- package/dist/compiler/svgIdNamespacing.d.ts +3 -0
- package/dist/compiler/svgIdNamespacing.js +9 -0
- package/dist/compositionReadiness.js +0 -1
- package/dist/generated/runtime-inline.js +1 -1
- package/dist/hdrToneMap.d.ts +10 -1
- package/dist/hdrToneMap.js +27 -1
- package/dist/hyperframe.runtime.iife.js +62 -62
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/runtime/clipWindow.d.ts +2 -0
- package/dist/runtime/clipWindow.js +6 -0
- package/dist/runtime/timeline.d.ts +0 -1
- package/dist/runtime/timeline.js +2 -7
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export { HF_COLOR_GRADING_ATTR, HF_COLOR_GRADING_ADJUST_KEYS, HF_COLOR_GRADING_A
|
|
|
35
35
|
export { colorGroupOf, effectiveColorGrading, ensureColorGroupInertStyle, HF_COLOR_GROUP_ATTR, HF_COLOR_GROUP_TAG, resolveColorGroupElement, } from "./colorGroups.js";
|
|
36
36
|
export { parseCubeLut, CubeLutParseError, type CubeLut3D, type ParseCubeLutOptions, } from "./colorLuts.js";
|
|
37
37
|
export { bakeHfColorGradingCube, type BakeHfColorGradingCubeOptions } from "./colorGradingBake.js";
|
|
38
|
-
export { firstFrameColourArgs, hdrToSdrToneMapFilter, parseFirstFrameColour, type ToneMapSourceColour, } from "./hdrToneMap.js";
|
|
38
|
+
export { firstFrameColourArgs, hdrToSdrToneMapFilter, keyframeTransferArgs, parseKeyframeTransfers, readsKeyframeTransfers, toneMapReferenceNits, parseFirstFrameColour, type ToneMapFrameColour, type ToneMapSourceColour, } from "./hdrToneMap.js";
|
|
39
39
|
export { HEAVY_BITRATE, HEAVY_PIXEL_SHARE, PREVIEW_PROXY_BOX_PARAM, PREVIEW_PROXY_LIGHT_PARAM, PREVIEW_PROXY_PRIORITY_HEADER, PREVIEW_PROXY_PROGRESS_HEADER, PREVIEW_PROXY_RETRY_PARAM, PREVIEW_PROXY_STILL_PARAM, PREVIEW_QUALITY_LEVELS, formatPreviewProxyBox, isHeavyForPreview, isPreviewQuality, parsePreviewProxyBox, quantizePreviewProxyBox, scalePreviewProxyBox, type PreviewProxyBox, type PreviewQuality, type PreviewSourceFacts, } from "./previewProxyBox.js";
|
|
40
40
|
export { HYPERFRAME_RUNTIME_ARTIFACTS, HYPERFRAME_RUNTIME_CONTRACT, loadHyperframeRuntimeSource, type HyperframeRuntimeContract, } from "./inline-scripts/hyperframe.js";
|
|
41
41
|
export { HYPERFRAME_RUNTIME_GLOBALS, HYPERFRAME_BRIDGE_SOURCES, HYPERFRAME_CONTROL_ACTIONS, type HyperframeControlAction, } from "./inline-scripts/runtimeContract.js";
|
|
@@ -57,7 +57,7 @@ export { SCENE_CALLBACK_ERROR_PREFIX } from "./runtime/diagnostics.js";
|
|
|
57
57
|
export { parseStartExpression, parseNumeric, type ReferenceExpression, } from "./runtime/startExpression.js";
|
|
58
58
|
export { COMPOSITION_CONTRACT_VERSION, COMPOSITION_ATTRIBUTES, CANONICAL_AUTHORED_TIMING_ATTRIBUTES, DERIVED_TIMING_ATTRIBUTES, LEGACY_TIMING_ATTRIBUTES, readClipTiming, writeClipTiming, ClipTimingWriteError, type ClipTiming, type ClipTimingDiagnostic, type ClipTimingDiagnosticCode, type ClipTimingUpdate, } from "./compositionContract.js";
|
|
59
59
|
export { createRuntimeStartTimeResolver } from "./runtime/startResolver.js";
|
|
60
|
-
export { hasClipStarted, isClipVisibleAt, isInClipWindow } from "./runtime/clipWindow.js";
|
|
60
|
+
export { hasClipStarted, isClipOnScreenAt, isClipVisibleAt, isInClipWindow, } from "./runtime/clipWindow.js";
|
|
61
61
|
export { MEDIA_ELEMENT_LEAD_SECONDS, mediaElementTime } from "./runtime/mediaClock.js";
|
|
62
62
|
export { normalizePlaybackRate, normalizeRateSpec, parseStrictFiniteTimingNumber, readElementPlaybackRate, readElementRateSpec, readMediaStart, resolveNaturalMediaTimelineDuration, resolveNaturalMediaTimelineDurationFromValues, } from "./runtime/playbackRate.js";
|
|
63
63
|
export { shiftRateLane, sourceTimeAt, timeAtSourceTime, type RateSpec } from "./speedRamp.js";
|
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ export { HF_COLOR_GRADING_ATTR, HF_COLOR_GRADING_ADJUST_KEYS, HF_COLOR_GRADING_A
|
|
|
31
31
|
export { colorGroupOf, effectiveColorGrading, ensureColorGroupInertStyle, HF_COLOR_GROUP_ATTR, HF_COLOR_GROUP_TAG, resolveColorGroupElement, } from "./colorGroups.js";
|
|
32
32
|
export { parseCubeLut, CubeLutParseError, } from "./colorLuts.js";
|
|
33
33
|
export { bakeHfColorGradingCube } from "./colorGradingBake.js";
|
|
34
|
-
export { firstFrameColourArgs, hdrToSdrToneMapFilter, parseFirstFrameColour, } from "./hdrToneMap.js";
|
|
34
|
+
export { firstFrameColourArgs, hdrToSdrToneMapFilter, keyframeTransferArgs, parseKeyframeTransfers, readsKeyframeTransfers, toneMapReferenceNits, parseFirstFrameColour, } from "./hdrToneMap.js";
|
|
35
35
|
export { HEAVY_BITRATE, HEAVY_PIXEL_SHARE, PREVIEW_PROXY_BOX_PARAM, PREVIEW_PROXY_LIGHT_PARAM, PREVIEW_PROXY_PRIORITY_HEADER, PREVIEW_PROXY_PROGRESS_HEADER, PREVIEW_PROXY_RETRY_PARAM, PREVIEW_PROXY_STILL_PARAM, PREVIEW_QUALITY_LEVELS, formatPreviewProxyBox, isHeavyForPreview, isPreviewQuality, parsePreviewProxyBox, quantizePreviewProxyBox, scalePreviewProxyBox, } from "./previewProxyBox.js";
|
|
36
36
|
// Inline scripts
|
|
37
37
|
export { HYPERFRAME_RUNTIME_ARTIFACTS, HYPERFRAME_RUNTIME_CONTRACT, loadHyperframeRuntimeSource, } from "./inline-scripts/hyperframe.js";
|
|
@@ -59,7 +59,7 @@ export { COMPOSITION_CONTRACT_VERSION, COMPOSITION_ATTRIBUTES, CANONICAL_AUTHORE
|
|
|
59
59
|
// (verify:packed-manifests catches exactly that).
|
|
60
60
|
export { createRuntimeStartTimeResolver } from "./runtime/startResolver.js";
|
|
61
61
|
// Also exposed via the ./runtime/clip-window subpath; re-exported here for the same dist-emit reason.
|
|
62
|
-
export { hasClipStarted, isClipVisibleAt, isInClipWindow } from "./runtime/clipWindow.js";
|
|
62
|
+
export { hasClipStarted, isClipOnScreenAt, isClipVisibleAt, isInClipWindow, } from "./runtime/clipWindow.js";
|
|
63
63
|
export { MEDIA_ELEMENT_LEAD_SECONDS, mediaElementTime } from "./runtime/mediaClock.js";
|
|
64
64
|
export { normalizePlaybackRate, normalizeRateSpec, parseStrictFiniteTimingNumber, readElementPlaybackRate, readElementRateSpec, readMediaStart, resolveNaturalMediaTimelineDuration, resolveNaturalMediaTimelineDurationFromValues, } from "./runtime/playbackRate.js";
|
|
65
65
|
export { shiftRateLane, sourceTimeAt, timeAtSourceTime } from "./speedRamp.js";
|
|
@@ -6,3 +6,5 @@ export declare const isInClipWindow: (time: number, start: number, end: number)
|
|
|
6
6
|
* the terminal instant, so a finished film rests on its last frame instead of going blank.
|
|
7
7
|
*/
|
|
8
8
|
export declare const isClipVisibleAt: (time: number, start: number, end: number, compositionDuration: number) => boolean;
|
|
9
|
+
/** The one on-screen rule render, snapshot and preview share: edges a hair off a frame count as on it. */
|
|
10
|
+
export declare const isClipOnScreenAt: (time: number, start: number, end: number, fps: number, compositionDuration: number) => boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { sameInstant } from "../clipFacts.js";
|
|
2
|
+
import { exportClipWindow } from "../inline-scripts/parityContract.js";
|
|
2
3
|
export const hasClipStarted = (time, start) => time >= start || sameInstant(time, start);
|
|
3
4
|
/** Half-open: two back-to-back clips never both hold the shared boundary instant, float sums included. */
|
|
4
5
|
export const isInClipWindow = (time, start, end) => hasClipStarted(time, start) && time < end && !sameInstant(time, end);
|
|
@@ -11,3 +12,8 @@ export const isClipVisibleAt = (time, start, end, compositionDuration) => isInCl
|
|
|
11
12
|
(hasClipStarted(time, start) &&
|
|
12
13
|
compositionDuration > 0 &&
|
|
13
14
|
end >= compositionDuration - TERMINAL_EPSILON_SECONDS);
|
|
15
|
+
/** The one on-screen rule render, snapshot and preview share: edges a hair off a frame count as on it. */
|
|
16
|
+
export const isClipOnScreenAt = (time, start, end, fps, compositionDuration) => {
|
|
17
|
+
const snapped = exportClipWindow(start, end, fps);
|
|
18
|
+
return isClipVisibleAt(time, snapped.start, snapped.end, compositionDuration);
|
|
19
|
+
};
|
|
@@ -11,7 +11,6 @@ export declare function isRuntimeElementVisibleAt(rawNode: Element, options: {
|
|
|
11
11
|
currentTime: number;
|
|
12
12
|
compositionDuration: number;
|
|
13
13
|
canonicalFps: number;
|
|
14
|
-
exportRenderSeek: boolean;
|
|
15
14
|
timelineRegistry: Record<string, RuntimeTimelineLike | undefined>;
|
|
16
15
|
resolver: ReturnType<typeof createRuntimeStartTimeResolver>;
|
|
17
16
|
}): boolean;
|
package/dist/runtime/timeline.js
CHANGED
|
@@ -7,8 +7,7 @@ import { readElementPlaybackRate, readMediaStart } from "./playbackRate.js";
|
|
|
7
7
|
import { parseStrictFiniteTimingNumber, resolveMediaElementDurationSeconds, resolveNaturalMediaTimelineDuration, resolveTimedImageDurationSeconds, } from "./playbackRate.js";
|
|
8
8
|
import { resolveCssStackingContextId } from "./stackingContext.js";
|
|
9
9
|
import { createRuntimeStartTimeResolver } from "./startResolver.js";
|
|
10
|
-
import {
|
|
11
|
-
import { exportClipWindow } from "../inline-scripts/parityContract.js";
|
|
10
|
+
import { isClipOnScreenAt } from "./clipWindow.js";
|
|
12
11
|
import { isSceneLikeCompositionId } from "../slideshow/index.js";
|
|
13
12
|
import { COMPOSITION_CONTRACT_VERSION } from "../compositionContract.js";
|
|
14
13
|
import { runtimeProtocolMetadata } from "./protocol.js";
|
|
@@ -50,11 +49,7 @@ export function isRuntimeElementVisibleAt(rawNode, options) {
|
|
|
50
49
|
const span = runtimeElementWindow(rawNode, options);
|
|
51
50
|
if (!span)
|
|
52
51
|
return false;
|
|
53
|
-
|
|
54
|
-
const clipWindow = options.exportRenderSeek
|
|
55
|
-
? exportClipWindow(span.start, span.end, options.canonicalFps)
|
|
56
|
-
: span;
|
|
57
|
-
return isClipVisibleAt(options.currentTime, clipWindow.start, clipWindow.end, options.compositionDuration);
|
|
52
|
+
return isClipOnScreenAt(options.currentTime, span.start, span.end, options.canonicalFps, options.compositionDuration);
|
|
58
53
|
}
|
|
59
54
|
function parseNum(value) {
|
|
60
55
|
return parseStrictFiniteTimingNumber(value);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.17",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -437,9 +437,9 @@
|
|
|
437
437
|
"linkedom": "^0.18.12",
|
|
438
438
|
"postcss": "^8.5.8",
|
|
439
439
|
"wawoff2": "^2.0.1",
|
|
440
|
-
"@hyperframes/lint": "0.9.
|
|
441
|
-
"@hyperframes/parsers": "0.9.
|
|
442
|
-
"@hyperframes/studio-server": "0.9.
|
|
440
|
+
"@hyperframes/lint": "0.9.17",
|
|
441
|
+
"@hyperframes/parsers": "0.9.17",
|
|
442
|
+
"@hyperframes/studio-server": "0.9.17"
|
|
443
443
|
},
|
|
444
444
|
"devDependencies": {
|
|
445
445
|
"@fontsource/archivo-black": "^5.2.8",
|