lego-dom 0.0.8 → 0.0.9

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 (119) hide show
  1. package/README.md +48 -432
  2. package/docs/.vitepress/config.js +4 -4
  3. package/docs/.vitepress/dist/404.html +3 -3
  4. package/docs/.vitepress/dist/api/define.html +6 -6
  5. package/docs/.vitepress/dist/api/directives.html +6 -6
  6. package/docs/.vitepress/dist/api/globals.html +7 -7
  7. package/docs/.vitepress/dist/api/index.html +7 -7
  8. package/docs/.vitepress/dist/api/lifecycle.html +6 -6
  9. package/docs/.vitepress/dist/api/route.html +6 -6
  10. package/docs/.vitepress/dist/api/vite-plugin.html +7 -7
  11. package/docs/.vitepress/dist/assets/{api_globals.md.DOjt7AV0.js → api_globals.md.CEznyRAY.js} +1 -1
  12. package/docs/.vitepress/dist/assets/api_index.md.IEYUxUIr.js +1 -0
  13. package/docs/.vitepress/dist/assets/{api_vite-plugin.md.DNn9VhL5.js → api_vite-plugin.md.DC8Li09k.js} +1 -1
  14. package/docs/.vitepress/dist/assets/{app.BG5s3B0P.js → app.BfblNDJy.js} +1 -1
  15. package/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.Crdp7-Zp.js +1 -0
  16. package/docs/.vitepress/dist/assets/chunks/{VPLocalSearchBox.BO-PSxt1.js → VPLocalSearchBox.C18E44rY.js} +1 -1
  17. package/docs/.vitepress/dist/assets/chunks/{theme.DA-iSa9B.js → theme.VX3itTW6.js} +2 -2
  18. package/docs/.vitepress/dist/assets/{examples_form.md.B3stGKbu.js → examples_form.md.DQoAgbLR.js} +1 -1
  19. package/docs/.vitepress/dist/assets/{examples_index.md.BDEG_D4J.js → examples_index.md.CVJJjXXE.js} +3 -5
  20. package/docs/.vitepress/dist/assets/{examples_routing.md.bqZ9DjDK.js → examples_routing.md.sRnA5RXw.js} +4 -4
  21. package/docs/.vitepress/dist/assets/{examples_sfc-showcase.md.DLXaUiop.js → examples_sfc-showcase.md.DPf9Wm99.js} +4 -4
  22. package/docs/.vitepress/dist/assets/{examples_todo-app.md.D5RhZoo5.js → examples_todo-app.md.CqF4JaWn.js} +2 -2
  23. package/docs/.vitepress/dist/assets/{guide_cdn-usage.md.CAjf03Lr.js → guide_cdn-usage.md.CjIjusre.js} +8 -8
  24. package/docs/.vitepress/dist/assets/{guide_components.md.BIFWF1Hc.js → guide_components.md.CMU3iM6R.js} +1 -1
  25. package/docs/.vitepress/dist/assets/guide_contributing.md.Crrv3T_0.js +1 -0
  26. package/docs/.vitepress/dist/assets/{guide_directives.md.Bi3ynu1d.js → guide_directives.md.DFwqvqOv.js} +1 -1
  27. package/docs/.vitepress/dist/assets/{guide_getting-started.md.2Nr1lp2z.js → guide_getting-started.md.DtaJPe0i.js} +5 -5
  28. package/docs/.vitepress/dist/assets/guide_index.md.DtJVpLI9.js +2 -0
  29. package/docs/.vitepress/dist/assets/guide_index.md.DtJVpLI9.lean.js +1 -0
  30. package/docs/.vitepress/dist/assets/{guide_lifecycle.md.B28j1OzS.js → guide_lifecycle.md.CfY3jlU1.js} +1 -1
  31. package/docs/.vitepress/dist/assets/{guide_quick-start.md.CNk3VGTF.js → guide_quick-start.md.CwdNNA21.js} +4 -4
  32. package/docs/.vitepress/dist/assets/{guide_reactivity.md.CVsaMaPv.js → guide_reactivity.md.DgTH0MTn.js} +8 -8
  33. package/docs/.vitepress/dist/assets/{guide_routing.md.DSpDP25o.js → guide_routing.md.nMB0QOBR.js} +3 -3
  34. package/docs/.vitepress/dist/assets/{guide_sfc.md.CVUP66tS.js → guide_sfc.md.BUkWma1z.js} +39 -39
  35. package/docs/.vitepress/dist/assets/{guide_templating.md.BgCGe4aa.js → guide_templating.md.XI3uUlYI.js} +2 -2
  36. package/docs/.vitepress/dist/assets/guide_templating.md.XI3uUlYI.lean.js +1 -0
  37. package/docs/.vitepress/dist/assets/{index.md.xV1taCED.js → index.md.M4_o26kF.js} +2 -2
  38. package/docs/.vitepress/dist/assets/index.md.M4_o26kF.lean.js +1 -0
  39. package/docs/.vitepress/dist/examples/form.html +7 -7
  40. package/docs/.vitepress/dist/examples/index.html +26 -342
  41. package/docs/.vitepress/dist/examples/routing.html +11 -11
  42. package/docs/.vitepress/dist/examples/sfc-showcase.html +11 -11
  43. package/docs/.vitepress/dist/examples/todo-app.html +8 -8
  44. package/docs/.vitepress/dist/guide/cdn-usage.html +14 -14
  45. package/docs/.vitepress/dist/guide/components.html +7 -7
  46. package/docs/.vitepress/dist/guide/contributing.html +7 -7
  47. package/docs/.vitepress/dist/guide/directives.html +8 -8
  48. package/docs/.vitepress/dist/guide/getting-started.html +11 -11
  49. package/docs/.vitepress/dist/guide/index.html +8 -8
  50. package/docs/.vitepress/dist/guide/lifecycle.html +7 -7
  51. package/docs/.vitepress/dist/guide/quick-start.html +10 -10
  52. package/docs/.vitepress/dist/guide/reactivity.html +14 -14
  53. package/docs/.vitepress/dist/guide/routing.html +9 -9
  54. package/docs/.vitepress/dist/guide/sfc.html +46 -46
  55. package/docs/.vitepress/dist/guide/templating.html +8 -8
  56. package/docs/.vitepress/dist/hashmap.json +1 -1
  57. package/docs/.vitepress/dist/index.html +8 -8
  58. package/docs/.vitepress/dist/logo.svg +1 -1
  59. package/docs/api/globals.md +1 -1
  60. package/docs/api/index.md +2 -2
  61. package/docs/api/vite-plugin.md +1 -1
  62. package/docs/examples/form.md +1 -1
  63. package/docs/examples/index.md +3 -3
  64. package/docs/examples/routing.md +4 -4
  65. package/docs/examples/sfc-showcase.md +4 -4
  66. package/docs/examples/todo-app.md +2 -2
  67. package/docs/guide/cdn-usage.md +8 -8
  68. package/docs/guide/components.md +1 -1
  69. package/docs/guide/contributing.md +2 -2
  70. package/docs/guide/directives.md +1 -1
  71. package/docs/guide/getting-started.md +6 -6
  72. package/docs/guide/index.md +9 -9
  73. package/docs/guide/lifecycle.md +1 -1
  74. package/docs/guide/quick-start.md +4 -4
  75. package/docs/guide/reactivity.md +8 -8
  76. package/docs/guide/routing.md +3 -3
  77. package/docs/guide/sfc.md +39 -39
  78. package/docs/guide/templating.md +2 -2
  79. package/docs/index.md +10 -10
  80. package/docs/public/logo.svg +17 -38
  81. package/examples/vite-app/README.md +2 -2
  82. package/examples/vite-app/index.html +8 -4
  83. package/examples/vite-app/src/components/greeting-card.lego +25 -25
  84. package/examples/vite-app/src/components/sample-component.lego +44 -44
  85. package/examples/vite-app/src/components/todo-list.lego +242 -0
  86. package/examples/vite-app/src/main.js +3 -3
  87. package/examples/vite-app/vite.config.js +2 -1
  88. package/examples.js +3 -3
  89. package/go.html +117 -0
  90. package/lego.js +2 -0
  91. package/main.js +41 -35
  92. package/package.json +8 -3
  93. package/parse-lego.test.js +1 -1
  94. package/vite-plugin.js +2 -2
  95. package/docs/.vitepress/dist/assets/api_index.md.OS6h01ct.js +0 -1
  96. package/docs/.vitepress/dist/assets/chunks/@localSearchIndexroot.DQmuWC2Z.js +0 -1
  97. package/docs/.vitepress/dist/assets/guide_contributing.md.BgbUN-Mr.js +0 -1
  98. package/docs/.vitepress/dist/assets/guide_index.md.GvZq_Yf2.js +0 -2
  99. package/docs/.vitepress/dist/assets/guide_index.md.GvZq_Yf2.lean.js +0 -1
  100. package/docs/.vitepress/dist/assets/guide_templating.md.BgCGe4aa.lean.js +0 -1
  101. package/docs/.vitepress/dist/assets/index.md.xV1taCED.lean.js +0 -1
  102. /package/docs/.vitepress/dist/assets/{api_globals.md.DOjt7AV0.lean.js → api_globals.md.CEznyRAY.lean.js} +0 -0
  103. /package/docs/.vitepress/dist/assets/{api_index.md.OS6h01ct.lean.js → api_index.md.IEYUxUIr.lean.js} +0 -0
  104. /package/docs/.vitepress/dist/assets/{api_vite-plugin.md.DNn9VhL5.lean.js → api_vite-plugin.md.DC8Li09k.lean.js} +0 -0
  105. /package/docs/.vitepress/dist/assets/{examples_form.md.B3stGKbu.lean.js → examples_form.md.DQoAgbLR.lean.js} +0 -0
  106. /package/docs/.vitepress/dist/assets/{examples_index.md.BDEG_D4J.lean.js → examples_index.md.CVJJjXXE.lean.js} +0 -0
  107. /package/docs/.vitepress/dist/assets/{examples_routing.md.bqZ9DjDK.lean.js → examples_routing.md.sRnA5RXw.lean.js} +0 -0
  108. /package/docs/.vitepress/dist/assets/{examples_sfc-showcase.md.DLXaUiop.lean.js → examples_sfc-showcase.md.DPf9Wm99.lean.js} +0 -0
  109. /package/docs/.vitepress/dist/assets/{examples_todo-app.md.D5RhZoo5.lean.js → examples_todo-app.md.CqF4JaWn.lean.js} +0 -0
  110. /package/docs/.vitepress/dist/assets/{guide_cdn-usage.md.CAjf03Lr.lean.js → guide_cdn-usage.md.CjIjusre.lean.js} +0 -0
  111. /package/docs/.vitepress/dist/assets/{guide_components.md.BIFWF1Hc.lean.js → guide_components.md.CMU3iM6R.lean.js} +0 -0
  112. /package/docs/.vitepress/dist/assets/{guide_contributing.md.BgbUN-Mr.lean.js → guide_contributing.md.Crrv3T_0.lean.js} +0 -0
  113. /package/docs/.vitepress/dist/assets/{guide_directives.md.Bi3ynu1d.lean.js → guide_directives.md.DFwqvqOv.lean.js} +0 -0
  114. /package/docs/.vitepress/dist/assets/{guide_getting-started.md.2Nr1lp2z.lean.js → guide_getting-started.md.DtaJPe0i.lean.js} +0 -0
  115. /package/docs/.vitepress/dist/assets/{guide_lifecycle.md.B28j1OzS.lean.js → guide_lifecycle.md.CfY3jlU1.lean.js} +0 -0
  116. /package/docs/.vitepress/dist/assets/{guide_quick-start.md.CNk3VGTF.lean.js → guide_quick-start.md.CwdNNA21.lean.js} +0 -0
  117. /package/docs/.vitepress/dist/assets/{guide_reactivity.md.CVsaMaPv.lean.js → guide_reactivity.md.DgTH0MTn.lean.js} +0 -0
  118. /package/docs/.vitepress/dist/assets/{guide_routing.md.DSpDP25o.lean.js → guide_routing.md.nMB0QOBR.lean.js} +0 -0
  119. /package/docs/.vitepress/dist/assets/{guide_sfc.md.CVUP66tS.lean.js → guide_sfc.md.BUkWma1z.lean.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  # CDN Usage
2
2
 
3
- LegoJS works perfectly without any build tools. Just include it via CDN and start building!
3
+ Lego works perfectly without any build tools. Just include it via CDN and start building!
4
4
 
5
5
  ## Quick Start
6
6
 
@@ -19,7 +19,7 @@ LegoJS works perfectly without any build tools. Just include it via CDN and star
19
19
  <!-- Use it -->
20
20
  <hello-world b-data="{ message: 'Hello from CDN!' }"></hello-world>
21
21
 
22
- <!-- Include LegoJS -->
22
+ <!-- Include Lego -->
23
23
  <script src="https://unpkg.com/lego-dom/main.js"></script>
24
24
  </body>
25
25
  </html>
@@ -65,7 +65,7 @@ Here's a full working application using only CDN:
65
65
  <head>
66
66
  <meta charset="UTF-8">
67
67
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
68
- <title>Todo App - LegoJS</title>
68
+ <title>Todo App - Lego</title>
69
69
  <style>
70
70
  body {
71
71
  font-family: system-ui, sans-serif;
@@ -146,7 +146,7 @@ Here's a full working application using only CDN:
146
146
  Lego.define('todo-app', Lego.registry['todo-app'].innerHTML, {
147
147
  newTodo: '',
148
148
  todos: [
149
- { text: 'Learn LegoJS', done: true },
149
+ { text: 'Learn Lego', done: true },
150
150
  { text: 'Build something awesome', done: false }
151
151
  ],
152
152
  addTodo() {
@@ -169,7 +169,7 @@ Here's a full working application using only CDN:
169
169
 
170
170
  ## Progressive Enhancement
171
171
 
172
- LegoJS is perfect for progressively enhancing existing sites:
172
+ Lego is perfect for progressively enhancing existing sites:
173
173
 
174
174
  ```html
175
175
  <!-- Your existing page -->
@@ -213,14 +213,14 @@ LegoJS is perfect for progressively enhancing existing sites:
213
213
 
214
214
  ## Embedding in Existing Apps
215
215
 
216
- LegoJS components work alongside other frameworks:
216
+ Lego components work alongside other frameworks:
217
217
 
218
218
  ```html
219
219
  <!-- Works fine with jQuery, Bootstrap, etc. -->
220
220
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
221
221
  <script src="https://unpkg.com/lego-dom/main.js"></script>
222
222
 
223
- <!-- Your LegoJS component -->
223
+ <!-- Your Lego component -->
224
224
  <my-component></my-component>
225
225
 
226
226
  <!-- Your jQuery code -->
@@ -271,7 +271,7 @@ For maximum security:
271
271
 
272
272
  ## Browser Compatibility
273
273
 
274
- LegoJS works in all modern browsers:
274
+ Lego works in all modern browsers:
275
275
 
276
276
  - ✅ Chrome 63+
277
277
  - ✅ Firefox 63+
@@ -1,6 +1,6 @@
1
1
  # Components
2
2
 
3
- Learn how to create and use components in LegoJS.
3
+ Learn how to create and use components in Lego.
4
4
 
5
5
  ## What is a Component?
6
6
 
@@ -1,12 +1,12 @@
1
1
  # Contributing
2
2
 
3
- Thank you for your interest in contributing to LegoJS!
3
+ Thank you for your interest in contributing to Lego!
4
4
 
5
5
  ## Development Setup
6
6
 
7
7
  1. Clone the repository:
8
8
  ```bash
9
- git clone https://github.com/rayattack/LegoJS.git
9
+ git clone https://github.com/rayattack/Lego.git
10
10
  ```
11
11
 
12
12
  2. Install dependencies:
@@ -243,7 +243,7 @@ Initialize component state.
243
243
  ```html
244
244
  <todo-list b-data="{
245
245
  todos: [
246
- { text: 'Learn LegoJS', done: true },
246
+ { text: 'Learn Lego', done: true },
247
247
  { text: 'Build app', done: false }
248
248
  ],
249
249
  filter: 'all'
@@ -1,25 +1,25 @@
1
1
  # Getting Started
2
2
 
3
- Get up and running with LegoJS in under 5 minutes.
3
+ Get up and running with Lego in under 5 minutes.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ### Option 1: CDN (No Build Tools)
8
8
 
9
- The fastest way to try LegoJS is via CDN:
9
+ The fastest way to try Lego is via CDN:
10
10
 
11
11
  ```html
12
12
  <!DOCTYPE html>
13
13
  <html>
14
14
  <head>
15
- <title>My LegoJS App</title>
15
+ <title>My Lego App</title>
16
16
  </head>
17
17
  <body>
18
18
  <my-component></my-component>
19
19
 
20
20
  <script src="https://unpkg.com/lego-dom/main.js"></script>
21
21
  <template b-id="my-component">
22
- <h1>Hello LegoJS!</h1>
22
+ <h1>Hello Lego!</h1>
23
23
  </template>
24
24
  </body>
25
25
  </html>
@@ -41,7 +41,7 @@ Then import it:
41
41
  import { Lego } from 'lego-dom';
42
42
 
43
43
  Lego.define('my-component', `
44
- <h1>Hello LegoJS!</h1>
44
+ <h1>Hello Lego!</h1>
45
45
  `);
46
46
  ```
47
47
 
@@ -220,7 +220,7 @@ Special attributes for common patterns:
220
220
 
221
221
  ## What You've Learned
222
222
 
223
- - ✅ Three different ways to install LegoJS
223
+ - ✅ Three different ways to install Lego
224
224
  - ✅ How to create your first component
225
225
  - ✅ The basics of templates, state, and events
226
226
  - ✅ Available directives
@@ -1,12 +1,12 @@
1
- # What is LegoJS?
1
+ # What is Lego?
2
2
 
3
- LegoJS is a tiny, zero-dependency JavaScript library for building reactive Web Components directly in the browser.
3
+ LegoDOM is a tiny, zero-dependency JavaScript library for building reactive Web Components directly in the browser.
4
4
 
5
5
  ## The Philosophy
6
6
 
7
- LegoJS is built on a simple belief: **the DOM is not your enemy**.
7
+ LegoDOM is built on a simple belief: **the DOM is not your enemy**.
8
8
 
9
- Modern frameworks introduced virtual DOMs and compilation steps to solve problems that arose from trying to make the DOM do things it wasn't designed for. LegoJS takes a different approach—it embraces the DOM and Web Components as they were intended to be used.
9
+ Modern frameworks introduced virtual DOMs and compilation steps to solve problems that arose from trying to make the DOM do things it wasn't designed for. Lego takes a different approach—it embraces the DOM and Web Components as they were intended to be used.
10
10
 
11
11
  ## Key Principles
12
12
 
@@ -17,7 +17,7 @@ There are no new concepts to learn. If you know:
17
17
  - JavaScript objects
18
18
  - Basic DOM events
19
19
 
20
- You already know LegoJS.
20
+ You already know Lego.
21
21
 
22
22
  ### 2. No Build Step Required
23
23
 
@@ -34,7 +34,7 @@ component._studs.count++;
34
34
 
35
35
  ### 4. Web Standards First
36
36
 
37
- LegoJS uses:
37
+ Lego uses:
38
38
  - **Web Components** - Standard custom elements
39
39
  - **Shadow DOM** - Native encapsulation
40
40
  - **ES6 Proxies** - For reactivity
@@ -42,9 +42,9 @@ LegoJS uses:
42
42
 
43
43
  No proprietary APIs. Everything is built on web standards.
44
44
 
45
- ## When to Use LegoJS
45
+ ## When to Use Lego
46
46
 
47
- ### ✅ LegoJS is Great For:
47
+ ### ✅ Lego is Great For:
48
48
 
49
49
  - **Small to medium applications** where framework overhead isn't worth it
50
50
  - **Embedded widgets** that need to work anywhere
@@ -74,7 +74,7 @@ Compare that to:
74
74
 
75
75
  ## What Makes It Different?
76
76
 
77
- | Aspect | LegoJS | Traditional Frameworks |
77
+ | Aspect | Lego | Traditional Frameworks |
78
78
  |--------|--------|----------------------|
79
79
  | **Reactivity** | Direct object mutation | setState / dispatch / ref() |
80
80
  | **Templates** | HTML with `{{ }}` | JSX / template syntax |
@@ -1,6 +1,6 @@
1
1
  # Lifecycle Hooks
2
2
 
3
- Learn about component lifecycle hooks in LegoJS.
3
+ Learn about component lifecycle hooks in Lego.
4
4
 
5
5
  ## Overview
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Quick Start
2
2
 
3
- The fastest way to get started with LegoJS is using the CDN. No build tools required!
3
+ The fastest way to get started with Lego is using the CDN. No build tools required!
4
4
 
5
5
  ## 1. Create an HTML file
6
6
 
@@ -9,7 +9,7 @@ The fastest way to get started with LegoJS is using the CDN. No build tools requ
9
9
  <html lang="en">
10
10
  <head>
11
11
  <meta charset="UTF-8">
12
- <title>LegoJS Quick Start</title>
12
+ <title>Lego Quick Start</title>
13
13
  </head>
14
14
  <body>
15
15
  <!-- 2. Use your component -->
@@ -24,7 +24,7 @@ The fastest way to get started with LegoJS is using the CDN. No build tools requ
24
24
  <button @click="toggle()">Toggle Name</button>
25
25
  </template>
26
26
 
27
- <!-- 4. Load LegoJS -->
27
+ <!-- 4. Load Lego -->
28
28
  <script src="https://unpkg.com/lego-dom/main.js"></script>
29
29
 
30
30
  <!-- 5. Define logic (Optional) -->
@@ -32,7 +32,7 @@ The fastest way to get started with LegoJS is using the CDN. No build tools requ
32
32
  document.querySelector('hello-world').state = {
33
33
  name: 'World',
34
34
  toggle() {
35
- this.name = this.name === 'World' ? 'LegoJS' : 'World';
35
+ this.name = this.name === 'World' ? 'Lego' : 'World';
36
36
  }
37
37
  };
38
38
  </script>
@@ -1,6 +1,6 @@
1
1
  # Reactivity
2
2
 
3
- Understand how LegoJS makes your UI automatically update when data changes.
3
+ Understand how Lego makes your UI automatically update when data changes.
4
4
 
5
5
  ## The Core Concept
6
6
 
@@ -15,7 +15,7 @@ No `setState()`, no `dispatch()`, no special syntax. Just mutate the data.
15
15
 
16
16
  ## How It Works
17
17
 
18
- LegoJS uses **ES6 Proxies** to track changes:
18
+ Lego uses **ES6 Proxies** to track changes:
19
19
 
20
20
  ```js
21
21
  const reactive = (obj, el) => {
@@ -62,7 +62,7 @@ this.items.sort(); // ✅ Reactive
62
62
  this.user.profile.age = 30; // ✅ Reactive
63
63
  ```
64
64
 
65
- LegoJS recursively wraps nested objects in proxies.
65
+ Lego recursively wraps nested objects in proxies.
66
66
 
67
67
  ### ✅ Object Deletion
68
68
 
@@ -112,7 +112,7 @@ Initialize all properties upfront:
112
112
 
113
113
  ## Batching Updates
114
114
 
115
- LegoJS batches updates using `requestAnimationFrame`:
115
+ Lego batches updates using `requestAnimationFrame`:
116
116
 
117
117
  ```js
118
118
  this.count = 1;
@@ -296,7 +296,7 @@ console.log(component._studs.count); // Actual value
296
296
  const count = ref(0);
297
297
  count.value++;
298
298
 
299
- // LegoJS
299
+ // Lego
300
300
  this.count++;
301
301
  ```
302
302
 
@@ -307,7 +307,7 @@ this.count++;
307
307
  const [count, setCount] = useState(0);
308
308
  setCount(count + 1);
309
309
 
310
- // LegoJS
310
+ // Lego
311
311
  this.count++;
312
312
  ```
313
313
 
@@ -318,11 +318,11 @@ this.count++;
318
318
  let count = 0;
319
319
  count++;
320
320
 
321
- // LegoJS
321
+ // Lego
322
322
  this.count++;
323
323
  ```
324
324
 
325
- LegoJS is closest to Svelte's model but uses Proxies instead of compilation.
325
+ Lego is closest to Svelte's model but uses Proxies instead of compilation.
326
326
 
327
327
  ## Advanced Patterns
328
328
 
@@ -1,6 +1,6 @@
1
1
  # Routing
2
2
 
3
- LegoJS includes a built-in client-side router for building single-page applications.
3
+ Lego includes a built-in client-side router for building single-page applications.
4
4
 
5
5
  ## Basic Setup
6
6
 
@@ -234,7 +234,7 @@ matchRoute(); // Initial check
234
234
 
235
235
  ## Nested Routes
236
236
 
237
- While LegoJS doesn't have built-in nested routing, you can implement it:
237
+ While Lego doesn't have built-in nested routing, you can implement it:
238
238
 
239
239
  ```html
240
240
  <template b-id="blog-layout">
@@ -271,7 +271,7 @@ Example: `/search?q=legojs&page=2`
271
271
 
272
272
  ## Hash vs History Mode
273
273
 
274
- LegoJS uses History API (pushState) by default, giving you clean URLs:
274
+ Lego uses History API (pushState) by default, giving you clean URLs:
275
275
 
276
276
  ✅ `/about`
277
277
  ✅ `/user/123`
package/docs/guide/sfc.md CHANGED
@@ -43,43 +43,6 @@ Here's a complete example (`user-card.lego`):
43
43
 
44
44
  ```html
45
45
  <template>
46
- <style>
47
- self {
48
- display: block;
49
- padding: 1.5rem;
50
- border: 2px solid #ddd;
51
- border-radius: 8px;
52
- max-width: 300px;
53
- }
54
-
55
- .avatar {
56
- width: 80px;
57
- height: 80px;
58
- border-radius: 50%;
59
- object-fit: cover;
60
- }
61
-
62
- .name {
63
- font-size: 1.5rem;
64
- font-weight: bold;
65
- margin: 0.5rem 0;
66
- }
67
-
68
- .bio {
69
- color: #666;
70
- margin: 0.5rem 0;
71
- }
72
-
73
- button {
74
- background: #4CAF50;
75
- color: white;
76
- border: none;
77
- padding: 0.5rem 1rem;
78
- border-radius: 4px;
79
- cursor: pointer;
80
- }
81
- </style>
82
-
83
46
  <img class="avatar" src="{{ avatarUrl }}" alt="{{ name }}">
84
47
  <h2 class="name">{{ name }}</h2>
85
48
  <p class="bio">{{ bio }}</p>
@@ -89,6 +52,43 @@ Here's a complete example (`user-card.lego`):
89
52
  </button>
90
53
  </template>
91
54
 
55
+ <style>
56
+ self {
57
+ display: block;
58
+ padding: 1.5rem;
59
+ border: 2px solid #ddd;
60
+ border-radius: 8px;
61
+ max-width: 300px;
62
+ }
63
+
64
+ .avatar {
65
+ width: 80px;
66
+ height: 80px;
67
+ border-radius: 50%;
68
+ object-fit: cover;
69
+ }
70
+
71
+ .name {
72
+ font-size: 1.5rem;
73
+ font-weight: bold;
74
+ margin: 0.5rem 0;
75
+ }
76
+
77
+ .bio {
78
+ color: #666;
79
+ margin: 0.5rem 0;
80
+ }
81
+
82
+ button {
83
+ background: #4CAF50;
84
+ color: white;
85
+ border: none;
86
+ padding: 0.5rem 1rem;
87
+ border-radius: 4px;
88
+ cursor: pointer;
89
+ }
90
+ </style>
91
+
92
92
  <script>
93
93
  export default {
94
94
  name: 'John Doe',
@@ -173,7 +173,7 @@ In your `index.html`:
173
173
  <!DOCTYPE html>
174
174
  <html>
175
175
  <head>
176
- <title>My LegoJS App</title>
176
+ <title>My Lego App</title>
177
177
  </head>
178
178
  <body>
179
179
  <div id="app">
@@ -210,7 +210,7 @@ Component names **must**:
210
210
 
211
211
  ### Template Section
212
212
 
213
- Contains your component's HTML markup with LegoJS directives:
213
+ Contains your component's HTML markup with Lego directives:
214
214
 
215
215
  ```html
216
216
  <template>
@@ -1,6 +1,6 @@
1
1
  # Templating
2
2
 
3
- Learn about LegoJS templating features and syntax.
3
+ Learn about Lego templating features and syntax.
4
4
 
5
5
  ## Interpolation
6
6
 
@@ -72,7 +72,7 @@ Interpolate in any attribute:
72
72
 
73
73
  ## Escaping
74
74
 
75
- LegoJS automatically escapes HTML to prevent XSS:
75
+ Lego automatically escapes HTML to prevent XSS:
76
76
 
77
77
  ```js
78
78
  {
package/docs/index.md CHANGED
@@ -2,19 +2,19 @@
2
2
  layout: home
3
3
 
4
4
  hero:
5
- name: LegoJS
5
+ name: LegoDOM
6
6
  text: Build Reactive Web Components
7
- tagline: A tiny, zero-dependency JavaScript library for creating reactive Web Components directly in the browser
7
+ tagline: A tiny, zero-dependency Web library for creating reactive Web Components directly in the browser
8
8
  image:
9
9
  src: /logo.svg
10
- alt: LegoJS
10
+ alt: Lego
11
11
  actions:
12
12
  - theme: brand
13
13
  text: Get Started
14
14
  link: /guide/getting-started
15
15
  - theme: alt
16
16
  text: View on GitHub
17
- link: https://github.com/rayattack/LegoJS
17
+ link: https://github.com/rayattack/Lego
18
18
  - theme: alt
19
19
  text: Try Examples
20
20
  link: /examples/
@@ -87,7 +87,7 @@ features:
87
87
 
88
88
  That's it. No build step, no npm, no configuration.
89
89
 
90
- ## Why LegoJS?
90
+ ## Why Lego?
91
91
 
92
92
  **For small projects**, you get reactive components without the overhead of a full framework.
93
93
 
@@ -97,7 +97,7 @@ That's it. No build step, no npm, no configuration.
97
97
 
98
98
  ## Comparison
99
99
 
100
- | Feature | LegoJS | Vue | React |
100
+ | Feature | Lego | Vue | React |
101
101
  |---------|--------|-----|-------|
102
102
  | Size | < 17KB | ~33KB | ~40KB |
103
103
  | Dependencies | 0 | Many | Many |
@@ -110,7 +110,7 @@ That's it. No build step, no npm, no configuration.
110
110
 
111
111
  ## Browser Support
112
112
 
113
- LegoJS works in all modern browsers that support:
113
+ Lego works in all modern browsers that support:
114
114
  - Web Components
115
115
  - Shadow DOM
116
116
  - ES6 Proxy
@@ -120,7 +120,7 @@ This includes Chrome 63+, Firefox 63+, Safari 11.1+, and Edge 79+.
120
120
 
121
121
  ## Community
122
122
 
123
- - 📖 [Documentation](https://rayattack.github.io/LegoJS/)
124
- - 💬 [Discussions](https://github.com/rayattack/LegoJS/discussions)
125
- - 🐛 [Issue Tracker](https://github.com/rayattack/LegoJS/issues)
123
+ - 📖 [Documentation](https://rayattack.github.io/Lego/)
124
+ - 💬 [Discussions](https://github.com/rayattack/Lego/discussions)
125
+ - 🐛 [Issue Tracker](https://github.com/rayattack/Lego/issues)
126
126
  - 📦 [npm Package](https://www.npmjs.com/package/lego-dom)
@@ -1,38 +1,17 @@
1
- <svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <defs>
3
- <linearGradient id="blockGrad" x1="0%" y1="0%" x2="100%" y2="100%">
4
- <stop offset="0%" style="stop-color:#FF4B2B" />
5
- <stop offset="100%" style="stop-color:#FF416C" />
6
- </linearGradient>
7
- <filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
8
- <feGaussianBlur in="SourceAlpha" stdDeviation="3" />
9
- <feOffset dx="2" dy="4" result="offsetblur" />
10
- <feComponentTransfer>
11
- <feFuncA type="linear" slope="0.2" />
12
- </feComponentTransfer>
13
- <feMerge>
14
- <feMergeNode />
15
- <feMergeNode in="SourceGraphic" />
16
- </feMerge>
17
- </filter>
18
- </defs>
19
-
20
- <g filter="url(#shadow)" transform="translate(40, 40)">
21
- <path d="M60 80 L90 65 L90 95 L60 110 Z" fill="#D32F2F" />
22
- <path d="M90 65 L120 80 L120 110 L90 95 Z" fill="#B71C1C" />
23
- <path d="M60 80 L90 65 L120 80 L90 95 Z" fill="url(#blockGrad)" />
24
- <circle cx="90" cy="80" r="4" fill="white" fill-opacity="0.3" />
25
-
26
- <path d="M30 65 L60 50 L60 80 L30 95 Z" fill="#D32F2F" />
27
- <path d="M60 50 L90 65 L90 95 L60 80 Z" fill="#B71C1C" />
28
- <path d="M30 65 L60 50 L90 65 L60 80 Z" fill="url(#blockGrad)" />
29
- <circle cx="60" cy="65" r="4" fill="white" fill-opacity="0.3" />
30
-
31
- <path d="M30 35 L60 20 L60 50 L30 65 Z" fill="#D32F2F" />
32
- <path d="M60 20 L90 35 L90 65 L60 50 Z" fill="#B71C1C" />
33
- <path d="M30 35 L60 20 L90 35 L60 50 Z" fill="url(#blockGrad)" />
34
- <circle cx="60" cy="35" r="4" fill="white" fill-opacity="0.3" />
35
- </g>
36
-
37
- <text x="100" y="180" font-family="Arial, sans-serif" font-weight="900" font-size="24" fill="#333" text-anchor="middle" letter-spacing="1">LEGO.JS</text>
38
- </svg>
1
+ <svg width="270" height="270" viewBox="0 0 270 270" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M19.8 199H250.2C257.88 199 263 202.657 263 208.143V253.857C263 259.343 257.88 263 250.2 263H19.8C12.12 263 7.00001 259.343 7.00001 253.857V208.143C7.00001 202.657 12.12 199 19.8 199Z" fill="#FFCA28"/>
3
+ <path d="M205.194 199H238.226V183C238.226 178.2 234.923 175 229.968 175H213.452C208.497 175 205.194 178.2 205.194 183V199Z" fill="#FFCA28"/>
4
+ <path d="M147.387 199H180.419V183C180.419 178.2 177.116 175 172.161 175H155.645C150.69 175 147.387 178.2 147.387 183V199Z" fill="#FFCA28"/>
5
+ <path d="M15.2581 143H106.097C111.052 143 114.355 146.2 114.355 151V191C114.355 195.8 111.052 199 106.097 199H15.2581C10.3032 199 7 195.8 7 191V151C7 146.2 10.3032 143 15.2581 143Z" fill="#FFCA28"/>
6
+ <path d="M15.2581 87H106.097C111.052 87 114.355 90.2 114.355 95V135C114.355 139.8 111.052 143 106.097 143H15.2581C10.3032 143 7 139.8 7 135V95C7 90.2 10.3032 87 15.2581 87Z" fill="#FFCA28"/>
7
+ <path d="M15.2581 31H106.097C111.052 31 114.355 34.2 114.355 39V79C114.355 83.8 111.052 87 106.097 87H15.2581C10.3032 87 7 83.8 7 79V39C7 34.2 10.3032 31 15.2581 31Z" fill="#FFCA28"/>
8
+ <path d="M73.0645 31H106.097V15C106.097 10.2 102.794 7 97.8387 7H81.3226C76.3677 7 73.0645 10.2 73.0645 15V31Z" fill="#FFCA28"/>
9
+ <path d="M15.2581 31H48.2903V15C48.2903 10.2 44.9871 7 40.0323 7H23.5161C18.5613 7 15.2581 10.2 15.2581 15V31Z" fill="#FFCA28"/>
10
+ <path d="M256 208.143C256 207.853 255.974 207.612 255.411 207.21C254.671 206.682 253.019 206 250.2 206H19.7998C16.9807 206 15.3288 206.682 14.5889 207.21C14.0263 207.612 14 207.853 14 208.143V253.857C14 254.147 14.0263 254.388 14.5889 254.79C15.3288 255.318 16.9807 256 19.7998 256H250.2C253.019 256 254.671 255.318 255.411 254.79C255.974 254.388 256 254.147 256 253.857V208.143ZM173.419 183C173.419 182.606 173.352 182.39 173.319 182.308C173.302 182.265 173.29 182.243 173.285 182.236C173.281 182.23 173.278 182.228 173.277 182.228C173.275 182.226 173.266 182.217 173.244 182.203C173.22 182.188 173.174 182.163 173.098 182.135C172.946 182.078 172.647 182 172.161 182H155.646C155.16 182 154.861 182.078 154.709 182.135C154.632 182.163 154.585 182.188 154.562 182.203C154.538 182.218 154.529 182.227 154.528 182.228C154.527 182.228 154.526 182.23 154.521 182.236C154.517 182.243 154.504 182.264 154.486 182.308C154.453 182.39 154.387 182.606 154.387 183V192H173.419V183ZM231.226 183C231.226 182.606 231.159 182.39 231.126 182.308C231.109 182.264 231.095 182.243 231.091 182.236C231.087 182.23 231.085 182.228 231.084 182.228C231.082 182.226 231.073 182.217 231.051 182.203C231.027 182.188 230.981 182.163 230.904 182.135C230.752 182.078 230.453 182 229.968 182H213.451C212.966 182 212.666 182.078 212.515 182.135C212.438 182.163 212.392 182.188 212.368 182.203C212.345 182.218 212.336 182.227 212.335 182.228C212.334 182.228 212.332 182.23 212.328 182.236C212.324 182.243 212.31 182.264 212.293 182.308C212.26 182.39 212.193 182.606 212.193 183V192H231.226V183ZM107.354 151C107.354 150.606 107.288 150.39 107.255 150.308C107.238 150.264 107.224 150.243 107.22 150.236C107.216 150.23 107.214 150.228 107.213 150.228C107.211 150.226 107.202 150.217 107.18 150.203C107.156 150.188 107.109 150.163 107.033 150.135C106.881 150.078 106.582 150 106.097 150H15.2578C14.7724 150 14.4731 150.078 14.3213 150.135C14.2449 150.163 14.1986 150.188 14.1748 150.203C14.1521 150.217 14.143 150.226 14.1416 150.228C14.1408 150.228 14.139 150.23 14.1348 150.236C14.1304 150.243 14.1168 150.264 14.0996 150.308C14.0667 150.39 14 150.606 14 151V191C14 191.394 14.0667 191.61 14.0996 191.692C14.1168 191.736 14.1304 191.757 14.1348 191.764C14.139 191.77 14.1408 191.772 14.1416 191.772C14.143 191.774 14.1521 191.783 14.1748 191.797C14.1986 191.812 14.2449 191.837 14.3213 191.865C14.4731 191.922 14.7724 192 15.2578 192H106.097C106.582 192 106.881 191.922 107.033 191.865C107.109 191.837 107.156 191.812 107.18 191.797C107.202 191.783 107.211 191.774 107.213 191.772C107.214 191.772 107.216 191.77 107.22 191.764C107.224 191.757 107.238 191.736 107.255 191.692C107.288 191.61 107.354 191.394 107.354 191V151ZM107.354 95C107.354 94.6058 107.288 94.3904 107.255 94.3076C107.238 94.2644 107.224 94.2429 107.22 94.2363C107.216 94.2302 107.214 94.2283 107.213 94.2275C107.211 94.2257 107.202 94.2168 107.18 94.2031C107.156 94.1883 107.109 94.1632 107.033 94.1348C106.881 94.0782 106.582 94 106.097 94H15.2578C14.7724 94 14.4731 94.0782 14.3213 94.1348C14.2449 94.1632 14.1986 94.1883 14.1748 94.2031C14.1521 94.2173 14.143 94.2262 14.1416 94.2275C14.1408 94.2284 14.139 94.2301 14.1348 94.2363C14.1304 94.2429 14.1168 94.2643 14.0996 94.3076C14.0667 94.3904 14 94.6058 14 95V135C14 135.394 14.0667 135.61 14.0996 135.692C14.1168 135.736 14.1304 135.757 14.1348 135.764C14.139 135.77 14.1408 135.772 14.1416 135.772C14.143 135.774 14.1521 135.783 14.1748 135.797C14.1986 135.812 14.2449 135.837 14.3213 135.865C14.4731 135.922 14.7724 136 15.2578 136H106.097C106.582 136 106.881 135.922 107.033 135.865C107.109 135.837 107.156 135.812 107.18 135.797C107.202 135.783 107.211 135.774 107.213 135.772C107.214 135.772 107.216 135.77 107.22 135.764C107.224 135.757 107.238 135.736 107.255 135.692C107.288 135.61 107.354 135.394 107.354 135V95ZM107.354 39C107.354 38.6058 107.288 38.3904 107.255 38.3076C107.238 38.2644 107.224 38.2429 107.22 38.2363C107.216 38.2302 107.214 38.2283 107.213 38.2275C107.211 38.2257 107.202 38.2168 107.18 38.2031C107.156 38.1883 107.109 38.1632 107.033 38.1348C106.881 38.0782 106.582 38 106.097 38H15.2578C14.7724 38 14.4731 38.0782 14.3213 38.1348C14.2449 38.1632 14.1986 38.1883 14.1748 38.2031C14.1521 38.2173 14.143 38.2262 14.1416 38.2275C14.1408 38.2284 14.139 38.2301 14.1348 38.2363C14.1304 38.2429 14.1168 38.2643 14.0996 38.3076C14.0667 38.3904 14 38.6058 14 39V79C14 79.3942 14.0667 79.6096 14.0996 79.6924C14.1168 79.7357 14.1304 79.7571 14.1348 79.7637C14.139 79.7699 14.1408 79.7716 14.1416 79.7725C14.143 79.7738 14.1521 79.7827 14.1748 79.7969C14.1986 79.8117 14.2449 79.8368 14.3213 79.8652C14.4731 79.9218 14.7724 80 15.2578 80H106.097C106.582 80 106.881 79.9218 107.033 79.8652C107.109 79.8368 107.156 79.8117 107.18 79.7969C107.202 79.7832 107.211 79.7743 107.213 79.7725C107.214 79.7717 107.216 79.7698 107.22 79.7637C107.224 79.7571 107.238 79.7356 107.255 79.6924C107.288 79.6096 107.354 79.3942 107.354 79V39ZM41.29 15C41.29 14.6058 41.2233 14.3904 41.1904 14.3076C41.1732 14.2644 41.1596 14.2429 41.1553 14.2363C41.1511 14.2302 41.1493 14.2283 41.1484 14.2275C41.1466 14.2258 41.1372 14.2169 41.1152 14.2031C41.0914 14.1883 41.045 14.1632 40.9688 14.1348C40.8169 14.0782 40.5178 14 40.0322 14H23.5166C23.031 14 22.7309 14.0782 22.5791 14.1348C22.5027 14.1633 22.4563 14.1883 22.4326 14.2031C22.4092 14.2177 22.4004 14.2266 22.3994 14.2275C22.3986 14.2284 22.3968 14.23 22.3926 14.2363C22.3882 14.2429 22.3747 14.2643 22.3574 14.3076C22.3245 14.3904 22.2578 14.6058 22.2578 15V24H41.29V15ZM99.0967 15C99.0967 14.6058 99.03 14.3904 98.9971 14.3076C98.9799 14.2644 98.9663 14.2429 98.9619 14.2363C98.9577 14.2301 98.9559 14.2283 98.9551 14.2275C98.9535 14.2261 98.9443 14.2171 98.9219 14.2031C98.8981 14.1883 98.8517 14.1632 98.7754 14.1348C98.6236 14.0782 98.3244 14 97.8389 14H81.3223C80.8369 14 80.5375 14.0782 80.3857 14.1348C80.3094 14.1632 80.263 14.1883 80.2393 14.2031C80.2164 14.2174 80.2073 14.2263 80.2061 14.2275C80.2052 14.2284 80.2034 14.23 80.1992 14.2363C80.1948 14.2429 80.1813 14.2643 80.1641 14.3076C80.1312 14.3904 80.0645 14.6058 80.0645 15V24H99.0967V15ZM113.097 25.5107C114.495 26.1706 115.799 27.0527 116.954 28.1719C119.921 31.0462 121.354 34.9412 121.354 39V79C121.354 81.8462 120.648 84.6105 119.204 87C120.648 89.3895 121.354 92.1538 121.354 95V135C121.354 137.846 120.648 140.611 119.204 143C120.648 145.389 121.354 148.154 121.354 151V191C121.354 191.335 121.345 191.668 121.325 192H140.387V183C140.387 178.941 141.82 175.046 144.787 172.172C147.734 169.317 151.643 168 155.646 168H172.161C176.164 168 180.071 169.317 183.019 172.172C185.986 175.046 187.419 178.941 187.419 183V192H198.193V183C198.193 178.941 199.627 175.046 202.594 172.172C205.541 169.317 209.449 168 213.451 168H229.968C233.97 168 237.878 169.317 240.825 172.172C243.792 175.046 245.226 178.941 245.226 183V192H250.2C255.06 192 259.809 193.147 263.549 195.818C267.466 198.616 270 202.947 270 208.143V253.857C270 259.053 267.466 263.384 263.549 266.182C259.809 268.853 255.06 270 250.2 270H19.7998C14.9396 270 10.1913 268.853 6.45117 266.182C2.53412 263.384 8.92991e-05 259.053 0 253.857V208.143C5.4865e-05 204.95 0.95743 202.085 2.60352 199.701C0.853644 197.16 0 194.129 0 191V151C0 148.154 0.706222 145.389 2.15039 143C0.706222 140.611 0 137.846 0 135V95C0 92.1539 0.706222 89.3894 2.15039 87C0.706222 84.6106 0 81.8461 0 79V39C0 34.9412 1.43333 31.0462 4.40039 28.1719C5.55577 27.0526 6.85931 26.1706 8.25781 25.5107V15C8.25781 10.9412 9.69114 7.04622 12.6582 4.17188C15.6053 1.31691 19.5139 0 23.5166 0H40.0322C44.0348 0 47.9426 1.3171 50.8896 4.17188C53.8567 7.04622 55.29 10.9412 55.29 15V24H66.0645V15C66.0645 10.9412 67.4978 7.04622 70.4648 4.17188C73.4119 1.31705 77.3197 6.86267e-05 81.3223 0H97.8389C101.841 3.51509e-05 105.749 1.31707 108.696 4.17188C111.663 7.04622 113.097 10.9412 113.097 15V25.5107Z" fill="#3E3E3E"/>
11
+ <path d="M151.988 148.804L143 48H241.76L232.76 148.788L192.32 160L151.988 148.804Z" fill="#E44F26"/>
12
+ <path d="M192.381 151.432L225.061 142.372L232.749 56.2441H192.381V151.432Z" fill="#F1662A"/>
13
+ <path d="M192.381 93.628H176.021L174.893 80.968H192.381V68.604H192.337H161.381L164.713 105.992H192.381V93.628Z" fill="#EBEBEB"/>
14
+ <path d="M192.382 125.736L192.326 125.752L178.558 122.036L177.678 112.176H165.266L166.998 131.584L192.326 138.616L192.382 138.6V125.736Z" fill="#EBEBEB"/>
15
+ <path d="M192.336 93.6279V105.992H207.56L206.128 122.028L192.336 125.748V138.612L217.684 131.584L217.868 129.496L220.772 96.9479L221.076 93.6279H192.336Z" fill="white"/>
16
+ <path d="M192.337 68.604L192.336 80.968H222.2L223.308 68.604H192.337Z" fill="white"/>
17
+ </svg>
@@ -1,6 +1,6 @@
1
- # LegoJS SFC and Vite Plugin Example
1
+ # Lego SFC and Vite Plugin Example
2
2
 
3
- This example demonstrates how to use LegoJS with Single File Components (.lego files) and the Vite plugin.
3
+ This example demonstrates how to use Lego with Single File Components (.lego files) and the Vite plugin.
4
4
 
5
5
  ## Setup
6
6
 
@@ -1,9 +1,10 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
+
3
4
  <head>
4
5
  <meta charset="UTF-8">
5
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>LegoJS Vite Example</title>
7
+ <title>Lego Vite Example</title>
7
8
  <style>
8
9
  body {
9
10
  font-family: system-ui, -apple-system, sans-serif;
@@ -28,9 +29,10 @@
28
29
  }
29
30
  </style>
30
31
  </head>
32
+
31
33
  <body>
32
- <h1>LegoJS + Vite Example</h1>
33
-
34
+ <h1>Lego + Vite Example</h1>
35
+
34
36
  <div class="info">
35
37
  <p><strong>✨ These components are auto-discovered from .lego files!</strong></p>
36
38
  <p>The Vite plugin automatically finds all .lego files in <code>src/components/</code> and registers them.</p>
@@ -39,7 +41,9 @@
39
41
  <!-- These components are automatically discovered and hydrated -->
40
42
  <sample-component></sample-component>
41
43
  <greeting-card></greeting-card>
44
+ <todo-list></todo-list>
42
45
 
43
46
  <script type="module" src="/src/main.js"></script>
44
47
  </body>
45
- </html>
48
+
49
+ </html>