this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Misc. tala-ui-v2 commits

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

+38 -20
+2 -5
CLAUDE.md
··· 33 33 ### Crate dependency order 34 34 35 35 ``` 36 - tala-format → tala-srs → tala-typst (planned) → tala-ui (planned) 36 + tala-format → tala-srs → tala-typst → tala 37 37 38 38 tala-cli (consumes both) 39 39 ``` ··· 63 63 64 64 Binary crate producing the `tala` binary. Two subcommands: `check` (parse + sidecar cross-check) and `review` (stubbed). 65 65 66 - ### Planned: `tala-typst` 66 + ### `tala-typst` 67 67 68 68 Render typst source strings to RGBA via the `typst` crate. Requires implementing `typst::World`. Two preambles: authoring (renders full card) and review (blanks replaced by boxes). Font loading must provide at least one valid font family or typst panics. 69 69 70 - ### Planned: `tala-ui` 71 - 72 - Native Floem UI. **Use `floem = { git = "https://github.com/lapce/floem" }` — do not use the crates.io 0.2 release, it is over a year out of date.** Use floem's re-exported wgpu; do not add wgpu as an independent dependency or you risk duplicate version splits. 73 70 74 71 ## Deck directory layout 75 72
+29 -12
Cargo.toml
··· 1 1 [workspace] 2 2 members = [ 3 + "crates/tala-cli", 3 4 "crates/tala-format", 4 5 "crates/tala-srs", 5 - "crates/tala-cli", 6 6 "crates/tala-typst", 7 7 ] 8 8 resolver = "2" 9 9 10 10 [workspace.dependencies] 11 - typst-syntax = "0.14.2" 12 - typst = "0.14.2" 13 - typst-render = "0.14.2" 14 - typst-assets = { version = "0.14.2", features = ["fonts"] } 15 - serde = { version = "1.0.228", features = ["derive"] } 16 - serde_json = "1.0.149" 17 - fsrs = "5.2.0" 18 - burn = { version = "0.17.1", features = ["ndarray"], default-features = false } 19 - clap = { version = "4.6.0", features = ["derive"] } 20 - git2 = "0.20.4" 21 - image = { version = "0.25", default-features = false, features = ["png"] } 11 + fsrs = "5.2.0" 12 + git2 = "0.20.4" 13 + serde_json = "1.0.149" 14 + typst = "0.14.2" 15 + typst-render = "0.14.2" 16 + typst-syntax = "0.14.2" 17 + 18 + [workspace.dependencies.burn] 19 + version = "0.17.1" 20 + features = ["ndarray"] 21 + default-features = false 22 + 23 + [workspace.dependencies.clap] 24 + version = "4.6.0" 25 + features = ["derive"] 26 + 27 + [workspace.dependencies.image] 28 + version = "0.25" 29 + features = ["png"] 30 + default-features = false 31 + 32 + [workspace.dependencies.serde] 33 + version = "1.0.228" 34 + features = ["derive"] 35 + 36 + [workspace.dependencies.typst-assets] 37 + version = "0.14.2" 38 + features = ["fonts"]
+4 -3
crates/tala-format/src/lib.rs
··· 186 186 let args = args_of(node)?; 187 187 let (named, tags, content_blocks) = collect_args(&args); 188 188 189 - let id = named.get("id")?.clone(); 189 + // id is optional — empty string signals "needs auto-assignment" 190 + let id = named.get("id").cloned().unwrap_or_default(); 190 191 if content_blocks.len() < 2 { 191 192 return None; 192 193 } ··· 211 212 let args = args_of(node)?; 212 213 let (named, tags, content_blocks) = collect_args(&args); 213 214 214 - let id = named.get("id")?.clone(); 215 + let id = named.get("id").cloned().unwrap_or_default(); 215 216 let body_span = content_blocks.first()?.clone(); 216 217 217 218 // Walk the body ContentBlock for #blank[] calls. ··· 231 232 let args = args_of(node)?; 232 233 let (named, tags, _) = collect_args(&args); 233 234 234 - let id = named.get("id")?.clone(); 235 + let id = named.get("id").cloned().unwrap_or_default(); 235 236 let src = named.get("src")?.clone(); 236 237 237 238 Some(CardEntry {
+3
crates/tala-typst/src/lib.rs
··· 67 67 /// Show both sides of a FrontBack card separated by a rule; blank contents 68 68 /// visible; cloze body visible. 69 69 const PREAMBLE_AUTHORING: &str = r#" 70 + #set page(width: 300pt, height: auto, margin: 10pt) 70 71 #let card(id: "", dir: "fwd", ..args) = { 71 72 let sides = args.pos() 72 73 sides.at(0, default: []) ··· 83 84 84 85 /// FrontBack: front side only; other card types unchanged. 85 86 const PREAMBLE_REVIEW_FRONT: &str = r#" 87 + #set page(width: 300pt, height: auto, margin: 10pt) 86 88 #let card(id: "", dir: "fwd", ..args) = args.pos().at(0, default: []) 87 89 #let blank(..args) = args.pos().at(0, default: []) 88 90 #let cloze(id: "", ..args) = args.pos().at(0, default: []) ··· 92 94 93 95 /// Cloze review: blank contents replaced by fixed-width underline boxes. 94 96 const PREAMBLE_REVIEW_CLOZE: &str = r#" 97 + #set page(width: 300pt, height: auto, margin: 10pt) 95 98 #let card(id: "", dir: "fwd", ..args) = { 96 99 let sides = args.pos() 97 100 sides.at(0, default: [])