fusee-framework 1.7.0 → 1.9.0

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 (77) hide show
  1. package/README.md +206 -139
  2. package/app/benchmark/benchmark.js +2 -2
  3. package/app/benchmark/vite.config.js +23 -0
  4. package/app/main.js +24 -3
  5. package/app/main.ts +7 -1
  6. package/app/pages/_layout.js +27 -0
  7. package/app/pages/async-work.js +65 -0
  8. package/app/pages/index.js +25 -5
  9. package/app/pages/index.ts +9 -0
  10. package/app/pages/router-example.js +24 -1
  11. package/app/pages/scroll-demo.ts +102 -0
  12. package/app/providers/ChildComponent.js +8 -2
  13. package/app/providers/ChildComponent.ts +47 -47
  14. package/app/providers/GrandchildComponent.js +19 -0
  15. package/app/providers/ParentComponent.js +5 -1
  16. package/app/routes/RouterExample.js +23 -1
  17. package/app/routes/TestResource.js +47 -0
  18. package/app/services.js +15 -0
  19. package/auto-imports.d.ts +12 -0
  20. package/framework/auto-import-preset.js +15 -9
  21. package/framework/core/async-context.js +27 -0
  22. package/framework/core/compiler/ast.js +167 -0
  23. package/framework/core/compiler/errors-list.js +47 -0
  24. package/framework/core/compiler/errors.js +107 -0
  25. package/framework/core/compiler/generator.js +363 -0
  26. package/framework/core/compiler/lexer.js +347 -0
  27. package/framework/core/compiler/main-compiler.js +115 -0
  28. package/framework/core/compiler/parser.js +414 -0
  29. package/framework/core/compiler/plugins/actions-plugin.js +263 -0
  30. package/framework/core/compiler/plugins/compiler-plugin.d.ts +5 -0
  31. package/framework/core/compiler/plugins/compiler-plugin.js +45 -0
  32. package/framework/core/compiler/plugins/file-router-plugin.js +301 -0
  33. package/framework/core/compiler/plugins/router-plugin.js +196 -0
  34. package/framework/core/compiler/transformer.js +398 -0
  35. package/framework/core/component.js +61 -23
  36. package/framework/core/di.js +187 -0
  37. package/framework/core/directives.js +40 -96
  38. package/framework/core/evaluator.js +1 -1
  39. package/framework/core/h.js +430 -0
  40. package/framework/core/hydration.js +83 -0
  41. package/framework/core/reconcile.js +151 -0
  42. package/framework/core/signal.js +269 -0
  43. package/framework/core/store.js +322 -81
  44. package/framework/index.js +5 -3
  45. package/framework/router/file-router.js +1 -1
  46. package/framework/router/router.js +113 -21
  47. package/framework/server/actions.js +173 -0
  48. package/framework/server/actions.server.js +88 -0
  49. package/framework/server/index.js +18 -0
  50. package/framework/types/actions.d.ts +50 -0
  51. package/framework/types/actions.server.d.ts +36 -0
  52. package/framework/types/compiler/ast.d.ts +166 -0
  53. package/framework/types/compiler/errors-codes.d.ts +23 -0
  54. package/framework/types/compiler/errors.d.ts +43 -0
  55. package/framework/types/compiler/generator.d.ts +8 -0
  56. package/framework/types/compiler/h.d.ts +46 -0
  57. package/framework/types/compiler/lexer.d.ts +27 -0
  58. package/framework/types/compiler/main-compiler.d.ts +60 -0
  59. package/framework/types/compiler/parser.d.ts +4 -0
  60. package/framework/types/compiler/plugins/actions.d.ts +30 -0
  61. package/framework/types/compiler/plugins/compiler-plugin.d.ts +5 -0
  62. package/framework/types/compiler/plugins/file-router-plugins.d.ts +32 -0
  63. package/framework/types/compiler/plugins/router-plugin.d.ts +24 -0
  64. package/framework/types/compiler/transformer.d.ts +28 -0
  65. package/framework/types/component.d.ts +89 -88
  66. package/framework/types/di.d.ts +43 -0
  67. package/framework/types/hydration.d.ts +30 -0
  68. package/framework/types/index.d.ts +38 -22
  69. package/framework/types/reconcile.d.ts +7 -0
  70. package/framework/types/router.d.ts +11 -1
  71. package/framework/types/server.d.ts +11 -0
  72. package/framework/types/signal.d.ts +142 -79
  73. package/framework/types/store.d.ts +66 -8
  74. package/ghid_go_fusee_integrat_go1_26.txt +276 -0
  75. package/ghid_rust_fusee_rust_1_95_0.txt +1118 -0
  76. package/package.json +44 -36
  77. package/vite.config.js +65 -47
