Socket
Socket
Sign inDemoInstall

@zag-js/dom-query

Package Overview
Dependencies
0
Maintainers
1
Versions
585
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

dist/chunk-7J6Q4RVX.mjs

36

dist/index.d.ts

@@ -1,33 +0,3 @@

declare type Target = HTMLElement | EventTarget;
declare function contains(parent: Target | null | undefined, child: Target | null): boolean;
declare function isDocument(value: any): value is Document;
declare function isWindow(value: any): value is Window;
declare function isHTMLElement(value: any): value is HTMLElement;
declare type BaseContext = {
getRootNode?: () => Document | ShadowRoot | Node;
};
declare type BaseDetails = {
[event: string]: {
[key: string]: any;
};
};
interface CustomEventListener<EventMap extends BaseDetails> {
<E extends keyof EventMap>(event: E, cb: (evt: CustomEvent<EventMap[E]>) => void): VoidFunction;
}
interface CustomEventEmitter<EventMap extends BaseDetails> {
<E extends keyof EventMap>(evt: E, detail: EventMap[E], options?: EventInit): void;
}
declare type Callable<T> = T | (() => T);
declare function defineHelpers<T>(rest: T): {
getRootNode(ctx: BaseContext): Document | ShadowRoot;
getDoc(ctx: BaseContext): Document;
getWin(ctx: BaseContext): Window & typeof globalThis;
getActiveElement(ctx: BaseContext): HTMLElement | null;
getById<T_1 = HTMLElement>(ctx: BaseContext, id: string): T_1 | null;
createEmitter<EventMap extends BaseDetails>(ctx: BaseContext, target: Callable<HTMLElement>): CustomEventEmitter<EventMap>;
createListener<EventMap_1 extends BaseDetails>(target: Callable<HTMLElement>): CustomEventListener<EventMap_1>;
} & T;
export { CustomEventEmitter, CustomEventListener, contains, defineHelpers, isDocument, isHTMLElement, isWindow };
export { contains } from './contains.js';
export { isDocument, isHTMLElement, isWindow } from './is-element.js';
export { CustomEventEmitter, CustomEventListener, defineHelpers } from './helpers.js';
{
"name": "@zag-js/dom-query",
"version": "0.1.0",
"version": "0.1.1",
"description": "The dom helper library for zag.js machines",

@@ -14,5 +14,2 @@ "keywords": [

"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"repository": "https://github.com/chakra-ui/zag/tree/main/packages/utilities/dom-helpers",

@@ -29,6 +26,21 @@ "sideEffects": false,

},
"clean-package": "../../../clean-package.config.json",
"main": "dist/index.js",
"devDependencies": {
"clean-package": "2.2.0"
},
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build-fast": "tsup src/index.ts --format=esm,cjs",
"build-fast": "tsup src",
"start": "pnpm build --watch",
"build": "tsup src/index.ts --format=esm,cjs --dts",
"build": "tsup src --dts",
"test": "jest --config ../../../jest.config.js --rootDir . --passWithNoTests",

@@ -35,0 +47,0 @@ "lint": "eslint src --ext .ts,.tsx",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc