@zag-js/avatar 1.34.0 → 1.35.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.
@@ -0,0 +1,66 @@
1
+ import { Machine, Service } from '@zag-js/core';
2
+ import { CommonProperties, DirectionProperty, PropTypes } from '@zag-js/types';
3
+
4
+ type LoadStatus = "error" | "loaded";
5
+ interface StatusChangeDetails {
6
+ status: LoadStatus;
7
+ }
8
+ type ElementIds = Partial<{
9
+ root: string;
10
+ image: string;
11
+ fallback: string;
12
+ }>;
13
+ interface AvatarProps extends CommonProperties, DirectionProperty {
14
+ /**
15
+ * Functional called when the image loading status changes.
16
+ */
17
+ onStatusChange?: ((details: StatusChangeDetails) => void) | undefined;
18
+ /**
19
+ * The ids of the elements in the avatar. Useful for composition.
20
+ */
21
+ ids?: ElementIds | undefined;
22
+ }
23
+ interface AvatarSchema {
24
+ props: AvatarProps;
25
+ context: any;
26
+ initial: "loading";
27
+ effect: "trackImageRemoval" | "trackSrcChange";
28
+ action: "invokeOnLoad" | "invokeOnError" | "checkImageStatus";
29
+ event: {
30
+ type: "img.loaded";
31
+ src?: string | undefined;
32
+ } | {
33
+ type: "img.error";
34
+ src?: string | undefined;
35
+ } | {
36
+ type: "img.unmount";
37
+ } | {
38
+ type: "src.change";
39
+ };
40
+ state: "loading" | "error" | "loaded";
41
+ }
42
+ type AvatarService = Service<AvatarSchema>;
43
+ type AvatarMachine = Machine<AvatarSchema>;
44
+ interface AvatarApi<T extends PropTypes = PropTypes> {
45
+ /**
46
+ * Whether the image is loaded.
47
+ */
48
+ loaded: boolean;
49
+ /**
50
+ * Function to set new src.
51
+ */
52
+ setSrc: (src: string) => void;
53
+ /**
54
+ * Function to set loaded state.
55
+ */
56
+ setLoaded: VoidFunction;
57
+ /**
58
+ * Function to set error state.
59
+ */
60
+ setError: VoidFunction;
61
+ getRootProps: () => T["element"];
62
+ getImageProps: () => T["img"];
63
+ getFallbackProps: () => T["element"];
64
+ }
65
+
66
+ export type { AvatarApi, AvatarMachine, AvatarProps, AvatarSchema, AvatarService, ElementIds, LoadStatus, StatusChangeDetails };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/avatar.types.ts
17
+ var avatar_types_exports = {};
18
+ module.exports = __toCommonJS(avatar_types_exports);
File without changes
package/dist/index.d.mts CHANGED
@@ -1,77 +1,8 @@
1
- import * as _zag_js_anatomy from '@zag-js/anatomy';
2
- import { PropTypes, CommonProperties, DirectionProperty, NormalizeProps } from '@zag-js/types';
3
- import * as _zag_js_core from '@zag-js/core';
4
- import { Machine, Service } from '@zag-js/core';
5
-
6
- declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "image" | "fallback">;
7
-
8
- type LoadStatus = "error" | "loaded";
9
- interface StatusChangeDetails {
10
- status: LoadStatus;
11
- }
12
- type ElementIds = Partial<{
13
- root: string;
14
- image: string;
15
- fallback: string;
16
- }>;
17
- interface AvatarProps extends CommonProperties, DirectionProperty {
18
- /**
19
- * Functional called when the image loading status changes.
20
- */
21
- onStatusChange?: ((details: StatusChangeDetails) => void) | undefined;
22
- /**
23
- * The ids of the elements in the avatar. Useful for composition.
24
- */
25
- ids?: ElementIds | undefined;
26
- }
27
- interface AvatarSchema {
28
- props: AvatarProps;
29
- context: any;
30
- initial: "loading";
31
- effect: "trackImageRemoval" | "trackSrcChange";
32
- action: "invokeOnLoad" | "invokeOnError" | "checkImageStatus";
33
- event: {
34
- type: "img.loaded";
35
- src?: string | undefined;
36
- } | {
37
- type: "img.error";
38
- src?: string | undefined;
39
- } | {
40
- type: "img.unmount";
41
- } | {
42
- type: "src.change";
43
- };
44
- state: "loading" | "error" | "loaded";
45
- }
46
- type AvatarService = Service<AvatarSchema>;
47
- type AvatarMachine = Machine<AvatarSchema>;
48
- interface AvatarApi<T extends PropTypes = PropTypes> {
49
- /**
50
- * Whether the image is loaded.
51
- */
52
- loaded: boolean;
53
- /**
54
- * Function to set new src.
55
- */
56
- setSrc: (src: string) => void;
57
- /**
58
- * Function to set loaded state.
59
- */
60
- setLoaded: VoidFunction;
61
- /**
62
- * Function to set error state.
63
- */
64
- setError: VoidFunction;
65
- getRootProps: () => T["element"];
66
- getImageProps: () => T["img"];
67
- getFallbackProps: () => T["element"];
68
- }
69
-
70
- declare function connect<T extends PropTypes>(service: Service<AvatarSchema>, normalize: NormalizeProps<T>): AvatarApi<T>;
71
-
72
- declare const machine: _zag_js_core.Machine<AvatarSchema>;
73
-
74
- declare const props: (keyof AvatarProps)[];
75
- declare const splitProps: <Props extends Partial<AvatarProps>>(props: Props) => [Partial<AvatarProps>, Omit<Props, keyof AvatarProps>];
76
-
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 };
1
+ export { anatomy } from './avatar.anatomy.mjs';
2
+ export { connect } from './avatar.connect.mjs';
3
+ export { machine } from './avatar.machine.mjs';
4
+ export { props, splitProps } from './avatar.props.mjs';
5
+ export { AvatarApi as Api, ElementIds, LoadStatus, AvatarMachine as Machine, AvatarProps as Props, AvatarService as Service, StatusChangeDetails } from './avatar.types.mjs';
6
+ import '@zag-js/anatomy';
7
+ import '@zag-js/types';
8
+ import '@zag-js/core';
package/dist/index.d.ts CHANGED
@@ -1,77 +1,8 @@
1
- import * as _zag_js_anatomy from '@zag-js/anatomy';
2
- import { PropTypes, CommonProperties, DirectionProperty, NormalizeProps } from '@zag-js/types';
3
- import * as _zag_js_core from '@zag-js/core';
4
- import { Machine, Service } from '@zag-js/core';
5
-
6
- declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "image" | "fallback">;
7
-
8
- type LoadStatus = "error" | "loaded";
9
- interface StatusChangeDetails {
10
- status: LoadStatus;
11
- }
12
- type ElementIds = Partial<{
13
- root: string;
14
- image: string;
15
- fallback: string;
16
- }>;
17
- interface AvatarProps extends CommonProperties, DirectionProperty {
18
- /**
19
- * Functional called when the image loading status changes.
20
- */
21
- onStatusChange?: ((details: StatusChangeDetails) => void) | undefined;
22
- /**
23
- * The ids of the elements in the avatar. Useful for composition.
24
- */
25
- ids?: ElementIds | undefined;
26
- }
27
- interface AvatarSchema {
28
- props: AvatarProps;
29
- context: any;
30
- initial: "loading";
31
- effect: "trackImageRemoval" | "trackSrcChange";
32
- action: "invokeOnLoad" | "invokeOnError" | "checkImageStatus";
33
- event: {
34
- type: "img.loaded";
35
- src?: string | undefined;
36
- } | {
37
- type: "img.error";
38
- src?: string | undefined;
39
- } | {
40
- type: "img.unmount";
41
- } | {
42
- type: "src.change";
43
- };
44
- state: "loading" | "error" | "loaded";
45
- }
46
- type AvatarService = Service<AvatarSchema>;
47
- type AvatarMachine = Machine<AvatarSchema>;
48
- interface AvatarApi<T extends PropTypes = PropTypes> {
49
- /**
50
- * Whether the image is loaded.
51
- */
52
- loaded: boolean;
53
- /**
54
- * Function to set new src.
55
- */
56
- setSrc: (src: string) => void;
57
- /**
58
- * Function to set loaded state.
59
- */
60
- setLoaded: VoidFunction;
61
- /**
62
- * Function to set error state.
63
- */
64
- setError: VoidFunction;
65
- getRootProps: () => T["element"];
66
- getImageProps: () => T["img"];
67
- getFallbackProps: () => T["element"];
68
- }
69
-
70
- declare function connect<T extends PropTypes>(service: Service<AvatarSchema>, normalize: NormalizeProps<T>): AvatarApi<T>;
71
-
72
- declare const machine: _zag_js_core.Machine<AvatarSchema>;
73
-
74
- declare const props: (keyof AvatarProps)[];
75
- declare const splitProps: <Props extends Partial<AvatarProps>>(props: Props) => [Partial<AvatarProps>, Omit<Props, keyof AvatarProps>];
76
-
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 };
1
+ export { anatomy } from './avatar.anatomy.js';
2
+ export { connect } from './avatar.connect.js';
3
+ export { machine } from './avatar.machine.js';
4
+ export { props, splitProps } from './avatar.props.js';
5
+ export { AvatarApi as Api, ElementIds, LoadStatus, AvatarMachine as Machine, AvatarProps as Props, AvatarService as Service, StatusChangeDetails } from './avatar.types.js';
6
+ import '@zag-js/anatomy';
7
+ import '@zag-js/types';
8
+ import '@zag-js/core';
package/dist/index.js CHANGED
@@ -1,165 +1,39 @@
1
- 'use strict';
2
-
3
- var anatomy$1 = require('@zag-js/anatomy');
4
- var domQuery = require('@zag-js/dom-query');
5
- var core = require('@zag-js/core');
6
- var types = require('@zag-js/types');
7
- var utils = require('@zag-js/utils');
8
-
9
- // src/avatar.anatomy.ts
10
- var anatomy = anatomy$1.createAnatomy("avatar").parts("root", "image", "fallback");
11
- var parts = anatomy.build();
12
-
13
- // src/avatar.dom.ts
14
- var getRootId = (ctx) => ctx.ids?.root ?? `avatar:${ctx.id}`;
15
- var getImageId = (ctx) => ctx.ids?.image ?? `avatar:${ctx.id}:image`;
16
- var getFallbackId = (ctx) => ctx.ids?.fallback ?? `avatar:${ctx.id}:fallback`;
17
- var getRootEl = (ctx) => ctx.getById(getRootId(ctx));
18
- var getImageEl = (ctx) => ctx.getById(getImageId(ctx));
19
-
20
- // src/avatar.connect.ts
21
- function connect(service, normalize) {
22
- const { state, send, prop, scope } = service;
23
- const loaded = state.matches("loaded");
24
- return {
25
- loaded,
26
- setSrc(src) {
27
- const img = getImageEl(scope);
28
- img?.setAttribute("src", src);
29
- },
30
- setLoaded() {
31
- send({ type: "img.loaded", src: "api" });
32
- },
33
- setError() {
34
- send({ type: "img.error", src: "api" });
35
- },
36
- getRootProps() {
37
- return normalize.element({
38
- ...parts.root.attrs,
39
- dir: prop("dir"),
40
- id: getRootId(scope)
41
- });
42
- },
43
- getImageProps() {
44
- return normalize.img({
45
- ...parts.image.attrs,
46
- hidden: !loaded,
47
- dir: prop("dir"),
48
- id: getImageId(scope),
49
- "data-state": loaded ? "visible" : "hidden",
50
- onLoad() {
51
- send({ type: "img.loaded", src: "element" });
52
- },
53
- onError() {
54
- send({ type: "img.error", src: "element" });
55
- }
56
- });
57
- },
58
- getFallbackProps() {
59
- return normalize.element({
60
- ...parts.fallback.attrs,
61
- dir: prop("dir"),
62
- id: getFallbackId(scope),
63
- hidden: loaded,
64
- "data-state": loaded ? "hidden" : "visible"
65
- });
66
- }
67
- };
68
- }
69
- var machine = core.createMachine({
70
- initialState() {
71
- return "loading";
72
- },
73
- effects: ["trackImageRemoval", "trackSrcChange"],
74
- on: {
75
- "src.change": {
76
- target: "loading"
77
- },
78
- "img.unmount": {
79
- target: "error"
80
- }
81
- },
82
- states: {
83
- loading: {
84
- entry: ["checkImageStatus"],
85
- on: {
86
- "img.loaded": {
87
- target: "loaded",
88
- actions: ["invokeOnLoad"]
89
- },
90
- "img.error": {
91
- target: "error",
92
- actions: ["invokeOnError"]
93
- }
94
- }
95
- },
96
- error: {
97
- on: {
98
- "img.loaded": {
99
- target: "loaded",
100
- actions: ["invokeOnLoad"]
101
- }
102
- }
103
- },
104
- loaded: {
105
- on: {
106
- "img.error": {
107
- target: "error",
108
- actions: ["invokeOnError"]
109
- }
110
- }
111
- }
112
- },
113
- implementations: {
114
- actions: {
115
- invokeOnLoad({ prop }) {
116
- prop("onStatusChange")?.({ status: "loaded" });
117
- },
118
- invokeOnError({ prop }) {
119
- prop("onStatusChange")?.({ status: "error" });
120
- },
121
- checkImageStatus({ send, scope }) {
122
- const imageEl = getImageEl(scope);
123
- if (!imageEl?.complete) return;
124
- const type = hasLoaded(imageEl) ? "img.loaded" : "img.error";
125
- send({ type, src: "ssr" });
126
- }
127
- },
128
- effects: {
129
- trackImageRemoval({ send, scope }) {
130
- const rootEl = getRootEl(scope);
131
- return domQuery.observeChildren(rootEl, {
132
- callback(records) {
133
- const removedNodes = Array.from(records[0].removedNodes);
134
- const removed = removedNodes.find(
135
- (node) => node.nodeType === Node.ELEMENT_NODE && node.matches("[data-scope=avatar][data-part=image]")
136
- );
137
- if (removed) {
138
- send({ type: "img.unmount" });
139
- }
140
- }
141
- });
142
- },
143
- trackSrcChange({ send, scope }) {
144
- const imageEl = getImageEl(scope);
145
- return domQuery.observeAttributes(imageEl, {
146
- attributes: ["src", "srcset"],
147
- callback() {
148
- send({ type: "src.change" });
149
- }
150
- });
151
- }
152
- }
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
153
15
  }
154
- });
155
- function hasLoaded(image) {
156
- return image.complete && image.naturalWidth !== 0 && image.naturalHeight !== 0;
157
- }
158
- var props = types.createProps()(["dir", "id", "ids", "onStatusChange", "getRootNode"]);
159
- var splitProps = utils.createSplitProps(props);
16
+ return to;
17
+ };
18
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
160
20
 
