markstream-angular 0.0.1-alpha.5 → 0.0.1-alpha.6
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/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CommonModule as S } from "@angular/common";
|
|
2
2
|
import { Input as l, Component as x, ChangeDetectionStrategy as b, forwardRef as p, inject as Q, ChangeDetectorRef as De, ViewChild as j, ViewContainerRef as fi, ElementRef as lo, Renderer2 as pi, Directive as gi, HostListener as co, EventEmitter as ut, Output as Ct } from "@angular/core";
|
|
3
3
|
import { parseMarkdownToStructure as Zr, getMarkdown as Yr } from "stream-markdown-parser";
|
|
4
|
-
const
|
|
4
|
+
const Rt = /<\/?([A-Z][\w:-]*)(?:\s[^<>]*)?>/gi;
|
|
5
5
|
function Jr(e, t, r) {
|
|
6
6
|
const o = bi(r), n = new Set(o);
|
|
7
7
|
if (!t || n.size === 0 || !Array.isArray(e) || e.length === 0)
|
|
@@ -30,7 +30,7 @@ function Jr(e, t, r) {
|
|
|
30
30
|
function yi(e, t) {
|
|
31
31
|
const r = [], o = [];
|
|
32
32
|
let n;
|
|
33
|
-
for (
|
|
33
|
+
for (Rt.lastIndex = 0; (n = Rt.exec(e)) !== null; ) {
|
|
34
34
|
const i = n[0], s = zt(n[1]);
|
|
35
35
|
if (!s || !t.has(s))
|
|
36
36
|
continue;
|
|
@@ -38,14 +38,14 @@ function yi(e, t) {
|
|
|
38
38
|
r.push({
|
|
39
39
|
tag: s,
|
|
40
40
|
start: n.index,
|
|
41
|
-
openEnd:
|
|
41
|
+
openEnd: Rt.lastIndex
|
|
42
42
|
});
|
|
43
43
|
continue;
|
|
44
44
|
}
|
|
45
45
|
const c = vi(r, s);
|
|
46
46
|
if (c < 0)
|
|
47
47
|
continue;
|
|
48
|
-
const [d] = r.splice(c, 1), u = n.index, h =
|
|
48
|
+
const [d] = r.splice(c, 1), u = n.index, h = Rt.lastIndex;
|
|
49
49
|
o.push({
|
|
50
50
|
tag: s,
|
|
51
51
|
start: d.start,
|
|
@@ -173,16 +173,16 @@ function Mi(e) {
|
|
|
173
173
|
function Oi(e) {
|
|
174
174
|
return Array.isArray(e) ? e : [];
|
|
175
175
|
}
|
|
176
|
-
const rr = "__global__",
|
|
176
|
+
const rr = "__global__", Ir = "__MARKSTREAM_ANGULAR_CUSTOM_COMPONENTS_STORE__", X = (() => {
|
|
177
177
|
const e = globalThis;
|
|
178
|
-
if (e[
|
|
179
|
-
return e[
|
|
178
|
+
if (e[Ir])
|
|
179
|
+
return e[Ir];
|
|
180
180
|
const t = {
|
|
181
181
|
scopedComponents: {},
|
|
182
182
|
revision: 0,
|
|
183
183
|
listeners: /* @__PURE__ */ new Set()
|
|
184
184
|
};
|
|
185
|
-
return e[
|
|
185
|
+
return e[Ir] = t, t;
|
|
186
186
|
})();
|
|
187
187
|
function en() {
|
|
188
188
|
X.revision += 1;
|
|
@@ -240,7 +240,7 @@ const Dn = /* @__PURE__ */ new Map(), Di = /* @__PURE__ */ new Set([
|
|
|
240
240
|
"thinking",
|
|
241
241
|
"vmr_container"
|
|
242
242
|
]);
|
|
243
|
-
function
|
|
243
|
+
function $i(e, t = {}, r) {
|
|
244
244
|
const o = ho([
|
|
245
245
|
...e.customHtmlTags || [],
|
|
246
246
|
...e.parseOptions?.customHtmlTags || []
|
|
@@ -275,7 +275,7 @@ function Ii(e, t = {}, r) {
|
|
|
275
275
|
events: t
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Ii(e) {
|
|
279
279
|
if (Array.isArray(e.nodes))
|
|
280
280
|
return e.nodes;
|
|
281
281
|
const t = C(e.content);
|
|
@@ -296,7 +296,7 @@ function Ri(e) {
|
|
|
296
296
|
r
|
|
297
297
|
);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function I(e) {
|
|
300
300
|
return Array.isArray(e) ? e.filter((t) => !!t && typeof t == "object") : [];
|
|
301
301
|
}
|
|
302
302
|
function C(e) {
|
|
@@ -307,12 +307,12 @@ function ho(e) {
|
|
|
307
307
|
return [];
|
|
308
308
|
const t = /* @__PURE__ */ new Set(), r = [];
|
|
309
309
|
for (const o of e) {
|
|
310
|
-
const n =
|
|
310
|
+
const n = Ri(o);
|
|
311
311
|
!n || t.has(n) || (t.add(n), r.push(n));
|
|
312
312
|
}
|
|
313
313
|
return r;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Ri(e) {
|
|
316
316
|
const t = C(e).trim();
|
|
317
317
|
if (!t)
|
|
318
318
|
return "";
|
|
@@ -373,7 +373,7 @@ var zi = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, nr = (e, t
|
|
|
373
373
|
};
|
|
374
374
|
let ze = class {
|
|
375
375
|
get children() {
|
|
376
|
-
return
|
|
376
|
+
return I(this.node?.children);
|
|
377
377
|
}
|
|
378
378
|
get cite() {
|
|
379
379
|
const e = this.node?.cite;
|
|
@@ -469,11 +469,11 @@ function yo() {
|
|
|
469
469
|
}
|
|
470
470
|
};
|
|
471
471
|
}
|
|
472
|
-
let pe = null,
|
|
472
|
+
let pe = null, Rr = !1, ht = null, $n = !1;
|
|
473
473
|
async function Xi(e) {
|
|
474
|
-
if (
|
|
474
|
+
if ($n)
|
|
475
475
|
return;
|
|
476
|
-
|
|
476
|
+
$n = !0;
|
|
477
477
|
const t = globalThis?.MonacoEnvironment;
|
|
478
478
|
t && (typeof t.getWorker == "function" || typeof t.getWorkerUrl == "function") || typeof e?.preloadMonacoWorkers == "function" && await e.preloadMonacoWorkers();
|
|
479
479
|
}
|
|
@@ -496,14 +496,14 @@ async function vo() {
|
|
|
496
496
|
return pe;
|
|
497
497
|
if (ht)
|
|
498
498
|
return await ht;
|
|
499
|
-
if (
|
|
499
|
+
if (Rr)
|
|
500
500
|
return null;
|
|
501
501
|
ht = (async () => {
|
|
502
502
|
try {
|
|
503
503
|
const e = await import("stream-monaco");
|
|
504
|
-
return pe = e?.default ?? e, await Xi(pe), await Gi(pe) ? pe : (pe = null,
|
|
504
|
+
return pe = e?.default ?? e, await Xi(pe), await Gi(pe) ? pe : (pe = null, Rr = !0, null);
|
|
505
505
|
} catch {
|
|
506
|
-
return
|
|
506
|
+
return Rr = !0, null;
|
|
507
507
|
}
|
|
508
508
|
})();
|
|
509
509
|
try {
|
|
@@ -527,7 +527,7 @@ const ye = `
|
|
|
527
527
|
<path d="M12 9v2.5" />
|
|
528
528
|
<path d="M12 11.5l-3.5 3.5" />
|
|
529
529
|
<path d="M12 11.5l3.5 3.5" />
|
|
530
|
-
</svg>`,
|
|
530
|
+
</svg>`, In = `
|
|
531
531
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
532
532
|
<path d="M8 7l-4 5l4 5" />
|
|
533
533
|
<path d="M16 7l4 5l-4 5" />
|
|
@@ -542,7 +542,7 @@ const ye = `
|
|
|
542
542
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
543
543
|
<path d="M9 4c-2 0-3 1.5-3 3.5v2c0 1.1-.4 1.8-1.5 2.5C5.6 12.7 6 13.4 6 14.5v2C6 18.5 7 20 9 20" />
|
|
544
544
|
<path d="M15 4c2 0 3 1.5 3 3.5v2c0 1.1.4 1.8 1.5 2.5c-1.1.7-1.5 1.4-1.5 2.5v2c0 2-1 3.5-3 3.5" />
|
|
545
|
-
</svg>`,
|
|
545
|
+
</svg>`, Rn = `
|
|
546
546
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
547
547
|
<path d="M5 6h14" />
|
|
548
548
|
<path d="M12 6v12" />
|
|
@@ -581,17 +581,17 @@ const ye = `
|
|
|
581
581
|
typescript: "TypeScript",
|
|
582
582
|
vue: "Vue"
|
|
583
583
|
}, ts = {
|
|
584
|
-
"":
|
|
585
|
-
html:
|
|
584
|
+
"": Rn,
|
|
585
|
+
html: In,
|
|
586
586
|
javascript: ye,
|
|
587
587
|
json: Ji,
|
|
588
588
|
jsx: ye,
|
|
589
589
|
markdown: Yi,
|
|
590
590
|
mermaid: Zi,
|
|
591
|
-
plain:
|
|
591
|
+
plain: Rn,
|
|
592
592
|
python: ye,
|
|
593
593
|
shell: ye,
|
|
594
|
-
svg:
|
|
594
|
+
svg: In,
|
|
595
595
|
tsx: ye,
|
|
596
596
|
typescript: ye
|
|
597
597
|
};
|
|
@@ -1717,13 +1717,13 @@ let We = class {
|
|
|
1717
1717
|
this.trackByIndex = (e) => `${this.indexKey || "definition-list"}-${e}`;
|
|
1718
1718
|
}
|
|
1719
1719
|
get items() {
|
|
1720
|
-
return
|
|
1720
|
+
return I(this.node?.items);
|
|
1721
1721
|
}
|
|
1722
1722
|
termFor(e) {
|
|
1723
|
-
return
|
|
1723
|
+
return I(e?.term);
|
|
1724
1724
|
}
|
|
1725
1725
|
definitionFor(e) {
|
|
1726
|
-
return
|
|
1726
|
+
return I(e?.definition);
|
|
1727
1727
|
}
|
|
1728
1728
|
itemPrefix(e, t) {
|
|
1729
1729
|
return `${this.indexKey || "definition-list"}-${e}-${t}`;
|
|
@@ -1766,7 +1766,7 @@ We = or([
|
|
|
1766
1766
|
changeDetection: b.OnPush
|
|
1767
1767
|
})
|
|
1768
1768
|
], We);
|
|
1769
|
-
var Ts = Object.defineProperty, _s = Object.getOwnPropertyDescriptor,
|
|
1769
|
+
var Ts = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, $e = (e, t, r, o) => {
|
|
1770
1770
|
for (var n = o > 1 ? void 0 : o ? _s(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
1771
1771
|
(s = e[i]) && (n = (o ? s(t, r, n) : s(n)) || n);
|
|
1772
1772
|
return o && n && Ts(t, r, n), n;
|
|
@@ -1806,25 +1806,25 @@ let te = class {
|
|
|
1806
1806
|
return !r || typeof r != "object" ? !1 : t in r ? !0 : Object.values(r).includes(t);
|
|
1807
1807
|
}
|
|
1808
1808
|
};
|
|
1809
|
-
|
|
1809
|
+
$e([
|
|
1810
1810
|
l()
|
|
1811
1811
|
], te.prototype, "component", 2);
|
|
1812
|
-
|
|
1812
|
+
$e([
|
|
1813
1813
|
l({ required: !0 })
|
|
1814
1814
|
], te.prototype, "node", 2);
|
|
1815
|
-
|
|
1815
|
+
$e([
|
|
1816
1816
|
l()
|
|
1817
1817
|
], te.prototype, "context", 2);
|
|
1818
|
-
|
|
1818
|
+
$e([
|
|
1819
1819
|
l()
|
|
1820
1820
|
], te.prototype, "indexKey", 2);
|
|
1821
|
-
|
|
1821
|
+
$e([
|
|
1822
1822
|
l()
|
|
1823
1823
|
], te.prototype, "inputs", 2);
|
|
1824
|
-
|
|
1824
|
+
$e([
|
|
1825
1825
|
j("container", { read: fi, static: !0 })
|
|
1826
1826
|
], te.prototype, "containerRef", 2);
|
|
1827
|
-
te =
|
|
1827
|
+
te = $e([
|
|
1828
1828
|
x({
|
|
1829
1829
|
selector: "markstream-angular-dynamic-node-host",
|
|
1830
1830
|
standalone: !0,
|
|
@@ -1860,7 +1860,7 @@ var Os = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, ir = (e, t
|
|
|
1860
1860
|
};
|
|
1861
1861
|
let qe = class {
|
|
1862
1862
|
get children() {
|
|
1863
|
-
return
|
|
1863
|
+
return I(this.node?.children);
|
|
1864
1864
|
}
|
|
1865
1865
|
get nestedPrefix() {
|
|
1866
1866
|
return `${this.indexKey || "emphasis"}-em`;
|
|
@@ -1892,14 +1892,14 @@ qe = ir([
|
|
|
1892
1892
|
changeDetection: b.OnPush
|
|
1893
1893
|
})
|
|
1894
1894
|
], qe);
|
|
1895
|
-
var Ds = Object.defineProperty,
|
|
1896
|
-
for (var n = o > 1 ? void 0 : o ?
|
|
1895
|
+
var Ds = Object.defineProperty, $s = Object.getOwnPropertyDescriptor, sr = (e, t, r, o) => {
|
|
1896
|
+
for (var n = o > 1 ? void 0 : o ? $s(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
1897
1897
|
(s = e[i]) && (n = (o ? s(t, r, n) : s(n)) || n);
|
|
1898
1898
|
return o && n && Ds(t, r, n), n;
|
|
1899
1899
|
};
|
|
1900
1900
|
let Ve = class {
|
|
1901
1901
|
get children() {
|
|
1902
|
-
return
|
|
1902
|
+
return I(this.node?.children);
|
|
1903
1903
|
}
|
|
1904
1904
|
get hasChildren() {
|
|
1905
1905
|
return this.children.length > 0;
|
|
@@ -1962,10 +1962,10 @@ Ve = sr([
|
|
|
1962
1962
|
changeDetection: b.OnPush
|
|
1963
1963
|
})
|
|
1964
1964
|
], Ve);
|
|
1965
|
-
var
|
|
1966
|
-
for (var n = o > 1 ? void 0 : o ?
|
|
1965
|
+
var Is = Object.defineProperty, Rs = Object.getOwnPropertyDescriptor, Po = (e, t, r, o) => {
|
|
1966
|
+
for (var n = o > 1 ? void 0 : o ? Rs(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
1967
1967
|
(s = e[i]) && (n = (o ? s(t, r, n) : s(n)) || n);
|
|
1968
|
-
return o && n &&
|
|
1968
|
+
return o && n && Is(t, r, n), n;
|
|
1969
1969
|
};
|
|
1970
1970
|
let Vt = class {
|
|
1971
1971
|
get id() {
|
|
@@ -2007,7 +2007,7 @@ let Ue = class {
|
|
|
2007
2007
|
return `fnref--${C(this.node?.id)}`;
|
|
2008
2008
|
}
|
|
2009
2009
|
get children() {
|
|
2010
|
-
return
|
|
2010
|
+
return I(this.node?.children);
|
|
2011
2011
|
}
|
|
2012
2012
|
get nestedPrefix() {
|
|
2013
2013
|
return `${this.indexKey || "footnote"}-children`;
|
|
@@ -2148,7 +2148,7 @@ let Xe = class {
|
|
|
2148
2148
|
return e && typeof e == "object" ? e : null;
|
|
2149
2149
|
}
|
|
2150
2150
|
get children() {
|
|
2151
|
-
return
|
|
2151
|
+
return I(this.node?.children);
|
|
2152
2152
|
}
|
|
2153
2153
|
get nestedPrefix() {
|
|
2154
2154
|
return `${this.indexKey || "heading"}-${this.level}`;
|
|
@@ -2198,7 +2198,7 @@ var qs = Object.defineProperty, Vs = Object.getOwnPropertyDescriptor, cr = (e, t
|
|
|
2198
2198
|
};
|
|
2199
2199
|
let Ge = class {
|
|
2200
2200
|
get children() {
|
|
2201
|
-
return
|
|
2201
|
+
return I(this.node?.children);
|
|
2202
2202
|
}
|
|
2203
2203
|
get nestedPrefix() {
|
|
2204
2204
|
return `${this.indexKey || "highlight"}-highlight`;
|
|
@@ -2572,7 +2572,7 @@ async function Oo() {
|
|
|
2572
2572
|
return typeof t == "function" && t.prototype && t.prototype.render ? r = t : e?.Infographic ? r = e.Infographic : t && t.Infographic && (r = t.Infographic), Ar = r, r;
|
|
2573
2573
|
}).catch((e) => (console.warn("[markstream-angular] Failed to load @antv/infographic", e), null)), await At));
|
|
2574
2574
|
}
|
|
2575
|
-
var sa = Object.defineProperty, aa = Object.getOwnPropertyDescriptor,
|
|
2575
|
+
var sa = Object.defineProperty, aa = Object.getOwnPropertyDescriptor, Ie = (e, t, r, o) => {
|
|
2576
2576
|
for (var n = o > 1 ? void 0 : o ? aa(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
2577
2577
|
(s = e[i]) && (n = (o ? s(t, r, n) : s(n)) || n);
|
|
2578
2578
|
return o && n && sa(t, r, n), n;
|
|
@@ -2620,6 +2620,13 @@ let re = class {
|
|
|
2620
2620
|
get resolvedMaxHeight() {
|
|
2621
2621
|
return dn(this.mergedProps.maxHeight, "500px");
|
|
2622
2622
|
}
|
|
2623
|
+
resolveContainerMinHeight(e) {
|
|
2624
|
+
const t = Math.max(e, 280), r = this.mergedProps.maxHeight;
|
|
2625
|
+
if (r == null || r === "none")
|
|
2626
|
+
return `${t}px`;
|
|
2627
|
+
const o = Number.parseFloat(String(r));
|
|
2628
|
+
return Number.isFinite(o) ? `${Math.min(t, o)}px` : `${t}px`;
|
|
2629
|
+
}
|
|
2623
2630
|
get resolvedLoading() {
|
|
2624
2631
|
return typeof this.mergedProps.loading == "boolean" ? this.mergedProps.loading : this.node?.loading === !0;
|
|
2625
2632
|
}
|
|
@@ -2710,7 +2717,7 @@ let re = class {
|
|
|
2710
2717
|
const i = t.querySelector("svg");
|
|
2711
2718
|
this.svgMarkup = i ? i.outerHTML : "";
|
|
2712
2719
|
const s = t.scrollHeight;
|
|
2713
|
-
s > 0 && (this.containerMinHeight =
|
|
2720
|
+
s > 0 && (this.containerMinHeight = this.resolveContainerMinHeight(s)), this.syncModalPreview();
|
|
2714
2721
|
} catch (o) {
|
|
2715
2722
|
if (this.destroyed || r !== this.renderToken)
|
|
2716
2723
|
return;
|
|
@@ -2745,25 +2752,25 @@ let re = class {
|
|
|
2745
2752
|
});
|
|
2746
2753
|
}
|
|
2747
2754
|
};
|
|
2748
|
-
|
|
2755
|
+
Ie([
|
|
2749
2756
|
j("previewHost")
|
|
2750
2757
|
], re.prototype, "previewHost", 2);
|
|
2751
|
-
|
|
2758
|
+
Ie([
|
|
2752
2759
|
j("modalHost")
|
|
2753
2760
|
], re.prototype, "modalHost", 2);
|
|
2754
|
-
|
|
2761
|
+
Ie([
|
|
2755
2762
|
l({ required: !0 })
|
|
2756
2763
|
], re.prototype, "node", 2);
|
|
2757
|
-
|
|
2764
|
+
Ie([
|
|
2758
2765
|
l()
|
|
2759
2766
|
], re.prototype, "context", 2);
|
|
2760
|
-
|
|
2767
|
+
Ie([
|
|
2761
2768
|
l()
|
|
2762
2769
|
], re.prototype, "props", 2);
|
|
2763
|
-
|
|
2770
|
+
Ie([
|
|
2764
2771
|
co("window:keydown", ["$event"])
|
|
2765
2772
|
], re.prototype, "handleWindowKeydown", 1);
|
|
2766
|
-
re =
|
|
2773
|
+
re = Ie([
|
|
2767
2774
|
x({
|
|
2768
2775
|
selector: "markstream-angular-infographic-block-node",
|
|
2769
2776
|
standalone: !0,
|
|
@@ -2984,7 +2991,7 @@ var da = Object.defineProperty, ua = Object.getOwnPropertyDescriptor, hr = (e, t
|
|
|
2984
2991
|
};
|
|
2985
2992
|
let Je = class {
|
|
2986
2993
|
get children() {
|
|
2987
|
-
return
|
|
2994
|
+
return I(this.node?.children);
|
|
2988
2995
|
}
|
|
2989
2996
|
get nestedPrefix() {
|
|
2990
2997
|
return `${this.indexKey || "insert"}-insert`;
|
|
@@ -3040,19 +3047,19 @@ function fr(e) {
|
|
|
3040
3047
|
function Do(e) {
|
|
3041
3048
|
return e === "x" ? "y" : "x";
|
|
3042
3049
|
}
|
|
3043
|
-
function
|
|
3050
|
+
function $o(e) {
|
|
3044
3051
|
return e === "y" ? "height" : "width";
|
|
3045
3052
|
}
|
|
3046
3053
|
function se(e) {
|
|
3047
3054
|
const t = e[0];
|
|
3048
3055
|
return t === "t" || t === "b" ? "y" : "x";
|
|
3049
3056
|
}
|
|
3050
|
-
function
|
|
3057
|
+
function Io(e) {
|
|
3051
3058
|
return Do(se(e));
|
|
3052
3059
|
}
|
|
3053
3060
|
function ma(e, t, r) {
|
|
3054
3061
|
r === void 0 && (r = !1);
|
|
3055
|
-
const o = fr(e), n =
|
|
3062
|
+
const o = fr(e), n = Io(e), i = $o(n);
|
|
3056
3063
|
let s = n === "x" ? o === (r ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
3057
3064
|
return t.reference[i] > t.floating[i] && (s = Yt(s)), [s, Yt(s)];
|
|
3058
3065
|
}
|
|
@@ -3125,7 +3132,7 @@ function Fn(e, t, r) {
|
|
|
3125
3132
|
reference: o,
|
|
3126
3133
|
floating: n
|
|
3127
3134
|
} = e;
|
|
3128
|
-
const i = se(t), s =
|
|
3135
|
+
const i = se(t), s = Io(t), a = $o(s), c = Se(t), d = i === "y", u = o.x + o.width / 2 - n.width / 2, h = o.y + o.height / 2 - n.height / 2, m = o[a] / 2 - n[a] / 2;
|
|
3129
3136
|
let f;
|
|
3130
3137
|
switch (c) {
|
|
3131
3138
|
case "top":
|
|
@@ -3194,7 +3201,7 @@ async function ba(e, t) {
|
|
|
3194
3201
|
y: n,
|
|
3195
3202
|
width: s.floating.width,
|
|
3196
3203
|
height: s.floating.height
|
|
3197
|
-
} : s.reference, E = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)),
|
|
3204
|
+
} : s.reference, E = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), R = await (i.isElement == null ? void 0 : i.isElement(E)) ? await (i.getScale == null ? void 0 : i.getScale(E)) || {
|
|
3198
3205
|
x: 1,
|
|
3199
3206
|
y: 1
|
|
3200
3207
|
} : {
|
|
@@ -3207,10 +3214,10 @@ async function ba(e, t) {
|
|
|
3207
3214
|
strategy: c
|
|
3208
3215
|
}) : M);
|
|
3209
3216
|
return {
|
|
3210
|
-
top: (v.top - z.top + g.top) /
|
|
3211
|
-
bottom: (z.bottom - v.bottom + g.bottom) /
|
|
3212
|
-
left: (v.left - z.left + g.left) /
|
|
3213
|
-
right: (z.right - v.right + g.right) /
|
|
3217
|
+
top: (v.top - z.top + g.top) / R.y,
|
|
3218
|
+
bottom: (z.bottom - v.bottom + g.bottom) / R.y,
|
|
3219
|
+
left: (v.left - z.left + g.left) / R.x,
|
|
3220
|
+
right: (z.right - v.right + g.right) / R.x
|
|
3214
3221
|
};
|
|
3215
3222
|
}
|
|
3216
3223
|
const ka = 50, Ca = async (e, t, r) => {
|
|
@@ -3241,7 +3248,7 @@ const ka = 50, Ca = async (e, t, r) => {
|
|
|
3241
3248
|
fn: M
|
|
3242
3249
|
} = T, {
|
|
3243
3250
|
x: E,
|
|
3244
|
-
y:
|
|
3251
|
+
y: R,
|
|
3245
3252
|
data: z,
|
|
3246
3253
|
reset: H
|
|
3247
3254
|
} = await M({
|
|
@@ -3258,7 +3265,7 @@ const ka = 50, Ca = async (e, t, r) => {
|
|
|
3258
3265
|
floating: t
|
|
3259
3266
|
}
|
|
3260
3267
|
});
|
|
3261
|
-
u = E ?? u, h =
|
|
3268
|
+
u = E ?? u, h = R ?? h, g[v] = {
|
|
3262
3269
|
...g[v],
|
|
3263
3270
|
...z
|
|
3264
3271
|
}, H && f < ka && (f++, typeof H == "object" && (H.placement && (m = H.placement), H.rects && (d = H.rects === !0 ? await s.getElementRects({
|
|
@@ -3301,21 +3308,21 @@ const ka = 50, Ca = async (e, t, r) => {
|
|
|
3301
3308
|
} = mr(e, t);
|
|
3302
3309
|
if ((r = i.arrow) != null && r.alignmentOffset)
|
|
3303
3310
|
return {};
|
|
3304
|
-
const v = Se(n), M = se(a), E = Se(a) === a,
|
|
3305
|
-
!m && H && z.push(...va(a, y, g,
|
|
3306
|
-
const Ae = [a, ...z], Dr = await c.detectOverflow(t, T),
|
|
3311
|
+
const v = Se(n), M = se(a), E = Se(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(d.floating)), z = m || (E || !y ? [Yt(a)] : fa(a)), H = g !== "none";
|
|
3312
|
+
!m && H && z.push(...va(a, y, g, R));
|
|
3313
|
+
const Ae = [a, ...z], Dr = await c.detectOverflow(t, T), It = [];
|
|
3307
3314
|
let Ne = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
3308
|
-
if (u &&
|
|
3309
|
-
const me = ma(n, s,
|
|
3310
|
-
|
|
3315
|
+
if (u && It.push(Dr[v]), h) {
|
|
3316
|
+
const me = ma(n, s, R);
|
|
3317
|
+
It.push(Dr[me[0]], Dr[me[1]]);
|
|
3311
3318
|
}
|
|
3312
3319
|
if (Ne = [...Ne, {
|
|
3313
3320
|
placement: n,
|
|
3314
|
-
overflows:
|
|
3315
|
-
}], !
|
|
3321
|
+
overflows: It
|
|
3322
|
+
}], !It.every((me) => me <= 0)) {
|
|
3316
3323
|
var Sn, Mn;
|
|
3317
|
-
const me = (((Sn = i.flip) == null ? void 0 : Sn.index) || 0) + 1,
|
|
3318
|
-
if (
|
|
3324
|
+
const me = (((Sn = i.flip) == null ? void 0 : Sn.index) || 0) + 1, $r = Ae[me];
|
|
3325
|
+
if ($r && (!(h === "alignment" ? M !== se($r) : !1) || // We leave the current main axis only if every placement on that axis
|
|
3319
3326
|
// overflows the main axis.
|
|
3320
3327
|
Ne.every((q) => se(q.placement) === M ? q.overflows[0] > 0 : !0)))
|
|
3321
3328
|
return {
|
|
@@ -3324,7 +3331,7 @@ const ka = 50, Ca = async (e, t, r) => {
|
|
|
3324
3331
|
overflows: Ne
|
|
3325
3332
|
},
|
|
3326
3333
|
reset: {
|
|
3327
|
-
placement:
|
|
3334
|
+
placement: $r
|
|
3328
3335
|
}
|
|
3329
3336
|
};
|
|
3330
3337
|
let dt = (Mn = Ne.filter((fe) => fe.overflows[0] <= 0).sort((fe, q) => fe.overflows[1] - q.overflows[1])[0]) == null ? void 0 : Mn.placement;
|
|
@@ -3440,12 +3447,12 @@ const Sa = function(e) {
|
|
|
3440
3447
|
}, h = await i.detectOverflow(t, d), m = se(Se(n)), f = Do(m);
|
|
3441
3448
|
let g = u[f], y = u[m];
|
|
3442
3449
|
if (s) {
|
|
3443
|
-
const v = f === "y" ? "top" : "left", M = f === "y" ? "bottom" : "right", E = g + h[v],
|
|
3444
|
-
g = Ln(E, g,
|
|
3450
|
+
const v = f === "y" ? "top" : "left", M = f === "y" ? "bottom" : "right", E = g + h[v], R = g - h[M];
|
|
3451
|
+
g = Ln(E, g, R);
|
|
3445
3452
|
}
|
|
3446
3453
|
if (a) {
|
|
3447
|
-
const v = m === "y" ? "top" : "left", M = m === "y" ? "bottom" : "right", E = y + h[v],
|
|
3448
|
-
y = Ln(E, y,
|
|
3454
|
+
const v = m === "y" ? "top" : "left", M = m === "y" ? "bottom" : "right", E = y + h[v], R = y - h[M];
|
|
3455
|
+
y = Ln(E, y, R);
|
|
3449
3456
|
}
|
|
3450
3457
|
const T = c.fn({
|
|
3451
3458
|
...t,
|
|
@@ -3470,7 +3477,7 @@ function pr() {
|
|
|
3470
3477
|
return typeof window < "u";
|
|
3471
3478
|
}
|
|
3472
3479
|
function ct(e) {
|
|
3473
|
-
return
|
|
3480
|
+
return Ro(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
3474
3481
|
}
|
|
3475
3482
|
function K(e) {
|
|
3476
3483
|
var t;
|
|
@@ -3478,9 +3485,9 @@ function K(e) {
|
|
|
3478
3485
|
}
|
|
3479
3486
|
function ee(e) {
|
|
3480
3487
|
var t;
|
|
3481
|
-
return (t = (
|
|
3488
|
+
return (t = (Ro(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
3482
3489
|
}
|
|
3483
|
-
function
|
|
3490
|
+
function Ro(e) {
|
|
3484
3491
|
return pr() ? e instanceof Node || e instanceof K(e).Node : !1;
|
|
3485
3492
|
}
|
|
3486
3493
|
function G(e) {
|
|
@@ -3522,7 +3529,7 @@ function hn(e) {
|
|
|
3522
3529
|
const t = G(e) ? Z(e) : e;
|
|
3523
3530
|
return ge(t.transform) || ge(t.translate) || ge(t.scale) || ge(t.rotate) || ge(t.perspective) || !mn() && (ge(t.backdropFilter) || ge(t.filter)) || Ea.test(t.willChange || "") || Da.test(t.contain || "");
|
|
3524
3531
|
}
|
|
3525
|
-
function
|
|
3532
|
+
function $a(e) {
|
|
3526
3533
|
let t = ce(e);
|
|
3527
3534
|
for (; oe(t) && !Qe(t); ) {
|
|
3528
3535
|
if (hn(t))
|
|
@@ -3608,15 +3615,15 @@ function Ke(e) {
|
|
|
3608
3615
|
y: a
|
|
3609
3616
|
};
|
|
3610
3617
|
}
|
|
3611
|
-
const
|
|
3618
|
+
const Ia = /* @__PURE__ */ J(0);
|
|
3612
3619
|
function Lo(e) {
|
|
3613
3620
|
const t = K(e);
|
|
3614
|
-
return !mn() || !t.visualViewport ?
|
|
3621
|
+
return !mn() || !t.visualViewport ? Ia : {
|
|
3615
3622
|
x: t.visualViewport.offsetLeft,
|
|
3616
3623
|
y: t.visualViewport.offsetTop
|
|
3617
3624
|
};
|
|
3618
3625
|
}
|
|
3619
|
-
function
|
|
3626
|
+
function Ra(e, t, r) {
|
|
3620
3627
|
return t === void 0 && (t = !1), !r || t && r !== K(e) ? !1 : t;
|
|
3621
3628
|
}
|
|
3622
3629
|
function Me(e, t, r, o) {
|
|
@@ -3624,14 +3631,14 @@ function Me(e, t, r, o) {
|
|
|
3624
3631
|
const n = e.getBoundingClientRect(), i = fn(e);
|
|
3625
3632
|
let s = J(1);
|
|
3626
3633
|
t && (o ? G(o) && (s = Ke(o)) : s = Ke(e));
|
|
3627
|
-
const a =
|
|
3634
|
+
const a = Ra(i, r, o) ? Lo(i) : J(0);
|
|
3628
3635
|
let c = (n.left + a.x) / s.x, d = (n.top + a.y) / s.y, u = n.width / s.x, h = n.height / s.y;
|
|
3629
3636
|
if (i) {
|
|
3630
3637
|
const m = K(i), f = o && G(o) ? K(o) : o;
|
|
3631
3638
|
let g = m, y = zr(g);
|
|
3632
3639
|
for (; y && o && f !== g; ) {
|
|
3633
|
-
const T = Ke(y), v = y.getBoundingClientRect(), M = Z(y), E = v.left + (y.clientLeft + parseFloat(M.paddingLeft)) * T.x,
|
|
3634
|
-
c *= T.x, d *= T.y, u *= T.x, h *= T.y, c += E, d +=
|
|
3640
|
+
const T = Ke(y), v = y.getBoundingClientRect(), M = Z(y), E = v.left + (y.clientLeft + parseFloat(M.paddingLeft)) * T.x, R = v.top + (y.clientTop + parseFloat(M.paddingTop)) * T.y;
|
|
3641
|
+
c *= T.x, d *= T.y, u *= T.x, h *= T.y, c += E, d += R, g = K(y), y = zr(g);
|
|
3635
3642
|
}
|
|
3636
3643
|
}
|
|
3637
3644
|
return Jt({
|
|
@@ -3840,7 +3847,7 @@ function Fo(e, t) {
|
|
|
3840
3847
|
let o = Wn(e, t);
|
|
3841
3848
|
for (; o && Oa(o) && Lr(o); )
|
|
3842
3849
|
o = Wn(o, t);
|
|
3843
|
-
return o && Qe(o) && Lr(o) && !hn(o) ? r : o ||
|
|
3850
|
+
return o && Qe(o) && Lr(o) && !hn(o) ? r : o || $a(e) || r;
|
|
3844
3851
|
}
|
|
3845
3852
|
const Wa = async function(e) {
|
|
3846
3853
|
const t = this.getOffsetParent || Fo, r = this.getDimensions, o = await r(e.floating);
|
|
@@ -3893,17 +3900,17 @@ function Ua(e, t) {
|
|
|
3893
3900
|
rootMargin: -g + "px " + -y + "px " + -T + "px " + -v + "px",
|
|
3894
3901
|
threshold: ke(0, Gt(1, c)) || 1
|
|
3895
3902
|
};
|
|
3896
|
-
let
|
|
3903
|
+
let R = !0;
|
|
3897
3904
|
function z(H) {
|
|
3898
3905
|
const Ae = H[0].intersectionRatio;
|
|
3899
3906
|
if (Ae !== c) {
|
|
3900
|
-
if (
|
|
3907
|
+
if (!R)
|
|
3901
3908
|
return s();
|
|
3902
3909
|
Ae ? s(!1, Ae) : o = setTimeout(() => {
|
|
3903
3910
|
s(!1, 1e-7);
|
|
3904
3911
|
}, 1e3);
|
|
3905
3912
|
}
|
|
3906
|
-
Ae === 1 && !Ko(d, e.getBoundingClientRect()) && s(),
|
|
3913
|
+
Ae === 1 && !Ko(d, e.getBoundingClientRect()) && s(), R = !1;
|
|
3907
3914
|
}
|
|
3908
3915
|
try {
|
|
3909
3916
|
r = new IntersectionObserver(z, {
|
|
@@ -4126,7 +4133,7 @@ let Oe = class {
|
|
|
4126
4133
|
return this.context?.showTooltips !== !1;
|
|
4127
4134
|
}
|
|
4128
4135
|
get children() {
|
|
4129
|
-
return
|
|
4136
|
+
return I(this.node?.children);
|
|
4130
4137
|
}
|
|
4131
4138
|
get hasChildren() {
|
|
4132
4139
|
return this.children.length > 0;
|
|
@@ -4239,7 +4246,7 @@ var il = Object.defineProperty, sl = Object.getOwnPropertyDescriptor, Dt = (e, t
|
|
|
4239
4246
|
};
|
|
4240
4247
|
let ue = class {
|
|
4241
4248
|
get children() {
|
|
4242
|
-
return
|
|
4249
|
+
return I(this.node?.children);
|
|
4243
4250
|
}
|
|
4244
4251
|
get nestedPrefix() {
|
|
4245
4252
|
return `${this.indexKey || "list-item"}-item`;
|
|
@@ -4290,7 +4297,7 @@ let et = class {
|
|
|
4290
4297
|
return Number(this.node?.start) || 1;
|
|
4291
4298
|
}
|
|
4292
4299
|
get items() {
|
|
4293
|
-
return
|
|
4300
|
+
return I(this.node?.items);
|
|
4294
4301
|
}
|
|
4295
4302
|
itemPrefix(e) {
|
|
4296
4303
|
return `${this.indexKey || "list"}-${e}`;
|
|
@@ -4403,7 +4410,7 @@ async function yn() {
|
|
|
4403
4410
|
He = null;
|
|
4404
4411
|
}
|
|
4405
4412
|
}
|
|
4406
|
-
const
|
|
4413
|
+
const $t = "WORKER_BUSY";
|
|
4407
4414
|
let U = null, ae = null, Wr = !1;
|
|
4408
4415
|
const F = /* @__PURE__ */ new Map(), ft = /* @__PURE__ */ new Map(), dl = 200, xe = /* @__PURE__ */ new Set();
|
|
4409
4416
|
let Ee = 5;
|
|
@@ -4464,7 +4471,7 @@ async function hl(e, t = !0, r = 2e3, o) {
|
|
|
4464
4471
|
return Promise.reject(ae);
|
|
4465
4472
|
if (F.size >= Ee) {
|
|
4466
4473
|
const a = new Error("Worker busy");
|
|
4467
|
-
return a.name = "WorkerBusy", a.code =
|
|
4474
|
+
return a.name = "WorkerBusy", a.code = $t, a.busy = !0, a.inFlight = F.size, a.max = Ee, Promise.reject(a);
|
|
4468
4475
|
}
|
|
4469
4476
|
return new Promise((a, c) => {
|
|
4470
4477
|
if (o?.aborted) {
|
|
@@ -4563,7 +4570,7 @@ async function wn(e, t = !0, r = {}) {
|
|
|
4563
4570
|
try {
|
|
4564
4571
|
return await hl(e, t, o, r.signal);
|
|
4565
4572
|
} catch (d) {
|
|
4566
|
-
if (d?.code !==
|
|
4573
|
+
if (d?.code !== $t || c >= a)
|
|
4567
4574
|
throw d;
|
|
4568
4575
|
c += 1, await ml(n, r.signal).catch(() => {
|
|
4569
4576
|
}), i > 0 && await new Promise((u) => globalThis.setTimeout(u, i * c));
|
|
@@ -4613,7 +4620,7 @@ let bt = class {
|
|
|
4613
4620
|
});
|
|
4614
4621
|
} catch (r) {
|
|
4615
4622
|
const o = r?.code || r?.name;
|
|
4616
|
-
if (!(o === "WORKER_INIT_ERROR" || r?.fallbackToRenderer) && !(o ===
|
|
4623
|
+
if (!(o === "WORKER_INIT_ERROR" || r?.fallbackToRenderer) && !(o === $t || o === "WORKER_TIMEOUT"))
|
|
4617
4624
|
return null;
|
|
4618
4625
|
}
|
|
4619
4626
|
const t = await yn();
|
|
@@ -4695,7 +4702,7 @@ let kt = class {
|
|
|
4695
4702
|
});
|
|
4696
4703
|
} catch (o) {
|
|
4697
4704
|
const n = o?.code || o?.name;
|
|
4698
|
-
if (!(n === "WORKER_INIT_ERROR" || o?.fallbackToRenderer) && !(n ===
|
|
4705
|
+
if (!(n === "WORKER_INIT_ERROR" || o?.fallbackToRenderer) && !(n === $t || n === "WORKER_TIMEOUT"))
|
|
4699
4706
|
return null;
|
|
4700
4707
|
}
|
|
4701
4708
|
const r = await yn();
|
|
@@ -4961,7 +4968,7 @@ function Ed() {
|
|
|
4961
4968
|
L = null;
|
|
4962
4969
|
}
|
|
4963
4970
|
}
|
|
4964
|
-
var _l = Object.defineProperty, Sl = Object.getOwnPropertyDescriptor,
|
|
4971
|
+
var _l = Object.defineProperty, Sl = Object.getOwnPropertyDescriptor, Re = (e, t, r, o) => {
|
|
4965
4972
|
for (var n = o > 1 ? void 0 : o ? Sl(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
4966
4973
|
(s = e[i]) && (n = (o ? s(t, r, n) : s(n)) || n);
|
|
4967
4974
|
return o && n && _l(t, r, n), n;
|
|
@@ -5241,25 +5248,25 @@ ${e}`;
|
|
|
5241
5248
|
});
|
|
5242
5249
|
}
|
|
5243
5250
|
};
|
|
5244
|
-
|
|
5251
|
+
Re([
|
|
5245
5252
|
j("previewHost")
|
|
5246
5253
|
], ne.prototype, "previewHost", 2);
|
|
5247
|
-
|
|
5254
|
+
Re([
|
|
5248
5255
|
j("modalHost")
|
|
5249
5256
|
], ne.prototype, "modalHost", 2);
|
|
5250
|
-
|
|
5257
|
+
Re([
|
|
5251
5258
|
l({ required: !0 })
|
|
5252
5259
|
], ne.prototype, "node", 2);
|
|
5253
|
-
|
|
5260
|
+
Re([
|
|
5254
5261
|
l()
|
|
5255
5262
|
], ne.prototype, "context", 2);
|
|
5256
|
-
|
|
5263
|
+
Re([
|
|
5257
5264
|
l()
|
|
5258
5265
|
], ne.prototype, "props", 2);
|
|
5259
|
-
|
|
5266
|
+
Re([
|
|
5260
5267
|
co("window:keydown", ["$event"])
|
|
5261
5268
|
], ne.prototype, "handleWindowKeydown", 1);
|
|
5262
|
-
ne =
|
|
5269
|
+
ne = Re([
|
|
5263
5270
|
x({
|
|
5264
5271
|
selector: "markstream-angular-mermaid-block-node",
|
|
5265
5272
|
standalone: !0,
|
|
@@ -5413,7 +5420,7 @@ let tt = class {
|
|
|
5413
5420
|
this.segments = [], this.trackByIndex = (e) => `${this.indexKey || "paragraph"}-${e}`;
|
|
5414
5421
|
}
|
|
5415
5422
|
get children() {
|
|
5416
|
-
return
|
|
5423
|
+
return I(this.node?.children);
|
|
5417
5424
|
}
|
|
5418
5425
|
ngOnChanges() {
|
|
5419
5426
|
this.segments = ji(this.children);
|
|
@@ -5474,8 +5481,8 @@ tt = xr([
|
|
|
5474
5481
|
changeDetection: b.OnPush
|
|
5475
5482
|
})
|
|
5476
5483
|
], tt);
|
|
5477
|
-
var Dl = Object.defineProperty,
|
|
5478
|
-
for (var n = o > 1 ? void 0 : o ?
|
|
5484
|
+
var Dl = Object.defineProperty, $l = Object.getOwnPropertyDescriptor, ri = (e, t, r, o) => {
|
|
5485
|
+
for (var n = o > 1 ? void 0 : o ? $l(t, r) : t, i = e.length - 1, s; i >= 0; i--)
|
|
5479
5486
|
(s = e[i]) && (n = (o ? s(t, r, n) : s(n)) || n);
|
|
5480
5487
|
return o && n && Dl(t, r, n), n;
|
|
5481
5488
|
};
|
|
@@ -5504,7 +5511,7 @@ function ni(e, t) {
|
|
|
5504
5511
|
function Pn(e) {
|
|
5505
5512
|
return String(e?.tag || "").trim().toLowerCase() || Bi(e?.content);
|
|
5506
5513
|
}
|
|
5507
|
-
function
|
|
5514
|
+
function Il(e) {
|
|
5508
5515
|
const t = Pn(e);
|
|
5509
5516
|
return t ? {
|
|
5510
5517
|
...e,
|
|
@@ -5513,7 +5520,7 @@ function Rl(e) {
|
|
|
5513
5520
|
content: Hi(e?.content, t)
|
|
5514
5521
|
} : e;
|
|
5515
5522
|
}
|
|
5516
|
-
function
|
|
5523
|
+
function Rl(e, t) {
|
|
5517
5524
|
const r = Pn(e);
|
|
5518
5525
|
return r ? {
|
|
5519
5526
|
...e,
|
|
@@ -5534,7 +5541,7 @@ var Nl = Object.defineProperty, Ll = Object.getOwnPropertyDescriptor, br = (e, t
|
|
|
5534
5541
|
};
|
|
5535
5542
|
let rt = class {
|
|
5536
5543
|
get children() {
|
|
5537
|
-
return
|
|
5544
|
+
return I(this.node?.children);
|
|
5538
5545
|
}
|
|
5539
5546
|
get nestedPrefix() {
|
|
5540
5547
|
return `${this.indexKey || "strikethrough"}-strike`;
|
|
@@ -5573,7 +5580,7 @@ var Bl = Object.defineProperty, Hl = Object.getOwnPropertyDescriptor, kr = (e, t
|
|
|
5573
5580
|
};
|
|
5574
5581
|
let nt = class {
|
|
5575
5582
|
get children() {
|
|
5576
|
-
return
|
|
5583
|
+
return I(this.node?.children);
|
|
5577
5584
|
}
|
|
5578
5585
|
get nestedPrefix() {
|
|
5579
5586
|
return `${this.indexKey || "strong"}-strong`;
|
|
@@ -5612,7 +5619,7 @@ var Fl = Object.defineProperty, Kl = Object.getOwnPropertyDescriptor, Cr = (e, t
|
|
|
5612
5619
|
};
|
|
5613
5620
|
let ot = class {
|
|
5614
5621
|
get children() {
|
|
5615
|
-
return
|
|
5622
|
+
return I(this.node?.children);
|
|
5616
5623
|
}
|
|
5617
5624
|
get nestedPrefix() {
|
|
5618
5625
|
return `${this.indexKey || "subscript"}-sub`;
|
|
@@ -5651,7 +5658,7 @@ var jl = Object.defineProperty, zl = Object.getOwnPropertyDescriptor, Pr = (e, t
|
|
|
5651
5658
|
};
|
|
5652
5659
|
let it = class {
|
|
5653
5660
|
get children() {
|
|
5654
|
-
return
|
|
5661
|
+
return I(this.node?.children);
|
|
5655
5662
|
}
|
|
5656
5663
|
get nestedPrefix() {
|
|
5657
5664
|
return `${this.indexKey || "superscript"}-sup`;
|
|
@@ -5697,13 +5704,13 @@ let st = class {
|
|
|
5697
5704
|
return e && typeof e == "object" ? e : null;
|
|
5698
5705
|
}
|
|
5699
5706
|
get rows() {
|
|
5700
|
-
return
|
|
5707
|
+
return I(this.node?.rows);
|
|
5701
5708
|
}
|
|
5702
5709
|
cellsFor(e) {
|
|
5703
|
-
return
|
|
5710
|
+
return I(e?.cells);
|
|
5704
5711
|
}
|
|
5705
5712
|
childrenFor(e) {
|
|
5706
|
-
return
|
|
5713
|
+
return I(e?.children);
|
|
5707
5714
|
}
|
|
5708
5715
|
alignment(e) {
|
|
5709
5716
|
return C(e?.align);
|
|
@@ -5781,7 +5788,7 @@ var Xl = Object.defineProperty, Gl = Object.getOwnPropertyDescriptor, _r = (e, t
|
|
|
5781
5788
|
};
|
|
5782
5789
|
let at = class {
|
|
5783
5790
|
get children() {
|
|
5784
|
-
return
|
|
5791
|
+
return I(this.node?.children);
|
|
5785
5792
|
}
|
|
5786
5793
|
get nestedPrefix() {
|
|
5787
5794
|
return `${this.indexKey || "vmr"}-container`;
|
|
@@ -5841,7 +5848,7 @@ let he = class {
|
|
|
5841
5848
|
return r ? e?.[r] ?? null : null;
|
|
5842
5849
|
}
|
|
5843
5850
|
get customNode() {
|
|
5844
|
-
return
|
|
5851
|
+
return Il(this.node);
|
|
5845
5852
|
}
|
|
5846
5853
|
get codeMode() {
|
|
5847
5854
|
return ni(this.node, this.context);
|
|
@@ -5850,7 +5857,7 @@ let he = class {
|
|
|
5850
5857
|
return Pn(this.node);
|
|
5851
5858
|
}
|
|
5852
5859
|
get htmlRenderNode() {
|
|
5853
|
-
return
|
|
5860
|
+
return Rl(this.node, this.resolvedType);
|
|
5854
5861
|
}
|
|
5855
5862
|
get fallbackNode() {
|
|
5856
5863
|
return this.node;
|
|
@@ -6151,7 +6158,7 @@ let lt = class {
|
|
|
6151
6158
|
return C(this.node?.title) || Li(this.kind);
|
|
6152
6159
|
}
|
|
6153
6160
|
get children() {
|
|
6154
|
-
return
|
|
6161
|
+
return I(this.node?.children);
|
|
6155
6162
|
}
|
|
6156
6163
|
get nestedPrefix() {
|
|
6157
6164
|
return `${this.indexKey || "admonition"}-children`;
|
|
@@ -6322,7 +6329,7 @@ async function to(e, t) {
|
|
|
6322
6329
|
});
|
|
6323
6330
|
} catch (n) {
|
|
6324
6331
|
const i = n?.code || n?.name;
|
|
6325
|
-
if (!(i === "WORKER_INIT_ERROR" || n?.fallbackToRenderer) && !(i ===
|
|
6332
|
+
if (!(i === "WORKER_INIT_ERROR" || n?.fallbackToRenderer) && !(i === $t || i === "WORKER_TIMEOUT"))
|
|
6326
6333
|
throw n;
|
|
6327
6334
|
}
|
|
6328
6335
|
const r = await yn();
|
|
@@ -6510,10 +6517,10 @@ async function uc(e, t, r, o) {
|
|
|
6510
6517
|
throw new TypeError("D2 instance is missing compile/render methods.");
|
|
6511
6518
|
const m = await h.compile(c), f = m?.diagram ?? m, g = m?.renderOptions ?? m?.options ?? {}, y = r.d2ThemeId ?? g.themeID, T = r.d2DarkThemeId ?? g.darkThemeID, v = { ...g };
|
|
6512
6519
|
if (v.themeID = r.isDark && T != null ? T : y, v.darkThemeID = null, v.darkThemeOverrides = null, r.isDark) {
|
|
6513
|
-
const
|
|
6520
|
+
const R = g.themeOverrides && typeof g.themeOverrides == "object" ? g.themeOverrides : null;
|
|
6514
6521
|
v.themeOverrides = {
|
|
6515
6522
|
...rc,
|
|
6516
|
-
|
|
6523
|
+
...R || {}
|
|
6517
6524
|
};
|
|
6518
6525
|
}
|
|
6519
6526
|
const M = await h.render(f, v);
|
|
@@ -6808,14 +6815,14 @@ let w = class {
|
|
|
6808
6815
|
onCopy: (n) => this.copy.emit(n),
|
|
6809
6816
|
onHandleArtifactClick: (n) => this.handleArtifactClick.emit(n)
|
|
6810
6817
|
};
|
|
6811
|
-
this.renderContext =
|
|
6818
|
+
this.renderContext = $i(
|
|
6812
6819
|
{
|
|
6813
6820
|
...this,
|
|
6814
6821
|
customComponents: t
|
|
6815
6822
|
},
|
|
6816
6823
|
r,
|
|
6817
6824
|
this.textStreamState
|
|
6818
|
-
), this.parsedNodes =
|
|
6825
|
+
), this.parsedNodes = Ii(this), this.trimMeasuredState();
|
|
6819
6826
|
const o = this.parsedNodes.length;
|
|
6820
6827
|
this.focusIndex = Math.max(0, Math.min(this.focusIndex, Math.max(0, o - 1))), this.virtualizationEnabled ? (this.renderedCount = o, this.liveRange = no(o, this.focusIndex, this.resolvedMaxLiveNodes, this.resolvedLiveNodeBuffer)) : (this.liveRange = { start: 0, end: o }, this.renderedCount = this.incrementalRenderingActive ? Math.min(o, this.resolvedInitialBatchSize) : o), this.deferNodesActive || this.nodeVisibility.clear(), this.refreshVisibleEntries(), this.cdr.markForCheck(), this.schedulePostRenderWork(), this.incrementalRenderingActive && this.renderedCount < o && this.scheduleBatchStep();
|
|
6821
6828
|
}
|
|
@@ -7268,15 +7275,15 @@ function Dd(e) {
|
|
|
7268
7275
|
}), o = Ec(e, r);
|
|
7269
7276
|
return D(o, r);
|
|
7270
7277
|
}
|
|
7271
|
-
function
|
|
7278
|
+
function $d(e, t = {}) {
|
|
7272
7279
|
const r = Er(t);
|
|
7273
7280
|
return Dc(e, r);
|
|
7274
7281
|
}
|
|
7275
|
-
function
|
|
7282
|
+
function Id(e, t = {}) {
|
|
7276
7283
|
const r = Er(t);
|
|
7277
7284
|
return D(e, r);
|
|
7278
7285
|
}
|
|
7279
|
-
function
|
|
7286
|
+
function Rd(e, t = {}) {
|
|
7280
7287
|
const r = Er(t);
|
|
7281
7288
|
return ai(e, r);
|
|
7282
7289
|
}
|
|
@@ -7317,7 +7324,7 @@ function Dc(e, t) {
|
|
|
7317
7324
|
return D(e.nodes, t);
|
|
7318
7325
|
const r = e.node;
|
|
7319
7326
|
if (r) {
|
|
7320
|
-
const o =
|
|
7327
|
+
const o = $(r.children);
|
|
7321
7328
|
if (o.length > 0)
|
|
7322
7329
|
return D(o, t);
|
|
7323
7330
|
const n = P(r.content);
|
|
@@ -7338,35 +7345,35 @@ function ai(e, t) {
|
|
|
7338
7345
|
case "text":
|
|
7339
7346
|
return N(P(e.content));
|
|
7340
7347
|
case "paragraph":
|
|
7341
|
-
return `<p>${D(
|
|
7348
|
+
return `<p>${D($(e.children), t)}</p>`;
|
|
7342
7349
|
case "strong":
|
|
7343
|
-
return `<strong>${D(
|
|
7350
|
+
return `<strong>${D($(e.children), t)}</strong>`;
|
|
7344
7351
|
case "emphasis":
|
|
7345
|
-
return `<em>${D(
|
|
7352
|
+
return `<em>${D($(e.children), t)}</em>`;
|
|
7346
7353
|
case "strikethrough":
|
|
7347
|
-
return `<del>${D(
|
|
7354
|
+
return `<del>${D($(e.children), t)}</del>`;
|
|
7348
7355
|
case "highlight":
|
|
7349
|
-
return `<mark>${D(
|
|
7356
|
+
return `<mark>${D($(e.children), t)}</mark>`;
|
|
7350
7357
|
case "insert":
|
|
7351
|
-
return `<ins>${D(
|
|
7358
|
+
return `<ins>${D($(e.children), t)}</ins>`;
|
|
7352
7359
|
case "subscript":
|
|
7353
|
-
return `<sub>${D(
|
|
7360
|
+
return `<sub>${D($(e.children), t)}</sub>`;
|
|
7354
7361
|
case "superscript":
|
|
7355
|
-
return `<sup>${D(
|
|
7362
|
+
return `<sup>${D($(e.children), t)}</sup>`;
|
|
7356
7363
|
case "inline_code":
|
|
7357
7364
|
return `<code>${N(P(e.code))}</code>`;
|
|
7358
7365
|
case "hardbreak":
|
|
7359
7366
|
return "<br>";
|
|
7360
7367
|
case "link":
|
|
7361
|
-
return
|
|
7368
|
+
return $c(e, t);
|
|
7362
7369
|
case "image":
|
|
7363
7370
|
return Ac(e);
|
|
7364
7371
|
case "list":
|
|
7365
7372
|
return Nc(e, t);
|
|
7366
7373
|
case "list_item":
|
|
7367
|
-
return `<li>${D(
|
|
7374
|
+
return `<li>${D($(e.children), t)}</li>`;
|
|
7368
7375
|
case "blockquote":
|
|
7369
|
-
return `<blockquote>${D(
|
|
7376
|
+
return `<blockquote>${D($(e.children), t)}</blockquote>`;
|
|
7370
7377
|
case "heading":
|
|
7371
7378
|
return Lc(e, t);
|
|
7372
7379
|
case "code_block":
|
|
@@ -7395,9 +7402,9 @@ function ai(e, t) {
|
|
|
7395
7402
|
case "emoji":
|
|
7396
7403
|
return N(P(e.raw || e.markup || e.content || e.name));
|
|
7397
7404
|
case "math_inline":
|
|
7398
|
-
return
|
|
7405
|
+
return Ic(e);
|
|
7399
7406
|
case "math_block":
|
|
7400
|
-
return
|
|
7407
|
+
return Rc(e);
|
|
7401
7408
|
case "reference":
|
|
7402
7409
|
return `<sup class="markstream-nested-reference">[${N(P(e.id))}]</sup>`;
|
|
7403
7410
|
case "html_inline":
|
|
@@ -7407,14 +7414,14 @@ function ai(e, t) {
|
|
|
7407
7414
|
return qc(e, t);
|
|
7408
7415
|
}
|
|
7409
7416
|
}
|
|
7410
|
-
function
|
|
7411
|
-
const r = P(e.href), o = P(e.title), n =
|
|
7417
|
+
function $c(e, t) {
|
|
7418
|
+
const r = P(e.href), o = P(e.title), n = $(e.children).length > 0 ? D($(e.children), t) : N(P(e.text || r)), i = o ? ` title="${B(o)}"` : "";
|
|
7412
7419
|
return `<a${r ? ` href="${B(r)}"` : ""}${i} target="_blank" rel="noreferrer noopener">${n}</a>`;
|
|
7413
7420
|
}
|
|
7414
|
-
function
|
|
7421
|
+
function Ic(e) {
|
|
7415
7422
|
return `<span class="markstream-nested-math" data-display="inline"><span class="markstream-nested-math__source">${N(P(e.content || e.markup || e.raw))}</span><span class="markstream-nested-math__render" aria-hidden="true"></span></span>`;
|
|
7416
7423
|
}
|
|
7417
|
-
function
|
|
7424
|
+
function Rc(e) {
|
|
7418
7425
|
return `<div class="markstream-nested-math-block"><pre class="markstream-nested-math-block__source"><code>${N(P(e.content || e.markup || e.raw))}</code></pre><div class="markstream-nested-math-block__render" aria-hidden="true"></div></div>`;
|
|
7419
7426
|
}
|
|
7420
7427
|
function Ac(e) {
|
|
@@ -7423,11 +7430,11 @@ function Ac(e) {
|
|
|
7423
7430
|
}
|
|
7424
7431
|
function Nc(e, t) {
|
|
7425
7432
|
const r = e.ordered ? "ol" : "ul", o = e.ordered && Number.isFinite(e.start) ? ` start="${Number(e.start)}"` : "";
|
|
7426
|
-
return `<${r}${o}>${D(
|
|
7433
|
+
return `<${r}${o}>${D($(e.items), t)}</${r}>`;
|
|
7427
7434
|
}
|
|
7428
7435
|
function Lc(e, t) {
|
|
7429
7436
|
const r = Yc(e.level);
|
|
7430
|
-
return `<h${r}>${D(
|
|
7437
|
+
return `<h${r}>${D($(e.children), t)}</h${r}>`;
|
|
7431
7438
|
}
|
|
7432
7439
|
function Bc(e) {
|
|
7433
7440
|
const t = P(e.language).trim(), r = _n(t), o = r ? ` class="language-${r}"` : "", n = !!e.diff;
|
|
@@ -7440,25 +7447,25 @@ function Bc(e) {
|
|
|
7440
7447
|
].filter(Boolean).join(" ")}><code${o}>${N(P(e.code))}</code></pre>`;
|
|
7441
7448
|
}
|
|
7442
7449
|
function Hc(e, t) {
|
|
7443
|
-
const r = e.header ? li(e.header, t, !0) : "", o = D(
|
|
7450
|
+
const r = e.header ? li(e.header, t, !0) : "", o = D($(e.rows), t), n = r ? `<thead>${r}</thead>` : "", i = o ? `<tbody>${o}</tbody>` : "";
|
|
7444
7451
|
return `<table>${n}${i}</table>`;
|
|
7445
7452
|
}
|
|
7446
7453
|
function li(e, t, r = !1) {
|
|
7447
|
-
return `<tr>${
|
|
7454
|
+
return `<tr>${$(e.cells).map((n) => ci(n, t, r)).join("")}</tr>`;
|
|
7448
7455
|
}
|
|
7449
7456
|
function ci(e, t, r = !1) {
|
|
7450
7457
|
const o = r || e.header ? "th" : "td", n = P(e.align), i = n ? ` style="text-align:${B(n)}"` : "";
|
|
7451
|
-
return `<${o}${i}>${D(
|
|
7458
|
+
return `<${o}${i}>${D($(e.children), t)}</${o}>`;
|
|
7452
7459
|
}
|
|
7453
7460
|
function Fc(e, t) {
|
|
7454
|
-
return `<dl>${
|
|
7461
|
+
return `<dl>${$(e.items).map((r) => di(r, t)).join("")}</dl>`;
|
|
7455
7462
|
}
|
|
7456
7463
|
function di(e, t) {
|
|
7457
|
-
const r = D(
|
|
7464
|
+
const r = D($(e.term), t), o = D($(e.definition), t);
|
|
7458
7465
|
return `<dt>${r}</dt><dd>${o}</dd>`;
|
|
7459
7466
|
}
|
|
7460
7467
|
function Kc(e, t) {
|
|
7461
|
-
return `<div id="fnref--${B(P(e.id))}" class="markstream-nested-footnote">${D(
|
|
7468
|
+
return `<div id="fnref--${B(P(e.id))}" class="markstream-nested-footnote">${D($(e.children), t)}</div>`;
|
|
7462
7469
|
}
|
|
7463
7470
|
function jc(e) {
|
|
7464
7471
|
const t = N(P(e.id));
|
|
@@ -7466,7 +7473,7 @@ function jc(e) {
|
|
|
7466
7473
|
}
|
|
7467
7474
|
function zc(e, t) {
|
|
7468
7475
|
const r = _n(P(e.kind || "note")) || "note", o = P(e.title) || Jc(r);
|
|
7469
|
-
return `<div class="markstream-nested-admonition markstream-nested-admonition--${r}"><div class="markstream-nested-admonition__title">${N(o)}</div><div class="markstream-nested-admonition__content">${D(
|
|
7476
|
+
return `<div class="markstream-nested-admonition markstream-nested-admonition--${r}"><div class="markstream-nested-admonition__title">${N(o)}</div><div class="markstream-nested-admonition__content">${D($(e.children), t)}</div></div>`;
|
|
7470
7477
|
}
|
|
7471
7478
|
function Wc(e, t) {
|
|
7472
7479
|
const r = P(e.content);
|
|
@@ -7484,7 +7491,7 @@ function qc(e, t) {
|
|
|
7484
7491
|
return `<${s}${n} data-markstream-custom-tag="${B(r)}">${i}</${s}>`;
|
|
7485
7492
|
}
|
|
7486
7493
|
function Vc(e, t) {
|
|
7487
|
-
const r =
|
|
7494
|
+
const r = $(e.children);
|
|
7488
7495
|
if (r.length > 0)
|
|
7489
7496
|
return D(r, t);
|
|
7490
7497
|
const o = P(e.content);
|
|
@@ -7526,7 +7533,7 @@ function Gc(e) {
|
|
|
7526
7533
|
}
|
|
7527
7534
|
return Object.entries(e).map(([t, r]) => [t, r]);
|
|
7528
7535
|
}
|
|
7529
|
-
function
|
|
7536
|
+
function $(e) {
|
|
7530
7537
|
return Array.isArray(e) ? e.filter((t) => !!t && typeof t == "object") : [];
|
|
7531
7538
|
}
|
|
7532
7539
|
function P(e) {
|
|
@@ -8020,10 +8027,10 @@ export {
|
|
|
8020
8027
|
de as TextNode,
|
|
8021
8028
|
Vr as ThematicBreakNode,
|
|
8022
8029
|
at as VmrContainerNode,
|
|
8023
|
-
|
|
8030
|
+
$t as WORKER_BUSY_CODE,
|
|
8024
8031
|
Qc as buildKaTeXCDNWorkerSource,
|
|
8025
8032
|
ed as buildMermaidCDNWorkerSource,
|
|
8026
|
-
|
|
8033
|
+
$i as buildRenderContext,
|
|
8027
8034
|
ei as canParseOffthread,
|
|
8028
8035
|
ad as clearGlobalCustomComponents,
|
|
8029
8036
|
gd as clearKaTeXWorker,
|
|
@@ -8058,12 +8065,12 @@ export {
|
|
|
8058
8065
|
sd as removeCustomComponents,
|
|
8059
8066
|
hl as renderKaTeXInWorker,
|
|
8060
8067
|
wn as renderKaTeXWithBackpressure,
|
|
8061
|
-
|
|
8062
|
-
|
|
8068
|
+
Rd as renderMarkdownNodeToHtml,
|
|
8069
|
+
Id as renderMarkdownNodesToHtml,
|
|
8063
8070
|
Dd as renderMarkdownToHtml,
|
|
8064
|
-
|
|
8071
|
+
$d as renderNestedMarkdownToHtml,
|
|
8065
8072
|
ns as resolveMonacoLanguageId,
|
|
8066
|
-
|
|
8073
|
+
Ii as resolveParsedNodes,
|
|
8067
8074
|
un as sanitizeHtmlContent,
|
|
8068
8075
|
id as setCustomComponents,
|
|
8069
8076
|
xo as setD2Loader,
|
|
@@ -35,6 +35,7 @@ export declare class InfographicBlockNodeComponent implements AfterViewInit, OnC
|
|
|
35
35
|
get resolvedShowZoomControls(): boolean;
|
|
36
36
|
get resolvedShowTooltips(): boolean;
|
|
37
37
|
get resolvedMaxHeight(): string;
|
|
38
|
+
private resolveContainerMinHeight;
|
|
38
39
|
get resolvedLoading(): boolean;
|
|
39
40
|
get resolvedProgressiveRender(): boolean;
|
|
40
41
|
get modalTransform(): string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markstream-angular",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.1-alpha.
|
|
4
|
+
"version": "0.0.1-alpha.6",
|
|
5
5
|
"description": "Experimental Angular Markdown renderer for Markstream, built on stream-markdown AST and a stable HTML baseline renderer.",
|
|
6
6
|
"author": "Simon He",
|
|
7
7
|
"license": "MIT",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@floating-ui/dom": "^1.7.6",
|
|
71
|
-
"stream-markdown-parser": "0.0.
|
|
71
|
+
"stream-markdown-parser": "0.0.75"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@types/node": "^18.19.130",
|