package/package.json CHANGED
@@ -1,36 +1,44 @@
1
- {
2
- "name": "fusee-framework",
3
- "version": "1.7.0",
4
- "description": "Fusée - Signals-first JS Framework | Peak Performance",
5
- "main": "framework/index.js",
6
- "types": "framework/types/index.d.ts",
7
- "bin": {
8
- "fusee": "./bin/index.js",
9
- "create-fusee": "./bin/index.js",
10
- "create-fusee-app": "./bin/index.js"
11
- },
12
- "type": "module",
13
- "scripts": {
14
- "dev": "vite",
15
- "build": "vite build",
16
- "preview": "vite preview",
17
- "test": "vitest run"
18
- },
19
- "keywords": [],
20
- "author": "",
21
- "license": "MIT",
22
- "repository": {
23
- "type": "git",
24
- "url": "git+https://github.com/SebiSomu/fusee.git"
25
- },
26
- "publishConfig": {
27
- "registry": "https://registry.npmjs.org/"
28
- },
29
- "devDependencies": {
30
- "jsdom": "^29.0.2",
31
- "typescript": "^6.0.2",
32
- "unplugin-auto-import": "^21.0.0",
33
- "vite": "^5.0.0",
34
- "vitest": "^4.1.4"
35
- }
36
- }
1
+ {
2
+ "name": "fusee-framework",
3
+ "version": "1.9.0",
4
+ "description": "Fusée - Signals-first JS Framework | Peak Performance",
5
+ "main": "framework/index.js",
6
+ "types": "framework/types/index.d.ts",
7
+ "bin": {
8
+ "fusee": "./bin/index.js",
9
+ "create-fusee": "./bin/index.js",
10
+ "create-fusee-app": "./bin/index.js"
11
+ },
12
+ "type": "module",
13
+ "scripts": {
14
+ "dev": "vite",
15
+ "build": "vite build",
16
+ "preview": "vite preview",
17
+ "test": "vitest run"
18
+ },
19
+ "keywords": [],
20
+ "author": "",
21
+ "license": "MIT",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/SebiSomu/fusee.git"
25
+ },
26
+ "publishConfig": {
27
+ "registry": "https://registry.npmjs.org/"
28
+ },
29
+ "devDependencies": {
30
+ "fast-glob": "^3.3.3",
31
+ "jsdom": "^29.0.2",
32
+ "typescript": "^6.0.2",
33
+ "unplugin-auto-import": "^21.0.0",
34
+ "vite": "^5.0.0",
35
+ "vitest": "^4.1.4"
36
+ },
37
+ "exports": {
38
+ ".": "./framework/index.js",
39
+ "./server": "./framework/server/index.js"
40
+ },
41
+ "dependencies": {
42
+ "benchmark": "^2.1.4"
43
+ }
44
+ }
package/vite.config.js CHANGED
@@ -1,47 +1,65 @@
1
- import { defineConfig } from 'vite'
2
- import path from 'path'
3
- import AutoImport from 'unplugin-auto-import/vite'
4
- import { FuseePreset } from './framework/auto-import-preset.js'
5
-
6
- export default defineConfig({
7
- root: '.',
8
- plugins: [
9
- AutoImport({
10
- imports: [FuseePreset],
11
- dts: true,
12
- })
13
- ],
14
-
15
- resolve: {
16
- alias: {
17
- 'fusee-framework': path.resolve(__dirname, './framework'),
18
- '@app': path.resolve(__dirname, './app'),
19
- }
20
- },
21
-
22
- server: {
23
- port: 3000,
24
- open: true,
25
- hmr: true,
26
- },
27
-
28
- build: {
29
- outDir: 'dist',
30
- emptyOutDir: true,
31
-
32
- rollupOptions: {
33
- input: {
34
- main: path.resolve(__dirname, 'index.html'),
35
- }
36
- }
37
- },
38
-
39
- test: {
40
- environment: 'jsdom',
41
- globals: true,
42
- typecheck: {
43
- enabled: true,
44
- include: ['**/*.test-d.ts'],
45
- }
46
- }
47
- })
1
+ import { defineConfig } from 'vite'
2
+ import path from 'path'
3
+ import AutoImport from 'unplugin-auto-import/vite'
4
+ import { FuseePreset } from './framework/auto-import-preset.js'
5
+ import { fuseeCompilerPlugin } from './framework/core/compiler/plugins/compiler-plugin.js'
6
+
7
+ export default defineConfig({
8
+ root: '.',
9
+ plugins: [
10
+ fuseeCompilerPlugin(),
11
+ AutoImport({
12
+ imports: [FuseePreset],
13
+ dts: true,
14
+ })
15
+ ],
16
+
17
+ resolve: {
18
+ alias: {
19
+ 'fusee-framework': path.resolve(__dirname, './framework'),
20
+ '@app': path.resolve(__dirname, './app'),
21
+ '@shared/config': path.resolve(__dirname, '../shared-config/index.ts')
22
+ }
23
+ },
24
+
25
+ optimizeDeps: {
26
+ exclude: ['fusee-framework']
27
+ },
28
+
29
+ server: {
30
+ port: 3000,
31
+ open: true,
32
+ hmr: true,
33
+ },
34
+
35
+ build: {
36
+ outDir: 'dist',
37
+ emptyOutDir: true,
38
+
39
+ rollupOptions: {
40
+ input: {
41
+ main: path.resolve(__dirname, 'index.html'),
42
+ }
43
+ }
44
+ },
45
+
46
+ test: {
47
+ environment: 'jsdom',
48
+ globals: true,
49
+ exclude: [
50
+ 'node_modules/**',
51
+ 'bench-node-1/**',
52
+ 'create-fusee-go/**',
53
+ 'dist/**'
54
+ ],
55
+ typecheck: {
56
+ enabled: true,
57
+ include: ['framework/**/*.test-d.ts'],
58
+ },
59
+ resolve: {
60
+ alias: {
61
+ 'fusee/actions.server': path.resolve('./framework/server/actions.js')
62
+ }
63
+ }
64
+ }
65
+ })