@k37z3r/jbase 2.0.1 → 2.0.2

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 +42 -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 +547 -445
  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 +545 -445
  12. package/dist/index.mjs.map +7 -0
  13. package/dist/jbase.browser.js +308 -274
  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 +13 -24
  68. package/dist/modules/http/get.d.ts.map +1 -1
  69. package/dist/modules/http/index.d.ts +9 -13
  70. package/dist/modules/http/index.d.ts.map +1 -1
  71. package/dist/modules/http/post.d.ts +9 -17
  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 +2223 -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
package/CHANGELOG.md ADDED
@@ -0,0 +1,42 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [2.0.1] - 2026-02-04
6
+
7
+ * **ReadMe (`README.md`):** Updated ReadMe for better understanding
8
+
9
+
10
+ ## [2.0.2] - 2026-02-08
11
+
12
+ ### 🚀 Added (SSR & Architecture)
13
+
14
+ * **Server-Side Rendering (SSR):** Full support for Node.js environments via `jsdom`.
15
+ * Added `src/server.ts` with `parseHTML` utility.
16
+ * Added `bind(window)` factory in `src/index.ts` to create isolated jBase instances per request.
17
+
18
+
19
+ * **Context Awareness:** The core `jBase` class now accepts an optional `context` (Window/Document) in the constructor to support isolated environments.
20
+ * **Environment Detection:** Added `isBrowser()` utility in `src/utils.ts` to safely distinguish between browser and server environments.
21
+
22
+ ### ⚡ Performance
23
+
24
+ * **Data Module (`objects.ts`):** Optimized search algorithms in `find.first`, `find.last`, `find.key`, and `find.value`. moved query normalization (`toLowerCase()`) outside of loops to significantly reduce CPU overhead.
25
+ * **Effects Module:** Added server-guards (`if (!isBrowser())`) to `fade.ts`, `slide.ts`, and `vertical.ts`. Animation logic is now skipped on the server to save resources.
26
+
27
+ ### 🛡️ Fixed (Stability & Logic)
28
+
29
+ * **Core (`core.ts`):** Added crash protection for invalid CSS selectors. `$(...)` now catches `DOMException` errors internally and logs a warning instead of crashing.
30
+ * **DOM Manipulation (`manipulation.ts`):**
31
+ * Rewrote `unwrap()` using a `Set` to safely handle parent removal without conflicts on sibling elements.
32
+ * Replaced global `window.document` usage with a `getDoc(this)` helper to prevent `ReferenceError` crashes in Node.js.
33
+
34
+
35
+ * **HTTP Module (`http/*.ts`):** Fixed potential crash when parsing JSON from `200 OK` responses that contain an empty body.
36
+ * **CSS Module (`styles.ts`):** Updated `css()` getter to access `getComputedStyle` via `el.ownerDocument` instead of global `window`.
37
+
38
+ ### 🔧 Changed & Cleaned
39
+
40
+ * **Documentation:** Removed localized German JSDoc comments to reduce source code size and maintain a consistent English-only documentation standard.
41
+ * **Config:** Fixed invalid JSON syntax in `tsconfig.json`.
42
+ * **Type Safety:** Upgraded `isObject` utility to a TypeScript Type Guard for better type inference.
package/README.md CHANGED
@@ -1,26 +1,25 @@
1
1
  # jBase
2
2
 
