@zag-js/presence
Advanced tools
Comparing version 0.70.0 to 0.71.0
@@ -1,28 +0,5 @@ | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
'use strict'; | ||
// src/index.ts | ||
var src_exports = {}; | ||
__export(src_exports, { | ||
connect: () => connect, | ||
machine: () => machine, | ||
props: () => props | ||
}); | ||
module.exports = __toCommonJS(src_exports); | ||
var core = require('@zag-js/core'); | ||
var types = require('@zag-js/types'); | ||
@@ -44,5 +21,2 @@ // src/presence.connect.ts | ||
} | ||
// src/presence.machine.ts | ||
var import_core = require("@zag-js/core"); | ||
function getAnimationName(styles) { | ||
@@ -52,3 +26,3 @@ return styles?.animationName || "none"; | ||
function machine(ctx) { | ||
return (0, import_core.createMachine)( | ||
return core.createMachine( | ||
{ | ||
@@ -124,7 +98,7 @@ initial: ctx.present ? "mounted" : "unmounted", | ||
setNode(ctx2, evt) { | ||
ctx2.node = (0, import_core.ref)(evt.node); | ||
ctx2.node = core.ref(evt.node); | ||
}, | ||
setStyles(ctx2, evt) { | ||
const win = evt.node.ownerDocument.defaultView || window; | ||
ctx2.styles = (0, import_core.ref)(win.getComputedStyle(evt.node)); | ||
ctx2.styles = core.ref(win.getComputedStyle(evt.node)); | ||
}, | ||
@@ -185,12 +159,6 @@ syncPresence(ctx2, _evt, { send }) { | ||
} | ||
var props = types.createProps()(["onExitComplete", "present", "immediate"]); | ||
// src/presence.props.ts | ||
var import_types = require("@zag-js/types"); | ||
var props = (0, import_types.createProps)()(["onExitComplete", "present", "immediate"]); | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
connect, | ||
machine, | ||
props | ||
}); | ||
//# sourceMappingURL=index.js.map | ||
exports.connect = connect; | ||
exports.machine = machine; | ||
exports.props = props; |
{ | ||
"name": "@zag-js/presence", | ||
"version": "0.70.0", | ||
"version": "0.71.0", | ||
"description": "Core logic for the presence widget implemented as a state machine", | ||
@@ -30,4 +30,4 @@ "keywords": [ | ||
"dependencies": { | ||
"@zag-js/core": "0.70.0", | ||
"@zag-js/types": "0.70.0" | ||
"@zag-js/core": "0.71.0", | ||
"@zag-js/types": "0.71.0" | ||
}, | ||
@@ -34,0 +34,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16160
7
368
+ Added@zag-js/core@0.71.0(transitive)
+ Added@zag-js/store@0.71.0(transitive)
+ Added@zag-js/types@0.71.0(transitive)
+ Added@zag-js/utils@0.71.0(transitive)
- Removed@zag-js/core@0.70.0(transitive)
- Removed@zag-js/store@0.70.0(transitive)
- Removed@zag-js/types@0.70.0(transitive)
Updated@zag-js/core@0.71.0
Updated@zag-js/types@0.71.0