@classic-homes/slides 0.5.8 → 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-AOOBBLKE.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-O4HEBEJ5.js.map
133
+ //# sourceMappingURL=chunk-5FN5E7SQ.js.map
@@ -3814,20 +3814,11 @@ function validateDeck(input, options = {}) {
3814
3814
  }
3815
3815
  return { ok: !issues.some((i) => i.level === "error"), deck, issues: byPath(issues) };
3816
3816
  }
3817
- function comparePath(a, b) {
3818
- for (let k = 0; k < Math.min(a.length, b.length); k++) {
3819
- const x = a[k];
3820
- const y = b[k];
3821
- if (x === y) continue;
3822
- if (typeof x === "number" && typeof y === "number") return x - y;
3823
- if (typeof x === "number") return 1;
3824
- if (typeof y === "number") return -1;
3825
- return x < y ? -1 : 1;
3826
- }
3827
- return a.length - b.length;
3817
+ function slideOf(path) {
3818
+ return path[0] === "slides" && typeof path[1] === "number" ? path[1] : -1;
3828
3819
  }
3829
3820
  function byPath(issues) {
3830
- return [...issues].sort((a, b) => comparePath(a.path, b.path));
3821
+ return [...issues].sort((a, b) => slideOf(a.path) - slideOf(b.path));
3831
3822
  }
3832
3823
  function formatPath(path) {
3833
3824
  if (!path.length) return "deck";
@@ -3993,4 +3984,4 @@ export {
3993
3984
  inlineDeckImages,
3994
3985
  externalizeDeckImages
3995
3986
  };
3996
- //# sourceMappingURL=chunk-AOOBBLKE.js.map
3987
+ //# sourceMappingURL=chunk-LQPZWWGZ.js.map