@zag-js/core
Version:
A minimal implementation of xstate fsm for UI machines
16 lines (13 loc) • 569 B
TypeScript
import { isActiveElement } from '@zag-js/dom-query';
import { Scope } from './types.js';
declare function createScope(props: Pick<Scope, "id" | "ids" | "getRootNode">): {
getRootNode: () => Document | ShadowRoot;
getDoc: () => Document;
getWin: () => Window & typeof globalThis;
getActiveElement: () => HTMLElement | null;
isActiveElement: typeof isActiveElement;
getById: <T extends Element = HTMLElement>(id: string) => T | null;
id?: string | undefined | undefined;
ids?: Record<string, any> | undefined;
};
export { createScope };