@nextui-org/react-rsc-utils
Advanced tools
Comparing version 0.0.0-dev-v2-20230806025611 to 0.0.0-dev-v2-20230808152650
@@ -16,2 +16,6 @@ import { DOMProps, AriaLabelingProps } from '@react-types/shared'; | ||
propNames?: Set<string>; | ||
/** | ||
* A Set of event names that should be excluded from the filter. | ||
*/ | ||
omitEventNames?: Set<string>; | ||
} | ||
@@ -18,0 +22,0 @@ /** |
@@ -45,3 +45,3 @@ "use strict"; | ||
}) { | ||
let { labelable, propNames } = opts; | ||
let { labelable, propNames, omitEventNames } = opts; | ||
let filteredProps = {}; | ||
@@ -52,2 +52,5 @@ if (!opts.enabled) { | ||
for (const prop in props) { | ||
if ((omitEventNames == null ? void 0 : omitEventNames.has(prop)) && funcRe.test(prop)) { | ||
continue; | ||
} | ||
if (Object.prototype.hasOwnProperty.call(props, prop) && (DOMPropNames.has(prop) || labelable && ariaRe.test(prop) || (propNames == null ? void 0 : propNames.has(prop)) || propRe.test(prop)) || funcRe.test(prop)) { | ||
@@ -54,0 +57,0 @@ filteredProps[prop] = props[prop]; |
{ | ||
"name": "@nextui-org/react-rsc-utils", | ||
"version": "0.0.0-dev-v2-20230806025611", | ||
"version": "0.0.0-dev-v2-20230808152650", | ||
"description": "A set of utilities for react compatible with RSC", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
266199
6744