@classic-homes/slides 0.5.10 → 0.5.11
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-LQPZWWGZ.js → chunk-25NZMEQG.js} +10 -6
- package/dist/chunk-25NZMEQG.js.map +1 -0
- package/dist/{chunk-5FN5E7SQ.js → chunk-42YDHMNB.js} +2 -2
- package/dist/{chunk-UZVAZOJR.js → chunk-6CYZI27I.js} +71 -7
- package/dist/chunk-6CYZI27I.js.map +1 -0
- package/dist/cli.js +19 -8
- package/dist/cli.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{mcp-RRCV6VM4.js → mcp-P3CPIO3H.js} +5 -5
- package/dist/mcp-P3CPIO3H.js.map +1 -0
- package/dist/node.d.ts +4 -1
- package/dist/node.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-LQPZWWGZ.js.map +0 -1
- package/dist/chunk-UZVAZOJR.js.map +0 -1
- package/dist/mcp-RRCV6VM4.js.map +0 -1
- /package/dist/{chunk-5FN5E7SQ.js.map → chunk-42YDHMNB.js.map} +0 -0
|
@@ -600,7 +600,7 @@ function inline(text) {
|
|
|
600
600
|
return `\uE000${codes.length - 1}\uE000`;
|
|
601
601
|
});
|
|
602
602
|
const links = [];
|
|
603
|
-
s = s.replace(/\[([
|
|
603
|
+
s = s.replace(/\[([^[\]]+)\]\(([^)\s[]+)\)/g, (match, label, url) => {
|
|
604
604
|
if (!isSafeLinkUrl(url)) return label;
|
|
605
605
|
links.push(`<a href="${escapeAttr(url)}">${formatEmphasis(escapeHtml(label))}</a>`);
|
|
606
606
|
return `\uE001${links.length - 1}\uE001`;
|
|
@@ -615,7 +615,7 @@ function inline(text) {
|
|
|
615
615
|
return s;
|
|
616
616
|
}
|
|
617
617
|
function formatEmphasis(escaped) {
|
|
618
|
-
return escaped.replace(/\*\*(.+?)\*\*/g, "<b>$1</b>").replace(/(^|[^*])\*(?!\s)(
|
|
618
|
+
return escaped.replace(/\*\*(.+?)\*\*/g, "<b>$1</b>").replace(/(^|[^*])\*(?!\s)([^*\n]+?)(?<!\s)\*(?!\*)/g, '$1<em class="hl">$2</em>');
|
|
619
619
|
}
|
|
620
620
|
function prose(text) {
|
|
621
621
|
if (!text) return "";
|
|
@@ -629,7 +629,7 @@ function prose(text) {
|
|
|
629
629
|
}
|
|
630
630
|
function plain(text) {
|
|
631
631
|
if (!text) return "";
|
|
632
|
-
return text.replace(/`([^`]+)`/g, "$1").replace(/\[([
|
|
632
|
+
return text.replace(/`([^`]+)`/g, "$1").replace(/\[([^[\]]+)\]\([^)[]+\)/g, "$1").replace(/\*\*(.+?)\*\*/g, "$1").replace(/\*(.+?)\*/g, "$1");
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
// src/video.ts
|
|
@@ -2091,7 +2091,9 @@ var LAYOUT_CATEGORIES = {
|
|
|
2091
2091
|
|
|
2092
2092
|
// src/edit.ts
|
|
2093
2093
|
function findSlide(deck, ref) {
|
|
2094
|
-
|
|
2094
|
+
let index = typeof ref === "string" ? deck.slides.findIndex((s) => s.id === ref) : -1;
|
|
2095
|
+
if (index < 0 && (typeof ref === "number" ? Number.isInteger(ref) : /^\d+$/.test(ref)))
|
|
2096
|
+
index = Number(ref) - 1;
|
|
2095
2097
|
if (index < 0 || index >= deck.slides.length) {
|
|
2096
2098
|
throw new Error(
|
|
2097
2099
|
`No slide "${ref}". The deck has ${deck.slides.length} slides; use a 1-based number or a slide id.`
|
|
@@ -3715,7 +3717,8 @@ function fromZod(issue) {
|
|
|
3715
3717
|
if (issue.code === "invalid_union_discriminator") {
|
|
3716
3718
|
message = `Unknown layout. Use one of: ${issue.options.join(", ")}.`;
|
|
3717
3719
|
} else if (issue.code === "unrecognized_keys") {
|
|
3718
|
-
|
|
3720
|
+
const onSlide = issue.path.length === 2 && issue.path[0] === "slides" && typeof issue.path[1] === "number";
|
|
3721
|
+
message = `Unknown field(s) ${issue.keys.map((k) => `"${k}"`).join(", ")}${onSlide ? " for this layout" : ""}.`;
|
|
3719
3722
|
}
|
|
3720
3723
|
return { level: "error", path: issue.path, message };
|
|
3721
3724
|
}
|
|
@@ -3822,6 +3825,7 @@ function byPath(issues) {
|
|
|
3822
3825
|
}
|
|
3823
3826
|
function formatPath(path) {
|
|
3824
3827
|
if (!path.length) return "deck";
|
|
3828
|
+
if (path.length === 1 && path[0] === "slides") return "slides";
|
|
3825
3829
|
return path.map(
|
|
3826
3830
|
(p, i) => typeof p === "number" ? path[i - 1] === "slides" ? `slide ${p + 1}` : String(p + 1) : p
|
|
3827
3831
|
).filter((p) => p !== "slides").join(" \u203A ");
|
|
@@ -3984,4 +3988,4 @@ export {
|
|
|
3984
3988
|
inlineDeckImages,
|
|
3985
3989
|
externalizeDeckImages
|
|
3986
3990
|
};
|
|
3987
|
-
//# sourceMappingURL=chunk-
|
|
3991
|
+
//# sourceMappingURL=chunk-25NZMEQG.js.map
|