import type { MDXContent, SlugCasing } from '@renoun/mdx'; import { type GetEditorUriOptions } from '../utils/get-editor-uri.ts'; import { type OutlineRange } from '../utils/get-outline-ranges.ts'; import type { FileExportStaticMetadata, ModuleExport as JavaScriptFileExportMetadata } from '../utils/get-file-exports.ts'; import { type IsJavaScriptLikeExtension, type HasJavaScriptLikeExtensions } from '../utils/is-javascript-like-extension.ts'; import { type PathLike } from '../utils/path.ts'; import type { Kind, TypeFilter } from '../utils/resolve-type.ts'; import type { FileSystem, FileSystemWriteFileContent, FileWritableStream } from './FileSystem.ts'; import { type Cache } from './Cache.ts'; import { Repository, type RepositoryInput, type Release, type GetFileUrlOptions, type GetReleaseOptions, type GetReleaseUrlOptions } from './Repository.ts'; import { Session } from './Session.ts'; import { type GlobModuleMap } from './loader-core.ts'; import { type DirectorySchema, type DirectorySchemaOption, type ModuleExportValidator } from './schema.ts'; import type { StandardSchemaV1 } from './standard-schema.ts'; import type { DirectoryStructure, ExtractFileExtension, FileStructure, ModuleExportStructure, ContentSection, Section, GitMetadata, StructureOptions } from './types.ts'; import { type NormalizedStructureOptions } from './structure-options.ts'; /** A function that resolves the module runtime. */ type ModuleRuntimeResult = Value | Promise | (() => Value | Promise); type ModuleRuntimeLoader = (path: string, file: File | JavaScriptFile | MarkdownFile | MDXFile) => ModuleRuntimeResult; /** A record of named exports in a module. */ type ModuleExports = { [exportName: string]: Value; }; type NormalizeModuleTypes = IsAny extends true ? UnknownModuleExports : Types extends ModuleExports ? Types : Types extends object ? Types : UnknownModuleExports; export type { ContentSection, DirectoryStructure, FileStructure, FileSystemStructure, FileSystemStructureKind, ModuleExportStructure, PackageStructure, Section, WorkspaceStructure, } from './types.ts'; type SourceReleaseOptions = GetReleaseOptions & { repository?: RepositoryInput; }; type SourceReleaseUrlOptions = GetReleaseUrlOptions & { repository?: RepositoryInput; }; export type { DirectorySchema, DirectorySchemaOption, ModuleExportValidator, } from './schema.ts'; /** Utility type that infers the schema output from validator functions or a [Standard Schema](https://github.com/standard-schema/standard-schema?tab=readme-ov-file#standard-schema-spec). */ export type InferModuleExports = { [ExportName in keyof Exports]: Exports[ExportName] extends StandardSchemaV1 ? StandardSchemaV1.InferOutput : Exports[ExportName] extends ModuleExportValidator ? Output : Exports[ExportName]; }; type Merge = Omit & B; type MergeRecord = { [K in keyof A | keyof B]: K extends keyof B ? K extends keyof A ? Merge : B[K] : K extends keyof A ? A[K] : never; }; type KnownSchemaExtension = 'js' | 'jsx' | 'ts' | 'tsx' | 'md' | 'mdx' | 'json'; type IsSchemaByExtension = Schema extends Record ? Extract extends never ? false : true : false; type InferDirectorySchemaOptionTypes