@hyperframes/studio 0.8.104 → 0.8.105

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.
Files changed (169) hide show
  1. package/dist/assets/{hyperframes-player-DAoaajuM.js → hyperframes-player-tnfCiVdR.js} +1 -1
  2. package/dist/assets/{index-BDK4rTMb.js → index-Ca6LZlVb.js} +1 -1
  3. package/dist/assets/index-Cre9X4RS.css +1 -0
  4. package/dist/assets/{index-De2aO4XM.js → index-DEDhPmPD.js} +205 -205
  5. package/dist/assets/{index-WV9LroAD.js → index-zpe332hb.js} +1 -1
  6. package/dist/{chunk-62DDWOSH.js → chunk-EEXSYY5F.js} +19 -18
  7. package/dist/chunk-EEXSYY5F.js.map +1 -0
  8. package/dist/{chunk-6GAO75IU.js → chunk-NCUBAVGK.js} +10 -8
  9. package/dist/chunk-NCUBAVGK.js.map +1 -0
  10. package/dist/{chunk-HIGHVWYD.js → chunk-QADHJFDF.js} +2 -2
  11. package/dist/index.css +6 -1
  12. package/dist/index.css.map +1 -1
  13. package/dist/index.html +2 -2
  14. package/dist/index.js +614 -638
  15. package/dist/index.js.map +1 -1
  16. package/dist/player.js +2 -2
  17. package/dist/styles/tailwind-preset.js.map +1 -1
  18. package/dist/styles.css +1 -1
  19. package/dist/ui.js +2 -2
  20. package/package.json +8 -8
  21. package/src/captions/components/CaptionAnimationPanel.tsx +2 -2
  22. package/src/captions/components/CaptionPropertyPanel.tsx +2 -2
  23. package/src/captions/components/CaptionTimeline.tsx +3 -3
  24. package/src/components/AskAgentModal.tsx +1 -1
  25. package/src/components/LintModal.tsx +35 -35
  26. package/src/components/StudioErrorBoundary.tsx +1 -1
  27. package/src/components/StudioHeader.dom.test.tsx +4 -4
  28. package/src/components/StudioHeader.tsx +2 -1
  29. package/src/components/StudioToast.tsx +7 -16
  30. package/src/components/TimelineToolPicker.tsx +1 -1
  31. package/src/components/TimelineToolbar.tsx +11 -11
  32. package/src/components/dock/Dock.tsx +1 -1
  33. package/src/components/dock/dock.css +9 -1
  34. package/src/components/editor/AnimationCard.tsx +5 -5
  35. package/src/components/editor/AnimationCardParts.tsx +1 -1
  36. package/src/components/editor/BlockParamsPanel.tsx +3 -3
  37. package/src/components/editor/BorderRadiusEditor.tsx +8 -15
  38. package/src/components/editor/CanvasContextMenu.tsx +1 -1
  39. package/src/components/editor/ComputedTweenNotice.tsx +1 -1
  40. package/src/components/editor/DomEditRotateHandle.tsx +1 -1
  41. package/src/components/editor/EaseCurveSection.tsx +14 -19
  42. package/src/components/editor/EaseModeControls.tsx +2 -2
  43. package/src/components/editor/EaseParamFields.tsx +8 -8
  44. package/src/components/editor/FileTree.tsx +1 -1
  45. package/src/components/editor/FileTreeIcons.tsx +47 -26
  46. package/src/components/editor/FileTreeNodes.tsx +11 -8
  47. package/src/components/editor/GestureRecordControl.tsx +3 -3
  48. package/src/components/editor/GsapAddAnimationControl.tsx +1 -1
  49. package/src/components/editor/GsapAnimationSection.tsx +2 -2
  50. package/src/components/editor/InlineTextToolbar.tsx +4 -4
  51. package/src/components/editor/InspectorHeaderActions.tsx +1 -1
  52. package/src/components/editor/KeyframeDiamond.tsx +6 -4
  53. package/src/components/editor/KeyframeNavigation.tsx +4 -4
  54. package/src/components/editor/LayersPanel.tsx +3 -3
  55. package/src/components/editor/PromotableControl.tsx +2 -2
  56. package/src/components/editor/PropertyPanelEmptyState.tsx +4 -4
  57. package/src/components/editor/PropertyPanelFlatFooter.tsx +2 -2
  58. package/src/components/editor/PropertyPanelFlatHeader.test.tsx +1 -1
  59. package/src/components/editor/PropertyPanelFlatHeader.tsx +2 -2
  60. package/src/components/editor/SnapToolbar.tsx +5 -5
  61. package/src/components/editor/TimelineFxPopover.tsx +4 -4
  62. package/src/components/editor/Transform3DCube.tsx +1 -1
  63. package/src/components/editor/anchoredResizeReleaseShift.test.ts +0 -84
  64. package/src/components/editor/easeCurveSvg.tsx +1 -1
  65. package/src/components/editor/manualEditsDom.ts +3 -3
  66. package/src/components/editor/manualEditsDomPatches.test.ts +2 -86
  67. package/src/components/editor/manualEditsDomPatches.ts +0 -30
  68. package/src/components/editor/manualEditsSnapshot.ts +1 -0
  69. package/src/components/editor/persistSeam.integration.test.ts +0 -18
  70. package/src/components/editor/plainTranslate.ts +34 -3
  71. package/src/components/editor/propertyPanelColorCurveGraph.tsx +2 -2
  72. package/src/components/editor/propertyPanelColorGradingControls.tsx +1 -1
  73. package/src/components/editor/propertyPanelColorGradingSection.tsx +8 -8
  74. package/src/components/editor/propertyPanelColorGradingSlider.tsx +1 -1
  75. package/src/components/editor/propertyPanelColorSecondary.tsx +4 -4
  76. package/src/components/editor/propertyPanelFill.tsx +6 -6
  77. package/src/components/editor/propertyPanelFlatColorGradingAccessory.tsx +3 -3
  78. package/src/components/editor/propertyPanelFlatColorGradingSection.test.tsx +1 -1
  79. package/src/components/editor/propertyPanelFlatColorGradingSection.tsx +6 -9
  80. package/src/components/editor/propertyPanelFlatEffectsSection.tsx +4 -4
  81. package/src/components/editor/propertyPanelFlatMediaSection.tsx +2 -2
  82. package/src/components/editor/propertyPanelFlatMotionSection.tsx +2 -2
  83. package/src/components/editor/propertyPanelFlatOverlaysSection.tsx +2 -2
  84. package/src/components/editor/propertyPanelFlatPrimitives.test.tsx +4 -3
  85. package/src/components/editor/propertyPanelFlatPrimitives.tsx +1 -1
  86. package/src/components/editor/propertyPanelFlatSliderReadout.tsx +1 -1
  87. package/src/components/editor/propertyPanelFont.tsx +2 -2
  88. package/src/components/editor/propertyPanelFxCarveModule.tsx +1 -1
  89. package/src/components/editor/propertyPanelFxControls.tsx +2 -2
  90. package/src/components/editor/propertyPanelFxEqModule.tsx +2 -2
  91. package/src/components/editor/propertyPanelFxNodeRow.tsx +1 -1
  92. package/src/components/editor/propertyPanelFxPresetRun.tsx +1 -1
  93. package/src/components/editor/propertyPanelMediaSection.tsx +1 -1
  94. package/src/components/editor/propertyPanelPrimitives.tsx +1 -1
  95. package/src/components/editor/propertyPanelSections.tsx +2 -2
  96. package/src/components/editor/propertyPanelValueTier.test.ts +1 -1
  97. package/src/components/editor/propertyPanelValueTier.ts +1 -1
  98. package/src/components/feedback/StudioFeedbackCard.tsx +11 -23
  99. package/src/components/nle/AssetPreviewOverlay.tsx +1 -1
  100. package/src/components/nle/AudioMeterStrip.tsx +2 -2
  101. package/src/components/nle/NLEPreview.test.ts +8 -4
  102. package/src/components/nle/PreviewOverlays.tsx +1 -1
  103. package/src/components/nle/PreviewPane.tsx +3 -3
  104. package/src/components/nle/PreviewPoster.tsx +29 -1
  105. package/src/components/nle/PreviewZoomOverlay.tsx +1 -1
  106. package/src/components/panels/SlideshowPanel.tsx +4 -4
  107. package/src/components/panels/SlideshowSubPanels.tsx +19 -21
  108. package/src/components/panels/VariablesBindElement.tsx +1 -1
  109. package/src/components/panels/VariablesDeclarationForm.tsx +1 -1
  110. package/src/components/panels/VariablesPanel.tsx +4 -6
  111. package/src/components/panels/VariablesRowAction.tsx +1 -1
  112. package/src/components/renders/FfmpegRequiredNotice.tsx +4 -4
  113. package/src/components/renders/RenderQueue.tsx +2 -2
  114. package/src/components/renders/RenderQueueItem.tsx +3 -3
  115. package/src/components/sidebar/AssetCard.tsx +3 -3
  116. package/src/components/sidebar/AssetContextMenu.tsx +7 -7
  117. package/src/components/sidebar/AssetsTab.tsx +6 -6
  118. package/src/components/sidebar/AudioRow.tsx +5 -3
  119. package/src/components/sidebar/BlocksTab.tsx +6 -6
  120. package/src/components/sidebar/CompositionsTab.drag.test.tsx +3 -69
  121. package/src/components/sidebar/CompositionsTab.rootBadge.test.tsx +4 -50
  122. package/src/components/sidebar/CompositionsTab.thumbnails.test.tsx +256 -0
  123. package/src/components/sidebar/CompositionsTab.tsx +65 -12
  124. package/src/components/sidebar/PromptPreviewModal.tsx +3 -3
  125. package/src/components/sidebar/SidebarLintButton.tsx +3 -3
  126. package/src/components/sidebar/compositionsTabTestUtils.tsx +39 -0
  127. package/src/components/timelineToolbarStyles.ts +3 -3
  128. package/src/components/ui/Button.tsx +4 -4
  129. package/src/components/ui/HyperframesLogo.tsx +19 -18
  130. package/src/components/ui/Input.tsx +1 -1
  131. package/src/components/ui/Menu.tsx +4 -2
  132. package/src/hooks/elementOffsetStager.ts +8 -7
  133. package/src/hooks/useClipboard.source.test.ts +42 -4
  134. package/src/hooks/useClipboard.ts +13 -3
  135. package/src/hooks/useDomEditCommits.ts +0 -3
  136. package/src/hooks/useDomGeometryCommit.test.tsx +4 -1
  137. package/src/hooks/useDomGeometryCommit.ts +0 -1
  138. package/src/hooks/useDomGeometryCommits.test.tsx +177 -32
  139. package/src/hooks/useDomGeometryCommits.ts +4 -49
  140. package/src/player/components/ClipContextMenu.tsx +1 -1
  141. package/src/player/components/CompositionThumbnail.tsx +23 -11
  142. package/src/player/components/EditModal.tsx +6 -6
  143. package/src/player/components/KeyframeDiamondContextMenu.tsx +2 -2
  144. package/src/player/components/PlayerControls.tsx +3 -3
  145. package/src/player/components/ShortcutsPanel.tsx +8 -20
  146. package/src/player/components/TimelineCanvas.tsx +1 -1
  147. package/src/player/components/TimelineClip.tsx +2 -2
  148. package/src/player/components/TimelineEmptyState.tsx +2 -2
  149. package/src/player/components/TimelineLanes.tsx +0 -1
  150. package/src/player/components/TrackClipCount.tsx +1 -1
  151. package/src/player/components/VolumeControl.tsx +1 -1
  152. package/src/player/components/timelineClipChildren.tsx +1 -1
  153. package/src/player/components/timelineMotionStyles.test.ts +6 -22
  154. package/src/player/components/trackHeaderLabelRows.tsx +16 -16
  155. package/src/player/lib/thumbnailScheduler.ts +4 -5
  156. package/src/player/lib/timelineViewportBudgets.test.ts +1 -1
  157. package/src/player/lib/timelineViewportBudgets.ts +1 -1
  158. package/src/styles/hex-baseline.json +7 -19
  159. package/src/styles/studio.css +0 -9
  160. package/src/styles/tailwind-preset.shared.js +2 -1
  161. package/src/styles/theme.css +204 -147
  162. package/src/styles/theme.test.ts +13 -9
  163. package/src/utils/blockCategories.ts +41 -9
  164. package/src/utils/clipboardPayload.ts +2 -0
  165. package/dist/assets/index-CQN3M56N.css +0 -1
  166. package/dist/chunk-62DDWOSH.js.map +0 -1
  167. package/dist/chunk-6GAO75IU.js.map +0 -1
  168. package/src/hooks/gsapTargetCache.ts +0 -62
  169. /package/dist/{chunk-HIGHVWYD.js.map → chunk-QADHJFDF.js.map} +0 -0
