hdoc-tools 0.19.1 → 0.19.4
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/hdoc-build.js +2 -0
- package/hdoc-serve.js +1 -0
- package/package.json +1 -1
- package/ui/index.html +11 -0
package/hdoc-build.js
CHANGED
@@ -39,6 +39,7 @@
|
|
39
39
|
"pdf-header-non-git.html"
|
40
40
|
),
|
41
41
|
pdf_template_path = path.join(__dirname, "templates", "pdf"),
|
42
|
+
ui_css_path = path.join(__dirname, "ui", "css"),
|
42
43
|
pdf_template_file_path = path.join(pdf_template_path, "template.html"),
|
43
44
|
regex_version = /^[0-9]{1,3}[.][0-9]{1,3}[.][0-9]{1,6}$/,
|
44
45
|
h1_pattern = /(<h1.*?>)\s*.*\s*(.*<\/h1>)/,
|
@@ -1192,6 +1193,7 @@
|
|
1192
1193
|
path.join(pdf_template_path, "css", "custom-block.css"),
|
1193
1194
|
path.join(pdf_template_path, "css", "hdocs-pdf.css"),
|
1194
1195
|
path.join(pdf_template_path, "css", "vars.css"),
|
1196
|
+
path.join(ui_css_path, 'theme-default', 'styles', 'components', 'api-doc.css')
|
1195
1197
|
];
|
1196
1198
|
for (let i = 0; i < css_files.length; i++) {
|
1197
1199
|
try {
|
package/hdoc-serve.js
CHANGED
package/package.json
CHANGED
package/ui/index.html
CHANGED
@@ -37,6 +37,17 @@
|
|
37
37
|
</style>
|
38
38
|
<script>
|
39
39
|
|
40
|
+
class APIParamName extends HTMLElement {
|
41
|
+
constructor() {
|
42
|
+
super();
|
43
|
+
// GS: Use this to set a role on the element for ARIO screen-reader directives
|
44
|
+
this.setAttribute("role", "title");
|
45
|
+
}
|
46
|
+
// Element functionality written in here
|
47
|
+
}
|
48
|
+
customElements.define("api-param-name", APIParamName);
|
49
|
+
|
50
|
+
|
40
51
|
var ThemePreference = localStorage.getItem('hdocbook-theme-appearance') || '';
|
41
52
|
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches
|
42
53
|
if (!ThemePreference || ThemePreference === 'auto' ? prefersDark : ThemePreference === 'dark') {
|