@zag-js/types 0.32.0 → 0.33.0

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 CHANGED
@@ -1149,7 +1149,7 @@ type DataAttr = {
1149
1149
  } & {
1150
1150
  [key in `data-${string}`]?: string | number | Booleanish;
1151
1151
  };
1152
- type PropTypes<T = Dict> = Record<"button" | "label" | "input" | "img" | "output" | "element" | "select" | "style" | "circle" | "svg", T>;
1152
+ type PropTypes<T = Dict> = Record<"button" | "label" | "input" | "textarea" | "img" | "output" | "element" | "select" | "style" | "circle" | "svg", T>;
1153
1153
  type NormalizeProps<T extends PropTypes> = {
1154
1154
  [K in keyof T]: (props: K extends keyof JSX.IntrinsicElements ? DataAttr & JSX.IntrinsicElements[K] : never) => T[K];
1155
1155
  } & {
package/dist/index.d.ts CHANGED
@@ -1149,7 +1149,7 @@ type DataAttr = {
1149
1149
  } & {
1150
1150
  [key in `data-${string}`]?: string | number | Booleanish;
1151
1151
  };
1152
- type PropTypes<T = Dict> = Record<"button" | "label" | "input" | "img" | "output" | "element" | "select" | "style" | "circle" | "svg", T>;
1152
+ type PropTypes<T = Dict> = Record<"button" | "label" | "input" | "textarea" | "img" | "output" | "element" | "select" | "style" | "circle" | "svg", T>;
1153
1153
  type NormalizeProps<T extends PropTypes> = {
1154
1154
  [K in keyof T]: (props: K extends keyof JSX.IntrinsicElements ? DataAttr & JSX.IntrinsicElements[K] : never) => T[K];
1155
1155
  } & {
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 interface RootProperties {\n /**\n * The owner document of the machine.\n */\n doc?: Document\n /**\n * The root node of the machine. Useful for shadow DOM.\n */\n rootNode?: ShadowRoot\n /**\n * The related target when the element is blurred.\n * Used as a polyfill for `e.relatedTarget`\n */\n pointerdownNode?: HTMLElement | null\n}\n\nexport type Context<T> = T & RootProperties\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\" | \"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":[]}
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 interface RootProperties {\n /**\n * The owner document of the machine.\n */\n doc?: Document\n /**\n * The root node of the machine. Useful for shadow DOM.\n */\n rootNode?: ShadowRoot\n /**\n * The related target when the element is blurred.\n * Used as a polyfill for `e.relatedTarget`\n */\n pointerdownNode?: HTMLElement | null\n}\n\nexport type Context<T> = T & RootProperties\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":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/prop-types.ts"],"sourcesContent":["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\" | \"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":";AAyDO,SAAS,iBAAsC,IAA8C;AAClG,SAAO,IAAI,MAAM,CAAC,GAAU;AAAA,IAC1B,MAAM;AACJ,aAAO;AAAA,IACT;AAAA,EACF,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../src/prop-types.ts"],"sourcesContent":["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":";AAyDO,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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/types",
3
- "version": "0.32.0",
3
+ "version": "0.33.0",
4
4
  "keywords": [
5
5
  "js",
6
6
  "utils",
@@ -22,7 +22,7 @@
22
22
  "url": "https://github.com/chakra-ui/zag/issues"
23
23
  },
24
24
  "dependencies": {
25
- "csstype": "3.1.2"
25
+ "csstype": "3.1.3"
26
26
  },
27
27
  "clean-package": "../../clean-package.config.json",
28
28
  "main": "dist/index.js",
package/src/prop-types.ts CHANGED
@@ -45,7 +45,7 @@ type DataAttr = {
45
45
  }
46
46
 
47
47
  export type PropTypes<T = Dict> = Record<
48
- "button" | "label" | "input" | "img" | "output" | "element" | "select" | "style" | "circle" | "svg",
48
+ "button" | "label" | "input" | "textarea" | "img" | "output" | "element" | "select" | "style" | "circle" | "svg",
49
49
  T
50
50
  >
51
51