| f activeContentSlot | The slot that renders `element` inside a tree, where `insideCode` says an ancestor is a code block's figure: the figure's own `<pre>` belongs to it, not to a slot of its own. |
| f allocateRoutesPlugin | Assign final page slugs after publication, before links consume them. |
| f alternateNames | |
| f alternateRoutes | The routes a note's alternate names ask to redirect from, below the vault's mount: `aliases: [Old Name]` asks for `old-name`. `allocateRedirects` grants those still free. |
| f analytics | Contribute one browser tracker only when a vault selects an analytics provider. |
| f annotations | The `annotations` plugin: its routes on the server, and in the browser a script that attaches to every note body a theme marks with `data-svartz-note`, as theme-minimal and every theme extending it do. |
| f assertNoNotesUnderPages | A page name owns `<mount>/-/<name>/` and everything below it, so a published note there would be shadowed at runtime: fail the build naming it. Notes elsewhere under `<mount>/-/` stay notes. `routes` are the vault's published routes, mount path included. |
| f assertRequiredStages | |
| f assertServerPlugins | A server plugin needs a server target (or a host app whose adapter isn't `adapter-static`), a path-segment id, an importable module and JSON options. `hostAdapter` is the host's `kit.adapter.name`. |
| f assetHref | The published URL of an attachment named in a note's frontmatter (`cover: hero.jpg`, `image: portrait.svg`); external URLs pass through. Undefined when the vault didn't publish it. Resolves like the pipeline, which publishes attachments named by top-level `image`, `cover`, and `socialImage`: relative to the note's file, then from the vault root, then by a basename only one attachment has. |
| f attach | Show the annotations stored for `page` beside `content`, the note's body element. Returns `detach`, which removes every marker, card, highlight and list it added. Comments whose passage is no longer in the note are listed after it. |
| f audit | Append `entry` to the audit log. Pass the change itself as `changes`, statements prepared on the same `SVARTZ_DB` binding: they and the entry run as one transaction, so neither lands without the other. For a change kept elsewhere, call this first and make the change only once it resolves. Throws when the site binds no `SVARTZ_DB`, or the write fails. |
| f auditIfChanged | The statement that appends `entry` only when the statement just before it in the batch changed a row, for a change whose own guard may leave it undone. Its results hold the entry's id when it appended one, and nothing otherwise, so the batch's last result says whether the change happened. |
| f auth | The `auth` plugin: sign-in routes on the server and the sign-in dialog in the browser. |
| f authLabel | `Bearer token`, `None`, or the scheme as written. |
| f buildBreadcrumbs | Home, each folder the note sits in, then the note. A folder note ends its own folder's trail instead of repeating it. A slug no folder record places falls back to its own segments. |
| f buildExplorerTree | The vault as a tree: folders first, then notes. Each group sorts by `order` frontmatter, then by a theme's explorer row (`itemOf`), then in natural order by title; a folder takes its folder note's `order`. The home note is left out (the site title links home). A folder links its folder note (`guides/index.md`) when one exists, otherwise its generated folder page. |
| f can | Whether `account` (`null` for a guest) may do `permission` on `target`: the site (`{}`), a vault (`{ vault }`), or a page of one (`{ vault, page }`, by the page's slug). Grants on the page, its folders, its vault and the site apply, the most specific first; see `resolve` in `permissions.ts` for the order. |
| f canEach | `can` for each of `targets`, in order, in the D1 calls one check makes: for a list that asks about many pages at once, such as a queue of comments on different pages. |
| f changedFiles | The vault files each of `commits` (SHAs) changed, as vault paths, for those the mirror of the vault `records` describes holds with their files. In one query; none when the binding is missing. |
| f choosePage | The theme and renderer for a page. The page's own `theme:` wins, then the nearest folder note's (`folderNotes`, nearest first), then whichever renderer detects the page from its frontmatter. A page none of that picks is a plain note in the primary theme, and gets `undefined`. |
| f citations | Resolve bibliography paths from the vault, independent of the host process cwd. |
| f classifyLink | Classify a link in rendered note content. Internal links get previews and the internal style; files, heading anchors, and footnote links stay quiet. |
| f clearPublicAssets | Forget every recorded file. The CLI calls this before each build, so one vault's files never ship in the next's. |
| f commitAttribution | The account a commit is authored as, with its linked GitHub account as co-author, and the App's bot that commits it. |
| f commitReader | Reads commits for one vault. The answer makes a `CommitReader` per request; installation tokens and file contents are kept across requests in this worker. Pass `token` to share one `sourceToken` with a writer. |
| f commitSource | What reading the vault's commits takes, or `undefined` when no submissions plugin keeps its mirror. Call it from `emitArtifacts` with `enforce: "post"`: the vault's folder in the repository is what the submissions plugin's own `emitArtifacts` read from git. |
| f compileNoteVersion | Compiles `markdown`, a version of the published note `note` that sat at `path` in the vault, as the build compiles the note: run `ctx.plugins`' `parseFrontmatter` stage on it alone, then their link, OFM and embed stages on it among the notes and attachments the build publishes, embedding them from the build's own sources, then compile it with the build's compiler steps and any its own content alone needs. The version takes the note's place and route, and links resolve as they do from the note now. |
| f compileProtectedNoteSource | Compile a protected note in memory for the separate encrypted bundle. |
| f composeThemes | The build manifest for themes composed on minimal: minimal's routes with each theme's build plugins. |
| f composeThemes | A runtime manifest that composes themes on minimal's shell. The first theme styles the site; each page renders with the theme that claims it. |
| f compositionOf | The composition a runtime manifest carries; minimal alone for any other manifest. |
| f containsCode | Whether `element`'s descendants are inside a code block, given whether `element` is. |
| f contentProps | The props `slot`'s component gets for `element`, besides its children. |
| f contentSlot | The slot that renders `element`, or `undefined` for plain markup. |
| f count | `1 note`, `3 notes`. |
| f createArtifactsVirtualModuleSource | |
| f createCorePlugins | Create the canonical ordered set of core plugins. Returned array matches the pipeline execution order. |
| f createHostIndexSource | `virtual:svartz/index`: each vault's published index and site metadata, in config order. It imports no page runtime or theme, not even dynamically, so a host that only reads the index never compiles Svartz's page runtime. |
| f createHostRegistrySource | `virtual:svartz/host`: the host eagerly reads route metadata and loads runtime code only for the selected mount. It also exports SvelteKit's `base` and `assets`, which SvelteKit 3's `$app/paths` no longer does. |
| f createHostServerSource | `virtual:svartz/server` in a host app: `svartzHandle` runs every host vault's generated handle in turn, and `svartzPage` asks each vault for the plugin page at a URL. |
| f createProtectionSalt | Generate a fresh salt once per password group and build. |
| f createSearch | Build a query function over the vault's search index. `documents` carries final URLs; the stored index may predate the deployment base, so hrefs come from it. |
| f createServer | Build a vault's `SvartzServer`. Each factory runs once: on its plugin's first request or page, or for an `eager` plugin before the handle answers its first request of any kind. |
| f createServerHandle | The SvelteKit `handle` of `createServer`, for apps that render no plugin pages. |
| f createServerRegistrySource | The vault's server-only module: its active server plugins as a registry; `svartzHandle`, the SvelteKit `handle` that routes `/_svartz/<id>/` to them; and `svartzPage`, which renders their pages under `/-/` for the plugin page route's `load`. `virtual:svartz/server` is this module in the standalone shell; host apps get one that chains every vault's. Its env imports keep it out of client bundles. `serverData` is what each plugin's hooks recorded for its server module this build, keyed by plugin id. |
| f createSvartzViteContext | |
| f createThemeVirtualModuleSource | Generates the `virtual:svartz/theme` module source. |
| f createVaultChangeEvent | |
| f createVaultEntryView | Apply the deployment base to one published entry, including a newly unlocked hidden note. |
| f createVaultView | Compose SvelteKit's deployment base with the index's vault-mounted URLs once. |
| f currentColorMode | The mode the page currently renders in. |
| f decodeRoutePath | Decode a percent-encoded URL pathname once; preserve slashes and return undefined for malformed escapes. |
| f default | Node-safe manifest used by the build pipeline. |
| f default | Node-safe manifest used by the build pipeline. |
| f default | Node-safe manifest used by the build pipeline. |
| f default | Node-safe manifest used by the build pipeline. |
| f default | Node-safe manifest used by the build pipeline. |
| f default | Node-safe manifest used by the build pipeline. |
| f defineConfig | |
| f definePageRenderer | Keeps a renderer's data type flowing from `detect` to its components. |
| f definePlugin | Wrap a plugin factory with runtime validation and hook normalization. The returned factory produces normalized plugins ready for the runner. |
| f defineRenderer | Keeps a renderer's data type flowing from `read` to `nav`, `page`, and `examples`. |
| f defineTheme | Define a theme with runtime validation. Accepts either a static theme object or a factory function. Returns a callable factory that validates the manifest on each invocation. |
| f deriveProtectionKey | Derive a non-exportable session key from a password and the group's public salt. |
| f discoverFiles | core:discover-files — traverse vault directory, read file contents, assign slugs. |
| f emitArtifacts | |
| f emitDiscovery | |
| f emitImages | |
| f exampleFromSchema | A representative value: the schema's example, then its default, its first enum value, then a placeholder by type. |
| f excerpt | About `words` words of `content`, centred on the first matched term. |
| f executeHandleChange | |
| f executeStage | |
| f extractFrontmatter | Markdown parsing utilities — ported from @svartz/vault parse.ts. Kept Effect-free for plugin authors. |
| f fetchPreview | Cloned preview nodes for `href`. IDs get a prefix so previews never collide with the host page's headings; `scrollTarget` finds the linked heading inside them. |
| f filterUnpublished | |
| f findComment | Comment `id` of `vault`, hidden or not, from the annotations stored in the D1 binding named `database`: what the moderation plugin shows beside a report about it. `undefined` when there's no such comment, or no such binding. |
| f findComments | `findComment` for each of `ids` in one query, by id, for a list of reports: ids with no such comment are absent, and so is every id when there's no such binding. |
| f findProfile | The public profile of the account that holds or held `handle`, under its current handle; `undefined` when no account ever held it or the site binds no `SVARTZ_DB`. A result whose `handle` differs from the one asked for means the asked one is old: redirect to the current one. Old handles never pass to another account. |
| f findProfileByIdentity | The public profile of the account provider account `identity` (such as `github:583231`) is linked to, for a plugin that stored who wrote something by their sign-in; `undefined` when no account has it or the site binds no `SVARTZ_DB`. |
| f findProfiles | The public profiles of the accounts with ids `ids`, by id, for plugins that stored an account id, such as a commit's `Svartz-Account` trailer. Ids no account has are absent, and so is every id when the site binds no `SVARTZ_DB`. |
| f findProfilesByHandle | `findProfile` for each of `handles` in one D1 call, by the handle asked for; handles no account ever held are absent, and so is every one when the site binds no `SVARTZ_DB`. |
| f findProfilesByIdentity | `findProfileByIdentity` for each of `identities` in one D1 call, by identity; identities no account has are absent. |
| f findStanding | The account that holds or held `handle`, under its current handle, with its user page and reputation; `undefined` when no account ever held it or the site binds no `SVARTZ_DB`. |
| f findSuspension | The account that holds or held `handle`, for a moderator about to suspend it or lift its suspension; `undefined` when no account ever held it or the site binds no `SVARTZ_DB`. |
| f folderBreadcrumbs | Home, then each folder down to `folder` (a folder page's trail). |
| f folderContents | Every note under a folder, nested ones included, plus its direct subfolders. The folder's own note (`log/index.md`) is its page, not an item. |
| f folderLayout | Where each note's file sits, read from the index's folder records. Slugs can't tell: when two files want one URL, one gets a suffix (`guides/index.md` may publish as `guides-2`), and a root `guides.md` may hold the folder's slug. |
| f folderTheme | The theme that lists a folder's page: the folder note's `theme:`, then its ancestors' (`folderNotes`, nearest first), then the primary theme. |
| f formatDate | Format a note date as `Sep 4, 2026`. Dates are calendar days, so format in UTC. |
| f formatReputation | `score` as the badge shows it: whole points, grouped (`1,234`), and shortened past ten thousand (`12.3K`). |
| f getCompilerContributions | |
| f getGeneratedArtifactsRoot | |
| f getGeneratedHostIndexPath | |
| f getGeneratedHostRegistryPath | |
| f getGeneratedHostServerPath | |
| f getGeneratedHostStylesPath | Use a fixed-length lowercase digest so every valid ID fits a filesystem filename. |
| f getGeneratedIndexModulePath | |
| f getGeneratedPageModulePath | |
| f getGeneratedPagesRoot | |
| f getGeneratedRuntimeArtifactsModulePath | |
| f getGeneratedRuntimeServerModulePath | |
| f getGeneratedRuntimeThemeModulePath | |
| f getGeneratedSearchModulePath | |
| f getPackageVersion | Get the `version` from a package.json. Accepts either: - A module URL (e.g. `import.meta.url`): finds the package.json for that module's package by walking up from the file. - A path to package.json (e.g. `resolve(__dirname, "../package.json")`): reads that file directly. |
| f getThemePresetPlugins | |
| f getVault | |
| f getVaultBuildRoot | |
| f groupAtBreaks | Split nodes into slides at each break. The breaks go, and so do slides with only blank nodes. |
| f hardLineBreaks | Turn prose newlines into `<br>` only when this plugin is configured. |
| f highlight | Split text into matched and plain runs, so results render highlights without HTML. |
| f history | Page history. By default, page history and Recent changes as plugin pages, and a History action on every published Markdown page. With `source: "git"`, prerendered previous versions of the notes that ask for them, on any target. |
| f hostStylesPlugin | Capture CSS from SvelteKit's client build without importing every vault runtime eagerly. |
| f indexContent | core:index — single canonical index artifact producer. |
| f isNote | |
| f isoDate | ISO date for `<time datetime>`. |
| f isPluginEnabled | |
| f isRecord | |
| f isSvelteKit3 | Whether the app in `root` installs SvelteKit 3 or later. Its options can't tell: SvelteKit 2.62 and later also take them in `sveltekit({ … })`. An app without a resolvable SvelteKit counts as SvelteKit 2, whose behaviour Svartz assumed before SvelteKit 3. |
| f isUnsafeElement | Whether `element` is dropped, children and all. |
| f isVaultSubmission | Whether pull request `number` is a submission the site saved for the vault `records` describes: what that vault's `POST close/` accepts. `false` when the binding is missing. The moderation plugin asks before it offers Close. |
| f keepsAttachment | Whether the build may publish the attachment at `path` inside the vault: discovery reads its folder and the exclude patterns let it through. The build publishes it only once a published note references it. |
| f liftSuspension | End the suspension in force on the account that holds or held `handle` now, ahead of its time. `"not-suspended"`, recording nothing, when none is in force, as when it ended or another moderator lifted it first. Throws without `SVARTZ_DB`. |
| f linkedIdentities | Every provider account linked to `account`, the first linked first, each with the profile it last signed in with. Empty when the site binds no `SVARTZ_DB`. `env` is the handler's `context.env`. |
| f listSuspensions | Every suspension in force, the most recent first; `[]` without `SVARTZ_DB`. |
| f listVaults | |
| f loadConfig | |
| f loadConfigEffect | Load, import, and parse a svartz config file. Returns the parsed SvartzConfig and the directory containing the config file. |
| f loadThemeModule | The vault's build manifest. A `theme.base` list composes every listed theme's `extensions` with theme-minimal's `composeThemes`; a theme with a selected source loads unbuilt. |
| f loadVirtualModule | |
| f markdownCopyFor | The emitted Markdown copy of the page at a request `pathname`, if it has one. Map keys are decoded and end in a slash; request paths arrive percent-encoded, and without the slash under `trailingSlash: 'never'`. |
| f matchThemeRoute | |
| f materializeTheme | Load every theme component before server rendering or hydration begins. |
| f mergePlugins | Layered merge of plugin lists. |
| f mergeProtectedIndex | Merge only unlocked, listed group discovery into a browser-local vault index. |
| f migrateGrants | Give each identity's account its grant, once ever: the first call that finds the identity linked to an account stores the grant, unless that account already holds one for the same permission and object, and records that it did. Later calls change nothing, so a grant an admin changed or removed since stays that way. Answers, per grant, whether it is in place: `false` for an identity with no account yet, which a later call can still move once they sign in, and for every grant when the site binds no `SVARTZ_DB`. |
| f mirrorsCommits | Whether one of a vault's `plugins` is a submissions plugin keeping the GitHub mirror. For a plugin's `forVault`. |
| f moderation | The `moderation` plugin: its routes and Reports panel on the server, and the Report action in the browser. |
| f mount | Browser script entry: remember the vault's config, open the dialog from `data-svartz-sign-in` elements, and link a signed-in reader to their account and the dashboard. The build doesn't know a host app's `paths.base`, so the routes get the deployment base here, from `context`. |
| f mount | Browser resource entry, which Svartz calls after every navigation: attach to the note body marked with `data-svartz-note="<slug>"`, keyed by that slug. On a host page that is the `SvartzNoteContent` body the mount is for, so each of several notes gets its own; on a theme page, the document's. A page without one gets nothing. |
| f mount | |
| f mount | Browser script entry: answer `data-svartz-report` buttons, and add **Report** to a note's page actions. The build doesn't know a host app's `paths.base`, so the routes get the deployment base here, from `context`. |
| f mount | Adds Edit to the page actions of every editable note, New page to the site actions of every page, Create your page to the account page of a reader without a user page, and Edit page to a submission in My submissions while it takes follow-up edits. The editor itself loads on first use, or at once when the reader comes back from signing in with a draft for this page. On a submission, it also keeps an unsent reply while its form posts. |
| f mount | Browser resource entry point. No tracker loads without resolved consumer config. |
| f mount | |
| f mount | Listen for the start key on every page; a navigation closes any open presentation. |
| f mountBrowserScripts | Mount active scripts and return one disposer for the current route. |
| f newestFirst | |
| f normalizePathname | |
| f normalizePlugin | Normalize a plugin: validate shape + convert function shorthand hooks to object form. Throws PluginValidationError on invalid plugins. Warnings emitted via console.warn for unknown keys and disabled-with-hooks. |
| f noteDate | The date a list shows for a note: last modified, else published, else created. An unparseable date is skipped, so one bad value can't hide the note's date. |
| f notesTagged | Notes tagged `tag` or a nested tag under it (`tag/…`). |
| f noteStylesheets | Stylesheet URLs for a host note route. Call it in the route's server `load` (`+page.server.ts`): it prepares the vault itself, and `hostStylesheets` is empty in the browser, so serialized server data must carry the SSR list. |
| f openFolderIds | Folder ids to open so `folder` shows in the explorer: it and every folder above it. |
| f openProtectedPayload | Authenticate before returning bytes. Wrong passwords and altered bytes reject. |
| f openSignIn | Open the sign-in dialog. Each provider starts sign-in and comes back to `returnTo`, by default this page. Throws until the `auth` plugin's script has mounted, which happens on every page of a vault that enables it. |
| f oxHugoFlavoredMarkdown | Normalize ox-hugo syntax before the required frontmatter and link parser. |
| f pageAt | The index's route for `path`, which a URL may percent-encode: `/caf%C3%A9/` is `/café/`, `/a%26b/` is `/a&b/`. |
| f pageCrumbs | Breadcrumbs for any page, ending with the page itself (Quartz's `showCurrentPage`). List pages walk through their index route; home and missing pages have none. Themes with other list routes pass their own `titles`. |
| f parseConfig | |
| f parseConfigEffect | Parse (validate) a raw JS object against the config schema, then check that the major version matches the config format this package reads. |
| f parseFrontmatter | core:parse-frontmatter — extract frontmatter and raw links from each file. |
| f parseSearchQuery | `#guides setup` searches notes tagged `guides` for "setup". |
| f pathRoute | The route a note's filename asks for: `people/Ada Lovelace.md` → `people/ada-lovelace`, `Guides/Guides.md` → `guides`. |
| f postReputation | Record `event` in the ledger, weighed with the site's weights, and give its account any role a threshold now grants. Posting an event again, as a repeated webhook delivery or a poll that reads it again would, scores nothing more, and gives any role the first post failed to give. An event whose recipient has no account changes nothing. |
| f presentation | Let readers present any note: `plugins: [presentation()]` in `svartz.config.ts`. The browser script and stylesheet work with every theme. |
| f publicAssetsPlugin | Emit the recorded files in the client build, unless the Svartz plugin there already did. |
| f publishedAttachments | The vault attachments the site publishes, each at `<mount>/<path>`: the files public notes reference, as `core:filter-unpublished` settles them. Attachments only protected notes reference stay in their encrypted payload. |
| f publishesNote | Whether the build publishes a note at `path` inside the vault with `frontmatter`: discovery reads its folder, and the vault's include and exclude patterns let it through and it isn't a draft, unless a publication date publishes it anyway, and it isn't private. A published note may still be password-protected. Page history judges a note's earlier versions with it, at the paths they had then. |
| f readAccount | The account behind `request`, or `null` when nobody is signed in, the session was deleted or expired, the account is suspended, or the site binds no `SVARTZ_DB`. `readSignIn` says which. |
| f readAuditLog | The audit log, newest first, a page at a time, in one query: every plugin's entries, filtered by who made them and what they changed. Throws when the site binds no `SVARTZ_DB`. The log is append-only, so nothing here changes it. |
| f readAuth | |
| f readIdentity | Who sent `request`: the provider account they signed in with, or `null` when nobody is signed in or their account is suspended. `env` is the handler's `context.env`. Without a usable `PRIVATE_SVARTZ_SESSION_SECRET` nobody can be signed in, so this answers `null`; the auth routes report the missing secret with a 503. Plugins that need a person rather than a provider account use `readAccount`. |
| f readingTime | `N min read`, rounded up, at least one minute. |
| f readLinks | A `{ Label: 'url' }` map from user config as ordered links; non-string URLs are dropped. |
| f readMcpTool | An MCP tool from a page's `operation` metadata. Throws with the reason when the metadata isn't a tool. |
| f readModel | A schema page: `model: { name: Pet, schema: {…} }`. |
| f readReferencePage | The page's data as `renderer` reads it from the page's frontmatter. Throws a `ReferencePageError` with the reason when the metadata isn't a valid page; the shell adds the page's path. |
| f readSchema | A frontmatter schema, normalized. `null` never stands alone in a union: a `null` type or alternative marks the schema `nullable`, and a union left with one alternative becomes that alternative. `type: [string, number]` reads as `anyOf` its types. |
| f readSignIn | The account behind `request`, or `null` and why: signed out, no accounts database bound, or the account suspended, with the suspension's reason and end. `env` is the handler's `context.env`. A cookie from before accounts becomes an account and a session on its first read here. |
| f readSources | The page's `source`: a URL, `{ label, href }`, or a list of either. |
| f referenceContext | What a reference renderer's components receive, worked out from the shell: every schema page by name, for `$ref`s. |
| f referenceExtension | A reference theme as a theme-minimal extension: the reference frame and top bar, these renderers, and reference chrome. Guides get minimal's page head and contents; pages a renderer claims get its page and examples. |
| f referenceRenderer | A reference renderer as a theme-minimal page renderer: it claims the pages whose `operation.protocol` (or `model`) names it, renders through `ReferenceBody` and `ReferenceExamples`, and lists with its badge. The same renderer always adapts to the same object, so a renderer two themes share (the schema renderer) stays one claim. |
| f rendererIdOf | The renderer id a page's metadata names, or `undefined` for a guide. An `operation` without a protocol is REST, as in the API theme's first release. |
| f renderHostRss | Render a summary RSS feed for an explicit set of host vaults. |
| f renderHostSitemap | Render a sitemap for selected mounts on the same public host. |
| f renderPreview | The note's HTML, rendered from `markdown` (frontmatter and all) as the site would render its body. A URL naming one of `options.attachments`, by the build's rules, links to where the build publishes it: `<base><mount>/<vault path>`. Any other relative URL resolves from the note's page, as on the site. |
| f renderRevision | `markdown` rendered as the note at `options.path`, ready to put in a page. |
| f reputationBadge | An account's reputation as a badge to follow its name, as `reputationBadgeHtml` renders it on the server. |
| f reputationBadgeHtml | The badge as HTML, to follow an account's name after a space: `<span class="sv-reputation-badge" …>1,234</span>`. A screen reader reads the score whole, and so does its tooltip. |
| f reputationBadgeParts | The badge's parts: what only assistive technology reads, and what everyone sees. A score shown whole reads as "Reputation 1,234"; a shortened one is read in full, "Reputation 12,500", while `12.5K` is shown. |
| f reputationLabel | What the badge says to assistive technology and in its tooltip: the score in full, named. |
| f requestedSlug | The route a note asks for before `allocateRoutes` settles clashes: its frontmatter `slug`, else its filename's. |
| f resolveCallout | Resolve an author-written callout type (`[!faq]`, `[!my-idea]`) to its canonical type, styling, and title. Unknown types render as notes but keep their own title. |
| f resolveConfig | |
| f resolveConfigEffect | |
| f resolveLinks | |
| f resolveProtectedBridgeImports | Substitute only generated bridge specifiers before importing decrypted JS. |
| f resolveRuntimePlugins | Merge runtime plugins in specificity order. `config.plugins` is already the defaults→vault merge from @svartz/config. `hostAdapter` is the host app's `kit.adapter.name` when the vault targets `host`. |
| f resolveThemeExport | |
| f resolveThemeModuleIds | The theme modules a vault lists, in order. |
| f resolveThemePackageRoot | Find a package root from the host app for Vite, CLI, and Tailwind consumers. |
| f resolveThemeRouteToArtifactKey | |
| f resolveThemeRuntimeImport | What `virtual:svartz/theme` imports for this vault. A theme with a selected source imports its `runtime.ts`, or its package id, which Vite aliases to the source. |
| f resolveVirtualModuleId | |
| f restorer | Restores a vault's pages. Only a GitHub App commits as an account, so with a token `commits` is false and every restore throws. `token` shares a `sourceToken` with the vault's commit reader. |
| f reverseReputation | Take back what each `edit` or `page` event `ref` earned its `account`, as one `reversal` entry per event under the same ref, all in one transaction however many there are, then give any role a threshold grants. An event is taken back once: reversing it again changes nothing. An event not posted yet still gets its entry, at 0 points, and scores nothing when it is posted; one that was posted and earned `account` nothing (it scored 0, or credited someone else) gets none. A reversal lowers a score but never takes away a role the account holds. |
| f roamFlavoredMarkdown | Add Roam prose syntax after the normal GFM parser. |
| f routeClaimsOf | The routes the vault's pages hold, hidden and protected ones included, which a page's frontmatter can claim: what `@svartz/plugin-submissions/restore` checks a restored revision against. From `emitArtifacts` with `enforce: "post"`, as `commitSource`; `undefined` without the submissions plugin. |
| f routeHref | |
| f runEffect | |
| f runLifecycleHooks | |
| f runsCode | Whether a browser would run `url` as a script or open it as an HTML document. Before it reads a URL's scheme, a browser drops the tabs and newlines anywhere in it and the spaces and control characters in front of it. |
| f runStages | |
| f safeAttributes | `element`'s HTML attributes without event handlers, `srcdoc`, or script and HTML-document URLs. |
| f savedEdits | Which of `commits` (SHAs) and `pulls` (numbers) the site saved for the vault `records` describes, and the account behind each: whoever made the commit, or opened the pull request with its first save. `null` for a save by someone without an account. In one query; none are saved when the binding is missing. |
| f schemaLabel | How a schema reads in one line: `string (uuid)`, `Pet[]`, `"a" | "b"`, `map of string`. |
| f sealProtectedPayload | Seal one group-owned payload. The ID is authenticated, so route swaps fail. |
| f setColorMode | Pin a mode on <html>, remember it, and tell listeners (comments, graphs). |
| f sharedAttachmentNames | File names of published attachments that another attachment in the vault shares. The build resolves those by path only, so a resolver that sees only `publishedAttachments` needs them to resolve the same; their names are already public, and the other files' paths stay in the build. |
| f slideAction | What a key does. Keys with Ctrl, Cmd, or Alt stay with the browser. |
| f slugToHref | |
| f sortPluginsForStage | Sort normalized plugins for a specific stage by enforce tier. Within each tier, config array order is preserved (stable sort). Only returns plugins that have a hook for the given stage. |
| f sourceLabel | A short label for a source URL. A GitHub or GitLab file link reads as its path and line (`src/mcp/tools.ts:23`); any other URL keeps its host and path. |
| f sourceToken | The token `source`'s credentials authenticate with: the configured one, or the App's installation token, kept. |
| f submissions | Let readers edit any published Markdown note, or add one in a published folder, as a pull request on `repo`. |
| f suspend | Suspend the account that holds or held `handle` until `until`, or for good without it, with `reason`, which the account reads. It replaces any suspension in force. `actor` is the signed-in moderator, from `readAccount`; check their permission first. Refused without writing anything for an admin and for the actor's own account. Throws without `SVARTZ_DB`. |
| f svartz | |
| f svartzSocialImage | The 1200×630 social preview shared by first-party themes. |
| f svartzSyntax | The syntax plugin for a first-party theme's `pluginPreset`. |
| f svelteKitBasePath | SvelteKit's `paths.base` alone, from the same definitions as `svelteKitPaths`. |
| f svelteKitPaths | Read SvelteKit's paths from the definitions it puts in Vite's resolved config, the same in SvelteKit 2 and 3. |
| f tagHrefFor | The URL of a tag's page, including the mount path, for tags the index knows or not. |
| f theme | Vite-bundled runtime manifest. |
| f theme | Vite-bundled runtime manifest. |
| f theme | Vite-bundled runtime manifest. |
| f theme | Vite-bundled runtime manifest. |
| f theme | Vite-bundled runtime manifest. Lazy entries load before SSR and hydration. |
| f theme | Vite-bundled runtime manifest. |
| f themeSettings | Read the vault's `theme` settings. They come from user config, so every field is checked; anything malformed is ignored rather than rendered. |
| f themeSourceAliases | Vite aliases that point each workspace theme at its source, by exact id. A string alias also captures subpaths, so `@svartz/theme-minimal` would rewrite another listed theme's `@svartz/theme-minimal/runtime` import. |
| f themeTokenCss | The CSS for `theme.tokens`, or nothing when there are none. The selector is `html:root` so it outranks the `:root` rules in the Svartz defaults and in every theme. Names and values that could escape the rule are dropped. |
| f titleFromSlugSegment | |
| f topLevelSections | Notes grouped by top-level folder, in first-seen order, without the home note. A folder note (`guides/index.md`) links its section instead of listing in it; a folder with only its note is an empty section. |
| f transformDescription | |
| f transformEmbeds | |
| f transformGfm | Register GFM parsing only while this plugin is active. |
| f transformLatex | Render public math with KaTeX and declare its stylesheet. |
| f transformOfm | |
| f transformSyntax | Add syntax highlighting for public notes with code. |
| f transformToc | core:transform-toc — Table of Contents extraction. |
| f userPageLocation | Where user pages live, such as `{ vault: "notes", folder: "users" }`. |
| f userPageOf | The URL, below the deployment base, of the user page at `handle`; `undefined` while there is none, for a hidden one, and until the vault that holds user pages has started. |
| f validatePluginShape | Validate a plugin against the Effect Schema. On failure, inspects the raw input to throw PluginValidationError with message parity to the legacy manual validation path. |
| f validateTheme | |
| f wasPublic | Whether the build would have published a note with `markdown`'s frontmatter, unprotected: not a draft, not private, in no password group. A revision it would have hidden stays hidden, though the page is public now. Frontmatter the build couldn't read counts as hidden. |
| f wikilinkResolver | The note a wikilink target names from anywhere in the vault, as `core:resolve-links` resolves it, or null. A target that `closest` would settle by the linking note's folder names no note here. |
| f wikilinkSegments | Frontmatter isn't run through the Markdown pipeline, so values like `Home: "[[Vessa]], Lower Wards"` keep raw `[[links]]`. Split such a value into text and linked segments, resolving targets against published notes by title, file name, or slug. Unresolved links become plain text. |
| f withMarkdownNegotiation | Run the shared Svartz handle ahead of the standalone adapters' static-file handlers. |
| f withSvartzHost | Preserve virtual modules and let Svelte compile packaged components in host apps. |