diff --git a/package.json b/package.json index 53a5e35..4ed0474 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "svelte-check": "^4.3.4", "tailwindcss": "^4.1.17", "typescript": "^5.9.3", - "vite": "^7.2.4" + "vite": "^7.2.6" }, "dependencies": { "@iconify/svelte": "^5.1.0", @@ -31,7 +31,7 @@ "dotenv": "^17.2.3", "express": "^5.1.0", "hotkeys-js": "^4.0.0-beta.7", - "three": "^0.181.2", - "ytpl": "^2.3.0" + "play-dl": "^1.9.7", + "three": "^0.181.2" } } diff --git a/src/lib/assets/css/tui-body.css b/src/lib/assets/css/tui-body.css index 55f8508..022029a 100644 --- a/src/lib/assets/css/tui-body.css +++ b/src/lib/assets/css/tui-body.css @@ -65,7 +65,7 @@ } .tui-line.blank { - min-height: 0.5em; + min-height: 0.15em; } @keyframes lineSlideIn { @@ -73,6 +73,7 @@ opacity: 0; transform: translateX(-5px); } + to { opacity: 1; transform: translateX(0); @@ -173,12 +174,10 @@ .divider-line { flex: 1; height: 1px; - background: linear-gradient( - to right, - transparent, - var(--terminal-border), - transparent - ); + background: linear-gradient(to right, + transparent, + var(--terminal-border), + transparent); } .divider-text { @@ -223,15 +222,26 @@ width: 0.5em; height: 1.1em; background: var(--terminal-primary); - animation: cursorBlink 1s step-end infinite; + background: var(--terminal-primary); margin-left: 2px; vertical-align: baseline; transform: translateY(0.15em); } +.cursor.blink { + animation: cursorBlink 1s step-end infinite; +} + @keyframes cursorBlink { - 0%, 100% { opacity: 1; } - 50% { opacity: 0; } + + 0%, + 100% { + opacity: 1; + } + + 50% { + opacity: 0; + } } /* Scrollbar */ @@ -265,6 +275,15 @@ flex-direction: column; } + /* Keep inline flow for specific containers */ + .tui-card .tui-inline-group, + .tui-group .tui-inline-group, + .tui-accordion .tui-inline-group { + flex-direction: row; + flex-wrap: wrap; + align-items: flex-start; + } + .tui-inline-group .inline-image img { max-width: 100% !important; width: 100%; @@ -280,4 +299,4 @@ max-width: 100% !important; width: 100%; } -} +} \ No newline at end of file diff --git a/src/lib/components/tui/TuiBody.svelte b/src/lib/components/tui/TuiBody.svelte index 50e79a7..0ce662f 100644 --- a/src/lib/components/tui/TuiBody.svelte +++ b/src/lib/components/tui/TuiBody.svelte @@ -137,7 +137,7 @@ class="symbol">$ - + {/if} diff --git a/src/lib/components/tui/TuiCard.svelte b/src/lib/components/tui/TuiCard.svelte index a56294b..200f4e5 100644 --- a/src/lib/components/tui/TuiCard.svelte +++ b/src/lib/components/tui/TuiCard.svelte @@ -6,7 +6,7 @@ getSegmentStyle, parseDimension, } from "./utils"; - import type { CardLine } from "./types"; + import type { CardLine, TerminalLine } from "./types"; import TuiLine from "./TuiLine.svelte"; import "$lib/assets/css/tui-card.css"; @@ -46,6 +46,43 @@ .filter(Boolean) .join("; "), ); + const processedChildren = $derived.by(() => { + if (!line.children) return []; + const groups: Array< + | { kind: "single"; index: number; line: TerminalLine } + | { + kind: "inline"; + items: Array<{ index: number; line: TerminalLine }>; + } + > = []; + let i = 0; + + while (i < line.children.length) { + const child = line.children[i]; + const isInline = child.inline || child.display === "inline"; + + if (isInline) { + const inlineItems: Array<{ + index: number; + line: TerminalLine; + }> = []; + while (i < line.children.length) { + const nextChild = line.children[i]; + const nextIsInline = + nextChild.inline || nextChild.display === "inline"; + if (!nextIsInline) break; + + inlineItems.push({ index: i, line: nextChild }); + i++; + } + groups.push({ kind: "inline", items: inlineItems }); + } else { + groups.push({ kind: "single", index: i, line: child }); + i++; + } + } + return groups; + });