fontisan 0.4.54-java → 0.4.55-java

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 (38) hide show
  1. checksums.yaml +4 -4
  2. data/Cargo.lock +1 -1
  3. data/docs/.gitignore +4 -0
  4. data/docs/astro.config.mjs +16 -0
  5. data/docs/package-lock.json +4022 -1496
  6. data/docs/package.json +12 -5
  7. data/docs/scripts/sitemap-base.mjs +81 -0
  8. data/docs/src/content.config.ts +32 -0
  9. data/docs/{.vitepress/config.ts → src/data/sidebar.ts} +235 -146
  10. data/docs/src/layouts/Site.astro +320 -0
  11. data/docs/src/pages/404.astro +14 -0
  12. data/docs/src/pages/api/[...slug].astro +22 -0
  13. data/docs/src/pages/api/index.astro +12 -0
  14. data/docs/src/pages/cli/[...slug].astro +22 -0
  15. data/docs/src/pages/cli/index.astro +12 -0
  16. data/docs/src/pages/guide/[...slug].astro +22 -0
  17. data/docs/src/pages/guide/index.astro +12 -0
  18. data/docs/src/pages/history/[...slug].astro +22 -0
  19. data/docs/src/pages/history/index.astro +24 -0
  20. data/docs/src/pages/index.astro +234 -0
  21. data/docs/src/pages/root/[...slug].astro +20 -0
  22. data/docs/src/styles/site.css +88 -0
  23. data/lib/fontisan/byte_ops.rb +0 -5
  24. data/lib/fontisan/ffi/darwin-arm64/libfontisan_cdylib.dylib +0 -0
  25. data/lib/fontisan/ffi/darwin-x86_64/libfontisan_cdylib.dylib +0 -0
  26. data/lib/fontisan/ffi/linux-x86_64/libfontisan_cdylib.so +0 -0
  27. data/lib/fontisan/ffi/windows-x86_64/fontisan_cdylib.dll +0 -0
  28. data/lib/fontisan/native.rb +1 -1
  29. data/lib/fontisan/version.rb +1 -1
  30. metadata +18 -10
  31. data/docs/.vitepress/theme/components/ApiMethod.vue +0 -127
  32. data/docs/.vitepress/theme/components/Badge.vue +0 -51
  33. data/docs/.vitepress/theme/components/FeatureComparison.vue +0 -87
  34. data/docs/.vitepress/theme/components/HeroCodeBlock.vue +0 -98
  35. data/docs/.vitepress/theme/components/WithinHero.vue +0 -30
  36. data/docs/.vitepress/theme/index.ts +0 -22
  37. data/docs/.vitepress/theme/style.css +0 -628
  38. data/docs/scripts/post-build.mjs +0 -81
