eleva 1.0.0 β†’ 1.0.1

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
@@ -1,6 +1,6 @@
1
1
  # Eleva.js πŸš€
2
2
 
3
- > **Version:** `1.0.0` | **Size:** ~6KB min (~2.3KB gzip) | **Dependencies:** Zero | **TypeScript:** Yes
3
+ > **Version:** `1.0.1` | **Size:** ~6KB min (~2.3KB gzip) | **Dependencies:** Zero | **TypeScript:** Yes
4
4
 
5
5
  **Best DX for Building the Best UX** β€” Pure JavaScript, Pure Performance, Simply Elegant.
6
6
 
@@ -17,7 +17,7 @@
17
17
  <br>
18
18
 
19
19
  <p align="center">
20
- <a href="https://tarekraafat.github.io/eleva/"><img src="./docs/imgs/eleva.js Full Logo.png" alt="Eleva.js - Lightweight JavaScript Framework Logo" width="50%"></a>
20
+ <a href="https://elevajs.com/"><img src="./docs/imgs/eleva.js Full Logo.png" alt="Eleva.js Logo - A minimalist, lightweight pure vanilla JavaScript frontend framework" width="50%"></a>
21
21
  </p>
22
22
 
23
23
  <p align="center">
@@ -31,7 +31,7 @@
31
31
  **A minimalist, lightweight, pure vanilla JavaScript frontend runtime framework.**
32
32
  _Designed for the best Developer Experience (DX) to help you build exceptional User Experiences (UX). Built with love for native JavaScript and a minimal core that can be extended through a powerful plugin system β€” because sometimes, less really is more!_ 😊
33
33
 
34
- > **Stable Release**: This is `v1.0.0` - The first official stable release of Eleva.js!
34
+ > **Stable Release**: This is `v1.0.1` - The latest stable release of Eleva.js!
35
35
 
36
36
 
37
37
 
@@ -49,8 +49,9 @@ Unlike React, Vue, or Angular, Eleva:
49
49
  - **Uses real DOM** - No virtual DOM overhead for simple apps
50
50
  - **Provides signal-based reactivity** - Fine-grained updates like Solid.js
51
51
  - **Includes TypeScript support** - Built-in type declarations
52
+ - **Is just JavaScript** - If it works in vanilla JS, it works in Eleva
52
53
 
53
- Eleva is ideal for developers building lightweight web applications, prototypes, micro-frontends, or anyone seeking a simpler alternative to React, Vue, or Angular.
54
+ Eleva is ideal for developers building performance-critical applications, data-intensive dashboards (10K+ rows), micro-frontends, or anyone seeking a simpler alternative to React, Vue, or Angular.
54
55
 
55
56
  ---
56
57
 
@@ -149,6 +150,7 @@ The idea behind Eleva comes from a deep appreciation for native JavaScript. I wa
149
150
  - **πŸ”Œ Extensibility:** Extend functionality by plugging in your own ideas, such as custom state management, routing, and more.
150
151
  - **πŸš€ Performance:** Fast, efficient, and designed with modern browsers in mind.
151
152
  - **🍦 Pure Vanilla:** No dependencies, no magic-just plain JavaScript.
153
+ - **πŸ” Transparent:** No hidden layers or abstractions β€” if it works in vanilla JS, it works in Eleva.
152
154
 
153
155
  ---
154
156
 
@@ -162,8 +164,13 @@ Unlike monolithic frameworks that include everything out-of-the-box, Eleva inten
162
164
  - **🎯 Native JavaScript:** Built using pure vanilla JavaScript, Eleva integrates seamlessly with your existing code without unfamiliar syntax.
163
165
  - **βš™οΈ Configurability:** Extend Eleva's functionality with a simple API and optional plugins.
164
166
  - **πŸ†“ Freedom:** Decide the best way to implement features without unnecessary constraints.
167
+ - **πŸ” Transparent:** No magic, no hidden abstractions β€” what you write is what runs.
165
168
 
