@zag-js/clipboard 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 { CommonProperties, RequiredBy, 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" | "control" | "trigger" | "indicator" | "input" | "label">;
7
7
 
@@ -55,6 +55,7 @@ interface ClipboardSchema {
55
55
  guard: string;
56
56
  }
57
57
  type ClipboardService = Service<ClipboardSchema>;
58
+ type ClipboardMachine = Machine<ClipboardSchema>;
58
59
  interface IndicatorProps {
59
60
  copied: boolean;
60
61
  }
@@ -85,11 +86,11 @@ interface ClipboardApi<T extends PropTypes = PropTypes> {
85
86
 
86
87
  declare function connect<T extends PropTypes>(service: ClipboardService, normalize: NormalizeProps<T>): ClipboardApi<T>;
87
88
 
88
- declare const machine: _zag_js_core.MachineConfig<ClipboardSchema>;
89
+ declare const machine: _zag_js_core.Machine<ClipboardSchema>;
89
90
 
90
91
  declare const props: (keyof ClipboardProps)[];
91
92
  declare const contextProps: <Props extends ClipboardProps>(props: Props) => [ClipboardProps, Omit<Props, keyof ClipboardProps>];
92
93
  declare const indicatorProps: "copied"[];
93
94
  declare const splitIndicatorProps: <Props extends IndicatorProps>(props: Props) => [IndicatorProps, Omit<Props, "copied">];
94
95
 
95
- export { type ClipboardApi as Api, type CopyStatusDetails, type ElementIds, type IndicatorProps, type ClipboardProps as Props, type ClipboardSchema as Schema, type ClipboardService as Service, anatomy, connect, contextProps, indicatorProps, machine, props, splitIndicatorProps };
96
+ export { type ClipboardApi as Api, type CopyStatusDetails, type ElementIds, type IndicatorProps, type ClipboardMachine as Machine, type ClipboardProps as Props, type ClipboardSchema as Schema, type ClipboardService as Service, anatomy, connect, contextProps, indicatorProps, machine, props, splitIndicatorProps };
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, RequiredBy, 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" | "control" | "trigger" | "indicator" | "input" | "label">;
7
7
 
@@ -55,6 +55,7 @@ interface ClipboardSchema {
55
55
  guard: string;
56
56
  }
57
57
  type ClipboardService = Service<ClipboardSchema>;
58
+ type ClipboardMachine = Machine<ClipboardSchema>;
58
59
  interface IndicatorProps {
59
60
  copied: boolean;
60
61
  }
@@ -85,11 +86,11 @@ interface ClipboardApi<T extends PropTypes = PropTypes> {
85
86
 
86
87
  declare function connect<T extends PropTypes>(service: ClipboardService, normalize: NormalizeProps<T>): ClipboardApi<T>;
87
88
 
88
- declare const machine: _zag_js_core.MachineConfig<ClipboardSchema>;
89
+ declare const machine: _zag_js_core.Machine<ClipboardSchema>;
89
90
 
90
91
  declare const props: (keyof ClipboardProps)[];
91
92
  declare const contextProps: <Props extends ClipboardProps>(props: Props) => [ClipboardProps, Omit<Props, keyof ClipboardProps>];
92
93
  declare const indicatorProps: "copied"[];
93
94
  declare const splitIndicatorProps: <Props extends IndicatorProps>(props: Props) => [IndicatorProps, Omit<Props, "copied">];
94
95
 
95
- export { type ClipboardApi as Api, type CopyStatusDetails, type ElementIds, type IndicatorProps, type ClipboardProps as Props, type ClipboardSchema as Schema, type ClipboardService as Service, anatomy, connect, contextProps, indicatorProps, machine, props, splitIndicatorProps };
96
+ export { type ClipboardApi as Api, type CopyStatusDetails, type ElementIds, type IndicatorProps, type ClipboardMachine as Machine, type ClipboardProps as Props, type ClipboardSchema as Schema, type ClipboardService as Service, anatomy, connect, contextProps, indicatorProps, machine, props, splitIndicatorProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/clipboard",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Core logic for the clipboard 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/core": "1.0.0",
31
- "@zag-js/anatomy": "1.0.0",
32
- "@zag-js/dom-query": "1.0.0",
33
- "@zag-js/utils": "1.0.0",
34
- "@zag-js/types": "1.0.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"