@utilix-tech/sdk 0.32.0 → 0.34.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +15 -6
  3. package/dist/{chunk-CSNTHZHF.js → chunk-3YUKLV5N.js} +81 -1
  4. package/dist/{chunk-LXKIPPDG.js → chunk-UUT5HNST.js} +121 -1
  5. package/dist/{chunk-6FIB72KX.js → chunk-YEXQDI3J.js} +63 -1
  6. package/dist/{chunk-GDIZWDBY.js → chunk-ZPQOE7KD.js} +78 -1
  7. package/dist/{code-DaRvff2v.d.cts → code-BK-x8hVx.d.cts} +51 -2
  8. package/dist/{code-DaRvff2v.d.ts → code-BK-x8hVx.d.ts} +51 -2
  9. package/dist/{data-C4lCByXw.d.cts → data-CFeS9kes.d.cts} +35 -2
  10. package/dist/{data-C4lCByXw.d.ts → data-CFeS9kes.d.ts} +35 -2
  11. package/dist/index.cjs +339 -0
  12. package/dist/index.d.cts +4 -4
  13. package/dist/index.d.ts +4 -4
  14. package/dist/index.js +4 -4
  15. package/dist/{network-D7Epuerc.d.cts → network-DfY5Ikvr.d.cts} +34 -2
  16. package/dist/{network-D7Epuerc.d.ts → network-DfY5Ikvr.d.ts} +34 -2
  17. package/dist/tools/code.cjs +120 -0
  18. package/dist/tools/code.d.cts +1 -1
  19. package/dist/tools/code.d.ts +1 -1
  20. package/dist/tools/code.js +1 -1
  21. package/dist/tools/data.cjs +62 -0
  22. package/dist/tools/data.d.cts +1 -1
  23. package/dist/tools/data.d.ts +1 -1
  24. package/dist/tools/data.js +1 -1
  25. package/dist/tools/network.cjs +80 -0
  26. package/dist/tools/network.d.cts +1 -1
  27. package/dist/tools/network.d.ts +1 -1
  28. package/dist/tools/network.js +1 -1
  29. package/dist/tools/units.cjs +77 -0
  30. package/dist/tools/units.d.cts +1 -1
  31. package/dist/tools/units.d.ts +1 -1
  32. package/dist/tools/units.js +1 -1
  33. package/dist/{units-DQYLZd1n.d.ts → units-BhoxdHhs.d.cts} +42 -2
  34. package/dist/{units-DQYLZd1n.d.cts → units-BhoxdHhs.d.ts} +42 -2
  35. package/package.json +1 -1
@@ -20,6 +20,7 @@
20
20
  * - mime-lookup (lookupMime, MIME_TABLE)
21
21
  * - github-url-parser (parseGithubUrl)
22
22
  * - redos-detector (detectRedos)
23
+ * - conventional-commit-linter (lintConventionalCommit)
23
24
  */
24
25
  type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u';
25
26
  declare const ALL_FLAGS: RegexFlag[];
