hdoc-tools 0.62.4 → 0.63.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.
Files changed (73) hide show
  1. package/editor/dist/assets/{index-BtxvGZHW.js → index-Dknn5g5A.js} +5 -4
  2. package/editor/dist/index.html +13 -13
  3. package/hdoc-build.js +5 -3
  4. package/hdoc-content-routes.js +136 -4
  5. package/hdoc-serve.js +26 -3
  6. package/hdoc-validate-interbook.js +8 -0
  7. package/hdoc-validate.js +92 -35
  8. package/package.json +1 -1
  9. package/ui/css/theme-default/styles/base.css +86 -21
  10. package/ui/css/theme-default/styles/components/api-doc.css +6 -3
  11. package/ui/css/theme-default/styles/components/content.css +140 -39
  12. package/ui/css/theme-default/styles/components/custom-block.css +1 -1
  13. package/ui/css/theme-default/styles/components/htl-doc.css +243 -64
  14. package/ui/css/theme-default/styles/components/htl-library.css +152 -0
  15. package/ui/css/theme-default/styles/components/htl-search.css +267 -0
  16. package/ui/css/theme-default/styles/components/sidebar.css +59 -16
  17. package/ui/css/theme-default/styles/fonts.css +17 -3
  18. package/ui/css/theme-default/styles/htldoc.layouts.css +756 -87
  19. package/ui/css/theme-default/styles/vars.css +40 -35
  20. package/ui/favicon.svg +64 -0
  21. package/ui/images/hornbill-logo-full-reversed.svg +92 -0
  22. package/ui/images/hornbill-logo-full.svg +92 -0
  23. package/ui/images/hug_library.jpg +0 -0
  24. package/ui/images/mcp-catalog.svg +9 -0
  25. package/ui/images/products/hornbill-square.svg +1 -0
  26. package/ui/index.html +1106 -342
  27. package/ui/js/bootstrap.js +89 -0
  28. package/ui/js/doc.hornbill.js +3156 -751
  29. package/ui/js/hb.vue.js +121 -0
  30. package/ui/js/highlightjs/highlight.pack.js +1513 -2
  31. package/ui/js/highlightjs/styles/vs2015-accessible.css +141 -0
  32. package/ui/js/highlightjs-badge.js +41 -58
  33. package/ui/js/mermaid.min.js +1447 -1295
  34. package/ui/js/webcomponents/hdocApprove.js +115 -0
  35. package/ui/js/highlightjs/styles/brown-paper.css +0 -64
  36. package/ui/js/highlightjs/styles/brown-papersq.png +0 -0
  37. package/ui/js/highlightjs/styles/codepen-embed.css +0 -60
  38. package/ui/js/highlightjs/styles/color-brewer.css +0 -71
  39. package/ui/js/highlightjs/styles/darcula.css +0 -77
  40. package/ui/js/highlightjs/styles/dark.css +0 -63
  41. package/ui/js/highlightjs/styles/darkula.css +0 -6
  42. package/ui/js/highlightjs/styles/default.css +0 -99
  43. package/ui/js/highlightjs/styles/dracula.css +0 -76
  44. package/ui/js/highlightjs/styles/far.css +0 -71
  45. package/ui/js/highlightjs/styles/foundation.css +0 -88
  46. package/ui/js/highlightjs/styles/github-gist.css +0 -71
  47. package/ui/js/highlightjs/styles/github-mm.css +0 -71
  48. package/ui/js/highlightjs/styles/github.css +0 -99
  49. package/ui/js/highlightjs/styles/googlecode.css +0 -89
  50. package/ui/js/highlightjs/styles/grayscale.css +0 -101
  51. package/ui/js/highlightjs/styles/idea.css +0 -97
  52. package/ui/js/highlightjs/styles/ir-black.css +0 -73
  53. package/ui/js/highlightjs/styles/kavadocs.css +0 -71
  54. package/ui/js/highlightjs/styles/kavadocsdark.css +0 -120
  55. package/ui/js/highlightjs/styles/kimbie.dark.css +0 -74
  56. package/ui/js/highlightjs/styles/kimbie.light.css +0 -74
  57. package/ui/js/highlightjs/styles/magula.css +0 -70
  58. package/ui/js/highlightjs/styles/mono-blue.css +0 -59
  59. package/ui/js/highlightjs/styles/monokai-sublime.css +0 -83
  60. package/ui/js/highlightjs/styles/monokai.css +0 -70
  61. package/ui/js/highlightjs/styles/obsidian.css +0 -88
  62. package/ui/js/highlightjs/styles/paraiso-dark.css +0 -72
  63. package/ui/js/highlightjs/styles/paraiso-light.css +0 -72
  64. package/ui/js/highlightjs/styles/railscasts.css +0 -106
  65. package/ui/js/highlightjs/styles/rainbow.css +0 -85
  66. package/ui/js/highlightjs/styles/solarized-dark.css +0 -84
  67. package/ui/js/highlightjs/styles/solarized-light.css +0 -84
  68. package/ui/js/highlightjs/styles/sunburst.css +0 -102
  69. package/ui/js/highlightjs/styles/twilight.css +0 -97
  70. package/ui/js/highlightjs/styles/vs.css +0 -68
  71. package/ui/js/highlightjs/styles/vs2015.css +0 -117
  72. package/ui/js/highlightjs/styles/xcode.css +0 -104
  73. package/ui/js/highlightjs/styles/zenburn.css +0 -80
