eleva 1.2.17-beta โ†’ 1.2.19-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,10 +29,9 @@ Pure JavaScript, Pure Performance, Simply Elegant.
29
29
  **A minimalist, lightweight, pure vanilla JavaScript frontend runtime framework.**
30
30
  _Built with love for native JavaScript-because sometimes, less really is more!_ ๐Ÿ˜Š
31
31
 
32
- > **Stability Notice**: This is `v1.2.17-beta` - The core functionality is stable, but I'm seeking community feedback before the final v1.0.0 release.
33
- > While suitable for production use, please be aware of the [known limitations](docs/known-limitations.md).
32
+ > **Stability Notice**: This is `v1.2.19-beta` - The core functionality is stable, but I'm seeking community feedback before the final v1.0.0 release.
34
33
 
35
- **Version:** `1.2.17-beta`
34
+ **Version:** `1.2.19-beta`
36
35
 
37
36
 
38
37
 
@@ -118,14 +117,17 @@ This unique, developer-first approach makes Eleva a standout choice for building
118
117
 
119
118
  ## Features
120
119
 
121
- - **๐Ÿงฉ Component-Based Architecture:** Create reusable UI components effortlessly.
122
- - **โšก Signal-Based Reactivity:** Fine-grained reactivity that updates only what's needed.
123
- - **๐Ÿ”” Event Handling:** Built-in event emitter for robust inter-component communication.
124
- - **๐Ÿ“ Template Parsing:** Secure and dynamic interpolation with a custom TemplateEngine.
125
- - **๐Ÿ”„ DOM Diffing & Patching:** High-performance updates without a virtual DOM.
126
- - **๐Ÿ“ฆ UMD & ES Module Builds:** Supports modern build tools and browser environments.
127
- - **๐Ÿค Friendly API:** A gentle learning curve for both beginners and seasoned developers.
128
- - **๐Ÿ’Ž Tiny Footprint & TypeScript Support:** Approximately ~6 KB minified with built-in TypeScript declarations.
120
+ - **๐Ÿงฉ Component-Based Architecture:** Create reusable UI components with a rich context API
121
+ - **โšก Signal-Based Reactivity:** Fine-grained reactivity that updates only what's needed
122
+ - **๐Ÿ”” Event Handling:** Built-in event emitter for robust inter-component communication
123
+ - **๐Ÿ“ Template Parsing:** Secure and dynamic interpolation with a custom TemplateEngine
124
+ - **๐Ÿ”„ DOM Diffing & Patching:** High-performance updates without a virtual DOM
125
+ - **๐Ÿ”„ Lifecycle Hooks:** Complete lifecycle management with before/after mount and update hooks
126
+ - **๐Ÿงน Automatic Cleanup:** Proper cleanup of resources, watchers, and child components on unmount
127
+ - **๐Ÿ”Œ Plugin System:** Extensible architecture with a simple plugin API
128
+ - **๐Ÿ“ฆ UMD & ES Module Builds:** Supports modern build tools and browser environments
129
+ - **๐Ÿค Friendly API:** A gentle learning curve for both beginners and seasoned developers
130
+ - **๐Ÿ’Ž Tiny Footprint & TypeScript Support:** Approximately ~6 KB minified with built-in TypeScript declarations
129
131
 
130
132
  ---
131
133
 
@@ -247,7 +249,12 @@ app.component("HelloWorld", {
247
249
  // The setup method is optional; if omitted, an empty state is used.
248
250
  setup({ signal }) {
249
251
  const count = signal(0);
250
- return { count };
252
+ return {
253
+ count,
254
+ onMount: ({ container, context }) => {
255
+ console.log('Component mounted!');
256
+ }
257
+ };
251
258
  },
252
259
  template: ({ count }) => `
253
260
  <div>
@@ -255,11 +262,16 @@ app.component("HelloWorld", {
255
262
  <p>Count: ${count.value}</p>
256
263
  <button @click="() => count.value++">Increment</button>
257
264
  </div>
258
- `,
265
+ `
259
266
  });
260
267
 
261
- // Mount the component to a DOM element (not a selector).
262
- app.mount(document.getElementById("app"), "HelloWorld");
268
+ // Mount the component and handle the Promise
269
+ app.mount(document.getElementById("app"), "HelloWorld")
270
+ .then(instance => {
271
+ console.log("Component mounted:", instance);
272
+ // Later...
273
+ // instance.unmount();
274
+ });
263
275
  ```
264
276
 
265
277
  Interactive Demo: [CodePen](https://codepen.io/tarekraafat/pen/GgRrxdY?editors=1010)