import { CdnEvent, CdnFetchEvent } from './events.models'; /** * A FileLocationString is a string that specifies location in the files structure of a module using the format: * `{moduleName}#{version}~{rest-of-path}` * * Where: * * `moduleName` is the name of the module containing the script * * `version` is the version of the module * * `rest-of-path` is the path of the script from the root module directory * * > For the time being, `version` defines a specific fixed version (not a semver query). * * E.g.: `codemirror#5.52.0~mode/javascript.min.js` * */ export type FileLocationString = string; /** * A LightLibraryQueryString is a string that defines query of a library using format: * `{moduleName}#{semver}` * * Where: * * `moduleName` is the name of the module * * `semver` any valid [semantic versioning specifiers](https://devhints.io/semver), not all * strings are however meaningful, **read below** * * E.g.: `codemirror#^5.52` * * > When resolving the library query, there are two cases: * > * the query defines a fixed version: this particular version will be used * > * the query defines a range: only the major define in `semver` is relevant, the actual library * > fetched is always the latest of the provided major. */ export type LightLibraryQueryString = string; /** * A LightLibraryQueryStringWithAlias is a {@link LightLibraryQueryString} with the addition of an optional alias: * `{moduleName}#{semver} as {alias}` * `codemirror#^5.52.0 as CM` */ export type LightLibraryWithAliasQueryString = string; /** * A FullLibraryQueryString is a string that defines query of a library using format: * `{moduleName}#{semver}` * * Where: * * `moduleName` is the name of the module * * `semver` any valid [semantic versioning specifiers](https://devhints.io/semver) */ export type FullLibraryQueryString = string; /** * Specification of a module. */ export type ModuleInput = { name: string; version: string; sideEffects?: (Window: any) => void; } | string; /** * specification of a CSS resource, either: * * the reference to a location * * an object with * * 'location': reference of the location * * 'sideEffects': the sideEffects to execute after the HTMLLinkElement has been loaded, * see {@link CssSideEffectCallback} * */ export type CssInput = FileLocationString | { location: FileLocationString; sideEffects?: CssSideEffectCallback; }; /** * specification of a Script resource, either: * * the reference to a location * * an object with * * 'location': reference of the location * * 'sideEffects': the sideEffects to execute after the HTMLScriptElement has been loaded, * see {@link ScriptSideEffectCallback} * */ export type ScriptInput = FileLocationString | { location: FileLocationString; sideEffects: ScriptSideEffectCallback; }; export type InstallStyleSheetsInputs = { /** * See {@link InstallInputs.css} */ css: CssInput[]; /** * Window global in which css elements are added. If not provided, `window` is used. */ renderingWindow?: Window; }; /** * Inputs for the method {@link Client.installLoadingGraph}. * * * * *
* * *