@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.
Files changed (34) hide show
  1. package/CHANGELOG.md +121 -0
  2. package/README.md +228 -23
  3. package/compiler/bin/vibe-compile.js +109 -0
  4. package/compiler/native/.gitkeep +0 -0
  5. package/compiler/native/vibe-compiler-darwin-arm64 +0 -0
  6. package/compiler/src/Cargo.lock +1885 -0
  7. package/compiler/src/Cargo.toml +29 -0
  8. package/compiler/src/compiler/compile.rs +1209 -0
  9. package/compiler/src/compiler/mod.rs +5 -0
  10. package/compiler/src/config.rs +184 -0
  11. package/compiler/src/main.rs +284 -0
  12. package/compiler/src/parser/element.rs +96 -0
  13. package/compiler/src/parser/html.rs +339 -0
  14. package/compiler/src/parser/mod.rs +8 -0
  15. package/index.js +2 -233
  16. package/package.json +26 -3
  17. package/{affected.js → runtime/affected.js} +66 -14
  18. package/runtime/cleanup.js +59 -0
  19. package/runtime/component.js +116 -0
  20. package/{conditionals.js → runtime/conditionals.js} +27 -23
  21. package/{constants.js → runtime/constants.js} +23 -3
  22. package/runtime/debug.js +91 -0
  23. package/{hydrate.js → runtime/hydrate.js} +58 -20
  24. package/runtime/index.js +614 -0
  25. package/{iterate.js → runtime/iterate.js} +53 -45
  26. package/{iteration-utils.js → runtime/iteration-utils.js} +11 -1
  27. package/{parse.js → runtime/parse.js} +37 -7
  28. package/runtime/state.js +52 -0
  29. package/{utils.js → runtime/utils.js} +13 -0
  30. package/llms.txt +0 -279
  31. package/state.js +0 -26
  32. /package/{_vibe-compiled-iteration-batch.js → runtime/_vibe-compiled-iteration-batch.js} +0 -0
  33. /package/{link.js → runtime/manifest.js} +0 -0
  34. /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