@marktiderman/genesis-cli 1.22.0 → 1.23.0

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/doctor.js CHANGED
@@ -7011,7 +7011,8 @@ async function readFigma(config, token, fetchImpl = fetch, timeoutMs = FIGMA_TIM
7011
7011
  }
7012
7012
  function compare(config, routes, targets, figma, dynamicTargets = []) {
7013
7013
  const platformOf = (page) => config.pages.web === page ? "web" : config.pages.native === page ? "native" : void 0;
7014
- const routeFrames = figma.frames.filter((f) => platformOf(f.page));
7014
+ const inProposal = (f) => /^Proposal\s*·/.test(f.section ?? "");
7015
+ const routeFrames = figma.frames.filter((f) => platformOf(f.page) && !inProposal(f));
7015
7016
  const framesFor = (r) => routeFrames.filter((f) => platformOf(f.page) === r.platform && (sameScreen(f.route, r.route) || r.route === "index" && f.route === "/"));
7016
7017
  const byId = new Map(figma.frames.map((f) => [f.id, f]));
7017
7018
  const framed = new Set(routes.flatMap((r) => framesFor(r).map((f) => f.id)));
@@ -7019,7 +7020,7 @@ function compare(config, routes, targets, figma, dynamicTargets = []) {
7019
7020
  const routesWithoutFrame = routes.filter((r) => framesFor(r).length === 0);
7020
7021
  const framesWithoutRoute = routeFrames.filter((f) => !framed.has(f.id));
7021
7022
  const proposals = {};
7022
- for (const f of figma.frames.filter((x) => x.page === config.proposalsPage)) (proposals[f.section ?? "(no section)"] ??= []).push(f);
7023
+ for (const f of figma.frames.filter((x) => x.page === config.proposalsPage || platformOf(x.page) && inProposal(x))) (proposals[f.section ?? "(no section)"] ??= []).push(f);
7023
7024
  const missingHotspots = [];
7024
7025
  const seen = /* @__PURE__ */ new Set();
7025
7026
  for (const t of targets) {
@@ -7040,11 +7041,11 @@ function compare(config, routes, targets, figma, dynamicTargets = []) {
7040
7041
  for (const h of figma.hotspots) {
7041
7042
  const from = byId.get(h.from);
7042
7043
  const to = byId.get(h.to);
7043
- if (from && to && platformOf(to.page) && !framed.has(to.id)) deadHotspots.push({ from, to });
7044
+ if (from && to && platformOf(to.page) && !inProposal(to) && !framed.has(to.id)) deadHotspots.push({ from, to });
7044
7045
  }
7045
7046
  const idMismatches = routes.filter((r) => r.figmaId && !framesFor(r).some((f) => f.id === r.figmaId)).map((r) => ({ ...r, frames: framesFor(r).map((f) => f.id) }));
7046
7047
  const wantedPages = [...Object.values(config.pages), config.proposalsPage];
7047
- const missingPages = wantedPages.filter((p) => !figma.pages.includes(p));
7048
+ const missingPages = wantedPages.filter((p) => p !== config.proposalsPage && !figma.pages.includes(p));
7048
7049
  const uncheckedNavigation = dynamicTargets.filter((t) => routes.some((r) => r.file === t.file));
7049
7050
  return {
7050
7051
  file: config.file,