@utilix-tech/sdk 0.86.0 → 0.88.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  Full release notes for all Utilix surfaces (browser tools, REST API, SDKs, MCP server) live at [utilix.tech/changelog](https://utilix.tech/changelog). This file tracks just this package.
4
4
 
5
+ ## 0.88.0
6
+ - Add `validateMermaidSyntax` (mermaid-syntax-validator): check a Mermaid diagram definition for syntax errors with line numbers, including an unterminated subgraph, unbalanced node brackets, a malformed edge arrow, and a sequence-diagram participant referenced before its explicit declaration.
7
+ - Add `calculateAnnuityPayout` (annuity-payout-calculator): solve the standard annuity formula in either direction, the periodic payout a lump sum funds, or the lump sum required to fund a target payout, for an ordinary or annuity-due structure.
8
+
9
+ ## 0.87.0
10
+ - Add `validateMarkdownHeadingHierarchy` (markdown-heading-hierarchy-validator): scan a Markdown document's ATX headings and flag heading-structure issues: skipped levels, multiple H1s, empty headings, duplicate headings at the same level, and a document that doesn't start at H1.
11
+
5
12
  ## 0.86.0
6
13
  - Add `calculateSalesCommission` (sales-commission-calculator): compute a flat or tiered (marginal) sales commission from a sale amount, where tiered mode applies each rate only to the slice of sales within that tier, plus an optional base salary added to the total payout.
7
14
  - Add `buildCharacterClass` (regex-character-class-builder): assemble a `[...]` regex character class from named building blocks (lowercase, uppercase, digits, whitespace), custom ranges, and literal custom characters, with optional negation.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/sdk
2
2
 
3
- **724 developer utility functions for Node.js: runs locally, no API key required.**
3
+ **727 developer utility functions for Node.js: runs locally, no API key required.**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@utilix-tech/sdk?style=flat-square&color=cb3837)](https://www.npmjs.com/package/@utilix-tech/sdk)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/@utilix-tech/sdk?style=flat-square)](https://www.npmjs.com/package/@utilix-tech/sdk)
@@ -1049,13 +1049,13 @@ readMidiInfo(new Uint8Array(midiBytes));
1049
1049
  | `@utilix-tech/sdk/encoding` | Base64, URL, HTML entities, Base32/Base58/Base62 encode/decode |
1050
1050
  | `@utilix-tech/sdk/hashing` | MD5, SHA-1/256/512, bcrypt, HMAC, .htpasswd, SRI hashes, content-hash ETag generation |
1051
1051
  | `@utilix-tech/sdk/text` | Case convert, slugify, word count, lorem ipsum, line ops, HTML→Markdown, Levenshtein/Damerau string distance, readability scoring, sentence length distribution, emoji lookup |
1052
- | `@utilix-tech/sdk/data` | CSV, YAML, TOML, XML, INI, NDJSON parse and convert, NDJSON record deduplicator, SRT/WebVTT subtitles, Markdown front matter parser, YAML anchor/alias resolver, CSV column type inferencer, Markdown table column aligner |
1052
+ | `@utilix-tech/sdk/data` | CSV, YAML, TOML, XML, INI, NDJSON parse and convert, NDJSON record deduplicator, SRT/WebVTT subtitles, Markdown front matter parser, YAML anchor/alias resolver, CSV column type inferencer, Markdown table column aligner, Markdown heading hierarchy validator |
1053
1053
  | `@utilix-tech/sdk/generators` | UUID v4/v7, ULID, passwords, strength check, entropy estimator, fake data, CSP nonce generator |
1054
1054
  | `@utilix-tech/sdk/time` | Date diff, timezone convert, cron parse, relative time |
1055
- | `@utilix-tech/sdk/units` | Bytes, CSS px/rem, number bases, currency format, credit card/IBAN/barcode/ISBN/VIN/ISIN validation, loan calculator, EMI calculator, compound/simple interest calculators, VAT/sales tax calculator, tip/bill split calculator, break-even point calculator, Rule of 72 calculator, savings goal calculator, ROI calculator, cash denomination/till calculator, payback period calculator, CD maturity calculator, debt-to-income ratio calculator, freelancer hourly rate calculator, debt snowball/avalanche payoff planner, tax-equivalent yield calculator, mortgage discount points break-even calculator, loan prepayment penalty calculator, data transfer time / required bandwidth estimator, real rate of return (Fisher equation) calculator, sales commission calculator (flat or tiered) |
1055
+ | `@utilix-tech/sdk/units` | Bytes, CSS px/rem, number bases, currency format, credit card/IBAN/barcode/ISBN/VIN/ISIN validation, loan calculator, EMI calculator, compound/simple interest calculators, VAT/sales tax calculator, tip/bill split calculator, break-even point calculator, Rule of 72 calculator, savings goal calculator, ROI calculator, cash denomination/till calculator, payback period calculator, CD maturity calculator, debt-to-income ratio calculator, freelancer hourly rate calculator, debt snowball/avalanche payoff planner, tax-equivalent yield calculator, mortgage discount points break-even calculator, loan prepayment penalty calculator, data transfer time / required bandwidth estimator, real rate of return (Fisher equation) calculator, sales commission calculator (flat or tiered), annuity payout calculator |
1056
1056
  | `@utilix-tech/sdk/network` | HTTP status codes, IP validation, country flags, geolocation URLs, HAR file parsing, User-Agent parsing, IPv6 address compress/expand, Permissions-Policy header builder, Client Hints header builder/parser, Content-Disposition header builder/parser, X-Content-Type-Options header builder/risk assessor, sitemap.xml validator, sitemap index splitter, robots.txt validator, robots.txt generator, Prefer header builder/parser (RFC 7240), Retry-After header builder/parser (RFC 9110), Priority header builder/parser (RFC 9218), WebSocket close code reference/lookup, Strict-Transport-Security (HSTS) header builder/parser, X-Robots-Tag header builder/parser, WebSocket frame opcode reference/lookup, robots meta tag builder/parser, Cookie header byte-size budget calculator |
1057
1057
  | `@utilix-tech/sdk/api` | cURL build/parse, JWT decode/sign, JWKS parse, CORS headers, CSP header, TOTP/HOTP code generator, webhook HMAC signature verifier |
1058
- | `@utilix-tech/sdk/code` | SQL format/minify, HTML format/minify, regex tester, GraphQL format, MIME type lookup, GitHub URL parsing, regex ReDoS detector, Conventional Commits linter, package.json exports field validator, package.json dependency range auditor, regex capture group/backreference visualizer, SVG sprite symbol extractor, ARIA role & attribute validator, database connection string parser, Markdown code fence language tag validator, SQL query parameter placeholder counter, Markdown link reference extractor, regex character class builder |
1058
+ | `@utilix-tech/sdk/code` | SQL format/minify, HTML format/minify, regex tester, GraphQL format, MIME type lookup, GitHub URL parsing, regex ReDoS detector, Conventional Commits linter, package.json exports field validator, package.json dependency range auditor, regex capture group/backreference visualizer, SVG sprite symbol extractor, ARIA role & attribute validator, database connection string parser, Markdown code fence language tag validator, SQL query parameter placeholder counter, Markdown link reference extractor, regex character class builder, Dockerfile linter, Mermaid diagram syntax validator |
1059
1059
  | `@utilix-tech/sdk/color` | Hex/RGB/HSL/HSV/CMYK convert, palette generation, contrast check |
1060
1060
  | `@utilix-tech/sdk/css` | CSS gradient, box-shadow, border-radius, keyframe animation generators |
1061
1061
  | `@utilix-tech/sdk/misc` | SVG optimize/sanitize, file size format, Unicode inspector |
@@ -54,6 +54,7 @@ __export(data_exports, {
54
54
  tomlToJson: () => tomlToJson,
55
55
  validateEnvKey: () => validateEnvKey,
56
56
  validateIni: () => validateIni,
57
+ validateMarkdownHeadingHierarchy: () => validateMarkdownHeadingHierarchy,
57
58
  validateNdjson: () => validateNdjson,
58
59
  validateToml: () => validateToml,
59
60
  validateXml: () => validateXml,
@@ -1580,6 +1581,84 @@ function generateMarkdownToc(markdown, options = {}) {
1580
1581
  });
1581
1582
  return { toc: tocLines.join("\n"), entries };
1582
1583
  }
1584
+ var HEADING_HIERARCHY_RE = /^(#{1,6})(?!#)(?:[ \t]+(.*?))?[ \t]*#*[ \t]*$/;
1585
+ function validateMarkdownHeadingHierarchy(markdown) {
1586
+ const lines = markdown.replace(/\r\n/g, "\n").split("\n");
1587
+ const headings = [];
1588
+ let inFence = false;
1589
+ let fenceMarker = "";
1590
+ for (let i = 0; i < lines.length; i++) {
1591
+ const line = lines[i];
1592
+ const fenceMatch = line.match(/^\s*(```+|~~~+)/);
1593
+ if (fenceMatch) {
1594
+ if (!inFence) {
1595
+ inFence = true;
1596
+ fenceMarker = fenceMatch[1][0];
1597
+ } else if (fenceMatch[1][0] === fenceMarker) {
1598
+ inFence = false;
1599
+ }
1600
+ continue;
1601
+ }
1602
+ if (inFence) continue;
1603
+ const match = line.match(HEADING_HIERARCHY_RE);
1604
+ if (!match) continue;
1605
+ const level = match[1].length;
1606
+ const text = stripInlineMarkdown(match[2] ?? "");
1607
+ headings.push({ line: i + 1, level, text });
1608
+ }
1609
+ const issues = [];
1610
+ const seen = /* @__PURE__ */ new Map();
1611
+ let h1Count = 0;
1612
+ let firstH1Line = null;
1613
+ let prevLevel = null;
1614
+ headings.forEach((h, idx) => {
1615
+ if (h.text === "") {
1616
+ issues.push({ line: h.line, type: "empty-heading", message: `Heading at line ${h.line} has no text` });
1617
+ }
1618
+ if (idx === 0 && h.level !== 1) {
1619
+ issues.push({
1620
+ line: h.line,
1621
+ type: "starts-below-h1",
1622
+ message: `Document starts with an H${h.level} heading instead of H1`
1623
+ });
1624
+ }
1625
+ if (h.level === 1) {
1626
+ h1Count++;
1627
+ if (h1Count === 1) {
1628
+ firstH1Line = h.line;
1629
+ } else {
1630
+ issues.push({
1631
+ line: h.line,
1632
+ type: "multiple-h1",
1633
+ message: `Multiple H1 headings found: another H1 at line ${h.line} (first was at line ${firstH1Line})`
1634
+ });
1635
+ }
1636
+ }
1637
+ if (prevLevel !== null && h.level > prevLevel + 1) {
1638
+ const skipped = h.level - prevLevel > 2 ? `H${prevLevel + 1}-H${h.level - 1}` : `H${prevLevel + 1}`;
1639
+ issues.push({
1640
+ line: h.line,
1641
+ type: "skipped-level",
1642
+ message: `Heading level jumps from H${prevLevel} to H${h.level} at line ${h.line}, skipping ${skipped}`
1643
+ });
1644
+ }
1645
+ prevLevel = h.level;
1646
+ if (h.text !== "") {
1647
+ const key = `${h.level}:${h.text.toLowerCase()}`;
1648
+ const earlierLine = seen.get(key);
1649
+ if (earlierLine !== void 0) {
1650
+ issues.push({
1651
+ line: h.line,
1652
+ type: "duplicate-heading",
1653
+ message: `Heading "${h.text}" at line ${h.line} duplicates an H${h.level} heading at line ${earlierLine}`
1654
+ });
1655
+ } else {
1656
+ seen.set(key, h.line);
1657
+ }
1658
+ }
1659
+ });
1660
+ return { headings, issues, h1Count };
1661
+ }
1583
1662
  function quoteSqlIdentifier(name, dialect) {
1584
1663
  if (dialect === "mysql") return "`" + name.replace(/`/g, "``") + "`";
1585
1664
  return '"' + name.replace(/"/g, '""') + '"';
@@ -1976,4 +2055,4 @@ function alignMarkdownTables(markdown) {
1976
2055
  return { output: outputLines.join("\n"), tables, warnings };
1977
2056
  }
1978
2057
 
1979
- export { alignMarkdownTables, analyzeCaptionSpeed, calculateMarkdownTaskListProgress, convertSubtitles, csvToJson, csvToSqlInsert, data_exports, dedupeNdjson, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, inferCsvColumnTypes, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToCsv, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
2058
+ export { alignMarkdownTables, analyzeCaptionSpeed, calculateMarkdownTaskListProgress, convertSubtitles, csvToJson, csvToSqlInsert, data_exports, dedupeNdjson, detectDelimiter, detectSubtitleFormat, diffEnvExample, envToExport, envToJson, findCsvDuplicateRows, formatNdjson, formatSubtitleTimestamp, formatToml, formatXml, generateMarkdownToc, getSection, getSectionNames, getTomlStats, getXmlStats, getYamlStats, inferCsvColumnTypes, iniToJson, jsonArrayToNdjson, jsonToIni, jsonToToml, jsonToXml, minifyNdjson, minifyToml, minifyXml, ndjsonToCsv, ndjsonToJsonArray, parseCsv, parseEnv, parseFrontMatter, parseIni, parseSubtitleTimestamp, parseSubtitles, parseXmlToObject, resolveYamlAnchors, serializeSubtitles, shiftSubtitles, stringifyIni, toCsvString, tomlToJson, validateEnvKey, validateIni, validateMarkdownHeadingHierarchy, validateNdjson, validateToml, validateXml, validateYaml, xmlToJson };
@@ -70,6 +70,7 @@ __export(code_exports, {
70
70
  validateEditorConfig: () => validateEditorConfig,
71
71
  validateEnvKey: () => validateEnvKey,
72
72
  validateFenceLanguageTags: () => validateFenceLanguageTags,
73
+ validateMermaidSyntax: () => validateMermaidSyntax,
73
74
  validatePackageExports: () => validatePackageExports,
74
75
  validateTsconfig: () => validateTsconfig
75
76
  });
@@ -1976,6 +1977,123 @@ function lintDockerfile(content) {
1976
1977
  }
1977
1978
  return { findings, stages };
1978
1979
  }
1980
+ var MERMAID_DIAGRAM_TYPES = {
1981
+ flowchart: "flowchart",
1982
+ graph: "flowchart",
1983
+ sequencediagram: "sequenceDiagram",
1984
+ classdiagram: "classDiagram",
1985
+ statediagram: "stateDiagram",
1986
+ "statediagram-v2": "stateDiagram",
1987
+ erdiagram: "erDiagram",
1988
+ pie: "pie"
1989
+ };
1990
+ var _MERMAID_ARROW_RE = /(-\.->|==>|--x|--o|-\.-|-->|---|===)/i;
1991
+ function _checkMermaidFlowchart(lines, fromLine, issues) {
1992
+ const subgraphStack = [];
1993
+ for (let i = fromLine; i < lines.length; i++) {
1994
+ const lineNo = i + 1;
1995
+ const trimmed = lines[i].split("%%")[0].trim();
1996
+ if (trimmed === "") continue;
1997
+ const firstToken = trimmed.split(/\s+/)[0];
1998
+ if (firstToken === "subgraph") {
1999
+ subgraphStack.push(lineNo);
2000
+ continue;
2001
+ }
2002
+ if (trimmed === "end") {
2003
+ if (subgraphStack.length === 0) {
2004
+ issues.push({ rule: "unexpected-end", line: lineNo, message: "'end' with no matching 'subgraph' to close" });
2005
+ } else {
2006
+ subgraphStack.pop();
2007
+ }
2008
+ continue;
2009
+ }
2010
+ const opens = (trimmed.match(/[[({]/g) || []).length;
2011
+ const closes = (trimmed.match(/[\])}]/g) || []).length;
2012
+ if (opens !== closes) {
2013
+ issues.push({
2014
+ rule: "unbalanced-brackets",
2015
+ line: lineNo,
2016
+ message: `Unbalanced brackets in node/edge definition: ${opens} opening vs ${closes} closing`
2017
+ });
2018
+ }
2019
+ const segments = trimmed.split(_MERMAID_ARROW_RE);
2020
+ if (segments.length > 1) {
2021
+ let missingNode = false;
2022
+ for (let s = 0; s < segments.length; s += 2) {
2023
+ if (segments[s].trim() === "") missingNode = true;
2024
+ }
2025
+ if (missingNode) {
2026
+ issues.push({ rule: "malformed-edge", line: lineNo, message: "Edge arrow is missing a node on one side" });
2027
+ }
2028
+ }
2029
+ }
2030
+ for (const openLine of subgraphStack) {
2031
+ issues.push({
2032
+ rule: "unterminated-subgraph",
2033
+ line: openLine,
2034
+ message: "'subgraph' opened here is never closed with a matching 'end'"
2035
+ });
2036
+ }
2037
+ }
2038
+ var _MERMAID_SEQ_DECL_RE = /^(participant|actor)\s+(\S+)/i;
2039
+ var _MERMAID_SEQ_MSG_RE = /^([A-Za-z0-9_]+)\s*(-{1,2}>{1,2}|-{1,2}x|-{1,2}\))\s*([A-Za-z0-9_]+)\s*:/i;
2040
+ function _checkMermaidSequenceDiagram(lines, fromLine, issues) {
2041
+ const declaredAtLine = {};
2042
+ for (let i = fromLine; i < lines.length; i++) {
2043
+ const trimmed = lines[i].split("%%")[0].trim();
2044
+ if (trimmed === "") continue;
2045
+ const m = trimmed.match(_MERMAID_SEQ_DECL_RE);
2046
+ if (m && declaredAtLine[m[2]] === void 0) declaredAtLine[m[2]] = i + 1;
2047
+ }
2048
+ for (let i = fromLine; i < lines.length; i++) {
2049
+ const lineNo = i + 1;
2050
+ const trimmed = lines[i].split("%%")[0].trim();
2051
+ if (trimmed === "") continue;
2052
+ const m = trimmed.match(_MERMAID_SEQ_MSG_RE);
2053
+ if (!m) continue;
2054
+ for (const id of [m[1], m[3]]) {
2055
+ const declaredLine = declaredAtLine[id];
2056
+ if (declaredLine !== void 0 && declaredLine > lineNo) {
2057
+ issues.push({
2058
+ rule: "participant-before-declared",
2059
+ line: lineNo,
2060
+ message: `Participant '${id}' is referenced here but not explicitly declared (with 'participant' or 'actor') until line ${declaredLine}`
2061
+ });
2062
+ }
2063
+ }
2064
+ }
2065
+ }
2066
+ function validateMermaidSyntax(input) {
2067
+ if (!input || !input.trim()) return { error: "Diagram text is required" };
2068
+ const lines = input.replace(/\r\n/g, "\n").split("\n");
2069
+ const issues = [];
2070
+ let headerLine = -1;
2071
+ let headerText = "";
2072
+ for (let i = 0; i < lines.length; i++) {
2073
+ const trimmed = lines[i].trim();
2074
+ if (trimmed === "" || trimmed.startsWith("%%")) continue;
2075
+ headerLine = i + 1;
2076
+ headerText = trimmed;
2077
+ break;
2078
+ }
2079
+ if (headerLine === -1) return { error: "Diagram text is required" };
2080
+ const firstWord = headerText.split(/\s+/)[0];
2081
+ const diagramType = MERMAID_DIAGRAM_TYPES[firstWord.toLowerCase()] ?? null;
2082
+ if (!diagramType) {
2083
+ issues.push({
2084
+ rule: "unrecognized-diagram-type",
2085
+ line: headerLine,
2086
+ message: `"${firstWord}" is not a recognized Mermaid diagram type (expected one of: flowchart/graph, sequenceDiagram, classDiagram, stateDiagram, erDiagram, pie)`
2087
+ });
2088
+ return { diagramType: null, valid: false, issues };
2089
+ }
2090
+ if (diagramType === "flowchart") {
2091
+ _checkMermaidFlowchart(lines, headerLine, issues);
2092
+ } else if (diagramType === "sequenceDiagram") {
2093
+ _checkMermaidSequenceDiagram(lines, headerLine, issues);
2094
+ }
2095
+ return { diagramType, valid: issues.length === 0, issues };
2096
+ }
1979
2097
  function removeJsComments(code) {
1980
2098
  let result = "";
1981
2099
  let i = 0;
@@ -4500,4 +4618,4 @@ function buildCharacterClass(options) {
4500
4618
  return { pattern, negate, includes };
4501
4619
  }
4502
4620
 
4503
- export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, KNOWN_LANGUAGE_TAGS, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, analyzeRegexGroups, auditDependencyRanges, buildCharacterClass, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, countSqlPlaceholders, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, extractMarkdownFootnotes, extractMarkdownLinkReferences, extractSvgSpriteSymbols, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lintDockerfile, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseCommitTrailers, parseConnectionString, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateAria, validateEditorConfig, validateEnvKey, validateFenceLanguageTags, validatePackageExports, validateTsconfig };
4621
+ export { ALL_FLAGS, CHEATSHEET, DEFAULT_COMMIT_TYPES, KNOWN_LANGUAGE_TAGS, MIME_TABLE, OPERATIONS, SQL_DEFAULT_OPTIONS, analyzeRegexGroups, auditDependencyRanges, buildCharacterClass, buildDockerPull, buildDockerRun, buildGitCommand, code_exports, collapseHtmlWhitespace, collapseJsWhitespace, countProperties, countRules, countSqlPlaceholders, detectDialect, detectOperationType, detectRedos, envToExport, envToJson, extractMarkdownFootnotes, extractMarkdownLinkReferences, extractSvgSpriteSymbols, formatCss, formatGql, formatHtml, formatSql, getEndpointsByTag, getHtmlStats, getJsStats, getMethodColor, isValidTag, lintConventionalCommit, lintDockerfile, lookupMime, minifyCss, minifyGql, minifyHtml, minifyJs, minifySql, normalizeRef, parseCommitTrailers, parseConnectionString, parseDockerImage, parseEnv, parseGitCommand, parseGithubUrl, parseSpec, removeConsoleCalls, removeEmptyAttributes, removeHtmlComments, removeJsComments, removeRedundantAttributes, searchCheatsheet, searchEndpoints, splitStatements, testGitignorePatterns, testPattern, testRegex, validateAria, validateEditorConfig, validateEnvKey, validateFenceLanguageTags, validateMermaidSyntax, validatePackageExports, validateTsconfig };
@@ -21,6 +21,7 @@ __export(units_exports, {
21
21
  bumpVersion: () => bumpVersion,
22
22
  calcAspectRatio: () => calcAspectRatio,
23
23
  calcSubnet: () => calcSubnet,
24
+ calculateAnnuityPayout: () => calculateAnnuityPayout,
24
25
  calculateBlendedLoanRate: () => calculateBlendedLoanRate,
25
26
  calculateBreakEven: () => calculateBreakEven,
26
27
  calculateCashBreakdown: () => calculateCashBreakdown,
@@ -1871,6 +1872,56 @@ function calculateSavingsGoal(input) {
1871
1872
  finalBalance: round4(goalAmount)
1872
1873
  };
1873
1874
  }
1875
+ function calculateAnnuityPayout(input) {
1876
+ const { mode, structure, years, paymentsPerYear, annualRatePercent, principal, periodicPayout } = input;
1877
+ if (mode !== "payout-from-principal" && mode !== "principal-from-payout") {
1878
+ return { error: "mode must be 'payout-from-principal' or 'principal-from-payout'" };
1879
+ }
1880
+ if (structure !== "ordinary" && structure !== "due") {
1881
+ return { error: "structure must be 'ordinary' or 'due'" };
1882
+ }
1883
+ if (!Number.isInteger(years) || years <= 0) return { error: "years must be a positive whole number" };
1884
+ if (!Number.isInteger(paymentsPerYear) || paymentsPerYear <= 0) {
1885
+ return { error: "paymentsPerYear must be a positive whole number" };
1886
+ }
1887
+ if (!Number.isFinite(annualRatePercent) || annualRatePercent < 0) {
1888
+ return { error: "annualRatePercent must be a finite, non-negative number" };
1889
+ }
1890
+ const periods = years * paymentsPerYear;
1891
+ const r = annualRatePercent / 100 / paymentsPerYear;
1892
+ const round22 = (n) => Math.round(n * 100) / 100;
1893
+ let factor = r === 0 ? periods : (1 - Math.pow(1 + r, -periods)) / r;
1894
+ if (structure === "due") factor *= 1 + r;
1895
+ let resolvedPrincipal;
1896
+ let resolvedPayout;
1897
+ if (mode === "payout-from-principal") {
1898
+ if (typeof principal !== "number" || !Number.isFinite(principal) || principal <= 0) {
1899
+ return { error: 'principal must be a finite number greater than zero for mode "payout-from-principal"' };
1900
+ }
1901
+ resolvedPrincipal = principal;
1902
+ resolvedPayout = principal / factor;
1903
+ } else {
1904
+ if (typeof periodicPayout !== "number" || !Number.isFinite(periodicPayout) || periodicPayout <= 0) {
1905
+ return { error: 'periodicPayout must be a finite number greater than zero for mode "principal-from-payout"' };
1906
+ }
1907
+ resolvedPayout = periodicPayout;
1908
+ resolvedPrincipal = periodicPayout * factor;
1909
+ }
1910
+ const totalPaid = resolvedPayout * periods;
1911
+ const totalInterest = totalPaid - resolvedPrincipal;
1912
+ return {
1913
+ mode,
1914
+ structure,
1915
+ years,
1916
+ paymentsPerYear,
1917
+ periods,
1918
+ annualRatePercent,
1919
+ principal: round22(resolvedPrincipal),
1920
+ periodicPayout: round22(resolvedPayout),
1921
+ totalPaid: round22(totalPaid),
1922
+ totalInterest: round22(totalInterest)
1923
+ };
1924
+ }
1874
1925
  function calculateRoi(input) {
1875
1926
  const { initialValue, finalValue, years } = input;
1876
1927
  if (!Number.isFinite(initialValue) || initialValue <= 0) {
@@ -2935,4 +2986,4 @@ function calculateSalesCommission(input) {
2935
2986
  };
2936
2987
  }
2937
2988
 
2938
- export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditCardMinimumPayment, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRealRateOfReturn, calculateRequiredBandwidth, calculateRoi, calculateRuleOf72, calculateSalesCommission, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateTransferTime, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateVin, viewportToPx };
2989
+ export { BASE_LABELS, BASE_PREFIXES, BYTE_UNITS, COMMON_CURRENCIES, COMMON_LOCALES, COMMON_PERMISSIONS, COMMON_RATIOS, COMMON_SIZES, COMMON_TAX_RATES, COMMON_TIP_PERCENTAGES, COMMON_VIEWPORTS, GPA_GRADE_POINTS, USD_DENOMINATIONS, applySuccessiveDiscounts, autoFormat, bumpVersion, calcAspectRatio, calcSubnet, calculateAnnuityPayout, calculateBlendedLoanRate, calculateBreakEven, calculateCashBreakdown, calculateCashRounding, calculateCdMaturity, calculateChange, calculateCompoundInterest, calculateCreditCardMinimumPayment, calculateCreditUtilization, calculateDebtToIncomeRatio, calculateDepreciationSchedule, calculateDiscount, calculateEmi, calculateExtraPaymentPayoff, calculateFreelancerRate, calculateGpa, calculateLoan, calculateLoanPrepaymentPenalty, calculateLoanRefinance, calculateMarginMarkup, calculateMortgagePoints, calculateMovingAverages, calculatePaybackPeriod, calculatePercentageChange, calculateRealRateOfReturn, calculateRequiredBandwidth, calculateRoi, calculateRuleOf72, calculateSalesCommission, calculateSavingsGoal, calculateSimpleInterest, calculateTax, calculateTaxEquivalentYield, calculateTimeValue, calculateTipSplit, calculateTransferTime, calculateVideoBitrate, compareSemver, compareUnitPrices, convert, convertAprApy, convertBytes, convertIp, coverBox, decimalToIp, decimalToIpCidr, describePermissions, fitIntoBox, formatNumber, formatValue, formatVwValue, formatWithSeparator, gcd, ipFromBinary, ipFromDecimal, ipFromHex, ipToBinary, ipToDecimal, ipToDecimalCidr, ipToHex, ipToOctal, isValid, isValidCidr, isValidIp, isValidIpv4, marginToMarkup, markupToMargin, octalToPermissions, parseFileSize, parseInput, parseNumberString, parseSemver, permissionsToChmod, permissionsToOctal, permissionsToSymbolic, planDebtPayoff, ptToPx, pxToAll, pxToViewport, remToPx, satisfiesRange, scaleByHeight, scaleByWidth, sortVersions, splitSubnet, symbolicToPermissions, units_exports, validateBarcode, validateCardNumber, validateIban, validateIsbn, validateIsin, validateVin, viewportToPx };
@@ -36,6 +36,7 @@
36
36
  * - markdown-fence-lang-validator (validateFenceLanguageTags, KNOWN_LANGUAGE_TAGS)
37
37
  * - sql-placeholder-counter (countSqlPlaceholders)
38
38
  * - regex-character-class-builder (buildCharacterClass)
39
+ * - mermaid-syntax-validator (validateMermaidSyntax)
39
40
  */
40
41
  type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
41
42
  declare const ALL_FLAGS: RegexFlag[];
@@ -203,6 +204,34 @@ interface DockerfileLintResult {
203
204
  declare function lintDockerfile(content: string): DockerfileLintResult | {
204
205
  error: string;
205
206
  };
207
+ type MermaidSyntaxRule = 'unrecognized-diagram-type' | 'unterminated-subgraph' | 'unexpected-end' | 'unbalanced-brackets' | 'malformed-edge' | 'participant-before-declared';
208
+ interface MermaidSyntaxIssue {
209
+ rule: MermaidSyntaxRule;
210
+ line: number;
211
+ message: string;
212
+ }
213
+ interface MermaidSyntaxResult {
214
+ diagramType: string | null;
215
+ valid: boolean;
216
+ issues: MermaidSyntaxIssue[];
217
+ }
218
+ /**
219
+ * Heuristic syntax validation for a Mermaid diagram definition: recognizes
220
+ * flowchart/graph, sequenceDiagram, classDiagram, stateDiagram(-v2),
221
+ * erDiagram, and pie by their header keyword, then runs diagram-specific
222
+ * structural checks. Flowcharts are checked for an unterminated `subgraph`,
223
+ * a stray `end`, unbalanced node brackets, and an edge arrow missing a node
224
+ * on either side. Sequence diagrams are checked for a participant whose
225
+ * first message reference comes before its explicit `participant`/`actor`
226
+ * declaration later in the file (a participant never declared explicitly
227
+ * is not flagged, since Mermaid auto-creates it on first use). This is a
228
+ * line-based heuristic, not a full Mermaid grammar: it never renders the
229
+ * diagram, and a bracket-like substring inside a quoted node label can
230
+ * produce a false positive.
231
+ */
232
+ declare function validateMermaidSyntax(input: string): MermaidSyntaxResult | {
233
+ error: string;
234
+ };
206
235
  interface JsMinifyOptions {
207
236
  removeComments?: boolean;
208
237
  collapseWhitespace?: boolean;
@@ -871,6 +900,9 @@ type code_MarkdownFootnoteReference = MarkdownFootnoteReference;
871
900
  type code_MarkdownFootnoteResult = MarkdownFootnoteResult;
872
901
  type code_MarkdownLinkReferenceResult = MarkdownLinkReferenceResult;
873
902
  type code_MatchResult = MatchResult;
903
+ type code_MermaidSyntaxIssue = MermaidSyntaxIssue;
904
+ type code_MermaidSyntaxResult = MermaidSyntaxResult;
905
+ type code_MermaidSyntaxRule = MermaidSyntaxRule;
874
906
  type code_MimeEntry = MimeEntry;
875
907
  type code_MimeLookupResult = MimeLookupResult;
876
908
  declare const code_OPERATIONS: typeof OPERATIONS;
@@ -960,10 +992,11 @@ declare const code_validateAria: typeof validateAria;
960
992
  declare const code_validateEditorConfig: typeof validateEditorConfig;
961
993
  declare const code_validateEnvKey: typeof validateEnvKey;
962
994
  declare const code_validateFenceLanguageTags: typeof validateFenceLanguageTags;
995
+ declare const code_validateMermaidSyntax: typeof validateMermaidSyntax;
963
996
  declare const code_validatePackageExports: typeof validatePackageExports;
964
997
  declare const code_validateTsconfig: typeof validateTsconfig;
965
998
  declare namespace code {
966
- export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CharClassOptions as CharClassOptions, type code_CharClassResult as CharClassResult, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, type code_DockerImageRef as DockerImageRef, type code_DockerfileLintFinding as DockerfileLintFinding, type code_DockerfileLintResult as DockerfileLintResult, type code_DockerfileStage as DockerfileStage, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, type code_LinkReferenceDefinition as LinkReferenceDefinition, type code_LinkReferenceUsage as LinkReferenceUsage, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, type code_MarkdownLinkReferenceResult as MarkdownLinkReferenceResult, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, type code_ResolvedLinkReference as ResolvedLinkReference, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, code_buildCharacterClass as buildCharacterClass, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractMarkdownLinkReferences as extractMarkdownLinkReferences, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lintDockerfile as lintDockerfile, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
999
+ export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CharClassOptions as CharClassOptions, type code_CharClassResult as CharClassResult, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, type code_DockerImageRef as DockerImageRef, type code_DockerfileLintFinding as DockerfileLintFinding, type code_DockerfileLintResult as DockerfileLintResult, type code_DockerfileStage as DockerfileStage, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, type code_LinkReferenceDefinition as LinkReferenceDefinition, type code_LinkReferenceUsage as LinkReferenceUsage, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, type code_MarkdownLinkReferenceResult as MarkdownLinkReferenceResult, type code_MatchResult as MatchResult, type code_MermaidSyntaxIssue as MermaidSyntaxIssue, type code_MermaidSyntaxResult as MermaidSyntaxResult, type code_MermaidSyntaxRule as MermaidSyntaxRule, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, type code_ResolvedLinkReference as ResolvedLinkReference, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, code_buildCharacterClass as buildCharacterClass, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractMarkdownLinkReferences as extractMarkdownLinkReferences, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lintDockerfile as lintDockerfile, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validateMermaidSyntax as validateMermaidSyntax, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
967
1000
  }
968
1001
 
969
- export { type HtmlMinifyResult as $, ALL_FLAGS as A, type DockerfileLintFinding as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type DockerfileLintResult as E, type DockerfileStage as F, type EditorConfigIssue as G, type EditorConfigProperty as H, type EditorConfigSection as I, type EditorConfigValidationResult as J, type EnvEntry as K, type EnvParseResult as L, type ExportsIssue as M, type ExportsShape as N, type ExportsValidationResult as O, type FenceTagIssue as P, type FenceTagIssueType as Q, type FenceValidationResult as R, type GitCommandConfig as S, type GitCommandResult as T, type GitOperation as U, type GithubUrlInfo as V, type GithubUrlType as W, type GitignoreTestResult as X, type GqlFormatResult as Y, type HtmlFormatResult as Z, type HtmlMinifyOptions as _, type ApiEndpoint as a, formatSql as a$, type JsMinifyOptions as a0, type JsMinifyResult as a1, KNOWN_LANGUAGE_TAGS as a2, type LinkReferenceDefinition as a3, type LinkReferenceUsage as a4, MIME_TABLE as a5, type MarkdownFootnoteDefinition as a6, type MarkdownFootnoteReference as a7, type MarkdownFootnoteResult as a8, type MarkdownLinkReferenceResult as a9, type SvgSpriteResult as aA, type SvgSpriteSymbol as aB, type TestPatternResult as aC, type TsconfigIssue as aD, type TsconfigValidationResult as aE, analyzeRegexGroups as aF, auditDependencyRanges as aG, buildCharacterClass as aH, buildDockerPull as aI, buildDockerRun as aJ, buildGitCommand as aK, collapseHtmlWhitespace as aL, collapseJsWhitespace as aM, countProperties as aN, countRules as aO, countSqlPlaceholders as aP, detectDialect as aQ, detectOperationType as aR, detectRedos as aS, envToExport as aT, envToJson as aU, extractMarkdownFootnotes as aV, extractMarkdownLinkReferences as aW, extractSvgSpriteSymbols as aX, formatCss as aY, formatGql as aZ, formatHtml as a_, type MatchResult as aa, type MimeEntry as ab, type MimeLookupResult as ac, OPERATIONS as ad, type ParsedSpec as ae, type PlaceholderStyle as af, type RedosFinding as ag, type RedosResult as ah, type RedosSeverity as ai, type RegexBackreferenceInfo as aj, type RegexError as ak, type RegexFlag as al, type RegexGroupAnalysis as am, type RegexGroupInfo as an, type RegexGroupIssue as ao, type RegexMatch as ap, type RegexResult as aq, type RegexSuccess as ar, type ResolvedLinkReference as as, SQL_DEFAULT_OPTIONS as at, type Segment as au, type SpecVersion as av, type SqlDialect as aw, type SqlFormatOptions as ax, type SqlPlaceholder as ay, type SqlPlaceholderResult as az, type ApiInfo as b, getEndpointsByTag as b0, getHtmlStats as b1, getJsStats as b2, getMethodColor as b3, isValidTag as b4, lintConventionalCommit as b5, lintDockerfile as b6, lookupMime as b7, minifyCss as b8, minifyGql as b9, validatePackageExports as bA, validateTsconfig as bB, minifyHtml as ba, minifyJs as bb, minifySql as bc, normalizeRef as bd, parseCommitTrailers as be, parseConnectionString as bf, parseDockerImage as bg, parseEnv as bh, parseGitCommand as bi, parseGithubUrl as bj, parseSpec as bk, removeConsoleCalls as bl, removeEmptyAttributes as bm, removeHtmlComments as bn, removeJsComments as bo, removeRedundantAttributes as bp, searchCheatsheet as bq, searchEndpoints as br, splitStatements as bs, testGitignorePatterns as bt, testPattern as bu, testRegex as bv, validateAria as bw, validateEditorConfig as bx, validateEnvKey as by, validateFenceLanguageTags as bz, code as c, type AriaIssue as d, type AriaValidationResult as e, type CharClassOptions as f, type CharClassResult as g, type CheatsheetEntry as h, type CommitTrailer as i, type CommitTrailerResult as j, type ConnectionStringHost as k, type ConnectionStringResult as l, type ConventionalCommitFinding as m, type ConventionalCommitFooter as n, type ConventionalCommitOptions as o, type ConventionalCommitParsed as p, type ConventionalCommitResult as q, type ConventionalCommitSeverity as r, type CssResult as s, type DependencyAuditDuplicate as t, type DependencyAuditEntry as u, type DependencyAuditIssue as v, type DependencyAuditResult as w, type DependencyRangeType as x, type DependencySection as y, type DockerImageRef as z };
1002
+ export { type HtmlMinifyResult as $, ALL_FLAGS as A, type DockerfileLintFinding as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type DockerfileLintResult as E, type DockerfileStage as F, type EditorConfigIssue as G, type EditorConfigProperty as H, type EditorConfigSection as I, type EditorConfigValidationResult as J, type EnvEntry as K, type EnvParseResult as L, type ExportsIssue as M, type ExportsShape as N, type ExportsValidationResult as O, type FenceTagIssue as P, type FenceTagIssueType as Q, type FenceValidationResult as R, type GitCommandConfig as S, type GitCommandResult as T, type GitOperation as U, type GithubUrlInfo as V, type GithubUrlType as W, type GitignoreTestResult as X, type GqlFormatResult as Y, type HtmlFormatResult as Z, type HtmlMinifyOptions as _, type ApiEndpoint as a, formatCss as a$, type JsMinifyOptions as a0, type JsMinifyResult as a1, KNOWN_LANGUAGE_TAGS as a2, type LinkReferenceDefinition as a3, type LinkReferenceUsage as a4, MIME_TABLE as a5, type MarkdownFootnoteDefinition as a6, type MarkdownFootnoteReference as a7, type MarkdownFootnoteResult as a8, type MarkdownLinkReferenceResult as a9, type SqlFormatOptions as aA, type SqlPlaceholder as aB, type SqlPlaceholderResult as aC, type SvgSpriteResult as aD, type SvgSpriteSymbol as aE, type TestPatternResult as aF, type TsconfigIssue as aG, type TsconfigValidationResult as aH, analyzeRegexGroups as aI, auditDependencyRanges as aJ, buildCharacterClass as aK, buildDockerPull as aL, buildDockerRun as aM, buildGitCommand as aN, collapseHtmlWhitespace as aO, collapseJsWhitespace as aP, countProperties as aQ, countRules as aR, countSqlPlaceholders as aS, detectDialect as aT, detectOperationType as aU, detectRedos as aV, envToExport as aW, envToJson as aX, extractMarkdownFootnotes as aY, extractMarkdownLinkReferences as aZ, extractSvgSpriteSymbols as a_, type MatchResult as aa, type MermaidSyntaxIssue as ab, type MermaidSyntaxResult as ac, type MermaidSyntaxRule as ad, type MimeEntry as ae, type MimeLookupResult as af, OPERATIONS as ag, type ParsedSpec as ah, type PlaceholderStyle as ai, type RedosFinding as aj, type RedosResult as ak, type RedosSeverity as al, type RegexBackreferenceInfo as am, type RegexError as an, type RegexFlag as ao, type RegexGroupAnalysis as ap, type RegexGroupInfo as aq, type RegexGroupIssue as ar, type RegexMatch as as, type RegexResult as at, type RegexSuccess as au, type ResolvedLinkReference as av, SQL_DEFAULT_OPTIONS as aw, type Segment as ax, type SpecVersion as ay, type SqlDialect as az, type ApiInfo as b, formatGql as b0, formatHtml as b1, formatSql as b2, getEndpointsByTag as b3, getHtmlStats as b4, getJsStats as b5, getMethodColor as b6, isValidTag as b7, lintConventionalCommit as b8, lintDockerfile as b9, validateEditorConfig as bA, validateEnvKey as bB, validateFenceLanguageTags as bC, validateMermaidSyntax as bD, validatePackageExports as bE, validateTsconfig as bF, lookupMime as ba, minifyCss as bb, minifyGql as bc, minifyHtml as bd, minifyJs as be, minifySql as bf, normalizeRef as bg, parseCommitTrailers as bh, parseConnectionString as bi, parseDockerImage as bj, parseEnv as bk, parseGitCommand as bl, parseGithubUrl as bm, parseSpec as bn, removeConsoleCalls as bo, removeEmptyAttributes as bp, removeHtmlComments as bq, removeJsComments as br, removeRedundantAttributes as bs, searchCheatsheet as bt, searchEndpoints as bu, splitStatements as bv, testGitignorePatterns as bw, testPattern as bx, testRegex as by, validateAria as bz, code as c, type AriaIssue as d, type AriaValidationResult as e, type CharClassOptions as f, type CharClassResult as g, type CheatsheetEntry as h, type CommitTrailer as i, type CommitTrailerResult as j, type ConnectionStringHost as k, type ConnectionStringResult as l, type ConventionalCommitFinding as m, type ConventionalCommitFooter as n, type ConventionalCommitOptions as o, type ConventionalCommitParsed as p, type ConventionalCommitResult as q, type ConventionalCommitSeverity as r, type CssResult as s, type DependencyAuditDuplicate as t, type DependencyAuditEntry as u, type DependencyAuditIssue as v, type DependencyAuditResult as w, type DependencyRangeType as x, type DependencySection as y, type DockerImageRef as z };
@@ -36,6 +36,7 @@
36
36
  * - markdown-fence-lang-validator (validateFenceLanguageTags, KNOWN_LANGUAGE_TAGS)
37
37
  * - sql-placeholder-counter (countSqlPlaceholders)
38
38
  * - regex-character-class-builder (buildCharacterClass)
39
+ * - mermaid-syntax-validator (validateMermaidSyntax)
39
40
  */
40
41
  type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
41
42
  declare const ALL_FLAGS: RegexFlag[];
@@ -203,6 +204,34 @@ interface DockerfileLintResult {
203
204
  declare function lintDockerfile(content: string): DockerfileLintResult | {
204
205
  error: string;
205
206
  };
207
+ type MermaidSyntaxRule = 'unrecognized-diagram-type' | 'unterminated-subgraph' | 'unexpected-end' | 'unbalanced-brackets' | 'malformed-edge' | 'participant-before-declared';
208
+ interface MermaidSyntaxIssue {
209
+ rule: MermaidSyntaxRule;
210
+ line: number;
211
+ message: string;
212
+ }
213
+ interface MermaidSyntaxResult {
214
+ diagramType: string | null;
215
+ valid: boolean;
216
+ issues: MermaidSyntaxIssue[];
217
+ }
218
+ /**
219
+ * Heuristic syntax validation for a Mermaid diagram definition: recognizes
220
+ * flowchart/graph, sequenceDiagram, classDiagram, stateDiagram(-v2),
221
+ * erDiagram, and pie by their header keyword, then runs diagram-specific
222
+ * structural checks. Flowcharts are checked for an unterminated `subgraph`,
223
+ * a stray `end`, unbalanced node brackets, and an edge arrow missing a node
224
+ * on either side. Sequence diagrams are checked for a participant whose
225
+ * first message reference comes before its explicit `participant`/`actor`
226
+ * declaration later in the file (a participant never declared explicitly
227
+ * is not flagged, since Mermaid auto-creates it on first use). This is a
228
+ * line-based heuristic, not a full Mermaid grammar: it never renders the
229
+ * diagram, and a bracket-like substring inside a quoted node label can
230
+ * produce a false positive.
231
+ */
232
+ declare function validateMermaidSyntax(input: string): MermaidSyntaxResult | {
233
+ error: string;
234
+ };
206
235
  interface JsMinifyOptions {
207
236
  removeComments?: boolean;
208
237
  collapseWhitespace?: boolean;
@@ -871,6 +900,9 @@ type code_MarkdownFootnoteReference = MarkdownFootnoteReference;
871
900
  type code_MarkdownFootnoteResult = MarkdownFootnoteResult;
872
901
  type code_MarkdownLinkReferenceResult = MarkdownLinkReferenceResult;
873
902
  type code_MatchResult = MatchResult;
903
+ type code_MermaidSyntaxIssue = MermaidSyntaxIssue;
904
+ type code_MermaidSyntaxResult = MermaidSyntaxResult;
905
+ type code_MermaidSyntaxRule = MermaidSyntaxRule;
874
906
  type code_MimeEntry = MimeEntry;
875
907
  type code_MimeLookupResult = MimeLookupResult;
876
908
  declare const code_OPERATIONS: typeof OPERATIONS;
@@ -960,10 +992,11 @@ declare const code_validateAria: typeof validateAria;
960
992
  declare const code_validateEditorConfig: typeof validateEditorConfig;
961
993
  declare const code_validateEnvKey: typeof validateEnvKey;
962
994
  declare const code_validateFenceLanguageTags: typeof validateFenceLanguageTags;
995
+ declare const code_validateMermaidSyntax: typeof validateMermaidSyntax;
963
996
  declare const code_validatePackageExports: typeof validatePackageExports;
964
997
  declare const code_validateTsconfig: typeof validateTsconfig;
965
998
  declare namespace code {
966
- export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CharClassOptions as CharClassOptions, type code_CharClassResult as CharClassResult, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, type code_DockerImageRef as DockerImageRef, type code_DockerfileLintFinding as DockerfileLintFinding, type code_DockerfileLintResult as DockerfileLintResult, type code_DockerfileStage as DockerfileStage, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, type code_LinkReferenceDefinition as LinkReferenceDefinition, type code_LinkReferenceUsage as LinkReferenceUsage, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, type code_MarkdownLinkReferenceResult as MarkdownLinkReferenceResult, type code_MatchResult as MatchResult, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, type code_ResolvedLinkReference as ResolvedLinkReference, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, code_buildCharacterClass as buildCharacterClass, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractMarkdownLinkReferences as extractMarkdownLinkReferences, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lintDockerfile as lintDockerfile, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
999
+ export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, type code_AriaIssue as AriaIssue, type code_AriaValidationResult as AriaValidationResult, code_CHEATSHEET as CHEATSHEET, type code_CharClassOptions as CharClassOptions, type code_CharClassResult as CharClassResult, type code_CheatsheetEntry as CheatsheetEntry, type code_CommitTrailer as CommitTrailer, type code_CommitTrailerResult as CommitTrailerResult, type code_ConnectionStringHost as ConnectionStringHost, type code_ConnectionStringResult as ConnectionStringResult, type code_ConventionalCommitFinding as ConventionalCommitFinding, type code_ConventionalCommitFooter as ConventionalCommitFooter, type code_ConventionalCommitOptions as ConventionalCommitOptions, type code_ConventionalCommitParsed as ConventionalCommitParsed, type code_ConventionalCommitResult as ConventionalCommitResult, type code_ConventionalCommitSeverity as ConventionalCommitSeverity, type code_CssResult as CssResult, code_DEFAULT_COMMIT_TYPES as DEFAULT_COMMIT_TYPES, type code_DependencyAuditDuplicate as DependencyAuditDuplicate, type code_DependencyAuditEntry as DependencyAuditEntry, type code_DependencyAuditIssue as DependencyAuditIssue, type code_DependencyAuditResult as DependencyAuditResult, type code_DependencyRangeType as DependencyRangeType, type code_DependencySection as DependencySection, type code_DockerImageRef as DockerImageRef, type code_DockerfileLintFinding as DockerfileLintFinding, type code_DockerfileLintResult as DockerfileLintResult, type code_DockerfileStage as DockerfileStage, type code_EditorConfigIssue as EditorConfigIssue, type code_EditorConfigProperty as EditorConfigProperty, type code_EditorConfigSection as EditorConfigSection, type code_EditorConfigValidationResult as EditorConfigValidationResult, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, type code_ExportsIssue as ExportsIssue, type code_ExportsShape as ExportsShape, type code_ExportsValidationResult as ExportsValidationResult, type code_FenceTagIssue as FenceTagIssue, type code_FenceTagIssueType as FenceTagIssueType, type code_FenceValidationResult as FenceValidationResult, type code_GitCommandConfig as GitCommandConfig, type code_GitCommandResult as GitCommandResult, type code_GitOperation as GitOperation, type code_GithubUrlInfo as GithubUrlInfo, type code_GithubUrlType as GithubUrlType, type code_GitignoreTestResult as GitignoreTestResult, type code_GqlFormatResult as GqlFormatResult, type code_HtmlFormatResult as HtmlFormatResult, type code_HtmlMinifyOptions as HtmlMinifyOptions, type code_HtmlMinifyResult as HtmlMinifyResult, type code_JsMinifyOptions as JsMinifyOptions, type code_JsMinifyResult as JsMinifyResult, code_KNOWN_LANGUAGE_TAGS as KNOWN_LANGUAGE_TAGS, type code_LinkReferenceDefinition as LinkReferenceDefinition, type code_LinkReferenceUsage as LinkReferenceUsage, code_MIME_TABLE as MIME_TABLE, type code_MarkdownFootnoteDefinition as MarkdownFootnoteDefinition, type code_MarkdownFootnoteReference as MarkdownFootnoteReference, type code_MarkdownFootnoteResult as MarkdownFootnoteResult, type code_MarkdownLinkReferenceResult as MarkdownLinkReferenceResult, type code_MatchResult as MatchResult, type code_MermaidSyntaxIssue as MermaidSyntaxIssue, type code_MermaidSyntaxResult as MermaidSyntaxResult, type code_MermaidSyntaxRule as MermaidSyntaxRule, type code_MimeEntry as MimeEntry, type code_MimeLookupResult as MimeLookupResult, code_OPERATIONS as OPERATIONS, type code_ParsedSpec as ParsedSpec, type code_PlaceholderStyle as PlaceholderStyle, type code_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexBackreferenceInfo as RegexBackreferenceInfo, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexGroupAnalysis as RegexGroupAnalysis, type code_RegexGroupInfo as RegexGroupInfo, type code_RegexGroupIssue as RegexGroupIssue, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, type code_ResolvedLinkReference as ResolvedLinkReference, code_SQL_DEFAULT_OPTIONS as SQL_DEFAULT_OPTIONS, type code_Segment as Segment, type code_SpecVersion as SpecVersion, type code_SqlDialect as SqlDialect, type code_SqlFormatOptions as SqlFormatOptions, type code_SqlPlaceholder as SqlPlaceholder, type code_SqlPlaceholderResult as SqlPlaceholderResult, type code_SvgSpriteResult as SvgSpriteResult, type code_SvgSpriteSymbol as SvgSpriteSymbol, type code_TestPatternResult as TestPatternResult, type code_TsconfigIssue as TsconfigIssue, type code_TsconfigValidationResult as TsconfigValidationResult, code_analyzeRegexGroups as analyzeRegexGroups, code_auditDependencyRanges as auditDependencyRanges, code_buildCharacterClass as buildCharacterClass, code_buildDockerPull as buildDockerPull, code_buildDockerRun as buildDockerRun, code_buildGitCommand as buildGitCommand, code_collapseHtmlWhitespace as collapseHtmlWhitespace, code_collapseJsWhitespace as collapseJsWhitespace, code_countProperties as countProperties, code_countRules as countRules, code_countSqlPlaceholders as countSqlPlaceholders, code_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, code_extractMarkdownFootnotes as extractMarkdownFootnotes, code_extractMarkdownLinkReferences as extractMarkdownLinkReferences, code_extractSvgSpriteSymbols as extractSvgSpriteSymbols, code_formatCss as formatCss, code_formatGql as formatGql, code_formatHtml as formatHtml, code_formatSql as formatSql, code_getEndpointsByTag as getEndpointsByTag, code_getHtmlStats as getHtmlStats, code_getJsStats as getJsStats, code_getMethodColor as getMethodColor, code_isValidTag as isValidTag, code_lintConventionalCommit as lintConventionalCommit, code_lintDockerfile as lintDockerfile, code_lookupMime as lookupMime, code_minifyCss as minifyCss, code_minifyGql as minifyGql, code_minifyHtml as minifyHtml, code_minifyJs as minifyJs, code_minifySql as minifySql, code_normalizeRef as normalizeRef, code_parseCommitTrailers as parseCommitTrailers, code_parseConnectionString as parseConnectionString, code_parseDockerImage as parseDockerImage, code_parseEnv as parseEnv, code_parseGitCommand as parseGitCommand, code_parseGithubUrl as parseGithubUrl, code_parseSpec as parseSpec, code_removeConsoleCalls as removeConsoleCalls, code_removeEmptyAttributes as removeEmptyAttributes, code_removeHtmlComments as removeHtmlComments, code_removeJsComments as removeJsComments, code_removeRedundantAttributes as removeRedundantAttributes, code_searchCheatsheet as searchCheatsheet, code_searchEndpoints as searchEndpoints, code_splitStatements as splitStatements, code_testGitignorePatterns as testGitignorePatterns, code_testPattern as testPattern, code_testRegex as testRegex, code_validateAria as validateAria, code_validateEditorConfig as validateEditorConfig, code_validateEnvKey as validateEnvKey, code_validateFenceLanguageTags as validateFenceLanguageTags, code_validateMermaidSyntax as validateMermaidSyntax, code_validatePackageExports as validatePackageExports, code_validateTsconfig as validateTsconfig };
967
1000
  }
968
1001
 
969
- export { type HtmlMinifyResult as $, ALL_FLAGS as A, type DockerfileLintFinding as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type DockerfileLintResult as E, type DockerfileStage as F, type EditorConfigIssue as G, type EditorConfigProperty as H, type EditorConfigSection as I, type EditorConfigValidationResult as J, type EnvEntry as K, type EnvParseResult as L, type ExportsIssue as M, type ExportsShape as N, type ExportsValidationResult as O, type FenceTagIssue as P, type FenceTagIssueType as Q, type FenceValidationResult as R, type GitCommandConfig as S, type GitCommandResult as T, type GitOperation as U, type GithubUrlInfo as V, type GithubUrlType as W, type GitignoreTestResult as X, type GqlFormatResult as Y, type HtmlFormatResult as Z, type HtmlMinifyOptions as _, type ApiEndpoint as a, formatSql as a$, type JsMinifyOptions as a0, type JsMinifyResult as a1, KNOWN_LANGUAGE_TAGS as a2, type LinkReferenceDefinition as a3, type LinkReferenceUsage as a4, MIME_TABLE as a5, type MarkdownFootnoteDefinition as a6, type MarkdownFootnoteReference as a7, type MarkdownFootnoteResult as a8, type MarkdownLinkReferenceResult as a9, type SvgSpriteResult as aA, type SvgSpriteSymbol as aB, type TestPatternResult as aC, type TsconfigIssue as aD, type TsconfigValidationResult as aE, analyzeRegexGroups as aF, auditDependencyRanges as aG, buildCharacterClass as aH, buildDockerPull as aI, buildDockerRun as aJ, buildGitCommand as aK, collapseHtmlWhitespace as aL, collapseJsWhitespace as aM, countProperties as aN, countRules as aO, countSqlPlaceholders as aP, detectDialect as aQ, detectOperationType as aR, detectRedos as aS, envToExport as aT, envToJson as aU, extractMarkdownFootnotes as aV, extractMarkdownLinkReferences as aW, extractSvgSpriteSymbols as aX, formatCss as aY, formatGql as aZ, formatHtml as a_, type MatchResult as aa, type MimeEntry as ab, type MimeLookupResult as ac, OPERATIONS as ad, type ParsedSpec as ae, type PlaceholderStyle as af, type RedosFinding as ag, type RedosResult as ah, type RedosSeverity as ai, type RegexBackreferenceInfo as aj, type RegexError as ak, type RegexFlag as al, type RegexGroupAnalysis as am, type RegexGroupInfo as an, type RegexGroupIssue as ao, type RegexMatch as ap, type RegexResult as aq, type RegexSuccess as ar, type ResolvedLinkReference as as, SQL_DEFAULT_OPTIONS as at, type Segment as au, type SpecVersion as av, type SqlDialect as aw, type SqlFormatOptions as ax, type SqlPlaceholder as ay, type SqlPlaceholderResult as az, type ApiInfo as b, getEndpointsByTag as b0, getHtmlStats as b1, getJsStats as b2, getMethodColor as b3, isValidTag as b4, lintConventionalCommit as b5, lintDockerfile as b6, lookupMime as b7, minifyCss as b8, minifyGql as b9, validatePackageExports as bA, validateTsconfig as bB, minifyHtml as ba, minifyJs as bb, minifySql as bc, normalizeRef as bd, parseCommitTrailers as be, parseConnectionString as bf, parseDockerImage as bg, parseEnv as bh, parseGitCommand as bi, parseGithubUrl as bj, parseSpec as bk, removeConsoleCalls as bl, removeEmptyAttributes as bm, removeHtmlComments as bn, removeJsComments as bo, removeRedundantAttributes as bp, searchCheatsheet as bq, searchEndpoints as br, splitStatements as bs, testGitignorePatterns as bt, testPattern as bu, testRegex as bv, validateAria as bw, validateEditorConfig as bx, validateEnvKey as by, validateFenceLanguageTags as bz, code as c, type AriaIssue as d, type AriaValidationResult as e, type CharClassOptions as f, type CharClassResult as g, type CheatsheetEntry as h, type CommitTrailer as i, type CommitTrailerResult as j, type ConnectionStringHost as k, type ConnectionStringResult as l, type ConventionalCommitFinding as m, type ConventionalCommitFooter as n, type ConventionalCommitOptions as o, type ConventionalCommitParsed as p, type ConventionalCommitResult as q, type ConventionalCommitSeverity as r, type CssResult as s, type DependencyAuditDuplicate as t, type DependencyAuditEntry as u, type DependencyAuditIssue as v, type DependencyAuditResult as w, type DependencyRangeType as x, type DependencySection as y, type DockerImageRef as z };
1002
+ export { type HtmlMinifyResult as $, ALL_FLAGS as A, type DockerfileLintFinding as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type DockerfileLintResult as E, type DockerfileStage as F, type EditorConfigIssue as G, type EditorConfigProperty as H, type EditorConfigSection as I, type EditorConfigValidationResult as J, type EnvEntry as K, type EnvParseResult as L, type ExportsIssue as M, type ExportsShape as N, type ExportsValidationResult as O, type FenceTagIssue as P, type FenceTagIssueType as Q, type FenceValidationResult as R, type GitCommandConfig as S, type GitCommandResult as T, type GitOperation as U, type GithubUrlInfo as V, type GithubUrlType as W, type GitignoreTestResult as X, type GqlFormatResult as Y, type HtmlFormatResult as Z, type HtmlMinifyOptions as _, type ApiEndpoint as a, formatCss as a$, type JsMinifyOptions as a0, type JsMinifyResult as a1, KNOWN_LANGUAGE_TAGS as a2, type LinkReferenceDefinition as a3, type LinkReferenceUsage as a4, MIME_TABLE as a5, type MarkdownFootnoteDefinition as a6, type MarkdownFootnoteReference as a7, type MarkdownFootnoteResult as a8, type MarkdownLinkReferenceResult as a9, type SqlFormatOptions as aA, type SqlPlaceholder as aB, type SqlPlaceholderResult as aC, type SvgSpriteResult as aD, type SvgSpriteSymbol as aE, type TestPatternResult as aF, type TsconfigIssue as aG, type TsconfigValidationResult as aH, analyzeRegexGroups as aI, auditDependencyRanges as aJ, buildCharacterClass as aK, buildDockerPull as aL, buildDockerRun as aM, buildGitCommand as aN, collapseHtmlWhitespace as aO, collapseJsWhitespace as aP, countProperties as aQ, countRules as aR, countSqlPlaceholders as aS, detectDialect as aT, detectOperationType as aU, detectRedos as aV, envToExport as aW, envToJson as aX, extractMarkdownFootnotes as aY, extractMarkdownLinkReferences as aZ, extractSvgSpriteSymbols as a_, type MatchResult as aa, type MermaidSyntaxIssue as ab, type MermaidSyntaxResult as ac, type MermaidSyntaxRule as ad, type MimeEntry as ae, type MimeLookupResult as af, OPERATIONS as ag, type ParsedSpec as ah, type PlaceholderStyle as ai, type RedosFinding as aj, type RedosResult as ak, type RedosSeverity as al, type RegexBackreferenceInfo as am, type RegexError as an, type RegexFlag as ao, type RegexGroupAnalysis as ap, type RegexGroupInfo as aq, type RegexGroupIssue as ar, type RegexMatch as as, type RegexResult as at, type RegexSuccess as au, type ResolvedLinkReference as av, SQL_DEFAULT_OPTIONS as aw, type Segment as ax, type SpecVersion as ay, type SqlDialect as az, type ApiInfo as b, formatGql as b0, formatHtml as b1, formatSql as b2, getEndpointsByTag as b3, getHtmlStats as b4, getJsStats as b5, getMethodColor as b6, isValidTag as b7, lintConventionalCommit as b8, lintDockerfile as b9, validateEditorConfig as bA, validateEnvKey as bB, validateFenceLanguageTags as bC, validateMermaidSyntax as bD, validatePackageExports as bE, validateTsconfig as bF, lookupMime as ba, minifyCss as bb, minifyGql as bc, minifyHtml as bd, minifyJs as be, minifySql as bf, normalizeRef as bg, parseCommitTrailers as bh, parseConnectionString as bi, parseDockerImage as bj, parseEnv as bk, parseGitCommand as bl, parseGithubUrl as bm, parseSpec as bn, removeConsoleCalls as bo, removeEmptyAttributes as bp, removeHtmlComments as bq, removeJsComments as br, removeRedundantAttributes as bs, searchCheatsheet as bt, searchEndpoints as bu, splitStatements as bv, testGitignorePatterns as bw, testPattern as bx, testRegex as by, validateAria as bz, code as c, type AriaIssue as d, type AriaValidationResult as e, type CharClassOptions as f, type CharClassResult as g, type CheatsheetEntry as h, type CommitTrailer as i, type CommitTrailerResult as j, type ConnectionStringHost as k, type ConnectionStringResult as l, type ConventionalCommitFinding as m, type ConventionalCommitFooter as n, type ConventionalCommitOptions as o, type ConventionalCommitParsed as p, type ConventionalCommitResult as q, type ConventionalCommitSeverity as r, type CssResult as s, type DependencyAuditDuplicate as t, type DependencyAuditEntry as u, type DependencyAuditIssue as v, type DependencyAuditResult as w, type DependencyRangeType as x, type DependencySection as y, type DockerImageRef as z };