@zag-js/types 0.1.2 → 0.2.2
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 +14 -11
- package/dist/index.js +2 -10
- package/dist/index.mjs +1 -10
- package/dist/jsx.d.ts +1112 -0
- package/dist/prop-types.d.ts +21 -46
- package/package.json +5 -2
- package/dist/controls.d.ts +0 -42
- package/dist/controls.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -7
- package/dist/index.mjs.map +0 -7
- package/dist/prop-types.d.ts.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type
|
|
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.
|
|
@@ -33,9 +39,6 @@ export declare type Context<T> = T & RootProperties & {
|
|
|
33
39
|
*/
|
|
34
40
|
pointerdownNode?: HTMLElement | null;
|
|
35
41
|
};
|
|
36
|
-
export declare type Style =
|
|
37
|
-
[prop: string]: string | number | undefined;
|
|
38
|
-
};
|
|
42
|
+
export declare type Style = JSX.CSSProperties;
|
|
39
43
|
export * from "./prop-types";
|
|
40
|
-
export
|
|
41
|
-
//# sourceMappingURL=index.d.ts.map
|
|
44
|
+
export type { JSX };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
@@ -19,9 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
20
|
// src/index.ts
|
|
20
21
|
var src_exports = {};
|
|
21
22
|
__export(src_exports, {
|
|
22
|
-
createNormalizer: () => createNormalizer
|
|
23
|
-
defineControls: () => defineControls,
|
|
24
|
-
normalizeProp: () => normalizeProp
|
|
23
|
+
createNormalizer: () => createNormalizer
|
|
25
24
|
});
|
|
26
25
|
module.exports = __toCommonJS(src_exports);
|
|
27
26
|
|
|
@@ -33,10 +32,3 @@ function createNormalizer(fn) {
|
|
|
33
32
|
}
|
|
34
33
|
});
|
|
35
34
|
}
|
|
36
|
-
var normalizeProp = createNormalizer((v) => v);
|
|
37
|
-
|
|
38
|
-
// src/controls.ts
|
|
39
|
-
function defineControls(config) {
|
|
40
|
-
return config;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -6,15 +6,6 @@ function createNormalizer(fn) {
|
|
|
6
6
|
}
|
|
7
7
|
});
|
|
8
8
|
}
|
|
9
|
-
var normalizeProp = createNormalizer((v) => v);
|
|
10
|
-
|
|
11
|
-
// src/controls.ts
|
|
12
|
-
function defineControls(config) {
|
|
13
|
-
return config;
|
|
14
|
-
}
|
|
15
9
|
export {
|
|
16
|
-
createNormalizer
|
|
17
|
-
defineControls,
|
|
18
|
-
normalizeProp
|
|
10
|
+
createNormalizer
|
|
19
11
|
};
|
|
20
|
-
//# sourceMappingURL=index.mjs.map
|