@zag-js/tabs 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _zag_js_anatomy from '@zag-js/anatomy';
2
2
  import * as _zag_js_core from '@zag-js/core';
3
- import { Service, EventObject } from '@zag-js/core';
3
+ import { Service, Machine, EventObject } from '@zag-js/core';
4
4
  import { DirectionProperty, CommonProperties, PropTypes, RequiredBy, NormalizeProps } from '@zag-js/types';
5
5
 
6
6
  declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "list" | "trigger" | "content" | "indicator">;
@@ -114,6 +114,7 @@ type TabsSchema = {
114
114
  event: EventObject;
115
115
  };
116
116
  type TabsService = Service<TabsSchema>;
117
+ type TabsMachine = Machine<TabsSchema>;
117
118
  interface TriggerProps {
118
119
  /**
119
120
  * The value of the tab
@@ -195,7 +196,7 @@ interface TabsApi<T extends PropTypes = PropTypes> {
195
196
 
196
197
  declare function connect<T extends PropTypes>(service: Service<TabsSchema>, normalize: NormalizeProps<T>): TabsApi<T>;
197
198
 
198
- declare const machine: _zag_js_core.MachineConfig<TabsSchema>;
199
+ declare const machine: _zag_js_core.Machine<TabsSchema>;
199
200
 
200
201
  declare const props: (keyof TabsProps)[];
201
202
  declare const splitProps: <Props extends Partial<TabsProps>>(props: Props) => [Partial<TabsProps>, Omit<Props, keyof TabsProps>];
@@ -204,4 +205,4 @@ declare const splitTriggerProps: <Props extends TriggerProps>(props: Props) => [
204
205
  declare const contentProps: "value"[];
205
206
  declare const splitContentProps: <Props extends ContentProps>(props: Props) => [ContentProps, Omit<Props, "value">];
206
207
 
207
- export { type TabsApi as Api, type ContentProps, type ElementIds, type FocusChangeDetails, type IntlTranslations, type NavigateDetails, type TabsProps as Props, type TabsService as Service, type TriggerProps, type ValueChangeDetails, anatomy, connect, contentProps, machine, props, splitContentProps, splitProps, splitTriggerProps, triggerProps };
208
+ export { type TabsApi as Api, type ContentProps, type ElementIds, type FocusChangeDetails, type IntlTranslations, type TabsMachine as Machine, type NavigateDetails, type TabsProps as Props, type TabsService as Service, type TriggerProps, type ValueChangeDetails, anatomy, connect, contentProps, machine, props, splitContentProps, splitProps, splitTriggerProps, triggerProps };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _zag_js_anatomy from '@zag-js/anatomy';
2
2
  import * as _zag_js_core from '@zag-js/core';
3
- import { Service, EventObject } from '@zag-js/core';
3
+ import { Service, Machine, EventObject } from '@zag-js/core';
4
4
  import { DirectionProperty, CommonProperties, PropTypes, RequiredBy, NormalizeProps } from '@zag-js/types';
5
5
 
6
6
  declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "list" | "trigger" | "content" | "indicator">;
@@ -114,6 +114,7 @@ type TabsSchema = {
114
114
  event: EventObject;
115
115
  };
116
116
  type TabsService = Service<TabsSchema>;
117
+ type TabsMachine = Machine<TabsSchema>;
117
118
  interface TriggerProps {
118
119
  /**
119
120
  * The value of the tab
@@ -195,7 +196,7 @@ interface TabsApi<T extends PropTypes = PropTypes> {
195
196
 
196
197
  declare function connect<T extends PropTypes>(service: Service<TabsSchema>, normalize: NormalizeProps<T>): TabsApi<T>;
197
198
 
198
- declare const machine: _zag_js_core.MachineConfig<TabsSchema>;
199
+ declare const machine: _zag_js_core.Machine<TabsSchema>;
199
200
 
200
201
  declare const props: (keyof TabsProps)[];
201
202
  declare const splitProps: <Props extends Partial<TabsProps>>(props: Props) => [Partial<TabsProps>, Omit<Props, keyof TabsProps>];
@@ -204,4 +205,4 @@ declare const splitTriggerProps: <Props extends TriggerProps>(props: Props) => [
204
205
  declare const contentProps: "value"[];
205
206
  declare const splitContentProps: <Props extends ContentProps>(props: Props) => [ContentProps, Omit<Props, "value">];
206
207
 
207
- export { type TabsApi as Api, type ContentProps, type ElementIds, type FocusChangeDetails, type IntlTranslations, type NavigateDetails, type TabsProps as Props, type TabsService as Service, type TriggerProps, type ValueChangeDetails, anatomy, connect, contentProps, machine, props, splitContentProps, splitProps, splitTriggerProps, triggerProps };
208
+ export { type TabsApi as Api, type ContentProps, type ElementIds, type FocusChangeDetails, type IntlTranslations, type TabsMachine as Machine, type NavigateDetails, type TabsProps as Props, type TabsService as Service, type TriggerProps, type ValueChangeDetails, anatomy, connect, contentProps, machine, props, splitContentProps, splitProps, splitTriggerProps, triggerProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/tabs",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Core logic for the tabs widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -26,12 +26,12 @@
26
26
  "url": "https://github.com/chakra-ui/zag/issues"
27
27
  },
28
28
  "dependencies": {
29
- "@zag-js/anatomy": "1.0.0",
30
- "@zag-js/dom-query": "1.0.0",
31
- "@zag-js/element-rect": "1.0.0",
32
- "@zag-js/utils": "1.0.0",
33
- "@zag-js/core": "1.0.0",
34
- "@zag-js/types": "1.0.0"
29
+ "@zag-js/anatomy": "1.0.1",
30
+ "@zag-js/dom-query": "1.0.1",
31
+ "@zag-js/element-rect": "1.0.1",
32
+ "@zag-js/utils": "1.0.1",
33
+ "@zag-js/core": "1.0.1",
34
+ "@zag-js/types": "1.0.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "clean-package": "2.2.0"