diff --git a/Cargo.lock b/Cargo.lock index c4ab50966..a39000ec6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4078,24 +4078,6 @@ dependencies = [ "tauri-plugin-fs", "tempfile", "thiserror 2.0.19", - "tree-sitter-bash", - "tree-sitter-c", - "tree-sitter-css", - "tree-sitter-diff", - "tree-sitter-go", - "tree-sitter-highlight", - "tree-sitter-html", - "tree-sitter-javascript", - "tree-sitter-jsdoc", - "tree-sitter-json", - "tree-sitter-md", - "tree-sitter-python", - "tree-sitter-regex", - "tree-sitter-ruby", - "tree-sitter-rust", - "tree-sitter-svelte-ng", - "tree-sitter-toml-ng", - "tree-sitter-typescript", "ts-rs", "url", ] @@ -4989,12 +4971,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "streaming-iterator" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" - [[package]] name = "string_cache" version = "0.9.0" @@ -6098,208 +6074,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "tree-sitter" -version = "0.25.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f873475d258561b06f1c595d93308a7ed124d9977cb26b148c2084a4a3cc87" -dependencies = [ - "cc", - "regex", - "regex-syntax", - "serde_json", - "streaming-iterator", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-bash" -version = "0.23.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "329a4d48623ac337d42b1df84e81a1c9dbb2946907c102ca72db158c1964a52e" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-c" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afd2b1bf1585dc2ef6d69e87d01db8adb059006649dd5f96f31aa789ee6e9c71" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-css" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad6489794d41350d12a7fbe520e5199f688618f43aace5443980d1ddcf1b29e" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-diff" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfe1e5ca280a65dfe5ba4205c1bcc84edf486464fed315db53dee6da9a335889" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-go" -version = "0.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13d476345220dbe600147dd444165c5791bf85ef53e28acbedd46112ee18431" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-highlight" -version = "0.25.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc5f880ad8d8f94e88cb81c3557024cf1a8b75e3b504c50481ed4f5a6006ff3" -dependencies = [ - "regex", - "streaming-iterator", - "thiserror 2.0.19", - "tree-sitter", -] - -[[package]] -name = "tree-sitter-html" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261b708e5d92061ede329babaaa427b819329a9d427a1d710abb0f67bbef63ee" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-javascript" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf40bf599e0416c16c125c3cec10ee5ddc7d1bb8b0c60fa5c4de249ad34dc1b1" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-jsdoc" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3862dfcb1038fc5e7812d7df14190afdeb7e1415288fd5f51f58395f8cb0faf" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-json" -version = "0.24.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d727acca406c0020cffc6cf35516764f36c8e3dc4408e5ebe2cb35a947ec471" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-language" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009994f150cc0cd50ff54917d5bc8bffe8cad10ca10d81c34da2ec421ae61782" - -[[package]] -name = "tree-sitter-md" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f968c22a01010b83fc960455ae729db08dbeb6388617d9113897cb9204b030" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-python" -version = "0.23.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d065aaa27f3aaceaf60c1f0e0ac09e1cb9eb8ed28e7bcdaa52129cffc7f4b04" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-regex" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712656f8c262a5a4b7d6026e6246950787d178d613864952554e1516a33ab0c1" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-ruby" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0484ea4ef6bb9c575b4fdabde7e31340a8d2dbc7d52b321ac83da703249f95" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-rust" -version = "0.23.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8ccb3e3a3495c8a943f6c3fd24c3804c471fd7f4f16087623c7fa4c0068e8a" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-svelte-ng" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef0a71f9cf5e94373cc86c64893630c8a29bb25d3390a248268d08af2165fa37" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-toml-ng" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9adc2c898ae49730e857d75be403da3f92bb81d8e37a2f918a08dd10de5ebb1" -dependencies = [ - "cc", - "tree-sitter-language", -] - -[[package]] -name = "tree-sitter-typescript" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5f76ed8d947a75cc446d5fccd8b602ebf0cde64ccf2ffa434d873d7a575eff" -dependencies = [ - "cc", - "tree-sitter-language", -] - [[package]] name = "tree_magic_mini" version = "3.2.2" diff --git a/crates/radicle-types/Cargo.toml b/crates/radicle-types/Cargo.toml index a5e93c6ff..e0f4569d6 100644 --- a/crates/radicle-types/Cargo.toml +++ b/crates/radicle-types/Cargo.toml @@ -27,24 +27,6 @@ tauri-plugin-clipboard-manager = { version = "2.3.2" } tauri-plugin-fs = { version = "2.5.0" } tempfile = { version = "3.19.0" } thiserror = { version = "2.0.12" } -tree-sitter-bash = { version = "0.23.3" } -tree-sitter-c = { version = "0.23.2" } -tree-sitter-css = { version = "0.23.1" } -tree-sitter-diff = { version = "0.1.0" } -tree-sitter-go = { version = "0.23.4" } -tree-sitter-highlight = { version = "0.25.3" } -tree-sitter-html = { version = "0.23.2" } -tree-sitter-javascript = { version = "0.23.1" } -tree-sitter-jsdoc = { version = "0.23.2" } -tree-sitter-json = { version = "0.24.8" } -tree-sitter-md = { version = "0.3.2" } -tree-sitter-python = { version = "0.23.4" } -tree-sitter-regex = { version = "0.24.3" } -tree-sitter-ruby = { version = "0.23.1" } -tree-sitter-rust = { version = "0.23.2" } -tree-sitter-svelte-ng = { version = "1.0.2" } -tree-sitter-toml-ng = { version = "0.7.0" } -tree-sitter-typescript = { version = "0.23.2" } ts-rs = { version = "12.0.1", features = [ "serde-json-impl", "no-serde-warnings", diff --git a/crates/radicle-types/bindings/diff/Added.ts b/crates/radicle-types/bindings/diff/Added.ts index 82dc53615..8b90ac445 100644 --- a/crates/radicle-types/bindings/diff/Added.ts +++ b/crates/radicle-types/bindings/diff/Added.ts @@ -1,5 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { DiffContent } from "./DiffContent"; -import type { DiffFile } from "./DiffFile"; -export type Added = { path: string; diff: DiffContent; new: DiffFile }; +export type Added = { path: string; diff: DiffContent }; diff --git a/crates/radicle-types/bindings/diff/Addition.ts b/crates/radicle-types/bindings/diff/Addition.ts deleted file mode 100644 index 98bfe1ec1..000000000 --- a/crates/radicle-types/bindings/diff/Addition.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Line } from "../syntax/Line"; - -export type Addition = { line: string; lineNo: number; highlight: Line | null }; diff --git a/crates/radicle-types/bindings/diff/Copied.ts b/crates/radicle-types/bindings/diff/Copied.ts index d69dc7e30..1da919873 100644 --- a/crates/radicle-types/bindings/diff/Copied.ts +++ b/crates/radicle-types/bindings/diff/Copied.ts @@ -1,11 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { DiffContent } from "./DiffContent"; -import type { DiffFile } from "./DiffFile"; -export type Copied = { - oldPath: string; - newPath: string; - old: DiffFile; - new: DiffFile; - diff: DiffContent; -}; +export type Copied = { oldPath: string; newPath: string; diff: DiffContent }; diff --git a/crates/radicle-types/bindings/diff/Deleted.ts b/crates/radicle-types/bindings/diff/Deleted.ts index 052ba330a..1381f6bae 100644 --- a/crates/radicle-types/bindings/diff/Deleted.ts +++ b/crates/radicle-types/bindings/diff/Deleted.ts @@ -1,5 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { DiffContent } from "./DiffContent"; -import type { DiffFile } from "./DiffFile"; -export type Deleted = { path: string; diff: DiffContent; old: DiffFile }; +export type Deleted = { path: string; diff: DiffContent }; diff --git a/crates/radicle-types/bindings/diff/Deletion.ts b/crates/radicle-types/bindings/diff/Deletion.ts deleted file mode 100644 index 90ef5df1c..000000000 --- a/crates/radicle-types/bindings/diff/Deletion.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Line } from "../syntax/Line"; - -export type Deletion = { line: string; lineNo: number; highlight: Line | null }; diff --git a/crates/radicle-types/bindings/diff/DiffContent.ts b/crates/radicle-types/bindings/diff/DiffContent.ts index 6a470f41e..bf9f131ea 100644 --- a/crates/radicle-types/bindings/diff/DiffContent.ts +++ b/crates/radicle-types/bindings/diff/DiffContent.ts @@ -1,11 +1,11 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { EofNewLine } from "./EofNewLine"; import type { FileStats } from "./FileStats"; -import type { Hunks } from "./Hunks"; +/** + * What kind of change a file carries. `Plain` keeps its stats; the other two + * exist so the app can label a file it cannot render lines for. + */ export type DiffContent = { "type": "binary" } | { "type": "plain"; - hunks: Hunks; stats: FileStats; - eof: EofNewLine; } | { "type": "empty" }; diff --git a/crates/radicle-types/bindings/diff/DiffFile.ts b/crates/radicle-types/bindings/diff/DiffFile.ts deleted file mode 100644 index 2a1d63ed2..000000000 --- a/crates/radicle-types/bindings/diff/DiffFile.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { FileMode } from "./FileMode"; - -export type DiffFile = { oid: string; mode: FileMode }; diff --git a/crates/radicle-types/bindings/diff/EofNewLine.ts b/crates/radicle-types/bindings/diff/EofNewLine.ts deleted file mode 100644 index 38b806429..000000000 --- a/crates/radicle-types/bindings/diff/EofNewLine.ts +++ /dev/null @@ -1,7 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type EofNewLine = - | "oldMissing" - | "newMissing" - | "bothMissing" - | "noneMissing"; diff --git a/crates/radicle-types/bindings/diff/FileMode.ts b/crates/radicle-types/bindings/diff/FileMode.ts deleted file mode 100644 index 12d5442ff..000000000 --- a/crates/radicle-types/bindings/diff/FileMode.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type FileMode = "blob" | "blobExecutable" | "tree" | "link" | "commit"; diff --git a/crates/radicle-types/bindings/diff/Hunk.ts b/crates/radicle-types/bindings/diff/Hunk.ts deleted file mode 100644 index 363f52fb9..000000000 --- a/crates/radicle-types/bindings/diff/Hunk.ts +++ /dev/null @@ -1,9 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Modification } from "./Modification"; - -export type Hunk = { - header: string; - lines: Array; - old: { start: number; end: number }; - new: { start: number; end: number }; -}; diff --git a/crates/radicle-types/bindings/diff/Hunks.ts b/crates/radicle-types/bindings/diff/Hunks.ts deleted file mode 100644 index ebcfbb160..000000000 --- a/crates/radicle-types/bindings/diff/Hunks.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Hunk } from "./Hunk"; - -export type Hunks = Array; diff --git a/crates/radicle-types/bindings/diff/Line.ts b/crates/radicle-types/bindings/diff/Line.ts deleted file mode 100644 index 07d22d8e3..000000000 --- a/crates/radicle-types/bindings/diff/Line.ts +++ /dev/null @@ -1,3 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -export type Line = Array; diff --git a/crates/radicle-types/bindings/diff/Modification.ts b/crates/radicle-types/bindings/diff/Modification.ts deleted file mode 100644 index 7ff698732..000000000 --- a/crates/radicle-types/bindings/diff/Modification.ts +++ /dev/null @@ -1,15 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Line } from "../syntax/Line"; -import type { Addition } from "./Addition"; -import type { Deletion } from "./Deletion"; - -export type Modification = - | { "type": "addition" } & Addition - | { "type": "deletion" } & Deletion - | { - "type": "context"; - line: string; - lineNoOld: number; - lineNoNew: number; - highlight: Line | null; - }; diff --git a/crates/radicle-types/bindings/diff/Modified.ts b/crates/radicle-types/bindings/diff/Modified.ts index ba5743e3e..37db6cab0 100644 --- a/crates/radicle-types/bindings/diff/Modified.ts +++ b/crates/radicle-types/bindings/diff/Modified.ts @@ -1,10 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { DiffContent } from "./DiffContent"; -import type { DiffFile } from "./DiffFile"; -export type Modified = { - path: string; - diff: DiffContent; - old: DiffFile; - new: DiffFile; -}; +export type Modified = { path: string; diff: DiffContent }; diff --git a/crates/radicle-types/bindings/diff/Moved.ts b/crates/radicle-types/bindings/diff/Moved.ts index 637d18b6c..5a8293e99 100644 --- a/crates/radicle-types/bindings/diff/Moved.ts +++ b/crates/radicle-types/bindings/diff/Moved.ts @@ -1,11 +1,4 @@ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. import type { DiffContent } from "./DiffContent"; -import type { DiffFile } from "./DiffFile"; -export type Moved = { - oldPath: string; - old: DiffFile; - newPath: string; - new: DiffFile; - diff: DiffContent; -}; +export type Moved = { oldPath: string; newPath: string; diff: DiffContent }; diff --git a/crates/radicle-types/bindings/syntax/Label.ts b/crates/radicle-types/bindings/syntax/Label.ts deleted file mode 100644 index 9cc1fdde4..000000000 --- a/crates/radicle-types/bindings/syntax/Label.ts +++ /dev/null @@ -1,7 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Paint } from "./Paint"; - -/** - * A styled string that does not contain any `'\n'`. - */ -export type Label = Paint; diff --git a/crates/radicle-types/bindings/syntax/Line.ts b/crates/radicle-types/bindings/syntax/Line.ts deleted file mode 100644 index 9c955d3a3..000000000 --- a/crates/radicle-types/bindings/syntax/Line.ts +++ /dev/null @@ -1,7 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Label } from "./Label"; - -/** - * A line of text that has styling and can be displayed. - */ -export type Line = { items: Array