Skip to content

Commit 68b6167

Browse files
feat(studio): upgrade Studio to Tailwind CSS v4 (#3618)
* chore(studio): upgrade Tailwind CSS to v4 through the Vite plugin Studio moves from Tailwind 3.4 to 4.3.3, loaded by @tailwindcss/vite instead of PostCSS. The JS config becomes an @theme block in studio.css carrying the same studio.* and panel.* colors, with explicit @source globs so the gitignored data/projects tree is never scanned. The official upgrade tool renamed the utilities, but it rewrites bare words inside any string, so its edits to event names, CSS property names, filter function names, status enum values and prose were reverted by hand. Nothing in Studio relied on the v3 default border color, ring width or ring color, so the tool's compatibility shim was dropped rather than kept. * chore(studio): note the duplicated palette between theme css and preset * fix(studio): keep the pointer cursor on buttons after the Tailwind v4 upgrade v4 preflight dropped the pointer cursor on enabled buttons, so add it back in one base rule. Also migrate the last outline-none to outline-hidden. * fix(studio): keep the Renders Export button at its shipped 14px size * chore(studio): allow the tailwind v4 config deletions in the deletion guard
1 parent 559e57d commit 68b6167

135 files changed

Lines changed: 604 additions & 593 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎bun.lock‎

Lines changed: 93 additions & 116 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/studio/package.json‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,14 @@
8181
},
8282
"devDependencies": {
8383
"@hyperframes/producer": "workspace:*",
84+
"@tailwindcss/vite": "^4.3.3",
8485
"@types/react": "19",
8586
"@types/react-dom": "19",
8687
"@vitejs/plugin-react": "^4.0.0",
87-
"autoprefixer": "^10.4.0",
8888
"chokidar": "^4.0.3",
8989
"fake-indexeddb": "^6.2.5",
90-
"postcss": "^8.4.0",
9190
"puppeteer-core": "^25.2.1",
92-
"tailwindcss": "^3.4.0",
91+
"tailwindcss": "^4.3.3",
9392
"tsup": "^8.0.0",
9493
"typescript": "^5.0.0",
9594
"vite": "^6.4.2",

‎packages/studio/postcss.config.js‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎packages/studio/src/captions/components/CaptionAnimationPanel.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function AnimationPhase({
171171
}}
172172
className="flex-1 accent-studio-accent disabled:opacity-40"
173173
/>
174-
<span className="text-2xs text-neutral-400 font-mono w-8 text-right flex-shrink-0">
174+
<span className="text-2xs text-neutral-400 font-mono w-8 text-right shrink-0">
175175
{intensity.toFixed(2)}
176176
</span>
177177
</div>
@@ -249,7 +249,7 @@ export const CaptionAnimationPanel = memo(function CaptionAnimationPanel() {
249249
return (
250250
<div className="flex flex-col h-full min-h-0">
251251
{gated && (
252-
<div className="flex-shrink-0 mx-3 mt-2 px-2 py-1.5 rounded border border-amber-500/30 bg-amber-500/10">
252+
<div className="shrink-0 mx-3 mt-2 px-2 py-1.5 rounded-sm border border-amber-500/30 bg-amber-500/10">
253253
<p className="text-2xs text-amber-300/90 leading-snug">
254254
Animation editing isn&apos;t applied to playback or saved yet, so these controls are
255255
disabled.
@@ -286,13 +286,13 @@ export const CaptionAnimationPanel = memo(function CaptionAnimationPanel() {
286286
</div>
287287

288288
{/* Footer */}
289-
<div className="flex-shrink-0 px-3 py-2 border-t border-neutral-800">
289+
<div className="shrink-0 px-3 py-2 border-t border-neutral-800">
290290
<button
291291
type="button"
292292
onClick={handleApplyToAll}
293293
disabled={gated}
294294
title={gated ? "Disabled until animation editing is applied to playback" : undefined}
295-
className="w-full py-1.5 rounded border border-neutral-700 text-2xs text-neutral-300 hover:border-studio-accent/50 hover:text-studio-accent transition-colors disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:border-neutral-700 disabled:hover:text-neutral-300"
295+
className="w-full py-1.5 rounded-sm border border-neutral-700 text-2xs text-neutral-300 hover:border-studio-accent/50 hover:text-studio-accent transition-colors disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:border-neutral-700 disabled:hover:text-neutral-300"
296296
>
297297
Apply to all groups
298298
</button>

‎packages/studio/src/captions/components/CaptionPropertyPanel.tsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export const CaptionPropertyPanel = memo(function CaptionPropertyPanel({
213213
return (
214214
<div className="flex flex-col h-full min-h-0">
215215
{/* Header */}
216-
<div className="px-3 py-2 border-b border-neutral-800 flex-shrink-0">
216+
<div className="px-3 py-2 border-b border-neutral-800 shrink-0">
217217
<div className="flex items-center justify-between mb-1.5">
218218
<span className="text-2xs text-neutral-500">{countLabel}</span>
219219
</div>
@@ -225,7 +225,7 @@ export const CaptionPropertyPanel = memo(function CaptionPropertyPanel({
225225
aria-selected={activeTab === "style"}
226226
onClick={() => setActiveTab("style")}
227227
className={[
228-
"flex-1 py-0.5 rounded text-2xs font-medium transition-colors",
228+
"flex-1 py-0.5 rounded-sm text-2xs font-medium transition-colors",
229229
activeTab === "style"
230230
? "bg-studio-accent/20 text-studio-accent border border-studio-accent/50"
231231
: "text-neutral-500 border border-neutral-800 hover:text-neutral-300 hover:border-neutral-600",
@@ -239,7 +239,7 @@ export const CaptionPropertyPanel = memo(function CaptionPropertyPanel({
239239
aria-selected={activeTab === "animation"}
240240
onClick={() => setActiveTab("animation")}
241241
className={[
242-
"flex-1 py-0.5 rounded text-2xs font-medium transition-colors",
242+
"flex-1 py-0.5 rounded-sm text-2xs font-medium transition-colors",
243243
activeTab === "animation"
244244
? "bg-studio-accent/20 text-studio-accent border border-studio-accent/50"
245245
: "text-neutral-500 border border-neutral-800 hover:text-neutral-300 hover:border-neutral-600",

‎packages/studio/src/captions/components/CaptionTimeline.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export const CaptionTimeline = memo(function CaptionTimeline({
109109
tabIndex={0}
110110
aria-label={`Caption word "${seg.text}"`}
111111
aria-pressed={isSelected}
112-
className={`absolute top-1 bottom-1 rounded flex items-center overflow-hidden cursor-pointer focus-visible:ring-1 focus-visible:ring-white outline-none${
112+
className={`absolute top-1 bottom-1 rounded flex items-center overflow-hidden cursor-pointer focus-visible:ring-1 focus-visible:ring-white outline-hidden${
113113
isSelected ? " ring-1 ring-white/50 z-10" : ""
114114
}`}
115115
style={{

‎packages/studio/src/captions/components/shared.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type React from "react";
22
import { useEffect, useRef, useState } from "react";
33

44
export const inputCls =
5-
"w-full bg-neutral-900 border border-neutral-800 rounded px-1.5 py-0.5 text-2xs text-neutral-200 font-mono outline-none focus:border-studio-accent disabled:opacity-40 disabled:cursor-not-allowed";
5+
"w-full bg-neutral-900 border border-neutral-800 rounded-sm px-1.5 py-0.5 text-2xs text-neutral-200 font-mono outline-hidden focus:border-studio-accent disabled:opacity-40 disabled:cursor-not-allowed";
66

77
export function Section({ label, children }: { label: string; children: React.ReactNode }) {
88
return (
@@ -20,7 +20,7 @@ export function Section({ label, children }: { label: string; children: React.Re
2020
export function Row({ label, children }: { label: string; children: React.ReactNode }) {
2121
return (
2222
<div className="flex items-center gap-2">
23-
<span className="text-2xs text-neutral-600 w-14 text-right flex-shrink-0">{label}</span>
23+
<span className="text-2xs text-neutral-600 w-14 text-right shrink-0">{label}</span>
2424
<div className="flex-1 min-w-0">{children}</div>
2525
</div>
2626
);

‎packages/studio/src/components/AskAgentModal.tsx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ export function AskAgentModal({
6666
<div
6767
className={
6868
anchorPoint
69-
? "hf-backdrop-in fixed inset-0 z-[100] bg-black/60 backdrop-blur-sm"
70-
: "hf-backdrop-in fixed inset-0 z-[100] flex items-center justify-center bg-black/60 backdrop-blur-sm"
69+
? "hf-backdrop-in fixed inset-0 z-100 bg-black/60 backdrop-blur-xs"
70+
: "hf-backdrop-in fixed inset-0 z-100 flex items-center justify-center bg-black/60 backdrop-blur-xs"
7171
}
7272
onClick={requestClose}
7373
>
@@ -77,7 +77,7 @@ export function AskAgentModal({
7777
aria-modal="true"
7878
aria-label="Copy prompt to AI agent"
7979
tabIndex={-1}
80-
className={`w-[480px] rounded-2xl border border-neutral-800 bg-neutral-950 shadow-2xl outline-none ${
80+
className={`w-[480px] rounded-2xl border border-neutral-800 bg-neutral-950 shadow-2xl outline-hidden ${
8181
anchorPoint ? "fixed" : ""
8282
}`}
8383
style={modalPositionStyle}
@@ -112,7 +112,7 @@ export function AskAgentModal({
112112
<div className="px-5 py-4 space-y-3">
113113
<textarea
114114
ref={inputRef}
115-
className="w-full h-24 px-3 py-2 rounded-lg border border-neutral-800 bg-neutral-900/60 text-sm text-neutral-200 placeholder-neutral-600 resize-none focus:outline-none focus:border-studio-accent/60 focus:ring-1 focus:ring-studio-accent/30"
115+
className="w-full h-24 px-3 py-2 rounded-lg border border-neutral-800 bg-neutral-900/60 text-sm text-neutral-200 placeholder-neutral-600 resize-none focus:outline-hidden focus:border-studio-accent/60 focus:ring-1 focus:ring-studio-accent/30"
116116
placeholder="Describe what you want to change…"
117117
value={value}
118118
onChange={(e) => setValue(e.target.value)}
@@ -127,7 +127,7 @@ export function AskAgentModal({
127127
<summary className="text-[11px] text-neutral-500 cursor-pointer select-none hover:text-neutral-400">
128128
Context included in prompt
129129
</summary>
130-
<pre className="mt-2 max-h-40 overflow-auto rounded-lg bg-neutral-900/80 px-3 py-2 text-[11px] leading-relaxed text-neutral-500 whitespace-pre-wrap break-words border border-neutral-800/50">
130+
<pre className="mt-2 max-h-40 overflow-auto rounded-lg bg-neutral-900/80 px-3 py-2 text-[11px] leading-relaxed text-neutral-500 whitespace-pre-wrap wrap-break-word border border-neutral-800/50">
131131
{contextPreview}
132132
</pre>
133133
</details>

‎packages/studio/src/components/EditorShell.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ function EditorShellBody({
276276
ref={containerRef}
277277
// Shell canvas is a step LIGHTER than the near-black panel cards so the
278278
// gaps between panels read as visible seams (CapCut-style).
279-
className="flex flex-col flex-1 min-h-0 bg-[#18181B]"
279+
className="flex flex-col flex-1 min-h-0 bg-panel-surface"
280280
onKeyDown={handleKeyDown}
281281
tabIndex={-1}
282282
>
@@ -313,7 +313,7 @@ function EditorShellBody({
313313
onSelectTimelineElement={onSelectTimelineElement}
314314
timelineFooter={
315315
captionEditMode ? (
316-
<div className="border-t border-neutral-800/30 flex-shrink-0" style={{ height: 60 }}>
316+
<div className="border-t border-neutral-800/30 shrink-0" style={{ height: 60 }}>
317317
<div className="flex items-center gap-1.5 px-2 py-0.5">
318318
<span className="text-[9px] font-medium text-neutral-500 uppercase tracking-wider">
319319
Captions

‎packages/studio/src/components/ExternalFileConflictBanner.tsx‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function ConflictReview({
3232

3333
return (
3434
<div
35-
className="fixed inset-0 z-[110] flex items-center justify-center bg-black/70 px-5 backdrop-blur-sm"
35+
className="fixed inset-0 z-110 flex items-center justify-center bg-black/70 px-5 backdrop-blur-xs"
3636
onClick={onClose}
3737
>
3838
<div
@@ -41,7 +41,7 @@ function ConflictReview({
4141
aria-modal="true"
4242
aria-labelledby="external-conflict-title"
4343
tabIndex={-1}
44-
className="max-h-[88vh] w-full max-w-5xl overflow-auto rounded-xl border border-amber-400/30 bg-neutral-950 p-5 text-neutral-100 shadow-2xl outline-none"
44+
className="max-h-[88vh] w-full max-w-5xl overflow-auto rounded-xl border border-amber-400/30 bg-neutral-950 p-5 text-neutral-100 shadow-2xl outline-hidden"
4545
onClick={(event) => event.stopPropagation()}
4646
>
4747
<div className="flex items-start justify-between gap-4">
@@ -53,7 +53,7 @@ function ConflictReview({
5353
Reviewing or exporting does not change either version.
5454
</p>
5555
</div>
56-
<button type="button" onClick={onClose} className="rounded px-2 py-1 text-neutral-400">
56+
<button type="button" onClick={onClose} className="rounded-sm px-2 py-1 text-neutral-400">
5757
Close
5858
</button>
5959
</div>
@@ -68,14 +68,14 @@ function ConflictReview({
6868
<div className="flex gap-2">
6969
<button
7070
type="button"
71-
className="rounded border border-neutral-700 px-2 py-1 text-[11px]"
71+
className="rounded-sm border border-neutral-700 px-2 py-1 text-[11px]"
7272
onClick={() => void navigator.clipboard.writeText(side.content)}
7373
>
7474
Copy
7575
</button>
7676
<button
7777
type="button"
78-
className="rounded border border-neutral-700 px-2 py-1 text-[11px]"
78+
className="rounded-sm border border-neutral-700 px-2 py-1 text-[11px]"
7979
onClick={() =>
8080
downloadText(`${conflict.error.filePath}.${side.suffix}.html`, side.content)
8181
}
@@ -87,7 +87,7 @@ function ConflictReview({
8787
<textarea
8888
readOnly
8989
value={side.content}
90-
className="h-80 w-full resize-y rounded border border-neutral-800 bg-neutral-900 p-3 font-mono text-[11px] leading-relaxed text-neutral-300"
90+
className="h-80 w-full resize-y rounded-sm border border-neutral-800 bg-neutral-900 p-3 font-mono text-[11px] leading-relaxed text-neutral-300"
9191
/>
9292
</section>
9393
))}
@@ -110,7 +110,7 @@ function FailedDraftReview({
110110
useDialogBehavior({ open: true, onClose, containerRef });
111111
return (
112112
<div
113-
className="fixed inset-0 z-[110] flex items-center justify-center bg-black/70 px-5 backdrop-blur-sm"
113+
className="fixed inset-0 z-110 flex items-center justify-center bg-black/70 px-5 backdrop-blur-xs"
114114
onClick={onClose}
115115
>
116116
<div
@@ -119,7 +119,7 @@ function FailedDraftReview({
119119
aria-modal="true"
120120
aria-labelledby="failed-draft-title"
121121
tabIndex={-1}
122-
className="max-h-[88vh] w-full max-w-3xl overflow-auto rounded-xl border border-amber-400/30 bg-neutral-950 p-5 text-neutral-100 shadow-2xl outline-none"
122+
className="max-h-[88vh] w-full max-w-3xl overflow-auto rounded-xl border border-amber-400/30 bg-neutral-950 p-5 text-neutral-100 shadow-2xl outline-hidden"
123123
onClick={(event) => event.stopPropagation()}
124124
>
125125
<div className="flex items-start justify-between gap-4">
@@ -131,21 +131,21 @@ function FailedDraftReview({
131131
Copy or download this draft before choosing to discard it.
132132
</p>
133133
</div>
134-
<button type="button" onClick={onClose} className="rounded px-2 py-1 text-neutral-400">
134+
<button type="button" onClick={onClose} className="rounded-sm px-2 py-1 text-neutral-400">
135135
Close
136136
</button>
137137
</div>
138138
<div className="mt-4 flex justify-end gap-2">
139139
<button
140140
type="button"
141-
className="rounded border border-neutral-700 px-2 py-1 text-[11px]"
141+
className="rounded-sm border border-neutral-700 px-2 py-1 text-[11px]"
142142
onClick={() => void navigator.clipboard.writeText(content)}
143143
>
144144
Copy
145145
</button>
146146
<button
147147
type="button"
148-
className="rounded border border-neutral-700 px-2 py-1 text-[11px]"
148+
className="rounded-sm border border-neutral-700 px-2 py-1 text-[11px]"
149149
onClick={() => downloadText(`${path}.studio.html`, content)}
150150
>
151151
Download
@@ -154,7 +154,7 @@ function FailedDraftReview({
154154
<textarea
155155
readOnly
156156
value={content}
157-
className="mt-2 h-80 w-full resize-y rounded border border-neutral-800 bg-neutral-900 p-3 font-mono text-[11px] leading-relaxed text-neutral-300"
157+
className="mt-2 h-80 w-full resize-y rounded-sm border border-neutral-800 bg-neutral-900 p-3 font-mono text-[11px] leading-relaxed text-neutral-300"
158158
/>
159159
</div>
160160
</div>
@@ -176,7 +176,7 @@ export function ExternalFileConflictBanner({
176176
<>
177177
<div
178178
role="alert"
179-
className="absolute left-1/2 top-14 z-[94] flex max-w-[calc(100vw-32px)] -translate-x-1/2 flex-wrap items-center gap-3 rounded-md border border-amber-400/30 bg-amber-950/95 px-4 py-2 text-[12px] font-medium text-amber-50 shadow-lg"
179+
className="absolute left-1/2 top-14 z-94 flex max-w-[calc(100vw-32px)] -translate-x-1/2 flex-wrap items-center gap-3 rounded-md border border-amber-400/30 bg-amber-950/95 px-4 py-2 text-[12px] font-medium text-amber-50 shadow-lg"
180180
>
181181
<span>
182182
{conflict
@@ -201,7 +201,7 @@ export function ExternalFileConflictBanner({
201201
<button
202202
type="button"
203203
onClick={() => void coordinator.useExternalFile()}
204-
className="rounded border border-amber-200/30 px-2 py-1"
204+
className="rounded-sm border border-amber-200/30 px-2 py-1"
205205
>
206206
Discard Studio edits and reload file
207207
</button>
@@ -217,7 +217,7 @@ export function ExternalFileConflictBanner({
217217
void coordinator.keepStudioFile();
218218
}
219219
}}
220-
className="rounded border border-red-300/40 px-2 py-1 text-red-100"
220+
className="rounded-sm border border-red-300/40 px-2 py-1 text-red-100"
221221
>
222222
Overwrite file with Studio version
223223
</button>
@@ -234,7 +234,7 @@ export function ExternalFileConflictBanner({
234234
void coordinator.keepStudioFile();
235235
}
236236
}}
237-
className="rounded border border-red-300/40 px-2 py-1 text-red-100"
237+
className="rounded-sm border border-red-300/40 px-2 py-1 text-red-100"
238238
>
239239
Overwrite file with recovered Studio draft
240240
</button>

0 commit comments

Comments
 (0)