@conform-to/react
Advanced tools
+17
-19
@@ -394,23 +394,21 @@ 'use client'; | ||
| react.useEffect(() => { | ||
| var createEventListener = listener => { | ||
| return event => { | ||
| var _inputRef$current2; | ||
| if (Array.isArray(inputRef.current) ? inputRef.current.some(item => item === event.target) : event.target instanceof Node && ((_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.contains(event.target))) { | ||
| var timer = eventDispatched.current[listener]; | ||
| if (timer) { | ||
| clearTimeout(timer); | ||
| } | ||
| eventDispatched.current[listener] = window.setTimeout(() => { | ||
| eventDispatched.current[listener] = undefined; | ||
| }); | ||
| if (listener === 'focus') { | ||
| var _optionsRef$current4, _optionsRef$current4$; | ||
| (_optionsRef$current4 = optionsRef.current) === null || _optionsRef$current4 === void 0 || (_optionsRef$current4$ = _optionsRef$current4.onFocus) === null || _optionsRef$current4$ === void 0 || _optionsRef$current4$.call(_optionsRef$current4); | ||
| } | ||
| var createEventListener = (listener, event) => { | ||
| var _inputRef$current2; | ||
| if (Array.isArray(inputRef.current) ? inputRef.current.some(item => item === event.target) : event.target instanceof Node && ((_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.contains(event.target))) { | ||
| var timer = eventDispatched.current[listener]; | ||
| if (timer) { | ||
| clearTimeout(timer); | ||
| } | ||
| }; | ||
| eventDispatched.current[listener] = window.setTimeout(() => { | ||
| eventDispatched.current[listener] = undefined; | ||
| }); | ||
| if (listener === 'focus') { | ||
| var _optionsRef$current4, _optionsRef$current4$; | ||
| (_optionsRef$current4 = optionsRef.current) === null || _optionsRef$current4 === void 0 || (_optionsRef$current4$ = _optionsRef$current4.onFocus) === null || _optionsRef$current4$ === void 0 || _optionsRef$current4$.call(_optionsRef$current4); | ||
| } | ||
| } | ||
| }; | ||
| var inputHandler = createEventListener('change'); | ||
| var focusHandler = createEventListener('focus'); | ||
| var blurHandler = createEventListener('blur'); | ||
| var inputHandler = createEventListener.bind(null, 'change'); | ||
| var focusHandler = createEventListener.bind(null, 'focus'); | ||
| var blurHandler = createEventListener.bind(null, 'blur'); | ||
| document.addEventListener('input', inputHandler, true); | ||
@@ -417,0 +415,0 @@ document.addEventListener('focusin', focusHandler, true); |
+17
-19
@@ -390,23 +390,21 @@ 'use client'; | ||
| useEffect(() => { | ||
| var createEventListener = listener => { | ||
| return event => { | ||
| var _inputRef$current2; | ||
| if (Array.isArray(inputRef.current) ? inputRef.current.some(item => item === event.target) : event.target instanceof Node && ((_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.contains(event.target))) { | ||
| var timer = eventDispatched.current[listener]; | ||
| if (timer) { | ||
| clearTimeout(timer); | ||
| } | ||
| eventDispatched.current[listener] = window.setTimeout(() => { | ||
| eventDispatched.current[listener] = undefined; | ||
| }); | ||
| if (listener === 'focus') { | ||
| var _optionsRef$current4, _optionsRef$current4$; | ||
| (_optionsRef$current4 = optionsRef.current) === null || _optionsRef$current4 === void 0 || (_optionsRef$current4$ = _optionsRef$current4.onFocus) === null || _optionsRef$current4$ === void 0 || _optionsRef$current4$.call(_optionsRef$current4); | ||
| } | ||
| var createEventListener = (listener, event) => { | ||
| var _inputRef$current2; | ||
| if (Array.isArray(inputRef.current) ? inputRef.current.some(item => item === event.target) : event.target instanceof Node && ((_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.contains(event.target))) { | ||
| var timer = eventDispatched.current[listener]; | ||
| if (timer) { | ||
| clearTimeout(timer); | ||
| } | ||
| }; | ||
| eventDispatched.current[listener] = window.setTimeout(() => { | ||
| eventDispatched.current[listener] = undefined; | ||
| }); | ||
| if (listener === 'focus') { | ||
| var _optionsRef$current4, _optionsRef$current4$; | ||
| (_optionsRef$current4 = optionsRef.current) === null || _optionsRef$current4 === void 0 || (_optionsRef$current4$ = _optionsRef$current4.onFocus) === null || _optionsRef$current4$ === void 0 || _optionsRef$current4$.call(_optionsRef$current4); | ||
| } | ||
| } | ||
| }; | ||
| var inputHandler = createEventListener('change'); | ||
| var focusHandler = createEventListener('focus'); | ||
| var blurHandler = createEventListener('blur'); | ||
| var inputHandler = createEventListener.bind(null, 'change'); | ||
| var focusHandler = createEventListener.bind(null, 'focus'); | ||
| var blurHandler = createEventListener.bind(null, 'blur'); | ||
| document.addEventListener('input', inputHandler, true); | ||
@@ -413,0 +411,0 @@ document.addEventListener('focusin', focusHandler, true); |
+8
-10
@@ -78,13 +78,11 @@ 'use strict'; | ||
| react.useEffect(() => { | ||
| var createEventListener = listener => { | ||
| return event => { | ||
| var element = ref.current; | ||
| if (element && event.target === element) { | ||
| eventDispatched.current[listener] = true; | ||
| } | ||
| }; | ||
| var createEventListener = (listener, event) => { | ||
| var element = ref.current; | ||
| if (element && event.target === element) { | ||
| eventDispatched.current[listener] = true; | ||
| } | ||
| }; | ||
| var inputHandler = createEventListener('change'); | ||
| var focusHandler = createEventListener('focus'); | ||
| var blurHandler = createEventListener('blur'); | ||
| var inputHandler = createEventListener.bind(null, 'change'); | ||
| var focusHandler = createEventListener.bind(null, 'focus'); | ||
| var blurHandler = createEventListener.bind(null, 'blur'); | ||
| document.addEventListener('input', inputHandler, true); | ||
@@ -91,0 +89,0 @@ document.addEventListener('focusin', focusHandler, true); |
@@ -74,13 +74,11 @@ import { unstable_updateField } from '@conform-to/dom'; | ||
| useEffect(() => { | ||
| var createEventListener = listener => { | ||
| return event => { | ||
| var element = ref.current; | ||
| if (element && event.target === element) { | ||
| eventDispatched.current[listener] = true; | ||
| } | ||
| }; | ||
| var createEventListener = (listener, event) => { | ||
| var element = ref.current; | ||
| if (element && event.target === element) { | ||
| eventDispatched.current[listener] = true; | ||
| } | ||
| }; | ||
| var inputHandler = createEventListener('change'); | ||
| var focusHandler = createEventListener('focus'); | ||
| var blurHandler = createEventListener('blur'); | ||
| var inputHandler = createEventListener.bind(null, 'change'); | ||
| var focusHandler = createEventListener.bind(null, 'focus'); | ||
| var blurHandler = createEventListener.bind(null, 'blur'); | ||
| document.addEventListener('input', inputHandler, true); | ||
@@ -87,0 +85,0 @@ document.addEventListener('focusin', focusHandler, true); |
+2
-2
@@ -6,3 +6,3 @@ { | ||
| "license": "MIT", | ||
| "version": "1.19.0", | ||
| "version": "1.19.1", | ||
| "main": "./dist/index.js", | ||
@@ -45,3 +45,3 @@ "module": "./dist/index.mjs", | ||
| "dependencies": { | ||
| "@conform-to/dom": "1.19.0" | ||
| "@conform-to/dom": "1.19.1" | ||
| }, | ||
@@ -48,0 +48,0 @@ "devDependencies": { |
+1
-1
@@ -10,3 +10,3 @@ ``` | ||
| Version 1.19.0 / License MIT / Copyright (c) 2026 Edmund Hung | ||
| Version 1.19.1 / License MIT / Copyright (c) 2026 Edmund Hung | ||
@@ -13,0 +13,0 @@ Progressively enhance HTML forms with React. Build resilient, type-safe forms with no hassle using web standards. |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
454876
-0.01%10200
-0.08%+ Added
- Removed
Updated