From a26d5d8361613eec8223d50f9ad047cf8b9c0d7c Mon Sep 17 00:00:00 2001 From: Tom Davidson Date: Sun, 10 May 2026 23:05:06 -0600 Subject: [PATCH 1/3] fix: merge two cmd rows into a single multiline block --- web/index.html | 63 ++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/web/index.html b/web/index.html index 4ee097a..8b0926e 100644 --- a/web/index.html +++ b/web/index.html @@ -196,28 +196,30 @@ display: none; } - .cmd-rows { - display: flex; - flex-direction: column; - gap: 0.375rem; - } - - .cmd-row { - display: flex; - align-items: center; - gap: 0.5rem; + .cmd-block { background: var(--surface-offset); border-radius: var(--r-sm); - padding: 0.5rem 0.75rem; + border: 1px solid rgba(255, 255, 255, 0.04); font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.4; color: var(--text); + overflow: hidden; + } + + .cmd-line { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0.5rem 0.75rem; overflow-x: auto; - border: 1px solid rgba(255, 255, 255, 0.04); } - .cmd-row code { + .cmd-line + .cmd-line { + border-top: 1px solid rgba(255, 255, 255, 0.06); + } + + .cmd-line code { flex: 1; white-space: nowrap; } @@ -442,23 +444,26 @@

return btn } - const makeCmdRow = (cmd, ariaLabel) => { - const row = makeEl('div', 'cmd-row') - row.append(makeEl('code', '', cmd), makeCopyButton(cmd, ariaLabel)) - return row + const makeCmdLine = (cmd, ariaLabel) => { + const line = makeEl('div', 'cmd-line') + line.append(makeEl('code', '', cmd), makeCopyButton(cmd, ariaLabel)) + return line } - const makeAddRow = plugin => - makeCmdRow( - plugin.addCommand ?? '', - `Copy add command for ${plugin.identifier ?? ''}`, - ) - - const makeInstallRow = plugin => - makeCmdRow( - plugin.installCommand ?? '', - `Copy install command for ${plugin.identifier ?? ''}`, + const makeCmdBlock = plugin => { + const block = makeEl('div', 'cmd-block') + block.append( + makeCmdLine( + plugin.addCommand ?? '', + `Copy add command for ${plugin.identifier ?? ''}`, + ), + makeCmdLine( + plugin.installCommand ?? '', + `Copy install command for ${plugin.identifier ?? ''}`, + ), ) + return block + } const makePluginFileLink = plugin => { const link = makeEl('a', 'plugin-file-link', pluginFileName(plugin)) @@ -478,12 +483,10 @@

const buildCard = plugin => { const card = makeEl('article', 'card') - const cmdRows = makeEl('div', 'cmd-rows') - cmdRows.append(makeAddRow(plugin), makeInstallRow(plugin)) card.append( makeHead(plugin), makeEl('p', 'card-desc', plugin.description ?? ''), - cmdRows, + makeCmdBlock(plugin), makePluginFileLink(plugin), ) return card From 7d2c11e8de1fac3eb2363933a60ea5bb6ecbb754 Mon Sep 17 00:00:00 2001 From: Tom Davidson Date: Sun, 10 May 2026 23:12:37 -0600 Subject: [PATCH 2/3] fix: one cmd block, two display lines, one copy button for both commands --- web/index.html | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/web/index.html b/web/index.html index 8b0926e..20e32a1 100644 --- a/web/index.html +++ b/web/index.html @@ -197,31 +197,24 @@ } .cmd-block { + display: flex; + align-items: flex-start; + gap: 0.5rem; background: var(--surface-offset); border-radius: var(--r-sm); border: 1px solid rgba(255, 255, 255, 0.04); + padding: 0.5rem 0.75rem; font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.4; color: var(--text); - overflow: hidden; - } - - .cmd-line { - display: flex; - align-items: center; - gap: 0.5rem; - padding: 0.5rem 0.75rem; overflow-x: auto; } - .cmd-line + .cmd-line { - border-top: 1px solid rgba(255, 255, 255, 0.06); - } - - .cmd-line code { + .cmd-block pre { flex: 1; - white-space: nowrap; + white-space: pre; + margin: 0; } .copy-btn { @@ -444,24 +437,14 @@

return btn } - const makeCmdLine = (cmd, ariaLabel) => { - const line = makeEl('div', 'cmd-line') - line.append(makeEl('code', '', cmd), makeCopyButton(cmd, ariaLabel)) - return line - } - const makeCmdBlock = plugin => { + const addCmd = plugin.addCommand ?? '' + const installCmd = plugin.installCommand ?? '' + const combined = `${addCmd}\n${installCmd}` const block = makeEl('div', 'cmd-block') - block.append( - makeCmdLine( - plugin.addCommand ?? '', - `Copy add command for ${plugin.identifier ?? ''}`, - ), - makeCmdLine( - plugin.installCommand ?? '', - `Copy install command for ${plugin.identifier ?? ''}`, - ), - ) + const pre = document.createElement('pre') + pre.textContent = combined + block.append(pre, makeCopyButton(combined, `Copy commands for ${plugin.identifier ?? ''}`)) return block } From 0e58b2667d2702fb1e4a5bddf86ce395a7f8acde Mon Sep 17 00:00:00 2001 From: Tom Davidson Date: Sun, 10 May 2026 23:17:33 -0600 Subject: [PATCH 3/3] fix: fold install cmd into addCommand, drop installCommand field --- scripts/build-jsonld.ts | 5 +- web/index.html | 138 +++++++++++----------------------------- 2 files changed, 38 insertions(+), 105 deletions(-) diff --git a/scripts/build-jsonld.ts b/scripts/build-jsonld.ts index accd295..e811736 100644 --- a/scripts/build-jsonld.ts +++ b/scripts/build-jsonld.ts @@ -20,7 +20,6 @@ type Plugin = { versionSource: string hasPackages: boolean addCommand: string - installCommand: string } const DEFAULT_OSES = ['Linux', 'macOS', 'Windows'] @@ -131,8 +130,7 @@ const toPlugin = (baseUrl: string) => (file: string, raw: Raw): Plugin => { platforms: toPlatforms(platform), versionSource: detectVersionSource(resolveBlock), hasPackages: isObject(raw.packages), - addCommand: `proto plugin add ${id} "${fileUrl}"`, - installCommand: `proto install --pin -c local ${id} latest`, + addCommand: `proto plugin add ${id} "${fileUrl}"\nproto install --pin -c local ${id} latest`, } } @@ -154,7 +152,6 @@ const toPluginEntry = (repoUrl: string, schemaUrl: string) => (plugin: Plugin) = versionSource: plugin.versionSource, hasPackages: plugin.hasPackages, addCommand: plugin.addCommand, - installCommand: plugin.installCommand, }) const toCatalog = ( diff --git a/web/index.html b/web/index.html index 20e32a1..7104853 100644 --- a/web/index.html +++ b/web/index.html @@ -206,7 +206,7 @@ padding: 0.5rem 0.75rem; font-family: var(--font-mono); font-size: 0.8rem; - line-height: 1.4; + line-height: 1.6; color: var(--text); overflow-x: auto; } @@ -277,26 +277,16 @@ } @media (prefers-reduced-motion: reduce) { - .card { - transition: none; - } - .card:hover { - transform: none; - } + .card { transition: none; } + .card:hover { transform: none; } } @media (max-width: 520px) { - body { - padding-top: 1.5rem; - } - .card { - padding: 0.9rem 1rem; - } + body { padding-top: 1.5rem; } + .card { padding: 0.9rem 1rem; } } - svg { - display: block; - } + svg { display: block; } @@ -308,15 +298,8 @@

tomdavidson

- Non-WASM plugins for proto, a next-generation toolchain manager by moonrepo. + Non-WASM plugins for proto, + a next-generation toolchain manager by moonrepo.

@@ -330,57 +313,28 @@

plugins.jsonld · schema - · source + · source - - + +