Skip to content

Commit

Permalink
starting ligature desktop rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
almibe committed Dec 8, 2024
1 parent 0398eaf commit 52d25c1
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 373 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LigatureNotebook
# Ligature Desktop

See https://tauri.app/v1/guides/getting-started/prerequisites for setting up a development environment.
See https://v2.tauri.app/start/prerequisites/ for setting up a development environment.
Once this has been setup run the following.

```
Expand Down
178 changes: 10 additions & 168 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ligature-notebook",
"name": "ligature-desktop",
"version": "0.1.0",
"type": "module",
"private": true,
Expand All @@ -13,13 +13,13 @@
"dependencies": {
"@ligature/ligature": "^0.8.0",
"@ligature/ligature-components": "^0.8.0",
"@shoelace-style/shoelace": "^2.17.1",
"@tauri-apps/api": "^2",
"@tauri-apps/plugin-dialog": "^2.0.0",
"@tauri-apps/plugin-fs": "^2.0.0",
"@tauri-apps/plugin-shell": "^2",
"marked": "^14.1.3",
"solid-js": "^1.9.2"
"solid-js": "^1.9.2",
"split.js": "^1.6.5"
},
"devDependencies": {
"@tauri-apps/cli": "^2",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "ligature-notebook"
name = "ligature-desktop"
version = "0.1.0"
description = "A Desktop Application for Working with Ligature"
authors = ["Alex Michael Berry"]
Expand All @@ -11,7 +11,7 @@ edition = "2021"
# The `_lib` suffix may seem redundant but it is necessary
# to make the lib name unique and wouldn't conflict with the bin name.
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
name = "ligature_notebook_lib"
name = "ligature_desktop_lib"
crate-type = ["staticlib", "cdylib", "rlib"]

[build-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

fn main() {
ligature_notebook_lib::run()
ligature_desktop_lib::run()
}
30 changes: 30 additions & 0 deletions src/components/Application.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { onMount } from "solid-js"
import Split from "split.js"
import { showEditor } from "@ligature/ligature-components/src/editor/editor"
import { run as runScript } from "@ligature/ligature"
import { EditorView } from "codemirror";


export function Application() {
let editor: EditorView = null;
onMount(() => {
Split(["#top", "#results"], { direction: "vertical"})
editor = showEditor("#editor")
})

function run() {
console.log(runScript(editor.state.doc.toString()))
}

return <div style="height:100%; width: 100%">
<div id="top">
<div>
<button onclick={run}><img src="../../static/icons/play.svg" alt="Add" /></button>
</div>
<div id="editor"></div>
</div>
<div id="results">
Results
</div>
</div>
}
Loading

0 comments on commit 52d25c1

Please sign in to comment.