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/index.js
CHANGED
|
@@ -197,7 +197,13 @@ export const HTML_ATTRIBUTES = {
|
|
|
197
197
|
],
|
|
198
198
|
|
|
199
199
|
audio: [
|
|
200
|
-
|
|
200
|
+
'autoplay',
|
|
201
|
+
'controls',
|
|
202
|
+
'crossorigin',
|
|
203
|
+
'loop',
|
|
204
|
+
'muted',
|
|
205
|
+
'preload',
|
|
206
|
+
'src'
|
|
201
207
|
],
|
|
202
208
|
|
|
203
209
|
area: [
|
|
@@ -305,6 +311,7 @@ export const HTML_ATTRIBUTES = {
|
|
|
305
311
|
'loading',
|
|
306
312
|
'marginheight',
|
|
307
313
|
'marginwidth',
|
|
314
|
+
'mozallowfullscreen',
|
|
308
315
|
'name',
|
|
309
316
|
'referrerpolicy',
|
|
310
317
|
'sandbox',
|
|
@@ -312,6 +319,7 @@ export const HTML_ATTRIBUTES = {
|
|
|
312
319
|
'seamless',
|
|
313
320
|
'src',
|
|
314
321
|
'srcdoc',
|
|
322
|
+
'webkitallowfullscreen',
|
|
315
323
|
'width'
|
|
316
324
|
],
|
|
317
325
|
|
|
@@ -605,12 +613,19 @@ export const HTML_ATTRIBUTES = {
|
|
|
605
613
|
],
|
|
606
614
|
|
|
607
615
|
video: [
|
|
616
|
+
'autoplay',
|
|
617
|
+
'controls',
|
|
618
|
+
'crossorigin',
|
|
619
|
+
'disablepictureinpicture',
|
|
620
|
+
'disableremoteplayback',
|
|
608
621
|
'height',
|
|
622
|
+
'loop',
|
|
623
|
+
'muted',
|
|
609
624
|
'playsinline',
|
|
610
625
|
'poster',
|
|
611
|
-
'
|
|
612
|
-
'
|
|
613
|
-
'
|
|
626
|
+
'preload',
|
|
627
|
+
'src',
|
|
628
|
+
'width'
|
|
614
629
|
],
|
|
615
630
|
|
|
616
631
|
svg: [
|
|
@@ -1041,11 +1056,12 @@ export const checkEventFunctions = (key) => {
|
|
|
1041
1056
|
return DOM_EVENTS.includes(normalizedKey)
|
|
1042
1057
|
}
|
|
1043
1058
|
|
|
1044
|
-
export const filterAttributesByTagName = (tag, props) => {
|
|
1059
|
+
export const filterAttributesByTagName = (tag, props, cssProps) => {
|
|
1045
1060
|
const filteredObject = {}
|
|
1046
1061
|
|
|
1047
1062
|
for (const key in props) {
|
|
1048
1063
|
if (Object.prototype.hasOwnProperty.call(props, key)) {
|
|
1064
|
+
if (cssProps && key in cssProps) continue
|
|
1049
1065
|
const isAttribute = checkAttributeByTagName(tag, key)
|
|
1050
1066
|
const isEvent = checkEventFunctions(key)
|
|
1051
1067
|
if (isDefined(props[key]) && (isAttribute || isEvent)) {
|
package/package.json
CHANGED
|
@@ -2,15 +2,41 @@
|
|
|
2
2
|
"name": "attrs-in-props",
|
|
3
3
|
"description": "Utilize props as attributes",
|
|
4
4
|
"author": "symbo.ls",
|
|
5
|
-
"version": "3.2.
|
|
5
|
+
"version": "3.2.7",
|
|
6
6
|
"repository": "https://github.com/symbo-ls/smbls",
|
|
7
7
|
"type": "module",
|
|
8
|
-
"module": "index.js",
|
|
9
|
-
"unpkg": "dist/iife/index.js",
|
|
10
|
-
"jsdelivr": "dist/iife/index.js",
|
|
11
|
-
"main": "index.js",
|
|
8
|
+
"module": "./dist/esm/index.js",
|
|
9
|
+
"unpkg": "./dist/iife/index.js",
|
|
10
|
+
"jsdelivr": "./dist/iife/index.js",
|
|
11
|
+
"main": "./dist/cjs/index.js",
|
|
12
12
|
"gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681",
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@domql/utils": "^3.2.3"
|
|
15
|
+
},
|
|
16
|
+
"source": "index.js",
|
|
17
|
+
"browser": "./dist/iife/index.js",
|
|
18
|
+
"sideEffects": false,
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"import": "./dist/esm/index.js",
|
|
22
|
+
"require": "./dist/cjs/index.js",
|
|
23
|
+
"browser": "./dist/iife/index.js",
|
|
24
|
+
"default": "./dist/esm/index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"*.js"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build:esm": "cross-env NODE_ENV=$NODE_ENV esbuild *.js --target=es2020 --format=esm --outdir=dist/esm --define:process.env.NODE_ENV=process.env.NODE_ENV",
|
|
33
|
+
"build:cjs": "cross-env NODE_ENV=$NODE_ENV esbuild *.js --target=node18 --format=cjs --outdir=dist/cjs --define:process.env.NODE_ENV=process.env.NODE_ENV",
|
|
34
|
+
"build:iife": "cross-env NODE_ENV=$NODE_ENV esbuild index.js --bundle --target=es2020 --format=iife --global-name=AttrsInProps --outfile=dist/iife/index.js --define:process.env.NODE_ENV=process.env.NODE_ENV",
|
|
35
|
+
"build": "node ../../build/build.js",
|
|
36
|
+
"copy:package:cjs": "cp ../../build/package-cjs.json dist/cjs/package.json",
|
|
37
|
+
"prepublish": "npm run build && npm run copy:package:cjs"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@babel/core": "^7.29.0"
|
|
15
41
|
}
|
|
16
42
|
}
|
package/dist/cjs/package.json
DELETED