hyperframes 0.7.3 → 0.7.5

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.
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
6
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7
7
  <title>HyperFrames Studio</title>
8
- <script type="module" crossorigin src="/assets/index-hqkzfAEp.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-D_JGXmfx.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-DzWIinxk.css">
10
10
  </head>
11
11
  <body>
@@ -2874,13 +2874,16 @@ function moveBeatCompositionTime(fromCompT, toCompT) {
2874
2874
  import { useMemo as useMemo3 } from "react";
2875
2875
 
2876
2876
  // src/player/lib/timelineDOM.ts
2877
+ function resolveClipTag(clip) {
2878
+ return clip.tagName || clip.kind || "div";
2879
+ }
2877
2880
  function createTimelineElementFromManifestClip(params) {
2878
2881
  const { clip, fallbackIndex, doc } = params;
2879
2882
  let hostEl = params.hostEl ?? null;
2880
2883
  const label = getTimelineElementDisplayLabel({
2881
2884
  id: clip.id,
2882
2885
  label: clip.label,
2883
- tag: clip.tagName || clip.kind
2886
+ tag: resolveClipTag(clip)
2884
2887
  });
2885
2888
  let domId;
2886
2889
  let selector;
@@ -2907,7 +2910,7 @@ function createTimelineElementFromManifestClip(params) {
2907
2910
  id: identity.id,
2908
2911
  label,
2909
2912
  key: identity.key,
2910
- tag: clip.tagName || clip.kind,
2913
+ tag: resolveClipTag(clip),
2911
2914
  start: clip.start,
2912
2915
  duration: clip.duration,
2913
2916
  track: clip.track,
@@ -4158,8 +4161,10 @@ var ICONS = {
4158
4161
  sfx: IconAudio
4159
4162
  };
4160
4163
  function getTrackStyle(tag) {
4161
- const trackStyle = getTimelineTrackStyle(tag);
4162
- const normalized = tag.toLowerCase();
4164
+ if (!tag) console.warn("[Timeline] getTrackStyle received empty tag, defaulting to div");
4165
+ const safeTag = tag || "div";
4166
+ const trackStyle = getTimelineTrackStyle(safeTag);
4167
+ const normalized = safeTag.toLowerCase();
4163
4168
  const icon = normalized.startsWith("h") && normalized.length === 2 && "123456".includes(normalized[1] ?? "") ? ICONS.h1 : ICONS[normalized] ?? IconComposition;
4164
4169
  return { ...trackStyle, icon };
4165
4170
  }