@zag-js/types 0.0.0-dev-20240216185224 → 0.0.0-dev-20240218175520
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.mts +1 -17
- package/dist/index.d.ts +1 -17
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +0 -18
package/dist/index.d.mts
CHANGED
|
@@ -1193,22 +1193,6 @@ interface CommonProperties {
|
|
|
1193
1193
|
*/
|
|
1194
1194
|
getRootNode?: () => ShadowRoot | Document | Node;
|
|
1195
1195
|
}
|
|
1196
|
-
interface RootProperties {
|
|
1197
|
-
/**
|
|
1198
|
-
* The owner document of the machine.
|
|
1199
|
-
*/
|
|
1200
|
-
doc?: Document;
|
|
1201
|
-
/**
|
|
1202
|
-
* The root node of the machine. Useful for shadow DOM.
|
|
1203
|
-
*/
|
|
1204
|
-
rootNode?: ShadowRoot;
|
|
1205
|
-
/**
|
|
1206
|
-
* The related target when the element is blurred.
|
|
1207
|
-
* Used as a polyfill for `e.relatedTarget`
|
|
1208
|
-
*/
|
|
1209
|
-
pointerdownNode?: HTMLElement | null;
|
|
1210
|
-
}
|
|
1211
|
-
type Context<T> = T & RootProperties;
|
|
1212
1196
|
type Style = JSX.CSSProperties;
|
|
1213
1197
|
|
|
1214
|
-
export { type CommonProperties, type
|
|
1198
|
+
export { type CommonProperties, type Direction, type DirectionProperty, JSX, type LocaleProperties, type MaybeElement, type NormalizeProps, type Orientation, type OrientationProperty, type PropTypes, type RequiredBy, type Style, createNormalizer };
|
package/dist/index.d.ts
CHANGED
|
@@ -1193,22 +1193,6 @@ interface CommonProperties {
|
|
|
1193
1193
|
*/
|
|
1194
1194
|
getRootNode?: () => ShadowRoot | Document | Node;
|
|
1195
1195
|
}
|
|
1196
|
-
interface RootProperties {
|
|
1197
|
-
/**
|
|
1198
|
-
* The owner document of the machine.
|
|
1199
|
-
*/
|
|
1200
|
-
doc?: Document;
|
|
1201
|
-
/**
|
|
1202
|
-
* The root node of the machine. Useful for shadow DOM.
|
|
1203
|
-
*/
|
|
1204
|
-
rootNode?: ShadowRoot;
|
|
1205
|
-
/**
|
|
1206
|
-
* The related target when the element is blurred.
|
|
1207
|
-
* Used as a polyfill for `e.relatedTarget`
|
|
1208
|
-
*/
|
|
1209
|
-
pointerdownNode?: HTMLElement | null;
|
|
1210
|
-
}
|
|
1211
|
-
type Context<T> = T & RootProperties;
|
|
1212
1196
|
type Style = JSX.CSSProperties;
|
|
1213
1197
|
|
|
1214
|
-
export { type CommonProperties, type
|
|
1198
|
+
export { type CommonProperties, type Direction, type DirectionProperty, JSX, type LocaleProperties, type MaybeElement, type NormalizeProps, type Orientation, type OrientationProperty, type PropTypes, type RequiredBy, type Style, createNormalizer };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/prop-types.ts"],"sourcesContent":["import type { JSX } from \"./jsx\"\n\nexport type RequiredBy<T, K extends keyof T> = Partial<Omit<T, K>> & Required<Pick<T, K>>\n\nexport type Direction = \"ltr\" | \"rtl\"\n\nexport type Orientation = \"horizontal\" | \"vertical\"\n\nexport type MaybeElement<T extends HTMLElement = HTMLElement> = T | null\n\nexport interface OrientationProperty {\n /**\n * The orientation of the element.\n * @default \"horizontal\"\n */\n orientation?: Orientation\n}\n\nexport interface DirectionProperty {\n /**\n * The document's text/writing direction.\n * @default \"ltr\"\n */\n dir?: \"ltr\" | \"rtl\"\n}\n\nexport interface LocaleProperties extends DirectionProperty {\n /**\n * The current locale. Based on the BCP 47 definition.\n * @default \"en-US\"\n */\n locale?: string\n}\n\nexport interface CommonProperties {\n /**\n * The unique identifier of the machine.\n */\n id: string\n /**\n * A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.\n */\n getRootNode?: () => ShadowRoot | Document | Node\n}\n\nexport
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/prop-types.ts"],"sourcesContent":["import type { JSX } from \"./jsx\"\n\nexport type RequiredBy<T, K extends keyof T> = Partial<Omit<T, K>> & Required<Pick<T, K>>\n\nexport type Direction = \"ltr\" | \"rtl\"\n\nexport type Orientation = \"horizontal\" | \"vertical\"\n\nexport type MaybeElement<T extends HTMLElement = HTMLElement> = T | null\n\nexport interface OrientationProperty {\n /**\n * The orientation of the element.\n * @default \"horizontal\"\n */\n orientation?: Orientation\n}\n\nexport interface DirectionProperty {\n /**\n * The document's text/writing direction.\n * @default \"ltr\"\n */\n dir?: \"ltr\" | \"rtl\"\n}\n\nexport interface LocaleProperties extends DirectionProperty {\n /**\n * The current locale. Based on the BCP 47 definition.\n * @default \"en-US\"\n */\n locale?: string\n}\n\nexport interface CommonProperties {\n /**\n * The unique identifier of the machine.\n */\n id: string\n /**\n * A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.\n */\n getRootNode?: () => ShadowRoot | Document | Node\n}\n\nexport type Style = JSX.CSSProperties\n\nexport * from \"./prop-types\"\nexport type { JSX }\n","import type { JSX } from \"./jsx\"\n\ntype Dict<T = any> = Record<string, T>\n\ntype Booleanish = boolean | \"true\" | \"false\"\n\ntype DataAttr = {\n \"data-selected\"?: Booleanish\n \"data-expanded\"?: Booleanish\n \"data-highlighted\"?: Booleanish\n \"data-readonly\"?: Booleanish\n \"data-indeterminate\"?: Booleanish\n \"data-invalid\"?: Booleanish\n \"data-hover\"?: Booleanish\n \"data-active\"?: Booleanish\n \"data-focus\"?: Booleanish\n \"data-disabled\"?: Booleanish\n \"data-open\"?: Booleanish\n \"data-checked\"?: Booleanish\n \"data-pressed\"?: Booleanish\n \"data-complete\"?: Booleanish\n \"data-empty\"?: Booleanish\n \"data-placeholder-shown\"?: Booleanish\n \"data-half\"?: Booleanish\n \"data-scope\"?: string\n\n \"data-uid\"?: string\n \"data-name\"?: string\n \"data-ownedby\"?: string\n \"data-type\"?: string\n \"data-valuetext\"?: string\n \"data-placement\"?: string\n \"data-controls\"?: string\n \"data-part\"?: string\n \"data-label\"?: string\n \"data-state\"?: string | null\n \"data-value\"?: string | number\n\n \"data-orientation\"?: \"horizontal\" | \"vertical\"\n\n \"data-count\"?: number\n \"data-index\"?: number\n} & {\n [key in `data-${string}`]?: string | number | Booleanish\n}\n\nexport type PropTypes<T = Dict> = Record<\n \"button\" | \"label\" | \"input\" | \"textarea\" | \"img\" | \"output\" | \"element\" | \"select\" | \"style\" | \"circle\" | \"svg\",\n T\n>\n\nexport type NormalizeProps<T extends PropTypes> = {\n [K in keyof T]: (props: K extends keyof JSX.IntrinsicElements ? DataAttr & JSX.IntrinsicElements[K] : never) => T[K]\n} & {\n element(props: DataAttr & JSX.HTMLAttributes<HTMLElement> & Record<string, any>): T[\"element\"]\n style: JSX.CSSProperties\n}\nexport function createNormalizer<T extends PropTypes>(fn: (props: Dict) => Dict): NormalizeProps<T> {\n return new Proxy({} as any, {\n get() {\n return fn\n },\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACyDO,SAAS,iBAAsC,IAA8C;AAClG,SAAO,IAAI,MAAM,CAAC,GAAU;AAAA,IAC1B,MAAM;AACJ,aAAO;AAAA,IACT;AAAA,EACF,CAAC;AACH;","names":[]}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -43,24 +43,6 @@ export interface CommonProperties {
|
|
|
43
43
|
getRootNode?: () => ShadowRoot | Document | Node
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export interface RootProperties {
|
|
47
|
-
/**
|
|
48
|
-
* The owner document of the machine.
|
|
49
|
-
*/
|
|
50
|
-
doc?: Document
|
|
51
|
-
/**
|
|
52
|
-
* The root node of the machine. Useful for shadow DOM.
|
|
53
|
-
*/
|
|
54
|
-
rootNode?: ShadowRoot
|
|
55
|
-
/**
|
|
56
|
-
* The related target when the element is blurred.
|
|
57
|
-
* Used as a polyfill for `e.relatedTarget`
|
|
58
|
-
*/
|
|
59
|
-
pointerdownNode?: HTMLElement | null
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export type Context<T> = T & RootProperties
|
|
63
|
-
|
|
64
46
|
export type Style = JSX.CSSProperties
|
|
65
47
|
|
|
66
48
|
export * from "./prop-types"
|