import { App } from 'vue'; import { DocsLocaleEntry } from '@deot/docs-locale'; import { DocsTheme } from '@deot/docs-theme'; import { DocsThemeOptions } from '@deot/docs-theme'; import { DocsThemePreference } from '@deot/docs-theme'; import { HTTPController } from '@deot/http-core'; import { Language } from '@deot/docs-locale'; import { MarkdownIndicatorConfig } from '@deot/docs-markdown'; import type { MarkdownPlaygroundConfig } from '@deot/docs-markdown'; import { MarkdownTheme } from '@deot/docs-markdown'; import { Ref } from 'vue'; import type { RendererDocument } from '@deot/docs-renderer'; import { RendererFit } from '@deot/docs-renderer'; import type { RendererModuleSource } from '@deot/docs-renderer'; import type { RouteLocationNormalized } from 'vue-router'; import type { RouteLocationNormalizedGeneric } from 'vue-router'; import { _RouterClassic } from 'vue-router'; export declare const bootstrap: (config?: DocsConfig) => Promise<{ app: App; router: _RouterClassic; disconnect: () => void; }>; export declare const classifyResourceSource: (source: string) => DocsResourceType; export declare const createRendererEditorDemoDocument: (demo: RendererEditorDemo, lang: string) => RendererDocument; export declare const createResourceIdentity: (config: DocsConfig, lang: string, type: DocsResourceType, source: string) => ResourceIdentity; export declare const DOCS_RESOURCE_TYPES: readonly ["markdown", "sidebar", "page", "sfc", "module", "style"]; export declare interface DocsComponentsOptions { markdown?: DocsMarkdownComponentOptions; playground?: DocsPlaygroundComponentOptions; renderer?: DocsRendererComponentOptions; } export declare interface DocsConfig { locales: Record; routes: Record; base?: string; repository?: string; namespace?: string; modules?: Record; styles?: Record; prefetch?: boolean | DocsPrefetchOptions; theme?: boolean | DocsThemeOptions; components?: DocsComponentsOptions; layout?: DocsLayoutOptions; renderers?: RendererModuleSource[]; resolve?: { markdown?: (context: DocsMarkdownContext) => string | Promise; resource?: (context: DocsResourceContext) => string | null | undefined | Promise; link?: (context: DocsLinkContext) => string | null | undefined; }; runtime?: Readonly; } export declare type DocsContent = DocsSlot | RendererDocument; export declare interface DocsFooterOptions { nav?: DocsLocalized; poweredBy?: DocsLocalized; } export declare type DocsFooterPoweredBy = 'default' | string | false; export declare interface DocsHeaderBrandOptions { logo?: DocsLocalized; label?: DocsLocalized; value?: DocsLocalized; } export declare interface DocsHeaderOptions { brand?: DocsHeaderBrandOptions; nav?: DocsLocalized; } export declare interface DocsLayoutOptions { header?: DocsHeaderOptions; footer?: 'default' | DocsFooterOptions | false; } export declare interface DocsLinkContext { href: string; lang: string; source: string; route: RouteLocationNormalized; } export { DocsLocaleEntry } export declare type DocsLocalized = T | Record; export declare interface DocsMarkdownComponentOptions { theme?: MarkdownTheme; indicator?: MarkdownIndicatorConfig; } export declare interface DocsMarkdownContext { lang: string; value: string; route: RouteLocationNormalizedGeneric; } export declare type DocsPlaygroundComponentOptions = Omit; export declare interface DocsPrefetchOptions { batchSize?: number; idleTimeout?: number; } export declare interface DocsRendererComponentOptions { fit?: RendererFit; } export declare interface DocsResourceContext { source: string; type: DocsResourceType; lang: string; importer?: string; base?: string; runtime: Readonly; } export declare type DocsResourceType = typeof DOCS_RESOURCE_TYPES[number]; export declare interface DocsRoute { value?: string | ((to: RouteLocationNormalizedGeneric) => string); content?: DocsLocalized; sidebar?: DocsSidebar; header?: DocsSlot; footer?: DocsSlot; extra?: DocsSlot; } export declare type DocsRouteConfig = DocsRoute | string | ((to: RouteLocationNormalizedGeneric) => string); export declare interface DocsRuntime { mode: 'development' | 'production'; workspace?: string; events?: string; } export declare type DocsSidebar = DocsSlot | SidebarItem[] | Record; export declare type DocsSlot = 'default' | string | null; export { DocsTheme } export declare interface DocsThemeController { readonly current: Readonly>; readonly enabled: Readonly>; readonly ready: Readonly>; set(theme: DocsTheme, origin?: HTMLElement): Promise; toggle(origin?: HTMLElement): Promise; } export { DocsThemeOptions } export { DocsThemePreference } export declare const Gateway: ResourceGateway; export declare const getDefaultLanguage: (config: DocsConfig) => string; export declare const getDocsBase: (config: DocsConfig) => string; export declare const getDocsConfig: () => DocsConfig; export declare const getDocsDeploymentBase: (config: DocsConfig) => string; export declare const getDocsNamespace: (config: DocsConfig) => string; export declare const getDocsRuntime: () => Readonly; export declare const initializeDocsRuntime: (target?: Window, config?: DocsConfig) => Readonly>; export declare const isRendererEditorDemo: (value: unknown) => value is RendererEditorDemo; export { Language } declare type LegacyResourceField = Exclude; export declare const listRendererEditorDemos: (lang: string) => RendererEditorDemoItem[]; export { MarkdownIndicatorConfig } export { MarkdownTheme } export declare const Network: HTTPController; export declare const normalizeWorkspaceBase: (value?: string) => string; export declare const PlaygroundResource: PlaygroundResourceRuntime; export declare class PlaygroundResourceCache { private store; private createId; private putRecord; list(namespace: string): Promise; set(namespace: string, alias: string, url: string, kind: PlaygroundResourceKind, patch?: StatusPatch): Promise; patch(namespace: string, alias: string, kind: PlaygroundResourceKind, patch: Partial): Promise; remove(namespace: string, alias: string, kind: PlaygroundResourceKind): Promise; clear(namespace: string): Promise; } export declare type PlaygroundResourceKind = 'import' | 'style'; export declare type PlaygroundResourceLastAction = 'save' | 'reset' | 'prefetch' | 'retry'; export declare interface PlaygroundResourceProbeSummary { total: number; fulfilled: number; rejected: number; } export declare interface PlaygroundResourceRecord { id: string; namespace: string; alias: string; url: string; kind: PlaygroundResourceKind; updatedAt: number; source?: PlaygroundResourceSource; requestStatus?: PlaygroundResourceRequestStatus; requestStatusUpdatedAt?: number; checkedAt?: number; reason?: string; lastAction?: PlaygroundResourceLastAction; } export declare type PlaygroundResourceRequestStatus = 'waiting' | 'pending' | 'success' | 'error'; export declare interface PlaygroundResourceRow { kind: PlaygroundResourceKind; alias: string; defaultUrl: string; currentUrl: string; overridden: boolean; requestStatus: PlaygroundResourceRequestStatus; requestStatusUpdatedAt?: number; updatedAt?: number; checkedAt?: number; reason?: string; lastAction?: PlaygroundResourceLastAction; } declare class PlaygroundResourceRuntime { private cache; private generation; private seedTask; private statusSubscribers; private sessionStatus; waitForIdle(): Promise; subscribeStatus(listener: StatusListener): () => boolean; private notifyStatus; private sessionKey; private setSessionStatus; private clearSessionStatus; private markStatus; private hydrateDefaults; private toRows; list(namespace: string): Promise; listPage(config: DocsConfig): Promise<{ rows: PlaygroundResourceRow[]; bytes: number; }>; set(namespace: string, alias: string, url: string, kind: PlaygroundResourceKind): Promise; remove(namespace: string, alias: string, kind: PlaygroundResourceKind): Promise; private probeUrl; private runPool; private withPending; save(namespace: string, alias: string, url: string, kind: PlaygroundResourceKind, defaultUrl?: string): Promise; reset(namespace: string, alias: string, kind: PlaygroundResourceKind, defaultUrl: string): Promise; prefetch(namespace: string, rows: PlaygroundResourceRow[]): Promise; retry(namespace: string, row: PlaygroundResourceRow): Promise; clear(namespace: string): Promise; start(config: DocsConfig): Promise<() => void>; } declare type PlaygroundResourceSource = 'default' | 'override'; export declare const RENDERER_EDITOR_DEMOS: readonly ["sortable", "landing", "shared", "promo", "docs", "combo", "draggable", "selection"]; export declare type RendererEditorDemo = typeof RENDERER_EDITOR_DEMOS[number]; declare interface RendererEditorDemoItem { name: RendererEditorDemo; title: string; description: string; modules: readonly string[]; accent: string; } export declare const rendererEditorDemoPath: (lang: string, demo?: RendererEditorDemo) => string; export { RendererFit } export declare const resolveResource: (config: DocsConfig, context: Omit) => Promise; declare interface ResourceCache { get(key: string): Promise; set(key: string, value: ResourceRecord): Promise; remove(key: string): Promise; list(): Promise; clear(): Promise; } export declare interface ResourceContentRecord extends ResourceRecord { status: 'success'; content: string; hash: string; updatedAt: number; } export declare class ResourceGateway { private cache; private request; private scheduler; private memory; private pending; private controllers; private trailing; private cacheWrites; private subscribers; private statusSubscribers; private prefetched; private globalRevision; private resourceRevisions; private polling; private deletionBarrier; constructor(options?: ResourceGatewayOptions); setConcurrency(value: number): void; load(identity: ResourceIdentity, options?: ResourceLoadOptions): Promise; revalidate(identity: ResourceIdentity, options?: ResourceLoadOptions): Promise; prefetch(identities: ResourceIdentity[], options?: ResourcePrefetchOptions): Promise[]>; poll(input: ResourceIdentity | ResourceIdentity[], options?: number | ResourcePollOptions): () => void; private startPolling; stopPolling(identity: ResourceIdentity): void; subscribe(identity: ResourceIdentity, listener: (record: ResourceContentRecord) => void): () => void; subscribeStatus(listener: (record: ResourceRecord) => void): () => boolean; isSubscribed(identity: ResourceIdentity): boolean; isPrefetched(identity: ResourceIdentity): boolean; list(): Promise; invalidate(identity: ResourceIdentity): Promise; clear(): Promise; prune(namespace: string, retainedIdentities: ResourceIdentity[]): Promise; private loadInternal; private revalidateInternal; private revalidateSilently; private consumePending; private queueTrailing; private mergeTrailingOptions; private flushTrailing; private cancelTrailing; private enqueueDeletion; private enqueueCacheWrite; private settlePending; private readRecord; private writeRecord; private getMutationToken; private isMutationTokenCurrent; private assertMutationToken; private repairStaleWrite; private transition; private update; private completeSuccess; } declare interface ResourceGatewayOptions { concurrency?: number; cache?: ResourceCache; request?: ResourceRequest; } export declare interface ResourceIdentity { namespace: string; lang: string; type: DocsResourceType; source: string; } export declare const resourceIdentityKey: (identity: ResourceIdentity) => string; export declare interface ResourceLoadOptions { url?: string; priority?: number; refresh?: boolean; signal?: AbortSignal; trailing?: boolean; } export declare interface ResourcePollOptions { interval?: number; priority?: number; } export declare interface ResourcePrefetchOptions { priority?: number; signal?: AbortSignal; } export declare interface ResourceRecord { identity: ResourceIdentity; url: string; status: ResourceStatus; requestStatus: ResourceStatus; requestStatusUpdatedAt: number; statusHistory: ResourceStatusHistory[]; contentHistoryId: string | null; contentHistoryIndex: number | null; reason?: string; content?: string; hash?: string; updatedAt?: number; etag?: string; lastModified?: string; checkedAt: number; accessedAt: number; previous?: ResourceVersion; } export declare type ResourceRecordInput = Omit & { [K in LegacyResourceField]?: unknown; } & { statusUpdatedAt?: unknown; }; declare type ResourceRequest = (url: string, headers: Record, signal?: AbortSignal) => Promise; export declare type ResourceStatus = 'waiting' | 'pending' | 'success' | 'error'; export declare interface ResourceStatusHistory { id: string; status: ResourceStatus; createdAt: number; waitingAt?: number; pendingAt?: number; completedAt?: number; reason?: string; } export declare interface ResourceVersion { content: string; hash: string; updatedAt: number; } declare interface SettingsAccess { get(namespace: string, key: string): Promise; set(namespace: string, key: string, value: T): Promise; } export declare interface SidebarItem { label: string; value?: string; icon?: string | [normal: string, selected: string]; tag?: string; children?: SidebarItem[]; } declare type StatusListener = () => void; declare type StatusPatch = Pick; declare interface TextResponse { status: number; body: string; etag?: string; lastModified?: string; } export declare const Theme: ThemeSettingsManager; declare class ThemeSettingsManager implements DocsThemeController { private settings; private value; private enabledValue; private readyValue; private active; private namespace; private media?; private session; private preferenceVersion; private followingSystem; private target?; private appliedTarget?; private appliedTheme?; private operation?; private queued?; private requested?; readonly current: Readonly>; readonly enabled: Readonly>; readonly ready: Readonly>; constructor(settings: SettingsAccess); private normalizeDefault; private getSystemTheme; private resolveInitialTheme; private apply; private detachSystemListener; private attachSystemListener; private handleSystemChange; private shouldAnimate; private resolveTransitionPoint; private applyWithTransition; private restore; start(config: DocsConfig, target?: Window): () => void; private stop; private flush; private ensureFlush; set(theme: DocsTheme, origin?: HTMLElement): Promise; toggle(origin?: HTMLElement): Promise; } export declare const trimSlashes: (value: string) => string; export { }