@zag-js/splitter 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,7 +1,7 @@
1
1
  import * as _zag_js_anatomy from '@zag-js/anatomy';
2
2
  import { DirectionProperty, CommonProperties, PropTypes, RequiredBy, Required, NormalizeProps } from '@zag-js/types';
3
3
  import * as _zag_js_core from '@zag-js/core';
4
- import { Service, EventObject } from '@zag-js/core';
4
+ import { Service, Machine, EventObject } from '@zag-js/core';
5
5
 
6
6
  declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "panel" | "resizeTrigger">;
7
7
 
@@ -95,6 +95,7 @@ interface SplitterSchema {
95
95
  guard: string;
96
96
  }
97
97
  type SplitterService = Service<SplitterSchema>;
98
+ type SplitterMachine = Machine<SplitterSchema>;
98
99
  interface PanelProps {
99
100
  id: PanelId;
100
101
  snapSize?: number | undefined;
@@ -152,7 +153,7 @@ interface SplitterApi<T extends PropTypes = PropTypes> {
152
153
 
153
154
  declare function connect<T extends PropTypes>(service: SplitterService, normalize: NormalizeProps<T>): SplitterApi<T>;
154
155
 
155
- declare const machine: _zag_js_core.MachineConfig<SplitterSchema>;
156
+ declare const machine: _zag_js_core.Machine<SplitterSchema>;
156
157
 
157
158
  declare const props: (keyof SplitterProps)[];
158
159
  declare const splitProps: <Props extends Partial<SplitterProps>>(props: Props) => [Partial<SplitterProps>, Omit<Props, keyof SplitterProps>];
@@ -161,4 +162,4 @@ declare const splitPanelProps: <Props extends PanelProps>(props: Props) => [Pane
161
162
  declare const resizeTriggerProps: (keyof ResizeTriggerProps)[];
162
163
  declare const splitResizeTriggerProps: <Props extends ResizeTriggerProps>(props: Props) => [ResizeTriggerProps, Omit<Props, keyof ResizeTriggerProps>];
163
164
 
164
- export { type SplitterApi as Api, type PanelProps, type PanelSizeData, type SplitterProps as Props, type ResizeTriggerProps, type SplitterService as Service, type SizeChangeDetails, anatomy, connect, machine, panelProps, props, resizeTriggerProps, splitPanelProps, splitProps, splitResizeTriggerProps };
165
+ export { type SplitterApi as Api, type SplitterMachine as Machine, type PanelProps, type PanelSizeData, type SplitterProps as Props, type ResizeTriggerProps, type SplitterService as Service, type SizeChangeDetails, anatomy, connect, machine, panelProps, props, resizeTriggerProps, splitPanelProps, splitProps, splitResizeTriggerProps };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _zag_js_anatomy from '@zag-js/anatomy';
2
2
  import { DirectionProperty, CommonProperties, PropTypes, RequiredBy, Required, NormalizeProps } from '@zag-js/types';
3
3
  import * as _zag_js_core from '@zag-js/core';
4
- import { Service, EventObject } from '@zag-js/core';
4
+ import { Service, Machine, EventObject } from '@zag-js/core';
5
5
 
6
6
  declare const anatomy: _zag_js_anatomy.AnatomyInstance<"root" | "panel" | "resizeTrigger">;
7
7
 
@@ -95,6 +95,7 @@ interface SplitterSchema {
95
95
  guard: string;
96
96
  }
97
97
  type SplitterService = Service<SplitterSchema>;
98
+ type SplitterMachine = Machine<SplitterSchema>;
98
99
  interface PanelProps {
99
100
  id: PanelId;
100
101
  snapSize?: number | undefined;
@@ -152,7 +153,7 @@ interface SplitterApi<T extends PropTypes = PropTypes> {
152
153
 
153
154
  declare function connect<T extends PropTypes>(service: SplitterService, normalize: NormalizeProps<T>): SplitterApi<T>;
154
155
 
155
- declare const machine: _zag_js_core.MachineConfig<SplitterSchema>;
156
+ declare const machine: _zag_js_core.Machine<SplitterSchema>;
156
157
 
157
158
  declare const props: (keyof SplitterProps)[];
158
159
  declare const splitProps: <Props extends Partial<SplitterProps>>(props: Props) => [Partial<SplitterProps>, Omit<Props, keyof SplitterProps>];
@@ -161,4 +162,4 @@ declare const splitPanelProps: <Props extends PanelProps>(props: Props) => [Pane
161
162
  declare const resizeTriggerProps: (keyof ResizeTriggerProps)[];
162
163
  declare const splitResizeTriggerProps: <Props extends ResizeTriggerProps>(props: Props) => [ResizeTriggerProps, Omit<Props, keyof ResizeTriggerProps>];
163
164
 
164
- export { type SplitterApi as Api, type PanelProps, type PanelSizeData, type SplitterProps as Props, type ResizeTriggerProps, type SplitterService as Service, type SizeChangeDetails, anatomy, connect, machine, panelProps, props, resizeTriggerProps, splitPanelProps, splitProps, splitResizeTriggerProps };
165
+ export { type SplitterApi as Api, type SplitterMachine as Machine, type PanelProps, type PanelSizeData, type SplitterProps as Props, type ResizeTriggerProps, type SplitterService as Service, type SizeChangeDetails, anatomy, connect, machine, panelProps, props, resizeTriggerProps, splitPanelProps, splitProps, splitResizeTriggerProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/splitter",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Core logic for the splitter 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.0",
31
- "@zag-js/core": "1.0.0",
32
- "@zag-js/types": "1.0.0",
33
- "@zag-js/dom-query": "1.0.0",
34
- "@zag-js/utils": "1.0.0"
30
+ "@zag-js/anatomy": "1.0.1",
31
+ "@zag-js/core": "1.0.1",
32
+ "@zag-js/types": "1.0.1",
33
+ "@zag-js/dom-query": "1.0.1",
34
+ "@zag-js/utils": "1.0.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "clean-package": "2.2.0"