166
- This unopinionated approach makes Eleva versatile and ideal for developers who want full control over their application's design.
169
+ ### Core Philosophy
170
+
171
+ > **πŸ’‘ Vanilla JavaScript. Elevated.**
172
+
173
+ Eleva takes plain vanilla JavaScript to the next level. Signals for reactivity. Components for structure. Your JS knowledge stays front and center, not hidden behind abstractions. **If it works in vanilla JS, it works in Eleva.**
167
174
 
168
175
  ---
169
176
 
@@ -212,11 +219,11 @@ Eleva is built on a simple principle: **great DX leads to great UX**. When devel
212
219
 
213
220
  Eleva is ideal for developers seeking a lightweight, flexible, and high-performance solution for building frontend applications. Here are some scenarios where Eleva shines:
214
221
 
215
- - **πŸš€ Small to Medium Projects:** Perfect for web apps or websites that don't require the overhead of a full-fledged framework.
216
- - **⚑ Performance-Critical Applications:** Optimized reactivity and DOM diffing ensure smooth performance without bloat.
222
+ - **⚑ Performance-Critical Applications:** 240fps-capable rendering handles everything from simple counters to 10K+ row dashboards (via virtual scrolling).
223
+ - **πŸ“¦ Bundle-Sensitive Projects:** At ~6KB with zero dependencies, ideal for embedded widgets, micro-frontends, and mobile-first apps.
217
224
  - **πŸ”„ Unopinionated & Flexible:** Architect your application your way with a straightforward API and plugin system.
218
225
  - **🎯 Developer-Friendly:** Stick to pure vanilla JavaScript with familiar syntax and built-in TypeScript support.
219
- - **πŸ§ͺ Rapid Prototyping:** Quickly prototype ideas with a minimal and extendable framework.
226
+ - **πŸ§ͺ Rapid Prototyping:** Start building immediatelyβ€”no build tooling required.
220
227
  - **πŸ”Œ Extensible:** Easily add features like routing or state management through plugins.
221
228
  - **πŸš€ Built-in Routing:** Advanced client-side routing with navigation guards and reactive state via Router plugin.
222
229
  - **🎯 Advanced Attributes:** Sophisticated attribute handling with ARIA support via Attr plugin.
