Skip to content

Commit 989e1f4

Browse files
committed
Core and Browser: Expanded event support: #50
Created or expanded Event, ErrorEvent, MouseEvent, PointerEvent, UiEvent. Moved Browser specific events from Core to Browser. UiEvent is the base class there. npm package updates.
1 parent 8439649 commit 989e1f4

34 files changed

Lines changed: 904 additions & 212 deletions

‎Browser/CLAUDE.md‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
This project is mainly written in the programming language SmallJS, a Smalltalk dialect.
2+
SmallJS source files have the extension: .st
3+
Examples of SmallJS apps are in the folders : ../Examples, ../Browser, ../Node.
4+
The SmallJS standard library is located in the folder: ../Smalltalk.
5+
6+
This is an app testing the DOM API wrappers in the SmallJS library,
7+
located in the folder ../Smalltalk/Browser.
8+
9+
The JS API documentation is here:
10+
https://developer.mozilla.org/en-US/docs/Web/API
11+
12+
## Source code
13+
14+
- All source code is in the folder: ./src
15+
- `main.ts`: page entry point. Starts `MyBrowserApp`, or `TestMyBrowserApp` if the URL has `?test`.
16+
- `MyBrowserApp.st`: the main app (loads the UI components and binds their elements).
17+
- `Components/`, `InputComponents/`: UI components, each with tests in its own `Test/` folder.
18+
- `worker.ts`, `sharedWorker.ts`: worker scripts used by the library's Worker and SharedWorker tests.
19+
- `types.ts`: imports npm modules only to inspect their TS types in VSCode; not used at runtime.
20+
- `Test/TestMyBrowserApp.st`, `Test/TestMyWindow.st`: tests for this app.
21+
22+
## Build and run
23+
24+
- `./build.sh`: compiles TypeScript (`tsc`) and SmallJS (`../Compiler/start.sh`),
25+
then runs the tests in the browsers configured in `.env` (see `.env.example`).
26+
Browsers close automatically if all tests succeed.
27+
- `./startWebServer.sh`: serves the folder `./web` at http://localhost:3000
28+
Open http://localhost:3000/?test to run the tests in the browser.
29+
- `./clean.sh`: removes the generated files.
30+
31+
## Generated files
32+
33+
- `./web/Script` contains compiled output (JS and source maps). Do not edit files there; edit ./src instead.
34+
- The other files in `./web` are hand-written: `index.html`, `default.css`, `MyObject.json`, images,
35+
and the HTML templates of the components in `Components/` and `InputComponents/`.
36+
37+
## Goal
38+
39+
- Implement and test more libraries, but on specific requests only.
40+
- Follow the structure and testing style of the other examples and of the library's own `Test` folders.

‎Browser/startWebServer.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ cd "$(dirname "$0")"
99
echo -n "Starting web server in: "
1010
pwd
1111
npx http-server web -c-1 -p 3000
12+
pause 2

‎Examples/AI/RAG/package-lock.json‎

Lines changed: 38 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Examples/AI/RAG/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"type": "module",
33
"dependencies": {
4-
"ollama": "^0.6.3",
5-
"pg": "^8.23.0",
4+
"ollama": "^0.6.4",
5+
"pg": "^8.23.1",
66
"sqlite-vec": "^0.1.9"
77
},
88
"devDependencies": {

‎Examples/AI/Server/package-lock.json‎

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Examples/AI/Server/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"type": "module",
33
"dependencies": {
4-
"@anthropic-ai/sdk": "^0.129.0",
4+
"@anthropic-ai/sdk": "^0.131.0",
55
"@google/generative-ai": "^0.24.1",
66
"express": "^5.2.1",
77
"express-session": "^1.19.0",
88
"http-terminator": "^3.2.0",
9-
"ollama": "^0.6.3",
10-
"openai": "^7.23.0"
9+
"ollama": "^0.6.4",
10+
"openai": "^7.25.0"
1111
},
1212
"devDependencies": {
1313
"@types/express": "^5.0.6",

‎Examples/Electron/package-lock.json‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Examples/Electron/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"type": "module",
33
"dependencies": {
4-
"electron": "^44.4.5"
4+
"electron": "^44.5.1"
55
},
66
"devDependencies": {
77
"@types/node": "^26.6.3"

0 commit comments

Comments
 (0)