attrs-in-props 3.1.2 → 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.
@@ -0,0 +1,1028 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var index_exports = {};
20
+ __export(index_exports, {
21
+ ARIA_ROLES: () => ARIA_ROLES,
22
+ DOM_EVENTS: () => DOM_EVENTS,
23
+ HTML_ATTRIBUTES: () => HTML_ATTRIBUTES,
24
+ checkAttributeByTagName: () => checkAttributeByTagName,
25
+ checkEventFunctions: () => checkEventFunctions,
26
+ executeAttr: () => executeAttr,
27
+ filterAttributesByTagName: () => filterAttributesByTagName
28
+ });
29
+ module.exports = __toCommonJS(index_exports);
30
+ var import_utils = require("@domql/utils");
31
+ const ARIA_ROLES = [
32
+ "alert",
33
+ "alertdialog",
34
+ "application",
35
+ "article",
36
+ "banner",
37
+ "button",
38
+ "cell",
39
+ "checkbox",
40
+ "columnheader",
41
+ "combobox",
42
+ "complementary",
43
+ "contentinfo",
44
+ "definition",
45
+ "dialog",
46
+ "directory",
47
+ "document",
48
+ "feed",
49
+ "figure",
50
+ "form",
51
+ "grid",
52
+ "gridcell",
53
+ "group",
54
+ "heading",
55
+ "img",
56
+ "link",
57
+ "list",
58
+ "listbox",
59
+ "listitem",
60
+ "log",
61
+ "main",
62
+ "marquee",
63
+ "math",
64
+ "menu",
65
+ "menubar",
66
+ "menuitem",
67
+ "menuitemcheckbox",
68
+ "menuitemradio",
69
+ "navigation",
70
+ "none",
71
+ "note",
72
+ "option",
73
+ "presentation",
74
+ "progressbar",
75
+ "radio",
76
+ "radiogroup",
77
+ "region",
78
+ "row",
79
+ "rowgroup",
80
+ "rowheader",
81
+ "scrollbar",
82
+ "search",
83
+ "searchbox",
84
+ "separator",
85
+ "slider",
86
+ "spinbutton",
87
+ "status",
88
+ "switch",
89
+ "tab",
90
+ "table",
91
+ "tablist",
92
+ "tabpanel",
93
+ "term",
94
+ "textbox",
95
+ "timer",
96
+ "toolbar",
97
+ "tooltip",
98
+ "tree",
99
+ "treegrid",
100
+ "treeitem"
101
+ ];
102
+ const HTML_ATTRIBUTES = {
103
+ default: [
104
+ "accesskey",
105
+ "autofocus",
106
+ "class",
107
+ "contenteditable",
108
+ "contextmenu",
109
+ "dir",
110
+ "draggable",
111
+ "hidden",
112
+ "id",
113
+ "lang",
114
+ "part",
115
+ "placeholder",
116
+ "slot",
117
+ "spellcheck",
118
+ "style",
119
+ "tabindex",
120
+ "title",
121
+ "translate",
122
+ "inert",
123
+ "radiogroup",
124
+ "role",
125
+ "about",
126
+ "datatype",
127
+ "inlist",
128
+ "prefix",
129
+ "property",
130
+ "resource",
131
+ "typeof",
132
+ "vocab",
133
+ "autocapitalize",
134
+ "autocorrect",
135
+ "autosave",
136
+ "color",
137
+ "itemprop",
138
+ "itemscope",
139
+ "itemtype",
140
+ "itemid",
141
+ "itemref",
142
+ "results",
143
+ "security",
144
+ "unselectable",
145
+ "is"
146
+ ],
147
+ a: [
148
+ "accesskey",
149
+ "charset",
150
+ "coords",
151
+ "download",
152
+ "href",
153
+ "hreflang",
154
+ "name",
155
+ "rel",
156
+ "rev",
157
+ "shape",
158
+ "target",
159
+ "type"
160
+ ],
161
+ aria: [
162
+ "aria-activedescendant",
163
+ "aria-atomic",
164
+ "aria-autocomplete",
165
+ "aria-checked",
166
+ "aria-colcount",
167
+ "aria-colindex",
168
+ "aria-colspan",
169
+ "aria-controls",
170
+ "aria-current",
171
+ "aria-describedby",
172
+ "aria-details",
173
+ "aria-dropeffect",
174
+ "aria-errormessage",
175
+ "aria-expanded",
176
+ "aria-flowto",
177
+ "aria-grabbed",
178
+ "aria-haspopup",
179
+ "aria-hidden",
180
+ "aria-invalid",
181
+ "aria-keyshortcuts",
182
+ "aria-label",
183
+ "aria-labelledby",
184
+ "aria-level",
185
+ "aria-live",
186
+ "aria-modal",
187
+ "aria-multiline",
188
+ "aria-multiselectable",
189
+ "aria-orientation",
190
+ "aria-owns",
191
+ "aria-placeholder",
192
+ "aria-posinset",
193
+ "aria-pressed",
194
+ "aria-readonly",
195
+ "aria-relevant",
196
+ "aria-required",
197
+ "aria-roledescription",
198
+ "aria-rowcount",
199
+ "aria-rowindex",
200
+ "aria-rowspan",
201
+ "aria-selected",
202
+ "aria-setsize",
203
+ "aria-sort",
204
+ "aria-valuemax",
205
+ "aria-valuemin",
206
+ "aria-valuenow",
207
+ "aria-valuetext"
208
+ ],
209
+ anchor: [
210
+ "download",
211
+ "href",
212
+ "hreflang",
213
+ "media",
214
+ "ping",
215
+ "rel",
216
+ "target",
217
+ "type",
218
+ "referrerpolicy"
219
+ ],
220
+ audio: [
221
+ "autoplay",
222
+ "controls",
223
+ "crossorigin",
224
+ "loop",
225
+ "muted",
226
+ "preload",
227
+ "src"
228
+ ],
229
+ area: [
230
+ "alt",
231
+ "coords",
232
+ "download",
233
+ "href",
234
+ "hreflang",
235
+ "media",
236
+ "referrerpolicy",
237
+ "rel",
238
+ "shape",
239
+ "target",
240
+ "ping"
241
+ ],
242
+ base: [
243
+ "href",
244
+ "target"
245
+ ],
246
+ blockquote: [
247
+ "cite"
248
+ ],
249
+ button: [
250
+ "disabled",
251
+ "form",
252
+ "formaction",
253
+ "formenctype",
254
+ "formmethod",
255
+ "formnovalidate",
256
+ "formtarget",
257
+ "name",
258
+ "type",
259
+ "value"
260
+ ],
261
+ canvas: [
262
+ "height",
263
+ "width"
264
+ ],
265
+ col: [
266
+ "span",
267
+ "width"
268
+ ],
269
+ colgroup: [
270
+ "span"
271
+ ],
272
+ data: [
273
+ "value"
274
+ ],
275
+ details: [
276
+ "open"
277
+ ],
278
+ del: [
279
+ "cite",
280
+ "datetime"
281
+ ],
282
+ dialog: [
283
+ "open"
284
+ ],
285
+ embed: [
286
+ "height",
287
+ "src",
288
+ "type",
289
+ "width"
290
+ ],
291
+ fieldset: [
292
+ "disabled",
293
+ "form",
294
+ "name"
295
+ ],
296
+ form: [
297
+ "acceptcharset",
298
+ "action",
299
+ "autocomplete",
300
+ "enctype",
301
+ "method",
302
+ "name",
303
+ "novalidate",
304
+ "target",
305
+ "rel"
306
+ ],
307
+ html: [
308
+ "manifest"
309
+ ],
310
+ iframe: [
311
+ "allow",
312
+ "allowfullscreen",
313
+ "allowtransparency",
314
+ "frameborder",
315
+ "height",
316
+ "loading",
317
+ "marginheight",
318
+ "marginwidth",
319
+ "mozallowfullscreen",
320
+ "name",
321
+ "referrerpolicy",
322
+ "sandbox",
323
+ "scrolling",
324
+ "seamless",
325
+ "src",
326
+ "srcdoc",
327
+ "webkitallowfullscreen",
328
+ "width"
329
+ ],
330
+ img: [
331
+ "alt",
332
+ "crossorigin",
333
+ "decoding",
334
+ "height",
335
+ "ismap",
336
+ "loading",
337
+ "referrerpolicy",
338
+ "sizes",
339
+ "src",
340
+ "srcset",
341
+ "usemap",
342
+ "width"
343
+ ],
344
+ ins: [
345
+ "cite",
346
+ "datetime"
347
+ ],
348
+ input: [
349
+ "accept",
350
+ "alt",
351
+ "autocomplete",
352
+ "capture",
353
+ "checked",
354
+ "crossorigin",
355
+ "disabled",
356
+ "form",
357
+ "formaction",
358
+ "formenctype",
359
+ "formmethod",
360
+ "formnovalidate",
361
+ "formtarget",
362
+ "height",
363
+ "indeterminate",
364
+ "list",
365
+ "max",
366
+ "maxlength",
367
+ "min",
368
+ "minlength",
369
+ "multiple",
370
+ "name",
371
+ "pattern",
372
+ "placeholder",
373
+ "readonly",
374
+ "required",
375
+ "size",
376
+ "src",
377
+ "step",
378
+ "type",
379
+ "value",
380
+ "width"
381
+ ],
382
+ keygen: [
383
+ "challenge",
384
+ "disabled",
385
+ "form",
386
+ "keytype",
387
+ "keyparams",
388
+ "name"
389
+ ],
390
+ label: [
391
+ "form",
392
+ "for"
393
+ ],
394
+ li: [
395
+ "value"
396
+ ],
397
+ link: [
398
+ "as",
399
+ "crossorigin",
400
+ "href",
401
+ "hreflang",
402
+ "integrity",
403
+ "media",
404
+ "imagesrcset",
405
+ "imagesizes",
406
+ "referrerpolicy",
407
+ "rel",
408
+ "sizes",
409
+ "type",
410
+ "charset"
411
+ ],
412
+ map: [
413
+ "name"
414
+ ],
415
+ menu: [
416
+ "type"
417
+ ],
418
+ media: [
419
+ "autoplay",
420
+ "controls",
421
+ "currenttime",
422
+ "defaultmuted",
423
+ "defaultplaybackrate",
424
+ "loop",
425
+ "mediagroup",
426
+ "muted",
427
+ "playsinline",
428
+ "preload",
429
+ "src",
430
+ "volume"
431
+ ],
432
+ meta: [
433
+ "charset",
434
+ "content",
435
+ "http-equiv",
436
+ "name",
437
+ "media"
438
+ ],
439
+ meter: [
440
+ "form",
441
+ "high",
442
+ "low",
443
+ "max",
444
+ "min",
445
+ "optimum",
446
+ "value"
447
+ ],
448
+ quote: [
449
+ "cite"
450
+ ],
451
+ object: [
452
+ "classid",
453
+ "data",
454
+ "form",
455
+ "height",
456
+ "name",
457
+ "type",
458
+ "usemap",
459
+ "width",
460
+ "wmode"
461
+ ],
462
+ ol: [
463
+ "reversed",
464
+ "start",
465
+ "type"
466
+ ],
467
+ optgroup: [
468
+ "disabled",
469
+ "label"
470
+ ],
471
+ option: [
472
+ "disabled",
473
+ "label",
474
+ "selected",
475
+ "value"
476
+ ],
477
+ output: [
478
+ "form",
479
+ "for",
480
+ "name"
481
+ ],
482
+ param: [
483
+ "name",
484
+ "value"
485
+ ],
486
+ progress: [
487
+ "max",
488
+ "value"
489
+ ],
490
+ slot: [
491
+ "name"
492
+ ],
493
+ script: [
494
+ "async",
495
+ "charset",
496
+ "crossorigin",
497
+ "defer",
498
+ "integrity",
499
+ "nomodule",
500
+ "nonce",
501
+ "referrerpolicy",
502
+ "src",
503
+ "type"
504
+ ],
505
+ select: [
506
+ "autocomplete",
507
+ "disabled",
508
+ "form",
509
+ "multiple",
510
+ "name",
511
+ "required",
512
+ "size",
513
+ "value",
514
+ "onchange"
515
+ ],
516
+ source: [
517
+ "height",
518
+ "media",
519
+ "sizes",
520
+ "src",
521
+ "srcset",
522
+ "type",
523
+ "width"
524
+ ],
525
+ style: [
526
+ "media",
527
+ "nonce",
528
+ "scoped",
529
+ "type"
530
+ ],
531
+ table: [
532
+ "align",
533
+ "bgcolor",
534
+ "border",
535
+ "cellpadding",
536
+ "cellspacing",
537
+ "frame",
538
+ "rules",
539
+ "summary",
540
+ "width"
541
+ ],
542
+ textarea: [
543
+ "autocomplete",
544
+ "cols",
545
+ "dirname",
546
+ "disabled",
547
+ "form",
548
+ "maxlength",
549
+ "minlength",
550
+ "name",
551
+ "placeholder",
552
+ "readonly",
553
+ "required",
554
+ "rows",
555
+ "value",
556
+ "wrap"
557
+ ],
558
+ td: [
559
+ "align",
560
+ "colspan",
561
+ "headers",
562
+ "rowspan",
563
+ "scope",
564
+ "abbr",
565
+ "height",
566
+ "width",
567
+ "valign"
568
+ ],
569
+ th: [
570
+ "align",
571
+ "colspan",
572
+ "headers",
573
+ "rowspan",
574
+ "scope",
575
+ "abbr"
576
+ ],
577
+ time: [
578
+ "datetime"
579
+ ],
580
+ track: [
581
+ "default",
582
+ "kind",
583
+ "label",
584
+ "src",
585
+ "srclang"
586
+ ],
587
+ video: [
588
+ "autoplay",
589
+ "controls",
590
+ "crossorigin",
591
+ "disablepictureinpicture",
592
+ "disableremoteplayback",
593
+ "height",
594
+ "loop",
595
+ "muted",
596
+ "playsinline",
597
+ "poster",
598
+ "preload",
599
+ "src",
600
+ "width"
601
+ ],
602
+ svg: [
603
+ "className",
604
+ "class",
605
+ "color",
606
+ "height",
607
+ "id",
608
+ "lang",
609
+ "max",
610
+ "media",
611
+ "method",
612
+ "min",
613
+ "name",
614
+ "style",
615
+ "target",
616
+ "type",
617
+ "width",
618
+ // Other HTML properties supported by SVG elements in browsers
619
+ "role",
620
+ "tabindex",
621
+ "crossorigin",
622
+ // SVG Specific attributes
623
+ "accent-height",
624
+ "accumulate",
625
+ "additive",
626
+ "alignment-baseline",
627
+ "allowReorder",
628
+ "alphabetic",
629
+ "amplitude",
630
+ "arabic-form",
631
+ "ascent",
632
+ "attributeName",
633
+ "attributeType",
634
+ "autoReverse",
635
+ "azimuth",
636
+ "baseFrequency",
637
+ "baseline-shift",
638
+ "baseProfile",
639
+ "bbox",
640
+ "begin",
641
+ "bias",
642
+ "by",
643
+ "calcMode",
644
+ "cap-height",
645
+ "clip",
646
+ "clip-path",
647
+ "clipPathUnits",
648
+ "clip-rule",
649
+ "color-interpolation",
650
+ "color-interpolation-filters",
651
+ "color-profile",
652
+ "color-rendering",
653
+ "contentScriptType",
654
+ "contentStyleType",
655
+ "cursor",
656
+ "cx",
657
+ "cy",
658
+ "d",
659
+ "decelerate",
660
+ "descent",
661
+ "diffuseConstant",
662
+ "direction",
663
+ "display",
664
+ "divisor",
665
+ "dominant-baseline",
666
+ "dur",
667
+ "dx",
668
+ "dy",
669
+ "edgeMode",
670
+ "elevation",
671
+ "enable-background",
672
+ "end",
673
+ "exponent",
674
+ "externalResourcesRequired",
675
+ "fill",
676
+ "fill-opacity",
677
+ "fill-rule",
678
+ "filter",
679
+ "filterRes",
680
+ "filterUnits",
681
+ "flood-color",
682
+ "flood-opacity",
683
+ "focusable",
684
+ "font-family",
685
+ "font-size",
686
+ "font-size-adjust",
687
+ "font-stretch",
688
+ "font-style",
689
+ "font-variant",
690
+ "font-weight",
691
+ "format",
692
+ "from",
693
+ "fx",
694
+ "fy",
695
+ "g1",
696
+ "g2",
697
+ "glyph-name",
698
+ "glyph-orientation-horizontal",
699
+ "glyph-orientation-vertical",
700
+ "glyphRef",
701
+ "gradientTransform",
702
+ "gradientUnits",
703
+ "hanging",
704
+ "href",
705
+ "horiz-adv-x",
706
+ "horiz-origin-x",
707
+ "ideographic",
708
+ "image-rendering",
709
+ "in2",
710
+ "in",
711
+ "intercept",
712
+ "k1",
713
+ "k2",
714
+ "k3",
715
+ "k4",
716
+ "k",
717
+ "kernelMatrix",
718
+ "kernelUnitLength",
719
+ "kerning",
720
+ "keyPoints",
721
+ "keySplines",
722
+ "keyTimes",
723
+ "lengthAdjust",
724
+ "letter-spacing",
725
+ "lighting-color",
726
+ "limitingConeAngle",
727
+ "local",
728
+ "marker-end",
729
+ "markerHeight",
730
+ "marker-mid",
731
+ "marker-start",
732
+ "markerUnits",
733
+ "markerWidth",
734
+ "mask",
735
+ "maskContentUnits",
736
+ "maskUnits",
737
+ "mathematical",
738
+ "mode",
739
+ "numOctaves",
740
+ "offset",
741
+ "opacity",
742
+ "operator",
743
+ "order",
744
+ "orient",
745
+ "orientation",
746
+ "origin",
747
+ "overflow",
748
+ "overline-position",
749
+ "overline-thickness",
750
+ "paint-order",
751
+ "panose-1",
752
+ "path",
753
+ "pathLength",
754
+ "patternContentUnits",
755
+ "patternTransform",
756
+ "patternUnits",
757
+ "pointer-events",
758
+ "points",
759
+ "pointsAtX",
760
+ "pointsAtY",
761
+ "pointsAtZ",
762
+ "preserveAlpha",
763
+ "preserveAspectRatio",
764
+ "primitiveUnits",
765
+ "r",
766
+ "radius",
767
+ "refX",
768
+ "refY",
769
+ "rendering-intent",
770
+ "repeatCount",
771
+ "repeatDur",
772
+ "requiredExtensions",
773
+ "requiredFeatures",
774
+ "restart",
775
+ "result",
776
+ "rotate",
777
+ "rx",
778
+ "ry",
779
+ "scale",
780
+ "seed",
781
+ "shape-rendering",
782
+ "slope",
783
+ "spacing",
784
+ "specularConstant",
785
+ "specularExponent",
786
+ "speed",
787
+ "spreadMethod",
788
+ "startOffset",
789
+ "stdDeviation",
790
+ "stemh",
791
+ "stemv",
792
+ "stitchTiles",
793
+ "stop-color",
794
+ "stop-opacity",
795
+ "strikethrough-position",
796
+ "strikethrough-thickness",
797
+ "string",
798
+ "stroke",
799
+ "stroke-dasharray",
800
+ "stroke-dashoffset",
801
+ "stroke-linecap",
802
+ "stroke-linejoin",
803
+ "stroke-miterlimit",
804
+ "stroke-opacity",
805
+ "stroke-width",
806
+ "surfaceScale",
807
+ "systemLanguage",
808
+ "tableValues",
809
+ "targetX",
810
+ "targetY",
811
+ "text-anchor",
812
+ "text-decoration",
813
+ "textLength",
814
+ "text-rendering",
815
+ "to",
816
+ "transform",
817
+ "u1",
818
+ "u2",
819
+ "underline-position",
820
+ "underline-thickness",
821
+ "unicode",
822
+ "unicode-bidi",
823
+ "unicode-range",
824
+ "units-per-em",
825
+ "v-alphabetic",
826
+ "values",
827
+ "vector-effect",
828
+ "version",
829
+ "vert-adv-y",
830
+ "vert-origin-x",
831
+ "vert-origin-y",
832
+ "v-hanging",
833
+ "v-ideographic",
834
+ "viewBox",
835
+ "viewTarget",
836
+ "visibility",
837
+ "v-mathematical",
838
+ "widths",
839
+ "word-spacing",
840
+ "writing-mode",
841
+ "x1",
842
+ "x2",
843
+ "x",
844
+ "xChannelSelector",
845
+ "x-height",
846
+ "xlink:actuate",
847
+ "xlink:arcrole",
848
+ "xlink:href",
849
+ "xlink:role",
850
+ "xlink:show",
851
+ "xlink:title",
852
+ "xlink:type",
853
+ "xml:base",
854
+ "xml:lang",
855
+ "xmlns",
856
+ "xmlns:xlink",
857
+ "xml:space",
858
+ "y1",
859
+ "y2",
860
+ "y",
861
+ "yChannelSelector",
862
+ "z",
863
+ "zoomAndPan"
864
+ ]
865
+ };
866
+ const DOM_EVENTS = [
867
+ // Clipboard Events
868
+ "oncopy",
869
+ "oncut",
870
+ "onpaste",
871
+ // Composition Events
872
+ "oncompositionend",
873
+ "oncompositionstart",
874
+ "oncompositionupdate",
875
+ // Focus Events
876
+ "onfocus",
877
+ "onfocusin",
878
+ "onfocusout",
879
+ "onblur",
880
+ // Form Events
881
+ "onchange",
882
+ "onbeforeinput",
883
+ "oninput",
884
+ "onreset",
885
+ "onsubmit",
886
+ "oninvalid",
887
+ "onformdata",
888
+ // Image Events
889
+ "onload",
890
+ "onerror",
891
+ // also a Media Event
892
+ // Detail Events
893
+ "ontoggle",
894
+ // Keyboard Events
895
+ "onkeydown",
896
+ "onkeypress",
897
+ "onkeyup",
898
+ // Media Events
899
+ "onabort",
900
+ "oncanplay",
901
+ "oncanplaythrough",
902
+ "oncuechange",
903
+ "ondurationchange",
904
+ "onemptied",
905
+ "onencrypted",
906
+ "onended",
907
+ "onloadeddata",
908
+ "onloadedmetadata",
909
+ "onloadstart",
910
+ "onpause",
911
+ "onplay",
912
+ "onplaying",
913
+ "onprogress",
914
+ "onratechange",
915
+ "onseeked",
916
+ "onseeking",
917
+ "onstalled",
918
+ "onsuspend",
919
+ "ontimeupdate",
920
+ "onvolumechange",
921
+ "onwaiting",
922
+ // MouseEvents
923
+ "onauxclick",
924
+ "onclick",
925
+ "oncontextmenu",
926
+ "ondblclick",
927
+ "ondrag",
928
+ "ondragend",
929
+ "ondragenter",
930
+ "ondragexit",
931
+ "ondragleave",
932
+ "ondragover",
933
+ "ondragstart",
934
+ "ondrop",
935
+ "onmousedown",
936
+ "onmouseenter",
937
+ "onmouseleave",
938
+ "onmousemove",
939
+ "onmouseout",
940
+ "onmouseover",
941
+ "onmouseup",
942
+ // Selection Events
943
+ "onselect",
944
+ "onselectionchange",
945
+ "onselectstart",
946
+ // Touch Events
947
+ "ontouchcancel",
948
+ "ontouchend",
949
+ "ontouchmove",
950
+ "ontouchstart",
951
+ // Pointer Events
952
+ "ongotpointercapture",
953
+ "onpointercancel",
954
+ "onpointerdown",
955
+ "onpointerenter",
956
+ "onpointerleave",
957
+ "onpointermove",
958
+ "onpointerout",
959
+ "onpointerover",
960
+ "onpointerup",
961
+ "onlostpointercapture",
962
+ // UI Events
963
+ "onscroll",
964
+ "onresize",
965
+ // Wheel Events
966
+ "onwheel",
967
+ // Animation Events
968
+ "onanimationstart",
969
+ "onanimationend",
970
+ "onanimationiteration",
971
+ // Transition Events
972
+ "ontransitionstart",
973
+ "ontransitionrun",
974
+ "ontransitionend",
975
+ "ontransitioncancel",
976
+ // Svelte Transition Events
977
+ "onoutrostart",
978
+ "onoutroend",
979
+ "onintrostart",
980
+ "onintroend",
981
+ // Message Events
982
+ "onmessage",
983
+ "onmessageerror",
984
+ // Document Events
985
+ "onvisibilitychange",
986
+ // Global Events
987
+ "oncancel",
988
+ "onclose",
989
+ "onfullscreenchange",
990
+ "onfullscreenerror"
991
+ ];
992
+ const checkAttributeByTagName = (tag, attribute) => {
993
+ if (Object.prototype.hasOwnProperty.call(HTML_ATTRIBUTES, tag)) {
994
+ const attributes = HTML_ATTRIBUTES[tag];
995
+ return attributes.includes(attribute) || attributes.includes("default");
996
+ } else {
997
+ const defaultAttributes = HTML_ATTRIBUTES.default;
998
+ return defaultAttributes.includes(attribute);
999
+ }
1000
+ };
1001
+ const checkEventFunctions = (key) => {
1002
+ if (!(0, import_utils.isString)(key)) return false;
1003
+ const normalizedKey = key.toLowerCase();
1004
+ return DOM_EVENTS.includes(normalizedKey);
1005
+ };
1006
+ const filterAttributesByTagName = (tag, props, cssProps) => {
1007
+ const filteredObject = {};
1008
+ for (const key in props) {
1009
+ if (Object.prototype.hasOwnProperty.call(props, key)) {
1010
+ if (cssProps && key in cssProps) continue;
1011
+ const isAttribute = checkAttributeByTagName(tag, key);
1012
+ const isEvent = checkEventFunctions(key);
1013
+ if ((0, import_utils.isDefined)(props[key]) && (isAttribute || isEvent)) {
1014
+ filteredObject[key] = props[key];
1015
+ }
1016
+ }
1017
+ }
1018
+ return filteredObject;
1019
+ };
1020
+ const executeAttr = (elem, element) => {
1021
+ const attrObj = {};
1022
+ if (elem.attr) {
1023
+ for (const attrProp in elem.attr) {
1024
+ attrObj[attrProp] = elem.attr[attrProp](element, element.state, element.context);
1025
+ }
1026
+ }
1027
+ return attrObj;
1028
+ };