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

    Type Alias CreateExtensionOptions<TMatched, R, Id>

    Options for creating a graph builder extension with simplified API. All callbacks must return Effects for dependency injection. Effects may defect — defects are caught, logged, and the extension returns empty results. Use Effect.orDie on any failable effects inside callbacks.

    type CreateExtensionOptions<
        TMatched = Node,
        R = never,
        Id extends string = string,
    > = {
        actionGroups?: (
            matched: TMatched,
            get: Atom.AtomContext,
        ) => Effect.Effect<
            Omit<NodeArg<typeof actionGroupSymbol>, "type" | "data">[],
            never,
            R,
        >;
        actions?: (
            matched: TMatched,
            get: Atom.AtomContext,
        ) => Effect.Effect<Omit<NodeArg<ActionData<any>, any>, "type">[], never, R>;
        connector?: (
            matched: TMatched,
            get: Atom.AtomContext,
        ) => Effect.Effect<NodeArg<any, any>[], never, R>;
        id: [DXN.Path<Id>] extends [never]
            ? `Invalid id "${Id}": final segment must be camelCase — letters and digits, starting with a letter`
            : Id;
        match: (node: Node, get: Atom.AtomContext) => Option.Option<TMatched>;
        position?: Position.Position;
        relation?: RelationInput;
        url?: UrlBinding;
    }

    Type Parameters

    • TMatched = Node
    • R = never
    • Id extends string = string
    Index

    Properties

    actionGroups?: (
        matched: TMatched,
        get: Atom.AtomContext,
    ) => Effect.Effect<
        Omit<NodeArg<typeof actionGroupSymbol>, "type" | "data">[],
        never,
        R,
    >

    Contribute dropdown action groups (each with nested actions) to the matched node; the group's type/data are set automatically, so returning Node.makeActionGroup(...) output is fine.

    actions?: (
        matched: TMatched,
        get: Atom.AtomContext,
    ) => Effect.Effect<Omit<NodeArg<ActionData<any>, any>, "type">[], never, R>
    connector?: (
        matched: TMatched,
        get: Atom.AtomContext,
    ) => Effect.Effect<NodeArg<any, any>[], never, R>
    id: [DXN.Path<Id>] extends [never]
        ? `Invalid id "${Id}": final segment must be camelCase — letters and digits, starting with a letter`
        : Id
    match: (node: Node, get: Atom.AtomContext) => Option.Option<TMatched>
    position?: Position.Position
    relation?: RelationInput

    URL binding for the nodes this extension produces (key + resolution); see UrlBinding.