Skip to content

Package API

Oxiquill is ESM-only. Use the package export map instead of importing files below node_modules/oxiquill directly.

ExportPublic API
oxiquilldefineOxiquillConfig, oxiquillIntegration
oxiquill/astroThe same functions plus OxiquillConfig, OxiquillIntegrationOptions, OxiquillFrameworkOptions, OxiquillMarkdownConfig, OxiquillPathOptions, and OxiquillPythonOptions types
oxiquill/contentcreateOxiquillCollections with OxiquillContentDependencies and OxiquillCollections types
oxiquill/runtime/InteractiveCellPreact component used by the interactive-cell remark transform
oxiquill/runtime/MermaidDiagramPreact Mermaid renderer used by the Mermaid remark transform
oxiquill/runtime/typesCell manifest, input, worker message, artifact, table, and chart TypeScript types
oxiquill/components/starlight/PageFrameOxiquill’s Starlight page-frame override
oxiquill/components/starlight/TwoColumnContentOxiquill’s collapsible desktop table-of-contents layout override
oxiquill/styles/katex.cssKaTeX styles loaded by the default integration
oxiquill/styles/custom.cssOxiquill runtime, output, media, and page-frame styles
oxiquill/tsconfigs/strictStrict TypeScript base config for consumer projects
oxiquill/envAmbient declarations for Oxiquill virtual modules and asset imports

The component, style, and environment exports are public for advanced composition, but a normal project gets them through defineOxiquillConfig() and should not import them manually.

Use defineOxiquillConfig(options) for a complete site. Pass the required framework.starlight integration factory; Oxiquill installs its integration before Preact and Starlight, then appends consumer integrations. See Project Configuration for fields and precedence.

Use oxiquillIntegration(options) only in a manually composed Astro config. It provides Markdown transforms, virtual modules, runtime generation, Wasm builds, Vite resolution, and license output, but it does not add Preact or Starlight for you.

Invalid framework integration factories and unsupported custom Markdown processors throw a TypeError. Configuration loading and path conflicts fail before generated files are written.

Most sites should create the Starlight docs collection with the dependency-injected API:

import { defineCollection } from 'astro:content';
import { docsLoader } from '@astrojs/starlight/loaders';
import { docsSchema } from '@astrojs/starlight/schema';
import { createOxiquillCollections } from 'oxiquill/content';
export const collections = createOxiquillCollections({ defineCollection, docsLoader, docsSchema });

createOxiquillCollections({ defineCollection, docsLoader, docsSchema }) is the normal content API. It returns { docs } using the injected Starlight loader and schema.

oxiquill/runtime/types describes the public wire shapes exchanged between generated manifests, workers, and renderers. Treat these values as untrusted at runtime: artifact validation and resource limits still apply even when TypeScript accepts a producer. See Interactive Cells and Rich Output for the complete contracts.