trebol 0.1.1 → 0.1.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.
Files changed (84) hide show
  1. package/README.md +10 -1
  2. package/dist/cli.js +13747 -11409
  3. package/dist/fonts/OFL.txt +93 -0
  4. package/dist/fonts/inter-cyrillic-ext.woff2 +0 -0
  5. package/dist/fonts/inter-cyrillic.woff2 +0 -0
  6. package/dist/fonts/inter-greek-ext.woff2 +0 -0
  7. package/dist/fonts/inter-greek.woff2 +0 -0
  8. package/dist/fonts/inter-latin-ext.woff2 +0 -0
  9. package/dist/fonts/inter-latin.woff2 +0 -0
  10. package/dist/fonts/inter-vietnamese.woff2 +0 -0
  11. package/dist/lib/core/boot.js +2 -1
  12. package/dist/lib/core/func.d.ts +4 -0
  13. package/dist/lib/core/natives/control.js +1 -1
  14. package/dist/lib/core/natives/series.js +11 -1
  15. package/dist/lib/core/natives/text.js +3 -0
  16. package/dist/lib/host/browser.js +951 -58
  17. package/dist/lib/host/devlog.d.ts +11 -0
  18. package/dist/lib/host/devlog.js +13 -0
  19. package/dist/lib/host/devtools.d.ts +23 -0
  20. package/dist/lib/host/devtools.js +626 -0
  21. package/dist/lib/host/fonts/OFL.txt +93 -0
  22. package/dist/lib/host/fonts/inter-cyrillic-ext.woff2 +0 -0
  23. package/dist/lib/host/fonts/inter-cyrillic.woff2 +0 -0
  24. package/dist/lib/host/fonts/inter-greek-ext.woff2 +0 -0
  25. package/dist/lib/host/fonts/inter-greek.woff2 +0 -0
  26. package/dist/lib/host/fonts/inter-latin-ext.woff2 +0 -0
  27. package/dist/lib/host/fonts/inter-latin.woff2 +0 -0
  28. package/dist/lib/host/fonts/inter-vietnamese.woff2 +0 -0
  29. package/dist/lib/host/fonts.d.ts +11 -0
  30. package/dist/lib/host/fonts.js +29 -0
  31. package/dist/lib/host/index.d.ts +2 -0
  32. package/dist/lib/host/index.js +3 -1
  33. package/dist/lib/host/js.d.ts +5 -0
  34. package/dist/lib/host/js.js +130 -0
  35. package/dist/lib/host/markdown.d.ts +2 -0
  36. package/dist/lib/host/markdown.js +10 -0
  37. package/dist/lib/host/modules.d.ts +4 -0
  38. package/dist/lib/host/modules.js +39 -1
  39. package/dist/lib/host/net.js +9 -1
  40. package/dist/lib/host/orbit.d.ts +121 -0
  41. package/dist/lib/host/orbit.js +374 -0
  42. package/dist/lib/host/rows.d.ts +14 -0
  43. package/dist/lib/host/rows.js +29 -0
  44. package/dist/lib/host/scheduler.d.ts +6 -0
  45. package/dist/lib/host/scheduler.js +60 -36
  46. package/dist/lib/host/theme.js +207 -2
  47. package/dist/lib/ui/i18n.trb +6 -0
  48. package/dist/lib/ui/test.trb +565 -0
  49. package/dist/lib/ui/ui.trb +523 -82
  50. package/dist/trebol.js +1346 -124
  51. package/editors/vscode/README.md +15 -0
  52. package/editors/vscode/language-configuration.json +28 -0
  53. package/editors/vscode/package.json +42 -0
  54. package/editors/vscode/syntaxes/trebol.tmLanguage.json +237 -0
  55. package/package.json +7 -3
  56. package/src/core/boot.ts +1 -1
  57. package/src/core/func.ts +4 -0
  58. package/src/core/natives/control.ts +1 -1
  59. package/src/core/natives/series.ts +9 -1
  60. package/src/core/natives/text.ts +2 -0
  61. package/src/host/browser.ts +962 -51
  62. package/src/host/devlog.ts +16 -0
  63. package/src/host/devtools.ts +641 -0
  64. package/src/host/fonts/OFL.txt +93 -0
  65. package/src/host/fonts/inter-cyrillic-ext.woff2 +0 -0
  66. package/src/host/fonts/inter-cyrillic.woff2 +0 -0
  67. package/src/host/fonts/inter-greek-ext.woff2 +0 -0
  68. package/src/host/fonts/inter-greek.woff2 +0 -0
  69. package/src/host/fonts/inter-latin-ext.woff2 +0 -0
  70. package/src/host/fonts/inter-latin.woff2 +0 -0
  71. package/src/host/fonts/inter-vietnamese.woff2 +0 -0
  72. package/src/host/fonts.ts +39 -0
  73. package/src/host/index.ts +3 -1
  74. package/src/host/js.ts +127 -0
  75. package/src/host/markdown.ts +9 -0
  76. package/src/host/modules.ts +33 -1
  77. package/src/host/net.ts +9 -1
  78. package/src/host/orbit.ts +432 -0
  79. package/src/host/rows.ts +30 -0
  80. package/src/host/scheduler.ts +62 -36
  81. package/src/host/theme.ts +207 -2
  82. package/src/ui/i18n.trb +6 -0
  83. package/src/ui/test.trb +565 -0
  84. package/src/ui/ui.trb +523 -82
