@hyperframes/core 0.8.212 → 0.8.214
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/audioAnalysis.d.ts +3 -1
- package/dist/audioAnalysis.js +11 -3
- package/dist/audioPitch.d.ts +12 -0
- package/dist/audioPitch.js +91 -0
- package/dist/colorGradingBake.d.ts +14 -0
- package/dist/colorGradingBake.js +299 -0
- package/dist/colorGroups.d.ts +33 -0
- package/dist/colorGroups.js +59 -0
- package/dist/compiler/htmlBundler.js +5 -1
- package/dist/compiler/staticGuard.d.ts +4 -1
- package/dist/compiler/staticGuard.js +5 -3
- package/dist/fonts/deterministicFonts.d.ts +1 -1
- package/dist/fonts/deterministicFonts.js +18 -4
- package/dist/generated/position-edits-render-inline.js +1 -1
- package/dist/generated/runtime-inline.js +1 -1
- package/dist/hyperframe.runtime.iife.js +64 -64
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/runtime/domRealm.d.ts +2 -0
- package/dist/runtime/domRealm.js +4 -0
- package/dist/runtime/protocol.d.ts +13 -0
- package/dist/runtime/protocol.js +20 -0
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -32,7 +32,9 @@ export { AUDIBLE_MEDIA_SELECTOR, audibleVideoNeedsWebAudio, isAudibleVideoElemen
|
|
|
32
32
|
export { decodeUrlPathVariants } from "./utils/urlPath.js";
|
|
33
33
|
export { clearGifFramesBeforeNext, gifClearsAfterLeavingFrameInPlace, parseAnimatedGifMetadata, type AnimatedGifMetadata, } from "./media/gif.js";
|
|
34
34
|
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";
|
|
35
|
-
export {
|
|
35
|
+
export { colorGroupOf, effectiveColorGrading, ensureColorGroupInertStyle, HF_COLOR_GROUP_ATTR, HF_COLOR_GROUP_TAG, resolveColorGroupElement, } from "./colorGroups.js";
|
|
36
|
+
export { parseCubeLut, CubeLutParseError, type CubeLut3D, type ParseCubeLutOptions, } from "./colorLuts.js";
|
|
37
|
+
export { bakeHfColorGradingCube, type BakeHfColorGradingCubeOptions } from "./colorGradingBake.js";
|
|
36
38
|
export { firstFrameColourArgs, hdrToSdrToneMapFilter, parseFirstFrameColour, type ToneMapSourceColour, } from "./hdrToneMap.js";
|
|
37
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_QUALITY_LEVELS, formatPreviewProxyBox, isHeavyForPreview, isPreviewQuality, parsePreviewProxyBox, quantizePreviewProxyBox, scalePreviewProxyBox, type PreviewProxyBox, type PreviewQuality, type PreviewSourceFacts, } from "./previewProxyBox.js";
|
|
38
40
|
export { HYPERFRAME_RUNTIME_ARTIFACTS, HYPERFRAME_RUNTIME_CONTRACT, loadHyperframeRuntimeSource, type HyperframeRuntimeContract, } from "./inline-scripts/hyperframe.js";
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,9 @@ export { AUDIBLE_MEDIA_SELECTOR, audibleVideoNeedsWebAudio, isAudibleVideoElemen
|
|
|
28
28
|
export { decodeUrlPathVariants } from "./utils/urlPath.js";
|
|
29
29
|
export { clearGifFramesBeforeNext, gifClearsAfterLeavingFrameInPlace, parseAnimatedGifMetadata, } from "./media/gif.js";
|
|
30
30
|
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, } from "./colorGrading.js";
|
|
31
|
-
export {
|
|
31
|
+
export { colorGroupOf, effectiveColorGrading, ensureColorGroupInertStyle, HF_COLOR_GROUP_ATTR, HF_COLOR_GROUP_TAG, resolveColorGroupElement, } from "./colorGroups.js";
|
|
32
|
+
export { parseCubeLut, CubeLutParseError, } from "./colorLuts.js";
|
|
33
|
+
export { bakeHfColorGradingCube } from "./colorGradingBake.js";
|
|
32
34
|
export { firstFrameColourArgs, hdrToSdrToneMapFilter, parseFirstFrameColour, } from "./hdrToneMap.js";
|
|
33
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_QUALITY_LEVELS, formatPreviewProxyBox, isHeavyForPreview, isPreviewQuality, parsePreviewProxyBox, quantizePreviewProxyBox, scalePreviewProxyBox, } from "./previewProxyBox.js";
|
|
34
36
|
// Inline scripts
|
|
@@ -49,6 +49,8 @@ export declare function isHtmlElement(value: unknown): value is HTMLElement;
|
|
|
49
49
|
export declare function isVideoElement(value: unknown): value is HTMLVideoElement;
|
|
50
50
|
/** `<audio>`, from any realm. Mirrors `instanceof HTMLAudioElement`. */
|
|
51
51
|
export declare function isAudioElement(value: unknown): value is HTMLAudioElement;
|
|
52
|
+
/** `<source>`, from any realm. Mirrors `instanceof HTMLSourceElement`. */
|
|
53
|
+
export declare function isSourceElement(value: unknown): value is HTMLSourceElement;
|
|
52
54
|
/** `<video>` or `<audio>`, from any realm. Mirrors `instanceof HTMLMediaElement`. */
|
|
53
55
|
export declare function isMediaElement(value: unknown): value is HTMLMediaElement;
|
|
54
56
|
/** `<img>`, from any realm. Mirrors `instanceof HTMLImageElement`. */
|
package/dist/runtime/domRealm.js
CHANGED
|
@@ -63,6 +63,10 @@ export function isVideoElement(value) {
|
|
|
63
63
|
export function isAudioElement(value) {
|
|
64
64
|
return isHtmlTag(value, "audio");
|
|
65
65
|
}
|
|
66
|
+
/** `<source>`, from any realm. Mirrors `instanceof HTMLSourceElement`. */
|
|
67
|
+
export function isSourceElement(value) {
|
|
68
|
+
return isHtmlTag(value, "source");
|
|
69
|
+
}
|
|
66
70
|
/** `<video>` or `<audio>`, from any realm. Mirrors `instanceof HTMLMediaElement`. */
|
|
67
71
|
export function isMediaElement(value) {
|
|
68
72
|
return isVideoElement(value) || isAudioElement(value);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const RUNTIME_PROTOCOL_VERSION: 1;
|
|
2
2
|
export declare const RUNTIME_FILLER = "hf-runtime-filler";
|
|
3
|
+
export declare const RUNTIME_MEDIA_LOAD_FAILED = "runtime_media_load_failed";
|
|
3
4
|
export declare const RUNTIME_PROTOCOL_CAPABILITIES: readonly ["seconds-time", "rational-fps", "seek-keep-playing", "composition-manifest-v1", "runtime-data", "play-range"];
|
|
4
5
|
export type RuntimeProtocolFps = {
|
|
5
6
|
numerator: number;
|
|
@@ -28,3 +29,15 @@ export declare function runtimeProtocolFpsToNumber(value: unknown): number | nul
|
|
|
28
29
|
export declare function runtimeProtocolMetadata(fps: number): RuntimeProtocolV1;
|
|
29
30
|
export declare function frameDisplayScale(frame: HTMLElement): number | null;
|
|
30
31
|
export declare function inspectRuntimeProtocol(value: unknown, legacyFps?: number): RuntimeProtocolInspection;
|
|
32
|
+
declare const STAGES: readonly ["fetch", "decode", "element"];
|
|
33
|
+
export type MediaLoadStage = (typeof STAGES)[number];
|
|
34
|
+
export interface MediaLoadFailure {
|
|
35
|
+
elementId: string | null;
|
|
36
|
+
kind: string;
|
|
37
|
+
stage: MediaLoadStage;
|
|
38
|
+
code: number | null;
|
|
39
|
+
bytes: number | null;
|
|
40
|
+
extension: string | null;
|
|
41
|
+
}
|
|
42
|
+
export declare function parseMediaLoadFailure(value: unknown): MediaLoadFailure | null;
|
|
43
|
+
export {};
|
package/dist/runtime/protocol.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const RUNTIME_PROTOCOL_VERSION = 1;
|
|
2
2
|
export const RUNTIME_FILLER = "hf-runtime-filler";
|
|
3
|
+
export const RUNTIME_MEDIA_LOAD_FAILED = "runtime_media_load_failed";
|
|
3
4
|
export const RUNTIME_PROTOCOL_CAPABILITIES = [
|
|
4
5
|
"seconds-time",
|
|
5
6
|
"rational-fps",
|
|
@@ -81,3 +82,22 @@ export function inspectRuntimeProtocol(value, legacyFps = 30) {
|
|
|
81
82
|
metadata: message,
|
|
82
83
|
};
|
|
83
84
|
}
|
|
85
|
+
const STAGES = ["fetch", "decode", "element"];
|
|
86
|
+
const numberOrNull = (n) => (typeof n === "number" ? n : null);
|
|
87
|
+
const stringOrNull = (s) => (typeof s === "string" ? s : null);
|
|
88
|
+
export function parseMediaLoadFailure(value) {
|
|
89
|
+
if (typeof value !== "object" || value === null)
|
|
90
|
+
return null;
|
|
91
|
+
const { elementId, kind, stage, code, bytes, extension } = value;
|
|
92
|
+
const known = STAGES.find((s) => s === stage);
|
|
93
|
+
if (!known || typeof kind !== "string")
|
|
94
|
+
return null;
|
|
95
|
+
return {
|
|
96
|
+
elementId: stringOrNull(elementId),
|
|
97
|
+
kind,
|
|
98
|
+
stage: known,
|
|
99
|
+
code: numberOrNull(code),
|
|
100
|
+
bytes: numberOrNull(bytes),
|
|
101
|
+
extension: stringOrNull(extension),
|
|
102
|
+
};
|
|
103
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/core",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.214",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -425,9 +425,9 @@
|
|
|
425
425
|
"linkedom": "^0.18.12",
|
|
426
426
|
"postcss": "^8.5.8",
|
|
427
427
|
"wawoff2": "^2.0.1",
|
|
428
|
-
"@hyperframes/lint": "0.8.
|
|
429
|
-
"@hyperframes/
|
|
430
|
-
"@hyperframes/
|
|
428
|
+
"@hyperframes/lint": "0.8.214",
|
|
429
|
+
"@hyperframes/parsers": "0.8.214",
|
|
430
|
+
"@hyperframes/studio-server": "0.8.214"
|
|
431
431
|
},
|
|
432
432
|
"devDependencies": {
|
|
433
433
|
"@fontsource/archivo-black": "^5.2.8",
|