@classic-homes/slides 0.5.7 → 0.5.9

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.
@@ -6,7 +6,7 @@ import {
6
6
  LAYOUT_CATEGORIES,
7
7
  baseSlide,
8
8
  getLayout
9
- } from "./chunk-ILE46F7Y.js";
9
+ } from "./chunk-LQPZWWGZ.js";
10
10
 
11
11
  // src/catalog.ts
12
12
  import { z } from "zod";
@@ -130,4 +130,4 @@ export {
130
130
  deckJsonSchema,
131
131
  AUTHORING_GUIDE
132
132
  };
133
- //# sourceMappingURL=chunk-AJFBVFYM.js.map
133
+ //# sourceMappingURL=chunk-5FN5E7SQ.js.map
@@ -3757,7 +3757,7 @@ function validateDeck(input, options = {}) {
3757
3757
  if (slide.success) issues2.push(...slideIssues(slide.data, i));
3758
3758
  });
3759
3759
  }
3760
- return { ok: false, issues: issues2 };
3760
+ return { ok: false, issues: byPath(issues2) };
3761
3761
  }
3762
3762
  const deck = parsed.data;
3763
3763
  const issues = [];
@@ -3812,7 +3812,13 @@ function validateDeck(input, options = {}) {
3812
3812
  message: 'Decks usually open with a "title" slide.'
3813
3813
  });
3814
3814
  }
3815
- return { ok: !issues.some((i) => i.level === "error"), deck, issues };
3815
+ return { ok: !issues.some((i) => i.level === "error"), deck, issues: byPath(issues) };
3816
+ }
3817
+ function slideOf(path) {
3818
+ return path[0] === "slides" && typeof path[1] === "number" ? path[1] : -1;
3819
+ }
3820
+ function byPath(issues) {
3821
+ return [...issues].sort((a, b) => slideOf(a.path) - slideOf(b.path));
3816
3822
  }
3817
3823
  function formatPath(path) {
3818
3824
  if (!path.length) return "deck";
@@ -3978,4 +3984,4 @@ export {
3978
3984
  inlineDeckImages,
3979
3985
  externalizeDeckImages
3980
3986
  };
3981
- //# sourceMappingURL=chunk-ILE46F7Y.js.map
3987
+ //# sourceMappingURL=chunk-LQPZWWGZ.js.map