Socket
Socket
Sign inDemoInstall

@zag-js/dom-utils

Package Overview
Dependencies
Maintainers
1
Versions
227
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/dom-utils - npm Package Compare versions

Comparing version 0.0.0-dev-20221005155029 to 0.0.0-dev-20221015064943

1

dist/index.d.ts

@@ -209,2 +209,3 @@ import { JSX } from '@zag-js/types';

getById: <T_1 = HTMLElement>(ctx: Ctx, id: string) => T_1 | null;
createEmitter: (ctx: Ctx, ns: string, target: HTMLElement | null) => (evt: string, detail: Record<string, any>, options?: Omit<CustomEventInit<EventInit>, "detail">) => void;
} & T;

@@ -211,0 +212,0 @@ declare function contains(parent: HTMLElement | EventTarget | null | undefined, child: HTMLElement | EventTarget | null): boolean;

@@ -297,3 +297,17 @@ "use strict";

getActiveElement: (ctx) => dom.getDoc(ctx).activeElement,
getById: (ctx, id) => dom.getRootNode(ctx).getElementById(id)
getById: (ctx, id) => dom.getRootNode(ctx).getElementById(id),
createEmitter: (ctx, ns, target) => {
const win = dom.getWin(ctx);
if (!target) {
throw new Error("[dom/create-emit] Expected an element but got undefined");
}
return (evt, detail, options) => {
const event = new win.CustomEvent(`zag:${ns}:${evt}`, {
detail,
bubbles: (options == null ? void 0 : options.bubbles) || true,
cancelable: options == null ? void 0 : options.cancelable
});
target.dispatchEvent(event);
};
}
};

@@ -300,0 +314,0 @@ return {

6

package.json
{
"name": "@zag-js/dom-utils",
"version": "0.0.0-dev-20221005155029",
"version": "0.0.0-dev-20221015064943",
"description": "",

@@ -28,6 +28,6 @@ "main": "dist/index.js",

"dependencies": {
"@zag-js/types": "0.0.0-dev-20221005155029"
"@zag-js/types": "0.2.7"
},
"devDependencies": {
"@zag-js/utils": "0.0.0-dev-20221005155029"
"@zag-js/utils": "0.1.6"
},

@@ -34,0 +34,0 @@ "scripts": {

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