Socket
Socket
Sign inDemoInstall

@zag-js/dismissable

Package Overview
Dependencies
Maintainers
1
Versions
747
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/dismissable - npm Package Compare versions

Comparing version 0.0.0-dev-20220714012600 to 0.0.0-dev-20220714091855

LICENSE

16

dist/index.d.ts

@@ -1,1 +0,15 @@

export * from "./dismissable-layer";
import { InteractOutsideHandlers } from '@zag-js/interact-outside';
declare type Container = HTMLElement | null | Array<HTMLElement | null>;
declare type DismissableElementHandlers = InteractOutsideHandlers & {
onEscapeKeyDown?: (event: KeyboardEvent) => void;
};
declare type DismissableElementOptions = DismissableElementHandlers & {
debug?: boolean;
pointerBlocking?: boolean;
onDismiss: () => void;
exclude?: Container | (() => Container);
};
declare function trackDismissableElement(node: HTMLElement | null, options: DismissableElementOptions): (() => void) | undefined;
export { DismissableElementHandlers, DismissableElementOptions, trackDismissableElement };

15

dist/index.js

@@ -30,3 +30,3 @@ "use strict";

const res = typeof v === "function" ? v(...a) : v;
return res != null ? res : void 0;
return res ?? void 0;
};

@@ -41,3 +41,2 @@ var hasProp = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);

function getDocument(el) {
var _a;
if (isWindow(el))

@@ -47,7 +46,7 @@ return el.document;

return el;
return (_a = el == null ? void 0 : el.ownerDocument) != null ? _a : document;
return (el == null ? void 0 : el.ownerDocument) ?? document;
}
function getEventTarget(event) {
var _a, _b;
return (_b = (_a = event.composedPath) == null ? void 0 : _a.call(event)[0]) != null ? _b : event.target;
var _a;
return ((_a = event.composedPath) == null ? void 0 : _a.call(event)[0]) ?? event.target;
}

@@ -78,3 +77,3 @@ function contains(parent, child) {

const c = a.length === 2 ? a[0] : true;
if (c && void 0 !== "production") {
if (c && process.env.NODE_ENV !== "production") {
console.warn(m);

@@ -256,1 +255,5 @@ }

}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
trackDismissableElement
});
{
"name": "@zag-js/dismissable",
"version": "0.0.0-dev-20220714012600",
"version": "0.0.0-dev-20220714091855",
"description": "Dismissable layer utilities for the DOM",

@@ -25,11 +25,2 @@ "keywords": [

],
"scripts": {
"build:fast": "yarn zag build",
"start": "yarn zag build --watch",
"build": "yarn zag build --prod",
"test": "jest --config ../../../jest.config.js --rootDir tests",
"lint": "eslint src --ext .ts,.tsx",
"test:ci": "yarn test --ci --runInBand --updateSnapshot",
"test:watch": "yarn test --watchAll"
},
"publishConfig": {

@@ -39,10 +30,20 @@ "access": "public"

"dependencies": {
"@zag-js/interact-outside": "0.0.0-dev-20220714012600"
"@zag-js/interact-outside": "0.0.0-dev-20220714091855"
},
"devDependencies": {
"@zag-js/dom-utils": "0.0.0-dev-20220714012600"
"@zag-js/dom-utils": "0.0.0-dev-20220714091855",
"@zag-js/utils": "0.0.0-dev-20220714091855"
},
"bugs": {
"url": "https://github.com/chakra-ui/zag/issues"
},
"scripts": {
"build-fast": "tsup src/index.ts --format=esm,cjs",
"start": "pnpm build --watch",
"build": "tsup src/index.ts --format=esm,cjs --dts",
"test": "jest --config ../../../jest.config.js --rootDir tests",
"lint": "eslint src --ext .ts,.tsx",
"test-ci": "pnpm test --ci --runInBand -u",
"test-watch": "pnpm test --watchAll"
}
}
}

Sorry, the diff of this file is not supported yet

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