integrate jsonschema2markdown; add support for inline markdown rendering from templates

This commit is contained in:
2023-05-13 20:31:00 -07:00
parent 4061b40eb4
commit 699c018825
19 changed files with 1793 additions and 142 deletions

23
src/icons.ts Normal file
View File

@@ -0,0 +1,23 @@
export const icons: Record<string, string> = Object.create(null);
const whitespace = /[\s\t\n]+/g;
const feather_icons: Record<string, string> = require('../vendor/feather-icons/icons.json');
for (const [name, contents] of Object.entries(feather_icons)) {
icons[name] = `
<svg xmlns="http://www.w3.org/2000/svg"
class="icon ${name}"
aria-hidden="true"
style="width: var(--icon-size, 1rem); height: var(--icon-size, 1rem)"
viewBox="0 0 24 24"
fill="none"
stroke="currentcolor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
>${contents}</svg>
`.replace(whitespace, ' ').trim();
}
Object.freeze(icons);