@ape-egg/vibe 1.0.3 → 1.1.1
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/CHANGELOG.md +121 -0
- package/README.md +228 -23
- package/compiler/bin/vibe-compile.js +109 -0
- package/compiler/native/.gitkeep +0 -0
- package/compiler/native/vibe-compiler-darwin-arm64 +0 -0
- package/compiler/src/Cargo.lock +1885 -0
- package/compiler/src/Cargo.toml +29 -0
- package/compiler/src/compiler/compile.rs +1209 -0
- package/compiler/src/compiler/mod.rs +5 -0
- package/compiler/src/config.rs +184 -0
- package/compiler/src/main.rs +284 -0
- package/compiler/src/parser/element.rs +96 -0
- package/compiler/src/parser/html.rs +339 -0
- package/compiler/src/parser/mod.rs +8 -0
- package/index.js +2 -233
- package/package.json +26 -3
- package/{affected.js → runtime/affected.js} +66 -14
- package/runtime/cleanup.js +59 -0
- package/runtime/component.js +116 -0
- package/{conditionals.js → runtime/conditionals.js} +27 -23
- package/{constants.js → runtime/constants.js} +23 -3
- package/runtime/debug.js +91 -0
- package/{hydrate.js → runtime/hydrate.js} +58 -20
- package/runtime/index.js +614 -0
- package/{iterate.js → runtime/iterate.js} +53 -45
- package/{iteration-utils.js → runtime/iteration-utils.js} +11 -1
- package/{parse.js → runtime/parse.js} +37 -7
- package/runtime/state.js +52 -0
- package/{utils.js → runtime/utils.js} +13 -0
- package/llms.txt +0 -279
- package/state.js +0 -26
- /package/{_vibe-compiled-iteration-batch.js → runtime/_vibe-compiled-iteration-batch.js} +0 -0
- /package/{link.js → runtime/manifest.js} +0 -0
- /package/{vibe.css → runtime/vibe.css} +0 -0
package/state.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export default (state, rerender) =>
|
|
2
|
-
new Proxy(state, {
|
|
3
|
-
set(obj, prop, value) {
|
|
4
|
-
const ref = Reflect.set(...arguments);
|
|
5
|
-
rerender({
|
|
6
|
-
[prop]: value,
|
|
7
|
-
});
|
|
8
|
-
// console.info("state change", { obj, prop, value });
|
|
9
|
-
return ref;
|
|
10
|
-
},
|
|
11
|
-
get(target, prop) {
|
|
12
|
-
// if (typeof target[prop] === 'function') {
|
|
13
|
-
// const inputString = target[prop].toString();
|
|
14
|
-
// const regex = /\$\.\w+/g;
|
|
15
|
-
// let match;
|
|
16
|
-
// while ((match = regex.exec(inputString))) {
|
|
17
|
-
// const varName = match[0].split('.')[1];
|
|
18
|
-
// console.log(varName, state[varName]);
|
|
19
|
-
// }
|
|
20
|
-
// console.log(arguments)
|
|
21
|
-
|
|
22
|
-
// }
|
|
23
|
-
|
|
24
|
-
return Reflect.get(...arguments);
|
|
25
|
-
},
|
|
26
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|