@aiquants/markdown 13.0.0 → 13.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +282 -18
- package/dist/components/MarkdownRenderer.d.ts +6 -2
- package/dist/components/MermaidDiagram.d.ts +20 -0
- package/dist/components/blockNotice.d.ts +15 -0
- package/dist/components/fileSave.d.ts +1 -0
- package/dist/components/mermaidAccessibility.d.ts +11 -0
- package/dist/components/mermaidExport.d.ts +24 -0
- package/dist/components/mermaidLabels.d.ts +84 -0
- package/dist/components/spreadsheetClipboard.d.ts +1 -1
- package/dist/components/svgRaster.d.ts +2 -2
- package/dist/components/viewerLabels.d.ts +3 -2
- package/dist/extractHeadings-BfYlTVvN.js +6773 -0
- package/dist/extractHeadings-CZPJi4gM.cjs +12 -0
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.d.ts +4 -1
- package/dist/index.client.js +50 -48
- package/dist/index.js +50 -48
- package/dist/mermaidFrame/NOTICES.md +1 -1
- package/dist/mermaidFrame/browserPaintView.d.ts +3 -0
- package/dist/mermaidFrame/cssCleaner.d.ts +16 -0
- package/dist/mermaidFrame/diagramPalette.d.ts +24 -0
- package/dist/mermaidFrame/diagramTheme.d.ts +7 -0
- package/dist/mermaidFrame/drawableTypes.d.ts +6 -0
- package/dist/mermaidFrame/drawer.d.ts +15 -2
- package/dist/mermaidFrame/frame.js +379 -378
- package/dist/mermaidFrame/insertion.d.ts +11 -0
- package/dist/mermaidFrame/namespaces.d.ts +3 -0
- package/dist/mermaidFrame/paintCheck.d.ts +2 -0
- package/dist/mermaidFrame/paintContract.d.ts +3 -0
- package/dist/mermaidFrame/paintDiagram.d.ts +3 -0
- package/dist/mermaidFrame/paintMap.d.ts +103 -0
- package/dist/mermaidFrame/paintRules.d.ts +18 -0
- package/dist/mermaidFrame/protocol.d.ts +5 -0
- package/dist/mermaidFrame/serve.d.ts +10 -5
- package/dist/styles/markdown.css +1 -1
- package/dist/styles/markdown.standalone.css +1 -1
- package/package.json +7 -5
- package/dist/extractHeadings-BAhmauKo.js +0 -5296
- package/dist/extractHeadings-qiJXegCx.cjs +0 -11
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./extractHeadings-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./extractHeadings-CZPJi4gM.cjs"),E=require("./code-blocks-CTESwslp.cjs"),o=require("./viewer-settings.cjs");exports.BlockquoteNode=e.BlockquoteNode;exports.CodeNode=e.CodeNode;exports.DEFAULT_CODE_BLOCK_LABELS=e.DEFAULT_CODE_BLOCK_LABELS;exports.DEFAULT_DISPLAY_MATH_LABELS=e.DEFAULT_DISPLAY_MATH_LABELS;exports.DEFAULT_MARKDOWN_EMBED_LABELS=e.DEFAULT_MARKDOWN_EMBED_LABELS;exports.DEFAULT_MARKDOWN_VIEWER_LABELS=e.DEFAULT_MARKDOWN_VIEWER_LABELS;exports.DEFAULT_MERMAID_DIAGRAM_LABELS=e.DEFAULT_MERMAID_DIAGRAM_LABELS;exports.DEFAULT_MERMAID_INTERACTION=e.DEFAULT_MERMAID_INTERACTION;exports.DEFAULT_SVG_IMAGE_LABELS=e.DEFAULT_SVG_IMAGE_LABELS;exports.DeleteNode=e.DeleteNode;exports.EmphasisNode=e.EmphasisNode;exports.FootnoteBackLinkNode=e.FootnoteBackLinkNode;exports.FootnoteReferenceNode=e.FootnoteReferenceNode;exports.FootnotesSection=e.FootnotesSection;exports.HeadingNode=e.HeadingNode;exports.HostedScrollArea=e.HostedScrollArea;exports.ImageNode=e.ImageNode;exports.InlineCodeNode=e.InlineCodeNode;exports.LinkNode=e.LinkNode;exports.ListItemNode=e.ListItemNode;exports.ListNode=e.ListNode;exports.MERMAID_DRAWABLE_TYPES=e.MERMAID_DRAWABLE_TYPES;exports.MarkdownRenderer=e.MarkdownRenderer;exports.MarkdownViewer=e.MarkdownViewer;exports.MermaidDiagram=e.MermaidDiagram;exports.NodesRenderer=e.NodesRenderer;exports.ParagraphNode=e.ParagraphNode;exports.SpreadsheetBlock=e.SpreadsheetBlock;exports.StrongNode=e.StrongNode;exports.TableNode=e.TableNode;exports.TableOfContents=e.TableOfContents;exports.TextNode=e.TextNode;exports.ThematicBreakNode=e.ThematicBreakNode;exports.ZennDetailsNode=e.ZennDetailsNode;exports.ZennMessageNode=e.ZennMessageNode;exports.createMermaidDrawer=e.createMermaidDrawer;exports.extractHeadings=e.extractHeadings;exports.remarkCustomHeadingId=e.remarkCustomHeadingId;exports.remarkFootnoteBackLink=e.remarkFootnoteBackLink;exports.remarkHtmlAnchorToLink=e.remarkHtmlAnchorToLink;exports.remarkHtmlInHtml=e.remarkHtmlInHtml;exports.remarkImageSize=e.remarkImageSize;exports.remarkParentNode=e.remarkParentNode;exports.remarkZennMessage=e.remarkZennMessage;exports.useMarkdownToolbarState=e.useMarkdownToolbarState;exports.SPREADSHEET_BLOCK_LABEL_CATALOGS=E.SPREADSHEET_BLOCK_LABEL_CATALOGS;exports.SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS=E.SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS;exports.CONTENT_ALIGNS=o.CONTENT_ALIGNS;exports.CONTENT_COLORS=o.CONTENT_COLORS;exports.CONTENT_MEASURES=o.CONTENT_MEASURES;exports.DEFAULT_CONTENT_ALIGN=o.DEFAULT_CONTENT_ALIGN;exports.DEFAULT_CONTENT_COLORS=o.DEFAULT_CONTENT_COLORS;exports.DEFAULT_CONTENT_MEASURE=o.DEFAULT_CONTENT_MEASURE;exports.DEFAULT_MARKDOWN_STYLE=o.DEFAULT_MARKDOWN_STYLE;exports.DEFAULT_MARKDOWN_STYLES=o.DEFAULT_MARKDOWN_STYLES;exports.toContentAlign=o.toContentAlign;exports.toContentColors=o.toContentColors;exports.toContentMeasure=o.toContentMeasure;
|
package/dist/index.client.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./extractHeadings-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./extractHeadings-CZPJi4gM.cjs"),E=require("./code-blocks-CTESwslp.cjs"),o=require("./viewer-settings.cjs");exports.BlockquoteNode=e.BlockquoteNode;exports.CodeNode=e.CodeNode;exports.DEFAULT_CODE_BLOCK_LABELS=e.DEFAULT_CODE_BLOCK_LABELS;exports.DEFAULT_DISPLAY_MATH_LABELS=e.DEFAULT_DISPLAY_MATH_LABELS;exports.DEFAULT_MARKDOWN_EMBED_LABELS=e.DEFAULT_MARKDOWN_EMBED_LABELS;exports.DEFAULT_MARKDOWN_VIEWER_LABELS=e.DEFAULT_MARKDOWN_VIEWER_LABELS;exports.DEFAULT_MERMAID_DIAGRAM_LABELS=e.DEFAULT_MERMAID_DIAGRAM_LABELS;exports.DEFAULT_MERMAID_INTERACTION=e.DEFAULT_MERMAID_INTERACTION;exports.DEFAULT_SVG_IMAGE_LABELS=e.DEFAULT_SVG_IMAGE_LABELS;exports.DeleteNode=e.DeleteNode;exports.EmphasisNode=e.EmphasisNode;exports.FootnoteBackLinkNode=e.FootnoteBackLinkNode;exports.FootnoteReferenceNode=e.FootnoteReferenceNode;exports.FootnotesSection=e.FootnotesSection;exports.HeadingNode=e.HeadingNode;exports.HostedScrollArea=e.HostedScrollArea;exports.ImageNode=e.ImageNode;exports.InlineCodeNode=e.InlineCodeNode;exports.LinkNode=e.LinkNode;exports.ListItemNode=e.ListItemNode;exports.ListNode=e.ListNode;exports.MERMAID_DRAWABLE_TYPES=e.MERMAID_DRAWABLE_TYPES;exports.MarkdownRenderer=e.MarkdownRenderer;exports.MarkdownViewer=e.MarkdownViewer;exports.MermaidDiagram=e.MermaidDiagram;exports.NodesRenderer=e.NodesRenderer;exports.ParagraphNode=e.ParagraphNode;exports.SpreadsheetBlock=e.SpreadsheetBlock;exports.StrongNode=e.StrongNode;exports.TableNode=e.TableNode;exports.TableOfContents=e.TableOfContents;exports.TextNode=e.TextNode;exports.ThematicBreakNode=e.ThematicBreakNode;exports.ZennDetailsNode=e.ZennDetailsNode;exports.ZennMessageNode=e.ZennMessageNode;exports.createMermaidDrawer=e.createMermaidDrawer;exports.extractHeadings=e.extractHeadings;exports.remarkCustomHeadingId=e.remarkCustomHeadingId;exports.remarkFootnoteBackLink=e.remarkFootnoteBackLink;exports.remarkHtmlAnchorToLink=e.remarkHtmlAnchorToLink;exports.remarkHtmlInHtml=e.remarkHtmlInHtml;exports.remarkImageSize=e.remarkImageSize;exports.remarkParentNode=e.remarkParentNode;exports.remarkZennMessage=e.remarkZennMessage;exports.useMarkdownToolbarState=e.useMarkdownToolbarState;exports.SPREADSHEET_BLOCK_LABEL_CATALOGS=E.SPREADSHEET_BLOCK_LABEL_CATALOGS;exports.SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS=E.SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS;exports.CONTENT_ALIGNS=o.CONTENT_ALIGNS;exports.CONTENT_COLORS=o.CONTENT_COLORS;exports.CONTENT_MEASURES=o.CONTENT_MEASURES;exports.DEFAULT_CONTENT_ALIGN=o.DEFAULT_CONTENT_ALIGN;exports.DEFAULT_CONTENT_COLORS=o.DEFAULT_CONTENT_COLORS;exports.DEFAULT_CONTENT_MEASURE=o.DEFAULT_CONTENT_MEASURE;exports.DEFAULT_MARKDOWN_STYLE=o.DEFAULT_MARKDOWN_STYLE;exports.DEFAULT_MARKDOWN_STYLES=o.DEFAULT_MARKDOWN_STYLES;exports.toContentAlign=o.toContentAlign;exports.toContentColors=o.toContentColors;exports.toContentMeasure=o.toContentMeasure;
|
package/dist/index.client.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { HostedScrollArea, type HostedScrollAreaProps, type HostedScrollerProps,
|
|
|
6
6
|
export type { MarkdownLinkAttributes } from "./components/links.ts";
|
|
7
7
|
export { type MarkdownImageComponent, type MarkdownImageProps, type MarkdownLinkComponent, type MarkdownLinkKind, type MarkdownLinkProps, MarkdownRenderer } from "./components/MarkdownRenderer.tsx";
|
|
8
8
|
export { type MarkdownHeadingHrefResolver, type MarkdownHeadingSelectHandler, type MarkdownToolbarMenu, type MarkdownToolbarState, MarkdownViewer, type MarkdownViewerErrorInfo, type MarkdownViewerHeading, type MarkdownViewerParseResult, type MarkdownViewerProps, useMarkdownToolbarState, } from "./components/MarkdownViewer.tsx";
|
|
9
|
-
export { DEFAULT_MERMAID_DIAGRAM_LABELS, DEFAULT_MERMAID_INTERACTION, MermaidDiagram, type MermaidDiagramLabels, type MermaidInteractionMode } from "./components/MermaidDiagram.tsx";
|
|
9
|
+
export { DEFAULT_MERMAID_DIAGRAM_LABELS, DEFAULT_MERMAID_INTERACTION, MermaidDiagram, type MermaidDiagramFile, type MermaidDiagramLabels, type MermaidDocumentExporting, type MermaidDrawing, type MermaidExporting, type MermaidHeld, type MermaidInteractionMode, type MermaidSaveFormat, } from "./components/MermaidDiagram.tsx";
|
|
10
10
|
export type { MarkdownMathDiagnostic } from "./components/mathRendering.ts";
|
|
11
11
|
export { BlockquoteNode } from "./components/mdastNodes/BlockquoteNode.tsx";
|
|
12
12
|
export { CodeNode } from "./components/mdastNodes/CodeNode.tsx";
|
|
@@ -33,6 +33,9 @@ export { SPREADSHEET_BLOCK_LABEL_CATALOGS, SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS,
|
|
|
33
33
|
export { DEFAULT_SVG_IMAGE_LABELS, type SvgImageLabels } from "./components/svgImageLabels.ts";
|
|
34
34
|
export { TableOfContents } from "./components/TableOfContents.tsx";
|
|
35
35
|
export { type CodeBlockViewerLabels, DEFAULT_MARKDOWN_VIEWER_LABELS, type DisplayMathViewerLabels, type MarkdownViewerLabels, type MermaidViewerLabels, type SpreadsheetViewerLabels, type SvgImageViewerLabels, } from "./components/viewerLabels.ts";
|
|
36
|
+
export { MERMAID_DRAWABLE_TYPES, type MermaidDrawableType } from "./mermaidFrame/drawableTypes.ts";
|
|
37
|
+
export { createMermaidDrawer, type DrawnMermaidDiagram, type MermaidDrawer, type MermaidDrawerSetup, type MermaidDrawFailure, type MermaidDrawRequest, type MermaidDrawResult, type MermaidNotExportableReason } from "./mermaidFrame/drawer.ts";
|
|
38
|
+
export type { MermaidDrawForm, MermaidFrameFailure } from "./mermaidFrame/protocol.ts";
|
|
36
39
|
export { remarkCustomHeadingId } from "./plugins/remark-custom-heading-id.ts";
|
|
37
40
|
export { remarkFootnoteBackLink } from "./plugins/remark-footnote-back-link.ts";
|
|
38
41
|
export { remarkHtmlAnchorToLink } from "./plugins/remark-html-anchor-to-link.ts";
|
package/dist/index.client.js
CHANGED
|
@@ -1,61 +1,63 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { S as
|
|
3
|
-
import { CONTENT_ALIGNS as
|
|
1
|
+
import { B as s, C as o, D as E, a as r, b as L, c as A, d as t, e as N, f as _, g as n, E as T, F as d, h as D, i as S, H as M, j as C, I as m, k as O, L as i, l as R, m as k, M as B, n as I, o as F, p as l, N as U, P as c, S as g, q as H, T as K, r as P, s as p, t as G, Z as f, u as h, v as w, w as x, x as W, y as u, z as b, A as Y, G as Z, J as V, K as q, O as z } from "./extractHeadings-BfYlTVvN.js";
|
|
2
|
+
import { S as v, a as y } from "./code-blocks-C6J8rVTc.js";
|
|
3
|
+
import { CONTENT_ALIGNS as Q, CONTENT_COLORS as X, CONTENT_MEASURES as $, DEFAULT_CONTENT_ALIGN as ee, DEFAULT_CONTENT_COLORS as ae, DEFAULT_CONTENT_MEASURE as se, DEFAULT_MARKDOWN_STYLE as oe, DEFAULT_MARKDOWN_STYLES as Ee, toContentAlign as re, toContentColors as Le, toContentMeasure as Ae } from "./viewer-settings.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
s as BlockquoteNode,
|
|
6
|
+
Q as CONTENT_ALIGNS,
|
|
7
|
+
X as CONTENT_COLORS,
|
|
8
|
+
$ as CONTENT_MEASURES,
|
|
9
|
+
o as CodeNode,
|
|
10
10
|
E as DEFAULT_CODE_BLOCK_LABELS,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
ee as DEFAULT_CONTENT_ALIGN,
|
|
12
|
+
ae as DEFAULT_CONTENT_COLORS,
|
|
13
|
+
se as DEFAULT_CONTENT_MEASURE,
|
|
14
|
+
r as DEFAULT_DISPLAY_MATH_LABELS,
|
|
15
|
+
L as DEFAULT_MARKDOWN_EMBED_LABELS,
|
|
16
|
+
oe as DEFAULT_MARKDOWN_STYLE,
|
|
17
|
+
Ee as DEFAULT_MARKDOWN_STYLES,
|
|
18
18
|
A as DEFAULT_MARKDOWN_VIEWER_LABELS,
|
|
19
19
|
t as DEFAULT_MERMAID_DIAGRAM_LABELS,
|
|
20
20
|
N as DEFAULT_MERMAID_INTERACTION,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
_ as DEFAULT_SVG_IMAGE_LABELS,
|
|
22
|
+
n as DeleteNode,
|
|
23
|
+
T as EmphasisNode,
|
|
24
24
|
d as FootnoteBackLinkNode,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
D as FootnoteReferenceNode,
|
|
26
|
+
S as FootnotesSection,
|
|
27
|
+
M as HeadingNode,
|
|
28
|
+
C as HostedScrollArea,
|
|
29
|
+
m as ImageNode,
|
|
30
30
|
O as InlineCodeNode,
|
|
31
31
|
i as LinkNode,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
B as
|
|
32
|
+
R as ListItemNode,
|
|
33
|
+
k as ListNode,
|
|
34
|
+
B as MERMAID_DRAWABLE_TYPES,
|
|
35
|
+
I as MarkdownRenderer,
|
|
35
36
|
F as MarkdownViewer,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
l as MermaidDiagram,
|
|
38
|
+
U as NodesRenderer,
|
|
39
|
+
c as ParagraphNode,
|
|
40
|
+
v as SPREADSHEET_BLOCK_LABEL_CATALOGS,
|
|
41
|
+
y as SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS,
|
|
41
42
|
g as SpreadsheetBlock,
|
|
42
43
|
H as StrongNode,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
x as
|
|
44
|
+
K as TableNode,
|
|
45
|
+
P as TableOfContents,
|
|
46
|
+
p as TextNode,
|
|
47
|
+
G as ThematicBreakNode,
|
|
48
|
+
f as ZennDetailsNode,
|
|
49
|
+
h as ZennMessageNode,
|
|
50
|
+
w as createMermaidDrawer,
|
|
51
|
+
x as extractHeadings,
|
|
52
|
+
W as remarkCustomHeadingId,
|
|
51
53
|
u as remarkFootnoteBackLink,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
b as remarkHtmlAnchorToLink,
|
|
55
|
+
Y as remarkHtmlInHtml,
|
|
56
|
+
Z as remarkImageSize,
|
|
57
|
+
V as remarkParentNode,
|
|
58
|
+
q as remarkZennMessage,
|
|
59
|
+
re as toContentAlign,
|
|
60
|
+
Le as toContentColors,
|
|
61
|
+
Ae as toContentMeasure,
|
|
62
|
+
z as useMarkdownToolbarState
|
|
61
63
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,61 +1,63 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { S as
|
|
3
|
-
import { CONTENT_ALIGNS as
|
|
1
|
+
import { B as s, C as o, D as E, a as r, b as L, c as A, d as t, e as N, f as _, g as n, E as T, F as d, h as D, i as S, H as M, j as C, I as m, k as O, L as i, l as R, m as k, M as B, n as I, o as F, p as l, N as U, P as c, S as g, q as H, T as K, r as P, s as p, t as G, Z as f, u as h, v as w, w as x, x as W, y as u, z as b, A as Y, G as Z, J as V, K as q, O as z } from "./extractHeadings-BfYlTVvN.js";
|
|
2
|
+
import { S as v, a as y } from "./code-blocks-C6J8rVTc.js";
|
|
3
|
+
import { CONTENT_ALIGNS as Q, CONTENT_COLORS as X, CONTENT_MEASURES as $, DEFAULT_CONTENT_ALIGN as ee, DEFAULT_CONTENT_COLORS as ae, DEFAULT_CONTENT_MEASURE as se, DEFAULT_MARKDOWN_STYLE as oe, DEFAULT_MARKDOWN_STYLES as Ee, toContentAlign as re, toContentColors as Le, toContentMeasure as Ae } from "./viewer-settings.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
s as BlockquoteNode,
|
|
6
|
+
Q as CONTENT_ALIGNS,
|
|
7
|
+
X as CONTENT_COLORS,
|
|
8
|
+
$ as CONTENT_MEASURES,
|
|
9
|
+
o as CodeNode,
|
|
10
10
|
E as DEFAULT_CODE_BLOCK_LABELS,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
ee as DEFAULT_CONTENT_ALIGN,
|
|
12
|
+
ae as DEFAULT_CONTENT_COLORS,
|
|
13
|
+
se as DEFAULT_CONTENT_MEASURE,
|
|
14
|
+
r as DEFAULT_DISPLAY_MATH_LABELS,
|
|
15
|
+
L as DEFAULT_MARKDOWN_EMBED_LABELS,
|
|
16
|
+
oe as DEFAULT_MARKDOWN_STYLE,
|
|
17
|
+
Ee as DEFAULT_MARKDOWN_STYLES,
|
|
18
18
|
A as DEFAULT_MARKDOWN_VIEWER_LABELS,
|
|
19
19
|
t as DEFAULT_MERMAID_DIAGRAM_LABELS,
|
|
20
20
|
N as DEFAULT_MERMAID_INTERACTION,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
_ as DEFAULT_SVG_IMAGE_LABELS,
|
|
22
|
+
n as DeleteNode,
|
|
23
|
+
T as EmphasisNode,
|
|
24
24
|
d as FootnoteBackLinkNode,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
D as FootnoteReferenceNode,
|
|
26
|
+
S as FootnotesSection,
|
|
27
|
+
M as HeadingNode,
|
|
28
|
+
C as HostedScrollArea,
|
|
29
|
+
m as ImageNode,
|
|
30
30
|
O as InlineCodeNode,
|
|
31
31
|
i as LinkNode,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
B as
|
|
32
|
+
R as ListItemNode,
|
|
33
|
+
k as ListNode,
|
|
34
|
+
B as MERMAID_DRAWABLE_TYPES,
|
|
35
|
+
I as MarkdownRenderer,
|
|
35
36
|
F as MarkdownViewer,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
l as MermaidDiagram,
|
|
38
|
+
U as NodesRenderer,
|
|
39
|
+
c as ParagraphNode,
|
|
40
|
+
v as SPREADSHEET_BLOCK_LABEL_CATALOGS,
|
|
41
|
+
y as SPREADSHEET_BLOCK_LABEL_PLACEHOLDERS,
|
|
41
42
|
g as SpreadsheetBlock,
|
|
42
43
|
H as StrongNode,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
x as
|
|
44
|
+
K as TableNode,
|
|
45
|
+
P as TableOfContents,
|
|
46
|
+
p as TextNode,
|
|
47
|
+
G as ThematicBreakNode,
|
|
48
|
+
f as ZennDetailsNode,
|
|
49
|
+
h as ZennMessageNode,
|
|
50
|
+
w as createMermaidDrawer,
|
|
51
|
+
x as extractHeadings,
|
|
52
|
+
W as remarkCustomHeadingId,
|
|
51
53
|
u as remarkFootnoteBackLink,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
b as remarkHtmlAnchorToLink,
|
|
55
|
+
Y as remarkHtmlInHtml,
|
|
56
|
+
Z as remarkImageSize,
|
|
57
|
+
V as remarkParentNode,
|
|
58
|
+
q as remarkZennMessage,
|
|
59
|
+
re as toContentAlign,
|
|
60
|
+
Le as toContentColors,
|
|
61
|
+
Ae as toContentMeasure,
|
|
62
|
+
z as useMarkdownToolbarState
|
|
61
63
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
`frame.js` next to this file (`@aiquants/markdown/mermaid-frame`) bundles the drawing place's script of this package with Mermaid. It contains code of the following npm packages.
|
|
4
4
|
|
|
5
|
-
## @aiquants/markdown 13.
|
|
5
|
+
## @aiquants/markdown 13.1.0
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
8
|
MIT License
|
|
@@ -7,7 +7,23 @@ export interface CssToken {
|
|
|
7
7
|
}
|
|
8
8
|
export declare function tokenizeCss(text: string): readonly CssToken[];
|
|
9
9
|
export type DeclarationTarget = "root" | "inside";
|
|
10
|
+
export declare const URL_REFERENCE_NAMES: ReadonlySet<string>;
|
|
10
11
|
export declare const FRAGMENT_REFERENCE: RegExp;
|
|
11
12
|
export declare function cleanStyleSheet(sheet: string, svgId: string, classPrefix: string): string | null;
|
|
12
13
|
export declare function cleanDeclarations(declarations: string, target: DeclarationTarget): string | null;
|
|
13
14
|
export declare function isCleanAttributeValue(name: string, value: string): boolean;
|
|
15
|
+
export interface CssDeclaration {
|
|
16
|
+
readonly property: string;
|
|
17
|
+
readonly value: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function readDeclarations(declarations: string): readonly CssDeclaration[];
|
|
20
|
+
export declare function readStyleSheetDeclarations(sheet: string): readonly CssDeclaration[];
|
|
21
|
+
export declare function withoutDeclarations(declarations: string, properties: ReadonlySet<string>): string | null;
|
|
22
|
+
export interface IdRenaming {
|
|
23
|
+
readonly prefix: string;
|
|
24
|
+
readonly ids: ReadonlySet<string>;
|
|
25
|
+
}
|
|
26
|
+
export declare const namesHeldId: (reference: string, renaming: IdRenaming) => boolean;
|
|
27
|
+
export declare function renameStyleSheetIds(sheet: string, renaming: IdRenaming): string | null;
|
|
28
|
+
export declare function renameDeclarationIds(declarations: string, renaming: IdRenaming): string | null;
|
|
29
|
+
export declare function renameAttributeValueIds(value: string, renaming: IdRenaming): string | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type DiagramScheme = "light" | "dark";
|
|
2
|
+
export type DiagramSurfaceRole = "primary" | "secondary" | "tertiary" | "note";
|
|
3
|
+
export type DiagramPalette = {
|
|
4
|
+
readonly ground: string;
|
|
5
|
+
readonly text: string;
|
|
6
|
+
readonly surface: Readonly<Record<DiagramSurfaceRole, string>>;
|
|
7
|
+
readonly line: string;
|
|
8
|
+
readonly series: readonly [
|
|
9
|
+
string,
|
|
10
|
+
string,
|
|
11
|
+
string,
|
|
12
|
+
string,
|
|
13
|
+
string,
|
|
14
|
+
string,
|
|
15
|
+
string,
|
|
16
|
+
string,
|
|
17
|
+
string,
|
|
18
|
+
string,
|
|
19
|
+
string,
|
|
20
|
+
string
|
|
21
|
+
];
|
|
22
|
+
readonly seriesText: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const DIAGRAM_PALETTES: Readonly<Record<DiagramScheme, DiagramPalette>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MermaidConfig } from "mermaid";
|
|
2
|
+
import { DiagramPalette, DiagramScheme } from "./diagramPalette.ts";
|
|
3
|
+
export type DiagramThemeVariables = Readonly<Record<string, string | boolean | Readonly<Record<string, string>>>>;
|
|
4
|
+
export type DiagramAppearance = Required<Pick<MermaidConfig, "theme" | "themeVariables" | "c4" | "journey" | "sankey" | "xyChart">>;
|
|
5
|
+
export declare const diagramThemeVariables: (palette: DiagramPalette, darkMode: boolean) => DiagramThemeVariables;
|
|
6
|
+
export declare const diagramC4Colours: (palette: DiagramPalette) => NonNullable<MermaidConfig["c4"]>;
|
|
7
|
+
export declare const diagramAppearance: (scheme: DiagramScheme) => DiagramAppearance;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MermaidFrameFailure } from "./protocol.ts";
|
|
1
|
+
import { MermaidDrawForm, MermaidFrameFailure } from "./protocol.ts";
|
|
2
2
|
export interface MermaidDrawerSetup {
|
|
3
3
|
readonly frameScriptUrl: string | URL;
|
|
4
4
|
readonly fontStylesheetUrls: readonly (string | URL)[];
|
|
@@ -6,6 +6,7 @@ export interface MermaidDrawerSetup {
|
|
|
6
6
|
export interface MermaidDrawRequest {
|
|
7
7
|
readonly source: string;
|
|
8
8
|
readonly theme: "light" | "dark";
|
|
9
|
+
readonly form: MermaidDrawForm;
|
|
9
10
|
readonly width: number;
|
|
10
11
|
readonly fontFamily: string;
|
|
11
12
|
readonly lang: string;
|
|
@@ -17,10 +18,17 @@ export interface DrawnMermaidDiagram {
|
|
|
17
18
|
readonly length: number;
|
|
18
19
|
readonly [DRAWN_MERMAID_DIAGRAM]: true;
|
|
19
20
|
}
|
|
21
|
+
export type MermaidNotExportableReason = "html-label" | "unsized" | "unlike-text";
|
|
22
|
+
export declare const MERMAID_NOT_EXPORTABLE_REASONS: readonly MermaidNotExportableReason[];
|
|
23
|
+
export type MermaidDrawFailure = MermaidFrameFailure | {
|
|
24
|
+
readonly kind: "not-exportable";
|
|
25
|
+
readonly reason: MermaidNotExportableReason;
|
|
26
|
+
readonly message: string;
|
|
27
|
+
};
|
|
20
28
|
export type MermaidDrawResult = {
|
|
21
29
|
readonly diagram: DrawnMermaidDiagram;
|
|
22
30
|
} | {
|
|
23
|
-
readonly failure:
|
|
31
|
+
readonly failure: MermaidDrawFailure;
|
|
24
32
|
};
|
|
25
33
|
export type MermaidDrawer = (request: MermaidDrawRequest) => Promise<MermaidDrawResult>;
|
|
26
34
|
export declare const FRAME_NOT_LISTENING_MESSAGE = "the drawing place's script did not load, or threw before it listened";
|
|
@@ -28,7 +36,12 @@ export declare const FRAME_RELOADED_MESSAGE = "the drawing place's frame loaded
|
|
|
28
36
|
export declare const FRAME_REMOVED_MESSAGE = "the drawing place's frame left the page, and the diagrams it held were lost";
|
|
29
37
|
export declare const NO_BODY_MESSAGE = "the page has no body to hold the drawing place's frame";
|
|
30
38
|
export declare const UNCLEAN_ANSWER_MESSAGE = "the drawing place answered with something other than one svg of the requested id";
|
|
39
|
+
export declare const OFF_PALETTE_ANSWER_MESSAGE = "the drawing place answered with a paint off the diagram palette";
|
|
31
40
|
export declare const MALFORMED_ANSWER_MESSAGE = "the drawing place answered in a shape the page does not read";
|
|
41
|
+
export declare const HTML_LABEL_EXPORT_MESSAGE = "the drawing holds a foreignObject, a label drawn as HTML, which not every reader of an image file draws";
|
|
42
|
+
export declare const UNSIZED_EXPORT_MESSAGE = "the drawing has no viewBox of a positive width and height to take its size from";
|
|
43
|
+
export declare const UNLIKE_TEXT_EXPORT_MESSAGE = "the drawing's text, white space aside, differs from that of the shown drawing, as when a label holds HTML or an icon the export form writes out as characters";
|
|
44
|
+
export declare const drawingCharactersOf: (root: Element) => string;
|
|
32
45
|
export declare const cleanedSvgOf: (value: unknown) => SVGSVGElement | undefined;
|
|
33
46
|
export declare function createMermaidDrawer(setup: MermaidDrawerSetup): MermaidDrawer;
|
|
34
47
|
export {};
|