@hyperframes/studio 0.8.205 → 0.8.206
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-lCVwx9d3.js +478 -0
- package/dist/assets/{index-C8hp9Y7c.js → index-BNuxGFZK.js} +1 -1
- package/dist/assets/{index-dy6GQJn4.js → index-CwreIGoq.js} +93 -93
- package/dist/{chunk-Z5NKM57J.js → chunk-3EAFE522.js} +8 -4
- package/dist/{chunk-2YCKGJFD.js → chunk-DAZTBGYM.js} +1 -1
- package/dist/{chunk-T43DM7Q6.js → chunk-OGIOFEC7.js} +4 -2
- package/dist/{domEditingLayers-WMDSHU5P.js → domEditingLayers-7Z6J4UOK.js} +2 -2
- package/dist/index.html +1 -1
- package/dist/index.js +92 -77
- package/dist/player.js +2 -2
- package/package.json +8 -8
- package/src/components/MediaPreview.test.tsx +69 -0
- package/src/components/MediaPreview.tsx +10 -5
- package/src/components/editor/domEditLayerWalkCache.test.ts +48 -0
- package/src/components/editor/domEditLayerWalkCache.ts +6 -0
- package/src/components/editor/domEditingLayers.ts +3 -2
- package/src/components/sidebar/PromptPreviewModal.test.tsx +22 -0
- package/src/components/sidebar/PromptPreviewModal.tsx +1 -0
- package/src/player/hooks/previewMessageRouter.test.ts +34 -0
- package/src/player/hooks/previewMessageRouter.ts +14 -3
- package/src/utils/sourceScopedSelectorIndex.ts +5 -2
- package/dist/assets/hyperframes-player-DzdSmJdB.js +0 -478
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
querySelectorAllSafely,
|
|
20
20
|
studioApiFetch,
|
|
21
21
|
withSelectorIndexPass
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OGIOFEC7.js";
|
|
23
23
|
|
|
24
24
|
// src/components/editor/domEditingLayers.ts
|
|
25
25
|
import { isClipHiddenByRuntime, PREVIEW_ONLY_ATTRS } from "@hyperframes/core/studio-preview-mark";
|
|
@@ -349,9 +349,11 @@ function createDomEditLayerWalkCache() {
|
|
|
349
349
|
let presence = /* @__PURE__ */ new WeakMap();
|
|
350
350
|
let identities = /* @__PURE__ */ new WeakMap();
|
|
351
351
|
let scope = null;
|
|
352
|
+
const selectorIndex = /* @__PURE__ */ new Map();
|
|
352
353
|
const invalidateAll = () => {
|
|
353
354
|
presence = /* @__PURE__ */ new WeakMap();
|
|
354
355
|
identities = /* @__PURE__ */ new WeakMap();
|
|
356
|
+
selectorIndex.clear();
|
|
355
357
|
};
|
|
356
358
|
const drop = (el) => {
|
|
357
359
|
if (el) presence.delete(el);
|
|
@@ -425,7 +427,8 @@ function createDomEditLayerWalkCache() {
|
|
|
425
427
|
}
|
|
426
428
|
}
|
|
427
429
|
},
|
|
428
|
-
invalidateAll
|
|
430
|
+
invalidateAll,
|
|
431
|
+
selectorIndex
|
|
429
432
|
};
|
|
430
433
|
}
|
|
431
434
|
function readDomEditLayerWalkEntry(el, activeCompositionPath, cache) {
|
|
@@ -749,9 +752,10 @@ function collectDomEditLayerItems(root, options, maxItems = Number.POSITIVE_INFI
|
|
|
749
752
|
if (items.length >= maxItems) return;
|
|
750
753
|
}
|
|
751
754
|
};
|
|
752
|
-
|
|
755
|
+
const walkRoots = () => {
|
|
753
756
|
for (const el of groupScopedLayerRoots(root, options.activeGroupElement ?? null)) visit(el, 0);
|
|
754
|
-
}
|
|
757
|
+
};
|
|
758
|
+
withSelectorIndexPass(root.ownerDocument, walkRoots, cache?.selectorIndex);
|
|
755
759
|
return items;
|
|
756
760
|
}
|
|
757
761
|
function liveLayerElement(layer, doc, activeCompositionPath) {
|
|
@@ -4,9 +4,11 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// src/utils/sourceScopedSelectorIndex.ts
|
|
6
6
|
var activePass = null;
|
|
7
|
-
function withSelectorIndexPass(doc, run) {
|
|
7
|
+
function withSelectorIndexPass(doc, run, kept) {
|
|
8
8
|
const previous = activePass;
|
|
9
|
-
|
|
9
|
+
const bySelector = kept?.get(doc) ?? /* @__PURE__ */ new Map();
|
|
10
|
+
kept?.set(doc, bySelector);
|
|
11
|
+
activePass = { doc, bySelector };
|
|
10
12
|
try {
|
|
11
13
|
return run();
|
|
12
14
|
} finally {
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
resolveDomEditCapabilities,
|
|
20
20
|
resolveDomEditSelection,
|
|
21
21
|
serializeDomEditTextFields
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-3EAFE522.js";
|
|
23
|
+
import "./chunk-OGIOFEC7.js";
|
|
24
24
|
import "./chunk-MLKGABMK.js";
|
|
25
25
|
export {
|
|
26
26
|
buildDefaultDomEditTextField,
|
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-CwreIGoq.js"></script>
|
|
18
18
|
<link rel="stylesheet" crossorigin href="/assets/index-CYbvOVp-.css">
|
|
19
19
|
</head>
|
|
20
20
|
<body>
|