diff --git a/src/lib/components/ConfigDetail.svelte b/src/lib/components/ConfigDetail.svelte index 86a9c86..cf0d826 100644 --- a/src/lib/components/ConfigDetail.svelte +++ b/src/lib/components/ConfigDetail.svelte @@ -3,6 +3,7 @@ import { getCatalogItem } from '$lib/macos-prefs-catalog'; import ShareModal from '$lib/components/ShareModal.svelte'; import MacOSPreferencesDisplay from '$lib/components/MacOSPreferencesDisplay.svelte'; + import PackageFingerprint from '$lib/components/PackageFingerprint.svelte'; let { configUser, @@ -134,22 +135,13 @@ const configNpm = $derived(configPkgs.filter((p) => p.type === 'npm')); const configTaps = $derived(configPkgs.filter((p) => p.type === 'tap')); - // Package "DNA" — one segment per package, opacity ramping within each group. - type Seg = { color: string; opacity: number }; - const dna = $derived.by((): Seg[] => { - const groups: [number, string][] = [ - [configCli.length, 'var(--accent)'], - [configApps.length, 'var(--amber)'], - [configNpm.length, '#7aa2e3'] - ]; - const segs: Seg[] = []; - for (const [n, color] of groups) { - for (let i = 0; i < n; i++) { - segs.push({ color, opacity: 0.55 + (i / Math.max(n - 1, 1)) * 0.45 }); - } - } - return segs; + // Package "fingerprint" — tall bars colored by type, behind the hero. + const fpCounts = $derived({ + cli: configCli.length, + cask: configApps.length, + npm: configNpm.length }); + const fpSeed = $derived(String(config.alias ?? config.id ?? config.name ?? '')); const dnaLegend = $derived( [ @@ -199,51 +191,51 @@
- - -

{config.name}

- {#if config.description} -

{config.description}

- {/if} - -
- - - {config.install_count || 0} installs - - {#if formatDate(config.updated_at)} - updated {formatDate(config.updated_at)} - {/if} - {#if config.base_preset} - base preset {config.base_preset} - {/if} -
- - {#if dna.length > 0} -
- {#each dna as seg} - - {/each} +
+ -
- {#each dnaLegend as l} - {l.n} {l.label} - {/each} +
+
+
+ + +

{config.name}

+ {#if config.description} +

{config.description}

+ {/if} + +
+ + + {config.install_count || 0} installs + + {#if formatDate(config.updated_at)} + updated {formatDate(config.updated_at)} + {/if} + {#if dnaLegend.length > 0} + + {#each dnaLegend as l} + {l.n} + {/each} + + {/if} +
- {/if} +
-
+
Install this setup