hyperframes 0.8.83 → 0.8.85

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.
@@ -65,7 +65,7 @@ import {
65
65
  whenPreviewBooted,
66
66
  wrapTimeline,
67
67
  writeStudioUiPreferences
68
- } from "./chunk-LPZMAGS7.js";
68
+ } from "./chunk-7VDQIGOU.js";
69
69
  import {
70
70
  Button,
71
71
  ContextMenu,
@@ -11914,7 +11914,8 @@ function clipItems(rowId, elements) {
11914
11914
  kind: "clip",
11915
11915
  rowId,
11916
11916
  elementId: id,
11917
- time: element.start + element.duration / 2
11917
+ time: element.start + element.duration / 2,
11918
+ element
11918
11919
  };
11919
11920
  });
11920
11921
  }
@@ -20390,7 +20391,8 @@ function useTimelineKeyboardActor({
20390
20391
  focusedTargetId,
20391
20392
  rowGeometry,
20392
20393
  scrollRef,
20393
- onToggleRow
20394
+ onToggleRow,
20395
+ onDrillDown
20394
20396
  }) {
20395
20397
  const rovingTargetId = (focusedTargetId && locateTimelineLogicalTarget(logicalRows, focusedTargetId)?.target.id) ?? logicalRows[0]?.id ?? null;
20396
20398
  const logicalRowCountByTrack = useMemo27(() => {
@@ -20441,13 +20443,19 @@ function useTimelineKeyboardActor({
20441
20443
  openContextMenu(targetElement);
20442
20444
  return;
20443
20445
  }
20446
+ const composition = located.target.kind === "clip" && located.target.element;
20447
+ if (event.key === "Enter" && composition && composition.compositionSrc && onDrillDown) {
20448
+ event.preventDefault();
20449
+ onDrillDown(composition);
20450
+ return;
20451
+ }
20444
20452
  if (event.key !== "Enter" && event.key !== " " || located.target.kind !== "row" || !located.target.expandable) {
20445
20453
  return;
20446
20454
  }
20447
20455
  event.preventDefault();
20448
20456
  onToggleRow(located.target);
20449
20457
  },
20450
- [logicalRowCountByTrack, logicalRows, onToggleRow, rowGeometry, scrollRef]
20458
+ [logicalRowCountByTrack, logicalRows, onDrillDown, onToggleRow, rowGeometry, scrollRef]
20451
20459
  );
20452
20460
  return { rovingTargetId, onFocus, onKeyDown };
20453
20461
  }
@@ -20683,9 +20691,8 @@ function TimelineLanes({
20683
20691
  focusedTargetId,
20684
20692
  rowGeometry,
20685
20693
  scrollRef,
20686
- onToggleRow: (row) => {
20687
- if (row.elementId) toggleClipExpandedTracked(row.elementId);
20688
- }
20694
+ onToggleRow: (row) => row.elementId && toggleClipExpandedTracked(row.elementId),
20695
+ onDrillDown
20689
20696
  });
20690
20697
  return /* @__PURE__ */ jsx52(
20691
20698
  "div",
@@ -25622,7 +25629,8 @@ var RENDERED_FIELDS = [
25622
25629
  "audioGroupVolume",
25623
25630
  "audioGroupHidden",
25624
25631
  "fadeIn",
25625
- "fadeOut"
25632
+ "fadeOut",
25633
+ "src"
25626
25634
  ];
25627
25635
  function timelineElementsChanged(previous, next) {
25628
25636
  if (next.length !== previous.length) return true;
@@ -27299,7 +27307,7 @@ function CompositionBreadcrumb({ stack, onNavigate }) {
27299
27307
  "nav",
27300
27308
  {
27301
27309
  "aria-label": "Composition navigation",
27302
- className: "flex items-center gap-1 px-2 h-8 border-b border-neutral-800/50 bg-neutral-900/50 shrink-0",
27310
+ className: "flex items-center gap-1 px-2 h-8 border-b border-hairline bg-bg-1 shrink-0",
27303
27311
  children: [
27304
27312
  /* @__PURE__ */ jsx70(
27305
27313
  "button",
@@ -27312,7 +27320,7 @@ function CompositionBreadcrumb({ stack, onNavigate }) {
27312
27320
  });
27313
27321
  onNavigate(stack.length - 2);
27314
27322
  },
27315
- className: "flex items-center gap-1 px-1.5 py-0.5 rounded-sm text-xs text-neutral-400 hover:text-white hover:bg-neutral-800 active:scale-[0.98] transition-colors",
27323
+ className: "flex items-center gap-1 px-1.5 py-0.5 rounded-sm text-xs text-text-3 hover:text-text-0 hover:bg-hover active:scale-[0.98] transition-colors",
27316
27324
  title: "Back (Esc, or double-click empty timeline)",
27317
27325
  "aria-label": "Back to parent composition",
27318
27326
  children: /* @__PURE__ */ jsx70(ArrowLeft2, { size: 12, weight: "bold" })
@@ -27321,8 +27329,8 @@ function CompositionBreadcrumb({ stack, onNavigate }) {
27321
27329
  stack.map((level, i) => {
27322
27330
  const isLast = i === stack.length - 1;
27323
27331
  return /* @__PURE__ */ jsxs48("span", { className: "flex items-center gap-1", children: [
27324
- i > 0 && /* @__PURE__ */ jsx70(CaretRight2, { size: 10, className: "text-neutral-600 shrink-0" }),
27325
- isLast ? /* @__PURE__ */ jsx70("span", { className: "text-xs text-neutral-200 font-medium", children: level.label }) : /* @__PURE__ */ jsx70(
27332
+ i > 0 && /* @__PURE__ */ jsx70(CaretRight2, { size: 10, className: "text-text-4 shrink-0" }),
27333
+ isLast ? /* @__PURE__ */ jsx70("span", { className: "text-xs text-text-1 font-medium", children: level.label }) : /* @__PURE__ */ jsx70(
27326
27334
  "button",
27327
27335
  {
27328
27336
  type: "button",
@@ -27330,7 +27338,7 @@ function CompositionBreadcrumb({ stack, onNavigate }) {
27330
27338
  trackStudioEvent("navigation", { action: "breadcrumb", target: level.label });
27331
27339
  onNavigate(i);
27332
27340
  },
27333
- className: "text-xs text-neutral-500 hover:text-neutral-200 transition-colors",
27341
+ className: "text-xs text-text-3 hover:text-text-1 transition-colors",
27334
27342
  children: level.label
27335
27343
  }
27336
27344
  )
@@ -35416,12 +35424,9 @@ function useInlineTextEdit({
35416
35424
  element.removeEventListener("drop", onDrop);
35417
35425
  };
35418
35426
  }, [session, commit, cancel]);
35419
- useEffect44(
35420
- () => () => {
35421
- teardown();
35422
- },
35423
- [teardown]
35424
- );
35427
+ const commitRef = useRef65(commit);
35428
+ commitRef.current = commit;
35429
+ useEffect44(() => () => commitRef.current(), []);
35425
35430
  return { session, start, commit, cancel };
35426
35431
  }
35427
35432
  function placeCaret(element, at) {
@@ -72647,8 +72652,11 @@ function useDomEditTextCommits({
72647
72652
  refreshDomEditSelectionFromPreview,
72648
72653
  buildDomSelectionFromTarget,
72649
72654
  persistDomEditOperations,
72650
- resolveImportedFontAsset
72655
+ resolveImportedFontAsset,
72656
+ readOnlyPreview
72651
72657
  }) {
72658
+ const latestReadOnlyPreviewRef = useRef140(readOnlyPreview);
72659
+ latestReadOnlyPreviewRef.current = readOnlyPreview;
72652
72660
  const domTextCommitVersionRef = useRef140(/* @__PURE__ */ new Map());
72653
72661
  const domStyleCommitVersionRef = useRef140(/* @__PURE__ */ new Map());
72654
72662
  const {
@@ -72809,6 +72817,10 @@ function useDomEditTextCommits({
72809
72817
  const handleDomRichTextCommit = useCallback119(
72810
72818
  async ({ element, html: html2, previousHtml }) => {
72811
72819
  if (!domEditSelection) return;
72820
+ if (latestReadOnlyPreviewRef.current) {
72821
+ if (element.isConnected && element.innerHTML === html2) element.innerHTML = previousHtml;
72822
+ return;
72823
+ }
72812
72824
  if (!canCommitInlineTextSelection(domEditSelection, element)) return;
72813
72825
  const iframe = previewIframeRef.current;
72814
72826
  const doc = iframe?.contentDocument;
@@ -73819,6 +73831,7 @@ function useDomEditCommits({
73819
73831
  handleDomAddTextField,
73820
73832
  handleDomRemoveTextField
73821
73833
  } = useDomEditTextCommits({
73834
+ readOnlyPreview,
73822
73835
  activeCompPath,
73823
73836
  previewIframeRef,
73824
73837
  domEditSelection,
@@ -91475,6 +91488,7 @@ export {
91475
91488
  resolveSourceFile,
91476
91489
  snapEngagedForTravel,
91477
91490
  useClipboard,
91491
+ useCompositionStack,
91478
91492
  useDomEditSelectionContext,
91479
91493
  useDomEditSession,
91480
91494
  useEditHistoryActions,