From 5e2e4f6a3f45a082d7df72f5129e301f9765c323 Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Tue, 14 Oct 2025 15:25:34 -0400 Subject: [PATCH 1/4] chore(repo): Fix typedoc paramextension tag --- .typedoc/custom-theme.mjs | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.typedoc/custom-theme.mjs b/.typedoc/custom-theme.mjs index 1ce9c403d22..d2459bd4f0f 100644 --- a/.typedoc/custom-theme.mjs +++ b/.typedoc/custom-theme.mjs @@ -76,15 +76,31 @@ class ClerkMarkdownThemeContext extends MarkdownThemeContext { splitOutput = swap(splitOutput, 0, 2); } + // if (paramExtensionTag) { const stuff = this.helpers.getCommentParts(paramExtensionTag.content); - // Find the index of the item that contains '## Returns' - const index = splitOutput.findIndex(item => item.includes('## Returns')); + // Find the index of the item that contains '## Parameters' + const parametersIndex = splitOutput.findIndex(item => item.includes('## Parameters')); - // If the index is found, insert the stuff before it - if (index !== -1) { - splitOutput.splice(index, 0, stuff); + if (parametersIndex !== -1) { + // Find the immediate next heading after Parameters + let nextHeadingIndex = -1; + for (let i = parametersIndex + 1; i < splitOutput.length; i++) { + const item = splitOutput[i].trim(); + + // The next header has to, at a minimum, start with ## + // because it comes after '## Parameters' + if (item.match(/^##/)) { + nextHeadingIndex = i; + break; + } + } + + // Insert the stuff before the next heading + // (or at the end of the entire page if no heading found) + const insertIndex = nextHeadingIndex !== -1 ? nextHeadingIndex : splitOutput.length; + splitOutput.splice(insertIndex, 0, stuff); } } From c80466d3fc7fd4bc471aba147ae586d0c4a91ab6 Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Tue, 14 Oct 2025 15:28:29 -0400 Subject: [PATCH 2/4] add empty changeset --- .changeset/five-schools-repair.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changeset/five-schools-repair.md diff --git a/.changeset/five-schools-repair.md b/.changeset/five-schools-repair.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/five-schools-repair.md @@ -0,0 +1,2 @@ +--- +--- From 6dd02cab64a6d2f618e081bd43628b58a6ec596b Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Tue, 14 Oct 2025 15:30:18 -0400 Subject: [PATCH 3/4] remove random line --- .typedoc/custom-theme.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/.typedoc/custom-theme.mjs b/.typedoc/custom-theme.mjs index d2459bd4f0f..a4777846431 100644 --- a/.typedoc/custom-theme.mjs +++ b/.typedoc/custom-theme.mjs @@ -76,7 +76,6 @@ class ClerkMarkdownThemeContext extends MarkdownThemeContext { splitOutput = swap(splitOutput, 0, 2); } - // if (paramExtensionTag) { const stuff = this.helpers.getCommentParts(paramExtensionTag.content); From bdc252211a90e0ce45c5dadcc36e407e048da38d Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Wed, 15 Oct 2025 18:21:59 -0400 Subject: [PATCH 4/4] code suggestion --- .typedoc/custom-theme.mjs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.typedoc/custom-theme.mjs b/.typedoc/custom-theme.mjs index a4777846431..ec2adcf8dd6 100644 --- a/.typedoc/custom-theme.mjs +++ b/.typedoc/custom-theme.mjs @@ -83,18 +83,13 @@ class ClerkMarkdownThemeContext extends MarkdownThemeContext { const parametersIndex = splitOutput.findIndex(item => item.includes('## Parameters')); if (parametersIndex !== -1) { - // Find the immediate next heading after Parameters - let nextHeadingIndex = -1; - for (let i = parametersIndex + 1; i < splitOutput.length; i++) { - const item = splitOutput[i].trim(); - - // The next header has to, at a minimum, start with ## - // because it comes after '## Parameters' - if (item.match(/^##/)) { - nextHeadingIndex = i; - break; - } - } + // Find the immediate next heading after '## Parameters' + const nextHeadingIndex = splitOutput.findIndex((item, index) => { + // Skip the items before the parameters + if (index <= parametersIndex) return false; + // Find the next heading + return item.startsWith('##') || item.startsWith('\n##'); + }); // Insert the stuff before the next heading // (or at the end of the entire page if no heading found)