import { LitElement, PropertyValues } from 'lit';
import { WeavySettingsProps, WeavyType } from './client/weavy';
import { WeavyTokenFactory, StrictWeavyOptions } from './types/weavy.types';
declare global {
interface HTMLElementTagNameMap {
"wy-context": WyContext;
}
}
/**
* The Weavy context component provides a declarative way of [initializing the Weavy UIKit](https://www.weavy.com/docs/reference/uikit) that does not require creating an instance of the `Weavy` class.
* This can be useful in some scenarios, for instance in low-code and no-code platforms with limited javascript functionality.
*
* When used with child nodes, the Weavy context acts a regular [context provider](https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/context.md), which makes the configuration available to it's child nodes only.
* If no child nodes are present, the configuration is instead available globally in the DOM.
*
* To use the context component in the UIKit you need initialize it with the `url` to your [environment](https://www.weavy.com/docs/learn/environment) and `tokenFactory`/`tokenUrl` for [authentication](https://www.weavy.com/docs/learn/authentication).
*
* > For use with React, you can instead use the standard React context provider or the `useWeavy` configuration hook, available in the `@weavy/uikit-react` package. See [Getting started with Weavy using React](https://www.weavy.com/docs/get-started/react) on how to configure Weavy in React.
*
* **Component layout**
*
* This component does not render or occupy any visual space in the rendering.
*
* You can add additional styling for _other_ child Weavy components using [CSS Custom Properties](https://www.weavy.com/docs/learn/styling).
*
* @tagname wy-context
* @slot - Default slot for any elements that will have access to the Weavy context provider.
*
* @example
Globally available Weavy context
*
* The context component is place by itself without any children and becomes available to the entire DOM.
*
* It's configured with a `tokenUrl` endpoint that needs to be implemented and provided at your server.
*
* ```html
*
* ...
* Messenger with standard weavy configuration
*
* ```
*
* @example Scoped Weavy context provider
*
* Placing components as children to the context makes the configuration only available to it's children.
*
* It's configured with a `tokenUrl` endpoint that needs to be implemented and provided at your server.
*
* ```html
*
* Messenger inside a weavy context provider
*
*
* ```
*/
export declare class WyContext extends LitElement implements StrictWeavyOptions, WeavySettingsProps {
static styles: import('lit').CSSResult[];
/**
* Enables scoped context mode so only child elements consume the provided context.
*/
provider: boolean;
/**
* Annotation appearance configuration shared with child components.
*
* @type {"none" | "buttons-inline"}
*/
annotations: import('./types/msg.types').AnnotationsAppearanceType;
/**
* URL to the hosted cloud file picker. This usually does not need to be provided unless you intend to host your own Weavy cloud file picker.
*
* @type {string | URL}
*/
cloudFilePickerUrl: string | URL;
/**
* Timeout (ms) before configuration is considered to have failed. `Infinity` disables the timeout.
*/
configurationTimeout: number;
/**
* Disables dynamic import of modules from the environment.
*/
disableEnvironmentImports: boolean;
/**
* Enter-to-send keymap in the editor. `"modifier"` is `Enter` combined with `Ctrl` or `Cmd`.
*
* @type {"never" | "modifier" | "auto" | "always"}
*/
enterToSend: import('./types/editor.types').EnterToSend;
/**
* Active locale identifier for localization.
*/
locale: string;
/**
* List of available locales.
*/
locales: [string, import('@lit/localize').LocaleModule | Promise | (() => Promise)][] | undefined;
/**
* Garbage-collection interval (ms) applied to caches.
*/
gcTime: number;
/**
* Which [scroll behavior](https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll#behavior) to use (where applicable). Note that not all browsers (Chrome) have similar scroll transitions, they may be very slow.
*
* @type {"smooth" | "instant" | "auto"}
*/
scrollBehavior: "auto" | "instant" | "smooth";
/**
* Default stale time (ms) for TanStack Query caches.
*/
staleTime: number;
/**
* Token factory used for acquiring user access tokens.
*/
tokenFactory: WeavyTokenFactory | undefined;
/**
* Delay (ms) before retrying the token factory.
*/
tokenFactoryRetryDelay: number;
/**
* Timeout (ms) applied to the token factory promise.
*/
tokenFactoryTimeout: number;
/**
* Token endpoint used when no token factory is supplied.
*
* @type {string | URL | undefined}
*/
tokenUrl?: string | URL | undefined;
/**
* Base URL of the Weavy environment.
*
* @type {string | URL | undefined}
*/
url?: string | URL | undefined;
/**
* Space separated reaction emoji list.
*/
reactions: string;
/** @internal */
protected weavy?: WeavyType;
/** The semver version of the package. */
get version(): string;
/** The Weavy source name; package name. */
get sourceName(): string;
/** The Weavy source format; file format. */
get sourceFormat(): string;
constructor();
protected willUpdate(changedProperties: PropertyValues): void;
protected render(): import('../node_modules/lit-html/node/lit-html.js').TemplateResult<1>;
}
//# sourceMappingURL=wy-context.d.ts.map