ducpy 3.2.0__tar.gz → 3.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ducpy-3.2.0 → ducpy-3.2.2}/Cargo.lock +2 -1
- {ducpy-3.2.0 → ducpy-3.2.2}/PKG-INFO +1 -1
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducpy/crate/Cargo.toml +1 -1
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/api/version_control.rs +0 -1
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/parse.rs +4 -4
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/serialize.rs +2 -2
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/types.rs +3 -2
- {ducpy-3.2.0 → ducpy-3.2.2}/Cargo.toml +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/LICENSE +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/README.md +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducpy/crate/src/lib.rs +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/.gitignore +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/Cargo.toml +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/LICENSE +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/README.md +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/build.rs +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/package.json +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/release.config.cjs +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/api/document.rs +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/api/meta.rs +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/api/mod.rs +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/db/bootstrap.rs +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/db/mod.rs +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/db/native.rs +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/db/wasm.rs +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/lib.rs +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/src/serde_utils.rs +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/packages/ducrs/tests/.gitignore +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/pyproject.toml +0 -0
- {ducpy-3.2.0 → ducpy-3.2.2}/src/ducpy_native/__init__.py +0 -0
|
@@ -390,6 +390,7 @@ dependencies = [
|
|
|
390
390
|
"js-sys",
|
|
391
391
|
"log",
|
|
392
392
|
"serde",
|
|
393
|
+
"serde-wasm-bindgen",
|
|
393
394
|
"serde_json",
|
|
394
395
|
"svg2pdf",
|
|
395
396
|
"svgtypes 0.12.0",
|
|
@@ -411,7 +412,7 @@ dependencies = [
|
|
|
411
412
|
|
|
412
413
|
[[package]]
|
|
413
414
|
name = "ducpy-native"
|
|
414
|
-
version = "3.2.
|
|
415
|
+
version = "3.2.2"
|
|
415
416
|
dependencies = [
|
|
416
417
|
"duc",
|
|
417
418
|
"pyo3",
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
//! - Restoring document state at any version (checkpoint or delta replay)
|
|
5
5
|
//! - Creating new checkpoints and deltas
|
|
6
6
|
//! - Listing version history
|
|
7
|
-
//! - Pruning old versions
|
|
8
7
|
//!
|
|
9
8
|
//! All operations work directly against the embedded SQLite schema
|
|
10
9
|
//! (`version_control.sql`) and produce/consume the canonical Rust types
|
|
@@ -1506,10 +1506,10 @@ fn read_table_element(conn: &Connection, base: DucElementBase) -> ParseResult<Du
|
|
|
1506
1506
|
fn read_model_element(conn: &Connection, base: DucElementBase) -> ParseResult<DucElementEnum> {
|
|
1507
1507
|
let id = base.id.clone();
|
|
1508
1508
|
let mut stmt = conn.prepare_cached(
|
|
1509
|
-
"SELECT model_type, code,
|
|
1509
|
+
"SELECT model_type, code, thumbnail FROM element_model WHERE element_id = ?1"
|
|
1510
1510
|
)?;
|
|
1511
|
-
let (model_type, code,
|
|
1512
|
-
Ok((row.get::<_, Option<String>>(0)?, row.get::<_, Option<String>>(1)?, row.get::<_, Option<
|
|
1511
|
+
let (model_type, code, thumbnail) = stmt.query_row(params![id], |row| {
|
|
1512
|
+
Ok((row.get::<_, Option<String>>(0)?, row.get::<_, Option<String>>(1)?, row.get::<_, Option<Vec<u8>>>(2)?))
|
|
1513
1513
|
})?;
|
|
1514
1514
|
|
|
1515
1515
|
let mut f_stmt = conn.prepare_cached(
|
|
@@ -1521,7 +1521,7 @@ fn read_model_element(conn: &Connection, base: DucElementBase) -> ParseResult<Du
|
|
|
1521
1521
|
let viewer_state = read_model_viewer_state(conn, &id)?;
|
|
1522
1522
|
|
|
1523
1523
|
Ok(DucElementEnum::DucModelElement(DucModelElement {
|
|
1524
|
-
base, model_type, code,
|
|
1524
|
+
base, model_type, code, thumbnail, file_ids, viewer_state,
|
|
1525
1525
|
}))
|
|
1526
1526
|
}
|
|
1527
1527
|
|
|
@@ -829,9 +829,9 @@ fn write_document_grid_config(
|
|
|
829
829
|
|
|
830
830
|
fn write_model_element(tx: &Transaction, e: &DucModelElement) -> SerializeResult<()> {
|
|
831
831
|
tx.execute(
|
|
832
|
-
"INSERT INTO element_model (element_id, model_type, code,
|
|
832
|
+
"INSERT INTO element_model (element_id, model_type, code, thumbnail)
|
|
833
833
|
VALUES (?1, ?2, ?3, ?4)",
|
|
834
|
-
params![e.base.id, e.model_type, e.code, e.
|
|
834
|
+
params![e.base.id, e.model_type, e.code, e.thumbnail],
|
|
835
835
|
)?;
|
|
836
836
|
|
|
837
837
|
{
|
|
@@ -1185,8 +1185,9 @@ pub struct DucModelElement {
|
|
|
1185
1185
|
pub model_type: Option<String>,
|
|
1186
1186
|
/** Defines the source code of the model using build123d python code */
|
|
1187
1187
|
pub code: Option<String>,
|
|
1188
|
-
/** The last known
|
|
1189
|
-
|
|
1188
|
+
/** The last known image thumbnail of the 3D model for quick rendering on the canvas */
|
|
1189
|
+
#[serde(with = "serde_bytes", default, skip_serializing_if = "Option::is_none")]
|
|
1190
|
+
pub thumbnail: Option<Vec<u8>>,
|
|
1190
1191
|
/** Possibly connected external files, such as STEP, STL, DXF, etc. */
|
|
1191
1192
|
pub file_ids: Vec<String>,
|
|
1192
1193
|
/** The last known 3D viewer state for the model */
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|