@zag-js/avatar 1.0.0 → 1.0.1
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 +4 -3
- package/dist/index.d.ts +4 -3
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _zag_js_anatomy from '@zag-js/anatomy';
|
|
2
2
|
import { CommonProperties, DirectionProperty, PropTypes, NormalizeProps } from '@zag-js/types';
|
|
3
3
|
import * as _zag_js_core from '@zag-js/core';
|
|
4
|
-
import { Service } from '@zag-js/core';
|
|
4
|
+
import { Service, Machine } from '@zag-js/core';
|
|
5
5
|
|
|
6
6
|
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "image" | "fallback">;
|
|
7
7
|
|
|
@@ -44,6 +44,7 @@ interface AvatarSchema {
|
|
|
44
44
|
state: "loading" | "error" | "loaded";
|
|
45
45
|
}
|
|
46
46
|
type AvatarService = Service<AvatarSchema>;
|
|
47
|
+
type AvatarMachine = Machine<AvatarSchema>;
|
|
47
48
|
interface AvatarApi<T extends PropTypes = PropTypes> {
|
|
48
49
|
/**
|
|
49
50
|
* Whether the image is loaded.
|
|
@@ -68,9 +69,9 @@ interface AvatarApi<T extends PropTypes = PropTypes> {
|
|
|
68
69
|
|
|
69
70
|
declare function connect<T extends PropTypes>(service: Service<AvatarSchema>, normalize: NormalizeProps<T>): AvatarApi<T>;
|
|
70
71
|
|
|
71
|
-
declare const machine: _zag_js_core.
|
|
72
|
+
declare const machine: _zag_js_core.Machine<AvatarSchema>;
|
|
72
73
|
|
|
73
74
|
declare const props: (keyof AvatarProps)[];
|
|
74
75
|
declare const splitProps: <Props extends Partial<AvatarProps>>(props: Props) => [Partial<AvatarProps>, Omit<Props, keyof AvatarProps>];
|
|
75
76
|
|
|
76
|
-
export { type AvatarApi as Api, type ElementIds, type LoadStatus, type AvatarProps as Props, type AvatarService as Service, type StatusChangeDetails, anatomy, connect, machine, props, splitProps };
|
|
77
|
+
export { type AvatarApi as Api, type ElementIds, type LoadStatus, type AvatarMachine as Machine, type AvatarProps as Props, type AvatarService as Service, type StatusChangeDetails, anatomy, connect, machine, props, splitProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _zag_js_anatomy from '@zag-js/anatomy';
|
|
2
2
|
import { CommonProperties, DirectionProperty, PropTypes, NormalizeProps } from '@zag-js/types';
|
|
3
3
|
import * as _zag_js_core from '@zag-js/core';
|
|
4
|
-
import { Service } from '@zag-js/core';
|
|
4
|
+
import { Service, Machine } from '@zag-js/core';
|
|
5
5
|
|
|
6
6
|
declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "image" | "fallback">;
|
|
7
7
|
|
|
@@ -44,6 +44,7 @@ interface AvatarSchema {
|
|
|
44
44
|
state: "loading" | "error" | "loaded";
|
|
45
45
|
}
|
|
46
46
|
type AvatarService = Service<AvatarSchema>;
|
|
47
|
+
type AvatarMachine = Machine<AvatarSchema>;
|
|
47
48
|
interface AvatarApi<T extends PropTypes = PropTypes> {
|
|
48
49
|
/**
|
|
49
50
|
* Whether the image is loaded.
|
|
@@ -68,9 +69,9 @@ interface AvatarApi<T extends PropTypes = PropTypes> {
|
|
|
68
69
|
|
|
69
70
|
declare function connect<T extends PropTypes>(service: Service<AvatarSchema>, normalize: NormalizeProps<T>): AvatarApi<T>;
|
|
70
71
|
|
|
71
|
-
declare const machine: _zag_js_core.
|
|
72
|
+
declare const machine: _zag_js_core.Machine<AvatarSchema>;
|
|
72
73
|
|
|
73
74
|
declare const props: (keyof AvatarProps)[];
|
|
74
75
|
declare const splitProps: <Props extends Partial<AvatarProps>>(props: Props) => [Partial<AvatarProps>, Omit<Props, keyof AvatarProps>];
|
|
75
76
|
|
|
76
|
-
export { type AvatarApi as Api, type ElementIds, type LoadStatus, type AvatarProps as Props, type AvatarService as Service, type StatusChangeDetails, anatomy, connect, machine, props, splitProps };
|
|
77
|
+
export { type AvatarApi as Api, type ElementIds, type LoadStatus, type AvatarMachine as Machine, type AvatarProps as Props, type AvatarService as Service, type StatusChangeDetails, anatomy, connect, machine, props, splitProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/avatar",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Core logic for the avatar widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@zag-js/anatomy": "1.0.
|
|
31
|
-
"@zag-js/core": "1.0.
|
|
32
|
-
"@zag-js/dom-query": "1.0.
|
|
33
|
-
"@zag-js/utils": "1.0.
|
|
34
|
-
"@zag-js/types": "1.0.
|
|
30
|
+
"@zag-js/anatomy": "1.0.1",
|
|
31
|
+
"@zag-js/core": "1.0.1",
|
|
32
|
+
"@zag-js/dom-query": "1.0.1",
|
|
33
|
+
"@zag-js/utils": "1.0.1",
|
|
34
|
+
"@zag-js/types": "1.0.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"clean-package": "2.2.0"
|