attrs-in-props 3.2.3 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +23 -5
- package/dist/esm/index.js +1008 -0
- package/dist/iife/index.js +1037 -0
- package/index.js +21 -5
- package/package.json +31 -5
- package/dist/cjs/package.json +0 -4
package/dist/cjs/index.js
CHANGED
|
@@ -217,7 +217,15 @@ const HTML_ATTRIBUTES = {
|
|
|
217
217
|
"type",
|
|
218
218
|
"referrerpolicy"
|
|
219
219
|
],
|
|
220
|
-
audio: [
|
|
220
|
+
audio: [
|
|
221
|
+
"autoplay",
|
|
222
|
+
"controls",
|
|
223
|
+
"crossorigin",
|
|
224
|
+
"loop",
|
|
225
|
+
"muted",
|
|
226
|
+
"preload",
|
|
227
|
+
"src"
|
|
228
|
+
],
|
|
221
229
|
area: [
|
|
222
230
|
"alt",
|
|
223
231
|
"coords",
|
|
@@ -308,6 +316,7 @@ const HTML_ATTRIBUTES = {
|
|
|
308
316
|
"loading",
|
|
309
317
|
"marginheight",
|
|
310
318
|
"marginwidth",
|
|
319
|
+
"mozallowfullscreen",
|
|
311
320
|
"name",
|
|
312
321
|
"referrerpolicy",
|
|
313
322
|
"sandbox",
|
|
@@ -315,6 +324,7 @@ const HTML_ATTRIBUTES = {
|
|
|
315
324
|
"seamless",
|
|
316
325
|
"src",
|
|
317
326
|
"srcdoc",
|
|
327
|
+
"webkitallowfullscreen",
|
|
318
328
|
"width"
|
|
319
329
|
],
|
|
320
330
|
img: [
|
|
@@ -575,12 +585,19 @@ const HTML_ATTRIBUTES = {
|
|
|
575
585
|
"srclang"
|
|
576
586
|
],
|
|
577
587
|
video: [
|
|
588
|
+
"autoplay",
|
|
589
|
+
"controls",
|
|
590
|
+
"crossorigin",
|
|
591
|
+
"disablepictureinpicture",
|
|
592
|
+
"disableremoteplayback",
|
|
578
593
|
"height",
|
|
594
|
+
"loop",
|
|
595
|
+
"muted",
|
|
579
596
|
"playsinline",
|
|
580
597
|
"poster",
|
|
581
|
-
"
|
|
582
|
-
"
|
|
583
|
-
"
|
|
598
|
+
"preload",
|
|
599
|
+
"src",
|
|
600
|
+
"width"
|
|
584
601
|
],
|
|
585
602
|
svg: [
|
|
586
603
|
"className",
|
|
@@ -986,10 +1003,11 @@ const checkEventFunctions = (key) => {
|
|
|
986
1003
|
const normalizedKey = key.toLowerCase();
|
|
987
1004
|
return DOM_EVENTS.includes(normalizedKey);
|
|
988
1005
|
};
|
|
989
|
-
const filterAttributesByTagName = (tag, props) => {
|
|
1006
|
+
const filterAttributesByTagName = (tag, props, cssProps) => {
|
|
990
1007
|
const filteredObject = {};
|
|
991
1008
|
for (const key in props) {
|
|
992
1009
|
if (Object.prototype.hasOwnProperty.call(props, key)) {
|
|
1010
|
+
if (cssProps && key in cssProps) continue;
|
|
993
1011
|
const isAttribute = checkAttributeByTagName(tag, key);
|
|
994
1012
|
const isEvent = checkEventFunctions(key);
|
|
995
1013
|
if ((0, import_utils.isDefined)(props[key]) && (isAttribute || isEvent)) {
|