161
- exports.anatomy = anatomy;
162
- exports.connect = connect;
163
- exports.machine = machine;
164
- exports.props = props;
165
- exports.splitProps = splitProps;
21
+ // src/index.ts
22
+ var index_exports = {};
23
+ __export(index_exports, {
24
+ anatomy: () => import_avatar.anatomy,
25
+ connect: () => import_avatar2.connect,
26
+ machine: () => import_avatar3.machine
27
+ });
28
+ module.exports = __toCommonJS(index_exports);
29
+ var import_avatar = require("./avatar.anatomy.cjs");
30
+ var import_avatar2 = require("./avatar.connect.cjs");
31
+ var import_avatar3 = require("./avatar.machine.cjs");
32
+ __reExport(index_exports, require("./avatar.props.cjs"), module.exports);
33
+ // Annotate the CommonJS export names for ESM import in node:
34
+ 0 && (module.exports = {
35
+ anatomy,
36
+ connect,
37
+ machine,
38
+ ...require("./avatar.props.cjs")
39
+ });
package/dist/index.mjs CHANGED
@@ -1,159 +1,10 @@
1
- import { createAnatomy } from '@zag-js/anatomy';
2
- import { observeAttributes, observeChildren } from '@zag-js/dom-query';
3
- import { createMachine } from '@zag-js/core';
4
- import { createProps } from '@zag-js/types';
5
- import { createSplitProps } from '@zag-js/utils';
6
-
7
- // src/avatar.anatomy.ts
8
- var anatomy = createAnatomy("avatar").parts("root", "image", "fallback");
9
- var parts = anatomy.build();
10
-
11
- // src/avatar.dom.ts
12
- var getRootId = (ctx) => ctx.ids?.root ?? `avatar:${ctx.id}`;
13
- var getImageId = (ctx) => ctx.ids?.image ?? `avatar:${ctx.id}:image`;
14
- var getFallbackId = (ctx) => ctx.ids?.fallback ?? `avatar:${ctx.id}:fallback`;
15
- var getRootEl = (ctx) => ctx.getById(getRootId(ctx));
16
- var getImageEl = (ctx) => ctx.getById(getImageId(ctx));
17
-
18
- // src/avatar.connect.ts
19
- function connect(service, normalize) {
20
- const { state, send, prop, scope } = service;
21
- const loaded = state.matches("loaded");
22
- return {
23
- loaded,
24
- setSrc(src) {
25
- const img = getImageEl(scope);
26
- img?.setAttribute("src", src);
27
- },
28
- setLoaded() {
29
- send({ type: "img.loaded", src: "api" });
30
- },
31
- setError() {
32
- send({ type: "img.error", src: "api" });
33
- },
34
- getRootProps() {
35
- return normalize.element({
36
- ...parts.root.attrs,
37
- dir: prop("dir"),
38
- id: getRootId(scope)
39
- });
40
- },
41
- getImageProps() {
42
- return normalize.img({
43
- ...parts.image.attrs,
44
- hidden: !loaded,
45
- dir: prop("dir"),
46
- id: getImageId(scope),
47
- "data-state": loaded ? "visible" : "hidden",
48
- onLoad() {
49
- send({ type: "img.loaded", src: "element" });
50
- },
51
- onError() {
52
- send({ type: "img.error", src: "element" });
53
- }
54
- });
55
- },
56
- getFallbackProps() {
57
- return normalize.element({
58
- ...parts.fallback.attrs,
59
- dir: prop("dir"),
60
- id: getFallbackId(scope),
61
- hidden: loaded,
62
- "data-state": loaded ? "hidden" : "visible"
63
- });
64
- }
65
- };
66
- }
67
- var machine = createMachine({
68
- initialState() {
69
- return "loading";
70
- },
71
- effects: ["trackImageRemoval", "trackSrcChange"],
72
- on: {
73
- "src.change": {
74
- target: "loading"
75
- },
76
- "img.unmount": {
77
- target: "error"
78
- }
79
- },
80
- states: {
81
- loading: {
82
- entry: ["checkImageStatus"],
83
- on: {
84
- "img.loaded": {
85
- target: "loaded",
86
- actions: ["invokeOnLoad"]
87
- },
88
- "img.error": {
89
- target: "error",
90
- actions: ["invokeOnError"]
91
- }
92
- }
93
- },
94
- error: {
95
- on: {
96
- "img.loaded": {
97
- target: "loaded",
98
- actions: ["invokeOnLoad"]
99
- }
100
- }
101
- },
102
- loaded: {
103
- on: {
104
- "img.error": {
105
- target: "error",
106
- actions: ["invokeOnError"]
107
- }
108
- }
109
- }
110
- },
111
- implementations: {
112
- actions: {
113
- invokeOnLoad({ prop }) {
114
- prop("onStatusChange")?.({ status: "loaded" });
115
- },
116
- invokeOnError({ prop }) {
117
- prop("onStatusChange")?.({ status: "error" });
118
- },
119
- checkImageStatus({ send, scope }) {
120
- const imageEl = getImageEl(scope);
121
- if (!imageEl?.complete) return;
122
- const type = hasLoaded(imageEl) ? "img.loaded" : "img.error";
123
- send({ type, src: "ssr" });
124
- }
125
- },
126
- effects: {
127
- trackImageRemoval({ send, scope }) {
128
- const rootEl = getRootEl(scope);
129
- return observeChildren(rootEl, {
130
- callback(records) {
131
- const removedNodes = Array.from(records[0].removedNodes);
132
- const removed = removedNodes.find(
133
- (node) => node.nodeType === Node.ELEMENT_NODE && node.matches("[data-scope=avatar][data-part=image]")
134
- );
135
- if (removed) {
136
- send({ type: "img.unmount" });
137
- }
138
- }
139
- });
140
- },
141
- trackSrcChange({ send, scope }) {
142
- const imageEl = getImageEl(scope);
143
- return observeAttributes(imageEl, {
144
- attributes: ["src", "srcset"],
145
- callback() {
146
- send({ type: "src.change" });
147
- }
148
- });
149
- }
150
- }
151
- }
152
- });
153
- function hasLoaded(image) {
154
- return image.complete && image.naturalWidth !== 0 && image.naturalHeight !== 0;
155
- }
156
- var props = createProps()(["dir", "id", "ids", "onStatusChange", "getRootNode"]);
157
- var splitProps = createSplitProps(props);
158
-
159
- export { anatomy, connect, machine, props, splitProps };
1
+ // src/index.ts
2
+ import { anatomy } from "./avatar.anatomy.mjs";
3
+ import { connect } from "./avatar.connect.mjs";
4
+ import { machine } from "./avatar.machine.mjs";
5
+ export * from "./avatar.props.mjs";
6
+ export {
7
+ anatomy,
8
+ connect,
9
+ machine
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/avatar",
3
- "version": "1.34.0",
3
+ "version": "1.35.0",
4
4
  "description": "Core logic for the avatar widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -27,16 +27,16 @@
27
27
  "url": "https://github.com/chakra-ui/zag/issues"
28
28
  },
