@zag-js/clipboard
Advanced tools
Comparing version
import * as _zag_js_anatomy from '@zag-js/anatomy'; | ||
import { RequiredBy, PropTypes, CommonProperties, Context, NormalizeProps } from '@zag-js/types'; | ||
import { RequiredBy, PropTypes, CommonProperties, NormalizeProps } from '@zag-js/types'; | ||
import * as _zag_js_core from '@zag-js/core'; | ||
@@ -34,3 +34,4 @@ import { StateMachine } from '@zag-js/core'; | ||
} | ||
type PrivateContext = Context<{}>; | ||
interface PrivateContext { | ||
} | ||
type ComputedContext = Readonly<{}>; | ||
@@ -77,2 +78,5 @@ type UserDefinedContext = RequiredBy<PublicContext, "id">; | ||
export { type MachineApi as Api, type UserDefinedContext as Context, type CopyStatusDetails, type ElementIds, type IndicatorProps, anatomy, connect, machine }; | ||
declare const props: ("value" | "timeout" | "id" | "ids" | "onCopyStatusChange" | "getRootNode")[]; | ||
declare const indicatorProps: "copied"[]; | ||
export { type MachineApi as Api, type UserDefinedContext as Context, type CopyStatusDetails, type ElementIds, type IndicatorProps, anatomy, connect, indicatorProps, machine, props }; |
@@ -25,3 +25,5 @@ "use strict"; | ||
connect: () => connect, | ||
machine: () => machine | ||
indicatorProps: () => indicatorProps, | ||
machine: () => machine, | ||
props: () => props | ||
}); | ||
@@ -138,6 +140,6 @@ module.exports = __toCommonJS(src_exports); | ||
}), | ||
getIndicatorProps(props) { | ||
getIndicatorProps(props2) { | ||
return normalize.element({ | ||
...parts.indicator.attrs, | ||
hidden: props.copied !== isCopied | ||
hidden: props2.copied !== isCopied | ||
}); | ||
@@ -220,2 +222,14 @@ } | ||
} | ||
// src/clipboard.props.ts | ||
var import_types = require("@zag-js/types"); | ||
var props = (0, import_types.createProps)()([ | ||
"getRootNode", | ||
"id", | ||
"ids", | ||
"value", | ||
"timeout", | ||
"onCopyStatusChange" | ||
]); | ||
var indicatorProps = (0, import_types.createProps)()(["copied"]); | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -225,4 +239,6 @@ 0 && (module.exports = { | ||
connect, | ||
machine | ||
indicatorProps, | ||
machine, | ||
props | ||
}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@zag-js/clipboard", | ||
"version": "0.36.3", | ||
"version": "0.37.0", | ||
"description": "Core logic for the clipboard widget implemented as a state machine", | ||
@@ -31,7 +31,7 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/anatomy": "0.36.3", | ||
"@zag-js/core": "0.36.3", | ||
"@zag-js/dom-query": "0.36.3", | ||
"@zag-js/utils": "0.36.3", | ||
"@zag-js/types": "0.36.3" | ||
"@zag-js/anatomy": "0.37.0", | ||
"@zag-js/core": "0.37.0", | ||
"@zag-js/dom-query": "0.37.0", | ||
"@zag-js/utils": "0.37.0", | ||
"@zag-js/types": "0.37.0" | ||
}, | ||
@@ -38,0 +38,0 @@ "devDependencies": { |
import type { StateMachine as S } from "@zag-js/core" | ||
import type { CommonProperties, Context, PropTypes, RequiredBy } from "@zag-js/types" | ||
import type { CommonProperties, PropTypes, RequiredBy } from "@zag-js/types" | ||
@@ -33,3 +33,3 @@ export interface CopyStatusDetails { | ||
type PrivateContext = Context<{}> | ||
interface PrivateContext {} | ||
@@ -36,0 +36,0 @@ type ComputedContext = Readonly<{}> |
export { anatomy } from "./clipboard.anatomy" | ||
export { connect } from "./clipboard.connect" | ||
export { machine } from "./clipboard.machine" | ||
export * from "./clipboard.props" | ||
export type { | ||
MachineApi as Api, | ||
UserDefinedContext as Context, | ||
CopyStatusDetails, | ||
ElementIds, | ||
CopyStatusDetails, | ||
IndicatorProps, | ||
} from "./clipboard.types" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
49257
5.26%16
6.67%785
5.8%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated
Updated
Updated