@leadertechie/md2html 0.1.0-alpha.21 → 0.1.0-alpha.23

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/index2.js CHANGED
@@ -1,252 +1,6 @@
1
+ import { html } from "lit-html";
2
+ import { unsafeHTML } from "lit-html/directives/unsafe-html.js";
1
3
  import { H as HTMLRenderer } from "./renderer-Ba-j0YEq.js";
2
- const t$1 = globalThis, i$1 = (t2) => t2, s = t$1.trustedTypes, e$2 = s ? s.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, h = "$lit$", o$1 = `lit$${Math.random().toFixed(9).slice(2)}$`, n = "?" + o$1, r = `<${n}>`, l = document, c = () => l.createComment(""), a = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, u = Array.isArray, d = (t2) => u(t2) || "function" == typeof t2?.[Symbol.iterator], f = "[ \n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^
3
- \f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y = /^(?:script|style|textarea|title)$/i, x = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 }), b = x(1), E = /* @__PURE__ */ Symbol.for("lit-noChange"), A = /* @__PURE__ */ Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l.createTreeWalker(l, 129);
4
- function V(t2, i2) {
5
- if (!u(t2) || !t2.hasOwnProperty("raw")) throw Error("invalid template strings array");
6
- return void 0 !== e$2 ? e$2.createHTML(i2) : i2;
7
- }
8
- const N = (t2, i2) => {
9
- const s2 = t2.length - 1, e2 = [];
10
- let n2, l2 = 2 === i2 ? "<svg>" : 3 === i2 ? "<math>" : "", c2 = v;
11
- for (let i3 = 0; i3 < s2; i3++) {
12
- const s3 = t2[i3];
13
- let a2, u2, d2 = -1, f2 = 0;
14
- for (; f2 < s3.length && (c2.lastIndex = f2, u2 = c2.exec(s3), null !== u2); ) f2 = c2.lastIndex, c2 === v ? "!--" === u2[1] ? c2 = _ : void 0 !== u2[1] ? c2 = m : void 0 !== u2[2] ? (y.test(u2[2]) && (n2 = RegExp("</" + u2[2], "g")), c2 = p) : void 0 !== u2[3] && (c2 = p) : c2 === p ? ">" === u2[0] ? (c2 = n2 ?? v, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c2.lastIndex - u2[2].length, a2 = u2[1], c2 = void 0 === u2[3] ? p : '"' === u2[3] ? $ : g) : c2 === $ || c2 === g ? c2 = p : c2 === _ || c2 === m ? c2 = v : (c2 = p, n2 = void 0);
15
- const x2 = c2 === p && t2[i3 + 1].startsWith("/>") ? " " : "";
16
- l2 += c2 === v ? s3 + r : d2 >= 0 ? (e2.push(a2), s3.slice(0, d2) + h + s3.slice(d2) + o$1 + x2) : s3 + o$1 + (-2 === d2 ? i3 : x2);
17
- }
18
- return [V(t2, l2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : 3 === i2 ? "</math>" : "")), e2];
19
- };
20
- class S {
21
- constructor({ strings: t2, _$litType$: i2 }, e2) {
22
- let r2;
23
- this.parts = [];
24
- let l2 = 0, a2 = 0;
25
- const u2 = t2.length - 1, d2 = this.parts, [f2, v2] = N(t2, i2);
26
- if (this.el = S.createElement(f2, e2), P.currentNode = this.el.content, 2 === i2 || 3 === i2) {
27
- const t3 = this.el.content.firstChild;
28
- t3.replaceWith(...t3.childNodes);
29
- }
30
- for (; null !== (r2 = P.nextNode()) && d2.length < u2; ) {
31
- if (1 === r2.nodeType) {
32
- if (r2.hasAttributes()) for (const t3 of r2.getAttributeNames()) if (t3.endsWith(h)) {
33
- const i3 = v2[a2++], s2 = r2.getAttribute(t3).split(o$1), e3 = /([.?@])?(.*)/.exec(i3);
34
- d2.push({ type: 1, index: l2, name: e3[2], strings: s2, ctor: "." === e3[1] ? I : "?" === e3[1] ? L : "@" === e3[1] ? z : H }), r2.removeAttribute(t3);
35
- } else t3.startsWith(o$1) && (d2.push({ type: 6, index: l2 }), r2.removeAttribute(t3));
36
- if (y.test(r2.tagName)) {
37
- const t3 = r2.textContent.split(o$1), i3 = t3.length - 1;
38
- if (i3 > 0) {
39
- r2.textContent = s ? s.emptyScript : "";
40
- for (let s2 = 0; s2 < i3; s2++) r2.append(t3[s2], c()), P.nextNode(), d2.push({ type: 2, index: ++l2 });
41
- r2.append(t3[i3], c());
42
- }
43
- }
44
- } else if (8 === r2.nodeType) if (r2.data === n) d2.push({ type: 2, index: l2 });
45
- else {
46
- let t3 = -1;
47
- for (; -1 !== (t3 = r2.data.indexOf(o$1, t3 + 1)); ) d2.push({ type: 7, index: l2 }), t3 += o$1.length - 1;
48
- }
49
- l2++;
50
- }
51
- }
52
- static createElement(t2, i2) {
53
- const s2 = l.createElement("template");
54
- return s2.innerHTML = t2, s2;
55
- }
56
- }
57
- function M(t2, i2, s2 = t2, e2) {
58
- if (i2 === E) return i2;
59
- let h2 = void 0 !== e2 ? s2._$Co?.[e2] : s2._$Cl;
60
- const o2 = a(i2) ? void 0 : i2._$litDirective$;
61
- return h2?.constructor !== o2 && (h2?._$AO?.(false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t2), h2._$AT(t2, s2, e2)), void 0 !== e2 ? (s2._$Co ??= [])[e2] = h2 : s2._$Cl = h2), void 0 !== h2 && (i2 = M(t2, h2._$AS(t2, i2.values), h2, e2)), i2;
62
- }
63
- class R {
64
- constructor(t2, i2) {
65
- this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2;
66
- }
67
- get parentNode() {
68
- return this._$AM.parentNode;
69
- }
70
- get _$AU() {
71
- return this._$AM._$AU;
72
- }
73
- u(t2) {
74
- const { el: { content: i2 }, parts: s2 } = this._$AD, e2 = (t2?.creationScope ?? l).importNode(i2, true);
75
- P.currentNode = e2;
76
- let h2 = P.nextNode(), o2 = 0, n2 = 0, r2 = s2[0];
77
- for (; void 0 !== r2; ) {
78
- if (o2 === r2.index) {
79
- let i3;
80
- 2 === r2.type ? i3 = new k(h2, h2.nextSibling, this, t2) : 1 === r2.type ? i3 = new r2.ctor(h2, r2.name, r2.strings, this, t2) : 6 === r2.type && (i3 = new Z(h2, this, t2)), this._$AV.push(i3), r2 = s2[++n2];
81
- }
82
- o2 !== r2?.index && (h2 = P.nextNode(), o2++);
83
- }
84
- return P.currentNode = l, e2;
85
- }
86
- p(t2) {
87
- let i2 = 0;
88
- for (const s2 of this._$AV) void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
89
- }
90
- }
91
- class k {
92
- get _$AU() {
93
- return this._$AM?._$AU ?? this._$Cv;
94
- }
95
- constructor(t2, i2, s2, e2) {
96
- this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cv = e2?.isConnected ?? true;
97
- }
98
- get parentNode() {
99
- let t2 = this._$AA.parentNode;
100
- const i2 = this._$AM;
101
- return void 0 !== i2 && 11 === t2?.nodeType && (t2 = i2.parentNode), t2;
102
- }
103
- get startNode() {
104
- return this._$AA;
105
- }
106
- get endNode() {
107
- return this._$AB;
108
- }
109
- _$AI(t2, i2 = this) {
110
- t2 = M(this, t2, i2), a(t2) ? t2 === A || null == t2 || "" === t2 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t2 !== this._$AH && t2 !== E && this._(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : d(t2) ? this.k(t2) : this._(t2);
111
- }
112
- O(t2) {
113
- return this._$AA.parentNode.insertBefore(t2, this._$AB);
114
- }
115
- T(t2) {
116
- this._$AH !== t2 && (this._$AR(), this._$AH = this.O(t2));
117
- }
118
- _(t2) {
119
- this._$AH !== A && a(this._$AH) ? this._$AA.nextSibling.data = t2 : this.T(l.createTextNode(t2)), this._$AH = t2;
120
- }
121
- $(t2) {
122
- const { values: i2, _$litType$: s2 } = t2, e2 = "number" == typeof s2 ? this._$AC(t2) : (void 0 === s2.el && (s2.el = S.createElement(V(s2.h, s2.h[0]), this.options)), s2);
123
- if (this._$AH?._$AD === e2) this._$AH.p(i2);
124
- else {
125
- const t3 = new R(e2, this), s3 = t3.u(this.options);
126
- t3.p(i2), this.T(s3), this._$AH = t3;
127
- }
128
- }
129
- _$AC(t2) {
130
- let i2 = C.get(t2.strings);
131
- return void 0 === i2 && C.set(t2.strings, i2 = new S(t2)), i2;
132
- }
133
- k(t2) {
134
- u(this._$AH) || (this._$AH = [], this._$AR());
135
- const i2 = this._$AH;
136
- let s2, e2 = 0;
137
- for (const h2 of t2) e2 === i2.length ? i2.push(s2 = new k(this.O(c()), this.O(c()), this, this.options)) : s2 = i2[e2], s2._$AI(h2), e2++;
138
- e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2);
139
- }
140
- _$AR(t2 = this._$AA.nextSibling, s2) {
141
- for (this._$AP?.(false, true, s2); t2 !== this._$AB; ) {
142
- const s3 = i$1(t2).nextSibling;
143
- i$1(t2).remove(), t2 = s3;
144
- }
145
- }
146
- setConnected(t2) {
147
- void 0 === this._$AM && (this._$Cv = t2, this._$AP?.(t2));
148
- }
149
- }
150
- class H {
151
- get tagName() {
152
- return this.element.tagName;
153
- }
154
- get _$AU() {
155
- return this._$AM._$AU;
156
- }
157
- constructor(t2, i2, s2, e2, h2) {
158
- this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = A;
159
- }
160
- _$AI(t2, i2 = this, s2, e2) {
161
- const h2 = this.strings;
162
- let o2 = false;
163
- if (void 0 === h2) t2 = M(this, t2, i2, 0), o2 = !a(t2) || t2 !== this._$AH && t2 !== E, o2 && (this._$AH = t2);
164
- else {
165
- const e3 = t2;
166
- let n2, r2;
167
- for (t2 = h2[0], n2 = 0; n2 < h2.length - 1; n2++) r2 = M(this, e3[s2 + n2], i2, n2), r2 === E && (r2 = this._$AH[n2]), o2 ||= !a(r2) || r2 !== this._$AH[n2], r2 === A ? t2 = A : t2 !== A && (t2 += (r2 ?? "") + h2[n2 + 1]), this._$AH[n2] = r2;
168
- }
169
- o2 && !e2 && this.j(t2);
170
- }
171
- j(t2) {
172
- t2 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 ?? "");
173
- }
174
- }
175
- class I extends H {
176
- constructor() {
177
- super(...arguments), this.type = 3;
178
- }
179
- j(t2) {
180
- this.element[this.name] = t2 === A ? void 0 : t2;
181
- }
182
- }
183
- class L extends H {
184
- constructor() {
185
- super(...arguments), this.type = 4;
186
- }
187
- j(t2) {
188
- this.element.toggleAttribute(this.name, !!t2 && t2 !== A);
189
- }
190
- }
191
- class z extends H {
192
- constructor(t2, i2, s2, e2, h2) {
193
- super(t2, i2, s2, e2, h2), this.type = 5;
194
- }
195
- _$AI(t2, i2 = this) {
196
- if ((t2 = M(this, t2, i2, 0) ?? A) === E) return;
197
- const s2 = this._$AH, e2 = t2 === A && s2 !== A || t2.capture !== s2.capture || t2.once !== s2.once || t2.passive !== s2.passive, h2 = t2 !== A && (s2 === A || e2);
198
- e2 && this.element.removeEventListener(this.name, this, s2), h2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
199
- }
200
- handleEvent(t2) {
201
- "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t2) : this._$AH.handleEvent(t2);
202
- }
203
- }
204
- class Z {
205
- constructor(t2, i2, s2) {
206
- this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2;
207
- }
208
- get _$AU() {
209
- return this._$AM._$AU;
210
- }
211
- _$AI(t2) {
212
- M(this, t2);
213
- }
214
- }
215
- const B = t$1.litHtmlPolyfillSupport;
216
- B?.(S, k), (t$1.litHtmlVersions ??= []).push("3.3.2");
217
- const t = { CHILD: 2 }, e$1 = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
218
- class i {
219
- constructor(t2) {
220
- }
221
- get _$AU() {
222
- return this._$AM._$AU;
223
- }
224
- _$AT(t2, e2, i2) {
225
- this._$Ct = t2, this._$AM = e2, this._$Ci = i2;
226
- }
227
- _$AS(t2, e2) {
228
- return this.update(t2, e2);
229
- }
230
- update(t2, e2) {
231
- return this.render(...e2);
232
- }
233
- }
234
- class e extends i {
235
- constructor(i2) {
236
- if (super(i2), this.it = A, i2.type !== t.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
237
- }
238
- render(r2) {
239
- if (r2 === A || null == r2) return this._t = void 0, this.it = r2;
240
- if (r2 === E) return r2;
241
- if ("string" != typeof r2) throw Error(this.constructor.directiveName + "() called with a non-string value");
242
- if (r2 === this.it) return this._t;
243
- this.it = r2;
244
- const s2 = [r2];
245
- return s2.raw = s2, this._t = { _$litType$: this.constructor.resultType, strings: s2, values: [] };
246
- }
247
- }
248
- e.directiveName = "unsafeHTML", e.resultType = 1;
249
- const o = e$1(e);
250
4
  class LitStrategyRegistry {
251
5
  constructor() {
252
6
  this.strategies = /* @__PURE__ */ new Map();
@@ -290,13 +44,13 @@ class LitHeadingStrategy {
290
44
  const level = node.attributes?.level || "2";
291
45
  switch (level) {
292
46
  case "1":
293
- return b`<h1>${o(node.content || "")}</h1>`;
47
+ return html`<h1>${unsafeHTML(node.content || "")}</h1>`;
294
48
  case "2":
295
- return b`<h2>${o(node.content || "")}</h2>`;
49
+ return html`<h2>${unsafeHTML(node.content || "")}</h2>`;
296
50
  case "3":
297
- return b`<h3>${o(node.content || "")}</h3>`;
51
+ return html`<h3>${unsafeHTML(node.content || "")}</h3>`;
298
52
  default:
299
- return b`<h2>${o(node.content || "")}</h2>`;
53
+ return html`<h2>${unsafeHTML(node.content || "")}</h2>`;
300
54
  }
301
55
  }
302
56
  }
@@ -306,9 +60,9 @@ class LitParagraphStrategy {
306
60
  }
307
61
  render(node, renderChild) {
308
62
  if (node.children) {
309
- return b`<p>${node.children.map((child) => renderChild(child))}</p>`;
63
+ return html`<p>${node.children.map((child) => renderChild(child))}</p>`;
310
64
  }
311
- return b`<p>${o(node.content || "")}</p>`;
65
+ return html`<p>${unsafeHTML(node.content || "")}</p>`;
312
66
  }
313
67
  }
314
68
  class LitListStrategy {
@@ -316,7 +70,7 @@ class LitListStrategy {
316
70
  this.type = "list";
317
71
  }
318
72
  render(node, renderChild) {
319
- return b`<ul>${node.children?.map((child) => renderChild(child))}</ul>`;
73
+ return html`<ul>${node.children?.map((child) => renderChild(child))}</ul>`;
320
74
  }
321
75
  }
322
76
  class LitListItemStrategy {
@@ -324,7 +78,7 @@ class LitListItemStrategy {
324
78
  this.type = "list-item";
325
79
  }
326
80
  render(node, _renderChild) {
327
- return b`<li>${o(node.content || "")}</li>`;
81
+ return html`<li>${unsafeHTML(node.content || "")}</li>`;
328
82
  }
329
83
  }
330
84
  class LitImageStrategy {
@@ -335,7 +89,7 @@ class LitImageStrategy {
335
89
  const src = node.src || node.attributes?.src || "";
336
90
  const alt = node.alt || node.attributes?.alt || "";
337
91
  const className = node.className || "inline-image";
338
- return b`<img src="${src}" alt="${alt}" class="${className}" style="max-width:100%;height:auto;">`;
92
+ return html`<img src="${src}" alt="${alt}" class="${className}" style="max-width:100%;height:auto;">`;
339
93
  }
340
94
  }
341
95
  class LitCodeStrategy {
@@ -344,7 +98,7 @@ class LitCodeStrategy {
344
98
  }
345
99
  render(node, _renderChild) {
346
100
  const lang = node.attributes?.lang || "";
347
- return b`<pre><code class="language-${lang}">${node.content || ""}</code></pre>`;
101
+ return html`<pre><code class="language-${lang}">${node.content || ""}</code></pre>`;
348
102
  }
349
103
  }
350
104
  class LitContainerStrategy {
@@ -354,7 +108,7 @@ class LitContainerStrategy {
354
108
  render(node, renderChild) {
355
109
  const className = node.className || "";
356
110
  const style = node.attributes?.style || "";
357
- return b`<div class="${className}" style="${style}">
111
+ return html`<div class="${className}" style="${style}">
358
112
  ${node.children?.map((child) => renderChild(child))}
359
113
  </div>`;
360
114
  }
@@ -364,7 +118,7 @@ class LitStrongStrategy {
364
118
  this.type = "strong";
365
119
  }
366
120
  render(node, _renderChild) {
367
- return b`<strong>${o(node.content || "")}</strong>`;
121
+ return html`<strong>${unsafeHTML(node.content || "")}</strong>`;
368
122
  }
369
123
  }
370
124
  class LitEmphasisStrategy {
@@ -372,7 +126,7 @@ class LitEmphasisStrategy {
372
126
  this.type = "emphasis";
373
127
  }
374
128
  render(node, _renderChild) {
375
- return b`<em>${o(node.content || "")}</em>`;
129
+ return html`<em>${unsafeHTML(node.content || "")}</em>`;
376
130
  }
377
131
  }
378
132
  class LitLinkStrategy {
@@ -381,7 +135,7 @@ class LitLinkStrategy {
381
135
  }
382
136
  render(node, _renderChild) {
383
137
  const href = node.attributes?.href || "";
384
- return b`<a href="${href}">${o(node.content || "")}</a>`;
138
+ return html`<a href="${href}">${unsafeHTML(node.content || "")}</a>`;
385
139
  }
386
140
  }
387
141
  class LitTextStrategy {
@@ -389,7 +143,7 @@ class LitTextStrategy {
389
143
  this.type = "text";
390
144
  }
391
145
  render(node, _renderChild) {
392
- return b`${node.content || ""}`;
146
+ return html`${node.content || ""}`;
393
147
  }
394
148
  }
395
149
  class LitFallbackStrategy {
@@ -397,7 +151,7 @@ class LitFallbackStrategy {
397
151
  this.type = "*";
398
152
  }
399
153
  render(_node, _renderChild) {
400
- return b``;
154
+ return html``;
401
155
  }
402
156
  }
403
157
  class LitRenderer {
@@ -420,9 +174,9 @@ class LitRenderer {
420
174
  */
421
175
  renderNodes(nodes) {
422
176
  if (!nodes || nodes.length === 0) {
423
- return b``;
177
+ return html``;
424
178
  }
425
- return b`${nodes.map((node) => this.renderNode(node))}`;
179
+ return html`${nodes.map((node) => this.renderNode(node))}`;
426
180
  }
427
181
  /**
428
182
  * Render nodes to a plain HTML string.
@@ -1 +1 @@
1
- {"version":3,"file":"index2.js","sources":["../node_modules/lit-html/lit-html.js","../node_modules/lit-html/directive.js","../node_modules/lit-html/directives/unsafe-html.js","../src/lit-strategies.ts","../src/lit-renderer.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,h=\"$lit$\",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n=\"?\"+o,r=`<${n}>`,l=document,c=()=>l.createComment(\"\"),a=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,u=Array.isArray,d=t=>u(t)||\"function\"==typeof t?.[Symbol.iterator],f=\"[ \\t\\n\\f\\r]\",v=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\\\s\"'>=/]+)(${f}*=${f}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?\"!--\"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp(\"</\"+u[2],\"g\")),c=p):void 0!==u[3]&&(c=p):c===p?\">\"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'\"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:\".\"===e[1]?I:\"?\"===e[1]?L:\"@\"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push(\"3.3.2\");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};export{j as _$LH,b as html,T as mathml,E as noChange,A as nothing,D as render,w as svg};\n//# sourceMappingURL=lit-html.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}export{i as Directive,t as PartType,e as directive};\n//# sourceMappingURL=directive.js.map\n","import{nothing as t,noChange as i}from\"../lit-html.js\";import{directive as r,Directive as s,PartType as n}from\"../directive.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */class e extends s{constructor(i){if(super(i),this.it=t,i.type!==n.CHILD)throw Error(this.constructor.directiveName+\"() can only be used in child bindings\")}render(r){if(r===t||null==r)return this._t=void 0,this.it=r;if(r===i)return r;if(\"string\"!=typeof r)throw Error(this.constructor.directiveName+\"() called with a non-string value\");if(r===this.it)return this._t;this.it=r;const s=[r];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName=\"unsafeHTML\",e.resultType=1;const o=r(e);export{e as UnsafeHTMLDirective,o as unsafeHTML};\n//# sourceMappingURL=unsafe-html.js.map\n","/**\n * Lit Renderer Strategies\n *\n * Each ContentNode type gets its own Lit strategy for rendering to a\n * TemplateResult. This mirrors the NodeRendererStrategy pattern from\n * renderer-strategies.ts, but outputs Lit TemplateResult objects instead\n * of plain HTML strings.\n *\n * New node types can be supported by:\n * 1. Creating a class implementing LitNodeRendererStrategy\n * 2. Registering it with the LitStrategyRegistry\n */\n\nimport { TemplateResult, html } from 'lit-html';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\nimport { ContentNode } from './types.js';\n\n// ─── Strategy Interface ───────────────────────────────────────────────────────\n\nexport interface LitNodeRendererStrategy {\n /** The ContentNode type this strategy handles */\n readonly type: string;\n /** Render a node to a Lit TemplateResult */\n render(node: ContentNode, renderChild: (child: ContentNode) => TemplateResult): TemplateResult;\n}\n\n// ─── Registry ─────────────────────────────────────────────────────────────────\n\n/**\n * Registry of Lit renderer strategies.\n *\n * Two-tier lookup:\n * 1. Dedicated strategy by node type\n * 2. Fallback to a catch-all strategy (default: renders empty)\n */\nexport class LitStrategyRegistry {\n private strategies = new Map<string, LitNodeRendererStrategy>();\n private fallback: LitNodeRendererStrategy;\n\n constructor() {\n // Register all built-in strategies\n this.register(new LitHeadingStrategy());\n this.register(new LitParagraphStrategy());\n this.register(new LitListStrategy());\n this.register(new LitListItemStrategy());\n this.register(new LitImageStrategy());\n this.register(new LitCodeStrategy());\n this.register(new LitContainerStrategy());\n this.register(new LitStrongStrategy());\n this.register(new LitEmphasisStrategy());\n this.register(new LitLinkStrategy());\n this.register(new LitTextStrategy());\n\n this.fallback = new LitFallbackStrategy();\n }\n\n register(strategy: LitNodeRendererStrategy): void {\n this.strategies.set(strategy.type, strategy);\n }\n\n unregister(type: string): void {\n this.strategies.delete(type);\n }\n\n get(type: string): LitNodeRendererStrategy {\n return this.strategies.get(type) ?? this.fallback;\n }\n\n has(type: string): boolean {\n return this.strategies.has(type);\n }\n\n get types(): string[] {\n return Array.from(this.strategies.keys());\n }\n\n setFallback(strategy: LitNodeRendererStrategy): void {\n this.fallback = strategy;\n }\n}\n\n// ─── Heading Strategy ─────────────────────────────────────────────────────────\n\nexport class LitHeadingStrategy implements LitNodeRendererStrategy {\n readonly type = 'heading';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n const level = (node.attributes?.level as string) || '2';\n switch (level) {\n case '1': return html`<h1>${unsafeHTML(node.content || '')}</h1>`;\n case '2': return html`<h2>${unsafeHTML(node.content || '')}</h2>`;\n case '3': return html`<h3>${unsafeHTML(node.content || '')}</h3>`;\n default: return html`<h2>${unsafeHTML(node.content || '')}</h2>`;\n }\n }\n}\n\n// ─── Paragraph Strategy ───────────────────────────────────────────────────────\n\nexport class LitParagraphStrategy implements LitNodeRendererStrategy {\n readonly type = 'paragraph';\n\n render(node: ContentNode, renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n if (node.children) {\n return html`<p>${node.children.map(child => renderChild(child))}</p>`;\n }\n return html`<p>${unsafeHTML(node.content || '')}</p>`;\n }\n}\n\n// ─── List Strategy ────────────────────────────────────────────────────────────\n\nexport class LitListStrategy implements LitNodeRendererStrategy {\n readonly type = 'list';\n\n render(node: ContentNode, renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n return html`<ul>${node.children?.map(child => renderChild(child))}</ul>`;\n }\n}\n\n// ─── List Item Strategy ───────────────────────────────────────────────────────\n\nexport class LitListItemStrategy implements LitNodeRendererStrategy {\n readonly type = 'list-item';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n return html`<li>${unsafeHTML(node.content || '')}</li>`;\n }\n}\n\n// ─── Image Strategy ───────────────────────────────────────────────────────────\n\nexport class LitImageStrategy implements LitNodeRendererStrategy {\n readonly type = 'image';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n const src = node.src || (node.attributes?.src as string) || '';\n const alt = node.alt || (node.attributes?.alt as string) || '';\n const className = node.className || 'inline-image';\n return html`<img src=\"${src}\" alt=\"${alt}\" class=\"${className}\" style=\"max-width:100%;height:auto;\">`;\n }\n}\n\n// ─── Code Strategy ────────────────────────────────────────────────────────────\n\nexport class LitCodeStrategy implements LitNodeRendererStrategy {\n readonly type = 'code';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n const lang = (node.attributes?.lang as string) || '';\n return html`<pre><code class=\"language-${lang}\">${node.content || ''}</code></pre>`;\n }\n}\n\n// ─── Container Strategy ───────────────────────────────────────────────────────\n\nexport class LitContainerStrategy implements LitNodeRendererStrategy {\n readonly type = 'container';\n\n render(node: ContentNode, renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n const className = node.className || '';\n const style = (node.attributes?.style as string) || '';\n return html`<div class=\"${className}\" style=\"${style}\">\n ${node.children?.map(child => renderChild(child))}\n </div>`;\n }\n}\n\n// ─── Strong Strategy ──────────────────────────────────────────────────────────\n\nexport class LitStrongStrategy implements LitNodeRendererStrategy {\n readonly type = 'strong';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n return html`<strong>${unsafeHTML(node.content || '')}</strong>`;\n }\n}\n\n// ─── Emphasis Strategy ────────────────────────────────────────────────────────\n\nexport class LitEmphasisStrategy implements LitNodeRendererStrategy {\n readonly type = 'emphasis';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n return html`<em>${unsafeHTML(node.content || '')}</em>`;\n }\n}\n\n// ─── Link Strategy ────────────────────────────────────────────────────────────\n\nexport class LitLinkStrategy implements LitNodeRendererStrategy {\n readonly type = 'link';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n const href = node.attributes?.href || '';\n return html`<a href=\"${href}\">${unsafeHTML(node.content || '')}</a>`;\n }\n}\n\n// ─── Text Strategy ────────────────────────────────────────────────────────────\n\nexport class LitTextStrategy implements LitNodeRendererStrategy {\n readonly type = 'text';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n return html`${node.content || ''}`;\n }\n}\n\n// ─── Fallback Strategy ────────────────────────────────────────────────────────\n\nexport class LitFallbackStrategy implements LitNodeRendererStrategy {\n readonly type = '*';\n\n render(_node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n return html``;\n }\n}\n","/**\n * Lit Renderer\n *\n * Renders ContentNode trees to Lit TemplateResult objects using the\n * LitNodeRendererStrategy pattern. This mirrors HTMLRenderer but\n * outputs Lit-compatible template results for use in Lit elements.\n *\n * Uses the same Strategy + Registry pattern as renderer-strategies.ts,\n * eliminating the previous switch-based duplication.\n *\n * To extend with custom node types, register your strategy with:\n * litRenderer.strategies.register(new MyLitStrategy());\n */\n\nimport { TemplateResult, html } from 'lit-html';\nimport { ContentNode } from './types.js';\nimport { LitStrategyRegistry } from './lit-strategies.js';\nimport { HTMLRenderer } from './renderer.js';\n\nexport { LitStrategyRegistry } from './lit-strategies.js';\nexport type { LitNodeRendererStrategy } from './lit-strategies.js';\n\nexport class LitRenderer {\n private strategyRegistry: LitStrategyRegistry;\n /** Lazily created HTMLRenderer for string output, sharing the same config */\n private htmlRenderer?: HTMLRenderer;\n\n constructor() {\n this.strategyRegistry = new LitStrategyRegistry();\n }\n\n /** Access the strategy registry for customization. */\n get strategies(): LitStrategyRegistry {\n return this.strategyRegistry;\n }\n\n /**\n * Render a single node to a Lit TemplateResult.\n */\n renderNode(node: ContentNode): TemplateResult {\n const strategy = this.strategyRegistry.get(node.type);\n return strategy.render(node, (child) => this.renderNode(child));\n }\n\n /**\n * Render an array of nodes to a single Lit TemplateResult.\n */\n renderNodes(nodes: ContentNode[]): TemplateResult {\n if (!nodes || nodes.length === 0) {\n return html``;\n }\n return html`${nodes.map(node => this.renderNode(node))}`;\n }\n\n /**\n * Render nodes to a plain HTML string.\n * Delegates to HTMLRenderer to avoid duplicating string rendering logic.\n *\n * Note: Uses default HTMLRenderer config (no classPrefix, scope anchors,\n * or heading IDs). For full HTML rendering with those features,\n * use HTMLRenderer directly.\n */\n renderToHTMLString(nodes: ContentNode[]): string {\n if (!nodes || nodes.length === 0) {\n return '';\n }\n if (!this.htmlRenderer) {\n this.htmlRenderer = new HTMLRenderer();\n }\n return this.htmlRenderer.renderNodes(nodes);\n }\n}\n\n"],"names":["t","i","e","o","s","n","l","c","a","u","d","f","x","r","v","h","html","unsafeHTML"],"mappings":";AAKK,MAACA,MAAE,YAAWC,MAAE,CAAAD,OAAGA,IAAE,IAAEA,IAAE,cAAaE,MAAE,IAAE,EAAE,aAAa,YAAW,EAAC,YAAW,CAAAF,OAAGA,GAAC,CAAC,IAAE,QAAO,IAAE,SAAQG,MAAE,OAAO,KAAK,OAAM,EAAG,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC,KAAI,IAAE,MAAIA,KAAE,IAAE,IAAI,CAAC,KAAI,IAAE,UAAS,IAAE,MAAI,EAAE,cAAc,EAAE,GAAE,IAAE,CAAAH,OAAG,SAAOA,MAAG,YAAU,OAAOA,MAAG,cAAY,OAAOA,IAAE,IAAE,MAAM,SAAQ,IAAE,CAAAA,OAAG,EAAEA,EAAC,KAAG,cAAY,OAAOA,KAAI,OAAO,QAAQ,GAAE,IAAE,cAAc,IAAE,uDAAsD,IAAE,QAAO,IAAE,MAAK,IAAE,OAAO,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC;AAAA,2BAAsC,GAAG,GAAE,IAAE,MAAK,IAAE,MAAK,IAAE,sCAAqC,IAAE,CAAAA,OAAG,CAACC,OAAKG,QAAK,EAAC,YAAWJ,IAAE,SAAQC,IAAE,QAAOG,GAAC,IAAG,IAAE,EAAE,CAAC,GAAgB,IAAE,uBAAO,IAAI,cAAc,GAAE,IAAE,uBAAO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AAM,gBAAmD;AAAA,EAAzD,cAAA;AACL,SAAS,OAAO;AAAA,EAAA;AAAA,EAEhB,OAAO,MAAmB,cAAsE;AAC9F,WAAOD,IAAO,KAAK,WAAW,EAAE;AAAA,EAClC;AACF;AAIO,MAAM,oBAAuD;AAAA,EAA7D,cAAA;AACL,SAAS,OAAO;AAAA,EAAA;AAAA,EAEhB,OAAO,OAAoB,cAAsE;AAC/F,WAAOA;AAAAA,EACT;AACF;ACnMO,MAAM,YAAY;AAAA,EAKvB,cAAc;AACZ,SAAK,mBAAmB,IAAI,oBAAA;AAAA,EAC9B;AAAA;AAAA,EAGA,IAAI,aAAkC;AACpC,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW,MAAmC;AAC5C,UAAM,WAAW,KAAK,iBAAiB,IAAI,KAAK,IAAI;AACpD,WAAO,SAAS,OAAO,MAAM,CAAC,UAAU,KAAK,WAAW,KAAK,CAAC;AAAA,EAChE;AAAA;AAAA;AAAA;AAAA,EAKA,YAAY,OAAsC;AAChD,QAAI,CAAC,SAAS,MAAM,WAAW,GAAG;AAChC,aAAOA;AAAAA,IACT;AACA,WAAOA,IAAO,MAAM,IAAI,CAAA,SAAQ,KAAK,WAAW,IAAI,CAAC,CAAC;AAAA,EACxD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,mBAAmB,OAA8B;AAC/C,QAAI,CAAC,SAAS,MAAM,WAAW,GAAG;AAChC,aAAO;AAAA,IACT;AACA,QAAI,CAAC,KAAK,cAAc;AACtB,WAAK,eAAe,IAAI,aAAA;AAAA,IAC1B;AACA,WAAO,KAAK,aAAa,YAAY,KAAK;AAAA,EAC5C;AACF;","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"index2.js","sources":["../src/lit-strategies.ts","../src/lit-renderer.ts"],"sourcesContent":["/**\n * Lit Renderer Strategies\n *\n * Each ContentNode type gets its own Lit strategy for rendering to a\n * TemplateResult. This mirrors the NodeRendererStrategy pattern from\n * renderer-strategies.ts, but outputs Lit TemplateResult objects instead\n * of plain HTML strings.\n *\n * New node types can be supported by:\n * 1. Creating a class implementing LitNodeRendererStrategy\n * 2. Registering it with the LitStrategyRegistry\n */\n\nimport { TemplateResult, html } from 'lit-html';\nimport { unsafeHTML } from 'lit-html/directives/unsafe-html.js';\nimport { ContentNode } from './types.js';\n\n// ─── Strategy Interface ───────────────────────────────────────────────────────\n\nexport interface LitNodeRendererStrategy {\n /** The ContentNode type this strategy handles */\n readonly type: string;\n /** Render a node to a Lit TemplateResult */\n render(node: ContentNode, renderChild: (child: ContentNode) => TemplateResult): TemplateResult;\n}\n\n// ─── Registry ─────────────────────────────────────────────────────────────────\n\n/**\n * Registry of Lit renderer strategies.\n *\n * Two-tier lookup:\n * 1. Dedicated strategy by node type\n * 2. Fallback to a catch-all strategy (default: renders empty)\n */\nexport class LitStrategyRegistry {\n private strategies = new Map<string, LitNodeRendererStrategy>();\n private fallback: LitNodeRendererStrategy;\n\n constructor() {\n // Register all built-in strategies\n this.register(new LitHeadingStrategy());\n this.register(new LitParagraphStrategy());\n this.register(new LitListStrategy());\n this.register(new LitListItemStrategy());\n this.register(new LitImageStrategy());\n this.register(new LitCodeStrategy());\n this.register(new LitContainerStrategy());\n this.register(new LitStrongStrategy());\n this.register(new LitEmphasisStrategy());\n this.register(new LitLinkStrategy());\n this.register(new LitTextStrategy());\n\n this.fallback = new LitFallbackStrategy();\n }\n\n register(strategy: LitNodeRendererStrategy): void {\n this.strategies.set(strategy.type, strategy);\n }\n\n unregister(type: string): void {\n this.strategies.delete(type);\n }\n\n get(type: string): LitNodeRendererStrategy {\n return this.strategies.get(type) ?? this.fallback;\n }\n\n has(type: string): boolean {\n return this.strategies.has(type);\n }\n\n get types(): string[] {\n return Array.from(this.strategies.keys());\n }\n\n setFallback(strategy: LitNodeRendererStrategy): void {\n this.fallback = strategy;\n }\n}\n\n// ─── Heading Strategy ─────────────────────────────────────────────────────────\n\nexport class LitHeadingStrategy implements LitNodeRendererStrategy {\n readonly type = 'heading';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n const level = (node.attributes?.level as string) || '2';\n switch (level) {\n case '1': return html`<h1>${unsafeHTML(node.content || '')}</h1>`;\n case '2': return html`<h2>${unsafeHTML(node.content || '')}</h2>`;\n case '3': return html`<h3>${unsafeHTML(node.content || '')}</h3>`;\n default: return html`<h2>${unsafeHTML(node.content || '')}</h2>`;\n }\n }\n}\n\n// ─── Paragraph Strategy ───────────────────────────────────────────────────────\n\nexport class LitParagraphStrategy implements LitNodeRendererStrategy {\n readonly type = 'paragraph';\n\n render(node: ContentNode, renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n if (node.children) {\n return html`<p>${node.children.map(child => renderChild(child))}</p>`;\n }\n return html`<p>${unsafeHTML(node.content || '')}</p>`;\n }\n}\n\n// ─── List Strategy ────────────────────────────────────────────────────────────\n\nexport class LitListStrategy implements LitNodeRendererStrategy {\n readonly type = 'list';\n\n render(node: ContentNode, renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n return html`<ul>${node.children?.map(child => renderChild(child))}</ul>`;\n }\n}\n\n// ─── List Item Strategy ───────────────────────────────────────────────────────\n\nexport class LitListItemStrategy implements LitNodeRendererStrategy {\n readonly type = 'list-item';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n return html`<li>${unsafeHTML(node.content || '')}</li>`;\n }\n}\n\n// ─── Image Strategy ───────────────────────────────────────────────────────────\n\nexport class LitImageStrategy implements LitNodeRendererStrategy {\n readonly type = 'image';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n const src = node.src || (node.attributes?.src as string) || '';\n const alt = node.alt || (node.attributes?.alt as string) || '';\n const className = node.className || 'inline-image';\n return html`<img src=\"${src}\" alt=\"${alt}\" class=\"${className}\" style=\"max-width:100%;height:auto;\">`;\n }\n}\n\n// ─── Code Strategy ────────────────────────────────────────────────────────────\n\nexport class LitCodeStrategy implements LitNodeRendererStrategy {\n readonly type = 'code';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n const lang = (node.attributes?.lang as string) || '';\n return html`<pre><code class=\"language-${lang}\">${node.content || ''}</code></pre>`;\n }\n}\n\n// ─── Container Strategy ───────────────────────────────────────────────────────\n\nexport class LitContainerStrategy implements LitNodeRendererStrategy {\n readonly type = 'container';\n\n render(node: ContentNode, renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n const className = node.className || '';\n const style = (node.attributes?.style as string) || '';\n return html`<div class=\"${className}\" style=\"${style}\">\n ${node.children?.map(child => renderChild(child))}\n </div>`;\n }\n}\n\n// ─── Strong Strategy ──────────────────────────────────────────────────────────\n\nexport class LitStrongStrategy implements LitNodeRendererStrategy {\n readonly type = 'strong';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n return html`<strong>${unsafeHTML(node.content || '')}</strong>`;\n }\n}\n\n// ─── Emphasis Strategy ────────────────────────────────────────────────────────\n\nexport class LitEmphasisStrategy implements LitNodeRendererStrategy {\n readonly type = 'emphasis';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n return html`<em>${unsafeHTML(node.content || '')}</em>`;\n }\n}\n\n// ─── Link Strategy ────────────────────────────────────────────────────────────\n\nexport class LitLinkStrategy implements LitNodeRendererStrategy {\n readonly type = 'link';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n const href = node.attributes?.href || '';\n return html`<a href=\"${href}\">${unsafeHTML(node.content || '')}</a>`;\n }\n}\n\n// ─── Text Strategy ────────────────────────────────────────────────────────────\n\nexport class LitTextStrategy implements LitNodeRendererStrategy {\n readonly type = 'text';\n\n render(node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n return html`${node.content || ''}`;\n }\n}\n\n// ─── Fallback Strategy ────────────────────────────────────────────────────────\n\nexport class LitFallbackStrategy implements LitNodeRendererStrategy {\n readonly type = '*';\n\n render(_node: ContentNode, _renderChild: (child: ContentNode) => TemplateResult): TemplateResult {\n return html``;\n }\n}\n","/**\n * Lit Renderer\n *\n * Renders ContentNode trees to Lit TemplateResult objects using the\n * LitNodeRendererStrategy pattern. This mirrors HTMLRenderer but\n * outputs Lit-compatible template results for use in Lit elements.\n *\n * Uses the same Strategy + Registry pattern as renderer-strategies.ts,\n * eliminating the previous switch-based duplication.\n *\n * To extend with custom node types, register your strategy with:\n * litRenderer.strategies.register(new MyLitStrategy());\n */\n\nimport { TemplateResult, html } from 'lit-html';\nimport { ContentNode } from './types.js';\nimport { LitStrategyRegistry } from './lit-strategies.js';\nimport { HTMLRenderer } from './renderer.js';\n\nexport { LitStrategyRegistry } from './lit-strategies.js';\nexport type { LitNodeRendererStrategy } from './lit-strategies.js';\n\nexport class LitRenderer {\n private strategyRegistry: LitStrategyRegistry;\n /** Lazily created HTMLRenderer for string output, sharing the same config */\n private htmlRenderer?: HTMLRenderer;\n\n constructor() {\n this.strategyRegistry = new LitStrategyRegistry();\n }\n\n /** Access the strategy registry for customization. */\n get strategies(): LitStrategyRegistry {\n return this.strategyRegistry;\n }\n\n /**\n * Render a single node to a Lit TemplateResult.\n */\n renderNode(node: ContentNode): TemplateResult {\n const strategy = this.strategyRegistry.get(node.type);\n return strategy.render(node, (child) => this.renderNode(child));\n }\n\n /**\n * Render an array of nodes to a single Lit TemplateResult.\n */\n renderNodes(nodes: ContentNode[]): TemplateResult {\n if (!nodes || nodes.length === 0) {\n return html``;\n }\n return html`${nodes.map(node => this.renderNode(node))}`;\n }\n\n /**\n * Render nodes to a plain HTML string.\n * Delegates to HTMLRenderer to avoid duplicating string rendering logic.\n *\n * Note: Uses default HTMLRenderer config (no classPrefix, scope anchors,\n * or heading IDs). For full HTML rendering with those features,\n * use HTMLRenderer directly.\n */\n renderToHTMLString(nodes: ContentNode[]): string {\n if (!nodes || nodes.length === 0) {\n return '';\n }\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AAA,EAEhB,OAAO,OAAoB,cAAsE;AAC/F,WAAO;AAAA,EACT;AACF;ACnMO,MAAM,YAAY;AAAA,EAKvB,cAAc;AACZ,SAAK,mBAAmB,IAAI,oBAAA;AAAA,EAC9B;AAAA;AAAA,EAGA,IAAI,aAAkC;AACpC,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,WAAW,MAAmC;AAC5C,UAAM,WAAW,KAAK,iBAAiB,IAAI,KAAK,IAAI;AACpD,WAAO,SAAS,OAAO,MAAM,CAAC,UAAU,KAAK,WAAW,KAAK,CAAC;AAAA,EAChE;AAAA;AAAA;AAAA;AAAA,EAKA,YAAY,OAAsC;AAChD,QAAI,CAAC,SAAS,MAAM,WAAW,GAAG;AAChC,aAAO;AAAA,IACT;AACA,WAAO,OAAO,MAAM,IAAI,CAAA,SAAQ,KAAK,WAAW,IAAI,CAAC,CAAC;AAAA,EACxD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,mBAAmB,OAA8B;AAC/C,QAAI,CAAC,SAAS,MAAM,WAAW,GAAG;AAChC,aAAO;AAAA,IACT;AACA,QAAI,CAAC,KAAK,cAAc;AACtB,WAAK,eAAe,IAAI,aAAA;AAAA,IAC1B;AACA,WAAO,KAAK,aAAa,YAAY,KAAK;AAAA,EAC5C;AACF;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leadertechie/md2html",
3
- "version": "0.1.0-alpha.21",
3
+ "version": "0.1.0-alpha.23",
4
4
  "description": "Markdown to HTML pipeline - parse markdown to AST, render to HTML or Lit templates",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,13 +22,14 @@
22
22
  "test": "vitest run"
23
23
  },
24
24
  "dependencies": {
25
- "@leadertechie/telemetry": "^0.0.0",
26
- "dompurify": "^3.0.0",
27
- "jsdom": "^22.0.0",
28
- "lit-html": "^3.0.0",
29
- "marked": "^15.0.0"
25
+ "@leadertechie/telemetry": "^0.1.0-alpha.2",
26
+ "dompurify": "^3.4.8",
27
+ "jsdom": "^29.1.1",
28
+ "lit-html": "^3.3.3",
29
+ "marked": "^18.0.5"
30
30
  },
31
31
  "devDependencies": {
32
+ "@types/jsdom": "^28.0.3",
32
33
  "@types/node": "^20.0.0",
33
34
  "typescript": "^5.0.0",
34
35
  "vite": "^7.3.1",