29
29
  "dependencies": {
30
- "@zag-js/anatomy": "1.34.0",
31
- "@zag-js/core": "1.34.0",
32
- "@zag-js/dom-query": "1.34.0",
33
- "@zag-js/utils": "1.34.0",
34
- "@zag-js/types": "1.34.0"
30
+ "@zag-js/anatomy": "1.35.0",
31
+ "@zag-js/core": "1.35.0",
32
+ "@zag-js/dom-query": "1.35.0",
33
+ "@zag-js/utils": "1.35.0",
34
+ "@zag-js/types": "1.35.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "clean-package": "2.2.0"
38
38
  },
39
- "clean-package": "../../../clean-package.config.json",
39
+ "clean-package": "./clean-package.config.json",
40
40
  "module": "dist/index.mjs",
41
41
  "types": "dist/index.d.ts",
42
42
  "exports": {
@@ -50,6 +50,16 @@
50
50
  "default": "./dist/index.js"
51
51
  }
52
52
  },
53
+ "./anatomy": {
54
+ "import": {
55
+ "types": "./dist/avatar.anatomy.d.mts",
56
+ "default": "./dist/avatar.anatomy.mjs"
57
+ },
58
+ "require": {
59
+ "types": "./dist/avatar.anatomy.d.ts",
60
+ "default": "./dist/avatar.anatomy.js"
61
+ }
62
+ },
53
63
  "./package.json": "./package.json"
54
64
  },
55
65
  "scripts": {