@jonandev/longbeard 0.12.1 → 0.12.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.12.2 — 2026-11-21
6
+
7
+ - **A shot can be a picture's URL.** `moodboard.mjs` shows an `https://` shot from that address instead of dropping it as missing, and `families.mjs --board` writes it into `board.md` as it is (it was turned into `https:/…`). A library exported with its pins' addresses makes a moodboard with no pictures copied.
8
+
5
9
  ## 0.12.1 — 2026-11-21
6
10
 
7
11
  - **More galleries for the moodboard:** Minimal Gallery and httpster (browsed by tag, since neither has a search a script can use) for sites, and Fonts In Use (by subject tag or format; its search is off-limits to scripts) for the far reference: print, signs, packaging, with the typefaces named. `sources.md` says how to read each one's cards, and which galleries stay out of the picker and why (Land-book, Lapa Ninja, landing.love and siteinspire refuse scripts; One Page Love asks for its API key; Best Website Gallery's search finds only names).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jonandev/longbeard",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "description": "Designs like an Art director. Codes like a senior.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -142,9 +142,11 @@ for (const card of cards) {
142
142
  if (card.frames && !frames) console.error(`moodboard: no frames in ${card.frames.trim()}`);
143
143
  let poster = "";
144
144
  if (card.shot) {
145
- const abs = resolvePath(card.shot.trim());
146
- if (existsSync(abs)) poster = href(abs);
147
- else console.error(`moodboard: missing shot ${card.shot.trim()}`);
145
+ const shot = card.shot.trim();
146
+ // A shot may be a picture's URL (an exported library's pins): the page loads it as it is.
147
+ if (/^https?:\/\//i.test(shot)) poster = shot;
148
+ else if (existsSync(resolvePath(shot))) poster = href(resolvePath(shot));
149
+ else console.error(`moodboard: missing shot ${shot}`);
148
150
  }
149
151
  if (!poster && frames) poster = frames[frames.length - 1].src;
150
152
  if (!poster) continue;
@@ -592,7 +592,8 @@ if (boardArg) {
592
592
  const ordered = families.flatMap((f) => (f.stray ? [...f.members].sort((a, b) => (pairOf.has(a) ? 0 : 1) - (pairOf.has(b) ? 0 : 1) || String(pairOf.get(a)).localeCompare(String(pairOf.get(b)), undefined, { numeric: true })).map((s) => [f, s]) : f.members.map((s) => [f, s])));
593
593
  const cards = ordered.map(([f, s]) => {
594
594
  const r = byShot.get(s);
595
- const shot = relative(process.cwd(), resolve(s)).split("\\").join("/");
595
+ // A URL shot stays a URL; a file is written relative to where the board is made.
596
+ const shot = /^https?:\/\//i.test(s) ? s : relative(process.cwd(), resolve(s)).split("\\").join("/");
596
597
  const more = also.get(r.name);
597
598
  return `### ${r.name}
598
599
  - link: ${r.link || "none (shared in chat)"}
@@ -142,9 +142,11 @@ for (const card of cards) {
142
142
  if (card.frames && !frames) console.error(`moodboard: no frames in ${card.frames.trim()}`);
143
143
  let poster = "";
144
144
  if (card.shot) {
145
- const abs = resolvePath(card.shot.trim());
146
- if (existsSync(abs)) poster = href(abs);
147
- else console.error(`moodboard: missing shot ${card.shot.trim()}`);
145
+ const shot = card.shot.trim();
146
+ // A shot may be a picture's URL (an exported library's pins): the page loads it as it is.
147
+ if (/^https?:\/\//i.test(shot)) poster = shot;
148
+ else if (existsSync(resolvePath(shot))) poster = href(resolvePath(shot));
149
+ else console.error(`moodboard: missing shot ${shot}`);
148
150
  }
149
151
  if (!poster && frames) poster = frames[frames.length - 1].src;
150
152
  if (!poster) continue;
@@ -592,7 +592,8 @@ if (boardArg) {
592
592
  const ordered = families.flatMap((f) => (f.stray ? [...f.members].sort((a, b) => (pairOf.has(a) ? 0 : 1) - (pairOf.has(b) ? 0 : 1) || String(pairOf.get(a)).localeCompare(String(pairOf.get(b)), undefined, { numeric: true })).map((s) => [f, s]) : f.members.map((s) => [f, s])));
593
593
  const cards = ordered.map(([f, s]) => {
594
594
  const r = byShot.get(s);
595
- const shot = relative(process.cwd(), resolve(s)).split("\\").join("/");
595
+ // A URL shot stays a URL; a file is written relative to where the board is made.
596
+ const shot = /^https?:\/\//i.test(s) ? s : relative(process.cwd(), resolve(s)).split("\\").join("/");
596
597
  const more = also.get(r.name);
597
598
  return `### ${r.name}
598
599
  - link: ${r.link || "none (shared in chat)"}
@@ -142,9 +142,11 @@ for (const card of cards) {
142
142
  if (card.frames && !frames) console.error(`moodboard: no frames in ${card.frames.trim()}`);
143
143
  let poster = "";
144
144
  if (card.shot) {
145
- const abs = resolvePath(card.shot.trim());
146
- if (existsSync(abs)) poster = href(abs);
147
- else console.error(`moodboard: missing shot ${card.shot.trim()}`);
145
+ const shot = card.shot.trim();
146
+ // A shot may be a picture's URL (an exported library's pins): the page loads it as it is.
147
+ if (/^https?:\/\//i.test(shot)) poster = shot;
148
+ else if (existsSync(resolvePath(shot))) poster = href(resolvePath(shot));
149
+ else console.error(`moodboard: missing shot ${shot}`);
148
150
  }
149
151
  if (!poster && frames) poster = frames[frames.length - 1].src;
150
152
  if (!poster) continue;