mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 18:47:42 -06:00
The catalog Store on the web is an in-memory mirror (apps/lightcraft-web/src/files.rs) loaded from browser storage at start-up and flushed in the background in modification order (so a snapshot always lands before the log reset that follows it). Storage is OPFS when writable from the main thread (createWritable), else IndexedDB (?store=idb forces it); ?reset clears it. Imported originals are stored as originals/<content hash> and referenced as web/<hash>/<name>; the main thread keeps a bounded memory cache and loads misses (and the active photo) asynchronously. view.json and ui.json are saved every second when changed. Engine: Session::open_library_in(LibraryStores) opens a library from any Store (presets, view and prefs go through it too); Session::save_view; Copy imports into a non-disk library add. JS automation API: lightcraft.command(id, paramsJson) (+ web.stats). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
73 lines
1.8 KiB
TOML
73 lines
1.8 KiB
TOML
[package]
|
|
name = "lightcraft-web"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
description = "LightCraft in the browser: the egui UI compiled to WASM (build with `cargo xtask web`)"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[dependencies]
|
|
lightcraft-engine = { workspace = true }
|
|
lightcraft-ui-egui = { workspace = true }
|
|
lightcraft-codecs = { workspace = true }
|
|
lightcraft-raster = { workspace = true }
|
|
lightcraft-preview = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
eframe = { workspace = true, features = ["default_fonts", "glow"] }
|
|
egui = { workspace = true }
|
|
wasm-bindgen = { workspace = true }
|
|
wasm-bindgen-futures = { workspace = true }
|
|
js-sys = { workspace = true }
|
|
web-sys = { workspace = true, features = [
|
|
"Blob",
|
|
"BlobPropertyBag",
|
|
"DedicatedWorkerGlobalScope",
|
|
"Document",
|
|
"DomStringList",
|
|
"Element",
|
|
"EventTarget",
|
|
"File",
|
|
"FileList",
|
|
"FileSystemCreateWritableOptions",
|
|
"FileSystemDirectoryHandle",
|
|
"FileSystemFileHandle",
|
|
"FileSystemGetDirectoryOptions",
|
|
"FileSystemGetFileOptions",
|
|
"FileSystemRemoveOptions",
|
|
"FileSystemWritableFileStream",
|
|
"HtmlAnchorElement",
|
|
"HtmlCanvasElement",
|
|
"HtmlElement",
|
|
"HtmlInputElement",
|
|
"IdbDatabase",
|
|
"IdbFactory",
|
|
"IdbKeyRange",
|
|
"IdbObjectStore",
|
|
"IdbOpenDbRequest",
|
|
"IdbRequest",
|
|
"IdbTransaction",
|
|
"IdbTransactionMode",
|
|
"IdbVersionChangeEvent",
|
|
"Location",
|
|
"MessageEvent",
|
|
"Navigator",
|
|
"Performance",
|
|
"StorageManager",
|
|
"Url",
|
|
"Window",
|
|
"Worker",
|
|
"WorkerOptions",
|
|
"WorkerType",
|
|
"WritableStream",
|
|
] }
|