@@ -2,7 +2,7 @@
2
2
 
3
3
  /** Guards the ways `theme.css` can silently break: a dropped CSS custom
4
4
  * property, a utility that stops compiling, the stock Tailwind palette
5
- * leaking back in, or the JS preset / legacy colours drifting from it. */
5
+ * leaking back in, or the legacy colours drifting from it. */
6
6
 
7
7
  import { readFileSync } from "node:fs";
8
8
  import path from "node:path";
@@ -11,7 +11,6 @@ import { createRoot } from "react-dom/client";
11
11
  import { Gear, IconContext } from "@phosphor-icons/react";
12
12
  import { compile } from "tailwindcss";
13
13
  import { afterEach, describe, expect, it } from "vitest";
14
- import studioPreset from "./tailwind-preset.shared.js";
15
14
  import { readIconTokens } from "./iconTokens";
16
15
  import { loadStylesheet, STYLES_DIR, TAILWIND_DIR } from "./styleSources";
17
16
 
@@ -52,7 +51,9 @@ describe("studio theme", () => {
52
51
  it("emits the semantic palette as custom properties and as utilities", async () => {
53
52
  const css = await build("studio.css", ["bg-accent", "text-text-2", "border-border"]);
54
53
 
55
- expect(rootVariables(css).get("--color-accent")).toBe("#3ce6ac");
54
+ expect(rootVariables(css).get("--color-accent")).toBe(
55
+ "light-dark(oklch(0.536 0.114 164), oklch(0.82 0.159 164))",
56
+ );
56
57
  expect(css).toContain(".bg-accent {");
57
58
  expect(css).toContain("background-color: var(--color-accent)");
58
59
  });
@@ -127,7 +128,7 @@ describe("studio theme", () => {
127
128
  expect(css).toContain(".duration-open {");
128
129
  });
129
130
 
130
- it("keeps every legacy Tailwind palette entry at its upstream default value", async () => {
131
+ it("keeps every legacy Tailwind palette entry that is not a role at its upstream value", async () => {
131
132
  // These are copies of Tailwind's own values, kept only so existing markup
132
133
  // renders unchanged. A Tailwind upgrade that moves one of them would
133
134
  // otherwise silently change Studio's colors.
@@ -138,7 +139,9 @@ describe("studio theme", () => {
138
139
  ),
139
140
  ].map(([, name, value]) => [name, value.trim()]),
140
141
  );
141
- const legacy = [...themeSource.matchAll(/\n\s*(--color-[a-z]+-(?:50|\d00|950)):\s*([^;]+);/g)];
142
+ const legacy = [
143
+ ...themeSource.matchAll(/\n\s*(--color-[a-z]+-(?:50|\d00|950)):\s*([^;]+);/g),
144
+ ].filter(([, , value]) => !value.trim().startsWith("var("));
142
145
 
143
146
  expect(legacy.length).toBeGreaterThan(0);
144
147
  for (const [, name, value] of legacy) {
@@ -147,11 +150,12 @@ describe("studio theme", () => {
147
150
  }
148
151
  });
149
152
 
150
- it("keeps the deprecated JS preset in step with the CSS it shadows", () => {
151
- const colors = studioPreset.theme.extend.colors;
153
+ it("maps every neutral step onto a Graphite role, so the stock scale follows the theme", () => {
154
+ const steps = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
152
155
 
153
- expect(colors.studio.accent.toLowerCase()).toBe(declaredValue("--color-accent"));
154
- expect(colors.panel.surface.toLowerCase()).toBe(declaredValue("--color-surface"));
156
+ for (const step of steps) {
157
+ expect(declaredValue(`--color-neutral-${step}`)).toMatch(/^var\(--color-[a-z0-9-]+\)$/);
158
+ }
155
159
  });
156
160
 
157
161
  it("reads the icon defaults off the theme rather than hard-coding them", () => {
@@ -8,15 +8,47 @@ export type { BlockCategory };
8
8
  export { BLOCK_CATEGORIES, resolveBlockCategory };
9
9
 
10
10
  const COLOR_MAP: Record<BlockCategory, { bg: string; text: string; dot: string }> = {
11
- transitions: { bg: "bg-blue-500/15", text: "text-blue-400", dot: "bg-blue-400" },
12
- vfx: { bg: "bg-purple-500/15", text: "text-purple-400", dot: "bg-purple-400" },
13
- social: { bg: "bg-pink-500/15", text: "text-pink-400", dot: "bg-pink-400" },
14
- data: { bg: "bg-green-500/15", text: "text-green-400", dot: "bg-green-400" },
15
- scenes: { bg: "bg-amber-500/15", text: "text-amber-400", dot: "bg-amber-400" },
16
- captions: { bg: "bg-cyan-500/15", text: "text-cyan-400", dot: "bg-cyan-400" },
17
- effects: { bg: "bg-rose-500/15", text: "text-rose-400", dot: "bg-rose-400" },
18
- "text-effects": { bg: "bg-violet-500/15", text: "text-violet-400", dot: "bg-violet-400" },
19
- "code-animation": { bg: "bg-emerald-500/15", text: "text-emerald-400", dot: "bg-emerald-400" },
11
+ transitions: {
12
+ bg: "bg-blue-500/15",
13
+ text: "text-[light-dark(oklch(0.48_0.12_255),var(--color-blue-400))]",
14
+ dot: "bg-[light-dark(oklch(0.48_0.12_255),var(--color-blue-400))]",
15
+ },
16
+ vfx: {
17
+ bg: "bg-purple-500/15",
18
+ text: "text-[light-dark(oklch(0.48_0.12_305),var(--color-purple-400))]",
19
+ dot: "bg-[light-dark(oklch(0.48_0.12_305),var(--color-purple-400))]",
20
+ },
21
+ social: {
22
+ bg: "bg-pink-500/15",
23
+ text: "text-[light-dark(oklch(0.48_0.12_350),var(--color-pink-400))]",
24
+ dot: "bg-[light-dark(oklch(0.48_0.12_350),var(--color-pink-400))]",
25
+ },
26
+ data: {
27
+ bg: "bg-green-500/15",
28
+ text: "text-[light-dark(oklch(0.48_0.12_152),var(--color-green-400))]",
29
+ dot: "bg-[light-dark(oklch(0.48_0.12_152),var(--color-green-400))]",
30
+ },
31
+ scenes: { bg: "bg-amber-500/15", text: "text-warning-ink", dot: "bg-warning-ink" },
32
+ captions: {
33
+ bg: "bg-cyan-500/15",
34
+ text: "text-[light-dark(oklch(0.48_0.12_212),var(--color-cyan-400))]",
35
+ dot: "bg-[light-dark(oklch(0.48_0.12_212),var(--color-cyan-400))]",
36
+ },
37
+ effects: {
38
+ bg: "bg-rose-500/15",
39
+ text: "text-[light-dark(oklch(0.48_0.12_13),var(--color-rose-400))]",
40
+ dot: "bg-[light-dark(oklch(0.48_0.12_13),var(--color-rose-400))]",
41
+ },
42
+ "text-effects": {
43
+ bg: "bg-violet-500/15",
44
+ text: "text-[light-dark(oklch(0.48_0.12_294),var(--color-violet-400))]",
45
+ dot: "bg-[light-dark(oklch(0.48_0.12_294),var(--color-violet-400))]",
46
+ },
47
+ "code-animation": {
48
+ bg: "bg-emerald-500/15",
49
+ text: "text-[light-dark(oklch(0.48_0.12_163),var(--color-emerald-400))]",
50
+ dot: "bg-[light-dark(oklch(0.48_0.12_163),var(--color-emerald-400))]",
51
+ },
20
52
  };
21
53
 
22
54
  export function getCategoryColors(category: BlockCategory) {
@@ -22,6 +22,7 @@ export type ClipboardPayload =
22
22
  kind: "dom-element";
23
23
  html: string;
24
24
  sourceFile: string;
25
+ projectId?: string;
25
26
  originSelector?: string;
26
27
  originSelectorIndex?: number;
27
28
  };
@@ -70,6 +71,7 @@ export function deserializeClipboardPayload(json: string): ClipboardPayload | nu
70
71
  kind: "dom-element",
71
72
  html: obj.html,
72
73
  sourceFile: obj.sourceFile,
74
+ projectId: typeof obj.projectId === "string" ? obj.projectId : undefined,
73
75
  originSelector: typeof obj.originSelector === "string" ? obj.originSelector : undefined,
74
76
  originSelectorIndex:
75
77
  typeof obj.originSelectorIndex === "number" ? obj.originSelectorIndex : undefined,