@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.
@@ -19,7 +19,7 @@ import {
19
19
  querySelectorAllSafely,
20
20
  studioApiFetch,
21
21
  withSelectorIndexPass
22
- } from "./chunk-T43DM7Q6.js";
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
- withSelectorIndexPass(root.ownerDocument, () => {
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) {
@@ -5,7 +5,7 @@ import {
5
5
  buildProjectApiPath,
6
6
  splitTimelineElementKey,
7
7
  studioApiFetch
8
- } from "./chunk-T43DM7Q6.js";
8
+ } from "./chunk-OGIOFEC7.js";
9
9
 
10
10
  // src/player/lib/time.ts
11
11
  var STUDIO_PREVIEW_FPS = 30;
@@ -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
- activePass = { doc, bySelector: /* @__PURE__ */ new Map() };
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-Z5NKM57J.js";
23
- import "./chunk-T43DM7Q6.js";
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-dy6GQJn4.js"></script>
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>