@k37z3r/jbase 2.0.0

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.
Files changed (136) hide show
  1. package/LICENSE +621 -0
  2. package/README.md +124 -0
  3. package/dist/browser.d.ts +30 -0
  4. package/dist/browser.d.ts.map +1 -0
  5. package/dist/browser.js +29 -0
  6. package/dist/browser.js.map +1 -0
  7. package/dist/core.d.ts +42 -0
  8. package/dist/core.d.ts.map +1 -0
  9. package/dist/core.js +78 -0
  10. package/dist/core.js.map +1 -0
  11. package/dist/index.cjs +2150 -0
  12. package/dist/index.d.ts +1158 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +100 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/index.mjs +2118 -0
  17. package/dist/jbase.browser.js +1906 -0
  18. package/dist/jbase.js +1898 -0
  19. package/dist/jbase.min.js +9 -0
  20. package/dist/modules/css/classes.d.ts +61 -0
  21. package/dist/modules/css/classes.d.ts.map +1 -0
  22. package/dist/modules/css/classes.js +88 -0
  23. package/dist/modules/css/classes.js.map +1 -0
  24. package/dist/modules/css/index.d.ts +30 -0
  25. package/dist/modules/css/index.d.ts.map +1 -0
  26. package/dist/modules/css/index.js +33 -0
  27. package/dist/modules/css/index.js.map +1 -0
  28. package/dist/modules/css/styles.d.ts +31 -0
  29. package/dist/modules/css/styles.d.ts.map +1 -0
  30. package/dist/modules/css/styles.js +49 -0
  31. package/dist/modules/css/styles.js.map +1 -0
  32. package/dist/modules/data/arrays.d.ts +131 -0
  33. package/dist/modules/data/arrays.d.ts.map +1 -0
  34. package/dist/modules/data/arrays.js +177 -0
  35. package/dist/modules/data/arrays.js.map +1 -0
  36. package/dist/modules/data/index.d.ts +29 -0
  37. package/dist/modules/data/index.d.ts.map +1 -0
  38. package/dist/modules/data/index.js +33 -0
  39. package/dist/modules/data/index.js.map +1 -0
  40. package/dist/modules/data/objects.d.ts +108 -0
  41. package/dist/modules/data/objects.d.ts.map +1 -0
  42. package/dist/modules/data/objects.js +168 -0
  43. package/dist/modules/data/objects.js.map +1 -0
  44. package/dist/modules/data/types.d.ts +35 -0
  45. package/dist/modules/data/types.d.ts.map +1 -0
  46. package/dist/modules/data/types.js +43 -0
  47. package/dist/modules/data/types.js.map +1 -0
  48. package/dist/modules/dom/attributes.d.ts +42 -0
  49. package/dist/modules/dom/attributes.d.ts.map +1 -0
  50. package/dist/modules/dom/attributes.js +69 -0
  51. package/dist/modules/dom/attributes.js.map +1 -0
  52. package/dist/modules/dom/content.d.ts +39 -0
  53. package/dist/modules/dom/content.d.ts.map +1 -0
  54. package/dist/modules/dom/content.js +63 -0
  55. package/dist/modules/dom/content.js.map +1 -0
  56. package/dist/modules/dom/index.d.ts +78 -0
  57. package/dist/modules/dom/index.d.ts.map +1 -0
  58. package/dist/modules/dom/index.js +48 -0
  59. package/dist/modules/dom/index.js.map +1 -0
  60. package/dist/modules/dom/manipulation.d.ts +159 -0
  61. package/dist/modules/dom/manipulation.d.ts.map +1 -0
  62. package/dist/modules/dom/manipulation.js +343 -0
  63. package/dist/modules/dom/manipulation.js.map +1 -0
  64. package/dist/modules/dom/states.d.ts +50 -0
  65. package/dist/modules/dom/states.d.ts.map +1 -0
  66. package/dist/modules/dom/states.js +89 -0
  67. package/dist/modules/dom/states.js.map +1 -0
  68. package/dist/modules/dom/traversal.d.ts +246 -0
  69. package/dist/modules/dom/traversal.d.ts.map +1 -0
  70. package/dist/modules/dom/traversal.js +527 -0
  71. package/dist/modules/dom/traversal.js.map +1 -0
  72. package/dist/modules/effects/fade.d.ts +58 -0
  73. package/dist/modules/effects/fade.d.ts.map +1 -0
  74. package/dist/modules/effects/fade.js +104 -0
  75. package/dist/modules/effects/fade.js.map +1 -0
  76. package/dist/modules/effects/index.d.ts +40 -0
  77. package/dist/modules/effects/index.d.ts.map +1 -0
  78. package/dist/modules/effects/index.js +38 -0
  79. package/dist/modules/effects/index.js.map +1 -0
  80. package/dist/modules/effects/slide.d.ts +58 -0
  81. package/dist/modules/effects/slide.d.ts.map +1 -0
  82. package/dist/modules/effects/slide.js +103 -0
  83. package/dist/modules/effects/slide.js.map +1 -0
  84. package/dist/modules/effects/vertical.d.ts +58 -0
  85. package/dist/modules/effects/vertical.d.ts.map +1 -0
  86. package/dist/modules/effects/vertical.js +118 -0
  87. package/dist/modules/effects/vertical.js.map +1 -0
  88. package/dist/modules/events/binding.d.ts +47 -0
  89. package/dist/modules/events/binding.d.ts.map +1 -0
  90. package/dist/modules/events/binding.js +60 -0
  91. package/dist/modules/events/binding.js.map +1 -0
  92. package/dist/modules/events/form.d.ts +72 -0
  93. package/dist/modules/events/form.d.ts.map +1 -0
  94. package/dist/modules/events/form.js +106 -0
  95. package/dist/modules/events/form.js.map +1 -0
  96. package/dist/modules/events/index.d.ts +62 -0
  97. package/dist/modules/events/index.d.ts.map +1 -0
  98. package/dist/modules/events/index.js +53 -0
  99. package/dist/modules/events/index.js.map +1 -0
  100. package/dist/modules/events/keyboard.d.ts +65 -0
  101. package/dist/modules/events/keyboard.d.ts.map +1 -0
  102. package/dist/modules/events/keyboard.js +83 -0
  103. package/dist/modules/events/keyboard.js.map +1 -0
  104. package/dist/modules/events/lifecycle.d.ts +28 -0
  105. package/dist/modules/events/lifecycle.d.ts.map +1 -0
  106. package/dist/modules/events/lifecycle.js +40 -0
  107. package/dist/modules/events/lifecycle.js.map +1 -0
  108. package/dist/modules/events/mouse.d.ts +120 -0
  109. package/dist/modules/events/mouse.d.ts.map +1 -0
  110. package/dist/modules/events/mouse.js +172 -0
  111. package/dist/modules/events/mouse.js.map +1 -0
  112. package/dist/modules/events/touch.d.ts +61 -0
  113. package/dist/modules/events/touch.d.ts.map +1 -0
  114. package/dist/modules/events/touch.js +74 -0
  115. package/dist/modules/events/touch.js.map +1 -0
  116. package/dist/modules/http/get.d.ts +47 -0
  117. package/dist/modules/http/get.d.ts.map +1 -0
  118. package/dist/modules/http/get.js +65 -0
  119. package/dist/modules/http/get.js.map +1 -0
  120. package/dist/modules/http/index.d.ts +37 -0
  121. package/dist/modules/http/index.d.ts.map +1 -0
  122. package/dist/modules/http/index.js +42 -0
  123. package/dist/modules/http/index.js.map +1 -0
  124. package/dist/modules/http/post.d.ts +36 -0
  125. package/dist/modules/http/post.d.ts.map +1 -0
  126. package/dist/modules/http/post.js +54 -0
  127. package/dist/modules/http/post.js.map +1 -0
  128. package/dist/types.d.ts +61 -0
  129. package/dist/types.d.ts.map +1 -0
  130. package/dist/types.js +15 -0
  131. package/dist/types.js.map +1 -0
  132. package/dist/utils.d.ts +51 -0
  133. package/dist/utils.d.ts.map +1 -0
  134. package/dist/utils.js +71 -0
  135. package/dist/utils.js.map +1 -0
  136. package/package.json +58 -0
