@madojs/mado 0.5.0

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 (162) hide show
  1. package/AGENTS.md +291 -0
  2. package/CHANGELOG.md +23 -0
  3. package/LICENSE +21 -0
  4. package/README.md +371 -0
  5. package/ROADMAP.md +52 -0
  6. package/dist/src/component.d.ts +48 -0
  7. package/dist/src/component.js +140 -0
  8. package/dist/src/component.js.map +1 -0
  9. package/dist/src/context.d.ts +40 -0
  10. package/dist/src/context.js +67 -0
  11. package/dist/src/context.js.map +1 -0
  12. package/dist/src/css.d.ts +54 -0
  13. package/dist/src/css.js +137 -0
  14. package/dist/src/css.js.map +1 -0
  15. package/dist/src/devtools.d.ts +22 -0
  16. package/dist/src/devtools.js +63 -0
  17. package/dist/src/devtools.js.map +1 -0
  18. package/dist/src/diagnostics.d.ts +11 -0
  19. package/dist/src/diagnostics.js +28 -0
  20. package/dist/src/diagnostics.js.map +1 -0
  21. package/dist/src/each.d.ts +39 -0
  22. package/dist/src/each.js +35 -0
  23. package/dist/src/each.js.map +1 -0
  24. package/dist/src/forms.d.ts +71 -0
  25. package/dist/src/forms.js +161 -0
  26. package/dist/src/forms.js.map +1 -0
  27. package/dist/src/head.d.ts +19 -0
  28. package/dist/src/head.js +97 -0
  29. package/dist/src/head.js.map +1 -0
  30. package/dist/src/html/bindings.d.ts +78 -0
  31. package/dist/src/html/bindings.js +304 -0
  32. package/dist/src/html/bindings.js.map +1 -0
  33. package/dist/src/html/parser.d.ts +64 -0
  34. package/dist/src/html/parser.js +521 -0
  35. package/dist/src/html/parser.js.map +1 -0
  36. package/dist/src/html/template-types.d.ts +27 -0
  37. package/dist/src/html/template-types.js +8 -0
  38. package/dist/src/html/template-types.js.map +1 -0
  39. package/dist/src/html/template.d.ts +45 -0
  40. package/dist/src/html/template.js +119 -0
  41. package/dist/src/html/template.js.map +1 -0
  42. package/dist/src/html.d.ts +16 -0
  43. package/dist/src/html.js +16 -0
  44. package/dist/src/html.js.map +1 -0
  45. package/dist/src/index.d.ts +35 -0
  46. package/dist/src/index.js +39 -0
  47. package/dist/src/index.js.map +1 -0
  48. package/dist/src/lazy.d.ts +38 -0
  49. package/dist/src/lazy.js +73 -0
  50. package/dist/src/lazy.js.map +1 -0
  51. package/dist/src/lifecycle.d.ts +45 -0
  52. package/dist/src/lifecycle.js +66 -0
  53. package/dist/src/lifecycle.js.map +1 -0
  54. package/dist/src/page.d.ts +161 -0
  55. package/dist/src/page.js +38 -0
  56. package/dist/src/page.js.map +1 -0
  57. package/dist/src/persisted.d.ts +47 -0
  58. package/dist/src/persisted.js +119 -0
  59. package/dist/src/persisted.js.map +1 -0
  60. package/dist/src/resource.d.ts +120 -0
  61. package/dist/src/resource.js +275 -0
  62. package/dist/src/resource.js.map +1 -0
  63. package/dist/src/router/manifest.d.ts +56 -0
  64. package/dist/src/router/manifest.js +302 -0
  65. package/dist/src/router/manifest.js.map +1 -0
  66. package/dist/src/router/match.d.ts +62 -0
  67. package/dist/src/router/match.js +117 -0
  68. package/dist/src/router/match.js.map +1 -0
  69. package/dist/src/router/navigation.d.ts +89 -0
  70. package/dist/src/router/navigation.js +263 -0
  71. package/dist/src/router/navigation.js.map +1 -0
  72. package/dist/src/router.d.ts +13 -0
  73. package/dist/src/router.js +13 -0
  74. package/dist/src/router.js.map +1 -0
  75. package/dist/src/signal.d.ts +67 -0
  76. package/dist/src/signal.js +238 -0
  77. package/dist/src/signal.js.map +1 -0
  78. package/docs/README.md +12 -0
  79. package/docs/en/00-the-mado-way.md +106 -0
  80. package/docs/en/01-routing.md +204 -0
  81. package/docs/en/02-project-layout.md +58 -0
  82. package/docs/en/03-static-bake.md +251 -0
  83. package/docs/en/04-ide-setup.md +162 -0
  84. package/docs/en/05-why-mado.md +193 -0
  85. package/docs/en/06-for-backenders.md +422 -0
  86. package/docs/en/07-llm-pitfalls.md +486 -0
  87. package/docs/en/08-llm-zero-history-test.md +56 -0
  88. package/docs/en/09-shadow-vs-light-dom.md +122 -0
  89. package/docs/en/README.md +16 -0
  90. package/docs/fr/00-the-mado-way.md +108 -0
  91. package/docs/fr/01-routing.md +202 -0
  92. package/docs/fr/02-project-layout.md +58 -0
  93. package/docs/fr/03-static-bake.md +290 -0
  94. package/docs/fr/04-ide-setup.md +162 -0
  95. package/docs/fr/05-why-mado.md +193 -0
  96. package/docs/fr/06-for-backenders.md +432 -0
  97. package/docs/fr/07-llm-pitfalls.md +487 -0
  98. package/docs/fr/08-llm-zero-history-test.md +60 -0
  99. package/docs/fr/09-shadow-vs-light-dom.md +121 -0
  100. package/docs/fr/README.md +16 -0
  101. package/docs/ru/00-the-mado-way.md +93 -0
  102. package/docs/ru/01-routing.md +194 -0
  103. package/docs/ru/02-project-layout.md +57 -0
  104. package/docs/ru/03-static-bake.md +251 -0
  105. package/docs/ru/04-ide-setup.md +144 -0
  106. package/docs/ru/05-why-mado.md +193 -0
  107. package/docs/ru/06-for-backenders.md +422 -0
  108. package/docs/ru/07-llm-pitfalls.md +485 -0
  109. package/docs/ru/08-llm-zero-history-test.md +56 -0
  110. package/docs/ru/09-shadow-vs-light-dom.md +122 -0
  111. package/docs/ru/README.md +14 -0
  112. package/docs/uk/00-the-mado-way.md +54 -0
  113. package/docs/uk/01-routing.md +82 -0
  114. package/docs/uk/02-project-layout.md +46 -0
  115. package/docs/uk/03-static-bake.md +49 -0
  116. package/docs/uk/04-ide-setup.md +26 -0
  117. package/docs/uk/05-why-mado.md +34 -0
  118. package/docs/uk/06-for-backenders.md +50 -0
  119. package/docs/uk/07-llm-pitfalls.md +82 -0
  120. package/docs/uk/08-llm-zero-history-test.md +31 -0
  121. package/docs/uk/09-shadow-vs-light-dom.md +40 -0
  122. package/docs/uk/README.md +16 -0
  123. package/llms.txt +155 -0
  124. package/package.json +81 -0
  125. package/scripts/bake.mjs +406 -0
  126. package/scripts/bundle.mjs +146 -0
  127. package/scripts/cli.mjs +382 -0
  128. package/scripts/new.mjs +80 -0
  129. package/scripts/preview.mjs +176 -0
  130. package/scripts/release-notes.mjs +66 -0
  131. package/scripts/showcase-regression.mjs +392 -0
  132. package/server/serve.mjs +292 -0
  133. package/starters/crud/README.md +21 -0
  134. package/starters/crud/index.html +20 -0
  135. package/starters/crud/package.json +17 -0
  136. package/starters/crud/src/components/app-shell.ts +51 -0
  137. package/starters/crud/src/components/ticket-detail.ts +33 -0
  138. package/starters/crud/src/components/ticket-form.ts +69 -0
  139. package/starters/crud/src/components/ticket-list.ts +66 -0
  140. package/starters/crud/src/lib/api.ts +76 -0
  141. package/starters/crud/src/main.ts +12 -0
  142. package/starters/crud/src/pages/home.ts +18 -0
  143. package/starters/crud/src/pages/not-found.ts +12 -0
  144. package/starters/crud/src/pages/ticket-detail.ts +6 -0
  145. package/starters/crud/src/pages/ticket-new.ts +6 -0
  146. package/starters/crud/src/pages/tickets.ts +6 -0
  147. package/starters/crud/src/routes.ts +9 -0
  148. package/starters/crud/src/styles/global.ts +155 -0
  149. package/starters/crud/tsconfig.json +15 -0
  150. package/starters/minimal/README.md +19 -0
  151. package/starters/minimal/index.html +20 -0
  152. package/starters/minimal/package.json +17 -0
  153. package/starters/minimal/src/components/app-counter.ts +31 -0
  154. package/starters/minimal/src/main.ts +9 -0
  155. package/starters/minimal/src/pages/home.ts +18 -0
  156. package/starters/minimal/src/pages/not-found.ts +14 -0
  157. package/starters/minimal/src/routes.ts +6 -0
  158. package/starters/minimal/src/styles/global.ts +60 -0
  159. package/starters/minimal/tsconfig.json +15 -0
  160. package/templates/page-detail.ts +63 -0
  161. package/templates/page-form.ts +94 -0
  162. package/templates/page-list.ts +79 -0
