pict-docuserve 0.0.7 → 0.0.10
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/css/docuserve.css +6 -6
- package/dist/css/docuserve.css +6 -6
- package/dist/index.html +4 -4
- package/dist/pict-docuserve.js +102 -23
- 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 +4 -4
- package/package.json +4 -2
- package/source/cli/Docuserve-CLI-Program.js +2 -1
- package/source/cli/commands/Docuserve-Command-Inject.js +7 -22
- package/source/cli/commands/Docuserve-Command-PrepareLocal.js +146 -0
- package/source/providers/Pict-Provider-Docuserve-Documentation.js +157 -14
- package/source/views/PictView-Docuserve-Content.js +29 -29
- package/source/views/PictView-Docuserve-Search.js +11 -11
- package/source/views/PictView-Docuserve-Sidebar.js +33 -32
- package/source/views/PictView-Docuserve-Splash.js +38 -16
- package/source/views/PictView-Docuserve-TopBar.js +10 -10
package/css/docuserve.css
CHANGED
|
@@ -13,7 +13,7 @@ html, body {
|
|
|
13
13
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
14
14
|
font-size: 16px;
|
|
15
15
|
line-height: 1.5;
|
|
16
|
-
color: #
|
|
16
|
+
color: #423D37;
|
|
17
17
|
background-color: #fff;
|
|
18
18
|
-webkit-font-smoothing: antialiased;
|
|
19
19
|
-moz-osx-font-smoothing: grayscale;
|
|
@@ -26,12 +26,12 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
a {
|
|
29
|
-
color: #
|
|
29
|
+
color: #2E7D74;
|
|
30
30
|
text-decoration: none;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
a:hover {
|
|
34
|
-
color: #
|
|
34
|
+
color: #256861;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/* Application container */
|
|
@@ -45,16 +45,16 @@ a:hover {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
::-webkit-scrollbar-track {
|
|
48
|
-
background: #
|
|
48
|
+
background: #F5F0E8;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
::-webkit-scrollbar-thumb {
|
|
52
|
-
background: #
|
|
52
|
+
background: #D4CCBE;
|
|
53
53
|
border-radius: 4px;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
::-webkit-scrollbar-thumb:hover {
|
|
57
|
-
background: #
|
|
57
|
+
background: #B5AA9A;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/* Responsive adjustments */
|
package/dist/css/docuserve.css
CHANGED
|
@@ -13,7 +13,7 @@ html, body {
|
|
|
13
13
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
14
14
|
font-size: 16px;
|
|
15
15
|
line-height: 1.5;
|
|
16
|
-
color: #
|
|
16
|
+
color: #423D37;
|
|
17
17
|
background-color: #fff;
|
|
18
18
|
-webkit-font-smoothing: antialiased;
|
|
19
19
|
-moz-osx-font-smoothing: grayscale;
|
|
@@ -26,12 +26,12 @@ h1, h2, h3, h4, h5, h6 {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
a {
|
|
29
|
-
color: #
|
|
29
|
+
color: #2E7D74;
|
|
30
30
|
text-decoration: none;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
a:hover {
|
|
34
|
-
color: #
|
|
34
|
+
color: #256861;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/* Application container */
|
|
@@ -45,16 +45,16 @@ a:hover {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
::-webkit-scrollbar-track {
|
|
48
|
-
background: #
|
|
48
|
+
background: #F5F0E8;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
::-webkit-scrollbar-thumb {
|
|
52
|
-
background: #
|
|
52
|
+
background: #D4CCBE;
|
|
53
53
|
border-radius: 4px;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
::-webkit-scrollbar-thumb:hover {
|
|
57
|
-
background: #
|
|
57
|
+
background: #B5AA9A;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/* Responsive adjustments */
|
package/dist/index.html
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
<!-- PICT Dynamic View CSS Container -->
|
|
16
16
|
<style id="PICT-CSS"></style>
|
|
17
17
|
|
|
18
|
-
<!-- Load the PICT library -->
|
|
19
|
-
<script src="
|
|
18
|
+
<!-- Load the PICT library from jsDelivr CDN -->
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/pict@1/dist/pict.min.js" type="text/javascript"></script>
|
|
20
20
|
<!-- Bootstrap the Application -->
|
|
21
21
|
<script type="text/javascript">
|
|
22
22
|
//<![CDATA[
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<script>mermaid.initialize({ startOnLoad: false, theme: 'default' });</script>
|
|
34
34
|
<!-- KaTeX for LaTeX equation rendering -->
|
|
35
35
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.21/dist/katex.min.js"></script>
|
|
36
|
-
<!-- Load the Docuserve PICT Application Bundle -->
|
|
37
|
-
<script src="
|
|
36
|
+
<!-- Load the Docuserve PICT Application Bundle from jsDelivr CDN -->
|
|
37
|
+
<script src="https://cdn.jsdelivr.net/npm/pict-docuserve@0/dist/pict-docuserve.min.js" type="text/javascript"></script>
|
|
38
38
|
</body>
|
|
39
39
|
</html>
|
package/dist/pict-docuserve.js
CHANGED
|
@@ -6372,9 +6372,32 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
6372
6372
|
loadCatalog(fCallback) {
|
|
6373
6373
|
let tmpCallback = typeof fCallback === 'function' ? fCallback : () => {};
|
|
6374
6374
|
let tmpCatalogURL = this.pict.AppData.Docuserve.CatalogURL || 'retold-catalog.json';
|
|
6375
|
+
let tmpLoadOptionalFiles = () => {
|
|
6376
|
+
// Load cover.md, _sidebar.md, _topbar.md, errorpage.md and keyword index in parallel.
|
|
6377
|
+
// When all are done, if we still have no sidebar data, try to auto-discover
|
|
6378
|
+
// a README.md so the site works with plain markdown folders.
|
|
6379
|
+
let tmpPending = 5;
|
|
6380
|
+
let tmpFinish = () => {
|
|
6381
|
+
tmpPending--;
|
|
6382
|
+
if (tmpPending <= 0) {
|
|
6383
|
+
// If no sidebar data was populated by catalog or _sidebar.md,
|
|
6384
|
+
// try to auto-discover a README.md to provide minimal navigation.
|
|
6385
|
+
if (!this.pict.AppData.Docuserve.SidebarGroups || this.pict.AppData.Docuserve.SidebarGroups.length < 1) {
|
|
6386
|
+
this.autoDiscoverSidebar(tmpCallback);
|
|
6387
|
+
} else {
|
|
6388
|
+
return tmpCallback();
|
|
6389
|
+
}
|
|
6390
|
+
}
|
|
6391
|
+
};
|
|
6392
|
+
this.loadCover(tmpFinish);
|
|
6393
|
+
this.loadSidebar(tmpFinish);
|
|
6394
|
+
this.loadTopbar(tmpFinish);
|
|
6395
|
+
this.loadErrorPage(tmpFinish);
|
|
6396
|
+
this.loadKeywordIndex(tmpFinish);
|
|
6397
|
+
};
|
|
6375
6398
|
fetch(tmpCatalogURL).then(pResponse => {
|
|
6376
6399
|
if (!pResponse.ok) {
|
|
6377
|
-
this.log.
|
|
6400
|
+
this.log.info("Docuserve: No catalog at [".concat(tmpCatalogURL, "]; running in standalone mode."));
|
|
6378
6401
|
return null;
|
|
6379
6402
|
}
|
|
6380
6403
|
return pResponse.json();
|
|
@@ -6387,22 +6410,64 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
6387
6410
|
// Build sidebar navigation data from the catalog as default
|
|
6388
6411
|
this.buildSidebarData(pCatalog);
|
|
6389
6412
|
}
|
|
6413
|
+
tmpLoadOptionalFiles();
|
|
6414
|
+
}).catch(pError => {
|
|
6415
|
+
this.log.info("Docuserve: Catalog load error (".concat(pError, "); continuing in standalone mode."));
|
|
6416
|
+
tmpLoadOptionalFiles();
|
|
6417
|
+
});
|
|
6418
|
+
}
|
|
6390
6419
|
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6420
|
+
/**
|
|
6421
|
+
* Auto-discover sidebar content when no catalog or _sidebar.md is available.
|
|
6422
|
+
*
|
|
6423
|
+
* Attempts to fetch README.md from the docs root. If found, creates a
|
|
6424
|
+
* minimal sidebar with a single "Docs" group containing a README entry.
|
|
6425
|
+
* This lets pict-docuserve work with nothing but a folder of markdown.
|
|
6426
|
+
*
|
|
6427
|
+
* @param {Function} fCallback - Callback when done
|
|
6428
|
+
*/
|
|
6429
|
+
autoDiscoverSidebar(fCallback) {
|
|
6430
|
+
let tmpCallback = typeof fCallback === 'function' ? fCallback : () => {};
|
|
6431
|
+
let tmpDocsBase = this.pict.AppData.Docuserve.DocsBaseURL || '';
|
|
6432
|
+
fetch(tmpDocsBase + 'README.md').then(pResponse => {
|
|
6433
|
+
if (!pResponse.ok) {
|
|
6434
|
+
return null;
|
|
6435
|
+
}
|
|
6436
|
+
return pResponse.text();
|
|
6437
|
+
}).then(pMarkdown => {
|
|
6438
|
+
if (pMarkdown) {
|
|
6439
|
+
// Extract a title from the first heading in the README
|
|
6440
|
+
let tmpTitleMatch = pMarkdown.match(/^#+\s+(.+)/m);
|
|
6441
|
+
let tmpTitle = tmpTitleMatch ? tmpTitleMatch[1].trim() : 'Docs';
|
|
6442
|
+
|
|
6443
|
+
// Build a minimal sidebar group so the sidebar has something to show
|
|
6444
|
+
this.pict.AppData.Docuserve.SidebarGroups = [{
|
|
6445
|
+
Name: tmpTitle,
|
|
6446
|
+
Key: 'docs',
|
|
6447
|
+
Route: '#/page/README',
|
|
6448
|
+
Modules: []
|
|
6449
|
+
}];
|
|
6450
|
+
|
|
6451
|
+
// Also set this as a fallback cover title if we have no cover
|
|
6452
|
+
if (!this.pict.AppData.Docuserve.CoverLoaded) {
|
|
6453
|
+
this.pict.AppData.Docuserve.Cover = {
|
|
6454
|
+
Title: tmpTitle,
|
|
6455
|
+
Tagline: '',
|
|
6456
|
+
Description: '',
|
|
6457
|
+
Highlights: [],
|
|
6458
|
+
Actions: [{
|
|
6459
|
+
Text: 'Read the Docs',
|
|
6460
|
+
Href: 'README.md'
|
|
6461
|
+
}]
|
|
6462
|
+
};
|
|
6463
|
+
this.pict.AppData.Docuserve.CoverLoaded = true;
|
|
6397
6464
|
}
|
|
6398
|
-
}
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
this.loadErrorPage(tmpFinish);
|
|
6403
|
-
this.loadKeywordIndex(tmpFinish);
|
|
6465
|
+
} else {
|
|
6466
|
+
this.log.info('Docuserve: No README.md found; sidebar will be empty.');
|
|
6467
|
+
}
|
|
6468
|
+
return tmpCallback();
|
|
6404
6469
|
}).catch(pError => {
|
|
6405
|
-
this.log.
|
|
6470
|
+
this.log.info("Docuserve: README.md discovery failed (".concat(pError, ")."));
|
|
6406
6471
|
return tmpCallback();
|
|
6407
6472
|
});
|
|
6408
6473
|
}
|
|
@@ -7520,7 +7585,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7520
7585
|
DefaultRenderable: "Docuserve-Content-Display",
|
|
7521
7586
|
DefaultDestinationAddress: "#Docuserve-Content-Container",
|
|
7522
7587
|
AutoRender: false,
|
|
7523
|
-
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: #
|
|
7588
|
+
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: #8A7F72;\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: #3D3229;\n\t\t\tborder-bottom: 1px solid #DDD6CA;\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: #3D3229;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\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: #3D3229;\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: #5E5549;\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: #423D37;\n\t\t\tmargin: 0.75em 0;\n\t\t}\n\t\t.docuserve-content a {\n\t\t\tcolor: #2E7D74;\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: #3D3229;\n\t\t\tcolor: #E8E0D4;\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: #F0ECE4;\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: #9E6B47;\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 #2E7D74;\n\t\t\tmargin: 1em 0;\n\t\t\tpadding: 0.5em 1em;\n\t\t\tbackground: #F7F5F0;\n\t\t\tcolor: #5E5549;\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: #423D37;\n\t\t}\n\t\t.docuserve-content hr {\n\t\t\tborder: none;\n\t\t\tborder-top: 1px solid #DDD6CA;\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: #F5F0E8;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.6em 0.8em;\n\t\t\ttext-align: left;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.docuserve-content table td {\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tpadding: 0.5em 0.8em;\n\t\t\tcolor: #423D37;\n\t\t}\n\t\t.docuserve-content table tr:nth-child(even) {\n\t\t\tbackground: #F7F5F0;\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: #3D3229;\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: #5E5549;\n\t\t}\n\t\t.docuserve-not-found h2 {\n\t\t\tcolor: #8A7F72;\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: #F0ECE4;\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: #9E6B47;\n\t\t}\n\t",
|
|
7524
7589
|
Templates: [{
|
|
7525
7590
|
Hash: "Docuserve-Content-Template",
|
|
7526
7591
|
Template: /*html*/"\n<div class=\"docuserve-content\" id=\"Docuserve-Content-Body\">\n\t<div class=\"docuserve-content-loading\">Loading documentation...</div>\n</div>\n"
|
|
@@ -7700,7 +7765,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7700
7765
|
DefaultRenderable: "Docuserve-Search-Display",
|
|
7701
7766
|
DefaultDestinationAddress: "#Docuserve-Content-Container",
|
|
7702
7767
|
AutoRender: false,
|
|
7703
|
-
CSS: /*css*/"\n\t\t.docuserve-search {\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-search-header {\n\t\t\tmargin-bottom: 1.5em;\n\t\t}\n\t\t.docuserve-search-header h1 {\n\t\t\tfont-size: 1.75em;\n\t\t\tcolor: #
|
|
7768
|
+
CSS: /*css*/"\n\t\t.docuserve-search {\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-search-header {\n\t\t\tmargin-bottom: 1.5em;\n\t\t}\n\t\t.docuserve-search-header h1 {\n\t\t\tfont-size: 1.75em;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin: 0 0 0.75em 0;\n\t\t}\n\t\t.docuserve-search-input {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0.75em 1em;\n\t\t\tfont-size: 1.1em;\n\t\t\tborder: 2px solid #D4CCBE;\n\t\t\tborder-radius: 6px;\n\t\t\toutline: none;\n\t\t\tbox-sizing: border-box;\n\t\t\ttransition: border-color 0.15s;\n\t\t}\n\t\t.docuserve-search-input:focus {\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.docuserve-search-status {\n\t\t\tmargin-top: 0.75em;\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #8A7F72;\n\t\t}\n\t\t.docuserve-search-results {\n\t\t\tmargin-top: 1em;\n\t\t}\n\t\t.docuserve-search-result {\n\t\t\tdisplay: block;\n\t\t\tpadding: 1em 1.25em;\n\t\t\tmargin-bottom: 0.5em;\n\t\t\tborder: 1px solid #EAE3D8;\n\t\t\tborder-radius: 6px;\n\t\t\ttext-decoration: none;\n\t\t\tcolor: inherit;\n\t\t\ttransition: border-color 0.15s, box-shadow 0.15s;\n\t\t}\n\t\t.docuserve-search-result:hover {\n\t\t\tborder-color: #2E7D74;\n\t\t\tbox-shadow: 0 2px 8px rgba(46, 125, 116, 0.1);\n\t\t}\n\t\t.docuserve-search-result-title {\n\t\t\tfont-size: 1.05em;\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #2E7D74;\n\t\t\tmargin-bottom: 0.25em;\n\t\t}\n\t\t.docuserve-search-result-breadcrumb {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #8A7F72;\n\t\t\tmargin-bottom: 0.2em;\n\t\t}\n\t\t.docuserve-search-result-path {\n\t\t\tfont-size: 0.8em;\n\t\t\tcolor: #A39889;\n\t\t\tfont-family: monospace;\n\t\t}\n\t\t.docuserve-search-empty {\n\t\t\ttext-align: center;\n\t\t\tpadding: 3em 1em;\n\t\t\tcolor: #8A7F72;\n\t\t\tfont-size: 1em;\n\t\t}\n\t",
|
|
7704
7769
|
Templates: [{
|
|
7705
7770
|
Hash: "Docuserve-Search-Template",
|
|
7706
7771
|
Template: /*html*/"\n<div class=\"docuserve-search\">\n\t<div class=\"docuserve-search-header\">\n\t\t<h1>Search Documentation</h1>\n\t\t<input type=\"text\" class=\"docuserve-search-input\" id=\"Docuserve-Search-Input\" placeholder=\"Search across all modules...\">\n\t\t<div id=\"Docuserve-Search-Status\" class=\"docuserve-search-status\"></div>\n\t</div>\n\t<div id=\"Docuserve-Search-Results\" class=\"docuserve-search-results\"></div>\n</div>\n"
|
|
@@ -7830,7 +7895,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7830
7895
|
DefaultRenderable: "Docuserve-Sidebar-Content",
|
|
7831
7896
|
DefaultDestinationAddress: "#Docuserve-Sidebar-Container",
|
|
7832
7897
|
AutoRender: false,
|
|
7833
|
-
CSS: /*css*/"\n\t\t.docuserve-sidebar {\n\t\t\tbackground-color: #
|
|
7898
|
+
CSS: /*css*/"\n\t\t.docuserve-sidebar {\n\t\t\tbackground-color: #F5F0E8;\n\t\t\tborder-right: 1px solid #DDD6CA;\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: #8A7F72;\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: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search {\n\t\t\tpadding: 0 1em 1em 1em;\n\t\t\tborder-bottom: 1px solid #EAE3D8;\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 #D4CCBE;\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: #2E7D74;\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: #423D37;\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: #EAE3D8;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search-result-title {\n\t\t\tfont-weight: 600;\n\t\t\tcolor: #3D3229;\n\t\t}\n\t\t.docuserve-sidebar-search-results a:hover .docuserve-sidebar-search-result-title {\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-search-result-meta {\n\t\t\tfont-size: 0.9em;\n\t\t\tcolor: #8A7F72;\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: #2E7D74;\n\t\t\ttext-decoration: none;\n\t\t\tfont-weight: 600;\n\t\t\tcursor: pointer;\n\t\t\tborder-top: 1px solid #EAE3D8;\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: #5E5549;\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: #2E7D74;\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: #5E5549;\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: #2E7D74;\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: #5E5549;\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: #EAE3D8;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t\t.docuserve-sidebar-modules a.active {\n\t\t\tcolor: #2E7D74;\n\t\t\tfont-weight: 600;\n\t\t\tbackground-color: #E0EDEB;\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: #A39889;\n\t\t\tfont-size: 0.85em;\n\t\t}\n\t\t.docuserve-sidebar-module-nav {\n\t\t\tborder-top: 1px solid #EAE3D8;\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: #8A7F72;\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: #5E5549;\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: #EAE3D8;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t",
|
|
7834
7899
|
Templates: [{
|
|
7835
7900
|
Hash: "Docuserve-Sidebar-Template",
|
|
7836
7901
|
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"
|
|
@@ -7875,7 +7940,8 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7875
7940
|
renderSidebarGroups() {
|
|
7876
7941
|
let tmpGroups = this.pict.AppData.Docuserve.SidebarGroups;
|
|
7877
7942
|
if (!tmpGroups || tmpGroups.length < 1) {
|
|
7878
|
-
|
|
7943
|
+
// Empty sidebar -- don't show a permanent loading message
|
|
7944
|
+
this.pict.ContentAssignment.assignContent('#Docuserve-Sidebar-Groups', '');
|
|
7879
7945
|
return;
|
|
7880
7946
|
}
|
|
7881
7947
|
let tmpHTML = '';
|
|
@@ -7974,7 +8040,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
7974
8040
|
let tmpDocProvider = this.pict.providers['Docuserve-Documentation'];
|
|
7975
8041
|
let tmpResults = tmpDocProvider.search(pQuery);
|
|
7976
8042
|
if (tmpResults.length === 0) {
|
|
7977
|
-
tmpResultsEl.innerHTML = '<div style="padding: 0.4em 0.5em; font-size: 0.82em; color: #
|
|
8043
|
+
tmpResultsEl.innerHTML = '<div style="padding: 0.4em 0.5em; font-size: 0.82em; color: #8A7F72;">No results found.</div>';
|
|
7978
8044
|
return;
|
|
7979
8045
|
}
|
|
7980
8046
|
let tmpMaxResults = 8;
|
|
@@ -8047,7 +8113,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
8047
8113
|
DefaultRenderable: "Docuserve-Splash-Content",
|
|
8048
8114
|
DefaultDestinationAddress: "#Docuserve-Content-Container",
|
|
8049
8115
|
AutoRender: false,
|
|
8050
|
-
CSS: /*css*/"\n\t\t.docuserve-splash {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: calc(100vh - 56px);\n\t\t\tpadding: 3em 2em;\n\t\t\ttext-align: center;\n\t\t\tbackground: linear-gradient(135deg, #
|
|
8116
|
+
CSS: /*css*/"\n\t\t.docuserve-splash {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmin-height: calc(100vh - 56px);\n\t\t\tpadding: 3em 2em;\n\t\t\ttext-align: center;\n\t\t\tbackground: linear-gradient(135deg, #F5F0E8 0%, #E4EFED 100%);\n\t\t}\n\t\t.docuserve-splash h1 {\n\t\t\tfont-size: 3em;\n\t\t\tfont-weight: 700;\n\t\t\tcolor: #3D3229;\n\t\t\tmargin: 0 0 0.25em 0;\n\t\t}\n\t\t.docuserve-splash-tagline {\n\t\t\tfont-size: 1.25em;\n\t\t\tcolor: #7A7568;\n\t\t\tmargin-bottom: 1.5em;\n\t\t\tfont-style: italic;\n\t\t}\n\t\t.docuserve-splash-description {\n\t\t\tfont-size: 1em;\n\t\t\tcolor: #5E5549;\n\t\t\tmax-width: 600px;\n\t\t\tline-height: 1.7;\n\t\t\tmargin-bottom: 2em;\n\t\t}\n\t\t.docuserve-splash-highlights {\n\t\t\tdisplay: grid;\n\t\t\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\t\t\tgap: 1.25em;\n\t\t\tmax-width: 900px;\n\t\t\twidth: 100%;\n\t\t\tmargin-bottom: 2.5em;\n\t\t}\n\t\t.docuserve-splash-highlight-card {\n\t\t\tbackground: #fff;\n\t\t\tborder: 1px solid #DDD6CA;\n\t\t\tborder-radius: 8px;\n\t\t\tpadding: 1.25em;\n\t\t\ttext-align: left;\n\t\t\ttransition: box-shadow 0.2s, border-color 0.2s;\n\t\t}\n\t\t.docuserve-splash-highlight-card:hover {\n\t\t\tbox-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n\t\t\tborder-color: #2E7D74;\n\t\t}\n\t\t.docuserve-splash-highlight-card h3 {\n\t\t\tmargin: 0 0 0.5em 0;\n\t\t\tcolor: #3D3229;\n\t\t\tfont-size: 1em;\n\t\t}\n\t\t.docuserve-splash-highlight-card p {\n\t\t\tmargin: 0;\n\t\t\tcolor: #7A7568;\n\t\t\tfont-size: 0.85em;\n\t\t\tline-height: 1.5;\n\t\t}\n\t\t.docuserve-splash-actions {\n\t\t\tdisplay: flex;\n\t\t\tgap: 1em;\n\t\t\tflex-wrap: wrap;\n\t\t\tjustify-content: center;\n\t\t}\n\t\t.docuserve-splash-actions a {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding: 0.7em 1.5em;\n\t\t\tborder-radius: 6px;\n\t\t\tfont-size: 0.95em;\n\t\t\tfont-weight: 600;\n\t\t\ttext-decoration: none;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-splash-actions .primary {\n\t\t\tbackground-color: #2E7D74;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-splash-actions .primary:hover {\n\t\t\tbackground-color: #256861;\n\t\t}\n\t\t.docuserve-splash-actions .secondary {\n\t\t\tbackground-color: #fff;\n\t\t\tcolor: #3D3229;\n\t\t\tborder: 2px solid #2E7D74;\n\t\t}\n\t\t.docuserve-splash-actions .secondary:hover {\n\t\t\tborder-color: #256861;\n\t\t\tcolor: #2E7D74;\n\t\t}\n\t",
|
|
8051
8117
|
Templates: [{
|
|
8052
8118
|
Hash: "Docuserve-Splash-Template",
|
|
8053
8119
|
Template: /*html*/"\n<div class=\"docuserve-splash\">\n\t<h1 id=\"Docuserve-Splash-Title\"></h1>\n\t<div class=\"docuserve-splash-tagline\" id=\"Docuserve-Splash-Tagline\"></div>\n\t<div class=\"docuserve-splash-description\" id=\"Docuserve-Splash-Description\"></div>\n\t<div class=\"docuserve-splash-highlights\" id=\"Docuserve-Splash-Highlights\"></div>\n\t<div class=\"docuserve-splash-actions\" id=\"Docuserve-Splash-Actions\"></div>\n</div>\n"
|
|
@@ -8123,8 +8189,21 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
8123
8189
|
* @param {Object} pDocuserve - The AppData.Docuserve state
|
|
8124
8190
|
*/
|
|
8125
8191
|
renderFromCatalog(pDocuserve) {
|
|
8126
|
-
|
|
8127
|
-
|
|
8192
|
+
// Derive the title from whatever data is available, falling back to the page title or 'Documentation'
|
|
8193
|
+
let tmpTitle = 'Documentation';
|
|
8194
|
+
let tmpTagline = '';
|
|
8195
|
+
if (pDocuserve.CatalogLoaded && pDocuserve.Catalog && pDocuserve.Catalog.Name) {
|
|
8196
|
+
tmpTitle = pDocuserve.Catalog.Name;
|
|
8197
|
+
} else if (pDocuserve.TopBarLoaded && pDocuserve.TopBar && pDocuserve.TopBar.Brand) {
|
|
8198
|
+
tmpTitle = pDocuserve.TopBar.Brand;
|
|
8199
|
+
} else if (typeof document !== 'undefined' && document.title) {
|
|
8200
|
+
tmpTitle = document.title;
|
|
8201
|
+
}
|
|
8202
|
+
if (pDocuserve.CatalogLoaded && pDocuserve.Catalog && pDocuserve.Catalog.Description) {
|
|
8203
|
+
tmpTagline = pDocuserve.Catalog.Description;
|
|
8204
|
+
}
|
|
8205
|
+
this.pict.ContentAssignment.assignContent('#Docuserve-Splash-Title', this.escapeHTML(tmpTitle));
|
|
8206
|
+
this.pict.ContentAssignment.assignContent('#Docuserve-Splash-Tagline', this.escapeHTML(tmpTagline));
|
|
8128
8207
|
this.pict.ContentAssignment.assignContent('#Docuserve-Splash-Description', '');
|
|
8129
8208
|
|
|
8130
8209
|
// Build highlight cards from catalog groups
|
|
@@ -8173,7 +8252,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
8173
8252
|
DefaultRenderable: "Docuserve-TopBar-Content",
|
|
8174
8253
|
DefaultDestinationAddress: "#Docuserve-TopBar-Container",
|
|
8175
8254
|
AutoRender: false,
|
|
8176
|
-
CSS: /*css*/"\n\t\t.docuserve-topbar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tbackground-color: #
|
|
8255
|
+
CSS: /*css*/"\n\t\t.docuserve-topbar {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: space-between;\n\t\t\tbackground-color: #3D3229;\n\t\t\tcolor: #E8E0D4;\n\t\t\tpadding: 0 1.5em;\n\t\t\theight: 56px;\n\t\t\tbox-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);\n\t\t\tposition: sticky;\n\t\t\ttop: 0;\n\t\t\tz-index: 100;\n\t\t}\n\t\t.docuserve-topbar-brand {\n\t\t\tfont-size: 1.25em;\n\t\t\tfont-weight: 600;\n\t\t\tletter-spacing: 0.02em;\n\t\t\tcolor: #E8E0D4;\n\t\t\ttext-decoration: none;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-topbar-brand:hover {\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-nav {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.25em;\n\t\t}\n\t\t.docuserve-topbar-nav a {\n\t\t\tcolor: #B5AA9A;\n\t\t\ttext-decoration: none;\n\t\t\tpadding: 0.5em 0.75em;\n\t\t\tborder-radius: 4px;\n\t\t\tfont-size: 0.9em;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.docuserve-topbar-nav a:hover {\n\t\t\tbackground-color: #524438;\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-links {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tgap: 0.5em;\n\t\t}\n\t\t.docuserve-topbar-links a {\n\t\t\tcolor: #8A7F72;\n\t\t\ttext-decoration: none;\n\t\t\tfont-size: 0.85em;\n\t\t\tpadding: 0.4em 0.6em;\n\t\t\tborder-radius: 4px;\n\t\t\ttransition: background-color 0.15s, color 0.15s;\n\t\t}\n\t\t.docuserve-topbar-links a:hover {\n\t\t\tbackground-color: #524438;\n\t\t\tcolor: #E8E0D4;\n\t\t}\n\t\t.docuserve-topbar-toggle {\n\t\t\tdisplay: none;\n\t\t\tbackground: none;\n\t\t\tborder: none;\n\t\t\tcolor: #B5AA9A;\n\t\t\tfont-size: 1.3em;\n\t\t\tcursor: pointer;\n\t\t\tpadding: 0.3em 0.5em;\n\t\t\tmargin-left: 0.5em;\n\t\t\tline-height: 1;\n\t\t}\n\t\t.docuserve-topbar-toggle:hover {\n\t\t\tcolor: #fff;\n\t\t}\n\t\t.docuserve-topbar-right {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\t",
|
|
8177
8256
|
Templates: [{
|
|
8178
8257
|
Hash: "Docuserve-TopBar-Template",
|
|
8179
8258
|
Template: /*html*/"\n<div class=\"docuserve-topbar\">\n\t<a id=\"Docuserve-TopBar-Brand\" class=\"docuserve-topbar-brand\" href=\"#/Home\"></a>\n\t<div id=\"Docuserve-TopBar-Nav\" class=\"docuserve-topbar-nav\"></div>\n\t<div class=\"docuserve-topbar-right\">\n\t\t<div id=\"Docuserve-TopBar-Links\" class=\"docuserve-topbar-links\"></div>\n\t\t<button id=\"Docuserve-TopBar-Toggle\" class=\"docuserve-topbar-toggle\" onclick=\"{~P~}.views['Docuserve-Sidebar'].toggleSidebar()\">☰</button>\n\t</div>\n</div>\n"
|