@@ -0,0 +1,120 @@
1
+ /**
2
+ * @file src/modules/events/mouse.ts
3
+ * @version 2.0.0
4
+ * @since 2.0.0
5
+ * @license GPL-3.0-or-later
6
+ * @copyright Sven Minio 2026
7
+ * @author Sven Minio <https://sven-minio.de>
8
+ * @category Events
9
+ * @description
10
+ * * πŸ‡¬πŸ‡§: Methods for handling mouse events (click, dblclick, hover, mouseenter, mouseleave).
11
+ * * πŸ‡©πŸ‡ͺ: Methoden zur Behandlung von Maus-Events (click, dblclick, hover, mouseenter, mouseleave).
12
+ * @requires ../../core
13
+ * * πŸ‡¬πŸ‡§: Depends on the core jBase class for type definitions.
14
+ * * πŸ‡©πŸ‡ͺ: HΓ€ngt von der Core-jBase-Klasse fΓΌr Typ-Definitionen ab.
15
+ */
16
+ import { jBase } from '../../core';
17
+ /**
18
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'click' event or triggers the event manually.
19
+ * - With handler: Registers the function.
20
+ * - Without handler: Simulates a click on all selected elements.
21
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'click'-Ereignis oder lΓΆst das Ereignis manuell aus.
22
+ * - Mit Handler: Registriert die Funktion.
23
+ * - Ohne Handler: Simuliert einen Klick auf alle selektierten Elemente.
24
+ * @param handler
25
+ * * πŸ‡¬πŸ‡§: (Optional) The callback function executed on click.
26
+ * * πŸ‡©πŸ‡ͺ: (Optional) Die Callback-Funktion, die beim Klick ausgefΓΌhrt wird.
27
+ * @returns
28
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
29
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
30
+ */
31
+ export declare function click(this: jBase, handler?: (event: Event) => void): jBase;
32
+ /**
33
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mousemove' event. Fires continuously while the pointer moves inside the element.
34
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mousemove'-Ereignis. Feuert kontinuierlich, solange der Mauszeiger innerhalb des Elements bewegt wird.
35
+ * @param handler
36
+ * * πŸ‡¬πŸ‡§: The callback function.
37
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
38
+ * @returns
39
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
40
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
41
+ */
42
+ export declare function mousemove(this: jBase, handler: (event: MouseEvent) => void): jBase;
43
+ /**
44
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mouseleave' event. Fires when the pointer leaves the element (does not bubble).
45
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mouseleave'-Ereignis. Feuert, wenn der Mauszeiger das Element verlΓ€sst (bubbelt nicht).
46
+ * @param handler
47
+ * * πŸ‡¬πŸ‡§: The callback function.
48
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
49
+ * @returns
50
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
51
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
52
+ */
53
+ export declare function mouseleave(this: jBase, handler: (event: MouseEvent) => void): jBase;
54
+ /**
55
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mouseenter' event. Fires when the pointer enters the element (does not bubble).
56
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mouseenter'-Ereignis. Feuert, wenn der Mauszeiger das Element betritt (bubbelt nicht).
57
+ * @param handler
58
+ * * πŸ‡¬πŸ‡§: The callback function.
59
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
60
+ * @returns
61
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
62
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
63
+ */
64
+ export declare function mouseenter(this: jBase, handler: (event: MouseEvent) => void): jBase;
65
+ /**
66
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mousedown' event. Fires as soon as a mouse button is pressed over the element.
67
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mousedown'-Ereignis. Feuert, sobald eine Maustaste ΓΌber dem Element gedrΓΌckt wird.
68
+ * @param handler
69
+ * * πŸ‡¬πŸ‡§: The callback function.
70
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
71
+ * @returns
72
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
73
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
74
+ */
75
+ export declare function mousedown(this: jBase, handler: (event: MouseEvent) => void): jBase;
76
+ /**
77
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mouseup' event. Fires when a mouse button is released over the element.
78
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mouseup'-Ereignis. Feuert, wenn eine Maustaste ΓΌber dem Element losgelassen wird.
79
+ * @param handler
80
+ * * πŸ‡¬πŸ‡§: The callback function.
81
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
82
+ * @returns
83
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
84
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
85
+ */
86
+ export declare function mouseup(this: jBase, handler: (event: MouseEvent) => void): jBase;
87
+ /**
88
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'dblclick' event or triggers it manually.
89
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'dblclick'-Ereignis oder lΓΆst das Ereignis manuell aus.
90
+ * @param handler
91
+ * * πŸ‡¬πŸ‡§: (Optional) The callback function.
92
+ * * πŸ‡©πŸ‡ͺ: (Optional) Die Callback-Funktion.
93
+ * @returns
94
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
95
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
96
+ */
97
+ export declare function dblclick(this: jBase, handler?: (event: MouseEvent) => void): jBase;
98
+ /**
99
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mouseout' event. Fires when the pointer leaves the element OR one of its children (bubbles).
100
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mouseout'-Ereignis. Feuert, wenn der Mauszeiger das Element ODER eines seiner Kinder verlΓ€sst (bubbelt).
101
+ * @param handler
102
+ * * πŸ‡¬πŸ‡§: The callback function.
103
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
104
+ * @returns
105
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
106
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
107
+ */
108
+ export declare function mouseout(this: jBase, handler: (event: MouseEvent) => void): jBase;
109
+ /**
110
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mouseover' event. Fires when the pointer enters the element OR one of its children (bubbles).
111
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mouseover'-Ereignis. Feuert, wenn der Mauszeiger das Element ODER eines seiner Kinder betritt (bubbelt).
112
+ * @param handler
113
+ * * πŸ‡¬πŸ‡§: The callback function.
114
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
115
+ * @returns
116
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
117
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
118
+ */
119
+ export declare function mouseover(this: jBase, handler: (event: MouseEvent) => void): jBase;
120
+ //# sourceMappingURL=mouse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mouse.d.ts","sourceRoot":"","sources":["../../../src/modules/events/mouse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,KAAK,CAS1E;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,KAAK,CAElF;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,KAAK,CAEnF;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,KAAK,CAEnF;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,KAAK,CAElF;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,KAAK,CAEhF;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,KAAK,CAgBlF;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,KAAK,CAEjF;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,KAAK,CAElF"}
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ /**
3
+ * @file src/modules/events/mouse.ts
4
+ * @version 2.0.0
5
+ * @since 2.0.0
6
+ * @license GPL-3.0-or-later
7
+ * @copyright Sven Minio 2026
8
+ * @author Sven Minio <https://sven-minio.de>
9
+ * @category Events
10
+ * @description
11
+ * * πŸ‡¬πŸ‡§: Methods for handling mouse events (click, dblclick, hover, mouseenter, mouseleave).
12
+ * * πŸ‡©πŸ‡ͺ: Methoden zur Behandlung von Maus-Events (click, dblclick, hover, mouseenter, mouseleave).
13
+ * @requires ../../core
14
+ * * πŸ‡¬πŸ‡§: Depends on the core jBase class for type definitions.
15
+ * * πŸ‡©πŸ‡ͺ: HΓ€ngt von der Core-jBase-Klasse fΓΌr Typ-Definitionen ab.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.click = click;
19
+ exports.mousemove = mousemove;
20
+ exports.mouseleave = mouseleave;
21
+ exports.mouseenter = mouseenter;
22
+ exports.mousedown = mousedown;
23
+ exports.mouseup = mouseup;
24
+ exports.dblclick = dblclick;
25
+ exports.mouseout = mouseout;
26
+ exports.mouseover = mouseover;
27
+ /**
28
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'click' event or triggers the event manually.
29
+ * - With handler: Registers the function.
30
+ * - Without handler: Simulates a click on all selected elements.
31
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'click'-Ereignis oder lΓΆst das Ereignis manuell aus.
32
+ * - Mit Handler: Registriert die Funktion.
33
+ * - Ohne Handler: Simuliert einen Klick auf alle selektierten Elemente.
34
+ * @param handler
35
+ * * πŸ‡¬πŸ‡§: (Optional) The callback function executed on click.
36
+ * * πŸ‡©πŸ‡ͺ: (Optional) Die Callback-Funktion, die beim Klick ausgefΓΌhrt wird.
37
+ * @returns
38
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
39
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
40
+ */
41
+ function click(handler) {
42
+ if (handler) {
43
+ return this.on('click', handler);
44
+ }
45
+ else {
46
+ this.forEach(el => {
47
+ if (el instanceof HTMLElement)
48
+ el.click();
49
+ });
50
+ return this;
51
+ }
52
+ }
53
+ /**
54
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mousemove' event. Fires continuously while the pointer moves inside the element.
55
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mousemove'-Ereignis. Feuert kontinuierlich, solange der Mauszeiger innerhalb des Elements bewegt wird.
56
+ * @param handler
57
+ * * πŸ‡¬πŸ‡§: The callback function.
58
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
59
+ * @returns
60
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
61
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
62
+ */
63
+ function mousemove(handler) {
64
+ return this.on('mousemove', handler);
65
+ }
66
+ /**
67
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mouseleave' event. Fires when the pointer leaves the element (does not bubble).
68
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mouseleave'-Ereignis. Feuert, wenn der Mauszeiger das Element verlΓ€sst (bubbelt nicht).
69
+ * @param handler
70
+ * * πŸ‡¬πŸ‡§: The callback function.
71
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
72
+ * @returns
73
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
74
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
75
+ */
76
+ function mouseleave(handler) {
77
+ return this.on('mouseleave', handler);
78
+ }
79
+ /**
80
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mouseenter' event. Fires when the pointer enters the element (does not bubble).
81
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mouseenter'-Ereignis. Feuert, wenn der Mauszeiger das Element betritt (bubbelt nicht).
82
+ * @param handler
83
+ * * πŸ‡¬πŸ‡§: The callback function.
84
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
85
+ * @returns
86
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
87
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
88
+ */
89
+ function mouseenter(handler) {
90
+ return this.on('mouseenter', handler);
91
+ }
92
+ /**
93
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mousedown' event. Fires as soon as a mouse button is pressed over the element.
94
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mousedown'-Ereignis. Feuert, sobald eine Maustaste ΓΌber dem Element gedrΓΌckt wird.
95
+ * @param handler
96
+ * * πŸ‡¬πŸ‡§: The callback function.
97
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
98
+ * @returns
99
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
100
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
101
+ */
102
+ function mousedown(handler) {
103
+ return this.on('mousedown', handler);
104
+ }
105
+ /**
106
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mouseup' event. Fires when a mouse button is released over the element.
107
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mouseup'-Ereignis. Feuert, wenn eine Maustaste ΓΌber dem Element losgelassen wird.
108
+ * @param handler
109
+ * * πŸ‡¬πŸ‡§: The callback function.
110
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
111
+ * @returns
112
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
113
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
114
+ */
115
+ function mouseup(handler) {
116
+ return this.on('mouseup', handler);
117
+ }
118
+ /**
119
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'dblclick' event or triggers it manually.
120
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'dblclick'-Ereignis oder lΓΆst das Ereignis manuell aus.
121
+ * @param handler
122
+ * * πŸ‡¬πŸ‡§: (Optional) The callback function.
123
+ * * πŸ‡©πŸ‡ͺ: (Optional) Die Callback-Funktion.
124
+ * @returns
125
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
126
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
127
+ */
128
+ function dblclick(handler) {
129
+ if (handler) {
130
+ return this.on('dblclick', handler);
131
+ }
132
+ else {
133
+ this.forEach(el => {
134
+ if (el instanceof HTMLElement) {
135
+ // Native el.dblclick() does not exist, so we dispatch the event
136
+ el.dispatchEvent(new MouseEvent('dblclick', {
137
+ bubbles: true,
138
+ cancelable: true,
139
+ view: window
140
+ }));
141
+ }
142
+ });
143
+ return this;
144
+ }
145
+ }
146
+ /**
147
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mouseout' event. Fires when the pointer leaves the element OR one of its children (bubbles).
148
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mouseout'-Ereignis. Feuert, wenn der Mauszeiger das Element ODER eines seiner Kinder verlΓ€sst (bubbelt).
149
+ * @param handler
150
+ * * πŸ‡¬πŸ‡§: The callback function.
151
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
152
+ * @returns
153
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
154
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
155
+ */
156
+ function mouseout(handler) {
157
+ return this.on('mouseout', handler);
158
+ }
159
+ /**
160
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'mouseover' event. Fires when the pointer enters the element OR one of its children (bubbles).
161
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'mouseover'-Ereignis. Feuert, wenn der Mauszeiger das Element ODER eines seiner Kinder betritt (bubbelt).
162
+ * @param handler
163
+ * * πŸ‡¬πŸ‡§: The callback function.
164
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion.
165
+ * @returns
166
+ * * πŸ‡¬πŸ‡§: The current jBase instance.
167
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz.
168
+ */
169
+ function mouseover(handler) {
170
+ return this.on('mouseover', handler);
171
+ }
172
+ //# sourceMappingURL=mouse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mouse.js","sourceRoot":"","sources":["../../../src/modules/events/mouse.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAkBH,sBASC;AAYD,8BAEC;AAYD,gCAEC;AAYD,gCAEC;AAYD,8BAEC;AAYD,0BAEC;AAYD,4BAgBC;AAYD,4BAEC;AAYD,8BAEC;AArJD;;;;;;;;;;;;;GAaG;AACH,SAAgB,KAAK,CAAc,OAAgC;IAC/D,IAAI,OAAO,EAAE,CAAC;QACV,OAAO,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;SAAM,CAAC;QACJ,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;YACd,IAAI,EAAE,YAAY,WAAW;gBAAE,EAAE,CAAC,KAAK,EAAE,CAAC;QAC9C,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC;AACL,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,SAAS,CAAc,OAAoC;IACvE,OAAO,IAAI,CAAC,EAAE,CAAC,WAAW,EAAE,OAAwB,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,UAAU,CAAc,OAAoC;IACxE,OAAO,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,OAAwB,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,UAAU,CAAc,OAAoC;IACxE,OAAO,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,OAAwB,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,SAAS,CAAc,OAAoC;IACvE,OAAO,IAAI,CAAC,EAAE,CAAC,WAAW,EAAE,OAAwB,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,OAAO,CAAc,OAAoC;IACrE,OAAO,IAAI,CAAC,EAAE,CAAC,SAAS,EAAE,OAAwB,CAAC,CAAC;AACxD,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,QAAQ,CAAc,OAAqC;IACvE,IAAI,OAAO,EAAE,CAAC;QACV,OAAO,IAAI,CAAC,EAAE,CAAC,UAAU,EAAE,OAAwB,CAAC,CAAC;IACzD,CAAC;SAAM,CAAC;QACJ,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;YACd,IAAI,EAAE,YAAY,WAAW,EAAE,CAAC;gBAC5B,gEAAgE;gBAChE,EAAE,CAAC,aAAa,CAAC,IAAI,UAAU,CAAC,UAAU,EAAE;oBACxC,OAAO,EAAE,IAAI;oBACb,UAAU,EAAE,IAAI;oBAChB,IAAI,EAAE,MAAM;iBACf,CAAC,CAAC,CAAC;YACR,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC;AACL,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,QAAQ,CAAc,OAAoC;IACtE,OAAO,IAAI,CAAC,EAAE,CAAC,UAAU,EAAE,OAAwB,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,SAAS,CAAc,OAAoC;IACvE,OAAO,IAAI,CAAC,EAAE,CAAC,WAAW,EAAE,OAAwB,CAAC,CAAC;AAC1D,CAAC"}
@@ -0,0 +1,61 @@
1
+ /**
2
+ * @file src/modules/events/touch.ts
3
+ * @version 2.0.0
4
+ * @since 2.0.0
5
+ * @license GPL-3.0-or-later
6
+ * @copyright Sven Minio 2026
7
+ * @author Sven Minio <https://sven-minio.de>
8
+ * @category Events
9
+ * @description
10
+ * * πŸ‡¬πŸ‡§: Methods for handling touch events (touchstart, touchend, touchmove).
11
+ * * πŸ‡©πŸ‡ͺ: Methoden zur Behandlung von Touch-Events (touchstart, touchend, touchmove).
12
+ * @requires ../../core
13
+ * * πŸ‡¬πŸ‡§: Depends on the core jBase class for type definitions.
14
+ * * πŸ‡©πŸ‡ͺ: HΓ€ngt von der Core-jBase-Klasse fΓΌr Typ-Definitionen ab.
15
+ */
16
+ import { jBase } from '../../core';
17
+ /**
18
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'touchstart' event. Triggered when a touch point is placed on the touch surface.
19
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'touchstart'-Ereignis. Wird ausgelΓΆst, sobald ein BerΓΌhrungspunkt auf der Touch-OberflΓ€che platziert wird.
20
+ * @param handler
21
+ * * πŸ‡¬πŸ‡§: The callback function executed on touch start.
22
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion, die bei BerΓΌhrung ausgefΓΌhrt wird.
23
+ * @returns
24
+ * * πŸ‡¬πŸ‡§: The current jBase instance for method chaining.
25
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz fΓΌr Method-Chaining.
26
+ */
27
+ export declare function touchstart(this: jBase, handler: (event: TouchEvent) => void): jBase;
28
+ /**
29
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'touchend' event. Triggered when a touch point is removed from the touch surface.
30
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'touchend'-Ereignis. Wird ausgelΓΆst, wenn ein BerΓΌhrungspunkt von der Touch-OberflΓ€che entfernt wird.
31
+ * @param handler
32
+ * * πŸ‡¬πŸ‡§: The callback function executed on touch end.
33
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion, die beim Loslassen ausgefΓΌhrt wird.
34
+ * @returns
35
+ * * πŸ‡¬πŸ‡§: The current jBase instance for method chaining.
36
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz fΓΌr Method-Chaining.
37
+ */
38
+ export declare function touchend(this: jBase, handler: (event: TouchEvent) => void): jBase;
39
+ /**
40
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'touchmove' event. Triggered when a touch point moves along the touch surface. Important for swipe gestures or Drag & Drop.
41
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'touchmove'-Ereignis. Wird ausgelΓΆst, wenn sich ein BerΓΌhrungspunkt entlang der Touch-OberflΓ€che bewegt. Wichtig fΓΌr Swipe-Gesten oder Drag & Drop.
42
+ * @param handler
43
+ * * πŸ‡¬πŸ‡§: The callback function executed on movement.
44
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion, die bei Bewegung ausgefΓΌhrt wird.
45
+ * @returns
46
+ * * πŸ‡¬πŸ‡§: The current jBase instance for method chaining.
47
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz fΓΌr Method-Chaining.
48
+ */
49
+ export declare function touchmove(this: jBase, handler: (event: TouchEvent) => void): jBase;
50
+ /**
51
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'touchcancel' event. Triggered when a touch point has been disrupted by the system (e.g., too many touch points or a UI popup).
52
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'touchcancel'-Ereignis. Wird ausgelΓΆst, wenn eine BerΓΌhrung durch das System unterbrochen wurde (z.B. durch zu viele BerΓΌhrungspunkte oder ein UI-Popup).
53
+ * @param handler
54
+ * * πŸ‡¬πŸ‡§: The callback function executed on cancellation.
55
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion, die bei Abbruch ausgefΓΌhrt wird.
56
+ * @returns
57
+ * * πŸ‡¬πŸ‡§: The current jBase instance for method chaining.
58
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz fΓΌr Method-Chaining.
59
+ */
60
+ export declare function touchcancel(this: jBase, handler: (event: TouchEvent) => void): jBase;
61
+ //# sourceMappingURL=touch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"touch.d.ts","sourceRoot":"","sources":["../../../src/modules/events/touch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,KAAK,CAEnF;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,KAAK,CAEjF;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,KAAK,CAElF;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,KAAK,CAEpF"}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ /**
3
+ * @file src/modules/events/touch.ts
4
+ * @version 2.0.0
5
+ * @since 2.0.0
6
+ * @license GPL-3.0-or-later
7
+ * @copyright Sven Minio 2026
8
+ * @author Sven Minio <https://sven-minio.de>
9
+ * @category Events
10
+ * @description
11
+ * * πŸ‡¬πŸ‡§: Methods for handling touch events (touchstart, touchend, touchmove).
12
+ * * πŸ‡©πŸ‡ͺ: Methoden zur Behandlung von Touch-Events (touchstart, touchend, touchmove).
13
+ * @requires ../../core
14
+ * * πŸ‡¬πŸ‡§: Depends on the core jBase class for type definitions.
15
+ * * πŸ‡©πŸ‡ͺ: HΓ€ngt von der Core-jBase-Klasse fΓΌr Typ-Definitionen ab.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.touchstart = touchstart;
19
+ exports.touchend = touchend;
20
+ exports.touchmove = touchmove;
21
+ exports.touchcancel = touchcancel;
22
+ /**
23
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'touchstart' event. Triggered when a touch point is placed on the touch surface.
24
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'touchstart'-Ereignis. Wird ausgelΓΆst, sobald ein BerΓΌhrungspunkt auf der Touch-OberflΓ€che platziert wird.
25
+ * @param handler
26
+ * * πŸ‡¬πŸ‡§: The callback function executed on touch start.
27
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion, die bei BerΓΌhrung ausgefΓΌhrt wird.
28
+ * @returns
29
+ * * πŸ‡¬πŸ‡§: The current jBase instance for method chaining.
30
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz fΓΌr Method-Chaining.
31
+ */
32
+ function touchstart(handler) {
33
+ return this.on('touchstart', handler);
34
+ }
35
+ /**
36
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'touchend' event. Triggered when a touch point is removed from the touch surface.
37
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'touchend'-Ereignis. Wird ausgelΓΆst, wenn ein BerΓΌhrungspunkt von der Touch-OberflΓ€che entfernt wird.
38
+ * @param handler
39
+ * * πŸ‡¬πŸ‡§: The callback function executed on touch end.
40
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion, die beim Loslassen ausgefΓΌhrt wird.
41
+ * @returns
42
+ * * πŸ‡¬πŸ‡§: The current jBase instance for method chaining.
43
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz fΓΌr Method-Chaining.
44
+ */
45
+ function touchend(handler) {
46
+ return this.on('touchend', handler);
47
+ }
48
+ /**
49
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'touchmove' event. Triggered when a touch point moves along the touch surface. Important for swipe gestures or Drag & Drop.
50
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'touchmove'-Ereignis. Wird ausgelΓΆst, wenn sich ein BerΓΌhrungspunkt entlang der Touch-OberflΓ€che bewegt. Wichtig fΓΌr Swipe-Gesten oder Drag & Drop.
51
+ * @param handler
52
+ * * πŸ‡¬πŸ‡§: The callback function executed on movement.
53
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion, die bei Bewegung ausgefΓΌhrt wird.
54
+ * @returns
55
+ * * πŸ‡¬πŸ‡§: The current jBase instance for method chaining.
56
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz fΓΌr Method-Chaining.
57
+ */
58
+ function touchmove(handler) {
59
+ return this.on('touchmove', handler);
60
+ }
61
+ /**
62
+ * * πŸ‡¬πŸ‡§: Binds an event handler to the 'touchcancel' event. Triggered when a touch point has been disrupted by the system (e.g., too many touch points or a UI popup).
63
+ * * πŸ‡©πŸ‡ͺ: Bindet einen Event-Handler an das 'touchcancel'-Ereignis. Wird ausgelΓΆst, wenn eine BerΓΌhrung durch das System unterbrochen wurde (z.B. durch zu viele BerΓΌhrungspunkte oder ein UI-Popup).
64
+ * @param handler
65
+ * * πŸ‡¬πŸ‡§: The callback function executed on cancellation.
66
+ * * πŸ‡©πŸ‡ͺ: Die Callback-Funktion, die bei Abbruch ausgefΓΌhrt wird.
67
+ * @returns
68
+ * * πŸ‡¬πŸ‡§: The current jBase instance for method chaining.
69
+ * * πŸ‡©πŸ‡ͺ: Die aktuelle jBase-Instanz fΓΌr Method-Chaining.
70
+ */
71
+ function touchcancel(handler) {
72
+ return this.on('touchcancel', handler);
73
+ }
74
+ //# sourceMappingURL=touch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"touch.js","sourceRoot":"","sources":["../../../src/modules/events/touch.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAcH,gCAEC;AAYD,4BAEC;AAYD,8BAEC;AAYD,kCAEC;AAtDD;;;;;;;;;GASG;AACH,SAAgB,UAAU,CAAc,OAAoC;IACxE,OAAO,IAAI,CAAC,EAAE,CAAC,YAAY,EAAE,OAAwB,CAAC,CAAC;AAC3D,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,QAAQ,CAAc,OAAoC;IACtE,OAAO,IAAI,CAAC,EAAE,CAAC,UAAU,EAAE,OAAwB,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,SAAS,CAAc,OAAoC;IACvE,OAAO,IAAI,CAAC,EAAE,CAAC,WAAW,EAAE,OAAwB,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,WAAW,CAAc,OAAoC;IACzE,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,EAAE,OAAwB,CAAC,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @file src/modules/http/get.ts
3
+ * @version 2.0.0
4
+ * @since 2.0.0
5
+ * @license GPL-3.0-or-later
6
+ * @copyright Sven Minio 2026
7
+ * @author Sven Minio <https://sven-minio.de>
8
+ * @category HTTP
9
+ * @description
10
+ * * πŸ‡¬πŸ‡§: Abstraction for HTTP GET requests.
11
+ * * πŸ‡©πŸ‡ͺ: Abstraktion fΓΌr HTTP GET-Anfragen.
12
+ * @requires ../../core
13
+ * * πŸ‡¬πŸ‡§: Depends on the core jBase class for type definitions.
14
+ * * πŸ‡©πŸ‡ͺ: HΓ€ngt von der Core-jBase-Klasse fΓΌr Typ-Definitionen ab.
15
+ */
16
+ /**
17
+ * * πŸ‡¬πŸ‡§: Performs an asynchronous HTTP GET request and expects a JSON response. Includes an automatic timeout of 5000ms to avoid hanging requests.
18
+ * * πŸ‡©πŸ‡ͺ: FΓΌhrt einen asynchronen HTTP GET-Request aus und erwartet eine JSON-Antwort. Beinhaltet einen automatischen Timeout von 5000ms, um hΓ€ngende Requests zu vermeiden.
19
+ * @template T
20
+ * * πŸ‡¬πŸ‡§: The expected type of the response data (Generic).
21
+ * * πŸ‡©πŸ‡ͺ: Der erwartete Typ der Antwortdaten (Generic).
22
+ * @param url
23
+ * * πŸ‡¬πŸ‡§: The target URL for the request.
24
+ * * πŸ‡©πŸ‡ͺ: Die Ziel-URL fΓΌr den Request.
25
+ * @returns
26
+ * * πŸ‡¬πŸ‡§: A Promise resolving with the typed JSON data.
27
+ * * πŸ‡©πŸ‡ͺ: Ein Promise, das mit den typisierten JSON-Daten aufgelΓΆst wird.
28
+ * @throws
29
+ * * πŸ‡¬πŸ‡§: Error if HTTP status is not in success range (200-299) or a timeout occurs.
30
+ * * πŸ‡©πŸ‡ͺ: Error, wenn der HTTP-Status nicht im Erfolgsbereich (200-299) liegt oder ein Timeout auftritt.
31
+ */
32
+ export declare function get<T>(url: string): Promise<T>;
33
+ /**
34
+ * * πŸ‡¬πŸ‡§: Performs an asynchronous HTTP GET request and returns the raw text content. Ideal for loading HTML fragments (Server-Side Rendering Partials) or plain text.
35
+ * * πŸ‡©πŸ‡ͺ: FΓΌhrt einen asynchronen HTTP GET-Request aus und gibt den rohen Text-Inhalt zurΓΌck. Ideal zum Nachladen von HTML-Fragmenten (Server-Side Rendering Partials) oder Plain-Text.
36
+ * @param url
37
+ * * πŸ‡¬πŸ‡§: The target URL for the request.
38
+ * * πŸ‡©πŸ‡ͺ: Die Ziel-URL fΓΌr den Request.
39
+ * @returns
40
+ * * πŸ‡¬πŸ‡§: A Promise containing the response body as a string.
41
+ * * πŸ‡©πŸ‡ͺ: Ein Promise, das den Antwort-Body als String enthΓ€lt.
42
+ * @throws
43
+ * * πŸ‡¬πŸ‡§: Error if HTTP status is not in success range (200-299).
44
+ * * πŸ‡©πŸ‡ͺ: Error, wenn der HTTP-Status nicht im Erfolgsbereich (200-299) liegt.
45
+ */
46
+ export declare function getText(url: string): Promise<string>;
47
+ //# sourceMappingURL=get.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/modules/http/get.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAQpD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAM1D"}
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ /**
3
+ * @file src/modules/http/get.ts
4
+ * @version 2.0.0
5
+ * @since 2.0.0
6
+ * @license GPL-3.0-or-later
7
+ * @copyright Sven Minio 2026
8
+ * @author Sven Minio <https://sven-minio.de>
9
+ * @category HTTP
10
+ * @description
11
+ * * πŸ‡¬πŸ‡§: Abstraction for HTTP GET requests.
12
+ * * πŸ‡©πŸ‡ͺ: Abstraktion fΓΌr HTTP GET-Anfragen.
13
+ * @requires ../../core
14
+ * * πŸ‡¬πŸ‡§: Depends on the core jBase class for type definitions.
15
+ * * πŸ‡©πŸ‡ͺ: HΓ€ngt von der Core-jBase-Klasse fΓΌr Typ-Definitionen ab.
16
+ */
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.get = get;
19
+ exports.getText = getText;
20
+ /**
21
+ * * πŸ‡¬πŸ‡§: Performs an asynchronous HTTP GET request and expects a JSON response. Includes an automatic timeout of 5000ms to avoid hanging requests.
22
+ * * πŸ‡©πŸ‡ͺ: FΓΌhrt einen asynchronen HTTP GET-Request aus und erwartet eine JSON-Antwort. Beinhaltet einen automatischen Timeout von 5000ms, um hΓ€ngende Requests zu vermeiden.
23
+ * @template T
24
+ * * πŸ‡¬πŸ‡§: The expected type of the response data (Generic).
25
+ * * πŸ‡©πŸ‡ͺ: Der erwartete Typ der Antwortdaten (Generic).
26
+ * @param url
27
+ * * πŸ‡¬πŸ‡§: The target URL for the request.
28
+ * * πŸ‡©πŸ‡ͺ: Die Ziel-URL fΓΌr den Request.
29
+ * @returns
30
+ * * πŸ‡¬πŸ‡§: A Promise resolving with the typed JSON data.
31
+ * * πŸ‡©πŸ‡ͺ: Ein Promise, das mit den typisierten JSON-Daten aufgelΓΆst wird.
32
+ * @throws
33
+ * * πŸ‡¬πŸ‡§: Error if HTTP status is not in success range (200-299) or a timeout occurs.
34
+ * * πŸ‡©πŸ‡ͺ: Error, wenn der HTTP-Status nicht im Erfolgsbereich (200-299) liegt oder ein Timeout auftritt.
35
+ */
36
+ async function get(url) {
37
+ const response = await fetch(url, {
38
+ signal: AbortSignal.timeout(5000)
39
+ });
40
+ if (!response.ok) {
41
+ throw new Error(`HTTP Error: ${response.status}`);
42
+ }
43
+ return await response.json();
44
+ }
45
+ /**
46
+ * * πŸ‡¬πŸ‡§: Performs an asynchronous HTTP GET request and returns the raw text content. Ideal for loading HTML fragments (Server-Side Rendering Partials) or plain text.
47
+ * * πŸ‡©πŸ‡ͺ: FΓΌhrt einen asynchronen HTTP GET-Request aus und gibt den rohen Text-Inhalt zurΓΌck. Ideal zum Nachladen von HTML-Fragmenten (Server-Side Rendering Partials) oder Plain-Text.
48
+ * @param url
49
+ * * πŸ‡¬πŸ‡§: The target URL for the request.
50
+ * * πŸ‡©πŸ‡ͺ: Die Ziel-URL fΓΌr den Request.
51
+ * @returns
52
+ * * πŸ‡¬πŸ‡§: A Promise containing the response body as a string.
53
+ * * πŸ‡©πŸ‡ͺ: Ein Promise, das den Antwort-Body als String enthΓ€lt.
54
+ * @throws
55
+ * * πŸ‡¬πŸ‡§: Error if HTTP status is not in success range (200-299).
56
+ * * πŸ‡©πŸ‡ͺ: Error, wenn der HTTP-Status nicht im Erfolgsbereich (200-299) liegt.
57
+ */
58
+ async function getText(url) {
59
+ const response = await fetch(url);
60
+ if (!response.ok) {
61
+ throw new Error(`HTTP Error: ${response.status}`);
62
+ }
63
+ return await response.text();
64
+ }
65
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/modules/http/get.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAkBH,kBAQC;AAeD,0BAMC;AA7CD;;;;;;;;;;;;;;;GAeG;AACI,KAAK,UAAU,GAAG,CAAI,GAAW;IACpC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QAC9B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC;KACpC,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,eAAe,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;AACjC,CAAC;AAED;;;;;;;;;;;;GAYG;AACI,KAAK,UAAU,OAAO,CAAC,GAAW;IACrC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,eAAe,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;AACjC,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @file src/modules/http/index.ts
3
+ * @version 2.0.0
4
+ * @since 2.0.0
5
+ * @license GPL-3.0-or-later
6
+ * @copyright Sven Minio 2026
7
+ * @author Sven Minio <https://sven-minio.de>
8
+ * @category HTTP
9
+ * @description
10
+ * * πŸ‡¬πŸ‡§: Central entry point for HTTP requests. Aggregates GET and POST methods.
11
+ * * πŸ‡©πŸ‡ͺ: Zentraler Einstiegspunkt fΓΌr HTTP-Anfragen. Aggregiert GET- und POST-Methoden.
12
+ * @requires ./get
13
+ * * πŸ‡¬πŸ‡§: HTTP GET methods (get, getText).
14
+ * * πŸ‡©πŸ‡ͺ: HTTP GET-Methoden (get, getText).
15
+ * @requires ./post
16
+ * * πŸ‡¬πŸ‡§: HTTP POST methods.
17
+ * * πŸ‡©πŸ‡ͺ: HTTP POST-Methoden.
18
+ */
19
+ /**
20
+ * * πŸ‡¬πŸ‡§: The central HTTP client of the framework. Aggregates all HTTP methods (GET, POST, etc.) into a unified interface. Acts as a wrapper around the native `fetch` API to simplify JSON parsing, error handling, and typing.
21
+ * * πŸ‡©πŸ‡ͺ: Der zentrale HTTP-Client des Frameworks. Aggregiert alle HTTP-Methoden (GET, POST, etc.) zu einer einheitlichen Schnittstelle. Fungiert als Wrapper um die native `fetch` API, um JSON-Parsing, Error-Handling und Typisierung zu vereinfachen.
22
+ * @example
23
+ * // Get data / Daten abrufen
24
+ * const data = await http.get<UserData>('/api/user/1');
25
+ *
26
+ * // Send data / Daten senden
27
+ * await http.post('/api/login', { username: '...', password: '...' });
28
+ *
29
+ * // Load HTML / HTML laden
30
+ * const html = await http.getText('/templates/modal.html');
31
+ */
32
+ export declare const http: {
33
+ post<T>(url: string, body?: any): Promise<T>;
34
+ get<T>(url: string): Promise<T>;
35
+ getText(url: string): Promise<string>;
36
+ };
37
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/http/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,IAAI;;;;CAGhB,CAAC"}
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /**
3
+ * @file src/modules/http/index.ts
4
+ * @version 2.0.0
5
+ * @since 2.0.0
6
+ * @license GPL-3.0-or-later
7
+ * @copyright Sven Minio 2026
8
+ * @author Sven Minio <https://sven-minio.de>
9
+ * @category HTTP
10
+ * @description
11
+ * * πŸ‡¬πŸ‡§: Central entry point for HTTP requests. Aggregates GET and POST methods.
12
+ * * πŸ‡©πŸ‡ͺ: Zentraler Einstiegspunkt fΓΌr HTTP-Anfragen. Aggregiert GET- und POST-Methoden.
13
+ * @requires ./get
14
+ * * πŸ‡¬πŸ‡§: HTTP GET methods (get, getText).
15
+ * * πŸ‡©πŸ‡ͺ: HTTP GET-Methoden (get, getText).
16
+ * @requires ./post
17
+ * * πŸ‡¬πŸ‡§: HTTP POST methods.
18
+ * * πŸ‡©πŸ‡ͺ: HTTP POST-Methoden.
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.http = void 0;
22
+ const tslib_1 = require("tslib");
23
+ const getMethods = tslib_1.__importStar(require("./get"));
24
+ const postMethods = tslib_1.__importStar(require("./post"));
25
+ /**
26
+ * * πŸ‡¬πŸ‡§: The central HTTP client of the framework. Aggregates all HTTP methods (GET, POST, etc.) into a unified interface. Acts as a wrapper around the native `fetch` API to simplify JSON parsing, error handling, and typing.
27
+ * * πŸ‡©πŸ‡ͺ: Der zentrale HTTP-Client des Frameworks. Aggregiert alle HTTP-Methoden (GET, POST, etc.) zu einer einheitlichen Schnittstelle. Fungiert als Wrapper um die native `fetch` API, um JSON-Parsing, Error-Handling und Typisierung zu vereinfachen.
28
+ * @example
29
+ * // Get data / Daten abrufen
30
+ * const data = await http.get<UserData>('/api/user/1');
31
+ *
32
+ * // Send data / Daten senden
33
+ * await http.post('/api/login', { username: '...', password: '...' });
34
+ *
35
+ * // Load HTML / HTML laden
36
+ * const html = await http.getText('/templates/modal.html');
37
+ */
38
+ exports.http = {
39
+ ...getMethods,
40
+ ...postMethods
41
+ };
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/http/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;AAEH,0DAAoC;AACpC,4DAAsC;AAEtC;;;;;;;;;;;;GAYG;AACU,QAAA,IAAI,GAAG;IAChB,GAAG,UAAU;IACb,GAAG,WAAW;CACjB,CAAC"}