@mdsvex/parse 1.0.0 → 1.1.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.
@@ -1,8 +1,8 @@
1
- import { NodeBuffer as c, is_raw_text_tag as o, merge_meta as b, make_meta as p } from "./utils.js";
2
- import { Cursor as x } from "./cursor.js";
3
- import { W as m } from "./node_view-DEZDLDFD.js";
1
+ import { NodeBuffer as c, is_raw_text_tag as o, merge_meta as b, make_meta as p, bump_id_scan as x } from "./utils.js";
2
+ import { Cursor as m } from "./cursor.js";
3
+ import { W as g } from "./node_view-DEaYKJq-.js";
4
4
  const d = 4294967295;
5
- class N {
5
+ class S {
6
6
  constructor(e = 128, i) {
7
7
  this.texts = null, this.headings = null, this.buf = new c(e), this.id_to_index = [0], this.schema = null, this.dispatcher = i ?? null, this.repaired = null, this.bind_strings();
8
8
  }
@@ -20,7 +20,7 @@ class N {
20
20
  /** a new buffer shares the empty strings every buffer starts with */
21
21
  bind_strings() {
22
22
  const e = this.buf.own_strings();
23
- this.dispatcher && (this.texts = new m(e), this.dispatcher.set_text_source(this.texts));
23
+ this.dispatcher && (this.texts = new g(e), this.dispatcher.set_text_source(this.texts));
24
24
  }
25
25
  /**
26
26
  * apply a batch of wire opcodes to the buffer.
@@ -60,7 +60,7 @@ class N {
60
60
  }
61
61
  /** get a cursor over the current buffer state. */
62
62
  cursor() {
63
- return new x(this.buf, "");
63
+ return new m(this.buf, "");
64
64
  }
65
65
  /** get the underlying NodeBuffer. */
66
66
  get_buffer() {
@@ -76,7 +76,7 @@ class N {
76
76
  return;
77
77
  let h = t === -1 ? d : this.id_to_index[t] ?? d;
78
78
  const n = this.dispatcher, a = n !== null && n.has_handlers(i);
79
- n !== null && !a && h !== d && (h = n.resolve(h));
79
+ n !== null && !a && h !== d && (h = n.resolve(h)), (i === 36 || i === 37) && x();
80
80
  const u = s ? this.buf.push_pending(i, 0, h, r) : this.buf.push(i, 0, h, r);
81
81
  this.id_to_index[e] = u, a && n.dispatch_open(u, i, this.buf);
82
82
  }
@@ -197,5 +197,5 @@ class N {
197
197
  }
198
198
  }
199
199
  export {
200
- N as WireTreeBuilder
200
+ S as WireTreeBuilder
201
201
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdsvex/parse",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "The parser for Penguin-Flavoured Markdown, the markdown mdsvex reads",
5
5
  "main": "./dist/main.js",
6
6
  "module": "./dist/main.js",