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
@@ -112,7 +112,7 @@ samp {
112
112
 
113
113
  img,
114
114
  svg {
115
- display: inline-block;
115
+ display: inline;
116
116
  }
117
117
 
118
118
  video,
@@ -157,22 +157,52 @@ button:enabled,
157
157
  cursor: pointer;
158
158
  }
159
159
 
160
- button:focus,
161
- button:focus-visible {
162
- outline: 1px dotted;
163
- outline: 4px auto -webkit-focus-ring-color;
160
+ /* WCAG 2.4.13: Focus Appearance - clear, visible focus indicators */
161
+ button:focus-visible,
162
+ [role='button']:focus-visible {
163
+ outline: 2px solid var(--htl-c-brand);
164
+ outline-offset: 2px;
164
165
  }
165
166
 
166
- button:focus:not(:focus-visible) {
167
- outline: none !important;
167
+ button:focus:not(:focus-visible),
168
+ [role='button']:focus:not(:focus-visible) {
169
+ outline: none;
170
+ }
171
+
172
+ input:focus-visible,
173
+ textarea:focus-visible,
174
+ select:focus-visible {
175
+ outline: 2px solid var(--htl-c-brand);
176
+ outline-offset: 2px;
177
+ }
178
+
179
+ input:focus:not(:focus-visible),
180
+ textarea:focus:not(:focus-visible),
181
+ select:focus:not(:focus-visible) {
182
+ outline: none;
183
+ }
184
+
185
+ /* Links focus indicator */
186
+ a:focus-visible {
187
+ outline: 2px solid var(--htl-c-brand);
188
+ outline-offset: 2px;
189
+ border-radius: 2px;
168
190
  }
169
191
 
170
- input:focus,
171
- textarea:focus,
172
- select:focus {
192
+ a:focus:not(:focus-visible) {
173
193
  outline: none;
174
194
  }
175
195
 
196
+ /* Dark mode: Lighter focus colour for visibility */
197
+ .dark button:focus-visible,
198
+ .dark [role='button']:focus-visible,
199
+ .dark input:focus-visible,
200
+ .dark textarea:focus-visible,
201
+ .dark select:focus-visible,
202
+ .dark a:focus-visible {
203
+ outline-color: var(--htl-c-blue-light);
204
+ }
205
+
176
206
  table {
177
207
  border-collapse: collapse;
178
208
  }
@@ -206,6 +236,12 @@ input[type='number'] {
206
236
  -moz-appearance: textfield;
207
237
  }
208
238
 
239
+ html.dark input[type='search'] {
240
+ color:#ffffff;
241
+ background-color: #000000;
242
+ }
243
+
244
+
209
245
  textarea {
210
246
  resize: vertical;
211
247
  }
@@ -229,10 +265,11 @@ p {
229
265
  overflow-wrap: break-word;
230
266
  }
231
267
 
268
+
232
269
  :root{
233
270
  /* Tweak the min/max to taste; ratio ≈ 1.25 across levels */
234
271
  --h1-min: 2.0rem; --h1-max: 3.0rem; /* 32–48 */
235
- --h2-min: 1.6rem; --h2-max: 2.25rem; /* 25.6–36 */
272
+ --h2-min: 1.6rem; --h2-max: 2.0rem; /* 25.6–36 */
236
273
  --h3-min: 1.35rem; --h3-max: 1.8rem; /* 21.6–28.8 */
237
274
  --h4-min: 1rem; --h4-max: 1.35rem; /* 18.4–23.2 */
238
275
  --h5-min: 1.05rem; --h5-max: 1.2rem; /* 16.8–19.2 */
@@ -250,33 +287,61 @@ h1:not(.mb-2):not(.display-4){
250
287
  line-height: 1.1;
251
288
  margin-top: 0; /* article title at top */
252
289
  }
253
- h2:not(.title){
290
+ h2:not(.title):not(.d-inline){
254
291
  font-size: clamp(var(--h2-min), 1.5vw + 0.9rem, var(--h2-max));
255
- font-weight: 650;
292
+ font-weight: 600;
256
293
  /*border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);*/
257
294
  /*padding-bottom: 0.2em;*/
258
295
  }
259
296
  h3{
260
297
  font-size: clamp(var(--h3-min), 1.2vw + 0.7rem, var(--h3-max));
261
- font-weight: 600;
298
+ font-weight: 570;
262
299
  }
263
300
  h4{
264
301
  font-size: clamp(var(--h4-min), 0.8vw + 0.6rem, var(--h4-max));
265
302
  font-weight: 550;
266
303
  }
267
- h5:not(.description){
304
+ /* the excluded class is description2 - the toolbar description span; ":not(.description)"
305
+ excluded a class no markup carries */
306
+ h5:not(.description2){
268
307
  font-size: clamp(var(--h5-min), 0.6vw + 0.6rem, var(--h5-max));
269
- font-weight: 500;
308
+ font-weight: 550;
270
309
  color: color-mix(in srgb, currentColor 85%, #000 15%);
271
310
  }
272
- h6:not(.description){
273
- font-size: clamp(var(--h6-min), 0.5vw + 0.55rem, var(--h6-max));
274
- font-weight: 600;
311
+ h6:not(.description2){
312
+ /* "0.vw" (no digit after the point) invalidated the whole clamp() at computed-value time,
313
+ so h6 font-size fell back to inherit - the dropped digit was 0.4 to fit the h4/h5 series */
314
+ font-size: clamp(var(--h6-min), 0.4vw + 0.55rem, var(--h6-max));
315
+ font-weight: 500;
275
316
  /*text-transform: uppercase; */ /* differentiate without shrinking */
276
317
  letter-spacing: 0.06em;
277
318
  color: color-mix(in srgb, currentColor 70%, #000 30%);
278
319
  }
320
+ /* WCAG 2.4.12: Focus Not Obscured - ensure focused elements aren't hidden */
279
321
  /* Better anchor linking with fixed headers/ToC */
280
- /*:where(h1,h2,h3,h4,h5,h6){ scroll-margin-top: 96px; }*/
322
+ :where(h1,h2,h3,h4,h5,h6) { scroll-margin-top: 80px; }
323
+ :target { scroll-margin-top: 80px; }
324
+
325
+ /* Ensure focused elements have scroll margin to avoid being obscured */
326
+ :focus { scroll-margin: 80px 0; }
281
327
  /* Tighten multi-line large headings */
282
- h1, h2 { hyphens: auto; }
328
+ h1, h2 { hyphens: auto; }
329
+
330
+ .text-success {
331
+ color: var(--htl-c-green-darker) !important;
332
+ }
333
+
334
+ .bg-secondary {
335
+ background-color: var(--htl-c-gray-dark-2) !important;
336
+ }
337
+
338
+ .description2 {
339
+ font-size: 0.8rem;
340
+ font-weight: 400;
341
+ color: #000000;
342
+ margin-bottom: 0.5rem;
343
+ }
344
+
345
+ .dark .description2 {
346
+ color: var(--htl-c-text-dark-1);
347
+ }
@@ -23,6 +23,7 @@ api-param-name {
23
23
  font-family: "courier new";
24
24
  font-weight: 700;
25
25
  }
26
+
26
27
  api-param-type {
27
28
  display: inline;
28
29
  border-radius: 4px;
@@ -34,6 +35,7 @@ api-param-name {
34
35
  font-style: italic;
35
36
  font-weight: 600;
36
37
  }
38
+
37
39
  api-param-type:before {
38
40
  font-style: normal;
39
41
  font-weight: 400;
@@ -76,9 +78,9 @@ api-param-name {
76
78
  /* API parameter description block */
77
79
  api-param-desc {
78
80
  display: block;
79
- padding-top: 1em;
80
- padding-bottom: 2em;
81
- padding-left: 2em;
81
+ margin-top: 1em;
82
+ margin-bottom: 2em;
83
+ margin-left: 2em;
82
84
  }
83
85
 
84
86
  /* GS: We need this for now as the custom element above does
@@ -89,6 +91,7 @@ api-param-name {
89
91
  padding-bottom: 2em;
90
92
  padding-left: 2em;
91
93
  }
94
+
92
95
 
93
96
  api-prop-name {
94
97
  display: inline;
@@ -1,7 +1,7 @@
1
1
  /* base doc content classes*/
2
2
  .DocContent .content-wrapper
3
3
  {
4
- padding: 20px 0px;
4
+ padding: 10px 0px;
5
5
  margin: 0 0;
6
6
  overflow: initial;
7
7
  max-width:1500px;
@@ -13,15 +13,9 @@
13
13
  position:relative;
14
14
  }
15
15
 
16
- /* The container is a flex row holding the content pane and the TOC. The
17
- content pane does all the flexing (basis 0, min-width 0 so wide content -
18
- tables, code blocks - cannot force it wider); the TOC keeps a fixed,
19
- non-shrinking basis. Giving both children a width made the row
20
- over-committed, so both shrank pro-rata and the TOC collapsed to ~118px. */
21
16
  .DocContent .injected-document-content
22
17
  {
23
- flex: 1 1 0;
24
- min-width: 0;
18
+ width: 100%;
25
19
  }
26
20
 
27
21
  .DocContent .injected-document-toc
@@ -29,12 +23,9 @@
29
23
  height: fit-content;
30
24
  display:none;
31
25
  margin:0 0 0 50px;
32
- flex: 0 0 clamp(260px, 26%, 400px);
26
+ width:400px;
33
27
  }
34
28
 
35
- .DocContent .injected-document-toc .H2{
36
-
37
- }
38
29
  .DocContent .injected-document-toc .H3{
39
30
  padding-left:10px;
40
31
 
@@ -69,59 +60,169 @@
69
60
  }
70
61
  /* eof nav tabs in doc content */
71
62
 
63
+ /* No ".tab-content" rules here any more. The local <tabs> transformer in doc.hornbill.js emits
64
+ ul.nav.nav-tabs and toggles d-none on the <tab> elements directly - it never creates the
65
+ Bootstrap .tab-content/.tab-pane wrappers those four rules were scoped to, so they could not
66
+ match under any content. (.code-badge itself is styled in htl-doc.css and is live.) */
72
67
 
68
+ /* WCAG AAA: Improve contrast for inactive code tab buttons */
69
+ .DocContent .nav-tabs .nav-link {
70
+ color: #0050c7;
71
+ }
72
+
73
+ .DocContent .nav-tabs .nav-link.active {
74
+ color: #000000;
75
+ }
76
+
77
+ /* CODE BLOCK - make sure doesn't escape parent container width */
73
78
  .DocContent .code-badge-pre
74
79
  {
75
80
  max-width: 100%!important;
76
81
  min-width: 100%!important;
77
82
  }
78
83
 
79
- @media (min-width: 1000px) {
80
-
81
- .DocContent .injected-document-content
82
- {
83
- /*width: 900px;*/
84
- }
84
+
85
+
86
+ /* LAYOUT MODS */
87
+
88
+ /* table-list*/
89
+ .DocContent.article-wide .injected-document-content
90
+ {
91
+ /* take up max width - overrides max-width set in [.DocContent .injected-document-content] */
92
+ max-width:100%;
85
93
  }
86
94
 
95
+ .DocContent.article-wide .injected-document-content table
96
+ {
97
+ /* make all tables 100% */
98
+ width:100%;
99
+ display:table;
100
+ }
87
101
 
88
- /* style overrides to apply on screens that are 1500px and wider */
102
+ /* style overrides to apply on screens that are 1790px and wider */
89
103
  @media (min-width: 1500px) {
90
-
104
+
91
105
  .DocContent .injected-document-toc
92
106
  {
93
107
  display:inline-block;
108
+ /* Do NOT let the TOC flex-shrink. .injected-document-container is a flex row
109
+ (.hb-container-horizontal) whose children inherit flex-shrink:1 from
110
+ htldoc.layouts.css. The content pane declares width:100%, so its flex-basis is the
111
+ full container width; add the TOC's 400px basis and the row is over-committed on every
112
+ screen, so BOTH items shrank pro-rata and the TOC collapsed to ~118px - the "squished
113
+ table of contents". The 900px content cap below only fires for .article-toc, i.e. only
114
+ when a page's frontmatter declares layout: article-toc, which most pages do not - so
115
+ the cap cannot be relied on to keep the row within budget. Fixed here instead: the TOC
116
+ takes a non-shrinking basis and the content pane absorbs all of the flexing.
117
+ clamp() rather than a flat 400px so the TOC gives some width back at the low end of
118
+ this breakpoint (400px flat left the content pane at 650px at exactly 1500px). Wide
119
+ content does not need the content pane to grow - code blocks and tables scroll
120
+ themselves (overflow-x:auto in htl-doc.css). */
121
+ flex: 0 0 clamp(260px, 26%, 400px);
122
+ width: auto;
123
+ margin-left: clamp(24px, 3%, 50px);
124
+ }
125
+
126
+ .DocContent .injected-document-content
127
+ {
128
+ /* basis 0 + grow, not the declared width:100%, so this pane is what yields width;
129
+ min-width:0 defeats the automatic minimum size (max-content), which a long
130
+ unwrapped code line would otherwise use to push the TOC out again */
131
+ flex: 1 1 0;
132
+ min-width: 0;
133
+ width: auto;
134
+ }
135
+
136
+ .DocContent.article-toc .injected-document-content
137
+ {
138
+ width: 900px;
94
139
  }
95
140
 
96
- /* Room for the TOC comes from its own flex basis now - a width here would be
97
- ignored anyway (flex-basis 0 on the content pane wins over width). */
98
141
 
99
142
  }
100
143
 
101
- /* style overrides to apply on screens that are 1920px and wider */
102
- @media (min-width: 1790px) {
103
-
104
- .DocContent .content-wrapper
144
+ /* ---- Narrow-screen TOC (hamburger fallback) ---- */
145
+ /* Hidden by default; at >=1500px the inline .injected-document-toc is shown instead (see media query above) */
146
+ .DocContent .toc-mobile
147
+ {
148
+ display:none;
149
+ }
150
+
151
+ @media (max-width: 1499.98px) {
152
+
153
+ .DocContent .toc-mobile
105
154
  {
106
- /*margin-left: 20px*/
155
+ display:block;
107
156
  }
108
- }
109
157
 
158
+ .DocContent .toc-mobile-btn
159
+ {
160
+ position:fixed;
161
+ right:20px;
162
+ /* tablet / small-laptop: vertically centred on the book title band. The variable is
163
+ measured and set by positionTocMobileBtn() (doc.hornbill.js); 74px is the fallback
164
+ before the first measure (dock just below the 58px toolbar) */
165
+ top:var(--toc-mobile-btn-top, 74px);
166
+ z-index:1000;
167
+ width:48px;
168
+ height:48px;
169
+ border-radius:50%;
170
+ border:none;
171
+ background:var(--htl-c-brand);
172
+ color:var(--htl-c-text-dark-1);
173
+ box-shadow:var(--htl-shadow-3);
174
+ font-size:1.4rem;
175
+ display:flex;
176
+ align-items:center;
177
+ justify-content:center;
178
+ cursor:pointer;
179
+ }
110
180
 
181
+ .DocContent .toc-mobile-btn:hover
182
+ {
183
+ filter:brightness(1.05);
184
+ }
111
185
 
112
- /* LAYOUT MODS */
186
+ .DocContent .toc-mobile-backdrop
187
+ {
188
+ position:fixed;
189
+ inset:0;
190
+ background:rgba(0,0,0,0.4);
191
+ z-index:1000;
192
+ }
113
193
 
114
- /* table-list*/
115
- .DocContent.article-wide .injected-document-content
116
- {
117
- /* take up max width - overrides max-width set in [.DocContent .injected-document-content] */
118
- max-width:100%;
194
+ .DocContent .toc-mobile-panel
195
+ {
196
+ position:fixed;
197
+ top:0;
198
+ right:0;
199
+ height:100%;
200
+ width:85%;
201
+ max-width:360px;
202
+ background:var(--htl-c-bg);
203
+ box-shadow:var(--htl-shadow-3);
204
+ z-index:1001;
205
+ overflow-y:auto;
206
+ padding:20px;
207
+ transform:translateX(100%);
208
+ transition:transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
209
+ }
210
+
211
+ .DocContent .toc-mobile-panel.open
212
+ {
213
+ transform:translateX(0);
214
+ }
119
215
  }
120
216
 
121
- .DocContent.article-wide .injected-document-content table
122
- {
123
- /* make all tables 100% */
124
- width:100%;
125
- display:table;
217
+ /* mobile: move the floating button to the bottom (thumb reach), toolbar search is hidden here */
218
+ @media (max-width: 602px) {
219
+
220
+ .DocContent .toc-mobile-btn
221
+ {
222
+ top:auto;
223
+ bottom:20px;
224
+ }
126
225
  }
127
226
 
227
+
228
+
@@ -1,6 +1,6 @@
1
1
  .custom-block {
2
2
  border: 1px solid transparent;
3
- border-radius: 8px;
3
+ border-radius: var(--htl-box-radius);
4
4
  padding: 16px 16px 8px;
5
5
  line-height: 24px;
6
6
  font-size: var(--htl-default-font-size);