@fluixi/core 1.0.0-alpha.100 → 1.0.0-alpha.102
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 +11 -11
- package/dist/cdn/core.global.js +2 -2
- package/dist/src/cdn/core.cjs +2 -7
- package/dist/src/cdn/core.mjs +2 -8
- package/dist/src/index.cjs +2 -18
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.mjs +2 -18
- package/dist/src/jsx-runtime.d.ts +1 -1
- package/dist/src/jsx-runtime.js +1 -4
- package/dist/src/lib/client/{chunk-FDOPDB6Z.mjs → chunk-PLBLUAUD.mjs} +1 -1
- package/dist/src/lib/client/index.cjs +2 -2
- package/dist/src/lib/client/index.d.ts +1 -1
- package/dist/src/lib/client/index.js +2 -2
- package/dist/src/lib/client/index.mjs +4 -4
- package/dist/src/lib/client/{router-4PTBPZLQ.mjs → router-LQ57EOB4.mjs} +2 -2
- package/dist/src/lib/core.cjs +1 -17
- package/dist/src/lib/core.d.ts +2 -6
- package/dist/src/lib/core.d.ts.map +1 -1
- package/dist/src/lib/core.js +6 -22
- package/dist/src/lib/core.mjs +1 -17
- package/dist/src/lib/i18n/index.cjs +1 -1
- package/dist/src/lib/i18n/index.mjs +1 -1
- package/dist/src/lib/index.cjs +2 -8
- package/dist/src/lib/index.d.ts +3 -9
- package/dist/src/lib/index.d.ts.map +1 -1
- package/dist/src/lib/index.js +3 -26
- package/dist/src/lib/index.mjs +2 -9
- package/dist/src/lib/jsx-runtime/index.cjs +1 -1
- package/dist/src/lib/jsx-runtime/index.mjs +1 -1
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.cjs +1 -1
- package/dist/src/lib/jsx-runtime/jsx-dev-runtime.mjs +1 -1
- package/dist/src/lib/plugins/index.cjs +1 -1
- package/dist/src/lib/plugins/index.mjs +1 -1
- package/dist/src/lib/plugins/route-codegen.d.ts.map +1 -1
- package/dist/src/lib/plugins/route-codegen.js +0 -6
- package/dist/src/lib/plugins/route-scanner.d.ts.map +1 -1
- package/dist/src/lib/plugins/route-scanner.js +0 -6
- package/dist/src/lib/render/component.d.ts +0 -3
- package/dist/src/lib/render/component.d.ts.map +1 -1
- package/dist/src/lib/render/component.js +0 -21
- package/dist/src/lib/render/index.cjs +1 -10
- package/dist/src/lib/render/index.d.ts +1 -4
- package/dist/src/lib/render/index.d.ts.map +1 -1
- package/dist/src/lib/render/index.js +1 -21
- package/dist/src/lib/render/index.mjs +1 -10
- package/dist/src/lib/render/lazy.js +1 -1
- package/dist/src/lib/render/suspense.cjs +0 -5
- package/dist/src/lib/render/suspense.d.ts +1 -2
- package/dist/src/lib/render/suspense.d.ts.map +1 -1
- package/dist/src/lib/render/suspense.js +1 -8
- package/dist/src/lib/render/suspense.mjs +0 -5
- package/dist/src/lib/render/versions.cjs +1 -1
- package/dist/src/lib/render/versions.mjs +1 -1
- package/dist/src/lib/router/data.d.ts.map +1 -1
- package/dist/src/lib/router/data.js +0 -5
- package/dist/src/lib/router/index.cjs +1 -1
- package/dist/src/lib/router/index.js +5 -5
- package/dist/src/lib/router/index.mjs +1 -1
- package/dist/src/lib/server/hydration.d.ts +0 -6
- package/dist/src/lib/server/hydration.d.ts.map +1 -1
- package/dist/src/lib/server/hydration.js +0 -22
- package/dist/src/lib/server/index.cjs +1 -1
- package/dist/src/lib/server/index.d.ts +1 -7
- package/dist/src/lib/server/index.d.ts.map +1 -1
- package/dist/src/lib/server/index.js +1 -12
- package/dist/src/lib/server/index.mjs +1 -1
- package/dist/src/lib/server/reactive.d.ts.map +1 -1
- package/dist/src/lib/server/reactive.js +0 -35
- package/dist/src/lib/storage/index.cjs +1 -1
- package/dist/src/lib/storage/index.mjs +1 -1
- package/dist/src/routes.cjs +1 -1
- package/dist/src/routes.mjs +1 -1
- package/dist/src/server.d.ts +0 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +0 -1
- package/dist/src/utils.cjs +1 -1
- package/dist/src/utils.mjs +1 -1
- package/dist/src/version.generated.cjs +1 -1
- package/dist/src/version.generated.d.ts +1 -1
- package/dist/src/version.generated.js +1 -1
- package/dist/src/version.generated.mjs +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +20 -24
- package/src/index.ts +0 -2
- package/dist/cli/generate.cjs +0 -5639
- package/dist/cli/generate.d.ts +0 -7
- package/dist/cli/generate.d.ts.map +0 -1
- package/dist/cli/generate.js +0 -2580
- package/dist/cli/generate.mjs +0 -5644
- package/dist/cli/index.cjs +0 -5639
- package/dist/cli/index.d.ts +0 -7
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -2580
- package/dist/cli/index.mjs +0 -5644
- package/dist/cli/run.cjs +0 -64
- package/dist/cli/run.d.ts +0 -3
- package/dist/cli/run.d.ts.map +0 -1
- package/dist/cli/run.js +0 -62
- package/dist/cli/run.mjs +0 -40
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
Most reactive frameworks ask you to keep a model in your head that the language doesn't share: which reads are tracked, what you may not destructure, where a value has to stay a function. The compiler can't help, because it doesn't know what your values are
|
|
15
|
+
Most reactive frameworks ask you to keep a model in your head that the language doesn't share: which reads are tracked, what you may not destructure, where a value has to stay a function. The compiler can't help, because it doesn't know what your values are: so the burden is yours, and the failures are quiet ones.
|
|
16
16
|
|
|
17
17
|
Fluixi's compiler knows. It resolves a reactive primitive by the binding it came from, not by how the name reads, and carries that through JSX and `` html`` `` templates, the DOM it generates, SSR, hydration and routing as one model.
|
|
18
18
|
|
|
@@ -67,7 +67,7 @@ const Counter = () => {
|
|
|
67
67
|
render(() => <Counter />, document.getElementById('app')!);
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
`$signal` needs no import
|
|
70
|
+
`$signal` needs no import: the compiler resolves it and adds what it needs. `signal(0)` from `@fluixi/reactive/signal` is the same primitive when you'd rather import it, and works in a package that never runs this compiler.
|
|
71
71
|
|
|
72
72
|
> JSX is compiled by `@fluixi/vite-plugin`. Scaffold a ready-to-run app with `npm create fluixi`.
|
|
73
73
|
|
|
@@ -90,8 +90,8 @@ name.set('Bob'); // "Bob counted to 5"
|
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
Call it to read, `.set()` to write. `$memo` derives, `$store` holds an object you read
|
|
93
|
-
properties off, `$resource` wraps async data. Each has an importable twin
|
|
94
|
-
`memo`, `effect`, `store`, `resource` from `@fluixi/reactive/signal
|
|
93
|
+
properties off, `$resource` wraps async data. Each has an importable twin: `signal`,
|
|
94
|
+
`memo`, `effect`, `store`, `resource` from `@fluixi/reactive/signal`: and they are the
|
|
95
95
|
same primitives, so the two spellings mix freely in one file.
|
|
96
96
|
|
|
97
97
|
`createSignal` and its `[read, write]` pair are unchanged, and plenty of code is written
|
|
@@ -108,7 +108,7 @@ function Greeting(props: { name: string }) {
|
|
|
108
108
|
}
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
Destructuring them is fine
|
|
111
|
+
Destructuring them is fine: the compiler rewrites the bindings into reads, so they keep
|
|
112
112
|
updating, and `...rest` becomes the `splitProps` call you would have written:
|
|
113
113
|
|
|
114
114
|
```tsx
|
|
@@ -117,8 +117,8 @@ function Card({ title, tone = 'calm', ...rest }) {
|
|
|
117
117
|
}
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
Where it can't prove a rewrite is safe
|
|
121
|
-
it would have to re-run on every read
|
|
120
|
+
Where it can't prove a rewrite is safe: a reassigned binding, a computed key, a default
|
|
121
|
+
it would have to re-run on every read: it leaves your code exactly as written and says
|
|
122
122
|
why at build time.
|
|
123
123
|
|
|
124
124
|
### Control Flow
|
|
@@ -163,12 +163,12 @@ import { RevenueChart } from './RevenueChart';
|
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
Deferring replaces your static import with a dynamic one, so it applies when the name is
|
|
166
|
-
used only as a tag. Reference it as a value too and the import stays
|
|
166
|
+
used only as a tag. Reference it as a value too and the import stays: the build says so
|
|
167
167
|
rather than silently shipping the chunk eagerly.
|
|
168
168
|
|
|
169
169
|
### `` html`` `` templates
|
|
170
170
|
|
|
171
|
-
The same reactive model without configuring JSX
|
|
171
|
+
The same reactive model without configuring JSX: useful in a library, a script, or a
|
|
172
172
|
plain-TypeScript codebase:
|
|
173
173
|
|
|
174
174
|
```ts
|
|
@@ -310,8 +310,8 @@ Fluixi is written in TypeScript and ships full types. Configure JSX in your `tsc
|
|
|
310
310
|
|
|
311
311
|
| Package | Purpose |
|
|
312
312
|
| --- | --- |
|
|
313
|
-
| `@fluixi/core` | Framework façade
|
|
314
|
-
| `@fluixi/reactive` | Signals, memos, effects, store
|
|
313
|
+
| `@fluixi/core` | Framework façade: components, control flow, router, render |
|
|
314
|
+
| `@fluixi/reactive` | Signals, memos, effects, store: usable on its own |
|
|
315
315
|
| `@fluixi/dom` | The DOM rendering runtime |
|
|
316
316
|
| `@fluixi/compiler` | JSX and `` html`` `` → IR → direct DOM calls |
|
|
317
317
|
| `@fluixi/vite-plugin` | The compiler as a Vite plugin (rollup, esbuild and webpack adapters too) |
|