@hyperframes/studio 0.8.203 → 0.8.204
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/assets/{hyperframes-player-C3pgGOtp.js → hyperframes-player-CttA4PW7.js} +1 -1
- package/dist/assets/{index-BbcMyD3j.js → index-DmST2bTJ.js} +110 -110
- package/dist/assets/{index-5EFQxr70.js → index-DpxSurnJ.js} +1 -1
- package/dist/{chunk-HZDCMUG4.js → chunk-Z5NKM57J.js} +2 -2
- package/dist/{domEditingLayers-SMVA3FEW.js → domEditingLayers-WMDSHU5P.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/index.js +2 -2
- package/package.json +8 -8
- package/src/components/editor/domEditingLayers.test.ts +38 -0
- package/src/components/editor/domEditingLayers.ts +2 -2
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-T43DM7Q6.js";
|
|
23
23
|
|
|
24
24
|
// src/components/editor/domEditingLayers.ts
|
|
25
|
-
import { PREVIEW_ONLY_ATTRS } from "@hyperframes/core/studio-preview-mark";
|
|
25
|
+
import { isClipHiddenByRuntime, PREVIEW_ONLY_ATTRS } from "@hyperframes/core/studio-preview-mark";
|
|
26
26
|
|
|
27
27
|
// src/components/editor/probeSourceElement.ts
|
|
28
28
|
function knownSourceAnswer(previous, element, sourceFile, target) {
|
|
@@ -724,7 +724,7 @@ function collectDomEditLayerItems(root, options, maxItems = Number.POSITIVE_INFI
|
|
|
724
724
|
cache?.beginWalk(options.activeCompositionPath);
|
|
725
725
|
const items = [];
|
|
726
726
|
const visit = (el, depth) => {
|
|
727
|
-
if (items.length >= maxItems) return;
|
|
727
|
+
if (items.length >= maxItems || isClipHiddenByRuntime(el)) return;
|
|
728
728
|
const entry = readDomEditLayerWalkEntry(el, options.activeCompositionPath, cache);
|
|
729
729
|
if (entry) {
|
|
730
730
|
const { target } = entry;
|
package/dist/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
document.documentElement.dataset.theme = "paper";
|
|
15
15
|
}
|
|
16
16
|
</script>
|
|
17
|
-
<script type="module" crossorigin src="/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/assets/index-DmST2bTJ.js"></script>
|
|
18
18
|
<link rel="stylesheet" crossorigin href="/assets/index-CYbvOVp-.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|
package/dist/index.js
CHANGED
|
@@ -112,7 +112,7 @@ import {
|
|
|
112
112
|
resolveAllVisualDomEditTargets,
|
|
113
113
|
resolveDomEditSelection,
|
|
114
114
|
serializeDomEditTextFields
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-Z5NKM57J.js";
|
|
116
116
|
import {
|
|
117
117
|
LAYER_REVEAL_PRIOR_POSITION_ATTR,
|
|
118
118
|
LAYER_REVEAL_PRIOR_Z_ATTR,
|
|
@@ -37672,7 +37672,7 @@ function OffCanvasIndicators({
|
|
|
37672
37672
|
const selectOffCanvas = async () => {
|
|
37673
37673
|
const el = elements.current.get(r.key);
|
|
37674
37674
|
if (!el) return;
|
|
37675
|
-
const { resolveDomEditSelection: resolveDomEditSelection2 } = await import("./domEditingLayers-
|
|
37675
|
+
const { resolveDomEditSelection: resolveDomEditSelection2 } = await import("./domEditingLayers-WMDSHU5P.js");
|
|
37676
37676
|
const acp = activeCompositionPathRef.current ?? "index.html";
|
|
37677
37677
|
const sel = await resolveDomEditSelection2(el, {
|
|
37678
37678
|
activeCompositionPath: acp,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/studio",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.204",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
"dockview-react": "8.3.1",
|
|
61
61
|
"gsap": "^3.13.0",
|
|
62
62
|
"mediabunny": "^1.45.3",
|
|
63
|
-
"@hyperframes/
|
|
64
|
-
"@hyperframes/
|
|
65
|
-
"@hyperframes/
|
|
66
|
-
"@hyperframes/sdk": "0.8.
|
|
67
|
-
"@hyperframes/
|
|
68
|
-
"@hyperframes/
|
|
63
|
+
"@hyperframes/parsers": "0.8.204",
|
|
64
|
+
"@hyperframes/player": "0.8.204",
|
|
65
|
+
"@hyperframes/shader-transitions": "0.8.204",
|
|
66
|
+
"@hyperframes/sdk": "0.8.204",
|
|
67
|
+
"@hyperframes/studio-server": "0.8.204",
|
|
68
|
+
"@hyperframes/core": "0.8.204"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"vite": "^6.4.2",
|
|
83
83
|
"vitest": "^4.1.11",
|
|
84
84
|
"zustand": "^5.0.0",
|
|
85
|
-
"@hyperframes/producer": "0.8.
|
|
85
|
+
"@hyperframes/producer": "0.8.204"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"react": "19",
|
|
@@ -380,3 +380,41 @@ describe("domEditSelectionToFacts hasAudio", () => {
|
|
|
380
380
|
expect((await factsFor(`<div id="d1"></div>`)).hasAudio).toBe(false);
|
|
381
381
|
});
|
|
382
382
|
});
|
|
383
|
+
|
|
384
|
+
describe("collectDomEditLayerItems and clips the runtime hid", () => {
|
|
385
|
+
afterEach(() => {
|
|
386
|
+
document.body.innerHTML = "";
|
|
387
|
+
document.head.innerHTML = "";
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
// As the runtime marks and styles a clip outside the playhead, with its rule that hides the clip's contents.
|
|
391
|
+
function filmWithHiddenScene(hiddenStyle: string): HTMLElement {
|
|
392
|
+
document.head.innerHTML = `<style>[data-hf-clip-hidden][data-hf-clip-hidden] * { visibility: hidden !important; }</style>`;
|
|
393
|
+
const cells = (prefix: string, n: number) =>
|
|
394
|
+
Array.from({ length: n }, (_, i) => `<div id="${prefix}-${i}"></div>`).join("");
|
|
395
|
+
document.body.innerHTML =
|
|
396
|
+
`<div data-composition-id="main">` +
|
|
397
|
+
`<div id="now" data-start="0" data-duration="5">${cells("now", 3)}</div>` +
|
|
398
|
+
`<div id="later" data-start="5" data-duration="5" data-hf-clip-hidden style="${hiddenStyle}">${cells("later", 50)}</div>` +
|
|
399
|
+
`</div>`;
|
|
400
|
+
return document.querySelector<HTMLElement>("[data-composition-id]")!;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
it("lists what is on screen without reading the style of anything inside a hidden clip", () => {
|
|
404
|
+
const root = filmWithHiddenScene("visibility: hidden");
|
|
405
|
+
const read = vi.spyOn(window, "getComputedStyle");
|
|
406
|
+
const ids = collectDomEditLayerItems(root, opts).map((item) => item.id);
|
|
407
|
+
const insideHidden = read.mock.calls.filter(([el]) =>
|
|
408
|
+
document.getElementById("later")!.contains(el),
|
|
409
|
+
);
|
|
410
|
+
expect(ids).toEqual(["now", "now-0", "now-1", "now-2"]);
|
|
411
|
+
expect(insideHidden).toHaveLength(0);
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
// Older shader builds reveal a clip through its inline style alone, leaving the mark on.
|
|
415
|
+
it("still lists a marked clip whose inline style shows it", () => {
|
|
416
|
+
const root = filmWithHiddenScene("visibility: visible");
|
|
417
|
+
const ids = collectDomEditLayerItems(root, opts).map((item) => item.id);
|
|
418
|
+
expect(ids).toContain("later");
|
|
419
|
+
});
|
|
420
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PREVIEW_ONLY_ATTRS } from "@hyperframes/core/studio-preview-mark";
|
|
1
|
+
import { isClipHiddenByRuntime, PREVIEW_ONLY_ATTRS } from "@hyperframes/core/studio-preview-mark";
|
|
2
2
|
import { knownSourceAnswer, probeSourceElement, type ProbeTarget } from "./probeSourceElement";
|
|
3
3
|
import { isAudibleVideoNode } from "../../player/lib/timelineElementHelpers";
|
|
4
4
|
import type { PatchOperation } from "../../utils/sourcePatcher";
|
|
@@ -454,7 +454,7 @@ export function collectDomEditLayerItems(
|
|
|
454
454
|
const items: DomEditLayerItem[] = [];
|
|
455
455
|
// fallow-ignore-next-line complexity
|
|
456
456
|
const visit = (el: HTMLElement, depth: number) => {
|
|
457
|
-
if (items.length >= maxItems) return;
|
|
457
|
+
if (items.length >= maxItems || isClipHiddenByRuntime(el)) return;
|
|
458
458
|
|
|
459
459
|
const entry = readDomEditLayerWalkEntry(el, options.activeCompositionPath, cache);
|
|
460
460
|
if (entry) {
|