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;
1616use document_container:: backends:: folder:: FolderBackend ;
1717use 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" ) ]
2222use graphene_resource:: LoadResource ;
2323use 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