@yannosay/sinth 5.2.3 → 5.3.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 (43) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +24 -23
  3. package/RUNTIME-EXCEPTION.md +25 -0
  4. package/dist/browser/compile.d.ts +35 -0
  5. package/dist/browser/compile.js +158 -0
  6. package/dist/browser/sinth.js +1492 -0
  7. package/dist/cli/index.js +3 -1
  8. package/dist/cli/templates.js +2 -2
  9. package/dist/cli/ui.d.ts +0 -1
  10. package/dist/cli/ui.js +1 -2
  11. package/dist/compiler/ast.d.ts +11 -0
  12. package/dist/compiler/codegen.d.ts +2 -87
  13. package/dist/compiler/codegen.js +49 -6
  14. package/dist/compiler/diagnostics.d.ts +0 -1
  15. package/dist/compiler/diagnostics.js +0 -4
  16. package/dist/compiler/html.d.ts +2 -0
  17. package/dist/compiler/html.js +11 -1
  18. package/dist/compiler/lexer.js +3 -0
  19. package/dist/compiler/parser.js +27 -1
  20. package/dist/compiler/prerender.js +4 -0
  21. package/dist/index.d.ts +2 -0
  22. package/dist/index.js +3 -1
  23. package/dist/project/build.d.ts +6 -0
  24. package/dist/project/build.js +69 -41
  25. package/dist/project/config.d.ts +1 -0
  26. package/dist/project/config.js +3 -2
  27. package/dist/project/project.d.ts +1 -0
  28. package/dist/project/project.js +2 -1
  29. package/dist/runtime/index.d.ts +6 -0
  30. package/dist/runtime/index.js +18 -2
  31. package/dist/runtime/router.d.ts +36 -0
  32. package/dist/runtime/router.js +215 -0
  33. package/dist/server/client.js +3 -1
  34. package/dist/server/dev.js +65 -25
  35. package/dist/server/functions.d.ts +49 -0
  36. package/dist/server/functions.js +309 -0
  37. package/dist/server/preview.d.ts +2 -0
  38. package/dist/server/preview.js +41 -18
  39. package/dist/server/static.d.ts +10 -0
  40. package/dist/server/static.js +25 -0
  41. package/package.json +22 -13
  42. package/schema/sinth.config.schema.json +2 -1
  43. package/DOCS.md +0 -1360
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yannosay/sinth",
3
- "version": "5.2.3",
4
- "description": "A reactive language for websites and web apps of any size: type-checked components, file-based and dynamic routing, prerendered pages and one-command deploys.",
3
+ "version": "5.3.1",
4
+ "description": "A compiled, type-checked language for websites and web apps: reactive components, file-based routing with instant navigation, prerendered pages, API routes and one-command deploys.",
5
5
  "author": "Yannosay Productions",
6
6
  "license": "AGPL-3.0",
7
7
  "homepage": "https://sinth.yannosay.com",
@@ -14,20 +14,28 @@
14
14
  },
15
15
  "keywords": [
16
16
  "sinth",
17
- "language",
18
- "compiler",
17
+ "programming-language",
19
18
  "web-framework",
19
+ "compiler",
20
20
  "reactive",
21
21
  "components",
22
22
  "ui",
23
- "routing",
23
+ "static-site-generator",
24
24
  "ssg",
25
25
  "prerendering",
26
- "typescript-alternative",
26
+ "spa",
27
+ "routing",
28
+ "full-stack",
29
+ "api-routes",
30
+ "web-components",
31
+ "custom-elements",
32
+ "hmr",
33
+ "type-checking",
27
34
  "html",
28
35
  "css",
29
- "web",
30
- "cloudflare-pages"
36
+ "frontend",
37
+ "cloudflare-pages",
38
+ "jamstack"
31
39
  ],
32
40
  "bin": {
33
41
  "sinth": "bin/sinth.js"
@@ -38,17 +46,18 @@
38
46
  "lib/",
39
47
  "schema/",
40
48
  "README.md",
41
- "DOCS.md",
42
49
  "CHANGELOG.md",
43
- "LICENSE"
50
+ "LICENSE",
51
+ "RUNTIME-EXCEPTION.md"
44
52
  ],
45
53
  "scripts": {
46
- "build": "tsc -p tsconfig.json && tsc -p tsconfig.runtime.json",
54
+ "build": "tsc -p tsconfig.json && tsc -p tsconfig.runtime.json && node scripts/build-browser.js",
47
55
  "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
48
56
  "lint": "eslint src",
49
57
  "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.runtime.json --noEmit",
50
- "test": "npm run build && node scripts/test.js",
51
- "prepublishOnly": "npm run clean && npm run build && npm run lint && node scripts/test.js"
58
+ "test": "npm run build && node scripts/test.js && node scripts/check-docs.js",
59
+ "prepublishOnly": "npm run clean && npm run build && npm run lint && node scripts/test.js && node scripts/check-docs.js",
60
+ "check:docs": "node scripts/check-docs.js"
52
61
  },
53
62
  "devDependencies": {
54
63
  "@eslint/js": "^10.0.1",
@@ -20,6 +20,7 @@
20
20
  "host": { "type": "string", "default": "127.0.0.1" },
21
21
  "previewPort": { "type": "integer", "minimum": 1, "maximum": 65535, "default": 4000 },
22
22
  "target": { "type": "array", "items": { "type": "string" }, "description": "esbuild targets" },
23
+ "router": { "type": "boolean", "default": true, "description": "Navigate between pages without full reloads" },
23
24
  "security": {
24
25
  "type": "object",
25
26
  "additionalProperties": false,
@@ -35,7 +36,7 @@
35
36
  "properties": {
36
37
  "$schema": { "type": "string" },
37
38
  "outDir": {}, "pagesDir": {}, "publicDir": {}, "staticDirs": {}, "libraryPaths": {}, "site": {}, "base": {},
38
- "minify": {}, "sourcemap": {}, "port": {}, "host": {}, "previewPort": {}, "target": {}, "security": {},
39
+ "minify": {}, "sourcemap": {}, "port": {}, "host": {}, "previewPort": {}, "target": {}, "router": {}, "security": {},
39
40
  "cloudflare": {
40
41
  "type": "object",
41
42
  "additionalProperties": false,