Open source CapCut alternative.
TypeScript
fix(site): part the host title from a fullscreen card
David Led86e865611c6
diff --git a/site/scripts/eval-chatgpt-widget.ts b/site/scripts/eval-chatgpt-widget.tsindex 801ea383..084082b5 100644--- a/site/scripts/eval-chatgpt-widget.ts+++ b/site/scripts/eval-chatgpt-widget.ts@@ -114,12 +114,16 @@ try {const contexts = await page.evaluate(() => (window as unknown as { contexts: { structuredContent?: { projectId?: string } }[] }).contexts);assert.equal(contexts.at(-1)?.structuredContent?.projectId, "project", "the model knows which project the card shows");assert.equal(await app.locator("button").count(), 0, "the editor card has no controls of its own");+ assert.equal(await app.locator("main.editing").evaluate((m) => getComputedStyle(m).borderTopWidth), "0px", "an inline card keeps the host's own border");await app.frameLocator("iframe.editor").locator("#inset").filter({ hasText: /^0$/ }).waitFor();await app.frameLocator("iframe.editor").locator("#mode").filter({ hasText: /^inline$/ }).waitFor();await app.frameLocator("iframe.editor").getByRole("button", { name: "Fullscreen" }).click();await app.frameLocator("iframe.editor").locator("#mode").filter({ hasText: /^fullscreen$/ }).waitFor();await app.frameLocator("iframe.editor").locator("#inset").filter({ hasText: /^120$/ }).waitFor();assert.deepEqual(await page.evaluate(() => (window as unknown as { modes: string[] }).modes), ["fullscreen"], "the editor's button asks for the whole window");+ // The host's title sits above a fullscreen card; a hairline in the editor's+ // own border color parts it from the editor's top bar.+ assert.equal(await app.locator("main.editing").evaluate((m) => getComputedStyle(m).borderTopWidth), "1px", "a fullscreen card parts the host title from the editor");// A host in dark with a rail over the card's left edge: the card pads the// rail's band, wears dark, and hands the theme to the editor.await app.frameLocator("iframe.editor").locator("#theme").filter({ hasText: /^light$/ }).waitFor();diff --git a/site/src/clients/chatgpt/ui/preview.css b/site/src/clients/chatgpt/ui/preview.cssindex de4c7980..38b258fa 100644--- a/site/src/clients/chatgpt/ui/preview.css+++ b/site/src/clients/chatgpt/ui/preview.css@@ -4,7 +4,7 @@:root{--editor-bg:#fff;--editor-fg:#20201e;--editor-edge:#e5e5e5;--slab:#eaeaec;--slab-pulse:#dcdce1;--slab-highlight:#f5f5f6}:root[data-theme=dark]{--editor-bg:#0a0a0a;--editor-fg:#fafafa;--editor-edge:#ffffff1a;--slab:#262626;--slab-pulse:#1e1e1e;--slab-highlight:#3b3b3b}*{box-sizing:border-box}body{margin:0}main{padding:20px;max-width:840px;margin:auto}header{display:flex;justify-content:space-between;color:var(--muted);font-size:12px}.brand{font-weight:800;font-size:16px;color:inherit}h1{font-size:22px;line-height:1.2;margin:24px 0 16px;overflow-wrap:anywhere}video{width:100%;max-height:65vh;display:block;border-radius:12px;background:#000}button{font:inherit;color:inherit;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:10px 14px;cursor:pointer}button:hover{filter:brightness(.95)}button:disabled{opacity:.5;cursor:default}button:focus-visible{outline:2px solid #5d80cc;outline-offset:3px}.primary{background:#eac36a;color:#242018;border-color:#eac36a}nav{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.projects{display:grid;gap:8px}.projects button{display:flex;justify-content:space-between;gap:16px;text-align:left}.projects button span:first-child{overflow-wrap:anywhere;min-width:0}.muted{color:var(--muted);font-size:12px}.error{color:#ba453b}progress{width:100%;accent-color:#d8a743}p{overflow-wrap:anywhere}-.editing{padding:0;max-width:none;position:relative;height:560px;background:var(--editor-bg);color:var(--editor-fg)}[data-mode=fullscreen].editing{height:100vh}.editor{display:block;width:100%;height:100%;border:0;background:var(--editor-bg)}+.editing{padding:0;max-width:none;position:relative;height:560px;background:var(--editor-bg);color:var(--editor-fg)}[data-mode=fullscreen].editing{height:100vh;border-top:1px solid var(--editor-edge)}.editor{display:block;width:100%;height:100%;border:0;background:var(--editor-bg)}.waiting,.skeleton{position:absolute;inset:0;background:var(--editor-bg)}.waiting{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;text-align:center}.download-error{position:absolute;top:12px;left:12px;right:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;background:var(--panel);border:1px solid var(--line);border-radius:10px}.download-error p{margin:0}.skeleton{display:grid;grid-template:46px minmax(0,1fr) min(272px,55%)/68px minmax(0,1fr);overflow:hidden;--edge:1px solid var(--editor-edge)}.bar{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:0 12px;border-bottom:var(--edge)}.bar span{flex:1}.bar .slab{height:22px;width:64px}.bar .slab:first-child{width:22px}.bar .slab:nth-child(2){width:140px}.bar .slab:last-child{width:84px}