@hyperframes/core 0.8.209 → 0.8.211

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/index.d.ts CHANGED
@@ -34,7 +34,7 @@ export { clearGifFramesBeforeNext, gifClearsAfterLeavingFrameInPlace, parseAnima
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
35
  export { parseCubeLut, CubeLutParseError, type ParseCubeLutOptions } from "./colorLuts.js";
36
36
  export { firstFrameColourArgs, hdrToSdrToneMapFilter, parseFirstFrameColour, type ToneMapSourceColour, } from "./hdrToneMap.js";
37
- export { HEAVY_BITRATE, HEAVY_PIXEL_SHARE, PREVIEW_PROXY_BOX_PARAM, PREVIEW_PROXY_LIGHT_PARAM, 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";
37
+ 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
38
  export { HYPERFRAME_RUNTIME_ARTIFACTS, HYPERFRAME_RUNTIME_CONTRACT, loadHyperframeRuntimeSource, type HyperframeRuntimeContract, } from "./inline-scripts/hyperframe.js";
39
39
  export { HYPERFRAME_RUNTIME_GLOBALS, HYPERFRAME_BRIDGE_SOURCES, HYPERFRAME_CONTROL_ACTIONS, type HyperframeControlAction, } from "./inline-scripts/runtimeContract.js";
40
40
  export { getHyperframeRuntimeScript } from "./generated/runtime-inline.js";
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ export { clearGifFramesBeforeNext, gifClearsAfterLeavingFrameInPlace, parseAnima
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
31
  export { parseCubeLut, CubeLutParseError } from "./colorLuts.js";
32
32
  export { firstFrameColourArgs, hdrToSdrToneMapFilter, parseFirstFrameColour, } from "./hdrToneMap.js";
33
- export { HEAVY_BITRATE, HEAVY_PIXEL_SHARE, PREVIEW_PROXY_BOX_PARAM, PREVIEW_PROXY_LIGHT_PARAM, PREVIEW_PROXY_PROGRESS_HEADER, PREVIEW_PROXY_RETRY_PARAM, PREVIEW_QUALITY_LEVELS, formatPreviewProxyBox, isHeavyForPreview, isPreviewQuality, parsePreviewProxyBox, quantizePreviewProxyBox, scalePreviewProxyBox, } from "./previewProxyBox.js";
33
+ 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
34
  // Inline scripts
35
35
  export { HYPERFRAME_RUNTIME_ARTIFACTS, HYPERFRAME_RUNTIME_CONTRACT, loadHyperframeRuntimeSource, } from "./inline-scripts/hyperframe.js";
36
36
  export { HYPERFRAME_RUNTIME_GLOBALS, HYPERFRAME_BRIDGE_SOURCES, HYPERFRAME_CONTROL_ACTIONS, } from "./inline-scripts/runtimeContract.js";
@@ -3,6 +3,7 @@ export declare const PREVIEW_PROXY_BOX_PARAM = "hf-proxy-box";
3
3
  export declare const PREVIEW_PROXY_LIGHT_PARAM = "hf-proxy-light";
4
4
  export declare const PREVIEW_PROXY_RETRY_PARAM = "hf-proxy-retry";
5
5
  export declare const PREVIEW_PROXY_PROGRESS_HEADER = "X-HF-Proxy-Progress";
6
+ export declare const PREVIEW_PROXY_PRIORITY_HEADER = "X-HF-Proxy-Priority";
6
7
  export type PreviewProxyBox = {
7
8
  width: number;
8
9
  height: number;
@@ -3,6 +3,7 @@ export const PREVIEW_PROXY_BOX_PARAM = "hf-proxy-box";
3
3
  export const PREVIEW_PROXY_LIGHT_PARAM = "hf-proxy-light";
4
4
  export const PREVIEW_PROXY_RETRY_PARAM = "hf-proxy-retry";
5
5
  export const PREVIEW_PROXY_PROGRESS_HEADER = "X-HF-Proxy-Progress";
6
+ export const PREVIEW_PROXY_PRIORITY_HEADER = "X-HF-Proxy-Priority";
6
7
  // 256 * 2^(k/4), even: nearby boxes share one cached copy, and a rung overshoots by at most ~19%.
7
8
  const RUNGS = [
8
9
  256, 304, 362, 430, 512, 608, 724, 862, 1024, 1218, 1448, 1722, 2048, 2436, 2896, 3444, 4096,
@@ -3,6 +3,7 @@ interface Options {
3
3
  /** Copy the bytes when Windows keeps refusing (a TEMP that denies delete). Not atomic: scratch files only. */
4
4
  copyFallback?: boolean;
5
5
  }
6
+ export declare function isWindowsHold(error: unknown, platform?: NodeJS.Platform): boolean;
6
7
  /** `renameSync` that rides out Windows' transient file locks; other platforms and errors throw at once. */
7
8
  export declare function renameWithRetry(from: string, to: string, options?: Options & {
8
9
  rename?: (from: string, to: string) => void;
@@ -5,14 +5,14 @@ import { removeScratch } from "./removeScratch.js";
5
5
  // file; the hold clears within milliseconds. Total wait before giving up: about 1.3 s.
6
6
  const RETRYABLE = new Set(["EPERM", "EACCES", "EBUSY"]);
7
7
  const BACKOFF_MS = [10, 20, 40, 80, 160, 320, 640];
8
- function isRetryable(error, platform) {
8
+ export function isWindowsHold(error, platform = process.platform) {
9
9
  if (platform !== "win32")
10
10
  return false;
11
11
  return RETRYABLE.has(error?.code ?? "");
12
12
  }
13
13
  /** What a refused rename does next: wait and try again, fall back to a copy, or give up with the error. */
14
14
  function nextStep(error, attempt, options, platform) {
15
- if (!isRetryable(error, platform))
15
+ if (!isWindowsHold(error, platform))
16
16
  return "throw";
17
17
  if (attempt < BACKOFF_MS.length)
18
18
  return "wait";
@@ -237,6 +237,10 @@ export type RuntimePreviewHealthMessage = {
237
237
  choppy: boolean;
238
238
  fps: number;
239
239
  worstFrameMs: number;
240
+ skippedShare: number;
241
+ waitingShare: number;
242
+ gapP50Ms: number;
243
+ gapP95Ms: number;
240
244
  mode: "play";
241
245
  } | null;
242
246
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/core",
3
- "version": "0.8.209",
3
+ "version": "0.8.211",
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.209",
429
- "@hyperframes/parsers": "0.8.209",
430
- "@hyperframes/studio-server": "0.8.209"
428
+ "@hyperframes/parsers": "0.8.211",
429
+ "@hyperframes/lint": "0.8.211",
430
+ "@hyperframes/studio-server": "0.8.211"
431
431
  },
432
432
  "devDependencies": {
433
433
  "@fontsource/archivo-black": "^5.2.8",