lildocs 0.1.3 → 0.1.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/dist/cli.mjs CHANGED
@@ -429,23 +429,23 @@ function ensureUniqueRoutes(pages) {
429
429
  const defaultAlertVariants = [
430
430
  {
431
431
  type: "note",
432
- icon: materialSymbol("info")
432
+ icon: tablerIcon("info-circle")
433
433
  },
434
434
  {
435
435
  type: "tip",
436
- icon: materialSymbol("lightbulb")
436
+ icon: tablerIcon("bulb")
437
437
  },
438
438
  {
439
439
  type: "important",
440
- icon: materialSymbol("feedback")
440
+ icon: tablerIcon("message-report")
441
441
  },
442
442
  {
443
443
  type: "warning",
444
- icon: materialSymbol("warning")
444
+ icon: tablerIcon("alert-triangle")
445
445
  },
446
446
  {
447
447
  type: "caution",
448
- icon: materialSymbol("dangerous")
448
+ icon: tablerIcon("alert-circle")
449
449
  }
450
450
  ];
451
451
  function markedAlert(options = {}) {
@@ -511,8 +511,8 @@ function createSyntaxPattern(type) {
511
511
  function capitalize$1(value) {
512
512
  return value.slice(0, 1).toUpperCase() + value.slice(1).toLowerCase();
513
513
  }
514
- function materialSymbol(name) {
515
- return `<span class="material-symbols-rounded markdown-alert-icon" aria-hidden="true">${name}</span>`;
514
+ function tablerIcon(name) {
515
+ return `<span class="ti ti-${name} markdown-alert-icon" aria-hidden="true"></span>`;
516
516
  }
517
517
  function escapeRegExp(value) {
518
518
  return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
@@ -1400,10 +1400,6 @@ function Layout({ page, nav, pageNavigation, css, searchIndexJson, logo, favicon
1400
1400
  rel: "icon",
1401
1401
  href: assetSrc(page.route, favicon)
1402
1402
  }) : null,
1403
- /* @__PURE__ */ jsx("link", {
1404
- rel: "stylesheet",
1405
- href: "https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20,400,0,0&display=block"
1406
- }),
1407
1403
  /* @__PURE__ */ jsx("link", {
1408
1404
  rel: "stylesheet",
1409
1405
  href: rootRelativeUrl(page.route, "assets/lildocs.css")
@@ -1437,9 +1433,8 @@ function Layout({ page, nav, pageNavigation, css, searchIndexJson, logo, favicon
1437
1433
  id: "lildocs-search-root",
1438
1434
  className: "searchBox",
1439
1435
  children: [/* @__PURE__ */ jsx("span", {
1440
- className: "searchIcon material-symbols-rounded",
1441
- "aria-hidden": "true",
1442
- children: "search"
1436
+ className: "searchIcon ti ti-search",
1437
+ "aria-hidden": "true"
1443
1438
  }), /* @__PURE__ */ jsx("input", {
1444
1439
  id: "lildocs-search-input",
1445
1440
  type: "search",
@@ -1623,6 +1618,7 @@ async function buildSite(options) {
1623
1618
  fonts: configOptions.fonts
1624
1619
  });
1625
1620
  const baseCss = await readRenderAsset("styles.css");
1621
+ const tablerIconsCss = await readTablerIconsCss();
1626
1622
  const searchScript = await readRenderAsset("search.js");
1627
1623
  const copyCodeScript = await readRenderAsset("copy-code.js");
1628
1624
  const navigationScript = await readRenderAsset("navigation.js");
@@ -1642,8 +1638,9 @@ async function buildSite(options) {
1642
1638
  defaultText: packageName,
1643
1639
  favicon: configOptions.favicon
1644
1640
  });
1645
- const css = `${fontResolution.css}${themeToCssVariables(theme, fontResolution.themeFonts, configOptions.link, configOptions.navigation)}\n${backgroundResolution.css}${logoResolution.css}${baseCss}`;
1641
+ const css = `${tablerIconsCss}${fontResolution.css}${themeToCssVariables(theme, fontResolution.themeFonts, configOptions.link, configOptions.navigation)}\n${backgroundResolution.css}${logoResolution.css}${baseCss}`;
1646
1642
  const assets = [
1643
+ ...tablerIconFontAssets(outDir),
1647
1644
  ...fontResolution.assets,
1648
1645
  ...backgroundResolution.assets,
1649
1646
  ...logoResolution.assets
@@ -1743,6 +1740,20 @@ async function readRenderAsset(name) {
1743
1740
  async function readSwupAsset() {
1744
1741
  return readFile(path.join(path.dirname(require.resolve("swup")), "Swup.umd.js"), "utf8");
1745
1742
  }
1743
+ async function readTablerIconsCss() {
1744
+ return readFile(require.resolve("@tabler/icons-webfont/dist/tabler-icons.css"), "utf8");
1745
+ }
1746
+ function tablerIconFontAssets(outDir) {
1747
+ const fontsDir = path.join(path.dirname(require.resolve("@tabler/icons-webfont/dist/tabler-icons.css")), "fonts");
1748
+ return [
1749
+ "tabler-icons.woff2",
1750
+ "tabler-icons.woff",
1751
+ "tabler-icons.ttf"
1752
+ ].map((name) => ({
1753
+ from: path.join(fontsDir, name),
1754
+ to: path.join(outDir, "assets", "fonts", name)
1755
+ }));
1756
+ }
1746
1757
  function buildPageNavigation(pages) {
1747
1758
  const navigation = /* @__PURE__ */ new Map();
1748
1759
  if (pages.length < 2) return navigation;
@@ -1,8 +1,8 @@
1
1
  (() => {
2
2
  const icons = {
3
- copy: '<span class="material-symbols-rounded copyCodeIcon" aria-hidden="true">content_copy</span>',
4
- check: '<span class="material-symbols-rounded copyCodeIcon" aria-hidden="true">check</span>',
5
- error: '<span class="material-symbols-rounded copyCodeIcon" aria-hidden="true">error</span>',
3
+ copy: '<span class="ti ti-copy copyCodeIcon" aria-hidden="true"></span>',
4
+ check: '<span class="ti ti-copy-check copyCodeIcon" aria-hidden="true"></span>',
5
+ error: '<span class="ti ti-alert-circle copyCodeIcon" aria-hidden="true"></span>',
6
6
  };
7
7
 
8
8
  initCopyCode();
@@ -3082,9 +3082,8 @@ function SearchBox({ anchorElement, index, siteRoot, preloadedUrls }) {
3082
3082
  };
3083
3083
  return /* @__PURE__ */ u(S$1, { children: [
3084
3084
  /* @__PURE__ */ u("span", {
3085
- className: "searchIcon material-symbols-rounded",
3086
- "aria-hidden": "true",
3087
- children: "search"
3085
+ className: "searchIcon ti ti-search",
3086
+ "aria-hidden": "true"
3088
3087
  }),
3089
3088
  /* @__PURE__ */ u("input", {
3090
3089
  ref: inputRef,
@@ -145,11 +145,20 @@ html.is-animating .transition-scale {
145
145
  font-family: var(--ld-font-heading);
146
146
  }
147
147
 
148
+ .content article :where(h1, h2, h3, h4, h5, h6) {
149
+ margin-block: 1.2em 0.6em;
150
+ }
151
+
148
152
  .content img {
149
153
  max-width: 100%;
150
154
  height: auto;
151
155
  }
152
156
 
157
+ .content article {
158
+ max-width: 60ch;
159
+ font-size: 110%;
160
+ }
161
+
153
162
  .content article li {
154
163
  margin-bottom: 8px;
155
164
  }
@@ -399,6 +408,7 @@ html.is-animating .transition-scale {
399
408
 
400
409
  .markdown-alert-icon {
401
410
  flex: 0 0 auto;
411
+ font-size: 20px;
402
412
  }
403
413
 
404
414
  .markdown-alert-note {
@@ -557,21 +567,6 @@ html.is-animating .transition-scale {
557
567
  transform: translateY(-50%);
558
568
  }
559
569
 
560
- .material-symbols-rounded {
561
- font-family: "Material Symbols Rounded";
562
- font-weight: normal;
563
- font-style: normal;
564
- font-size: 20px;
565
- line-height: 1;
566
- letter-spacing: normal;
567
- text-transform: none;
568
- white-space: nowrap;
569
- word-wrap: normal;
570
- direction: ltr;
571
- font-feature-settings: "liga";
572
- -webkit-font-smoothing: antialiased;
573
- }
574
-
575
570
  .searchBox input {
576
571
  box-sizing: border-box;
577
572
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lildocs",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "A lightweight CLI that turns Markdown docs into a static searchable documentation site.",
5
5
  "homepage": "https://aleclarson.github.io/lildocs/",
6
6
  "repository": {
@@ -26,6 +26,7 @@
26
26
  "dependencies": {
27
27
  "@goddard-ai/ui-primitives": "^0.1.1",
28
28
  "@preact/signals": "^2.9.2",
29
+ "@tabler/icons-webfont": "^3.44.0",
29
30
  "beautiful-mermaid": "^1.1.3",
30
31
  "cmd-ts": "^0.15.0",
31
32
  "culori": "^4.0.2",