New leaf crate op-util single-sources hex-color parsing (9 divergent copies, one with a non-ASCII panic), JSON escaping (one copy was lossy), and HTML/XML escaping (one copy missed the quote entity — an attribute-injection gap). Desktop now delegates image generate/search, settings payload serde, and the --mcp/--serve-web argv dispatch to op-host-services / op-editor-host-core instead of carrying drifted copies. Byte-identical widget_host twin files collapse into shared op-editor-core host_ui_transitions. Auth routes, the MCP port, product name, env-var names, service URLs, and status colors move to single shared constants / theme tokens; the stale claude-sonnet-4-5 default model id is corrected.
36 lines
1.3 KiB
TOML
36 lines
1.3 KiB
TOML
[package]
|
|
name = "op-codegen"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
description = "OpenPencil code generators — emit HTML/Vue/Svelte/React/Flutter/SwiftUI/Compose/RN from a PenDocument"
|
|
|
|
[lib]
|
|
name = "op_codegen"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
jian-ops-schema = { path = "../../vendor/jian/crates/jian-ops-schema" }
|
|
op-editor-core = { path = "../op-editor-core" }
|
|
# Canonical HTML escaping (dependency-free, wasm-clean).
|
|
op-util = { path = "../op-util" }
|
|
|
|
# AI pipeline deps — optional, pulled in only by the `ai` feature so
|
|
# non-AI consumers (and the deterministic generators) stay lean. op-ai
|
|
# is dependency-free + wasm-clean; op-codegen does NOT depend on
|
|
# op-ai-skills (skill corpus is expanded at the transport edge).
|
|
op-ai = { path = "../op-ai", optional = true }
|
|
serde = { workspace = true, features = ["derive"], optional = true }
|
|
serde_json = { workspace = true, optional = true }
|
|
base64 = { version = "0.22", optional = true }
|
|
|
|
[dev-dependencies]
|
|
# Round-trip validation for the hand-rolled STORED zip encoder
|
|
# (test-only; never reaches the wasm build).
|
|
zip = "2"
|
|
|
|
[features]
|
|
# Gates the AI code-generation pipeline (src/ai/). Off by default.
|
|
ai = ["dep:op-ai", "dep:serde", "dep:serde_json", "dep:base64"]
|