Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@zag-js/dom-query

Package Overview
Dependencies
Maintainers
1
Versions
679
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.0.0-dev-20230804152652 to 0.0.0-dev-20230804161728

1

dist/index.d.ts

@@ -18,3 +18,2 @@ type Booleanish = boolean | "true" | "false";

getById: <T_1 extends HTMLElement = HTMLElement>(ctx: Ctx, id: string) => T_1 | null;
queryById: <T_2 extends HTMLElement = HTMLElement>(ctx: Ctx, id: string) => T_2;
} & T;

@@ -21,0 +20,0 @@

@@ -96,9 +96,3 @@ "use strict";

getActiveElement: (ctx) => screen.getDoc(ctx).activeElement,
getById: (ctx, id) => screen.getRootNode(ctx).getElementById(id),
queryById: (ctx, id) => {
const el = screen.getById(ctx, id);
if (!el)
throw new Error(`Element with id "${id}" not found.`);
return el;
}
getById: (ctx, id) => screen.getRootNode(ctx).getElementById(id)
};

@@ -105,0 +99,0 @@ return { ...screen, ...methods };

2

package.json
{
"name": "@zag-js/dom-query",
"version": "0.0.0-dev-20230804152652",
"version": "0.0.0-dev-20230804161728",
"description": "The dom helper library for zag.js machines",

@@ -5,0 +5,0 @@ "keywords": [

@@ -16,9 +16,4 @@ type Ctx = { getRootNode?: () => Document | ShadowRoot | Node }

screen.getRootNode(ctx).getElementById(id) as T | null,
queryById: <T extends HTMLElement = HTMLElement>(ctx: Ctx, id: string): T => {
const el = screen.getById<T>(ctx, id)
if (!el) throw new Error(`Element with id "${id}" not found.`)
return el
},
}
return { ...screen, ...methods }
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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