Expand description
Phantom extension for off-page annotation clusters.
Phantoms are annotation clusters that exist conceptually outside the page flow, attached to specific content anchors. They enable rich annotation workflows while keeping the main content clean.
§Overview
- Phantom clusters attach to content via anchors
- Phantoms within clusters have positions, sizes, and content
- Connections link phantoms to each other within a cluster
- Scopes control visibility (shared, private, or role-based)
§Example
use cdx_core::extensions::phantom::{PhantomClusters, PhantomCluster, Phantom, PhantomScope};
use cdx_core::anchor::ContentAnchor;
let anchor = ContentAnchor::range("para-1", 10, 25);
let cluster = PhantomCluster::new("cluster-1", anchor, "Research Notes")
.with_scope(PhantomScope::Shared);Structs§
- Phantom
- An individual phantom within a cluster.
- Phantom
Cluster - A cluster of phantoms attached to a content anchor.
- Phantom
Clusters - Root structure for phantom clusters stored at
phantoms/clusters.json. - Phantom
Connection - Connection between phantoms in the same cluster.
- Phantom
Content - Content of a phantom, wrapping standard content blocks.
- Phantom
Position - Position of a phantom in the cluster’s coordinate space.
- Phantom
Size - Size of a phantom.
Enums§
- Connection
Style - Visual style for phantom connections.
- Phantom
Scope - Visibility scope for phantom clusters.