Rich runtime representation of a library.
Wraps LibraryJson with computed properties and provides the root
of the API documentation hierarchy: Library → Module → Declaration.
see also
``module.svelte.ts`` for Module class
``declaration.svelte.ts`` for Declaration class
library_json
type LibraryJson
url_prefix
URL path prefix for multi-package documentation sites.
Prepended to /docs/api/ paths in Module.url_api and Declaration.url_api.
Default '' preserves single-package behavior.
type string
package_json
source_json
name
repo_name
repo_url
owner_name
homepage_url
logo_url
logo_alt
npm_url
changelog_url
published
org_url
Organization URL (e.g., 'https://github.com/ryanatkn').
modules
All modules as rich Module instances.
modules_sorted
All modules sorted alphabetically by path.
declarations
All declarations across all modules as a flat array.
module_by_path
Module lookup map by path. Provides O(1) lookup.
declaration_by_name
Declaration lookup map by name. Provides O(1) lookup.
constructor
type new (library_json: LibraryJson, url_prefix?: string): Library
library_json
LibraryJsonurl_prefix
string''lookup_directory_modules
Look up modules within a directory prefix.
Returns modules whose paths start with path + "/", or null if none match.
type (path: string): Module[] | null
path
stringModule[] | nullsearch_declarations
Search declarations by query string with multi-term AND logic.
type (query: string): Declaration[]
query
stringDeclaration[]