@k37z3r/jbase 2.0.1 → 2.0.3

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 (167) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +59 -43
  3. package/dist/browser.d.ts +5 -6
  4. package/dist/browser.d.ts.map +1 -1
  5. package/dist/core.d.ts +9 -14
  6. package/dist/core.d.ts.map +1 -1
  7. package/dist/index.cjs +577 -452
  8. package/dist/index.cjs.map +7 -0
  9. package/dist/index.d.ts +304 -603
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.mjs +575 -452
  12. package/dist/index.mjs.map +7 -0
  13. package/dist/jbase.browser.js +338 -281
  14. package/dist/jbase.browser.js.map +7 -0
  15. package/dist/jbase.min.js +3 -2
  16. package/dist/jbase.min.js.map +7 -0
  17. package/dist/modules/css/classes.d.ts +15 -29
  18. package/dist/modules/css/classes.d.ts.map +1 -1
  19. package/dist/modules/css/index.d.ts +5 -9
  20. package/dist/modules/css/index.d.ts.map +1 -1
  21. package/dist/modules/css/styles.d.ts +7 -13
  22. package/dist/modules/css/styles.d.ts.map +1 -1
  23. package/dist/modules/data/arrays.d.ts +96 -64
  24. package/dist/modules/data/arrays.d.ts.map +1 -1
  25. package/dist/modules/data/index.d.ts +5 -9
  26. package/dist/modules/data/index.d.ts.map +1 -1
  27. package/dist/modules/data/objects.d.ts +86 -54
  28. package/dist/modules/data/objects.d.ts.map +1 -1
  29. package/dist/modules/data/types.d.ts +3 -22
  30. package/dist/modules/data/types.d.ts.map +1 -1
  31. package/dist/modules/dom/attributes.d.ts +10 -19
  32. package/dist/modules/dom/attributes.d.ts.map +1 -1
  33. package/dist/modules/dom/content.d.ts +9 -17
  34. package/dist/modules/dom/content.d.ts.map +1 -1
  35. package/dist/modules/dom/index.d.ts +8 -15
  36. package/dist/modules/dom/index.d.ts.map +1 -1
  37. package/dist/modules/dom/manipulation.d.ts +41 -81
  38. package/dist/modules/dom/manipulation.d.ts.map +1 -1
  39. package/dist/modules/dom/states.d.ts +12 -23
  40. package/dist/modules/dom/states.d.ts.map +1 -1
  41. package/dist/modules/dom/traversal.d.ts +64 -127
  42. package/dist/modules/dom/traversal.d.ts.map +1 -1
  43. package/dist/modules/effects/fade.d.ts +13 -31
  44. package/dist/modules/effects/fade.d.ts.map +1 -1
  45. package/dist/modules/effects/index.d.ts +15 -23
  46. package/dist/modules/effects/index.d.ts.map +1 -1
  47. package/dist/modules/effects/slide.d.ts +13 -31
  48. package/dist/modules/effects/slide.d.ts.map +1 -1
  49. package/dist/modules/effects/types.d.ts +33 -0
  50. package/dist/modules/effects/types.d.ts.map +1 -0
  51. package/dist/modules/effects/vertical.d.ts +13 -31
  52. package/dist/modules/effects/vertical.d.ts.map +1 -1
  53. package/dist/modules/events/binding.d.ts +11 -21
  54. package/dist/modules/events/binding.d.ts.map +1 -1
  55. package/dist/modules/events/form.d.ts +18 -35
  56. package/dist/modules/events/form.d.ts.map +1 -1
  57. package/dist/modules/events/index.d.ts +9 -17
  58. package/dist/modules/events/index.d.ts.map +1 -1
  59. package/dist/modules/events/keyboard.d.ts +16 -31
  60. package/dist/modules/events/keyboard.d.ts.map +1 -1
  61. package/dist/modules/events/lifecycle.d.ts +6 -11
  62. package/dist/modules/events/lifecycle.d.ts.map +1 -1
  63. package/dist/modules/events/mouse.d.ts +30 -59
  64. package/dist/modules/events/mouse.d.ts.map +1 -1
  65. package/dist/modules/events/touch.d.ts +15 -29
  66. package/dist/modules/events/touch.d.ts.map +1 -1
  67. package/dist/modules/http/get.d.ts +18 -25
  68. package/dist/modules/http/get.d.ts.map +1 -1
  69. package/dist/modules/http/index.d.ts +11 -15
  70. package/dist/modules/http/index.d.ts.map +1 -1
  71. package/dist/modules/http/post.d.ts +13 -19
  72. package/dist/modules/http/post.d.ts.map +1 -1
  73. package/dist/server.d.ts +15 -0
  74. package/dist/server.d.ts.map +1 -0
  75. package/dist/server.js +2246 -0
  76. package/dist/server.js.map +7 -0
  77. package/dist/types.d.ts +11 -21
  78. package/dist/types.d.ts.map +1 -1
  79. package/dist/utils.d.ts +20 -23
  80. package/dist/utils.d.ts.map +1 -1
  81. package/package.json +14 -4
  82. package/wiki/CSS-Classes-&-Styles.md +128 -0
  83. package/wiki/DATA-Utilities-(Arrays).md +332 -0
  84. package/wiki/DATA-Utilities-(Objects).md +263 -0
  85. package/wiki/DOM-Attributes.md +56 -0
  86. package/wiki/DOM-Content.md +48 -0
  87. package/wiki/DOM-Manipulation.md +272 -0
  88. package/wiki/DOM-States.md +73 -0
  89. package/wiki/DOM-Traversal.md +529 -0
  90. package/wiki/EFFECTS-Fade.md +76 -0
  91. package/wiki/EFFECTS-Slide-(horizontal).md +70 -0
  92. package/wiki/EFFECTS-Slide-(vertical).md +75 -0
  93. package/wiki/EVENTS-Bindings.md +55 -0
  94. package/wiki/EVENTS-Form.md +122 -0
  95. package/wiki/EVENTS-Keyboard.md +98 -0
  96. package/wiki/EVENTS-Lifecycle.md +25 -0
  97. package/wiki/EVENTS-Mouse.md +218 -0
  98. package/wiki/EVENTS-Touch.md +98 -0
  99. package/wiki/HTTP-Requests.md +93 -0
  100. package/wiki/Home.md +118 -0
  101. package/wiki/Installation.md +44 -0
  102. package/wiki/Quick-Start.md +139 -0
  103. package/dist/browser.js +0 -29
  104. package/dist/browser.js.map +0 -1
  105. package/dist/core.js +0 -78
  106. package/dist/core.js.map +0 -1
  107. package/dist/index.js +0 -100
  108. package/dist/index.js.map +0 -1
  109. package/dist/jbase.js +0 -1898
  110. package/dist/modules/css/classes.js +0 -88
  111. package/dist/modules/css/classes.js.map +0 -1
  112. package/dist/modules/css/index.js +0 -33
  113. package/dist/modules/css/index.js.map +0 -1
  114. package/dist/modules/css/styles.js +0 -49
  115. package/dist/modules/css/styles.js.map +0 -1
  116. package/dist/modules/data/arrays.js +0 -177
  117. package/dist/modules/data/arrays.js.map +0 -1
  118. package/dist/modules/data/index.js +0 -33
  119. package/dist/modules/data/index.js.map +0 -1
  120. package/dist/modules/data/objects.js +0 -168
  121. package/dist/modules/data/objects.js.map +0 -1
  122. package/dist/modules/data/types.js +0 -43
  123. package/dist/modules/data/types.js.map +0 -1
  124. package/dist/modules/dom/attributes.js +0 -69
  125. package/dist/modules/dom/attributes.js.map +0 -1
  126. package/dist/modules/dom/content.js +0 -63
  127. package/dist/modules/dom/content.js.map +0 -1
  128. package/dist/modules/dom/index.js +0 -48
  129. package/dist/modules/dom/index.js.map +0 -1
  130. package/dist/modules/dom/manipulation.js +0 -343
  131. package/dist/modules/dom/manipulation.js.map +0 -1
  132. package/dist/modules/dom/states.js +0 -89
  133. package/dist/modules/dom/states.js.map +0 -1
  134. package/dist/modules/dom/traversal.js +0 -527
  135. package/dist/modules/dom/traversal.js.map +0 -1
  136. package/dist/modules/effects/fade.js +0 -104
  137. package/dist/modules/effects/fade.js.map +0 -1
  138. package/dist/modules/effects/index.js +0 -38
  139. package/dist/modules/effects/index.js.map +0 -1
  140. package/dist/modules/effects/slide.js +0 -103
  141. package/dist/modules/effects/slide.js.map +0 -1
  142. package/dist/modules/effects/vertical.js +0 -118
  143. package/dist/modules/effects/vertical.js.map +0 -1
  144. package/dist/modules/events/binding.js +0 -60
  145. package/dist/modules/events/binding.js.map +0 -1
  146. package/dist/modules/events/form.js +0 -106
  147. package/dist/modules/events/form.js.map +0 -1
  148. package/dist/modules/events/index.js +0 -53
  149. package/dist/modules/events/index.js.map +0 -1
  150. package/dist/modules/events/keyboard.js +0 -83
  151. package/dist/modules/events/keyboard.js.map +0 -1
  152. package/dist/modules/events/lifecycle.js +0 -40
  153. package/dist/modules/events/lifecycle.js.map +0 -1
  154. package/dist/modules/events/mouse.js +0 -172
  155. package/dist/modules/events/mouse.js.map +0 -1
  156. package/dist/modules/events/touch.js +0 -74
  157. package/dist/modules/events/touch.js.map +0 -1
  158. package/dist/modules/http/get.js +0 -65
  159. package/dist/modules/http/get.js.map +0 -1
  160. package/dist/modules/http/index.js +0 -42
  161. package/dist/modules/http/index.js.map +0 -1
  162. package/dist/modules/http/post.js +0 -54
  163. package/dist/modules/http/post.js.map +0 -1
  164. package/dist/types.js +0 -15
  165. package/dist/types.js.map +0 -1
  166. package/dist/utils.js +0 -71
  167. package/dist/utils.js.map +0 -1
