@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.
@@ -2298,6 +2298,21 @@ var QueryClient = class extends EventEmitter {
2298
2298
  }
2299
2299
  };
2300
2300
 
2301
+ //#endregion
2302
+ //#region packages/provider/src/OutgoingMessages/QueryAwarenessMessage.ts
2303
+ var QueryAwarenessMessage = class extends OutgoingMessage {
2304
+ constructor(..._args) {
2305
+ super(..._args);
2306
+ this.type = MessageType.QueryAwareness;
2307
+ this.description = "Queries awareness states";
2308
+ }
2309
+ get(args) {
2310
+ writeVarString(this.encoder, args.documentName);
2311
+ writeVarUint(this.encoder, this.type);
2312
+ return this.encoder;
2313
+ }
2314
+ };
2315
+
2301
2316
  //#endregion
2302
2317
  //#region packages/provider/src/OutgoingMessages/SyncStepOneMessage.ts
2303
2318
  var SyncStepOneMessage = class extends OutgoingMessage {
@@ -2580,6 +2595,7 @@ var AbracadabraBaseProvider = class extends EventEmitter {
2580
2595
  clients: [this.document.clientID],
2581
2596
  documentName: this.configuration.name
2582
2597
  });
2598
+ if (this.awareness) this.send(QueryAwarenessMessage, { documentName: this.configuration.name });
2583
2599
  }
2584
2600
  send(message, args) {
2585
2601
  if (!this._isAttached) return;
@@ -20255,8 +20271,13 @@ var ContentManager = class {
20255
20271
  }
20256
20272
  /**
20257
20273
  * Read document content as markdown.
20258
- * Returns the title extracted from the TipTap documentHeader, the markdown
20259
- * body, tree metadata, and immediate children.
20274
+ *
20275
+ * Returns the markdown body, tree-derived label/type/meta, and immediate
20276
+ * children. `title` mirrors `label` (the tree entry's display name) — it
20277
+ * is *not* derived from a TipTap `documentHeader`, and the markdown body
20278
+ * does NOT include YAML frontmatter. Callers that want frontmatter-style
20279
+ * round-tripping should serialise `meta`/`type` themselves on top of the
20280
+ * returned markdown.
20260
20281
  */
20261
20282
  async read(docId) {
20262
20283
  const fragment = (await this.dm.getChildProvider(docId)).document.getXmlFragment("default");
@@ -20291,7 +20312,7 @@ var ContentManager = class {
20291
20312
  type,
20292
20313
  meta
20293
20314
  }));
20294
- const markdown = yjsToMarkdown(fragment, label, meta, type);
20315
+ const { markdown } = yjsToMarkdown(fragment);
20295
20316
  return {
20296
20317
  label,
20297
20318
  type,