@@ -334,13 +335,60 @@ interface RedosResult {
334
335
  declare function detectRedos(pattern: string): RedosResult | {
335
336
  error: string;
336
337
  };
338
+ type ConventionalCommitSeverity = 'error' | 'warning';
339
+ interface ConventionalCommitFinding {
340
+ rule: string;
341
+ severity: ConventionalCommitSeverity;
342
+ message: string;
343
+ }
344
+ interface ConventionalCommitFooter {
345
+ token: string;
346
+ value: string;
347
+ }
348
+ interface ConventionalCommitParsed {
349
+ header: string;
350
+ type: string | null;
351
+ scope: string | null;
352
+ breaking: boolean;
353
+ description: string | null;
354
+ body: string | null;
355
+ footers: ConventionalCommitFooter[];
356
+ }
357
+ interface ConventionalCommitOptions {
358
+ types?: string[];
359
+ maxHeaderLength?: number;
360
+ }
361
+ interface ConventionalCommitResult {
362
+ message: string;
363
+ valid: boolean;
364
+ parsed: ConventionalCommitParsed;
365
+ findings: ConventionalCommitFinding[];
366
+ }
367
+ declare const DEFAULT_COMMIT_TYPES: string[];
368
+ /**
369
+ * Lint a commit message against the Conventional Commits v1.0.0 spec. Pass
370
+ * the full message (header, optional blank line, optional body, optional
371
+ * footers). Returns the parsed type/scope/description/body/footers plus a
372
+ * list of findings; `valid` is true iff there are no error-severity findings.
373
+ * This is a heuristic linter: multi-line footer values are not supported.
374
+ */
375
+ declare function lintConventionalCommit(message: string, options?: ConventionalCommitOptions): ConventionalCommitResult | {
376
+ error: string;
377
+ };
337
378
 
338
379
  declare const code_ALL_FLAGS: typeof ALL_FLAGS;
339
380
  type code_ApiEndpoint = ApiEndpoint;
340
381
  type code_ApiInfo = ApiInfo;
341
382
  declare const code_CHEATSHEET: typeof CHEATSHEET;
342
383
  type code_CheatsheetEntry = CheatsheetEntry;
384
+ type code_ConventionalCommitFinding = ConventionalCommitFinding;
385
+ type code_ConventionalCommitFooter = ConventionalCommitFooter;
386
+ type code_ConventionalCommitOptions = ConventionalCommitOptions;
387
+ type code_ConventionalCommitParsed = ConventionalCommitParsed;
388
+ type code_ConventionalCommitResult = ConventionalCommitResult;
389
+ type code_ConventionalCommitSeverity = ConventionalCommitSeverity;
343
390
  type code_CssResult = CssResult;
391
+ declare const code_DEFAULT_COMMIT_TYPES: typeof DEFAULT_COMMIT_TYPES;
344
392
  type code_DockerImageRef = DockerImageRef;
345
393
  type code_EnvEntry = EnvEntry;
346
394
  type code_EnvParseResult = EnvParseResult;
@@ -396,6 +444,7 @@ declare const code_getHtmlStats: typeof getHtmlStats;
396
444
  declare const code_getJsStats: typeof getJsStats;
397
445
  declare const code_getMethodColor: typeof getMethodColor;
398
446
  declare const code_isValidTag: typeof isValidTag;
447
+ declare const code_lintConventionalCommit: typeof lintConventionalCommit;
399
448
  declare const code_lookupMime: typeof lookupMime;
400
449
  declare const code_minifyCss: typeof minifyCss;
401
450
  declare const code_minifyGql: typeof minifyGql;
@@ -420,7 +469,7 @@ declare const code_testPattern: typeof testPattern;
420
469
  declare const code_testRegex: typeof testRegex;
421
470
  declare const code_validateEnvKey: typeof validateEnvKey;
422
471
  declare namespace code {
423
- export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, type code_CssResult as CssResult, type code_DockerImageRef as DockerImageRef, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, 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_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_MIME_TABLE as MIME_TABLE, 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_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, 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_TestPatternResult as TestPatternResult, 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_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, 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_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_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_testPattern as testPattern, code_testRegex as testRegex, code_validateEnvKey as validateEnvKey };
472
+ export { code_ALL_FLAGS as ALL_FLAGS, type code_ApiEndpoint as ApiEndpoint, type code_ApiInfo as ApiInfo, code_CHEATSHEET as CHEATSHEET, type code_CheatsheetEntry as CheatsheetEntry, 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_DockerImageRef as DockerImageRef, type code_EnvEntry as EnvEntry, type code_EnvParseResult as EnvParseResult, 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_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_MIME_TABLE as MIME_TABLE, 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_RedosFinding as RedosFinding, type code_RedosResult as RedosResult, type code_RedosSeverity as RedosSeverity, type code_RegexError as RegexError, type code_RegexFlag as RegexFlag, type code_RegexMatch as RegexMatch, type code_RegexResult as RegexResult, type code_RegexSuccess as RegexSuccess, 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_TestPatternResult as TestPatternResult, 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_detectDialect as detectDialect, code_detectOperationType as detectOperationType, code_detectRedos as detectRedos, code_envToExport as envToExport, code_envToJson as envToJson, 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_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_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_testPattern as testPattern, code_testRegex as testRegex, code_validateEnvKey as validateEnvKey };
424
473
  }
