@dxos/app-graph - v0.16.0
    Preparing search index...

    Type Alias UrlBinding

    How an extension's nodes map to (and from) the URL pair chain. The kind is the resolution tier:

    • 'item' — Addressed by an id under the workspace (doc/<id>). May itself have children.
    • 'singleton' — A single fixed node per workspace, addressed by the key alone (settings); its own segment is the key, below path.

    The binding's shape (workspace, path, minDepth) decides which node ids it addresses, and a node's URL comes from the one binding its id fits. A node therefore has a URL whether or not it is loaded, and bindings of different keys must not claim the same ids.

    The anchor and linked tiers are not declared per extension: they are fixed keys of the URL grammar, configured once on the builder as UrlGrammar.

    type UrlBinding = {
        key: string;
        kind: "item" | "singleton";
        minDepth?: number;
        path: readonly string[];
        resolve?: PathResolver;
        workspace?: (workspace: string) => boolean;
    }
    Index

    Properties

    key: string
    kind: "item" | "singleton"
    minDepth?: number

    The fewest segments an item's id spans after path, joined by the grammar's tail separator; defaults to 1. Of two bindings sharing a path, the larger minimum claims the deeper ids. Ignored with resolve.

    path: readonly string[]

    Node-id segments between the workspace and the node's own.

    resolve?: PathResolver

    Forward resolution for a data-dependent shape (nested collections, say): the id is the node's last segment, at any depth below path, and this locates the rest.

    workspace?: (workspace: string) => boolean

    Narrows the workspaces the binding applies to; defaults to every workspace.