site.svelte.ts

view source

Declarations
#

3 declarations

site_context
#

site.svelte.ts view source

{ get: (error_message?: string | undefined) => SiteState; get_maybe: () => SiteState | undefined; set: (value: SiteState) => SiteState; } import {site_context} from '@fuzdev/fuz_ui/site.svelte.js';

SiteState
#

site.svelte.ts view source

import {SiteState} from '@fuzdev/fuz_ui/site.svelte.js';

Light site-identity values for app chrome - the icon, glyph, and repo url used by components like Breadcrumb and DocsFooter. Set once per app at the root layout. Distinct from library_context, which carries the heavy module/declaration metadata that only docs and API pages need.

Pass pkg_json (from virtual:pkg.json) to derive glyph/repo_url from the package's own metadata instead of hardcoding them; icon stays an explicit logo import since it's structured SvgData, not package metadata.

icon

type SvgData | null

$state.raw

glyph

type string | null

$state.raw

repo_url

type Url | null

$state.raw

constructor

type new (options?: SiteStateOptions): SiteState

options

default {}

SiteStateOptions
#

site.svelte.ts view source

SiteStateOptions import type {SiteStateOptions} from '@fuzdev/fuz_ui/site.svelte.js';

icon?

The site's icon, e.g. a logo from logos.ts.

type SvgData | null

glyph?

The site's glyph, a single unicode character identifying the project. Falls back to pkg_json.glyph.

type string | null

repo_url?

The site's source repository url, e.g. for DocsFooter links. Falls back to the url parsed from pkg_json.repository.

type Url | null

pkg_json?

Curated package.json, typically the default export of virtual:pkg.json. glyph and repo_url derive from it when not given explicitly; explicit props always win.

type PkgJson | null

Depends on
#

Imported by
#