@classic-homes/slides 0.5.7 → 0.5.8
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/{chunk-ILE46F7Y.js → chunk-AOOBBLKE.js} +18 -3
- package/dist/{chunk-ILE46F7Y.js.map → chunk-AOOBBLKE.js.map} +1 -1
- package/dist/{chunk-AJFBVFYM.js → chunk-O4HEBEJ5.js} +2 -2
- package/dist/{chunk-PGZ4O5O5.js → chunk-XARJP3G2.js} +2 -2
- package/dist/cli.js +4 -4
- package/dist/index.js +2 -2
- package/dist/{mcp-QIOTFFFY.js → mcp-JE3DHERM.js} +4 -4
- package/dist/node.js +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-AJFBVFYM.js.map → chunk-O4HEBEJ5.js.map} +0 -0
- /package/dist/{chunk-PGZ4O5O5.js.map → chunk-XARJP3G2.js.map} +0 -0
- /package/dist/{mcp-QIOTFFFY.js.map → mcp-JE3DHERM.js.map} +0 -0
|
@@ -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,22 @@ 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 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;
|
|
3828
|
+
}
|
|
3829
|
+
function byPath(issues) {
|
|
3830
|
+
return [...issues].sort((a, b) => comparePath(a.path, b.path));
|
|
3816
3831
|
}
|
|
3817
3832
|
function formatPath(path) {
|
|
3818
3833
|
if (!path.length) return "deck";
|
|
@@ -3978,4 +3993,4 @@ export {
|
|
|
3978
3993
|
inlineDeckImages,
|
|
3979
3994
|
externalizeDeckImages
|
|
3980
3995
|
};
|
|
3981
|
-
//# sourceMappingURL=chunk-
|
|
3996
|
+
//# sourceMappingURL=chunk-AOOBBLKE.js.map
|