425
474
 
426
- export { formatCss as $, ALL_FLAGS as A, type SqlDialect as B, CHEATSHEET as C, type DockerImageRef as D, type EnvEntry as E, type SqlFormatOptions as F, type GitCommandConfig as G, type HtmlFormatResult as H, buildDockerPull as I, type JsMinifyOptions as J, buildDockerRun as K, buildGitCommand as L, MIME_TABLE as M, collapseHtmlWhitespace as N, OPERATIONS as O, type ParsedSpec as P, collapseJsWhitespace as Q, type RedosFinding as R, SQL_DEFAULT_OPTIONS as S, type TestPatternResult as T, countProperties as U, countRules as V, detectDialect as W, detectOperationType as X, detectRedos as Y, envToExport as Z, envToJson as _, type ApiEndpoint as a, formatGql as a0, formatHtml as a1, formatSql as a2, getEndpointsByTag as a3, getHtmlStats as a4, getJsStats as a5, getMethodColor as a6, isValidTag as a7, lookupMime as a8, minifyCss as a9, minifyGql as aa, minifyHtml as ab, minifyJs as ac, minifySql as ad, normalizeRef as ae, parseDockerImage as af, parseEnv as ag, parseGitCommand as ah, parseGithubUrl as ai, parseSpec as aj, removeConsoleCalls as ak, removeEmptyAttributes as al, removeHtmlComments as am, removeJsComments as an, removeRedundantAttributes as ao, searchCheatsheet as ap, searchEndpoints as aq, splitStatements as ar, testPattern as as, testRegex as at, validateEnvKey as au, type ApiInfo as b, code as c, type CheatsheetEntry as d, type CssResult as e, type EnvParseResult as f, type GitCommandResult as g, type GitOperation as h, type GithubUrlInfo as i, type GithubUrlType as j, type GqlFormatResult as k, type HtmlMinifyOptions as l, type HtmlMinifyResult as m, type JsMinifyResult as n, type MatchResult as o, type MimeEntry as p, type MimeLookupResult as q, type RedosResult as r, type RedosSeverity as s, type RegexError as t, type RegexFlag as u, type RegexMatch as v, type RegexResult as w, type RegexSuccess as x, type Segment as y, type SpecVersion as z };
475
+ export { countProperties as $, ALL_FLAGS as A, type RegexError as B, CHEATSHEET as C, DEFAULT_COMMIT_TYPES as D, type EnvEntry as E, type RegexFlag as F, type GitCommandConfig as G, type HtmlFormatResult as H, type RegexMatch as I, type JsMinifyOptions as J, type RegexResult as K, type RegexSuccess as L, MIME_TABLE as M, type Segment as N, OPERATIONS as O, type ParsedSpec as P, type SpecVersion as Q, type RedosFinding as R, SQL_DEFAULT_OPTIONS as S, type SqlDialect as T, type SqlFormatOptions as U, type TestPatternResult as V, buildDockerPull as W, buildDockerRun as X, buildGitCommand as Y, collapseHtmlWhitespace as Z, collapseJsWhitespace as _, type ApiEndpoint as a, countRules as a0, detectDialect as a1, detectOperationType as a2, detectRedos as a3, envToExport as a4, envToJson as a5, formatCss as a6, formatGql as a7, formatHtml as a8, formatSql as a9, testPattern as aA, testRegex as aB, validateEnvKey as aC, getEndpointsByTag as aa, getHtmlStats as ab, getJsStats as ac, getMethodColor as ad, isValidTag as ae, lintConventionalCommit as af, lookupMime as ag, minifyCss as ah, minifyGql as ai, minifyHtml as aj, minifyJs as ak, minifySql as al, normalizeRef as am, parseDockerImage as an, parseEnv as ao, parseGitCommand as ap, parseGithubUrl as aq, parseSpec as ar, removeConsoleCalls as as, removeEmptyAttributes as at, removeHtmlComments as au, removeJsComments as av, removeRedundantAttributes as aw, searchCheatsheet as ax, searchEndpoints as ay, splitStatements as az, type ApiInfo as b, code as c, type CheatsheetEntry as d, type ConventionalCommitFinding as e, type ConventionalCommitFooter as f, type ConventionalCommitOptions as g, type ConventionalCommitParsed as h, type ConventionalCommitResult as i, type ConventionalCommitSeverity as j, type CssResult as k, type DockerImageRef as l, type EnvParseResult as m, type GitCommandResult as n, type GitOperation as o, type GithubUrlInfo as p, type GithubUrlType as q, type GqlFormatResult as r, type HtmlMinifyOptions as s, type HtmlMinifyResult as t, type JsMinifyResult as u, type MatchResult as v, type MimeEntry as w, type MimeLookupResult as x, type RedosResult as y, type RedosSeverity as z };
@@ -14,6 +14,7 @@
14
14
  * - ndjson-formatter: validateNdjson, minifyNdjson, formatNdjson, ndjsonToJsonArray, jsonArrayToNdjson
