round-core 0.0.7 → 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.
- package/README.md +21 -0
- package/dist/index.d.ts +341 -341
- package/dist/vite-plugin.js +52 -3
- package/package.json +7 -3
- package/.github/workflows/benchmarks.yml +0 -44
- package/Round.png +0 -0
- package/benchmarks/apps/react/index.html +0 -9
- package/benchmarks/apps/react/main.jsx +0 -25
- package/benchmarks/apps/react/vite.config.js +0 -12
- package/benchmarks/apps/round/index.html +0 -11
- package/benchmarks/apps/round/main.jsx +0 -22
- package/benchmarks/apps/round/vite.config.js +0 -15
- package/benchmarks/bun.lock +0 -497
- package/benchmarks/dist-bench/react/assets/index-9KGqIPOU.js +0 -8
- package/benchmarks/dist-bench/react/index.html +0 -10
- package/benchmarks/dist-bench/round/assets/index-CBBIRhox.js +0 -52
- package/benchmarks/dist-bench/round/index.html +0 -8
- package/benchmarks/package.json +0 -22
- package/benchmarks/scripts/measure-build.js +0 -64
- package/benchmarks/tests/runtime.bench.js +0 -51
- package/benchmarks/vitest.config.js +0 -8
- package/bun.lock +0 -425
- package/cli.js +0 -2
- package/extension/.vscodeignore +0 -5
- package/extension/LICENSE +0 -21
- package/extension/cgmanifest.json +0 -45
- package/extension/extension.js +0 -163
- package/extension/images/round-config-dark.svg +0 -10
- package/extension/images/round-config-light.svg +0 -10
- package/extension/images/round-dark.svg +0 -10
- package/extension/images/round-light.svg +0 -10
- package/extension/javascript-language-configuration.json +0 -241
- package/extension/package-lock.json +0 -97
- package/extension/package.json +0 -119
- package/extension/package.nls.json +0 -4
- package/extension/round-0.1.0.vsix +0 -0
- package/extension/round-lsp/package-lock.json +0 -185
- package/extension/round-lsp/package.json +0 -21
- package/extension/round-lsp/src/round-transformer-lsp.js +0 -248
- package/extension/round-lsp/src/server.js +0 -396
- package/extension/snippets/javascript.code-snippets +0 -266
- package/extension/snippets/round.code-snippets +0 -109
- package/extension/syntaxes/JavaScript.tmLanguage.json +0 -6001
- package/extension/syntaxes/JavaScriptReact.tmLanguage.json +0 -6066
- package/extension/syntaxes/Readme.md +0 -12
- package/extension/syntaxes/Regular Expressions (JavaScript).tmLanguage +0 -237
- package/extension/syntaxes/Round.tmLanguage.json +0 -290
- package/extension/syntaxes/RoundInject.tmLanguage.json +0 -20
- package/extension/tags-language-configuration.json +0 -152
- package/extension/temp_astro/package-lock.json +0 -912
- package/extension/temp_astro/package.json +0 -16
- package/extension/types/round-core.d.ts +0 -326
- package/index.js +0 -2
- package/logo.svg +0 -10
- package/src/cli.js +0 -608
- package/src/compiler/index.js +0 -2
- package/src/compiler/transformer.js +0 -443
- package/src/compiler/vite-plugin.js +0 -472
- package/src/index.d.ts +0 -341
- package/src/index.js +0 -45
- package/src/runtime/context.js +0 -101
- package/src/runtime/dom.js +0 -403
- package/src/runtime/error-boundary.js +0 -48
- package/src/runtime/error-reporter.js +0 -13
- package/src/runtime/error-store.js +0 -85
- package/src/runtime/errors.js +0 -152
- package/src/runtime/lifecycle.js +0 -142
- package/src/runtime/markdown.js +0 -72
- package/src/runtime/router.js +0 -468
- package/src/runtime/signals.js +0 -548
- package/src/runtime/store.js +0 -215
- package/src/runtime/suspense.js +0 -128
- package/vite.config.build.js +0 -48
- package/vite.config.js +0 -10
- 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 `/`.
|