@hyperframes/studio 0.8.103 → 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 (200) hide show
  1. package/dist/assets/{hyperframes-player-DG795Hwu.js → hyperframes-player-tnfCiVdR.js} +1 -1
  2. package/dist/assets/{index-BiEtDkae.js → index-Ca6LZlVb.js} +1 -1
  3. package/dist/assets/index-Cre9X4RS.css +1 -0
  4. package/dist/assets/{index-BPJRf2X9.js → index-DEDhPmPD.js} +215 -215
  5. package/dist/assets/{index-DuCZ3pQw.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.d.ts +181 -168
  14. package/dist/index.html +2 -2
  15. package/dist/index.js +1018 -919
  16. package/dist/index.js.map +1 -1
  17. package/dist/player.js +2 -2
  18. package/dist/styles/tailwind-preset.js.map +1 -1
  19. package/dist/styles.css +1 -1
  20. package/dist/ui.js +2 -2
  21. package/package.json +8 -8
  22. package/src/captions/components/CaptionAnimationPanel.tsx +2 -2
  23. package/src/captions/components/CaptionPropertyPanel.tsx +2 -2
  24. package/src/captions/components/CaptionTimeline.tsx +3 -3
  25. package/src/components/AskAgentModal.tsx +1 -1
  26. package/src/components/LintModal.tsx +35 -35
  27. package/src/components/StudioErrorBoundary.tsx +1 -1
  28. package/src/components/StudioHeader.dom.test.tsx +4 -4
  29. package/src/components/StudioHeader.tsx +2 -1
  30. package/src/components/StudioToast.tsx +7 -16
  31. package/src/components/TimelineToolPicker.tsx +1 -1
  32. package/src/components/TimelineToolbar.tsx +11 -11
  33. package/src/components/dock/Dock.tsx +1 -1
  34. package/src/components/dock/dock.css +9 -1
  35. package/src/components/editor/AnimationCard.tsx +5 -5
  36. package/src/components/editor/AnimationCardParts.tsx +1 -1
  37. package/src/components/editor/BlockParamsPanel.tsx +3 -3
  38. package/src/components/editor/BorderRadiusEditor.tsx +8 -15
  39. package/src/components/editor/CanvasContextMenu.tsx +1 -1
  40. package/src/components/editor/ComputedTweenNotice.tsx +1 -1
  41. package/src/components/editor/DomEditOverlay.tsx +5 -6
  42. package/src/components/editor/DomEditRotateHandle.tsx +1 -1
  43. package/src/components/editor/EaseCurveSection.tsx +14 -19
  44. package/src/components/editor/EaseModeControls.tsx +2 -2
  45. package/src/components/editor/EaseParamFields.tsx +8 -8
  46. package/src/components/editor/FileTree.tsx +1 -1
  47. package/src/components/editor/FileTreeIcons.tsx +47 -26
  48. package/src/components/editor/FileTreeNodes.tsx +11 -8
  49. package/src/components/editor/GestureRecordControl.tsx +3 -3
  50. package/src/components/editor/GsapAddAnimationControl.tsx +1 -1
  51. package/src/components/editor/GsapAnimationSection.tsx +2 -2
  52. package/src/components/editor/InlineTextToolbar.tsx +4 -4
  53. package/src/components/editor/InspectorHeaderActions.tsx +1 -1
  54. package/src/components/editor/KeyframeDiamond.tsx +6 -4
  55. package/src/components/editor/KeyframeNavigation.tsx +4 -4
  56. package/src/components/editor/LayersPanel.tsx +3 -3
  57. package/src/components/editor/PromotableControl.tsx +2 -2
  58. package/src/components/editor/PropertyPanel.tsx +3 -3
  59. package/src/components/editor/PropertyPanelEmptyState.tsx +4 -4
  60. package/src/components/editor/PropertyPanelFlatFooter.tsx +2 -2
  61. package/src/components/editor/PropertyPanelFlatHeader.test.tsx +1 -1
  62. package/src/components/editor/PropertyPanelFlatHeader.tsx +2 -2
  63. package/src/components/editor/SnapToolbar.tsx +5 -5
  64. package/src/components/editor/TimelineFxPopover.tsx +4 -4
  65. package/src/components/editor/Transform3DCube.tsx +1 -1
  66. package/src/components/editor/anchoredResizeCommitFeedsOffset.test.ts +46 -6
  67. package/src/components/editor/anchoredResizeReleaseShift.test.ts +0 -84
  68. package/src/components/editor/domEditOverlayGestures.ts +13 -19
  69. package/src/components/editor/domEditOverlayStartGesture.test.ts +170 -13
  70. package/src/components/editor/domEditOverlayStartGesture.ts +15 -25
  71. package/src/components/editor/easeCurveSvg.tsx +1 -1
  72. package/src/components/editor/manualEdits.test.ts +3 -9
  73. package/src/components/editor/manualEdits.ts +0 -1
  74. package/src/components/editor/manualEditsDom.ts +3 -13
  75. package/src/components/editor/manualEditsDomPatches.test.ts +3 -131
  76. package/src/components/editor/manualEditsDomPatches.ts +1 -53
  77. package/src/components/editor/manualEditsSnapshot.ts +3 -0
  78. package/src/components/editor/manualEditsTypes.ts +2 -0
  79. package/src/components/editor/manualOffsetDrag.test.ts +41 -0
  80. package/src/components/editor/manualOffsetDrag.ts +6 -27
  81. package/src/components/editor/persistSeam.integration.test.ts +0 -18
  82. package/src/components/editor/plainTranslate.ts +42 -6
  83. package/src/components/editor/propertyPanelColorCurveGraph.tsx +2 -2
  84. package/src/components/editor/propertyPanelColorGradingControls.tsx +1 -1
  85. package/src/components/editor/propertyPanelColorGradingSection.tsx +8 -8
  86. package/src/components/editor/propertyPanelColorGradingSlider.tsx +1 -1
  87. package/src/components/editor/propertyPanelColorSecondary.tsx +4 -4
  88. package/src/components/editor/propertyPanelFill.tsx +6 -6
  89. package/src/components/editor/propertyPanelFlatColorGradingAccessory.tsx +3 -3
  90. package/src/components/editor/propertyPanelFlatColorGradingSection.test.tsx +1 -1
  91. package/src/components/editor/propertyPanelFlatColorGradingSection.tsx +6 -9
  92. package/src/components/editor/propertyPanelFlatEffectsSection.tsx +4 -4
  93. package/src/components/editor/propertyPanelFlatMediaSection.tsx +2 -2
  94. package/src/components/editor/propertyPanelFlatMotionSection.tsx +2 -2
  95. package/src/components/editor/propertyPanelFlatOverlaysSection.tsx +2 -2
  96. package/src/components/editor/propertyPanelFlatPrimitives.test.tsx +4 -3
  97. package/src/components/editor/propertyPanelFlatPrimitives.tsx +1 -1
  98. package/src/components/editor/propertyPanelFlatSliderReadout.tsx +1 -1
  99. package/src/components/editor/propertyPanelFont.tsx +2 -2
  100. package/src/components/editor/propertyPanelFxCarveModule.tsx +1 -1
  101. package/src/components/editor/propertyPanelFxControls.tsx +2 -2
  102. package/src/components/editor/propertyPanelFxEqModule.tsx +2 -2
  103. package/src/components/editor/propertyPanelFxNodeRow.tsx +1 -1
  104. package/src/components/editor/propertyPanelFxPresetRun.tsx +1 -1
  105. package/src/components/editor/propertyPanelMediaSection.tsx +1 -1
  106. package/src/components/editor/propertyPanelPrimitives.tsx +1 -1
  107. package/src/components/editor/propertyPanelSections.tsx +2 -2
  108. package/src/components/editor/propertyPanelTransformCommit.test.ts +29 -0
  109. package/src/components/editor/propertyPanelTransformCommit.ts +8 -5
  110. package/src/components/editor/propertyPanelTypes.ts +1 -0
  111. package/src/components/editor/propertyPanelValueTier.test.ts +1 -1
  112. package/src/components/editor/propertyPanelValueTier.ts +1 -1
  113. package/src/components/editor/rotateInlineSave.test.ts +111 -0
  114. package/src/components/editor/rotationDraft.test.ts +111 -0
  115. package/src/components/editor/rotationDraft.ts +145 -0
  116. package/src/components/editor/useDomEditNudge.test.tsx +33 -0
  117. package/src/components/editor/useDomEditNudge.ts +6 -2
  118. package/src/components/editor/useDomEditOverlayGestures.ts +22 -24
  119. package/src/components/feedback/StudioFeedbackCard.tsx +11 -23
  120. package/src/components/nle/AssetPreviewOverlay.tsx +1 -1
  121. package/src/components/nle/AudioMeterStrip.tsx +2 -2
  122. package/src/components/nle/NLEPreview.test.ts +8 -4
  123. package/src/components/nle/PreviewOverlays.tsx +1 -1
  124. package/src/components/nle/PreviewPane.tsx +3 -3
  125. package/src/components/nle/PreviewPoster.tsx +29 -1
  126. package/src/components/nle/PreviewZoomOverlay.tsx +1 -1
  127. package/src/components/panels/SlideshowPanel.tsx +4 -4
  128. package/src/components/panels/SlideshowSubPanels.tsx +19 -21
  129. package/src/components/panels/VariablesBindElement.tsx +1 -1
  130. package/src/components/panels/VariablesDeclarationForm.tsx +1 -1
  131. package/src/components/panels/VariablesPanel.tsx +4 -6
  132. package/src/components/panels/VariablesRowAction.tsx +1 -1
  133. package/src/components/renders/FfmpegRequiredNotice.tsx +4 -4
  134. package/src/components/renders/RenderQueue.tsx +2 -2
  135. package/src/components/renders/RenderQueueItem.tsx +3 -3
  136. package/src/components/sidebar/AssetCard.tsx +3 -3
  137. package/src/components/sidebar/AssetContextMenu.tsx +7 -7
  138. package/src/components/sidebar/AssetsTab.tsx +6 -6
  139. package/src/components/sidebar/AudioRow.tsx +5 -3
  140. package/src/components/sidebar/BlocksTab.tsx +6 -6
  141. package/src/components/sidebar/CompositionsTab.drag.test.tsx +3 -69
  142. package/src/components/sidebar/CompositionsTab.rootBadge.test.tsx +4 -50
  143. package/src/components/sidebar/CompositionsTab.thumbnails.test.tsx +256 -0
  144. package/src/components/sidebar/CompositionsTab.tsx +65 -12
  145. package/src/components/sidebar/PromptPreviewModal.tsx +3 -3
  146. package/src/components/sidebar/SidebarLintButton.tsx +3 -3
  147. package/src/components/sidebar/compositionsTabTestUtils.tsx +39 -0
  148. package/src/components/timelineToolbarStyles.ts +3 -3
  149. package/src/components/ui/Button.tsx +4 -4
  150. package/src/components/ui/HyperframesLogo.tsx +19 -18
  151. package/src/components/ui/Input.tsx +1 -1
  152. package/src/components/ui/Menu.tsx +4 -2
  153. package/src/hooks/draggedGsapPosition.ts +28 -0
  154. package/src/hooks/elementOffsetStager.ts +34 -13
  155. package/src/hooks/gsapRuntimeBridge.ts +5 -3
  156. package/src/hooks/gsapRuntimeKeyframes.ts +36 -2
  157. package/src/hooks/plainRotation.test.ts +122 -0
  158. package/src/hooks/plainRotation.ts +42 -0
  159. package/src/hooks/useClipboard.source.test.ts +42 -4
  160. package/src/hooks/useClipboard.ts +13 -3
  161. package/src/hooks/useDomEditCommits.ts +0 -3
  162. package/src/hooks/useDomEditSession.ts +5 -5
  163. package/src/hooks/useDomGeometryCommit.test.tsx +79 -1
  164. package/src/hooks/useDomGeometryCommit.ts +16 -17
  165. package/src/hooks/useDomGeometryCommits.test.tsx +233 -33
  166. package/src/hooks/useDomGeometryCommits.ts +27 -80
  167. package/src/hooks/useGsapAwareEditing.test.tsx +194 -11
  168. package/src/hooks/useGsapAwareEditing.ts +43 -42
  169. package/src/hooks/useInlineTextEdit.test.tsx +33 -3
  170. package/src/hooks/useInlineTextEdit.ts +2 -2
  171. package/src/player/components/ClipContextMenu.tsx +1 -1
  172. package/src/player/components/CompositionThumbnail.tsx +23 -11
  173. package/src/player/components/EditModal.tsx +6 -6
  174. package/src/player/components/KeyframeDiamondContextMenu.tsx +2 -2
  175. package/src/player/components/PlayerControls.tsx +3 -3
  176. package/src/player/components/ShortcutsPanel.tsx +8 -20
  177. package/src/player/components/TimelineCanvas.tsx +1 -1
  178. package/src/player/components/TimelineClip.tsx +2 -2
  179. package/src/player/components/TimelineEmptyState.tsx +2 -2
  180. package/src/player/components/TimelineLanes.tsx +0 -1
  181. package/src/player/components/TrackClipCount.tsx +1 -1
  182. package/src/player/components/VolumeControl.tsx +1 -1
  183. package/src/player/components/timelineClipChildren.tsx +1 -1
  184. package/src/player/components/timelineMotionStyles.test.ts +6 -22
  185. package/src/player/components/trackHeaderLabelRows.tsx +16 -16
  186. package/src/player/lib/thumbnailScheduler.ts +4 -5
  187. package/src/player/lib/timelineViewportBudgets.test.ts +1 -1
  188. package/src/player/lib/timelineViewportBudgets.ts +1 -1
  189. package/src/styles/hex-baseline.json +7 -19
  190. package/src/styles/studio.css +0 -9
  191. package/src/styles/tailwind-preset.shared.js +2 -1
  192. package/src/styles/theme.css +204 -147
  193. package/src/styles/theme.test.ts +13 -9
  194. package/src/utils/blockCategories.ts +41 -9
  195. package/src/utils/clipboardPayload.ts +2 -0
  196. package/dist/assets/index-CQN3M56N.css +0 -1
  197. package/dist/chunk-62DDWOSH.js.map +0 -1
  198. package/dist/chunk-6GAO75IU.js.map +0 -1
  199. package/src/hooks/gsapTargetCache.ts +0 -62
  200. /package/dist/{chunk-HIGHVWYD.js.map → chunk-QADHJFDF.js.map} +0 -0
@@ -1,7 +1,14 @@
1
1
  import { roundTo3 } from "../../utils/rounding";
2
- import { gsapWritesPosition } from "../../hooks/gsapRuntimeKeyframes";
3
- import { readStudioPathOffset } from "./manualEditsDom";
2
+ import { gsapWritesPosition, gsapWritesRotation } from "../../hooks/gsapRuntimeKeyframes";
3
+ import { readCssRotation } from "../../hooks/draggedGsapPosition";
4
+ import { readStudioPathOffset, readStudioRotation, styleUsesStudioOffset } from "./manualEditsDom";
4
5
  import { splitTopLevelWhitespace } from "./manualEditsStyleHelpers";
6
+ import {
7
+ STUDIO_OFFSET_X_PROP,
8
+ STUDIO_OFFSET_Y_PROP,
9
+ STUDIO_ORIGINAL_INLINE_TRANSLATE_ATTR,
10
+ STUDIO_PATH_OFFSET_ATTR,
11
+ } from "./manualEditsTypes";
5
12
  import type { PatchOperation } from "../../utils/sourcePatcher";
6
13
 
7
14
  type Point = { x: number; y: number };
@@ -101,15 +108,44 @@ function formatTranslatePx(p: Point): string {
101
108
  return `${roundTo3(p.x)}px ${roundTo3(p.y)}px`;
102
109
  }
103
110
 
104
- export function translatePatch(p: Point): PatchOperation & { value: string } {
105
- return { type: "inline-style", property: "translate", value: formatTranslatePx(p) };
111
+ const LEGACY_OFFSET_VARS = [STUDIO_OFFSET_X_PROP, STUDIO_OFFSET_Y_PROP];
112
+
113
+ /** Writes a move as the element's own translate; ends a legacy offset's vars and mark. */
114
+ export function writePlainMove(el: HTMLElement, p: Point): PatchOperation[] {
115
+ writeTranslatePx(el, p);
116
+ const patches: PatchOperation[] = [
117
+ { type: "inline-style", property: "translate", value: formatTranslatePx(p) },
118
+ {
119
+ type: "attribute",
120
+ property: STUDIO_ORIGINAL_INLINE_TRANSLATE_ATTR,
121
+ value: el.getAttribute(STUDIO_ORIGINAL_INLINE_TRANSLATE_ATTR),
122
+ },
123
+ ];
124
+ for (const prop of LEGACY_OFFSET_VARS.filter((v) => el.style.getPropertyValue(v))) {
125
+ el.style.removeProperty(prop);
126
+ patches.push({ type: "inline-style", property: prop, value: null });
127
+ }
128
+ if (el.hasAttribute(STUDIO_PATH_OFFSET_ATTR)) {
129
+ el.removeAttribute(STUDIO_PATH_OFFSET_ATTR);
130
+ patches.push({ type: "attribute", property: STUDIO_PATH_OFFSET_ATTR, value: null });
131
+ }
132
+ return patches;
106
133
  }
107
134
 
135
+ /** The first write records the author's own translate ("" for none), which Reset puts back. */
108
136
  export function writeTranslatePx(el: HTMLElement, p: Point): void {
137
+ if (!el.hasAttribute(STUDIO_ORIGINAL_INLINE_TRANSLATE_ATTR)) {
138
+ const own = el.style.getPropertyValue("translate");
139
+ el.setAttribute(STUDIO_ORIGINAL_INLINE_TRANSLATE_ATTR, styleUsesStudioOffset(own) ? "" : own);
140
+ }
109
141
  el.style.setProperty("translate", formatTranslatePx(p));
110
142
  }
111
143
 
112
144
  /** The position the panel shows and edits: the translate a move writes, unless GSAP positions it. */
113
- export function readMoveOffset(el: HTMLElement): Point {
114
- return gsapWritesPosition(el) ? readStudioPathOffset(el) : readTranslatePx(el);
145
+ export function readMoveOffset(el: HTMLElement, plainTranslate = !gsapWritesPosition(el)): Point {
146
+ return plainTranslate ? readTranslatePx(el) : readStudioPathOffset(el);
147
+ }
148
+
149
+ export function readShownRotation(el: HTMLElement): { angle: number } {
150
+ return gsapWritesRotation(el) ? readStudioRotation(el) : { angle: roundTo3(readCssRotation(el)) };
115
151
  }
@@ -477,7 +477,7 @@ export function CurveGraph({
477
477
  onSettle();
478
478
  }
479
479
  }}
480
- className="mx-auto aspect-square w-full max-w-[200px] touch-none rounded-sm border border-panel-border-input bg-black/20 outline-hidden focus:ring-1 focus:ring-panel-accent"
480
+ className="mx-auto aspect-square w-full max-w-[200px] touch-none rounded-sm scheme-dark border border-panel-border-input bg-bg-0 outline-hidden focus:ring-1 focus:ring-inset focus:ring-panel-accent"
481
481
  >
482
482
  <defs>
483
483
  <linearGradient id={`hf-hue-axis-${tab.key}`}>
@@ -491,7 +491,7 @@ export function CurveGraph({
491
491
  </linearGradient>
492
492
  </defs>
493
493
  {[0.25, 0.5, 0.75].map((ratio) => (
494
- <g key={ratio} stroke="rgba(255,255,255,0.08)" strokeWidth="0.5">
494
+ <g key={ratio} className="stroke-text-0/10" strokeWidth="0.5">
495
495
  <line
496
496
  x1={GRAPH_PADDING}
497
497
  y1={GRAPH_PADDING + ratio * (GRAPH_SIZE - GRAPH_PADDING * 2)}
@@ -431,7 +431,7 @@ export function ColorGradingControls({
431
431
  />
432
432
  </div>
433
433
  {lutImportError && (
434
- <div className="text-[10px] text-red-400" role="alert">
434
+ <div className="text-[10px] text-danger-ink" role="alert">
435
435
  {lutImportError}
436
436
  </div>
437
437
  )}
@@ -14,11 +14,11 @@ import { useTrackDesignInput } from "../../contexts/DesignPanelInputContext";
14
14
  function StatusPill({ status }: { status: RuntimeColorGradingStatus }) {
15
15
  const dotClass =
16
16
  status.state === "active"
17
- ? "bg-emerald-400"
17
+ ? "bg-accent"
18
18
  : status.state === "pending"
19
- ? "bg-amber-300"
19
+ ? "bg-warning-ink"
20
20
  : status.state === "unavailable"
21
- ? "bg-red-400"
21
+ ? "bg-danger-ink"
22
22
  : "bg-panel-text-5";
23
23
  return (
24
24
  <div
@@ -44,18 +44,18 @@ function HdrMediaWarning({ metadata }: { metadata: MediaMetadata | null }) {
44
44
  .join(" · ");
45
45
 
46
46
  return (
47
- <div className="mb-3 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] leading-4 text-amber-100">
47
+ <div className="mb-3 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] leading-4 text-warning-ink">
48
48
  <div className="mb-1 flex min-w-0 items-center justify-between gap-2">
49
49
  <span className="font-semibold">{metadata.color.label} source</span>
50
- <span className="rounded-sm bg-amber-400/20 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-amber-100">
50
+ <span className="rounded-sm bg-amber-500/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-warning-ink">
51
51
  SDR preview
52
52
  </span>
53
53
  </div>
54
- <p className="text-amber-100/80">
54
+ <p className="text-text-2">
55
55
  These controls use the current SDR shader preview path. Render may stay HDR-tagged, but this
56
56
  is not true HDR color grading yet.
57
57
  </p>
58
- {details && <p className="mt-1 truncate text-[10px] text-amber-100/55">{details}</p>}
58
+ {details && <p className="mt-1 truncate text-[10px] text-text-muted">{details}</p>}
59
59
  </div>
60
60
  );
61
61
  }
@@ -120,7 +120,7 @@ function HoldBeforeButton({
120
120
  }}
121
121
  className={`flex h-6 w-6 shrink-0 items-center justify-center rounded transition-colors ${
122
122
  active
123
- ? "bg-studio-accent text-black"
123
+ ? "bg-studio-accent text-on-accent"
124
124
  : "text-panel-text-4 hover:bg-panel-hover hover:text-panel-text-1"
125
125
  } disabled:cursor-not-allowed disabled:opacity-40`}
126
126
  title="Hold to show original"
@@ -158,7 +158,7 @@ export function ColorGradingSliderControl({
158
158
  settings.onClick();
159
159
  }}
160
160
  className={`relative flex h-5 w-5 shrink-0 items-center justify-center rounded transition-colors hover:bg-panel-hover hover:text-panel-text-1 disabled:cursor-not-allowed disabled:opacity-40 ${
161
- settings.active ? "text-studio-accent" : "text-panel-text-5"
161
+ settings.active ? "text-accent-ink" : "text-panel-text-5"
162
162
  }`}
163
163
  title={settings.label}
164
164
  >
@@ -204,13 +204,13 @@ export function PropertyPanelColorSecondary({
204
204
  setSampling(false);
205
205
  }
206
206
  }}
207
- className="flex min-h-7 items-center gap-1.5 text-[10px] font-medium text-panel-accent hover:text-panel-accent/80 disabled:opacity-50"
207
+ className="flex min-h-7 items-center gap-1.5 text-[10px] font-medium text-accent-ink hover:text-accent-ink/80 disabled:opacity-50"
208
208
  >
209
209
  <Eyedropper size={12} />
210
210
  {sampling ? "Capturing frame" : "Sample color from frame"}
211
211
  </button>
212
212
  {captureError && (
213
- <p role="alert" className="text-[9px] leading-4 text-red-300">
213
+ <p role="alert" className="text-[9px] leading-4 text-danger-ink">
214
214
  {captureError}
215
215
  </p>
216
216
  )}
@@ -221,7 +221,7 @@ export function PropertyPanelColorSecondary({
221
221
  type="button"
222
222
  aria-pressed={!showMatte}
223
223
  onClick={() => setShowMatte(false)}
224
- className={!showMatte ? "text-panel-accent" : "text-panel-text-4"}
224
+ className={!showMatte ? "text-accent-ink" : "text-panel-text-4"}
225
225
  >
226
226
  Source
227
227
  </button>
@@ -229,7 +229,7 @@ export function PropertyPanelColorSecondary({
229
229
  type="button"
230
230
  aria-pressed={showMatte}
231
231
  onClick={() => setShowMatte(true)}
232
- className={showMatte ? "text-panel-accent" : "text-panel-text-4"}
232
+ className={showMatte ? "text-accent-ink" : "text-panel-text-4"}
233
233
  >
234
234
  Selection matte
235
235
  </button>
@@ -131,7 +131,7 @@ export function ImageFillField({
131
131
  className={`inline-flex h-7 max-w-full items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors ${
132
132
  disabled || uploading
133
133
  ? "cursor-not-allowed text-neutral-600"
134
- : "cursor-pointer hover:border-neutral-600 hover:text-white"
134
+ : "cursor-pointer hover:border-neutral-600 hover:text-text-0"
135
135
  }`}
136
136
  >
137
137
  <Plus size={12} className="shrink-0" />
@@ -151,7 +151,7 @@ export function ImageFillField({
151
151
  />
152
152
  </div>
153
153
  {uploadError && (
154
- <div className="text-[10px] text-red-400" role="alert">
154
+ <div className="text-[10px] text-danger-ink" role="alert">
155
155
  {uploadError}
156
156
  </div>
157
157
  )}
@@ -340,7 +340,7 @@ export function GradientField({
340
340
  track("toggle", "Repeat gradient");
341
341
  patch({ repeating: e.target.checked });
342
342
  }}
343
- className="h-4 w-4 rounded-sm border-neutral-700 bg-neutral-950 text-panel-accent focus:ring-panel-accent"
343
+ className="h-4 w-4 rounded-sm border-neutral-700 bg-neutral-950 text-accent-ink focus:ring-panel-accent"
344
344
  />
345
345
  Repeat
346
346
  </label>
@@ -357,7 +357,7 @@ export function GradientField({
357
357
  })),
358
358
  });
359
359
  }}
360
- className="inline-flex h-7 items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white disabled:cursor-not-allowed disabled:text-neutral-600"
360
+ className="inline-flex h-7 items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-text-0 disabled:cursor-not-allowed disabled:text-neutral-600"
361
361
  >
362
362
  <ReverseGradientIcon size={16} />
363
363
  Reverse
@@ -442,7 +442,7 @@ export function GradientField({
442
442
  disabled={disabled || parsed.stops.length >= 6}
443
443
  onClick={() => addStop()}
444
444
  title={parsed.stops.length >= 6 ? "Maximum 6 stops" : "Add a gradient stop"}
445
- className="inline-flex h-7 items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white active:scale-[0.98] disabled:cursor-not-allowed disabled:text-neutral-600"
445
+ className="inline-flex h-7 items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-text-0 active:scale-[0.98] disabled:cursor-not-allowed disabled:text-neutral-600"
446
446
  >
447
447
  <Plus size={12} />
448
448
  Add stop
@@ -474,7 +474,7 @@ export function GradientField({
474
474
  type="button"
475
475
  disabled={disabled || parsed.stops.length <= 2}
476
476
  onClick={() => removeStop(index)}
477
- className="mt-[22px] flex h-10 items-center justify-center rounded-lg border border-neutral-700 bg-neutral-950 text-neutral-400 transition-colors hover:border-neutral-600 hover:text-white disabled:cursor-not-allowed disabled:text-neutral-700"
477
+ className="mt-[22px] flex h-10 items-center justify-center rounded-lg border border-neutral-700 bg-neutral-950 text-neutral-400 transition-colors hover:border-neutral-600 hover:text-text-0 disabled:cursor-not-allowed disabled:text-text-off"
478
478
  aria-label={`Remove stop ${index + 1}`}
479
479
  >
480
480
  <X size={12} />
@@ -5,9 +5,9 @@ import { Compare, RotateCcw } from "../../icons/SystemIcons";
5
5
  import type { ColorGradingControllerState } from "./useColorGradingController";
6
6
 
7
7
  const STATUS_DOT_CLASS: Record<ColorGradingControllerState["runtimeStatus"]["state"], string> = {
8
- active: "bg-emerald-400",
9
- pending: "bg-amber-300",
10
- unavailable: "bg-red-400",
8
+ active: "bg-accent",
9
+ pending: "bg-warning-ink",
10
+ unavailable: "bg-danger-ink",
11
11
  missing: "bg-panel-text-5",
12
12
  inactive: "bg-panel-text-5",
13
13
  };
@@ -81,7 +81,7 @@ describe("FlatColorGradingAccessory", () => {
81
81
  const dot = host.querySelector('[data-flat-grade-status-dot="true"]');
82
82
  expect(dot).not.toBeNull();
83
83
  expect(dot?.getAttribute("title")).toBe("Shader active");
84
- expect(dot?.className).toContain("bg-emerald-400");
84
+ expect(dot?.className).toContain("bg-accent");
85
85
  act(() => root.unmount());
86
86
  });
87
87
 
@@ -70,23 +70,20 @@ function HdrBanner({ metadata }: { metadata: MediaMetadata | null }) {
70
70
  return (
71
71
  <div
72
72
  data-flat-grade-hdr-banner="true"
73
- className="rounded-md border border-amber-500/30 bg-amber-500/10 px-2.5 py-1.5 text-[10px] leading-4 text-amber-100"
73
+ className="rounded-md border border-amber-500/30 bg-amber-500/10 px-2.5 py-1.5 text-[10px] leading-4 text-warning-ink"
74
74
  >
75
75
  <div className="mb-0.5 flex items-center justify-between gap-2">
76
76
  <span className="font-semibold">{metadata.color.label} source</span>
77
- <span className="rounded-sm bg-amber-400/20 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-amber-100">
77
+ <span className="rounded-sm bg-amber-500/15 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-warning-ink">
78
78
  SDR preview
79
79
  </span>
80
80
  </div>
81
- <p className="text-amber-100/80">
81
+ <p className="text-text-2">
82
82
  These controls use the current SDR shader preview path. Render may stay HDR-tagged, but this
83
83
  is not true HDR color grading yet.
84
84
  </p>
85
85
  {details && (
86
- <p
87
- data-flat-grade-hdr-detail="true"
88
- className="mt-0.5 truncate text-[9px] text-amber-100/55"
89
- >
86
+ <p data-flat-grade-hdr-detail="true" className="mt-0.5 truncate text-[9px] text-text-muted">
90
87
  {details}
91
88
  </p>
92
89
  )}
@@ -214,7 +211,7 @@ export function FlatColorGradingSection({
214
211
  <button
215
212
  type="button"
216
213
  onClick={onRequestPresetPreviews}
217
- className="text-[10px] font-medium text-panel-accent hover:text-panel-accent/80"
214
+ className="text-[10px] font-medium text-accent-ink hover:text-accent-ink/80"
218
215
  >
219
216
  Retry look previews
220
217
  </button>
@@ -519,7 +516,7 @@ export function FlatColorGradingSection({
519
516
  track("button", "Apply grade to scope");
520
517
  onApplyToScope();
521
518
  }}
522
- className="text-[11px] font-medium text-panel-accent hover:text-panel-accent/80 disabled:cursor-not-allowed disabled:opacity-50"
519
+ className="text-[11px] font-medium text-accent-ink hover:text-accent-ink/80 disabled:cursor-not-allowed disabled:opacity-50"
523
520
  >
524
521
  {applyBusy ? "Applying" : "Apply"}
525
522
  </button>
@@ -186,7 +186,7 @@ export function FlatEffectsSection({
186
186
  track("button", "Customize effect palette");
187
187
  onCommitColorGrading({ ...grading, palette: fallback });
188
188
  }}
189
- className="flex min-h-[28px] items-center gap-1 text-[10px] font-medium text-panel-accent hover:text-panel-accent/80"
189
+ className="flex min-h-[28px] items-center gap-1 text-[10px] font-medium text-accent-ink hover:text-accent-ink/80"
190
190
  >
191
191
  <Plus size={11} /> Custom palette
192
192
  </button>
@@ -307,7 +307,7 @@ export function FlatEffectsSection({
307
307
  type="button"
308
308
  title={`Remove ${selectedEffect.label}`}
309
309
  onClick={() => removeEffect(selectedEffect)}
310
- className="text-panel-text-4 hover:text-red-300"
310
+ className="text-panel-text-4 hover:text-danger-ink"
311
311
  >
312
312
  <X size={11} />
313
313
  </button>
@@ -352,7 +352,7 @@ export function FlatEffectsSection({
352
352
  data-flat-effects-add-toggle="true"
353
353
  aria-expanded={catalogOpen}
354
354
  onClick={() => setCatalogOpen((open) => !open)}
355
- className="flex min-h-[30px] items-center gap-1 text-[10px] font-medium text-panel-accent hover:text-panel-accent/80"
355
+ className="flex min-h-[30px] items-center gap-1 text-[10px] font-medium text-accent-ink hover:text-accent-ink/80"
356
356
  >
357
357
  <Plus size={11} /> Add effect
358
358
  </button>
@@ -374,7 +374,7 @@ export function FlatEffectsSection({
374
374
  onClick={() => setCatalogGroup(group.label)}
375
375
  className={`min-h-[25px] min-w-0 truncate bg-panel-bg px-2 text-[9px] ${
376
376
  catalogGroup === group.label
377
- ? "font-medium text-panel-accent"
377
+ ? "font-medium text-accent-ink"
378
378
  : "text-panel-text-4 hover:text-panel-text-1"
379
379
  }`}
380
380
  >
@@ -200,7 +200,7 @@ export function FlatMediaSection({
200
200
  data-flat-media-remove-bg="true"
201
201
  disabled={!canRemoveBackground || removeBusy}
202
202
  onClick={() => void runBackgroundRemoval()}
203
- className="flex items-center gap-1 text-[10px] font-medium text-panel-accent disabled:cursor-not-allowed disabled:opacity-50"
203
+ className="flex items-center gap-1 text-[10px] font-medium text-accent-ink disabled:cursor-not-allowed disabled:opacity-50"
204
204
  title={
205
205
  canRemoveBackground
206
206
  ? "Remove background and save a transparent asset"
@@ -231,7 +231,7 @@ export function FlatMediaSection({
231
231
  <div className="h-1 overflow-hidden rounded-full bg-panel-hover">
232
232
  <div
233
233
  className={`h-full rounded-full ${
234
- removeProgress.status === "failed" ? "bg-red-400" : "bg-panel-accent"
234
+ removeProgress.status === "failed" ? "bg-danger-ink" : "bg-panel-accent"
235
235
  }`}
236
236
  style={{ width: `${Math.max(0, Math.min(100, removeProgress.progress))}%` }}
237
237
  />
@@ -148,13 +148,13 @@ export function FlatMotionSection({
148
148
  {showEffects && (
149
149
  <>
150
150
  {multipleTimelines && (
151
- <p className="rounded-lg bg-amber-500/10 px-3 py-2 text-[11px] leading-relaxed text-amber-400">
151
+ <p className="rounded-lg bg-amber-500/10 px-3 py-2 text-[11px] leading-relaxed text-warning-ink">
152
152
  This file has multiple GSAP timelines. Animation editing is disabled to prevent data
153
153
  loss — consolidate into a single timeline to enable editing.
154
154
  </p>
155
155
  )}
156
156
  {unsupportedTimelinePattern && (
157
- <p className="rounded-lg bg-amber-500/10 px-3 py-2 text-[11px] leading-relaxed text-amber-400">
157
+ <p className="rounded-lg bg-amber-500/10 px-3 py-2 text-[11px] leading-relaxed text-warning-ink">
158
158
  This timeline uses a computed key the editor can&apos;t resolve statically.
159
159
  </p>
160
160
  )}
@@ -45,7 +45,7 @@ export function FlatOverlaysSection({
45
45
  return <div className="py-4 text-center text-[10px] text-panel-text-4">Loading overlays…</div>;
46
46
  }
47
47
  if (error) {
48
- return <div className="py-4 text-center text-[10px] text-red-300">{error}</div>;
48
+ return <div className="py-4 text-center text-[10px] text-danger-ink">{error}</div>;
49
49
  }
50
50
 
51
51
  const busy = adding !== null;
@@ -95,7 +95,7 @@ export function FlatOverlaysSection({
95
95
  )}
96
96
  <Plus
97
97
  size={12}
98
- className="absolute right-1.5 top-1.5 text-white opacity-70 drop-shadow-sm group-hover:text-panel-accent group-hover:opacity-100"
98
+ className="absolute right-1.5 top-1.5 text-white opacity-70 drop-shadow-sm group-hover:text-accent-ink group-hover:opacity-100"
99
99
  />
100
100
  </span>
101
101
  <span className="block truncate px-2 py-1.5 text-[10px] text-panel-text-2">
@@ -60,7 +60,7 @@ describe("FlatRow", () => {
60
60
  />,
61
61
  );
62
62
  const value = host.querySelector('[data-flat-row-value="true"]');
63
- expect(value?.className).toContain("text-panel-accent");
63
+ expect(value?.className).toContain("text-accent-ink");
64
64
  const reset = host.querySelector<HTMLButtonElement>('[data-flat-row-reset="true"]');
65
65
  expect(reset).not.toBeNull();
66
66
  act(() => reset?.dispatchEvent(new MouseEvent("click", { bubbles: true })));
@@ -356,7 +356,7 @@ describe("FlatSlider", () => {
356
356
  const fill = host.querySelector<HTMLElement>('[data-flat-slider-fill="true"]');
357
357
  expect(fill?.style.width).toBe("100%");
358
358
  const knob = host.querySelector<HTMLElement>('[data-flat-slider-knob="true"]');
359
- expect(knob?.className).toContain("bg-white");
359
+ expect(knob?.className).toContain("bg-text-0");
360
360
  act(() => root.unmount());
361
361
  });
362
362
 
@@ -1172,7 +1172,7 @@ describe("FlatSelectRow", () => {
1172
1172
  />,
1173
1173
  );
1174
1174
  const select = host.querySelector<HTMLSelectElement>("select");
1175
- expect(select?.className).toContain("text-panel-accent");
1175
+ expect(select?.className).toContain("text-accent-ink");
1176
1176
  const reset = host.querySelector<HTMLButtonElement>('[data-flat-select-reset="true"]');
1177
1177
  act(() => reset?.dispatchEvent(new MouseEvent("click", { bubbles: true })));
1178
1178
  expect(onReset).toHaveBeenCalledTimes(1);
@@ -1364,6 +1364,7 @@ describe("FlatSlider — typed value", () => {
1364
1364
  const still = host.querySelector<HTMLInputElement>('[data-flat-slider-input="true"]');
1365
1365
  expect(still).not.toBeNull();
1366
1366
  expect(still?.getAttribute("aria-invalid")).toBe("true");
1367
+ expect(still?.className).toContain("border-dashed");
1367
1368
  act(() => still?.dispatchEvent(new KeyboardEvent("keydown", { key: "Escape", bubbles: true })));
1368
1369
  expect(host.querySelector('[data-flat-slider-input="true"]')).toBeNull();
1369
1370
  expect(host.querySelector('[data-flat-slider-value="true"]')?.textContent).toBe("1x");
@@ -537,7 +537,7 @@ export function FlatSlider({
537
537
  <div
538
538
  data-flat-slider-knob="true"
539
539
  className={`absolute top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-full ${
540
- tier === "explicitCustom" ? "h-2 w-2 bg-white" : "h-[7px] w-[7px] bg-panel-text-4"
540
+ tier === "explicitCustom" ? "h-2 w-2 bg-text-0" : "h-[7px] w-[7px] bg-panel-text-4"
541
541
  }`}
542
542
  style={{ left: `${clampedPct}%` }}
543
543
  />
@@ -76,7 +76,7 @@ export function FlatSliderReadout({
76
76
  }}
77
77
  onBlur={() => commit(false)}
78
78
  className={`w-11 shrink-0 rounded-[3px] border bg-panel-surface px-1 text-right font-mono text-[10px] text-panel-text-0 outline-none ${
79
- invalid ? "border-red-400" : "border-panel-accent"
79
+ invalid ? "border-dashed border-danger-ink" : "border-panel-accent"
80
80
  }`}
81
81
  />
82
82
  );
@@ -433,7 +433,7 @@ export function FontFamilyField({
433
433
  type="button"
434
434
  disabled={disabled || loadingLocalFonts}
435
435
  onClick={loadBrowserLocalFonts}
436
- className="rounded-lg border border-neutral-700 bg-neutral-900 px-2.5 text-[10px] font-medium text-neutral-400 transition-colors hover:border-neutral-600 hover:text-neutral-100 disabled:cursor-not-allowed disabled:text-neutral-700"
436
+ className="rounded-lg border border-neutral-700 bg-neutral-900 px-2.5 text-[10px] font-medium text-neutral-400 transition-colors hover:border-neutral-600 hover:text-neutral-100 disabled:cursor-not-allowed disabled:text-text-off"
437
437
  >
438
438
  {loadingLocalFonts ? "..." : "Local"}
439
439
  </button>
@@ -442,7 +442,7 @@ export function FontFamilyField({
442
442
  type="button"
443
443
  disabled={disabled || importingFonts || !onImportFonts}
444
444
  onClick={() => fontInputRef.current?.click()}
445
- className="rounded-lg border border-neutral-700 bg-neutral-900 px-2.5 text-[10px] font-medium text-neutral-400 transition-colors hover:border-neutral-600 hover:text-neutral-100 disabled:cursor-not-allowed disabled:text-neutral-700"
445
+ className="rounded-lg border border-neutral-700 bg-neutral-900 px-2.5 text-[10px] font-medium text-neutral-400 transition-colors hover:border-neutral-600 hover:text-neutral-100 disabled:cursor-not-allowed disabled:text-text-off"
446
446
  >
447
447
  {importingFonts ? "..." : "Import"}
448
448
  </button>
@@ -111,7 +111,7 @@ function FxCarveMember({
111
111
  {/* The lane is where an automated value comes from, and where it is
112
112
  edited — saying so is the difference between a stale readout and
113
113
  a pointer to the thing that owns it. */}
114
- {automated ? <span className="text-[#3CE6AC]">A</span> : null}
114
+ {automated ? <span className="text-accent-ink">A</span> : null}
115
115
  </span>
116
116
  );
117
117
  })}
@@ -90,7 +90,7 @@ export function AutomationToggle({
90
90
  type="button"
91
91
  className={`hf-fx-automate w-[16px] shrink-0 rounded-[3px] border font-mono text-[9px] leading-none ${
92
92
  automated
93
- ? "border-panel-accent text-panel-accent"
93
+ ? "border-panel-accent text-accent-ink"
94
94
  : "border-panel-border-input text-panel-text-2 hover:text-panel-text-0"
95
95
  }`}
96
96
  aria-pressed={automated}
@@ -237,7 +237,7 @@ export function FxParamRow({
237
237
  {/* See the enum row above for why the name wraps instead of truncating. */}
238
238
  <span
239
239
  className={`hf-fx-label w-[86px] shrink-0 wrap-break-word text-[10px] leading-tight ${
240
- automated ? "text-panel-accent" : "text-panel-text-2"
240
+ automated ? "text-accent-ink" : "text-panel-text-2"
241
241
  }`}
242
242
  >
243
243
  {param.label}
@@ -115,7 +115,7 @@ function Fader({
115
115
  </span>
116
116
  <span
117
117
  className={`hf-fx-eq-value font-mono text-[9px] tabular-nums ${
118
- moved ? "text-panel-accent" : "text-panel-text-2"
118
+ moved ? "text-accent-ink" : "text-panel-text-2"
119
119
  }`}
120
120
  >
121
121
  {moved ? shown(value) : "0"}
@@ -160,7 +160,7 @@ export function FxEqModule({
160
160
  <span className="font-mono text-[9px] text-panel-text-2">{bands.length}-band</span>
161
161
  <button
162
162
  type="button"
163
- className="hf-fx-remove px-1 text-[11px] text-panel-text-2 hover:text-panel-danger"
163
+ className="hf-fx-remove px-1 text-[11px] text-panel-text-2 hover:text-danger-ink"
164
164
  aria-label="Remove Tone"
165
165
  disabled={disabled}
166
166
  onClick={onRemove}
@@ -216,7 +216,7 @@ function FxNodeHeader({
216
216
  />
217
217
  <button
218
218
  type="button"
219
- className="hf-fx-remove px-1 font-mono text-[11px] text-panel-text-2 hover:text-red-400 disabled:opacity-40"
219
+ className="hf-fx-remove px-1 font-mono text-[11px] text-panel-text-2 hover:text-danger-ink disabled:opacity-40"
220
220
  title="Remove"
221
221
  disabled={disabled}
222
222
  onClick={onRemove}
@@ -189,7 +189,7 @@ export function FxPresetRun({
189
189
  </button>
190
190
  <button
191
191
  type="button"
192
- className="hf-fx-preset-run-remove px-1 font-mono text-[11px] text-panel-text-2 hover:text-red-400 disabled:opacity-40"
192
+ className="hf-fx-preset-run-remove px-1 font-mono text-[11px] text-panel-text-2 hover:text-danger-ink disabled:opacity-40"
193
193
  title={`Remove ${preset.label}`}
194
194
  disabled={disabled}
195
195
  onClick={onRemoveRun}
@@ -231,7 +231,7 @@ export function MediaSection({
231
231
  <div className="h-1 overflow-hidden rounded-full bg-panel-border">
232
232
  <div
233
233
  className={`h-full rounded-full ${
234
- removeProgress.status === "failed" ? "bg-red-400" : "bg-studio-accent"
234
+ removeProgress.status === "failed" ? "bg-danger-ink" : "bg-studio-accent"
235
235
  }`}
236
236
  style={{ width: `${Math.max(0, Math.min(100, removeProgress.progress))}%` }}
237
237
  />
@@ -234,7 +234,7 @@ export function SegmentedControl({
234
234
  aria-pressed={option.value === value}
235
235
  className={`min-w-0 truncate rounded px-2 py-[5px] text-[11px] font-medium transition-colors disabled:cursor-not-allowed ${
236
236
  option.value === value
237
- ? "bg-panel-hover text-white"
237
+ ? "bg-panel-hover text-text-0"
238
238
  : "text-panel-text-4 hover:text-panel-text-2"
239
239
  }`}
240
240
  >
@@ -323,7 +323,7 @@ function TextFieldEditor({
323
323
  track("button", "Remove text field");
324
324
  onRemoveTextField(field.key);
325
325
  }}
326
- className="inline-flex h-7 shrink-0 items-center rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white"
326
+ className="inline-flex h-7 shrink-0 items-center rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-text-0"
327
327
  >
328
328
  Remove
329
329
  </button>
@@ -474,7 +474,7 @@ export function TextSection({
474
474
  if (nextKey) setActiveTextFieldKey(nextKey);
475
475
  });
476
476
  }}
477
- className="inline-flex h-7 max-w-full items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white"
477
+ className="inline-flex h-7 max-w-full items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-text-0"
478
478
  >
479
479
  <Plus size={12} className="shrink-0" />
480
480
  <span className="truncate">Add text</span>
@@ -106,3 +106,32 @@ describe("the panel's position fields on a translate Studio can't read", () => {
106
106
  expect(showToast).toHaveBeenCalledWith(UNREADABLE_TRANSLATE);
107
107
  });
108
108
  });
109
+
110
+ describe("the panel's position fields", () => {
111
+ it("read and move an element without GSAP by its CSS translate, on the route they chose", async () => {
112
+ const onSetManualOffset = vi.fn();
113
+ const box = document.createElement("div");
114
+ box.style.setProperty("translate", "40px 30px");
115
+ const element = { id: "box", selector: "#box", element: box } as unknown as DomEditSelection;
116
+ const handlers = createTransformCommitHandlers({
117
+ element,
118
+ styles: {},
119
+ hasGsapAnimation: false,
120
+ gsapAnimId: null,
121
+ gsapKeyframes: null,
122
+ currentPct: 0,
123
+ onCommitAnimatedProperty: undefined,
124
+ onAddKeyframe: undefined,
125
+ onSetManualOffset,
126
+ onSetManualSize: vi.fn(),
127
+ onSetManualRotation: vi.fn(),
128
+ showToast: vi.fn(),
129
+ });
130
+ await handlers.commitManualOffset("x", "100px");
131
+ expect(onSetManualOffset).toHaveBeenCalledWith(
132
+ element,
133
+ { x: 100, y: 30 },
134
+ { plainTranslate: true },
135
+ );
136
+ });
137
+ });