@@ -278,10 +285,10 @@ Benchmarks using [js-framework-benchmark](https://krausest.github.io/js-framewor
278
285
  **Performance Tips:**
279
286
  - Use `key` attribute on list items for optimal diffing
280
287
  - Eleva excels at initial renders and memory efficiency
281
- - For large lists (10K+ rows), use [virtual scrolling](./docs/examples/patterns/lists.md#virtual-scrolling) for **5.5x less memory** and **10x faster creation**
282
- - See [Large List Performance](./docs/examples/patterns/best-practices.md#large-list-performance) for detailed patterns and benchmarks
288
+ - For large lists (10K+ rows), use [virtual scrolling](https://elevajs.com/examples/patterns/lists/virtual-scrolling.html) for **5.5x less memory** and **10x faster creation**
289
+ - See [Large List Performance](https://elevajs.com/examples/patterns/best-practices/performance.html#large-list-performance) for detailed patterns and benchmarks
283
290
 
284
- > πŸ’‘ **Run benchmarks yourself:** `bun run test:benchmark` | [Detailed benchmark results](./test/__results__/performance/BENCHMARKS.md)
291
+ > πŸ’‘ **Run benchmarks yourself:** `bun run test:benchmark` | [Detailed benchmark results](https://github.com/TarekRaafat/eleva/blob/master/test/__results__/performance/BENCHMARKS.md)
285
292
 
286
293
  ---
287
294
 
@@ -494,7 +501,7 @@ Eleva's plugin system allows you to extend functionality as needed. Plugins are
494
501
  | **Core Plugins** | Bundled with Eleva | `import { X } from "eleva/plugins"` |
495
502
  | **External Plugins** | Community/Ecosystem | `npm install eleva-plugin-x` |
496
503
 
497
- > **Core plugins** (Attr, Router, Store) are official, tested, and documented. **External plugins** are community-created and installed separately. See [Plugin Documentation](docs/plugins/index.md) for details.
504
+ > **Core plugins** (Attr, Router, Store) are official, tested, and documented. **External plugins** are community-created and installed separately. See [Plugin Documentation](https://elevajs.com/plugins/) for details.
498
505
 
499
506
  #### Core Framework Only (Lightweight)
500
507
 
@@ -536,7 +543,7 @@ app.component("myComponent", {
536
543
  });
537
544
  ```
538
545
 
539
- πŸ“š **[Full Attr Documentation β†’](docs/plugins/attr.md)** - Comprehensive guide with ARIA attributes, data attributes, boolean handling, and dynamic properties.
546
+ πŸ“š **[Full Attr Documentation β†’](https://elevajs.com/plugins/attr/)** - Comprehensive guide with ARIA attributes, data attributes, boolean handling, and dynamic properties.
540
547
 
541
548
  #### Router Plugin
542
549
 
@@ -551,8 +558,8 @@ const app = new Eleva("myApp");
551
558
  // Define components
552
559
  const HomePage = { template: () => `<h1>Home</h1>` };
553
560
  const AboutPage = { template: () => `<h1>About</h1>` };
554
- const UserPage = {
555
- template: (ctx) => `<h1>User: ${ctx.router.params.id}</h1>`
561
+ const UserPage = {
562
+ template: (ctx) => `<h1>User: ${ctx.router.currentParams.value.id}</h1>`
556
563
  };
557
564
 
558
565
  // Install router with advanced configuration
@@ -589,7 +596,7 @@ const router = app.use(Router, {
589
596
  });
590
597
 
591
598
  // Access reactive router state
592
- router.currentRoute.subscribe(route => {
599
+ router.currentRoute.watch(route => {
593
600
  console.log('Route changed:', route);
594
601
  });
595
602
 
@@ -597,7 +604,7 @@ router.currentRoute.subscribe(route => {
597
604
  router.navigate('/users/123', { replace: true });
598
605
  ```
599
606
 
600
- πŸ“š **[Full Router Documentation β†’](docs/plugins/router.md)** - Comprehensive guide with 13 events, 7 reactive signals, navigation guards, scroll management, and more.
607
+ πŸ“š **[Full Router Documentation β†’](https://elevajs.com/plugins/router/)** - Comprehensive guide with 13 events, 7 reactive signals, navigation guards, scroll management, and more.
601
608
 
602
609
  #### Store Plugin
603
610
 
@@ -681,11 +688,11 @@ app.component("TodoManager", {
681
688
  state: { items: [], filter: "all" },
682
689
  actions: {
683
690
  addTodo: (state, text) => {
684
- state.todos.items.value.push({
691
+ state.todos.items.value = [...state.todos.items.value, {
685
692
  id: Date.now(),
686
693
  text,
687
694
  completed: false
688
- });
695
+ }];
689
696
  },
690
697
  toggleTodo: (state, id) => {
691
698
  const todo = state.todos.items.value.find(t => t.id === id);
@@ -722,14 +729,14 @@ console.log(app.store.getState()); // Get current state values
722
729
  app.dispatch("increment"); // Dispatch actions globally
723
730
  ```
724
731
 
725
- πŸ“š **[Full Store Documentation β†’](docs/plugins/store.md)** - Comprehensive guide with 10 API methods, persistence options, namespaces, subscriptions, and migration guides.
732
+ πŸ“š **[Full Store Documentation β†’](https://elevajs.com/plugins/store/)** - Comprehensive guide with 10 API methods, persistence options, namespaces, subscriptions, and migration guides.
726
733
 
727
734
  **Bundle Sizes:**
728
735
  - Core framework only: ~6KB (minified)
729
736
  - Core + Attr: ~8KB (minified)
730
737
  - Core + Router: ~21KB (minified)
731
738
  - Core + Store: ~12KB (minified)
732
- - Core + All plugins: ~21KB (minified)
739
+ - Core + All plugins: ~29KB (minified)
733
740
 
734
741
  **Individual Plugin Sizes:**
735
742
  - Attr: ~2.2KB (minified)
@@ -748,7 +755,7 @@ app.dispatch("increment"); // Dispatch actions globally
748
755
  - UMD: `<script src="https://cdn.jsdelivr.net/npm/eleva@latest/dist/plugins/router.umd.min.js"></script>`
749
756
  - UMD: `<script src="https://cdn.jsdelivr.net/npm/eleva@latest/dist/plugins/store.umd.min.js"></script>`
750
757
 
751
- **Individual Plugin Imports (Best for Tree-Shaking):**
758
+ **Individual Plugin Imports (Smaller Bundle Size):**
752
759
  - ESM: `import { Attr } from 'eleva/plugins/attr'`
753
760
  - ESM: `import { Router } from 'eleva/plugins/router'`
754
761
  - ESM: `import { Store } from 'eleva/plugins/store'`
@@ -756,7 +763,7 @@ app.dispatch("increment"); // Dispatch actions globally
756
763
  - CJS: `const { Router } = require('eleva/plugins/router')`
757
764
  - CJS: `const { Store } = require('eleva/plugins/store')`
758
765
 
759
- For detailed API documentation, please check the [docs](docs/index.md) folder.
766
+ For detailed API documentation, please check the [docs](https://elevajs.com) folder.
760
767
 
761
768
  ---
762
769
 
@@ -828,13 +835,13 @@ Contributions to tests are very welcome! πŸ§ͺ
828
835
 
829
836
  ## Contributing
830
837
 
831
- I'd love to have you onboard as a contributor! Whether you're adding new features, squashing bugs, or sharing ideas, your input is invaluable. Please check out [CONTRIBUTING](CONTRIBUTING.md) for guidelines on getting started.
838
+ I'd love to have you onboard as a contributor! Whether you're adding new features, squashing bugs, or sharing ideas, your input is invaluable. Please check out [CONTRIBUTING](https://github.com/TarekRaafat/eleva/blob/master/CONTRIBUTING.md) for guidelines on getting started.
832
839
 
833
840
  ---
834
841
 
835
842
  ## License
836
843
 
837
- Eleva is open-source and available under the [MIT License](LICENSE).
844
+ Eleva is open-source and available under the [MIT License](https://github.com/TarekRaafat/eleva/blob/master/LICENSE).
838
845
 
839
846
  ---
840
847
 
@@ -854,7 +861,7 @@ Eleva is open-source and available under the [MIT License](LICENSE).
854
861
 
855
862
  ---
856
863
 
857
- [Documentation](/docs/index.md) |
858
- [Examples](/examples) |
859
- [Changelog](/CHANGELOG.md) |
864
+ [Documentation](https://elevajs.com) |
865
+ [Examples](https://elevajs.com/examples) |
866
+ [Changelog](https://github.com/TarekRaafat/eleva/blob/master/CHANGELOG.md) |
860
867
  [GitHub Discussions](https://github.com/TarekRaafat/eleva/discussions)
@@ -1,4 +1,4 @@
1
- /*! Eleva Plugins v1.0.0 | MIT License | https://elevajs.com */
1
+ /*! Eleva Plugins v1.0.1 | MIT License | https://elevajs.com */
2
2
  'use strict';
3
3
 
4
4
  /**
@@ -1565,7 +1565,7 @@
1565
1565
  /** @type {RouterOptions} The merged router options. */ this.options = {
1566
1566
  mode: "hash",
1567
1567
  queryParam: "view",
1568
- viewSelector: "root",
1568
+ viewSelector: "view",
1569
1569
  ...options
1570
1570
  };
1571
1571
  /** @private @type {RouteDefinition[]} The processed list of route definitions. */ this.routes = this._processRoutes(options.routes || []);
@@ -1641,7 +1641,7 @@
1641
1641
  /**
1642
1642
  * Plugin version
1643
1643
  * @type {string}
1644
- */ version: "1.0.0",
1644
+ */ version: "1.0.1",
1645
1645
  /**
1646
1646
  * Plugin description
1647
1647
  * @type {string}