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

@zag-js/form-utils

Package Overview
Dependencies
Maintainers
1
Versions
710
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.0.0-dev-20230202113057 to 0.0.0-dev-20230222120620

dist/chunk-7KFWOEX6.mjs

22

dist/form.js

@@ -28,21 +28,3 @@ "use strict";

module.exports = __toCommonJS(form_exports);
// ../dom/src/mutation-observer.ts
function observeAttributes(node, attributes, fn) {
if (!node)
return;
const attrs = Array.isArray(attributes) ? attributes : [attributes];
const win = node.ownerDocument.defaultView || window;
const obs = new win.MutationObserver((changes) => {
for (const change of changes) {
if (change.type === "attributes" && change.attributeName && attrs.includes(change.attributeName)) {
fn(change);
}
}
});
obs.observe(node, { attributes: true, attributeFilter: attrs });
return () => obs.disconnect();
}
// src/form.ts
var import_mutation_observer = require("@zag-js/mutation-observer");
function getClosestForm(el) {

@@ -71,3 +53,3 @@ if (isFormElement(el))

callback(fieldset.disabled);
return observeAttributes(fieldset, ["disabled"], () => callback(fieldset.disabled));
return (0, import_mutation_observer.observeAttributes)(fieldset, ["disabled"], () => callback(fieldset.disabled));
}

@@ -74,0 +56,0 @@ function isNativeDisabled(el) {

@@ -32,25 +32,4 @@ "use strict";

// ../dom/src/query.ts
function getWindow(el) {
return el?.ownerDocument.defaultView ?? window;
}
// ../dom/src/mutation-observer.ts
function observeAttributes(node, attributes, fn) {
if (!node)
return;
const attrs = Array.isArray(attributes) ? attributes : [attributes];
const win = node.ownerDocument.defaultView || window;
const obs = new win.MutationObserver((changes) => {
for (const change of changes) {
if (change.type === "attributes" && change.attributeName && attrs.includes(change.attributeName)) {
fn(change);
}
}
});
obs.observe(node, { attributes: true, attributeFilter: attrs });
return () => obs.disconnect();
}
// src/input-event.ts
var getWindow = (el) => el.ownerDocument.defaultView || window;
function getDescriptor(el, options) {

@@ -89,2 +68,3 @@ const { type, property = "value" } = options;

// src/form.ts
var import_mutation_observer = require("@zag-js/mutation-observer");
function getClosestForm(el) {

@@ -113,3 +93,3 @@ if (isFormElement(el))

callback(fieldset.disabled);
return observeAttributes(fieldset, ["disabled"], () => callback(fieldset.disabled));
return (0, import_mutation_observer.observeAttributes)(fieldset, ["disabled"], () => callback(fieldset.disabled));
}

@@ -116,0 +96,0 @@ function isNativeDisabled(el) {

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

module.exports = __toCommonJS(input_event_exports);
// ../dom/src/query.ts
function getWindow(el) {
return el?.ownerDocument.defaultView ?? window;
}
// src/input-event.ts
var getWindow = (el) => el.ownerDocument.defaultView || window;
function getDescriptor(el, options) {

@@ -37,0 +31,0 @@ const { type, property = "value" } = options;

{
"name": "@zag-js/form-utils",
"version": "0.0.0-dev-20230202113057",
"version": "0.0.0-dev-20230222120620",
"description": "",

@@ -18,5 +18,7 @@ "keywords": [

],
"dependencies": {
"@zag-js/mutation-observer": "0.0.0-dev-20230222120620"
},
"devDependencies": {
"clean-package": "2.2.0",
"@zag-js/dom-utils": "0.0.0-dev-20230202113057"
"clean-package": "2.2.0"
},

@@ -23,0 +25,0 @@ "publishConfig": {

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