@@ -1,172 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,74 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,65 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,42 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,54 +0,0 @@
1
- "use strict";
2
- /**
3
- * @file src/modules/http/post.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 POST requests.
12
- * * 🇩🇪: Abstraktion für HTTP POST-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.post = post;
19
- /**
20
- * * 🇬🇧: Performs an asynchronous HTTP POST request to the specified URL. Automatically sets the 'Content-Type' header to 'application/json' and serializes the body.
21
- * * 🇩🇪: Führt einen asynchronen HTTP POST-Request an die angegebene URL durch. Setzt automatisch den 'Content-Type'-Header auf 'application/json' und serialisiert den Body.
22
- * @template T
23
- * * 🇬🇧: The expected response type (Generic).
24
- * * 🇩🇪: Der erwartete Rückgabetyp der Antwort (Generic).
25
- * @param url
26
- * * 🇬🇧: The target URL for the request.
27
- * * 🇩🇪: Die Ziel-URL für den Request.
28
- * @param body
29
- * * 🇬🇧: The data to send (automatically JSON serialized). Default is {}.
30
- * * 🇩🇪: Die zu sendenden Daten (werden automatisch JSON-serialisiert). Standard ist {}.
31
- * @returns
32
- * * 🇬🇧: A Promise resolving with the deserialized JSON response of type T.
33
- * * 🇩🇪: Ein Promise, das mit der deserialisierten JSON-Antwort vom Typ T aufgelöst wird.
34
- * @throws
35
- * * 🇬🇧: Error if the HTTP status code is not in the range 200-299.
36
- * * 🇩🇪: Error, wenn der HTTP-Statuscode nicht im Bereich 200-299 liegt.
37
- */
38
- async function post(url, body = {}) {
39
- const response = await fetch(url, {
40
- method: 'POST',
41
- headers: { 'Content-Type': 'application/json' },
42
- body: JSON.stringify(body)
43
- });
44
- // Handle HTTP 204 (No Content):
45
- // Prevents SyntaxError because response.json() fails on empty body.
46
- if (response.status === 204) {
47
- return {};
48
- }
49
- if (!response.ok) {
50
- throw new Error(`HTTP Error: ${response.status}`);
51
- }
52
- return await response.json();
53
- }
54
- //# sourceMappingURL=post.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"post.js","sourceRoot":"","sources":["../../../src/modules/http/post.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAqBH,oBAkBC;AArCD;;;;;;;;;;;;;;;;;;GAkBG;AACI,KAAK,UAAU,IAAI,CAAI,GAAW,EAAE,OAAY,EAAE;IACrD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QAC9B,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;KAC7B,CAAC,CAAC;IAEH,gCAAgC;IAChC,oEAAoE;IACpE,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QAC1B,OAAO,EAAO,CAAC;IACnB,CAAC;IAED,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,eAAe,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;AACjC,CAAC"}
package/dist/types.js DELETED
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /**
3
- * @file src/types.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 Types
10
- * @description
11
- * * 🇬🇧: Central type definitions, interfaces, and aliases for the jBase library.
12
- * * 🇩🇪: Zentrale Typ-Definitionen, Interfaces und Aliase für die jBase-Bibliothek.
13
- */
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- //# sourceMappingURL=types.js.map
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG"}
package/dist/utils.js DELETED
@@ -1,71 +0,0 @@
1
- "use strict";
2
- /**
3
- * @file src/utils.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 Utilities
10
- * @description
11
- * * 🇬🇧: General utility functions and helpers (e.g., debounce, throttle, type checks).
12
- * * 🇩🇪: Allgemeine Hilfsfunktionen und Helfer (z.B. debounce, throttle, Typ-Prüfungen).
13
- */
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.throttle = throttle;
16
- exports.debounce = debounce;
17
- /**
18
- * * 🇬🇧: Creates a throttled version of the provided function. The function is executed at most once within the specified time interval, regardless of how often it is called.
19
- * Use case: Performance optimization for high-frequency events (e.g., Scroll, Resize, Mousemove).
20
- * * 🇩🇪: Erstellt eine gedrosselte (throttled) Version der übergebenen Funktion. Die Funktion wird höchstens einmal innerhalb des angegebenen Zeitintervalls ausgeführt, unabhängig davon, wie oft sie aufgerufen wird.
21
- * Einsatzgebiet: Performance-Optimierung bei hochfrequenten Events (z.B. Scroll, Resize, Mousemove).
22
- * @template T
23
- * * 🇬🇧: The type of the original function.
24
- * * 🇩🇪: Der Typ der ursprünglichen Funktion.
25
- * @param func
26
- * * 🇬🇧: The function to be throttled.
27
- * * 🇩🇪: Die Funktion, die gedrosselt werden soll.
28
- * @param limit
29
- * * 🇬🇧: The time interval in milliseconds during which at most one execution is permitted.
30
- * * 🇩🇪: Das Zeitintervall in Millisekunden, in dem höchstens eine Ausführung erlaubt ist.
31
- * @returns
32
- * * 🇬🇧: A new function that throttles calls.
33
- * * 🇩🇪: Eine neue Funktion, die die Aufrufe drosselt.
34
- */
35
- function throttle(func, limit) {
36
- let inThrottle;
37
- return function (...args) {
38
- const context = this;
39
- if (!inThrottle) {
40
- func.apply(context, args);
41
- inThrottle = true;
42
- setTimeout(() => inThrottle = false, limit);
43
- }
44
- };
45
- }
46
- /**
47
- * * 🇬🇧: Creates a debounced version of the provided function. Execution is delayed until `delay` milliseconds have passed since the last invocation.
48
- * Use case: Waiting for user input (e.g., Live Search, Validation) to avoid unnecessary calculations.
49
- * * 🇩🇪: Erstellt eine entprellte (debounced) Version der übergebenen Funktion. Die Ausführung der Funktion wird verzögert, bis `delay` Millisekunden verstrichen sind, ohne dass ein neuer Aufruf erfolgt ist.
50
- * Einsatzgebiet: Warten auf Benutzereingaben (z.B. Live-Suche, Validierung) zur Vermeidung unnötiger Berechnungen.
51
- * @template T
52
- * * 🇬🇧: The type of the original function.
53
- * * 🇩🇪: Der Typ der ursprünglichen Funktion.
54
- * @param func
55
- * * 🇬🇧: The function to be debounced.
56
- * * 🇩🇪: Die Funktion, die entprellt werden soll.
57
- * @param delay
58
- * * 🇬🇧: The waiting time in milliseconds after the last call.
59
- * * 🇩🇪: Die Wartezeit in Millisekunden nach dem letzten Aufruf.
60
- * @returns
61
- * * 🇬🇧: A new function that delays execution.
62
- * * 🇩🇪: Eine neue Funktion, die die Ausführung verzögert.
63
- */
64
- function debounce(func, delay) {
65
- let timer;
66
- return function (...args) {
67
- clearTimeout(timer);
68
- timer = setTimeout(() => func.apply(this, args), delay);
69
- };
70
- }
71
- //# sourceMappingURL=utils.js.map
package/dist/utils.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AAoBH,4BAUC;AAoBD,4BAMC;AAtDD;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,QAAQ,CAAoC,IAAO,EAAE,KAAa;IAC9E,IAAI,UAAmB,CAAC;IACxB,OAAO,UAAoB,GAAG,IAAmB;QAC7C,MAAM,OAAO,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,UAAU,EAAE,CAAC;YACd,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;YAC1B,UAAU,GAAG,IAAI,CAAC;YAClB,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,GAAG,KAAK,EAAE,KAAK,CAAC,CAAC;QAChD,CAAC;IACL,CAAC,CAAC;AACN,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,QAAQ,CAAoC,IAAO,EAAE,KAAa;IAC9E,IAAI,KAAoC,CAAC;IACzC,OAAO,UAAoB,GAAG,IAAmB;QAC7C,YAAY,CAAC,KAAK,CAAC,CAAC;QACpB,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;IAC5D,CAAC,CAAC;AACN,CAAC"}