@nextui-org/react-rsc-utils
Advanced tools
Comparing version 0.0.0-dev-v2-20230808152650 to 0.0.0-dev-v2-20230810201836
@@ -26,6 +26,7 @@ "use strict"; | ||
module.exports = __toCommonJS(filter_dom_props_exports); | ||
// src/dom-props.ts | ||
var DOMPropNames = /* @__PURE__ */ new Set([ | ||
"id", | ||
"type", | ||
"className", | ||
"style", | ||
@@ -37,4 +38,168 @@ "title", | ||
"width", | ||
"height" | ||
"height", | ||
"abbr", | ||
"accept", | ||
"acceptCharset", | ||
"accessKey", | ||
"action", | ||
"allowFullScreen", | ||
"allowTransparency", | ||
"alt", | ||
"async", | ||
"autoComplete", | ||
"autoFocus", | ||
"autoPlay", | ||
"cellPadding", | ||
"cellSpacing", | ||
"challenge", | ||
"charset", | ||
"checked", | ||
"cite", | ||
"class", | ||
"className", | ||
"cols", | ||
"colSpan", | ||
"command", | ||
"content", | ||
"contentEditable", | ||
"contextMenu", | ||
"controls", | ||
"coords", | ||
"crossOrigin", | ||
"data", | ||
"dateTime", | ||
"default", | ||
"defer", | ||
"dir", | ||
"disabled", | ||
"download", | ||
"draggable", | ||
"dropzone", | ||
"encType", | ||
"for", | ||
"form", | ||
"formAction", | ||
"formEncType", | ||
"formMethod", | ||
"formNoValidate", | ||
"formTarget", | ||
"frameBorder", | ||
"headers", | ||
"hidden", | ||
"high", | ||
"href", | ||
"hrefLang", | ||
"httpEquiv", | ||
"icon", | ||
"inputMode", | ||
"isMap", | ||
"itemId", | ||
"itemProp", | ||
"itemRef", | ||
"itemScope", | ||
"itemType", | ||
"kind", | ||
"label", | ||
"lang", | ||
"list", | ||
"loop", | ||
"manifest", | ||
"max", | ||
"maxLength", | ||
"media", | ||
"mediaGroup", | ||
"method", | ||
"min", | ||
"minLength", | ||
"multiple", | ||
"muted", | ||
"name", | ||
"noValidate", | ||
"open", | ||
"optimum", | ||
"pattern", | ||
"ping", | ||
"placeholder", | ||
"poster", | ||
"preload", | ||
"radioGroup", | ||
"readOnly", | ||
"rel", | ||
"required", | ||
"rows", | ||
"rowSpan", | ||
"sandbox", | ||
"scope", | ||
"scoped", | ||
"scrolling", | ||
"seamless", | ||
"selected", | ||
"shape", | ||
"size", | ||
"sizes", | ||
"sortable", | ||
"span", | ||
"spellCheck", | ||
"src", | ||
"srcDoc", | ||
"srcSet", | ||
"start", | ||
"step", | ||
"target", | ||
"translate", | ||
"typeMustMatch", | ||
"useMap", | ||
"value", | ||
"wmode", | ||
"wrap" | ||
]); | ||
var DOMEventNames = /* @__PURE__ */ new Set([ | ||
"onCopy", | ||
"onCut", | ||
"onPaste", | ||
"onLoad", | ||
"onError", | ||
"onWheel", | ||
"onScroll", | ||
"onCompositionEnd", | ||
"onCompositionStart", | ||
"onCompositionUpdate", | ||
"onKeyDown", | ||
"onKeyPress", | ||
"onKeyUp", | ||
"onFocus", | ||
"onBlur", | ||
"onChange", | ||
"onInput", | ||
"onSubmit", | ||
"onClick", | ||
"onContextMenu", | ||
"onDoubleClick", | ||
"onDrag", | ||
"onDragEnd", | ||
"onDragEnter", | ||
"onDragExit", | ||
"onDragLeave", | ||
"onDragOver", | ||
"onDragStart", | ||
"onDrop", | ||
"onMouseDown", | ||
"onMouseEnter", | ||
"onMouseLeave", | ||
"onMouseMove", | ||
"onMouseOut", | ||
"onMouseOver", | ||
"onMouseUp", | ||
"onSelect", | ||
"onTouchCancel", | ||
"onTouchEnd", | ||
"onTouchMove", | ||
"onTouchStart", | ||
"onAnimationStart", | ||
"onAnimationEnd", | ||
"onAnimationIteration", | ||
"onTransitionEnd" | ||
]); | ||
// src/filter-dom-props.ts | ||
var propRe = /^(data-.*)$/; | ||
@@ -56,2 +221,5 @@ var ariaRe = /^(aria-.*)$/; | ||
} | ||
if (funcRe.test(prop) && !DOMEventNames.has(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)) { | ||
@@ -58,0 +226,0 @@ filteredProps[prop] = props[prop]; |
export { getValidChildren, pickChildren } from './children.js'; | ||
export { filterDOMProps } from './filter-dom-props.js'; | ||
export { DOMEventNames, DOMPropNames } from './dom-props.js'; | ||
import 'react'; | ||
import '@react-types/shared'; |
{ | ||
"name": "@nextui-org/react-rsc-utils", | ||
"version": "0.0.0-dev-v2-20230808152650", | ||
"version": "0.0.0-dev-v2-20230810201836", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
277611
23
7475