@hyperframes/studio 0.7.2 → 0.7.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/studio",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,9 +45,9 @@
45
45
  "dompurify": "^3.2.4",
46
46
  "marked": "^14.1.4",
47
47
  "mediabunny": "^1.45.3",
48
- "@hyperframes/core": "0.7.2",
49
- "@hyperframes/player": "0.7.2",
50
- "@hyperframes/sdk": "0.7.2"
48
+ "@hyperframes/core": "0.7.4",
49
+ "@hyperframes/player": "0.7.4",
50
+ "@hyperframes/sdk": "0.7.4"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/react": "19",
@@ -62,7 +62,7 @@
62
62
  "vite": "^6.4.2",
63
63
  "vitest": "^3.2.4",
64
64
  "zustand": "^5.0.0",
65
- "@hyperframes/producer": "0.7.2"
65
+ "@hyperframes/producer": "0.7.4"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "19",
@@ -39,8 +39,10 @@ const ICONS: Record<string, ReactNode> = {
39
39
  };
40
40
 
41
41
  export function getTrackStyle(tag: string): TrackVisualStyle {
42
- const trackStyle = getTimelineTrackStyle(tag);
43
- const normalized = tag.toLowerCase();
42
+ if (!tag) console.warn("[Timeline] getTrackStyle received empty tag, defaulting to div");
43
+ const safeTag = tag || "div";
44
+ const trackStyle = getTimelineTrackStyle(safeTag);
45
+ const normalized = safeTag.toLowerCase();
44
46
  const icon =
45
47
  normalized.startsWith("h") && normalized.length === 2 && "123456".includes(normalized[1] ?? "")
46
48
  ? ICONS.h1
@@ -61,6 +61,10 @@ export {
61
61
  // TimelineElement factories
62
62
  // ---------------------------------------------------------------------------
63
63
 
64
+ function resolveClipTag(clip: ClipManifestClip): string {
65
+ return clip.tagName || clip.kind || "div";
66
+ }
67
+
64
68
  export function createTimelineElementFromManifestClip(params: {
65
69
  clip: ClipManifestClip;
66
70
  fallbackIndex: number;
@@ -72,7 +76,7 @@ export function createTimelineElementFromManifestClip(params: {
72
76
  const label = getTimelineElementDisplayLabel({
73
77
  id: clip.id,
74
78
  label: clip.label,
75
- tag: clip.tagName || clip.kind,
79
+ tag: resolveClipTag(clip),
76
80
  });
77
81
 
78
82
  let domId: string | undefined;
@@ -103,7 +107,7 @@ export function createTimelineElementFromManifestClip(params: {
103
107
  id: identity.id,
104
108
  label,
105
109
  key: identity.key,
106
- tag: clip.tagName || clip.kind,
110
+ tag: resolveClipTag(clip),
107
111
  start: clip.start,
108
112
  duration: clip.duration,
109
113
  track: clip.track,