15
15
  * - subtitle-converter: parseSubtitleTimestamp, formatSubtitleTimestamp, detectSubtitleFormat, parseSubtitles, serializeSubtitles, convertSubtitles, shiftSubtitles
16
16
  * - markdown-front-matter-parser: parseFrontMatter
17
+ * - markdown-toc-generator: generateMarkdownToc
17
18
  */
18
19
  interface ValidationResult {
19
20
  valid: boolean;
@@ -291,6 +292,34 @@ interface FrontMatterError {
291
292
  * "---" delimiter is returned as-is with `hasFrontMatter: false`.
292
293
  */
293
294
  declare function parseFrontMatter(input: string): FrontMatterResult | FrontMatterError;
295
+ interface MarkdownTocOptions {
296
+ /** Shallowest heading level to include (1-6). Default 1. */
297
+ minLevel?: number;
298
+ /** Deepest heading level to include (1-6). Default 6. */
299
+ maxLevel?: number;
300
+ /** Render as a numbered list instead of a bullet list. Default false. */
301
+ ordered?: boolean;
302
+ }
303
+ interface MarkdownTocEntry {
304
+ level: number;
305
+ text: string;
306
+ slug: string;
307
+ }
308
+ interface MarkdownTocResult {
309
+ toc: string;
310
+ entries: MarkdownTocEntry[];
311
+ }
312
+ /**
313
+ * Generate a Markdown table of contents from a document's ATX headings
314
+ * (`#` through `######`). Returns both the rendered TOC (a nested bullet or
315
+ * numbered list of links) and the parsed heading entries with GitHub-style
316
+ * anchor slugs, so duplicate headings get `-1`, `-2`, ... suffixes the same
317
+ * way GitHub's own renderer disambiguates them. Headings inside fenced code
318
+ * blocks (```` ``` ```` or `~~~`) are ignored.
319
+ */
320
+ declare function generateMarkdownToc(markdown: string, options?: MarkdownTocOptions): MarkdownTocResult | {
321
+ error: string;
322
+ };
294
323
 
295
324
  type data_ConvertedSubtitles = ConvertedSubtitles;
296
325
  type data_CsvParseResult = CsvParseResult;
@@ -301,6 +330,9 @@ type data_EnvParseResult = EnvParseResult;
301
330
  type data_FrontMatterError = FrontMatterError;
302
331
  type data_FrontMatterResult = FrontMatterResult;
303
332
  type data_IniSection = IniSection;
333
+ type data_MarkdownTocEntry = MarkdownTocEntry;
334
+ type data_MarkdownTocOptions = MarkdownTocOptions;
335
+ type data_MarkdownTocResult = MarkdownTocResult;
304
336
  type data_NdjsonLineResult = NdjsonLineResult;
305
337
  type data_NdjsonValidateResult = NdjsonValidateResult;
306
338
  type data_ParseOptions = ParseOptions;
@@ -323,6 +355,7 @@ declare const data_formatNdjson: typeof formatNdjson;
323
355
  declare const data_formatSubtitleTimestamp: typeof formatSubtitleTimestamp;
324
356
  declare const data_formatToml: typeof formatToml;
325
357
  declare const data_formatXml: typeof formatXml;
358
+ declare const data_generateMarkdownToc: typeof generateMarkdownToc;
326
359
  declare const data_getSection: typeof getSection;
327
360
  declare const data_getSectionNames: typeof getSectionNames;
328
361
  declare const data_getTomlStats: typeof getTomlStats;
@@ -357,7 +390,7 @@ declare const data_validateXml: typeof validateXml;
357
390
  declare const data_validateYaml: typeof validateYaml;
358
391
  declare const data_xmlToJson: typeof xmlToJson;
359
392
  declare namespace data {
360
- export { type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvParseResult as CsvParseResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
393
+ export { type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvParseResult as CsvParseResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
361
394
  }
362
395
 
363
- export { serializeSubtitles as $, getYamlStats as A, iniToJson as B, type ConvertedSubtitles as C, jsonArrayToNdjson as D, type EnvDiffError as E, type FrontMatterError as F, jsonToIni as G, jsonToToml as H, type IniSection as I, jsonToXml as J, minifyNdjson as K, minifyToml as L, minifyXml as M, type NdjsonLineResult as N, ndjsonToJsonArray as O, type ParseOptions as P, parseCsv as Q, parseEnv as R, type SubtitleCue as S, type TomlFormatResult as T, parseFrontMatter as U, type ValidationResult as V, parseIni as W, type XmlFormatResult as X, parseSubtitleTimestamp as Y, parseSubtitles as Z, parseXmlToObject as _, type CsvParseResult as a, shiftSubtitles as a0, stringifyIni as a1, toCsvString as a2, tomlToJson as a3, validateEnvKey as a4, validateIni as a5, validateNdjson as a6, validateToml as a7, validateXml as a8, validateYaml as a9, xmlToJson as aa, type EnvDiffResult as b, type EnvEntry as c, data as d, type EnvParseResult as e, type FrontMatterResult as f, type NdjsonValidateResult as g, type ParsedIni as h, type ParsedSubtitles as i, type SubtitleFormat as j, type XmlToJsonOptions as k, convertSubtitles as l, csvToJson as m, detectDelimiter as n, detectSubtitleFormat as o, diffEnvExample as p, envToExport as q, envToJson as r, formatNdjson as s, formatSubtitleTimestamp as t, formatToml as u, formatXml as v, getSection as w, getSectionNames as x, getTomlStats as y, getXmlStats as z };
396
+ export { parseIni as $, getSectionNames as A, getTomlStats as B, type ConvertedSubtitles as C, getXmlStats as D, type EnvDiffError as E, type FrontMatterError as F, getYamlStats as G, iniToJson as H, type IniSection as I, jsonArrayToNdjson as J, jsonToIni as K, jsonToToml as L, type MarkdownTocEntry as M, type NdjsonLineResult as N, jsonToXml as O, type ParseOptions as P, minifyNdjson as Q, minifyToml as R, type SubtitleCue as S, type TomlFormatResult as T, minifyXml as U, type ValidationResult as V, ndjsonToJsonArray as W, type XmlFormatResult as X, parseCsv as Y, parseEnv as Z, parseFrontMatter as _, type CsvParseResult as a, parseSubtitleTimestamp as a0, parseSubtitles as a1, parseXmlToObject as a2, serializeSubtitles as a3, shiftSubtitles as a4, stringifyIni as a5, toCsvString as a6, tomlToJson as a7, validateEnvKey as a8, validateIni as a9, validateNdjson as aa, validateToml as ab, validateXml as ac, validateYaml as ad, xmlToJson as ae, type EnvDiffResult as b, type EnvEntry as c, data as d, type EnvParseResult as e, type FrontMatterResult as f, type MarkdownTocOptions as g, type MarkdownTocResult as h, type NdjsonValidateResult as i, type ParsedIni as j, type ParsedSubtitles as k, type SubtitleFormat as l, type XmlToJsonOptions as m, convertSubtitles as n, csvToJson as o, detectDelimiter as p, detectSubtitleFormat as q, diffEnvExample as r, envToExport as s, envToJson as t, formatNdjson as u, formatSubtitleTimestamp as v, formatToml as w, formatXml as x, generateMarkdownToc as y, getSection as z };
@@ -14,6 +14,7 @@
14
14
  * - ndjson-formatter: validateNdjson, minifyNdjson, formatNdjson, ndjsonToJsonArray, jsonArrayToNdjson
15
15
  * - subtitle-converter: parseSubtitleTimestamp, formatSubtitleTimestamp, detectSubtitleFormat, parseSubtitles, serializeSubtitles, convertSubtitles, shiftSubtitles
16
16
  * - markdown-front-matter-parser: parseFrontMatter
17
+ * - markdown-toc-generator: generateMarkdownToc
17
18
  */
18
19
  interface ValidationResult {
19
20
  valid: boolean;
@@ -291,6 +292,34 @@ interface FrontMatterError {
291
292
  * "---" delimiter is returned as-is with `hasFrontMatter: false`.
292
293
  */
293
294
  declare function parseFrontMatter(input: string): FrontMatterResult | FrontMatterError;
295
+ interface MarkdownTocOptions {
296
+ /** Shallowest heading level to include (1-6). Default 1. */
297
+ minLevel?: number;
298
+ /** Deepest heading level to include (1-6). Default 6. */
299
+ maxLevel?: number;
300
+ /** Render as a numbered list instead of a bullet list. Default false. */
301
+ ordered?: boolean;
302
+ }
303
+ interface MarkdownTocEntry {
304
+ level: number;
305
+ text: string;
306
+ slug: string;
307
+ }
308
+ interface MarkdownTocResult {
309
+ toc: string;
310
+ entries: MarkdownTocEntry[];
311
+ }
312
+ /**
313
+ * Generate a Markdown table of contents from a document's ATX headings
314
+ * (`#` through `######`). Returns both the rendered TOC (a nested bullet or
315
+ * numbered list of links) and the parsed heading entries with GitHub-style
316
+ * anchor slugs, so duplicate headings get `-1`, `-2`, ... suffixes the same
317
+ * way GitHub's own renderer disambiguates them. Headings inside fenced code
318
+ * blocks (```` ``` ```` or `~~~`) are ignored.
319
+ */
320
+ declare function generateMarkdownToc(markdown: string, options?: MarkdownTocOptions): MarkdownTocResult | {
321
+ error: string;
322
+ };
294
323
 
295
324
  type data_ConvertedSubtitles = ConvertedSubtitles;
296
325
  type data_CsvParseResult = CsvParseResult;
@@ -301,6 +330,9 @@ type data_EnvParseResult = EnvParseResult;
301
330
  type data_FrontMatterError = FrontMatterError;
302
331
  type data_FrontMatterResult = FrontMatterResult;
303
332
  type data_IniSection = IniSection;
333
+ type data_MarkdownTocEntry = MarkdownTocEntry;
334
+ type data_MarkdownTocOptions = MarkdownTocOptions;
335
+ type data_MarkdownTocResult = MarkdownTocResult;
304
336
  type data_NdjsonLineResult = NdjsonLineResult;
305
337
  type data_NdjsonValidateResult = NdjsonValidateResult;
306
338
  type data_ParseOptions = ParseOptions;
@@ -323,6 +355,7 @@ declare const data_formatNdjson: typeof formatNdjson;
323
355
  declare const data_formatSubtitleTimestamp: typeof formatSubtitleTimestamp;
324
356
  declare const data_formatToml: typeof formatToml;
325
357
  declare const data_formatXml: typeof formatXml;
358
+ declare const data_generateMarkdownToc: typeof generateMarkdownToc;
326
359
  declare const data_getSection: typeof getSection;
327
360
  declare const data_getSectionNames: typeof getSectionNames;
328
361
  declare const data_getTomlStats: typeof getTomlStats;
@@ -357,7 +390,7 @@ declare const data_validateXml: typeof validateXml;
357
390
  declare const data_validateYaml: typeof validateYaml;
358
391
  declare const data_xmlToJson: typeof xmlToJson;
359
392
  declare namespace data {
360
- export { type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvParseResult as CsvParseResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
393
+ export { type data_ConvertedSubtitles as ConvertedSubtitles, type data_CsvParseResult as CsvParseResult, type data_EnvDiffError as EnvDiffError, type data_EnvDiffResult as EnvDiffResult, type data_EnvEntry as EnvEntry, type data_EnvParseResult as EnvParseResult, type data_FrontMatterError as FrontMatterError, type data_FrontMatterResult as FrontMatterResult, type data_IniSection as IniSection, type data_MarkdownTocEntry as MarkdownTocEntry, type data_MarkdownTocOptions as MarkdownTocOptions, type data_MarkdownTocResult as MarkdownTocResult, type data_NdjsonLineResult as NdjsonLineResult, type data_NdjsonValidateResult as NdjsonValidateResult, type data_ParseOptions as ParseOptions, type data_ParsedIni as ParsedIni, type data_ParsedSubtitles as ParsedSubtitles, type data_SubtitleCue as SubtitleCue, type data_SubtitleFormat as SubtitleFormat, type data_TomlFormatResult as TomlFormatResult, type data_ValidationResult as ValidationResult, type data_XmlFormatResult as XmlFormatResult, type data_XmlToJsonOptions as XmlToJsonOptions, data_convertSubtitles as convertSubtitles, data_csvToJson as csvToJson, data_detectDelimiter as detectDelimiter, data_detectSubtitleFormat as detectSubtitleFormat, data_diffEnvExample as diffEnvExample, data_envToExport as envToExport, data_envToJson as envToJson, data_formatNdjson as formatNdjson, data_formatSubtitleTimestamp as formatSubtitleTimestamp, data_formatToml as formatToml, data_formatXml as formatXml, data_generateMarkdownToc as generateMarkdownToc, data_getSection as getSection, data_getSectionNames as getSectionNames, data_getTomlStats as getTomlStats, data_getXmlStats as getXmlStats, data_getYamlStats as getYamlStats, data_iniToJson as iniToJson, data_jsonArrayToNdjson as jsonArrayToNdjson, data_jsonToIni as jsonToIni, data_jsonToToml as jsonToToml, data_jsonToXml as jsonToXml, data_minifyNdjson as minifyNdjson, data_minifyToml as minifyToml, data_minifyXml as minifyXml, data_ndjsonToJsonArray as ndjsonToJsonArray, data_parseCsv as parseCsv, data_parseEnv as parseEnv, data_parseFrontMatter as parseFrontMatter, data_parseIni as parseIni, data_parseSubtitleTimestamp as parseSubtitleTimestamp, data_parseSubtitles as parseSubtitles, data_parseXmlToObject as parseXmlToObject, data_serializeSubtitles as serializeSubtitles, data_shiftSubtitles as shiftSubtitles, data_stringifyIni as stringifyIni, data_toCsvString as toCsvString, data_tomlToJson as tomlToJson, data_validateEnvKey as validateEnvKey, data_validateIni as validateIni, data_validateNdjson as validateNdjson, data_validateToml as validateToml, data_validateXml as validateXml, data_validateYaml as validateYaml, data_xmlToJson as xmlToJson };
361
394
  }
362
395
 
363
- export { serializeSubtitles as $, getYamlStats as A, iniToJson as B, type ConvertedSubtitles as C, jsonArrayToNdjson as D, type EnvDiffError as E, type FrontMatterError as F, jsonToIni as G, jsonToToml as H, type IniSection as I, jsonToXml as J, minifyNdjson as K, minifyToml as L, minifyXml as M, type NdjsonLineResult as N, ndjsonToJsonArray as O, type ParseOptions as P, parseCsv as Q, parseEnv as R, type SubtitleCue as S, type TomlFormatResult as T, parseFrontMatter as U, type ValidationResult as V, parseIni as W, type XmlFormatResult as X, parseSubtitleTimestamp as Y, parseSubtitles as Z, parseXmlToObject as _, type CsvParseResult as a, shiftSubtitles as a0, stringifyIni as a1, toCsvString as a2, tomlToJson as a3, validateEnvKey as a4, validateIni as a5, validateNdjson as a6, validateToml as a7, validateXml as a8, validateYaml as a9, xmlToJson as aa, type EnvDiffResult as b, type EnvEntry as c, data as d, type EnvParseResult as e, type FrontMatterResult as f, type NdjsonValidateResult as g, type ParsedIni as h, type ParsedSubtitles as i, type SubtitleFormat as j, type XmlToJsonOptions as k, convertSubtitles as l, csvToJson as m, detectDelimiter as n, detectSubtitleFormat as o, diffEnvExample as p, envToExport as q, envToJson as r, formatNdjson as s, formatSubtitleTimestamp as t, formatToml as u, formatXml as v, getSection as w, getSectionNames as x, getTomlStats as y, getXmlStats as z };
396
+ export { parseIni as $, getSectionNames as A, getTomlStats as B, type ConvertedSubtitles as C, getXmlStats as D, type EnvDiffError as E, type FrontMatterError as F, getYamlStats as G, iniToJson as H, type IniSection as I, jsonArrayToNdjson as J, jsonToIni as K, jsonToToml as L, type MarkdownTocEntry as M, type NdjsonLineResult as N, jsonToXml as O, type ParseOptions as P, minifyNdjson as Q, minifyToml as R, type SubtitleCue as S, type TomlFormatResult as T, minifyXml as U, type ValidationResult as V, ndjsonToJsonArray as W, type XmlFormatResult as X, parseCsv as Y, parseEnv as Z, parseFrontMatter as _, type CsvParseResult as a, parseSubtitleTimestamp as a0, parseSubtitles as a1, parseXmlToObject as a2, serializeSubtitles as a3, shiftSubtitles as a4, stringifyIni as a5, toCsvString as a6, tomlToJson as a7, validateEnvKey as a8, validateIni as a9, validateNdjson as aa, validateToml as ab, validateXml as ac, validateYaml as ad, xmlToJson as ae, type EnvDiffResult as b, type EnvEntry as c, data as d, type EnvParseResult as e, type FrontMatterResult as f, type MarkdownTocOptions as g, type MarkdownTocResult as h, type NdjsonValidateResult as i, type ParsedIni as j, type ParsedSubtitles as k, type SubtitleFormat as l, type XmlToJsonOptions as m, convertSubtitles as n, csvToJson as o, detectDelimiter as p, detectSubtitleFormat as q, diffEnvExample as r, envToExport as s, envToJson as t, formatNdjson as u, formatSubtitleTimestamp as v, formatToml as w, formatXml as x, generateMarkdownToc as y, getSection as z };