@hyperframes/core 0.8.184 → 0.8.186
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/audioFxPresets.d.ts +3 -3
- package/dist/audioFxPresets.js +3 -3
- package/dist/compiler/htmlDocument.js +11 -1
- package/dist/generated/runtime-inline.js +1 -1
- package/dist/htmlInCanvas.d.ts +8 -0
- package/dist/htmlInCanvas.js +29 -0
- package/dist/htmlInCanvasDefects.d.ts +26 -0
- package/dist/htmlInCanvasDefects.js +262 -0
- package/dist/hyperframe.runtime.iife.js +67 -67
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/pageMotionBlur.d.ts +11 -0
- package/dist/pageMotionBlur.js +48 -0
- package/dist/runtime/audioAutomationVolume.d.ts +3 -5
- package/dist/runtime/audioAutomationVolume.js +3 -5
- package/dist/runtime/media.js +2 -1
- package/package.json +8 -4
package/dist/audioFxPresets.d.ts
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
* fills the rest from the effect's own defaults. That keeps each entry readable
|
|
17
17
|
* as an intent rather than a dump of every knob.
|
|
18
18
|
*
|
|
19
|
-
* Node ORDER
|
|
19
|
+
* Node ORDER matters — the chain is serial, so a limiter first and a
|
|
20
20
|
* limiter last are different sounds. Every preset below runs
|
|
21
|
-
* subtractive filtering → dynamics → tone → character → limiter,
|
|
22
|
-
* `skills/
|
|
21
|
+
* subtractive filtering → dynamics → tone → character → limiter, as
|
|
22
|
+
* `skills/media-use/references/mixing.md` teaches.
|
|
23
23
|
*/
|
|
24
24
|
import { type HfAudioFxChain, type HfAudioFxNode, type HfAudioFxParamValues } from "./audioFx.js";
|
|
25
25
|
/**
|
package/dist/audioFxPresets.js
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
* fills the rest from the effect's own defaults. That keeps each entry readable
|
|
17
17
|
* as an intent rather than a dump of every knob.
|
|
18
18
|
*
|
|
19
|
-
* Node ORDER
|
|
19
|
+
* Node ORDER matters — the chain is serial, so a limiter first and a
|
|
20
20
|
* limiter last are different sounds. Every preset below runs
|
|
21
|
-
* subtractive filtering → dynamics → tone → character → limiter,
|
|
22
|
-
* `skills/
|
|
21
|
+
* subtractive filtering → dynamics → tone → character → limiter, as
|
|
22
|
+
* `skills/media-use/references/mixing.md` teaches.
|
|
23
23
|
*/
|
|
24
24
|
import { HF_AUDIO_FX_CHAIN_VERSION, mintAudioFxNodeId, normalizeAudioFxParams, } from "./audioFx.js";
|
|
25
25
|
const preset = (id, family, label, description, nodes) => ({ id, label, family, description, nodes });
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { acceleratedCanvasTrackerSource } from "../pageMotionBlur.js";
|
|
1
2
|
import { parseHTML } from "linkedom";
|
|
2
3
|
export const RUNTIME_BOOTSTRAP_ATTR = "data-hyperframes-preview-runtime";
|
|
3
4
|
const RUNTIME_FILES = [
|
|
@@ -302,7 +303,7 @@ function insertBeforeDocumentTag(html, tag, markup) {
|
|
|
302
303
|
export function insertBeforeCloseTag(html, name, markup) {
|
|
303
304
|
return insertBeforeDocumentTag(html, `</${name}`, markup);
|
|
304
305
|
}
|
|
305
|
-
|
|
306
|
+
function insertTagInHead(html, tag) {
|
|
306
307
|
const withHead = insertBeforeCloseTag(html, "head", `${tag}\n`);
|
|
307
308
|
if (withHead !== null)
|
|
308
309
|
return withHead;
|
|
@@ -318,6 +319,15 @@ export function insertRuntimeTag(html, tag) {
|
|
|
318
319
|
}
|
|
319
320
|
return tag + html;
|
|
320
321
|
}
|
|
322
|
+
const ACCEL_TRACKER_ATTR = "data-hf-accel-tracker";
|
|
323
|
+
const OPTS_INTO_MOTION_BLUR = /\sdata-motion-blur\s*=\s*["']?on[\s"'>]/i;
|
|
324
|
+
export function insertRuntimeTag(html, tag) {
|
|
325
|
+
const withRuntime = insertTagInHead(html, tag);
|
|
326
|
+
if (!OPTS_INTO_MOTION_BLUR.test(html) || html.includes(ACCEL_TRACKER_ATTR))
|
|
327
|
+
return withRuntime;
|
|
328
|
+
const tracker = `<script ${ACCEL_TRACKER_ATTR}>${acceleratedCanvasTrackerSource()}</script>`;
|
|
329
|
+
return injectTagsAtHeadStart(withRuntime, tracker);
|
|
330
|
+
}
|
|
321
331
|
/**
|
|
322
332
|
* Insert raw tag markup at the very start of `<head>`, ahead of every author
|
|
323
333
|
* script (inline or external). Falls back to just before `<body>`, then to the
|