Skip to content

Commit 683db99

Browse files
More consistent document crate names
1 parent 97f8113 commit 683db99

43 files changed

Lines changed: 101 additions & 101 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ members = [
77
"desktop/platform/linux",
88
"desktop/platform/mac",
99
"desktop/platform/win",
10-
"document/graph-storage",
10+
"document/graph",
1111
"document/container",
12-
"document/document-format",
12+
"document/format",
1313
"editor",
1414
"frontend/wrapper",
1515
"libraries/dyn-any",
@@ -91,8 +91,8 @@ repeat-nodes = { path = "node-graph/nodes/repeat" }
9191
math-nodes = { path = "node-graph/nodes/math" }
9292
path-bool-nodes = { path = "node-graph/nodes/path-bool" }
9393
graph-craft = { path = "node-graph/graph-craft" }
94-
graph-storage = { path = "document/graph-storage", default-features = false }
95-
document-format = { path = "document/document-format" }
94+
document-graph = { path = "document/graph", default-features = false }
95+
document-format = { path = "document/format" }
9696
document-container = { path = "document/container" }
9797
raster-nodes = { path = "node-graph/nodes/raster" }
9898
graphene-std = { path = "node-graph/nodes/gstd" }
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[package]
22
name = "document-format"
3-
description = "Typed handle for the .gdd document format, sitting over graph-storage and document-container"
3+
description = "Typed handle for the .gdd document format, sitting over document-graph and document-container"
44
edition.workspace = true
55
version.workspace = true
66
license.workspace = true
77
authors.workspace = true
88

99
[features]
10-
# Runtime bridge: the editorstorage conversion methods (stage/commit from a `NodeNetwork`,
10+
# Runtime bridge: the editor <-> storage conversion methods (stage/commit from a `NodeNetwork`,
1111
# `network_ids`, `declarations`). Off lets a standalone migration tool build without `graph-craft`
12-
# or `core-types`. Forwards to `graph-storage/conversion`.
13-
conversion = ["graph-storage/conversion", "dep:graph-craft", "dep:core-types"]
12+
# or `core-types`. Forwards to `document-graph/conversion`.
13+
conversion = ["document-graph/conversion", "dep:graph-craft", "dep:core-types"]
1414
# Compressed-archive export/open. Each forwards to the matching `document-container` feature and
1515
# gates that format's `ExportFormat` arm and sink. The folder/memory codec-free core needs neither.
1616
zip = ["document-container/zip"]
@@ -19,7 +19,7 @@ default = ["conversion", "zip", "xz"]
1919

2020
[dependencies]
2121
document-container = { workspace = true }
22-
graph-storage = { workspace = true, default-features = false }
22+
document-graph = { workspace = true, default-features = false }
2323
graph-craft = { workspace = true, optional = true }
2424
graphene-resource = { workspace = true }
2525
core-types = { workspace = true, optional = true }
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
66
use document_container::ContainerError;
77
#[cfg(feature = "conversion")]
8-
use graph_storage::CommitError;
9-
use graph_storage::CrdtError;
8+
use document_graph::CommitError;
9+
use document_graph::CrdtError;
1010
use graphene_resource::ResourceHash;
1111

1212
use crate::codec::CodecError;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl<L: Layout> Gdd<L> {
162162
// below, so only the gap is loaded from the byte store here.
163163
let mut export_session = self.session.clone();
164164
let mut hashes_from_store: Vec<ResourceHash> = Vec::new();
165-
let mut links_to_promote: Vec<graph_storage::ResourceId> = Vec::new();
165+
let mut links_to_promote: Vec<document_graph::ResourceId> = Vec::new();
166166
for (id, entry) in &export_session.registry().resources {
167167
let Some(hash) = entry.hash else { continue };
168168
let embed = entry.has_embedded_source() || options.embed_all_resources;
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Typed handle for `.gdd` documents.
22
//!
3-
//! [`Gdd`] owns a [`graph_storage::Session`] plus a working-copy [`document_container::AnyContainer`].
3+
//! [`Gdd`] owns a [`document_graph::Session`] plus a working-copy [`document_container::AnyContainer`].
44
//! Mutations flow through `Gdd` to keep the session and the on-disk working copy mirrored.
55
//! Export is a separate, explicit operation — see [`export::ExportFormat`].
66
//!
@@ -16,8 +16,8 @@ use std::path::Path;
1616
use document_container::backends::folder::FolderBackend;
1717
use document_container::{AnyContainer, AsyncContainer, ByteHolder, ContainerError};
1818
#[cfg(feature = "conversion")]
19-
use graph_storage::{CommitError, NodeMetadataSource};
20-
use graph_storage::{Delta, HotOp, PeerId, Registry, Session};
19+
use document_graph::{CommitError, NodeMetadataSource};
20+
use document_graph::{Delta, HotOp, PeerId, Registry, Session};
2121
#[cfg(feature = "conversion")]
2222
use graphene_resource::LoadResource;
2323
use graphene_resource::ResourceHash;
@@ -83,7 +83,7 @@ pub struct Gdd<L: Layout = GddV1Layout> {
8383
pub(crate) view_settings: std::collections::BTreeMap<String, serde_json::Value>,
8484
/// Per-network view settings (node-graph nav + previewing), keyed by stable [`NetworkId`]. Same per-peer
8585
/// `session.json` treatment as [`view_settings`](Self::view_settings), but scoped per network.
86-
pub(crate) network_view_settings: std::collections::BTreeMap<graph_storage::NetworkId, std::collections::BTreeMap<String, serde_json::Value>>,
86+
pub(crate) network_view_settings: std::collections::BTreeMap<document_graph::NetworkId, std::collections::BTreeMap<String, serde_json::Value>>,
8787
}
8888

8989
/// Native folder-backed convenience constructors. On wasm the editor builds an OPFS-backed
@@ -261,19 +261,19 @@ impl<L: Layout> Gdd<L> {
261261
}
262262

263263
/// The per-network view settings read from `session.json` (node-graph nav + previewing), keyed by
264-
/// [`NetworkId`](graph_storage::NetworkId). Opaque `ui::nav::*` / `ui::previewing` blobs the editor decodes.
265-
pub fn network_view_settings(&self) -> &std::collections::BTreeMap<graph_storage::NetworkId, std::collections::BTreeMap<String, serde_json::Value>> {
264+
/// [`NetworkId`](document_graph::NetworkId). Opaque `ui::nav::*` / `ui::previewing` blobs the editor decodes.
265+
pub fn network_view_settings(&self) -> &std::collections::BTreeMap<document_graph::NetworkId, std::collections::BTreeMap<String, serde_json::Value>> {
266266
&self.network_view_settings
267267
}
268268

269-
/// Resolve each runtime `network_path` to its stable [`NetworkId`](graph_storage::NetworkId), so the
269+
/// Resolve each runtime `network_path` to its stable [`NetworkId`](document_graph::NetworkId), so the
270270
/// editor can key per-network, per-peer view state by a stable id. See [`Session::network_ids`].
271271
#[cfg(feature = "conversion")]
272272
pub fn network_ids<M: NodeMetadataSource>(
273273
&self,
274274
network: &graph_craft::document::NodeNetwork,
275275
metadata: &M,
276-
) -> Result<std::collections::HashMap<Vec<core_types::uuid::NodeId>, graph_storage::NetworkId>, CommitError> {
276+
) -> Result<std::collections::HashMap<Vec<core_types::uuid::NodeId>, document_graph::NetworkId>, CommitError> {
277277
self.session.network_ids(network, metadata)
278278
}
279279

@@ -292,17 +292,17 @@ impl<L: Layout> Gdd<L> {
292292
(working, self.layout)
293293
}
294294

295-
/// Resolve the proto-node declarations referenced by the registry into a [`graph_storage::Declarations`]
295+
/// Resolve the proto-node declarations referenced by the registry into a [`document_graph::Declarations`]
296296
/// map, loading each `ProtoNode`'s bytes from `byte_store` (the global cache in the editor, the
297297
/// working-copy container for standalone). Only resources referenced by `Implementation::ProtoNode`
298298
/// are visited, so image/font resources are skipped. Cold-path (open / `to_runtime`); async
299299
/// because resource loads are.
300300
#[cfg(feature = "conversion")]
301-
pub async fn declarations(&self, byte_store: &dyn LoadResource) -> graph_storage::Declarations {
302-
use graph_storage::Implementation;
301+
pub async fn declarations(&self, byte_store: &dyn LoadResource) -> document_graph::Declarations {
302+
use document_graph::Implementation;
303303

304304
let registry = self.session.registry();
305-
let mut declarations = graph_storage::Declarations::new();
305+
let mut declarations = document_graph::Declarations::new();
306306

307307
for node in registry.node_instances.values() {
308308
let Implementation::ProtoNode(id) = node.implementation() else { continue };
@@ -317,7 +317,7 @@ impl<L: Layout> Gdd<L> {
317317
log::error!("Declaration bytes for {id} (hash {hash}) missing from byte store");
318318
continue;
319319
};
320-
match graph_storage::decode_declaration(resource.as_ref()) {
320+
match document_graph::decode_declaration(resource.as_ref()) {
321321
Ok(proto) => {
322322
declarations.insert(*id, proto);
323323
}

0 commit comments

Comments
 (0)