A collection of entries that can cross from one store into another (spec/14 §19.7).
Export takes the closure. Exporting an entry exports every entry it refers to, transitively, with their ids, so an import cannot dangle by construction. The bundle carries provenance — which store it came from, and when — and each entry keeps its original id, so a repeated import of the same collection is detectable rather than a second copy of everything.
Importing one is the store's import/2 callback: a relocation through one
old => new table, committed whole or not at all (D-103).
This module compiles only when Phoenix.Component is loaded (spec/10 §1.1, D-45, D-85).
Summary
Functions
The closure of an id through a store: the entry, and every entry it refers to, transitively, each once, in dependency order — an entry after everything it refers to.
Types
@type provenance() :: %{store: term(), exported_at: DateTime.t()}
Where a bundle came from, and when.
@type t() :: %Visualize.Chart.Builder.Bundle{ entries: [Visualize.Chart.Builder.Store.entry()], provenance: provenance() }
Functions
@spec export( Visualize.Chart.Builder.Store.store(), Visualize.Chart.Fragment.id() | [Visualize.Chart.Fragment.id()], term() ) :: t()
The closure of an id through a store: the entry, and every entry it refers to, transitively, each once, in dependency order — an entry after everything it refers to.
source names the store in the provenance; it is the host's to choose and the store
is never asked. An id the store does not hold is skipped: it was a mask before export
and stays one after import (§19.2).