stillflow.engine 0.4.0 → 0.4.2
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 +3 -3
- package/dist/stillflow-examples/test.js +4 -7
- package/dist/stillflow-vm/index.d.ts +1 -1
- package/dist/stillflow-vm/index.js +1 -1
- package/dist/stillflow-vm/jsx-runtime.d.ts +2 -0
- package/dist/stillflow-vm/jsx-runtime.js +3 -0
- package/dist/stillflow-vm/runtime/jsx-runtime.d.ts +2 -0
- package/dist/stillflow-vm/runtime/jsx-runtime.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,7 +53,7 @@ You can test some benchmarks on [**CodeSandBox**](https://codesandbox.io/p/sandb
|
|
|
53
53
|
| **Lazy remove every 2nd row** | 10,000 rows (60k removed) | **~242ms max** ($O(k \log n)$ scaling) |
|
|
54
54
|
|
|
55
55
|
```ts
|
|
56
|
-
import {
|
|
56
|
+
import { core, vm, collection, operators, adapters } from 'stillflow.engine'
|
|
57
57
|
|
|
58
58
|
type AppState = {
|
|
59
59
|
input: string
|
|
@@ -70,8 +70,8 @@ type TodoState = {
|
|
|
70
70
|
|
|
71
71
|
const { jsxdom, dom } = adapters
|
|
72
72
|
|
|
73
|
-
const state = new State()
|
|
74
|
-
const stillflow = new Stillflow<AppState>(state)
|
|
73
|
+
const state = new core.State()
|
|
74
|
+
const stillflow = new core.Stillflow<AppState>(state)
|
|
75
75
|
const factory = stillflow.factory()
|
|
76
76
|
|
|
77
77
|
factory.add(collection.Flushable.name, () => new collection.Flushable(new collection.Fenwick(100)))
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { core, vm, collection, operators, adapters } from '
|
|
2
|
-
const { Stillflow, State, Batcher } = core;
|
|
1
|
+
import { core, vm, collection, operators, adapters } from 'stillflow.engine';
|
|
3
2
|
const { jsxdom, dom } = adapters;
|
|
4
|
-
const state = new State();
|
|
5
|
-
const stillflow = new Stillflow(state);
|
|
3
|
+
const state = new core.State();
|
|
4
|
+
const stillflow = new core.Stillflow(state);
|
|
6
5
|
const factory = stillflow.factory();
|
|
7
6
|
factory.add(collection.Flushable.name, () => new collection.Flushable(new collection.Fenwick(100)));
|
|
8
7
|
const source = {
|
|
@@ -29,9 +28,7 @@ function App() {
|
|
|
29
28
|
vm.jsx(jsxdom.button, { "on:click": add }, "Add"),
|
|
30
29
|
vm.jsx(jsxdom.div, { "sf:for": (context) => context.items, "sf:each": () => vm.jsx(TodoItem, null) })));
|
|
31
30
|
}
|
|
32
|
-
const update = dom.$(vm.jsx(App, null), {
|
|
33
|
-
container: document.body
|
|
34
|
-
});
|
|
31
|
+
const update = dom.$(vm.jsx(App, null), { container: document.body });
|
|
35
32
|
stillflow.on(() => update(instance));
|
|
36
33
|
instance.input = String();
|
|
37
34
|
stillflow.commit();
|
|
@@ -3,5 +3,5 @@ export { Payload } from './payload.js';
|
|
|
3
3
|
export { VMConfig as Config } from './abstract/config.js';
|
|
4
4
|
export { VMGenerator as Generator } from './abstract/generator.js';
|
|
5
5
|
export { VMTarget as Target, VMCompiler as Compiler } from './abstract/target.js';
|
|
6
|
-
export { jsx } from './
|
|
6
|
+
export { jsx } from './jsx-runtime.js';
|
|
7
7
|
export { vm_create as create } from './create.js';
|