data/docs/package.json CHANGED
@@ -1,15 +1,22 @@
1
1
  {
2
2
  "scripts": {
3
- "dev": "vitepress dev",
4
- "build": "vitepress build && node scripts/post-build.mjs",
5
- "preview": "vitepress preview",
3
+ "dev": "astro dev",
4
+ "build": "astro build && node scripts/sitemap-base.mjs",
5
+ "preview": "astro preview",
6
+ "postbuild": "node scripts/sitemap-base.mjs",
6
7
  "format": "prettier -w ."
7
8
  },
8
9
  "type": "module",
10
+ "dependencies": {
11
+ "@tailwindcss/vite": "^4.3.5",
12
+ "astro": "^7.4.13",
13
+ "marked": "^17.0.4",
14
+ "tailwindcss": "^4.3.5",
15
+ "vite": "^8.3.8"
16
+ },
9
17
  "devDependencies": {
10
18
  "@types/node": "^25.4.0",
11
19
  "prettier": "^3.8.1",
12
- "typescript": "^5.9.3",
13
- "vitepress": "^1.6.4"
20
+ "typescript": "^5.9.3"
14
21
  }
15
22
  }
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env node
2
+ // Regenerate dist/sitemap.xml from the final dist/ structure.
3
+ //
4
+ // VitePress's built-in sitemap config only sees the pages from its own build
5
+ // — in the multi-batch CI pipeline (docs.yml build-main + build-batch matrix)
6
+ // each batch's sitemap lists only that batch's pages. The combine job deploys
7
+ // dist-main's sitemap, which is missing all 4,283 formula browse pages that
8
+ // were merged in from the batches.
9
+ //
10
+ // Run this AFTER all browse pages have been merged AND the clean-URLs post-
11
+ // process has converted foo.html -> foo/index.html. The script scans dist/
12
+ // for index.html files and emits one <url> entry per page.
13
+
14
+ import { readdir, stat, writeFile } from "node:fs/promises";
15
+ import { join, relative, sep } from "node:path";
16
+ import { fileURLToPath } from "node:url";
17
+
18
+ const __dirname = fileURLToPath(new URL(".", import.meta.url));
19
+ const DIST = process.argv[2] || join(__dirname, "..", "dist");
20
+ const ORIGIN = process.env.SITE_URL || "https://www.fontist.org";
21
+ const BASE_PATH = process.env.BASE_PATH || "/fontisan/";
22
+
23
+ // 404 etc. shouldn't appear in the sitemap.
24
+ const EXCLUDE_PATHS = new Set(["404"]);
25
+
26
+ async function findIndexFiles(dir) {
27
+ const out = [];
28
+ const entries = await readdir(dir, { withFileTypes: true });
29
+ for (const e of entries) {
30
+ const full = join(dir, e.name);
31
+ if (e.isDirectory()) {
32
+ out.push(...await findIndexFiles(full));
33
+ } else if (e.name === "index.html") {
34
+ out.push(full);
35
+ }
36
+ }
37
+ return out;
38
+ }
39
+
40
+ function escapeXml(s) {
41
+ return s.replace(/[<>&'"]/g, (c) => ({
42
+ "<": "&lt;",
43
+ ">": "&gt;",
44
+ "&": "&amp;",
45
+ "'": "&apos;",
46
+ '"': "&quot;",
47
+ }[c]));
48
+ }
49
+
50
+ async function main() {
51
+ const files = await findIndexFiles(DIST);
52
+ const entries = [];
53
+ for (const f of files) {
54
+ const relPath = relative(DIST, f).split(sep).slice(0, -1).join("/");
55
+ if (EXCLUDE_PATHS.has(relPath)) continue;
56
+ const url = `${BASE_PATH}${relPath}/`.replace(/\/{2,}/g, "/");
57
+ let lastmod;
58
+ try {
59
+ lastmod = (await stat(f)).mtime.toISOString();
60
+ } catch {
61
+ lastmod = new Date().toISOString();
62
+ }
63
+ entries.push(
64
+ ` <url><loc>${escapeXml(`${ORIGIN}${url}`)}</loc><lastmod>${lastmod}</lastmod></url>`
65
+ );
66
+ }
67
+ // Stable sort by URL for reproducible builds.
68
+ entries.sort();
69
+ const xml =
70
+ `<?xml version="1.0" encoding="UTF-8"?>\n` +
71
+ `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n` +
72
+ `${entries.join("\n")}\n` +
73
+ `</urlset>\n`;
74
+ await writeFile(join(DIST, "sitemap.xml"), xml);
75
+ console.log(`Generated sitemap.xml with ${entries.length} URLs`);
76
+ }
77
+
78
+ main().catch((e) => {
79
+ console.error(e);
80
+ process.exit(1);
81
+ });
@@ -0,0 +1,32 @@
1
+ import { defineCollection } from "astro:content";
2
+ import { glob } from "astro/loaders";
3
+
4
+ // Parity with the VitePress srcExclude: three standalone guide stubs collide
5
+ // with their richer directory routes (guide/<name>/index.md is canonical).
6
+ const guide = defineCollection({
7
+ loader: glob({
8
+ pattern: ["**/*.md", "!hinting.md", "!validation.md", "!conversion.md"],
9
+ base: "./guide",
10
+ }),
11
+ });
12
+
13
+ const cli = defineCollection({
14
+ loader: glob({ pattern: "**/*.md", base: "./cli" }),
15
+ });
16
+
17
+ const api = defineCollection({
18
+ loader: glob({ pattern: "**/*.md", base: "./api" }),
19
+ });
20
+
21
+ const history = defineCollection({
22
+ loader: glob({ pattern: "**/*.md", base: "./history" }),
23
+ });
24
+
25
+ const rootPages = defineCollection({
26
+ loader: glob({
27
+ pattern: ["*.md", "!index.md", "!TODO.improve-docs.md"],
28
+ base: "./",
29
+ }),
30
+ });
31
+
32
+ export const collections = { guide, cli, api, history, rootPages };