brookmd 0.29.0 → 0.30.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.
package/dist/vue.js CHANGED
@@ -23,7 +23,8 @@ function useBrookMarkdown(getOpts) {
23
23
  () => getOpts().components,
24
24
  () => getOpts().sanitize,
25
25
  () => getOpts().virtualize,
26
- () => getOpts().stickToBottom
26
+ () => getOpts().stickToBottom,
27
+ () => getOpts().onLinkClick
27
28
  ],
28
29
  () => {
29
30
  teardown();
@@ -48,7 +49,13 @@ const BrookMarkdown = defineComponent({
48
49
  components: { type: Object, default: void 0 },
49
50
  sanitize: { type: Function, default: void 0 },
50
51
  virtualize: { type: Boolean, default: void 0 },
51
- stickToBottom: { type: Boolean, default: void 0 }
52
+ stickToBottom: { type: Boolean, default: void 0 },
53
+ // Declared as a real prop (not an emit listener): Vue resolves a declared
54
+ // `onX` prop from `props` before it ever reaches `attrs`.
55
+ onLinkClick: {
56
+ type: Function,
57
+ default: void 0
58
+ }
52
59
  },
53
60
  setup(props) {
54
61
  const { container } = useBrookMarkdown(() => ({
@@ -56,7 +63,8 @@ const BrookMarkdown = defineComponent({
56
63
  components: props.components,
57
64
  sanitize: props.sanitize,
58
65
  virtualize: props.virtualize,
59
- stickToBottom: props.stickToBottom
66
+ stickToBottom: props.stickToBottom,
67
+ onLinkClick: props.onLinkClick
60
68
  }));
61
69
  return () => h("div", { ref: container });
62
70
  }
@@ -153,7 +153,7 @@ export class BrookParser {
153
153
  setRetainCommittedHtml(on: boolean): void;
154
154
  /**
155
155
  * Render a CommonMark SOFT line break (a bare `\n` in inline content) as a
156
- * `<br>` — the `remark-breaks` convention, where one Enter is one visual
156
+ * `<br>` — the "GitHub comment" convention, where one Enter is one visual
157
157
  * line. Off by default (strict CommonMark: a soft break is whitespace).
158
158
  * Hard breaks (two trailing spaces / trailing `\`) are `<br>` either way,
159
159
  * so turning this on only ADDS breaks; it never removes one.
@@ -307,7 +307,7 @@ export class BrookParser {
307
307
  }
308
308
  /**
309
309
  * Render a CommonMark SOFT line break (a bare `\n` in inline content) as a
310
- * `<br>` — the `remark-breaks` convention, where one Enter is one visual
310
+ * `<br>` — the "GitHub comment" convention, where one Enter is one visual
311
311
  * line. Off by default (strict CommonMark: a soft break is whitespace).
312
312
  * Hard breaks (two trailing spaces / trailing `\`) are `<br>` either way,
313
313
  * so turning this on only ADDS breaks; it never removes one.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brookmd",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "description": "Zero-dep streaming markdown for the browser. Rust→WASM core, Web Worker per stream, incremental parse with speculative closure.",
5
5
  "type": "module",
6
6
  "sideEffects": ["./dist/worker.js", "./dist/styles.css"],