@markforster/heroquest-card-creator 0.5.3-2

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 (84) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +59 -0
  3. package/README.npm.md +59 -0
  4. package/bin/clear asset type classification in indexdb.ts +31 -0
  5. package/bin/heroquest-card-creator.js +572 -0
  6. package/out/404/index.html +66 -0
  7. package/out/404.html +66 -0
  8. package/out/_next/static/chunks/117-b8bb75121b26b6b3.js +2 -0
  9. package/out/_next/static/chunks/140-37b9051037068ddf.js +1 -0
  10. package/out/_next/static/chunks/275-f9dcc3143453fdcd.js +1 -0
  11. package/out/_next/static/chunks/421.f7d6805b56f50951.js +1 -0
  12. package/out/_next/static/chunks/481-657f5adb2ca2e132.js +1 -0
  13. package/out/_next/static/chunks/792.78b6ddda4e792193.js +1 -0
  14. package/out/_next/static/chunks/901.97c805b54bd60aa3.js +1 -0
  15. package/out/_next/static/chunks/924.4a054bc97175666b.js +1 -0
  16. package/out/_next/static/chunks/app/_not-found/page-12d4e6e8548a2d4a.js +1 -0
  17. package/out/_next/static/chunks/app/layout-280540b43bd5178c.js +1 -0
  18. package/out/_next/static/chunks/app/page-d8b18bd78378643b.js +1 -0
  19. package/out/_next/static/chunks/b536a0f1-15fcb22ec48614b3.js +230 -0
  20. package/out/_next/static/chunks/cb7556af-ac91ad5099c3d0ef.js +8 -0
  21. package/out/_next/static/chunks/fd9d1056-898d1c4f9326004a.js +1 -0
  22. package/out/_next/static/chunks/framework-f66176bb897dc684.js +1 -0
  23. package/out/_next/static/chunks/main-5e42ad27df38cdd8.js +1 -0
  24. package/out/_next/static/chunks/main-app-0b6a7f5b2fb24b40.js +1 -0
  25. package/out/_next/static/chunks/pages/_app-72b849fbd24ac258.js +1 -0
  26. package/out/_next/static/chunks/pages/_error-7ba65e1336b92748.js +1 -0
  27. package/out/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  28. package/out/_next/static/chunks/webpack-498a638590fe54e0.js +1 -0
  29. package/out/_next/static/css/83d0cd8babb21fe7.css +1 -0
  30. package/out/_next/static/css/d071dca61fbb01bf.css +5 -0
  31. package/out/_next/static/css/f4ac97d6546ca0d3.css +1 -0
  32. package/out/_next/static/css/fc205991348f38b9.css +1 -0
  33. package/out/_next/static/lmyD8fTLUGVhT66l1Dl08/_buildManifest.js +1 -0
  34. package/out/_next/static/lmyD8fTLUGVhT66l1Dl08/_ssgManifest.js +1 -0
  35. package/out/_next/static/media/blueprint.3b5b53f6.png +0 -0
  36. package/out/_next/static/media/bordered-mask.7fa8cc53.png +0 -0
  37. package/out/_next/static/media/combat_ad.c4d7dbac.svg +4 -0
  38. package/out/_next/static/media/combat_cd.37de7e25.svg +4 -0
  39. package/out/_next/static/media/combat_dd.1e82a6e7.svg +4 -0
  40. package/out/_next/static/media/combat_md.1be931b6.svg +4 -0
  41. package/out/_next/static/media/combat_monster_white.2cd272da.svg +4 -0
  42. package/out/_next/static/media/combat_shield_white.d707acf1.svg +11 -0
  43. package/out/_next/static/media/combat_skull_white.fc69a846.svg +7 -0
  44. package/out/_next/static/media/d6_pips_1.6c7ee5ed.svg +4 -0
  45. package/out/_next/static/media/d6_pips_2.5cbe4a47.svg +5 -0
  46. package/out/_next/static/media/d6_pips_3.1dedc2f4.svg +6 -0
  47. package/out/_next/static/media/d6_pips_4.9ae66448.svg +7 -0
  48. package/out/_next/static/media/d6_pips_5.e39667a9.svg +8 -0
  49. package/out/_next/static/media/d6_pips_6.9e8e43ee.svg +9 -0
  50. package/out/_next/static/media/hero-back.747a9227.png +0 -0
  51. package/out/_next/static/media/hero-stats.4e17ceac.png +0 -0
  52. package/out/_next/static/media/hero.be23b2e7.png +0 -0
  53. package/out/_next/static/media/labelled-back.0547e374.png +0 -0
  54. package/out/_next/static/media/large-treasure.e0644006.png +0 -0
  55. package/out/_next/static/media/large-window.ea8dd1b5.png +0 -0
  56. package/out/_next/static/media/linen-5.7e5cb84b.png +0 -0
  57. package/out/_next/static/media/monster-stats.e914ce2f.png +0 -0
  58. package/out/_next/static/media/monster.72370890.png +0 -0
  59. package/out/_next/static/media/parchment.09cbcdf5.png +0 -0
  60. package/out/_next/static/media/ribbon.1481d194.png +0 -0
  61. package/out/_next/static/media/small-large-artwork-border-alpha-mask.e9ccef3c.png +0 -0
  62. package/out/_next/static/media/small-large-artwork-border-blend-texture.e5ea5707.png +0 -0
  63. package/out/_next/static/media/small-treasure.3a8b8444.png +0 -0
  64. package/out/_next/static/media/small-window.3109823c.png +0 -0
  65. package/out/_next/static/media/white-paper.6aa299d7.png +0 -0
  66. package/out/assets/apple-touch-icon.png +0 -0
  67. package/out/assets/favicon-96x96.png +0 -0
  68. package/out/assets/favicon.ico +0 -0
  69. package/out/assets/favicon.svg +3 -0
  70. package/out/assets/site.webmanifest +21 -0
  71. package/out/assets/web-app-manifest-192x192.png +0 -0
  72. package/out/assets/web-app-manifest-512x512.png +0 -0
  73. package/out/favicon.ico +0 -0
  74. package/out/fonts/Carter Sans W01 Bold.ttf +0 -0
  75. package/out/fonts/Carter Sans W01 Medium.ttf +0 -0
  76. package/out/fonts/Carter Sans W01 Regular.ttf +0 -0
  77. package/out/fonts/HeroQuest.ttf +0 -0
  78. package/out/index.html +66 -0
  79. package/out/index.txt +42 -0
  80. package/out/robots.txt +4 -0
  81. package/out/sitemap.xml +9 -0
  82. package/out/zip/zip-web-worker.js +1 -0
  83. package/package.json +133 -0
  84. package/readme-assets/banner.jpg +0 -0
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # HeroQuest Card Creator
2
+
3
+ ![HeroQuest Card Creator](https://public.markforster.info/Heroquest/Tools/HeroQuest-Card-Creator-Banner.jpg)
4
+
5
+ Create HeroQuest‑style cards (heroes, monsters, treasure, backs, and more) in your browser, preview them live, and export print‑ready PNGs — no server, no account, all client‑side.
6
+
7
+ Layouts, typography, and proportions are tuned to match the classic cards, so you can focus on ideas instead of fighting fonts and spacing. Pick a template, drop in artwork, tweak framing, write rules text, and export print‑ready PNGs. Everything runs locally in your browser, and you can export a single `.hqcc` backup to move or restore your library.
8
+
9
+ Prefer a hosted version? You can also run the app from itch.io:
10
+
11
+ <a href="https://mark-forster.itch.io/heroquest-card-creator" target="_blank" rel="noopener noreferrer">https://mark-forster.itch.io/heroquest-card-creator</a>
12
+
13
+ Community and updates:
14
+
15
+ <a href="https://mark-forster.itch.io/heroquest-card-creator/community" target="_blank" rel="noopener noreferrer">https://mark-forster.itch.io/heroquest-card-creator/community</a>
16
+
17
+ ## Highlights
18
+
19
+ - SVG preview with high‑fidelity layout.
20
+ - Export print‑ready PNGs with fonts and images embedded.
21
+ - Asset library for uploading and reusing images.
22
+ - Saved cards (“Stockpile”) with collections and bulk export.
23
+ - Full backup import/export (`.hqcc`) for cards and assets.
24
+ - Stockpile panels/table view with Recently Deleted safety.
25
+ - Assets inspector with asset kind classification and filtering.
26
+ - Missing‑artwork checks before export help avoid bad ZIPs.
27
+
28
+ ## Install
29
+
30
+ ```bash
31
+ npm i -g @markforster/heroquest-card-creator
32
+ ```
33
+
34
+ ## Run
35
+
36
+ Start the app (defaults to `http://127.0.0.1:3000`):
37
+
38
+ ```bash
39
+ heroquest-card-creator
40
+ ```
41
+
42
+ Use a specific port:
43
+
44
+ ```bash
45
+ heroquest-card-creator -p 4000
46
+ ```
47
+
48
+ ## Port behavior & storage
49
+
50
+ - If no port is supplied, the app tries port `3000` first.
51
+ - If `3000` is busy, it auto‑selects a free port.
52
+ - Recent ports are stored in `~/.hqcc/info.yml` and the CLI may prompt you to reuse them.
53
+ - Browser storage is tied to the origin (host + port). If you run on a new port, you won’t see libraries created on other ports.
54
+
55
+ ## Data & backups
56
+
57
+ Your cards and assets are stored locally in your browser (IndexedDB + localStorage).
58
+
59
+ You can export a full backup (`.hqcc`) from the app to move or restore your library.
package/README.npm.md ADDED
@@ -0,0 +1,59 @@
1
+ # HeroQuest Card Creator
2
+
3
+ ![HeroQuest Card Creator](https://public.markforster.info/Heroquest/Tools/HeroQuest-Card-Creator-Banner.jpg)
4
+
5
+ Create HeroQuest‑style cards (heroes, monsters, treasure, backs, and more) in your browser, preview them live, and export print‑ready PNGs — no server, no account, all client‑side.
6
+
7
+ Layouts, typography, and proportions are tuned to match the classic cards, so you can focus on ideas instead of fighting fonts and spacing. Pick a template, drop in artwork, tweak framing, write rules text, and export print‑ready PNGs. Everything runs locally in your browser, and you can export a single `.hqcc` backup to move or restore your library.
8
+
9
+ Prefer a hosted version? You can also run the app from itch.io:
10
+
11
+ <a href="https://mark-forster.itch.io/heroquest-card-creator" target="_blank" rel="noopener noreferrer">https://mark-forster.itch.io/heroquest-card-creator</a>
12
+
13
+ Community and updates:
14
+
15
+ <a href="https://mark-forster.itch.io/heroquest-card-creator/community" target="_blank" rel="noopener noreferrer">https://mark-forster.itch.io/heroquest-card-creator/community</a>
16
+
17
+ ## Highlights
18
+
19
+ - SVG preview with high‑fidelity layout.
20
+ - Export print‑ready PNGs with fonts and images embedded.
21
+ - Asset library for uploading and reusing images.
22
+ - Saved cards (“Stockpile”) with collections and bulk export.
23
+ - Full backup import/export (`.hqcc`) for cards and assets.
24
+ - Stockpile panels/table view with Recently Deleted safety.
25
+ - Assets inspector with asset kind classification and filtering.
26
+ - Missing‑artwork checks before export help avoid bad ZIPs.
27
+
28
+ ## Install
29
+
30
+ ```bash
31
+ npm i -g @markforster/heroquest-card-creator
32
+ ```
33
+
34
+ ## Run
35
+
36
+ Start the app (defaults to `http://127.0.0.1:3000`):
37
+
38
+ ```bash
39
+ heroquest-card-creator
40
+ ```
41
+
42
+ Use a specific port:
43
+
44
+ ```bash
45
+ heroquest-card-creator -p 4000
46
+ ```
47
+
48
+ ## Port behavior & storage
49
+
50
+ - If no port is supplied, the app tries port `3000` first.
51
+ - If `3000` is busy, it auto‑selects a free port.
52
+ - Recent ports are stored in `~/.hqcc/info.yml` and the CLI may prompt you to reuse them.
53
+ - Browser storage is tied to the origin (host + port). If you run on a new port, you won’t see libraries created on other ports.
54
+
55
+ ## Data & backups
56
+
57
+ Your cards and assets are stored locally in your browser (IndexedDB + localStorage).
58
+
59
+ You can export a full backup (`.hqcc`) from the app to move or restore your library.
@@ -0,0 +1,31 @@
1
+ (async () => {
2
+ const db = await new Promise<IDBDatabase>((resolve, reject) => {
3
+ const req = indexedDB.open("hqcc");
4
+ req.onsuccess = () => resolve(req.result);
5
+ req.onerror = () => reject(req.error);
6
+ });
7
+
8
+ const tx = db.transaction("assets", "readwrite");
9
+ const store = tx.objectStore("assets");
10
+
11
+ type AssetRecord = Record<string, unknown>;
12
+ const records = await new Promise<AssetRecord[]>((resolve, reject) => {
13
+ const req = store.getAll();
14
+ req.onsuccess = () => resolve((req.result as AssetRecord[]) || []);
15
+ req.onerror = () => reject(req.error);
16
+ });
17
+
18
+ records.forEach((record) => {
19
+ delete record.assetKind;
20
+ delete record.assetKindStatus;
21
+ delete record.assetKindSource;
22
+ delete record.assetKindConfidence;
23
+ delete record.assetKindUpdatedAt;
24
+ store.put(record);
25
+ });
26
+
27
+ tx.oncomplete = () => {
28
+ window.dispatchEvent(new CustomEvent("hqcc-assets-updated"));
29
+ console.log("Cleared asset kind fields.");
30
+ };
31
+ })();