Skip to content

Commit

Permalink
Merge pull request #61 from calcit-lang/formats
Browse files Browse the repository at this point in the history
upgrade deps; format markdown and yaml; replace intro images
  • Loading branch information
NoEgAm authored Sep 15, 2024
2 parents 887ebf0 + 41e55c8 commit e109ad7
Show file tree
Hide file tree
Showing 5 changed files with 252 additions and 254 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,30 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- uses: calcit-lang/[email protected].6
with:
bundler: false
- uses: calcit-lang/[email protected].7
with:
bundler: false

- run: caps --ci && yarn && yarn compile-server && yarn compile-page && yarn release-page
- run: caps --ci && yarn && yarn compile-server && yarn compile-page && yarn release-page

- name: Upload web assets
id: deploy
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{secrets.rsync_private_key}}
with:
flags: '-avzr --progress'
options: ''
ssh_options: ''
src: 'dist/*'
dest: '[email protected]:/web-assets/repo/${{ github.repository }}'
- name: Upload web assets
id: deploy
uses: Pendect/[email protected]
env:
DEPLOY_KEY: ${{secrets.rsync_private_key}}
with:
flags: "-avzr --progress"
options: ""
ssh_options: ""
src: "dist/*"
dest: "[email protected]:/web-assets/repo/${{ github.repository }}"

- name: Display status from deploy
run: echo "${{ steps.deploy.outputs.status }}"
- name: Display status from deploy
run: echo "${{ steps.deploy.outputs.status }}"
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@

Calcit Editor
------
## Calcit Editor

> Intuitive S-expressions editing for Calcit.
* **Auto Layout**: expressions in blocks and inline-blocks, styled with CSS
* **Tree Editing**: intuitive way of structural editing as nested expressions
* **Call Stack Navigation**: more fine-grained functions navigation
* **Collaboration**: changes real-time synced among multiple clients via WebSockets
- **Auto Layout**: expressions in blocks and inline-blocks, styled with CSS
- **Structural Editing**: intuitive way of structural editing as nested expressions
- **Call Stack Navigation**: more fine-grained functions navigation
- **Collaboration**: changes real-time synced among multiple clients via WebSockets

One function/definition in a screen, `Command d` to open called function at next tab, `Command j` `Command k` `Command i` to switch. Screenshots from Chrome App:

![Expression editor](https://pbs.twimg.com/media/E_8Rv2UUYAQDd52?format=jpg&name=large)
![Expression editor](https://pbs.twimg.com/media/GWufWGta8AEnvjB?format=jpg&name=4096x4096)

Based on DOM/CSS, easy for another theme:

![Styling](https://pbs.twimg.com/media/E_8RyuHVkAA2hU-?format=jpg&name=large)
![Styling](https://pbs.twimg.com/media/GWufaXJXUAcYvjh?format=jpg&name=4096x4096)

`Command p` to search and jump inspired by Sublime Text :

![Search panel](https://pbs.twimg.com/media/E_8R3F4VQAAUGWf?format=jpg&name=large)
![Search panel](https://pbs.twimg.com/media/GWufe_4XUAAcDFS?format=jpg&name=4096x4096)

Browse namespaces and functions/variables:
Browse definitions in a dependency tree:

![Definitions browser](https://pbs.twimg.com/media/E_8R63kVIAQ8-AM?format=jpg&name=large)
![Definitions browser](https://pbs.twimg.com/media/GWufpu7XUAE0-O0?format=jpg&name=4096x4096)

### Usages

Expand All @@ -40,8 +38,8 @@ UI of the editor is a webapp on http://editor.calcit-lang.org/?port=6001

You may try with my project templates:

* simple virtual DOM playground [calcit-workflow](https://github.com/mvc-works/calcit-workflow)
* a toy Node.js script [calcit-nodejs-workflow](https://github.com/mvc-works/calcit-nodejs-workflow)
- simple virtual DOM playground [calcit-workflow](https://github.com/mvc-works/calcit-workflow)
- a toy Node.js script [calcit-nodejs-workflow](https://github.com/mvc-works/calcit-nodejs-workflow)

or even clone current repo for trying out.

Expand All @@ -61,21 +59,21 @@ The web UI takes several query options:
http://editor.calcit-lang.org/?host=localhost&port=6001
```

* `port`, defaults to `6001`
* `host`, defaults to `localhost`, connects via WebSocket
- `port`, defaults to `6001`
- `host`, defaults to `localhost`, connects via WebSocket

Code is emitted in `compact.cirru` by pressing `Command s`. Two extra files will be emitted:

* `compact.cirru` contains a compact version of data tree of the program.
* `.compact-inc.cirru` contains diff information from latest modification of per definition.
- `compact.cirru` contains a compact version of data tree of the program.
- `.compact-inc.cirru` contains diff information from latest modification of per definition.

It would be used in [calcit-runner](https://github.com/calcit-lang/calcit_runner.rs).

When server is stopped with `Control c`, `calcit.cirru` is also updated.

There are also several options in `:configs` field in `calcit.cirru`:

* `port`, defaults to `6001`
- `port`, defaults to `6001`

Editor UI is decoupled with WebSocket server, so it's okay to connect remote server from multiple pages with all expressions synced in real-time.

Expand Down
4 changes: 2 additions & 2 deletions deps.cirru
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

{}
:calcit-version |0.9.4
:calcit-version |0.9.5
:dependencies $ {}
|calcit-lang/lilac |main
|calcit-lang/memof |main
|Respo/respo.calcit |0.16.10
|Respo/respo.calcit |0.16.11
|Respo/respo-ui.calcit |main
|Respo/respo-markdown.calcit |main
|calcit-lang/recollect |main
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"copy-text-to-clipboard": "^3.2.0",
"feather-icons": "^4.29.2",
"url-parse": "^1.5.10",
"vite": "^5.4.2"
"vite": "^5.4.3"
},
"dependencies": {
"@calcit/procs": "^0.9.4",
"@calcit/procs": "^0.9.5",
"chalk": "^5.3.0",
"dayjs": "^1.11.13",
"gaze": "^1.1.3",
Expand Down
Loading

0 comments on commit e109ad7

Please sign in to comment.