round-core 0.0.6 → 0.0.8

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 (46) hide show
  1. package/README.md +21 -0
  2. package/dist/index.d.ts +341 -326
  3. package/dist/vite-plugin.js +52 -3
  4. package/package.json +7 -3
  5. package/.github/workflows/benchmarks.yml +0 -44
  6. package/Round.png +0 -0
  7. package/benchmarks/apps/react/index.html +0 -9
  8. package/benchmarks/apps/react/main.jsx +0 -25
  9. package/benchmarks/apps/react/vite.config.js +0 -12
  10. package/benchmarks/apps/round/index.html +0 -11
  11. package/benchmarks/apps/round/main.jsx +0 -22
  12. package/benchmarks/apps/round/vite.config.js +0 -15
  13. package/benchmarks/bun.lock +0 -497
  14. package/benchmarks/dist-bench/react/assets/index-9KGqIPOU.js +0 -8
  15. package/benchmarks/dist-bench/react/index.html +0 -10
  16. package/benchmarks/dist-bench/round/assets/index-CBBIRhox.js +0 -52
  17. package/benchmarks/dist-bench/round/index.html +0 -8
  18. package/benchmarks/package.json +0 -22
  19. package/benchmarks/scripts/measure-build.js +0 -64
  20. package/benchmarks/tests/runtime.bench.js +0 -51
  21. package/benchmarks/vitest.config.js +0 -8
  22. package/bun.lock +0 -425
  23. package/cli.js +0 -2
  24. package/index.js +0 -2
  25. package/logo.svg +0 -10
  26. package/src/cli.js +0 -608
  27. package/src/compiler/index.js +0 -2
  28. package/src/compiler/transformer.js +0 -443
  29. package/src/compiler/vite-plugin.js +0 -472
  30. package/src/index.d.ts +0 -326
  31. package/src/index.js +0 -45
  32. package/src/runtime/context.js +0 -101
  33. package/src/runtime/dom.js +0 -403
  34. package/src/runtime/error-boundary.js +0 -48
  35. package/src/runtime/error-reporter.js +0 -13
  36. package/src/runtime/error-store.js +0 -85
  37. package/src/runtime/errors.js +0 -152
  38. package/src/runtime/lifecycle.js +0 -142
  39. package/src/runtime/markdown.js +0 -72
  40. package/src/runtime/router.js +0 -468
  41. package/src/runtime/signals.js +0 -548
  42. package/src/runtime/store.js +0 -215
  43. package/src/runtime/suspense.js +0 -128
  44. package/vite.config.build.js +0 -48
  45. package/vite.config.js +0 -10
  46. package/vitest.config.js +0 -8
package/README.md CHANGED
@@ -12,6 +12,13 @@
12
12
  <em>Round is a lightweight frontend framework focused on building <b>single-page applications (SPAs)</b> with <b>fine‑grained reactivity.</b></em>
13
13
  </p>
14
14
 
15
+ <div align="center">
16
+
17
+ Extension for VSCode [here](https://marketplace.visualstudio.com/items?itemName=ZtaMDev.round) and OpenVSX version [here](https://open-vsx.org/extension/ztamdev/round)
18
+
19
+ </div>
20
+
21
+
15
22
  ```bash
16
23
  npm install round-core
17
24
  ```
@@ -320,6 +327,20 @@ Notes:
320
327
 
321
328
  This compiles roughly to a `.map(...)` under the hood.
322
329
 
330
+ ### `switch`
331
+
332
+ ```jsx
333
+ {switch(status()){
334
+ case 'loading': return <Spinner />;
335
+ case 'error': return <ErrorMessage />;
336
+ default: return <DataView />;
337
+ }}
338
+ ```
339
+
340
+ Notes:
341
+ - The `switch` expression is automatically wrapped in a reactive tracker, ensuring that the view updates surgically when the condition (e.g., a signal) changes.
342
+ - Each case handles its own rendering without re-running the parent component.
343
+
323
344
  ## Routing
324
345
 
325
346
  Round includes router primitives intended for SPA navigation. All route paths must start with a forward slash `/`.