tome.ts

view source

Declarations
#

6 declarations

Tome
#

tome.ts view source

value + type

{ slug: string; category: string; Component: Component<any, any, string>; related_tomes: string[]; related_modules: string[]; related_declarations: string[]; title?: string | undefined; } import {Tome} from '@fuzdev/fuz_ui/tome.js';

slug

Stable identifier and URL path segment — must be a URL-safe slug (used directly as the route segment, the lookup key, and in related_tomes cross-references). Set title for the display label.

type string

category

type string

Component

type Component<any, any, string>

related_tomes

type string[]

related_modules

type string[]

related_declarations

type string[]

title?

Human-readable display label shown in menus, headings, and links. Falls back to slug when omitted, so set title to give multi-word or specially cased tomes a readable label (e.g. slug: 'vite-plugin' → title: 'vite plugin').

type string

tome_context
#

tome.ts view source

{ get: (error_message?: string | undefined) => () => { slug: string; category: string; Component: Component<any, any, string>; related_tomes: string[]; related_modules: string[]; related_declarations: string[]; title?: string | undefined; }; get_maybe: () => (() => { ...; }) | undefined; set: (value: () => { ...; })... import {tome_context} from '@fuzdev/fuz_ui/tome.js';

tome_get_by_slug
#

tome.ts view source

(slug: string): { slug: string; category: string; Component: Component<any, any, string>; related_tomes: string[]; related_modules: string[]; related_declarations: string[]; title?: string | undefined; } import {tome_get_by_slug} from '@fuzdev/fuz_ui/tome.js';

slug

type string

returns

Tome

tome_to_pathname
#

tome.ts view source

(item: string | { slug: string; category: string; Component: Component<any, any, string>; related_tomes: string[]; related_modules: string[]; related_declarations: string[]; title?: string | undefined; }, docs_path?: string, hash?: string | undefined): string import {tome_to_pathname} from '@fuzdev/fuz_ui/tome.js';

item

type string | Tome

docs_path

type string
default DOCS_PATH_DEFAULT

hash?

URL fragment to append, with or without the #

type string
optional

returns

string

tome_to_title
#

tome.ts view source

(tome: { slug: string; category: string; Component: Component<any, any, string>; related_tomes: string[]; related_modules: string[]; related_declarations: string[]; title?: string | undefined; }): string import {tome_to_title} from '@fuzdev/fuz_ui/tome.js';

The display label for a tome — its title if set, else its slug.

tome

type Tome

returns

string

tomes_context
#

tome.ts view source

{ get: (error_message?: string | undefined) => () => Map<string, { slug: string; category: string; Component: Component<any, any, string>; related_tomes: string[]; related_modules: string[]; related_declarations: string[]; title?: string | undefined; }>; get_maybe: () => (() => Map<...>) | undefined; set: (value: ()... import {tomes_context} from '@fuzdev/fuz_ui/tome.js';

Depends on
#

Imported by
#