···11+import * as Automerge from "@automerge/automerge";
22+import { base64 } from "iso-base/rfc4648";
33+44+/**
55+ * Generate a new tracks document to put in the `INITIAL_TRACKS_DOCUMENT` constant.
66+ */
77+export function initTracksDoc() {
88+ const doc = Automerge.change(Automerge.init(), (doc) => {
99+ doc.collection = [];
1010+ });
1111+1212+ const bytes = Automerge.save(doc);
1313+ return base64.encode(bytes);
1414+}
+1-1
src/index.vto
···156156transformers:
157157 - title: "Output / Bytes / Automerge"
158158 desc: "Translate data to and from an Automerge CRDT."
159159- todo: true
159159+ url: "components/transformer/output/bytes/automerge/element.js"
160160 - title: "Output / Bytes / Cambria lenses"
161161 desc: "Uses the Cambria library to seamlessly translate between data schemas so that no data migration is needed."
162162 todo: true