@@ -0,0 +1,141 @@
1
+ /*
2
+ * Visual Studio 2015 dark style - WCAG AAA Accessible Version
3
+ * Based on original by Nicolas LLOBERA <nllobera@gmail.com>
4
+ * Modified for 7:1 contrast ratio (WCAG 2.1 AAA)
5
+ * Background overridden by htl-doc.css to #494949
6
+ */
7
+
8
+ .hljs {
9
+ display: block;
10
+ overflow-x: auto;
11
+ padding: 0.5em;
12
+ background: #494949;
13
+ color: #FFFFFF;
14
+ font-weight: normal;
15
+ --font-size: 1.15em !important;
16
+ }
17
+
18
+ /* Keywords, literals, symbols, names - bright blue for #494949 bg (7:1+) */
19
+ .hljs-keyword,
20
+ .hljs-literal,
21
+ .hljs-symbol,
22
+ .hljs-name {
23
+ color: #C0EDFF;
24
+ }
25
+
26
+ .hljs-link {
27
+ color: #A8E4FF;
28
+ text-decoration: underline;
29
+ }
30
+
31
+ /* Built-in types - bright teal */
32
+ .hljs-built_in,
33
+ .hljs-type {
34
+ color: #6EE7D6;
35
+ }
36
+
37
+ /* Markdown inline/fenced code spans.
38
+ Previously unstyled, so these tokens fell back to the base .hljs white and were
39
+ indistinguishable from surrounding prose in a markdown sample. Upstream vs2015 leaves
40
+ .hljs-code commented out, so there is no original colour to inherit.
41
+ #ABF1E7 is the teal above lightened until it clears 7:1 on BOTH code-block backgrounds
42
+ (#494949 in light mode, #000000 in dark - see .HTL-doc .hljs in htl-doc.css):
43
+ measured 7.06:1 on #494949 and 16.48:1 on #000000. It sits closest to .hljs-link's
44
+ #A8E4FF, which is acceptable because links are underlined and so stay distinguishable
45
+ without relying on colour. //-- SG */
46
+ .hljs-code {
47
+ color: #ABF1E7;
48
+ }
49
+
50
+ /* Numbers, classes - bright green */
51
+ .hljs-number,
52
+ .hljs-class {
53
+ color: #D4EEBC;
54
+ }
55
+
56
+ /* Strings - bright salmon (7:1+) */
57
+ .hljs-string,
58
+ .hljs-meta-string {
59
+ color: #FFE8DD;
60
+ }
61
+
62
+ /* Regexp, template tags - bright orange */
63
+ .hljs-regexp,
64
+ .hljs-template-tag {
65
+ color: #FFB88A;
66
+ }
67
+
68
+ /* Subst, function, title, params - white */
69
+ .hljs-subst,
70
+ .hljs-function,
71
+ .hljs-title,
72
+ .hljs-params,
73
+ .hljs-formula {
74
+ color: #FFFFFF;
75
+ }
76
+
77
+ /* Comments - bright green */
78
+ .hljs-comment,
79
+ .hljs-quote {
80
+ color: #98E088;
81
+ font-style: italic;
82
+ }
83
+
84
+ /* Doctag - bright green */
85
+ .hljs-doctag {
86
+ color: #A8D89A;
87
+ }
88
+
89
+ /* Meta, tags - light gray (7:1+) */
90
+ .hljs-meta,
91
+ .hljs-meta-keyword,
92
+ .hljs-tag {
93
+ color: #E8E8E8;
94
+ }
95
+
96
+ /* Variables - bright purple */
97
+ .hljs-variable,
98
+ .hljs-template-variable {
99
+ color: #EDA4F5;
100
+ }
101
+
102
+ /* Attributes - bright cyan */
103
+ .hljs-attr,
104
+ .hljs-attribute,
105
+ .hljs-builtin-name {
106
+ color: #B8EEFF;
107
+ }
108
+
109
+ .hljs-section {
110
+ color: #FFE566;
111
+ }
112
+
113
+ .hljs-emphasis {
114
+ font-style: italic;
115
+ }
116
+
117
+ .hljs-strong {
118
+ font-weight: bold;
119
+ }
120
+
121
+ /* Selectors - bright yellow */
122
+ .hljs-bullet,
123
+ .hljs-selector-tag,
124
+ .hljs-selector-id,
125
+ .hljs-selector-class,
126
+ .hljs-selector-attr,
127
+ .hljs-selector-pseudo {
128
+ color: #F5DFA0;
129
+ }
130
+
131
+ .hljs-addition {
132
+ background-color: #2D6B2A;
133
+ display: inline-block;
134
+ width: 100%;
135
+ }
136
+
137
+ .hljs-deletion {
138
+ background-color: #8B2A2A;
139
+ display: inline-block;
140
+ width: 100%;
141
+ }
@@ -93,33 +93,6 @@ Uses some ES6 features so won't work in IE without shims:
93
93
  if (typeof highlightJsBadgeAutoLoad !== 'boolean')
