~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/hud

A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts

0
0
38 lines · 975 B Raw History
<script lang="ts">
	import type { Snippet } from 'svelte';

	// An object inside a record (an object, a ref or a union's variant): its
	// fields (`children`, FieldRows) as a nested group, its `$type` above them
	// when it has one. The groups go one level deep; what is nested in them
	// is drawn as JSON.
	let { type, children }: { type: string | null; children: Snippet } = $props();
</script>

<div class="group">
	{#if type}<span class="type">{type}</span>{/if}
	<dl>
		{@render children()}
	</dl>
</div>

<style>
	.group {
		padding: var(--hud-space-1) var(--hud-space-3);
		border-left: 2px solid var(--color-border-primary);
		border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
		background: var(--color-background-secondary);
	}

	.type {
		display: block;
		padding-top: var(--hud-space-1);
		color: var(--color-text-tertiary);
		font-family: var(--font-mono);
		font-size: 0.6875rem;
		overflow-wrap: anywhere;
	}

	dl {
		margin: 0;
	}
</style>