pict-docuserve 0.0.5 → 0.0.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.html +7 -0
- package/dist/pict-docuserve.js +140 -13
- package/dist/pict-docuserve.js.map +1 -1
- package/dist/pict-docuserve.min.js +12 -12
- package/dist/pict-docuserve.min.js.map +1 -1
- package/html/index.html +7 -0
- package/package.json +1 -1
- package/source/providers/Pict-Provider-Docuserve-Documentation.js +78 -10
- package/source/views/PictView-Docuserve-Content.js +102 -0
- package/source/views/PictView-Docuserve-Sidebar.js +9 -4
package/dist/index.html
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
<!-- Application Stylesheet -->
|
|
12
12
|
<link href="css/docuserve.css" rel="stylesheet">
|
|
13
|
+
<!-- KaTeX stylesheet for LaTeX equation rendering -->
|
|
14
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.css">
|
|
13
15
|
<!-- PICT Dynamic View CSS Container -->
|
|
14
16
|
<style id="PICT-CSS"></style>
|
|
15
17
|
|
|
@@ -26,6 +28,11 @@
|
|
|
26
28
|
<!-- The root container for the Pict application -->
|
|
27
29
|
<div id="Docuserve-Application-Container"></div>
|
|
28
30
|
|
|
31
|
+
<!-- Mermaid diagram rendering -->
|
|
32
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js"></script>
|
|
33
|
+
<script>mermaid.initialize({ startOnLoad: false, theme: 'default' });</script>
|
|
34
|
+
<!-- KaTeX for LaTeX equation rendering -->
|
|
35
|
+
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.js"></script>
|
|
29
36
|
<!-- Load the Docuserve PICT Application Bundle -->
|
|
30
37
|
<script src="./pict-docuserve.min.js" type="text/javascript"></script>
|
|
31
38
|
</body>
|
package/dist/pict-docuserve.js
CHANGED
|
@@ -7138,23 +7138,69 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7138
7138
|
let tmpLines = pMarkdown.split('\n');
|
|
7139
7139
|
let tmpHTML = [];
|
|
7140
7140
|
let tmpInCodeBlock = false;
|
|
7141
|
+
let tmpCodeFenceLength = 0;
|
|
7141
7142
|
let tmpCodeLang = '';
|
|
7142
7143
|
let tmpCodeLines = [];
|
|
7143
7144
|
let tmpInList = false;
|
|
7144
7145
|
let tmpListType = '';
|
|
7145
7146
|
let tmpInBlockquote = false;
|
|
7146
7147
|
let tmpBlockquoteLines = [];
|
|
7148
|
+
let tmpInMathBlock = false;
|
|
7149
|
+
let tmpMathLines = [];
|
|
7147
7150
|
for (let i = 0; i < tmpLines.length; i++) {
|
|
7148
7151
|
let tmpLine = tmpLines[i];
|
|
7149
7152
|
|
|
7150
|
-
//
|
|
7151
|
-
if (tmpLine.match(
|
|
7153
|
+
// Display math blocks ($$...$$) — skip if inside a code block
|
|
7154
|
+
if (!tmpInCodeBlock && tmpLine.trim().match(/^\$\$/)) {
|
|
7155
|
+
if (tmpInMathBlock) {
|
|
7156
|
+
// End math block
|
|
7157
|
+
tmpHTML.push('<div class="docuserve-katex-display">' + tmpMathLines.join('\n') + '</div>');
|
|
7158
|
+
tmpInMathBlock = false;
|
|
7159
|
+
tmpMathLines = [];
|
|
7160
|
+
} else {
|
|
7161
|
+
// Close any open list or blockquote
|
|
7162
|
+
if (tmpInList) {
|
|
7163
|
+
tmpHTML.push(tmpListType === 'ul' ? '</ul>' : '</ol>');
|
|
7164
|
+
tmpInList = false;
|
|
7165
|
+
}
|
|
7166
|
+
if (tmpInBlockquote) {
|
|
7167
|
+
tmpHTML.push('<blockquote>' + this.parseMarkdown(tmpBlockquoteLines.join('\n')) + '</blockquote>');
|
|
7168
|
+
tmpInBlockquote = false;
|
|
7169
|
+
tmpBlockquoteLines = [];
|
|
7170
|
+
}
|
|
7171
|
+
tmpInMathBlock = true;
|
|
7172
|
+
}
|
|
7173
|
+
continue;
|
|
7174
|
+
}
|
|
7175
|
+
if (tmpInMathBlock) {
|
|
7176
|
+
tmpMathLines.push(tmpLine);
|
|
7177
|
+
continue;
|
|
7178
|
+
}
|
|
7179
|
+
|
|
7180
|
+
// Code blocks (fenced) — track fence length so ````x```` nests around ```y```
|
|
7181
|
+
let tmpFenceMatch = tmpLine.match(/^(`{3,})/);
|
|
7182
|
+
if (tmpFenceMatch) {
|
|
7183
|
+
let tmpFenceLen = tmpFenceMatch[1].length;
|
|
7152
7184
|
if (tmpInCodeBlock) {
|
|
7153
|
-
//
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7185
|
+
// Only close if the closing fence is at least as long as the opening
|
|
7186
|
+
if (tmpFenceLen >= tmpCodeFenceLength && tmpLine.trim() === tmpFenceMatch[1]) {
|
|
7187
|
+
// End code block
|
|
7188
|
+
if (tmpCodeLang === 'mermaid') {
|
|
7189
|
+
// Mermaid diagrams: output raw content for client-side rendering
|
|
7190
|
+
tmpHTML.push('<pre class="mermaid">' + tmpCodeLines.join('\n') + '</pre>');
|
|
7191
|
+
} else {
|
|
7192
|
+
tmpHTML.push('<pre><code class="language-' + this.escapeHTML(tmpCodeLang) + '">' + this.escapeHTML(tmpCodeLines.join('\n')) + '</code></pre>');
|
|
7193
|
+
}
|
|
7194
|
+
tmpInCodeBlock = false;
|
|
7195
|
+
tmpCodeFenceLength = 0;
|
|
7196
|
+
tmpCodeLang = '';
|
|
7197
|
+
tmpCodeLines = [];
|
|
7198
|
+
continue;
|
|
7199
|
+
} else {
|
|
7200
|
+
// Inner fence with fewer backticks — treat as content
|
|
7201
|
+
tmpCodeLines.push(tmpLine);
|
|
7202
|
+
continue;
|
|
7203
|
+
}
|
|
7158
7204
|
} else {
|
|
7159
7205
|
// Close any open list or blockquote
|
|
7160
7206
|
if (tmpInList) {
|
|
@@ -7166,11 +7212,12 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7166
7212
|
tmpInBlockquote = false;
|
|
7167
7213
|
tmpBlockquoteLines = [];
|
|
7168
7214
|
}
|
|
7169
|
-
// Start code block
|
|
7170
|
-
|
|
7215
|
+
// Start code block — record fence length
|
|
7216
|
+
tmpCodeFenceLength = tmpFenceLen;
|
|
7217
|
+
tmpCodeLang = tmpLine.replace(/^`{3,}/, '').trim();
|
|
7171
7218
|
tmpInCodeBlock = true;
|
|
7219
|
+
continue;
|
|
7172
7220
|
}
|
|
7173
|
-
continue;
|
|
7174
7221
|
}
|
|
7175
7222
|
if (tmpInCodeBlock) {
|
|
7176
7223
|
tmpCodeLines.push(tmpLine);
|
|
@@ -7333,6 +7380,12 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7333
7380
|
// Inline code (backticks) - handle first to avoid interfering with other patterns
|
|
7334
7381
|
tmpResult = tmpResult.replace(/`([^`]+)`/g, '<code>$1</code>');
|
|
7335
7382
|
|
|
7383
|
+
// Inline LaTeX equations ($...$) — must be processed before other inline patterns
|
|
7384
|
+
// Match single $ delimiters that aren't adjacent to spaces (to avoid false positives with currency)
|
|
7385
|
+
tmpResult = tmpResult.replace(/\$([^\$\s][^\$]*?[^\$\s])\$/g, '<span class="docuserve-katex-inline">$1</span>');
|
|
7386
|
+
// Also match single-character inline math like $x$
|
|
7387
|
+
tmpResult = tmpResult.replace(/\$([^\$\s])\$/g, '<span class="docuserve-katex-inline">$1</span>');
|
|
7388
|
+
|
|
7336
7389
|
// Images
|
|
7337
7390
|
tmpResult = tmpResult.replace(/!\[([^\]]*)\]\(([^)]+)\)/g, '<img src="$2" alt="$1">');
|
|
7338
7391
|
|
|
@@ -7414,7 +7467,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7414
7467
|
DefaultRenderable: "Docuserve-Content-Display",
|
|
7415
7468
|
DefaultDestinationAddress: "#Docuserve-Content-Container",
|
|
7416
7469
|
AutoRender: false,
|
|
7417
|
-
CSS: /*css*/"\n\t\t.docuserve-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.docuserve-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: #999;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.docuserve-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: #2c3e50;\n\t\t\tborder-bottom: 1px solid #eee;\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.docuserve-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: #2c3e50;\n\t\t\tborder-bottom: 1px solid #f0f0f0;\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.docuserve-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #333;\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.docuserve-content h4, .docuserve-content h5, .docuserve-content h6 {\n\t\t\tcolor: #555;\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.docuserve-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: #444;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.docuserve-content a {\n\t\t\tcolor: #42b983;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.docuserve-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-content pre {\n\t\t\tbackground: #2c3e50;\n\t\t\tcolor: #ecf0f1;\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.docuserve-content code {\n\t\t\tbackground: #f4f4f5;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #e74c3c;\n\t\t}\n\t\t.docuserve-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.docuserve-content blockquote {\n\t\t\tborder-left: 4px solid #42b983;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #f9f9f9;\n\t\t\tcolor: #666;\n\t\t}\n\t\t.docuserve-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.docuserve-content ul, .docuserve-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.docuserve-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: #444;\n\t\t}\n\t\t.docuserve-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #eee;\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.docuserve-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.docuserve-content table th {\n\t\t\tbackground: #f5f7fa;\n\t\t\tborder: 1px solid #e0e0e0;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #2c3e50;\n\t\t}\n\t\t.docuserve-content table td {\n\t\t\tborder: 1px solid #e0e0e0;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #444;\n\t\t}\n\t\t.docuserve-content table tr:nth-child(even) {\n\t\t\tbackground: #fafafa;\n\t\t}\n\t\t.docuserve-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.docuserve-not-found {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: #666;\n\t\t}\n\t\t.docuserve-not-found h2 {\n\t\t\tcolor: #999;\n\t\t\tfont-size: 1.5em;\n\t\t\tborder-bottom: none;\n\t\t}\n\t\t.docuserve-not-found code {\n\t\t\tbackground: #f4f4f5;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #e74c3c;\n\t\t}\n\t",
|
|
7470
|
+
CSS: /*css*/"\n\t\t.docuserve-content {\n\t\t\tpadding: 2em 3em;\n\t\t\tmax-width: 900px;\n\t\t\tmargin: 0 auto;\n\t\t}\n\t\t.docuserve-content-loading {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: 200px;\n\t\t\tcolor: #999;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.docuserve-content h1 {\n\t\t\tfont-size: 2em;\n\t\t\tcolor: #2c3e50;\n\t\t\tborder-bottom: 1px solid #eee;\n\t\t\tpadding-bottom: 0.3em;\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t.docuserve-content h2 {\n\t\t\tfont-size: 1.5em;\n\t\t\tcolor: #2c3e50;\n\t\t\tborder-bottom: 1px solid #f0f0f0;\n\t\t\tpadding-bottom: 0.25em;\n\t\t\tmargin-top: 1.5em;\n\t\t}\n\t\t.docuserve-content h3 {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #333;\n\t\t\tmargin-top: 1.25em;\n\t\t}\n\t\t.docuserve-content h4, .docuserve-content h5, .docuserve-content h6 {\n\t\t\tcolor: #555;\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.docuserve-content p {\n\t\t\tline-height: 1.7;\n\t\t\tcolor: #444;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.docuserve-content a {\n\t\t\tcolor: #42b983;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t.docuserve-content a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-content pre {\n\t\t\tbackground: #2c3e50;\n\t\t\tcolor: #ecf0f1;\n\t\t\tpadding: 1.25em;\n\t\t\tborder-radius: 6px;\n\t\t\toverflow-x: auto;\n\t\t\tline-height: 1.5;\n\t\t\tfont-size: 0.9em;\n\t\t}\n\t\t.docuserve-content code {\n\t\t\tbackground: #f4f4f5;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #e74c3c;\n\t\t}\n\t\t.docuserve-content pre code {\n\t\t\tbackground: none;\n\t\t\tpadding: 0;\n\t\t\tcolor: inherit;\n\t\t\tfont-size: inherit;\n\t\t}\n\t\t.docuserve-content blockquote {\n\t\t\tborder-left: 4px solid #42b983;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #f9f9f9;\n\t\t\tcolor: #666;\n\t\t}\n\t\t.docuserve-content blockquote p {\n\t\t\tmargin: 0.25em 0;\n\t\t}\n\t\t.docuserve-content ul, .docuserve-content ol {\n\t\t\tpadding-left: 2em;\n\t\t\tline-height: 1.8;\n\t\t}\n\t\t.docuserve-content li {\n\t\t\tmargin: 0.25em 0;\n\t\t\tcolor: #444;\n\t\t}\n\t\t.docuserve-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #eee;\n\t\t\tmargin: 2em 0;\n\t\t}\n\t\t.docuserve-content table {\n\t\t\twidth: 100%;\n\t\t\tborder-collapse: collapse;\n\t\t\tmargin: 1em 0;\n\t\t}\n\t\t.docuserve-content table th {\n\t\t\tbackground: #f5f7fa;\n\t\t\tborder: 1px solid #e0e0e0;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #2c3e50;\n\t\t}\n\t\t.docuserve-content table td {\n\t\t\tborder: 1px solid #e0e0e0;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #444;\n\t\t}\n\t\t.docuserve-content table tr:nth-child(even) {\n\t\t\tbackground: #fafafa;\n\t\t}\n\t\t.docuserve-content img {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\t\t.docuserve-content pre.mermaid {\n\t\t\tbackground: #fff;\n\t\t\tcolor: #333;\n\t\t\ttext-align: center;\n\t\t\tpadding: 1em;\n\t\t}\n\t\t.docuserve-content .docuserve-katex-display {\n\t\t\ttext-align: center;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em;\n\t\t\toverflow-x: auto;\n\t\t}\n\t\t.docuserve-content .docuserve-katex-inline {\n\t\t\tdisplay: inline;\n\t\t}\n\t\t.docuserve-not-found {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: #666;\n\t\t}\n\t\t.docuserve-not-found h2 {\n\t\t\tcolor: #999;\n\t\t\tfont-size: 1.5em;\n\t\t\tborder-bottom: none;\n\t\t}\n\t\t.docuserve-not-found code {\n\t\t\tbackground: #f4f4f5;\n\t\t\tpadding: 0.15em 0.4em;\n\t\t\tborder-radius: 3px;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #e74c3c;\n\t\t}\n\t",
|
|
7418
7471
|
Templates: [{
|
|
7419
7472
|
Hash: "Docuserve-Content-Template",
|
|
7420
7473
|
Template: /*html*/"\n<div class=\"docuserve-content\" id=\"Docuserve-Content-Body\">\n\t<div class=\"docuserve-content-loading\">Loading documentation...</div>\n</div>\n"
|
|
@@ -7444,6 +7497,80 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7444
7497
|
if (tmpContentContainer) {
|
|
7445
7498
|
tmpContentContainer.scrollTop = 0;
|
|
7446
7499
|
}
|
|
7500
|
+
|
|
7501
|
+
// Post-render: initialize Mermaid diagrams if mermaid is available
|
|
7502
|
+
this.renderMermaidDiagrams();
|
|
7503
|
+
|
|
7504
|
+
// Post-render: render KaTeX equations if katex is available
|
|
7505
|
+
this.renderKaTeXEquations();
|
|
7506
|
+
}
|
|
7507
|
+
|
|
7508
|
+
/**
|
|
7509
|
+
* Render any Mermaid diagram blocks in the content area.
|
|
7510
|
+
* Mermaid blocks are `<pre class="mermaid">` elements produced by parseMarkdown.
|
|
7511
|
+
*/
|
|
7512
|
+
renderMermaidDiagrams() {
|
|
7513
|
+
if (typeof mermaid === 'undefined') {
|
|
7514
|
+
return;
|
|
7515
|
+
}
|
|
7516
|
+
let tmpContentBody = document.getElementById('Docuserve-Content-Body');
|
|
7517
|
+
if (!tmpContentBody) {
|
|
7518
|
+
return;
|
|
7519
|
+
}
|
|
7520
|
+
let tmpMermaidElements = tmpContentBody.querySelectorAll('pre.mermaid');
|
|
7521
|
+
if (tmpMermaidElements.length < 1) {
|
|
7522
|
+
return;
|
|
7523
|
+
}
|
|
7524
|
+
|
|
7525
|
+
// mermaid.run() will process all pre.mermaid elements in the container
|
|
7526
|
+
try {
|
|
7527
|
+
mermaid.run({
|
|
7528
|
+
nodes: tmpMermaidElements
|
|
7529
|
+
});
|
|
7530
|
+
} catch (pError) {
|
|
7531
|
+
this.log.error('Mermaid rendering error: ' + pError.message);
|
|
7532
|
+
}
|
|
7533
|
+
}
|
|
7534
|
+
|
|
7535
|
+
/**
|
|
7536
|
+
* Render KaTeX inline and display math elements in the content area.
|
|
7537
|
+
* Inline: `<span class="docuserve-katex-inline">`
|
|
7538
|
+
* Display: `<div class="docuserve-katex-display">`
|
|
7539
|
+
*/
|
|
7540
|
+
renderKaTeXEquations() {
|
|
7541
|
+
if (typeof katex === 'undefined') {
|
|
7542
|
+
return;
|
|
7543
|
+
}
|
|
7544
|
+
let tmpContentBody = document.getElementById('Docuserve-Content-Body');
|
|
7545
|
+
if (!tmpContentBody) {
|
|
7546
|
+
return;
|
|
7547
|
+
}
|
|
7548
|
+
|
|
7549
|
+
// Render inline math
|
|
7550
|
+
let tmpInlineElements = tmpContentBody.querySelectorAll('.docuserve-katex-inline');
|
|
7551
|
+
for (let i = 0; i < tmpInlineElements.length; i++) {
|
|
7552
|
+
try {
|
|
7553
|
+
katex.render(tmpInlineElements[i].textContent, tmpInlineElements[i], {
|
|
7554
|
+
throwOnError: false,
|
|
7555
|
+
displayMode: false
|
|
7556
|
+
});
|
|
7557
|
+
} catch (pError) {
|
|
7558
|
+
this.log.warn('KaTeX inline error: ' + pError.message);
|
|
7559
|
+
}
|
|
7560
|
+
}
|
|
7561
|
+
|
|
7562
|
+
// Render display math
|
|
7563
|
+
let tmpDisplayElements = tmpContentBody.querySelectorAll('.docuserve-katex-display');
|
|
7564
|
+
for (let i = 0; i < tmpDisplayElements.length; i++) {
|
|
7565
|
+
try {
|
|
7566
|
+
katex.render(tmpDisplayElements[i].textContent, tmpDisplayElements[i], {
|
|
7567
|
+
throwOnError: false,
|
|
7568
|
+
displayMode: true
|
|
7569
|
+
});
|
|
7570
|
+
} catch (pError) {
|
|
7571
|
+
this.log.warn('KaTeX display error: ' + pError.message);
|
|
7572
|
+
}
|
|
7573
|
+
}
|
|
7447
7574
|
}
|
|
7448
7575
|
|
|
7449
7576
|
/**
|
|
@@ -7650,10 +7777,10 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7650
7777
|
DefaultRenderable: "Docuserve-Sidebar-Content",
|
|
7651
7778
|
DefaultDestinationAddress: "#Docuserve-Sidebar-Container",
|
|
7652
7779
|
AutoRender: false,
|
|
7653
|
-
CSS: /*css*/"\n\t\t.docuserve-sidebar {\n\t\t\tbackground-color: #f8f9fa;\n\t\t\tborder-right: 1px solid #e0e0e0;\n\t\t\tpadding: 1em 0;\n\t\t\theight: 100%;\n\t\t\tposition: relative;\n\t\t}\n\t\t.docuserve-sidebar-
|
|
7780
|
+
CSS: /*css*/"\n\t\t.docuserve-sidebar {\n\t\t\tbackground-color: #f8f9fa;\n\t\t\tborder-right: 1px solid #e0e0e0;\n\t\t\tpadding: 1em 0;\n\t\t\tpadding-top: 0;\n\t\t\theight: 100%;\n\t\t\tposition: relative;\n\t\t}\n\t\t.docuserve-sidebar-header {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: flex-end;\n\t\t\tpadding: 0.4em 0.5em 0;\n\t\t}\n\t\t.docuserve-sidebar-close {\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: #999;\n\t\t\tfont-size: 1.2em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.2em 0.4em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.docuserve-sidebar-close:hover {\n\t\t\tcolor: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-search {\n\t\t\tpadding: 0 1em 1em 1em;\n\t\t\tborder-bottom: 1px solid #e9ecef;\n\t\t\tmargin-bottom: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tborder: 1px solid #ddd;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.85em;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.docuserve-sidebar-search input:focus {\n\t\t\tborder-color: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-search-results {\n\t\t\tmargin-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-results a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tcolor: #444;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\tborder-radius: 3px;\n\t\t\ttransition: background-color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover {\n\t\t\tbackground-color: #e9ecef;\n\t\t\tcolor: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-search-result-title {\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #333;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover .docuserve-sidebar-search-result-title {\n\t\t\tcolor: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-search-result-meta {\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #999;\n\t\t}\n\t\t.docuserve-sidebar-search-all {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.4em 0.5em;\n\t\t\tfont-size: 0.82em;\n\t\t\tcolor: #42b983;\n\t\t\ttext-decoration: none;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t\tborder-top: 1px solid #e9ecef;\n\t\t\tmargin-top: 0.25em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-search-all:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t.docuserve-sidebar-home {\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t}\n\t\t.docuserve-sidebar-home a {\n\t\t\tcolor: #666;\n\t\t\ttext-decoration: none;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.docuserve-sidebar-home a:hover {\n\t\t\tcolor: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-group {\n\t\t\tmargin-top: 0.25em;\n\t\t}\n\t\t.docuserve-sidebar-group-title {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.5em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.85em;\n\t\t\tcolor: #666;\n\t\t\ttext-decoration: none;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.03em;\n\t\t\tcursor: pointer;\n\t\t\tuser-select: none;\n\t\t}\n\t\t.docuserve-sidebar-group-title:hover {\n\t\t\tcolor: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-modules {\n\t\t\tlist-style: none;\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules li {\n\t\t\tpadding: 0;\n\t\t}\n\t\t.docuserve-sidebar-modules a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: #555;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-modules a:hover {\n\t\t\tbackground-color: #e9ecef;\n\t\t\tcolor: #42b983;\n\t\t}\n\t\t.docuserve-sidebar-modules a.active {\n\t\t\tcolor: #42b983;\n\t\t\tfont-weight: 600;\n\t\t\tbackground-color: #e8f5e9;\n\t\t}\n\t\t.docuserve-sidebar-modules .no-docs {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.3em 1.25em 0.3em 2em;\n\t\t\tcolor: #bbb;\n\t\t\tfont-size: 0.85em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav {\n\t\t\tborder-top: 1px solid #e9ecef;\n\t\t\tmargin-top: 0.5em;\n\t\t\tpadding-top: 0.5em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav-section {\n\t\t\tpadding: 0.4em 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #888;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-spacing: 0.02em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a {\n\t\t\tdisplay: block;\n\t\t\tpadding: 0.25em 1.25em 0.25em 2.25em;\n\t\t\tcolor: #555;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.82em;\n\t\t\ttransition: background-color 0.1s, color 0.1s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-sidebar-module-nav a:hover {\n\t\t\tbackground-color: #e9ecef;\n\t\t\tcolor: #42b983;\n\t\t}\n\t",
|
|
7654
7781
|
Templates: [{
|
|
7655
7782
|
Hash: "Docuserve-Sidebar-Template",
|
|
7656
|
-
Template: /*html*/"\n<div class=\"docuserve-sidebar\">\n\t<button class=\"docuserve-sidebar-close\" onclick=\"{~P~}.views['Docuserve-Sidebar'].toggleSidebar()\">×</button>\n\t<div id=\"Docuserve-Sidebar-Search\" class=\"docuserve-sidebar-search\" style=\"display:none;\">\n\t\t<input type=\"text\" placeholder=\"Search docs...\" id=\"Docuserve-Sidebar-Search-Input\">\n\t\t<div id=\"Docuserve-Sidebar-Search-Results\" class=\"docuserve-sidebar-search-results\"></div>\n\t</div>\n\t<div class=\"docuserve-sidebar-home\">\n\t\t<a onclick=\"{~P~}.PictApplication.navigateTo('/Home')\">Home</a>\n\t</div>\n\t<div id=\"Docuserve-Sidebar-Groups\"></div>\n\t<div id=\"Docuserve-Sidebar-ModuleNav\"></div>\n</div>\n"
|
|
7783
|
+
Template: /*html*/"\n<div class=\"docuserve-sidebar\">\n\t<div class=\"docuserve-sidebar-header\">\n\t\t<button class=\"docuserve-sidebar-close\" onclick=\"{~P~}.views['Docuserve-Sidebar'].toggleSidebar()\">×</button>\n\t</div>\n\t<div id=\"Docuserve-Sidebar-Search\" class=\"docuserve-sidebar-search\" style=\"display:none;\">\n\t\t<input type=\"text\" placeholder=\"Search docs...\" id=\"Docuserve-Sidebar-Search-Input\">\n\t\t<div id=\"Docuserve-Sidebar-Search-Results\" class=\"docuserve-sidebar-search-results\"></div>\n\t</div>\n\t<div class=\"docuserve-sidebar-home\">\n\t\t<a onclick=\"{~P~}.PictApplication.navigateTo('/Home')\">Home</a>\n\t</div>\n\t<div id=\"Docuserve-Sidebar-Groups\"></div>\n\t<div id=\"Docuserve-Sidebar-ModuleNav\"></div>\n</div>\n"
|
|
7657
7784
|
}],
|
|
7658
7785
|
Renderables: [{
|
|
7659
7786
|
RenderableHash: "Docuserve-Sidebar-Content",
|