@w100n/documents 0.15.0 → 0.15.1

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.
@@ -5,7 +5,7 @@ import {
5
5
  pending,
6
6
  save,
7
7
  seed
8
- } from "./chunk-Z7UNJ4ND.js";
8
+ } from "./chunk-BGH36LAR.js";
9
9
 
10
10
  // src/editor/live.ts
11
11
  import { HocuspocusProvider } from "@hocuspocus/provider";
@@ -193,4 +193,4 @@ ${id}`, id, kind, doc, host2, { id: me.id, name: me.name, language }, edit) : ne
193
193
  export {
194
194
  useLive
195
195
  };
196
- //# sourceMappingURL=chunk-OXC4PUOC.js.map
196
+ //# sourceMappingURL=chunk-XR42B3F5.js.map
package/dist/collab.cjs CHANGED
@@ -50,7 +50,7 @@ var import_y_tiptap2 = require("@tiptap/y-tiptap");
50
50
  var Y2 = __toESM(require("yjs"), 1);
51
51
 
52
52
  // package.json
53
- var version = "0.15.0";
53
+ var version = "0.15.1";
54
54
 
55
55
  // src/docx/xml.ts
56
56
  function parse(s) {
@@ -2260,8 +2260,10 @@ var Writer = class {
2260
2260
  }
2261
2261
  if (want.note) {
2262
2262
  const u = i >= 0 ? A[i] : null;
2263
- if (u?.note && u.note.id === want.note.id) out.push({ ch: u.ch, raw: u.raw, run: u.run, ctx: u.ctx, u, fmt: u.fmt });
2264
- else {
2263
+ if (u?.note && (u.note.id === want.note.id || !want.note.id)) {
2264
+ want.note.id = u.note.id;
2265
+ out.push({ ch: u.ch, raw: u.raw, run: u.run, ctx: u.ctx, u, fmt: u.fmt });
2266
+ } else {
2265
2267
  want.note.id = typeof want.note.id === "string" && want.note.id ? want.note.id : String(this.noteId());
2266
2268
  out.push({ ch: want.ch, raw: `<w:footnoteReference w:id="${want.note.id}"/>`, run: { open: "<w:r>", rPr: '<w:rPr><w:vertAlign w:val="superscript"/></w:rPr>', fmt: plain, el: null, parent: null }, ctx: [], u: null, fmt: plain });
2267
2269
  }