import { D as StructuredDocumentSection, E as StructuredDocument, I as VivliostylePackageMetadata, N as VivliostyleConfigSchema, P as VivliostyleInlineConfig, k as ThemeSpecifier, y as ParsedVivliostyleInlineConfig } from "./schema-DogSg2Ov.js";
import { t as createVitePlugin } from "./vite-adapter-CyZFln4G.js";
import { Metadata, StringifyMarkdownOptions, VFM, readMetadata } from "@vivliostyle/vfm";
import fs from "node:fs";
import { ViteDevServer } from "vite";
import { fetch as fetch$1 } from "node-fetch-native";

//#region src/schema/publication.schema.d.ts
/**
 * This file was automatically generated by json-schema-to-typescript.
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
 * and run json-schema-to-typescript to regenerate this file.
 */
type PublicationContexts = [] | ['https://schema.org'] | ['https://schema.org', 'https://www.w3.org/ns/pub-context', ...(string | {
  language: BCP47LanguageTag;
  direction?: never;
  [k: string]: unknown;
} | {
  direction: 'ltr' | 'rtl';
  language?: never;
  [k: string]: unknown;
} | {
  language: BCP47LanguageTag;
  direction: 'ltr' | 'rtl';
  [k: string]: unknown;
} | {
  language?: never;
  direction?: never;
  [k: string]: unknown;
})[]];
type BCP47LanguageTag = string;
type URL = string;
type UniqueStrings = string | string[];
type ListsOfItemList = SchemaOrgItemListObject | SchemaOrgItemListObject[];
type LocalizableStringOrObject = string | (string | LocalizableStringObject)[] | LocalizableStringObject;
type Contributor = string | (string | ContributorObject)[] | ContributorObject;
type URLs = string | string[];
type Duration = string;
type Languages = BCP47LanguageTag | BCP47LanguageTag[];
type Dates = string;
type ResourceCategorization = (URL | PublicationLinks) | (URL | PublicationLinks)[];
interface PublicationManifest$1 {
  '@context': PublicationContexts;
  type?: string | string[];
  conformsTo: URL | URL[];
  id?: string;
  abridged?: boolean;
  accessMode?: UniqueStrings;
  accessModeSufficient?: ListsOfItemList;
  accessibilityFeature?: UniqueStrings;
  accessibilityHazard?: UniqueStrings;
  accessibilitySummary?: LocalizableStringOrObject;
  artist?: Contributor;
  author?: Contributor;
  colorist?: Contributor;
  contributor?: Contributor;
  creator?: Contributor;
  editor?: Contributor;
  illustrator?: Contributor;
  inker?: Contributor;
  letterer?: Contributor;
  penciler?: Contributor;
  publisher?: Contributor;
  readBy?: Contributor;
  translator?: Contributor;
  url?: URLs;
  duration?: Duration;
  inLanguage?: Languages;
  dateModified?: Dates;
  datePublished?: Dates;
  name?: LocalizableStringOrObject;
  readingOrder?: ResourceCategorization;
  resources?: ResourceCategorization;
  links?: ResourceCategorization;
  readingProgression?: 'ltr' | 'rtl';
  [k: string]: unknown;
}
interface SchemaOrgItemListObject {
  type: 'ItemList' | string[];
  itemListElement: string[];
  [k: string]: unknown;
}
interface LocalizableStringObject {
  value: string;
  language?: BCP47LanguageTag;
  [k: string]: unknown;
}
interface ContributorObject {
  name: LocalizableStringOrObject;
  id?: URL;
  type?: ('Person' | 'Organization') | string[];
  url?: URL;
  identifier?: string[];
  [k: string]: unknown;
}
interface PublicationLinks {
  type?: 'LinkedResource' | string[];
  url: URL;
  encodingFormat?: string;
  name?: LocalizableStringOrObject;
  description?: string | LocalizableStringObject;
  rel?: string | string[];
  integrity?: string;
  duration?: Duration;
  alternate?: ResourceCategorization;
  [k: string]: unknown;
}
//#endregion
//#region src/config/define.d.ts
/**
 * Define the configuration for Vivliostyle CLI.
 */
declare function defineConfig(config: VivliostyleConfigSchema): VivliostyleConfigSchema;
//#endregion
//#region src/npm.d.ts
interface PackageJson {
  name: string;
  version: string;
  author?: string | {
    name?: string;
    email?: string;
    url?: string;
  };
  description?: string;
  dependencies?: Record<string, string>;
  dist?: {
    fileCount: number;
    integrity: string;
    shasum: string;
    signatures: {
      keyid: string;
      sig: string;
    }[];
    tarball: string;
    unpackedSize: number;
  };
  keywords?: string[];
  main?: string;
  style?: string;
  vivliostyle?: unknown;
}
//#endregion
//#region src/util.d.ts
type VivliostylePackageJson = PackageJson & {
  vivliostyle?: VivliostylePackageMetadata;
};
//#endregion
//#region src/create-template.d.ts
interface TemplateVariable extends Omit<ParsedVivliostyleInlineConfig, 'theme'> {
  projectPath: string;
  title: string;
  author: string;
  language: string;
  theme?: ThemeSpecifier;
  themePackage?: VivliostylePackageJson;
  cliVersion: string;
  coreVersion: string;
}
//#endregion
//#region src/index.d.ts
/** @hidden */
type PublicationManifest = PublicationManifest$1;
/**
 * Build publication file(s) from the given configuration.
 *
 * ```ts
 * import { build } from '@vivliostyle/cli';
 * build({
 *   configPath: './vivliostyle.config.js',
 *   logLevel: 'silent',
 * });
 * ```
 *
 * @param options
 * @returns
 */
declare function build(options: VivliostyleInlineConfig): Promise<void>;
/**
 * Open a browser for previewing the publication.
 *
 * @param options
 * @returns
 */
declare function preview(options: VivliostyleInlineConfig): Promise<ViteDevServer>;
/**
 * Scaffold a new Vivliostyle project.
 *
 * @param options
 * @returns
 */
declare function create(options: VivliostyleInlineConfig): Promise<void>;
//#endregion
export { type Metadata, PublicationManifest, type StringifyMarkdownOptions, type StructuredDocument, type StructuredDocumentSection, type TemplateVariable, VFM, type VivliostyleConfigSchema, type VivliostylePackageMetadata, build, create, createVitePlugin, defineConfig, preview, readMetadata };
//# sourceMappingURL=index.d.ts.map