@molecule/app-status-summary-svelte

Feature · status-summary · App (browser) · v1.1.3 · Apache-2.0

Status-page summary: component grid with operational/degraded/outage badges + incident list

npm install @molecule/app-status-summary-svelte

npm · Source on GitHub

How it works

@molecule/app-status-summary-svelte is a ready-made status-summary feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.

<script lang="ts">
  import { StatusSummary } from '@molecule/app-status-summary-svelte'

  const groups = [
    {
      id: 'api',
      name: 'API',
      components: [
        { id: 'rest', name: 'REST API', status: 'operational' },
        { id: 'ws', name: 'WebSockets', status: 'degraded' },
      ],
    },
  ]
</script>

<StatusSummary {groups}>
  {#snippet header()}
    <span>Last updated: 2 min ago</span>
  {/snippet}
</StatusSummary>

Works with: @molecule/app-svelte, @molecule/app-ui, @molecule/app-ui-svelte

Reference

Svelte status-page summary.

Exports StatusSummary — a grouped component list with colored operational / degraded / outage badges and an overall banner derived from the worst child status — plus the ComponentStatus, StatusComponent, StatusGroup and StatusSummaryProps types.

It is the Svelte counterpart of @molecule/app-status-summary-react: the same props (React names) and the same DOM for the same input.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

<script lang="ts">
  import { StatusSummary } from '@molecule/app-status-summary-svelte'

  const groups = [
    {
      id: 'api',
      name: 'API',
      components: [
        { id: 'rest', name: 'REST API', status: 'operational' },
        { id: 'ws', name: 'WebSockets', status: 'degraded' },
      ],
    },
  ]
</script>

<StatusSummary {groups}>
  {#snippet header()}
    <span>Last updated: 2 min ago</span>
  {/snippet}
</StatusSummary>

Type

feature

Installation

npm install @molecule/app-status-summary-svelte @molecule/app-svelte @molecule/app-ui @molecule/app-ui-svelte svelte

API

Interfaces

StatusComponent

A single monitored component with its current health status.

interface StatusComponent {
  /** Stable identifier, used as the rendered list key. */
  id: string
  /** Component name — plain text or a snippet. */
  name: StatusField
  /** Current health status. */
  status: ComponentStatus
  /** Optional sub-label (SLA %, region, etc.) — plain text or a snippet. */
  subtitle?: StatusField
}

StatusGroup

A named group of related StatusComponent entries.

interface StatusGroup {
  /** Stable identifier, used as the rendered section key. */
  id: string
  /** Group name — plain text or a snippet. */
  name: StatusField
  /** The components in this group. */
  components: StatusComponent[]
}

StatusSummaryProps

Props for the StatusSummary component.

interface StatusSummaryProps {
  /** Grouped components. */
  groups: StatusGroup[]
  /** Overall summary label (auto-derived if omitted). */
  overallStatus?: ComponentStatus
  /** Optional header content (last updated time, subscribe button). */
  header?: Snippet
  /** Optional below-the-grid slot — typically a recent-incidents list. */
  footer?: Snippet
  /** Extra classes. */
  className?: string
}

Types

ComponentStatus

Union of possible component health states.

type ComponentStatus =
  'operational' | 'degraded' | 'partial-outage' | 'major-outage' | 'maintenance'

Constants

StatusSummary

const StatusSummary: LegacyComponentType

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-svelte ^3.5.0 || ^4.0.0
  • @molecule/app-ui ^1.4.0
  • @molecule/app-ui-svelte ^1.1.0
  • svelte ^5.0.0

Runtime Dependencies

  • @molecule/app-svelte

  • @molecule/app-ui

  • @molecule/app-ui-svelte

  • svelte

  • Must render inside the app's i18n provider and with a ClassMap bond wired (useTranslation() / getClassMap() throw otherwise).

  • When overallStatus is omitted the banner shows the WORST status found across all components (major-outage > partial-outage > degraded > maintenance > operational).

  • Status colors are a fixed hex palette applied via inline styles (green/yellow/orange/red/blue with white text) — they ignore the app theme and cannot be restyled via ClassMap; acceptable for status pages, but know they will not follow a rebrand.

  • Status labels use the status.operational … status.maintenance i18n keys, which the common locale bond ships in every language; the English fallbacks in code match its en.ts.

  • header renders inside the overall banner (last-updated stamp, subscribe button); footer renders below the grid (incident list). Group and component names may be plain text or snippets.