@zag-js/pressable
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -1,29 +0,2 @@ | ||
"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 | ||
// ../../utilities/dom/dist/index.js | ||
var dataAttr = (guard) => { | ||
@@ -300,5 +273,5 @@ return guard ? "" : void 0; | ||
// src/pressable.machine.ts | ||
var import_core = require("@zag-js/core"); | ||
import { createMachine, ref } from "@zag-js/core"; | ||
function machine(ctx) { | ||
return (0, import_core.createMachine)( | ||
return createMachine( | ||
{ | ||
@@ -314,3 +287,3 @@ id: "pressable", | ||
pointerdownEvent: null, | ||
cleanups: (0, import_core.ref)([]), | ||
cleanups: ref([]), | ||
wasPressedDown: false | ||
@@ -464,3 +437,3 @@ }, | ||
ctx2.cleanups.forEach((fn) => fn == null ? void 0 : fn()); | ||
ctx2.cleanups = (0, import_core.ref)([]); | ||
ctx2.cleanups = ref([]); | ||
}, | ||
@@ -485,6 +458,6 @@ resetContext(ctx2) { | ||
ctx2.activePointerId = event.pointerId; | ||
ctx2.pointerdownEvent = (0, import_core.ref)(event); | ||
ctx2.pointerdownEvent = ref(event); | ||
}, | ||
setTarget(ctx2, { event }) { | ||
ctx2.target = (0, import_core.ref)(event.currentTarget); | ||
ctx2.target = ref(event.currentTarget); | ||
}, | ||
@@ -595,6 +568,5 @@ focusIfNeeded(ctx2, { event }) { | ||
} | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
export { | ||
connect, | ||
machine | ||
}); | ||
}; |
{ | ||
"type": "module", | ||
"name": "@zag-js/pressable", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Core logic for the pressable widget implemented as a state machine", | ||
@@ -19,3 +20,2 @@ "keywords": [ | ||
"types": "dist/index.d.ts", | ||
"module": "dist/index.mjs", | ||
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/pressable", | ||
@@ -27,7 +27,7 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@zag-js/core": "0.1.10", | ||
"@zag-js/types": "0.2.5" | ||
"@zag-js/core": "0.1.11", | ||
"@zag-js/types": "0.2.6" | ||
}, | ||
"devDependencies": { | ||
"@zag-js/dom-utils": "0.1.11" | ||
"@zag-js/dom-utils": "0.1.12" | ||
}, | ||
@@ -41,5 +41,5 @@ "publishConfig": { | ||
"scripts": { | ||
"build-fast": "tsup src/index.ts --format=esm,cjs", | ||
"build-fast": "tsup src/index.ts --format=esm", | ||
"start": "pnpm build --watch", | ||
"build": "tsup src/index.ts --format=esm,cjs --dts", | ||
"build": "tsup src/index.ts --format=esm --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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
Yes
25275
5
659
+ Added@zag-js/core@0.1.11(transitive)
+ Added@zag-js/store@0.1.3(transitive)
+ Added@zag-js/types@0.2.6(transitive)
- Removed@zag-js/core@0.1.10(transitive)
- Removed@zag-js/store@0.1.2(transitive)
- Removed@zag-js/types@0.2.5(transitive)
Updated@zag-js/core@0.1.11
Updated@zag-js/types@0.2.6