@zag-js/pressable
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -1,2 +0,29 @@ | ||
// ../../utilities/dom/dist/index.js | ||
"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); | ||
// src/index.ts | ||
var src_exports = {}; | ||
__export(src_exports, { | ||
connect: () => connect, | ||
machine: () => machine | ||
}); | ||
module.exports = __toCommonJS(src_exports); | ||
// ../../utilities/dom/dist/index.mjs | ||
var dataAttr = (guard) => { | ||
@@ -273,5 +300,5 @@ return guard ? "" : void 0; | ||
// src/pressable.machine.ts | ||
import { createMachine, ref } from "@zag-js/core"; | ||
var import_core = require("@zag-js/core"); | ||
function machine(ctx) { | ||
return createMachine( | ||
return (0, import_core.createMachine)( | ||
{ | ||
@@ -287,3 +314,3 @@ id: "pressable", | ||
pointerdownEvent: null, | ||
cleanups: ref([]), | ||
cleanups: (0, import_core.ref)([]), | ||
wasPressedDown: false | ||
@@ -437,3 +464,3 @@ }, | ||
ctx2.cleanups.forEach((fn) => fn == null ? void 0 : fn()); | ||
ctx2.cleanups = ref([]); | ||
ctx2.cleanups = (0, import_core.ref)([]); | ||
}, | ||
@@ -458,6 +485,6 @@ resetContext(ctx2) { | ||
ctx2.activePointerId = event.pointerId; | ||
ctx2.pointerdownEvent = ref(event); | ||
ctx2.pointerdownEvent = (0, import_core.ref)(event); | ||
}, | ||
setTarget(ctx2, { event }) { | ||
ctx2.target = ref(event.currentTarget); | ||
ctx2.target = (0, import_core.ref)(event.currentTarget); | ||
}, | ||
@@ -568,5 +595,6 @@ focusIfNeeded(ctx2, { event }) { | ||
} | ||
export { | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
connect, | ||
machine | ||
}; | ||
}); |
{ | ||
"type": "module", | ||
"name": "@zag-js/pressable", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Core logic for the pressable widget implemented as a state machine", | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"keywords": [ | ||
@@ -18,4 +20,2 @@ "js", | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/pressable", | ||
@@ -27,7 +27,7 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@zag-js/core": "0.1.11", | ||
"@zag-js/types": "0.2.6" | ||
"@zag-js/core": "0.1.12", | ||
"@zag-js/types": "0.2.7" | ||
}, | ||
"devDependencies": { | ||
"@zag-js/dom-utils": "0.1.12" | ||
"@zag-js/dom-utils": "0.1.13" | ||
}, | ||
@@ -41,5 +41,5 @@ "publishConfig": { | ||
"scripts": { | ||
"build-fast": "tsup src/index.ts --format=esm", | ||
"build-fast": "tsup src/index.ts --format=esm,cjs", | ||
"start": "pnpm build --watch", | ||
"build": "tsup src/index.ts --format=esm --dts", | ||
"build": "tsup src/index.ts --format=esm,cjs --dts", | ||
"test": "jest --config ../../../jest.config.js --rootDir . --passWithNoTests", | ||
@@ -46,0 +46,0 @@ "lint": "eslint src --ext .ts,.tsx", |
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
45298
6
1248
No
+ Added@zag-js/core@0.1.12(transitive)
+ Added@zag-js/store@0.1.4(transitive)
+ Added@zag-js/types@0.2.7(transitive)
- Removed@zag-js/core@0.1.11(transitive)
- Removed@zag-js/store@0.1.3(transitive)
- Removed@zag-js/types@0.2.6(transitive)
Updated@zag-js/core@0.1.12
Updated@zag-js/types@0.2.7