Socket
Socket
Sign inDemoInstall

@zag-js/pressable

Package Overview
Dependencies
Maintainers
1
Versions
457
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/pressable - npm Package Compare versions

Comparing version 0.0.0-dev-20220919164136 to 0.0.0-dev-20220928123644

dist/index.mjs

46

dist/index.js

@@ -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
};
});

18

package.json
{
"type": "module",
"name": "@zag-js/pressable",
"version": "0.0.0-dev-20220919164136",
"version": "0.0.0-dev-20220928123644",
"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.0.0-dev-20220919164136",
"@zag-js/types": "0.0.0-dev-20220919164136"
"@zag-js/core": "0.0.0-dev-20220928123644",
"@zag-js/types": "0.0.0-dev-20220928123644"
},
"devDependencies": {
"@zag-js/dom-utils": "0.0.0-dev-20220919164136"
"@zag-js/dom-utils": "0.0.0-dev-20220928123644"
},

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc