@zag-js/types 0.0.0-dev-20220707125149 → 0.0.0-dev-20220709094318
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +11 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { JSX } from "./jsx";
|
|
2
|
+
export declare type RequiredBy<T, K extends keyof T> = Partial<Omit<T, K>> & Required<Pick<T, K>>;
|
|
2
3
|
export declare type Direction = "ltr" | "rtl";
|
|
3
4
|
export declare type Orientation = "horizontal" | "vertical";
|
|
4
5
|
export declare type MaybeElement<T extends HTMLElement = HTMLElement> = T | null;
|
|
@@ -8,6 +9,16 @@ export declare type DirectionProperty = {
|
|
|
8
9
|
*/
|
|
9
10
|
dir?: Direction;
|
|
10
11
|
};
|
|
12
|
+
export declare type CommonProperties = {
|
|
13
|
+
/**
|
|
14
|
+
* The unique identifier of the machine.
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.
|
|
19
|
+
*/
|
|
20
|
+
getRootNode?: () => ShadowRoot | Document | Node;
|
|
21
|
+
};
|
|
11
22
|
export declare type RootProperties = {
|
|
12
23
|
/**
|
|
13
24
|
* @internal
|
|
@@ -21,11 +32,6 @@ export declare type RootProperties = {
|
|
|
21
32
|
rootNode?: ShadowRoot;
|
|
22
33
|
};
|
|
23
34
|
export declare type Context<T> = T & RootProperties & {
|
|
24
|
-
/**
|
|
25
|
-
* @internal
|
|
26
|
-
* The unique identifier of the machine.
|
|
27
|
-
*/
|
|
28
|
-
uid: string;
|
|
29
35
|
/**
|
|
30
36
|
* @internal
|
|
31
37
|
* The related target when the element is blurred.
|