@marktiderman/genesis-cli 1.22.0 → 1.22.1

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/vite.js CHANGED
@@ -6967,7 +6967,8 @@ async function readFigma(config, token, fetchImpl = fetch, timeoutMs = FIGMA_TIM
6967
6967
  }
6968
6968
  function compare(config, routes, targets, figma, dynamicTargets = []) {
6969
6969
  const platformOf = (page) => config.pages.web === page ? "web" : config.pages.native === page ? "native" : void 0;
6970
- const routeFrames = figma.frames.filter((f) => platformOf(f.page));
6970
+ const inProposal = (f) => /^Proposal\s*·/.test(f.section ?? "");
6971
+ const routeFrames = figma.frames.filter((f) => platformOf(f.page) && !inProposal(f));
6971
6972
  const framesFor = (r) => routeFrames.filter((f) => platformOf(f.page) === r.platform && (sameScreen(f.route, r.route) || r.route === "index" && f.route === "/"));
6972
6973
  const byId = new Map(figma.frames.map((f) => [f.id, f]));
6973
6974
  const framed = new Set(routes.flatMap((r) => framesFor(r).map((f) => f.id)));
@@ -6975,7 +6976,7 @@ function compare(config, routes, targets, figma, dynamicTargets = []) {
6975
6976
  const routesWithoutFrame = routes.filter((r) => framesFor(r).length === 0);
6976
6977
  const framesWithoutRoute = routeFrames.filter((f) => !framed.has(f.id));
6977
6978
  const proposals = {};
6978
- for (const f of figma.frames.filter((x) => x.page === config.proposalsPage)) (proposals[f.section ?? "(no section)"] ??= []).push(f);
6979
+ for (const f of figma.frames.filter((x) => x.page === config.proposalsPage || platformOf(x.page) && inProposal(x))) (proposals[f.section ?? "(no section)"] ??= []).push(f);
6979
6980
  const missingHotspots = [];
6980
6981
  const seen = /* @__PURE__ */ new Set();
6981
6982
  for (const t of targets) {
@@ -6996,11 +6997,11 @@ function compare(config, routes, targets, figma, dynamicTargets = []) {
6996
6997
  for (const h of figma.hotspots) {
6997
6998
  const from = byId.get(h.from);
6998
6999
  const to = byId.get(h.to);
6999
- if (from && to && platformOf(to.page) && !framed.has(to.id)) deadHotspots.push({ from, to });
7000
+ if (from && to && platformOf(to.page) && !inProposal(to) && !framed.has(to.id)) deadHotspots.push({ from, to });
7000
7001
  }
7001
7002
  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) }));
7002
7003
  const wantedPages = [...Object.values(config.pages), config.proposalsPage];
7003
- const missingPages = wantedPages.filter((p) => !figma.pages.includes(p));
7004
+ const missingPages = wantedPages.filter((p) => p !== config.proposalsPage && !figma.pages.includes(p));
7004
7005
  const uncheckedNavigation = dynamicTargets.filter((t) => routes.some((r) => r.file === t.file));
7005
7006
  return {
7006
7007
  file: config.file,