@@ -0,0 +1,162 @@
1
+ # IDE support for `html\`\`` and `css\`\``
2
+
3
+ Out of the box `html\`...\`` and `css\`...\`` are just tagged-template strings.
4
+ TypeScript doesn't know about them, the IDE doesn't highlight them. This is a
5
+ **deliberate trade-off** in favour of zero runtime dependencies and no build plugins.
6
+
7
+ The good news: Mado uses the same conventions as [lit](https://lit.dev), so the
8
+ **ready-made** IDE tools from the lit ecosystem work out of the box.
9
+
10
+ ---
11
+
12
+ ## VS Code (recommended setup)
13
+
14
+ ### 1. Install [lit-plugin](https://marketplace.visualstudio.com/items?itemName=runem.lit-plugin)
15
+
16
+ VS Code → Extensions → search **"lit-plugin"** (by runem) → Install.
17
+
18
+ What you get:
19
+
20
+ - HTML highlighting inside `html\`\``.
21
+ - CSS highlighting inside `css\`\``.
22
+ - Auto-complete for HTML tags, attributes, and events.
23
+ - Typo checking in attributes.
24
+ - Go-to-definition for custom elements (if described via `customElements.json` or JSDoc).
25
+ - Diagnostics on invalid bindings.
26
+
27
+ ### 2. Specify tag names
28
+
29
+ `lit-plugin` looks for the `html` and `css` identifiers in imports. If you don't
30
+ rename them on import — configuration is zero, everything works:
31
+
32
+ ```ts
33
+ import { html, css } from "@madojs/mado";
34
+
35
+ const tpl = html`<button @click=${fn}>${label}</button>`;
36
+ ```
37
+
38
+ ### 3. (Optional) Your own `customElements.json`
39
+
40
+ If you want auto-complete for your own `<x-*>` components, describe them via
41
+ [Custom Elements Manifest](https://github.com/webcomponents/custom-elements-manifest):
42
+
43
+ ```bash
44
+ npm install --save-dev @custom-elements-manifest/analyzer
45
+ npx cem analyze --globs "src/components/**/*.ts"
46
+ ```
47
+
48
+ This creates `custom-elements.json`, which `lit-plugin` picks up automatically.
49
+
50
+ ---
51
+
52
+ ## WebStorm / IntelliJ
53
+
54
+ WebStorm understands `html\`\`` and `css\`\`` **out of the box** — native support
55
+ for lit-style template literals since 2021. No plugins needed.
56
+
57
+ If highlighting doesn't appear:
58
+
59
+ - Settings → Languages & Frameworks → JavaScript → verify "Use types from server" is on
60
+ - Restart the TS server: ⌘+⇧+P → "Restart TypeScript Server"
61
+
62
+ ---
63
+
64
+ ## Neovim / Helix
65
+
66
+ Use [`lit-html-server`](https://github.com/runem/lit-analyzer/tree/master/packages/lit-html-server)
67
+ (LSP server by the same author as lit-plugin):
68
+
69
+ ```bash
70
+ npm install -g lit-html-server
71
+ ```
72
+
73
+ `init.lua` (for `lspconfig`):
74
+
75
+ ```lua
76
+ require('lspconfig').lit_html.setup{
77
+ cmd = { 'lit-html-server', '--stdio' },
78
+ filetypes = { 'typescript', 'javascript' },
79
+ }
80
+ ```
81
+
82
+ ---
83
+
84
+ ## What does NOT work (known limitations)
85
+
86
+ - **Type-checking of signal bindings.** `html\`<input .value=${count}>\`` — `lit-plugin`
87
+ expects a string, but `count` is a `Signal<number>`. Suppress with `// @ts-expect-error`
88
+ or `<!-- @ts-ignore -->`. Will be improved in Phase 3+.
89
+ - **Custom directives (`each`)** are recognised as plain functions — without special
90
+ semantics in the plugin.
91
+ - **Attributes with `@`, `.`, `?` prefixes** are sometimes flagged as errors if
92
+ `lit-plugin` has `"no-unknown-attribute": false` disabled. In `.vscode/settings.json`:
93
+
94
+ ```json
95
+ {
96
+ "lit-plugin.rules": {
97
+ "no-unknown-attribute": "off",
98
+ "no-incompatible-type-binding": "off"
99
+ }
100
+ }
101
+ ```
102
+
103
+ ---
104
+
105
+ ## JSDoc typing for components
106
+
107
+ To make the IDE pick up custom elements inside `html\`\``, annotate the `component()`
108
+ definition via JSDoc:
109
+
110
+ ```ts
111
+ /**
112
+ * @element x-counter
113
+ * @attr {number} initial - starting value
114
+ * @fires {CustomEvent<number>} change - on every change
115
+ */
116
+ component("x-counter", () => {
117
+ /* ... */
118
+ });
119
+ ```
120
+
121
+ `lit-plugin` recognises this and suggests attributes when you type `<x-counter ...>`.
122
+
123
+ ---
124
+
125
+ ## Prettier / formatting
126
+
127
+ Prettier 3.0+ formats `html\`\`` via [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml)
128
+ or the built-in mode. Minimal `.prettierrc`:
129
+
130
+ ```json
131
+ {
132
+ "semi": true,
133
+ "singleQuote": false,
134
+ "embeddedLanguageFormatting": "auto"
135
+ }
136
+ ```
137
+
138
+ `embeddedLanguageFormatting: "auto"` (default) formats the content of tagged-template
139
+ literals with known tags (`html`, `css`).
140
+
141
+ ---
142
+
143
+ ## ESLint
144
+
145
+ If you use ESLint, the [`eslint-plugin-lit`](https://github.com/43081j/eslint-plugin-lit)
146
+ plugin provides rules specific to tagged-template HTML, and
147
+ [`eslint-plugin-wc`](https://github.com/43081j/eslint-plugin-wc) covers Web Components
148
+ in general. Configuration is up to you, not required.
149
+
150
+ ---
151
+
152
+ ## TL;DR
153
+
154
+ | Editor | Setup | DX level |
155
+ |---|---|---|
156
+ | **VS Code** | install `lit-plugin` | ★★★★ |
157
+ | **WebStorm** | nothing | ★★★★ |
158
+ | **Neovim/Helix** | `lit-html-server` via LSP | ★★★ |
159
+ | **Vim without LSP** | manual | ★ |
160
+
161
+ Mado works without an IDE plugin too: `html\`\`` remains valid TS code, everything
162
+ compiles and runs. The string inside is just highlighted as a string.
@@ -0,0 +1,193 @@
1
+ # Why Mado (and why not Lit / Solid / Alpine / htmx)
2
+
3
+ > If you are choosing a frontend stack for a new project, this page is for you.
4
+ > If you already have something working — **don't migrate for the sake of migration**, it always costs more than it seems.
5
+
6
+ Mado is not a "killer" of React/Vue/Svelte. It is a narrowly specialized tool. Here I honestly explain **in which cases Mado is genuinely better than the alternatives**, and in which it is not.
7
+
8
+ ---
9
+
10
+ ## TL;DR — one table
11
+
12
+ | If you care about… | Choose |
13
+ |---|---|
14
+ | Best learning infrastructure / huge ecosystem | **React** or **Vue** |
15
+ | Component design system for embedding into any framework | **Lit** |
16
+ | Top performance on large lists, "close to vanilla" with JSX | **Solid** or **Svelte 5** |
17
+ | Progressive enhancement of classic server-rendered apps | **htmx** + your backend |
18
+ | "Sprinkling" reactivity onto a static site | **Alpine.js** |
19
+ | Minimal tooling, maximum platform, everything in one box (router + data + forms + SEO), readable in an evening | **Mado** ✓ |
20
+
21
+ If your case does not fall into the last point — Mado is most likely not the best choice. That's fine.
22
+
23
+ ---
24
+
25
+ ## Mado vs Lit
26
+
27
+ **Lit** is the closest alternative in spirit. Same approach: Web Components + tagged templates + minimal magic.
28
+
29
+ | | Lit | Mado |
30
+ |---|---|---|
31
+ | Size | ~6 KB | ~16 KB |
32
+ | Age / support | ~10 years, Google | 6 months, single author |
33
+ | Reactivity | `@property` decorators + manual `requestUpdate` | signals (`signal`/`computed`/`effect`) out of the box |
34
+ | Router | none, you need to find one (`@lit-labs/router`, etc) | included: `routes()` + nested + prefetch + sync-cache |
35
+ | Data fetching | none, you need to assemble it | `resource()` + `mutation()` + glob invalidation |
36
+ | Forms | none | `useForm()` on native HTML5 validation |
37
+ | SEO / static | complex (`@lit-labs/ssr`) | `bake` (linkedom) + edge-prerender |
38
+ | Build | needs esbuild/rollup/webpack | `tsc` is enough |
39
+ | Code style | classes + decorators | functions + tagged templates |
40
+ | Ecosystem | real (Shoelace, Material Web, etc.) | none |
41
+ | When to choose | writing a design system / Web Components library for embedding | writing a full application, want everything in one box |
42
+
43
+ **Honest pitch:** *"Lit is better if you're writing a component design system. Mado is better if you're writing an application and want batteries included without assembling 8 packages."*
44
+
45
+ ---
46
+
47
+ ## Mado vs Solid
48
+
49
+ **Solid** is a top-tier reactive library built on signals. Technically very impressive.
50
+
51
+ | | Solid | Mado |
52
+ |---|---|---|
53
+ | Size | ~7 KB | ~16 KB |
54
+ | Performance | top-3 on js-framework-benchmark | good, but not top |
55
+ | Reactivity | signals (same class of ideas) | signals |
56
+ | Templates | JSX (compiled to reactive expressions) | tagged template `html\`\`` |
57
+ | Component model | functions, Solid virtual nodes | Web Components |
58
+ | Build | Vite + babel-plugin-solid required | `tsc` only |
59
+ | Router | `@solidjs/router` | included |
60
+ | Data | `createResource` | `resource()` |
61
+ | SSR | seriously supported (SolidStart) | intentionally none |
62
+ | Ecosystem | growing, ~50 packages | none |
63
+ | When to choose | need top performance + JSX + willing to configure the build | want to run without a build / minimal infrastructure |
64
+
65
+ **Honest pitch:** *"Solid is technically faster and more mature. But Solid requires Vite + a babel plugin. Mado requires nothing but `tsc` — it's 'open VS Code, F5, and work'. If that difference isn't critical — go with Solid."*
66
+
67
+ ---
68
+
69
+ ## Mado vs Svelte 5
70
+
71
+ **Svelte 5** with runes — also a signal model, also minimalist.
72
+
73
+ | | Svelte 5 | Mado |
74
+ |---|---|---|
75
+ | Runtime size | ~3 KB | ~16 KB |
76
+ | Compiler | required (.svelte → JS) | none |
77
+ | Syntax | custom .svelte format | TS + tagged templates |
78
+ | Reactivity | `$state`/`$derived` (runes) | `signal`/`computed` |
79
+ | SSR / SvelteKit | full-featured, mature | intentionally none |
80
+ | Ecosystem | large, excellent dev-tools | none |
81
+ | When to choose | new production project with a team | private/internal tool, need simplicity |
82
+
83
+ **Honest pitch:** *"Svelte is a product choice. Mado is an engineering one. If you have a team and a production app — Svelte. If you're alone and want control — Mado."*
84
+
85
+ ---
86
+
87
+ ## Mado vs htmx
88
+
89
+ **htmx** is a different school: HTML-fragments over the wire.
90
+
91
+ | | htmx | Mado |
92
+ |---|---|---|
93
+ | Architecture | HTML from server, updated via fragments | SPA: JS loads data, renders itself |
94
+ | Backend dependency | strong (backend must be able to serve HTML) | weak (backend is a JSON API) |
95
+ | Client state | minimal (cookies, localStorage) | full (signal, persisted) |
96
+ | Optimistic updates | difficult | easy (mutation + invalidates) |
97
+ | Offline / PWA | poor | decent |
98
+ | Size | ~14 KB | ~16 KB |
99
+ | When to choose | classic server-rendered app (Rails, Django, Phoenix), need to "liven up" | SPA experience is required, backend is REST/GraphQL |
100
+
101
+ **Honest pitch:** *"htmx — if the backend is solid and can serve HTML. Mado — if the backend serves JSON and you need a full SPA experience."*
102
+
103
+ ---
104
+
105
+ ## Mado vs Alpine.js
106
+
107
+ **Alpine** — reactive attributes directly in HTML.
108
+
109
+ | | Alpine | Mado |
110
+ |---|---|---|
111
+ | Purpose | enhancing static HTML | full SPA |
112
+ | Size | ~7 KB | ~16 KB |
113
+ | State management | `x-data` locally | signals + context + persisted |
114
+ | Routing | none | included |
115
+ | TypeScript | poor | first-class |
116
+ | When to choose | static sites, landing pages, need 5 interactive buttons | full app: pages, navigation, forms, data |
117
+
118
+ **Honest pitch:** *"Alpine — for interactivity on static sites. Mado — for a full application."*
119
+
120
+ ---
121
+
122
+ ## Mado vs React + ecosystem
123
+
124
+ I won't dwell on this for long, because React is in a **different weight class** in terms of ecosystem and maturity. But if you're seriously comparing:
125
+
126
+ **React wins:**
127
+ - massive ecosystem: thousands of UI kits, thousands of articles, endless tutorials;
128
+ - AI assistants (ChatGPT, Copilot) know React better than anything;
129
+ - better job market;
130
+ - better SSR support (Next.js).
131
+
132
+ **Mado wins:**
133
+ - bundle size dozens of times smaller;
134
+ - zero infrastructure (no Vite, no Babel, no 200 packages);
135
+ - readable in an evening — if something breaks, open `src/`;
136
+ - signals instead of hooks (no "can't use in an if" rules, no stale-closure traps);
137
+ - no need to migrate between major versions.
138
+
139
+ **When to choose Mado over React:**
140
+ - 1–3 person project, for years to come;
141
+ - bundle size is critical;
142
+ - you're tired of React fatigue and are ready to sacrifice the ecosystem for simplicity.
143
+
144
+ **When to choose React:**
145
+ - team of 5 or more people;
146
+ - you need UI kits, you need the ecosystem;
147
+ - a project that will be hiring new people from the market;
148
+ - you need SSR with hydration (Next.js).
149
+
150
+ ---
151
+
152
+ ## Mado's strongest argument
153
+
154
+ Not size, not performance, not signals — everything has better competitors.
155
+
156
+ > **"Open the source and read it in an evening. ~3500 lines, 12 modules. If something breaks — you don't go to an issue with 3000 comments. You go to `src/router.ts` and read 500 lines."**
157
+
158
+ This is called **ownership** — you own the code, rather than depending on someone else's.
159
+
160
+ For backend developers who are used to small, understandable libraries (chi in Go, axum in Rust, FastAPI in Python), this is a **familiar feeling**. For those to whom this doesn't matter — take whatever is bigger and more mature.
161
+
162
+ ---
163
+
164
+ ## What about performance?
165
+
166
+ Honestly: **Mado is not the fastest**. The top-3 on js-framework-benchmark are Solid, Inferno, and Svelte. Mado is closer to Lit / Preact in characteristics.
167
+
168
+ What Mado does for performance out of the box:
169
+ - **lazy `computed`** (dirty-flag, not eager);
170
+ - **batch microtask scheduler** for `signal.set`;
171
+ - **keyed reconciliation** in `each()` with real DOM reuse;
172
+ - **sync-rendering** for cached pages in the router;
173
+ - **hover-prefetch** for lazy chunks;
174
+ - **View Transitions API** for smooth transitions;
175
+ - **shared `adoptedStyleSheets`** for CSS;
176
+ - **`modulepreload` hints** on the dev server.
177
+
178
+ This is sufficient for most applications. If you're building Excel in the browser or 60fps WebGL visualization — that's not here (that's Solid or native JS).
179
+
180
+ ---
181
+
182
+ ## Summary
183
+
184
+ Mado is a **narrow** tool with honest positioning. It is strongest where:
185
+
186
+ 1. You want to **own** the code and read it in its entirety.
187
+ 2. **Infrastructure simplicity** is critical (no Vite/Webpack/Babel).
188
+ 3. You need **batteries in one box** (router + data + forms + SEO).
189
+ 4. You are not a junior and are not afraid of Web Components.
190
+
191
+ If even one point doesn't apply to you — take an alternative from the table above. Don't put up with a tool that doesn't fit.
192
+
193
+ — The author of Mado, a former React developer who moved to the backend and now glues together frontends in his spare time.