Files
authentik/web/types/webcomponents.d.ts
Teffen Ellis 61a75e6a0a web: Flow Executor layout fixes (#20134)
* Fix footer alignment.

* Fix loading position in compatibility mode.

* Apply min height only when placeholder content is present.

* Fix alignment in compatibility mode.

* Add compatibility mode host selectors.

* Fix nullish challenge height. Clarify selector behavior.

* Add type defintion

* Fix padding.

* Fix misapplication of pf-* class to container.

* Fix huge base64 encoded attribute.

* Clean up layering issues, order of styles.

* Disable dev override.

* Document parts.
2026-02-16 20:29:32 +01:00

66 lines
2.4 KiB
TypeScript

/**
* @file Web component globals applied to the Window object.
*
* @see https://www.npmjs.com/package/@webcomponents/webcomponentsjs
*/
export {};
declare global {
type Booleanish = "true" | "false";
type WebComponentFlags = Record<string, Booleanish | boolean | Record<string, boolean>>;
interface WebComponents {
/**
* Flags that can be set on the `WebComponents` global to control the behavior of web components in the application.
* Typically, this is limited to the `webcomponents-loader`.
*/
flags?: WebComponentFlags;
}
interface ShadyDOM {
/**
* Forces the use of the Shady DOM polyfill, even in browsers that support native Shadow DOM.
* This can be useful for testing or to work around specific issues with native Shadow DOM in certain browsers.
*/
force?: boolean | Booleanish;
/**
* Prevents the patching of native Shadow DOM APIs when the Shady DOM polyfill is in use.
* This can be useful for debugging or to avoid conflicts with other libraries that also patch these APIs.
*/
noPatch?: boolean | Booleanish;
}
interface CustomElementRegistry {
/**
* An indication of whether the polyfill for web components is in use.
*/
readonly forcePolyfill?: Booleanish | boolean;
}
interface Window {
/**
* An object representing the state of web component support and configuration in the application.
*/
WebComponents?: Readonly<WebComponents>;
/**
* An object representing the configuration for the Shady DOM polyfill,
* which provides support for Shadow DOM in browsers that do not natively support it.
*/
ShadyDOM?: Readonly<ShadyDOM>;
/**
* A root path for loading web component polyfills. This is only applicable
*
* @remarks
* If you're using the loader on a page that enforces the `trusted-types`
* Content Security Policy, you'll need to allow the `webcomponents-loader`
* policy name so that the loader can dynamically create and insert a `<script>`
* for the polyfill bundle it selects based on feature detection. I
* f you set `WebComponents.root` (which is rare), it should be set to a {@linkcode TrustedScriptURL}
* for Trusted Types compatibility.
*/
root?: string | TrustedScriptURL;
}
}