package/README.md CHANGED
@@ -51,8 +51,14 @@ page on save, install it with Node.js 22.18 or later:
51
51
  npm install trebol
52
52
  npx trebol # the console: >> 1 + 2 * 3 == 9
53
53
  npx trebol dev my-app # serves the folder my-app, with its app.trb, at http://localhost:5173/
54
+ npx trebol check my-app/app.trb # the mistakes in its views, without running it
55
+ npx trebol test my-app # its screen tests (app.test.trb), without a browser
56
+ npx trebol build my-app # my-app/build/index.html: the app in one page, for any web server
54
57
  ```
55
58
 
59
+ `node_modules/trebol/editors/vscode` is an extension that colors `.trb` files in Visual Studio Code: copy it
60
+ into `~/.vscode/extensions/trebol` and restart VS Code.
61
+
56
62
  A JavaScript program can run Trebol too, through `trebol/host` and `trebol/core`; see
57
63
  [using Trebol from JavaScript](https://acasadom.github.io/trebol/guides/architecture.html#using-trebol-from-javascript).
58
64
 
@@ -66,6 +72,7 @@ npm run check # type check and every test
66
72
  npm run trb # the console
67
73
  npm run dev # the examples, at http://localhost:5173/examples/signup/
68
74
  npm run build # dist/trebol.js and dist/cli.js, what the npm package runs
75
+ npm run grammar # the editor grammar, editors/vscode/syntaxes/trebol.tmLanguage.json
69
76
  ```
70
77
 
71
78
  A release is a tag: `npm version minor` (or `patch`) and `git push --follow-tags`. The `release` workflow checks
@@ -91,6 +98,7 @@ Rebol; and guides to how Trebol is built.
91
98
  | `examples` | sample apps: `signup`, `clients`, `gallery`, `live`, `designer` |
92
99
  | `docs` | the documentation site |
93
100
  | `tools` | the `trebol` command, the console, the documentation builders |
101
+ | `editors` | the Visual Studio Code extension and its TextMate grammar |
94
102
 
95
103
  ## Thanks
96
104
 
@@ -100,4 +108,5 @@ Inter typeface. The first page of the documentation says what each of them gave.
100
108
 
101
109
  ## License
102
110
 
103
- Apache License 2.0. See [LICENSE](LICENSE).
111
+ Apache License 2.0. See [LICENSE](LICENSE). The Inter font in `src/host/fonts` is under the SIL Open Font
112
+ License 1.1 ([its text](src/host/fonts/OFL.txt)).