3
- ![Version](https://img.shields.io/badge/version-2.0.0-blue.svg?style=flat-square)
3
+ ![Version](https://img.shields.io/badge/version-2.0.2-blue.svg?style=flat-square)
4
4
  ![License](https://img.shields.io/badge/license-GPL--3.0-green.svg?style=flat-square)
5
5
  ![Size](https://img.shields.io/badge/size-lightweight-orange.svg?style=flat-square)
6
6
  ![Build](https://img.shields.io/badge/build-passing-brightgreen.svg?style=flat-square)
7
7
 
8
8
  **A modern, lightweight, and modular JavaScript framework for high-performance DOM manipulation, event handling, and data management.**
9
9
 
10
- jBase offers a familiar chainable API (similar to jQuery) but is built on modern ES6+ standards. It goes beyond UI logic by including a robust set of immutable data utilities for handling complex arrays and objects.
10
+ jBase offers a familiar chainable API (similar to jQuery) but is built on modern ES6+ standards. It goes beyond UI logic by including a robust set of immutable data utilities and **full Server-Side Rendering (SSR) support**.
11
11
 
12
12
  ---
13
13
 
14
14
  ## 📥 Installation
15
15
 
16
16
  ### via NPM / Yarn
17
- Ideal for modern web apps using bundlers like Webpack, Vite, or Rollup.
17
+ Ideal for modern web apps using bundlers (Vite, Webpack) or Node.js.
18
18
 
19
19
  ```bash
20
20
  npm install @k37z3r/jbase
21
21
  # or
22
22
  yarn add @k37z3r/jbase
23
-
24
23
  ```
25
24
 
26
25
  ### via Script Tag (CDN)
@@ -29,39 +28,75 @@ Simply download the minified file and include it in your HTML.
29
28
 
30
29
  ```html
31
30
  <script src="dist/jbase.min.js"></script>
31
+ ```
32
+
33
+ ---
34
+
35
+ ## 🖥️ Server-Side Rendering (SSR) & Node.js
36
+
37
+ jBase is **isomorphic**. You can use the exact same code on the client and the server.
38
+ To use DOM manipulation in Node.js, simply bind jBase to a `jsdom` window instance.
39
+
40
+ ### 1. Install JSDOM (Optional Peer Dependency)
41
+
42
+ ```bash
43
+ npm install jsdom
44
+ ```
45
+
46
+ ### 2. Bind to a Virtual Window
47
+
48
+ Use the `bind` factory to create a jBase instance scoped to a specific request or document.
49
+
50
+ ```javascript
51
+ import { JSDOM } from 'jsdom';
52
+ import { bind } from '@k37z3r/jbase'; // Adjust to your package name
32
53
 
54
+ // 1. Create a virtual DOM environment
55
+ const dom = new JSDOM('<!DOCTYPE html><div id="app"></div>');
56
+ const window = dom.window;
57
+
58
+ // 2. Create a scoped instance of jBase
59
+ const $ = bind(window);
60
+
61
+ // 3. Manipulate the DOM exactly like in the browser
62
+ $('#app')
63
+ .addClass('ssr-rendered')
64
+ .html('<h1>Hello from Node.js!</h1>')
65
+ .append('<p>This HTML was generated on the server.</p>');
66
+
67
+ // 4. Output the final HTML string
68
+ console.log(dom.serialize());
33
69
  ```
34
70
 
71
+ > [!NOTE]
72
+ > Browser-only features like animations (`fadeIn`, `slideUp`) or Event Bindings (`click`) are **safely ignored** in Node.js environments to prevent crashes and save resources.
73
+
35
74
  ---
36
75
 
37
- ## 🚀 Quick Start
76
+ ## 🚀 Client-Side Features
38
77
 
39
78
  jBase exposes itself globally as `jBase` and the shorthand `$`.
40
79
 
41
- ### 1. DOM Manipulation & Events
80
+ ### 1. DOM & Effects
42
81
 
43
82
  ```javascript
44
- import { $ } from 'jbase';
45
-
46
83
  $(document).ready(() => {
47
- // Select elements and modify CSS
48
- $('.card').css({
49
- 'background-color': '#f8f9fa',
50
- 'border-radius': '8px'
51
- });
52
-
53
- // Handle events
54
- $('#save-btn').on('click', (e) => {
84
+ // Event Handling
85
+ $('button.save').on('click', (e) => {
55
86
  e.preventDefault();
56
- $('.status').text('Saved successfully!').fadeIn(300);
87
+
88
+ // Chained manipulation & Animation
89
+ $('.notification')
90
+ .addClass('success')
91
+ .text('Saved successfully!')
92
+ .fadeIn(300);
57
93
  });
58
94
  });
59
-
60
95
  ```
61
96
 
62
97
  ### 2. Powerful Data Utilities
63
98
 
64
- jBase includes a unique `$.data` module for **immutable** array and object manipulation.
99
+ jBase includes a unique `$.data` module for **immutable** array and object manipulation. Optimized for high performance.
65
100
 
66
101
  ```javascript
67
102
  const users = [
@@ -69,49 +104,32 @@ const users = [
69
104
  { id: 2, name: 'Bob', role: 'user' }
70
105
  ];
71
106
 
72
- // Find specific data efficiently
107
+ // Find specific data efficiently (Optimized Search)
73
108
  const admin = $.data.find.first(users, 'admin', 'exact', 'role');
74
109
 
75
110
  // Remove data immutably (returns a new array)
76
111
  const nonAdmins = $.data.remove.byMatch(users, 'admin', 'exact', 'role');
77
-
78
112
  ```
79
113
 
80
114
  ### 3. HTTP Requests
81
115
 
82
- Simple, Promise-based AJAX wrappers.
116
+ Simple, robust AJAX wrappers that handle JSON automatically.
83
117
 
84
118
  ```javascript
85
119
  $.http.get('https://api.example.com/items')
86
120
  .then(data => console.log('Items loaded:', data))
87
121
  .catch(err => console.error('Error:', err));
88
-
89
122
  ```
90
123
 
91
124
  ---
92
125
 
93
126
  ## 📚 Documentation
94
127
 
95
- Detailed documentation for all methods is available in the **[GitHub Wiki](../../wiki)**.
96
-
128
+ Detailed documentation for all methods is available in the **[GitHub Wiki](../../wiki)** or offline **[Documentation](./wiki)**.
97
129
 
98
130
  ---
99
131
 
100
- ## 🛠 Usage in Node.js
101
-
102
- jBase can be used in Node.js environments. Note that DOM-related methods require a window context (like jsdom), but **Data** and **HTTP** utilities work natively.
103
-
104
- ```javascript
105
- const { $ } = require('jbase');
106
-
107
- // Use Data Utils on the server side
108
- const merged = $.data.mergeObjects({ a: 1 }, { b: 2 });
109
-
110
- ```
111
-
112
- ---
113
-
114
- ## ©️ License & Author
132
+ ## 📄 License
115
133
 
116
134
  **jBase** is open-source software licensed under the **[GPL-3.0-or-later](LICENSE)**.
117
135
 
@@ -119,6 +137,4 @@ const merged = $.data.mergeObjects({ a: 1 }, { b: 2 });
119
137
 
120
138
  **Website:** [sven-minio.de](https://sven-minio.de)
121
139
 
122
- **Copyright:** © 2026 Sven Minio
123
-
124
- ```
140
+ **Copyright:** © 2026 Sven Minio
package/dist/browser.d.ts CHANGED
@@ -1,19 +1,17 @@
1
1
  /**
2
2
  * @file src/browser.ts
3
- * @version 2.0.0
3
+ * @version 2.0.2
4
4
  * @since 2.0.0
5
5
  * @license GPL-3.0-or-later
6
6
  * @copyright Sven Minio 2026
7
7
  * @author Sven Minio <https://sven-minio.de>
8
8
  * @category Browser
9
9
  * @description
10
- * * 🇬🇧: Browser Entry Point. Attaches the jBase library and utilities to the global window object so they can be accessed via `$` or `jBase` in inline scripts.
11
- * * 🇩🇪: Browser-Einstiegspunkt. Hängt die jBase-Bibliothek und Utilities an das globale Window-Objekt an, damit sie über `$` oder `jBase` in Inline-Skripten verfügbar sind.
10
+ * * Browser Entry Point. Attaches the jBase library and utilities to the global window object so they can be accessed via `$` or `jBase` in inline scripts.
12
11
  */
13
- import { $, jBase, http, jB, _jB, __jB, _jBase, __jBase } from './index';
12
+ import { $, jBase, http, jB, _jB, __jB, _jBase, __jBase, __ } from './index';
14
13
  /**
15
- * * 🇬🇧: TypeScript declaration merging to extend the global Window interface.
16
- * * 🇩🇪: TypeScript Declaration Merging zur Erweiterung des globalen Window-Interfaces.
14
+ * * TypeScript declaration merging to extend the global Window interface.
17
15
  */
18
16
  declare global {
19
17
  interface Window {
@@ -24,6 +22,7 @@ declare global {
24
22
  __jB: typeof __jB;
25
23
  _jBase: typeof _jBase;
26
24
  __jBase: typeof __jBase;
25
+ __: typeof __;
27
26
  http: typeof http;
28
27
  }
29
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzE;;;GAGG;AACH,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,CAAC,EAAE,OAAO,CAAC,CAAC;QACZ,KAAK,EAAE,OAAO,KAAK,CAAC;QACpB,EAAE,EAAE,OAAO,EAAE,CAAC;QACd,GAAG,EAAE,OAAO,GAAG,CAAC;QAChB,IAAI,EAAE,OAAO,IAAI,CAAC;QAClB,MAAM,EAAE,OAAO,MAAM,CAAC;QACtB,OAAO,EAAE,OAAO,OAAO,CAAC;QACxB,IAAI,EAAE,OAAO,IAAI,CAAC;KACrB;CACJ"}
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7E;;GAEG;AACH,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,CAAC,EAAE,OAAO,CAAC,CAAC;QACZ,KAAK,EAAE,OAAO,KAAK,CAAC;QACpB,EAAE,EAAE,OAAO,EAAE,CAAC;QACd,GAAG,EAAE,OAAO,GAAG,CAAC;QAChB,IAAI,EAAE,OAAO,IAAI,CAAC;QAClB,MAAM,EAAE,OAAO,MAAM,CAAC;QACtB,OAAO,EAAE,OAAO,OAAO,CAAC;QACxB,EAAE,EAAE,OAAO,EAAE,CAAC;QACd,IAAI,EAAE,OAAO,IAAI,CAAC;KACrB;CACJ"}
package/dist/core.d.ts CHANGED
@@ -1,36 +1,31 @@
1
1
  /**
2
2
  * @file src/core.ts
3
- * @version 2.0.0
3
+ * @version 2.0.2
4
4
  * @since 2.0.0
5
5
  * @license GPL-3.0-or-later
6
6
  * @copyright Sven Minio 2026
7
7
  * @author Sven Minio <https://sven-minio.de>
8
8
  * @category Core
9
9
  * @description
10
- * * 🇬🇧: The main jBase class. Handles the selection engine, initialization, and plugin architecture.
11
- * * 🇩🇪: Die Haupt-jBase-Klasse. Behandelt die Selektions-Engine, Initialisierung und Plugin-Architektur.
10
+ * * The main jBase class. Handles the selection engine, initialization, and plugin architecture.
12
11
  */
13
12
  import { JBaseElement, JBaseInput } from './types';
14
13
  /**
15
- * * 🇬🇧: The core class of the framework, inheriting from the native Array class. Acts as a wrapper around DOM elements and enables chainable methods (Fluent Interface).
16
- * * 🇩🇪: Die Kern-Klasse des Frameworks, die von der nativen Array-Klasse erbt. Dient als Wrapper um DOM-Elemente und ermöglicht verkettbare Methoden (Fluent Interface).
14
+ * * The core class of the framework, inheriting from the native Array class. Acts as a wrapper around DOM elements and enables chainable methods (Fluent Interface).
17
15
  */
18
16
  export declare class jBase extends Array<JBaseElement> {
19
17
  selectorSource: string;
18
+ doc: Document;
20
19
  /**
21
- * * 🇬🇧: Initializes a new jBase instance. Analyzes the provided selector and populates the internal array with found or created DOM elements.
22
- * * 🇩🇪: Initialisiert eine neue jBase-Instanz. Analysiert den übergebenen Selektor und füllt das interne Array mit den gefundenen oder erstellten DOM-Elementen.
20
+ * * Initializes a new jBase instance. Analyzes the provided selector and populates the internal array with found or created DOM elements.
23
21
  * @param selector
24
- * * 🇬🇧: The input selector (CSS selector, HTML string, DOM element, or collection).
25
- * * 🇩🇪: Der Eingabe-Selektor (CSS-Selektor, HTML-String, DOM-Element oder Sammlung).
22
+ * * The input selector (CSS selector, HTML string, DOM element, or collection).
26
23
  */
27
- constructor(selector?: JBaseInput);
24
+ constructor(selector?: JBaseInput, context?: Document | Window);
28
25
  /**
29
- * * 🇬🇧: Custom serializer for JSON.stringify. Prevents circular references and huge outputs by returning a simplified preview.
30
- * * 🇩🇪: Benutzerdefinierte Serialisierung für JSON.stringify. Verhindert Zirkelbezüge und riesige Ausgaben durch Rückgabe einer vereinfachten Vorschau.
26
+ * * Custom serializer for JSON.stringify. Prevents circular references and huge outputs by returning a simplified preview.
31
27
  * @returns
32
- * * 🇬🇧: A simplified object representation for debugging.
33
- * * 🇩🇪: Eine vereinfachte Objektrepräsentation für das Debugging.
28
+ * * A simplified object representation for debugging.
34
29
  */
35
30
  toJSON(): {
36
31
  meta: string;
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEnD;;;GAGG;AACH,qBAAa,KAAM,SAAQ,KAAK,CAAC,YAAY,CAAC;IACnC,cAAc,EAAE,MAAM,CAAM;IAEnC;;;;;;OAMG;gBACS,QAAQ,CAAC,EAAE,UAAU;IAgCjC;;;;;;OAMG;IACH,MAAM;;;;;;CAYT"}
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEnD;;GAEG;AACH,qBAAa,KAAM,SAAQ,KAAK,CAAC,YAAY,CAAC;IACnC,cAAc,EAAE,MAAM,CAAM;IAC5B,GAAG,EAAE,QAAQ,CAAC;IACrB;;;;OAIG;gBACS,QAAQ,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM;IA0D9D;;;;OAIG;IACH,MAAM;;;;;;CAYT"}