const Ultraviolet: typeof import("./src/rewrite/index").default;1const UVClient: typeof import("./src/client/index").default;23export type UltravioletCtor = typeof Ultraviolet;4export type UVClientCtor = typeof UVClient;56/**7* The proxy part of the URL.8*/9type Coded = string;1011/**12* The URL encoder.13* Encoders will have to encode the result using encodeURLComponent.14*/15export type UVEncode = (input: Coded) => string;1617/**18* The URL encoder.19* Decoders will have to decode the input first using decodeURLComponent.20*/21export type UVDecode = (input: Coded) => string;2223export type UVInject = {24/**25* The host(s) to inject the HTML on.26* This is a regex that's tested against the proxied URL's host.27*/28host: RegExp;29/**30* Where to inject the HTML31* Possible values: `"head" | "body"`32*/33injectTo: "head" | "body";34/**35* The HTML to inject.36*/37html: string;38};3940/**41* The Ultraviolet configuration object.42* This interface defines the configuration options for the Ultraviolet library.43*/44export interface UVConfig {45/**46* The prefix for Ultraviolet to listen on.47* This prefix will be used to create the URL for the service worker and the client script.48* @example `https://example.org/uv/service/`49* @example `/uv/service/`50* @defaultValue `/service/`51*/52prefix?: string;53/**54* The path to the Ultraviolet client script.55* This script will be loaded by the browser and is responsible for communicating with the service worker.56* Both relative and absolute paths are accepted. Relative paths are resolved to the current URL57* @example `/uv/uv.client.js`,58* @defaultValue `/uv.client.js` or if bundle is specified and the filename is `uv.bundle.js`, the directory of the bundle + `uv.client.js` will be used automatically59*/60client?: string;61/**62* The path to the Ultraviolet service worker script.63* This script will be registered as a service worker and is responsible for handling network requests.64* Both relative and absolute paths are accepted. Relative paths are resolved to the current URL65* @example `/uv/uv.sw.js`,66* @defaultValue `/uv.sw.js`67*/68handler?: string;69/**70* The path to the bundled script that contains both the Ultraviolet client and service worker scripts.71* This path is optional and can be used instead of the `client` and `handler` paths to load a single bundled script.72* Both relative and absolute paths are accepted. Relative paths are resolved to the current URL73* @example `/uv/uv.bundle.js`,74* @defaultValue `/uv.bundle.js`75*/76bundle?: string;77/**78* The path to the Ultraviolet configuration script.79* This script should export a configuration object that will be used to configure the client and service worker.80* Both relative and absolute paths are accepted. Relative paths are resolved to the current URL81* @example `/uv/uv.config.js`,82* @defaultValue `/uv.config.js`83*/84config?: string;85/**86* The path to the Ultraviolet service worker script.87* This path is optional and can be used instead of the `handler` path to specify a custom service worker script.88* Both relative and absolute paths are accepted. Relative paths are resolved to the current URL89* @example `/uv/uv.sw.js`,90* @defaultValue `/uv.sw.js`91*/92sw?: string;93/**94* The URL encoder.95* This function will be used to encode URLs before they are sent to the server.96* The encoder should use `encodeURIComponent` to encode the URLs.97* @defaultValue `Ultraviolet.codec.xor.encode`98*/99encodeUrl?: UVEncode;100/**101* The URL decoder.102* This function will be used to decode URLs after they are received from the server.103* The decoder should use `decodeURIComponent` to decode the URLs.104* @defaultValue `Ultraviolet.codec.xor.decode`105*/106decodeUrl?: UVDecode;107/**108* HTML inject settings.109* This property expects an array of `UVInject`.110*/111inject?: UVInject[];112}113114115