@abraca/dabra 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2328,6 +2328,21 @@ var QueryClient = class extends EventEmitter {
2328
2328
  }
2329
2329
  };
2330
2330
 
2331
+ //#endregion
2332
+ //#region packages/provider/src/OutgoingMessages/QueryAwarenessMessage.ts
2333
+ var QueryAwarenessMessage = class extends OutgoingMessage {
2334
+ constructor(..._args) {
2335
+ super(..._args);
2336
+ this.type = MessageType.QueryAwareness;
2337
+ this.description = "Queries awareness states";
2338
+ }
2339
+ get(args) {
2340
+ writeVarString(this.encoder, args.documentName);
2341
+ writeVarUint(this.encoder, this.type);
2342
+ return this.encoder;
2343
+ }
2344
+ };
2345
+
2331
2346
  //#endregion
2332
2347
  //#region packages/provider/src/OutgoingMessages/SyncStepOneMessage.ts
2333
2348
  var SyncStepOneMessage = class extends OutgoingMessage {
@@ -2610,6 +2625,7 @@ var AbracadabraBaseProvider = class extends EventEmitter {
2610
2625
  clients: [this.document.clientID],
2611
2626
  documentName: this.configuration.name
2612
2627
  });
2628
+ if (this.awareness) this.send(QueryAwarenessMessage, { documentName: this.configuration.name });
2613
2629
  }
2614
2630
  send(message, args) {
2615
2631
  if (!this._isAttached) return;
@@ -20320,8 +20336,13 @@ var ContentManager = class {
20320
20336
  }
20321
20337
  /**
20322
20338
  * Read document content as markdown.
20323
- * Returns the title extracted from the TipTap documentHeader, the markdown
20324
- * body, tree metadata, and immediate children.
20339
+ *
20340
+ * Returns the markdown body, tree-derived label/type/meta, and immediate
20341
+ * children. `title` mirrors `label` (the tree entry's display name) — it
20342
+ * is *not* derived from a TipTap `documentHeader`, and the markdown body
20343
+ * does NOT include YAML frontmatter. Callers that want frontmatter-style
20344
+ * round-tripping should serialise `meta`/`type` themselves on top of the
20345
+ * returned markdown.
20325
20346
  */
20326
20347
  async read(docId) {
20327
20348
  const fragment = (await this.dm.getChildProvider(docId)).document.getXmlFragment("default");
@@ -20356,7 +20377,7 @@ var ContentManager = class {
20356
20377
  type,
20357
20378
  meta
20358
20379
  }));
20359
- const markdown = yjsToMarkdown(fragment, label, meta, type);
20380
+ const { markdown } = yjsToMarkdown(fragment);
20360
20381
  return {
20361
20382
  label,
20362
20383
  type,