94
94
  var highlightJsBadgeAutoLoad = false;
95
95
 
96
- //-- LOCAL FIX: display names for the badge label, so a fence written as ```md shows "Markdown".
97
- //-- highlight.js 11 grammars carry a cased `name` and are preferred when present, but the pack
98
- //-- vendored here is a v9 build whose grammars have aliases and no name at all - hence this
99
- //-- table. Keyed by alias as well as canonical name, because the badge label is whatever the
100
- //-- author typed in the fence. Anything missing falls through and displays unchanged.
101
- var HDOC_LANG_DISPLAY_NAMES = {
102
- apache: "Apache", apacheconf: "Apache",
103
- bash: "Bash", sh: "Bash", zsh: "Bash", shell: "Shell", console: "Shell Session",
104
- bat: "DOS Batch", cmd: "DOS Batch", dos: "DOS Batch",
105
- c: "C", cpp: "C++", cs: "C#", csharp: "C#", objectivec: "Objective-C",
106
- css: "CSS", scss: "SCSS", less: "Less",
107
- dart: "Dart", diff: "Diff", patch: "Diff", dns: "DNS Zone",
108
- dockerfile: "Dockerfile", docker: "Dockerfile",
109
- fsharp: "F#", go: "Go", golang: "Go", graphql: "GraphQL",
110
- html: "HTML", xml: "XML", svg: "SVG", http: "HTTP",
111
- ini: "INI", toml: "TOML", java: "Java",
112
- js: "JavaScript", javascript: "JavaScript", json: "JSON",
113
- kotlin: "Kotlin", lua: "Lua", makefile: "Makefile", md: "Markdown", markdown: "Markdown",
114
- nginx: "Nginx", perl: "Perl", php: "PHP",
115
- powershell: "PowerShell", ps: "PowerShell", ps1: "PowerShell", pwsh: "PowerShell",
116
- python: "Python", py: "Python", r: "R", ruby: "Ruby", rb: "Ruby", rust: "Rust",
117
- scala: "Scala", sql: "SQL", pgsql: "PostgreSQL", postgresql: "PostgreSQL",
118
- swift: "Swift", ts: "TypeScript", typescript: "TypeScript",
119
- vbnet: "VB.NET", vbscript: "VBScript", yaml: "YAML", yml: "YAML",
120
- plaintext: "Plain Text", text: "Text"
121
- };
122
-
123
96
  function highlightJsBadge(opt) {
124
97
  var options = {
125
98
  // the selector for the badge template
@@ -228,20 +201,17 @@ function highlightJsBadge(opt) {
228
201
  else if (lang == "txt")
229
202
  lang = "text"
230
203
 
231
- //-- LOCAL FIX: show a full display name rather than whatever alias the author wrote
232
- //-- in the fence - "Markdown" not "md", "C#" not "cs", "Bash" not "sh". A
233
- //-- highlight.js 11 grammar carries its own cased `name` and is authoritative, so
234
- //-- this keeps working if the pack is ever upgraded; the v9 pack vendored here has
235
- //-- no such property, so the table above supplies it. Unknown languages fall through
236
- //-- to the overrides above unchanged.
237
- var langDef = (window.hljs && typeof window.hljs.getLanguage === "function")
238
- ? window.hljs.getLanguage(lang)
239
- : null;
240
-
241
- if (langDef && langDef.name)
242
- lang = langDef.name;
243
- else if (HDOC_LANG_DISPLAY_NAMES[lang])
244
- lang = HDOC_LANG_DISPLAY_NAMES[lang];
204
+ //-- LOCAL FIX: show highlight.js's own display name rather than whatever alias the
205
+ //-- author wrote in the fence - "Markdown" not "md", "C#" not "cs", "Bash" not "sh".
206
+ //-- getLanguage() resolves aliases, and registerLanguage only defaults .name to the
207
+ //-- registration key when the grammar does not declare one, so the grammar's cased
208
+ //-- name comes back. Unknown/unregistered languages fall through to the overrides
209
+ //-- above unchanged.
210
+ if (window.hljs && typeof window.hljs.getLanguage === "function") {
211
+ var langDef = window.hljs.getLanguage(lang);
212
+ if (langDef && langDef.name)
213
+ lang = langDef.name;
214
+ }
245
215
 
246
216
  var html = hudText.replace("{{language}}", lang)
247
217
  .replace("{{copyIconClass}}",options.copyIconClass)
@@ -346,22 +316,28 @@ function highlightJsBadge(opt) {
346
316
  " .code-badge-pre {",
347
317
  " position: relative;",
348
318
  " }",
349
- " /* Rendered as a full-width header bar above the code, not",
350
- " absolutely positioned over it - overlapping the first line",
351
- " made both the badge and the code unreadable. */",
352
319
  " .code-badge {",
353
320
  " display: flex;",
354
321
  " flex-direction: row;",
355
- " align-items: center;",
356
- " justify-content: space-between;",
357
322
  " white-space: normal;",
323
+ " background: transparent;",
358
324
  " background: #333;",
359
325
  " color: white;",
360
326
  " font-size: 0.875em;",
361
- " border-radius: 7px 7px 0 0;",
327
+ " opacity: 0.5;",
328
+ " transition: opacity linear 0.5s;",
329
+ " border-radius: 0 0 0 7px;",
362
330
  " padding: 5px 8px 5px 8px;",
363
- " width: 100%;",
364
- " box-sizing: border-box;",
331
+ " position: absolute;",
332
+ " right: 0;",
333
+ " top: 0;",
334
+ " }",
335
+ " .code-badge.active {",
336
+ " opacity: 0.8;",
337
+ " }",
338
+ "",
339
+ " .code-badge:hover {",
340
+ " opacity: .95;",
365
341
  " }",
366
342
  "",
367
343
  " .code-badge a,",
@@ -378,9 +354,9 @@ function highlightJsBadge(opt) {
378
354
  " font-size: 1.2em;",
379
355
  " cursor: pointer;",
380
356
  " padding: 0 7px;",
381
- " margin-top:2;",
357
+ " margin-top: 2px;",
382
358
  " }",
383
- " .fa.text-success:{ color: limegreen !important }",
359
+ " .fa.text-success { color: #006737 !important }",
384
360
  "</style>",
385
361
  "<div id=\"CodeBadgeTemplate\" style=\"display:none\">",
386
362
  " <div class=\"code-badge\">",
@@ -431,16 +407,23 @@ if (highlightJsBadgeAutoLoad)
431
407
  .code-badge {
432
408
  display: flex;
433
409
  flex-direction: row;
434
- align-items: center;
435
- justify-content: space-between;
436
410
  white-space: normal;
411
+ background: transparent;
437
412
  background: #333;
438
413
  color: white;
439
414
  font-size: 0.875em;
440
- border-radius: 7px 7px 0 0;
415
+ opacity: 0.5;
416
+ border-radius: 0 0 0 7px;
441
417
  padding: 5px 8px 5px 8px;
442
- width: 100%;
443
- box-sizing: border-box;
418
+ position: absolute;
419
+ right: 0;
420
+ top: 0;
421
+ }
422
+ .code-badge.active {
423
+ opacity: 0.8;
424
+ }
425
+ .code-badge:hover {
426
+ opacity: .95;
444
427
  }
445
428
  .code-badge a,
446
429
  .code-badge a:hover {
@@ -456,9 +439,9 @@ if (highlightJsBadgeAutoLoad)
456
439
  font-size: 1.2em;
457
440
  cursor: pointer;
458
441
  padding: 0 7px;
459
- margin-top:2;
442
+ margin-top: 2px;
460
443
  }
461
- .fa.text-success:{ color: limegreen !important}
444
+ .fa.text-success { color: #006737 !important}
462
445
  </style>
463
446
  <div id="CodeBadgeTemplate" style="display:none">
464
447
  <div class="code-badge">