chadtmiller.com/hud
A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts
place.hud.hudkit 0.4.0 Latest 5 packages
0
0
<script lang="ts">
import Icon from '../atoms/Icon.svelte';
/** Something said a moment (what an agent or a member did, a tab put away), with a way to act on it; an agent's in the notice's colours, with its mark. */
let {
message,
agent = false,
action = null,
onclose
}: { message: string; agent?: boolean; action?: { label: string; run: () => void } | null; onclose: () => void } = $props();
</script>
<div class="toast" class:agent role="status">
{#if agent}<Icon name="agent" />{/if}
<span class="message">{message}</span>
{#if action}
<button
type="button"
class="btn sm"
onclick={() => {
action.run();
onclose();
}}>{action.label}</button
>
{/if}
<button type="button" class="icon-button" aria-label="Dismiss" onclick={onclose}><Icon name="close" /></button>
</div>
<style>
.toast {
display: flex;
align-items: center;
gap: var(--space-2);
max-width: min(34rem, calc(100vw - 2 * var(--space-4)));
padding: var(--space-1-5) var(--space-1-5) var(--space-1-5) var(--space-3);
border: var(--border);
border-radius: var(--radius-md);
background: var(--panel);
box-shadow: var(--shadow-pop);
color: var(--fg);
font-size: var(--text-sm);
}
.toast.agent {
border-color: var(--notice-track);
background: var(--notice);
}
.agent > :global(.i) {
color: var(--notice-fg);
}
.message {
flex: 1;
min-width: 0;
overflow-wrap: anywhere;
}
</style>